apeiros changed the topic of #ruby to: Ruby 1.9.3-p374: http://ruby-lang.org (ruby-2.0.0-rc1) || Paste >3 lines of text on http://gist.github.com
<atmosx> I'll watch a big bang theory episode
<atmosx> and go get some sleep
nateberkopec has quit [Quit: Leaving...]
otherj has joined #ruby
Goles has joined #ruby
katherinem13 has quit [Quit: leaving]
katherinem13_ is now known as katherinem13
nmabry has quit [Quit: nmabry]
snearch has quit [Quit: Verlassend]
headius has quit [Quit: headius]
Banistergalaxy has quit [Ping timeout: 272 seconds]
Maziz has joined #ruby
<Muz> atmosx: BOJANGLES
pu22l3r has joined #ruby
awarner has quit [Remote host closed the connection]
chrisbolton has quit [Quit: chrisbolton]
slainer68 has joined #ruby
phinfonet has quit [Quit: Leaving...]
<atmosx> Muz: hm, you mean bazingas?
Michael_ has joined #ruby
RagingDave has quit [Quit: Ex-Chat]
_alejandro has joined #ruby
dankest is now known as dankest|away
baroquebobcat has joined #ruby
artOfWar has quit [Read error: Connection reset by peer]
artOfWar_ has joined #ruby
diegoviola has quit [Ping timeout: 252 seconds]
havenn has quit [Remote host closed the connection]
cr3 has quit [Quit: leaving]
<ruzu> gazoongas
Dakuan has joined #ruby
yfeldblum has joined #ruby
jrist-afk is now known as jrist
dankest|away is now known as dankest
dmerrick has quit [Quit: dmerrick]
banisterfiend has quit [Remote host closed the connection]
etcetera has joined #ruby
banisterfiend has joined #ruby
mjolk has quit [Quit: This computer has gone to sleep]
Dakuan has quit [Remote host closed the connection]
alx- has joined #ruby
bigmac has joined #ruby
anonymuse1 has joined #ruby
Dakuan has joined #ruby
havenn has joined #ruby
bigmac is now known as i8igmac
anonymuse1 has quit [Read error: Operation timed out]
matthias_ has quit [Ping timeout: 245 seconds]
uris has quit [Ping timeout: 256 seconds]
anonymuse has quit [Ping timeout: 252 seconds]
zph has quit [Quit: Computer has gone to sleep.]
Dakuan has quit [Ping timeout: 248 seconds]
tps_ has quit [Read error: Connection reset by peer]
tps__ has joined #ruby
Sep1 has joined #ruby
nathancahill has quit [Quit: nathancahill]
Michael_ has quit [Remote host closed the connection]
kiyoura has joined #ruby
vlad_starkov has joined #ruby
cakehero has joined #ruby
vlad_starkov has quit [Read error: Connection reset by peer]
jds has joined #ruby
etcetera has quit []
jaygen has quit [Remote host closed the connection]
oddover has joined #ruby
anonymuse has joined #ruby
Sep1 has quit [Quit: Leaving.]
<oddover> hi. I was wondering if someone could explain to me what options the flags param for File.fnmatch has.
<oddover> or point me to a place that has those options
zeade has quit [Quit: Leaving.]
<atmosx> and with that I'm off to bed
atmosx has quit [Quit: And so the story goes…]
preller has quit [Ping timeout: 240 seconds]
<oddover> yea, I saw that, but I didn't really understand what "flags is a bitwise OR of the FNM_xxx parameters. The same glob pattern and flags are used by Dir::glob." means
dankest is now known as dankest|away
jds has quit [Ping timeout: 260 seconds]
c0rn has quit [Ping timeout: 248 seconds]
uris has joined #ruby
artOfWar_ has quit [Remote host closed the connection]
epylinkn has joined #ruby
woolite64_ has joined #ruby
c0rn has joined #ruby
rasinchive has quit [Quit: Lost terminal]
artOfWar has joined #ruby
beneggett has quit [Quit: Textual IRC Client: http://www.textualapp.com/]
<eric_> I have a all new question. How do I remove certian letters/symbols from a string
woolite64 has quit [Ping timeout: 248 seconds]
<reactormonk> eric_, String#delete
<eric_> ?
<eric_> What
oddover has left #ruby [#ruby]
<eric_> Just certain symbols like / and .
pu22l3r has quit [Remote host closed the connection]
mikekelly has quit [Quit: ZNC - http://znc.in]
reppard has joined #ruby
dankest|away is now known as dankest
mikekelly has joined #ruby
bjeanes has quit [Quit: quitting]
brianpWins has quit [Quit: brianpWins]
<apeiros> eric_: go to ruby-doc.org, go to the core docs, go to the String docs, and there look for the delete method (which is called String#delete - instance method 'delete' of class String)
<eric_> oh alright
dmiller has quit [Ping timeout: 248 seconds]
<apeiros> or use `ri String#delete` in your shell (requires that you installed the docs along with ruby)
pskosinski has quit [Quit: Learn Life's Little Lessons]
anonymuse has quit [Quit: Leaving.]
NemesisD has quit [Ping timeout: 255 seconds]
pcarrier has quit []
anonymuse has joined #ruby
sylvain` has joined #ruby
havenn has quit [Remote host closed the connection]
sylvain` has quit [Remote host closed the connection]
anonymuse has quit [Client Quit]
thisirs has quit [Quit: ERC Version 5.3 (IRC client for Emacs)]
kennym has joined #ruby
anonymuse has joined #ruby
havenn has joined #ruby
kennym has left #ruby [#ruby]
emanu has quit [Quit: emanu]
slainer68 has quit [Remote host closed the connection]
cakehero has quit [Quit: Computer has gone to sleep.]
bjeanes has joined #ruby
<eric_> I have the url http://ping.pong, this doesnt seem to delete http:// and / urlc = url.delete("http://", "/")
otherj has quit [Quit: otherj]
jrist is now known as jrist-out
kirun has quit [Quit: Client exiting]
havenn has quit [Ping timeout: 255 seconds]
<blazes816> eric_: you want something like: url = url.gsub /https?:\/\//, ''
<eric_> oh
<eric_> yah
<blazes816> url.delete('http') would delete all occurrences of h, t, or p in the string
baroquebobcat has quit [Quit: baroquebobcat]
<eric_> Oh
robotmay has quit [Remote host closed the connection]
<eric_> And I have a / at the end of url
<eric_> how would i also delete that
<blazes816> url = url.gsub /\/$/, ''
<eric_> k
cjs226 has joined #ruby
<eric_> like the url is http://ping.pong/ how would i get rid of the last part urlc = url.gsub /http?:\/\//, ''
diegoviola has joined #ruby
nomenkun has quit [Remote host closed the connection]
nomenkun has joined #ruby
<eric_> blazes816
<blazes816> eric_: something like url.gsub!( /https?:\/\/(.+?)(?>\/)(?:\/$)?/, "\\1")
<eric_> damn, long stuff
<eric_> Dont work
<blazes816> yeah, well. you know. you could remove the 2nd ? ;)
<blazes816> hmm
<eric_> egh?
dankest is now known as dankest|away
<blazes816> 'http://ping.pong/'.gsub( /https?:\/\/(.+?)(?>\/)(?:\/$)?/, "\\1") #=> ping.pong
<blazes816> eric_: working for me
<blazes816> gist?
<eric_> k
<eric_> WORKS :O
<eric_> I did this: urlc = url.gsub( /https?:\/\/(.+?)(?>\/)(?:\/$)?/, "\\1")
<blazes816> sweet
toekutr has quit [Remote host closed the connection]
philcrissman has quit [Remote host closed the connection]
marr has quit [Ping timeout: 248 seconds]
nateberkopec has joined #ruby
<emocakes> yo yo
<emocakes> so whats the big differnce between p327 and p374?
<emocakes> i can either compile p374 or use a prebuilt 327
<reppard> wahts up everyone
<reppard> emocakes git diff?
subbyyy has joined #ruby
<emocakes> yeah
<emocakes> reading the changelog
<emocakes> nothing major like you will die if you use 327
<emocakes> plus, 2 is nearly out
<emocakes> so i'll rebuild this template with 2 when its out
dmiller has joined #ruby
woolite64_ has quit [Quit: Leaving]
willb has quit [Ping timeout: 264 seconds]
statarb3 has quit [Ping timeout: 252 seconds]
<reppard> i want to code something, anyone got any ideas?
epylinkn has quit [Ping timeout: 252 seconds]
jblack has joined #ruby
willb has joined #ruby
<blazes816> reppard: any particular areas of interest?
diegoviola has quit [Ping timeout: 252 seconds]
dmiller has quit [Ping timeout: 256 seconds]
<banisterfiend> reppard: work on making this cool: https://github.com/pry/pry-git
fuzai has joined #ruby
<reppard> banisterfiend: pry is pretty cool as is imo =)
_bart has quit [Quit: _bart]
<reppard> blazes816: maybe a cool api to tie into?
Zolrath has quit []
artOfWar has quit [Remote host closed the connection]
dankest|away has quit [Quit: Leaving...]
<blazes816> hmm…i've got some api libs to be writing…. ;)
<reppard> haha like what?
slainer68 has joined #ruby
epylinkn has joined #ruby
nomenkun has quit [Read error: Connection reset by peer]
<blazes816> a JS api lib for our app
<blazes816> but seriously, if you want to mess with apis, you could try zapier
nomenkun has joined #ruby
<blazes816> it provides access to a bunch so you could do a web2.0 style mashup
<blazes816> for old times sake
shorts has joined #ruby
<reppard> tahts pretty cool, ill have to check it out
<reppard> i spent all day at work fixing broken functional tests so i want something to have fun with
samuel02 has joined #ruby
<blazes816> haha, for sure
<reppard> i work on a pretty large legacy code base
<blazes816> hate that
<reppard> there is a custom Factory that was built a long time ago
<blazes816> yeah, me too. sucks. rails 2 also?
stopbit has joined #ruby
<reppard> yeah rails 2
<reppard> ruby 1.8.7
<blazes816> that sucks
<reppard> haha
<blazes816> we patched ours to work on 1.9
<fuzai> If something returns an array and you assign that to a variable, it's copying the data into that variable, not linking that variable with the function right? The reason i ask is I used the return of a function to populate an array and now it seems that every time I try to manipulate the array it's asking the function rather then the snapshot I thought I took
<reppard> the Factory.create_user used in functionals for some reason defaulted to an admin
<reppard> but our average user is not an admin
<blazes816> reppard: hahaha
<blazes816> that sucks
<blazes816> we have shit like that happen all the time
sepp2k has quit [Read error: Connection reset by peer]
cableray has joined #ruby
<reppard> so my pair and i decided to change this as part of a permissions card we are working on
<blazes816> haha trello?
<reppard> guess what, functionals and units broke all over the place
<reppard> haha
<blazes816> we don't work for the same place do we?
<reppard> trello?
<blazes816> yeah, change 1 test, change ALL tests
<reppard> oh haha
otters has joined #ruby
epylinkn has quit [Ping timeout: 252 seconds]
<reppard> today when i started i had 678 failing functionals with a fair amount of erros in the mix
<blazes816> :|
<reppard> when i left i was down to about 254 failing tests
nateberkopec has quit [Quit: Linkinus - http://linkinus.com]
<reppard> its all for the better though. now create_user does what it's suppose to do
<blazes816> nice. you must have removed a lot of tests ;)
<reppard> and we have a create_admin
Playground has joined #ruby
<reppard> nah most of it was simple
<reppard> just missing translations usually
<reppard> because of redirects
pskosinski has joined #ruby
<reppard> the new permissions flag mapping is sweet though, so its pretty easy to get things in line again
horofox has joined #ruby
<reppard> but yeah, by the time we get to rails 3, rails 10 will be out
<reppard> i had an investigation card last week on removing the cache-money gem
ephemerian has quit [Quit: Leaving.]
<reppard> its not maintained anymore and its a blocker for moving to rails 3
slainer68 has quit [Ping timeout: 260 seconds]
d2dchat has quit [Remote host closed the connection]
horofox has quit [Client Quit]
chridal has quit [Ping timeout: 245 seconds]
Dakuan has joined #ruby
yshh has joined #ruby
jds has joined #ruby
jaequery has quit [Quit: Computer has gone to sleep.]
chrismhough has quit [Quit: chrismhough]
<reppard> maybe i can write a vim plugin in ruby
nomenkun has quit [Ping timeout: 252 seconds]
Michael_ has joined #ruby
luckyruby has quit [Remote host closed the connection]
squidBits has quit [Quit: whoops]
Dakuan has quit [Ping timeout: 245 seconds]
tommyvyo_ has joined #ruby
jds has quit [Ping timeout: 248 seconds]
Iszak has quit []
eka has quit [Quit: Computer has gone to sleep.]
<fuzai> how do i convert a set into an array?
Umren has quit [Read error: Connection reset by peer]
<reppard> .to_a
tommyvyo_ has quit [Quit: http://thomasvendetta.com]
<eric_> Can anyone explain wtf this does
<eric_> to_server.write("#{verb} #{uri.path}?#{uri.query} HTTP/#{version}\r\n")
<reppard> eric_: i sure as hell can't from that line alone
dmiller has joined #ruby
<fuzai> thank you :)
<fuzai> oh i just found that in the docs
<eric_> to_server = TCPSocket.new(ip)
<eric_> to_server.write("#{verb} #{uri.path}?#{uri.query} HTTP/#{version}\r\n")
statarb3 has joined #ruby
<reppard> theres alot of meta shit being passed to write
<reppard> what is verb
bjeanes has quit [Ping timeout: 248 seconds]
<eric_> verb = GET
toekutr has joined #ruby
pyx has joined #ruby
<eric_> Let me try to figure this out
<eric_> I know its sending a request to the server
dmiller has quit [Ping timeout: 248 seconds]
<eric_> but ...
bitcrave has quit [Ping timeout: 272 seconds]
mlue has quit [Ping timeout: 272 seconds]
mlue has joined #ruby
mlue has quit [Changing host]
mlue has joined #ruby
<eric_> Ik what it is
<eric_> ...
<eric_> Just not what that is sending
bjeanes has joined #ruby
pavilionXP has joined #ruby
Michael_ has quit [Remote host closed the connection]
dankest has joined #ruby
Alex-_ has joined #ruby
Alex-_ has quit [Client Quit]
<Maziz> hi all
horofox has joined #ruby
bricker_ is now known as bricker
<reppard> wuddup
c0rn has quit [Quit: Computer has gone to sleep.]
alx- has quit [Ping timeout: 260 seconds]
ffranz has quit [Ping timeout: 246 seconds]
yshh has quit [Remote host closed the connection]
xemu has joined #ruby
nomenkun has joined #ruby
JMcAfreak has quit [Ping timeout: 246 seconds]
karasawa has joined #ruby
daniel_-_ has joined #ruby
nomenkun has quit [Ping timeout: 245 seconds]
Michael_ has joined #ruby
samuel02 has quit [Remote host closed the connection]
horofox has quit [Quit: horofox]
maletor has quit [Quit: Computer has gone to sleep.]
daniel_- has quit [Ping timeout: 252 seconds]
TomyLobo has quit [Quit: Standby mode...]
aaronmacy has quit [Quit: Leaving.]
daniel_-_ has quit [Client Quit]
pothibo has quit [Quit: pothibo]
Emmanuel_Chanel has quit [Quit: Leaving]
_bart has joined #ruby
mercwithamouth has quit [Ping timeout: 252 seconds]
Virunga has quit [Remote host closed the connection]
_bart has quit [Client Quit]
nga4 has quit []
friskd has quit [Ping timeout: 244 seconds]
pencilcheck has quit [Remote host closed the connection]
sn0wb1rd has quit [Quit: sn0wb1rd]
dmiller has joined #ruby
bricker is now known as bricker`away
bcx has joined #ruby
<libryder> given any number (user points), x >= 0 <= 300, and a hash of level identifiers (1: 10, 2: 25, 3: 40, 4: 75, …) what is the best way to identify what level a user is?
plotplanexe has quit [Ping timeout: 260 seconds]
<bcx> is there a deterministic JSON encoder for ruby?
ebobby has quit [Quit: Lost terminal]
jekotia has joined #ruby
<libryder> so a user hits level 3 when they have accumulated 40 points
nwertman has quit [Read error: Connection reset by peer]
griffindy has joined #ruby
nwertman has joined #ruby
thillux has joined #ruby
subbyyy has quit [Ping timeout: 240 seconds]
<shevy> libryder what
<shevy> write a method
<bcx> or a way to deterministically serialize a dict in ruby?
<shevy> def level?(i)
<blazes816> I'd write a function such that current_level(score) returns a continuous number than when floored is equal to the level you want. experiment with log functions and such to get the correct 'tapering'
<shevy> libryder actually, a case menu would be simplest
<blazes816> that too
<libryder> i thought about a case but if there are 20 levels it will quickly get out of hand
<reppard> +1 for case menu
subbyyy has joined #ruby
<reppard> libryder: metaprogramming
<reppard> =)
<shevy> libryder http://pastie.org/5723096
<shevy> well, then you need to find the proper hash levels if you dont want to use a case menu
freakazoid0223 has joined #ruby
zeade has joined #ruby
<shevy> so either loop through your hash from the beginning
ossareh has quit [Ping timeout: 252 seconds]
jduan1981 has quit [Ping timeout: 260 seconds]
<shevy> with a toggle-flag to determine when you need to return the proper level
generalissimo has joined #ruby
<blazes816> that is the sort of thing I meant
nkts has joined #ruby
<libryder> here's what i'm thinking https://gist.github.com/5c5bf6460eb0887fea10
karasawa has quit [Ping timeout: 244 seconds]
thillux has quit [Remote host closed the connection]
<libryder> ok blazes816 let me check that link
dmerrick has joined #ruby
cobragoa_ has quit [Remote host closed the connection]
karasawa has joined #ruby
<shevy> libryder you could loop through via .each_pair directly
adeponte has quit [Remote host closed the connection]
pskosinski has quit [Ping timeout: 245 seconds]
<libryder> ah! thanks :)
<shevy> but I think there may be an even simpler way... not that I know of it right now :\
<shevy> perhaps something via .find or .select hmm
<shevy> where are the ruby gurus!
<blazes816> u right there shev
FifthWall has joined #ruby
mikeg has quit [Quit: Leaving]
<libryder> blazes816: i like that idea too
jds has joined #ruby
dmerrick has quit [Client Quit]
cantonic has joined #ruby
samphippen has quit [Quit: Computer has gone to sleep.]
nari has joined #ruby
blazes816 has quit [Quit: blazes816]
<bcx> let's say I have something like a = {'b' => 1, 'c' => 10, 'd' => 20, 'a' => 100}
<bcx> is there a way to serialize it to a string in a deterministic way.
<bcx> i.e. a.to_json always returns the same string
aaronmacy has joined #ruby
entrenador has joined #ruby
<unstable> If I wrote a command line chess game, is there a way to display it better in the terminal?
<unstable> Using ncurses or something say?
entrenador has quit [Client Quit]
entrenador has joined #ruby
xsarin has joined #ruby
jjbohn has joined #ruby
wargasm has quit [Ping timeout: 252 seconds]
<reppard> bcx: yaml?
entrenador has quit [Remote host closed the connection]
entrenador has joined #ruby
syamajala has joined #ruby
karasawa has quit [Ping timeout: 260 seconds]
jds has quit [Ping timeout: 248 seconds]
JumpMast3r has quit [Quit: JumpMast3r]
<reppard> bcx: require 'yaml'; YAML::dump(a)
jjbohn has quit [Client Quit]
Michael_ has quit [Remote host closed the connection]
sn0wb1rd has joined #ruby
niklasb_ has quit [Ping timeout: 246 seconds]
eric_ has quit [Quit: Leaving]
jxf has quit [Ping timeout: 260 seconds]
plotplanexe has joined #ruby
nabn has joined #ruby
<reppard> with yaml you can do stuff like YAML::dump(a).each_line{ |line| p line }
banisterfiend is now known as banister`sleep
nabn has quit [Client Quit]
autumn has quit [Quit: Bye~ xo]
tommyvyo_ has joined #ruby
Nanuq has quit [Quit: leaving]
Michael_ has joined #ruby
joeycarmello has quit [Remote host closed the connection]
<shevy> unstable ncurses is quite awful
Emmanuel_Chanel has joined #ruby
drago757 has joined #ruby
<shevy> unstable you could always reset the terminal, then draw anew, without curses
Nanuq has joined #ruby
autumn has joined #ruby
Markvilla has quit [Quit: Computer has gone to sleep.]
tommyvyo_ has quit [Quit: http://thomasvendetta.com]
jbw has quit [Ping timeout: 272 seconds]
security is now known as megha
<reppard> agreed shevy
<reppard> system("clear")
<shevy> you can make a coloured ascii counter :)
<shevy> I forgot which escape code it was
<shevy> \r\n ?
nathancahill has joined #ruby
anonymuse has quit [Quit: Leaving.]
syamajala has quit [Ping timeout: 260 seconds]
<shevy> oh right
<shevy> system 'clear' it was
fragmachine has joined #ruby
d2dchat has joined #ruby
alvaro_o has quit [Quit: Ex-Chat]
<shevy> here is a ready ascii bubble-dragon http://pastie.org/pastes/5723212/text
<fragmachine> How do I require files so that I can call the script from anywhere and ruby finds them?
<fragmachine> I've been trying things like: __FILE__.split('/')[0..__FILE__.split('/').size-2].join('/') + '/' + '/data/' + 'forecast.txt'
<fragmachine> but yea, doesn't work
<shevy> wow
nabn has joined #ruby
<fragmachine> I know
<fragmachine> haha
<shevy> well fragmachine
<shevy> I guess you use ruby 1.9.x and higher?
<fragmachine> that's right
<fragmachine> it used to work just with require
<fragmachine> but those happy days are over I guess
<shevy> yeah, the bastards changed that
<shevy> anyway, I still use require
<shevy> it can work if you install a project into ruby's SITE_DIR
dankest is now known as dankest|away
<fragmachine> I don't even know what that is
nathancahill has quit [Client Quit]
<shevy> you know that you can install a gem in ruby right?
nabn has quit [Client Quit]
<fragmachine> yea
<shevy> all the gems, all ruby addons, get installed into some lib/ directory, which is the SITE_DIR, the base
entrenador has quit [Quit: Colloquy for iPad - http://colloquy.mobi]
<fragmachine> ahh ok
<shevy> when you do require 'blablabla', it looks whether there is a file called blablabla.rb or a directory blablabla
<shevy> in SITE_DIR
dankest|away has quit [Quit: Leaving...]
nfk has quit [Quit: yawn]
<shevy> I dont know the prefix of your ruby installation
<shevy> in most linux ruby distributions, the SITE_DIR would be at: /usr/lib/ruby/site_ruby/1.9.1
<shevy> when you install a gem, it usually makes a directory there, with its name being the addon
<fragmachine> Well here's the thing, I have my program in a git repositry so I don't want to move the whole thing. Is it possible to sym link it or something?
banister`sleep has quit [Read error: Connection reset by peer]
<shevy> I think you can manipulate the $LOAD_PATH
Hanmac has joined #ruby
<shevy> $LOAD_PATH << Dir.pwd # or something else here... perhaps '.'
bricker`LA is now known as bricker
banister`sleep has joined #ruby
<fragmachine> ahh ok, modify the LOAD_PATH before requiring any files?
templaedhel has quit [Quit: Leaving...]
<shevy> that should work yeah
noyb has joined #ruby
<FifthWall> If you only need your app to work with 1.9+ then you can use require_relative
<FifthWall> sorry 1.9.2+ i believe
karasawa has joined #ruby
<shevy> that would work too
<shevy> but I myself hate to type it
<fragmachine> FifthWall: will that work when I call the script from '/'
<fragmachine> ?
<fragmachine> or anywhere
Hanmac1 has quit [Ping timeout: 248 seconds]
<fragmachine> haha why is that?
<reppard> fragmachine: its relative to where the script is
Michael_ has quit [Remote host closed the connection]
<fragmachine> yea that's the [roblem I've been having
<FifthWall> yeah, it's relative to the file where you call it in i believe
joeycarmello has joined #ruby
jbw has joined #ruby
<reppard> so you get a bunch of '../../../blah/blah/'
yshh has joined #ruby
<shevy> hey, did you guys know that the |block| name is optional for a block?
<shevy> (1..300).each { puts "hi" }
<shevy> I thought I would have to assign one |var| inside there
<fragmachine> I'll investigate further, thanks for your help!
adeponte has joined #ruby
<reppard> shevy: i just found that out the other day using tap
<shevy> aha
MattRB has joined #ruby
<shevy> I am not there yet, to understand .tap
cjs226 has quit []
<reppard> i wasn't either
<reppard> but some code at work was using it so it was sink or swim =)
<shevy> I've been using ruby for so long but I never tried to understand 100%, I was happy with 75%
<shevy> hehe
<reppard> you can use it in a method chain to mutate the object its called on
paul_k has quit [Remote host closed the connection]
<shevy> with .tap you just pass in the object, for a potential guaranteed later use in a method chain right?
<reppard> kind of gives you access between states
<shevy> so that you dont have a nil
<shevy> hmm
<shevy> aha
jonahR has joined #ruby
<shevy> I like that wording... "access between states"
freakazoid0223 has quit [Quit: Leaving]
karasawa has quit [Ping timeout: 246 seconds]
mercwithamouth has joined #ruby
araujo has quit [Quit: Leaving]
yoshie902a has joined #ruby
<reppard> hmmmm
<reppard> maybe it wasn't tap, looks like tap needs a block variable name
rakl has joined #ruby
<yoshie902a> anyone have any recommendations on books/tutorials on machine learning?
<reppard> but yeah you can use it to mutate an object
rakl has quit [Max SendQ exceeded]
drago757 has quit [Read error: Connection reset by peer]
drago757 has joined #ruby
emocakes has quit [Quit: emocakes]
<reppard> some_instance_of_an_object.tap{ |object| object.param = foo; object.baz = bar }
<swarley> w00t for tap
<reppard> i saw it used in a constructor method all meta style
pcarrier has joined #ruby
MattRB has quit [Quit: This computer has gone to sleep]
yshh has quit [Remote host closed the connection]
<shevy> reppard aha. well I always thought that when I iterate via .each, I also need a block variable name... but today I realized that it is optional, that is cool
<shevy> perhaps a month ago I saw something like this for the first time:
<shevy> { |a,(b,c)|
<shevy> or { |*a|
r3nrut has joined #ruby
<reppard> haha
<reppard> crazy shit
cobragoat has joined #ruby
<reppard> yeah in rspec you can call before do with no block var
<reppard> we have a couple of do blocks at work where the block var is optional
<reppard> for functionals there is a login_as user do
<reppard> 1.upto(1000){ p "icanhas block var?" }
syamajala has joined #ruby
philcrissman has joined #ruby
shorts has quit [Remote host closed the connection]
shorts has joined #ruby
<shevy> hehe
jjbohn has joined #ruby
<shevy> good point
<shevy> I forgot about do/end
dankest has joined #ruby
Jacky_ is now known as Jacky
<reppard> same as { } ;)
generalissimo has quit [Remote host closed the connection]
Jacky is now known as Guest77252
Guest77252 is now known as JackyAlcine
JackyAlcine has quit [Changing host]
JackyAlcine has joined #ruby
JackyAlcine is now known as Jacky
<shevy> I rarely use do / end these days
<shevy> it is easier to type
<shevy> but has more characters than {}
<shevy> inside a method, I prefer {} because I can avoid one "end"
bcx has quit [Quit: Leaving.]
<shevy> it confuses me to have multiple "end" :(
cobragoat has quit [Remote host closed the connection]
<reppard> i guess the convention is to use { } if its a single line and do/end for more than one line
<shevy> yeah
<shevy> I gave up on that convention
roadt has quit [Ping timeout: 260 seconds]
cibs has quit [Read error: Connection reset by peer]
<reppard> do and end is nice if you have a hash in a block with a lot of params
<shevy> hmm but you could have {|a,b,c,d,e,f,g| just as well
<reppard> less curly brackets and parenths is better in that case
erichmenge has quit [Ping timeout: 245 seconds]
shorts has quit [Ping timeout: 256 seconds]
xemu has quit [Quit: Nettalk6 - www.ntalk.de]
davidcelis has quit [Ping timeout: 245 seconds]
banister`sleep has quit [Remote host closed the connection]
<reppard> when you have ridiculous attributes like this :conditional_blah_blah_something => Conditions.new(:some_crap => FML::Isuck, :other_crap => FML)
<reppard> and its a hash full of that crap, its nice to clean it up with multi lines
cibs has joined #ruby
<reppard> nested hashes get ugly quick
xybre has quit [Ping timeout: 245 seconds]
jds has joined #ruby
davidcelis has joined #ruby
d2dchat has quit [Remote host closed the connection]
erichmenge has joined #ruby
xybre has joined #ruby
havenn has joined #ruby
MattRB has joined #ruby
zlaty has joined #ruby
jds has quit [Ping timeout: 260 seconds]
banister`sleep has joined #ruby
pcarrier has quit []
cibs has quit [Ping timeout: 245 seconds]
gyre008 has joined #ruby
cibs has joined #ruby
jjbohn has quit [Quit: Leaving...]
dankest has quit [Quit: Leaving...]
<shevy> reppard oh I never liked that kind of handling
<shevy> I more like neat small objects
<shevy> controller.run
jonahR has quit [Ping timeout: 246 seconds]
<shevy> controller.create_new_directories = true
<shevy> some people like to have big initialize() methods with many params
<reppard> legacy code
<shevy> or a hash param
<reppard> not mine =)
<shevy> I never liked that much
<reppard> just have to maintain it
<shevy> hehe
<shevy> throw it away!!!
pu22l3r has joined #ruby
x82_nicole has quit [Quit: Computer has gone to sleep.]
pu22l3r has quit [Remote host closed the connection]
Spooner has quit [Remote host closed the connection]
pu22l3r has joined #ruby
crackfu has joined #ruby
Jacky has quit [Quit: Quit]
jjbohn has joined #ruby
phipes has joined #ruby
tommyvyo has quit [Quit: http://twitter.com/tommyvyo]
dmerrick has joined #ruby
pnkbst has quit [Ping timeout: 276 seconds]
zeade has quit [Read error: Connection reset by peer]
dankest has joined #ruby
Astralum has quit [Read error: Connection reset by peer]
<shevy> I often wonder if a simpler version of ruby would be better
Astralum has joined #ruby
<xybre> mruby?
cibs has quit [Ping timeout: 245 seconds]
cirwin has joined #ruby
tommyvyo has joined #ruby
<cirwin> why is SystemStackError no longer a StandardError?
zeade has joined #ruby
<cirwin> I think I want to catch it, but the type heirarchy is making me nervous
havenn has quit [Remote host closed the connection]
aytch has quit [Remote host closed the connection]
havenn has joined #ruby
<shevy> xybre hmm I think mruby will allow lots of ruby-esque things
<shevy> cirwin dunno. I am sure there is an official explanation (in japanese) for this
<xybre> Yes?
<xybre> cirwin: so it doesn't get caught be rescue
<xybre> s/be/by
<shevy> xybre well like adhere to the ruby ISO specification, it probably will even include @@vars :(
<xybre> shevy: fork it
yacks has joined #ruby
<shevy> hehe
<cirwin> xybre: is that for a reason? I can understand things like "NoMemoryErrors" not being caught (somewhat), and certainly LoadErrors
<cirwin> but it seems like SystemStackErrors denote a very local failure in your program
<cirwin> not a global failure
<xybre> cirwin: you can explictly rescue any error
<davidcelis> hi
<xybre> Stack errors take place in a gobal context.. the Ruby stack.
orcris has joined #ruby
rakl has joined #ruby
<cirwin> xybre: yeah, I know
<cirwin> what I mean is that an OutOfMemory error could be another Thread's "fault"
dmerrick has quit [Ping timeout: 252 seconds]
reppard has quit [Ping timeout: 252 seconds]
<cirwin> a StackOverflow can;t though?
Jonah11_ has joined #ruby
<JoeHazzers> stackexchange 4 lyf
<davidcelis> stack overflow, isn't that a website
<cirwin> SystemStackError
<cirwin> ruby picked the wrong name :)
<Jonah11_> is it possible to start a new thread using Thread.start (or any other way) such that the new thread will not die if it's parent thread dies?
havenn has quit [Ping timeout: 245 seconds]
banister`sleep has quit [Read error: Connection timed out]
crackfu has quit [Remote host closed the connection]
phantasm66 has quit [Quit: *poof*]
crackfu has joined #ruby
<shevy> Jonah11_ hmm not sure... perhaps with Thread.fork ?
cibs has joined #ruby
statarb3 has quit [Ping timeout: 244 seconds]
<xybre> ruby.runpaint is down :(
dmerrick has joined #ruby
banister`sleep has joined #ruby
orcris has quit [Quit: Konversation terminated!]
<Jonah11_> shevy, nope :(
n1x has quit [Ping timeout: 252 seconds]
frem has joined #ruby
crackfu has quit [Ping timeout: 248 seconds]
dmerrick has quit [Client Quit]
dmerrick has joined #ruby
Goopyo has quit [Read error: Connection reset by peer]
mahmoudimus has quit [Quit: Computer has gone to sleep.]
Goopyo has joined #ruby
reppard has joined #ruby
<shevy> hmm
love_color_text has joined #ruby
dmiller has quit [Ping timeout: 248 seconds]
<nazty> hey. anyone use wxRuby>
pu22l3r_ has joined #ruby
<shevy> nazty yeah Hanmac does
<shevy> he wrote his own bindings to wxwidgets too, I think
<shevy> he is very clever
cibs has quit [Ping timeout: 245 seconds]
pu22l3r has quit [Ping timeout: 240 seconds]
browndawg has joined #ruby
gyre008 has quit [Remote host closed the connection]
cibs has joined #ruby
tommyvyo has quit [Quit: http://twitter.com/tommyvyo]
pu22l3r_ has quit [Remote host closed the connection]
uris has quit [Quit: Leaving]
<nazty> oh yeah
<nazty> im looking for a good GUI, im new to ruby
Roa has quit [Ping timeout: 248 seconds]
<shevy> nazty ruby-gnome is good
<shevy> but it's a lot of stuff to read
<Nuck> a good GUI? Do you mean to drag-and-drop Ruby code, a GUI text editor, or a GUI-authoring library? o_O
<shevy> if you are also new to ruby, I would suggest you first learn a bit of ruby, before you dig into the GUI world
<shevy> once you understand how GUIs work, though, you can transition fairly easily between the different toolkits
<shevy> like in qt, slots/signals come into effect, dont think ruby-gnome has slots (but it has signals)
<shevy> label.signal_connect("button-press-event") do |widget, event|
<shevy> ^^^ act on button press event happened
<nazty> shevy, im in windows
<shevy> poor man ;)
<shevy> but ruby-gnome works on windows too
<shevy> just windows kind of sucks
<nazty> i only use windows when i game
<shevy> I know, you guys are the last hope for microsoft
<nazty> other wise im in linux or macosx
cibs has quit [Ping timeout: 245 seconds]
Jonah11_ has quit [Ping timeout: 272 seconds]
<shevy> if the gamers would have games in linux, they would abandon microsoft
<nazty> i must install steam for linux
<shevy> then the only users left would be the old people
<Nuck> shevy: Don't worry, Valve is on it ;)
<nazty> but i cant get the new nvidia drivers to install
<shevy> and some corporate office users
<shevy> macro writers get rich
<nazty> the new ubuntu wont let me change my runtime levels
Jonah11_ has joined #ruby
<shevy> ubuntu must die
<reppard> night everyone
<shevy> nazty, I think they switched to something else
<nazty> i want to boot right into console not xf86
<reppard> time to watch some awesomeness on the raspberry pi
<shevy> they killed /etc/inittab, those bastards :(
<nazty> yes they did :(
<shevy> nazty, I think it is another option in another file now
<reppard> shevy: redhat has inittab
_alejandro has quit [Remote host closed the connection]
<nazty> i heard u have to hold control down while you reboot
<Nuck> Arch represeeeent~
<reppard> default init leve 6 ;)
griffindy has quit [Quit: Computer has gone to sleep.]
<shevy> ah /etc/init/rc-sysinit.conf:
<nazty> its been a while since i used used linux
<nazty> i just started again and everything is changed....
reppard has quit [Quit: leaving]
<nazty> i used to use redhat
<shevy> nazty
<shevy> # Default runlevel, this may be overriden on the kernel command-line
<shevy> # or by faking an old /etc/inittab entry
<shevy> env DEFAULT_RUNLEVEL=2
<nazty> im in windows... wont be a help to me yet
<shevy> hehe
<shevy> well, you can use bash on windows at least :P
<nazty> my memory is shot lol
<nazty> too much partying when i was young
<shevy> when you use scripting languages, you can use them on any OS
<shevy> I started with php (!) on windows (!!!)
jekotia has quit [Quit: ChatZilla 0.9.89-rdmsoft [XULRunner 1.9.0.17/2009122204]]
<nazty> i know this :)
<nazty> i stared with mirc lol
<shevy> I too, it was cool
<nazty> then ircii/epic
<nazty> then tcl/tk
<Nuck> I started with Chatzilla.
<shevy> I use xchat, hexchat nowadays
<shevy> it's a bit similar to mIRC
<nazty> i use xchat in windows
<shevy> but not as cool :\
<shevy> hehe
<nazty> when im in linux i use weechat
<nazty> weechat is GREAT
<shevy> really? I cant use those commandline-only chat clients, I always mispaste
<Nuck> I use weechat on all platforms. I <3 it so much.
<nazty> i want to write a format/theme plugin for weechat
SeoxyS has quit [Quit: SeoxyS]
<nazty> if it looked like irssi it would be great
scottmos has joined #ruby
<Nuck> nazty: You can configure that easily
<nazty> Nuck, all the themes i see for it are basicaly just color themes
<Nuck> Weechat is that configurable. Just look through the settings and config files, I did that for a few days and now people go "wow how amazing" when I use it.
<Nuck> nazty: You can change behaviors in many ways, from hiding the sidebar to removing alignment of usernames.
<nazty> it has the best plugin/addon capabilities i seen in a irc client
<nazty> its like xchat for CLI
cibs has joined #ruby
<nazty> i miss openchat/32
<Nuck> nazty: Honestly, making A into B is usually a bad idea — you should make A and B both look like C, where C is whatever you like ;)
Guest49955 has joined #ruby
Guest49955 has quit [Client Quit]
<shevy> Nuck People go "wow how amazing" when they see you use weechat? :)
<nazty> Nuck, lol. im thinkin on writing a small irc client in ruby
<shevy> nazty I tried that!
<shevy> my first ruby project was an IRC bot
<shevy> it even worked
<Nuck> shevy: I've customized it so well/heavily it's got a UI that rivals most GUI clients.
<shevy> but it was a mess ...
<Nuck> Haha that was my first Node.js project (and my first Ruby project) — I like making bots a LOT!
<nazty> shevy, yeah im gonna make a bot that sits in warez channels, logs the packs, lets you search them and download them using dcc
LL_ has joined #ruby
<nazty> you guys are cool
<shevy> nazty, this is what I came up with at a later time http://pastie.org/5723560
<shevy> it is buggy, not feature complete... it only allows you to connect to an IRC channel and "talk" there. but it is not elegant ... if you want a better code base, look at the cinch bot
i8igmac has quit [Quit: Leaving]
<shevy> dominikh is even here in this channel so you can ask him ;)
adeponte has quit [Remote host closed the connection]
Kudos has quit [Read error: Connection reset by peer]
generalissimo has joined #ruby
yoshie902a has quit [Quit: yoshie902a]
<nazty> nice
<nazty> shevy, what did you use to input lines
<shevy> select
<shevy> loop { select( [$stdin], nil, nil, 1.1 ); user_typed_this = $stdin.readline.chomp
jonahR has joined #ruby
<shevy> select is a bit complicated... let me look at the docu
jds has joined #ruby
<shevy> I dont know of another way to get user-input and external-output into the same commandline window :(
cirwin has quit [Ping timeout: 244 seconds]
kayloos has joined #ruby
<nazty> hmm
<nazty> thats why i wanted gui
dwu has joined #ruby
<shevy> yeah with a GUI it is easier
<nazty> either make a sdi or mdi
<shevy> you can have several widgets
<shevy> but on the commandline? how do you get both input and output into the terminal...
<nazty> i was like damn im gonna have to getc
<Nuck> Why not study irb?
<nazty> yeah
<shevy> irb doesn't use streaming output to you
<nazty> i dont want my command line to scroll up into the text
jenrzzz has joined #ruby
<nazty> everytime i press enter
jduan1981 has joined #ruby
<shevy> hehe
<shevy> oh wait
<shevy> you have this problem? it jumps to the top-left ?
<nazty> i dont have a problem yet cause i didnt start it :)
<nazty> im researching
<shevy> ah ok, because I have that problem sometimes
<shevy> others can not reproduce it, so I am still wondering about it
tjbiddle has quit [Quit: tjbiddle]
browndawg has quit [Quit: Leaving.]
<shevy> if you are brave, you could use ruby ncurses
aeontech has quit [Quit: aeontech]
<nazty> i think ruby shits on python
<shevy> hmm python has more developers :(
<nazty> and perl
forced_request has quit [Read error: Connection reset by peer]
<shevy> both ruby and python are better than perl :D
<nazty> even though i loved perl
<nazty> i was checking out CH
<shevy> perl used to have it easy... less competition in the 1980s to early 1990s
<shevy> (late 1980)
<shevy> Perl appeared in: 1987
<nazty> larry wall
<nazty> i learned perl in prison
jds has quit [Ping timeout: 248 seconds]
<shevy> Ruby in 1995
<shevy> lol
<shevy> that could be an epic quote nazty
<shevy> do you know the "learn programming the hard way" books?
<nazty> my lil brother was in college, taking up computer science have problem with learning perl
<shevy> learning any of them in prison would top that ;)
<nazty> me scripting for a long time.... i bought the Kamel, Programming Perl
<AsgardBSD_> nazty: you where in prison? THEY HAVE COMPUTER IN PRISON????
Jacob_ has joined #ruby
<nazty> had it sent to me in prison, so i could learn it and help my brother over the phone
Jacob_ is now known as Guest18673
<nazty> AsgardBSD_, actually yeah they had one on the cell block for looking at cases
<nazty> no internet
pen has joined #ruby
radic has joined #ruby
LL_ has quit [Ping timeout: 245 seconds]
Guest18673 has quit [Remote host closed the connection]
ecksit has joined #ruby
joshman_ has joined #ruby
radic_ has quit [Read error: Operation timed out]
<Nuck> AsgardBSD_: Nowadays they have Xboxes and shit too. Prisoners gettin' spoiled!
_alejandro has joined #ruby
chriskk has quit [Quit: chriskk]
crackfu has joined #ruby
<shevy> hehe
<shevy> well they can at least learn something that way
<nazty> all the drives and applications were hidden thanks to policies
wargasm has joined #ruby
<nazty> there was no start bar.... no desktop icons
<nazty> just a open application
<nazty> i hacked it though... there was a glitch that let me access the root drive using the open directory dialog....
<shevy> lol
<nazty> i accessed the root drive and got windows pinball up
<nazty> i would charge people a soup to let them play
templaedhel has joined #ruby
<shevy> hahahaha
<nazty> i swear on my momz
<nazty> they took the computer off the cell block
<nazty> brought a new one in
<nazty> it pissed alot of inmates off because i had the computer taken away :/
<nazty> AsgardBSD_, im sorry it was county jail
<nazty> Nuck, it was just so you can look up other cases to try to help your own
<nazty> they didnt have a law library
<nazty> everything was on the computer
<Nuck> Isn't that what lawyers are for? :P
<nazty> Nuck, some people cant afford one, so they try to check it out themselves so the public defender dont fuck them over
cibs has quit [Ping timeout: 245 seconds]
<Nuck> ah lol
<nazty> Anyone use shoes?
<Nuck> I wear them daily, thanks for asking
cibs has joined #ruby
<nazty> nono
<nazty> the ruby gui
<AsgardBSD_> Well, i use them everyday...
<AsgardBSD_> thanks for asking
<nazty> i get the same answer from 2 people?
<AsgardBSD_> wait 5 min, and you will get similar awnser
<nazty> one being funny, the next trying to be a wiseass?
ericalexander has joined #ruby
noyb has quit [Ping timeout: 256 seconds]
cobragoat has joined #ruby
xsarin has quit [Read error: Connection reset by peer]
xsarin_ has joined #ruby
AsgardBSD_ has quit [Remote host closed the connection]
AsgardBSD has joined #ruby
templaedhel has quit [Quit: Leaving...]
mpfundstein has quit [Ping timeout: 245 seconds]
phipes has quit [Quit: phipes]
syamajala has quit [Quit: leaving]
jenrzzz has quit [Ping timeout: 248 seconds]
jsallis has joined #ruby
cibs has quit [Ping timeout: 245 seconds]
locriani has quit [Read error: Connection reset by peer]
locriani_ has joined #ruby
dankest is now known as dankest|away
cibs has joined #ruby
Jacky has joined #ruby
Jacky has quit [Changing host]
Jacky has joined #ruby
Solnse has quit [Ping timeout: 252 seconds]
phipes has joined #ruby
jsallis has quit []
d2dchat has joined #ruby
Maziz has quit [Quit: Maziz]
robert___ has joined #ruby
b1lly has joined #ruby
kenneth has joined #ruby
yewton has quit [Excess Flood]
cirwin has joined #ruby
robert_ has quit [Ping timeout: 256 seconds]
adeponte has joined #ruby
BizarreCake has joined #ruby
yewton has joined #ruby
jsallis has joined #ruby
cibs has quit [Ping timeout: 245 seconds]
Michae___ has joined #ruby
cibs has joined #ruby
noyb has joined #ruby
cableray has quit [Ping timeout: 248 seconds]
nuba has quit [Ping timeout: 276 seconds]
dmiller has joined #ruby
tjbiddle has joined #ruby
nuba has joined #ruby
jsallis has quit []
dankest|away is now known as dankest
dmiller has quit [Ping timeout: 252 seconds]
jjbohn has quit [Quit: Leaving...]
robert___ is now known as robert_
ericalexander has quit [Quit: ericalexander]
undersc0re97 has quit [Ping timeout: 260 seconds]
yoshie902a has joined #ruby
phipes has quit [Quit: phipes]
yoshie902a has quit [Client Quit]
bean__ has joined #ruby
b1lly has left #ruby [#ruby]
jsallis has joined #ruby
slainer68 has joined #ruby
jsallis has quit [Client Quit]
dmerrick has quit [Quit: dmerrick]
dmerrick has joined #ruby
cjs226 has joined #ruby
<passbe> i have an array of hashes, what is the best way to merge insert a hash and merge it with every other hash in the array ?
<fragmachine> when I ruby my ruby script it runs two versions of itself. What would make this happen?
<fragmachine> errr run
slainer68 has quit [Ping timeout: 260 seconds]
dankest is now known as dankest|away
<shevy> passbe can you give a MINIMAL example subset, on a pastie
<swarley> Good question. We'd need code
<shevy> including the desired output you want to achieve
undersc0re97 has joined #ruby
jds has joined #ruby
robert___ has joined #ruby
<fuzai> Is it possible to start my application and watch a variable in realtime in a debugger ( an array ) and still watch the standard out say on seperate virtual terminals?
<shevy> nazty problem is when people pick silly names for ruby projects. you see lots of these... one project is called "god"... another is called "unicorn" ... and so on
cibs has quit [Remote host closed the connection]
<shevy> so picking "shoes" is another silly name
<swarley> uhhhhhhhhhhhh. It's not easy
d2dchat has quit [Remote host closed the connection]
Umren has joined #ruby
<nazty> ehhhh
<nazty> yeah it definitly is
<shevy> fuzai perhaps if it is a global variable, then you could hook into it with set_trace_var()
<swarley> ....
<swarley> Not shoes
<swarley> <fuzai> Is it possible to start my application and watch a variable in realtime in a debugger ( an array ) and still watch the standard out say on seperate virtual terminals?
<swarley> I'm talking about that.
<swarley> I don't give two shits about shoes
<fuzai> ok
<fuzai> I've just got an array that is picking up something strange and i'm not exactly sure where or when
<nazty> swarley, wasnt talkin to you
<swarley> You could use a trace function, but that's not even going to give you what you want really
<fuzai> and i was hoping i could watch it as it changes to try and narrow it
<swarley> nazty; well in that case he is aware that shoes is a project
<swarley> and was referencing the obscurity of the name
<fuzai> You know maybe i can make an eventloop dump to standard out
<swarley> fuzai; you just have to use a ton of print statements
robert_ has quit [Ping timeout: 252 seconds]
<swarley> There is no real easy way to do it.
xsarin_ has quit [Quit: xsarin_]
fragmachine has quit [Remote host closed the connection]
<swarley> You can direct it to a file instead if that makes it better, but that's pretty much standard debugging practice
pjackson has quit [Quit: No Ping reply in 180 seconds.]
b1lly has joined #ruby
pjackson has joined #ruby
<shevy> nazty another problem is that you are on windows :(
jds has quit [Ping timeout: 255 seconds]
<shevy> but give ruby-gnome a try
<shevy> it has about 400 examples
<nazty> about to log into linux in a few
yewton has quit [Excess Flood]
<shevy> fuzai you could try to break it down... the primitive way to do this is to use pp, and exit
dankest|away is now known as dankest
<shevy> another way could be via ruby-debug, or whatever was the name
<shevy> ok nazty
<fuzai> i just made an eventloop that fired every 2 seconds to stdout
<shevy> fuzai an eventloop? how?
cibs has joined #ruby
baphled has quit [Quit: Lost terminal]
<aedornm> is it strange that when people talk about pair programming I honestly can't imagine how that works since I've always been solo?
<fuzai> EventMachine::PeriodicTimer.new(4) do
emergion has joined #ruby
<b1lly> aedornm: it's easy
<b1lly> two people work together on a solution
<b1lly> one person "drives"
yewton has joined #ruby
<aedornm> that would require listening while typing.. I just barely mastered the art of tuning people out!
mercwithamouth has quit [Ping timeout: 248 seconds]
joeycarmello has quit [Remote host closed the connection]
<b1lly> aedornm: not always
<b1lly> so it's like, you might tackle a problem or "think" in a pair
<heftig> the other one backseat-drives
<b1lly> and design the solution verbally
<b1lly> and start driving
baphled has joined #ruby
<b1lly> while the other one back seat drives, yerah
<aedornm> "Stop telling me how to drive!"
<Nuck> No, turn left goddammit.
philcrissman has quit [Remote host closed the connection]
<heftig> watch it!
robert___ is now known as robert_
<heftig> don't tailgate
<Nuck> The only reason I prefer team programming is because it's nice to have a guy you can bounce ideas off of
<Nuck> And it helps to have somebody willing to say "no, you're an idiot" sometimes
<aedornm> That's why I get on IRC .. it fills the "quit being dumb" void.
drago757 has quit [Quit: drago757]
yewton has quit [Excess Flood]
yewton has joined #ruby
tommyvyo has joined #ruby
d2dchat has joined #ruby
<b1lly> pair programming has its perk
tommyvyo_ has joined #ruby
<b1lly> you learn a tremendous amount and gain lots of insight
goganchic has joined #ruby
<b1lly> but its slower sometimes then solo programming
<heftig> aedornm: IRC doesn't watch you program, though
<b1lly> and its usually not something that's "always" done, rather
cibs has quit [Ping timeout: 245 seconds]
<heftig> BizarreCake: code quality is usually much higher, though
<heftig> er, b1lly:
<b1lly> i'm not disagreeing with pair programming, I like it
cibs has joined #ruby
<b1lly> but quality can be managed from code reviews as well :)
emergion has quit [Quit: Computer has gone to sleep.]
cableray has joined #ruby
<aedornm> Well, I've never been in a position where it was possible to do, but I hear people talk about it a lot, or read about it even.
<b1lly> everyones different though
<b1lly> some people like it some don't
pu22l3r has joined #ruby
mercwithamouth has joined #ruby
wallerdev has joined #ruby
tommyvyo_ has quit [Quit: http://thomasvendetta.com]
bigmac has joined #ruby
cibs has quit [Ping timeout: 245 seconds]
carlzulauf has joined #ruby
d2dchat has quit [Remote host closed the connection]
cibs has joined #ruby
icole has joined #ruby
pyx has quit [Quit: WeeChat 0.3.9.2]
dankest is now known as dankest|away
Jacky has quit [Ping timeout: 240 seconds]
<FifthWall> I feel very silly programming in ruby sometimes. http://mustache.me/view/1814
cibs has quit [Ping timeout: 245 seconds]
cibs has joined #ruby
security has joined #ruby
megha has quit [Ping timeout: 252 seconds]
tommyvyo_ has joined #ruby
dankest|away is now known as dankest
cobragoat has quit [Remote host closed the connection]
yewton has quit [Excess Flood]
bean__ has quit [Quit: Computer has gone to sleep.]
yewton has joined #ruby
<shevy> FifthWall I often feel very silly programming in general
<shevy> I think it has to do with the fact that programming requires a lot of concentration and good thinking :(
<shevy> yeah, sinatra is also a strange name
<shevy> "rails" too
* FifthWall just spent a bit debugging an issue with using mustache templates in sinatra
<shevy> FifthWall, but I am not picking better names myself either. my web-helper scripts, the project, is called "cyberweb", which isn't really descriptive at all
<shevy> lol
<shevy> moustache templates? what's with those names
skaczor has quit [Remote host closed the connection]
<FifthWall> Well, it's because they use {{ }} for inserting data.
<shevy> ack
<shevy> is that a hash inside a block?
<FifthWall> no
<FifthWall> mustache is a language independent template syntax
<FifthWall> it fills abut the same space as haml
<FifthWall> about*
<davidcelis> is the fifth wall the ceiling or the floor
Playground has quit [Ping timeout: 245 seconds]
<cirwin> davidcelis: it's behind you, whichever way you're looking
<FifthWall> ceiling
goganchic has quit [Quit: Leaving]
* FifthWall has a whole rambling literary analogy for it
<davidcelis> go on
JumpMast3r has joined #ruby
<FifthWall> So, typically in a play there are three walls that surround the actors, and the "fourth wall" separates them from the audience.
<FifthWall> And this extends to all fictional mediums
<davidcelis> yes
<FifthWall> hence, breaking the fourth wall
<davidcelis> yes
<FifthWall> So, keeping with the thatre analogy
<FifthWall> theatre*
<davidcelis> ah
<davidcelis> my guess would be breaking the separation between them and the theater technicians or something?
mneorr_ has joined #ruby
<FifthWall> in ancient greek plays they'd lower an actor representing one on of the gods on a crane, giving rise to the term deus ex machina or god from the machine
<davidcelis> i was going to say "god" but that seems too obvious, and probably not really a
<davidcelis> o..
Playground has joined #ruby
Playground has quit [Client Quit]
<FifthWall> so, the fifth wall would be what separates the actors from the gods
yewton has quit [Excess Flood]
baroquebobcat has joined #ruby
<FifthWall> Though, it's really a backwards analogy. Fourth Wall was taken when I picket the name, I came up with the explanation after the fact
<FifthWall> :P
jonahR has quit [Quit: jonahR]
<FifthWall> picked*
mneorr has quit [Ping timeout: 256 seconds]
yewton has joined #ruby
Jacky has joined #ruby
Jacky has joined #ruby
Jacky has quit [Changing host]
chrisramon has joined #ruby
tommyvyo_ has quit [Quit: http://thomasvendetta.com]
b1lly has quit [Quit: b1lly]
AsgardBSD has quit [Ping timeout: 244 seconds]
dankest is now known as dankest|away
dankest|away is now known as dankest
jsallis has joined #ruby
jsallis has quit [Remote host closed the connection]
jsallis has joined #ruby
jsallis has quit [Remote host closed the connection]
araujo has joined #ruby
araujo has quit [Changing host]
araujo has joined #ruby
jsallis has joined #ruby
maletor has joined #ruby
joeycarmello has joined #ruby
jenrzzz has joined #ruby
kannan has joined #ruby
jds has joined #ruby
security is now known as megha
mneorr_ has quit [Remote host closed the connection]
mneorr has joined #ruby
mneorr has quit [Remote host closed the connection]
mneorr has joined #ruby
celinedior has joined #ruby
haxrbyte has joined #ruby
jds has quit [Ping timeout: 248 seconds]
IrishGringo has quit [Read error: Connection reset by peer]
Chryson has quit [Ping timeout: 240 seconds]
baroquebobcat has quit [Quit: baroquebobcat]
sayan has joined #ruby
havenn has joined #ruby
quest88 has joined #ruby
huoxito has quit [Ping timeout: 244 seconds]
shorts has joined #ruby
mahmoudimus has joined #ruby
frem has quit [Quit: Computer has gone to sleep.]
crackfu has quit [Remote host closed the connection]
crackfu has joined #ruby
theanvah has quit [Ping timeout: 246 seconds]
jsallis has quit []
<kannan> hi
pu22l3r has quit [Remote host closed the connection]
<havenn> hi
<kannan> hi
tjbiddle has quit [Quit: tjbiddle]
epylinkn has joined #ruby
crackfu has quit [Ping timeout: 248 seconds]
epylinkn has quit [Client Quit]
MattRB has quit [Quit: This computer has gone to sleep]
icole has quit [Remote host closed the connection]
cableray has quit [Quit: cableray]
dankest is now known as dankest|away
JumpMast3r has quit [Quit: JumpMast3r]
maletor has quit [Quit: Computer has gone to sleep.]
tomzx_ has joined #ruby
<shevy> hi
mockra has quit [Remote host closed the connection]
jenrzzz has quit [Ping timeout: 248 seconds]
<shevy> hiiiii
<shevy> I <3 padding
FifthWall has quit [Quit: Textual IRC Client: www.textualapp.com]
karasawa has joined #ruby
<havenn> 'hiiiiii'.squeeze
MattRB has joined #ruby
mockra has joined #ruby
MattRB has quit [Client Quit]
tomzx_ has quit [Quit: tomzx_]
<kannan> hi everyone can anybody help me in doing ma project work on ruby? :)
wallerdev has quit [Quit: wallerdev]
cableray has joined #ruby
aaronmacy has quit [Quit: Leaving.]
<shevy> kannan you must describe the problem, as short as possible. ideally with a pastie.
dankest|away has quit [Quit: Leaving...]
<havenn> kannan: what is your project? paste something on gist.github.com
iamjarvo has quit [Quit: Leaving.]
_adeponte has joined #ruby
adeponte has quit [Read error: Connection reset by peer]
tommyvyo_ has joined #ruby
cobragoat has joined #ruby
rippa has joined #ruby
yoshie902a has joined #ruby
yoshie902a has quit [Client Quit]
robustus has quit [Ping timeout: 255 seconds]
quest88 has quit [Quit: quest88]
cobragoat has quit [Ping timeout: 240 seconds]
robustus has joined #ruby
cableray has quit [Quit: cableray]
tommyvyo_ has quit [Quit: http://thomasvendetta.com]
scottmos has quit [Remote host closed the connection]
cheese1756 has quit [Changing host]
cheese1756 has joined #ruby
havenn has quit [Remote host closed the connection]
bricker_ has joined #ruby
jaequery has joined #ruby
bricker has quit [Ping timeout: 260 seconds]
cheese1756 has quit [Quit: ZNC - http://znc.in]
cheese1756 has joined #ruby
cableray has joined #ruby
MattRB has joined #ruby
jds has joined #ruby
love_color_text has quit [Remote host closed the connection]
spacemud has quit [Ping timeout: 272 seconds]
love_color_text has joined #ruby
jds has quit [Ping timeout: 260 seconds]
templaedhel has joined #ruby
MattRB has quit [Quit: This computer has gone to sleep]
<shevy> always describe your problem first, people can not know in advance if they can help or not
mlue has quit [Ping timeout: 256 seconds]
jackyalcine has joined #ruby
<shevy> if you ask something like "how to calculate the sum of an array?" people can answer that easily
MattRB has joined #ruby
mlue has joined #ruby
mlue has quit [Changing host]
mlue has joined #ruby
Jacky has quit [Ping timeout: 245 seconds]
<kannan> shevy actualling i'm planning to do a project based on topic content filtering in twitter. that is to classify tweets according to it's content
nobuoka has joined #ruby
nobuoka has quit [Client Quit]
jaequery has quit [Quit: Computer has gone to sleep.]
<shevy> that is quite broad and unspecific. always isolate the problem you want to solve into small subproblems
<shevy> so what real problem do you initially have
x82_nicole has joined #ruby
spacemud has joined #ruby
<shevy> "classify tweets according to it's content"
<shevy> what can the content be
<shevy> probably some 255-characters-maximum string or something
dankest has joined #ruby
<kannan> shevy anything that the linked acoounts generate.classify tweets and arrange them.
Astralum has quit [Quit: Leaving]
<shevy> ok good
<shevy> have you already written a script that gathers the tweets for you
<kannan> shevy not really. didnt started doing.
MattRB has quit [Quit: This computer has gone to sleep]
Axsuul has quit [Ping timeout: 276 seconds]
<shevy> well it is easier to solve a problem by making small steps at a time
<shevy> most of the time you want to obtain a specific dataset
<kannan> shevy i'm planning to implement this with help of ruby on rails and mysql if possible
sent-hil has joined #ruby
<shevy> these can all come at a later stage
<shevy> right now you do not even obtain the dataset you want to have
<kannan> shevy yup ur right
sent-hil is now known as Guest70307
<shevy> have you thought about how you want to obtain the tweets yet?
<shevy> the innards of your project
yacks has quit [Ping timeout: 248 seconds]
<kannan> i'm thinking to do it with help of ruby-yajl library
mockra has quit [Remote host closed the connection]
spacemud has quit [Ping timeout: 260 seconds]
yacks has joined #ruby
kayloos has quit [Ping timeout: 256 seconds]
Guest70307 has quit [Remote host closed the connection]
mercwithamouth has quit [Ping timeout: 252 seconds]
<kannan> shevy i'm planning to do it with help of ruby-yajl library
<shevy> I do not know that library
MattRB has joined #ruby
<shevy> but if it works for you that is good
<kannan> shevy ok.. or what other method u prefer?
<nazty> yo
spacemud has joined #ruby
nomenkun has joined #ruby
<shevy> kannan I would probably use open-uri to obtain the twitter data
<nazty> bastards book
tomzx_ has joined #ruby
<shevy> kannan this page has information http://www.ruby-doc.org/stdlib-1.9.3/libdoc/open-uri/rdoc/OpenURI.html which you should read through at least once.
tomzx_ has quit [Client Quit]
<kannan> shevy ok :)
<shevy> with it, you can always fetch remote websites in your ruby scripts
emergion has joined #ruby
<kannan> shevy yup. it's nice.. :)
rakl has quit [Quit: sleeping]
<kannan> shevy if possible could u join me in doing this project ?
tjbiddle has joined #ruby
nomenkun has quit [Ping timeout: 245 seconds]
mockra has joined #ruby
opettaja has joined #ruby
<shevy> kannan I have too many projects on my own already
<shevy> also I am not using ruby on rails
BizarreCake has quit [Read error: Operation timed out]
<kannan> shevy oh.. :(
<shevy> kannan are you on the rubyonrails channel?
<kannan> shevy which are the projects tht u're currently working on?
tomzx_ has joined #ruby
<shevy> kannan right now a few small things. one is the ruby build tools, a suite to compile or install programs. another one is a simple tree-viewer on the commandline, so that I can see the directory structure (with coloured output)
<shevy> for the latter, I fetch all .tar.bz2, and then repackage them into .tar.xz format
<kannan> shevy no i'm new to this and dont know how to join other rooms
<shevy> (my archives, that is)
<shevy> kannan you should get a better irc client ;)
jackyalcine has quit [Quit: Quit]
jackyalcine_ has joined #ruby
<shevy> once you have an IRC client, register at freenode, then join #rubyonrails and ask there. the people there are very web-hungry, much more so than here on #ruby
Playground has joined #ruby
<kannan> shevy ok :)
<shevy> although you can probably use your webclient to register too, not sure...
<shevy> I am using xchat, I found it much easier than those perl-webclients
<kannan> shevy ok :)
emergion has quit [Quit: Computer has gone to sleep.]
<kannan> shevy give me ur mail id..
robert___ has joined #ruby
<shevy> lol what why man
<shevy> I am on IRC anyway, and always here too :P
<shevy> (unless my computer is down)
<kannan> shevy just to ask doubts if i have any :)
<kannan> shevy then ok ":D
<shevy> then come to IRC man!!!
<shevy> IRC is nice because one can answer very quickly
<shevy> it's like "solve a small problem quickly, then move on to do something else"
<kannan> shevy ok :) now installing xchat :D
<shevy> \o/
<shevy> with xchat, you can arrange tabs on the bottom side
<shevy> let me make a screenshot...
dankest has quit [Quit: Leaving...]
<kannan> shevy ok :D
robert_ has quit [Ping timeout: 245 seconds]
x82_nicole has quit [Quit: Computer has gone to sleep.]
megha has quit [Ping timeout: 260 seconds]
tjbiddle has quit [Quit: tjbiddle]
roadt has joined #ruby
icole has joined #ruby
megha has joined #ruby
generalissimo has quit [Remote host closed the connection]
jsilver has joined #ruby
icole has quit [Ping timeout: 255 seconds]
baroquebobcat has joined #ruby
Jackneill has joined #ruby
Jackneill has quit [Changing host]
Jackneill has joined #ruby
BizarreCake has joined #ruby
arietis has joined #ruby
<shevy> my gimp is broken.. :(
<kannan> shevy ok no pbm ... i've installed that
<kannan> shevy and now connected on irc
<shevy> hehe
<kannan> shevy :D
Jacky has joined #ruby
keyvan has joined #ruby
<kannan> shevy u knw anyone who can pgm well on rubyonrails ? ;) :D
Michae___ has quit [Remote host closed the connection]
<shevy> kannan, here is how xchat looks http://oi45.tinypic.com/qzq3wh.jpg
<shevy> kannan, no idea, I dont go there. most there stink :P
<kannan> shevy ok :D
love_color_text has quit [Ping timeout: 245 seconds]
<kannan> shevy project needs to be completed so i've to go there ;) :d
<shevy> good luuuuck with it!
lkba has quit [Ping timeout: 256 seconds]
<kannan> shevy ok :)
kannan has left #ruby [#ruby]
jackyalcine_ has quit [Ping timeout: 252 seconds]
kannan has joined #ruby
browndawg has joined #ruby
shorts has quit [Quit: shorts]
keyvan has quit [Remote host closed the connection]
hoolandi has joined #ruby
jsilver has quit [Quit: Leaving...]
love_color_text has joined #ruby
love_color_text has quit [Remote host closed the connection]
jduan1981 has quit [Quit: jduan1981]
aaronmacy has joined #ruby
robert_ has joined #ruby
robert_ has quit [Changing host]
robert_ has joined #ruby
love_color_text has joined #ruby
lateau has joined #ruby
Jacky has quit [Ping timeout: 252 seconds]
jds has joined #ruby
tomzx_ has quit [Quit: tomzx_]
robert___ has quit [Ping timeout: 252 seconds]
opettaja has quit [Remote host closed the connection]
robotmay has joined #ruby
tomzx_ has joined #ruby
kiyoura has quit [Ping timeout: 256 seconds]
lkba has joined #ruby
mockra has quit [Remote host closed the connection]
Morkel has joined #ruby
tommyvyo has quit [Quit: http://twitter.com/tommyvyo]
jds has quit [Ping timeout: 240 seconds]
timonv has joined #ruby
kannan has quit [Read error: Connection reset by peer]
jgrevich has quit [Remote host closed the connection]
kannan has joined #ruby
MattRB has quit [Quit: This computer has gone to sleep]
robert___ has joined #ruby
Morkel has quit [Quit: Morkel]
cha1tanya has joined #ruby
robert_ has quit [Ping timeout: 240 seconds]
robotmay has quit [Remote host closed the connection]
hoolandi has quit [Ping timeout: 252 seconds]
tomzx_ has quit [Ping timeout: 245 seconds]
blacktulip has joined #ruby
cableray has quit [Ping timeout: 248 seconds]
cha1tanya has quit [Quit: Leaving]
tps__ has quit [Read error: Connection reset by peer]
tps_ has joined #ruby
_adeponte has quit [Remote host closed the connection]
otters has quit [Ping timeout: 252 seconds]
zeade has quit [Quit: Leaving.]
Hanmac_ has joined #ruby
karasawa has quit [Ping timeout: 248 seconds]
octarine has quit [Read error: Operation timed out]
<Hanmac_> shevy i am currently working on the reading of the files from an archive, it was broken for binary files ... but now it works so : archive.get_data("file") and File.read("file") are the same, indipent from default_external :P
randym has quit [Read error: Operation timed out]
Zolo has joined #ruby
fcoury_ has quit [Ping timeout: 255 seconds]
ryanf has quit [Quit: leaving]
matthias_ has joined #ruby
matthias_ has quit [Remote host closed the connection]
<shevy> yay!
karnowski has quit [Ping timeout: 276 seconds]
timonv has quit [Remote host closed the connection]
cam` has quit [Ping timeout: 260 seconds]
Morkel has joined #ruby
Morkel has quit [Client Quit]
razibog has joined #ruby
love_color_text has quit [Remote host closed the connection]
Playground has quit [Quit: When I come back, please tell me in what new ways you have decided to be completely wrong.]
hackerdude has quit [Remote host closed the connection]
baroquebobcat has quit [Quit: baroquebobcat]
<Hanmac_> and i need VERY often the rb_ensure function ... or your memory gets leaking ... hm no leaking is not the right word ... its got collected and not given back :P
solitude88 has joined #ruby
love_color_text has joined #ruby
love_color_text has quit [Remote host closed the connection]
vlad_starkov has joined #ruby
Jackneill has quit [Remote host closed the connection]
love_color_text has joined #ruby
Jackneill has joined #ruby
Jackneill has quit [Changing host]
Jackneill has joined #ruby
v0n has joined #ruby
love_color_text has quit [Remote host closed the connection]
adambeynon has joined #ruby
lolmaus has joined #ruby
Jonah11_ has quit [Ping timeout: 245 seconds]
templaedhel has quit [Quit: Leaving...]
love_color_text has joined #ruby
Jonah11_ has joined #ruby
Jackneill has quit [Remote host closed the connection]
Jackneill has joined #ruby
Jackneill has quit [Changing host]
Jackneill has joined #ruby
sayan has quit [Read error: Connection reset by peer]
toekutr has quit [Remote host closed the connection]
fukuyamaken has joined #ruby
baroquebobcat has joined #ruby
mahmoudimus has quit [Quit: Computer has gone to sleep.]
timonv has joined #ruby
Playground has joined #ruby
yacks has quit [Read error: Connection reset by peer]
arturaz has joined #ruby
zeepickler has joined #ruby
lkba has quit [Ping timeout: 246 seconds]
zeepickler has left #ruby [#ruby]
baroquebobcat has quit [Quit: baroquebobcat]
yshh has joined #ruby
cha1tanya has joined #ruby
cobragoat has joined #ruby
charliesome has joined #ruby
chaosis has quit [Ping timeout: 272 seconds]
bigmac has quit [Quit: Leaving]
yacks has joined #ruby
sayan has joined #ruby
skcin7 has quit [Quit: Computer has gone to sleep.]
n1x has joined #ruby
Kakera has joined #ruby
yshh has quit [Remote host closed the connection]
mockra has joined #ruby
love_color_text has quit [Remote host closed the connection]
Dakuan has joined #ruby
mockra has quit [Ping timeout: 252 seconds]
rezzack has quit [Quit: Leaving.]
chridal has joined #ruby
osaut has joined #ruby
love_color_text has joined #ruby
fukuyamaken has quit [Remote host closed the connection]
emocakes has joined #ruby
Bry8Star has quit [Ping timeout: 276 seconds]
lkba has joined #ruby
Bry8Star has joined #ruby
horofox has joined #ruby
workmad3 has joined #ruby
reinaldob has joined #ruby
<Hanmac_> shevy question: should archive["path"] return the data or the archive entry informaton? (archive entry is similar to File::Stat)
<shevy> not sure yet
<shevy> what is "archive" in this example, a hash I suppose? or a method returning a hash
<shevy> and what is the user going to do with this information
beiter has joined #ruby
rippa has quit [Read error: Connection reset by peer]
rippa has joined #ruby
<Hanmac_> shevy archive is an instance of my Archive class
horofox has quit [Quit: horofox]
timonv_ has joined #ruby
timonv has quit [Read error: Connection reset by peer]
stkowski has quit [Quit: stkowski]
samuel02 has joined #ruby
Almond has joined #ruby
<Hanmac_> the entries are used for sample for archive.map! {|entry,data| entry.mtime = Time.now } ... it does change the archive inplace :P
Tom- has joined #ruby
v0n has quit [Ping timeout: 260 seconds]
Tom- has left #ruby [#ruby]
qohelet_ has joined #ruby
Jackneill has quit [Ping timeout: 252 seconds]
mneorr has quit [Remote host closed the connection]
Jackneill has joined #ruby
Jackneill has quit [Changing host]
Jackneill has joined #ruby
mneorr has joined #ruby
RagingDave has joined #ruby
slainer68 has joined #ruby
reinaldob has quit [Remote host closed the connection]
n1x has quit [Ping timeout: 245 seconds]
kannan has quit [Read error: Connection reset by peer]
atno has quit [Read error: Connection reset by peer]
kannan has joined #ruby
atno has joined #ruby
ToTo has joined #ruby
jimeh has joined #ruby
cobragoat has quit [Remote host closed the connection]
Dakuan has quit [Remote host closed the connection]
Dakuan has joined #ruby
jsted has left #ruby [#ruby]
yacks has quit [Ping timeout: 248 seconds]
mengu has joined #ruby
Dakuan has quit [Ping timeout: 248 seconds]
mpfundstein has joined #ruby
sayan has quit [Read error: Connection reset by peer]
jimeh has quit [Quit: Computer has gone to sleep.]
pskosinski has joined #ruby
browndawg has quit [Quit: Leaving.]
<Dwarf> Heya, I get data from a sqlite3 database, but it returns it like this: [['something1'], ['something2']]
<Dwarf> How would I get that in a normal array?
<cirwin> .map(&:first)
<workmad3> or .flatten
<Dwarf> Alright let's see what the documentation says about those :)
<apeiros> hurray, somebody who reads docs on his own!
qohelet_ has quit [Quit: qohelet_]
BizarreCake has quit [Ping timeout: 256 seconds]
dwu has quit [Quit: Leaving.]
octarine has joined #ruby
randym has joined #ruby
karnowski has joined #ruby
<Dwarf> Thanks, flatten seems to be the easiest approach :)
pavilionXP has quit [Quit: Forget progress by proxy. Land on your own moon.]
fcoury_ has joined #ruby
cam` has joined #ruby
cha1tanya has quit [Quit: Leaving]
Dakuan has joined #ruby
sayan has joined #ruby
osaut has quit [Quit: osaut]
timonv_ has quit [Read error: Connection reset by peer]
banister`sleep has quit [Read error: Connection reset by peer]
timonv has joined #ruby
banister`sleep has joined #ruby
Su-Shee_ has joined #ruby
TheFuzzball has joined #ruby
Su-Shee has quit [Read error: Operation timed out]
osaut has joined #ruby
Neomex has joined #ruby
timonv has quit [Ping timeout: 252 seconds]
Neomex has quit [Client Quit]
clocKwize has joined #ruby
chrisramon has quit [Ping timeout: 245 seconds]
eka has joined #ruby
Dann1 has joined #ruby
Dann1 has quit [Remote host closed the connection]
Dann1 has joined #ruby
eldariof has joined #ruby
atno has quit [Remote host closed the connection]
Kuifje has joined #ruby
Kuifje has quit [Changing host]
Kuifje has joined #ruby
Spooner has joined #ruby
Xeago has joined #ruby
fukuyamaken has joined #ruby
megha has quit [Ping timeout: 244 seconds]
<Dwarf> Is it possible to have different conditions in one if condition? E.g. if (var1 == 2 || var2 > 5)
tommyvyo has joined #ruby
<undersc0re97> Dwarf: yes
daniel_- has joined #ruby
daniel_- has quit [Changing host]
daniel_- has joined #ruby
<Dwarf> With that syntax?
<Dwarf> Because my IDE says otherwise
adambeynon has quit [Quit: ["Textual IRC Client: www.textualapp.com"]]
<undersc0re97> if var1 == 'x' && var2 == '7'
Takehiro has joined #ruby
<Dwarf> wrapping it in parenthesis seems to work
<undersc0re97> hm ok
<undersc0re97> what version of ruby are you using/ide?
<Dwarf> Aptana studio3
<Dwarf> But if (var1 == 2) || (something > 5) works
<TTilus> disambiguation using parenthesis is not a bad idea in that case
<undersc0re97> yeah it's good
<undersc0re97> it cleans up code a bit
tommyvyo has quit [Ping timeout: 248 seconds]
aaronmacy has quit [Quit: Leaving.]
nomenkun has joined #ruby
mengu has quit [Quit: Leaving]
daniel_- has quit [Read error: Operation timed out]
daniel_- has joined #ruby
<Dwarf> The difference: http://eval.in/7027 and http://eval.in/7028
main has joined #ruby
daniel_- has quit [Client Quit]
Xeago has quit [Ping timeout: 240 seconds]
Xeago has joined #ruby
daniel_- has joined #ruby
daniel_- has joined #ruby
daniel_- has quit [Changing host]
philcrissman has joined #ruby
ecksit has quit [Quit: Laters.]
Takehiro has quit [Remote host closed the connection]
<Spooner> dwarf you can also use or/and which have a lower precedence so they wouldn't need the extra parenthesis.
<apeiros> Dwarf: precedence. `admins.include? person.downcase || owner.include? person.downcase` is parsed as `admins.include?(person.downcase || owner.include? person.downcase)`
<Spooner> Dwarf, But with &&|| I'd write it admins.include?(person.downcase) || owner.include?(person.downcase)
<apeiros> or even more clear: `admins.include?((person.downcase || owner.include?) person.downcase)`
clj_newb has joined #ruby
Takehiro has joined #ruby
<clj_newb> Hi, is there a way to know that the host has lost internet connection?
<apeiros> the last should make it obvious why it's a syntax error
Spooner has quit [Remote host closed the connection]
_br_ has quit [Excess Flood]
cobragoat has joined #ruby
BizarreCake has joined #ruby
philcrissman has quit [Ping timeout: 245 seconds]
_Dykam has joined #ruby
_Dykam has quit [Excess Flood]
<Hanmac_> apeiros do you have some requests for my libarchive gem?
Xeago has quit [Ping timeout: 245 seconds]
Xeago has joined #ruby
<apeiros> Hanmac_: good API, easy way to select different compression, easy to list contents without full extraction
<apeiros> I know, that's vague
<apeiros> do you have the API documentation somewhere?
_br_ has joined #ruby
<Hanmac_> apeiros https://github.com/Hanmac/libarchive-ruby/ there is a readme ...
cobragoat has quit [Ping timeout: 248 seconds]
lolmaus has quit []
_br_ has quit [Excess Flood]
BizarreCake has quit [Ping timeout: 260 seconds]
_br_ has joined #ruby
_br_ has quit [Excess Flood]
_br_ has joined #ruby
<Hanmac_> you could iterate the content with each or each_data (or make a hash with to_hash)
Spooner has joined #ruby
inokenty has joined #ruby
sayan has quit [Ping timeout: 245 seconds]
banister`sleep has quit [Remote host closed the connection]
elaptics`away is now known as elaptics
sepp2k has joined #ruby
fukuyamaken has quit [Remote host closed the connection]
horofox has joined #ruby
nari has quit [Ping timeout: 245 seconds]
BizarreCake has joined #ruby
grzywacz has joined #ruby
Jackneill has quit [Ping timeout: 260 seconds]
Jackneill has joined #ruby
Jackneill has quit [Changing host]
Jackneill has joined #ruby
tatsuya_o has joined #ruby
Takehiro has quit [Remote host closed the connection]
Takehiro has joined #ruby
yoshie902a has joined #ruby
punkrawkR^Home has joined #ruby
clocKwize has quit [Quit: clocKwize]
Markvilla has joined #ruby
daniel_- has quit [Ping timeout: 245 seconds]
megha has joined #ruby
beiter has quit [Ping timeout: 252 seconds]
hybris has joined #ruby
atno has joined #ruby
nkts has quit []
osaut has quit [Quit: osaut]
Takehiro_ has joined #ruby
tps_ has quit [Read error: Connection reset by peer]
tps_ has joined #ruby
eka has quit [Quit: Computer has gone to sleep.]
Jackneill has quit [Ping timeout: 248 seconds]
Takehiro has quit [Ping timeout: 248 seconds]
timonv has joined #ruby
tps_ has quit [Read error: Connection reset by peer]
tps_ has joined #ruby
tps_ has quit [Client Quit]
osaut has joined #ruby
banister`sleep has joined #ruby
lushious has quit [Remote host closed the connection]
Takehiro_ has quit [Remote host closed the connection]
hoolandi has joined #ruby
browndawg has joined #ruby
Nisstyre-laptop has quit [Read error: Operation timed out]
Dann1 has quit [Quit: Dann1]
subbyyy has quit [Ping timeout: 260 seconds]
osaut has quit [Quit: osaut]
_bart has joined #ruby
moshee has quit [Ping timeout: 252 seconds]
moshee has joined #ruby
moshee has quit [Changing host]
moshee has joined #ruby
browndawg has quit [Ping timeout: 256 seconds]
mneorr has quit [Ping timeout: 248 seconds]
statarb3 has joined #ruby
statarb3 has quit [Changing host]
statarb3 has joined #ruby
beiter has joined #ruby
<shevy> hey
<shevy> did you know that perl has a webframework called... mojolicious
kirun has joined #ruby
tenmilestereo has joined #ruby
<shevy> app->start;
<shevy> !!!
<shevy> app.start
<shevy> ruby is the better perl
SiliconDon has joined #ruby
browndawg has joined #ruby
<shevy> this one is curious however
<shevy> get '/' => {text => 'Hello World!'};
<shevy> that's actually almost readable, if perl would drop that stupid semicolon
<shevy> get '/' { text: 'Hello World!' }
<apeiros> they copied sinatra?
<apeiros> makes sense actually
eka has joined #ruby
<shevy> hmm not sure, I am trying to find out the differences, if there are any
robert_ has joined #ruby
tps_ has joined #ruby
tatsuya_o has quit [Remote host closed the connection]
robert___ has quit [Ping timeout: 276 seconds]
_axx has left #ruby [#ruby]
Guu has joined #ruby
Jackneill has joined #ruby
Jackneill has quit [Changing host]
Jackneill has joined #ruby
Hanmac_ has quit [Ping timeout: 245 seconds]
mpfundstein has quit [Ping timeout: 255 seconds]
gyre008 has joined #ruby
statarb3 has quit [Quit: Leaving]
Jamone has quit [Read error: Connection reset by peer]
Jamone has joined #ruby
statarb3 has joined #ruby
statarb3 has quit [Changing host]
statarb3 has joined #ruby
microspino has joined #ruby
jenrzzz has joined #ruby
SiliconDon has quit [Remote host closed the connection]
Virunga has joined #ruby
Su-Shee_ is now known as Su-Shee
atno has quit [Read error: Connection reset by peer]
atno has joined #ruby
jjbohn has joined #ruby
dmiller has joined #ruby
yoshie902a has quit [Quit: yoshie902a]
<Su-Shee> yes, it's modeled after sinatra (so is Dancer) and the differences are mostly perl-related to play on its strengths..
<shevy> cool
Guu has quit [Quit: ZNC - http://znc.in]
Guu has joined #ruby
dmiller has quit [Ping timeout: 246 seconds]
<Su-Shee> if you want something really different, look at Smalltalk's Seaside.
x0F has quit [Disconnected by services]
x0F_ has joined #ruby
Guu is now known as antbody
x0F_ is now known as x0F
<shevy> Su-Shee hmm I know perl syntax a bit... not sure I can understand smalltalk
<Su-Shee> shevy: you already know the blocks, because that's what ruby adopted from smalltalk. the rest is as simple as it gets: myObject callSomeMethod. (yes, dot) or myObject callSomeMethod: someParam
zlaty has quit []
atno has quit [Read error: Connection reset by peer]
atno has joined #ruby
TomyLobo has joined #ruby
Shrink has joined #ruby
Shrink has quit [Changing host]
Shrink has joined #ruby
Zolo has quit [Remote host closed the connection]
Shrink has quit [Remote host closed the connection]
tpd has joined #ruby
vlad_starkov has quit [Remote host closed the connection]
celinedior has quit [Quit: celinedior]
zz_chrismcg is now known as chrismcg
tatsuya_o has joined #ruby
<shevy> Su-Shee oh cool, I did not know smalltalk had blocks
Hanmac_ has joined #ruby
samphippen has joined #ruby
tpd has quit [Client Quit]
telli has joined #ruby
antbody has quit [Remote host closed the connection]
<Su-Shee> shevy: you realize that they basically invented everything already with smalltalk and lisp and perl, ruby, younameit just went along and added some sugar here and there? :)
<shevy> :(
<shevy> you kill the mystery man!
<Su-Shee> I gave you an amazing wonder instead ;) you just have to go back a little in time. ;)
Takehiro has joined #ruby
jds has joined #ruby
arietis has quit [Quit: Computer has gone to sleep.]
tatsuya_o has quit [Ping timeout: 245 seconds]
joofsh has joined #ruby
<banister`sleep> Su-Shee: what does su shee mean?
reinaldob has joined #ruby
Zolo has joined #ruby
<Su-Shee> first half of my firstname, second half of my former nick which collided too often at some point
<Su-Shee> and my overall enthusiasm for sushi, too. ;)
arietis has joined #ruby
<banister`sleep> Su-Shee: ah, i missed sushi. I also thought you could be chinese and it was your real name, but i wasnt sure
robert___ has joined #ruby
<Su-Shee> no, I'm german, can't get more not chinese ;)
CodeVision has quit [Ping timeout: 276 seconds]
roadt has quit [Remote host closed the connection]
robert_ has quit [Ping timeout: 276 seconds]
philcrissman has joined #ruby
vlad_starkov has joined #ruby
banister`sleep has quit [Remote host closed the connection]
Bry8Star has quit [Remote host closed the connection]
horofox has quit [Quit: horofox]
jeffreybaird has joined #ruby
nfk has joined #ruby
Xeago has quit [Ping timeout: 260 seconds]
iamjarvo has joined #ruby
Bry8Star has joined #ruby
gyre008 has quit [Remote host closed the connection]
chaosis has joined #ruby
vlad_starkov has quit [Remote host closed the connection]
tatsuya_o has joined #ruby
Jackneill has quit [Ping timeout: 252 seconds]
<shevy> man, that GumbyPAN bot on #perl is really spammy... good thing we don't have a bot like that on #ruby
<Su-Shee> ignore it, configure your client differently?
kannan has quit [Ping timeout: 260 seconds]
moos3 has quit [Quit: Computer has gone to sleep.]
moos3 has joined #ruby
jxf has joined #ruby
Glacer232 has joined #ruby
Glacer232 has quit [Max SendQ exceeded]
reinaldob has quit [Remote host closed the connection]
<shevy> I must kill that bot now
<shevy> interesting that the last message was from mojolicious... seems as if the framework is still quite active :)
jaygen has joined #ruby
arietis has quit [Quit: Computer has gone to sleep.]
<Su-Shee> "still"? :)
<shevy> yeah
<shevy> I think it must be quite old, I had it in my perl-cookbook, and I haven't been touching that cookbook file in years (it kept perl-entries)
Xeago has joined #ruby
<shevy> if you look at some ruby webframeworks...
<shevy> nitro? ogg or what was its name... that one died
osaut has joined #ruby
end_guy has quit [Ping timeout: 276 seconds]
banister`sleep has joined #ruby
jeffreybaird has quit [Quit: jeffreybaird]
vlad_starkov has joined #ruby
<Su-Shee> mojolicious is comparatively young, maybe 3-4 years? catalyst is older. and things like mason or cgi::application are ancient.
Zolo has quit [Remote host closed the connection]
<shevy> oh man
<shevy> you know too much
<shevy> when I kill those who know more than I do, I'll become the wisest man on earth
F1skr has joined #ruby
end_guy has joined #ruby
jfl0wers has quit [Quit: jfl0wers]
<shevy> I have read about catalyst, but not about mason or cgi::application
<shevy> though, I have been writing about 20 different perl .cgi scripts in my life :)
<Su-Shee> "hello, 1995 called and wants its scripts back" ;)
crackfu has joined #ruby
philcrissman has quit [Remote host closed the connection]
<shevy> good old 1990es
<shevy> the time of eurodance songs!
<shevy> so awful and still so good :)
jimeh has joined #ruby
maxmanders has joined #ruby
grzywacz has quit [Quit: :wq]
<Su-Shee> early web is just awful. ;)
_bart has quit [Quit: _bart]
Michae___ has joined #ruby
Michae___ has quit [Read error: Connection reset by peer]
celinedior has joined #ruby
Michae___ has joined #ruby
microspino has left #ruby [#ruby]
Michae___ has quit [Remote host closed the connection]
arietis has joined #ruby
preller has joined #ruby
preller has quit [Changing host]
preller has joined #ruby
charliesome has quit [Quit: Textual IRC Client: www.textualapp.com]
Zolo has joined #ruby
Sambo has joined #ruby
Jacky has joined #ruby
kans has joined #ruby
sailias has joined #ruby
pu22l3r has joined #ruby
Jackneill has joined #ruby
Jackneill has quit [Changing host]
Jackneill has joined #ruby
Hanmac_ has quit [Quit: Page closed]
Zolo has quit [Remote host closed the connection]
sayan has joined #ruby
<libryder> unless by awful you mean AWESOME
BizarreCake has quit [Read error: Connection reset by peer]
Jackneill has quit [Ping timeout: 252 seconds]
allsystemsarego has joined #ruby
allsystemsarego has quit [Changing host]
allsystemsarego has joined #ruby
chaosis has quit [Ping timeout: 245 seconds]
havenn has joined #ruby
sailias has quit [Quit: Leaving.]
postmodern has quit [Quit: Leaving]
emmanuelux has quit [Ping timeout: 244 seconds]
n1x has joined #ruby
<Amnesia> question, for some reason my print statement isn't printing everything, puts does, but I don't need the \n
timonv_ has joined #ruby
timonv has quit [Read error: Connection reset by peer]
<Spooner> Amnesia, print doesn't flush the buffer.
<Amnesia> I've tried using STDIN.flush in front of the print method
carloslopes has joined #ruby
<Amnesia> (does this mean that the buffer is saturated btw? )
<Spooner> You don't print to STDIN. Presumably you mean $stdout instead.
maxmanders has quit [Quit: Computer has gone to sleep.]
<Amnesia> eh STDOUT * :p
<Spooner> No, it just doesn't itself unless it gets full up or you ask it to.
celinedior has quit [Quit: celinedior]
bean__ has joined #ruby
<Spooner> STDOUT is the normal output. $stdout is the current output (which is usually STDOUT).
bean__ has quit [Client Quit]
<Amnesia> I see
sayan has quit [Ping timeout: 245 seconds]
<Amnesia> still doesn't do the job:-)
hybris has quit [Quit: hybris]
<Amnesia> but why does the buffer needs to be flushed ?
<Amnesia> isn't it pushout out more to stdout because it's saturated?
hybris has joined #ruby
slainer68 has quit [Remote host closed the connection]
pu22l3r has quit [Read error: Connection reset by peer]
pu22l3r has joined #ruby
<Spooner> You should flush after you print.
kayloos has joined #ruby
<libryder> how can i iterate over an array of elements, perform an ongoing calculation in the block, and return the result of the calculation? i've tried: solutions.inject { |sum, solution| sum += s.up_votes.count }
<libryder> but all that returns is each solution
busybox42 has quit [Ping timeout: 264 seconds]
<Amnesia> hm that does the job, Spooner could you tell me how the buffer exactly works?
robert_ has joined #ruby
robert_ has quit [Changing host]
robert_ has joined #ruby
<Spooner> Amnesia, It will automatically flush if the buffer gets full or you request it. puts does a flush to ensure the output goes out immediately; print doesn't.
jeffreybaird has joined #ruby
<Amnesia> hm ok
<Amnesia> ty
<Spooner> The buffer doesn't write to output every time you write to it, which is more efficient if you are doing lots of small prints and flushing at the end.
xsarin has joined #ruby
<pen> is there a mruby irc channel?
robert___ has quit [Ping timeout: 245 seconds]
<Spooner> libryder, You don't need += because + will do (the sum in the next loop is the result of the previous one).
<Amnesia> Spooner: thanks a lot for your time :-)
<Spooner> libryder, Should work as you expect, assuming up_votes.count is a number.
moos3 has quit [Quit: Computer has gone to sleep.]
xsarin has quit [Client Quit]
<libryder> it is, but it's just returning the value of solutions no matter what i do
emmanuelux has joined #ruby
<Spooner> You mean the array?
<libryder> yes
tmi_ has joined #ruby
<Spooner> Well, one thing to point out is that you have a block variable different to the one you use inside the block (solution vs s).
bsmr has joined #ruby
jeffreybaird has quit [Quit: jeffreybaird]
<libryder> up_votes.count is definitely a number: https://gist.github.com/6543b83975e572f2823d
<Xeago> libryder: what is s?
<Spooner> libryder, Ah, sorry, you need to do inject(0)
<libryder> ah!!!
<libryder> Xeago: s is the current array object
<Spooner> Because inject, if it doesn't have a parameter, will pass the first two objects in as sum and s to start off. With inject(0), it will pass in 0 and the first object.
jjbohn has quit [Quit: Leaving...]
<Spooner> And in the former case, if you only have one object it will just return that. Dunno if it makes sense, but it generally makes sense to use an initial value like 0.
<libryder> Spooner: that works, thanks. i will never forget this (i've tried it several times). i assumed sum would start off as 0
<Spooner> No, because it could be "" or 0 or another object.
busybox42 has joined #ruby
<Spooner> You can do [1, 2, 3].inject {|sum, n| sum + n } safely, but mostly you are better with an initial value.
jenrzzz has quit [Ping timeout: 245 seconds]
<libryder> ohhh i see
<Spooner> And it will start with sum=1 and n=2 as the first iteration.
jjbohn has joined #ruby
<libryder> so if you don't pass an initial value, it will do some magic based on assumptions
<libryder> ^^ that magic
<Spooner> Well, not quite magic, but yes :D
<libryder> awesome, thanks!
jimeh has quit [Read error: No route to host]
robert___ has joined #ruby
xsarin has joined #ruby
crackfu has quit [Remote host closed the connection]
Cooler_ has joined #ruby
nomenkun has quit [Remote host closed the connection]
robert_ has quit [Ping timeout: 252 seconds]
dmiller has joined #ruby
mercwithamouth has joined #ruby
<apeiros> Spooner, libryder: .inject(:+), much faster
BulleTime has joined #ruby
<Spooner> I know, but that wasn't relevant to the question.
<apeiros> ary.inject(initial) is like ([initial]+ary).inject
<BulleTime> hi guys, i am a very beginner with ruby. i would like to know, how do i run this example:
<Dwarf> If a thread finishes, is it destroyed automatically?
<BulleTime> when i upload i only see "test"
carloslopes has quit [Remote host closed the connection]
dmiller has quit [Ping timeout: 252 seconds]
theanvah has joined #ruby
<workmad3> libryder: it's not so much 'magic' as, if you don't provide a start value then inject will use the first value of the collection as the starting value
kayloos has quit [Ping timeout: 245 seconds]
<libryder> workmad3: so i was trying to add a number to a Solution object
pavilionXP has joined #ruby
karasawa has joined #ruby
slainer68 has joined #ruby
jaygen has quit [Remote host closed the connection]
<BulleTime> no-one knows :O ?
<Amnesia> question, does one of you know a prettier to add an ' ' to the last entry of a block? https://privatepaste.com/001739a17a #32
Jacky_ has joined #ruby
<shevy> where is it
<shevy> I only see huge line noise
Jacky has quit [Ping timeout: 252 seconds]
RagingDave has quit [Quit: Ex-Chat]
<Spooner> Amnesia, Well, on a basic level you should write that as: if (i += 1) == 3; print '[i] ' + s + ' '; else; print '[i] ' + s; end
<Amnesia> I tried i+=1, but that results in an exception tell me that + isn't sa defined method for the nilclass :)
carloslopes has joined #ruby
<Spooner> But better would be out[0].each_line.with_index { |s, i| print '[i] ' + s + (i == 3) ? ' ' : '' }
moos3 has joined #ruby
bsmr has quit [Remote host closed the connection]
<apeiros> Amnesia: your port regex is broken. you forgot to anchor it.
<Spooner> Or { |s, i| print '[i] ' + s; print ' ' if i == 3 }
Kuifje has quit [Read error: Connection reset by peer]
<apeiros> also you can build up a complex regex from smaller ones
Kuifje has joined #ruby
<Amnesia> ah neat, with_index is possible:P
Drager_ is now known as Drager
Drager has quit [Changing host]
Drager has joined #ruby
atmosx has joined #ruby
atmosx has quit [Remote host closed the connection]
hybris has quit [Quit: hybris]
slainer68 has quit [Ping timeout: 248 seconds]
<Amnesia> apeiros: multiple groups ?
horofox has joined #ruby
emergion has joined #ruby
<Amnesia> Spooner: `+': can't convert false into String :-)
includex has joined #ruby
maxmanders has joined #ruby
<Spooner> "[i] #{s}" (which is what you should be using anyway).
cjs226 has quit [Ping timeout: 256 seconds]
RawProduce has joined #ruby
RawProduce has left #ruby [#ruby]
<Amnesia> let me give that a shot
Chryson has joined #ruby
<BulleTime> please help anyone, can i run a ruby app without having access to the ubuntu server??
<apeiros> Amnesia: I think the fqdn one is also wrong… not sure I rewrote it correctly, though: http://pastie.org/5726002
<BulleTime> i only have ftp access
kannan has joined #ruby
<apeiros> Amnesia: gives you an idea of how to build up a complex regex from smaller parts
cjs226 has joined #ruby
<Amnesia> ah ty
<apeiros> hm, the ip_address regex is wrong too. 0 is valid. not per your regex.
pu22l3r has quit [Remote host closed the connection]
<Amnesia> I'm geting 0 returned
<Amnesia> what was your input?
kans has quit [Ping timeout: 240 seconds]
<apeiros> ip_regex =~ "0.0.0.0" # => nil
<apeiros> with your regex
<apeiros> ah, you disallow it only in the first segment
<Amnesia> uhu
<Amnesia> I know it's ugly, but afaik it does do the job^^
<apeiros> well, afaik 0.1.2.3 is a valid ip. and your regex says it's not
_carloslopes has joined #ruby
carloslopes has quit [Read error: Connection reset by peer]
jenrzzz has joined #ruby
kans has joined #ruby
<apeiros> no edit in pastie anymore? gotta switch completely to gist…
<Amnesia> ah good point..
tmi_ has quit [Quit: tmi_]
kannan has quit [Ping timeout: 256 seconds]
jekotia has joined #ruby
<Amnesia> ty
Bry8Star has quit [Remote host closed the connection]
beiter has quit [Quit: beiter]
tmi_ has joined #ruby
Bry8Star has joined #ruby
emergion has quit [Quit: Computer has gone to sleep.]
Zolo has joined #ruby
includex has quit [Quit: Leaving...]
samuel02_ has joined #ruby
Kakera has quit [Ping timeout: 252 seconds]
<kans> hi everyone..
<kans> :)
<Amnesia> still getting the message that false cannot be converted to a string though
<Sambo> Greetings
samuel02 has quit [Ping timeout: 256 seconds]
robert_ has joined #ruby
robert_ has quit [Changing host]
robert_ has joined #ruby
Iszak has joined #ruby
BizarreCake has joined #ruby
<Amnesia> thanks for your help folks
robert___ has quit [Ping timeout: 244 seconds]
noyb has quit [Ping timeout: 256 seconds]
crackfu has joined #ruby
JumpMast3r has joined #ruby
Kakera has joined #ruby
spacemud has quit [Ping timeout: 248 seconds]
melisaa has joined #ruby
kayloos has joined #ruby
Dakuan has quit [Remote host closed the connection]
Dakuan has joined #ruby
Kuifje has quit [Read error: Connection reset by peer]
crackfu has quit [Remote host closed the connection]
Kuifje has joined #ruby
crackfu has joined #ruby
melisaa has quit [Ping timeout: 245 seconds]
spacemud has joined #ruby
<kans> can anyone help me in doing ma pjct :)
Dakuan has quit [Ping timeout: 248 seconds]
Virunga has quit [Remote host closed the connection]
crackfu has quit [Ping timeout: 255 seconds]
<Spooner> kans, Ask your question .Dont' ask if you can ask.
<kans> ok :
atno has quit [Read error: Connection reset by peer]
atno has joined #ruby
spacemud has quit [Ping timeout: 245 seconds]
bcx has joined #ruby
jds has quit [Remote host closed the connection]
nomenkun has joined #ruby
timonv has joined #ruby
dmiller has joined #ruby
mpfundstein has joined #ruby
timonv_ has quit [Read error: Connection reset by peer]
Kudos has joined #ruby
r3nrut has quit [Remote host closed the connection]
mityaz has joined #ruby
spacemud has joined #ruby
Sambo has left #ruby ["Leaving"]
<shevy> kans dont privmsg pls, ask your question here or dont
dmiller has quit [Ping timeout: 248 seconds]
chaosis has joined #ruby
<havenn> kans: What's your project? If it is lengthy, maybe paste the gist of it at gist.github.com?
nomenkun has quit [Ping timeout: 245 seconds]
moos3 has quit [Quit: Computer has gone to sleep.]
jjbohn has quit [Quit: Leaving...]
generalissimo has joined #ruby
<Spooner> shevy, havenn Apparently, the help is in doing it with kans, not questions about it. I suspect there will be zero takers :F
noyb has joined #ruby
<shevy> he is just shy
spacemud has quit [Ping timeout: 245 seconds]
<shevy> I had this problem too, but ever since I decided to sit naked in my chair while IRCing, I am not too embarrassed to ask questions anymore
robert___ has joined #ruby
<libryder> travis-ci has been a serious POS lately
<libryder> Installing nokogiri (1.5.6) F — lol seriously?
solitude88 has quit [Quit: Leaving...]
Virunga has joined #ruby
JohnBat26 has joined #ruby
<shevy> a POS?
robert_ has quit [Ping timeout: 246 seconds]
yshh has joined #ruby
browndawg has quit [Quit: Leaving.]
<banister`sleep> shevy: piece of shit
yacks has joined #ruby
slainer68 has joined #ruby
<Amnesia> has one of you folks used the expect library by any chance?
niklasb has joined #ruby
karasawa has quit [Ping timeout: 246 seconds]
<libryder> for rspec?
<Spooner> Nobody expects the Spanish Inquisition!
samuel02 has joined #ruby
karasawa has joined #ruby
<Su-Shee> Amnesia: during the early stoneage and not with ruby.
<Amnesia> hm ok
<Amnesia> It looks like it executes the the block after it also when the pattern hasn't been matched o0
samuel02_ has quit [Ping timeout: 248 seconds]
Dakuan has joined #ruby
timonv_ has joined #ruby
timonv has quit [Read error: Connection reset by peer]
slainer68 has quit [Ping timeout: 252 seconds]
Dakuan has quit [Ping timeout: 248 seconds]
Xeago has quit [Ping timeout: 248 seconds]
JohnBat26 has quit [Quit: KVIrc 4.3.1 Aria http://www.kvirc.net/]
d2dchat has joined #ruby
aytch has joined #ruby
Zolo has quit [Remote host closed the connection]
breakingthings has joined #ruby
vlad_starkov has quit [Remote host closed the connection]
r3nrut has joined #ruby
jds has joined #ruby
eka has quit [Ping timeout: 252 seconds]
heyitsdave has joined #ruby
Iszak has quit []
BulleTime has quit [Ping timeout: 255 seconds]
swex_ has joined #ruby
robert_ has joined #ruby
Kuifje has quit [Read error: Connection reset by peer]
swex has quit [Read error: Operation timed out]
Kuifje has joined #ruby
bigkevmcd has quit [Quit: outta here]
robert___ has quit [Ping timeout: 252 seconds]
r3nrut has quit [Ping timeout: 252 seconds]
b1rkh0ff has joined #ruby
baphled has quit [Ping timeout: 260 seconds]
MattRB has joined #ruby
mengu has joined #ruby
karasawa has quit [Ping timeout: 240 seconds]
jenrzzz has quit [Ping timeout: 256 seconds]
jgrevich has joined #ruby
eric_ has joined #ruby
<eric_> I have this link http://ping.pong/ How would I get rid of http:// but leave ping.pong/
<davidcelis> eric_: Use URI
<apeiros> or look up the methods of String
<eric_> Ik, but I want to do it by hand
<apeiros> e.g. gsub or []
quest88 has joined #ruby
<davidcelis> eric_: rle?
<eric_> I have this urlc = url.gsub( /https?:\/\/(.+?)(?>\/)(?:\/$)?/, "\\1")
<davidcelis> why?
<eric_> but instead of ping.pong/ i get ping.pong
<davidcelis> change (?:\/$) to (\/$)?
<eric_> okay
<davidcelis> and "\\1" to "\\1\2" i guess?
<davidcelis> or you could just add a "/" manually
<davidcelis> eric_: are you playing around with the regex on Rubular?
<eric_> Doesnt make a difference
<apeiros> or you could try and understand what it actually does instead of rely on voodoo and other people…
jenrzzz has joined #ruby
samuel02_ has joined #ruby
<apeiros> but I think that's talking to walls…
<davidcelis> eric_: http://rubular.com
<davidcelis> Tweak it in real-time until it works
<eric_> alright
<davidcelis> are you doing this just to learn, or are you trying to reinvent URI parsing
<eric_> Reenvent uri parsing
Playground has quit [Ping timeout: 248 seconds]
<eric_> Reinvent uri parsing**
samuel02 has quit [Ping timeout: 256 seconds]
MattRB has quit [Quit: This computer has gone to sleep]
dmiller has joined #ruby
<davidcelis> ...
<davidcelis> glwt
dankest has joined #ruby
<eric_> Any ideas? urlc = url.gsub( /https?:\/(.+?)(?>\/)(?:\/$)?/, "\\1")
<aytch> \bhttps?:\/\/(.+)
vlad_starkov has joined #ruby
dmiller has quit [Ping timeout: 245 seconds]
<eric_> aytch Im trying to get this output ping.pong/ instead of ping.pong
<aytch> it leaves a trailing whitespace at the end, but this works: \bhttps?:\/\/(.+)\s
<aytch> my test string is: help http://ping.pong/ pants
<apeiros> a) don't use gsub but sub, b) anchor the regex to the left, c) through a & b make the regex easier (can drop almost all)
<apeiros> but I think you just after somebody showing you a solution and using that.
BizarreCake has quit [Ping timeout: 256 seconds]
rippa has quit [Read error: Connection reset by peer]
spinagon has joined #ruby
v0n has joined #ruby
jjbohn has joined #ruby
artm has joined #ruby
<apeiros> *you're
vlad_starkov has quit [Ping timeout: 252 seconds]
spinagon has quit [Read error: Connection reset by peer]
rippa has joined #ruby
jaequery has joined #ruby
<artm> most manuals (of any gems that contain executables) don't prefix commands with 'bundle exec'. Is there a way to omit it but have the right script run with the bundled gems?
<apeiros> artm: you can test for the presence of a Gemfile and run Bundler.setup if there is one
<apeiros> but please don't write your script in a way that it's not possible to be used without bundler anymore. kthx.
jjbohn has quit [Ping timeout: 248 seconds]
slainer68 has joined #ruby
<samuel02_> is there any method I could use to get "Samuel Lööf" into "samuel_loof", i.e. make it snake case and replace å, ä, ö with ascii compatible
otters has joined #ruby
<artm> apeiros: I mean running the script from a gem. I didn't write it. for example padrino.
<apeiros> samuel02_: rails?
<samuel02_> apeiros, yep
<apeiros> Inflector.transliterate
<samuel02_> also in 2.3?
<apeiros> no idea
<apeiros> check the docs or just try in the console
<apeiros> (it's ActiveSupport::Inflector btw., not just Inflector - just in case)
karasawa has joined #ruby
<samuel02_> apeiros, ok I'll look it up, otherwise I can just check the source, thanks
tmi_ has quit [Quit: tmi_]
dankest is now known as dankest|away
phinfonet has joined #ruby
jaequery has quit [Quit: Computer has gone to sleep.]
tmi_ has joined #ruby
megha has quit [Quit: WeeChat 0.3.9.2]
Dakuan has joined #ruby
slainer68 has quit [Ping timeout: 252 seconds]
karasawa has quit [Ping timeout: 246 seconds]
huoxito has joined #ruby
<apeiros> artm: if you run it without bundle exec, unless the script is written with Bundler.setup in it, it will just resort to the system gems
<apeiros> so it's not ensured that it will run with the right gems and it's your duty to have them installed.
<eric_> Egh whitespace no good
Karantin has joined #ruby
Dakuan has quit [Ping timeout: 248 seconds]
sonqosaurus has joined #ruby
mercwithamouth has quit [Ping timeout: 252 seconds]
heyitsdave has quit [Ping timeout: 252 seconds]
jblack has quit [Ping timeout: 260 seconds]
yacks has quit [Quit: Leaving]
katherinem13 has quit [Quit: WeeChat 0.3.9]
<eric_> I got it. I changed it from: urlc = url.gsub( /https?:\/\/(.+?)(?>\/)(?:\/$)?/, "\\1") to urlc = url.gsub( /https?:\/\//, "\\1")
katherinem13 has joined #ruby
<canton7> use %r{regex} instead of /regex/, and save yourself the ugliness of escalping all of those /'s
katherinem13 has quit [Client Quit]
<Karantin> Hi all, Help me please. Select from array of hashes return an array - for axample: Post.all.select {|f| f["title"] == '1.14-1.20' } - return an array: [#<Post id: 51, title: "1.14-1.20"...... how i can return id frome here?
<canton7> you're after the first item for which the block matches?
katherinem13 has joined #ruby
<canton7> use #first, instead of #select
Dakuan has joined #ruby
<canton7> damn, #find. not #first
<canton7> I always make that mistake
<Karantin> find will return hash?
<canton7> it'll return the Post object
<canton7> you can get the id from that, if you want
<Karantin> thx, i'll ry it
maxmanders has quit [Ping timeout: 248 seconds]
katherinem13 has quit [Client Quit]
katherinem13 has joined #ruby
timonv_ has quit [Read error: Connection reset by peer]
timonv has joined #ruby
ddd has joined #ruby
maxmanders has joined #ruby
subbyyy has joined #ruby
<Karantin> canton7, Thanks, it works :)
<canton7> using Post.all.select{ ... }[0] would have done the same
In0perable has joined #ruby
generalissimo has quit [Remote host closed the connection]
samuel02 has joined #ruby
phinfonet has quit [Quit: Linkinus - http://linkinus.com]
In0perable has quit [Client Quit]
samuel02_ has quit [Ping timeout: 252 seconds]
phinfonet has joined #ruby
pen has quit [Remote host closed the connection]
dmiller has joined #ruby
Inoperable has joined #ruby
jenrzzz has quit [Ping timeout: 260 seconds]
jgrevich_ has joined #ruby
joeycarmello has quit [Remote host closed the connection]
joeycarmello has joined #ruby
jjbohn has joined #ruby
jgrevich has quit [Ping timeout: 252 seconds]
jgrevich_ is now known as jgrevich
dankest|away is now known as dankest
tndrbt has joined #ruby
jenrzzz has joined #ruby
otters has quit [Ping timeout: 248 seconds]
jds has quit [Remote host closed the connection]
BizarreCake has joined #ruby
Dakuan has quit [Remote host closed the connection]
Dakuan has joined #ruby
IceDragon has joined #ruby
noyb has quit [Ping timeout: 256 seconds]
vlad_starkov has joined #ruby
maxmanders has quit [Ping timeout: 244 seconds]
otters has joined #ruby
Dakuan has quit [Ping timeout: 244 seconds]
sonqosaurus has quit [Quit: Page closed]
jjbohn has quit [Ping timeout: 264 seconds]
maxmanders has joined #ruby
robert___ has joined #ruby
aytch has quit [Remote host closed the connection]
bigmac has joined #ruby
jenrzzz has quit [Ping timeout: 246 seconds]
yakko has joined #ruby
robert_ has quit [Ping timeout: 245 seconds]
chaosis has quit [Ping timeout: 245 seconds]
Inoperable has quit [Quit: Rectified]
Inoperable has joined #ruby
breakingthings has quit []
<shevy> dumdedum
BizarreCake has quit [Ping timeout: 260 seconds]
timonv has quit [Ping timeout: 256 seconds]
timonv has joined #ruby
Playground has joined #ruby
dmiller has quit [Ping timeout: 252 seconds]
Markvilla has quit [Quit: Computer has gone to sleep.]
timonv has quit [Read error: Connection reset by peer]
jalcine_ has joined #ruby
jalcine_ has joined #ruby
jalcine_ has quit [Changing host]
Jacky_ has quit [Ping timeout: 248 seconds]
timonv has joined #ruby
kiyoura has joined #ruby
shevy has quit [Ping timeout: 252 seconds]
sepp2k1 has joined #ruby
<canton7> dadeda
telli has quit [Ping timeout: 248 seconds]
Markvilla has joined #ruby
sepp2k has quit [Ping timeout: 245 seconds]
tommyvyo has joined #ruby
generalissimo has joined #ruby
timonv has quit [Ping timeout: 252 seconds]
bigmac has quit [Ping timeout: 244 seconds]
x82_nicole has joined #ruby
Takehiro has quit [Remote host closed the connection]
jds has joined #ruby
timonv has joined #ruby
telli has joined #ruby
jenrzzz has joined #ruby
slainer68 has joined #ruby
samuel02_ has joined #ruby
BizarreCake has joined #ruby
rakl has joined #ruby
dmiller has joined #ruby
samuel02 has quit [Ping timeout: 260 seconds]
karasawa has joined #ruby
slainer68 has quit [Ping timeout: 240 seconds]
shevy has joined #ruby
BulleTime has joined #ruby
maxmanders has quit [Quit: Computer has gone to sleep.]
Limada has joined #ruby
mneorr has joined #ruby
oposomme has joined #ruby
_br_ has quit [Excess Flood]
jds has quit [Ping timeout: 256 seconds]
breakingthings has joined #ruby
robert_ has joined #ruby
Virunga has quit [Remote host closed the connection]
_br_- has joined #ruby
uris has joined #ruby
karasawa has quit [Ping timeout: 260 seconds]
skcin7 has joined #ruby
cobragoat has joined #ruby
zodiak has quit [Remote host closed the connection]
robert___ has quit [Ping timeout: 276 seconds]
swingha has joined #ruby
aytch_ has joined #ruby
_br_- has quit [Excess Flood]
jekotia has quit [Quit: ChatZilla 0.9.89-rdmsoft [XULRunner 1.9.0.17/2009122204]]
rakl has quit [Quit: sleeping]
_br_ has joined #ruby
<apeiros> anybody know of a gem to read/write apple numbers files?
tora_ has joined #ruby
<tora_> доброго вечера
hackerdude has joined #ruby
<Hanmac> i only have a gem that works on pear numbers :P
arkiver has joined #ruby
tjbiddle has joined #ruby
jenrzzz has quit [Ping timeout: 256 seconds]
_br_ has quit [Excess Flood]
tjbiddle has quit [Client Quit]
_br_ has joined #ruby
vlad_starkov has quit [Remote host closed the connection]
<Karantin> I duplicate my question on rails chanel here:
<Karantin> "I think all you began rails with simple blog app. I need some help with it... http://pastebin.com/kA4UdX5A - post_controller code - here i want to generate a new title of post (title contain cur.week.monday.date - cur.week.sunday.date). I try to make a simple check - if record if this week exist - we make a new record for the next week with the title of the next week, else we edit the post of the next week. It works normal. But when i want to save it. Rail
freakazoid0223 has joined #ruby
bluOxigen has joined #ruby
_br_ has quit [Excess Flood]
<Hanmac> Karantin: did you try this channel #rubyonrails ?
<apeiros> Karantin: kudos for telling upfront that you're cross-posting. thank you.
Almond has quit [Ping timeout: 256 seconds]
bjeanes has quit [Ping timeout: 248 seconds]
syamajala has joined #ruby
autibyte has joined #ruby
_br_ has joined #ruby
timonv has quit [Remote host closed the connection]
timonv has joined #ruby
zodiak has joined #ruby
<Karantin> Hanmac, thx, i will ask here. apeiros, thx :)
BizarreCake has quit [Remote host closed the connection]
<Hanmac> apeiros: when i make a fantasy game or fantasy book the currency of the world will be "kudos" ;P
_br_ has quit [Excess Flood]
<banister`sleep> Hanmac: would you put X-rated content in your game
Takehiro has joined #ruby
<Hanmac> i dont think so ...
<autibyte> I'm having trouble using a gem I installed, getting some weird error about custom_require.rb from rubygems. It's crashing just with the "require" statement: https://gist.github.com/4574364
<autibyte> and I'm requiring rubygems so I'm unsure of why it's not in the loadpath
chaosis has joined #ruby
_br_ has joined #ruby
tommyvyo_ has joined #ruby
timonv has quit [Ping timeout: 260 seconds]
<Hanmac> autibyte install the json gem too ...
<havenn> autibyte: Can you switch to a modern Ruby like 1.9.3?
jduan1981 has joined #ruby
frogstarr78 has quit [Remote host closed the connection]
<autibyte> Hanmac: whoops! that's why, wasn't a very explicit error message. thanks
<autibyte> havenn: I'm on it, this is a new server that I just started installing stuff on
frogstarr78 has joined #ruby
<havenn> autibyte: :D
bricker_ has quit [Ping timeout: 248 seconds]
frogstarr78 has quit [Client Quit]
_br_ has quit [Excess Flood]
vlad_starkov has joined #ruby
jds has joined #ruby
marr has joined #ruby
tommyvyo_ has quit [Ping timeout: 246 seconds]
maxmanders has joined #ruby
<Hanmac> autibyte: liar :P an new ubuntu system would have 1.9.3 as default :P
<canton7> doesn't ruby have a json lib in the stdlib?
<autibyte> Hanmac: true :D well it's a new system to me
telli has quit [Remote host closed the connection]
Takehiro has quit [Ping timeout: 245 seconds]
<Hanmac> canton7: 1.9.3 has, 1.8.7 has not :D
<canton7> aha, that explains it
_br_- has joined #ruby
_br_- has quit [Excess Flood]
jalcine_ is now known as Jacky
swingha has quit [Quit: WeeChat 0.3.9.2]
nuba has quit [Ping timeout: 248 seconds]
bluOxigen has quit [Ping timeout: 252 seconds]
Dakuan has joined #ruby
_br_ has joined #ruby
bjeanes has joined #ruby
<autibyte> On a side note, is there a better way to pass string arguments from Python to a Ruby script than calling os.system() in Python and having the Ruby script read the args from a text file?
samuel02 has joined #ruby
nuba has joined #ruby
jaequery has joined #ruby
arkiver has quit [Quit: Leaving]
_br_ has quit [Excess Flood]
<apeiros> Hanmac: haha
<canton7> your options are pretty much the normal unix ones - arguments as command-line flags, data piped in, read from stdin, or read from a file (specified as one of those args)
samuel02_ has quit [Ping timeout: 255 seconds]
Dakuan has quit [Ping timeout: 248 seconds]
<autibyte> canton7: ah, I think I might try command-line flags since file-reading seems to kludgy
yshh has quit [Remote host closed the connection]
_br_ has joined #ruby
tndrbt has quit [Quit: tndrbt]
<canton7> just make the ruby script a regular script which can be called sensibly by a human in its own right
<canton7> look at Trollop and OptionParser
tjbiddle has joined #ruby
jds has quit [Ping timeout: 248 seconds]
jaequery has quit [Quit: Computer has gone to sleep.]
<havenn> or Slop
mkruger has joined #ruby
nomenkun has joined #ruby
emocakes has quit [Quit: emocakes]
toekutr has joined #ruby
_br_ has quit [Excess Flood]
jxf has quit [Ping timeout: 245 seconds]
lazyPower has joined #ruby
ddd has quit [Ping timeout: 252 seconds]
_br_ has joined #ruby
<lazyPower> I'm having an interesting problem with a ruby script. Its complaining that it cannot find a file that i've just fetched from S3. I can verify that the file exists prior to the script attempting to rename it. I have sample output here: https://gist.github.com/4574556
pu22l3r has joined #ruby
nomenkun has quit [Ping timeout: 245 seconds]
<lazyPower> If anyone has an idea on why a simple shell out to move files would be returning a "File not found" error -- as the command works when executed manually in the shell.. i'm open to suggestions.
<havenn> lazyPower: Can you Gist contents of: ncu_recording_handler.rb
_br_ has quit [Excess Flood]
<lazyPower> i just updated it with the S3 code. Do you need the driver script as well?
bean__ has joined #ruby
<havenn> lazyPower: oh, nvm
<lazyPower> ok pshed it all up
_br_ has joined #ruby
_br_ has quit [Excess Flood]
_br_ has joined #ruby
jadon has joined #ruby
Limada has quit [Changing host]
Limada has joined #ruby
rdark has joined #ruby
Virunga has joined #ruby
<jadon> Hello, I had a question regarding Thread Safety. I've noticed this https://gist.github.com/5bf5a82f369bdfd23790 done a number of times. Is @children Threadsafe? does it not effectively translate into @@children or does ruby do some other magic to make it thread safe?
karasawa has joined #ruby
<lazyPower> havenn: i apologize for the messyness - i wasn't going to refactor until i had it working at least partially correct.
maxmanders has quit [Ping timeout: 260 seconds]
quest88 has quit [Quit: quest88]
Takehiro has joined #ruby
<havenn> lazyPower: Haven't had a chance to check scripts, but could you?: require 'fileutils'; FileUtils#mv
DrShoggoth has joined #ruby
<Hanmac> jadon i think you need to test it ... it odes not translated into @@children
_br_ has quit [Excess Flood]
j^2 has quit [Quit: leaving]
<lazyPower> havenn: i've tried both. They yield the same message in irb
<lazyPower> system and fileutils.mv
maxmanders has joined #ruby
<havenn> lazyPower: Does?: File.exist?
DatumDrop has joined #ruby
pkrnj has joined #ruby
dmiller has quit [Read error: Connection reset by peer]
<jadon> I've tested it through console… haven't tested it with multiple threads though.
karasawa has quit [Ping timeout: 252 seconds]
mneorr has quit [Remote host closed the connection]
tatsuya_o has quit [Ping timeout: 245 seconds]
mneorr has joined #ruby
<jadon> @children is at class level though
jxf has joined #ruby
_br_ has joined #ruby
<lazyPower> paydirt.
<lazyPower> i was escaping the file list when i split the filename from the path. so it was double-escaping the strings i think.
<lazyPower> doesnt explain why it didn't work when executed in irb - but i'll take it. its a small win
<havenn> lazyPower: aha
artm has quit [Remote host closed the connection]
artm has joined #ruby
_br_ has quit [Excess Flood]
tjbiddle has quit [Quit: tjbiddle]
fermion_ has quit [Quit: Textual IRC Client: http://www.textualapp.com/]
maxmanders has quit [Quit: Computer has gone to sleep.]
samuel02_ has joined #ruby
Takehiro has quit [Ping timeout: 245 seconds]
dmerrick has quit [Quit: dmerrick]
pu22l3r has quit [Remote host closed the connection]
tps_ has quit [Quit: tps_]
samuel02 has quit [Ping timeout: 256 seconds]
_br_ has joined #ruby
_br_ has quit [Excess Flood]
yshh has joined #ruby
_br_ has joined #ruby
jblack has joined #ruby
kans has quit [Quit: Leaving]
joeycarmello has quit [Remote host closed the connection]
mkruger has left #ruby ["Konversation terminated!"]
DatumDrop has quit [Read error: Connection reset by peer]
bcx has quit [Quit: Leaving.]
jadon has left #ruby [#ruby]
dantheman_ has joined #ruby
DatumDrop has joined #ruby
<dantheman_> anyone around?
mockra has joined #ruby
_br_ has quit [Excess Flood]
_br_ has joined #ruby
mneorr has quit [Ping timeout: 248 seconds]
<dantheman_> anyone?
<apeiros> dantheman_: no
<apeiros> anyone is not here
<dantheman_> lol
<dantheman_> word
<dantheman_> question
<banister`sleep> apeiros: sup dude, did u upgrade to 0.9.11 yet? :D and if so, does 'edit MyClass' work? sry to bug, i just havent had much feedback yet (which could be a good thing, or could mean ppl just haven't upgraded yet)
<dantheman_> I'm trying to teach myself ruby and play with facebook's realtime updates callback server thingy
<apeiros> 0.9.11 of pry?
<banister`sleep> apeiros: yes
bluOxigen has joined #ruby
<dantheman_> and I'm getting something weird that I can't figure out
<apeiros> not yet, but now that you tell me I'll immediately after this SC2 cup :)
<banister`sleep> apeiros: np
<dantheman_> like render takes 2 args?
<banister`sleep> i need to push one more point release anyway
aaronmacy has joined #ruby
<apeiros> dantheman_: somehow I'm missing the exception part
<apeiros> I only see the backtrace
<apeiros> seems to be sinatra? if so, #sinatra might also be helpful
yshh has quit [Ping timeout: 245 seconds]
<dantheman_> apeiros: https://gist.github.com/4574706
<dantheman_> yeah I'm using sinatra
<dantheman_> I'll join over there too
<apeiros> dantheman_: such things are vital informations :-p
<apeiros> and yes, sounds like render wants 2 args and you only gave it 1
* apeiros doesn't use sinatra, therefore can't help much
<dantheman_> word
<dantheman_> I'm new to the whole ruby thing
<dantheman_> more of a compiled lang person
_br_ has quit [Excess Flood]
bean__ has quit [Quit: Computer has gone to sleep.]
tps_ has joined #ruby
billy_ran_away has quit [Ping timeout: 244 seconds]
rdark has quit [Quit: leaving]
<apeiros> that'd probably be fun
love_color_text has quit [Remote host closed the connection]
<apeiros> a webframework for C :)
staafl has joined #ruby
zph has joined #ruby
Kingy has joined #ruby
_br_ has joined #ruby
emmanuelux has quit [Ping timeout: 248 seconds]
billy_ran_away has joined #ruby
_br_ has quit [Excess Flood]
<dantheman_> apeiros: lol
guns has joined #ruby
<dantheman_> yeah give me headers and I'm good
<apeiros> havenn: haha
<apeiros> awesome
<dantheman_> all of this no ';' bs is driving me crazy
_br_- has joined #ruby
<dantheman_> I keep having to correct myself
<apeiros> C misses something like rack, though :(
<dantheman_> yeah
<apeiros> dantheman_: those things are just a matter of getting used to
<dantheman_> but like I mostly write production stuff for Android and play with CPP and C with openFrameworks and embedded machines
vlad_starkov has quit [Remote host closed the connection]
<dantheman_> ruby is like being lazy
<dantheman_> haha
staafl_alt has joined #ruby
tatsuya_o has joined #ruby
jxf has quit [Ping timeout: 245 seconds]
jxf has joined #ruby
_br_- has quit [Excess Flood]
staafl has quit [Ping timeout: 252 seconds]
_br_ has joined #ruby
rippa has quit [Ping timeout: 252 seconds]
v0n has quit [Ping timeout: 252 seconds]
jsilver has joined #ruby
tatsuya_o has quit [Ping timeout: 245 seconds]
prime has quit [Quit: bbl]
Kingy has quit [Quit: Leaving]
zph has quit [Quit: Computer has gone to sleep.]
_br_ has quit [Excess Flood]
tommyvyo has quit [Quit: http://twitter.com/tommyvyo]
_br_- has joined #ruby
oposomme is now known as oposomme|away
aaronmacy has quit [Quit: Leaving.]
jduan1981 has quit [Quit: jduan1981]
emmanuelux has joined #ruby
aphyr has joined #ruby
_br_- has quit [Excess Flood]
haxrbyte_ has joined #ruby
_br_ has joined #ruby
test has joined #ruby
test has quit [Client Quit]
aphyr has left #ruby [#ruby]
vlad_starkov has joined #ruby
Kuifje has quit [Read error: Connection reset by peer]
danneu has joined #ruby
haxrbyte has quit [Ping timeout: 256 seconds]
joeycarmello has joined #ruby
Kuifje has joined #ruby
samuel02 has joined #ruby
tommyvyo has joined #ruby
_br_ has quit [Excess Flood]
orcris has joined #ruby
JumpMast3r has quit [Quit: JumpMast3r]
mneorr has joined #ruby
Nahra has joined #ruby
Nahra has joined #ruby
samuel02_ has quit [Ping timeout: 252 seconds]
ephialtes480 has joined #ruby
<shevy> dantheman_ if you want to you could still use ;
_br_- has joined #ruby
Markvilla has quit [Quit: Computer has gone to sleep.]
brianpWins has joined #ruby
_br_- has quit [Excess Flood]
dankest has quit [Quit: Leaving...]
razibog has quit [Ping timeout: 260 seconds]
dankest has joined #ruby
_br_ has joined #ruby
Beoran__ has joined #ruby
mockra has quit [Remote host closed the connection]
bean__ has joined #ruby
RONNCC has joined #ruby
RONNCC has quit [Changing host]
RONNCC has joined #ruby
RONNCC has joined #ruby
slainer68 has joined #ruby
<RONNCC> how do you do the range [.001, .002, .003 .... .999] in ruby?
Beoran_ has quit [Ping timeout: 272 seconds]
atmosx has joined #ruby
mamat has joined #ruby
<mamat> hii
<RONNCC> hu
<RONNCC> hi
<RONNCC> how do you do the range [.001, .002, .003 .... .999] in ruby?
nomenkun has joined #ruby
mamat has left #ruby [#ruby]
karasawa has joined #ruby
<RONNCC> how do you do the range [.001, .002, .003 .... .999] in ruby?
_br_ has quit [Excess Flood]
_br_- has joined #ruby
<apeiros> RONNCC: and you ask 3 times because…?
<RONNCC> apeiros: sorry. accidetnt
<RONNCC> *dent
<apeiros> that's not a range, btw., that's an array. I'd use Array.new(999) { |i| i/1000 }
<apeiros> d'oh
syamajala has quit [Quit: leaving]
<apeiros> Array.new(999) { |i| i.fdiv 1000 }
atmosx has quit [Client Quit]
MattRB has joined #ruby
slainer68 has quit [Ping timeout: 260 seconds]
<RONNCC> apeiros: what about with a step
nomenkun has quit [Ping timeout: 245 seconds]
DDAZZA has joined #ruby
aaronmacy has joined #ruby
<apeiros> that's not a meaningful question. yes, what about it?
Xeago has joined #ruby
karasawa has quit [Ping timeout: 252 seconds]
<RONNCC> apeiros: a step of every 3. so like range(1,100,2)
_br_- has quit [Excess Flood]
chrismhough has joined #ruby
<apeiros> RONNCC: are you telling me you seriously can't adapt i/1000 to a step of every 3?
maxmanders has joined #ruby
_br_ has joined #ruby
<apeiros> anyway, you can use Integer#step + Enumerator#to_a
<RONNCC> apeiros: yes i can't I don't do ruby. I practice pythonfu ;)
<RONNCC> apeiros: can you do a nested list comprehension A* star search in python? hmmm? :P
<apeiros> RONNCC: errr, yes. that's less about ruby and more about generally not being totally stupid :-p
<RONNCC> apeiros: i have no clue how this works function wise. everyother language has a range generator with a step built in >:C
<RONNCC> except c ofc
awarner has joined #ruby
jxf has quit [Ping timeout: 245 seconds]
cobragoat has quit [Remote host closed the connection]
<RONNCC> lol so thanks apeiros:
solitude88 has joined #ruby
mercwithamouth has joined #ruby
cobragoat has joined #ruby
subbyyy has quit [Ping timeout: 248 seconds]
_br_ has quit [Excess Flood]
artm_ has joined #ruby
<RONNCC> apeiros: oh smh. I didn't mean using multiplication and stuff. I mean't just via functions. I trust them to optimize. also Integer doesn't have #step
artm_ has quit [Client Quit]
hybris has joined #ruby
cantonic has quit [Quit: cantonic]
<apeiros> yes, the owner of #step is Fixnum for your starting point. ruby doesn't have functions. and if you care about optimization, you're doing it wrong (at this point at least).
DDAZZA has quit [Remote host closed the connection]
Goles_ has joined #ruby
_br_- has joined #ruby
Goles_ has quit [Remote host closed the connection]
<apeiros> oh well, Float since you use 0.001 as start point. sorry.
artm_ has joined #ruby
cpruitt_ has joined #ruby
<apeiros> meh, Numeric for all three actually.
artm has quit [Ping timeout: 252 seconds]
artm_ is now known as artm
Goles has quit [Read error: Operation timed out]
cpruitt has quit [Ping timeout: 255 seconds]
cpruitt_ is now known as cpruitt
_br_- has quit [Excess Flood]
Markvilla has joined #ruby
advorak has joined #ruby
jduan1981 has joined #ruby
aaronmacy has quit [Quit: Leaving.]
yshh has joined #ruby
_br_ has joined #ruby
advorak has quit [Client Quit]
Markvilla has quit [Client Quit]
robert___ has joined #ruby
Playground has quit [Quit: When I come back, please tell me in what new ways you have decided to be completely wrong.]
_br_ has quit [Excess Flood]
recycle has joined #ruby
<apeiros> Beoran__: ping - you there? mind a PM?
maxmanders has quit [Quit: Computer has gone to sleep.]
DatumDrop has quit [Remote host closed the connection]
robert_ has quit [Ping timeout: 244 seconds]
_br_ has joined #ruby
statarb3 has quit [Read error: Connection reset by peer]
subbyyy has joined #ruby
statarb3 has joined #ruby
xemu has joined #ruby
_br_ has quit [Excess Flood]
yshh has quit [Ping timeout: 248 seconds]
otters has quit [Ping timeout: 240 seconds]
toekutr has quit [Remote host closed the connection]
tjbiddle has joined #ruby
Dann1 has joined #ruby
Dann1 has quit [Read error: Connection reset by peer]
Vert has joined #ruby
_br_ has joined #ruby
Dann1 has joined #ruby
willatwood has joined #ruby
pmros has joined #ruby
samuel02_ has joined #ruby
blazes816 has joined #ruby
awarner has quit [Remote host closed the connection]
samuel02 has quit [Ping timeout: 255 seconds]
_br_ has quit [Excess Flood]
haxrbyte has joined #ruby
eric_ has quit [Quit: Leaving]
tatsuya_o has joined #ruby
_br_ has joined #ruby
staafl_alt has quit [Quit: Leaving]
haxrbyte_ has quit [Ping timeout: 246 seconds]
_br_ has quit [Excess Flood]
tatsuya_o has quit [Ping timeout: 245 seconds]
b1rkh0ff has quit [Quit: Leaving]
Vert has quit [Remote host closed the connection]
Sonmi_001 has joined #ruby
_br_ has joined #ruby
t0rc has joined #ruby
jsilver has quit [Remote host closed the connection]
quest88 has joined #ruby
_br_ has quit [Excess Flood]
<shevy> pong!
<shevy> I counter your ping
Vert has joined #ruby
pmros has quit [Ping timeout: 240 seconds]
<apeiros> you're not Beoran__
ddd has joined #ruby
Dann2 has joined #ruby
_br_ has joined #ruby
d2dchat has quit [Remote host closed the connection]
MattRB has quit [Quit: This computer has gone to sleep]
_br_ has quit [Excess Flood]
Dann1 has quit [Ping timeout: 252 seconds]
atno has quit [Read error: Connection reset by peer]
_br_ has joined #ruby
atno has joined #ruby
mneorr has quit [Remote host closed the connection]
mneorr has joined #ruby
_br_ has quit [Excess Flood]
_br_ has joined #ruby
generalissimo has quit [Remote host closed the connection]
_br_ has quit [Excess Flood]
slainer68 has joined #ruby
_br_- has joined #ruby
tjbiddle_ has joined #ruby
kidoz has joined #ruby
vlad_starkov has quit [Remote host closed the connection]
karasawa has joined #ruby
vlad_starkov has joined #ruby
_br_- has quit [Excess Flood]
slainer68 has quit [Ping timeout: 260 seconds]
tjbiddle has quit [Ping timeout: 248 seconds]
tjbiddle_ is now known as tjbiddle
_br_ has joined #ruby
karasawa has quit [Ping timeout: 248 seconds]
__BigO__ has joined #ruby
eldariof has quit []
tatsuya_o has joined #ruby
mockra has joined #ruby
_br_ has quit [Excess Flood]
m104 has joined #ruby
tatsuya_o has quit [Remote host closed the connection]
Dann2 is now known as Dann1
samuel02 has joined #ruby
hackerdude has quit [Remote host closed the connection]
willatwood has quit [Quit: Computer has gone to sleep.]
dankest is now known as dankest|away
mockra has quit [Ping timeout: 244 seconds]
Kakera has quit [Ping timeout: 248 seconds]
_br_ has joined #ruby
atmosx has joined #ruby
chaosis has quit [Ping timeout: 245 seconds]
samuel02_ has quit [Ping timeout: 260 seconds]
zph has joined #ruby
timonv has joined #ruby
_br_ has quit [Excess Flood]
thufir_ has joined #ruby
_br_- has joined #ruby
x82_nicole has quit [Quit: Computer has gone to sleep.]
guns has quit [Quit: guns]
dankest|away is now known as dankest
thone_ has joined #ruby
mneorr has quit [Remote host closed the connection]
mneorr has joined #ruby
Markvilla has joined #ruby
_br_- has quit [Excess Flood]
statarb3 has quit [Ping timeout: 245 seconds]
robert_ has joined #ruby
_br_ has joined #ruby
thone has quit [Ping timeout: 248 seconds]
MattRB has joined #ruby
tommyvyo_ has joined #ruby
otters has joined #ruby
dankest has quit [Quit: Leaving...]
robert___ has quit [Ping timeout: 244 seconds]
_br_ has quit [Excess Flood]
Spooner has quit [Remote host closed the connection]
mneorr has quit [Remote host closed the connection]
phinfonet has quit [Read error: Connection reset by peer]
maletor has joined #ruby
pnkbst has joined #ruby
mneorr has joined #ruby
baphled has joined #ruby
Markvilla has quit [Quit: Computer has gone to sleep.]
phinfonet has joined #ruby
MattRB has quit [Quit: This computer has gone to sleep]
mneorr has quit [Remote host closed the connection]
mneorr has joined #ruby
_br_- has joined #ruby
_br_- has quit [Excess Flood]
love_color_text has joined #ruby
_br_ has joined #ruby
DatumDrop has joined #ruby
_br_ has quit [Excess Flood]
arietis has quit [Quit: Textual IRC Client: http://www.textualapp.com/]
jxf has joined #ruby
_br_ has joined #ruby
timonv has quit [Remote host closed the connection]
timonv has joined #ruby
vlad_starkov has quit [Remote host closed the connection]
tora_ has quit [Remote host closed the connection]
r0bby has joined #ruby
robbyoconnor has quit [Ping timeout: 244 seconds]
banister`sleep has quit [Remote host closed the connection]
DatumDrop has quit [Ping timeout: 245 seconds]
JumpMast3r has joined #ruby
Guest23431 has quit [Ping timeout: 246 seconds]
vlad_starkov has joined #ruby
Xeago has quit [Remote host closed the connection]
_br_ has quit [Excess Flood]
daniel_- has joined #ruby
daniel_- has quit [Changing host]
daniel_- has joined #ruby
Dann1 has quit [Quit: GODDAMNIT]
bel3atar has quit [Read error: Operation timed out]
timonv has quit [Ping timeout: 248 seconds]
iamjarvo1 has joined #ruby
__BigO__ has quit [Remote host closed the connection]
fryguy has quit [Read error: Connection reset by peer]
thorncp has quit [Ping timeout: 260 seconds]
mercwithamouth has quit [Ping timeout: 246 seconds]
brianpWins has quit [Quit: brianpWins]
programmerandy has joined #ruby
iamjarvo has quit [Ping timeout: 252 seconds]
maetthew has quit [Ping timeout: 245 seconds]
waxjar has quit [Ping timeout: 260 seconds]
programmerandy has left #ruby [#ruby]
arusso has quit [Ping timeout: 245 seconds]
slainer68 has joined #ruby
_br_ has joined #ruby
ephialtes480 has quit [Ping timeout: 244 seconds]
maxmanders has joined #ruby
hackerdude has joined #ruby
Apocalypse has quit [Ping timeout: 245 seconds]
maetthew has joined #ruby
urrk has quit [Ping timeout: 260 seconds]
arusso has joined #ruby
arusso has quit [Changing host]
arusso has joined #ruby
Hien has quit [Ping timeout: 260 seconds]
fryguy has joined #ruby
_br_ has quit [Excess Flood]
urrk has joined #ruby
statarb3 has joined #ruby
sharpobject has quit [Ping timeout: 264 seconds]
thorncp has joined #ruby
Hien has joined #ruby
sharpobject has joined #ruby
Apocalypse has joined #ruby
banister`sleep has joined #ruby
alaska has quit [Ping timeout: 264 seconds]
chridal has quit [Read error: Operation timed out]
solitude88 has quit [Quit: Leaving...]
waxjar has joined #ruby
xargoon has quit [Ping timeout: 276 seconds]
_br_ has joined #ruby
ggamel has joined #ruby
statarb3 has quit [Ping timeout: 245 seconds]
robert___ has joined #ruby
tommyvyo has quit [Ping timeout: 252 seconds]
tommyvyo_ is now known as tommyvyo
mikekelly has quit [Ping timeout: 240 seconds]
samuel02_ has joined #ruby
_carloslopes has quit [Remote host closed the connection]
kiyoura has quit [Ping timeout: 256 seconds]
xargoon has joined #ruby
bel3atar has joined #ruby
_br_ has quit [Excess Flood]
tommyvyo_ has joined #ruby
samuel02 has quit [Ping timeout: 256 seconds]
tommyvyo has quit [Read error: Connection reset by peer]
robert_ has quit [Ping timeout: 248 seconds]
mercwithamouth has joined #ruby
mikekelly has joined #ruby
tommyvyo_ has quit [Read error: Connection reset by peer]
tommyvyo has joined #ruby
tommyvyo_ has joined #ruby
orcris has quit [Ping timeout: 245 seconds]
_br_- has joined #ruby
_br_- has quit [Excess Flood]
maletor has quit [Quit: Computer has gone to sleep.]
_br_ has joined #ruby
crackfu has joined #ruby
beardyjay has quit [Ping timeout: 260 seconds]
<danneu> I asked this in #ror but it was the wrong channel. Can anyone see an obvious improvement to the `nodes` method in this simple class? https://gist.github.com/0433bd5babd55b2c2ef4
<banister`sleep> danneu: break it up into another method
PragCypher has quit [Quit: Leaving]
kiyoura has joined #ruby
karasawa has joined #ruby
<cirwin> danneu: if you can get an Enumerator out of the traverse method, call map on it
_br_ has quit [Excess Flood]
havenn has quit [Remote host closed the connection]
robert___ has quit [Ping timeout: 252 seconds]
havenn has joined #ruby
jaequery has joined #ruby
kiyoura` has joined #ruby
baphled has quit [Quit: Lost terminal]
<banister`sleep> properly named :)
_br_ has joined #ruby
chrismhough has quit [Quit: chrismhough]
<danneu> thanks i guess i didn't see that since i had if statements until i made that gist.
kiyoura has quit [Ping timeout: 252 seconds]
BulleTime has quit [Ping timeout: 255 seconds]
ddd has quit [Ping timeout: 248 seconds]
karasawa has quit [Ping timeout: 256 seconds]
pavilionXP has quit [Read error: Connection reset by peer]
havenn has quit [Ping timeout: 248 seconds]
_br_ has quit [Excess Flood]
_br_ has joined #ruby
<danneu> cirwin: nokoigir's #traverse sends #children recursively to each node and passes each node to the block. probably because building one single Enumerator for all the nodes in the dom could be massive.
gyre007 has joined #ruby
<danneu> cirwin: my dom is always small so i could just reimplement the recursive #children call into my own Enumerator.
emocakes has joined #ruby
jduan1981 has quit [Read error: Connection reset by peer]
<cirwin> danneu: oh enumerators are cleverer than that, they don't load everything into ram :)
<cirwin> Nokogiri::HTML("<span>").at_css('span').map
<cirwin> then you can .compact to get rid of things you don't want
jduan1981 has joined #ruby
<cirwin> otherwise why not put everything into the selector if it's nokogiri
maletor has joined #ruby
<danneu> cirwin: basically, the nodes i want are all siblings. "<div><h1><div><div><h1>" etc, but i need in that order. for instance, dom.css("h1, div") returns "<h1><h1><div><div>..."
<cirwin> ah ok
<danneu> interesting assertion about enumerators. i'll have to read about it
<cirwin> try: (0..10000000000000000).to_enum
_br_ has quit [Excess Flood]
freakazoid0223 has quit [Quit: Leaving]
CroweT has joined #ruby
xorrbit has joined #ruby
carloslopes has joined #ruby
CroweT has quit [Client Quit]
arturaz has quit [Remote host closed the connection]
Markvilla has joined #ruby
forced_request has joined #ruby
carloslopes has quit [Remote host closed the connection]
<xorrbit> I'm getting an undefined method '[]' for a class, how would I go about implementing a method to fix this?
tjbiddle has quit [Quit: tjbiddle]
davidokner has joined #ruby
<davidokner> Does anyone think a person could learn ruby by joining an open source project?
<apeiros> def [](arg1, …)
<apeiros> @ xorrbit
<xorrbit> hmm, so just def to_hash won't work?
<apeiros> davidokner: probably. but I think it'd be better if you'd learn the basics on your own.
<apeiros> xorrbit: no, why would it?
<xorrbit> I don't know
<apeiros> [] is its own method, [] does not invoke to_hash
<xorrbit> <-- ruby noob
<xorrbit> hmm
kayloos has quit [Ping timeout: 240 seconds]
<davidokner> apeiros: Ok, I have learned some basics. Are there open source projects for beginners specifically?
<apeiros> I doubt it. usually oss projects are started because somebody has an itch he wants to scratch
maxmanders has quit [Quit: Computer has gone to sleep.]
_br_- has joined #ruby
<davidokner> apeiros: Perhpas making some programs by myself and then trying to join an open source project. But, if there were some that targeted novice, that would be interesting.
<apeiros> and it's probably the best if you join an oss project which scratches one of your itches.
Sonmi_001 has quit [Quit: Quitte]
maxmanders has joined #ruby
_br_- has quit [Excess Flood]
jsilver has joined #ruby
<atmosx> guys the correct syntax is rss = NewsDisplay::feed_list or rss = NewsDisplay.new::feed_list ?? I usually do this in 2 steps but seems much more elegant like this
<davidokner> apeiros: what is an oss project?
<danneu> davidokner: there are always beginner projects that more inspire you while being certainly within reach. but they're hard to find just browsing
<danneu> open source
<atmosx> davidokner: open source
<cirwin> open source software :)
<apeiros> ^
<atmosx> see how cirwin is smiling?
<atmosx> he's a linux winnie
<davidokner> Oh, ok
<cirwin> atmosx: :D
<apeiros> atmosx: . for method invocation. :: is antiquated and may even be removed.
<atmosx> cirwin: :-P
* cirwin gets all warm and fuzzy when oss is said in full
<atmosx> apeiros: I just DISCOVERED IT!
solitude88 has joined #ruby
<cirwin> apeiros: really?
<atmosx> no I'm using it …
<apeiros> rly
<cirwin> damn
<davidokner> Has anyone tried making a ruby web application without using rails or sinatra or any web framework?
<atmosx> for quite a while
_br_ has joined #ruby
<cirwin> I love how authoritative EM::run looks
<atmosx> okay, so there's another way I think…
<atmosx> cirwin: there's EM.run or something
<cirwin> atmosx: of course, it's the same
<atmosx> there was a blog post I read recently about it
tmi__ has joined #ruby
<cirwin> but it's like I don't do puts() because it looks silly
<cirwin> EM::run is a statement of the highest pretension
<atmosx> :: was used for class methods or something
jekotia has joined #ruby
rippa has joined #ruby
<cirwin> atmosx: yes
m104 has quit [Quit: Bye!]
<atmosx> nice, I'm an expert
* atmosx \o/
esing has joined #ruby
<atmosx> okay, wtf should I suppose to do now :-/
<esing> Hi
tmi_ has quit [Ping timeout: 245 seconds]
<esing> Which ruby version do I need for this script? https://gist.github.com/1791270a
<cirwin> atmosx: would you like to learn yourself some ruby internals? https://github.com/pry/pry/issues/779 looks fun
mneorr has quit [Read error: Connection reset by peer]
<atmosx> isn't that an irb alternative?
_br_ has quit [Excess Flood]
<cirwin> esing: 1.9.3 ideally, or 1.8.7 if that's easier
<cirwin> atmosx: pry is, yes
_br_- has joined #ruby
<atmosx> find-ref cool
<esing> cirwin, Thanks
mneorr has joined #ruby
chrismhough has joined #ruby
alanp_ has joined #ruby
tjbiddle has joined #ruby
Jamone has quit [Ping timeout: 245 seconds]
<RONNCC> what do you guys use for memoize
nimred has joined #ruby
nimred has quit [Changing host]
nimred has joined #ruby
t0rc has quit [Quit: WeeChat 0.3.9.2]
<RONNCC> *memoizing
pkrnj has quit [Quit: Computer has gone to sleep.]
<apeiros> @foo ||= begin …calc… end
skcin7 has quit [Quit: Computer has gone to sleep.]
alanp has quit [Ping timeout: 244 seconds]
<apeiros> often even doable without begin/end
_br_- has quit [Excess Flood]
baphled has joined #ruby
<esing> I run the script with "ruby volume.rb", but I guess the script needs more dependencies http://dpaste.org/VYV6q/
<ggamel> Why will rbenv not work anymore :( Just upgraded to 1.9.3-p374 and had re-installed all of my global gems - everything seemingly went great. After closing iterm2 last night and launching it today, it's been nothing but a nightmare.
<ggamel> System is defaulting to 1.8.7 and no amount of uninstalling/reinstalling rbenv and rehashing and setting the proper global ruby will change anything
<cirwin> esing: what's ruby --version ?
<esing> uby --version
<esing> ruby 1.9.3p362 (2012-12-25 revision 38607) [x86_64-linux]
kidoz has quit [Quit: Ухожу я от вас]
Nahra has quit [Quit: leaving]
<cirwin> maybe you downloaded it badly? it works for me http://showterm.io/1346b1bf5692554fb4ee9#fast
jaequery has quit [Quit: Computer has gone to sleep.]
_br_ has joined #ruby
<esing> cirwin Thanks, using curl link > volume.rb and then ruby volume.rb makes it work for me too. Before I just copied it from the browser to volume.rb
<cirwin> ah, yeah
<cirwin> I've bad problems with copy-paste from gist before
samuel02 has joined #ruby
_br_ has quit [Excess Flood]
<ggamel> annnnnnd ruby 1.8.7 (2012-02-08 patchlevel 358) [universal-darwin12.0] strikes again. haven't had issues since July 2012. dangit
artm has quit [Quit: artm]
Monie has joined #ruby
samuel02_ has quit [Ping timeout: 252 seconds]
_br_ has joined #ruby
Takehiro has joined #ruby
crackfu has quit [Remote host closed the connection]
bluOxigen has quit [Ping timeout: 256 seconds]
<ggamel> Anyone know how to diagnose why the default OS X 10.8.2 ruby is refusing to allow rbenv to switch to other rubies? I'm properly adding "eval "$(rbenv init -)"" to my zshrc file in dotfiles, everything else loads fine - $PATH is as it has been/should be - yet Apple's ruby continues it's triumph.
awarner has joined #ruby
_br_ has quit [Excess Flood]
scottmos has joined #ruby
Takehiro has quit [Ping timeout: 252 seconds]
tommyvyo has quit [Read error: Connection reset by peer]
tommyvyo_ is now known as tommyvyo
_br_ has joined #ruby
alaska has joined #ruby
tjbiddle_ has joined #ruby
_br_ has quit [Excess Flood]
tjbiddle has quit [Ping timeout: 248 seconds]
tjbiddle_ is now known as tjbiddle
tjbiddle_ has joined #ruby
cajone has quit [Read error: Connection reset by peer]
Jacky_ has joined #ruby
_br_ has joined #ruby
jduan1981_ has joined #ruby
tjbiddle has quit [Read error: Connection reset by peer]
Playground has joined #ruby
Jacky has quit [Read error: Connection reset by peer]
tjbiddle has joined #ruby
dantheman_ has quit [Quit: Page closed]
jduan1981 has quit [Read error: Connection reset by peer]
jduan1981_ is now known as jduan1981
tmi__ has quit [Quit: tmi__]
emergion has joined #ruby
emergion has quit [Client Quit]
eric_ has joined #ruby
<eric_> Okay, I need urgent help with a tcp proxy in ruby. The url parser I am working on seems to be redirecting everythin to 127.0.0.1, I need someone to pm if they can help, I really wouldn't like people looking at the full code, except in pm
_br_ has quit [Excess Flood]
tjbiddle_ has quit [Ping timeout: 245 seconds]
<atmosx> eric_: You can ask them to sign an NDA first. Just to be sure nothing bad happens.
<apeiros> eric_: same as before: want free help? show code.
<apeiros> don't want to show code? get a consultant.
<eric_> Okay well here is the code: http://pastie.org/5730765
baphled has quit [Ping timeout: 240 seconds]
<eric_> The url parser is apperently redirecting every url to 127.0.0.1 SOMEHOW
Vert has quit [Read error: Connection reset by peer]
jeffreybaird has joined #ruby
<canton7> eric_, impossible to say without lots more info. Is the ip being printed correctly on line 53?
Iszak has joined #ruby
<eric_> On 1 url yes on the other no
oposomme|away has quit [Quit: Leaving...]
<eric_> I only have 2 url's
_br_ has joined #ruby
Jacky_ is now known as Jacky
<RONNCC> hey
_br_ has quit [Excess Flood]
<RONNCC> what do you guys use for memoization
Blaster has joined #ruby
Jacky is now known as Guest67037
love_color_text has quit [Read error: Connection reset by peer]
love_color_text has joined #ruby
xorrbit has quit [Ping timeout: 256 seconds]
<banister`sleep> RONNCC: apeiros already answered you
<canton7> eric_, that doesn't help at all i'm afraid
osaut has quit [Quit: osaut]
<eric_> Egh okay what info do you need exactly
Monie has quit [Ping timeout: 244 seconds]
<RONNCC> oh
<RONNCC> smh
<RONNCC> can i do that in regular ruby
tps_ has quit [Quit: tps_]
<RONNCC> or do i have to install rails
RagingDave has joined #ruby
<nfk> wait, does ruby have no shortcircuited logical operators?
<apeiros> RONNCC: you're in #ruby, all you see here is regular ruby unless stated otherwise.
_br_ has joined #ruby
skcin7 has joined #ruby
<apeiros> nfk: ||, &&, and, or are all short-circuited
<nfk> apeiros, oh really?
<apeiros> *sob*
<nfk> true && 1.succ
<nfk> => 2
<apeiros> no, I'm just kidding. YES OF COURSE REALLY.
<nfk> is that what you call short circuited and operator?
_br_ has quit [Excess Flood]
<banister`sleep> nfk: do u understand how && works? :)
<apeiros> nfk: of course, if lhs is true, && must evaluate the other side too
<canton7> eric_, try and look at this from our point of view. I've asked if your ip's being correctly parsed form that file. you've said "sometimes". what am I supposed to gain from that? Is it the case that even when the ip is parsed correclty, the TCPSock is still opened to localhost?
<banister`sleep> nfk: it *has* to check both, it only skips (short-circuits) the second one if the first one is false, u got it the wrong way round
<apeiros> otherwise you can't tell whether a && b is true. you can only short-circuit AND on a false LHS
<canton7> nfk, true || 1.succ # => true
chrismhough has quit [Quit: chrismhough]
<apeiros> false && 1.succ # => false
<nfk> banister`sleep, in langauges where it's short circuited i expect it to return true as it would never execute the code on the right
<canton7> nfk, false && 1.succ # => false
<canton7> damn, beat me to it
<nfk> banister`sleep, uh?
<banister`sleep> nfk: no, you're just confusing && for ||
elektronaut has quit [Quit: ZNC - http://znc.in]
<eric_> This line right here
<eric_> to_server = TCPSocket.new(ip, (uri.port.nil? ? 80 : uri.port))
<nfk> no, i think i'm low on SAN points
baphled has joined #ruby
<eric_> I dont think its correct
bean__ has quit [Quit: Computer has gone to sleep.]
<nfk> banister`sleep, apeiros thank you
<canton7> nfk, your logic is backwards. if the left-hand side of `&&` is true, how are we supposed to know whether the expression is true without evaluating the right side?
<nfk> and canton7 too
<nfk> canton7, yeah, got it
<canton7> cools
<nfk> why do i make this mistake at least once a year for the past... forever?
karasawa has joined #ruby
<apeiros> nfk: write it down. put it on your wall.
<canton7> eric_, looks alright on its own to me. presuming the arguments are ok
<nfk> every time i have not done logic in a about a year, i always mix them up
<nfk> and it has been like that literally for years
nomenkun has joined #ruby
_br_ has joined #ruby
kayloos has joined #ruby
allsystemsarego has quit [Quit: Leaving]
<canton7> like most things logic, if you think them through, you can always get, logically, to the correct answer :P
tjbiddle has quit [Quit: tjbiddle]
<nfk> was there anything specific with breaking long statements in ruby?
<eric_> Basicly what it does is there is a url encoded in base64. The url parser decrypts the url, parses it and tries to connect to it. Needless to say it seems to work. When I use it as a proxy 127.0.0.1:8181 in firefox every url seems to redirect to 127.0.0.1
<nfk> like using \ in sh
_br_ has quit [Excess Flood]
<canton7> nfk, be careful ruby doesn't think that the expression's finished, since there's no semicolon. so end the line with an operator ('||' for example, or something else which obviously must have something following it), or use \
_br_ has joined #ruby
chrismcg is now known as zz_chrismcg
<nfk> canton7, i suppose && is a natural line break point
<nfk> chances of this breaking in 2.0?
<canton7> I doubt it. 2.0 doesn't change much
<eric_> canton7, no matter what url i do, ping.pong, ping.mc or dicks.mc they all are connecting to my webserver instead of the one on my vps
<nfk> canton7, also, i should probably indent the next line one level, right?
<canton7> nfk, that's up to you and your coding style. some people indent to after the if, some add an extra tab or two...
Guest67037 is now known as jalcine
jalcine has quit [Changing host]
jalcine has joined #ruby
blacktulip has quit [Remote host closed the connection]
<canton7> eric_, your webserver is localhost?
jalcine is now known as Jacky
elektronaut has joined #ruby
<eric_> yes
karasawa has quit [Ping timeout: 256 seconds]
<eric_> Then i have one on my vps as well
theRoUS has quit [Ping timeout: 246 seconds]
<canton7> tried that line just on its own, from irb or something?
sailias has joined #ruby
mneorr has quit [Remote host closed the connection]
<eric_> An wow
<eric_> And**
<eric_> It magically works
<eric_> That makes no sense
<eric_> at all
_br_ has quit [Excess Flood]
<canton7> so now you make damn sure the arguments passed to line 57 are correct, and that it *is* line 57 doing the connecting you're seeing, and not anything else
nomenkun has quit [Ping timeout: 246 seconds]
hackerdude has quit [Remote host closed the connection]
jeffreybaird has quit [Quit: jeffreybaird]
_br_ has joined #ruby
jsilver has quit [Ping timeout: 256 seconds]
jimeh has joined #ruby
hackerdude has joined #ruby
hackerdude has quit [Remote host closed the connection]
samuel02_ has joined #ruby
jsilver has joined #ruby
Jacky has quit [Ping timeout: 252 seconds]
<apeiros> interesting chunk size in that code (4048)
cantonic has joined #ruby
slainer68 has quit [Remote host closed the connection]
<apeiros> somebody probably misremembered 4KB
samuel02 has quit [Ping timeout: 252 seconds]
<Hanmac> apeiros sorry that i currect you, but its 4kiB
_br_ has quit [Excess Flood]
<apeiros> only in newspeak
jeffreybaird has joined #ruby
<apeiros> but if you want to correct me, then do it properly, KiB :-p
v0n has joined #ruby
RagingDave has quit [Read error: Operation timed out]
RagingDave has joined #ruby
<cirwin> 4048 is the perfect compromise
postmodern has joined #ruby
sailias has quit [Ping timeout: 245 seconds]
<atmosx> what is the diff between kiB and KiB ?
<atmosx> 4KB = 4 Kilobytes right?
Banistergalaxy has joined #ruby
<Hanmac> atmosx yeah and 1KB = 1000B and 1KiB = 1024B
<apeiros> atmosx: theoretically 4KB == 4000 bytes, historically it is used as 4096, though
<atmosx> oh didn't knew
<apeiros> the term kibbibyte (abbreviated as KiB) has been introduced to represent 1024
<atmosx> I thouth that 1KB was 1024 always
<apeiros> i.e., KB = *10^3, KiB = *2^10