baroquebobcat has quit [Ping timeout: 255 seconds]
angusiguess has joined #ruby
MattRB has joined #ruby
_nitti has joined #ruby
thomsch has joined #ruby
Spillrag has joined #ruby
Iszak has quit []
stopbit has joined #ruby
danshultz has joined #ruby
miskander has joined #ruby
asym_ has quit [Quit: Lost terminal]
mengu has quit [Quit: Leaving]
willob has joined #ruby
segv- has joined #ruby
segv- has quit [Client Quit]
danshultz has quit [Ping timeout: 244 seconds]
mneorr has quit [Remote host closed the connection]
poikon has joined #ruby
BulleTime has quit [Ping timeout: 256 seconds]
adeponte has quit [Remote host closed the connection]
willob has quit [Quit: Leaving.]
Virunga has joined #ruby
<beaky>
how do I apply a hash of substitutions to a string?
<beaky>
to sanitize my inputz
samphippen has joined #ruby
otters has joined #ruby
miskander has left #ruby [#ruby]
samphippen has quit [Client Quit]
cantonic has joined #ruby
RagingDave has quit [Quit: Ex-Chat]
cantonic_ has quit [Ping timeout: 276 seconds]
moted has quit [Remote host closed the connection]
_nitti has quit [Remote host closed the connection]
Takehiro has joined #ruby
beilabs has quit [Ping timeout: 256 seconds]
nfk has quit [Quit: yawn]
dougireton has quit [Quit: Leaving.]
<SirFunk>
Anyone here real familiar with FactoryGirl? My factories are spewing bunches of errors like: DEPRECATION WARNING: You're trying to create an attribute `author_id'. Writing arbitrary attributes on a model is deprecated. Please just use `attr_writer` etc.
thomsch has quit [Remote host closed the connection]
baphled has joined #ruby
moted has joined #ruby
justinabrahms has quit [Quit: Peace.]
MattRB has quit [Ping timeout: 252 seconds]
<Gate>
SirFunk: what do your factories look like?
<SirFunk>
let me gist, hang on
tvw has quit [Remote host closed the connection]
samuel02 has quit [Remote host closed the connection]
<SirFunk>
in those classes they both: belongs_to :author, :class_name => 'Refinery::User', :foreign_key => 'author_id', :readonly => true
<Gate>
hm, I presume the association exists on the model, I don't see why it would be a problem
<SirFunk>
yeah i think it has some kind of issue with the association being named different than the associated model?
<Gate>
I do that all the time, and I don't get messages like that
<SirFunk>
hmm.. with factory girl?
MattRB has joined #ruby
justinlilly has joined #ruby
<Gate>
yep
<ruzu>
anyone familiar with rspec know if you can execute a describe block of tests while sitting in irb?
samuel02 has quit [Ping timeout: 246 seconds]
postmodern has joined #ruby
MattRB has quit [Client Quit]
forced_request has quit [Remote host closed the connection]
c0rn has quit [Quit: Computer has gone to sleep.]
willob has joined #ruby
DatumDrop has joined #ruby
Targen has joined #ruby
lazyPower has joined #ruby
phinfonet has quit [Ping timeout: 260 seconds]
<Gate>
SirFunk: then again, I don't use the `association` helper much
<Gate>
maybe the problem is there?
apok has quit [Quit: apok]
jtgiri_ has quit [Quit: jtgiri_]
beilabs has joined #ruby
caleb_io has joined #ruby
DatumDrop has quit [Ping timeout: 256 seconds]
caleb_io has quit [Client Quit]
Bosox20051 has joined #ruby
ossareh has quit [Ping timeout: 245 seconds]
havenn has quit [Remote host closed the connection]
lazyPower has left #ruby [#ruby]
benlieb has quit [Quit: benlieb]
iamjarvo has left #ruby [#ruby]
kenneth has quit [Ping timeout: 252 seconds]
<SirFunk>
Gate: Perhaps, how do you do associations then? after_create or something?
MattRB has joined #ruby
moos3 has quit [Quit: Computer has gone to sleep.]
moos3 has joined #ruby
marr has quit [Ping timeout: 276 seconds]
wmoxam_ has joined #ruby
c0rn has joined #ruby
Xeago has joined #ruby
peregrine81 has joined #ruby
nwertman has quit [Ping timeout: 276 seconds]
gnarmis has quit [Remote host closed the connection]
<SirFunk>
Gate: my testing db schema may be whacked. That might be causing it, trying to rebuild now
benlieb has joined #ruby
banjara has quit [Quit: Leaving.]
<SirFunk>
Gate: I think that was the problem.. sheesh
<SirFunk>
i keep forgetting to re-setup my test db when I change machines :-P
megha has quit [Ping timeout: 248 seconds]
bier has quit [Read error: Operation timed out]
bier has joined #ruby
havenn has joined #ruby
BleakLife has joined #ruby
<BleakLife>
if i want to understand how a controller function has a params local variable, without it being in the function arguments, what should i start looking at?
wargasm has quit [Ping timeout: 256 seconds]
wargasm1 has joined #ruby
Kuifje has quit [Ping timeout: 256 seconds]
nat2610 has joined #ruby
emmanuelux has joined #ruby
robotmay has quit [Remote host closed the connection]
gnarmis has joined #ruby
breakingthings has joined #ruby
dougireton has joined #ruby
emmanuelux has quit [Remote host closed the connection]
<raz>
postmodern: yes, that looks also worthwhile (haven't tried it though). just rvm is.. well, i looked at it some and i understand when the maintainer said he's still finding code that he hasn't seen yet after a year or so ;)
vinax has joined #ruby
adeponte has quit [Remote host closed the connection]
<raz>
banister_: global and local seem extremely intuitive and useful to me, what's not to like?
rupee has quit [Quit: Leaving]
<banister_>
raz: it takes longer to type mainly, and i want global 99.9999% of the time
chrisramon has quit [Quit: chrisramon]
<raz>
banister_: that seems like a.. weird rationale
<raz>
fwiw, i want local most of the time :)
<banister_>
raz: no, i want my CLI to be short and snappy, if it takes time to type shit out, it feels awkward and annoying
<raz>
banister_: well, have you looked at the respective code-bases? might be an eye-opener
<banister_>
raz: it's a black box to me, i'm primarily interested in the CLI
<raz>
okay..
<banister_>
and im just saying the rbenv CLI i find more annoying
jinzhu has joined #ruby
<tlvb>
anybody know how to interface a postgres column with an 'inet' type from ruby?
<havenn>
i like chruby's globbing: chruby 1.9
<banister_>
havenn: cool, what does it do if u have multiple 1.9 versions installed?
willob has joined #ruby
<havenn>
banister_: first match
locriani has quit [Read error: Connection reset by peer]
locriani_ has joined #ruby
Virunga has quit [Remote host closed the connection]
c0rn has quit [Quit: Computer has gone to sleep.]
<raz>
hm yea, gonna give chruby a roll, it looks much saner than rbenv
aeontech has quit [Quit: aeontech]
slainer68 has quit [Remote host closed the connection]
JumpMast3r has joined #ruby
c0rn has joined #ruby
mattbl has quit [Quit: This computer has gone to sleep]
ckrailo has quit [Quit: Computer has gone to sleep.]
squidBits has quit [Quit: whoops]
MattRB has joined #ruby
<tlvb>
never mind, my bugs hailed from elsewhere
zeade has quit [Quit: Leaving.]
chrismhough has quit [Quit: chrismhough]
poikon has quit [Remote host closed the connection]
cconstantine has joined #ruby
bricker is now known as bricker`work
<cconstantine>
hey all. I want to run an external program (like, with `something`) and I want to capture the error that happens when the program is not found and give a helpful error message. How would I do that?
dqminh has joined #ruby
recycle has quit [Remote host closed the connection]
<havenn>
cconstantine: You can check if the command was successful, etc with $? global variable: $?.success? #=> true
<havenn>
cconstantine: $?.exitstatus
<cconstantine>
fantastic, thanks :)
Guest48531 has quit [Quit: ChatZilla 0.9.89 [Firefox 17.0.1/20121128204232]]
ahokaomaeha has quit [Ping timeout: 276 seconds]
<havenn>
cconstantine: No prob. Or if you don't like Perl-isms: require 'english'; $CHILD_STATUS == $?
<cconstantine>
hehe
fyolnish has joined #ruby
icole has quit [Remote host closed the connection]
charliesome has joined #ruby
Spooner has quit [Remote host closed the connection]
* Boohbah
loves perl-isms
<Boohbah>
$><<$<.read
ph^ has quit [Remote host closed the connection]
skcin7 has joined #ruby
Myconix has joined #ruby
mergoth has joined #ruby
banjara has joined #ruby
jduan1981 has quit [Ping timeout: 276 seconds]
hackerdude has quit [Remote host closed the connection]
recycle has joined #ruby
MattRB has quit [Quit: This computer has gone to sleep]
kiwnix has joined #ruby
markalanevans has quit [Read error: Operation timed out]
`brendan has joined #ruby
jtgiri_ has joined #ruby
dqminh has quit [Remote host closed the connection]
jtgiri_ has quit [Client Quit]
<benlieb>
require 'csv' and require 'CSV' both work. which should I use?
<benlieb>
I think I hit this issue once on a server that didn't like one or the other...
<benlieb>
can't remember which
kiwnix has quit [Client Quit]
brianpWins has joined #ruby
kiwnix has joined #ruby
generalissimo has quit [Remote host closed the connection]
locriani_ has quit [Remote host closed the connection]
danshultz has joined #ruby
slainer68 has joined #ruby
jtgiri_ has joined #ruby
<vetsin>
if i have a hash { :k1 => Proc.new { }, :k2 => 'static' } how do i make it so i can reference them in the same manner
<vetsin>
e.g. that the Proc is called automatially or some such
dqminh has joined #ruby
<havenn>
benlieb: Seems like it would be a very bad idea to sometimes use capitals. MRI has strange behavior when you mix and match case with requires.
<benlieb>
havenn: yeah i just found the answer on SO. I guess MacOs is case insensitive sometimes. I forgot which one was the good case
nat2610 has joined #ruby
danshultz has quit [Ping timeout: 256 seconds]
<banister_>
vetsin: you can't
<banister_>
vetsin: you could of course create your own object that behaves like that though
<beaky>
and they are written with triple quotes like ''' or """
<beaky>
ah ti seems ruby uses rdoc instead of docstrings
MattRB has quit [Client Quit]
h4mz1d has joined #ruby
ph^ has quit [Ping timeout: 256 seconds]
alvaro_o has quit [Quit: Ex-Chat]
nga4 has quit [Ping timeout: 245 seconds]
frogstarr78 has quit [Remote host closed the connection]
mmitchell has quit [Ping timeout: 256 seconds]
reset has joined #ruby
frogstarr78 has joined #ruby
frogstarr78 has quit [Client Quit]
pierre1 has joined #ruby
jblack_ has quit [Ping timeout: 256 seconds]
moos3 has joined #ruby
jbw has joined #ruby
vinax has quit [Ping timeout: 260 seconds]
joeycarmello has joined #ruby
fyolnish has quit [Remote host closed the connection]
recycle has quit [Remote host closed the connection]
MattRB has joined #ruby
banjara has quit [Quit: Leaving.]
gyre007 has joined #ruby
mafolz has quit [Ping timeout: 276 seconds]
mafolz has joined #ruby
cyberRodent has joined #ruby
gyre007 has quit [Read error: Connection reset by peer]
dagnachew has joined #ruby
gyre007 has joined #ruby
cakehero has quit [Quit: Computer has gone to sleep.]
brianpWins has quit [Quit: brianpWins]
gyre007 has quit [Read error: Connection reset by peer]
amh345 has quit [Quit: amh345]
gyre007 has joined #ruby
willob has joined #ruby
zph has quit [Quit: Computer has gone to sleep.]
gyre007 has quit [Read error: Connection reset by peer]
undersc0re97 has joined #ruby
gyre007 has joined #ruby
gyre007 has quit [Read error: Connection reset by peer]
ahokaomaeha has joined #ruby
gyre007 has joined #ruby
h4mz1d has quit [Ping timeout: 245 seconds]
dr_neek has joined #ruby
gyre007 has quit [Read error: Connection reset by peer]
gyre007 has joined #ruby
miso1337 has joined #ruby
daniel_- has quit [Ping timeout: 252 seconds]
miskander has joined #ruby
willob has quit [Ping timeout: 256 seconds]
gyre008 has joined #ruby
gyre007 has quit [Read error: Connection reset by peer]
gnarmis has quit [Remote host closed the connection]
angusiguess has quit [Ping timeout: 256 seconds]
gyre007 has joined #ruby
gyre008 has quit [Read error: Connection reset by peer]
undersc0re97 has quit [Quit: "The destruction of balance constitutes leaping forward and such destruction is better than balance. Imbalance and headache are good things." - Mao]
chrisramon has joined #ruby
Cooler_ has joined #ruby
reset has quit [Ping timeout: 245 seconds]
gyre008 has joined #ruby
gyre007 has quit [Read error: Connection reset by peer]
devdazed has quit [Quit: Computer has gone to sleep.]
jblack has joined #ruby
undersc0re97 has joined #ruby
tommyvyo has joined #ruby
peregrine81 has quit [Quit: Computer sleeping.]
gyre008 has quit [Read error: Connection reset by peer]
gyre007 has joined #ruby
Takehiro has joined #ruby
etcetera has quit []
gnarmis has joined #ruby
zph has joined #ruby
gyre008 has joined #ruby
gyre007 has quit [Read error: Connection reset by peer]
etcetera has joined #ruby
davidokn1r has joined #ruby
davidokn1r has left #ruby [#ruby]
cobragoat has quit [Quit: cobragoat]
gyre008 has quit [Read error: Connection reset by peer]
embs has joined #ruby
gyre007 has joined #ruby
embs_ has quit [Ping timeout: 248 seconds]
bricker`away is now known as bricker
main has quit [Ping timeout: 244 seconds]
gyre007 has quit [Read error: Connection reset by peer]
gyre007 has joined #ruby
Takehiro has quit [Ping timeout: 252 seconds]
davidokner has quit [Disconnected by services]
gyre007 has quit [Read error: Connection reset by peer]
gyre007 has joined #ruby
emocakes has quit [Quit: emocakes]
gyre008 has joined #ruby
gyre007 has quit [Read error: Connection reset by peer]
peregrine81 has joined #ruby
danshultz has joined #ruby
gyre008 has quit [Read error: Connection reset by peer]
sn0wb1rd has joined #ruby
gyre007 has joined #ruby
virtualentity has joined #ruby
gyre007 has quit [Read error: Connection reset by peer]
otters has quit [Ping timeout: 256 seconds]
wmoxam_ has quit [Ping timeout: 252 seconds]
gyre007 has joined #ruby
gyre008 has joined #ruby
gyre007 has quit [Read error: Connection reset by peer]
Chryson has quit [Quit: Leaving]
gyre008 has quit [Read error: Connection reset by peer]
danshultz has quit [Ping timeout: 256 seconds]
gyre007 has joined #ruby
slainer68 has joined #ruby
miso1337 has quit [Quit: afk]
embs has quit [Remote host closed the connection]
mercwithamouth has quit [Ping timeout: 252 seconds]
gyre007 has quit [Read error: Connection reset by peer]
gyre007 has joined #ruby
recycle has joined #ruby
voodoofish has quit [Quit: Leaving]
gyre007 has quit [Read error: Connection reset by peer]
gyre008 has joined #ruby
pac1 has quit [Quit: I got it one line of code at a time]
Nisstyre-laptop has joined #ruby
gyre008 has quit [Read error: Connection reset by peer]
<tjbiddle>
I know this is more of a #RubyOnRails question - But didn't get a response back. Anyone have any experience with the foreigner gem to create true foreign key constraints via activerecord?
gyre007 has joined #ruby
mercwithamouth has joined #ruby
slainer68 has quit [Ping timeout: 252 seconds]
gyre007 has quit [Read error: Connection reset by peer]
gyre008 has joined #ruby
jblack has quit [Ping timeout: 245 seconds]
gyre008 has quit [Read error: Connection reset by peer]
m_3 has quit [Remote host closed the connection]
gyre007 has joined #ruby
moos3 has quit [Quit: Computer has gone to sleep.]
gyre008 has joined #ruby
gyre007 has quit [Read error: Connection reset by peer]
Coolhand|laptop has quit [Ping timeout: 276 seconds]
otters has joined #ruby
gyre008 has quit [Read error: Connection reset by peer]
gnarmis has quit [Remote host closed the connection]
joeycarmello has joined #ruby
nari has joined #ruby
Solnse has quit [Client Quit]
Solnse has joined #ruby
<aces23up>
if i have a collection of the same types of objects, how can i compare them against each other to detect if certain instance variables are the same? ex they already exist in the collection?
joeycarmello has quit [Ping timeout: 257 seconds]
wargasm has joined #ruby
sepp2k has quit [Remote host closed the connection]
workmad3 has quit [Ping timeout: 256 seconds]
ryanf has joined #ruby
<OneWhoFrogs>
Could someone look over this DSL and tell me if it's hideous or not? I'm rather new to this and have no clue. https://gist.github.com/4640483
Rydefalk has quit [Read error: Connection reset by peer]
Rydefalk has joined #ruby
ahokaomaeha has quit [Quit: When I come back, please tell me in what new ways you have decided to be completely wrong.]
earthquake has quit [Quit: earthquake]
mrdtt has joined #ruby
coderhut has joined #ruby
JumpMast3r has joined #ruby
gnarmis has joined #ruby
ryanf has quit [Ping timeout: 245 seconds]
ananthakumaran has joined #ruby
wargasm has left #ruby [#ruby]
sbear has joined #ruby
guns has joined #ruby
ryanf has joined #ruby
jduan1981_ has joined #ruby
danshultz has joined #ruby
coderhut has quit [Quit: Page closed]
jduan1981 has quit [Read error: Connection reset by peer]
<epochwolf>
I see a whole bunch of nice little ipv4 addresses
locriani_ has joined #ruby
* epochwolf
snogs locriani_
<locriani_>
oh hai
locriani has quit [Read error: Connection reset by peer]
<epochwolf>
locriani_: hi
<locriani_>
wassup
locriani_ is now known as locriani
chussenot has joined #ruby
<epochwolf>
not much, just playing around with trying to embed sinatra into an irc bot
<epochwolf>
moderate success
m3pow has quit [Ping timeout: 276 seconds]
<Boohbah>
an irc bot that serves web pages?
<epochwolf>
Boohbah: why not?
beilabs has quit [Remote host closed the connection]
<epochwolf>
Boohbah: my goal is a web configuration screen. I could just throw in jruby and use a swing interface instead but I like being able to use stuff remotely.
danshultz has joined #ruby
<Boohbah>
neat
<dyeske>
ok I think I fixed it
<dyeske>
I like having dnssec turned on
<epochwolf>
dyeske: I don't bother. Anything critical goes in my hosts file.
dqminh has joined #ruby
<epochwolf>
google chrome uses certificate pinning on gmail so I don't really need to worry about dns interception
danshultz has quit [Ping timeout: 245 seconds]
Takehiro has joined #ruby
slainer68 has joined #ruby
chussenot has quit [Ping timeout: 256 seconds]
pootieta1g has quit [Ping timeout: 276 seconds]
chussenot has joined #ruby
slainer68 has quit [Ping timeout: 252 seconds]
Dreamer3 has quit [Ping timeout: 276 seconds]
chussenot_ has joined #ruby
samphippen has quit [Quit: Computer has gone to sleep.]
chussenot has quit [Ping timeout: 256 seconds]
chussenot_ is now known as chussenot
crackfu has quit [Remote host closed the connection]
<mercwithamouth>
can someone tell me what's going on ....http://pastie.org/5865672 when i see class << self
Dreamer3 has joined #ruby
crackfu has joined #ruby
markalanevans has joined #ruby
ph^ has joined #ruby
karupanerura has quit [Excess Flood]
answer_42 has quit [Remote host closed the connection]
chussenot has quit [Ping timeout: 256 seconds]
karupanerura has joined #ruby
crackfu has quit [Ping timeout: 255 seconds]
pierre1 has quit [Ping timeout: 244 seconds]
markalanevans has quit [Client Quit]
Dreamer3 has quit [Ping timeout: 252 seconds]
<mercwithamouth>
got it
answer_42 has joined #ruby
* epochwolf
claps
ph^ has quit [Ping timeout: 256 seconds]
joeycarmello has joined #ruby
Dreamer3 has joined #ruby
jrajav has quit [Quit: I tend to be neutral about apples]
<libryder>
guys
<libryder>
i want to thank you all
<libryder>
i know i don't help enough
<libryder>
but i got a new job working in pure ruby
<Hanmac1>
does it need rails? :P
Hanmac1 is now known as Hanmac
<libryder>
NO
chussenot has joined #ruby
<Hanmac>
cool
<libryder>
i just think this is a super cool community
chussenot has quit [Read error: Connection reset by peer]
kenneth has joined #ruby
mityaz has joined #ruby
<Hanmac>
i thought that your new job needs rails
<libryder>
no, just ruby
jduan1981 has quit [Quit: jduan1981]
<Boohbah>
ruby is way cooler than rails
gnarmis has quit [Remote host closed the connection]
tjbiddle has joined #ruby
* epochwolf
does rails
<libryder>
ruby is like calculus; rails is like chemistry
joeycarmello has quit [Remote host closed the connection]
tjbiddle has quit [Client Quit]
<epochwolf>
libryder: and rails 2 is old nitro that's been sitting on the top of the bookshelf for a little too long.
<Gate>
SirFunk: I just define them as `parent` instead of `association :parent`
Bosma has quit [Ping timeout: 256 seconds]
Bosma has joined #ruby
EPIK has quit [Ping timeout: 244 seconds]
tjbiddle has joined #ruby
freeayu has joined #ruby
heftig has quit [Ping timeout: 245 seconds]
arya has joined #ruby
samphippen has joined #ruby
chussenot has joined #ruby
bondar has joined #ruby
bondar has quit [Client Quit]
angusiguess has quit [Ping timeout: 256 seconds]
andrewhl has quit [Remote host closed the connection]
heftig has joined #ruby
arya has quit [Ping timeout: 248 seconds]
chussenot has quit [Ping timeout: 276 seconds]
arya has joined #ruby
chussenot has joined #ruby
angusiguess has joined #ruby
Nuck has quit [Quit: Nuck Off]
thufir_ has joined #ruby
sayan has quit [Read error: Connection reset by peer]
answer_42 has quit [Remote host closed the connection]
etcetera has joined #ruby
Jackneill has joined #ruby
chussenot has quit [Ping timeout: 245 seconds]
answer_42 has joined #ruby
chussenot has joined #ruby
etcetera has quit [Client Quit]
preller_ has quit [Client Quit]
angusiguess has joined #ruby
Bosox20051 has quit [Remote host closed the connection]
chussenot__ has quit [Ping timeout: 276 seconds]
braoru has quit [Ping timeout: 255 seconds]
ph^ has joined #ruby
toekutr has quit [Read error: Connection reset by peer]
chussenot has quit [Ping timeout: 276 seconds]
<ruzu>
is "origin" always the default git remote? ie, if you don't have anything called "origin" but randomly later on one is added, will it be the automagic default?
<wf2f>
software engineering ebook, anyone have?
<ruzu>
wf2f, could you be even less specific?
thufir_ has quit [Remote host closed the connection]
wallerdev has quit [Quit: wallerdev]
ph^ has quit [Ping timeout: 256 seconds]
sayan has joined #ruby
atmosx has joined #ruby
srinivas has quit [Ping timeout: 240 seconds]
samuel02 has joined #ruby
guns has quit [Quit: guns]
chussenot has joined #ruby
mercwithamouth has quit [Ping timeout: 256 seconds]
braoru has joined #ruby
Xeago has joined #ruby
srinivas has joined #ruby
maletor has joined #ruby
jaequery has quit [Quit: Computer has gone to sleep.]
sent-hil has joined #ruby
sent-hil is now known as Guest18867
sporkbomb has quit [Read error: Connection reset by peer]
sayan has quit [Quit: Leaving]
sayan has joined #ruby
sayan has quit [Changing host]
sayan has joined #ruby
sporkbomb has joined #ruby
earthquake has quit [Quit: earthquake]
__BigO__ has joined #ruby
chussenot has quit [Ping timeout: 244 seconds]
vlad_starkov has joined #ruby
danktamagachi has quit [Ping timeout: 240 seconds]
chimmy has joined #ruby
suf has joined #ruby
marr has joined #ruby
mergoth has quit [Read error: Connection reset by peer]
mergoth has joined #ruby
jgrevich has quit [Remote host closed the connection]
mockra has quit [Remote host closed the connection]
jimeh has joined #ruby
gnarmis has joined #ruby
joeycarmello has joined #ruby
joeycarmello has quit [Ping timeout: 245 seconds]
vlad_starkov has quit [Read error: Connection reset by peer]
<shevy>
kans ok. dann könnten wir ja beinahe deutsche schreiben so wie Hanmac hier, aber die anderen würden das nit verstehen, also let's continue to speak in english
Nisstyre-laptop has quit [Ping timeout: 252 seconds]
<kans>
shevy :D tht wud be better :D
Beoran_ has quit [Ping timeout: 255 seconds]
Hanmac has quit [Remote host closed the connection]
mockra has quit [Ping timeout: 276 seconds]
Hanmac has joined #ruby
<stayarrr>
Hello all
<shevy>
hi stayarrrrrrrrrh the pirate
arietis has quit [Quit: Computer has gone to sleep.]
samphippen has quit [Ping timeout: 252 seconds]
<stayarrr>
ahoi ;)
<Boohbah>
was?
<shevy>
what was
<Boohbah>
i was speaking german
daniel_- has joined #ruby
<shevy>
aaah
danshultz has joined #ruby
<shevy>
true
<stayarrr>
I had a "strange" behavior on windows yesterday with the system() call on a .bat file
samphippen has joined #ruby
osaut has quit [Quit: osaut]
<stayarrr>
the bat file works if I run it in cmd
colonolGron has joined #ruby
<stayarrr>
but if I call it from ruby
Xeago has quit [Remote host closed the connection]
<stayarrr>
nothing happens
<stayarrr>
anybody ran into such a problem in the past?
<shevy>
how do you invoke it
<shevy>
and did you try ./ too
<stayarrr>
system("C:\\path\\to\\bat")
<stayarrr>
oh man smilies...
<shevy>
hehe
<stayarrr>
no I did not tried it ./
browndawg has quit [Ping timeout: 256 seconds]
danshultz has quit [Ping timeout: 255 seconds]
arturaz has joined #ruby
vlad_sta_ has joined #ruby
<stayarrr>
I read about open3 - could this help?
<stayarrr>
I have no windows machine here, so I can try it when I am back at work
<shevy>
stayarrr hmm
browndawg has joined #ruby
<shevy>
what I know is that on linux, calling an executable via system() works fine
<shevy>
stayarrr, other commands work well? like system('dir')
Nuck has joined #ruby
<stayarrr>
shevy, yes I had another one for testing which reboots the system and this one works fine
miso1337 has quit [Quit: afk]
vlad_starkov has quit [Ping timeout: 245 seconds]
<shevy>
hmmmm
<stayarrr>
the script which doesen`t work is no one liner
<stayarrr>
Its my first ruby in the windows world, so I am not sure
<shevy>
wait
<shevy>
could you not write a ruby script instead?
<stayarrr>
the bat file switches between two applications
<stayarrr>
it kills one and starts the other
Hanmac has quit [Quit: Leaving.]
arietis has joined #ruby
<stayarrr>
I am not sure I can achive this in ruby?!
osaut has joined #ruby
<shevy>
aha
<shevy>
not sure myself either hmm
cableray has quit [Quit: cableray]
<stayarrr>
I never had this on unix machines xD
Takehiro has quit [Remote host closed the connection]
<Mon_Ouie>
exec allows you to do that (I'm not sure if it works on Windows though)
<Mon_Ouie>
Oh, not really what you meant, sorry
emocakes has quit [Quit: emocakes]
Neomex has joined #ruby
ph^ has joined #ruby
<stayarrr>
Mon_Ouie: thx for the hint, no problem - thankful for everything. :)
noxoc has joined #ruby
Hanmac has joined #ruby
TheFuzzball has joined #ruby
<Mon_Ouie>
If you put an echo (or whatever the bat equivalent is) in the script, does it appear on the screen?
<stayarrr>
Mon_Ouie no
ph^ has quit [Ping timeout: 256 seconds]
cobragoat has joined #ruby
maletor has quit [Quit: Computer has gone to sleep.]
jean-louis has joined #ruby
slainer68 has joined #ruby
<beaky>
what is the difference between 1..10 and (1..10)
dqminh has joined #ruby
banisterfiend has quit [Remote host closed the connection]
samphippen has quit [Ping timeout: 244 seconds]
<atmosx>
beaky: in what context?
arya has quit [Ping timeout: 248 seconds]
<beaky>
in something like 1..10.each {|x| print x}
samphippen has joined #ruby
<atmosx>
beaky: does it work for you?
<atmosx>
beaky: fire up 'irb' and try it
<beaky>
doesn't work :(
arietis has quit [Quit: Computer has gone to sleep.]
<beaky>
but (1..10) works :D
<atmosx>
while (1..10) works
<atmosx>
see? :D
<beaky>
ah
<beaky>
so that is the only difference?
<Mon_Ouie>
Parens are just there for precedence
techlife has quit [Ping timeout: 276 seconds]
<Mon_Ouie>
That's like the difference between 1 + 3 * 4 and (1 + 3) * 4
<beaky>
ah
<beaky>
so ruby is like smalltalk in that everything is left-associative by default?
arya has joined #ruby
Xeago has joined #ruby
<shevy>
beaky suppose so
<shevy>
(1..10).class # => Range
BrianJ has quit [Quit: Computer has gone to sleep.]
<shevy>
with 1..10.class I suppose you try to do something differnet
<Mon_Ouie>
Not everything. 3 ** 2 ** 3 is 3 ** (2 ** 3)
<beaky>
ah
<shevy>
beaky but that is normal math calculation or? * has precedence over +
louisror has quit [Ping timeout: 246 seconds]
emocakes has joined #ruby
<beaky>
right
<beaky>
thought ruby went the smalltalk route where it was like that :D
m8 has joined #ruby
biello has quit [Remote host closed the connection]
<shevy>
I think ruby picked mostly just the message system from smalltalk
<shevy>
like object.send :foo
Xeago has quit [Remote host closed the connection]
spider-mario has joined #ruby
<beaky>
ah
<beaky>
also the 'everything is an object' idea, blocks, and maybe some other stuff
cableray has joined #ruby
banisterfiend has joined #ruby
<shevy>
good call
<shevy>
I forgot about blocks
<shevy>
they make methods more flexible
gregor3005 has joined #ruby
zigomir has joined #ruby
<gregor3005>
hi, i tried some examples from the ruby book i currently read and i have some problems with the following class: http://fpaste.org/oqbP/
<gregor3005>
when i run it i get: person.rb:15:in `<main>': undefined method `get_name' for "Joe":String (NoMethodError)
arturaz has quit [Ping timeout: 255 seconds]
<gregor3005>
why? :-)
<shevy>
because you have a string
<shevy>
you wanted class Person object instead
<shevy>
you should change this to joe = Person.new('joe')
<shevy>
and then you can call joe.get_name
<shevy>
because then you have a class person object instance, rather than a string
<shevy>
joe = Person.new.set_name("Joe") <-- with this, joe is a string.
<shevy>
and string objects do not have a .get_name method by default
<gregor3005>
ah thx
<shevy>
you could add def initialize to your clas
<gregor3005>
i didn't see it because of the automatically return values from ruby
<shevy>
def initialize(i); set_name(i); end
<beaky>
does ruby have operator overloading?
<shevy>
beaky yeah, everything in ruby is by default always open and amenable to modifications (which some people hate)
<banisterfiend>
beaky: Yes
<shevy>
gregor3005, yeah. but you can use explicit return too :-)
<gregor3005>
on java i looked always for void methods and methods with return value
<shevy>
use return! like return @name, ruby people tend to prefer succinct code though and thus omit it usually
<beaky>
ruby code is like poetry
<shevy>
it can be
<shevy>
it can also be ugly :(
<gregor3005>
:-)
nicoulaj has joined #ruby
<shevy>
it really shows that ruby is perl's daughter
<shevy>
if she is quiet and smile, she is beautiful
<shevy>
if she opens her mouth too much, it's awful...
<gregor3005>
lol
ph^ has joined #ruby
Guedes0 has joined #ruby
Guedes has quit [Disconnected by services]
Guedes0 is now known as Guedes
Guedes has quit [Changing host]
Guedes has joined #ruby
Guedes0 has joined #ruby
whowantstolivefo has quit [Quit: who wants to live forever ?]
danshultz has joined #ruby
<didge>
lol
Strum has joined #ruby
<Mon_Ouie>
gregor3005: Btw, the naming convention in Ruby is to use name instead of get_name and name= instead of set_name
<Strum>
hi
<Mon_Ouie>
(So you can do something.name = foo)
mrdtt has quit [Read error: Connection reset by peer]
<gregor3005>
thx for that hint
RagingDave has joined #ruby
<gregor3005>
i read it currently in the book
<shevy>
hehe
baphled has quit [Ping timeout: 256 seconds]
<shevy>
you guys should look at the old ruby-fpdf... it does not only have set_foo, it uses SetFoo ... SetCompression() for instance, sets a @compression variable
spire has joined #ruby
Kuifje has joined #ruby
Virunga has joined #ruby
main has joined #ruby
mrdtt has joined #ruby
Takehiro has joined #ruby
danshultz has quit [Ping timeout: 276 seconds]
French has joined #ruby
blacktulip has joined #ruby
shock_one has joined #ruby
Jackneill has quit [Read error: Connection reset by peer]
eka has joined #ruby
BulleTime has joined #ruby
kylescottmcgill has joined #ruby
<kylescottmcgill>
Whats the function to find out what type a variable is? instance of ??
<Mon_Ouie>
object.class
angusiguess has quit [Ping timeout: 256 seconds]
<kylescottmcgill>
thank you
<Mon_Ouie>
Notice Ruby doesn't really have types, and the class is a propriety of an object, not a variable
<Mon_Ouie>
(a variable is a reference towards an object)
<kylescottmcgill>
Thanks, im glad you knew what i ment :D
cableray has quit [Quit: cableray]
arya has quit [Ping timeout: 248 seconds]
arya has joined #ruby
miso1337 has joined #ruby
robotmay has joined #ruby
French has quit [Remote host closed the connection]
dcwu has quit [Quit: Leaving.]
mergoth has quit [Quit: Lost terminal]
F1skr has joined #ruby
eka has quit [Quit: Computer has gone to sleep.]
mengu has joined #ruby
sayan has quit [Ping timeout: 256 seconds]
banisterfiend has quit [Remote host closed the connection]
pac1 has joined #ruby
banisterfiend has joined #ruby
angusiguess has joined #ruby
motto has joined #ruby
robert__ is now known as robert_
osaut has quit [Quit: osaut]
motto has quit [Client Quit]
arya has quit [Ping timeout: 248 seconds]
nari has quit [Ping timeout: 256 seconds]
<spire>
hey, how do you keep a ruby script open when you run it in the command prompt
Banistergalaxy has joined #ruby
passbe has quit [Ping timeout: 264 seconds]
<spire>
it automatically closes when it finishes
<kylescottmcgill>
is this for an ongoing job?
<spire>
yea
<kylescottmcgill>
wouldnt it be better to use a cron job or something?
<kylescottmcgill>
wait, windows?
<spire>
yes
<spire>
i have no ruby experience hwatsoever
<kylescottmcgill>
o/ good luck!
<spire>
but it looks awesome
<spire>
cant wait to get started with it
<spire>
and thank you
angusiguess has quit [Ping timeout: 255 seconds]
<spire>
so how would i keep the window open
arya has joined #ruby
<kylescottmcgill>
someone else will be able to help with the command prompt thing, but generally, if its a script that is going to keep running you would either wait for user input or you would be polling something to see if its changed, by nature this should keep the script open, but in practise there may some little trick you need to use
banisterfiend has quit [Remote host closed the connection]
[rust] has quit [Quit: Leaving]
<spire>
ok, so ill make it wait for user input
<kylescottmcgill>
like for example, useing a timeout, then check whatever your doing again to see if there is any changes
<spire>
thank you
<kylescottmcgill>
no problem
osaut has joined #ruby
emmanuelux has joined #ruby
<spire>
i just used a variable input
<spire>
works fine :)
arya has quit [Ping timeout: 248 seconds]
nfk has joined #ruby
<shock_one>
spire, STDIN.getc
kans has quit [Ping timeout: 244 seconds]
sbear has joined #ruby
pmacydna has joined #ruby
danshultz has joined #ruby
arya has joined #ruby
<spire>
<shock_one>: thanks. simpler than the way im doing it
<Mon_Ouie>
In that case putting the main thread to sleep sounds simpler (or cleaner)
<Mon_Ouie>
That is, just sleep
robotmay has quit [Ping timeout: 255 seconds]
cobragoat has quit [Quit: cobragoat]
<spire>
ok
Tux-Tn has quit [Changing host]
Tux-Tn has joined #ruby
<spire>
but ill only be doing simple stuff for now
<spire>
whilst i learn ruby
cobragoat has joined #ruby
bluOxigen has joined #ruby
danshultz has quit [Ping timeout: 256 seconds]
passbe has joined #ruby
blaxter has joined #ruby
pmacydna has quit [Quit: pmacydna]
dqminh has quit [Remote host closed the connection]
rooftopjoe has joined #ruby
robotmay has joined #ruby
Virunga has quit [Remote host closed the connection]
<rooftopjoe>
hi. i just began ruby. i am taking a quiz for homework but i want to make sure i get things right
mrdtt has quit [Remote host closed the connection]
<rooftopjoe>
if not, what did i do wrong and why? thanks
noxoc has quit [Read error: Connection reset by peer]
pmacydna has joined #ruby
noxoc has joined #ruby
guns has joined #ruby
xemu has joined #ruby
kylescottmcgill has quit [Ping timeout: 256 seconds]
colonolGron has quit [Ping timeout: 240 seconds]
<shock_one>
rooftopjoe, «a» could be a class, but it's convenient to start class names with uppercase letter.
<rooftopjoe>
shock_one: if a is a class how would one call a method, though?
<Banistergalaxy>
Shock_one class name must be constant
<rooftopjoe>
isn't a class a type?
<shock_one>
What's wrong with calling a method on a class. Classes are objects, right?
<shock_one>
Banistergalaxy, «a» can be a constant
<Mon_Ouie>
No it can't
<shock_one>
rooftopjoe, it's synonyms I guess
<Banistergalaxy>
Shock no
<Mon_Ouie>
Const names *must* start with a capital letter
<shock_one>
You are right.
<rooftopjoe>
so i was correct to tick #3 because classes are objects as well?
<rooftopjoe>
this is my current understanding
<rooftopjoe>
although it is different than other languages i know
<Mon_Ouie>
No, a can still be a reference to a class, e.g. a = String
<Mon_Ouie>
And it can still respond to the foo method
mrdtt has joined #ruby
megha has quit [Quit: WeeChat 0.4.0]
<rooftopjoe>
i am confused. should i tick #3 or not? :D
<rooftopjoe>
you said "No" now
<shock_one>
Mon_Ouie, uncheck it.
<Mon_Ouie>
I can't, I don't have access to the quiz :(
<rooftopjoe>
different people are telling me different things on different channels
<rooftopjoe>
sigh
<rooftopjoe>
i just want to know what the hell is going on
kylescottmcgill has joined #ruby
<Banistergalaxy>
Rooftopjoe edx course?
tatsuya_o has joined #ruby
<rooftopjoe>
yes
<rooftopjoe>
i will look into a ruby book and clear this all up
<rooftopjoe>
ty
shock_one has quit [Remote host closed the connection]
mrdtt has quit [Read error: Connection reset by peer]
shock_one has joined #ruby
razibog has joined #ruby
robotmay has quit [Read error: No route to host]
robotmay has joined #ruby
Zenger has joined #ruby
<Zenger>
Hi guys, I'm trying to run rake db:migrate, but I keep getting a bunch of errors, here is a screenshot http://i.imgur.com/veH1Hkl.png . could someone guide me to fix this error ?
<shock_one>
>> class Bar; def self.foo; puts "A foo method on the class itself"; end; end; a = Bar; a.foo
<eval-in>
shock_one: Output: "A foo method on the class itself\n" (http://eval.in/7582)
colonolGron has joined #ruby
<shock_one>
Zenger, The error is in Rakefile, line 8. Change rake/rdoctask to rdoc/task
Virunga has joined #ruby
<Zenger>
shock_one: just notice that all those were notices. Yup that fixed it. Thanks
kylescottmcgill has quit [Ping timeout: 244 seconds]
clooth has joined #ruby
dqminh has joined #ruby
tk_ has joined #ruby
Zenger has quit [Quit: Page closed]
arietis has joined #ruby
angusiguess has joined #ruby
TomyLobo has joined #ruby
coder_neo has quit [Ping timeout: 256 seconds]
<spire>
how do you make a function return its output on a new line
osaut has quit [Quit: osaut]
<shock_one>
spire, prepend \n to the string
kans has joined #ruby
<gregor3005>
spire: i'm new to ruby but you ever read a book about it?
<gregor3005>
:-)
Targen has joined #ruby
robotmay has quit [Remote host closed the connection]
<rooftopjoe>
can i redefine a public method for an instantiated object?
<rooftopjoe>
(imo, that would be a bad language feature)
<whitequark>
rooftopjoe: class << obj; def meth; end; end
arya has quit [Ping timeout: 248 seconds]
rezzack has quit [Quit: Leaving.]
<shock_one>
rooftopjoe, yes. def object.methot
<rooftopjoe>
seems horrible. is this useful in practice?
<whitequark>
mocking
<whitequark>
ruby won't prevent you from doing *anything*, this is a design choice.
<whitequark>
just like Obj-C and C++ and Python, which all feature similar hacks
<shock_one>
You can even call private methods from outside if you want your friends programmers stop talking to you.
<spire>
<gregor3005> yes, ive been reading for the last 6 hours
<rooftopjoe>
yes but don't such design choices cause people to write code that is harder to write (because other people might break it in ways you do not expect) and harder to read (because it makes it easy to shoot one's self in the foot)
<whitequark>
rooftopjoe: if people want to write bad code, they will.
<spire>
and thank you shock_one
<rooftopjoe>
oh well :( i don't have to like it, i guess
kennyvb has quit [Ping timeout: 252 seconds]
<whitequark>
real-world applications require these kinds of hacks anyway. just like safe sandboxed Java has unsafe instructions deep inside
<gregor3005>
noob question: sry for that question but i did't find the right chapter my book for that question. which naming conventions are used for class files. eg the class is Publication (with uppercase starting char) and how should the file be named? publication.rb or Pulication.rb ? (sry i'm from the java island)
<gregor3005>
spire: good to hear, which book do you prefer?
<whitequark>
rooftopjoe: well, in this particular case you could avoid doing that by using Dependency Injection
<spire>
started off with that
<whitequark>
rooftopjoe: but that is hardly a better solution.
Takehiro has quit [Remote host closed the connection]
<spire>
and ruby looks so awesome
x0F has quit [Disconnected by services]
x0F_ has joined #ruby
French has joined #ruby
<shock_one>
gregor3005, lowercase.
<rooftopjoe>
whitequark: i will look into this stuff. this is my first contact with ruby
x0F_ is now known as x0F
<gregor3005>
shock_one: hm i tought that would be the answer :-( thx
<Banistergalaxy>
Rooftopjoe you're not really in a position to evaluate something until you've used it for a while
<shock_one>
gregor3005, take a look at STL
kylescottmcgill has joined #ruby
<gregor3005>
shock_one: what is STL?
<gregor3005>
(standard lib) ?
<shock_one>
gregor3005, Yes.
<gregor3005>
ah :-) tata
<shock_one>
gregor3005, Are you switching or just learning another language?
<rooftopjoe>
Banistergalaxy: sure. on the other hand, i do have more than just a basic understanding of software development and programming languages in general so i have a "feeling" about things that tend to work. that doesn't mean i'm always right but it's not a random thing i blurted out
<gregor3005>
spire: thx to that link, the comics are nice :-) but a little page
kennyvb has joined #ruby
angusiguess has quit [Ping timeout: 256 seconds]
<gregor3005>
shock_one: i learn another language because it is currently semester vacations on my university and i have no more exams
<gregor3005>
i used java the last 8 years as my main language
<shock_one>
rooftopjoe, It's often mentioned in ruby community that ruby is object oriented and other languages are class oriented.
pskosinski has joined #ruby
shorts has quit [Quit: shorts]
<spire>
<gregor3005> no problem. I found it a very good introduction
<gregor3005>
shock_one: i see that eclipse are not interesed in that naming convention. when i create a new ruby class it create a file started with upper case
<shock_one>
gregor3005, Do you like ruby syntax? I especially like things like 5.times do ... end
jfl0wers has quit [Quit: jfl0wers]
<shevy>
shock_one why not 5.times {}
<Banistergalaxy>
Rooftopjoe it's
<gregor3005>
shock_one: the synatx is nice but and looks very open rather than java you have to tell the compiler every word
<spire>
personally i love the ruby syntax
<gregor3005>
but that open syntax is needs getting used
<shock_one>
gregor3005, like public static void? :)
<shevy>
gregor3005 but there are not many words, and you can avoid many things
<spire>
it almost reads like english
<gregor3005>
yes this was my first big problem :-)
<shevy>
gregor3005, "def foo" that's terse
<shock_one>
gregor3005, why not Scala?
danshultz has joined #ruby
<gregor3005>
spire: thats normal for programming language
<Banistergalaxy>
Rooftopjoe it's extremely hard to see the consequences of a design choice, you really need to use it in anger before you can see all ramifications
<kylescottmcgill>
Anyone here epic with Regex?
<gregor3005>
the setter and getter attr_ are nice
<spire>
yes but compared to C it reads alot easier
banisterfiend has joined #ruby
jean-louis has quit [Ping timeout: 252 seconds]
jenrzzz has quit [Ping timeout: 255 seconds]
robotmay has joined #ruby
<gregor3005>
spire: thats true. the syntax is easy to read like a book but not so directly like a law-text (java) :-D
<gregor3005>
(i hope i translated that right, not to misunderstood)
<spire>
yea, ive never really liked java. But i havent gone very far in to it though
<Mon_Ouie>
I'm glad I won't have to deal with it for a long time (if ever) now :)
<spire>
haha
<spire>
i wanted to get into android development
<spire>
but then i relized it was in java
<Mon_Ouie>
I think there are a few other languages available. I don't know how practical they are, though.
<gregor3005>
at my university java is the main language mabye 95% you have to use it. it is very mature with all its beside projects for testing build and so on
danshultz has quit [Ping timeout: 245 seconds]
<gregor3005>
now i try to use the learned skills with ruby
banisterfiend has quit [Ping timeout: 244 seconds]
<spire>
yes, java is commonly taught everywhere
<spire>
personally i would teach ruby
<spire>
its simpler
<gregor3005>
spire: good object. is it possible to use ruby on android?
<shock_one>
spire, a lot of universities teach python.
<gregor3005>
never research that
<spire>
yea
<spire>
ive never looked at it though
<shevy>
gregor3005 hey where are you studying at? :D
<spire>
there would be nothing i would use it for
<gregor3005>
shock_one: i also heard that some have to write junk in .net *lol*
Takehiro has joined #ruby
<gregor3005>
shevy: technical university of vienna, and you?
<whitequark>
ruby? teach scheme instead.
<shevy>
gregor3005 same, but I study technical chemistry
<whitequark>
(well, for CS courses at least)
rdark has joined #ruby
arturaz has joined #ruby
<shock_one>
whitequark, they switched to python in SICP in berkley
<gregor3005>
shevy: nice, it is hard? (sound hard) i study software engineering
<whitequark>
shock_one: and there's nothing good in that
<shevy>
gregor3005 yeah, it is extremely math heavy and I dont like math. the chemistry stuff is ok though, hard but also challenging
tatsuya_o has quit [Remote host closed the connection]
<shock_one>
whitequark, I agree, but don't you think the original SICP course was a little hard for introductory course?
<spire>
gregor3005: yes apperently you can get ruby to work on android, which is awesome. Think i might try that once i get abit better at ruby.
<whitequark>
shock_one: as a CS one? nope, I find it pretty manageable
mrdtt has joined #ruby
tvw has joined #ruby
vlad_sta_ has quit [Remote host closed the connection]
<whitequark>
shock_one: that being said, it *might* be hard for people who never programmed before. but why do they go to CS then.
<shevy>
gregor3005 using one scripting language is always useful, you can continue to use java 95% of the time, and use ruby scripts just for small tasks
<gregor3005>
spire: when i finish the ruby book i goning forward to rails and then i write a tool for my companie i worked the lase 8 years that i would firstly write in java. that was my idea
<spire>
yea, i want to try out rails aswell
<gregor3005>
shevy: i have many small task that i solved in the past with bash script. maybe i can replace them with ruby
<spire>
ive had enough of drupal
<shevy>
yeah I did that
braoru has quit [Ping timeout: 244 seconds]
<shevy>
gregor3005 you can store methods in .rb files, which then can be used similar in spirit of .sh scripts. the way I call them is via aliases, in that main file
Liothen has joined #ruby
Liothen has quit [Changing host]
Liothen has joined #ruby
noxoc has quit [Quit: noxoc]
<shevy>
alias allbz2='tree | grep bz2'
<shevy>
tree is a ruby script I use to display a simple, coloured ascii tree.
blueOxigen has joined #ruby
<shevy>
hmm not a good example
<gregor3005>
:-)
<shevy>
"ruby -r main_file_here.rb -e"
<shevy>
via -e you invoke the method that comes afterwards
<shevy>
so I then have an alias called "iruby", which installs all the addons I need when I use ruby
<whitequark>
shock_one: btw, racket is quite good as a first ever programming language, in fact, with its IDE, nice docs and tutorials.
<shevy>
"iruby" which is short for install_ruby, it has nothing to do with any company :P
<whitequark>
shock_one: you don't *have* to start with SICP.
clooth has quit [Quit: clooth]
bluOxigen has quit [Ping timeout: 256 seconds]
<gregor3005>
"iruby" the new phone for everyone :-D
banisterfiend has joined #ruby
pmacydna has quit [Quit: pmacydna]
dess has joined #ruby
<shock_one>
whitequark, I dropped at the exercise, where you have to calculate fibonacci numbers in O(log n) time.
<shock_one>
whitequark, Still don't know hot to do that :)
<banisterfiend>
rooftopjoe: for example, one benefit of being able to redefine methods on the fly is that it supports an entirely different smalltalk-like style of development, where you develop the application as it's actually running. This includes fixing bugs that arise (an exception is thrown, you're dropped into the context of the exception, fix it, continue the program with the fix applied) or even adding new features as yo
<banisterfiend>
u want
<rooftopjoe>
i didn't think of it that way
<rooftopjoe>
good analogy
<shock_one>
banisterfiend, it's also very easy to make wrappers with monkey patching
sleetdrop has joined #ruby
<rooftopjoe>
anyone good at regexp have any idea about my last question? :) it's the only one idk how to solve http://i.imgur.com/VEO2Y8w.jpg
<shock_one>
Or enhance methods, like make «render» from rails respond to :pdf argument
<banisterfiend>
rooftopjoe: do you know about irb/pry ?
<banisterfiend>
rooftopjoe: you can test stuff out in there
<rooftopjoe>
i know. i should probably install a ruby interpreter
<shevy>
hehehe
osaut has joined #ruby
<banisterfiend>
rooftopjoe: you didnt install their VM?
<gregor3005>
:-) you haven't installed ruby?
<shock_one>
rooftopjoe, why don't you try it in the interpreter? It would be more useful for you
<banisterfiend>
rooftopjoe: well the programming assignment is due in 1-2 days time as well :)
<banisterfiend>
rooftopjoe: so u better get onto that
yshh has joined #ruby
ananthakumaran1 has joined #ruby
ananthakumaran has quit [Read error: Connection reset by peer]
<rooftopjoe>
it's due on the 27th and it's the 26th and i only got to watch a few lectures but didn't catch up yet
<rooftopjoe>
i was able to solve the rest however
clooth has joined #ruby
<rooftopjoe>
by googling and finding out stuff
<rooftopjoe>
and did moderately at the homework assignment ^_^
<banisterfiend>
rooftopjoe: you finished the coding assignment already?
<gregor3005>
question to anonymous classes: i found the following example http://fpaste.org/JSnh/
<gregor3005>
ruby said that the method say_hello is undefined, why?
<rooftopjoe>
whitequark: the designer's name is as elegant as the language... lol
<banisterfiend>
gregor3005: because you deifned a *class*
<banisterfiend>
gregor3005: in order to invoke that instance method u have to create an instance of that class
<yxhuvud>
gravity: beecause the instance variables in controllers are extracted and are available in the views as well.
<yxhuvud>
I don't think that would be possible to do with locals.
<banisterfiend>
gregor3005: c.new.say_hello
<gregor3005>
sure, thx
<gregor3005>
sry, thx
<gravity_>
oh, hm, that gives me lots more to think about. Thanks yxhuvud
ffranz has quit [Quit: Leaving]
Tux-Tn has quit [Disconnected by services]
Tux-Tn_ has joined #ruby
Tux-Tn_ has quit [Read error: Connection reset by peer]
miso1337 has quit [Quit: afk]
<banisterfiend>
yxhuvud: how does it keep them in sync?
<Mon_Ouie>
To extract local variables you need a binding. You can get one either explicitely or through a block.
<banisterfiend>
yxhuvud: because u just access the ivars via the accessor methods?
hamed_r has quit [Quit: Leaving]
<banisterfiend>
Mon_Ouie: explicitly*
<banisterfiend>
:D
<Mon_Ouie>
I always forget that. 'definitely' must be confusing me (even though I know it's just the 'e' from the adjective form).
<yxhuvud>
banister: well, controllers don't use accessor methods. Dunno really, I havn't looked into hte exact mechanism. I just know everything I define as an ivar exists in the view as well
m8 has quit [Quit: Sto andando via]
m8 has joined #ruby
atmosx has quit [Quit: And so the story goes…]
<yxhuvud>
(or rather, most ivars extracted to the views don't)
rakl has quit [Quit: sleeping]
<Banistergalaxy>
Freaky
megha has joined #ruby
<yxhuvud>
mon: yes, but I don't see how one could get a binding in this case. I don't think they use binding_of_caller.
kylescottmcgill has quit [Ping timeout: 256 seconds]
m8 has quit [Read error: Connection reset by peer]
m8 has joined #ruby
sailias has joined #ruby
natewalck has joined #ruby
<natewalck>
Morning
<natewalck>
I was curious if anyone here uses Ruby on OS X 10.8
spider-mario has quit [Remote host closed the connection]
Umren has joined #ruby
dqminh has quit [Remote host closed the connection]
clocKwize has joined #ruby
<gregor3005>
lol i found how i can force the eclipse ruby plugin to use the class and file naming convention
<gregor3005>
i have to create a file in lower case and it automatically creates a class with starting uppercase :-) funny solution, i thought it the other way round
Spooner has joined #ruby
tk_ has quit [Quit: ばいばい]
ph^ has quit [Remote host closed the connection]
ph^ has joined #ruby
richo has joined #ruby
ph^ has quit [Read error: Connection reset by peer]
<richo>
I'm trying to parse a javascript object (not json) in ruby.. is that a thing? I feel like I Can't be the first person to butt my head against this.
danshultz has joined #ruby
dekroning has quit [Ping timeout: 240 seconds]
<gregor3005>
is there a shorter way for that: puts "#{"%.2f" % Temperature.f2c(100)}"
ph^ has joined #ruby
<banisterfiend>
Mon_Ouie: do you think english is a beautiful language
<Mon_Ouie>
Sure
<banisterfiend>
surprising :)
<banisterfiend>
Mon_Ouie: do you think it sounds similar to german/dutch ?
zigomir has quit [Ping timeout: 276 seconds]
<banisterfiend>
but without the hacking/coughing
<Mon_Ouie>
Not Dutch at least, I've never really heard German
<Mon_Ouie>
Except for Hitler impersonations
<gregor3005>
hm
<Hanmac>
Mon_ouie i dont think he is a good example ...
<gregor3005>
not good to hear only that stupid bullshit from that &%%&%'$'*** guy
<banisterfiend>
Mon_Ouie: linguistically though (in terms of word cognates) english and dutch are very similar
<banisterfiend>
Mon_Ouie: at least, i can often read a dutch sentence (without knowing any dutch) and figure out what it means
dallasm has joined #ruby
kylescottmcgill has joined #ruby
abstrusenick has quit [Quit: abstrusenick]
danshultz has quit [Ping timeout: 255 seconds]
dallasm has quit [Client Quit]
colonolGron has joined #ruby
freeayu has quit [Read error: Connection reset by peer]
kans has quit [Ping timeout: 256 seconds]
atno has joined #ruby
vlad_starkov has joined #ruby
dallasm has joined #ruby
dallasm has left #ruby [#ruby]
dallasm has joined #ruby
sleetdrop has quit [Remote host closed the connection]
sleetdrop has joined #ruby
yshh has quit [Remote host closed the connection]
dallasm has quit [Client Quit]
colonolGron has quit [Ping timeout: 256 seconds]
crackfu has quit [Remote host closed the connection]
zph has joined #ruby
crackfu has joined #ruby
dustin_ has quit [Remote host closed the connection]
timonv has joined #ruby
notmoose has joined #ruby
timonv_ has quit [Read error: Connection reset by peer]
sailias has quit [Quit: Leaving.]
<notmoose>
hi everyone im trying to install sqlite3 on my windows machine through gem install sqlite3 but it gives me this error
jonathanwallace2 has quit [Ping timeout: 256 seconds]
havenn has quit [Remote host closed the connection]
<Boohbah>
notmoose: i would guess that your user needs write permission to that directory
jonathanwallace2 has joined #ruby
ananthakumaran1 has quit [Ping timeout: 245 seconds]
clocKwize has quit [Quit: clocKwize]
crackfu has quit [Ping timeout: 246 seconds]
<notmoose>
fuck it postgresql iti s
notmoose has quit [Client Quit]
vlad_starkov has quit [Ping timeout: 276 seconds]
dekroning has joined #ruby
Adys has joined #ruby
<shock_one>
notbrent, run as administrator
Virunga has quit [Remote host closed the connection]
<Adys>
I'm updating the ruby-yard package on arch and getting this when building: http://paste2.org/p/2798307 -- I'm not too familiar with ruby; these don't seem to prevent building/installing but I'm confused what's causing them. any idea?
jonathanwallace2 has quit [Ping timeout: 252 seconds]
<banisterfiend>
fasta: ok, what do you use ? rbenv?
<fasta>
banisterfiend: system version
<banisterfiend>
fasta: ok..
<fasta>
banisterfiend: like I said, the code already worked on a newer platform.
ph^ has quit [Remote host closed the connection]
<banisterfiend>
fasta: well, system versions are usually so fucked for whatever reason that the issue could be to do with that :) First thing i do on a new system is install rbenv/rvm/chruby
jpfuentes2 has joined #ruby
<shock_one>
banisterfiend, what OS do you use?
<banisterfiend>
shock_one: osx
<shock_one>
banisterfiend, ruby from brew is OK for me
jinzhu has quit [Ping timeout: 256 seconds]
kans has joined #ruby
<fasta>
What are the preconditions for 'require' to work?
<banisterfiend>
fasta: wait, are you on ruby 1.8 ?
<shock_one>
fasta, nothing, it's Kernel method
<banisterfiend>
if that's th eproblem, then you have to require 'rubygems' first
<banisterfiend>
fasta: rubygems is not used on 1.8 by default
<fasta>
banisterfiend: that will be the issue then.
<fasta>
banisterfiend: will it still work on the newer platform then?
postmodern has joined #ruby
<banisterfiend>
fasta: for the love of god, install 1.9 :) 1.8 is extremely old and practically unsupported at this point
eka has joined #ruby
<fasta>
banisterfiend: I will get 1.9 in a few months time.
<banisterfiend>
fasta: why wait?
<fasta>
banisterfiend: and yes, I know of methods to fix that.
<fasta>
banisterfiend: there is no need.
mrdtt has quit [Quit: mrdtt]
<banisterfiend>
fasta: when it takes all over 5 mins to install 1.9, why not just install it? you dont have to constantly reuqire 'rubygems' and generally things will run better and more stably on 1.9
<fasta>
banisterfiend: it takes more than 5 minutes.
<fasta>
banisterfiend: I also don't run any long running services in Ruby.
<fasta>
banisterfiend: there is no issue.
<banisterfiend>
fasta: typing the command to install 1.9 takes 2 seconds. The install process itself shouldn't take more than 5 mins
<fasta>
banisterfiend: which command is that?
<banisterfiend>
fasta: that entirely depends on your package manager, but it will have a 1.9 package. So whatever command you use to install packages..type that :)
<fasta>
banisterfiend: no, it doesn't.
<banisterfiend>
fasta: what package manager are you using?
eka has quit [Client Quit]
<fasta>
banisterfiend: my mistake. I already have a 1.9.2 version
<banisterfiend>
cool
jimeh has quit [Quit: Computer has gone to sleep.]
jimeh has joined #ruby
<shock_one>
fasta, it means requiring rubygems wasn't the issue
<fasta>
shock_one: no, it doesn't.
Dom__ has joined #ruby
<fasta>
shock_one: it just means you jump to conclusions.
rooftopjoe has quit [Quit: Page closed]
otherj has joined #ruby
gregor3005 has quit [Remote host closed the connection]
<banisterfiend>
fasta: Don't be rude, he's trying to help
otherj has quit [Client Quit]
<shock_one>
fasta, rubigems path are included by default in 1.9. But if including helps the only reason I can thing of is your default paths aren't right.
Virunga has joined #ruby
dallasm has joined #ruby
kylescottmcgill has quit [Ping timeout: 245 seconds]
solidoodlesuppor has joined #ruby
kans has quit [Ping timeout: 240 seconds]
dallasm has quit [Client Quit]
otherj has joined #ruby
aapzak has joined #ruby
alexwh has joined #ruby
kans has joined #ruby
Xeago has joined #ruby
dougireton has joined #ruby
Iszak has joined #ruby
sepp2k has joined #ruby
alexwh has quit [Quit: Quitting]
sayan has joined #ruby
sayan has quit [Changing host]
sayan has joined #ruby
danshultz has joined #ruby
sayan has quit [Remote host closed the connection]
<Teduardo>
Does anyone know what package provides "bundle" ?
sleetdrop has quit [Ping timeout: 255 seconds]
<spider-mario>
bundler?
<spider-mario>
(not sure)
wallerdev has joined #ruby
eka has joined #ruby
<Teduardo>
ah, sorry i'm terrible with ruby; i am trying to install a program called nagira, and it just says it requires bundle and im assuming that is a rubygem; or something, but i can't quite figure it out =)
<banisterfiend>
Teduardo: gem install bundler
<Strum>
i am trying to get started with rails and have come across this issue >> could not find javscript runtime
<Teduardo>
thanks =)
French has quit [Remote host closed the connection]
<Teduardo>
damn centos doesnt have a high enough ruby version, i wonder why i deal with redhat derivitives at all sometimes
<spider-mario>
you could use rvm
horofox has joined #ruby
elico has quit [Quit: elico]
sayan has quit [Read error: Connection reset by peer]
<otherj>
or rbenv
<spider-mario>
I’ve done that at school because they still don’t have ruby 1.9
<spider-mario>
only 1.8
<otherj>
1.8 :(
<Teduardo>
wonder if IUS or one of the other repos has a newer ruby, will look ingo it
<Teduardo>
err into it
serhart has quit [Quit: Leaving.]
<shevy>
lonve live 1.8
<Teduardo>
Ubuntu is so much better than Centos =)
sqnmdl has joined #ruby
serhart has joined #ruby
__BigO__ has quit [Remote host closed the connection]
<Teduardo>
Sadly we recommend centos when people place orders for dedicated servers on our site, lol =)
renanoronfle has quit [Remote host closed the connection]
<otherj>
why?
<Strum>
imho ubuntu is dumbed down garbage and i won't touch it ever again
<Teduardo>
I think it recommends based on the most popular thing
<Teduardo>
Strum: really? al least the package up the goods people want =)
<Strum>
i use slackware
<shevy>
all distributions are evil
<Strum>
ubuntu will pass just like redhat before it
<Teduardo>
Not to get into a distrowar, but maybe Redhat 7 won't suck as bad
<Teduardo>
Mint isn't a server though, it's primarily a desktop
<shevy>
and what qualifies as a server?
tetoast has joined #ruby
<Teduardo>
That's a good question now a days. It used to be that the packages were seperated into different repos
<shevy>
and what criteria is being used to make those repos?
<Teduardo>
a long time ago =D
<shevy>
they must reason
<Teduardo>
I guess things that typically people would run on a server vs. things typically people would run on a desktop =)
<shevy>
well on my desktop machine I use and install everything
<Teduardo>
but since windows vista you could install IIS on a desktop
<Teduardo>
so even they got clue on that
<shevy>
ewwww windows
zyrex has quit [Quit: leaving]
moos3 has quit [Quit: Computer has gone to sleep.]
Myconix has quit [Ping timeout: 256 seconds]
<Strum>
until there is proper application software for linux windows will continue to be a neccesary evil
yshh has joined #ruby
<Strum>
i will stop using it when there is a decent audio workstation for linux
<Strum>
i have been waiting 15 years now and it's no closer than it was then
Dom__ has joined #ruby
danneu has joined #ruby
<Strum>
linux sucks as a desktop workstation for anything but web and development
Dom__ has quit [Read error: Connection reset by peer]
<Teduardo>
yeah it's still a bit hard to get work done in Linux for average office workers
<shevy>
hehe
<Strum>
no video software , no decent graphics or audio software
Dom__ has joined #ruby
<shevy>
linux is too fragmented for no net gain
<Strum>
the gimp and blender do not cut it
<Strum>
yes shevy
<shevy>
gimp is developed by monkeys
<shevy>
blender however is good
<Strum>
too much duplication of effort and functionality
<Strum>
blender is an toy that is impossible to use
<shevy>
Strum, you have to learn a suite anyway, maya, or other rendering software
<shevy>
and how is this different from other complicated software please?
<Strum>
maya is easy compared to belnder
<shevy>
pffffft
<Strum>
it's crap too btw
<shevy>
there is a hueg learning curve involved in either of those
<Strum>
i use rhino to model in
<Strum>
and you can learn that in a few days
<shevy>
:P
<Strum>
it teach you how to use it as you go
<spider-mario>
<Strum> no video software , no decent graphics or audio software
<spider-mario>
kdenlive is said to be good, I believe
<spider-mario>
krita too
<shevy>
you sell water and say it is wine ;)
_nitti has joined #ruby
<danneu>
well, the more salient problem with the mentioned software is that you're isolated from the industry tools, likely the tools of your peers.
joofsh has quit [Remote host closed the connection]
timonv has quit [Read error: Connection reset by peer]
<Strum>
yes danneu
timonv has joined #ruby
<Teduardo>
but zomg office365 =)
<Teduardo>
if it's not down
robotmay has quit [Remote host closed the connection]
beiter has joined #ruby
colonolGron has quit [Ping timeout: 245 seconds]
tatsuya_o has quit [Remote host closed the connection]
sayan has joined #ruby
rdark has joined #ruby
braoru has joined #ruby
Kuifje has quit [Read error: Connection reset by peer]
postmodern has quit [Quit: Leaving]
Kuifje has joined #ruby
<Teduardo>
ack, so I guess he wrote this with hashes for ruby 1.9 and didnt mention it anywhere, so i'm upgrading again =)
dougireton has joined #ruby
tetoast has quit [Ping timeout: 255 seconds]
Virunga has joined #ruby
sleetdro_ is now known as sleetdrop
gregor3005 has joined #ruby
rdark has quit [Ping timeout: 252 seconds]
chimmy has joined #ruby
<gregor3005>
hi, another question about nameing conventions: in my book the author write a module this: http://fpaste.org/h6Du/
undersc0re97 has quit [Quit: "The destruction of balance constitutes leaping forward and such destruction is better than balance. Imbalance and headache are good things." - Mao]
_nitti has quit [Remote host closed the connection]
<gregor3005>
is it a good choise here to use camelcase in modulenames and ruby style in def's ?
<gregor3005>
he also use camelcase in the class file?
<gregor3005>
-?
jaequery has quit [Quit: Computer has gone to sleep.]
rdark has joined #ruby
Myconix has joined #ruby
<apeiros_>
filenames should be all lowercase
<apeiros_>
other than that, yes
guns has quit [Ping timeout: 255 seconds]
jtgiri_ has quit [Quit: jtgiri_]
undersc0re97 has joined #ruby
<apeiros_>
ruby convention is CamelCase module-/classnames, and snake_case method- and variable names
<apeiros_>
also: choice ;-)
Xeago has quit [Read error: Connection reset by peer]
Xeago_ has joined #ruby
Xeago_ is now known as Xeago
rdark has quit [Client Quit]
mockra has joined #ruby
zph has quit [Quit: Computer has gone to sleep.]
jtgiri_ has joined #ruby
<banisterfiend>
apeiros_: i bought starcraft!
<apeiros_>
wooot!
<banisterfiend>
apeiros_: i have to run it on kind of low settings though, which sucks
<gregor3005>
apeiros_: thx now its clear
<apeiros_>
you're using it on the MBA?
<banisterfiend>
apeiros_: i guess u can run everything on ultra?
<apeiros_>
for campaign, yes
<banisterfiend>
apeiros_: yeah, late 2012 11" mba
<apeiros_>
not for ladder, running on lowest there
masa1973 has joined #ruby
mercwithamouth has joined #ruby
Neomex has joined #ruby
braoru has quit [Ping timeout: 252 seconds]
hmans has joined #ruby
<Teduardo>
wait the original starcraft or sc2?
moos3 has joined #ruby
dagnachew has quit [Ping timeout: 245 seconds]
jtgiri_ has quit [Quit: jtgiri_]
danneu has left #ruby ["WeeChat 0.3.8"]
Myconix has quit [Ping timeout: 256 seconds]
dougireton has quit [Quit: Leaving.]
sleetdrop has quit [Remote host closed the connection]
sleetdrop has joined #ruby
kiyoura has joined #ruby
maletor has joined #ruby
colonolGron has joined #ruby
<gregor3005>
how can i add . to the ruby searchpath?
<gregor3005>
i had to use always require_relative instead of require to run my examples
guns has joined #ruby
aeontech has quit [Quit: aeontech]
<gregor3005>
or its by default not in the searchpath from fedora (f18 x86_64)
kaichanvong___ has joined #ruby
moos3 has quit [Quit: Computer has gone to sleep.]
hmans has quit [Quit: Leaving...]
danshultz has joined #ruby
moos3 has joined #ruby
cobragoat has quit [Quit: cobragoat]
jaequery has joined #ruby
ahokaomaeha has quit [Quit: When I come back, please tell me in what new ways you have decided to be completely wrong.]
beiter has quit [Quit: beiter]
dougireton has joined #ruby
v0n has joined #ruby
peregrine81 has joined #ruby
danshultz has quit [Ping timeout: 245 seconds]
colonolGron has quit [Ping timeout: 245 seconds]
angusiguess has joined #ruby
jetblack has joined #ruby
aapzak has quit [Ping timeout: 246 seconds]
otters has joined #ruby
dougireton has quit [Quit: Leaving.]
aapzak has joined #ruby
Dom__ has quit [Remote host closed the connection]
Takehiro has quit [Remote host closed the connection]
kiyoura has left #ruby ["Leaving"]
Takehiro has joined #ruby
axl_ has quit [Quit: axl_]
arya has quit [Ping timeout: 248 seconds]
nyuszika7h has quit [Ping timeout: 256 seconds]
Takehiro has quit [Remote host closed the connection]
d2dchat has joined #ruby
d2dchat has quit [Remote host closed the connection]
maletor has quit [Quit: Computer has gone to sleep.]
reinaldob has joined #ruby
maletor has joined #ruby
nyuszika7h has joined #ruby
hmans has joined #ruby
<shock_one>
Black-Heaven, I don't know any, but it's very easy to implement. You need two classes: Question and Answer. Question should have array of answers and title and Answer name and boolean which indicates if it's right. You can also implement simple yaml-like parser to get questions from text file.
arya has joined #ruby
hmans has quit [Client Quit]
<Black-Heaven>
shock_one: like that, ok, thank you
d2dchat has joined #ruby
<shock_one>
Black-Heaven, don't disconnect, I want to write it.
<shock_one>
and send you
tatsuya_o has joined #ruby
<apeiros_>
shock_one: why implement his own parser instead of just using yaml?
reinaldob has quit [Remote host closed the connection]
d2dchat has quit [Remote host closed the connection]
<shock_one>
apeiros_, actually I have something similar implemented already.
<apeiros_>
shock_one: that doesn't really answer the question :)
caleb_io has joined #ruby
<shock_one>
apeiros_, you're right, using yaml parser is better. Who cares that it's a little overkill.
<apeiros_>
funny, that's actually still not an answer :-p well, I guess it implicitly is
xyproto has joined #ruby
* apeiros_
is currently struggling writing a nicer YAML emitter
<xyproto>
Hi, do you happen to know if the gems in ruby-gtk3 (for instance Ruby/ATK) happily coexists with the gems from ruby-gtk2 or not?
moos3 has quit [Quit: Computer has gone to sleep.]
<shock_one>
apeiros_, the anser is I was wrong, using yaml parser is preferable since it's well tested and effortless
Coolhand|laptop has quit [Read error: Connection reset by peer]
Takehiro has joined #ruby
havenn has joined #ruby
freakazoid0223 has joined #ruby
Takehiro has quit [Remote host closed the connection]
tatsuya_o has quit [Ping timeout: 246 seconds]
caleb_io has quit [Ping timeout: 244 seconds]
GuidovanPossum has joined #ruby
dwn has joined #ruby
dwn has quit [Changing host]
dwn has joined #ruby
dwn has quit [Excess Flood]
danshultz has joined #ruby
masa1973 has quit [Ping timeout: 246 seconds]
reinaldob has joined #ruby
huoxito has joined #ruby
louisror has joined #ruby
MattRB has joined #ruby
peregrine81 has quit [Ping timeout: 252 seconds]
h4mz1d has joined #ruby
IceDragon has joined #ruby
sbear has quit [Ping timeout: 276 seconds]
nga4 has joined #ruby
aapzak has quit [Ping timeout: 276 seconds]
aapzak has joined #ruby
nga4 has quit [Client Quit]
dcwu has joined #ruby
<GuidovanPossum>
hello, general question, I've written the requires require "rubygems", "hpricot", "ruby-debug" currently, I'm going to host the code on a website and would like people to be able to "play" with it, I've provided links to, ruby-lang.org, rubygems.org, and github.com/hpricot/hpricot, should this be a sufficient way to get people started, or is there a better way someone could recommend, I just want to make it as easy to access
<GuidovanPossum>
as possible?
peregrine81 has joined #ruby
<apeiros_>
lol @ nick
<apeiros_>
GuidovanPossum: sounds sensible. but isn't hpricot outdated?
<apeiros_>
also, as of 1.9, you don't have to require 'rubygems' anymore
reinaldob has quit [Remote host closed the connection]
jgrevich has joined #ruby
serhart has quit [Quit: Leaving.]
<apeiros_>
ok, this is funny… ['hello']*20*' '
Cooler_ has quit [Read error: Connection reset by peer]
Cooler__ has joined #ruby
Benjammin has joined #ruby
peregrine81 has quit [Quit: Goodbye.]
rizzy has joined #ruby
aapzak has quit [Ping timeout: 244 seconds]
eka has quit [Quit: Computer has gone to sleep.]
ahokaomaeha has joined #ruby
sepp2k1 has joined #ruby
sepp2k has quit [Ping timeout: 252 seconds]
h4mz1d has quit [Ping timeout: 244 seconds]
aapzak has joined #ruby
earthquake has joined #ruby
dougireton has quit [Quit: Leaving.]
thufir_ has joined #ruby
dougireton has joined #ruby
jmccune has joined #ruby
recycle_ has quit [Remote host closed the connection]
arietis has quit [Quit: Computer has gone to sleep.]
dougireton has quit [Client Quit]
fragmachine has joined #ruby
hackerdude has joined #ruby
arietis has joined #ruby
MattRB has quit [Quit: This computer has gone to sleep]
centipedefarmer has quit [Remote host closed the connection]
Akuma has joined #ruby
colonolGron has quit [Quit: leaving]
colonolGron has joined #ruby
sporkbomb has quit [Quit: leaving]
shevy has joined #ruby
arietis has quit [Quit: Computer has gone to sleep.]
maletor has quit [Quit: Computer has gone to sleep.]
arietis has joined #ruby
hackerdude has quit [Remote host closed the connection]
crackfu has joined #ruby
arietis has quit [Client Quit]
Nisstyre-laptop has joined #ruby
tcstar has joined #ruby
arietis has joined #ruby
<breakingthings>
I'm testing a function with RSpec that should spawn a new thread, so I tried Thread.should_receive(:new), but I'm getting "Failure/Error: Thread.should_receive(:new); (<Thread (class)>).new(any args); expected: 1 time; received: 0 times"… does anyone know how to remedy this?
etcetera has joined #ruby
<shock_one>
benlieb, do you use right version of paperclip?
<benlieb>
shock_one: good question. which one is that
<shock_one>
benlieb, I don't know. But you should check if your version works with 3.2
<benlieb>
only the test is failing. the actual application via the web browser is working fine with uploads.
tetoast has joined #ruby
<Akuma>
Hello, I'm having some issues with a regex matching and the associated output: http://pastebin.com/BYgK6cuB - I'm expecting a string and I keep getting ["a"] values
GuidovanPossum has quit [Quit: GuidovanPossum]
<Akuma>
instead of having "a", I get "["a"]"
megha has quit [Quit: WeeChat 0.4.0]
Neomex has quit [Read error: Connection reset by peer]
preyalone has quit [Ping timeout: 245 seconds]
Neomex1 has joined #ruby
<Akuma>
the methods matchclass renders values normally when used in standalone
<shock_one>
Akuma, #scan returns all matches in an array
<Akuma>
so I should do w.at(0).to_s?
<shock_one>
try #match
chrismhough has joined #ruby
<Akuma>
I need the scan function, but adding .at(0).to_s worked
<Akuma>
thanks a lot for the help
<Akuma>
greatly appreciated
tetoast is now known as cparen
<tcstar>
I'm brand new to Ruby and Ruby on Rails coming from PHP (raw php, as well as MVC frameworks such as Codeigniter and Symfony)... I've learned how to install a development environment (but not one that ties into apache without nginx)...
kaerast has joined #ruby
<banisterfiend>
tcstar: lol php
Cooler__ has quit [Read error: Connection reset by peer]
<Black-Heaven>
shock_one: thanks you verry much
<banisterfiend>
:D
<tcstar>
So with that in mind, anyone know of any decent tutorials or sites with tutorials I can visit to learn a bit before I dive in and try and build an actual application?
<breakingthings>
People keep speculating he's coming back.
<kylescottmcgill>
this might be blasphemy but he hasnt like... died or anything has he? like hes ok and shit yeah?
bane has joined #ruby
emmanuelux has joined #ruby
joeycarmello has quit [Remote host closed the connection]
GlenK has joined #ruby
arya has quit [Ping timeout: 248 seconds]
<GlenK>
hi. if I define a method inside a method, it doesn't seem to have access to the enclosing method's arguments. Perhaps there some syntax I'm missing to access those?
dankest is now known as dankest|away
<X-Jester>
GlenK: why would you define a method inside a method?
<X-Jester>
GlenK: i don't mean that to sound snarky, i'm actually curious
sundeep has quit [Ping timeout: 252 seconds]
sqnmdl has quit [Remote host closed the connection]
arya has joined #ruby
<GlenK>
X-Jester: so I don't have to pass variables around all crazily. here, have a look if you want: http://fpaste.org/978k/
krainboltgreene has joined #ruby
jekotia has joined #ruby
IcyDragon has joined #ruby
<shock_one>
GlenK, methods in ruby aren't closures, use Procs instead
arturaz has quit [Remote host closed the connection]
IceDragon has quit [Ping timeout: 256 seconds]
<GlenK>
shock_one: ok, guess I'll have to research that. thanks.
havenn has joined #ruby
banisterfiend has joined #ruby
Takehiro has joined #ruby
<benlieb>
GlenK: sounds like you just want a class
jenrzzz has quit [Ping timeout: 245 seconds]
<benlieb>
GlenK: why not make a class that has instance variables that all methods can define and access?
hackerdude has quit [Remote host closed the connection]
<shock_one>
benlieb, he doesn't need many instances. Why would he use OOP if procedural style is perfect fit in this case?
yshh has joined #ruby
jtgiri_ has joined #ruby
dankest|away is now known as dankest
<benlieb>
shock_one: guess it's a matter of preference. he could make a singleton. methods inside of methods isn't that common.
blueOxigen has joined #ruby
<GlenK>
benlieb: yeah, I guess that would be a good route. might as well learn this proc stuff though since I've never even heard of it
bluOxigen has quit [Ping timeout: 252 seconds]
enebo has joined #ruby
crackfu has quit [Remote host closed the connection]
wupeng has quit [Quit: Leaving]
<benlieb>
GlenK: it's one of the more complicated and tricky elements of ruby.
<benlieb>
GlenK: if you're not confortable with simple classes and instance variables, one could make an argument that that should come first in your development. they're both good to know though :)
<benlieb>
matter of preference i guess
<shock_one>
benlieb, isn't that common *in ruby*. I wonder why methods aren't closures? I think that's because of absence of variable declaration, so you can't be sure you don't rewrite some var in the outer scopr.
havenn has quit [Ping timeout: 256 seconds]
Takehiro has quit [Ping timeout: 244 seconds]
<shock_one>
benlieb, I would also use case instead of that big if-else part
Nisstyre-laptop has quit [Read error: Connection reset by peer]
Nisstyre-laptop has joined #ruby
crackfu has quit [Read error: Connection reset by peer]
<shock_one>
And you should use raise instead of assert
crackfu has joined #ruby
mmitchell has quit [Read error: Connection reset by peer]
yshh has quit [Ping timeout: 256 seconds]
mmitchell has joined #ruby
<shock_one>
Also it's convenient to name methods in snake_case instead of camelCase. Don't you mind a little review?
<banisterfiend>
benlieb: methods insdie of methods isn't even really supported in ruby :)
<benlieb>
I've never seen it.
<shock_one>
banisterfiend, what do you mean supported?
<banisterfiend>
shock_one: in the sense that they're not really nested methods (as in python)
<banisterfiend>
shock_one: you're just defining another instance method, so it's completely visible outside of that method definition
<shock_one>
banisterfiend, really?
<banisterfiend>
shock_one: Yeah
ahokaomaeha has quit [Quit: When I come back, please tell me in what new ways you have decided to be completely wrong.]
<eval-in>
shock_one: Output: "/tmp/execpad-e18f59f973a6/source-e18f59f973a6:1:in `<main>': undefined local variable or method `bar' for main:Object (NameError)\n" (http://eval.in/7589)
<shock_one>
Doesn't seems like so
<banisterfiend>
shock_one: err, you have to run 'foo' first :)
<banisterfiend>
shock_one: or you're not going to be defining bar
<shock_one>
Then what is the point in nested functions?
<banisterfiend>
shock_one: to define another method dynamically, but it's rare, and not always so useful
havenn has joined #ruby
<shock_one>
I always used them to hide implementation details.
<banisterfiend>
shock_one: but occassionally, in tricky metaprogramming situations, it's useful
<banisterfiend>
shock_one: why not just put the implementation details inside another private method? :)
<banisterfiend>
that's what private methods are for, afterall
<shock_one>
Why everybody are so crazy about OOP?
joofsh has joined #ruby
<breakingthings>
because we tried procedural
<breakingthings>
didn't work so well
<breakingthings>
:P
<GlenK>
*functional
ner0x has joined #ruby
<GlenK>
or at least my junk...
<shock_one>
Do you remember the problem? It works bad on large projects, but it's a natural way to write simple scripts
moos3 has joined #ruby
<shock_one>
GlenK, functional support in ruby is limited to methods like map and reduce.
<breakingthings>
if your simple script is an isolated prototype of functionality, perhaps, or a literal script whos complexity is minimal.
<banisterfiend>
shock_one: even in simple scripts, if a function is big enough to have to want to hide some of its implementation details in an 'inner function', then you're doing it wrong IMO. even in simple scripts, functions/methods should be small
jgarvey has joined #ruby
iamjarvo has joined #ruby
<GlenK>
shock_one: eh, this proc stuff seems to be the way to go. I'll see what happens...
<shock_one>
They say that a function can fit in one screen. That's why I rotate my full HD monitor in vertical position.
<shock_one>
*must fit
<breakingthings>
they meant 'iphone screens at 1.0 magnification' :p
BleakLife has joined #ruby
<BleakLife>
any suggestions for how to internalize the 'implicit self' ? i've been working with ruby for two weeks but my mind keeps seeing uninitialized local variables, not method calls to self
<GlenK>
did I read right that snake case is the convention for ruby methods?
<shock_one>
GlenK, yes, and variables
ananthakumaran has quit [Quit: Leaving.]
<benlieb>
GlenK: most ruby methods have underscores
<benlieb>
i meant rails
answer_42 has quit [Ping timeout: 276 seconds]
jtgiri_ has joined #ruby
<shock_one>
BleakLife, self changes when you go into method or class definition.
vertroa has joined #ruby
<breakingthings>
speaking of self
<BleakLife>
shock_one: yes, but i mean how 'foobar' in a function can be anything
<breakingthings>
what's the deal with def self.mymethod
<BleakLife>
shock_one: it could be a variable, it could be a method
<breakingthings>
is that supposed to make it an instance method or something
<BleakLife>
shock_one: how to help internalize that its probably a method? because i just keep seeing them as variables that havn't been initialized
<shock_one>
BleakLife, ruby parser first searches for keywords, then for methods and then for variables
<benlieb>
modules and classes use humpback
<shock_one>
BleakLife, make methods and variables colors different in your IDE
<lupine>
BleakLife, make it a policy of your own that you will always use self for method calls
<BleakLife>
shock_one: hmm, thats a great idea. I'm goign to have to look
<lupine>
(it interacts badly with +private+ of course)
solidoodlesuppor has quit [Quit: ChatZilla 0.9.89 [Firefox 18.0.1/20130116073211]]
<shock_one>
breakingthings, it defines a method in the object metaclass, if you understand what I'm talking about
<breakingthings>
nope.
<BleakLife>
lupine: hmm, thats an interesting idea too. perhaps worthwhile to use self while getting into it, and deal with the implicit parts later
Dom___ has joined #ruby
workmad3 has joined #ruby
<benlieb>
BleakLife: i wouldn't do that, it's not necessary. just get used to thinking it could be a method or a var
<lupine>
I wouldn't worry about it myself, generally
kaerast has quit [Read error: Connection reset by peer]
v0n has joined #ruby
<lupine>
once you're used to it, if it's becoming an issue remembering whether something is a local variable or a method call, then your method is probably too lon
<lupine>
...g
havenn has quit [Remote host closed the connection]
`brendan has joined #ruby
<lupine>
(also, avoid having local variables that happen to collide with existing method names)
<benlieb>
self seems to be only used in those instances where there is ambiguity
<shock_one>
breakingthings, It defines a method, that you can call only on the object on which it's defined. (with exception for inheritance and class objects)
chrismhough has quit [Quit: chrismhough]
<benlieb>
lupine: +1
UNIXgod has joined #ruby
<breakingthings>
shock_one: Don't really get it but I think that what you're getting at is out of my reach just yet.
<shock_one>
breakingthings, it's pretty simple, I'm just not very good at explaining.
dipix has joined #ruby
dipix has quit [Max SendQ exceeded]
dipix has joined #ruby
<shock_one>
breakingthings, It's part of ruby metaprogramming, you can google these words.
Dom___ has quit [Ping timeout: 252 seconds]
razibog has joined #ruby
Monie has joined #ruby
jeffreybaird has joined #ruby
havenn has joined #ruby
vertroa has quit [Quit: WeeChat 0.3.8]
vertroa has joined #ruby
<shock_one>
lupine, I'm also confused sometimes when I see thing like bare «all» in rails models
renanoronfle has joined #ruby
Takehiro has joined #ruby
Neomex1 has quit [Quit: Neomex1]
dipix has quit [Client Quit]
<banisterfiend>
breakingthings: search stackoverflow, there'll be hundreds of answers to that very question
Iszak has joined #ruby
benlieb has quit [Quit: benlieb]
otters has joined #ruby
chrismhough has joined #ruby
workmad3 has quit [Ping timeout: 256 seconds]
halogenandtoast has joined #ruby
benlieb has joined #ruby
Kingy has joined #ruby
jeffreybaird has quit [Quit: jeffreybaird]
<halogenandtoast>
Does anyone happen to know why RUBY_SPECIAL_SHIFT is 8?
<banisterfiend>
halogenandtoast: what's that? that's not part of standard ruby afaik
forced_request has quit [Remote host closed the connection]
<halogenandtoast>
I remembered reading about it somewhere, I just couldn't remember
tatsuya_o has joined #ruby
jtgiri_ has quit [Quit: jtgiri_]
malte_ has joined #ruby
vertroa has quit [Quit: WeeChat 0.3.8]
vertroa has joined #ruby
<GlenK>
so in my ruby script I have junk like "f1 = lambda{|x| 2 * x}" now. When I run irb and do a "require 'foo'", then try and run f1 it tells me the method's undefined.
banisterfiend has quit [Read error: Connection reset by peer]
vertroa has quit [Client Quit]
banisterfiend has joined #ruby
<shock_one>
f1.call()
vertroa has joined #ruby
jaequery has quit [Quit: Computer has gone to sleep.]
<GlenK>
shock_one: yeah, I know. still doesn't work. well, it says undefined method or variable.
benlieb has quit [Quit: benlieb]
<shock_one>
We need the code
<GlenK>
k
havenn has quit [Remote host closed the connection]
otters has quit [Ping timeout: 240 seconds]
d2dchat has joined #ruby
Dreamer3 has quit [Quit: Leaving...]
mengu has quit [Quit: Konversation terminated!]
nicoulaj has quit [Remote host closed the connection]
<halogenandtoast>
What is the actual error message?
joeycarmello has joined #ruby
Banistergalaxy has quit [Ping timeout: 245 seconds]
<shock_one>
You forget to rename simpsons_term and rule calls
Banistergalaxy has joined #ruby
d2dchat has quit [Remote host closed the connection]
joeycarmello has quit [Remote host closed the connection]
joeycarmello has joined #ruby
<GlenK>
well I'm just trying to do f1.call right now. that's not working.
<halogenandtoast>
Are you passing in a value to call?
<GlenK>
NameError: undefined local variable or method `f1' for main:Object
<GlenK>
halogenandtoast: yeah, passing a value
<halogenandtoast>
Oh you're doing require
<halogenandtoast>
That evals in a different scope
<GlenK>
I can define f1 in irb and then it works. but my require doesn't work
havenn has joined #ruby
<halogenandtoast>
requires don't eval in main:Object's scope
<GlenK>
crap, so if not require, then anything else?
jgrimes has joined #ruby
fenak has joined #ruby
<halogenandtoast>
load also doesn't eval in the same scope
<GlenK>
guess I can just throw my tests into the script and run it...
<halogenandtoast>
why not just make a class and not use lambdas
<halogenandtoast>
or a module
<halogenandtoast>
module Foo; def identity(x); x; end; end
<GlenK>
because I'm trying to use my sum function.
d2dchat has joined #ruby
<halogenandtoast>
If you need to create a block from a method you can always do Foo.method(:identity)
<shock_one>
halogenandtoast, because methods can't see variables from outer scope
<halogenandtoast>
technically not a block
<halogenandtoast>
but it gives you a callable object
ssm2017 has joined #ruby
<ssm2017>
hello
<ssm2017>
is there someone that can "translate" to a non ruby programmer what these errors mean ? https://gist.github.com/4644828
<halogenandtoast>
shock_one: You could always unbind the method and rebind to the scope that has the locals you need
<ssm2017>
i can understand that it can not load a file, but how to know wich one ?
<shock_one>
halogenandtoast, do you really think it's better than lambdas?
d2dchat has quit [Remote host closed the connection]
<fenak>
ssm2017: how do you run or installed this ruby?
<halogenandtoast>
shock_one: depends on the context, usually no
<ssm2017>
fenak, gem install sras
<xyproto>
ssm2017: just from reading the error message, it looks like you need openssl. Either the system-wide library or a gem. Probably the former. But I'm just a #ruby-vistor.
Dreamer3 has joined #ruby
<ssm2017>
xyproto, openssl is already installed on the system but maybe it needs another lib ?
<fenak>
ssm2017: do you have libssl?
<havenn>
ssm2017: rvm pkg openssl
<havenn>
**rvm pkg install openssl
<havenn>
then rebuild ruby
<halogenandtoast>
GlenK: another "simpler" alternative is to wrap the lambdas in methods
<fenak>
ssm2017: if you use rvm...
<halogenandtoast>
def f1; lambda{|x| x * 2}; end
etcetera has joined #ruby
timonv has quit [Ping timeout: 255 seconds]
<havenn>
ssm2017: i assumed rvm cause of the file path, rvm right?
reinaldob has joined #ruby
etcetera has quit [Client Quit]
timonv has joined #ruby
<fenak>
havenn: yeah, didn't caught the path on the gist! that will likely solve it! sorry!
<havenn>
ssm2017: you can select the Ruby you're using manually, or with a tool like RVM, chruby or rbenv. Looks like you installed Ruby with RVM cause the .rvm/ in the path. When you build Ruby with RVM it dynamically links to your system openssl, but if it can't find it then you get openssl LoadErrors.
<havenn>
ssm2017: To deal with the issue, RVM lets you `rvm pkg install openssl` and then statically link to that. So you just run the command, then `rvm install ruby-head` or whatever and it will use the pkg openssl.
<havenn>
ssm2017: Just an aside, but good to check that all the packages from `rvm requirements` are indeed installed.
<yoshie902a>
quick question, I'm in terminal, ran a function with some really long output and at the end of the output is the word "end" highlighted. I tried pressing "esc", but I can't seem to move pasted it. if I press ctrl-Z, it completely exits my pry session. thaknks
<shock_one>
BleakLife, what's wrong with rails? What do you mean by class depth? Like has_many or like @str = String.new
tylersmith has quit [Quit: tylersmith]
<ssm2017>
on yesterday, i had a problem installing rvm and i found that the debian package bzip2 was missing so someone in #rvm added it to the requirement list in the install script and then rvm was installed with success
<BleakLife>
shock_one: class depth is the inheritance tree
<havenn>
yoshie902a: does 'q' work?
<havenn>
yoshie902a: :q
<BleakLife>
shock_one: composition over inheritance means that for the most part, you never inherit from another class
<BleakLife>
shock_one: each class does one little tiny thing very well, and nothing else
<yoshie902a>
havenn: yup! thanks!
<BleakLife>
shock_one: and you compose those pieces to make your application
<shock_one>
BleakLife, it's inheritance, not composition
<halogenandtoast>
BleakLife: I don't think such a framework exista.
<halogenandtoast>
*exists
enebo has quit [Quit: enebo]
<banisterfiend>
BleakLife: cocoa takes that approach
<havenn>
ssm2017: I really like chruby with its script to install Ruby, JRuby and RBX latest versions. :D
yshh has quit [Ping timeout: 252 seconds]
<BleakLife>
banisterfiend: interesting, goig to check it out thanks!
<fenak>
BleakLife: i'd agree with halogenandtoast
<banisterfiend>
BleakLife: er
<banisterfiend>
BleakLife: cocoa is the obj-c framework for osx :P
<fenak>
BleakLife: cocoa is not ruby..
<BleakLife>
banisterfiend: oh :P
<ssm2017>
havenn, the script author is asking to use rvm so im using rvm
<banisterfiend>
i was just talking about it as a general idea in OOD
<shock_one>
BleakLife, do you mean a framework that itself uses composition instead of inheritance?
<BleakLife>
i just get this quesy feeling with active record inside my models, and request data inside my controller
<BleakLife>
from years of experience in other languages, they seem more natural as independant things (like, a request object with request.params, not a params method on the controller)
chrismhough has quit [Quit: chrismhough]
<havenn>
ssm2017: They may prefer RVM, or have posted the suggestion before chruby and rbenv existed. RVM used to be the only kid on the block. :P
<halogenandtoast>
BleakLife: This is true.
Benjammin has quit [Ping timeout: 244 seconds]
<banisterfiend>
BleakLife: which languages?
<BleakLife>
banisterfiend: python, java, and php
iamjarvo has quit [Quit: Leaving.]
<fenak>
BleakLife: if i'm not wrong, you do have this object accessible on the controller, don't you?
<BleakLife>
banisterfiend: all have frameworks like that
<halogenandtoast>
You mean frameworks not languages
<ssm2017>
havenn, i have runned : "rvm requirements" and then i am isntalling the packages recommended for ruby
<BleakLife>
halogenandtoast: of course, i also asked for ruby frameworks :)
<ssm2017>
havenn, i will ask the author to try chruby
jackyalcine has quit [Quit: Quit]
<halogenandtoast>
BleakLife: I've wished rails handled authorization and authentication outside of the controller (and not via middleware)
<BleakLife>
fenak: depends on the app, but i prefer to receive the Request object in the controller arguments
<BleakLife>
fenak: def some_action(request)
aeontech has quit [Quit: aeontech]
<halogenandtoast>
BleakLife: convention over configuration
<halogenandtoast>
request is available as a method
<halogenandtoast>
same as params
<halogenandtoast>
why type request for every action
<halogenandtoast>
seems rather django-like
<havenn>
ssm2017: #rvm and #chruby are regularly populated too, if you hit oddities
<fenak>
i know that this maybe feels more natural to you.. .but if i had the request param on every action, seems unnecessary to type it always..
<ssm2017>
i had problems to install rvm on yesterday, so i spoke there on yesterday and then rvm was installed and now i have problem running the ruby script so im asking here :)
jackyalcine has joined #ruby
<fenak>
i remember programming on java struts 1... that was waste of effort.. lol
<BleakLife>
halogenandtoast: shrug, i suppose its just a difference of taste. I heavily favor explicit over implicit
<halogenandtoast>
Well then you must hate python
<BleakLife>
halogenandtoast: receiving something and returning something just feels natural :)
<halogenandtoast>
All those implicit block endings kill me
Guedes has quit [Ping timeout: 255 seconds]
<fenak>
halogenandtoast: effing pep8..
<banisterfiend>
halogenandtoast: that's a bit weak ;)
workmad3 has joined #ruby
joeycarmello has quit [Remote host closed the connection]
<fenak>
actually, pep8 is good because of all that indentation restrictions on python..
<xyproto>
halogenandtoast: I've never thought about it that way, but that's a good point actually. Oh well, Python is no longer my favorite langauge, but Go :)
<banisterfiend>
were oyu specifically involved with
<halogenandtoast>
I was mostly interested in potion
<banisterfiend>
ah ok
<halogenandtoast>
fogus took it over instead
<halogenandtoast>
My background in languages was a bit weak at the time.
<banisterfiend>
i did a lot of commits to mixico
<halogenandtoast>
The problem was he had a custom version of peg/leg
<havenn>
fenak: He posted some puzzles on his site, e.g., this link is to a postscript file that if you convert to pdf blah blah..: http://whytheluckystiff.net/SPOOL/DESOLEE
<halogenandtoast>
and while people had copies of potion, many did not have the custom version of peg/leg
<havenn>
halogenandtoast: I've heard CoffeeScript took some inspiration from Potion.
<banisterfiend>
halogenandtoast: did you know of mixico?
<fenak>
havenn: i'll not go for that.. lol.. maybe another time..
<Trudko>
guys are class-level declaration in ruby something like static blocks in java ? And class methods are static methods?
<halogenandtoast>
Web consultancy
<fenak>
xyproto: if i retire my mac someday, i'll definately be on archlinux..
subbyyy has joined #ruby
<xyproto>
I see
<halogenandtoast>
Trudko: Yes they are similar
mneorr has joined #ruby
<xyproto>
fenak: arch runs on mac hardware too, hint hint ;)
<Trudko>
halogenandtoast: yes for both questions?
<Trudko>
what is difference?
<fenak>
my personal computer is a macbook, but on my job i use arch..
<fenak>
xyproto: i know, i know! lol..
<halogenandtoast>
Trudko: When you're in a class the current binding switching to the class, but you can still execute any statements you want
phinfonet has joined #ruby
gravity_ has joined #ruby
<fenak>
but i do like other stuff in my mac..
<halogenandtoast>
class methods are just like static methods
<fenak>
:)
<Trudko>
halogenandtoast: sorry not sure what you mean can you please rephrase?
angusiguess has joined #ruby
<halogenandtoast>
class Foo; puts "Hello; end # when puts is run, the current binding is Foo's binding, however foo inherits from Kernel
aaronmcadam has joined #ruby
<halogenandtoast>
But yes it operates like a static block in java
Iszak has quit []
<fenak>
xyproto: oh yeah, and iphone and ipad integration and stuff like that..
<xyproto>
fenak: I see :)
<xyproto>
fenak: yeah, that's true, for ios development you need a mac. Right?
<halogenandtoast>
xyproto: Yes pretty much.
<fenak>
xyproto: yeah.. but for hacking, i prefer arch..
<xyproto>
would a hackingtosh work too?
v0n has quit [Ping timeout: 245 seconds]
<fenak>
xyproto: yeah, it would..
<halogenandtoast>
xyproto: You just need something running OSX
<xyproto>
or osx in a virtual machine? (even though it's not officially blessed)
jetblack has joined #ruby
Vektur has joined #ruby
<xyproto>
ok, so one doesn't have to be a registered apple-dev as well?
<fenak>
xyproto: i tried that, but could not make the vm run... lol..
<fenak>
xyproto: you need that..
<halogenandtoast>
xyproto: You need to be registered if you want to submit the app
<halogenandtoast>
or if you want your app to run on your phone
<halogenandtoast>
You can run it in the simulator all day long though.
dfyuij has quit [Ping timeout: 252 seconds]
cantonic has quit [Read error: Connection reset by peer]
<fenak>
i spend so much time on the shell that my mac is underpowered compared to my arch.. :/
<xyproto>
halogenandtoast: ok, so xcode might perhaps be within reach, even unregistred? (I couldn't find it, last time I tried to look for a possibility of developing for ios on a non-mac)
<halogenandtoast>
Xcode comes on the OSX disk
<xyproto>
fenak: btw, if you use a mac and an arch server, I have a great tip: the program named "mosh"
<shock_one>
halogenandtoast, it's not true
<fenak>
xyproto: i've setup one hackintosh once... but i think it's better to just save some more money and get a mac..
<xyproto>
fenak: it's much better than ssh for picking up the session if the connection breaks
<halogenandtoast>
shock_one: depends on the osx version I guess
<xyproto>
fenak: it's just one pacman -S away on the arch server, and should be relatively easy to install on the mac as well, I have a friend that uses that combination and loves it
<fenak>
xyproto: i s2 pacman
<halogenandtoast>
Anyways, back to writing my language, I've been in here too long :p
reinaldob has quit [Remote host closed the connection]
<xyproto>
halogenandtoast: see you :)
halogenandtoast has quit [Quit: halogenandtoast]
<fenak>
halogenandtoast: nice talk! c ya.
<fenak>
xyproto: actually, i'll try because i'm curious..
<fenak>
because i have arch only in my workstation..
<fenak>
servers are centos.. and i can't access them outside my work..
krainboltgreene has quit [Quit: ["Textual IRC Client: www.textualapp.com"]]
<fenak>
but to be honest, i wouldnt put arch on a server.. lol
timonv_ has joined #ruby
swex has joined #ruby
rrkm-Rx has quit [Ping timeout: 246 seconds]
<xyproto>
Well, CentOS is a fairly stable and serious distro, nothing wrong with using that for a server. One has to keep up with security updates, and installing modern servers and frameworks can be a hassle, though. But other than that, stable and runs like a clock.
timonv has quit [Read error: Connection reset by peer]
danshultz has quit [Remote host closed the connection]
jjbohn has joined #ruby
workmad3 has quit [Ping timeout: 244 seconds]
<fenak>
xyproto: i already got headaches with arch on my dev machine.. lol
jackyalcine has quit [Quit: Quit]
<xyproto>
I would put Arch on several servers, but only behind the company firewall, which preferrably runs some sort of obscure BSD-firewall-distro ;)
<fenak>
suddenly something updates and puff.. there goes vmware, some ruby gems, and stuff..
<fenak>
actually, something is always glibc..
<fenak>
lol
<xyproto>
yeah, one has to be considerate when upgrading. If one reads the arch news before upgrading, one should be safe, though.
vlad_starkov has joined #ruby
<fenak>
xyproto: but i think it's the best distro out there...
<fenak>
i've learned a lot using it..
<xyproto>
yey \o/ :)
<fenak>
but i've come from slackware.. so suffering was already part of my hacklife.
<xyproto>
me too. The package management system is the best I've encountered. Downgrading packages on Debian was a nightmare (needed it when I had a sucky ati card and used the horrible drivers, had to downgrade X)
<fenak>
xyproto: yeah... but ati drivers suck on every distro.
<xyproto>
I also come from Slackware! Used zipslack and slackware 4 back in the day. Ah, sasteroids, the memories.
jonathanwallace has joined #ruby
<fenak>
xyproto: slackware is awesome indeed.. but non-practical for work
<Akuma>
I mean it would force me out of the current iteration
<fenak>
for i in 0..5 do; next if var[i] == x; end
<fenak>
yeah.. it would.
<Akuma>
I need to remain in the loop and finish what I have to do, and just want to skip the next iteration
jonathanwallace has quit [Ping timeout: 244 seconds]
<fenak>
you don't know if it has to be skipped on the current?
<xyproto>
Akuma: just introduce a boolean variable, something like "skipnext", set it to false outside of the loop, then set it to true at your condition. Then at the bottom of the loop, if skipnext then next
<Akuma>
I'll give that a try
<Akuma>
thank you guys
vlad_starkov has quit [Ping timeout: 252 seconds]
<xyproto>
there is probably a better way, though
<fenak>
xyproto: i use some of this boolean control... but it does look ugly, doesnt it?
<xyproto>
yes, it's horrible :D
apok has quit [Quit: apok]
<xyproto>
and seldom needed, especially with a rich syntax as in ruby
<fenak>
yeah..
joeycarmello has joined #ruby
<fenak>
gotta go.. dinner time... c ya!
<xyproto>
see you! :)
fenak has quit [Quit: leaving]
voodoofish has joined #ruby
Akuma has quit [Read error: Connection reset by peer]
louisror has quit [Ping timeout: 256 seconds]
yshh has joined #ruby
reinaldob has joined #ruby
dreinull has joined #ruby
Xeago has quit [Remote host closed the connection]
lunarjar has quit [Remote host closed the connection]
<dreinull>
um, how do I use use the rdoc repo as a bundler source. bundler complains because it doesn't have a gemspec file.