toekutr has quit [Remote host closed the connection]
<fir_ed>
Nah. Thanks though for trying. I was just asking how gems like thin and rails can be run by calling("thin start","rails new") because I usually have to run my console programs with ruby APP.RB
averiso has joined #ruby
Zolo has quit [Read error: Connection reset by peer]
<breakingthings>
it's… strange. but I guess better a little bit.
Zolo has joined #ruby
nari has quit [Ping timeout: 245 seconds]
Zolo has quit [Read error: Connection reset by peer]
<fir_ed>
breakingthings, ahaha
atyz has joined #ruby
<fir_ed>
if anyone can come up with a better solution, blow my mind now
Zolo has joined #ruby
<reaperb0b>
if I have 2 arrays - tags = [0, 1, 2, 3, 4] and tag_list = [0, 2, 4, 6, 8] ....how do I compare both, such that I examine each element and update the 'tags' array such that it's final result will look like 'tag_list'? i.e. I will delete all the odd numbers in tags and add '6, 8'....without doing nested each loops?
Zolo has quit [Read error: Connection reset by peer]
banister_ has quit [Read error: Connection reset by peer]
IceDragon has quit [Quit: Space~~~]
banisterfiend has joined #ruby
Zolo has joined #ruby
Zolo has quit [Read error: Connection reset by peer]
Clecio has quit [Ping timeout: 258 seconds]
Zolo has joined #ruby
Zolo has quit [Read error: Connection reset by peer]
Zolo has joined #ruby
Zolo has quit [Read error: Connection reset by peer]
synthetix has quit [Ping timeout: 258 seconds]
Zolo has joined #ruby
krainboltgreene has quit [Quit: Computer has gone to sleep.]
Zolo has quit [Read error: Connection reset by peer]
ARCADIVS has joined #ruby
Zolo has joined #ruby
Zolo has quit [Remote host closed the connection]
atyz has quit [Ping timeout: 258 seconds]
Zolo has joined #ruby
Zolo has quit [Remote host closed the connection]
bnagy has joined #ruby
<bradleyprice>
fir_ed: a ternary might look a little cleaner. name ? "Hello #{name}" : "Hello!"
siekoku has joined #ruby
tommyvyo has quit [Quit:]
Zolo has joined #ruby
tommyvyo has joined #ruby
<macmartine>
reaperb0b: You appear to have given arbitrary start and end results here. Is there a real-world example or can you define the "comparison: you mention?
Zolo has quit [Read error: Connection reset by peer]
Zolo has joined #ruby
Zolo has quit [Read error: Connection reset by peer]
tommyvyo has quit [Client Quit]
invisime has quit [Quit: Leaving.]
<fir_ed>
bradleyprice, Mindblown
Zolo has joined #ruby
Zolo has quit [Read error: Connection reset by peer]
<reaperb0b>
macmartine: I am updating questions in my db being pulled from an external API - those questions have tags that are updated from time to time
<fir_ed>
still uses one conditional like my implementation
<fir_ed>
yet.. cleaner.
<bradleyprice>
reaperb0b: tags && tag_list
<reaperb0b>
macmartine: i want to make sure that my question.tags are always up to date with the data from the API
Zolo has joined #ruby
Zolo has quit [Read error: Connection reset by peer]
mahmoudimus has quit [Quit: Computer has gone to sleep.]
<macmartine>
reaperb0b: i'm not sure how this relates to your original question.
Zolo has joined #ruby
Zolo has quit [Remote host closed the connection]
twoism has quit [Remote host closed the connection]
<reaperb0b>
macmartine: never mind
<macmartine>
k
<reaperb0b>
i got the solution
<reaperb0b>
thnx
twoism has joined #ruby
reaperb0b has left #ruby [#ruby]
HecAtic has joined #ruby
Zolo has joined #ruby
Zolo has quit [Remote host closed the connection]
uris has quit [Quit: Leaving]
Inside has quit [Ping timeout: 252 seconds]
tommyvyo has joined #ruby
Zolo has joined #ruby
Zolo has quit [Read error: Connection reset by peer]
Zolo has joined #ruby
emptymag00 has quit [Ping timeout: 272 seconds]
Zolo has quit [Read error: Connection reset by peer]
Zolo has joined #ruby
Zolo has quit [Read error: Connection reset by peer]
jonahR has joined #ruby
Zolo has joined #ruby
Zolo has quit [Read error: No route to host]
tmiller has joined #ruby
moos3 has quit [Quit: Computer has gone to sleep.]
agarie has quit [Remote host closed the connection]
Zolo has joined #ruby
Zolo has quit [Read error: Connection reset by peer]
Zolo has joined #ruby
Zolo has quit [Remote host closed the connection]
cibs has quit [Ping timeout: 256 seconds]
Zolo has joined #ruby
Zolo has quit [Read error: Connection reset by peer]
slainer68 has joined #ruby
wmoxam has joined #ruby
hasimo-t has joined #ruby
radic has quit [Disconnected by services]
Davey has quit [Quit: Computer has gone to sleep.]
radic_ has joined #ruby
angusiguess has joined #ruby
Zolo has joined #ruby
tmiller has quit [Ping timeout: 258 seconds]
Zolo has quit [Read error: Connection reset by peer]
Davey has joined #ruby
Zolo has joined #ruby
ryanf has joined #ruby
browndawg has joined #ruby
Zolo has quit [Read error: Connection reset by peer]
Zolo has joined #ruby
Zolo has quit [Read error: Connection reset by peer]
ananthakumaran has joined #ruby
fire has quit [Ping timeout: 264 seconds]
Zolo has joined #ruby
subbyyy has quit [Ping timeout: 252 seconds]
Zolo has quit [Read error: Connection reset by peer]
<A124>
Ban the Zolo
Zolo has joined #ruby
Zolo has quit [Remote host closed the connection]
Zolo has joined #ruby
Zolo has quit [Remote host closed the connection]
Zolo has joined #ruby
Zolo has quit [Remote host closed the connection]
browndawg has quit [Ping timeout: 256 seconds]
emptymag00 has joined #ruby
fire has joined #ruby
Zolo has joined #ruby
tcopp has joined #ruby
Zolo has quit [Read error: Connection reset by peer]
marcdel has joined #ruby
Zolo has joined #ruby
Zolo has quit [Read error: Connection reset by peer]
mhn23 has quit [Read error: Connection reset by peer]
workmad3 has quit [Ping timeout: 245 seconds]
coderhs has joined #ruby
tish has quit [Quit: Leaving.]
Mon_Ouie has joined #ruby
Mon_Ouie has joined #ruby
Mon_Ouie has quit [Changing host]
maxmanders has quit [Quit: Computer has gone to sleep.]
skattyadz has joined #ruby
beilabs has joined #ruby
maxmanders has joined #ruby
xardas has joined #ruby
Adys has quit [Read error: Connection reset by peer]
Adys has joined #ruby
spider-mario has joined #ruby
Quebert has joined #ruby
maxmanders has quit [Quit: Computer has gone to sleep.]
jhowarth has joined #ruby
rwz has joined #ruby
Spaceghost|cloud has joined #ruby
taqutor has joined #ruby
lectrick has joined #ruby
beilabs has quit [Ping timeout: 256 seconds]
davetherat has quit [Remote host closed the connection]
davetherat has joined #ruby
gcds_ has joined #ruby
workmad3 has joined #ruby
gcds has quit [Ping timeout: 245 seconds]
gcds_ is now known as gcds
Eldariof-ru has joined #ruby
includex has joined #ruby
madb055 has joined #ruby
miso1337 has joined #ruby
lkba has joined #ruby
quazimodo has joined #ruby
eldariof has quit [Ping timeout: 256 seconds]
<quazimodo>
I need to use state_machine and to set states, however state= is inadequate because it allows one to set any string as the state, which... isn't nice
rontec76 has quit [Remote host closed the connection]
browndawg has left #ruby [#ruby]
yacks has joined #ruby
Adys has quit [Remote host closed the connection]
sayan has joined #ruby
_veer has quit [Ping timeout: 258 seconds]
_veer has joined #ruby
visof has quit [Quit: leaving]
visof has joined #ruby
visof has quit [Changing host]
visof has joined #ruby
banisterfiend has quit [Read error: Connection reset by peer]
banisterfiend has joined #ruby
<threesome>
I'm using Vagrant, and I'm trying to do 'vagrant plugin install vagrant-butcher', but get "/opt/vagrant/embedded/lib/ruby/1.9.1/rubygems/dependency_installer.rb:153:in `gather_dependencies': Unable to resolve dependencies: chef requires net-ssh (~> 2.6); net-ssh-multi requires net-ssh (>= 2.1.4); net-ssh-gateway requires net-ssh (>= 2.6.5); vagrant requires net-ssh (~> 2.2.2); net-scp requires net-ssh (>= 1.99.1) (Gem::DependencyE
<threesome>
rror)" as an error
Mon_Ouie has quit [Quit: WeeChat 0.4.0]
<threesome>
I'm new to Ruby, how could I solve this?
sepp2k has joined #ruby
cephalopod has quit [Ping timeout: 260 seconds]
rocket has joined #ruby
beilabs has joined #ruby
chussenot has quit [Quit: chussenot]
samuel02 has joined #ruby
Quebert has quit [Ping timeout: 245 seconds]
banister_ has joined #ruby
love_color_text has joined #ruby
banisterfiend has quit [Ping timeout: 255 seconds]
mengu_ has quit [Ping timeout: 245 seconds]
<Hanmac>
threesome: drop vagrant, they drop rubygems they dont deserves mercy :D
dhruvasagar has quit [Ping timeout: 245 seconds]
shock_one has quit [Read error: Connection reset by peer]
dhruvasagar has joined #ruby
aloshkarev has joined #ruby
hmarr has joined #ruby
tvw has quit [Read error: Connection reset by peer]
tvw has joined #ruby
Czupa has joined #ruby
_veer has quit [Ping timeout: 258 seconds]
Czupa has quit [Client Quit]
Mon_Ouie has joined #ruby
Mon_Ouie has quit [Changing host]
Mon_Ouie has joined #ruby
Czupa has joined #ruby
_veer has joined #ruby
_veer has joined #ruby
_veer has quit [Changing host]
mengu_ has joined #ruby
motto has quit [Quit: Sto andando via]
guns has quit [Quit: guns]
presto53 has left #ruby ["Leaving"]
ferdev has quit [Quit: ferdev]
presto53 has joined #ruby
daniel_- has quit [Ping timeout: 260 seconds]
chussenot has joined #ruby
mattbl has quit [Quit: This computer has gone to sleep]
dhruvasagar has quit [Read error: Operation timed out]
mattbl has joined #ruby
mattbl has quit [Client Quit]
dhruvasagar has joined #ruby
browndawg has joined #ruby
mattbl has joined #ruby
Hanmac has quit [Ping timeout: 264 seconds]
Vert has quit [Ping timeout: 252 seconds]
Vert has joined #ruby
kofno has joined #ruby
shellox has quit [Remote host closed the connection]
Quebert has joined #ruby
philipd has joined #ruby
philipd has quit [Client Quit]
averiso has quit [Quit: Computer has gone to sleep.]
love_color_text has quit [Remote host closed the connection]
philipd has joined #ruby
philipd has quit [Max SendQ exceeded]
philipd has joined #ruby
philipd has quit [Max SendQ exceeded]
philipd has joined #ruby
philipd has quit [Max SendQ exceeded]
rocket has quit [Ping timeout: 252 seconds]
philipd has joined #ruby
philipd has quit [Max SendQ exceeded]
philipd has joined #ruby
philipd has quit [Max SendQ exceeded]
mattbl has quit [Quit: This computer has gone to sleep]
philipd has joined #ruby
philipd has quit [Max SendQ exceeded]
aloshkarev has quit [Quit: aloshkarev]
philipd has joined #ruby
philipd has quit [Max SendQ exceeded]
theRoUS has joined #ruby
theRoUS has joined #ruby
theRoUS has quit [Changing host]
philipd has joined #ruby
philipd has quit [Max SendQ exceeded]
enriclluelles has joined #ruby
philipd has joined #ruby
philipd has quit [Max SendQ exceeded]
decoponio has quit [Quit: Take to stop a load on my PC]
Hanmac has joined #ruby
philipd has joined #ruby
philipd has quit [Max SendQ exceeded]
Faris has joined #ruby
arturaz has joined #ruby
philipd has joined #ruby
philipd has quit [Max SendQ exceeded]
philipd has joined #ruby
philipd has quit [Max SendQ exceeded]
philipd has joined #ruby
rabidpraxis has joined #ruby
razibog has quit [Ping timeout: 255 seconds]
chussenot has quit [Ping timeout: 264 seconds]
rabidpraxis has quit [Ping timeout: 256 seconds]
aderyabin has joined #ruby
shirokuro11 has joined #ruby
aderyabin has quit [Client Quit]
banisterfiend has joined #ruby
banister_ has quit [Read error: Connection reset by peer]
backjlack has joined #ruby
maxmanders has joined #ruby
phantasm66 has joined #ruby
maxmanders has quit [Client Quit]
phantasm66 has quit [Client Quit]
anderse has joined #ruby
mikewintermute has joined #ruby
hiyakashi has joined #ruby
theRoUS has quit [Ping timeout: 252 seconds]
colonolGron has joined #ruby
mattbl has joined #ruby
tcopp has joined #ruby
includex has quit [Quit: Computer has gone to sleep.]
tenmilestereo has joined #ruby
Xeago has joined #ruby
kirun has joined #ruby
Czupa has quit [Ping timeout: 256 seconds]
Hanmac has quit [Ping timeout: 246 seconds]
madb055 has quit [Ping timeout: 258 seconds]
Hanmac has joined #ruby
love_color_text has joined #ruby
Czupa has joined #ruby
yashshah_ has joined #ruby
beilabs has quit [Ping timeout: 264 seconds]
Xeago has quit [Remote host closed the connection]
yshh has joined #ruby
flexd has quit [Quit: WeeChat 0.4.0]
hmarr has quit []
baphled has joined #ruby
indigenous has left #ruby [#ruby]
indigenous has joined #ruby
daniel_- has joined #ruby
philipd has quit [Quit: Computer has gone to sleep.]
jonahR has quit [Ping timeout: 256 seconds]
madb055 has joined #ruby
maxmanders has joined #ruby
tcopp has quit [Ping timeout: 252 seconds]
philipd has joined #ruby
beilabs has joined #ruby
angusiguess has joined #ruby
maxmanders has quit [Client Quit]
skattyadz has quit [Quit: skattyadz]
yashshah_ has quit [Ping timeout: 256 seconds]
weeb1e_ has quit [Read error: Connection reset by peer]
flexd has joined #ruby
weeb1e has joined #ruby
|christian| has quit [Quit: Leaving]
whitedawg has joined #ruby
kofno has quit [Remote host closed the connection]
Neomex has joined #ruby
mathRand has quit [Ping timeout: 256 seconds]
mattbl has quit [Quit: This computer has gone to sleep]
threesome has quit [Read error: Connection reset by peer]
quazimodo has quit [Ping timeout: 245 seconds]
hbpoison has quit [Ping timeout: 264 seconds]
threesome has joined #ruby
tvw has quit []
quazimodo has joined #ruby
tvw has joined #ruby
rabidpraxis has joined #ruby
freeayu__ has quit [Remote host closed the connection]
dangerousdave has joined #ruby
tvw has quit [Client Quit]
rabidpraxis has quit [Ping timeout: 252 seconds]
atno has quit [Remote host closed the connection]
Faris has quit [Read error: Connection reset by peer]
razibog has joined #ruby
atno has joined #ruby
philipd has quit [Quit: Computer has gone to sleep.]
dhs227 has joined #ruby
sambio has joined #ruby
BSaboia has joined #ruby
beilabs has quit [Ping timeout: 258 seconds]
<threesome>
I removed all system gems in /var/lib/gems using 'gem uninstall' commands, and now I'm left with /var/lib/gems/1.9.1/ which has 4 empty directories underneath it (cache, doc, gems, specifications). Can I just remove the entire /var/lib/gems safely using 'rm' command, or is there some safe way to do it?
<threesome>
I would have thought that doing 'sudo apt-get purge ruby' would have taken care of it. For my own learning purposes, could someone explain why it does not?
sailias has joined #ruby
presto53 has quit [Ping timeout: 245 seconds]
hbpoison has joined #ruby
ttt has quit [Remote host closed the connection]
mercwithamouth has joined #ruby
xpen has joined #ruby
pyrac has joined #ruby
philipd has joined #ruby
philipd has quit [Max SendQ exceeded]
wallerdev has joined #ruby
shock_one has joined #ruby
Czupa has quit [Remote host closed the connection]
philipd has joined #ruby
philipd has quit [Max SendQ exceeded]
philipd has joined #ruby
philipd has quit [Max SendQ exceeded]
dangerousdave has quit [Read error: Connection reset by peer]
philipd has joined #ruby
philipd has quit [Max SendQ exceeded]
dangerousdave has joined #ruby
<dhs227>
I tried search on rubydoc.info for "PGconn.open"
<dhs227>
but nothing found?
philipd has joined #ruby
philipd has quit [Max SendQ exceeded]
<dhs227>
I suppose the local Rdoc has installed for pg lib, but how to access to it?
<MrZYX>
dhs227: the expressions return value is 5 not 3 5 (which isn't a valid value anyway)
<apeiros_>
interesting, didn't know %<> was accepted too
<emergion>
Hey all, what's the deal with putting require statements in the gem spec, is that normal ? I noticed when bundler generates the gemspec that happens
<dhs227>
So #{} code block return one value, anyway, right? implicit that the last line value in {} are returned?
<apeiros_>
IMO bad style
<apeiros_>
@ emergion
<emergion>
my bad, cancel that
<apeiros_>
but a common use case is to require/require_relative the version file
love_color_text has quit [Ping timeout: 256 seconds]
DrCode has quit [Ping timeout: 276 seconds]
<emergion>
apeiros_, yup just realised that was all that was in there :)
<emergion>
cheers
<apeiros_>
dhs227: nothing can return more than 1 value, nothing can return less than 1 value. everything returns exactly 1 value.
<bakingbread>
Hanmac: it's even more nifty, yeah
<dhs227>
apeiros_> got it
<Hanmac>
PS: that 1 value can be an array
DrCode has joined #ruby
whitedawg has quit [Quit: Leaving.]
<bakingbread>
dhs227: block return the value of the last statement
<dhs227>
Hanmac> that return value depends on the last statement, right?
<dhs227>
Got it.
<dhs227>
does ruby support "goto" keyword or similiar ?
<apeiros_>
no
<MrZYX>
who needs that anyway?
<apeiros_>
parser generators, state machines
<apeiros_>
but manually coded goto's? big nono IMO.
veleno has joined #ruby
synthetix has joined #ruby
<bakingbread>
dhs227: thanks god it doesn't
<veleno>
hello. what is the best way to import libraries into a .rb script ? In a program i'm modifying, sometimes I see "require File.expand_path(File.join(dir, 'common'))" , or "require "#{dir}/common"" .which one is the best/ most supported/suggested way ?
<bakingbread>
dhs227: but you may look into catch/throw if you need to break out of something
<apeiros_>
in ~9y of ruby I've used it like 2 times
<apeiros_>
ruby almost always has better ways of dealing with such stuff
<bakingbread>
apeiros_: you may emulate catch/throw with an additional function and return statement
<Hanmac>
dhs227 ruby only supports goto when you enable jokes :P
<Hanmac>
veleno: use require_relative
<apeiros_>
Hanmac: hah, right, almost forgot about that :D
<bakingbread>
apeiros_: c/th is just more convenient so you don't have to name your func
<apeiros_>
bakingbread: not what I mean
girija has joined #ruby
v__ has joined #ruby
razibog has quit [Quit: Leaving.]
<veleno>
Hanmac: where is the doc for require_relative ?
<dhs227>
Why this code not work as expected? res = conn.exec('SELECT 1 AS a, 2 AS b, NULL AS c') ; res.each{|tuple| puts tuple[0] } #suppose to print 1st column value of 1st row
Kirotan has joined #ruby
<dhs227>
expect to print "1", but actually nothing.
<Hanmac>
veleno: ri Kernel.require_relative
coderhs has joined #ruby
<veleno>
Hanmac: i get: "Nothing known about Kernel.require_relative"
philipd has quit [Quit: Computer has gone to sleep.]
Squarepy has joined #ruby
slainer68 has joined #ruby
synthetix has quit [Ping timeout: 240 seconds]
<Hanmac>
veleno: ri require_relative
<veleno>
Hanmac: same..
Squarepy has quit [Changing host]
Squarepy has joined #ruby
<bakingbread>
dhs227: run irb and see what is res actually
<apeiros_>
dhs227: show you what? you didn't say what you want.
<apeiros_>
obviously you don't want a specific column from the result (otherwise your "user supplied" makes no sense)
<apeiros_>
visof: hash[:hello][:one][:two]
<apeiros_>
visof: eh, what?
<visof>
apeiros_, i want to do this dynamic, with any hash and with any depth
<apeiros_>
ergh, today is "lets ask something which makes no sense" day…
ehellman has joined #ruby
<bakingbread>
)))
bradleyprice has joined #ruby
<MrZYX>
visof: please try to describe the problem you want to solve, not the solution you think you need
<apeiros_>
visof: and what with {:hello => 1, :one => {:foo => 2}, bar: 3} ?
<dhs227>
The scenario is user inputs SQL and program execute the SQL, retrieve the 1st row as result, and try to understand how many column it has, and one by one print it.
<dhs227>
can we do that?
<dhs227>
no kidding.
<apeiros_>
dhs227: Hash#size tells you how many columns
<MrZYX>
dhs227: as I said you want hash#each
<apeiros_>
dhs227: generally, read Hash docs
<visof>
apeiros_, the format is hash of hashes,
<apeiros_>
visof: actually yours isn't
<bakingbread>
dhs227: your_hash.each do |key, value| ...
<apeiros_>
visof: you have an array in there
<visof>
except the last key , sorry
heliumsocket has joined #ruby
<apeiros_>
visof: or did you mean to say "the format is all hashes have exactly 1 key"?
theRoUS has joined #ruby
theRoUS has quit [Changing host]
theRoUS has joined #ruby
<apeiros_>
if that's the case - I'd say you're barking up the wrong tree. collect your data in a more meaningful way.
<apeiros_>
(so that you don't end up with a DS which doesn't suit you at all)
arturaz has quit [Read error: Connection reset by peer]
jurassic_ has joined #ruby
ehellman has quit []
arturaz has joined #ruby
sailias has joined #ruby
BSaboia__ has quit [Quit: Fui embora]
BSaboia has joined #ruby
<dhs227>
what is difference, p or puts?
Quebert has quit [Quit: Leaving...]
<dhs227>
MrZYX> the values() method really great for me.
nari has quit [Ping timeout: 256 seconds]
beilabs has quit [Ping timeout: 258 seconds]
Kirotan_ has joined #ruby
<arturaz>
dhs227, p(x) == puts(x.inspect)
casheew__ has quit [Quit: Lost terminal]
lewis has joined #ruby
gfredericks has joined #ruby
<gfredericks>
how can I obtain a reference to an object's eigenclass?
<Spooner>
gf3, eiginclass = class << obj; self; end
<Spooner>
Oops @gfredericks
maxmanders has quit [Quit: Computer has gone to sleep.]
<gfredericks>
oh so it does
<gfredericks>
Spooner: thanks
Kirotan_ has quit [Ping timeout: 258 seconds]
Eldariof28-ru has joined #ruby
jrajav has joined #ruby
<sepp2k>
gfredericks: Or: object.singleton_class
<threesome>
How can I update my gems if I originally specified something wrong in the Gemfile? I originally had "gem 'vagrant-butcher'" which installs an old version of Chef, so I replaced it with "gem 'chef'", but when I run 'bundle install' it says: Your bundle is complete!
<threesome>
Use `bundle show [gemname]` to see where a bundled gem is installed.
<gfredericks>
sepp2k: doesn't work for me in 1.8.7
emmanuelux has quit [Ping timeout: 258 seconds]
lewis has quit [Ping timeout: 252 seconds]
<sepp2k>
Yes, it was added in 1.9 - 1.9.2, I believe.
Czupa has joined #ruby
<gfredericks>
sepp2k: good to know, thx
lewis has joined #ruby
alainus has joined #ruby
<alainus>
what's the correct data type for a service that allows a limited number of types? (e.g. Cleaning, Cooking, Dog-walking, etc.) ? Better yet, what if i'd want that collection of types to change in time ?
emmanuelux has joined #ruby
<MrZYX>
threesome: "but"? if you want a particular version just specify it: gem 'chef', '1.2.3' or gem 'chef', '~> 1.2' or gem 'chef', '>= 1' etc
Eldariof93-ru has quit [Ping timeout: 248 seconds]
lewis has quit [Remote host closed the connection]
brhelwig has quit [Remote host closed the connection]
|christian| has joined #ruby
maxmanders has joined #ruby
<Hanmac>
MrZYX his problem is that the depencies could not resolved
samuelkadolph has quit [Quit: Quitting]
<MrZYX>
Hanmac: yes, I want him to run into the red conflict message ;P
includex has quit [Quit: Leaving...]
<Hanmac>
threesome: i already told you that vagrant drops rubygems support you cant install it with gem anymore
kzrl has quit [Ping timeout: 246 seconds]
kirun has joined #ruby
samuelkadolph has joined #ruby
samuelkadolph has quit [Client Quit]
<threesome>
MrZYX, what is this conflict message?
<MrZYX>
go and find out
tish1 has joined #ruby
samuelkadolph has joined #ruby
<threesome>
Ok
<Hanmac>
MrZYX do you know what i hate? i want to help others, but they are to dumb to read my messages
<MrZYX>
heh, sometimes it's just a ping timeout :P
kzrl has joined #ruby
<threesome>
Hanmac, the question I just asked is different from the one you answered earlier
ninjers has quit [Read error: Operation timed out]
gfredericks has left #ruby [#ruby]
<Hanmac>
threesome its still an vagrant problem
<MrZYX>
Hanmac: my bet is that the old chef version is still locked in his Gemfile.lock
lewis has joined #ruby
<threesome>
MrZYX, good idea I will delete that file and try again
<MrZYX>
threesome: no, don't
<Hanmac>
yetanother reason why i dont use bundler
<MrZYX>
do what I told you earlier
whitedawg has joined #ruby
yannis has joined #ruby
<MrZYX>
Hanmac: lucky you has no two projects with colliding version requirements
presto53 has quit [Ping timeout: 258 seconds]
emmanuelux has quit [Ping timeout: 264 seconds]
<dhs227>
do, must pair with end?
ninjers has joined #ruby
<MrZYX>
yes
<threesome>
Hanmac, what do you use in place of bundler? (Sorry, new to this)
<Hanmac>
i yust dont use it
lewis_ has joined #ruby
Neomex has quit [Quit: Neomex]
<threesome>
Hanmac, so you do a 'gem install ....' for the gem you want as well as each of its dependencies?
emmanuelux has joined #ruby
<Hanmac>
threesome: i dont know but when i do "gem install xyz" it automatic install each dependencies ... without bundler
razibog has joined #ruby
arturaz has quit [Remote host closed the connection]
lewis has quit [Ping timeout: 258 seconds]
<threesome>
MrZYX, is this the red conflict message? You have requested:
<threesome>
The bundle currently has chef locked at 0.8.10.
<MrZYX>
yes
<MrZYX>
now read it instead of just copy-pasting it
emmanuelux has quit [Max SendQ exceeded]
<visof>
i describe what want in this code and what is the wrong answer i got
workmad3 has joined #ruby
<visof>
can anyone help me to fix that?
<MrZYX>
visof: we want to know why you need to do this, i.e. "I want to mount the new drive to fix the car so I can drive home"
xcv has joined #ruby
<MrZYX>
er, s/drive/wheel/ silly me
maxmanders has quit [Quit: Computer has gone to sleep.]
emmanuelux has joined #ruby
beilabs has joined #ruby
<visof>
i'm trying to represent things as in tree and want to get the nodes till the end depth
Loaft has quit [Ping timeout: 255 seconds]
arturaz has joined #ruby
maxmanders has joined #ruby
<visof>
and use JSON to write the data to a file and read it back from it
<visof>
is there a better format to do this tree structure?
Nisstyre has quit [Ping timeout: 264 seconds]
slainer68 has joined #ruby
<Hanmac>
xml ? :D
Czupa has quit [Remote host closed the connection]
<visof>
Hanmac, i feel JSON would be better and easier
emmanuelux has quit [Max SendQ exceeded]
hiyakashi has quit [Quit: お前は知りすぎた]
emmanuelux has joined #ruby
girija has quit [Ping timeout: 264 seconds]
nomenkun has joined #ruby
<visof>
why hash.each do |k, v| ; puts k; hash = v; end ; why isn't updated using hash = v?
<visof>
how can i update hash with new value that is another hash ?
brianherman has joined #ruby
eldariof has joined #ruby
catphish has joined #ruby
<threesome>
MrZYX, did it, makes sense now :)
emmanuelux has quit [Max SendQ exceeded]
hiyakashi has joined #ruby
slainer68 has quit [Ping timeout: 258 seconds]
sandGorgon has quit [Ping timeout: 258 seconds]
Kirotan has joined #ruby
<threesome>
How can I uninstall gems that aren't required? If I remove vagrant-butcher from Gemfile and do 'gem clean' or 'bundle install' or 'bundle update', vagrant-butcher remains
<threesome>
Even if I remove Gemfile.lock
<MrZYX>
bundle clean
TheFuzzball has quit [Quit: Leaving...]
<MrZYX>
maybe?
tcopp has joined #ruby
<sepp2k>
visof: hash = v does change the value of hash. It does not affect the scope or duration of the current each-loop and there is no reason that it should.
<sepp2k>
visof: One easy way to implement a depth first search on a tree is to write a method that recurses on the child nodes.
<MrZYX>
threesome: bundle update updates your Gemfile.lock, bundle install installs the gems in the Gemfile.lock, gem clean removes older versions of installed gems
synthetix has joined #ruby
Eldariof28-ru has quit [Ping timeout: 252 seconds]
<sepp2k>
s/search/traversal/
<visof>
sepp2k, how can i do that>
<visof>
?
<sepp2k>
visof: How can you define a method? Using the def keyword.
Ohga has joined #ruby
emmanuelux has joined #ruby
<visof>
sepp2k, i know, how can i implement what did you say
pskosinski has quit [Ping timeout: 248 seconds]
beilabs has quit [Ping timeout: 258 seconds]
pskosinski has joined #ruby
Adys has joined #ruby
mercwithamouth has quit [Read error: Operation timed out]
<sepp2k>
I already told you how to do it. If you did not understand some part of what I said, please be specific about what you didn't understand. Otherwise I can only restate the same thing in different words.
<visof>
ok
Chryson has joined #ruby
AtoxIO has joined #ruby
browndawg has quit [Quit: Leaving.]
IngoPan has joined #ruby
<IngoPan>
Hi, i am a Ruby newbie and i´d like to know if someone knows this Amazon book
<IngoPan>
and can tell me if its any good to enter the Rails world: http://t.co/Z1N57eE3Dn ?
Nisstyre has joined #ruby
emmanuelux has quit [Max SendQ exceeded]
Catbuntu has joined #ruby
TheFuzzball has joined #ruby
TheFuzzball has quit [Max SendQ exceeded]
jpfuentes2 has joined #ruby
<Hanmac>
ingoPan #rubyonrails
TheFuzzball has joined #ruby
TheFuzzball has quit [Max SendQ exceeded]
brianherman has quit [Quit: Leaving]
ckrailo has quit [Quit: Computer has gone to sleep.]
brianherman has joined #ruby
brianherman has quit [Client Quit]
lewis_ has quit [Remote host closed the connection]
TheFuzzball has joined #ruby
<visof>
sepp2k, can't i update original hash ?
brianherman has joined #ruby
TheFuzzball has quit [Max SendQ exceeded]
rabidpraxis has joined #ruby
jonathanwallace has joined #ruby
tomzx_mac has joined #ruby
TheFuzzball has joined #ruby
TheFuzzball has quit [Max SendQ exceeded]
sambao21 has joined #ruby
kirun has quit [Ping timeout: 256 seconds]
TheFuzzball has joined #ruby
sduckett has joined #ruby
TheFuzzball has quit [Max SendQ exceeded]
TheFuzzball has joined #ruby
sailias has quit [Quit: Leaving.]
beilabs has joined #ruby
TheFuzzball has quit [Max SendQ exceeded]
Es0teric has joined #ruby
sailias has joined #ruby
sailias has quit [Client Quit]
<veleno>
is there a tool that analyze the current directory for .rb files and check for compatibility with ruby 2.0.0 ?
gfredericks has joined #ruby
sailias has joined #ruby
sailias has quit [Client Quit]
rabidpraxis has quit [Ping timeout: 264 seconds]
TheFuzzball has joined #ruby
TheFuzzball has quit [Max SendQ exceeded]
<gfredericks>
is it fair to say that the two things that can't be changed at runtime are a class's superclass and an object's class?
sailias has joined #ruby
madb055 has quit [Ping timeout: 258 seconds]
TheFuzzball has joined #ruby
sailias1 has joined #ruby
<banisterfiend>
gfredericks: well you can effecitvely change superclass by including a module
TheFuzzball has quit [Max SendQ exceeded]
sailias has quit [Read error: Connection reset by peer]
sduckett has quit [Ping timeout: 252 seconds]
<gfredericks>
banisterfiend: in what sense does that "effectively" change the superclass?
<banisterfiend>
gfredericks: in the sense method lookup happens in the module before it happens in the superclass
TheFuzzball has joined #ruby
sambao21 has quit [Ping timeout: 252 seconds]
<gfredericks>
banisterfiend: sure; but x.class.superclass will still be the same, right?
whitedawg has quit [Quit: Leaving.]
<gfredericks>
and the superclass can't be removed from the lookup path, only shadowed?
jurassic_ has quit [Quit: jurassic_]
<banisterfiend>
gfredericks: yes, but x.class.superclass isnt' really what's important, it's the order of things in x.class.ancestors
<banisterfiend>
gfredericks: right
<gfredericks>
sure; I'm just trying to figure out exactly what things are dynamic; can a module be unincluded?
<banisterfiend>
no
<banisterfiend>
well, not in pure ruby, but u can hack it (via the c api) to allow uninclusion
<Hanmac>
with enouth evil you can change the superclass
dhruvasagar has quit [Ping timeout: 258 seconds]
<workmad3>
gfredericks: you could always unload a class (by unsetting the constant) and recreate it with a different superclass
<sepp2k>
visof: It is not clear what you mean by that. You can surely change the hash variable and that is exactly what you're doing.
<Hanmac>
workmad3 gfredericks but this does not work for already created objects
<gfredericks>
workmad3: what does that mean for instances of the old class?
<sepp2k>
That just doesn't help you any.
<workmad3>
gfredericks: doesn't touch them at all
<workmad3>
gfredericks: as Hanmac said :)
mityaz has joined #ruby
generalissimo has joined #ruby
<gfredericks>
got it
<gfredericks>
so the thing that's dynamic here is the relationship between the constant name and the class
dhruvasagar has joined #ruby
alainus is now known as alainus[-_-]
vagmi has joined #ruby
<gfredericks>
and it sounds like module inclusion is only quasi-dynamic as it can't be undone
<Hanmac>
gfredericks:
<Hanmac>
>> class A; end; a= A.new; Object.send(:remove_const,:A); class A; end; b= A.new; p a.class == b.class, a.class.name == b.class.name
<gfredericks>
Hanmac: that fits what I was imagining; thanks
<Hanmac>
gfredericks: as you can see, the classes are not equal, but the class names are
<gfredericks>
righto
Catbuntu has quit [Read error: Connection reset by peer]
Spooner has quit [Remote host closed the connection]
ckrailo has joined #ruby
<Hanmac>
php stuff like magento is more WORSE with that
Catbuntu has joined #ruby
hashbangchris has joined #ruby
<banisterfiend>
gfredericks: you can also prepend modules in ruby 2.0
<banisterfiend>
but that's kind of weird
dhruvasagar has quit [Read error: Connection reset by peer]
samuel02 has quit [Remote host closed the connection]
samuel02 has joined #ruby
sleetdrop has joined #ruby
Neomex has joined #ruby
ferdev has quit [Quit: ferdev]
lewis has joined #ruby
kofno has joined #ruby
sgmac has joined #ruby
IngoPan has quit []
artm has joined #ruby
A124 has quit [Quit: Leaving.]
artm has left #ruby [#ruby]
samuel02 has quit [Ping timeout: 264 seconds]
Czupa has joined #ruby
thufir_ has joined #ruby
v0n has joined #ruby
<gfredericks>
banisterfiend: so that's like regular inclusion but later in the call chain than other modules included in the same class?
<banisterfiend>
gfredericks: nah it's really freaky
jgrevich has joined #ruby
<banisterfiend>
it inserts itself 'before' the class
<banisterfiend>
doesnt make sense to me, but that's whta it does :)
josefrichter has joined #ruby
Xeago has quit [Remote host closed the connection]
<gfredericks>
oh I _think_ I can make sense of that
sonda has joined #ruby
<banisterfiend>
well i dont understand a word of it ;)
<sepp2k>
banisterfiend: It makes sense if you want the module to wrap the including class's methods somehow.
<gfredericks>
so the call lookups checks prepended modules, then methods in the class, then included modules?
osvico has quit [Ping timeout: 245 seconds]
<workmad3>
banisterfiend: does it include itself before the objects singleton class?
<workmad3>
banisterfiend: or just before the class itself in method lookup?
<banisterfiend>
sepp2k: well it just creeps me out that self != ancestors.first
<workmad3>
banisterfiend: if it's the second, then prepending a module is just a shorthand for doing 'def initialize; self.singleton_class.send(:include, SomeModule); end;'
Nisstyre has quit [Ping timeout: 245 seconds]
<banisterfiend>
sepp2k: and the implementation for it is terrifying, it basically takes the original class, pushes is up to become an "iclass" (included module) and sets the module as the real class
sgmac has quit [Remote host closed the connection]
X-Jester has joined #ruby
<banisterfiend>
pushes it*
averiso has joined #ruby
jurassic_ has joined #ruby
<banisterfiend>
workmad3: even freakier than any of that based on my reading of implementatino
mockra has joined #ruby
Quebert has joined #ruby
jurassic_ has quit [Client Quit]
<workmad3>
banisterfiend: well, the implementation can be freaky :) but is the *effect* that of having an automatic inclusion of that module in the singleton class of each object? :)
<workmad3>
banisterfiend: or is it something different?
<banisterfiend>
workmad3: no it's not
<banisterfiend>
workmad3: it all happens on the class, basically the class is 'replaced' by the module
<banisterfiend>
and the class is pushed up to become a module
mockra has quit [Remote host closed the connection]
jurassic_ has joined #ruby
lewis has quit [Remote host closed the connection]
<banisterfiend>
that's an oversimpilfication, but that's essentially what's happening
catphish has left #ruby ["Leaving"]
mercwithamouth has joined #ruby
<banisterfiend>
so if you had an ancestor chain like this: C -> B (B is superclass of class C)
<banisterfiend>
and the you prepend a module M on C, u get this instead: M -> C -> B
<banisterfiend>
so the module "M" in a sense *becomes* the class C
dhruvasagar has joined #ruby
<banisterfiend>
and C (the original class) behaves as if it was a module included into M
v__ has quit [Ping timeout: 256 seconds]
v__ has joined #ruby
Eldariof-ru has joined #ruby
<banisterfiend>
workmad3: prepending introduces a lot of messed up edge cases
<banisterfiend>
workmad3: for example, what should this do now? C.instance_method(:hello)
<banisterfiend>
assume that C has a hello metohd and so does its prepended module M
yashshah has joined #ruby
<workmad3>
banisterfiend: right, so the module ends up between the singleton_class and the class in the method lookup
<workmad3>
banisterfiend: but with extra weird edge-cases
hiyakashi has quit [Ping timeout: 252 seconds]
f0ster has joined #ruby
<workmad3>
banisterfiend: I'm interested in the method lookup behaviour, not in how it messes around in its implementation :P
<banisterfiend>
workmad3: singleton class of what? of an instance of C you mean?
<workmad3>
banisterfiend: yes
<Hanmac>
workmad3 when you prepend to the singleton_class then it gots very freaky :D
Eldariof93-ru has joined #ruby
<workmad3>
Hanmac: :D
<Hanmac>
workmad3 did you see my link?
<banisterfiend>
workmad3: well it's all on top of the singleton class, IMO the singleton class is irrelevant to this
heftig has quit [Quit: Quitting]
nfisher has quit [Ping timeout: 252 seconds]
<banisterfiend>
workmad3: basically the prepended method appears where the original class's method would have been
<workmad3>
banisterfiend: right, so it's the same effect on method lookup as doing an include on an instance's singleton class
<workmad3>
Hanmac: looking now
eldariof has quit [Ping timeout: 260 seconds]
<workmad3>
Hanmac: heh :) that does get weirdly screwy doesn't it :)
lewis has joined #ruby
<workmad3>
banisterfiend: I'm just trying to put the behaviour of prepend into pre-ruby2 terms usage
Eldariof-ru has quit [Ping timeout: 245 seconds]
<banisterfiend>
workmad3: fair enough
<workmad3>
banisterfiend: and I know the implementation side-effects of it on the ancestors chain aren't something reproducible, but the method lookup effects are (although not when you prepend to a singleton class :) )
tommyvyo has joined #ruby
<workmad3>
banisterfiend: which is why I was curious about how it effected method lookup in relation to the singleton class of an instance
yashshah has quit [Ping timeout: 264 seconds]
quidnunc has joined #ruby
<workmad3>
banisterfiend: and wondering if a prepend to the class came before an instance's singleton class, or between that and the class
<banisterfiend>
workmad3: well in terms of lookup order i guess it's the same
heftig has joined #ruby
<quidnunc>
Are self.x and @x equivalent if the class has an accessor method?
Nisstyre has joined #ruby
<banisterfiend>
quidnunc: yeah
beilabs has quit [Ping timeout: 258 seconds]
<quidnunc>
banisterfiend: Even when called from a subclass?
<sepp2k>
quidnunc: Yes - unless the subclass overrides x() with something other than a simple getter method.
madb055 has joined #ruby
BadDesign has joined #ruby
<quidnunc>
sepp2k: Ah, right. Thanks
<Hanmac>
quidnunc: some classes are defined as binded C(++) objects, in this chases there might be a self.x and a self.x= method but no @x variable
kidoz has joined #ruby
<workmad3>
quidnunc: as long as the accessor method is an equivalent of the one defined by attr_reader
nfisher has joined #ruby
bluOxigen has quit [Read error: Connection reset by peer]
blueOxigen has joined #ruby
<sepp2k>
Hanmac: There can always be x and x= methods without there being a @x variable - no C necessary. But not if x and x= have been defined with attr_accessor (which I assume was meant by accessor method).
bakingbread has quit [Quit: quit]
<workmad3>
quidnunc: which isn't the case with things like bound C/C++ objects, or AR models, or any form of calculated accessor methods :)
daniel_hinojosa has joined #ruby
daniel_- has quit [Ping timeout: 256 seconds]
ananthakumaran has quit [Quit: Leaving.]
<Hanmac>
or method_missing tricks :D
lewis has quit [Remote host closed the connection]
visof has quit [Read error: Connection reset by peer]
_maes_ has joined #ruby
vagmi has quit [Quit: vagmi]
mikewintermute has quit [Quit: mikewintermute]
SCommette has joined #ruby
hbpoison has quit [Ping timeout: 256 seconds]
nmeum has quit [Quit: WeeChat 0.3.8]
beilabs has joined #ruby
dhruvasagar has quit [Ping timeout: 276 seconds]
nmeum has joined #ruby
vagmi has joined #ruby
rabidpraxis has joined #ruby
SCommette has quit [Quit: SCommette]
tommyvyo has quit [Quit:]
jpfuentes2 has quit [Quit: Computer has gone to sleep.]
BSaboia has quit [Read error: Connection reset by peer]
tommyvyo has joined #ruby
<quidnunc>
I got this answer wrong on an exam, I can't see what the correct answer is. Anyone know? http://pastebin.com/WNjcwvXr
tvw has joined #ruby
<quidnunc>
Question is what change is needed to make the classes equivalent
<Ohga>
quidnunc: you meant their functionality, right?
<quidnunc>
Ohga: yeah
Mon_Ouie has quit [Ping timeout: 248 seconds]
rabidpraxis has quit [Ping timeout: 246 seconds]
elux has joined #ruby
<Ohga>
quidnunc: what's the question exactly? are you to follow the instructions at the end or?
<sepp2k>
quidnunc: Creating a copy of a. The problem is that if a is changed after sum is called at least once, calling sum on A will be affected by that change, but calling sum on B will not be.
<sepp2k>
Ohga: The way I understood it, it's multiple choice and the things at the end are his options.
<quidnunc>
sepp2k: Ah
Neomex has quit [Quit: Neomex]
<quidnunc>
sepp2k: Thanks :)
bakingbread has joined #ruby
awestroke has joined #ruby
markalanevans has joined #ruby
jekotia has joined #ruby
amaya_the has quit [Ping timeout: 260 seconds]
chrishough has joined #ruby
<workmad3>
quidnunc: can you see why your answer was wrong though? :)
<workmad3>
quidnunc: as I'm guessing you picked the 'remove the get method from A' option?
<Ohga>
sorry for my refactoring reflexes :-D
jurassic_ has quit [Quit: jurassic_]
synthetix has quit [Ping timeout: 258 seconds]
m8 has joined #ruby
seme has joined #ruby
seme is now known as Guest10804
<sepp2k>
quidnunc: Actually, on second thought, none of the options are right. I can still construct an input array, for which A and B will give different results.
<workmad3>
Ohga: heh :) my aethsetic sense was still being insulted by the classes being called 'A' and 'B'
<Ohga>
workmad3: hehe, true
thufir_ has quit [Quit: Leaving.]
<workmad3>
sepp2k: with example code that poor, can you not forgive them missing out that you need to do a deep copy? :)
jrajav has quit [Quit: I tend to be neutral about apples]
<gfredericks>
banisterfiend: thanks
maxmanders has joined #ruby
havenwood has joined #ruby
busybox43 has quit [Ping timeout: 252 seconds]
thinkclay has joined #ruby
moos3 has joined #ruby
workmad3 has joined #ruby
Neomex has joined #ruby
icole has joined #ruby
fermion has joined #ruby
hbpoison has quit [Ping timeout: 260 seconds]
emergion has quit [Quit: Computer has gone to sleep.]
AtoxIO has quit [Remote host closed the connection]
kidoz has quit [Remote host closed the connection]
blueOxigen has quit [Ping timeout: 246 seconds]
maletor has joined #ruby
hbpoison has joined #ruby
bluOxigen has joined #ruby
banjara has joined #ruby
samuel02 has joined #ruby
IceDragon has joined #ruby
mattbl has joined #ruby
mattbl has quit [Client Quit]
alainus[-_-] is now known as alainus
beilabs has quit [Ping timeout: 258 seconds]
alainus has left #ruby ["Leaving"]
<giant_big_rock>
Trying to implement routing for learning purposes, I'm given an HTTP verb=[GET/POST/ETC] and a path "/","/rock"
<giant_big_rock>
how would I go about letting a user write route handlers?
wargasm1 has joined #ruby
<giant_big_rock>
I figure I can write something like sinatra where => GET '/' { BLOCK } and write a method called GET which captures the '/' and the block
colonolGron has quit [Ping timeout: 256 seconds]
wargasm has quit [Ping timeout: 260 seconds]
dhruvasagar has joined #ruby
<Xeago>
any chemists here? when knowing the atom structure (how many electrons in each ring) how does one determine what its ion-ized state is?
tjbiddle has joined #ruby
Spooner has joined #ruby
blueOxigen has joined #ruby
<Hanmac>
Xeago there should be only the outer ring important
TheFuzzball has quit [Ping timeout: 256 seconds]
<Xeago>
but then how does iron work?
workmad3 has quit [Ping timeout: 245 seconds]
TheFuzzb_ has joined #ruby
<Xeago>
Fe2+ and 3+?
TheFuzzb_ is now known as TheFuzzball
<Xeago>
gotta, go back in a while
Xeago has quit [Remote host closed the connection]
<banisterfiend>
it loses / gains as many electrons as needed to have a full outer shell
<banisterfiend>
if the outer shell is complete with 8 electrons yet it only has 1 electron there it will shed that electron and become a +1 ion
<banisterfiend>
if the outer shell has 7 electrons it will gain an electron and become a -1 ion
bluOxigen has quit [Ping timeout: 264 seconds]
maletor has quit [Quit: Computer has gone to sleep.]
<IceDragon>
>,> oi banisterfiend, not to burst your bubble but Xeago left.
azam70 has joined #ruby
G________ has quit [Quit: Computer has gone to sleep.]
marcdel has joined #ruby
<Hanmac>
banisterfiend: i do not trust electrons :P they apear and disapear when you dont look :P
azam70 has quit [Client Quit]
bradleyprice has quit [Remote host closed the connection]
yannis has quit [Quit: yannis]
bluOxigen has joined #ruby
jurassic_ has joined #ruby
beilabs has joined #ruby
blueOxigen has quit [Read error: Connection reset by peer]
<IceDragon>
like money?
banisterfiend has quit [Ping timeout: 276 seconds]
dsabanin has quit [Quit: Leaving...]
enriclluelles has quit [Remote host closed the connection]
beilabs has quit [Ping timeout: 258 seconds]
marcdel has quit []
jon_nw1 has joined #ruby
jon_nw1 has quit [Max SendQ exceeded]
banjara has quit [Quit: Leaving.]
jon_nw has quit [Ping timeout: 258 seconds]
blueOxigen has joined #ruby
dhruvasagar has quit [Ping timeout: 258 seconds]
marcdel has joined #ruby
mercwithamouth has joined #ruby
maxmanders has quit [Quit: Computer has gone to sleep.]
maxmanders has joined #ruby
maxmanders has quit [Client Quit]
bluOxigen has quit [Ping timeout: 248 seconds]
banisterfiend has joined #ruby
visof has joined #ruby
razibog has quit [Ping timeout: 264 seconds]
visof has quit [Changing host]
visof has joined #ruby
kop has quit [Ping timeout: 255 seconds]
sam113101 has quit [Quit: WeeChat 0.4.0]
marcdel has quit [Ping timeout: 256 seconds]
sam113101 has joined #ruby
lkba has joined #ruby
marcdel has joined #ruby
beilabs has joined #ruby
v0n has quit [Ping timeout: 264 seconds]
v__ has quit [Ping timeout: 264 seconds]
greasegum has quit [Ping timeout: 256 seconds]
havenwood has quit [Remote host closed the connection]
kop has joined #ruby
jurassic_ has quit [Quit: jurassic_]
sam113101 has quit [Quit: WeeChat 0.4.0]
sam113101 has joined #ruby
DrShoggoth has joined #ruby
rabidpraxis has joined #ruby
maxmanders has joined #ruby
colonolGron has joined #ruby
reset has joined #ruby
hmarr has quit []
backjlack has quit [Read error: Operation timed out]
rabidpraxis has quit [Ping timeout: 256 seconds]
macmartine has joined #ruby
bakingbread has joined #ruby
hbpoison has quit [Ping timeout: 260 seconds]
v__ has joined #ruby
maxmanders has quit [Quit: Computer has gone to sleep.]
<macmartine>
I have a class that inherits from another class. How can I then reopen that class without getting a 'superclass mismatch for class' error?
hbpoison has joined #ruby
<banisterfiend>
macmartine: you reopen it with: class Blah
<banisterfiend>
or Blah.class_eval
<macmartine>
banisterfiend: That gives me 'superclass mismatch for class'
<banisterfiend>
macmartine: it shouldn't
<banisterfiend>
>> class A; end; class B < A; class B; def hello; "h"; end; end; B.new.hello
generalissimo has quit [Remote host closed the connection]
philipd has joined #ruby
philipd has quit [Max SendQ exceeded]
tay1 has joined #ruby
marcdel_ has joined #ruby
<tay1>
can someone explain ||= to me? im sitll a bit confused
philipd has joined #ruby
philipd has quit [Max SendQ exceeded]
philipd has joined #ruby
philipd has quit [Max SendQ exceeded]
babykosh has joined #ruby
philipd has joined #ruby
philipd has quit [Max SendQ exceeded]
philipd has joined #ruby
<Ohga>
tay1: it is like " var || var = [expression]"
chrishough has quit [Quit: chrishough]
<tay1>
so a || = b is a || a = b?
<tay1>
that makes no sense though.. isnt a || a just a ?
BizarreCake has joined #ruby
babykosh has quit [Client Quit]
<Ohga>
tay1: don't remember the priority in ruby, but it should be like "var || (var = [exp])"
<sepp2k>
tay1: a||a is a, yes, but a||a=b is parsed as a || (a=b), not (a||a)=b
<Ohga>
tay1: in simple terms, if var is non-false, then the value is var, otherwise (and only then) assign the expression to var and use that
<tay1>
so if a is false set it to b. but if a is true do nothing?
josefrichter has quit [Quit: josefrichter]
sonda has quit [Remote host closed the connection]
<sepp2k>
tay1: if a is false *or nil* set it to b
<Ohga>
then return true
baphled has quit [Quit: leaving]
<tay1>
but if a is true
<tay1>
then do nothing?
<tay1>
orset b to a?
<Ohga>
what sepp2k said, where just about to say that
<DanKnox>
tay1: it is useful for things like memoizing an expensive operation...
<DanKnox>
value ||= expensive_query
<sepp2k>
tay1: If a is truish (that is not nil or false), it remains unchanged.
<DanKnox>
if you need to call value many times
<DanKnox>
but only need to process it once
<tay1>
so thats what im saying
<tay1>
if a is false or nil set it to b. if a is true, do nothing basically
<DanKnox>
no not do nothing... return the value
rshackleford has left #ruby [#ruby]
<DanKnox>
that has already been set
<Ohga>
tay1: I'll make it explicit values are false if the *are* the value false, or the value nil. all other cases it is true
<Ohga>
tay1: so "string" is considered true, true is true (trivial case), the number 1 is true and so on
davidboy is now known as DanRibbit
nomenkun has quit [Remote host closed the connection]
andersbr has joined #ruby
<sepp2k>
visof: Please don't ask the same question again without mentioning answers that you've already gotten. That's disrespectful to the people trying to help you.
DanRibbit is now known as DanRobbit
skattyadz has quit [Quit: skattyadz]
<DanKnox>
tay1: think of it more like 'if a has not yet been set, set it to the expression, if it has been set just return the value'
<tay1>
oh ok
<tay1>
got it
<DanKnox>
technically you are right about the do nothing is a is true part
averiso has quit [Quit: Computer has gone to sleep.]
<DanKnox>
but the way i am describing it is how it is typically used in practice
<shevy>
PENIS
linoge has quit [Read error: Connection reset by peer]
<Ohga>
DanKnox tay1: it is right in the sense that if a is true then nothing is set, but the value of the whole expression is not nothing, as have been pointed out
<banisterfiend>
tay1: it's often used to lazily initialize ivars
SCommette has quit [Quit: SCommette]
razibog has joined #ruby
sorbo_ has joined #ruby
ed8_ has joined #ruby
<ed8_>
hi there, anyone using gentoo here ?
<tay1>
Ohga: that helps, thanks.
<tay1>
is ruby good for machine learning or nlp?
<tay1>
i recently started ruby few weeks ago. i like it but to be honest other than rails i havent really used it for anything else.
DanRobbit is now known as khampaI
<banisterfiend>
tay1: yeah it's ok for those, i think we have some decent libraries
<banisterfiend>
tay1: ruby is a decent genearl purpose language with libraries for a bunch of things
<banisterfiend>
though it's true the emphasis is web development
<banisterfiend>
there is nonetheless lots of stuff un webrelated
<banisterfiend>
our gamedev libraries are decent, we have good tools for system administration
<banisterfiend>
and so on
<tay1>
yeah i know my friend uses puppet at work
cheez0r_ is now known as cheez0r
<banisterfiend>
we're slightly weak or math/science though
<banisterfiend>
but that is apparently being improved
<banisterfiend>
on8
ilyam has joined #ruby
<tay1>
yeah i mean it is recently popular language
<banisterfiend>
on*
<tay1>
i honestly never heard of ruby until few years ago and ive been programming for almost 10 years
<Catbuntu>
I have a variable "foo" defined as "bar" in "file.rb", when I do "require './file.rb'" from another file, how can I access the variable "foo"?
<banisterfiend>
Catbuntu: you can't
<banisterfiend>
it's a local variable
<banisterfiend>
it's restricted to the file scope of that file
<tay1>
cant you set it global?
<banisterfiend>
to the top-lvel scope
<banisterfiend>
sure he could make it $foo
<visof>
sepp2k, i don't know what should i do to ask the right question
<Catbuntu>
And is there any other scope which allows to use it outside the file?
<Catbuntu>
and what about @foo?
<visof>
i'm explaining my problem using code, input and the output which should i get
<banisterfiend>
you *can* use @foo
<banisterfiend>
but it's weird
<banisterfiend>
no one really sets ivars on top-level
<banisterfiend>
Catbuntu: basically if you need to do this you could be doing something wrong
<sepp2k>
visof: Yes, and your question has been answered. If you need further help, describe what you've tried in response to that answer and/or what parts of the given answer you did not understand.
<Catbuntu>
Okay.
<tay1>
is nokogiri the most popular gem to parse text?
<tay1>
from the web i mean
<banisterfiend>
xml/html
<banisterfiend>
yeah
<Catbuntu>
Another thing, why does File.open("blah", "w") do |f| blah blah end not work?
<tay1>
cool.
<tay1>
thanks
<banisterfiend>
Catbuntu: that's not nearly enough information go on
<Catbuntu>
Okay
<Spooner>
Catbuntu, "Not work" is not very useful info.
<banisterfiend>
Catbuntu: oh you mean all on one line?
<sepp2k>
But those'd be needed either way if they are needed.
akashj87 has quit [Ping timeout: 240 seconds]
<Catbuntu>
where idea = "something"
<sepp2k>
Catbuntu: Remove the space before the opening parenthesis
beilabs has quit [Ping timeout: 258 seconds]
BizarreCake has quit [Remote host closed the connection]
gcds has quit [Quit: gcds]
<banisterfiend>
Catbuntu: get rid of the space before the (
<MrZYX>
or drop the parenthesis
kojul_zZz is now known as kojul
<Catbuntu>
Oh lol, thanks.
<banisterfiend>
Catbuntu: basically in ruby () are optinoal for method invocation, so if the ( is not hard against the method name then it'll assume the () is just used to bind the expression to the right
<banisterfiend>
and not part of method invocation
<tay1>
btw is ther any good ruby chart gems? to create visual charts
<Catbuntu>
So what's more "Rubyist", File.open("blah", "w") or File.open "blah", "w"?
<banisterfiend>
tay1: could be, but i just use R for that
* sepp2k
likes parentheses
<banisterfiend>
i use Ruby to preprocess the data into CSV
<banisterfiend>
and then read it into R for fancy manipulation
<Catbuntu>
Also, what's the difference between File::open and File.open?
<atmosx>
bakingbread: planning too. The hard thing is to keep it simple.
<bakingbread>
atmosx: I'm busy with it too right now, actually
<SegFaultAX>
banisterfiend: I realize this might be specific to what I'm doing, but it has actually cropped up as being useful to me a number of times now.
<atmosx>
banisterfiend: also, I need either to modify mtgox gem (which is time-consuming) or switch to python. Didn't decided yet what's easier.
<banisterfiend>
SegFaultAX: ah no, it would be cool if we had a 'me' method for that
<ed8_>
how come all ruby-based packages fail with the same error: "Unable to generate gemspec file."? See for instance: http://gentoo.pastebin.ca/2339019
<atmosx>
bakingbread: what do you have in mind actually? buying/selling in different places? :-)
<SegFaultAX>
In this case we memoize the potentially expensive operation.
<SegFaultAX>
banisterfiend: Anyway "me" in your case is pronounced "tap" in ruby.
<banisterfiend>
SegFaultAX: no it's not :) 'tap' returns the receiver
<banisterfiend>
'me' returns the block value :P
<SegFaultAX>
Which is what you just did.
<banisterfiend>
no i returned the block value
<atmosx>
ed8_: do youself a favor and go with rvm
<SegFaultAX>
banisterfiend: That makes no sense at all.
<atmosx>
ed8_: ruby's support in all major linux distro's is severelly flawed
d34th4ck3r has joined #ruby
<banisterfiend>
SegFaultAX: me would look like this: def me; yield(self); end
<SegFaultAX>
banisterfiend: That's what tap does.
<banisterfiend>
SegFaultAX: tap looks like this: def tap; yield(self); seld; end
<banisterfiend>
no
<banisterfiend>
tap returns self
<banisterfiend>
def tap; yield(self); self; end
<SegFaultAX>
In this case what me is returning isn't the interesting bit
<banisterfiend>
SegFaultAX: 'me' would just be a 'map' on a single value
<SegFaultAX>
Because you could jsut as easily do transform(collection.find { |x| predicate?(x) }.me)
<SegFaultAX>
banisterfiend: Naw, that's terrible.
<banisterfiend>
SegFaultAX: i know..but i could say the asme for you regarding find
bluOxigen has joined #ruby
<ed8_>
atmosx: ok, but does that play well the package manager ? Cause gitlabhq provide an ebuild
<SegFaultAX>
You'd have to hang on to the block result indefinitely in the off chance that someone calls "me" on the result of a block expression.
<SegFaultAX>
Completely non-sensical.
<atmosx>
ed8_: kill the ebuild, go for it for yourself
<atmosx>
ed8_: read the ebuild, it's a simple py script iirc.
blueOxigen has quit [Ping timeout: 245 seconds]
<banisterfiend>
SegFaultAX: what the fuck are you talking about? me is just the same as tap but it returns the block evaluation rather than the receiver
<atmosx>
ed8_: compile the packages in your ~ and do what you have to m it's fairly straight forward process
<atmosx>
especially with gentoo
<banisterfiend>
and i dont care about it that much but it would be cool in some situations
<SegFaultAX>
Oh, derp.
<SegFaultAX>
Either way, no.
sduckett has joined #ruby
sorbo_ has quit [Quit: sorbo_]
<banisterfiend>
Whatever.
<ed8_>
atmosx: ok will try that way
<SegFaultAX>
Because in this case the predicate function is the same as the end operation, and I don't want to compute that "expensive" value twice over.
<bakingbread>
I wonder how user cool likes his name, doesn't he bothered of highlights or he has his notifications off
<Ohga>
tap but with a return of the block result is map.. or.. what am I missing?
<banisterfiend>
but my favorite thing is let: def let; yield; end
<SegFaultAX>
banisterfiend: I misunderstood what you meant by me. My appologies.
<banisterfiend>
np
<Ohga>
SegFaultAX: as, I see
<Spooner>
SegFaultAX, Hardly significant wasted effort, but I agree that any side-effects of the block would be repeated, which is not great.
alexwh has joined #ruby
wallerdev has quit [Quit: wallerdev]
<SegFaultAX>
Spooner: How is it hardly significant?
wallerdev has joined #ruby
<marwinism>
Hi! I tried to google quickly about the each statement, but did I miss something essential? I'm fairly new to ruby, but I think my brain is on vacation since I can't get this to work.. http://pastebin.com/Cgpui6AX
Liquid-- has joined #ruby
Opettaja has quit [Quit: WeeChat 0.4.0]
<Spooner>
SegFaultAX, Because it just calls the block one more time than it would with a regular find.
<banisterfiend>
SegFaultAX: i think it's very usual to have the *predicate* as the thing you're interested in
<banisterfiend>
so i doubt we'd get that feature in ruby
<banisterfiend>
cos the predicate is for the most part something tha tjust returns true or false
<Ohga>
marwinism: firstly, each is a method.. much less stuff are statements in ruby compared to other languages
<Ohga>
*much fewer things
<banisterfiend>
SegFaultAX: you can see it's unusual in your case as you have to rescue nil, in order for it to be sensible ;)
Opettaja has joined #ruby
<SegFaultAX>
banisterfiend: But I might actually have to run the operation to completion to see if the input is valid. And if that's expensive, I don't want to do it twice.
chris249 has joined #ruby
<banisterfiend>
SegFaultAX: sure, i understand it makes sense in your case
<SegFaultAX>
My sample was bad, DateTimes are relatively cheap to construct.
<SegFaultAX>
But it illustrates the fact that we don't have a good predicate for "will this make a legal date" apart from "make a date out of this"
<tay1>
banisterfiend btw were you able to show me somethings you built using ruby and r
<banisterfiend>
but it's still not a common case, so unlikely to make it into core IMO
brianherman has quit [Read error: Connection reset by peer]
giant_big_rock has quit [Read error: Connection reset by peer]
<Spooner>
marcdel_, You should use the block version of File.open. You also are getting you loops the wrong way around.
linoge has joined #ruby
brianherman has joined #ruby
giant_big_rock has joined #ruby
<SegFaultAX>
banisterfiend: Sure. It's something you are spoiled by in lazy langauges (or languages with lazy seqs)
Axsuul has joined #ruby
Czupa has quit [Remote host closed the connection]
andersbr has joined #ruby
<banisterfiend>
SegFaultAX: ruby has lazy seq in 2.0 :)
Catbuntu has quit [Read error: Connection reset by peer]
Catbuntu has joined #ruby
<marwinism>
Ohga: ah, got it! Thank you!
<SegFaultAX>
banisterfiend: TIL, cool!
icole has quit [Remote host closed the connection]
marcdel_ has quit []
toekutr has joined #ruby
marcdel has joined #ruby
<banisterfiend>
SegFaultAX: maybe htis would be ok for you: [1,2,3,4,5].lazy.map{ |x| predicate?(x) }.select { |x| x }.first
<banisterfiend>
not sure
<Spooner>
marwinism, You don't actually need a lot of the complexity you had in your code: http://pastebin.com/XeMzQaB4
pcarrier_ has joined #ruby
<Spooner>
marwinism, glob already is an iterator. You don't need to remove . & .. since they don't match *.mp3
carraroj has quit [Ping timeout: 245 seconds]
<SegFaultAX>
banisterfiend: That's basically what I wish I had. (first (filter identity (map f [1 2 3])))
chrishough has joined #ruby
chrishough has quit [Client Quit]
ehellman has joined #ruby
beilabs has joined #ruby
<Spooner>
marwinism, The block version of open guarantees that it will close the file at the end of the block.
blueOxigen has joined #ruby
<banisterfiend>
SegFaultAX: yeah it works, try this: (1..100).lazy.select { |x| x < 5; sleep 1; }.map { |x| x }.first
<SegFaultAX>
banisterfiend: Need to install 2.x first. Haven't gotten around to it yet.
<marwinism>
Spooner: the remove of . and .. is just something hanging left since i'm just playing around. But thanks for a much simpler example! Coming from Java and .net, I understand I still have alot of learning to do. But god damnit ruby is pretty and beatifull!
Nimsical has joined #ruby
<SegFaultAX>
marwinism: Internal iteration takes some getting used to, but it's really nice for a lot of situations!
nateberkopec has joined #ruby
danman has joined #ruby
<Spooner>
marwinism, And if you want full Rubyism: File.write 'Music.lib', Dir['/home/marwin/*.mp3'].join("\n")
dinoex has joined #ruby
bluOxigen has quit [Ping timeout: 256 seconds]
mhi^ has joined #ruby
<dinoex>
hi
mercwithamouth has quit [Ping timeout: 245 seconds]
<Sicp>
CSV.foreach("path/to/file") do |row| etc. ?
<banisterfiend>
Spooner: File.write is the shiznite
<Sicp>
I'm of course getting uninitialized constant CSV
<banisterfiend>
i loved it
alexwh has joined #ruby
<banisterfiend>
Spooner: took us too long to get it though
<bakingbread>
marwinism: you can have fun and do it something like this also: IO.write("/tmp/music.txt", Dir.glob('./*mp3') * "\n")
<banisterfiend>
i think it's a 1.9.3-ism
Nimsical has quit [Quit: Computer has gone to sleep.]
<SegFaultAX>
Sicp: require 'csv'
<marwinism>
bakingbread: sweet!
<Sicp>
ah..
<Sicp>
right
<SegFaultAX>
Sicp: ;)
<Sicp>
thought there was an "import" needed
icole has joined #ruby
<marwinism>
What i'm actually playing around with is what I hope to be a console "music-player"
mityaz has quit [Quit: See ya!]
<banisterfiend>
marwinism: why not just sing
<marwinism>
at my university college we have this Creative COmmons radiostation, and a guy developed the musiclibrary-shuffler/player in Java. So I want to do the same thing in Ruby.
<marwinism>
banisterfiend: Because I want to keep some friends xD
BadDesign has quit [Read error: Connection reset by peer]
<bakingbread>
marwinism: good project for leaning
AndChat| has joined #ruby
<banisterfiend>
marwinism: if i want to write a GUI in ruby these days, i'd probably do it with html5/js and websockets to a ruby backend
<banisterfiend>
it seems to be the best way to do it
<banisterfiend>
and it's easy enough
andersbr has quit [Quit: andersbr]
freerobby has joined #ruby
freerobby has quit [Client Quit]
<epochwolf>
neredsenvy:
swex has quit [Read error: Connection reset by peer]
<marwinism>
banisterfiend: hm. yeah. For my bachelor thesis we are making a game in LibGDX, and there I created a backend with a "webservice" with JSON/REST using sinatra.
Banistergalaxy has quit [Ping timeout: 252 seconds]
swex has joined #ruby
<banisterfiend>
marwinism: JSON/REST is for noobs, use websockets :)
brianherman has quit [Read error: Connection reset by peer]
<banisterfiend>
theyr'e the new cool
dekroning has joined #ruby
<marwinism>
I'm all about the hipstershit!
<shevy>
marwinism lol
brianherman has joined #ruby
<banisterfiend>
fo rizzle
<dekroning>
hi
<banisterfiend>
marwinism: well if you need to *push* data to the client, comet is ugly
<banisterfiend>
websockets are much more natural
<banisterfiend>
not to mention fast as fuck
<marwinism>
fuck me, cmus was pretty :/
<dekroning>
I'm playing around with ruby 2.0's named parameters and I was wondering if it's also possibel todo named parameters without a default value?
Apocalypse has joined #ruby
<banisterfiend>
you can even live stream your desktop to a <canvas> on a web page using websockets
<banisterfiend>
and it's realtime (enough)
Bry8Star has quit [Ping timeout: 276 seconds]
Eldariof93-ru has quit []
<marwinism>
banisterfiend: got a link to it? I tried SOAP, but i'd rather get a date with a hot supermodel than touching SOAP. Supermodel seems easier.
verysoftoiletppr has joined #ruby
Catbuntu has quit [Ping timeout: 240 seconds]
<banisterfiend>
marwinism: ther'es plenty of info on websockets in google
<banisterfiend>
it's an easy api
<banisterfiend>
even easier than tcp
<marwinism>
If websocks are that cool, I have to refactor my code AGAIN.. *sigh*
<SegFaultAX>
dekroning: def f(foo: foo) ... end
<banisterfiend>
since the frames are more or less intact, they're not broken up
linoge has quit [Read error: Connection reset by peer]
brianpWins has joined #ruby
<dekroning>
SegFaultAX: great! trying it right away :)
danman has quit [Quit: danman]
<marwinism>
banisterfiend: and it is easy enough sending data between i.e. a android-app / java-desktop app, and my ruby backend?
<banisterfiend>
marwinism: Yeah, piece of cake
pyx has joined #ruby
<dekroning>
SegFaultAX: ow man I absolutely love this! :-)
danneu has joined #ruby
linoge has joined #ruby
pyx has quit [Client Quit]
<SegFaultAX>
dekroning: I actually don't know if I liked how they did named params in Ruby.
Bry8Star has joined #ruby
<banisterfiend>
SegFaultAX: yeah they're a bit different to named params in other languages
<SegFaultAX>
dekroning: I like the args/kwargs style in Python.
<marwinism>
banisterfiend: *sigh* You guys are putting way to much new ideas into my head. I need to complete this game before july. I'm sure in a couple a weeks another brainiac in here will tell me "NO! This is the new cool, check this out!"
<SegFaultAX>
banisterfiend: They just feel kinda "hacky" to me. Not cleanly integrated.
j^2 has joined #ruby
<banisterfiend>
SegFaultAX: what's the issue?
<SegFaultAX>
marwinism: Go write some code.
<shevy>
hahaha
<marwinism>
"Work work!"
<shevy>
marwinism life span is limited so only pick what to write what is cool and promising
<banisterfiend>
SegFaultAX: really i just think of them as an improved options hash-arg, rather than real named parameters
<banisterfiend>
and as far as that goes, they're fantastic
<Ohga>
marwinism: only change your technology if it gives significant advantage. if not wait with using it for your next project
<dekroning>
SegFaultAX: how does that work?
<shevy>
Ohga build an operating system on shell scripts!!!
<marwinism>
shevy & Ohga good points.
beilabs has joined #ruby
<Ohga>
shevy: que?
<SegFaultAX>
dekroning: All parameters can be named all the time. And you can collect up variadic params either positionally or by name using some special syntax.
<SegFaultAX>
banisterfiend: I just think it's ugly, that's all.
<banisterfiend>
SegFaultAX: i probalby agree with u, but i need to know what you mean ;)
<SegFaultAX>
banisterfiend: And it only further complexifies the syntax.
<SegFaultAX>
Which is already horrendous.
bluOxigen has joined #ruby
<shevy>
Ohga well, moving away from shell scripts can be costly in technology
<shevy>
just when I think of all the time I spent with ruby so far
<shevy>
I could have several thousand .sh scripts instead
<dekroning>
SegFaultAX: that's indeed nice, I really like the fact that you don't need to remember the order in which you have to pass in arguments
<bakingbread>
SegFaultAX: I like Ruby's syntax and find it one of most clearest. What's wrong with me?
<SegFaultAX>
bakingbread: You have a different personal preference than me.
<banisterfiend>
bakingbread: we're specifically talking about named params
<SegFaultAX>
And you should feel bad.
<SegFaultAX>
;)
<dekroning>
SegFaultAX: btw, can I name a parameter and still have it be required to be passed in? I noticed in that syntax you gave me, it's not a required syntax
love_color_text has quit [Ping timeout: 256 seconds]
<SegFaultAX>
dekroning: Not sure I caught that last bit.
<dekroning>
SegFaultAX: sorry I might have said it a bit cryptic :-)
<bakingbread>
banisterfiend: it was stated that syntax is already horrendous
<Ohga>
shevy: well, learning new technology is an initial cost, but you need to do that sonner or later (sh scripts will not be forever even if it seems so) and investments can amend your knowledge to technologies you already know
<SegFaultAX>
bakingbread: It's abysmally complex. For shits and giggles take a look at the syntax parser for Ruby.
pac1 has quit [Quit: I got it one line of code at a time]
idkazuma has joined #ruby
<dekroning>
SegFaultAX: for example, I have something like this: def self.person name: name, age: age; puts "Hello #{name} (#{age})"; end
<banisterfiend>
SegFaultAX: but that's an implementaiton detail, unless it affects me personally in my programming i really dont care
<banisterfiend>
that is until i want to write a ruby parser :)
pac1 has joined #ruby
blueOxigen has quit [Ping timeout: 264 seconds]
<dekroning>
SegFaultAX: I would like to pass in the argument in random order, e.g. person age: 30, name: "John"
ed8_ has quit [Ping timeout: 260 seconds]
<dekroning>
SegFaultAX: but I would like to have both arguments be required
<SegFaultAX>
banisterfiend: Completely reasonable point. But such a complex syntax gives way to many different possible interpretations of any given form.
shellox has joined #ruby
<shellox>
hi
<SegFaultAX>
In many cases the only way you can resolve its meaning is by knowing whats bound in that context.
<bakingbread>
SegFaultAX: I agree that it's complex but it's very nifty in writing. I'm sure lisp parser is much more consistent :-)
<shellox>
whats the best way to sort a hash in ruby after a key?
<SegFaultAX>
bakingbread: Lisps have the added benefit of being homoiconic!
ed8_ has joined #ruby
V8Energy has joined #ruby
<bakingbread>
SegFaultAX: that's why I mentioned it
moted has joined #ruby
<bakingbread>
shellox: sort hash? what?
daniel_- has joined #ruby
IngoPan has joined #ruby
<IngoPan>
Hi, i am a Rails newbie and i´d like to know if someone knows this Amazon book and can tell me if its any good to enter the Ruby world: http://t.co/Z1N57eE3Dn ?
<SegFaultAX>
shellox: Maybe something like date.sort_by { |e| DateTime.parse(e['created_at'] }
blueOxigen has joined #ruby
<banisterfiend>
SegFaultAX: well can you give an example of ambiguity/confusion introduced by ruby's 2.0 named params? (you could be write, i haven't investigated them that deeply yet)
<Ohga>
IngoPan: didn't you ask that before?
<SegFaultAX>
shellox: Note that the result of the block becomes the keying function for the sorter, and must be comparable.
nfisher has quit [Ping timeout: 264 seconds]
<IngoPan>
Interested in some other opinions
Goles has quit [Quit: Out.]
<SegFaultAX>
IngoPan: #rubyonrails can probably help!
<Ohga>
IngoPan: if that is a "yes", then I'll remind you that you were directed to #rubyonrails
<IngoPan>
thx
<SegFaultAX>
banisterfiend: In the specific case of named params they've a) introduced new special syntax AND b) overloaded an existing syntax.
<SegFaultAX>
a) being ** which I like because it mirrors the kwargs syntax from Python and b) is the new keyword/hash literal syntax added in 1.9 eg { foo: 1, bar: 2 }
<tay1>
what are some good gems for data mining
<SegFaultAX>
tay1: That's really context specific, what are you trying to do?
<Es0teric>
if i use File.exists? 'file_name', can i pass a else to that?
<tay1>
is mechanize good?
bluOxigen has quit [Ping timeout: 276 seconds]
<tay1>
well i mean go through websites and collect data
<Es0teric>
so File.exists? "file_name" else do else
<V8Energy>
somebody please help me find a solution. for the past month or so, i've been trying to find a good GUI dev kit. one that works well in windows. I was hoping to use Bowline cause it allows u to create GUI using html5. but it only supported in mac and ubuntu. red shoes seemed bugged and it wouldn't allow me to package it. fxruby is ugly and so is wxRuby.
<Es0teric>
*** so File.exists? "file_name" else something
<bakingbread>
Es0teric: if/else/end ???
<SegFaultAX>
Es0teric: File.exists?(f) ? f : ...
nomenkun has joined #ruby
<SegFaultAX>
Es0teric: Or long hand if/else as otherwise suggested :)
<Es0teric>
oh, i can do ternary... nice
<Es0teric>
SegFaultAX how would long hand if/else work?
<V8Energy>
please someone advise me on how to create a standalone applicaton in ruby, with nice well supported GUI toolkit, and so i can package to a windows executable. I've considered using TideSDK but it's freaking 80mbs when packaged
<SegFaultAX>
Es0teric: Use the "if", Luke.
Davey has joined #ruby
<Es0teric>
also, bakingbread i know ruby basics... i just forgot how to check if a file exists without File.exists?
nfisher has joined #ruby
<danneu>
File.open rescue?
<SegFaultAX>
Es0teric: Why not File.exists?
<banisterfiend>
SegFaultAX: what other languages do you know/use ?
<Es0teric>
SegFaultAX because i need to write to the file if it returns true
webwarlock has joined #ruby
<SegFaultAX>
danneu: Why would you ever suggest not stat-ing the file?
<SegFaultAX>
banisterfiend: Too many to count.
<bakingbread>
danneu: general rule: don't use exceptions for control flow
<danneu>
it was a joke
<bakingbread>
danneu: :)
<SegFaultAX>
danneu: Oh :)
Matip has joined #ruby
<banisterfiend>
SegFaultAX: ok, which languages are you proficient with :)
<bakingbread>
danneu: then File.delete -> exception
<banisterfiend>
SegFaultAX: ok, well name your top 5
<SegFaultAX>
banisterfiend: For work I use Ruby, Python, and Clojure.
<bakingbread>
danneu: if no exception it existed
<danneu>
hha
<SegFaultAX>
banisterfiend: Why do you ask?
beilabs has quit [Ping timeout: 252 seconds]
<banisterfiend>
SegFaultAX: curiostiy
<danneu>
SegFaultAX: that's cool. i'd love the option to work on clojure code at work
dsferreira_ has quit [Quit: This computer has gone to sleep]
Wigflip has joined #ruby
<SegFaultAX>
danneu: It's easy to do when you can call the shots! (And your CEO thinks "lisps" are speech impediments)
Sicp has quit [Quit: Leaving]
<danneu>
sheesh most programmers probably think lisps are impediments too after having to code it in uni without paredit :(
Sicp has joined #ruby
<SegFaultAX>
Most folks don't use Lisp at uni anymore.
<SegFaultAX>
Python is becoming the new de facto it seems.
<SegFaultAX>
The Lisp Curse continues, I guess.
Mattix has quit [Ping timeout: 256 seconds]
<SegFaultAX>
Also, to V8Energy's question, do people build GUIs in Ruby?
<banisterfiend>
SegFaultAX: it's a pity, python is frikkin boring -- but still 100x better than java which is the current university language
<banisterfiend>
and it's horrible
<banisterfiend>
puts people off programming for life, im sure
dankest has quit [Quit: Leaving...]
<bakingbread>
well Clojure is bringing attention slowly but steady, doesn't it
<SegFaultAX>
banisterfiend: No doubt.
<SegFaultAX>
banisterfiend: Python has the advantage of being relatively simple while still being very expressive + a massively awesome standard library.
<banisterfiend>
SegFaultAX: do you know any low level languages? or are you more of a high level guy?
<SegFaultAX>
And a massively awesome community around it, not unlike Ruby.
<kojul>
I don't have a problem with Python, I knew it before I knew Ruby.
<SegFaultAX>
banisterfiend: Only C. I've tinkered with C++ a bit, but I'm no expert by a long shot.
<banisterfiend>
SegFaultAX: lack of blocks and crippled lambdas annoy me -- also, the artificial (IMO) distinction between expression/staement
<SegFaultAX>
banisterfiend: That's about as low as I go.
<banisterfiend>
statement
<kojul>
SegFaultAX: I'd stick with C over C++ anyday.
<SegFaultAX>
banisterfiend: Those are my exact arguments against Python as well.
<banisterfiend>
SegFaultAX: also 'self.blah' is stupid
<SegFaultAX>
kojul: I don't mind C++. I just haven't ever had much cause to use it or learn it to a really high degree.
<banisterfiend>
i dont like the function used as honoray method
<banisterfiend>
same as in javascript
<SegFaultAX>
kojul: I worked at a game company for a little over a year and did some engine development in C++, and that's literally the extent of my knowledge. Pretty domain specific too.
linoge has quit [Read error: Connection reset by peer]
<banisterfiend>
honorary*
presto53 has quit [Ping timeout: 255 seconds]
<SegFaultAX>
banisterfiend: Same as Ruby?
linoge has joined #ruby
<SegFaultAX>
banisterfiend: Ruby doesn't have functions.
gregor3005 has joined #ruby
chris249 has quit [Ping timeout: 252 seconds]
newUser1234 has joined #ruby
toekutr has left #ruby ["ERC Version 5.3 (IRC client for Emacs)"]
<SegFaultAX>
banisterfiend: Unless I got it backwards, and you don't like functions.
Xeago has quit [Remote host closed the connection]
<SegFaultAX>
banisterfiend: In which case I'm baffled. :)
<bricker>
What would be the best way to see if an array only contains attributes from another array? ([1, 2, 3] & [4]).empty?
<kojul>
SegFaultAX: I see, I've never used either professionally, but I prefer C, everyone just uses C++ because of the massive amount of libraries. C++ is like a bastard experiment in OOP.
timonv has quit [Remote host closed the connection]
<banisterfiend>
SegFaultAX: well ruby doesn't have functions, and in order for python to pull off 'methods' it just uses functions with an explicit 'this'
<banisterfiend>
i dont like that
<SegFaultAX>
banisterfiend: So you wish self was implicit as in most other languages?
<banisterfiend>
SegFaultAX: Yeah
<SegFaultAX>
banisterfiend: Because it's exactly the same in eg Ruby, except the receiver is implicitly bound.
<Spooner>
Sicp, Well, either the first cell is empty or the spreadsheet is empty. You may mean "next if row[0].nil?" though.
sheerun has joined #ruby
sheerun has quit [Max SendQ exceeded]
<bricker>
bakingbread: Sorry, I wasn't clear. I want to see if the only elements in arr2 are also present in arr1. So if arr1 = [1, 2, 3], and arr2 contains anything but 1, 2, or 3, then it should be false.
beilabs has joined #ruby
<Sicp>
yea, that works
_br_ has quit [Excess Flood]
<Sicp>
can I figure out if a certain row is formatted as Bold or Underline while reading from that sheet?
<banisterfiend>
SegFaultAX: well in ruby it's impossible to have 'free' functions. in languages like python/javascript a 'method' is just a 'function' with a 'this', in ruby on the other hand there's no such thing as a free function. I prefer ruby approach
<Es0teric>
question -- why do i get this error? test.rb:13:in `<main>': undefined local variable or method `file' for main:Object (NameError)
<Spooner>
Sicp, That is what documentation is for...
<Sicp>
I'm there already, sorry
<Spooner>
Es0teric, Can't tell without the code. The error shold be clear...
<SegFaultAX>
banisterfiend: In Ruby a method is just a function with 'self' implicitly bound.
<SegFaultAX>
banisterfiend: And "free" functions are just members of Kernel.
<bakingbread>
bricker: so just backward (arr2 - arr1) -- if it's not empty, arr2 contains something else then elements of arr1... or what do you mean?
<Es0teric>
well Spooner i did File.new('test_file.json', 'w') puts "test" file.close, line 13 is file.close
brianherman has quit [Quit: Leaving]
<banisterfiend>
SegFaultAX: they're not 'free', they're just inherited by the receiver
sheerun has joined #ruby
<Spooner>
bricker, You never set file. However, you should use File.open with a block.
<banisterfiend>
SegFaultAX: try setting an ivar in your so-called free function it'll set it on self
linoge has quit [Read error: Connection reset by peer]
_br_- has quit [Excess Flood]
<kojul>
has File.open always supported a block?
<SegFaultAX>
bricker: You can use the shorthand Set[1,2,3] if it makes you feel better. :)
<Spooner>
Es0teric, Writing to files is pretty quick if you are just writing a tiny amount. You probably want "file.puts data.to_json" in your case rather than just writing some random strings ;)
<SegFaultAX>
kojul: As far as I know, yes.
linoge has joined #ruby
<Spooner>
kojul, As far as I know it has, though maybe not as far back as Ruby 1.0 ;)
<shevy>
man
<shevy>
I wanna try ruby 1.0
<kojul>
hmm, learn something useful everyday.
<SegFaultAX>
Spooner: Especially with buffering where you don't pay for the fsync until the file is flushed/closed!
<Spooner>
Es0teric, And remember you can keep it simpler with: File.write "wa.json", data.to_json
<Spooner>
SegFaultAX, I doubt it matters either way when you are writing 5 (or 6) characters as in the example ;)
<Es0teric>
Spooner well i am pulling from an api so the data is automatically json
_br_ has joined #ruby
<Spooner>
Es0teric, Ah, fair enough,.
<SegFaultAX>
Spooner: Hey man, what if my IO is at 100%... you never know!
<bricker>
SegFaultAX: maybe I should explain. If someone updates one or more attributes on an object that I've deemed "non-important", then caching should not occur. However, if any of the attributes updated are not in the "non-important" array, then it should occur. It seems like just `(changed_attributes - non_important_attributes).empty?`, as bakingbread suggested, will work for me
arturaz has quit [Ping timeout: 255 seconds]
<SegFaultAX>
bricker: If that works, cool. But if you need to do lots of set ops, use sets.
<bricker>
thanks
<SegFaultAX>
Sure thing.
<bricker>
I haven't worked with sets before, how are they different from Arrays?
<SegFaultAX>
bricker: Lots of important ways. For your puposes, element lookup is amortized constant time.
<Es0teric>
Spooner i just find it intresting that it wrote 10k lines in like 5secs
<SegFaultAX>
In other words, to find if an element is in an Array, we potentially have to examine every item in the array, right?
<bricker>
SegFaultAX: right
<SegFaultAX>
bricker: With a set, you can lookup an element in constant time.
<SegFaultAX>
bricker: Which means it will take an average the same amount of time irrespective of the number of elements in the set.
<SegFaultAX>
bricker: This makes certain operations over the set very fast.
<bricker>
oooooh
<bricker>
good to know
<kojul>
SegFaultAX: Do sets take up a lot more memory?
<SegFaultAX>
bricker: Yup. It's worth reading a tutorial on sets in general, and understanding some of their fundamental operators (union, intersect, difference, and symmetric difference in particular)
mengu_ has quit [Ping timeout: 258 seconds]
<SegFaultAX>
kojul: It depends. In general, yes.
<SegFaultAX>
kojul: Well, not a /lot/ more memory, but more than an Array
<SegFaultAX>
Particularly a proper Array
<SegFaultAX>
(Eg not a vector or array list)
loginwashere has joined #ruby
<Spooner>
bricker, Arrays in Ruby perform some set-like operations (|, &, -, for example). A Set is essentially a Hash where the values are true and only the keys are accessible (but that probably isn't helpful description).
<banisterfiend>
full access to all their screencasts and interactive tutorials
<banisterfiend>
highly recommended
<SegFaultAX>
kojul: One important difference is that Sets have no ordering, so looking up an element by its "index" is not a meaningful operation.
<kojul>
Spooner: Well, it is to me. When SegFaultAX was talking about amortized constant lookup time, I instantly though Hash.
loginwashere has quit [Remote host closed the connection]
loginwashere has joined #ruby
<SegFaultAX>
kojul: Whereas looking up an element by index in an Array is a constant time operation because I just need to know where the array starts and which index you want to fetch that memory address.
khampaI is now known as davidboy
<SegFaultAX>
kojul: HashSets and HashMaps have many commonalities.
<Spooner>
kojul, Not sure if it is true, but I think someone said that a Set is actually a wrapper around a Hash object (and, whether or not that is true, it could be).
<SegFaultAX>
Spooner: That's very unlikely
<SegFaultAX>
Spooner: Hashes have a significant amount of complication that are particular to them.
<SegFaultAX>
Spooner: They may share aspects of their hashing and bucketing, but after that the differences are pretty big.
<SegFaultAX>
Spooner: You can emulate sets in languages without them which have sets by eg creating a hash where all values are some sentinel, eg `true`
mercwithamouth has joined #ruby
<SegFaultAX>
And then all set operations become map key operations.
<veleno>
any tool to check for a base code compatibility between 1.8.7/1.9.x/2.0.0 ?
<V8Energy>
please someone advise me on how to create a standalone GUI applicaton in ruby, with modern looking and well supported GUI toolkit, and so i can package to a windows executable. I've considered using TideSDK but it's freaking 80mbs when packaged.
<SegFaultAX>
But I would be surprised if Set didn't have its own implementation in C ruby.
<banisterfiend>
V8Energy: use html/js
<SegFaultAX>
V8Energy: Please don't spam the channel. If someone knows the answer, they will help you.
glosoli has joined #ruby
linoge has quit [Read error: Connection reset by peer]
shellox has quit [Quit: leaving]
linoge has joined #ruby
<SegFaultAX>
Spooner: Whoops, I meant "you can emulate sets in languages that have hashes only"
<Spooner>
SegFaultAX, Actually, they _are_ wrappers around a Hash. I just checked the source.
<SegFaultAX>
Spooner: Well, that sucks.
tommyvyo has joined #ruby
<Spooner>
SegFaultAX, Why? Hashes work and are efficient and the wrapping is transparent.
p8952_ is now known as p8952
<SegFaultAX>
Spooner: Because generally speaking sets have different use cases and have their own optimization parameters.
whowantstolivef1 has joined #ruby
<SegFaultAX>
Spooner: But, I was wrong either way. I thought it unlikely but if that's the case then oh well. :)
Davey has quit [Quit: Computer has gone to sleep.]
<Spooner>
SegFaultAX, Remember that Set is from the Standard Library. It isn't a built-in type and is implemented in pure Ruby.
<Sicp>
why is that, seems perfectly reasonable; it's constructing the sheet name from the loop variable `i` and then doing whatever I want it to do to that sheet; it works just fine if there were no loop there
<SegFaultAX>
Spooner: True. I forgot that you had to import set manually.
<Spooner>
Sicp, Use 1.upto(29) instead.
linoge has quit [Client Quit]
andy753421 has quit [Ping timeout: 260 seconds]
<Spooner>
Sicp, You are using 'sheetname' not sheetname (string, not the variable).
bubblehead has quit [Remote host closed the connection]
<SegFaultAX>
I was just going to point that out.
<Sicp>
argh!
<SegFaultAX>
28.times is fine.
jgrevich has quit [Ping timeout: 260 seconds]
kristofers has joined #ruby
<SegFaultAX>
(1..29).each is fine
jgrevich has joined #ruby
<SegFaultAX>
1.upto(29) is fine
<Spooner>
Yes, but 28 times is 0..27, which is not what it wanted. Makes more sense to generate the numbers you want, not a different set of numbers and add _.
<Spooner>
*add 1
chrishough has joined #ruby
sepp2k has quit [Quit: Leaving.]
<SegFaultAX>
Spooner: Yup. I tend to prefer ranges personally. I always that #upto was silly when ranges are a thing.
<Spooner>
Yes, (1..28).each is just as good. I was just complaining about the need for +1
pitzips has quit [Remote host closed the connection]
ed8_ has left #ruby [#ruby]
jurassic_ has joined #ruby
<kojul>
SegFaultAX: Ruby's philosophy = multiple ways to do the same thing.
tommyvyo has quit [Quit:]
<Sicp>
(1..28).each used where?
<Sicp>
in the outer loop?
heliumsocket has joined #ruby
<SegFaultAX>
Sicp: To replace #times, yes.
<Sicp>
but I want to construct the sheet name from some variable..
<Spooner>
28.times.with_index(1) works too, but please don't use it ;)
<SegFaultAX>
kojul: Don't gotta tell me :)
<kojul>
SegFaultAX: It's why I get along with it so well. That's probably why I liked Perl too. But Perl just doesn't _look_ good.
tommyvyo has joined #ruby
<SegFaultAX>
kojul: I get both sides of the argument. The "one and preferably only one way to do something" ideology is sometimes attractive.
Faris6 has joined #ruby
<kojul>
SegFaultAX: That's what Python is for ;)
tommyvyo has quit [Client Quit]
<SegFaultAX>
Yup. And it has its uses. Some problems don't need to be solved by the programmer every damn time.
matayam has joined #ruby
tay1 has quit [Ping timeout: 260 seconds]
<kojul>
I'm a firm believer that you should reinvent the wheel…..
<kojul>
When you realize that your current wheels are janky.
Davey has joined #ruby
<SegFaultAX>
kojul: Hopefully that goes without saying.
pitzips has joined #ruby
AndChat| has quit [Ping timeout: 264 seconds]
<kojul>
SegFaultAX: It's good programming practice to reinvent the wheel though, even if you don't _need_ to.
andy753421 has joined #ruby
<SegFaultAX>
kojul: Eh. No. I don't think that's categorically true.
kofno has joined #ruby
DrCode has quit [Ping timeout: 276 seconds]
v__ has quit [Ping timeout: 260 seconds]
<kojul>
SegFaultAX: Really? I always thought it opened up new ways of looking at problems and sometimes you find a better way.
hasimo-t has quit [Ping timeout: 258 seconds]
<SegFaultAX>
I'm not going to waste me time trying to re-invent cryptographic hashing functions when there are viable solutions with hundreds or thousands of man-years of research by people much more highly trained than myself on that particular topic.
<SegFaultAX>
Not to mention I have products to ship.
daniel_- has quit [Quit: WeeChat 0.4.0]
philipd has quit [Quit: Computer has gone to sleep.]
kofno has quit [Remote host closed the connection]
DrCode has joined #ruby
<kojul>
SegFaultAX: Well unless you're a PhD in mathematics, you probably shouldn't be re-inventing crypto functions. for one. And for two, I have work that needs to get done to, but we all make our free time.
<SegFaultAX>
If I'm the domain expert on creating Frobnicators than of course it's in my interest to continue to refine the FrobnicatorCreation wheel. But 99% of topics are outside of my core competency (and yours too!) and I simply don't have enough time to devote to all of them.
<SegFaultAX>
kojul: I didn't assume you were just talking about free time projects.
kofno has joined #ruby
<SegFaultAX>
then of course*
nomenkun has joined #ruby
Davey has quit [Quit: Computer has gone to sleep.]
nopolitica has joined #ruby
<kojul>
SegFaultAX: Good point, though. But yeah, I would never reinvent the wheel while on the clock unless the wheel is broken.
swingha has quit [Quit: WeeChat 0.4.0]
brianpWins has quit [Quit: brianpWins]
<SegFaultAX>
I guess the tl;dr is pick 'yer wheels carefully. You only have a fixed amount of time to work on this stuff, and the amount of time you can spend on any given problem is inversely proportional to the number of problems you choose to work on.
<banisterfiend>
kojul: if your soul purpose is just 'getting work done' then you're simply a 'code monkey', unless of course it's your own startup you're working on :)
<SegFaultAX>
I'd rather have 2 projects at 100% than 100 projects at 2%, if you know what I mean.
<banisterfiend>
kojul: what makes programming interesting to me is doing original things and solving new problems unrelated to the day-to-day
<kojul>
banisterfiend: well, there's three of us.
philipd has joined #ruby
<kojul>
banisterfiend: I completely agree. I love creating.
nomenkun has quit [Ping timeout: 258 seconds]
<SegFaultAX>
Businesses often set out with 1 of 2 high level goals: 1) re-invent something that exists, and make it better or improve it in some way. 2) solve a problem that you've identified that does have a [satisfactory] solution.
razibog has quit [Ping timeout: 255 seconds]
kofno has quit [Remote host closed the connection]
<SegFaultAX>
You might be inventing new wheels or borrowing someone elses work to make it better, but ultimately a portion of your business is going to be new territory.
<SegFaultAX>
That's where the fun stuff is.
<SegFaultAX>
But aimlessly seeking out problems to re-invent because it's "good engineering practice" doesn't sound very fun to _me_ at all.
newUser1234 has quit [Remote host closed the connection]
dekroning has quit [Ping timeout: 252 seconds]
kgalens has quit [Ping timeout: 260 seconds]
<SegFaultAX>
that doesn't have a [satisfactory] solution*
<SegFaultAX>
Can't type today.
hbpoison has quit [Ping timeout: 264 seconds]
<kojul>
I would go a step further and say that doing anything aimlessly doesn't sound very fun.
thufir_ has joined #ruby
chrisramon has joined #ruby
v__ has joined #ruby
dhs227 has quit [Ping timeout: 264 seconds]
v__ has quit [Max SendQ exceeded]
tevio has joined #ruby
tcopp has quit [Ping timeout: 246 seconds]
v__ has joined #ruby
arusso has quit [Ping timeout: 245 seconds]
thorncp has quit [Ping timeout: 245 seconds]
d_roge has quit [Ping timeout: 245 seconds]
sayd has quit [Ping timeout: 245 seconds]
faulkner has quit [Ping timeout: 240 seconds]
rgoodwin has quit [Ping timeout: 264 seconds]
SegFaultAX has quit [Ping timeout: 245 seconds]
v__ has quit [Max SendQ exceeded]
stnly has quit [Ping timeout: 264 seconds]
br4ndon has joined #ruby
PhilK has quit [Ping timeout: 264 seconds]
v__ has joined #ruby
classix has quit [Ping timeout: 240 seconds]
andersbr has joined #ruby
andersbr has quit [Read error: Connection reset by peer]
stnly has joined #ruby
kgalens has joined #ruby
andersbr has joined #ruby
nopolitica has quit [Quit: Lost terminal]
v__ has quit [Max SendQ exceeded]
jgrevich has quit [Ping timeout: 252 seconds]
classix has joined #ruby
v__ has joined #ruby
jgrevich has joined #ruby
fixl has joined #ruby
icole has quit [Remote host closed the connection]
v__ has quit [Max SendQ exceeded]
newUser1234 has joined #ruby
v__ has joined #ruby
d_roge has joined #ruby
crimezone20xx has quit [Ping timeout: 246 seconds]
v__ has quit [Max SendQ exceeded]
sayd has joined #ruby
arusso has joined #ruby
thorncp has joined #ruby
thufir_ has quit [Ping timeout: 256 seconds]
SegFaultAX has joined #ruby
v__ has joined #ruby
rgoodwin has joined #ruby
PhilK has joined #ruby
sambio has quit []
faulkner has joined #ruby
v__ has quit [Max SendQ exceeded]
v__ has joined #ruby
sambio has joined #ruby
v__ has quit [Max SendQ exceeded]
hadees has joined #ruby
v__ has joined #ruby
v__ has quit [Max SendQ exceeded]
v__ has joined #ruby
sepp2k has joined #ruby
philipd has quit [Quit: Computer has gone to sleep.]
v__ has quit [Max SendQ exceeded]
elux has quit [Quit: Leaving...]
v__ has joined #ruby
kirun has quit [Quit: Client exiting]
hasimo-t has joined #ruby
v__ has quit [Max SendQ exceeded]
Wigflip has quit [Quit: Computer has gone to sleep.]
v__ has joined #ruby
andersbr has quit [Quit: andersbr]
v__ has quit [Max SendQ exceeded]
chrishough has left #ruby [#ruby]
chrishough has joined #ruby
v__ has joined #ruby
v__ has quit [Max SendQ exceeded]
v__ has joined #ruby
Amnesthesia has quit [Remote host closed the connection]
v__ has quit [Max SendQ exceeded]
v__ has joined #ruby
Amnesthesia has joined #ruby
v__ has quit [Max SendQ exceeded]
thinkclay has quit [Quit: Leaving.]
v__ has joined #ruby
idkazuma has quit [Remote host closed the connection]
idkazuma has joined #ruby
hasimo-t has quit [Remote host closed the connection]
freerobby has joined #ruby
hasimo-t has joined #ruby
v__ has quit [Max SendQ exceeded]
pcarrier_ has quit []
v__ has joined #ruby
colonolGron has quit [Ping timeout: 264 seconds]
v__ has quit [Max SendQ exceeded]
ilyam has quit [Quit: ilyam]
bakingbread has quit [Remote host closed the connection]
heliumsocket has quit [Quit: heliumsocket]
v__ has joined #ruby
bakingbread has joined #ruby
v__ has quit [Max SendQ exceeded]
v__ has joined #ruby
Banistergalaxy has joined #ruby
v__ has quit [Max SendQ exceeded]
macmartine has joined #ruby
v__ has joined #ruby
huoxito has joined #ruby
v__ has quit [Max SendQ exceeded]
v__ has joined #ruby
andy753421 has quit [Ping timeout: 264 seconds]
v__ has quit [Max SendQ exceeded]
mattbl has quit [Quit: This computer has gone to sleep]
v__ has joined #ruby
v__ has quit [Max SendQ exceeded]
v__ has joined #ruby
mercwithamouth has quit [Ping timeout: 245 seconds]
macmartine has quit [Quit: Computer has gone to sleep.]
v__ has quit [Max SendQ exceeded]
v__ has joined #ruby
newUser1234 has quit [Remote host closed the connection]
v__ has quit [Max SendQ exceeded]
v__ has joined #ruby
philipd has joined #ruby
philipd has quit [Max SendQ exceeded]
philipd has joined #ruby
philipd has quit [Max SendQ exceeded]
v__ has quit [Max SendQ exceeded]
newUser1234 has joined #ruby
v__ has joined #ruby
philipd has joined #ruby
philipd has quit [Max SendQ exceeded]
mattbl has joined #ruby
philipd has joined #ruby
philipd has quit [Max SendQ exceeded]
v__ has quit [Max SendQ exceeded]
v__ has joined #ruby
philipd has joined #ruby
philipd has quit [Max SendQ exceeded]
philipd has joined #ruby
v__ has quit [Max SendQ exceeded]
alanp has joined #ruby
d34th4ck3r has quit [Quit: Konversation terminated!]
v__ has joined #ruby
sambao21 has joined #ruby
v__ has quit [Max SendQ exceeded]
v__ has joined #ruby
pen has joined #ruby
marr has quit []
ZachBeta has joined #ruby
alanp_ has quit [Ping timeout: 264 seconds]
kristofers has quit []
sambao21 has quit [Ping timeout: 260 seconds]
whowantstolivef1 has quit [Quit: quit]
heliumsocket has joined #ruby
pitzips has quit [Quit: Leaving]
<shevy>
hehe
<shevy>
kojul getting drunk aimlessly
mercwithamouth has joined #ruby
<kojul>
shevy: I think getting drunk is the aim there
<kojul>
shevy: no what happens after that is probably aimless.
<kojul>
now*
maxmanders has joined #ruby
maxmanders has quit [Client Quit]
huoxito has quit [Quit: Leaving]
<kojul>
either way I guess those are fun most of the time.
<shevy>
hehehe
hbpoison has joined #ruby
lewis_ has joined #ruby
chrishough has quit [Quit: chrishough]
freeayu has joined #ruby
colonolGron has joined #ruby
blueOxigen has quit [Ping timeout: 256 seconds]
tevio has quit [Read error: Connection reset by peer]
Es0teric has quit [Remote host closed the connection]
<kornnflake>
what's the best way to store statistical data? like the amount of msg send by my users? it's a hell lot of data if i store the the "simple" way and just through everything in the db :D
<kornnflake>
*like the amount of msg send by my users over time
verysoftoiletppr has quit []
nomenkun has joined #ruby
matayam has quit [Remote host closed the connection]
andy753421 has joined #ruby
<kojul>
kornnflake: Depending on how much data you're talking about, you could just generate it on the fly, otherwise if you're already using a db, you might just want to store it there.
nomenkun has quit [Ping timeout: 258 seconds]
sduckett has quit [Ping timeout: 264 seconds]
br4ndon has quit [Quit: Lorem ipsum dolor sit amet]
br4ndon has joined #ruby
luckyruby has joined #ruby
br4ndon has quit [Client Quit]
fbernier has quit [Read error: Connection reset by peer]
dekroning has joined #ruby
xcv has quit [Remote host closed the connection]
visof has quit [Quit: Leaving]
xcv has joined #ruby
pyrac has quit [Quit: pyrac]
agarie has quit [Read error: Connection reset by peer]
agarie has joined #ruby
osvico has joined #ruby
tommyvyo has joined #ruby
dEPy has quit []
dekroning has quit [Ping timeout: 256 seconds]
brianpWins has joined #ruby
samuel02 has quit [Remote host closed the connection]
samuel02 has joined #ruby
veleno has quit [Quit: veleno]
jurassic_ has quit [Quit: jurassic_]
postmodern has joined #ruby
philipd has quit [Quit: Computer has gone to sleep.]
havenwood has joined #ruby
loginwashere has quit [Quit: loginwashere]
glosoli has left #ruby [#ruby]
mahoney has joined #ruby
thone_ has joined #ruby
ph^ has quit [Remote host closed the connection]
samuel02 has quit [Ping timeout: 264 seconds]
<mahoney>
How can I get a handle on the instance from a nested class within obj.instance_eval?
<mahoney>
I define a class in obj.instance_eval, and in that class, 'self' no longer points to obj.
mercwithamouth has quit [Ping timeout: 260 seconds]
forced_request has quit [Read error: Connection reset by peer]
thone has quit [Ping timeout: 252 seconds]
mercwithamouth has joined #ruby
sambao21 has joined #ruby
agarie has quit [Remote host closed the connection]
v0n has joined #ruby
codecop has quit [Remote host closed the connection]
<V8Energy>
banisterfiend: can i use ruby with html/js?
<banisterfiend>
V8Energy: of course
ericmathison has joined #ruby
<banisterfiend>
mahoney: it definitely should
<spider-mario>
you can make it generate html and js, for example
rkcrawford has joined #ruby
<spider-mario>
or you can make js code call ruby code running on a web server
<spider-mario>
there are many frameworks and libraries to do that
<V8Energy>
but i need to convert it to .exe and run "server side code" which should allow me to access files on the computer..
jabberwocky has joined #ruby
freerobby has quit [Quit: Leaving.]
<apeiros_>
mahoney: show code
<apeiros_>
(gist or pastie please)
<V8Energy>
spider-mario: there's TideSDK but once u package your program it gives u a 100mb exe file lol
ZachBeta has quit [Quit: Computer has gone to sleep.]
webwarlock has quit [Ping timeout: 258 seconds]
<mahoney>
apeiros_, banisterfiend: I'll put something on gist, hold on.
Sicp has quit [Quit: Leaving]
<apeiros_>
mahoney: probably you want class_eval or Class.new