<apeiros_>
elliottcable: next returns from the block to the yielding method
<apeiros_>
and it returns with the value passed to next (defaulting to nil)
<elliottcable>
apeiros_: damn. okay, thanks.
<elliottcable>
how's life? long time no see.
<apeiros_>
life's fine
<apeiros_>
enjoying sc2 and some js at the moment
<elliottcable>
<3 JS :3
<apeiros_>
meh, js' stdlib is shit
<apeiros_>
and the language has tons of syntactical shortcomings
kbeddingfield has quit [Remote host closed the connection]
<apeiros_>
but if you want, you can review my benchmark utility function in a bit. I'm not quite sober anymore, so a peer review might not be a bad idea…
manizzle has quit [Ping timeout: 252 seconds]
Kichael has joined #ruby
jamjam has quit [Ping timeout: 260 seconds]
samphippen has quit [Quit: Computer has gone to sleep.]
* elliottcable
laughs
Cultofmetatron has joined #ruby
ffranz has quit [Quit: Leaving]
<elliottcable>
don't all languages, though? And I'm, personally, not a big fan of the idea of a “standard library.”
<apeiros_>
elliottcable: with js, you want one. a big one.
<apeiros_>
for the simple reason that you don't want to push a few megabytes of your own library over the wire all the time
mercwithamouth has quit [Ping timeout: 256 seconds]
<apeiros_>
and things like encryption, decryption, compression, decompression, image processing etc. would be quite nice, especially with some hardware support
<apeiros_>
and that can only be provided by a browser supplied stdlib
<elliottcable>
I'd argue that better caching, and publically-available and widely-utilized libraries (such as jquery served via Google's CDN, or similar) is a better solution
dylanjha has quit [Quit: Leaving...]
<apeiros_>
no
<elliottcable>
as for hardware support, again, internalization to the language isn't the solution
<elliottcable>
not a conversation to muck up #Ruby with. Check your /invite!
Monie has quit [Ping timeout: 260 seconds]
Cultofmetatron has quit [Remote host closed the connection]
akem has joined #ruby
akem has quit [Changing host]
akem has joined #ruby
caleb_io has joined #ruby
zomgbie has quit [Ping timeout: 246 seconds]
<elliottcable>
Is there any way to break out of an outer loop? I can't remember if Ruby's got named loops.
<apeiros_>
throw/catch
akem has quit [Ping timeout: 268 seconds]
awaage has joined #ruby
dakine has quit [Ping timeout: 256 seconds]
jenrzzz has joined #ruby
carlzulauf has quit [Ping timeout: 260 seconds]
hotovson has quit [Remote host closed the connection]
carlzulauf has joined #ruby
nesoi has joined #ruby
jarred has quit [Quit: jarred]
<nesoi>
ruby is complaining about an if clause I have like this: if (Model.where(query) or Model.where(query)
<nesoi>
it doesn't like the or
<nesoi>
should be: if (Model.where(query) or Model.where(query))
<nesoi>
it complains "expecting )"
<nesoi>
how would I say that?
moshee has quit [Ping timeout: 252 seconds]
moshee has joined #ruby
<apeiros_>
you're missing a ) somewhere
<apeiros_>
it doesn't have an issue about the or
<apeiros_>
and it says so actually…
tvw has quit [Ping timeout: 245 seconds]
Hanmac1 has joined #ruby
<nesoi>
hm. I guess I should have used
<nesoi>
||
mahmoudimus has quit [Quit: Computer has gone to sleep.]
<nesoi>
but that also fails the same way
<apeiros_>
…
<nesoi>
?
<apeiros_>
"let's not figure out what I did wrong, playing guessing games is so much more fun"
<nesoi>
I counted the parens
<apeiros_>
ruby is better at counting the parens and putting them into context…
mikepack has joined #ruby
<nesoi>
also, the statement used to be: if Model.where(querey)
<apeiros_>
but yes, if the code isn't what you pasted here, then it might well be because of the 'or'
<nesoi>
and I just copied the Model.where(query) and put parens around it
Hanmac has quit [Ping timeout: 252 seconds]
<apeiros_>
but in the code which you did post, it *definitively* is not because of the 'or'.
kbeddingfield has joined #ruby
dakine has joined #ruby
<apeiros_>
how about you take out the guesswork and put your code up on gist or pastie?
<[Pi]>
havenn_: not sure whether or not I have the commandline tools... And I may have fiddled around with homebrew at some point
codezombie has joined #ruby
joeycarmello has joined #ruby
<[Pi]>
my system is going to be quite a mess I think. I've been working purely within Xcode, and now I've moved to Unity and been working purely within that
butblack has joined #ruby
<nesoi>
ok, thanks apeiros_! later..
nesoi has left #ruby [#ruby]
carlzulauf has quit [Ping timeout: 260 seconds]
voodoofish430 has quit [Quit: Leaving.]
<[Pi]>
this is the first time I have actually needed something outside of these frameworks ( https://gist.github.com/3780235 )
rabidpraxis has quit [Remote host closed the connection]
blazes816 has joined #ruby
cakehero has joined #ruby
fungoat has quit [Quit: fungoat]
havenn_ has quit [Remote host closed the connection]
angusmorrison has quit [Quit: angusmorrison]
dylanjha has quit [Quit: Leaving...]
<[Pi]>
havenn: I didn't have the command line developer tools, currently installing them from Xcode's preferences -> downloads
<[Pi]>
I need homebrew as well?
<waxjar>
home-brew's always good to have. if your still following my links guide you need it as well i believe
cakehero has quit [Quit: Computer has gone to sleep.]
mmealling has joined #ruby
thone has joined #ruby
thone_ has quit [Ping timeout: 244 seconds]
zomgbie has joined #ruby
<[Pi]>
Is anyone using this JewelryBox GUI? I don't think it's ready for public release, any error in the installation and it instantly blanks the screen... no indication of where to find the log
<[Pi]>
installation gets a bit further before dying
<[Pi]>
maybe if I update my homebrew as well it will complete...
dylanjha has joined #ruby
spygame213 has joined #ruby
SPYGAME has quit [Ping timeout: 240 seconds]
caleb_io has quit [Quit: caleb_io]
love_color_text has joined #ruby
<apeiros_>
I'd open an issue/ticket/bugreport
headius has quit [Quit: headius]
emergion has joined #ruby
zomgbie has quit [Ping timeout: 252 seconds]
<[Pi]>
I'm not finding homebrew from the command line... and the links I'm finding all suggest installing it into /usr/local/
<apeiros_>
I don't think I created /usr/local by hand when I installed homebrew, I'd assume it will create it if it isn't present.
radic has quit [Ping timeout: 246 seconds]
spygame213 has joined #ruby
SPYGAME has quit [Ping timeout: 246 seconds]
<waxjar>
/usr/local exists, its just a hidden folder
angusmorrison has joined #ruby
datafirm has joined #ruby
<datafirm>
hello!
<datafirm>
I have a rake task (worker) running and I want to HUP (or something similar) to reload the code but keep the process running. Do I have to intercept this signal myself, or is there a standard way of doing such?
nari_ has joined #ruby
mercwithamouth has joined #ruby
<apeiros_>
datafirm: see Kernel#trap
<datafirm>
apeiros_: Thanks. Sounds like I need to interpret the signal and do the reloading myself.
<rking>
datafirm: I'm confused at what it is you don't want to do.
<rking>
You mean the reloading part in particular?
kbeddingfield has joined #ruby
<rking>
The problem with reloading .rb's is that many of them do not act identically upon reload, so it's a bit hard to make a general solution. Maybe there's a gem that helps
<datafirm>
rking: I have foreman running a batch or processes and I want to one ruby process to reload it's codebase, but not die.
dylanjha has quit [Quit: Leaving...]
<datafirm>
rking: It's a simple rack app, so I'll see what I can come up with.
aboudreault has joined #ruby
aboudreault has left #ruby ["Leaving"]
<datafirm>
rking: Im also using a gem called guard to hellp.
Takehiro has joined #ruby
<datafirm>
So Im trying got write script in guard knowing that I have the pid of the process needing to restart
FifthWall has joined #ruby
angusmorrison has quit [Read error: Connection reset by peer]
<datafirm>
suppose I don't really care if it dies. I just need to be sure that my modifications to foreman rewrite the pid correctly
Takehiro has quit [Ping timeout: 245 seconds]
angusmorrison has quit [Client Quit]
<[Pi]>
<sigh> even with successful installation of developer commandline tools ( through Xcode ) and homebrew, JewelryBox fails
<datafirm>
rking: actually, when the process dies, so does foreman.. hmm
love_color_text has quit [Remote host closed the connection]
butblack has quit [Quit: butblack]
<waxjar>
[Pi] just give up jewelrybox, you'll be working plenty with the CLI anyway probably
bapa has quit [Read error: Connection reset by peer]
joast has quit [Quit: Leaving.]
<[Pi]>
waxjar: mmk
slainer68 has quit [Remote host closed the connection]
`brendan has joined #ruby
bapa has joined #ruby
hsbt is now known as hsbt_away
dylanjha has joined #ruby
cakehero has quit [Client Quit]
mmitchell has joined #ruby
lecreme has joined #ruby
Hanmac has joined #ruby
headius has joined #ruby
mmitchell has quit [Ping timeout: 245 seconds]
lecreme is now known as BoomCow
scx has quit [Ping timeout: 248 seconds]
a_a_g has joined #ruby
mmealling has quit [Quit: Leaving.]
Nisstyre-laptop has joined #ruby
macabre has joined #ruby
Hanmac1 has quit [Ping timeout: 276 seconds]
scx has joined #ruby
vitor-br has joined #ruby
kbeddingfield has joined #ruby
Cultofmetatron has quit [Remote host closed the connection]
slainer68 has joined #ruby
slainer68 has quit [Remote host closed the connection]
hbpoison has quit [Read error: Connection reset by peer]
kaawee has quit [Ping timeout: 260 seconds]
g-ram has quit [Quit: Computer has gone to sleep.]
drago757 has quit [Quit: drago757]
mmealling has joined #ruby
cobragoat has joined #ruby
Cultofmetatron has joined #ruby
g-ram has joined #ruby
Cultofmetatron has quit [Remote host closed the connection]
zomgbie has joined #ruby
shadoi has quit [Quit: Leaving.]
jlwestsr has quit [Ping timeout: 246 seconds]
mikepack has quit [Remote host closed the connection]
scx has quit [Read error: Connection reset by peer]
n_blownapart has joined #ruby
radic has quit [Disconnected by services]
radic_ has joined #ruby
omry has quit [Ping timeout: 252 seconds]
macmartine has joined #ruby
butblack has joined #ruby
zomgbie has quit [Ping timeout: 265 seconds]
<n_blownapart>
http://pastie.org/5121932 hi . I'm trying to figure out lines 6,7 and 12-17 in this prog. i.e. I'm still not sure what an enum is. thanks.
macmartine has quit [Client Quit]
emergion has quit [Quit: Computer has gone to sleep.]
iamjarvo has joined #ruby
spygame213 has quit [Ping timeout: 255 seconds]
SPYGAME has joined #ruby
cobragoat has quit [Ping timeout: 265 seconds]
mmitchell has joined #ruby
nappy has joined #ruby
SCommette has joined #ruby
jlwestsr has joined #ruby
SCommette has quit [Client Quit]
tekknolagi has joined #ruby
<tekknolagi>
hi guys, quick question. i'm using datamapper with a redis adapter for a db
<tekknolagi>
and for some reason when i try and query (with .where), i get a NoMethodError
<tekknolagi>
you can see this live at brightswipe.com - just try and upload/tag a torrent.
<tekknolagi>
(it's in dev mode so it will show code)
<tekknolagi>
what's wrong?
ryanf has quit [Ping timeout: 260 seconds]
jaygen has quit [Remote host closed the connection]
dylanjha has quit [Quit: Leaving...]
Cultofmetatron has joined #ruby
spygame213 has joined #ruby
<blazes816>
tekknolagi: i'm looking at the DM docs right now and I don't see anything about a where method
<tekknolagi>
(just refresh and try the POST again)
<tekknolagi>
brb
mmitchell has quit [Remote host closed the connection]
joast has joined #ruby
<blazes816>
okay, now that looks like an issue with the Redis adapter
jarred_ has joined #ruby
<blazes816>
it appears to have not implemented that method
<blazes816>
:(
<tekknolagi>
blazes816: dammit. is there a way i could check if a list is empty otherwise?
datafirm has quit [Quit: datafirm]
<tekknolagi>
instead of .count > 0, that is
emergion has joined #ruby
<blazes816>
list.empty?
<tekknolagi>
hmm
<tekknolagi>
trying
<tekknolagi>
brb
Takehiro has joined #ruby
<tekknolagi>
(i have irssi and tmux running in the same window, have to switch between)
<blazes816>
that sucks man, but np
<tekknolagi>
blazes816: aaaagh. okay. so the .empty? == false worked, but now i have "no method .include?" for some code that (at least i think) doesn't check that
<blazes816>
if model.allowed_writer_methods.include?(setter = "#{name}=")
<blazes816>
is the line
Cultofmetatron has quit [Remote host closed the connection]
<blazes816>
so, allowed_writer_methods is returning nil
<tekknolagi>
hmm. what does that mean for me?
<blazes816>
not quite sure yet
<tekknolagi>
(i'm not exactly sure what's going on behind the scenes with datamapper or the redis adapter)
<tekknolagi>
i mean i could switch to mysql if it's that bad
<blazes816>
can you gist your Tag model?
<blazes816>
m
<tekknolagi>
sure
<blazes816>
me either
spygame213 has quit [Ping timeout: 246 seconds]
<blazes816>
redis and mysql are for different jobs
mneorr has quit [Read error: Connection reset by peer]
zomgbie has joined #ruby
mneorr has joined #ruby
<vectorshelve>
blazes816: thanks :)
SPYGAME has joined #ruby
spygame213 has quit [Ping timeout: 245 seconds]
<vectorshelve>
blazes816: i can be replaced with a meaningful word.. what could be a meaningful word for increment value ?
<blazes816>
index would be the best work
<blazes816>
word*
<blazes816>
or accum
zomgbie has quit [Ping timeout: 245 seconds]
<vectorshelve>
blazes816: but dude... the id isnt get setting in order of id of user.. I expect user with id 1 to have 100000 and user with id 2 to have 100001 like that
<vectorshelve>
blazes816: this isnt setting it like that
justinmcp has quit [Remote host closed the connection]
Chryson has quit [Quit: Leaving]
pskosinski has joined #ruby
robustus has joined #ruby
lukeholder has quit [Quit: Computer has gone to sleep.]
anderse has joined #ruby
yaymukund has joined #ruby
anderse has quit [Client Quit]
yakko_ has quit [Read error: Connection reset by peer]
tchebb1 has quit [Ping timeout: 272 seconds]
yakko has joined #ruby
FifthWall has quit [Quit: Goodbye everyone]
awestroke has joined #ruby
nyrb has quit [Remote host closed the connection]
justinmcp has joined #ruby
pehlert has joined #ruby
<pehlert>
Hi everyone. Quick question, is there any way to tell ruby that the default encoding of my files is UTF-8? I
haxrbyte has joined #ruby
<pehlert>
I'm having a few German clients and I always end up with "#-*- encoding: UTF-8 -*-" in my files as soon as I use umlauts
<Hanmac>
pehlert -Ku but i dont trust it
hbpoison has joined #ruby
<pehlert>
Hanmac: So the official way is to use magic comments on every single file?
vlad_starkov has quit [Remote host closed the connection]
vlad_starkov has joined #ruby
<pehlert>
I mean, it's not the worst way of handling it after all, but I doubt it would've hurt anyone to make UTF-8 the default encoding
<Hanmac>
i would prefer it ... (because -K does not appear at ruby --help )
blacktulip has joined #ruby
vlad_starkov has quit [Remote host closed the connection]
Juul has joined #ruby
yakko has quit [Ping timeout: 245 seconds]
vlad_starkov has joined #ruby
yakko has joined #ruby
<pehlert>
Hanmac: Heh, thanks though
* Hanmac
is germany too so he knows about öäü and ß
khakimov has quit [Quit: Computer has gone to sleep.]
<shevy>
I still use ISO encodings rather than UTF-8
<shevy>
I usually set "# Encoding: ASCII-8BIT" in .rb files on the second line
<shevy>
quick question
<shevy>
user_input = gets.chomp
<shevy>
vs
<shevy>
user_input = $stdin.gets.chomp
<shevy>
what to use?
pskosinski has quit [Read error: Connection reset by peer]
daniel_- has joined #ruby
icooba has joined #ruby
darthdeus has quit [Quit: Leaving...]
Brainix has quit [Quit: Brainix]
haxrbyte has quit [Remote host closed the connection]
pdtpatr1ck has quit [Quit: pdtpatr1ck]
<pehlert>
shevy: If you use ISO encodings for file size, I'd recommend the first approach :-P
shtirlic has joined #ruby
<shevy>
it's our fate, with german umlauts we must specify the encoding to use since ruby 1.9x :(
cakehero has joined #ruby
fantazo has joined #ruby
<pehlert>
Hanmac: I'm living in Malta right now and there is a lot more of weird characters here ;-) So actually I'm quite happy when all I have a deal with is "ä ö ü ß" ;-)
irleif has joined #ruby
zomgbie has joined #ruby
rippa has quit [Ping timeout: 268 seconds]
pdtpatr1ck has joined #ruby
pskosinski has joined #ruby
Uzix has left #ruby [#ruby]
<shevy>
I use Signal.trap('SIGINT') { exit } but why does bash give me a ^C output still?
<shevy>
this ^C is annoying me!
hekin has quit [Ping timeout: 245 seconds]
hotovson has joined #ruby
rippa has joined #ruby
irleif has quit [Ping timeout: 265 seconds]
kramutils has joined #ruby
<pehlert>
I'd love to hear the answer on this
<Hanmac>
hm i think the ^C is printed by bash, and not by the ruby programm
irleif has joined #ruby
hron84 has joined #ruby
havenn_ has joined #ruby
<shevy>
aha
havenn has quit [Ping timeout: 245 seconds]
tgenov has joined #ruby
Takehiro has joined #ruby
jgrevich has quit [Quit: jgrevich]
answer_42 has quit [Ping timeout: 276 seconds]
therod has joined #ruby
<shevy>
cool
<shevy>
raise SystemExit is like exit
<shevy>
:)
Tuxist has joined #ruby
classix has quit [Ping timeout: 252 seconds]
wallerdev has quit [Quit: wallerdev]
bluesm has joined #ruby
cantonic has quit [Quit: cantonic]
justinmcp has quit [Remote host closed the connection]
chimkan has joined #ruby
shtirlic has quit [Remote host closed the connection]
havenn_ has quit [Remote host closed the connection]
c0rn_ has joined #ruby
casheew has quit [Read error: Connection reset by peer]
leoncamel has quit [Remote host closed the connection]
Takehiro has quit [Remote host closed the connection]
leoncamel has joined #ruby
Alperen has joined #ruby
<Alperen>
hi. i am trying to run a ruby script. but when run it gives me an error. export.rb:1:in `require': no such file to load -- octokit (LoadError)
<Alperen>
how can i fix thix?
<Alperen>
i already run gem install octokit
vlad_starkov has quit [Remote host closed the connection]
<Hanmac>
"centos - software from the last century"
Tuxist has quit [Read error: Connection reset by peer]
<Alperen>
:D
<Alperen>
but it is good for servers i think
<mohanmcgeek>
distro repos never had updated software.
<mohanmcgeek>
and it is assumed to be good for servers because it's redhat for free. :O
magggie has joined #ruby
havenn has quit [Ping timeout: 276 seconds]
<Hanmac>
"software from the last century on hardware from the last century" :D
kaawee has quit [Ping timeout: 246 seconds]
<Alperen>
:D:D
krisbulman has quit [Client Quit]
<magggie>
hi
<Mon_Ouie>
I'm actually surprised they even have 1.8.7
<mohanmcgeek>
Alperen: You should be using ruby 1.9.3 already..
<mohanmcgeek>
or you should have a strong reason to continue using 1.8.7
<Alperen>
:S
<Alperen>
i am new to ruby so i just installed from repo for redmine
<Alperen>
if i delete ruby and install rvm what will happen to my gems? :D
<mohanmcgeek>
^ you don't "delete" ruby...
cento has quit [Ping timeout: 260 seconds]
Vinz_` is now known as Vinz_
roadt` has joined #ruby
<mohanmcgeek>
and you can make a backup of your gem lists
Russell^^ has joined #ruby
roadt has quit [Ping timeout: 264 seconds]
<Alperen>
it is installing ruby 1.9.3 now :D
daniel_- has joined #ruby
<mohanmcgeek>
Alperen: Nice :)
<mohanmcgeek>
CheesyInfo: 1.9.3 has inbuilt rubygems support. So you don't need to require "rubygems"
jamjam has joined #ruby
yakko has quit [Read error: Connection reset by peer]
<Alperen>
that is good :)
yakko has joined #ruby
mercwithamouth has joined #ruby
<shevy>
yeah
<shevy>
and perhaps 2.0 will have all of standardlib gemified
<shevy>
debian will happily make use of that to cripple things away!
<mohanmcgeek>
Btw, people. Thre's a gem from thoughtbot called cocaine. What advantage does it give over backticks?
<shevy>
"Sorry, your installation of ruby lacks these 135 .gem files."
<Kovensky>
shevy: well, perl has had its standardlip CPANified for ages
<Kovensky>
and debian doesn't ship it crippled
<Kovensky>
=p
<shevy>
who knows what this gem can do mohanmcgeek?
<Kovensky>
standardlib*
<shevy>
although perhaps it is like popen and provides separate streams
<shevy>
Kovensky, but gem has become better than cpan!
<Kovensky>
how so
Takehiro has joined #ruby
<Kovensky>
it is easier to contribute to, but I don't see how that makes it better on the user side
zomgbie has joined #ruby
<shevy>
there are 2953 gems on rubygems.org
<shevy>
hmm I doubt these numbers
<shevy>
I alone have 18... so this cant be right.
<Kovensky>
"The Comprehensive Perl Archive Network (CPAN) currently has 114,558 Perl modules in 25,995 distributions, written by 10,127 authors, mirrored on 274 servers. "
<shevy>
" Displaying Rubygem 1 - 30 of 2953 in total"
<shevy>
yeah something is fishy there
<shevy>
3000 / 20 is ... 150
<shevy>
only 150 folks using rubygems as authors wtf that can't be right
psycho_one has quit [Remote host closed the connection]
<[Pi]>
could someone take a look and help me through?
<mohanmcgeek>
So, 46115 - 46093 = 22 gems with numbers as 1st char.
<Alperen>
i am getting this error when i try to install new gems. /usr/local/rvm/rubies/ruby-1.9.3-p286/lib/ruby/1.9.1/yaml.rb:56:in `<top (required)>':
<Alperen>
It seems your ruby installation is missing psych (for YAML output).
philcrissman_ has joined #ruby
<[Pi]>
I'm getting confused now. it appears that I already had a ' system ruby ' version, I checked yesterday before I installed anything. but it was really low, much lower than the version officially shipped with OS X lion
<Kovensky>
install libyaml
<apeiros_>
[Pi]: Lion ships with 1.8.7
<Kovensky>
the annoying bit is that if you forgot to install openssl headers, or libyaml, or whatever, you have to completely recompile ruby :(
<[Pi]>
I don't understand how that could be... can I do the check again now? how do I check my system function now that I have fiddled with homebrew and France and installed a new version?
<[Pi]>
^ system version
<Alperen>
i did rvm pkg install libyaml
<[Pi]>
( sorry, speech recognition errors )
<mohanmcgeek>
[Pi]: You're using rvm. But the /usr/bin/ command is using system's 1.8 ruby.. I think.
mercwithamouth has quit [Ping timeout: 245 seconds]
<Alperen>
there is no ruby 1.8 anymore :D
<Alperen>
i removed it
<shevy>
Alperen I dont know what that command does, but in standard ruby, one has to recompile after having compiled libyaml
<[Pi]>
mohanmcgeek: I'm very confused. I think I might have used both.
krisbulman has joined #ruby
JohnBat26 has joined #ruby
philcrissman_ has quit [Remote host closed the connection]
<[Pi]>
I spent all of yesterday following various scraps of instruction on how to install and update Ruby, so my system is going to be a bit of a tangle
drago757 has quit [Client Quit]
haxrbyte has joined #ruby
<[Pi]>
I definitely interacted with both homebrew and rvm
magggie has left #ruby [#ruby]
Takehiro has quit [Remote host closed the connection]
<mohanmcgeek>
I'm not sure what you're doing.. but the gem you're trying to install, did get installed successfully in rvm's ruby 1.9.3
<shevy>
"I work in an university environment, and I have for many years. There, I am not the superuser, so I have to install every extra app I need in my $HOME directory."
<shevy>
sadly gobolinux died years ago :(
<mohanmcgeek>
shevy: But getting ruby installed is also easy with rvm..
<mohanmcgeek>
i dont want to do curl-ing
<pmros>
don't forget rbenv
<shevy>
yeah and getting ruby installed is also easy without rvm :)
hbpoison has joined #ruby
<shevy>
I have 1.8.7 and 1.9.3something right now in $PROGRAMS/Ruby/VERSION
krisbulman has joined #ruby
bluenemo has quit [Remote host closed the connection]
Takehiro has joined #ruby
pehlert has joined #ruby
<mohanmcgeek>
[Pi]: Actually, I think you have only one rvm ruby installed
<shevy>
[Pi] how many rubies do you need?
<mohanmcgeek>
and other via homebrew/OSX
<shevy>
hehehe coooool
<shevy>
mixing homebrew with rvm
kil0byte has quit [Ping timeout: 272 seconds]
<mohanmcgeek>
shevy: I don't think that's a huge problem... rvm is very isolated and it is loaded. :P
pehlert has quit [Client Quit]
krisbulman has quit [Client Quit]
medik has quit [Ping timeout: 245 seconds]
<shevy>
[Pi] mohanmcgeek has a lot of faith in you :)
<shevy>
you could always listen to pmros
<shevy>
and install rbenv additionally
<shevy>
:>
kaneda__ has quit [Ping timeout: 240 seconds]
<pmros>
:)
arya has joined #ruby
justinmcp has quit [Remote host closed the connection]
hron841 has joined #ruby
hron84 has quit [Read error: Connection reset by peer]
hron841 has quit [Client Quit]
hron84 has joined #ruby
chussenot has joined #ruby
toto_ has joined #ruby
krisbulman has joined #ruby
havenn has joined #ruby
instinkt has joined #ruby
pehlert has joined #ruby
arya has quit [Ping timeout: 268 seconds]
slainer68 has quit [Remote host closed the connection]
havenn has quit [Ping timeout: 240 seconds]
pehlert1 has joined #ruby
pehlert has quit [Read error: Connection reset by peer]
maesbn has joined #ruby
arya has joined #ruby
g-ram has joined #ruby
clj_newb has quit [Ping timeout: 256 seconds]
helichopter has joined #ruby
zomgbie has joined #ruby
Xeago has quit [Remote host closed the connection]
jude0 has joined #ruby
Xeago has joined #ruby
<crocket>
Oh ruby
zomgbie has quit [Ping timeout: 246 seconds]
arya has quit [Ping timeout: 256 seconds]
xcvd`` has joined #ruby
zigidias has quit [Remote host closed the connection]
JarJar has joined #ruby
pmros has quit [Quit: Konversation terminated!]
pehlert1 has quit [Read error: Connection reset by peer]
Xeago has quit [Ping timeout: 272 seconds]
pehlert has joined #ruby
jslowe has quit [Ping timeout: 255 seconds]
arya has joined #ruby
irleif has joined #ruby
nobitoyep has quit [Ping timeout: 245 seconds]
<[Pi]>
can I start over? I didn't understand how much of the above was directed to my thread...
<[Pi]>
all this is still unfamiliar territory for me...
<canton7>
[Pi], you don't have a C99 compiler installed
<[Pi]>
canton7: I thought I fixed this yesterday going through a set of instructions that came onscreen when I did 'rvm install 1.9.2'
<[Pi]>
the instructions pointed out that new Xcode 4.2+ replaces the old GCC compiler with LLVM
<[Pi]>
and offers a process of getting the old compiler back through homebrew (IIRC)
<[Pi]>
which I completed...
jlwestsr has joined #ruby
F1skr has joined #ruby
<[Pi]>
canton7: how Should I proceed?
chussenot has quit [Quit: chussenot]
krisbulman has quit [Quit: krisbulman]
<canton7>
no idea I'm afraid. If you're sure you've got a compiler installed, in your path, which takes the --std=c99 option..."
kil0byte has joined #ruby
krisbulman has joined #ruby
Takehiro has quit [Remote host closed the connection]
originerd has joined #ruby
shtirlic has joined #ruby
jaygen has joined #ruby
irleif has quit [Read error: Connection reset by peer]
JohnBat26 has joined #ruby
iamjarvo has joined #ruby
pehlert1 has joined #ruby
pehlert has quit [Read error: Connection reset by peer]
rjsamson has joined #ruby
jude0 has left #ruby [#ruby]
aaroncm has quit [Remote host closed the connection]
thatRD has quit [Quit: thatRD]
Serial_Killer_C has joined #ruby
irleif has joined #ruby
aaron has joined #ruby
Takehiro has joined #ruby
aaron is now known as Guest40106
Guest40106 is now known as aaroncm
pehlert has joined #ruby
Vinz_` is now known as Vinz_
pehlert1 has quit [Read error: Connection reset by peer]
coffer has quit [Remote host closed the connection]
morozovm has joined #ruby
zomgbie has joined #ruby
slainer68 has joined #ruby
morozovm has quit [Client Quit]
krisbulman has quit [Quit: krisbulman]
havenn has joined #ruby
irleif has quit [Read error: Connection reset by peer]
rafter has joined #ruby
slainer68 has quit [Ping timeout: 260 seconds]
deo_ has joined #ruby
daniel___ has joined #ruby
irleif has joined #ruby
havenn has quit [Ping timeout: 246 seconds]
akemEikko has joined #ruby
akem has quit [Read error: Connection reset by peer]
akemEikko has quit [Max SendQ exceeded]
Liothen has quit [Ping timeout: 246 seconds]
akemEikko has joined #ruby
freeayu has joined #ruby
akemEikko has quit [Max SendQ exceeded]
iamjarvo has quit [Quit: Computer has gone to sleep.]
akemEikko has joined #ruby
daniel___ is now known as damireh
damireh has quit [Quit: damireh]
mikepack has joined #ruby
CaptainKnots has joined #ruby
patatahooligan has joined #ruby
patatahooligan has left #ruby [#ruby]
Serial_Killer_C has quit [Remote host closed the connection]
Morkel has joined #ruby
pehlert has quit [Quit: Leaving.]
iamjarvo has joined #ruby
zomgbie has quit [Ping timeout: 240 seconds]
pehlert has joined #ruby
fantazo has quit [Remote host closed the connection]
vectorshelve has quit [Ping timeout: 245 seconds]
Vecklock has joined #ruby
darthdeus has joined #ruby
SCommette has joined #ruby
vlad_starkov has joined #ruby
kil0byte has quit [Ping timeout: 265 seconds]
Serial_Killer_C has joined #ruby
Ivoz has quit [Quit: WeeChat 0.3.9]
Ivo has joined #ruby
kidoz has joined #ruby
originerd has quit [Quit: Originerd]
zomgbie has joined #ruby
kaneda__ has joined #ruby
Serial_K_ has joined #ruby
Ivo has quit [Client Quit]
Ivo has joined #ruby
jipiboily has joined #ruby
havenn has joined #ruby
kidoz has quit [Remote host closed the connection]
workmad3 has joined #ruby
Serial_Killer_C has quit [Ping timeout: 240 seconds]
maesbn has joined #ruby
jaygen has quit [Remote host closed the connection]
jaygen has joined #ruby
sambio has joined #ruby
Vinz_ is now known as Vinz_`
nobitanobi_ has joined #ruby
krisbulman has joined #ruby
Serial_K_ has quit [Remote host closed the connection]
<nobitanobi_>
Given a hash like this: products = { "food" => ["cereal", "sausage"], "music" => ["cd", "radio"] } -- What would be a proper way to find if a particular sentence is food or music, depending on the words. So, if I have "I love cereal". The sentence would be of "food" type. How would I go through that hash efficiently?
hamed_r has quit [Quit: Leaving]
Ivo has quit [Quit: WeeChat 0.3.9]
Ivo has joined #ruby
Neomex has joined #ruby
Neomex has quit [Client Quit]
gr4v3|\| has joined #ruby
Neomex has joined #ruby
Neomex has quit [Client Quit]
instinkt has quit [Ping timeout: 268 seconds]
akemEikko has quit [Read error: Connection reset by peer]
Xeago has joined #ruby
Ivo has quit [Client Quit]
Ivo has joined #ruby
<canton7>
something like products.select{ |k,v| v.any{ |w| string.contains?(w) } }.keys would do it
<canton7>
nobitanobi_, ^^
maesbn has quit [Remote host closed the connection]
khakimov has joined #ruby
<nobitanobi_>
thanks canton7
<canton7>
oops, replace any{ with ant?{
<canton7>
* any?{
<nobitanobi_>
yep, I saw that. Perfect :)
<Hanmac>
canton7 i would first split the sentence into an array of words, because something like "cd" can cause false-positive
JohnBat26 has quit [Remote host closed the connection]
sailias has joined #ruby
gr4v3|\| is now known as banisterfiend
Agis__ has joined #ruby
mahmoudimus has joined #ruby
<Agis__>
how could I map vim to run the rspec command with the current file I'm editing?
arya has joined #ruby
kkiero has joined #ruby
clj_newb has joined #ruby
pehlert has quit [Quit: Leaving.]
mklappstuhl has quit [Ping timeout: 245 seconds]
erichmenge has joined #ruby
sailias has quit [Quit: Leaving.]
<workmad3>
Agis__: :!rspec %
jgrevich has joined #ruby
<workmad3>
Agis__: :! is a nice one to remember btw, it lets you run an arbitrary shell command ;)
<workmad3>
Agis__: and % will translate to the path of the file in the currently active buffer
<Agis__>
workmad3: nice!
<Agis__>
workmad3: and how could I map this to for example ,R (, is my leader key)
clj_newb has quit [Ping timeout: 255 seconds]
<workmad3>
Agis__: map <leader>R :!rspec %
<workmad3>
Agis__: you might need a <cr> on the end of that, can't quite remember
<workmad3>
Agis__: ah, looking at some of my other mappings, you will
quest88 has joined #ruby
<jaygen>
Hanmac: symbols don't get GC'd so far as I know, if you're creating thousands of them dynamically in a long running program you might run in to high memory usage
<workmad3>
jaygen: no they aren't GC'd... because there is always a reference to a symbol once it has been created
Tuxist has joined #ruby
<workmad3>
jaygen: but at least you didn't make the mistake some people do and class that as a 'memory leak' :)
<apeiros_>
o0
phelps has joined #ruby
arya has left #ruby [#ruby]
<Agis__>
workmad3: others suggested to do a nnoremap. u know w hat's the difference?
<apeiros_>
workmad3: by all means, the way symbols work *is* a memory leak. albeit an intentional one.
<canton7>
RuntimeError: symbol table overflow. Never had that one before
<workmad3>
Agis__: I believe that's a normal mode that is 'map if not already set'
zomgbie has quit [Ping timeout: 240 seconds]
Tuxist has quit [Remote host closed the connection]
<workmad3>
apeiros_: no, they aren't a memory leak... because a memory leak is memory that has been allocated and then all pointers to it have been lost without it being de-allocated
<apeiros_>
that's a narrow definition
Tuxist has joined #ruby
<phelps>
how do you set the value of another attribute inside a attr_writer (ex. method called cash sets a real attribute called amount), so far I've tried amount and @amount (thats the name of the real attribute), perhaps I'm missing something
pehlert has joined #ruby
<apeiros_>
the broad one is memory that is unused and can't be reused
<phelps>
Using ActiveRecord (no rails)
<workmad3>
apeiros_: right, neither definition applies to a symbol though :P
<apeiros_>
workmad3: i.e., your definition is very much C specific
<apeiros_>
workmad3: yes, it does
wakoinc has joined #ruby
<workmad3>
apeiros_: no, because the memory a symbol occupies is *not* unused
<apeiros_>
if you use the symbol :foobazzldazz once in your app and never use it again, you just leaked memory
chimkan has joined #ruby
<apeiros_>
you can't reclaim it. you have no way of reclaiming it.
<workmad3>
apeiros_: no, you simply misused a symbol
<apeiros_>
so?
<apeiros_>
of course you did. but by doing so, you did leak memory.
<workmad3>
apeiros_: the memory has not been 'leaked'
<apeiros_>
of course it has been.
skcin7 has joined #ruby
<workmad3>
apeiros_: the memory is still always referenced, always being used for what it was meant for, always *accessible*, just not *accessed*
<apeiros_>
you're unable to reclaim it.
<apeiros_>
that's pointless
<jaygen>
it's not "leaked" per se, just wasted
<workmad3>
^^
<Hanmac>
"x = 3" also generates symbols :P
<apeiros_>
"hey, I can still access that bit of memory which I no longer need or use"
<apeiros_>
that's a technical detail which doesn't matter
<workmad3>
apeiros_: it does matter, because that's the difference between a memory leak and just inefficient memory use :P
<jaygen>
this is why I don't dynamically generate symbols
<apeiros_>
workmad3: no, it's not
<apeiros_>
you can use memory inefficiently and still reclaim it after that inefficient use
F1skr has joined #ruby
<apeiros_>
inefficient memory use is *temporary*
<apeiros_>
a memory leak is *permanent*
<workmad3>
apeiros_: memory leaks are detectable when the program exits too
<workmad3>
apeiros_: but the symbol table is cleaned up correctly...
<apeiros_>
you're back at C specific viewpoints there
<jaygen>
"In object-oriented programming, a memory leak happens when an object is stored in memory but cannot be accessed by the running code."
<workmad3>
^^
<apeiros_>
not all that is C applies to all other languages.
<jaygen>
technically you can still access the symbol
<apeiros_>
yeah, I can cite from WP too: "A memory leak, in computer science (or leakage, in this context), occurs when a computer program consumes memory but is unable to release it back to the operating system."
<banisterfiend>
workmad3: where do 'cyclic references' leaks exist in your definition? :P
<apeiros_>
you're unable to release a symbol back
<workmad3>
apeiros_: the program can release it
<jaygen>
it can?
<workmad3>
apeiros_: because that's what happens when the ruby runtime process exits
<apeiros_>
workmad3: not from ruby
<workmad3>
apeiros_: in that sense, every object in ruby is a memory leak then
<workmad3>
apeiros_: because you can't actually release any of it
<workmad3>
apeiros_: the garbage collector releases it
<apeiros_>
yes, by stopping to reference it, the memory can reclaimed
<apeiros_>
yes, which is a mechanism you make use of
<jaygen>
yes, here lies the distinction... it's not a leak if the program still has control over the memory space
<apeiros_>
even if indirectly
<workmad3>
apeiros_: right... but symbols are perpetually referenced
<workmad3>
apeiros_: that's part of their functionality
<apeiros_>
workmad3: yes, that's the part about "intentional memory leak"
wakoinc has quit [Remote host closed the connection]
<workmad3>
apeiros_: no, because a memory leak would be memory that isn't reclaimed after all references are lost
<apeiros_>
it's a tradeoff, and a useful one too.
<apeiros_>
you're stuck in a narrow viewpoint :-p
wakoinc has joined #ruby
<jaygen>
I think generating symbols dynamically is bad practice and that was the point.
butblack has quit [Quit: butblack]
<apeiros_>
I think I'll stop arguing at that point, as it's useless. I stand by my point that it is a memory leak by the intended meaning of the term.
JohnBat26 has joined #ruby
<workmad3>
apeiros_: the 'intended' meaning of the word was a term for a bug where all references to memory was lost and couldn't be cleaned up by the program
<Hanmac>
jaygen i never said you should generate them dynamically
<workmad3>
apeiros_: so it's not a memory leak by the intended meaning
maletor has joined #ruby
<apeiros_>
workmad3: see scrollback.
<apeiros_>
I disagree with that viewpoint. end of discussion for me.
<workmad3>
apeiros_: 'the program' includes the ruby runtime :P
butblack has joined #ruby
<apeiros_>
again, already adressed.
blurred has joined #ruby
JohnBat26 has quit [Remote host closed the connection]
<jaygen>
not sure how you would look up a symbol in a hash without generating a symbol to look up
noxoc has quit [Ping timeout: 245 seconds]
<Hanmac>
jaygen you could use symbols without generating them dynamicly
<Hanmac>
and as i said: "x = 3" generates symbols too :P
JohnBat26 has joined #ruby
khakimov has quit [Quit: Computer has gone to sleep.]
<jaygen>
I am actually interested in the answer to my question, look up the value of a hash which has symbols as keys without generating a symbol to look up, in this case, given a sentence which is being split into words.
kiyoura has joined #ruby
<workmad3>
jaygen: well, you could iterate over hsh.keys and look up by that, which would avoid generating additional symbols
<jaygen>
yeah but that would be inefficient
<workmad3>
jaygen: all methods at this point will be inefficient compared to just attempting to use the symbol ;)
<jaygen>
yes I agree
skcin7 has quit [Quit: Computer has gone to sleep.]
vonsar has quit [Quit: This computer has gone to sleep]
skcin7 has joined #ruby
<Hanmac>
jaygen every method definition generates symbols so you should focus your hate one something that deserve it ... like ruby1.8
<jaygen>
methods aren't generally declared dynamically and if you're generating millions of methods you're doing it wrong.
<jaygen>
I don't hate you, I'm genuinely interested, sorry if it comes off the wrong way.
<apeiros_>
it'd beat the purpose of having a hash (iterating over hsh.keys)
<apeiros_>
jaygen: you can't. you'd have to reimplement Hash to be indifferent.
tommyvyo has quit [Quit: Computer has gone to sleep.]
blurred has quit [Ping timeout: 255 seconds]
Xeago has joined #ruby
vonsar has joined #ruby
alee has joined #ruby
rouss has joined #ruby
SCommette has quit [Quit: SCommette]
<apeiros_>
hm, it'd be nice if there was a Symbol.defined?(name)
rouss is now known as Guest66160
irleif has quit [Quit: Computer has gone to sleep.]
<apeiros_>
then you could do it in plain ruby, two step: `class Hash; def has_symbol_key?(key); Symbol.defined?(key) && has_key?(key.to_sym) end; end`
jimeh has quit [Quit: bye]
chimkan__ has joined #ruby
<jaygen>
yeah that would be useful
<apeiros_>
hm, you could implement it in pure ruby
stillEPIK has joined #ruby
<jaygen>
it all comes back to that inefficiency problem though
<apeiros_>
it'd require to keep track of all keys and enter them in a hash of its own
lucaspiller has quit [Remote host closed the connection]
anildigital_work has quit [Remote host closed the connection]
arubin- has quit [Remote host closed the connection]
dkannan has quit [Remote host closed the connection]
NimeshNeema has quit [Remote host closed the connection]
yeban has quit [Remote host closed the connection]
ctevie has quit [Remote host closed the connection]
kapowaz has quit [Read error: Connection reset by peer]
jhowarth has quit [Write error: Broken pipe]
MoMo has quit [Write error: Broken pipe]
<apeiros_>
yes
JarJar has left #ruby ["Leaving"]
<apeiros_>
there we're back at what I said too already - the way symbols work is a tradeoff
<apeiros_>
you trade performance for irreclaimable memory. this is acceptable since there's many situations where it won't lead to a problem.
<Hanmac>
i use symbols as enum replacement
EPIK has quit [Ping timeout: 260 seconds]
<apeiros_>
accepting arbitrary user input of course isn't one of those situations (which is what you covered as "dynamic symbol generation")
chimkan has quit [Ping timeout: 245 seconds]
chimkan__ is now known as chimkan
<apeiros_>
btw. workmad3 - of course you can free *any* pointer - you can always just iterate the full memory space available to an app…
jenrzzz has joined #ruby
<apeiros_>
i.e., if you'd hold on to your definition, then there's no memory leaks at all.
<workmad3>
apeiros_: you can't tell if the memory has been allocated or not though
<apeiros_>
workmad3: so? you can free it. that's all you need in your definition.
<banisterfiend>
workmad3: if your closure accidentally keeps a reference to a huge object (by closing over a local) would you consider that a memory leak?
<apeiros_>
collateral damage wasn't in it :-p
<workmad3>
apeiros_: ' however, many people[who?] refer to any unwanted increase in memory usage as a memory leak, though this is not strictly accurate from a technical perspective.'
<apeiros_>
yeah, "unwanted" is rather broad too…
<apeiros_>
the phrasing of that one sentence is relatively useless anyway
andrew__ has joined #ruby
<apeiros_>
leaking is not about the growth. it's about the inability to reclaim.
krisbulman has quit [Quit: krisbulman]
<workmad3>
apeiros_: from the perspective of the program as a whole, the memory is reclaimable though
andrew__ is now known as andrewhl
<jaygen>
I thought you guys were done
rabidpraxis has quit [Remote host closed the connection]
<apeiros_>
workmad3: as said, I disagree, and I explained why. as said, as per your definition, there are no mem leaks whatsoever, since you can always somehow reclaim all memory.
<jaygen>
not without rebooting the system
<workmad3>
apeiros_: being able to iterate the memory space isn't the same as being able to reclaim the memory, because you have no way of telling what memory needs to be reclaimed at that point
Liquid_X has quit [Ping timeout: 260 seconds]
Takehiro has quit [Remote host closed the connection]
brianpWins has joined #ruby
<workmad3>
apeiros_: still... you're right, I'm right, you're wrong, I'm wrong, still need to be careful with symbols :P
areil has quit [Remote host closed the connection]
Guest66160 has quit [Quit: Computer has gone to sleep.]
tommyvyo has joined #ruby
maletor has quit [Quit: Computer has gone to sleep.]
jenrzzz has quit [Ping timeout: 260 seconds]
vlad_starkov has quit [Remote host closed the connection]
nateberkopec has joined #ruby
mahmoudimus has quit [Quit: Computer has gone to sleep.]
<jude0>
hm i will try that ... yea might not work with Proc... alright thanks for the input. I kind of do not think there is an answer. thanks for trying
dagnachewa has quit [Read error: Connection reset by peer]
<banisterfiend>
jude0: so if you awnt different behaviour for a given array, you have to redefine <=> on the singleton class of the array
<banisterfiend>
(you shoudl not redefine <=> on the Array class itself)
answer_42 has joined #ruby
jlwestsr has quit [Ping timeout: 246 seconds]
psycho_one has quit [Remote host closed the connection]
<telagraphic>
can you set the initialize variable depending if it provided as an argument... if not provided it will default to 0 or if provided if will be the argument given https://gist.github.com/3965616
LucidDreamZzZ has joined #ruby
Morkel has quit [Quit: Morkel]
skcin7 has quit []
mmsequeira has joined #ruby
mmsequeira has quit [Client Quit]
yeban has joined #ruby
SCommette has joined #ruby
rafter has quit [Remote host closed the connection]
skcin7 has joined #ruby
SCommette has quit [Client Quit]
BoomCow has joined #ruby
CaptainJet has quit []
starship has quit [Quit: WeeChat 0.3.9]
krisbulman has quit [Quit: krisbulman]
CaptainJet has joined #ruby
sepp2k has joined #ruby
krisbulman has joined #ruby
darthdeu has joined #ruby
tk__ has quit [Quit: ばいばい]
mark06 has joined #ruby
<mark06>
how to get standard and daylight saving time abbreviations for a given location in tzinfo?
levabalkin has joined #ruby
krisbulman has quit [Client Quit]
clj_newb has quit [Quit: Reconnecting]
clj_newb has joined #ruby
krisbulman has joined #ruby
joast has quit [Ping timeout: 245 seconds]
jmaya has joined #ruby
jenrzzz has quit [Ping timeout: 265 seconds]
levabalkin has quit [Ping timeout: 245 seconds]
aldodelgado has joined #ruby
kramutils has left #ruby [#ruby]
Tuxist has quit [Remote host closed the connection]
Rhynn has quit [Ping timeout: 244 seconds]
<Agis__>
what do you guys for vim auto-completion with ruby?
d2dchat has joined #ruby
Chryson has joined #ruby
helichopter has quit [Quit: Leaving.]
helichopter has joined #ruby
<havenn>
jude0: Just for the heck of it, here is a contrived example of using Ruby 2.0.0 refinements to modify <=>'s behavior with Array.
<apeiros_>
pjs: ah, well, then I'd replace identifier with repository there
<apeiros_>
so you see what it actually is
J-_-L has quit [Quit: Leaving.]
<pjs>
apeiros_ so some how I became the maintainer of a Ruby project when I don't know thing about ruby lol. But I want to update this plugin so I can accept git repo's also hosted at BitBucket
<apeiros_>
i.e., a good exception states what was expected and what was there instead
_alejandro has joined #ruby
<apeiros_>
pjs: with git, you can just maintain a fork. as for the rest - just learn ruby then :-p
ryanf has joined #ruby
<pjs>
apeiros_ I've got enough on my plate right now ;)
jenrzzz has joined #ruby
mercwithamouth has joined #ruby
_alejandro has quit [Ping timeout: 240 seconds]
<pjs>
apeiros_ thanks for the help!
jenrzzz has quit [Ping timeout: 260 seconds]
GoGoGarrett has joined #ruby
hbpoison has joined #ruby
sertaconay has quit [Ping timeout: 245 seconds]
Zoxc has joined #ruby
tjbiddle has joined #ruby
yaymukund has joined #ruby
volty has joined #ruby
nicoulaj has quit [Remote host closed the connection]
advorak has quit [Quit: This computer has gone to sleep]
pskosinski has quit [Ping timeout: 252 seconds]
Cultofmetatron has joined #ruby
advorak has joined #ruby
mikepack_ has quit [Remote host closed the connection]
advorak has quit [Client Quit]
advorak has joined #ruby
cantonic has quit [Quit: cantonic]
jlwestsr has joined #ruby
workmad3 has quit [Ping timeout: 240 seconds]
_alejandro has joined #ruby
miphe has quit [Quit: Leaving]
yeggeps has quit [Ping timeout: 276 seconds]
micsha has joined #ruby
<Zoxc>
anyone know how to test for end of input in treetop?
whowantstolivefo has quit [Ping timeout: 245 seconds]
darthdeu has quit [Quit: Leaving...]
whowantstolivefo has joined #ruby
mklappstuhl has joined #ruby
shtirlic has quit [Remote host closed the connection]
joeycarmello has quit [Remote host closed the connection]
mahmoudimus has joined #ruby
havenn has quit [Remote host closed the connection]
love_color_text has quit [Remote host closed the connection]
havenn has joined #ruby
fdddd333 has joined #ruby
whowantstolivefo has quit [Disconnected by services]
jenrzzz has joined #ruby
fdddd333 is now known as whowantstolivefo
_alejandro has quit [Ping timeout: 264 seconds]
<micsha>
I'm reading Manning's "Well grounded rubyist": need help with modules, I have a simple module written, all it does is puts "hello", now when I try to include it as a module in my testmodule.rb it gives me 'require cannot load such file -- Testmodule (LoadError)
<micsha>
what does this mean or what am I doing wrong?
GoGoGarrett has quit [Remote host closed the connection]
awarner has joined #ruby
statarb3 has quit [Quit: Leaving]
<volty>
micsha: what do you mean by including? Paste the offending line, please.
<volty>
@others, what' s the diff between this chan and #ruby-lang?
<micsha>
what service do you prefer I paste it into?
ryanf has quit [Ping timeout: 240 seconds]
freakazoid0223 has joined #ruby
<volty>
micsha: here, just the line where you "include" you module
<volty>
your
zomgbie has quit [Ping timeout: 240 seconds]
<micsha>
class ModuleTester
<micsha>
include Testmodule
<micsha>
end
jude0 has left #ruby [#ruby]
CaptainJet has quit []
<micsha>
this is from test.rb it's just a simple driver program that runs the module.
<blazes816>
#ruby-lang is for development of the language itself
<blazes816>
this is for development with it
<micsha>
idealy
<volty>
thx blazes816
damagednoob has quit [Read error: Connection reset by peer]
<volty>
micsha: where's your module defined? In the same source (test.rb) ? - then check spelling, it seems that it tries to autoload
<micsha>
no, it's in a seperate source file
pskosinski has joined #ruby
<apeiros_>
blazes816: um, actually there's not really any difference between #ruby and #ruby-lang - just different owner
<micsha>
#ruby is friendlier #ruby-lang tends to be elitist. I've told them to fuck themselves a couple of times.
mahmoudimus has quit [Quit: Computer has gone to sleep.]
tvw has quit [Ping timeout: 245 seconds]
Cultofmetatron has quit [Remote host closed the connection]
<volty>
micsha: then require it before including (e.g. require 'testmodule' - if the file containing it is caleld 'testmodule.rb')
<micsha>
it's pretty rare that I have problems with people in #ruby
tenmilestereo has quit [Quit: Leaving]
bbttxu has quit [Quit: bbttxu]
tjbiddle has quit [Quit: tjbiddle]
<micsha>
volty: I'll give that a shot, just a second.
<blazes816>
as long as shevy isn't around it's a pretty manageable place
<micsha>
volty: require 'Testmodule'
<micsha>
class ModuleTester
<micsha>
include Testmodule
<micsha>
end
mikepack_ has joined #ruby
<micsha>
that's how it looks right now.
<micsha>
is that correct?
<pskosinski>
I have something like this: http://wklej.org/id/856403/ and in "start" I'm getting error "undefined method `eof?' for nil:NilClass" I think that I see why… Anyway, how to initialize handler properly? If I understand correctly I need to make new object of class but problem is that I don't want to connect when initializing
<volty>
micsha: just place (for now) the definition of the module in the same file (test.rb)
<apeiros_>
shit happens :)
<apeiros_>
yw
c0rn_ has joined #ruby
virtuose has joined #ruby
mneorr has joined #ruby
daniel_- has quit [Ping timeout: 245 seconds]
<micsha>
[grumble]
clj_newb has quit [Ping timeout: 244 seconds]
mneorr has quit [Read error: Connection reset by peer]
mneorr has joined #ruby
mneorr has quit [Remote host closed the connection]
<whowantstolivefo>
i created a sample app in my folder and i created a controller with name os `say` action name with ` hello ` . in my app i created hello.html.erb. and i put ` <h1>hello this is sample text and image</h1> <img src="/app/assets/images/rails.png"> ' <<<< when i go to localhost:3000/say/hello i can see text message but i cant view rails.png ? this picture is in my /app/assets/images/ folder i can see that... i tried <img src=''images/rails.png> also
<whowantstolivefo>
but i still cant view rails.png when i go localhost:3000/say/hello ?
jaygen has joined #ruby
skcin7 has joined #ruby
hotovson has quit [Remote host closed the connection]
yeggeps has joined #ruby
ryanf has joined #ruby
BrianJ has joined #ruby
mercwithamouth has quit [Ping timeout: 255 seconds]
tekknolagi has joined #ruby
<tekknolagi>
hi blazes816
<tekknolagi>
you here and ready for more questions? ruby specific this time :P
dpn` has joined #ruby
<apeiros_>
whowantstolivefo: #rubyonrails is a channel dedicated to rails issues
<blazes816>
haha, i'll try
<tekknolagi>
blazes816: fantastic. well first off check out the new UI at http://brightswipe.com
<dpn`>
howdy.. just a quick noob question I'm having trouble googling for. How do you split a method call over multiple lines?
<dpn`>
with named params
<tekknolagi>
dpn`: just do it as such
<blazes816>
wow, very nice
<dpn`>
Ruby seems to be converting my params into a hash
<BrianJ>
how would I go about taking a url like https://s3.amazonaws.com/test/database_export.rb and only returning database_export? I can get down to database_export.rb by using pathname and base name, but is there a way to also remove the .rb?
<apeiros_>
dpn`: that's probably because your last param is a hash
<apeiros_>
and is unrelated to how you spread it over the lines
<apeiros_>
obj.foo bar: 1, baz: 2 # that passes a single argument to foo, the hash {:bar => 1, :baz => 2}
<BoomCow>
apeiros_, elaborate?
<tekknolagi>
blazes816: anyhow, can i pm? #ruby is more crowded atm
zomgbie has quit [Read error: Operation timed out]
<pjs>
hey all, is this valid Ruby? http://dpaste.com/819163/ It was working fine, but I've added / changed lines 19, and 21-27. I'm guessing it's if/else that's wrong?
<apeiros_>
also, foo("#{command}") is a pointlessly verbose way to say foo(command) (since command already is a string…)
<pjs>
apeiros_ right.. like I said, I just try to udpate this plugin. I'm not a ruby dev at all. I just use this plugin and the maintainer doesn't respond to anything.. so I can't explain why things are the way they are.. I just know it "worked".. I'm just trying to add support for git repo's that are hosted on BitBucket
<pjs>
BoomCow, Repository::BitBucket ?
chussenot has quit [Quit: chussenot]
<BoomCow>
pjs however you defined your BitBucket repository
<BoomCow>
you want to raise that error unless repository is bitbucket
<BoomCow>
you just leave it your way
<pjs>
Yea.. you know what.. let me remove this line
<BoomCow>
if repository.is_a?(Repository::Mercurial) or repository.is_a?(Repository::Git)
<BoomCow>
just use an if instead
<BoomCow>
it's the same thing
<BoomCow>
as unless bitbucket
<BoomCow>
so you raise the error if repository is mercurial or github
<pjs>
is "if not repository.is_?... or ...." valid?
sent-hil has joined #ruby
sent-hil has quit [Remote host closed the connection]
<BoomCow>
sure
<BoomCow>
just think about it for a bit :)
Hanmac has quit [Ping timeout: 245 seconds]
<pjs>
oh wow.. it's working.. I was being dumb. I was sending the json but not placing it in the payload variable.
chussenot has joined #ruby
<BoomCow>
awesome :)
<BoomCow>
which line was that
Hanmac has joined #ruby
chussenot has quit [Client Quit]
<pjs>
it wasn't in the code.. I was sending json to test so I don't have to actually hook to bitbucket
mahmoudimus has joined #ruby
<pjs>
so the good news is, the code worked. The bad news is, something isn't working with the git call.. but that's not related to this.. hah
<pjs>
BoomCow, apeiros_, thanks again for the help
chussenot has joined #ruby
<BoomCow>
good luck man
andrewhl has quit [Remote host closed the connection]
hbpoison has quit [Read error: Connection reset by peer]
thinkdevcode has quit [Read error: No route to host]
jaygen has joined #ruby
thinkdevcode has joined #ruby
cakehero has quit [Quit: Computer has gone to sleep.]
ebobby has joined #ruby
mikepack_ has quit [Remote host closed the connection]
pskosinski has left #ruby ["Whatever"]
c0rn_ has quit []
nerdy has joined #ruby
daniel_- has joined #ruby
kzrl has quit [Ping timeout: 260 seconds]
daniel_- has quit [Client Quit]
freeayu has joined #ruby
kzrl has joined #ruby
tjbiddle has joined #ruby
<havenn>
I balked at Ruby 2.0's named parameters requiring parens, but I guess naked parens already do. https://gist.github.com/3966916
<havenn>
*guess naked hashes already do*
pjs has left #ruby [#ruby]
khakimov has quit [Quit: Computer has gone to sleep.]
<heftig>
havenn: naked hashes?
coj has quit []
<havenn>
heftig: I mean when you can ditch the "{}" around a hash when it is used as a argument with parens. I said that terrible...
<heftig>
you mean what "why adjective: 'tasty', noun: 'Bacon'" would currently do?
<havenn>
heftig: yeah
<heftig>
that doesn't require parens
<volty>
a good one: «Matz himself said that autoload will be removed from the language and he "strongly discourages the use of autoload in any standard library" »
carlzulauf has quit [Read error: Operation timed out]
Cultofmetatron has quit [Remote host closed the connection]
<havenn>
volty: But not removed in 2.0, right?
tenmilestereo has joined #ruby
<havenn>
volty: Just a future deprecation warning?