<ThePeach>
Spooner: sortof... asking for help on #rvm... getting some hell to sort out to install it... looks like installing it system-wide is more an hassle than anything else
lggr has quit [Ping timeout: 246 seconds]
dakine has joined #ruby
<chazu>
Spooner: brilliant, indeed that does work, only issue is that the call to foo.method executes the method, probably a bug on my part though
<Spooner>
Yeah, much easier to install it in ~/.rvm - but the problem with it not getting updated seems common. I've had it plenty of times.
<chazu>
Spooner: danke
<dakine>
?
<dakine>
oh, danke
<Spooner>
chazu : No, it won't - you need, for example: m = Kernel.method(:puts); puts.call "hello"
<Spooner>
Oops: m = Kernel.method(:puts); m.call "hello"
<chazu>
Spooner: ah i see, Kernal.method. Duh-doi...I am a silly, silly little man
sebastorama has quit [Quit: Computer has gone to sleep.]
<chazu>
Spooner: I was simply calling foobar.method, not Kernal.method(:foobar)
* chazu
needs caffeine
<Spooner>
Aha.
lggr has joined #ruby
AndChat- has quit [Ping timeout: 268 seconds]
Banistergalaxy has quit [Ping timeout: 248 seconds]
<Spooner>
It is the price we pay for not needing to use parenthesis, I am afriad (many languages would take meth() as a call and meth as a reference).
<kiyoura>
this is why perl is ugly: \&meth
<kiyoura>
^ the oddball.
crazedpsyc has joined #ruby
sailias has joined #ruby
Banistergalaxy has joined #ruby
AndChat- has joined #ruby
katherinem13 has quit [Read error: Connection reset by peer]
ph^ has quit [Ping timeout: 256 seconds]
<seanstickle>
meth(). not even once.
katherinem13 has joined #ruby
lggr has quit [Ping timeout: 256 seconds]
ghanima has joined #ruby
Kudos has quit [Ping timeout: 264 seconds]
seanstickle has quit [Quit: seanstickle]
AndChat| has quit [Ping timeout: 248 seconds]
AndChat| has joined #ruby
AndChat- has quit [Ping timeout: 248 seconds]
Banistergalaxy has quit [Ping timeout: 248 seconds]
cburyta has joined #ruby
mmitchell has joined #ruby
Hanmac1 has joined #ruby
lggr has joined #ruby
Banistergalaxy has joined #ruby
ryanf has quit [Read error: Connection reset by peer]
Kudos has joined #ruby
ryanf has joined #ruby
AndChat- has joined #ruby
<fir_ed>
HOw do I get started
<fir_ed>
with ruby and sqlite3
<Spooner>
That is rather a vague question, fir_ed
Hanmac has quit [Ping timeout: 264 seconds]
eml has quit [Ping timeout: 264 seconds]
eml has joined #ruby
<Spooner>
You might want to use something like ActiveRecord or Datamapper as a nice wrapper over the database.
GraemeLion has joined #ruby
<fir_ed>
Spooner, I actually thought ActiveRecord was part of rails
<fir_ed>
This is for a normal application
<Spooner>
It is, but you can use it anywhere.
yoklov has quit [Ping timeout: 268 seconds]
<Spooner>
I've used it in a non-web app before.
<fir_ed>
Alright. Makes it much easier
<fir_ed>
Thank you
cburyta_ has joined #ruby
AndChat| has quit [Ping timeout: 240 seconds]
mikepack_ has joined #ruby
thunderstrike has quit [Remote host closed the connection]
AndChat| has joined #ruby
mmitchell has quit [Ping timeout: 244 seconds]
Banistergalaxy has quit [Ping timeout: 240 seconds]
dakine has quit [Ping timeout: 264 seconds]
lggr has quit [Ping timeout: 246 seconds]
yxhuvud has quit [Read error: Connection reset by peer]
cburyta__ has joined #ruby
cburyta has quit [Ping timeout: 246 seconds]
AndChat- has quit [Ping timeout: 240 seconds]
bradhe has joined #ruby
dakine has joined #ruby
Banistergalaxy has joined #ruby
ttt has joined #ruby
AndChat- has joined #ruby
yoklov has joined #ruby
cburyta has joined #ruby
maletor has joined #ruby
xyzodiac has quit [Quit: Computer has gone to sleep.]
notVert has quit [Read error: Connection reset by peer]
cburyta_ has quit [Ping timeout: 268 seconds]
lggr has joined #ruby
AndChat| has quit [Ping timeout: 240 seconds]
cburyta__ has quit [Ping timeout: 248 seconds]
sailias has quit [Ping timeout: 246 seconds]
<adac>
How to check if a string is an URI?
ThePeach_ has quit [Quit: leaving]
Banistergalaxy has quit [Ping timeout: 248 seconds]
<theoros>
03:29:12 <meatcomputer> nice tune. I downloaded fruity loops today. I might actually piddle with it. I don't use recreational drugs anymore so this appeals a little less to me than it may have in the past.
<theoros>
oops wrong window :)
bradhe has quit [Remote host closed the connection]
mercwithamouth has joined #ruby
cakehero has joined #ruby
A124 has joined #ruby
A124 has left #ruby [#ruby]
lggr has joined #ruby
bradhe has joined #ruby
naz has joined #ruby
ph^ has joined #ruby
Drewch has quit [Excess Flood]
mikepack_ has quit [Remote host closed the connection]
Drewch has joined #ruby
chendo has quit [Quit: Leaving...]
jenrzzz has joined #ruby
radic has quit [Disconnected by services]
radic_ has joined #ruby
raul782 has quit [Remote host closed the connection]
radic_ is now known as radic
ttt has joined #ruby
lggr has quit [Ping timeout: 256 seconds]
tastycakeman has joined #ruby
dmiller has joined #ruby
AndChat- has joined #ruby
lggr has joined #ruby
love_color_text has quit [Remote host closed the connection]
cakehero has quit [Quit: Computer has gone to sleep.]
wmoxam has quit [Quit: leaving]
ph^ has quit [Ping timeout: 264 seconds]
banghouse2 has joined #ruby
Banistergalaxy has quit [Ping timeout: 256 seconds]
GoHuyGo has joined #ruby
wmoxam has joined #ruby
lggr has quit [Ping timeout: 248 seconds]
lyaunzbe has quit [Ping timeout: 268 seconds]
centipedefarmer has joined #ruby
<chiel>
any of you have suggestions on what to read if you have to create an oauth2 implementation?
lledet has quit [Quit: lledet]
banghouse2 has quit [Remote host closed the connection]
lggr has joined #ruby
Soul_Est has joined #ruby
chendo has joined #ruby
mmitchell has joined #ruby
horofox has joined #ruby
Aristata has joined #ruby
dpk has quit [Ping timeout: 264 seconds]
lggr has quit [Ping timeout: 248 seconds]
gmci has quit [Quit: Computer has gone to sleep.]
Cache_Money has joined #ruby
<elico>
I want cgi script to send incrementing updates to the browser anyone have dont it?
mmitchell has quit [Ping timeout: 244 seconds]
chazu` has quit [Ping timeout: 256 seconds]
lggr has joined #ruby
dpk has joined #ruby
dmiller has quit [Remote host closed the connection]
lggr has quit [Ping timeout: 260 seconds]
hbpoison has quit [Ping timeout: 240 seconds]
tastycakeman has quit [Quit: Leaving]
ph^ has joined #ruby
zeromodulus has quit [Remote host closed the connection]
raul782 has quit [Remote host closed the connection]
ananthakumaran has joined #ruby
xyzodiac has quit [Quit: Computer has gone to sleep.]
samuelkadolph has quit [Quit: Quitting]
samuelkadolph has joined #ruby
lggr has joined #ruby
lggr has quit [Ping timeout: 248 seconds]
chimkan_ has joined #ruby
justinmcp has quit [Remote host closed the connection]
kiyoura has quit [Quit: Leaving]
justinmcp has joined #ruby
jwang has quit [Remote host closed the connection]
ph^ has joined #ruby
jarred has quit [Quit: jarred]
akoumjian has joined #ruby
stan_man_can has joined #ruby
xyzodiac has joined #ruby
n_blownapart has joined #ruby
lggr has joined #ruby
mr-rich has joined #ruby
<akoumjian>
Hi all. Curious if Ruby gems have an equivelant to Python's "setup.py develop". Essentially is there a way to install a gem that is essentialy a symlink to my working directory for development purposes.
jenrzzz has quit [Ping timeout: 246 seconds]
lggr has quit [Ping timeout: 260 seconds]
ph^ has quit [Ping timeout: 248 seconds]
stan_man_can has quit [Quit: stan_man_can]
Vinz_ is now known as Vinaway
Vinaway is now known as Vinzaway
joeycarmello has quit [Remote host closed the connection]
chimkan_ has quit [Quit: chimkan_]
<blazes816>
akoumjian: have the gem in a directory (most likely a git repo) on your computer, then use a Gemfile with "gem 'my_gem', :path => '~/gems/my_gem'"
lggr has joined #ruby
centipedefarmer has quit [Remote host closed the connection]
<akoumjian>
blazes816: So then after I do "gem install", other scripts which require the gem will point to the one in my working directory?
lggr has quit [Ping timeout: 256 seconds]
<blazes816>
it wouldn't be system wide, only per project
<blazes816>
if you go into the directory the gem is installed you can edit it and achieve what you want
<n_blownapart>
hi , sorry beginner question: how do I get this sorted with the painting objects names (picasso, etc.) and not the object_id? (or is that called constructor id?) thanks: http://pastie.org/4783782
<blazes816>
checkout your git repo into your gem path and you should be able to do it
Quadlex has quit [Read error: Connection reset by peer]
rippa has joined #ruby
<n_blownapart>
^^ i.e. I can't tell if the block and sorting is working. thanks
lggr has joined #ruby
<swarley>
n_blownapart, you need to assign price in initialize
<swarley>
@price = price
Jellyg00se has quit [Remote host closed the connection]
<n_blownapart>
swarley: that was just dawning on me...at least that the problem was in initialize. hold on one sec...thanks
<swarley>
no problem
tk___ has joined #ruby
lggr has quit [Ping timeout: 268 seconds]
<n_blownapart>
#<Painting:0x00000100928050>
<n_blownapart>
#<Painting:0x00000100928078>
chimay has quit [Ping timeout: 246 seconds]
<n_blownapart>
swarley: still I get this when I run it ^^
<swarley>
code?
mikepack has quit [Remote host closed the connection]
<n_blownapart>
I'm expecting a sorted array with ascending numbers for price. swarley
<n_blownapart>
no, I mean with the painters' names (the value of a picasso i.e.) swarley
sent-hil has joined #ruby
<swarley>
n_blownapart, can you post the updated code?
bananagram has quit [Ping timeout: 264 seconds]
<n_blownapart>
hold on pastie is down apparently swarley
<n_blownapart>
thanks ^^
<swarley>
no problem
lggr has joined #ruby
<n_blownapart>
swarley: well, its down , but I just added @price = price in initialize as per your suggestion.
<swarley>
n_blownapart, are you doing this in pry/irb?
lggr has joined #ruby
<swarley>
oh
<swarley>
what ruby version?
<n_blownapart>
no sublime2. ruby -v 1.9.3
statarb3 has quit [Quit: Leaving]
<swarley>
ah
<swarley>
hm
jenrzzz has joined #ruby
raul782 has joined #ruby
<swarley>
oh also
<swarley>
in your sort, you don't need to use a.price <=> b.price
<swarley>
since you defined a method for that class
<swarley>
you can just do a <=> b
tehgeekm_ is now known as tehgeekmeister
<swarley>
and if you get an enumerator, you can use Enumerator#to_a
<n_blownapart>
swarley: well at least they are in ascending order of price as expected. yeah I just dropped the .price i.e: a <=> b ...thanks !
<swarley>
so, just add .to_a to price_sort, and it should be an array instead
hbpoison has joined #ruby
ph^ has quit [Ping timeout: 256 seconds]
lggr has quit [Ping timeout: 246 seconds]
Chryson has quit [Quit: Leaving]
<n_blownapart>
swarley: sorry a bit confused. how would I utilize Enumerator#to_a ?
rippa has quit [Read error: Connection reset by peer]
bigmeow has joined #ruby
<swarley>
try
<swarley>
puts price_sort.to_a.map(&:price)
joeycarmello has quit [Ping timeout: 260 seconds]
<n_blownapart>
swarley: ok
<swarley>
or just puts price_sort.to_a.inspect
<swarley>
that will show you the objects
cyong has joined #ruby
<swarley>
the map(&:price) just takes each object in the array, and puts the result of the price method into an array
lggr has joined #ruby
hbpoison has quit [Ping timeout: 268 seconds]
<n_blownapart>
swarley: thanks so much...I was expected [van_gogh, picasso] (the objects in ascending order of price).
<n_blownapart>
expecting*
<swarley>
Ohh, you can't get the actual names of the variables sadly
xorgnak has joined #ruby
<swarley>
I don't believe, at least
<n_blownapart>
why is that swarley ?
<swarley>
because they are most likely turned into bytecode which doesnt care about the names as much, it probably handles the objects with the Object#object_id
<swarley>
[99] pry(main)> "hello".object_id
<swarley>
=> 20963300
<n_blownapart>
swarley: thanks because anyway, I'm happy with the inspect -- because at least I got the program running where I can see that it works.
<n_blownapart>
swarley: gratzie !
<swarley>
Mhm, you'll find that you don't actually need the names
mmitchell has quit [Remote host closed the connection]
<swarley>
no problem at all. ask again if you need help
<n_blownapart>
swarley: yeah , the point of the lesson was using <=> with sort, without mixing comparable in. thanks for the future offer ! pax
monkegjinni has quit [Remote host closed the connection]
lggr has quit [Ping timeout: 260 seconds]
horofox has quit [Ping timeout: 246 seconds]
tr4656 has quit [Ping timeout: 245 seconds]
tr4656_ has joined #ruby
bradhe has quit [Remote host closed the connection]
GraemeLion has quit [Quit: out]
xorgnak has quit [Remote host closed the connection]
xorgnak has joined #ruby
vlad_starkov has joined #ruby
dakine has quit [Ping timeout: 240 seconds]
lggr has joined #ruby
horofox has joined #ruby
xorgnak has quit [Remote host closed the connection]
xorgnak has joined #ruby
mmitchell has joined #ruby
lggr has quit [Ping timeout: 260 seconds]
robustus has joined #ruby
Coad has joined #ruby
<Coad>
Hey :)
Coad has quit [Client Quit]
mmitchell has quit [Ping timeout: 244 seconds]
n_blownapart has quit [Remote host closed the connection]
<blazes816>
Ho!
xorgnak has quit [Remote host closed the connection]
xorgnak has joined #ruby
lggr has joined #ruby
maletor has quit [Quit: Computer has gone to sleep.]
ph^ has joined #ruby
<m3pow>
guys, i am currently learning Ruby and on this website i have a task
nimred has joined #ruby
nimred has joined #ruby
jgrevich_ has joined #ruby
<m3pow>
is that a good approach , or i could have dont it differently
<rh1n0>
I have a rails mailer class and am trying to dynamically call various methods (templates). (MyMailer.send mailer_method_var.to_sym, some_user_obj) this is fine but how would i tack on the required .deliver to the end of the 'send' statement? I thought this would be more of a ryby than rails question. Sorry if not.
<rh1n0>
how about (MyMailer.send mailer_method_var.to_sym, some_user_obj).deliver ? cant be that simple can it? :)
tehgeekm_ has joined #ruby
sepp2k has joined #ruby
AlbireoX`Laptop has quit [Ping timeout: 256 seconds]
ztirf has quit [Client Quit]
dwon has joined #ruby
null- has joined #ruby
baphled has joined #ruby
<m3pow>
where's shevy when you need him
Axsuul has quit [Ping timeout: 240 seconds]
joeycarmello has quit [Ping timeout: 248 seconds]
tehgeekmeister has quit [Ping timeout: 246 seconds]
lggr has joined #ruby
ph^ has quit [Ping timeout: 264 seconds]
lggr has quit [Ping timeout: 256 seconds]
bradhe has joined #ruby
RudyValencia has joined #ruby
lggr has joined #ruby
tehgeekm_ has quit [Remote host closed the connection]
horofox has quit [Quit: horofox]
lggr has quit [Ping timeout: 245 seconds]
SCommette has quit [Quit: SCommette]
vlad_starkov has quit [Read error: Connection reset by peer]
heftig has quit [Quit: leaving]
baphled has quit [Ping timeout: 246 seconds]
uris has quit [Quit: leaving]
<blazes816>
puts "I recommend you to try this number: #{favorite_number + 1}"
<blazes816>
m3pow^
<blazes816>
puts "My favorite number is #{favorite_number}"
<m3pow>
oh, haven't got to that though
<m3pow>
let me try it
<m3pow>
thanks
<m3pow>
that's a block right ?
<blazes816>
string interpolation
<blazes816>
also you should probably do "gets.strip", not "gets.chomp"
Bosma has quit [Read error: Connection reset by peer]
omry has quit [Remote host closed the connection]
havenn has joined #ruby
adambeynon has quit [Quit: Computer has gone to sleep.]
teh4 has quit [Quit: Leaving]
dmnd has joined #ruby
dmnd has quit [Changing host]
dmnd has joined #ruby
timonv has quit [Remote host closed the connection]
lggr has joined #ruby
dmnd has quit [Quit: dmnd]
hsbt_away is now known as hsbt
timonv has joined #ruby
havenn has quit [Ping timeout: 240 seconds]
lggr has quit [Ping timeout: 246 seconds]
wallerdev has quit [Quit: wallerdev]
paissad has left #ruby [#ruby]
lggr has joined #ruby
lggr has quit [Ping timeout: 246 seconds]
Virunga has joined #ruby
heisenmink has joined #ruby
heisenmink has quit [Remote host closed the connection]
monkegjinni has quit [Remote host closed the connection]
heisenmink has joined #ruby
heisenmink is now known as awestroke
lggr has joined #ruby
tds has joined #ruby
monkegjinni has joined #ruby
adambeynon has joined #ruby
lggr has quit [Ping timeout: 248 seconds]
lkba has joined #ruby
Guest29702 has joined #ruby
<gener1c>
im trying to list the entries in a zip using rubyzip and the ZipFsDir class object wont return the dirs inside the listed dir just the files, any idea on how to solve this?
<jokar>
shevy : how can i save my score in tryruby.org?
<gener1c>
wow that would make iterating over the file alot harder
<shevy>
jokar no idea. I dont use tryruby.org, but why dont you copy paste it into your editor?
pdelgallego has quit [Quit: pdelgallego]
<jokar>
shvey : i download a book that you recommended and i will read it but for learning via web tryruby.org is a very good place
neku has joined #ruby
<shevy>
gener1c either you load it completely into ram, via readlines or something like that, or you must manage the loading part on your own, like via repeteated .seek
vitoravelino`afk is now known as vitoravelino
<Vinz_>
jokar: Why don't make an account, it seems that you can save your progress and score with it
<Vinz_>
don't you*
<jokar>
yes but link not work :(
<Vinz_>
Err :/
<jokar>
Vinz_: can you check it?
<Vinz_>
Register link ?
<jokar>
yes
<jokar>
it is not work
<Vinz_>
I just registered and signed in ^^
<shevy>
hehe
<shevy>
jokar needs to get better at the basic things :)
<shevy>
jokar anyway man. if you believe that you can learn ruby only via codeschool, perhaps don't learn ruby :P
timonv has quit [Remote host closed the connection]
<Vinz_>
shevy: I never learned ruby, but i still use it x)
<shevy>
hehe
<jokar>
shevy : as i told,i will read a book that you recommended,but for free time i want use web
<jokar>
it is interested
<jokar>
:)
arietis has quit [Quit: Computer has gone to sleep.]
timonv has joined #ruby
lggr has quit [Ping timeout: 246 seconds]
LouisGB has joined #ruby
arietis has joined #ruby
timonv has quit [Remote host closed the connection]
<shevy>
I don't recommend this
pskosinski has quit [Ping timeout: 276 seconds]
<jokar>
why?
<shevy>
I recommend to work through chris pine tutorial once, then look at official documentation of class Array, class Hash, class String, and then immediately start writing small .rb scripts
<jokar>
i create an account :P
<jokar>
sure
<shevy>
yes but how does the account help you learn and use ruby :)
<jokar>
but book is very good for travel
<shevy>
Look up, you asked how to save things you typed in tryruby
<jokar>
yes
<shevy>
this problem you would never have, if you would use a local editor and write your .rb script
<jokar>
link is damage and i redirect to the new page
<shevy>
...
<shevy>
:P
<Vinz_>
i agree with shevy
<jokar>
you right
<shevy>
perhaps future people will live in the web cloud
<shevy>
but basic things are simple and they work
<shevy>
local editors!
iocor has joined #ruby
<shevy>
you don't even have to use vim or emacs
timonv has joined #ruby
<shevy>
jokar, you can also check out pry, it should allow you to save snippets
<banisterfiend>
shevy emacs lets you do that using elisp
<Vinz_>
Whaaaaaaaaaaaat ?
Beoran_ has joined #ruby
lggr has quit [Ping timeout: 244 seconds]
<Mon_Ouie>
People who use Emacs for a long time end up customizing so many little things they would have a hard time using someone else's configuration
notVert has joined #ruby
<shevy>
that is understandable - there are lots of settings to be done in any OS. Emacs is no exception here
Nisstyre has quit [Ping timeout: 245 seconds]
Guedes0 has joined #ruby
bradhe has joined #ruby
lggr has joined #ruby
timonv has quit [Remote host closed the connection]
heftig has quit [Read error: Connection reset by peer]
<guy>
I've never used Ruby before, & I need some help with SASS gem. Anyone is willing to dedicate 5 minutes of guidance?
<ij>
guy, Ask the question.
arubin has quit [Quit: arubin]
<Vinz_>
Do not ask to ask :)
heftig has joined #ruby
<guy>
Briefly, I have the gem setup, I am able to convert "sass test.scss test.css" but there is one thing I want to do – if exception is thrown during the "compilation" of the scss file, I need CSS file to contain a JSON of the exception object.
icooba has quit [Ping timeout: 260 seconds]
<guy>
(without any CSS)
lggr has joined #ruby
<ij>
That doesn't sound too smart, but okay — how are you currently compiling the file? Scss binary, right?
<guy>
Yes. Well, I used to do that using LESS, and it was miraculously helpful.
pdelgallego has joined #ruby
<guy>
"sass" binary, really.
<ij>
Well the sass binary isn't too complicted, you could write your own or copy the existing one and modify it according to your needs.
statarb3 has joined #ruby
statarb3 has quit [Changing host]
statarb3 has joined #ruby
<guy>
Usually touching the library code isn't a smart idea.
<guy>
Isn't there a way to create a custom .rb script that would invoke SASS class (or whatever it is called in ruby) with my custom options and exception handling?
<shevy>
guy only if the class in question allows you to do so
lkba has quit [Ping timeout: 260 seconds]
<shevy>
you could try to subclass, or directly extend the class in question
lggr has quit [Ping timeout: 264 seconds]
<guy>
Well, does it? This is why I asked for someone with ruby + sass exposure.
<shevy>
I would really mail the author in question, he seems active
uris has joined #ruby
ewag_ has quit [Ping timeout: 248 seconds]
gmci has joined #ruby
seoaqua has joined #ruby
bradhe has joined #ruby
gogiel has quit [Ping timeout: 240 seconds]
cburyta has joined #ruby
gogiel has joined #ruby
LBRapid has joined #ruby
lggr has quit [Ping timeout: 256 seconds]
Targen has joined #ruby
bradhe has quit [Ping timeout: 264 seconds]
TomJ has joined #ruby
TomJ has quit [Changing host]
TomJ has joined #ruby
<jokar>
shevy : are you familiar with ruby creator?
<jokar>
is he here?
lggr has joined #ruby
<ij>
shevy, Why are you instantly suggesting pp, let the man struggle with p/puts for a while. :]
mucker has joined #ruby
diegoviola has joined #ruby
LBRapid has quit [Quit: LBRapid]
<shevy>
ij I love the output of pp :)
<ij>
Meh, I just pry.
<ij>
It makes the output cool too.
<shevy>
jokar the creator is matz. he does no longer use IRC as it takes away too much of his time. you can see his activity here: https://github.com/mruby/mruby
<jokar>
shevy : Thank you
<shevy>
pp is available in standard ruby
fyolnish_ has joined #ruby
LBRapid has joined #ruby
<ij>
hm
<ij>
shevy, wat
vitor-br has joined #ruby
lggr has quit [Ping timeout: 268 seconds]
sailias has quit [Ping timeout: 246 seconds]
elico has joined #ruby
<shevy>
standard components beat addons every time :)
chessguy has joined #ruby
<ij>
Ah, I hadn't required it.
ananthakumaran has quit [Ping timeout: 256 seconds]
LBRapid has quit [Quit: LBRapid]
<shevy>
if I were matz, I would make the standard components more flexible
<shevy>
regularly... perhaps once every 2 years
dpk has quit [Quit: Asleep at the keyboard.]
<shevy>
there are like 5 different option parser libraries nowadays
<m3pow>
hi shevy, one question i have: the initialize method, works like a constructor ?
<lxsameer>
how can i download all the dependecies of a ruby project?
Vainoharhainen has joined #ruby
lggr has joined #ruby
guy has quit [Remote host closed the connection]
F1skr has quit [Quit: WeeChat 0.3.8]
<shevy>
m3pow yeah. I think .new calls .allocate, and then .initialize
<shevy>
lxsameer depends. if you download a gem, that gem should list the dependencies, then gem will automatically check
<shevy>
if it is not a gem, then it is more annoying
<shevy>
lxsameer, what project is it?
<Virunga>
shevy: could you make an example where it's useful define the new method, please?
<shevy>
Virunga the .new() method? hmmm... I don't think I have ever needed to do that
<lxsameer>
shevy: i want to download all the dependecies of some project and install them in a pc that don't have a internet connection
<shevy>
I have not even played with .allocate either... for some reason I never seem to need that
<shevy>
Virunga, I always am fine to just use initialize() alone :)
issyl0 has joined #ruby
<shevy>
lxsameer, what is the name of the project
centipedefarmer has joined #ruby
<lxsameer>
shevy: any rails project
<Virunga>
shevy: eheh
<shevy>
lxsameer, well... rails guys use bundler. you could try to use it... but I hate bundler and can not help you with bundler-related things. the #rubyonrails guys should know more
<shevy>
if it is a gem file, download it. all gems are installed locally
AndChat- has quit [Ping timeout: 246 seconds]
<shevy>
all .gem files are also found in RUBY_SITE_DIR/lib/ruby/gems/1.9.1/cache/
nari has quit [Ping timeout: 246 seconds]
<issyl0>
Hi all. I'm trying to use getopts() in http://pastebin.com/azi89a2U but it doesn't appear to be working. Whether I specify -l or not on the command line, the puts params[:1] line always prints nil. What am I doing wrong?
<shevy>
on my system this is the path /pkg/Ruby/Current/lib/ruby/gems/1.9.1/cache/
<shevy>
on common linux systems it should be /usr/lib/ruby/gems/1.9.1/cache/
<shevy>
then you can copy all .gem files from there to wherever you backup your stuff
mattyoho has joined #ruby
<issyl0>
Err, puts params[:l] even.
SCommette has joined #ruby
<shevy>
issyl0 and how do you invoke this script? do you pass any argument to it?
Belwolf_ has joined #ruby
<shevy>
ARGV by default is an empty Array []
lggr has quit [Ping timeout: 244 seconds]
<shevy>
if you run "ruby test.rb hi" then ARGV[0] would be "hi"
seanstickle has joined #ruby
Belwolf has quit [Ping timeout: 246 seconds]
<issyl0>
shevy: "ruby optiontest.rb -l foobar" or "ruby optiontest.rb foobar"
Banistergalaxy has joined #ruby
lxsameer has quit [Ping timeout: 246 seconds]
lggr has joined #ruby
Spooner has joined #ruby
Forevernade has quit [Read error: Connection reset by peer]
lxsameer has joined #ruby
lxsameer has quit [Changing host]
lxsameer has joined #ruby
Forevernade has joined #ruby
heftig has joined #ruby
lxsameer has quit [Ping timeout: 268 seconds]
deryl has joined #ruby
lggr has quit [Ping timeout: 256 seconds]
SCommette has quit [Quit: SCommette]
cyb3rD has joined #ruby
cyb3rD has left #ruby [#ruby]
uris has quit [Ping timeout: 256 seconds]
lxsameer has joined #ruby
lxsameer has quit [Changing host]
lxsameer has joined #ruby
snorkdude has joined #ruby
lggr has joined #ruby
specialGuest has quit [Ping timeout: 256 seconds]
cpruitt has joined #ruby
<shevy>
issyl0 just try it? you can output content of ARGV via
EuroTrash has quit [Remote host closed the connection]
examancer has quit [Ping timeout: 240 seconds]
jord has quit [Ping timeout: 268 seconds]
lggr has joined #ruby
<Spooner>
shevy : I assume you've already suggested using the slop gem (or similar) so you never need to touch ARGV?
timonv has joined #ruby
pdelgallego has joined #ruby
freshbone123 has joined #ruby
headius has joined #ruby
horofox has joined #ruby
xyzodiac has joined #ruby
lggr has quit [Ping timeout: 246 seconds]
Hamed-R has quit [Read error: Connection reset by peer]
F1skr has joined #ruby
futilegames has joined #ruby
dpk has joined #ruby
bluenemo has joined #ruby
chessguy has quit [Remote host closed the connection]
<shevy>
Spooner hehe I actually always use ARGV :) but mostly because I hate optparse
pdelgallego has quit [Quit: pdelgallego]
<Spooner>
optparse is pretty crap, but it is still considerably better than hacking ARGV. At least unless you are only reading in one or two different arguments.
<shevy>
ARGV is ok if you only need simple arguments. of course when you need to use --foo 5 things or --directory=/tmp/ then ARGV alone is no longer that good
<shevy>
but optparse is just no fun :(
lggr has joined #ruby
lxsameer has quit [Quit: Leaving]
<Spooner>
Why are you pushing optparse now? As I say, although it isn't great, try parsing that ARGV manually though...
Axsuul has quit [Remote host closed the connection]
Norrin has joined #ruby
<Spooner>
I never said use OptParse. I said use Slop, which is half as verbose!
<shevy>
I am not "pushing" optparse. issyl0 is using it
<Spooner>
Yeah, that isn't the usual way to do it, as shevy says.
<shevy>
it seems short :)
<shevy>
perhaps I can find a new way to want to like it...
<issyl0>
OK.
<issyl0>
Thanks!
<issyl0>
I will try Slop.
albel727 has joined #ruby
lggr has quit [Ping timeout: 240 seconds]
jord has joined #ruby
<Spooner>
You still need to perform various logic manually using #getopts. It seems simpler, but misses a lot of cases, I suspect.
<albel727>
hi, guys. a question. how does one interrupt a Thread, that is inside a long sleep()? preferably so that sleep() just throws and the thread is allowed to catch the exception and finalize stuff. if that's not possible, solutions, that just plain stop it will also be gladly heard.
joofsh has joined #ruby
<Spooner>
Easy way is not to have a long sleep, but sleep(0.1) while @keep_running - use of Thread#kill is going to cause you pain.
joofsh2 has joined #ruby
seanstickle has quit [Quit: seanstickle]
joofsh2 has quit [Client Quit]
hukl has quit [Quit: Leaving...]
thone has joined #ruby
uris has joined #ruby
<Spooner>
Well, time_to_finish = Time.now + 10; sleep(0.1) while @keep_running and Time.now < time_to_finish
<albel727>
yeah, I'm thinking about that solution right now.
lggr has joined #ruby
<albel727>
but, now that I read it, Thread.run looks like it will wake up the thread from sleep...
<albel727>
gotta try that.
fyolnish_ has quit [Remote host closed the connection]
dysoco has joined #ruby
dysoco has left #ruby [#ruby]
ltsstar has quit [Quit: ltsstar]
<Spooner>
No, #run wakes it up from #stop which is sort of sleep-like, but not actually #sleep
fyolnish has joined #ruby
<albel727>
yeah, that's the confusing bit. b/c the docs for sleep mention it, but the docs for run mention only stop.
<Spooner>
I haven't used threads in a while though. Always use fibers now.
<albel727>
hmm
<albel727>
don't know that, let me check it out.
lyaunzbe has joined #ruby
<Spooner>
Unless you _have_ to use Threads because you are interacting with something that uses Threads, use Fibers ;)
mattyoho has quit [Quit: mattyoho]
<Spooner>
Well, or if you are on something other than CRuby and need to use multiple cores or maybe other cases :$
lggr has quit [Ping timeout: 244 seconds]
workmad3 has joined #ruby
<albel727>
hmm, interesting. well, manual scheduling is not what I want right now. anyway, thanks for your help.
lantins has quit [Ping timeout: 248 seconds]
<albel727>
guess I'll go with the small chunked sleep approach.
examancer has quit [Ping timeout: 264 seconds]
examancer has joined #ruby
Norrin has quit [Quit: ""]
ph^ has quit [Remote host closed the connection]
hoelzro is now known as hoelzro|away
Norrin has joined #ruby
ph^ has joined #ruby
lggr has joined #ruby
pdelgallego has joined #ruby
ananthakumaran has quit [Ping timeout: 256 seconds]
tk___ has quit [Quit: ばいばい]
timonv has joined #ruby
ph^ has quit [Read error: No route to host]
ph^ has joined #ruby
jord has quit [Ping timeout: 248 seconds]
examancer has quit [Ping timeout: 246 seconds]
lantins has joined #ruby
jord has joined #ruby
ryanlecompte has joined #ruby
lggr has quit [Ping timeout: 246 seconds]
GraemeLion has quit [Quit: out]
<elico>
anyone have a recommendation for a good way to struct XMLs?
ngoldman has quit [Remote host closed the connection]
<matti>
LOL
<matti>
o_O
<matti>
Well, in the end... Whatever works (TM)
<Spooner>
Well, makes sense. Serverless isn't going to do quite as well as server-ed, but if you don't need that extra performance, why bother with an extra process cluttering up the place.
lggr has joined #ruby
<Spooner>
matti The TK site actually recommends you use Kyoto Cabinet instead.
<matti>
I know.
wallerdev has joined #ruby
shuriken has quit [Quit: shuriken has no reason]
<Spooner>
Aaah: "Tokyo Cabinet is LGPL. It's heir project (Kyoto Cabinet) is GPL though."
<matti>
Client-Server model has its perks -- i.e. replication, master-slave setups ets.
<Spooner>
Yeah, but KISS.
<matti>
+1 for KISS
<Spooner>
All irrelevant if we don't know the use-case :D (yaml < pstore < serverless-db < server-db)
<matti>
KISS and FHUGS ;d
<Spooner>
FHUGS?
<matti>
Free hugs.
<matti>
A good thing, like a kiss.
<Spooner>
Ah, right.
<matti>
;p
* matti
is being silly
uris has quit [Quit: Lost terminal]
<matti>
Spooner: I'd still prefer pstore over YAML. For some reason.
digitalcakestudi has joined #ruby
* matti
suffered a great deal of pain due to malformed YAML files.
<matti>
Never again.
timonv has quit [Remote host closed the connection]
<Spooner>
Of course, but if you want something human-readable then marshalled data doesn't work so well. YAML is more a replacement for XML..
<matti>
Haha
<matti>
Fair enough.
wallerdev has quit [Read error: Connection reset by peer]
quest88 has joined #ruby
<matti>
XML was invented as a DSL for Java to turn unreadable markup in stack traces.
<Spooner>
XML: How to make data readible by both humans and machines, yet forcing both to make a lot of effort to make head or tail of it ;)
<DracoDan>
I already have a freenode staff member looking into them
sweet_kid is now known as xrosnight
makoshi has quit [Quit: Page closed]
<Spooner>
Oh, you ask them and they trawl for answers on IRC?
xrosnight is now known as sweet_kid
<shevy>
odd strategy
horofox_ has joined #ruby
<DracoDan>
exactly!
horofox has quit [Read error: Connection reset by peer]
<matti>
Human-IRC-cumputation
<matti>
;d
<shevy>
matti, why do you use pstore rather than yaml?
<Spooner>
We already have people who Google for you (directory enquiries, for example), but yeah, if it is as you say, then that is pretty grim.
<DracoDan>
of course they call it free, yet they have a paid side...
richwestcoast has joined #ruby
Virunga has quit [Remote host closed the connection]
<matti>
shevy: Voices told me to do so!
<matti>
;]
horofox has joined #ruby
A124 has left #ruby [#ruby]
<workmad3>
matti: were these voices coming out the mouths of bosses?
<matti>
workmad3: No.
<matti>
workmad3: Well. I don't know.
<matti>
workmad3: Maybe it was my neighbour?
<matti>
;/
<DracoDan>
sorry to bring this discussion here, I just saw someone ask a ruby question before they booted me for questioning their business... figured it was a safe bet that one of them would be here asking the question :-P
GeekAdmin has left #ruby ["Konversation terminated!"]
h4mz1d has joined #ruby
horofox has quit [Read error: Connection reset by peer]
<shevy>
matti grrrr
triptec has joined #ruby
<matti>
shevy: :)
<DracoDan>
hah, geekadmin was their ring leader
futilegames has joined #ruby
<shevy>
one ring to bind them
ghanima has quit [Ping timeout: 268 seconds]
horofox has joined #ruby
adac has quit [Ping timeout: 246 seconds]
<matti>
shevy: Ease of use, atomicity-to-some-level, etc.
<workmad3>
DracoDan: haha, that ##computer-help-chat seems great :D
<shevy>
they don't like me there
<matti>
shevy: Haha
<workmad3>
I'm lurking
ghanima has joined #ruby
<shevy>
hmm I am going to ##computer-help-chat and seek friends now
<DracoDan>
EVERYONE GO!!
<DracoDan>
XD
<workmad3>
and watching 'GeekAdmin' give out advice on accessing pics on a phone using a windows script to someone on a mac :)
lggr has quit [Ping timeout: 246 seconds]
<shevy>
ok this is too much, that channel scares me
<workmad3>
I think the qwebirc's are trolls :)
horofox has quit [Ping timeout: 245 seconds]
horofox has joined #ruby
<swarley>
lol..
horofox__ has quit [Ping timeout: 246 seconds]
horofox has quit [Read error: Connection reset by peer]
yshh has quit [Remote host closed the connection]
horofox has joined #ruby
<matti>
You huys have too much free time ;d
<workmad3>
last night of holiday for me... so lurking in a tech-support channel seems like fun, right? :)
<swarley>
i dont have a life
<swarley>
so ihave plenty of free time
lggr has joined #ruby
<shevy>
you guys DONT HAVE ENOUGH RUBY PROJECTS
<swarley>
I'm working on an IRC framework right now
<swarley>
not that anyone will use it when i'm finished
<workmad3>
swarley: pfft, if we only worked on things that people would use, we'd never work on anything :P
<matti>
workmad3: Not true.
kirun_ has joined #ruby
<matti>
workmad3: There is always huge demand for farting apps.
<matti>
;d
<swarley>
LOL
<workmad3>
oh, good point
<workmad3>
fart sound-boards
<matti>
;]
kirun_ has quit [Read error: Connection reset by peer]
<matti>
workmad3: And ninja shiruken throw sounds.
lxsameer has joined #ruby
<matti>
workmad3: With extra Bruce-lee yell at the end.
<matti>
;d
<matti>
workmad3: Put it up for £0.99 and retire early.
<matti>
;p
Vinz_ is now known as Merena
<matti>
[ Now, everyone will steal my business idea ;/ ]
Merena is now known as Vinz_
<workmad3>
hook into the accelerometer, so that it does that when you do a shirukin throw, but does a whip sound if you whip it
<workmad3>
and has a picture of a cat on it that, if you press it the cat farts
<matti>
Yes.
<matti>
I live the features you want.
<workmad3>
I think I just invented 'The ultimate ninja fart sound-board'
<matti>
s/live/like/
<swarley>
i'm too lazy to get the money to pay for the developers license
<matti>
So, shevy ... get cracking on this app for us ;d
<swarley>
so dont worry about me doing it
<workmad3>
swarley: do it on android and make it ad-supported
<swarley>
I've made an android app before
<matti>
workmad3: HOLD ON A MINUTE.
<swarley>
but then i realized how much i hate java
<matti>
workmad3: We desperately need to add social element there.
<shevy>
matti I am working through some exam questions right now, then I have to maintain my cookbooks project :(
kirun has quit [Ping timeout: 252 seconds]
<workmad3>
swarley: with a premium version for £0.99 that removes the ads and adds in the bruce-lee yell
<workmad3>
matti: good point
<matti>
workmad3: Like "Your friend Sarah farted like a Ninja-pro 1234 times!"
<swarley>
record your fart annd put it on a friends facebook timeline
<workmad3>
matti: it should tweet the sounds you make as you make them
<matti>
workmad3: Hahah
<workmad3>
ooh, I like yours
<matti>
workmad3: And allow you to thumb-up it on Facebook.
<swarley>
fartstep, fruityloops app with all fart synthesizers
<workmad3>
we can add in an achievments system!
<matti>
workmad3: Totally ;]
horofox has quit [Ping timeout: 256 seconds]
<workmad3>
"Achievement unlocked - gas attack. You farted 1000 times in a row"
<matti>
workmad3: "workmad scored The Fart Shogun".
<matti>
workmad3: Haha
* matti
giggles out loud
<matti>
workmad3: Although, using G+ terminology.
<matti>
workmad3: "Join the fart circle" -- sounds kinda...
<matti>
;d
<workmad3>
the ninja fart circle
<workmad3>
sounds like a group of people that roam around, fart, and then vanish
<sebastianb>
matti: czesc ;)
lggr has quit [Ping timeout: 256 seconds]
<matti>
Hi sebastianb
BrokenCog has quit [Quit: leaving]
<matti>
workmad3: Vanishing.
<matti>
workmad3: Isn't that what a Ninja would do after a successful "stealth fart attack"?
<swarley>
what else should i include in my database class. I have, [] and []=
<matti>
swarley: inspect
<matti>
;d
<swarley>
meh
<matti>
What? ;p
<swarley>
its a wrapper for sbdb
schaerli has quit [Ping timeout: 244 seconds]
<swarley>
i could probably just extend the class
<swarley>
and modify those specific methods
<matti>
swarley: .keys? .values? .each?
<matti>
swarley: No idea, think about possible use cases.
<swarley>
the thing i'm trying to avoid is the use of objects as values that cant be serialized
<swarley>
thats the only reason i even defined [] and []=
<matti>
shevy: What projects?
jlogsdon has joined #ruby
<matti>
God its cold.
<shevy>
matti ruby? hmm cookbooks project right now. scripts that would aid in querying data from yaml files right now (things like glibc, htop, binutils etc..), need to one day add querying from a database instead
* matti
needs more coffee
thunderstrike has joined #ruby
<workmad3>
matti: coffee this late?
<matti>
workmad3: I woke up recently.
<workmad3>
working nights?
<matti>
workmad3: My God's forsaken employer was waking me up in the middle of the night.
<matti>
workmad3: Yeah ;/
<swarley>
shevy, what ruby projects do you work on?
<workmad3>
or just a *really* long sunday lie-in? :)
<matti>
workmad3: I wish I could have long Sunday lie-in ;p
<workmad3>
:)
lggr has joined #ruby
<shevy>
swarley well... there are two ways to answer this
<swarley>
i've probably got time to hear both answers
<shevy>
swarley let me first start by grouping my projects into two groups - small "throwaway" scripts, or really minor things... usually that have only 1-5 .rb files at maximum, and larger projects, which take much more time, and range in about ... 5 up to 300 .rb files
<shevy>
the larger ones take much more time :(
<shevy>
they require documentation too (which I hate to write)
<swarley>
lets talk about things i can look at a readme on
<shevy>
hmm... then I think... I have only about 3-4 larger projects, lemme see
stepnem has joined #ruby
spinagon has joined #ruby
<swarley>
i wish i was able to write things that had value lol
lyaunzbe has quit [Ping timeout: 256 seconds]
<shevy>
ok, somehow writing .gemspec files confuses me still
rippa has quit [Read error: Connection reset by peer]
<shevy>
swarley or let me just write very briefly what the projects are about
<shevy>
swarly - cookbooks for querying datasets from programs, ruby build tools for making use of that data (i.e. compile or otherwise install programs), diamond shell to write a replacement for bash one day, and a pseudo-webframework called cyberweb, which is very incomplete (but I use it for my local cgi webpages)
<emsilva>
hi there. What would be the best way with nokogiri to retrieve the value field from this: <input type="hidden" name="ui.reportVersion" value="2012-09-23T15:41:47.977Z"/>? Or is the best way a good and old regex match?
demian`_ has joined #ruby
atmosx has joined #ruby
lggr has joined #ruby
JarJar has joined #ruby
<workmad3>
emsilva: is that the entire document, or is it embedded in some context?
devnull_ has joined #ruby
pdelgallego has quit [Ping timeout: 264 seconds]
<canton7>
no. never regex. doc.at_css('input[name="ui.reportVision"]')['value'] would be my preferred way, ignoring context of course
<emsilva>
workmad3: I'm working on a Nokogiri:HTML item. Its part of the document, that has lots of inputs.
<canton7>
(well, if the whole input is *just& that html tag, then regex would be ok)
<devnull_>
hi does anyone knows a bit of perl ? I wanted to ask a comparative questions. In perl you need to declare valiables e.g. my $foo = else $foo = would return an error under strict.. now in ruby I don't need this right ? Is just foo = right ?
<emsilva>
canton7: Thank you sir
<heftig>
devnull_: yes. although if you declare them too late, they might fall out of scope when you try to use them
<heftig>
compare:
<heftig>
1.times { foo = 1 }; foo
<heftig>
foo = nil; 1.times { foo = 1 }; foo
A124 has joined #ruby
<devnull_>
heftig: but you don't have in ruby a way to delcare variables like my $foo right ? you just go foo= ?
<heftig>
yes
lggr has quit [Ping timeout: 256 seconds]
swarley has joined #ruby
A124 has left #ruby [#ruby]
futilegames has quit [Quit: futilegames]
<lee__>
I have never used ruby, last 15 minutes I was researching it and it's fucking amazing and simple :D
<devnull_>
lee__: yeah big time
pdelgallego has joined #ruby
<lee__>
should I read zed shaws introduction or I should find something more advanced
<shevy>
zed shaw ragequitted ruby
<Poapfel>
lee__: if you used other programming languages before then you should probably start with something more advanced
atmosx has quit [Remote host closed the connection]
lggr has joined #ruby
<Poapfel>
shevy: he just ragequitted rails, didn't he?
<lee__>
I'll just find something advanced or I will just dive in
mercwithamouth has joined #ruby
<devnull_>
but in fairness zed was very right... rails *is* a ghetto no ?
<lee__>
he was mad about something he made idk , I forgot
<lee__>
he said they made a lot of changes to it if i remember correctly
<shevy>
lee__ to your answer, I think it depends on whether you know another programming language or not. for me, I started with this old interview by matz: http://www.artima.com/intv/rubyP.html - I recommend you to work through this tutorial here http://pine.fm/LearnToProgram/?Chapter=01 it is very easy (you will finish in 10-20 minutes, just skip the "homework" crap) and a really great introduction
tommyvyo has joined #ruby
tommyvyo has quit [Changing host]
tommyvyo has joined #ruby
<devnull_>
lee__: just avoid rails and you will be fine :)
<shevy>
devnull_ I dont know. I dont know the rails guys. Perhaps it is a ghetto, perhaps not. Perhaps Zed has a big ego and as such clashed with others, who can say. I was not there. It's a community that I have no contact with. I used ruby always because ruby is great, matz is a clever man :) I would however not abandon ruby because rails stinks
<devnull_>
shevy: great point
<devnull_>
shevy: indeed zed has a huge ego but he doesn't deny that I guess :)
vaclavt has joined #ruby
<shevy>
heeh
<shevy>
perhaps his tutorials are good, I don't know
<devnull_>
in fairness the rails guys want to do things their way and is also fair enough...a project without leadership wouldn't work
<shevy>
lee__, I bought the pickaxe back then. It helped me a lot. I bought the newer pickaxe too, some years later, but that one was not worth its cost, because I knew too much already. it explains the standard documentation of ruby though, with examples - that was helpful
<diegoviola>
isn't rubyspec supposed to build some code specification that most implementations could run and see if they pass/validate as a ruby implementation?
<diegoviola>
something like that...
xyzodiac has joined #ruby
adac has joined #ruby
<centipedefarmer>
yeah
BrokenCog has quit [Client Quit]
Chryson has joined #ruby
<centipedefarmer>
an executable spec a la rspec for ruby in ruby, or so i gather
BrokenCog has joined #ruby
BrokenCog has quit [Changing host]
BrokenCog has joined #ruby
xyzodiac has quit [Client Quit]
BrokenCog has quit [Client Quit]
emmanuelux has quit [Remote host closed the connection]
BrokenCog has joined #ruby
BrokenCog has quit [Changing host]
BrokenCog has joined #ruby
BrokenCog has quit [Client Quit]
<diegoviola>
centipedefarmer: nice
<Spaceghostc2c>
diegoviola: It's a project for documenting and validating ruby implementations.
<Spaceghostc2c>
In that it's a specification, an executable one, I hear.
<diegoviola>
Spaceghostc2c: nice
BrokenCog has joined #ruby
<diegoviola>
yeah i think that's what we need in ruby
BrokenCog has quit [Changing host]
BrokenCog has joined #ruby
<diegoviola>
more implementations competing against each other
<diegoviola>
and frameworks and libs
<Spaceghostc2c>
diegoviola: Against isn't what I'd want.
<diegoviola>
well not just in ruby
<Spaceghostc2c>
Pushing the boundaries of other ruby implementations, upping the bar, things like that.
<Spaceghostc2c>
Also jruby is fucking awesome.
<swarley>
nifty*
<Spaceghostc2c>
rbx might get some love from me some day.
<diegoviola>
sure
<Spaceghostc2c>
swarley: That would work.
<diegoviola>
i'm not a java guy though
<swarley>
^
<swarley>
Java makes my eyes bleed
<diegoviola>
mine too
<swarley>
i say that from a syntatical stand point
<Spaceghostc2c>
They write java so we don't have to.
<swarley>
the language is just ugly looking
<diegoviola>
that's why i like the idea of rubinius more, ruby in ruby
<Spaceghostc2c>
You can use ruby directly without even thinking about java in jruby.
<swarley>
i know
<Spaceghostc2c>
diegoviola: I'm planning on checking it out closer some day. I hear it's nice.
lggr has quit [Ping timeout: 268 seconds]
<swarley>
i don
<swarley>
't like swaying from MRI often
<centipedefarmer>
"They write java so we don't have to" <--- you could say the same about C couldn't you?
<Spaceghostc2c>
I do. MRI isn't fun and isn't awesome.
<Spaceghostc2c>
centipedefarmer: You aren't using a C vm though.
specialGuest has quit [Quit: WeeChat 0.3.8]
<swarley>
yes you are..
<Spaceghostc2c>
Turtles man.
<swarley>
the ruby VM is written in c
<Spaceghostc2c>
No it's not a VM.
<swarley>
ruby runs on a vm
<Spaceghostc2c>
swarley: Yes, but there's no C vm.
ltsstar has joined #ruby
<Spaceghostc2c>
Ruby uses a ruby vm written in c.
<swarley>
there could be if you really felt like it
<Spaceghostc2c>
...
<swarley>
its all implementational
Russell^^ has quit [Quit: Russell^^]
<diegoviola>
rubinius uses a c++ vm i think
specialGuest has joined #ruby
<diegoviola>
isn't it
<swarley>
if i compile c down to bytecode and use a virtual machine to run it, thats my choice
<swarley>
a stupid choice
<swarley>
but a choice none the less
kollapse has joined #ruby
<Spaceghostc2c>
I think you're using a straw man, so I'm going to go back to breaking rails community practices for the better.
<swarley>
k
<kollapse>
Hello. Is this the channel for Rails development as well, or is that separate ?
<swarley>
i don't like rails either :)
<diegoviola>
rails is too big for my taste, and i hate how activerecord hides too much...
<Mon_Ouie>
kollapse: No, check #rubyonrails for that
lggr has joined #ruby
h4mz1d has quit [Ping timeout: 246 seconds]
<kollapse>
Mon_Ouie, Thank you.
futilegames has joined #ruby
<kollapse>
Actually, this might not be a Rails issue. I'm looking for a gem that handles XML DOM parsing. Does such a thing exist ?
<Spaceghostc2c>
kollapse: #rubyonrails
<diegoviola>
try sequel and you'll never go back to activerecord
<Virunga>
Hi diegoviola, are you italian?
specialGuest has quit [Client Quit]
mrflip has joined #ruby
<diegoviola>
Virunga: no, paraguayan
<Spaceghostc2c>
diegoviola: Try cooler nosql databases and you'll find that you can solve the same problems with cooler tools. Never go back to rdbms systems again.
<Mon_Ouie>
Since we were talking about alternative ruby implementations earlier: some of them can show more than just one item upon a stack overflow exception ;)
<Mon_Ouie>
(I think at least Rubinius does that)
lggr has joined #ruby
<swarley>
MRI usually does
<swarley>
but, i have no idea where the recursion is here
cpruitt has joined #ruby
<Mon_Ouie>
MRI doesn't show me anything for a simple def bar; foo; end; def foo; foo; edn
<Mon_Ouie>
end*
<Mon_Ouie>
Same with just the foo part
<swarley>
ah, i found it
<shevy>
guys
<shevy>
rescue Exception => error
<swarley>
shevy, i did that
<shevy>
is there a way to rescue all Exceptions, except for SystemExit ?
<swarley>
uh
<Mon_Ouie>
Sure
<swarley>
i'm not sure
<Mon_Ouie>
You could just rescue them separately and reraise them, or define a custom object with an === that matches everything except SystemExit instances
awarner has quit [Remote host closed the connection]
<swarley>
wait, minitest/spec doesnt have obj.must_be_true ?
h8R has joined #ruby
<shevy>
ah
<shevy>
good idea, yeah
specialGuest has quit [Quit: WeeChat 0.3.8]
<shevy>
I will rescue it before the general rescue clause
centipedefarmer has quit [Remote host closed the connection]
wallerdev has quit [Ping timeout: 246 seconds]
lggr has joined #ruby
Knodi has joined #ruby
Knodi has quit [Client Quit]
heftig has quit [Ping timeout: 245 seconds]
Whoop has quit [Quit: Gone]
<Cache_Money>
I'm getting a String back as a response from a web server. However, it's really just a Hash. Is there an easy way to convert it to a Hash?
<Cache_Money>
or convert it to JSON so I can parse it easier??
Drewch has quit [Excess Flood]
<sent-hil>
Cache_Money: why don't you ask for json?
feelshift has joined #ruby
arubin has quit [Quit: arubin]
<Spooner>
Cache_Money : That response is a JSON hash.
Drewch has joined #ruby
lggr has quit [Ping timeout: 256 seconds]
<Cache_Money>
it gives me a 404 error if I ask for JSON
F1skr has quit [Quit: WeeChat 0.3.8]
<Cache_Money>
Spooner: but when I run resp.class it returns String
baphled has quit [Ping timeout: 256 seconds]
<Spooner>
Yes, JSON is passed as a string. You need to JSON.parse resp to get it converted into a Ruby data structure.
bier has quit [Ping timeout: 245 seconds]
feelshift has quit [Remote host closed the connection]
lggr has joined #ruby
beneggett has quit [Quit: Computer has gone to sleep.]
workmad3 has quit [Ping timeout: 245 seconds]
wallerdev has quit [Ping timeout: 256 seconds]
<Cache_Money>
Spooner: sweet! Used the Crack gem - hash = Crack::JSON.parse(resp)
<Cache_Money>
thanks
lyaunzbe has joined #ruby
pdelgallego has joined #ruby
<Spooner>
You don't need to use the Crack gem. Ruby 1.9 comes with json (require 'json').
pingfloyd has joined #ruby
h4mz1d has quit [Ping timeout: 246 seconds]
<Cache_Money>
oh nice
freeayu has joined #ruby
ryanlecompte has quit [Remote host closed the connection]
lggr has quit [Ping timeout: 256 seconds]
<examancer>
I heard about a pre-configured VM that has already has all the edge rails dependencies pre-installed so you can start hacking on rails core and submit well tested pulls.
skogis has quit [Ping timeout: 245 seconds]
nari has joined #ruby
<examancer>
I can't remember what episode of Ruby 5 it was. Anyone here of something like this and know where I can find it.
<examancer>
nevermind... just needed to concetrate on my google fu a little more
notVert has quit [Read error: Connection reset by peer]
lggr has joined #ruby
sailias has quit [Ping timeout: 246 seconds]
xyzodiac has joined #ruby
c0rn_ has quit [Ping timeout: 248 seconds]
elico has quit [Remote host closed the connection]
c0rn_ has joined #ruby
tommyvyo has quit [Quit: Computer has gone to sleep.]
ephemerian has quit [Quit: Leaving.]
sent-hil has quit [Remote host closed the connection]
havenn has joined #ruby
ghanima has quit [Ping timeout: 268 seconds]
lggr has quit [Ping timeout: 244 seconds]
swarley has joined #ruby
c0rn_ has quit [Ping timeout: 244 seconds]
lggr has joined #ruby
johnjohnson has quit []
c0rn_ has joined #ruby
<Cache_Money>
Is it bad practice to write a hash to a file?
fyolnish has quit [Remote host closed the connection]
<Cache_Money>
I'm writing a hash to a file but when I read the contents from the file I'm returned a String. When I attempt to JSON.parse(contents) I get an error stating, "unexpected token at ..."
banisterfiend has joined #ruby
vjt has joined #ruby
wpaulson has joined #ruby
Banistergalaxy has quit [Ping timeout: 248 seconds]