<Chintan>
And from that I want to extract a hash {"This is important":"This is an important value", "It's":"going to be stored in a hash"}
Voodoofish430 has quit [Quit: Leaving.]
<Chintan>
How would I go about doing that? It's definitely RegEx, but I don't know much else besides that
johnnygoodmancpa has joined #ruby
<ahammond>
I'm trying to run kibana in an rvm on a ubuntu system. I installed rvm using the recommended curl command. Then I do ./gem install bundler (from /usr/loca/rvm/bin) and it says it worked. I try ./bundle --help and it fails: ERROR: Gem bundler is not installed, run `gem install bundler` first.
Hanmac has joined #ruby
nga4 has quit [Ping timeout: 264 seconds]
daniel_- has quit [Ping timeout: 245 seconds]
chrishough has quit [Quit: chrishough]
marr has quit [Ping timeout: 260 seconds]
R_Macy_ has joined #ruby
R_Macy_ is now known as R_Macy
johnnygoodmancpa has quit [Remote host closed the connection]
Ontolog has quit [Read error: Operation timed out]
<havenwood>
Chintan: Actually, this is slightly better, cause handles the lstrip: Hash[text.scan(/(.+): +(.+)/)]
hbpoison has quit [Ping timeout: 240 seconds]
nari has joined #ruby
<ahammond>
havenwood: ok, so bundle is working now. (I sourced the wrong file)
<havenwood>
Chintan: So this would read whole file into memory (email size, so who cares I guess) but short and sweet: File.read('gistfile1.txt'); Hash[text.scan(/(.+): +(.+)/)] # Same output as iteration method.
mockra_ has quit [Remote host closed the connection]
eka has quit [Quit: Computer has gone to sleep.]
<havenwood>
ahammond: Nice.
<Chintan>
havenwood: Brilliant, thanks so much mate
wallcloc_ has joined #ruby
<havenwood>
Chintan: Oh: s/File/text = File
<Chintan>
havenwood: You wouldn't happen to know anything about Priority Queus/natural language processing would you? It's kinda non-ruby related, so I'm hesitant to ask here
<havenwood>
Chintan: Meant to put a `text =` before the File.read**
<havenwood>
Chintan: What is a priority queue?
<Chintan>
havenwood: It's a data structure
<havenwood>
Chintan: Looking for language processing bindings in Ruby or pure Ruby libs?
<havenwood>
Chintan: Ahh.
HecAtic has quit [Quit: Àá¼ö]
<Chintan>
havenwood: Neither. I've got a task which I've gotta do in Ruby, and I'm not sure how to go about it. Essentially I need to grab an email (the text file), and output in a dictionary all the important info about it
hbpoison has joined #ruby
dhruvasagar has joined #ruby
Ohga has joined #ruby
wallclockbuilder has quit [Ping timeout: 252 seconds]
br4ndon has quit [Quit: Lorem ipsum dolor sit amet]
<ahammond>
what is the difference between gemsets (which appear to be supported by salt) and bundler? Can I handle bundles using gemset?
ajaya has joined #ruby
Davey has joined #ruby
ajaya has quit [Client Quit]
<ahammond>
bah, I'll spend more time on this tomorrow. Thanks havenwood! :)
<havenwood>
ahammond: Bundler is to Gemfile as RVM is to Gemset. I believe you can generate a Gemfile from a Gemspec, and vice versa. I just use Gemfile, only.
<ahammond>
thanks again havenwood. off to read up.
<havenwood>
ahammond: np, happy hacking!
Takehiro has joined #ruby
<Ohga>
hello rubyists. If I want to handle YAML, then psych is the gem I want it seems, right? and what about XML? is there something good with the standard ruby install or should I get some specific gem?
chessguy has quit [Remote host closed the connection]
ahammond has quit [Quit: ahammond]
<havenwood>
Modern Rubys come with Psych included. So no gem install needed. :)
<havenwood>
Ohga: Nokogiri is first-in-class XML/HTML parser.
<Ohga>
havenwood: yes, I've read that, but it's the one to use? no reason to find something else?
<havenwood>
Ohga: In the case of YAML, I think the best one is available by default. :)
<havenwood>
Ohga: I'd install Nokogiri for XML parsing though.
<Ohga>
havenwood: alright
xsdg has quit [Ping timeout: 260 seconds]
<havenwood>
Ohga: XML does have stdlib options, but as long as you can compile Nokogiri, really very nice!
<Ohga>
from the rubygem page for nokogiri "XML is like violence - if it doesnât solve your problems, you are not using enough of it.".. um what??
<Ohga>
:-D
<havenwood>
Ohga: XML ALL THE THINGS \o/
<Ohga>
oh noes!! *hides*
<Ohga>
havenwood: would you like to enlighten a ruby beginner such as myself why nokogiri is so much better than the standard?
<Ohga>
and I thought ##csharp were bad (no, just kidding)
spychalski has joined #ruby
<havenwood>
Ohga: Nokogiri is faster, supports css in addition to xpath, and you can parse XML and (X)HTML with the same parser.
adayzdone has joined #ruby
fedza has joined #ruby
Opettaja_ has quit [Quit: leaving]
<Ohga>
havenwood: so in short, just a much more tidy experience?
<havenwood>
Ohga: CSS3 selector searching I mean.
Opettaja has joined #ruby
<havenwood>
Ohga: Learn it once, handles all your HTML and XML needs (so reduces effort) and gets more love than stdlib one. Ruby core team members maintain Nokogiri.
thecodet1inker has joined #ruby
<havenwood>
Ohga: CSS3 searching is easier to learn than XPath. Unless you need XPath level granularity, Nokogiri lets you use CSS3 style.
Choobie has quit [Remote host closed the connection]
<thecodet1inker>
Is there a thing like C++ refrences in Ruby
adayzdone has quit [Client Quit]
<havenwood>
thecodet1inker: Like reference variables, or something else?
<Ohga>
havenwood: I'm only handling xml for this utility, but I guess css selector expressions works for that too?
<thecodet1inker>
havenwood: yes
<Ohga>
only that I can't make use of class or id.. (unless there is actualy class and id attributes in use of course)
snorkdude has joined #ruby
<Spooner>
thecodet1inker, All variables are references in Ruby. It is values and pointers that Ruby doesn't have ;)
Opettaja has quit [Client Quit]
<thecodet1inker>
Spooner: im just dumb then :'(
<Spooner>
havenwood, The only advantage of xpath that I can see is that Chrome (et al) generates it for me so I don't need to write it!
<Ohga>
correct me if I'm wrong, but the term reference in c++ is a bit more specific than the general term. in c++ it is a pointer with constant address which is manipulated without pointer notation
<Spooner>
In Ruby we have references to objects that can't be treated as a pointer. Nothing is a value; nothing is a pointer. Well, strictly, the implementation might be slightly different, but that isn't relevant (e.g. Fixnum are stored as 31bit numbers in the 32bit pointer, rather than redirected from it).
<aedornm>
I'm like a prophet. I have successfully predicted that I will want sushi tomorrow.
<havenwood>
aedornm: Which makes me want sushi now. I am disciple.
* Ohga
is not impressed
jjbohn has joined #ruby
<nazty>
num = 1
<nazty>
listcmp1.each { |x| puts num + ':' x ; num += 1 }
<nazty>
why wont that work\
b055cad is now known as madb055
<nazty>
it works if i leave it as listcmp1.each { |x| puts x }
<Ohga>
nazty: .. ':' x .. no operator in between?
<nazty>
ohhh concat
<Spooner>
nazty, You probably want: puts "#{num}: #{x}"
tommyvyo has joined #ruby
<Ohga>
nazty, Spooner: yeah, that's even better
tylersmith has joined #ruby
mercwithamouth has quit [Ping timeout: 245 seconds]
<Spooner>
You can't add a number to a string (num + ':') and what Ohga said (':' x needs something between the parts)
cyong has quit [Quit: Leaving.]
<Ohga>
Spooner: ah right.. but num.to_s + ':' works, right?
<Spooner>
Though really, string interpolation is good. Using + is for people coming from perl.
<snorkdude>
Hey guys, I'm working on consuming an oauth2 protected api with ruby and I need some help parsing a url. I'm at the callback phase, and I'm getting this url -> "http://localhost:4567/me#access_token="yetanotheraccesstoken"
<Spooner>
Ohga, Indeed. #{} performs a to_s for you.
<havenwood>
nazty: If x was a string, it would work, but like Spooner said, buest to interpolate with #{}.
<Ohga>
Spooner: mm
<snorkdude>
How do I parse the access token out since it isn't a regular parameter?
<Ohga>
havenwood: hm.. I'm looking in the pickaxe.. it talks about a YAML library (uses "require 'yaml').. but that's not psych, right?
mercwithamouth has joined #ruby
bonhoeffer has quit [Quit: bonhoeffer]
tjbiddle has quit [Quit: tjbiddle]
<FuzaiDesktop>
{ "a" => 0, "b" => 2, "c" => 3, "d" => 0 } If I have a hash that looks like that and I want to get all of the keys with the smallest variable how would I do that with Ruby?
<havenwood>
Ohga: I think there was a progression. I don't exactly recall. Original YAMl was replaced with Jame Edward Gray's FastYAML or something then Tenderlove's Psych. <- Terrible history, just my guess without looking it up.
<thecodet1inker>
isn't self the same as 'this' in c++?
<Spooner>
thecodet1inker, Yes, though mostly you don't need to use it explicitly.
<thecodet1inker>
Spooner: I want to set something in an array to this object
<Ohga>
havenwood: and the pickaxe haven't captured the latest changes?
<thecodet1inker>
Spooner: the array is sent into the object's function and array[@x, @y] = self
<Spooner>
thecodet1inker, Then you need to do array[@x][@y]
HecAtic has joined #ruby
<nazty>
finished mmy first ruby app!
<thecodet1inker>
wow... im dumb...
<thecodet1inker>
thanks
* nazty
dances
<havenwood>
nazty: Grats!
heliumsocket has quit [Quit: heliumsocket]
heliumsocket has joined #ruby
ttt has joined #ruby
h4mz1d has joined #ruby
<Ohga>
havenwood: would you know if there is some tutorial/guide for psych?
io_syl has quit [Quit: Computer has gone to sleep.]
<havenwood>
Ohga: Hmmm. I don't know of one, but if you find one mention it. I could use a look!
<snorkdude>
havenwood: thanks! wondering why it wouldn't just come as a param though
<snorkdude>
kind of weird
<Spooner>
FuzaiDesktop, I'm going to bed, but here is a horrible implementation for you in my sleepy state: { "a" => 0, "b" => 2, "c" => 3, "d" => 0 }.group_by(&:last).min_by(&:first).last.map(&:first)
<Ohga>
havenwood: Nokogiri have one, no probs there.. Psych seems like a wrapper to libyaml, which in turn looks like a typical c++ library page.. unintelligable
snorkdude has quit [Quit: snorkdude]
nateberkopec has quit [Quit: Leaving...]
<FuzaiDesktop>
Spooner, I appreciate it, sleep well, I thought of using hash.values.each and comparing until i found the smallest value, I'm just now going to try to see if can extract that correctly :)
<thecodet1inker>
Spooner: it still didn't work :'(
<Spooner>
FuzaiDesktop, Easier to use hash.values.min
<FuzaiDesktop>
Oh nice
<FuzaiDesktop>
i didn't know about that
<FuzaiDesktop>
:)
<Spooner>
FuzaiDesktop, That works fine for me (gives ['a', 'd']), but maybe I misunderstood the requirements.
bonhoeffer has joined #ruby
deepinskin has joined #ruby
<FuzaiDesktop>
your example probably works just fine, it's really foreign to me and i'm trying to digest it now
adeponte has joined #ruby
<Spooner>
It isn't very readable. Try running each section of it incrementally (that is, run the group_by first, then the group_by & min_by).
kpshek has quit []
Yakko has joined #ruby
<FuzaiDesktop>
ty :)
icole has quit [Remote host closed the connection]
nateberkopec has joined #ruby
<Spooner>
This is probably clearer: h = { "a" => 0, "b" => 2, "c" => 3, "d" => 0 }; h.select {|k, v| v == h.values.min }.keys
nateberkopec has quit [Client Quit]
<Spooner>
Anyway: 'night!
<havenwood>
Spooner: G'night!
Spooner has quit [Remote host closed the connection]
jjbohn has quit [Quit: Leaving...]
moos3 has joined #ruby
yshh has quit [Remote host closed the connection]
Seventoes has joined #ruby
sn0wb1rdz is now known as sn0wb1rd
<Yakko>
hey guys, I have a class User and I'm in the console, can I somehow figure out which file that class is described?
adeponte has quit [Ping timeout: 260 seconds]
Seventoes has left #ruby [#ruby]
jean-lou` has quit [Read error: Connection reset by peer]
yshh has joined #ruby
<FuzaiDesktop>
So what i did
<FuzaiDesktop>
here i'll pastie it
tcstar has joined #ruby
<havenwood>
Yakko: Just to clarify, you want to determine the file where the class came from?
chico_chicote has quit [Read error: Connection reset by peer]
techlife has joined #ruby
<havenwood>
Yakko: I'd prolly `grep -R ClassNameHere *.rb`, try to find the code where the gem is required.
h4mz1d has quit [Ping timeout: 245 seconds]
allaire has joined #ruby
<akhet>
anyone here familar with MVC?
<havenwood>
akhet: Yes. I'm sure lots are.
<Quadlex>
The principle? Or is there a tool?
<akhet>
the principle ...trying to wrap my head around it
ninjanoise has joined #ruby
nga4 has joined #ruby
<akhet>
i feel like i should know about this principal already but i dont ...oh well
<havenwood>
akhet: View gets served up to the browser, Model is where you get the data from the db, and no one has yet discovered what a Controller is.
<akhet>
lol
cyberflux has quit []
cha1tanya has joined #ruby
<akhet>
ty havenwood
axl_ has joined #ruby
BrockBoland has joined #ruby
<akhet>
isnt the controller just the interaction with the browser?
<ninjanoise>
n00b question if someone wants to humor me..
<BrockBoland>
any chance someone could help me with a question that has been immensely difficult to google? I'm kind of a newb here
<havenwood>
akhet: Might ask in #RubyOnRails since Rails is an MVC framework. I'll eat my shoe if they can explain what a Controller is without talking gibberish. :P
<havenwood>
Ask!
<BrockBoland>
I'm looking at some code that does: `new(myvar) if myvar` at the end of a method. Not .new on an object: just new by itself. What is that?
xclite has quit [Remote host closed the connection]
<ninjanoise>
when that is run is it that ruby is smart enough to run the initialize?
<ninjanoise>
is initialize a special method?
<havenwood>
BrockBoland: What is?: p myvar
zehrizzatti has joined #ruby
<havenwood>
ninjanoise: Yes, initialize is a special class method.
<ninjanoise>
havenwood thanks
kornnflake is now known as kornnflake_zzz
<ninjanoise>
then the other 2 say_hi and say_bye call the other methods so that makes sense :)
<havenwood>
ninjanoise: It is magic, good exercise to re-implement Ruby's class from a module.
<havenwood>
ninjanoise: Avdi did just that in a RubyTapas, sec I'll check if it was a free episode, super interesting!
wargasm has joined #ruby
averiso has joined #ruby
<FuzaiDesktop>
http://pastie.org/6457285 can anyone explain why gem can install the json library but irb can't seem to find it anywhere?
<BrockBoland>
havenwood: it's a hash, does that help?
Hanmac2 has joined #ruby
<FuzaiDesktop>
nm i found it in debians repo as well
julian-delphiki has joined #ruby
julian-delphiki has quit [Client Quit]
drale2k has joined #ruby
nateberkopec has joined #ruby
nateberkopec has quit [Remote host closed the connection]
<BrockBoland>
havenwood: never mind, but also thanks. Trying to help my wife with a project, but she's talking to an instructor
Takehiro has joined #ruby
endzyme has quit [Remote host closed the connection]
Hanmac1 has quit [Ping timeout: 248 seconds]
<yfeldblum>
ninjanoise, no, initialize isn't "special"; it's just that `MegaGreeter.new` is defined to allocate an instance of the object and then call the #initialize method on that object
emmanuelux has quit [Quit: emmanuelux]
mockra has joined #ruby
<yfeldblum>
BrockBoland, "new" is an instance method that class objects have; if `self` is a class such as Object, then calling `new` is sort of equivalent to calling `self.new` which is like calling `Object.new`
Takehiro has quit [Ping timeout: 240 seconds]
<BrockBoland>
yfeldblum: aha! thanks!
kofno has quit [Remote host closed the connection]
fedza has quit []
baroquebobcat has joined #ruby
<yfeldblum>
akhet, a Controller class is where you put the code you want Rails to run when certain matching HTTP requests come in from the browser
kofno has joined #ruby
<yfeldblum>
akhet, a Controller class can do things like look at the querystring parameters in the URL, fetch data from the database, render some HTML from that data, etc
markalanevans has quit [Ping timeout: 272 seconds]
<akhet>
this is my new favorite channel
<akhet>
:)
<akhet>
ty
joeycarmello has quit [Remote host closed the connection]
<ninjanoise>
does anyone have a good place to read up on classes and methods?
mockra has quit [Ping timeout: 260 seconds]
<yfeldblum>
akhet, the Controller class will look at the querystring parameters directly, but when it comes to fetching data from the database, the controller will likely delegate that bit to a different Model class, and when it comes to rendering some HTML from that data, again, the controller will likely delegate that bit to a View file
cha1tanya has quit [Ping timeout: 264 seconds]
tcstar has quit [Ping timeout: 250 seconds]
<yfeldblum>
akhet, but you still write that code in the controller to do that or to call something else that does that
heliumsocket_ has joined #ruby
heliumsocket_ has quit [Client Quit]
<yfeldblum>
BrockBoland, cheers
kofno has quit [Remote host closed the connection]
heliumsocket has quit [Ping timeout: 252 seconds]
butblack has joined #ruby
jblack has quit [Ping timeout: 264 seconds]
chrishough has quit [Quit: chrishough]
havenwood has quit [Remote host closed the connection]
malkomalko has quit [Remote host closed the connection]
BrockBoland has quit [Quit: BrockBoland]
<Yakko>
is there anything in the Ruby syntax that allows me to unload a class in runtime?
quazimodo has quit [Ping timeout: 256 seconds]
dannluciano has joined #ruby
dannluciano has quit [Client Quit]
NiteRain has joined #ruby
tcstar has joined #ruby
adeponte has joined #ruby
eAlchemi_ has joined #ruby
cha1tanya has joined #ruby
rgbdev has quit [Quit: rgbdev]
virtualroot has left #ruby [#ruby]
mneorr has joined #ruby
diegok has quit [Read error: Operation timed out]
macmartine has joined #ruby
<FuzaiDesktop>
Wow Ruby is so awesome
mneorr has quit [Remote host closed the connection]
Yakko_ has joined #ruby
eAlchemist has quit [Ping timeout: 256 seconds]
jamesfung14 has quit [Ping timeout: 252 seconds]
Yakko has quit [Ping timeout: 245 seconds]
terrorpup has joined #ruby
terrorpup has quit [Changing host]
terrorpup has joined #ruby
Emplitz has joined #ruby
joeycarmello has joined #ruby
quazimodo has joined #ruby
<thecodet1inker>
How can I store a function in an array?
<thecodet1inker>
or a pointer to that function or something like that
<thecodet1inker>
can you do something like b = [self.method(:move)]?
<tylersmith>
yep
mneorr has joined #ruby
mafolz has quit [Ping timeout: 252 seconds]
<thecodet1inker>
ruby is just amazing
<thecodet1inker>
and so are you
<tylersmith>
basically Object#method returns the method for the given symbol
<thecodet1inker>
thanks
<tylersmith>
then you can do whatever
<tylersmith>
i'm only amazing because i ruby ;)
<tylersmith>
np
j^2 has joined #ruby
<thecodet1inker>
thx again
<thecodet1inker>
So can i call it like b.last()?
thecodethinker has quit [Quit: Lost terminal]
mafolz has joined #ruby
<tylersmith>
thecodet1inker: b.last() returns the method itself
<tylersmith>
you need to call #call on it to execute
linguini has quit [Quit: ERC Version 5.3 (IRC client for Emacs)]
joeycarmello has quit [Remote host closed the connection]
<tylersmith>
b.last().call()
<thecodet1inker>
#call?
<thecodet1inker>
ah
<tylersmith>
(parens for clarity)
Yakko_ has quit [Remote host closed the connection]
twoism has quit [Remote host closed the connection]
<tylersmith>
Foo#bar means the bar method on an instance of Foo
<thecodet1inker>
kk
<tylersmith>
so shorthand, #call is the call instance method on whatever is in context
Guest711 is now known as mephux
baroquebobcat has quit [Quit: baroquebobcat]
Opettaja has quit [Quit: leaving]
mephux has quit [Changing host]
mephux has joined #ruby
Proshot has quit [Ping timeout: 255 seconds]
macmartine has quit [Quit: Computer has gone to sleep.]
yshh has quit [Ping timeout: 245 seconds]
otters has quit [Quit: bye]
pepper_chico has quit [Quit: Computer has gone to sleep.]
baroquebobcat has joined #ruby
ninjanoise has quit [Remote host closed the connection]
moos3 has quit [Quit: Computer has gone to sleep.]
alvaro_o has quit [Quit: Ex-Chat]
hasimo has quit [Remote host closed the connection]
dcwu has joined #ruby
otters has joined #ruby
allaire has quit []
w400z has quit []
jurassic_ has joined #ruby
rezzack has quit [Quit: Leaving.]
robbsan has joined #ruby
mikepack has quit [Remote host closed the connection]
xsdg has quit [Ping timeout: 250 seconds]
end_guy has quit [Ping timeout: 276 seconds]
drumsrgr8forn8 has joined #ruby
mneorr has quit [Remote host closed the connection]
icole has joined #ruby
jdunck has quit [Quit: Computer has gone to sleep.]
robbsan has quit [Client Quit]
robbsan has joined #ruby
robbsan has quit [Client Quit]
ckrailo has joined #ruby
Opettaja has joined #ruby
kofno has joined #ruby
beneggett has quit [Quit: Computer has gone to sleep.]
Opettaja has quit [Client Quit]
happydude has joined #ruby
pepper_chico has joined #ruby
quazimodo has quit [Ping timeout: 255 seconds]
Opettaja has joined #ruby
xsdg has joined #ruby
quazimodo has joined #ruby
yacks has joined #ruby
openstandards has joined #ruby
kn330 has quit [Ping timeout: 272 seconds]
<openstandards>
evening all
senayar has quit [Remote host closed the connection]
twoism has joined #ruby
twoism has quit [Remote host closed the connection]
twoism has joined #ruby
S1kx has quit [Quit: Leaving]
ryanf has quit [Read error: Connection reset by peer]
ryanf has joined #ruby
robbyoconnor has joined #ruby
yashshah has joined #ruby
devdazed has quit [Ping timeout: 256 seconds]
joeycarmello has joined #ruby
axtran has quit [Read error: Connection reset by peer]
kofno has quit [Remote host closed the connection]
devdazed has joined #ruby
end_guy has joined #ruby
Takehiro has joined #ruby
dhruvasagar has quit [Ping timeout: 255 seconds]
beneggett has joined #ruby
miso1337 has joined #ruby
hemanth has joined #ruby
dhruvasagar has joined #ruby
cha1tanya has quit [Quit: Leaving]
FifthWall has joined #ruby
j^2 has quit [Quit: for i in `/names` ; do adios $i; done]
Takehiro has quit [Ping timeout: 264 seconds]
pdamer has quit [Quit: pdamer]
tomzx_mac has quit [Read error: Operation timed out]
w400z has joined #ruby
h4mz1d has joined #ruby
jurassic_ has quit [Quit: jurassic_]
ryanf has quit [Read error: Connection reset by peer]
ryanf has joined #ruby
jurassic_ has joined #ruby
jurassic_ has quit [Client Quit]
icole has quit [Remote host closed the connection]
elux has quit [Quit: Leaving...]
tommyvyo has quit [Quit:]
butblack has quit [Quit: butblack]
jurassic_ has joined #ruby
sayan has joined #ruby
Opettaja has quit [Quit: WeeChat 0.4.0]
yshh has joined #ruby
Opettaja has joined #ruby
Targen has quit [Read error: Connection reset by peer]
sayan has quit [Read error: Connection reset by peer]
havenwood has joined #ruby
mikepack has joined #ruby
jurassic_ has quit [Client Quit]
macmartine has joined #ruby
Beoran_ has joined #ruby
dhruvasagar has quit [Ping timeout: 252 seconds]
miso1337 has quit [Quit: afk]
Beoran__ has quit [Ping timeout: 245 seconds]
kpshek has joined #ruby
havenwood has quit [Ping timeout: 248 seconds]
dhruvasagar has joined #ruby
adkron__ has joined #ruby
freezey has quit [Remote host closed the connection]
beneggett has quit [Ping timeout: 248 seconds]
yashshah has quit [Read error: Connection reset by peer]
HecAtic has quit [Quit: Àá¼ö]
malkomalko has joined #ruby
sayan has joined #ruby
lewix has quit [Remote host closed the connection]
mercwithamouth has quit [Ping timeout: 246 seconds]
kofno has joined #ruby
miso1337 has joined #ruby
jdunck has joined #ruby
malkomalko has quit [Ping timeout: 255 seconds]
miso1337 has quit [Client Quit]
chiel_ is now known as chiel
radic has quit [Disconnected by services]
radic_ has joined #ruby
kofno has quit [Ping timeout: 246 seconds]
rhys has joined #ruby
tommyvyo has joined #ruby
thecodet1inker has quit [Quit: leaving]
<rhys>
so if ruby is like magic. and I loaded some random gem. and it has no real documentation. Ruby has it loaded somehow. Can I make ruby enumerate the methods that the library loaded?
jurassic_ has joined #ruby
<rhys>
I am not a developer, i've only done some c++ and python before.
ebobby has quit [Quit: Lost terminal]
<hemanth>
rhys, yes, use the .methods on the obj
<epitron>
rhys: gem install pry
<epitron>
then do "cd TheObject; ls"
v0n has quit [Ping timeout: 256 seconds]
<hemanth>
epitron, why not TheObj.methods?
<epitron>
because pry shows everything, in a nice table, with colors
<hemanth>
epitron, I have been using pry from first version btw ;)
<rhys>
hemanth, i was trying to run it on an object I created from a subobject thingy.
<epitron>
i'm talking to rhys
<rhys>
epitron, i'll try that.
<epitron>
:)
<hemanth>
epitron, I want the new comer to know about some basic ruby
ryanf has quit [Ping timeout: 264 seconds]
<epitron>
fair enough
<epitron>
cd Object; ls
<epitron>
:)
<rhys>
thats funny actually
rh1n0 has joined #ruby
hasimo has joined #ruby
<rhys>
oh wow. pry.
<rhys>
I'm in ops working on puppet. I can write some puppet stuff.
markalanevans has joined #ruby
jurassic_ has quit [Quit: jurassic_]
<rhys>
also, when I do a google search for some kind of reference that describes what all ||= << etc do, what do I call those operators. I know how objects overload operators for C++,
<rhys>
operator overload list ruby doesn't return much
<hemanth>
read the docs rhys
banjara has joined #ruby
lewix has joined #ruby
lewix has quit [Changing host]
lewix has joined #ruby
<rhys>
rather read the code.
carlyle has quit [Remote host closed the connection]
kpshek has quit [Ping timeout: 255 seconds]
cyong has joined #ruby
macmartine has quit [Quit: Computer has gone to sleep.]
jurassic_ has joined #ruby
macmartine has joined #ruby
Demux has quit [Ping timeout: 260 seconds]
divout has joined #ruby
jurassic_ has quit [Client Quit]
<hemanth>
rhys, docs have the code as well ;)
lewix has quit [Remote host closed the connection]
Nisstyre has quit [Ping timeout: 245 seconds]
lewix has joined #ruby
d2dchat has quit [Remote host closed the connection]
Demux has joined #ruby
<rhys>
hemanth, at some point I'm going to have to read the docs. there is no question about that. but I learn because I'm forced to. Right now I"m trying to figure out what my next command needs to be to get this API data out of this library on crimes in chicago. In an attempt to not shave yaks, I try to get my info and get out, eventually I'll have enough info to do more, faster.
mneorr has joined #ruby
<hemanth>
rhys, good :)
Takehiro has joined #ruby
adkron__ has quit [Ping timeout: 256 seconds]
<rhys>
thanks dude.
<hemanth>
np
<epitron>
rhys: did you find where all the << || == operators are?
nga4 has quit []
mneorr has quit [Ping timeout: 245 seconds]
sayan has quit [Read error: Connection reset by peer]
<epitron>
(that module is mixed into anything that can be compared with <, >, ==, !=, etc.)
pepper_chico has quit [Quit: Computer has gone to sleep.]
xbayrockx has joined #ruby
xbayrockx is now known as wf2f
Myconix has joined #ruby
jonahR has joined #ruby
dhruvasagar has quit [Read error: Connection reset by peer]
mikepack has quit [Remote host closed the connection]
dhruvasagar has joined #ruby
one` has joined #ruby
Nisstyre has joined #ruby
ryanf has joined #ruby
jurassic_ has joined #ruby
kpshek has joined #ruby
beneggett has joined #ruby
beneggett has quit [Client Quit]
tommyvyo has quit [Quit:]
miso1337 has joined #ruby
Domon has quit [Remote host closed the connection]
Cooler__ has joined #ruby
hbpoison has quit [Ping timeout: 252 seconds]
uris has quit [Quit: Leaving]
lewix has quit [Remote host closed the connection]
Chintan has joined #ruby
<Chintan>
How would I do this manually (e.g. with a .each or something) items = Hash[content.scan(/[\n\r](.+):[\ \t]*(.+)/)]
Cooler_ has quit [Ping timeout: 255 seconds]
Takehiro has quit [Remote host closed the connection]
Takehiro has joined #ruby
beneggett has joined #ruby
zehrizzatt has joined #ruby
h4mz1d has quit [Ping timeout: 246 seconds]
<Chintan>
Hey all, quick question. Let's say I have a string, and I run .scan on it to get an array of matches for a regex. How would I then delete every line that had a match in that string? (assuming lines are separated by \n)
cr3 has joined #ruby
zehrizzatti has quit [Ping timeout: 252 seconds]
sayan has joined #ruby
miso1337 has quit [Quit: unplugging]
echevemaster_ has joined #ruby
jurassic_ is now known as jurassic
icole has joined #ruby
cr3 has quit [Client Quit]
<rhys>
Chintan, i would cut the string up first via lines
danman has joined #ruby
<hemanth>
Chintan, something like sed will be more useful here
<rhys>
Chintan, then do a match, if match, delete from array
kpshek has quit []
<Chintan>
rhys: Ah got it, thanks!
<rhys>
Chintan, maybe look at String#each_line
toekutr has quit [Remote host closed the connection]
<rhys>
Chintan, I found that in the doc while looking for split. it seems to be capable of exactly what you want
tommyvyo has joined #ruby
<Chintan>
rhys: I'm an idiot for not looking at the doc haha, thanks a bunch
bricker`1A has joined #ruby
<hemanth>
rhys, heh heh docs save the day ;)
<epitron>
Chintan: how about this: matches = []; non_matching_lines = file.reject { |line| matches << line.scan(...) }; matches.compact!
icole has quit [Ping timeout: 272 seconds]
<rhys>
hemanth, your point could not be more clear.
mneorr has joined #ruby
<epitron>
DOCS DOCS DOCS DOCS DOCS
<rhys>
omg i can use pry as a new irb
<epitron>
GOTTA READ 'EM ALL!
drumsrgr8forn8 has quit [Ping timeout: 245 seconds]
<epitron>
pry is irb on crack :D
bricker`LA has quit [Ping timeout: 248 seconds]
<epitron>
rhys: btw, pry-rescue would probably come in really handy for someone starting out with ruby
dhruvasagar has quit [Ping timeout: 240 seconds]
<epitron>
instead of doing "ruby script.rb", you do "rescue script.rb", and if something blows up, it pries into where the bug happened, letting you inspect variables
* hemanth
had meet the pry author once in #ruby, unable to recall his nick
w400z has quit [Quit: Computer has gone to sleep.]
girija has joined #ruby
<epitron>
BANISTERFIEND
<hemanth>
oh is it! heh heh ok, I was telling the author himself how pry is good, after talking for a while....he said I'm the author
<apeiros_>
now I need me some photoshop to put the HOTS package on his hands ^^
pedda has quit [Quit: Computer has gone to sleep.]
devdazed has joined #ruby
haxrbyte has joined #ruby
<aedornm>
Hanmac: You tend to expand pretty fast in SC2 ... the main difference from SC1 to SC2 is really the pacing. SC2 games are far quicker
<Xeago>
FISH_SOUP: p is built in yes
fuzai has joined #ruby
<Xeago>
aedornm: me and apeiros_ are looking for more practice partners!
douglarek_ has quit [Quit: 我玩去了]
<Xeago>
Hanmac, aedornm come join :)
<apeiros_>
indeed!
eAlchemi_ has quit [Remote host closed the connection]
<apeiros_>
2v2 practice would probably be fun too
<apeiros_>
Xeago: btw., as of today, only HOTS, no WOL ^^
<Hanmac>
aedornm yeah and thats my problem ... all new games are like DOTA clones :'( ... i want to build my bases and build BUILDINGS and other stuff :(
<Xeago>
apeiros_: fine
<Xeago>
Hanmac: terran builds lots of buildings
eAlchemist has joined #ruby
<Xeago>
protoss a bit less so
<Xeago>
still lots of gateways
aganov has joined #ruby
<Xeago>
several robos/stargates
<Xeago>
and tons of pylons ;)
<Hanmac>
Eldar are more cool than Protoss :PP
<Xeago>
terran needs 10+ barracks after 25mins
<Xeago>
unless the game is totally wonky
<apeiros_>
zerg don't build
<apeiros_>
they become :D
<aedornm>
hmmm.. SC2 was great until I hit higher leagues and it all came down to who screwed up their build first. =(
<Xeago>
apeiros_: yea, 15hatch 16 pool, 17 gas kills me
<Xeago>
:\
<apeiros_>
rly?
* apeiros_
duly noted
<Xeago>
or anything that is as aggressive like that
<Xeago>
which is not really agressive
<apeiros_>
8 pool? ^^
<Xeago>
8pool hits scoutable
<Xeago>
7pool would hit before pylon completes/forge is killable
<Xeago>
tho, 8pool hits a bit harder
hbpoison has quit [Ping timeout: 245 seconds]
<Xeago>
I'd say that is more of a gamble
<Xeago>
tho, 10/11pool with 4 lings
v1p has joined #ruby
<Xeago>
doesn't put you behind that much, early queen is awsome
<aedornm>
Hanmac: Did you play Total Annihilation or Supreme Commander 1? Those were endless base building simulators! heh
* Xeago
played TA
lemonsparrow has joined #ruby
* Hanmac
likes the little tiny zerglings :P
<Xeago>
think the binary was like 120kb? awsome gfx
jacky has quit [Excess Flood]
dangerousdave has joined #ruby
<FISH_SOUP>
how do you do a count++ in ruby?
<Xeago>
count+=1
El_loco has quit [Ping timeout: 272 seconds]
<FISH_SOUP>
oh, ruby doesnt have --count or counter++ ?
<FISH_SOUP>
stuff like that?
<Xeago>
correct
<aedornm>
Yeah, it was pretty small. SC1 was good, SC2 took the game in a different direction but it wasn't too bad, either.
girija has joined #ruby
<Xeago>
still torn about my opinion about hots
<Xeago>
pro scene looks cool
<Xeago>
but afraid of ladder
eAlchemist has quit [Ping timeout: 245 seconds]
haxrbyte_ has joined #ruby
<Xeago>
and like PROXY ALL THE WIDOW MINES
<Xeago>
and PROXY ALL THE ORACLES
<Xeago>
:\
sleetdrop has joined #ruby
adkron_ has quit [Read error: Connection reset by peer]
adkron_ has joined #ruby
<FISH_SOUP>
puts "The script is called: #{$0}" why doesn't it have $1 or $2 ?
haxrbyte has quit [Ping timeout: 245 seconds]
filipe has joined #ruby
bricker`1A has quit [Read error: Connection reset by peer]
apod has joined #ruby
<Hanmac>
FISH_SOUP $0 is short for $PROGRAM_NAME, $1-$9 are used for regex and =~
<FISH_SOUP>
ah i see okay
arturaz has joined #ruby
jonahR has quit [Quit: jonahR]
ahammond has quit [Quit: ahammond]
arturaz has quit [Remote host closed the connection]
arturaz has joined #ruby
yeltzooo has quit [Read error: Operation timed out]
<tobiasvl>
sonne, it's because Integer is the name of the class you cast/convert to
<sonne>
i was quite puzzled by the fact that a class could take arguments
<Hanmac>
sonne: Integer is a class, Integer() is a method, meth can be an method or local variable, meth() is allways a method, and meth.() is a call of meth obj
ananthakumaran has quit [Ping timeout: 252 seconds]
dhruvasagar has quit [Ping timeout: 252 seconds]
<sonne>
so it's a good practice, for a given class MyClass, to have a kernel method MyClass() that casts to it?
jgrevich has quit [Remote host closed the connection]
kofno has quit [Ping timeout: 245 seconds]
lkba has joined #ruby
<Hanmac>
sonne the Integer method is indipent from the Integer class ... its also important because Integer.new does not work, so you need that method
<sonne>
that makes a point too
<Hanmac>
sonne: normaly you dont need the MyClass() method, because MyClass.new can do the jop too
<sonne>
it's just the naming that sounded strange-ish, usually there is a certain fanaticism for conventions in the ruby ecosystem :)
HecAtic has joined #ruby
arturaz has quit [Remote host closed the connection]
<apeiros_>
Hanmac: that's what the base argument is for
<apeiros_>
>> Integer("0x10", 10)
<eval-in>
apeiros_ => /tmp/execpad-9072f75a8cec/source-9072f75a8cec:2:in `Integer': invalid value for Integer(): "0x10" (ArgumentError)
<eval-in>
from /tmp/execpad-9072f75a8cec/source-9072f75a8cec:2:in `<main>' (http://eval.in/12493)
<Hanmac>
apeiros_ yeah but if you omit the base arg, it trys to guess automaticly
<apeiros_>
yes. which is why I mentioned it
<apeiros_>
09:31 apeiros_: Integer(str, 10) if you only want to accept base 10
hoelzro|away is now known as hoelzro
sepp2k has joined #ruby
haxrbyte_ has quit [Ping timeout: 245 seconds]
timonv has quit [Remote host closed the connection]
<Hanmac>
hm with '0.1234567E7' both Float() and to_f supports that
echevemaster_ has quit [Quit: Saliendo]
arturaz has joined #ruby
haxrbyte has joined #ruby
marcgg has joined #ruby
sleetdrop has quit [Remote host closed the connection]
Xeago has joined #ruby
sleetdrop has joined #ruby
vagmi has joined #ruby
eAlchemist has joined #ruby
vagmi has left #ruby [#ruby]
<Hanmac>
apeiros_ did you notic about sized enumerators? its a 2.0 feature that was a bit under the carpet :P
duosrx has quit [Remote host closed the connection]
chussenot has joined #ruby
adkron_ has quit [Read error: Connection reset by peer]
adkron_ has joined #ruby
skattyadz has quit [Quit: skattyadz]
rh1n0 has joined #ruby
rh1n0 has quit [Client Quit]
eAlchemist has quit [Ping timeout: 245 seconds]
Axsuul has quit [Ping timeout: 256 seconds]
vjacob has joined #ruby
atyz has quit [Quit: Leaving...]
haxrbyte has quit [Ping timeout: 260 seconds]
mulinux has joined #ruby
<Hanmac>
shevy: sized enumerators! :D
dhruvasa1ar has quit [Quit: leaving]
averiso has joined #ruby
dhruvasagar has joined #ruby
razibog has joined #ruby
banisterfiend has quit [Remote host closed the connection]
eldariof has joined #ruby
atyz has joined #ruby
eldariof has quit [Client Quit]
haxrbyte has joined #ruby
becom33 has joined #ruby
jaygen has quit [Read error: Operation timed out]
tonini has quit [Remote host closed the connection]
jaygen has joined #ruby
jimeh has joined #ruby
apok has joined #ruby
jaygen_ has joined #ruby
pyrac has joined #ruby
tonini has joined #ruby
<becom33>
http://pastebin.com/9tvck61X how can use the options to get the proper output . if bold is mentioned bold the output if color is mention color the output or both are mention do both
tonini has quit [Remote host closed the connection]
jaygen__ has joined #ruby
blacktulip has joined #ruby
nari has quit [Ping timeout: 245 seconds]
jaygen_ has quit [Read error: Operation timed out]
jaygen has quit [Read error: Operation timed out]
* becom33
anyone ?
<apeiros_>
Hanmac: heard about it, but haven't paid any attention to it yet. ruby 2.0 is still mostly unknown to me. and probably will stay that way for another month or two.
<FISH_SOUP>
is there a way to see if any argument is required?
adeponte has quit [Ping timeout: 245 seconds]
<FISH_SOUP>
txt = File.open(filename) puts txt.read() but i cant seem to find any read() in the docs that takes in 0 arguments
<apeiros_>
FISH_SOUP: the ones not in [] are required
<apeiros_>
the ones in [] are optional
<apeiros_>
and the read which takes 0 is IO#read, inherited by File as File#read (# means "instance method")
<becom33>
http://pastebin.com/9tvck61X how can use the options to get the proper output . if bold is mentioned bold the output if color is mention color the output or both are mention do both
vjacob has left #ruby ["Leaving"]
Vainoharhainen has joined #ruby
<Hanmac>
the read with 1+ argument is IO::read or File::read (means the class method)
nari has joined #ruby
<FISH_SOUP>
oh i see... :: is class where else #xxxx is instance
<FISH_SOUP>
okie got it, thanks
noxoc has joined #ruby
keymone has joined #ruby
<Hanmac>
becom33look at [:yellow,:bold].inject("data"){|d,m| send m,d}
Mon_Ouie has quit [Ping timeout: 240 seconds]
niklasb has joined #ruby
matrixise has quit [Ping timeout: 252 seconds]
m4rtijn has joined #ruby
anderse has joined #ruby
<sam113101>
what would be the best naming for ruby, XmlClass or XMLClass (just an example)
<FISH_SOUP>
there is this weird ruby syntax too. why STDIN.gets.chomp() and not STDIN.gets().chomp() ?
<apeiros_>
sam113101: IMO XML::Class
mark9 has joined #ruby
<sam113101>
why not STDIN.gets.chomp
mark9 has left #ruby [#ruby]
<apeiros_>
sam113101, FISH_SOUP, use $stdin, not STDIN
<apeiros_>
other than that - $stdin.gets.chomp as sam113101 suggests ;-)
<sam113101>
apeiros_: what about the name of the file containing the class?
<FISH_SOUP>
ah that means, if you are not throwing in any arguments, the () is unnecessary, correct?
<apeiros_>
kömpeiling ruby 1.9.3-p392…
<FISH_SOUP>
because $stdin.gets.chomp seems to work fine
<apeiros_>
no, you can throw in arguments
<apeiros_>
and you probably already used methods that way
<apeiros_>
class Foo; attr_reader :bar; end
<apeiros_>
attr_reader is a method
<apeiros_>
ruby is quite good at figuring that stuff out
<FISH_SOUP>
apeiros_: yes, that's correct, i can throw in arguments. but if i am calling it w/o arguments, the () is not compulsory yea?
* Hanmac
have defined an method_missing marco that does, Mod::XYZ *args into Mod::XYZ.new(*args)
El_loco has quit [Remote host closed the connection]
<apeiros_>
it is necessary e.g. when you want to chain with args: io.read(1024).scan(/\d/).map(&:to_i)
<Hanmac>
or if there is a local method with the same name
<apeiros_>
Hanmac: personally I prefer Mod.xyz(*args) for that. less confusing IMO.
<Hanmac>
local variable
<apeiros_>
shadowing methods with lvars is a no-no, though :)
<apeiros_>
reeks a bit
backjlack has joined #ruby
elaptic`` is now known as elaptics
* Hanmac
only shadows lvars with other lvars :D
wallcloc_ has quit [Remote host closed the connection]
<apeiros_>
:-S
miso1337_ has joined #ruby
<apeiros_>
schtill kömpeiling
<apeiros_>
frack, stupid slow machine
keymone has quit [Quit: keymone]
slainer68 has joined #ruby
quazimodo has quit [Read error: Connection reset by peer]
mneorr has joined #ruby
miso1337 has quit [Ping timeout: 255 seconds]
miso1337_ is now known as miso1337
JonsonXP has quit [Ping timeout: 272 seconds]
averiso has quit [Quit: Computer has gone to sleep.]
timonv has joined #ruby
justsee has joined #ruby
jaygen has joined #ruby
rdark has joined #ruby
drale2k has joined #ruby
<csmrfx>
apeiros_: schnell!
mneorr has quit [Ping timeout: 246 seconds]
<Hanmac>
apeiros_ is something like \';drop Table;--@google.de an valid email? :'P
jaygen__ has quit [Read error: Operation timed out]
Tricon has quit [Quit: Leaving...]
pyrac has quit [Quit: pyrac]
<apeiros_>
Hanmac: of course
Emplitz has quit [Read error: Connection reset by peer]
* Hanmac
giggles :P
timmow has joined #ruby
timmow has quit [Read error: Connection reset by peer]
sidewalker has joined #ruby
lkba has quit [Ping timeout: 252 seconds]
noop has joined #ruby
miso1337 has quit [Ping timeout: 246 seconds]
timmow has joined #ruby
pyrac has joined #ruby
sidewalker has left #ruby [#ruby]
<apeiros_>
boah, coworker just shocked me - asked me whether I changed production data yesterday. and I did! but then I realized that I did on a table I created for that purpose. hence - not my fault :D
Banistergalaxy has quit [Ping timeout: 245 seconds]
<apeiros_>
this comes close, but doesn't seem to be it
averiso has quit [Quit: Computer has gone to sleep.]
Emplitz has quit [Quit: Leaving]
<Hanmac>
yeah its EPSILON * 2 :P
Al_ has joined #ruby
mulinux has quit [Quit: mulinux]
malkomalko has joined #ruby
devilirium has joined #ruby
<becom33>
Hanmac, this is the what I have done so far http://pastebin.com/JZ4YZnwC still if I didnt mention a -b in the url it will it take :bold as nil since there is no method called nil it throws a error
averiso has joined #ruby
devdazed has quit [Ping timeout: 252 seconds]
ozgura has quit [Remote host closed the connection]
<becom33>
-b as a option *
haxrbyte has quit [Read error: Connection reset by peer]
eka has joined #ruby
<Hanmac>
becom33 use compact
haxrbyte has joined #ruby
devdazed has joined #ruby
wobblini has joined #ruby
<becom33>
Hanmac, if u mention like this puts [bb,cc].compact.inject('hello') { |sum, n| p "#{sum} | #{n}"; send n,sum }
<becom33>
works fine :)
razibog has quit [Quit: Leaving.]
haxrbyte has quit [Remote host closed the connection]
Es0teric has quit [Quit: Computer has gone to sleep.]
pyrac has quit [Quit: pyrac]
<Hanmac>
sometimes i feel like a blood donator for this helpvampires ...
swoosh has joined #ruby
<apeiros_>
you're not being coerced to donate your blood…
haxrbyte has joined #ruby
averiso has quit [Quit: Computer has gone to sleep.]
haxrbyte_ has joined #ruby
haxrbyte has quit [Read error: Connection reset by peer]
<Hanmac>
becom33 i thought about something like that ... so you not need your ugly val = option of option
ExxKA has quit [Quit: This computer has gone to sleep]
beneggett has quit [Quit: Computer has gone to sleep.]
haxrbyte has joined #ruby
pyrac has quit [Quit: pyrac]
pyrac has joined #ruby
pyrac has quit [Client Quit]
Fecn has joined #ruby
pyrac has joined #ruby
<Fecn>
Hi Folks - Is there some ready-made function to go from a string to a longint ? I've got a 21-digit string version of an Int (of which the first 18 digits happen to be 0) and the Integer() method barfs on it
ozgura has quit [Read error: Connection reset by peer]
samphippen has quit [Quit: Computer has gone to sleep.]
Mon_Ouie has quit [Ping timeout: 252 seconds]
dawkirst has quit [Read error: Connection reset by peer]
yshh has joined #ruby
objectivemo has quit [Quit: objectivemo]
aderyabin has joined #ruby
<Akuma>
hello, I'm having some problems with ruby and devkit under windows. I get an error when doing gem install rdiscount --platform=ruby
joeycarmello has joined #ruby
yashshah has quit [Read error: Connection reset by peer]
khismetix has quit [Quit: Computer has gone to sleep.]
yashshah has joined #ruby
Mattix has quit [Ping timeout: 252 seconds]
<Akuma>
here is the output: pastebin.com/g6ZuQ4V5
drale2k has quit [Ping timeout: 260 seconds]
Guest__ has joined #ruby
Guest__ is now known as Guest123
adambeynon has joined #ruby
ninjanoise has joined #ruby
yshh has quit [Remote host closed the connection]
<ninjanoise>
Anybody awake?
<csmrfx>
Akuma: whats devkit?
moos3 has joined #ruby
<Akuma>
what you need on windows to compile gems
<csmrfx>
oh, thanks
<Akuma>
availabl
<Akuma>
e at rubinstaller
<Akuma>
rubyinstaller
haxrbyte has quit [Read error: Connection reset by peer]
averiso has quit [Quit: Computer has gone to sleep.]
haxrbyte has joined #ruby
jerius has joined #ruby
apod has joined #ruby
kofno has joined #ruby
<ninjanoise>
@var is an instance variable that is passed around one instance of a class and @@var is passed between ALL instances of a class right?
* ninjanoise
= n00b
<csmrfx>
ninjanoise: what do they call @@var?
<shevy>
ninjanoise you need to find the correct word for @@
<shevy>
ninjanoise correct on @ivars
<ninjanoise>
So @@ is class and @ is instance so just making sure I was understanding it right :)
Pufferfood has quit [Remote host closed the connection]
jpcamara has joined #ruby
<shevy>
@@ are shared across all classes, yes
<Hanmac>
ninjaoise the problem is that @@var is also shared between all instances of the class ans also between all instances of all subclasses of the class (wich may not wanted)
<shevy>
@ is specific to one instance of that class
<shevy>
@@ is awful, @ is great
Pufferfood has joined #ruby
* Hanmac
will image for ruby3 some kind of @@@ , just to anoy shevy ;:D
<tobiasvl>
the thing is that @@ is class variables, but you don't really need them because you can just add a @ instance variable to the class :D
keymone has quit [Quit: keymone]
Pufferfood has quit [Read error: Connection reset by peer]
sayan has quit [Ping timeout: 252 seconds]
<tobiasvl>
because classes are just instances of Class
<maxmanders>
If I have an array of strings, each of which contains a YYYY-mm-dd date that I can extract by regex, how would I go about finding the value with the earliest date? Thinking Array.grep() and using $1 in the block but not sure how to compare $1 with the previous $1 to promote a lesser value to the desired value.
chussenot has quit [Quit: chussenot]
akam-it has quit [Remote host closed the connection]
jurassic_ has joined #ruby
<tobiasvl>
just keep the previous $1 in a variable?
<tobiasvl>
but this can probably be done simpler with map or something
<maxmanders>
Wasn't sure about scoping in blocks - still learning. I know enumerable have 'min' but that would only work if the values were Dates rather than strings with dates.
justinmcp has quit [Remote host closed the connection]
kofno has quit [Ping timeout: 272 seconds]
adambeynon has quit [Ping timeout: 272 seconds]
<maxmanders>
Hanmac: Ahh of course, and I just extract the regex as part of the block!
<Hanmac>
you can do it with regex too but why when there is an "app" for that ? :P
justsee has quit [Quit: Leaving...]
haxrbyte has quit [Read error: Connection reset by peer]
<maxmanders>
I should rtfm - DateTime.parse will parse any arbitrary string so long as it can find a valid date representation? I.e. 'Foo Bar YYYY-mm-dd blah blah' as well as just 'YYYY-mm-dd'?
breakingthings has joined #ruby
<maxmanders>
Really loving how helpful the Ruby community is to a new guy making the transition from another language!
hemanth has quit [Read error: Connection reset by peer]
NiteRain has quit [Ping timeout: 246 seconds]
hemanth has joined #ruby
<csmrfx>
We're all hoping you will eventually return the favour ;)
tk_ has joined #ruby
<maxmanders>
csmrfx: if I can help out, I will!
DaniG2k has joined #ruby
tommyvyo has quit [Quit:]
<DaniG2k>
guys im having the hardest time installing ruby on mac 10.6.8 snowloepard
<ninjanoise>
shevy / tobiasvl / csmrfx Thanks for the info sorry had to step away for a bit
<DaniG2k>
ive tried rvm but i think I need a compiler for that
m8 has joined #ruby
<DaniG2k>
I can't believe how much of a pain it is to install this
<hoelzro>
that's OS X for you =)
<DaniG2k>
can anyone give a hand plz?
<DaniG2k>
yeah really....it was easy as pie on Mint
<hoelzro>
DaniG2k: if you want to install a new Ruby, you'll probably need a compiler
chussenot has joined #ruby
pdamer has joined #ruby
<hoelzro>
I don't know of any binary distributions of Ruby for OS X
<hoelzro>
other than the system Ruby
<DaniG2k>
will an opensource one work or do I need Apple's?
<DaniG2k>
compiler I mean
<hoelzro>
honestly, I can never remember how to install a compiler on OS X
<DaniG2k>
I dont understand how Rails folks are known to use Mac when Mac makes it the hardest to install Ruby
<DaniG2k>
(updated versions of Ruby, that is)
jrajav has joined #ruby
objectivemo has joined #ruby
<hoelzro>
DaniG2k: it used to be easier
<npx>
dvm is pretty easy to use...
<npx>
rvm*
TMM has joined #ruby
<hoelzro>
in my opinion, OS X is making things more and more annoying for devs
<hoelzro>
that's why I sold my macbook last year
<ninjanoise>
agreed with that
<ninjanoise>
but... shiney!!!
<DaniG2k>
yeah I need to buy a new laptop but
<hoelzro>
I'm a dev. I don't care about shiny ;)
<DaniG2k>
I can't stand Apple sometimes
deepinskin has joined #ruby
<DaniG2k>
thinking of going with Samsung notebook
<Hanmac>
DaniG2k opensource does not work on OSX because apple does not like that
<hoelzro>
I can't stand Apple most of the time ;)
<Hanmac>
:P
<ninjanoise>
Lol, but the masses do, and apple found a way in with the iPhone so now they are trending to joe user not dev's imo
_nitti has joined #ruby
<DaniG2k>
agreed
<DaniG2k>
this is stupid
lahwran has joined #ruby
<DaniG2k>
its too hard to install ruby 2
<ninjanoise>
I think they do make nice hardware *shrug*
<TMM>
hello, I wondered if someone could help me. I'm doing some meta-programming fuckery and I'd like to set a class variable on an instance of a subclass. Is that possible? so B < A and C < A is it possible to set a class variable in "A" that's unique to B? (and one that is unique to C) would that have to be done through the (class << self; self; end).instance_eval mechanism?
<DaniG2k>
i wont do it
deepinskin has quit [Max SendQ exceeded]
<npx>
idk what you guys are talking about, it's trivial to install Xcode + the command line utils + brew + rvm and then install pretty much every open source app ever
Virunga has joined #ruby
<csmrfx>
lel
deepinskin has joined #ruby
ExxKA has joined #ruby
<hoelzro>
ninjanoise: I'm not saying they're doing a bad job, I'm saying that it's increasingly painful for devs
<csmrfx>
it is trivial if you are familiar with terms, env vars and some editor
cr3 has joined #ruby
<DaniG2k>
npx try doing the same on linux. Many of us are spoiled :)
<hoelzro>
I'm not their target market, and that's ok
* csmrfx
is spoiled, he mostly just apt-gets stuff
<breakingthings>
It's not really that hard to install ruby.
<Hanmac>
TMM: use "class instance variables"
<hoelzro>
I'd rather not have to download a huge IDE just to get my compiler
<breakingthings>
You can script it if it's that hard.
<hoelzro>
and I'd rather have a proper package manager
dkannan has quit [Ping timeout: 252 seconds]
yashshah has quit [Read error: Operation timed out]
shuky has joined #ruby
<breakingthings>
There are tons of scripts already out there, too.
<shevy>
DaniG2k hehe well on linux, one just needs... gcc... make ... autoconf ... hmm and binutils... that should be like 90% if not 95%
<hoelzro>
breakingthings: I'm glad it's easier these days. The last time I had to, it seemed a *lot* more painful
deepinskin has quit [Max SendQ exceeded]
workmad3 has joined #ruby
<shevy>
though gcc is getting on my nerves more and more, they need to stop bloating up
<breakingthings>
hoelzro: it was. but it's not nearly as hard anymore.
dustint has joined #ruby
<shevy>
I swear when C++ is in the mix, things blow out of proportion
deepinskin has joined #ruby
<hoelzro>
heh
<breakingthings>
(I kind of want to say that RVM is actually harder for newbies to comprehend but then again I haven't really used it much at all)
<shevy>
can't we just stick to C :(
<TMM>
hanmac "Did you just say class instance variables?" ghehehe, fun :)
<csmrfx>
HOW ABOUT: install VBox, install debian (or ubuntu), apt-get your stuff, if you need, add rvm
<hoelzro>
shevy: isn't clang also written in C++? ;)
<shevy>
breakingthings well the whole usage perhaps, but RVM only installs into a directory in $HOME which is pretty much how versioned directories work
<csmrfx>
you now have safe and easy to copy ruby dev env -image that runs everywhere!
deepinskin has quit [Max SendQ exceeded]
<breakingthings>
shevy: yeah, I know that installation is simple
<shevy>
hoelzro dunno... I failed to get clang to work so far :(
<breakingthings>
both RVM and rbenv were pretty dang simple to get going
realDAB has joined #ruby
<hoelzro>
hmm
deepinskin has joined #ruby
anonymuse has joined #ruby
<breakingthings>
but I dunno whether I just didn't actually use RVM enough to remember but it felt more confusing to actually utilize it
<breakingthings>
and I haven't used chruby
<hoelzro>
I still cling to GCC, but I like the way clang is organized
<breakingthings>
but it might be the easiest
<shevy>
but I am no longer someone who wants to learn everything, I'll wait for clang until to be stable and widely use
* breakingthings
shrugs
<shevy>
*widely in use
<hoelzro>
I have clang as my default compiler at work
<hoelzro>
it does 99% of what I need it to
<hoelzro>
(disclaimer: I don't do that much compiling at work)
<DaniG2k>
whats a good notebook (excluding Apple products)?
<breakingthings>
Tokaido (sp?) is also on it's way.
R_Macy has quit [Quit: Computer has gone to sleep.]
<hoelzro>
DaniG2k: I have a Thinkpad
<hoelzro>
I'm very happy with it
plantseeker has joined #ruby
deepinskin has quit [Max SendQ exceeded]
swoosh has joined #ruby
<breakingthings>
DaniG2k: you should just carry an iMac around with you tbh
araujo has quit [Remote host closed the connection]
<breakingthings>
I'd wonder if there's a way to reverse that but I'm too lazy and if I really cared about doing rb stuff at work I'd have a real ruby install.
<breakingthings>
But alas, I am a poor boy at a PHP shop.
deepinskin has quit [Max SendQ exceeded]
<breakingthings>
Weep for mine suffering.
deepinskin has joined #ruby
* ninjanoise
weeps
scrapcode_ has joined #ruby
_nitti has quit [Remote host closed the connection]
deepinskin has quit [Max SendQ exceeded]
cupakromer has joined #ruby
<csmrfx>
breakingthings: have you looked at fructose
<breakingthings>
wussat
<scrapcode_>
I can't find anything just Ruby related on how to create and use a database WITHOUT rails. I just want to setup a simple DB and format some data and save it to the DB to use in a rails project
<ninjanoise>
ok so back to my @ vs @@ question
[diecast] has joined #ruby
<breakingthings>
scrapcode_: write a raw query?
uris has quit [Ping timeout: 260 seconds]
<ninjanoise>
with @ you can pass around inside an instance of a class right?
<Hanmac>
C# and PHP combined ... my worst nightmare oO
* _br_
ducks and runs
wmoxam has joined #ruby
<breakingthings>
yeah, that's a bit scary
browndawg has joined #ruby
browndawg has quit [Max SendQ exceeded]
drale2k has quit [Ping timeout: 252 seconds]
huoxito has joined #ruby
<breakingthings>
Besides, being that I'm not the only one here it wouldn't really work to work ruby and confuse everybody
nkr has joined #ruby
kornnflake_zzz is now known as kornnflake
browndawg has joined #ruby
<Hanmac>
C# has this: "#region XYZ" ... that marks this code bock can be folded ... nothing more ... it does not makes the code faster, it does not makes it smaller, it only is for folding, and looks important like #include but is not
<breakingthings>
...lolwut
<breakingthings>
an ide hint?
<hoelzro>
I think that's from before you could have partial classes
<Hanmac>
yeah, because C# IDEs seems to be dump
<breakingthings>
wow
<breakingthings>
that's...
<breakingthings>
I don't know that I can accurately express my emotions in this.
<Hanmac>
it would be cool if it can act like a namespace but it can not its only for folding
<breakingthings>
Hanmac: yep, that's the best thing I've ever seen. yep.
<breakingthings>
Yep.
banisterfiend has quit [Read error: Connection reset by peer]
<breakingthings>
Yeeep.
ArchBeOS is now known as ArchOS3Warp
ananthakumaran1 has quit [Quit: Leaving.]
vlad_starkov has joined #ruby
banisterfiend has joined #ruby
grohne has joined #ruby
jrajav has quit [Quit: phunq, sandwich store loop, WHAT NO UNIVERSE]
robbyoconnor has joined #ruby
ArchOS3Warp is now known as ArchBeOS
<grohne>
hi. can you tell me how to use a setter method (foo=) from within a class?
frem has joined #ruby
khismetix has quit [Quit: Computer has gone to sleep.]
Uranio has joined #ruby
<hoelzro>
grohne: self.foo = value
<grohne>
hoelzro: is self automatically declared?
<hoelzro>
yeah
<grohne>
thanks
jurassic_ has quit [Quit: jurassic_]
aaronmcadam has quit [Quit: Leaving...]
hashmal has quit [Ping timeout: 245 seconds]
yshh has joined #ruby
<Hanmac>
hoelzro do you know the "strip" programm? it implodes my compiled gem :P
deepinskin has joined #ruby
timmow has joined #ruby
<hoelzro>
I know of it
jurassic_ has joined #ruby
robbyoconnor has quit [Remote host closed the connection]
aaronmcadam has joined #ruby
tommyvyo has joined #ruby
robbyoconnor has joined #ruby
dr_bob1 has quit [Ping timeout: 245 seconds]
<Hanmac>
it reduces the *.so file into 2% of the orginal size :D
theRoUS has joined #ruby
wallclockbuilder has joined #ruby
kpshek has joined #ruby
<hoelzro>
nice
kpshek has quit [Client Quit]
philcrissman has quit [Remote host closed the connection]
kpshek has joined #ruby
erratic has quit [Ping timeout: 264 seconds]
R_Macy has joined #ruby
<Hanmac>
hoelzro: while the comile of the gem this happens: 300kb (*.cpp,*.hpp,*.rb) => 200MB (*.o) => 50MB (*.so) ... i dont know if bigger gems exist but i think my is not so small :P
_nitti has joined #ruby
<hoelzro>
Hanmac: which gem is this?
drumsrgr8forn8 has joined #ruby
drumsrgr8forn8 has quit [Client Quit]
kpshek has quit [Client Quit]
sambao21 has quit [Quit: Computer has gone to sleep.]
sambao21 has quit [Quit: Computer has gone to sleep.]
quazimodo has joined #ruby
IrishGringo has quit [Remote host closed the connection]
haxrbyte has joined #ruby
w400z has joined #ruby
skattyadz has quit [Quit: skattyadz]
ananthakumaran has joined #ruby
adkron__ has joined #ruby
tjbiddle has joined #ruby
NiteRain has joined #ruby
SCommette has joined #ruby
ffranz has joined #ruby
joshman_ has joined #ruby
Fecn has left #ruby [#ruby]
tk_ has quit [Quit: ばいばい]
mikepack has quit [Remote host closed the connection]
aed has quit []
samphippen has joined #ruby
haxrbyte has quit [Remote host closed the connection]
haxrbyte has joined #ruby
<TMM>
hanmac: I understand it now, and I got it working, thank you!
xbob has quit [Ping timeout: 256 seconds]
<Hanmac>
ninjaoise: "whereis rails" might not the right question ... an better one would be "whyis rails" ... :P
cburyta has joined #ruby
banisterfiend has quit [Remote host closed the connection]
<TMM>
Hanmac: is it possible to do something similar with arrays? like, create a method like symbol[]= or something?
<Hanmac>
TMM do you mean for instances or classes?
<TMM>
I guess that question was very contextless
<TMM>
sorry
<Hanmac>
you can define class methods (singleton methods on class) so Klass[symbol]=Instance would be possible ... or that the instance automatic register into the class while init
<TMM>
http://codepad.org/Nfywt2M2 <-- I have that bit of code in my class, that lets me do stuff like "self.define_attr("blah")" and then later do A.blah = "blah"
<TMM>
I'd like something similar but that forces array semantics
<TMM>
but I think I'm looking at this entirely from the wrong angle
yshh has quit [Read error: Connection reset by peer]
yashshah has quit [Read error: Connection reset by peer]
yashshah has joined #ruby
hbpoison has quit [Ping timeout: 256 seconds]
chrishough has joined #ruby
jurassic_ has joined #ruby
jlast has joined #ruby
kornnflake_zzz is now known as kornnflake
robbyoconnor has joined #ruby
BaxZzZz has joined #ruby
monkegjinni has quit [Remote host closed the connection]
averiso has quit [Quit: Computer has gone to sleep.]
<TMM>
hanmac: does that make sense? or am I being very difficult? :)
geggam_wk has joined #ruby
BaxZzZz has left #ruby [#ruby]
<Hanmac>
you can do Klass[symbol] but Klass.attr[symbol] is not one methd
<TMM>
oh
<TMM>
so attr[]= doesn't exist as a method?
tspike has joined #ruby
whitedawg1 has joined #ruby
baroquebobcat has quit [Quit: baroquebobcat]
bluOxigen has joined #ruby
sayan has joined #ruby
<TMM>
what I want isn't really possible then? :)
pepper_chico has quit [Quit: Computer has gone to sleep.]
atno has joined #ruby
dhruvasagar has joined #ruby
jrajav has joined #ruby
jurassic_ has quit [Quit: jurassic_]
endzyme has joined #ruby
eAlchemist has joined #ruby
yshh has joined #ruby
kpshek has quit []
whitedawg has quit [Read error: Operation timed out]
<TMM>
Hanmac: I could simply not have a public attr= method, and only create attr, creating the array in the initialize() of the instance. That way someone can't do attr = "not an array"
<TMM>
hanmac: does that make sense?
puppeh has joined #ruby
skattyadz has joined #ruby
codecop has quit [Remote host closed the connection]
puppeh has quit [Remote host closed the connection]
workmad3 has quit [Ping timeout: 255 seconds]
puppeh has joined #ruby
tspike has quit [Client Quit]
jurassic_ has joined #ruby
alex__c2022 has joined #ruby
kpshek has joined #ruby
puppeh has quit [Read error: Operation timed out]
splud has joined #ruby
kpshek has quit [Client Quit]
Ohga has joined #ruby
apod has quit []
a_a_g has joined #ruby
dhruvasagar has quit [Ping timeout: 256 seconds]
kpshek has joined #ruby
dhruvasagar has joined #ruby
jrajav has quit [Quit: I tend to be neutral about apples]
LiquidInsect has joined #ruby
mikepack has joined #ruby
interactionjaxsn has quit [Remote host closed the connection]
girija has joined #ruby
BizarreCake has joined #ruby
pyrac has quit [Quit: pyrac]
soc42 has quit [Remote host closed the connection]
FuzaiDesktop has quit [Ping timeout: 245 seconds]
jerius has quit []
swoosh has quit [Ping timeout: 272 seconds]
wallerdev has joined #ruby
wallcloc_ has joined #ruby
sambio has joined #ruby
angle has joined #ruby
jasond has left #ruby ["Killed buffer"]
arturaz has quit [Ping timeout: 250 seconds]
freezey has joined #ruby
d2dchat has joined #ruby
wallclockbuilder has quit [Ping timeout: 272 seconds]
eAlchemist has quit [Remote host closed the connection]
eAlchemist has joined #ruby
chrishunt has joined #ruby
<TMM>
is there a way to force the execution of the initialize() method of a superclass?
<TMM>
on class creation
robbyoconnor has quit [Ping timeout: 245 seconds]
hashmal has joined #ruby
pavilionXP has joined #ruby
<Hanmac>
TMM "super"
<Banistergalaxy>
Huh?
jurassic_ has quit [Quit: jurassic_]
Nisstyre-laptop has joined #ruby
hbpoison has joined #ruby
<TMM>
yeah, in the constructor of the child class, but is there a way to always run it regardless of whether or not the child class has 'super' in it's initializer?
kornnflake is now known as kornnflake_zzz
blaxter has quit [Ping timeout: 246 seconds]
pepper_chico has joined #ruby
pepper_chico has quit [Max SendQ exceeded]
<Fenne>
TMM: u mean parent class?
<Fenne>
and took 'super' from Java?
<TMM>
that is possible... :)
dr_bob1 has joined #ruby
pepper_chico has joined #ruby
<tobiasvl>
TMM: exactly what do you want to achieve?
<Banistergalaxy>
Tmm you need to edit Yourclass .new
dr_bob3 has joined #ruby
<TMM>
so, A < B, A has an initialize() but I want to force the running of B's initialize() when someone creates a new instance of the class
bean__ has joined #ruby
<TMM>
I setup up some stuff in B that makes A's state entirely useless if it forgets to run the parent's initializer
Morkel has joined #ruby
<tobiasvl>
TMM: and calling super in A.initialize() isn't enough because ... ?
markalanevans has joined #ruby
<TMM>
because someone may forget? I just find unappealing since it HAS to be done, it's just a bug waiting to happen
<tobiasvl>
who's "someone"?
<sailias>
TMM: it doesn't forget, you need to add super like tobiasvl is saying
<TMM>
a user of the module I guess
<Hanmac>
i think you cant "force" it ... and if you could it woundt be nice ...+
<tobiasvl>
TMM: but if you've added a super call to the initialize method, how can a user who calls the initialize method forget to use it the way it's defined?
<tobiasvl>
i don't understand the scenario here
eAlchemist has quit [Ping timeout: 264 seconds]
dr_bob2 has quit [Ping timeout: 272 seconds]
<sailias>
just backread
nateberkopec has joined #ruby
timmow has joined #ruby
carloslopes has joined #ruby
neku has joined #ruby
<TMM>
tobiasvl, a user of the module writes a class that inherits from "B" and forgets to call 'super' in the initialize() of their own class, and then later complains at me for writing a buggy module :P
rippa has joined #ruby
haxrbyte has quit [Ping timeout: 260 seconds]
dr_bob1 has quit [Ping timeout: 248 seconds]
<sailias>
TMM: including super IS the way to do this, there is no other question regarding it. There is a reason for that so child classes can still have their own initialize method.
baroquebobcat has joined #ruby
<Banistergalaxy>
Tmm then don't use initialize, provide another setup hook method
FuzaiDesktop has joined #ruby
<Banistergalaxy>
And in initiaze call super and also your hook method
Vektur has joined #ruby
<Banistergalaxy>
Force clients to use the hook method
<Banistergalaxy>
This is the standard way to do it
<TMM>
I'll just document that you need to call 'super' in the intializer for now then, I think I like changing class semantics for my classes even less
Flex has joined #ruby
<Banistergalaxy>
Better that then breaking rubyist expectations by fiddling with behavior of built in methods
angle has quit [Quit: Leaving]
angle has joined #ruby
<TMM>
actually, I could just make the creation of these values 'lazy' and then this whole thing won't be an issue at all
jerius has joined #ruby
zigomir has quit [Quit: zigomir]
angle has quit [Read error: Connection reset by peer]
apeiros_ has quit [Remote host closed the connection]
pyrac has joined #ruby
m4rtijn has quit [Remote host closed the connection]
r4stakWhere has joined #ruby
<TMM>
yeah, that worked :) thanks for the help
<TMM>
this is much nicer
Mattix has joined #ruby
V8Energy has joined #ruby
<sailias>
life is good
blaxter has joined #ruby
rickmasta has joined #ruby
tjbiddle has quit [Quit: tjbiddle]
<TMM>
yes, yes it is :)
braoru has quit [Quit: Leaving]
kristofers has joined #ruby
<TMM>
it now just initializes the variables when they are first requested, no need to run an initializer
<TMM>
there's no good reason to do RAII like stuff in ruby I guess :)
jpcamara_ has joined #ruby
<TMM>
I've written a lot more C++ than Ruby or other dynamic languages :)
<X-Jester>
hey, does anyone have any ideas on requesting a method to be run on a particular thread? for example, if i call 'foo.sayhello' from another thread, can i in ruby ask sayhello() to execute on Thread.main?
jpcamara has quit [Ping timeout: 272 seconds]
atno has quit [Remote host closed the connection]
idkazuma has quit [Remote host closed the connection]
adambeynon has quit [Quit: Leaving]
andikr has quit [Remote host closed the connection]
dhruvasagar has quit [Remote host closed the connection]
rupee has joined #ruby
<Caelum>
JonnieCache: it should really just detect cgi env vars automatically though
pyrac has quit [Quit: pyrac]
jgrevich has joined #ruby
DrShoggoth has quit [Ping timeout: 245 seconds]
Hanmac has joined #ruby
banjara has joined #ruby
jerius has quit []
mpfundstein has quit [Remote host closed the connection]
apok has joined #ruby
filipe has quit [Remote host closed the connection]
mahmoudimus has joined #ruby
failshell has joined #ruby
sepp2k1 has joined #ruby
<Uranio>
Caelum: that is a very good question, you aks it in #sinatra?
jrajav has joined #ruby
sepp2k has quit [Ping timeout: 245 seconds]
teddyp1cker has joined #ruby
vlad_starkov has quit [Remote host closed the connection]
nwertman_ has joined #ruby
twoism has joined #ruby
whitedawg1 has quit [Quit: Leaving.]
musicmatze has joined #ruby
<musicmatze>
Am I allowed to ask questions related to ruby2.0 here?
nga4 has joined #ruby
nwertman has quit [Ping timeout: 252 seconds]
<JonnieCache>
indeed you are
atyz has joined #ruby
squidBits has joined #ruby
atyz has quit [Client Quit]
<musicmatze>
Simple question: There are these new methods Array#bsearch and Range#bsearch. But _why_? I thought ruby was designed to keep work for programmers as easy as possible, so why do _i_ as programmer have to care about how my data is fetched from the array?
atyz has joined #ruby
cburyta has quit [Remote host closed the connection]
<musicmatze>
I think the Ruby Interpreter should do this for me as fast as possible automatically when I call #search or #find or so on an array!
jimeh has quit [Ping timeout: 245 seconds]
cburyta has joined #ruby
jimeh has joined #ruby
apok has quit [Read error: Connection reset by peer]
wunz_ is now known as wunz
d2dchat has quit [Remote host closed the connection]
jphpsf has quit [Ping timeout: 245 seconds]
aderyabin has joined #ruby
cburyta has quit [Read error: No route to host]
Neandre has quit [Ping timeout: 255 seconds]
<Bira>
musicmatze: It's not that simple. Binary search only works if you have an array of objects that can both be compared to each other and are already sorted.
<Bira>
Neither of those things are necessarily true for any given array - the developer is the only one who can guarantee it.
motto has joined #ruby
apok has joined #ruby
<musicmatze>
Bira: So the interpreter could do some checks, sort the array (and cache it in background for me) and then do the bsearch. And if there are different kind of objects, there must be an exception raised.
jrajav has quit [Quit: phunq, sandwich store loop, WHAT NO UNIVERSE]
niklasb has quit [Ping timeout: 245 seconds]
kornnflake is now known as kornnflake_zzz
<banisterfiend>
musicmatze: yeah how about the computer just guess what program you want to write and just write the whoel thing for u
arturaz has joined #ruby
<banisterfiend>
then u could just sit around watching reruns of macgyver and drinking cocacola
<musicmatze>
That is what would be the logical conclusion for me for _ruby_. I always read, ruby was designed to keep programmers effort small. Now I have to do ary.sort.bsearch instead of array.find or so.
vjacob has left #ruby ["Leaving"]
sayan has quit [Read error: Connection reset by peer]
m8 has quit [Ping timeout: 272 seconds]
<musicmatze>
I do not criticize that at all, I just asked because I think it could be solved with much less resulting ruby code for me as ruby programmer.
mrsolo has joined #ruby
mrsolo has quit [Remote host closed the connection]
<banisterfiend>
musicmatze: i would find that behavior *intrusive* rather than helpful
markalanevans has quit [Quit: markalanevans]
Flex has quit [Ping timeout: 245 seconds]
mrsolo has joined #ruby
nomenkun has quit [Remote host closed the connection]
atyz has quit [Ping timeout: 260 seconds]
<musicmatze>
banisterfiend: Okay, maybe it's kind of personal taste.
jphpsf has joined #ruby
jamesfung14 has quit [Ping timeout: 255 seconds]
ozgura has quit [Remote host closed the connection]
<banisterfiend>
musicmatze: 1. how would it know the array was presorted? 2. how does it know what criteria to use when sorting?
<banisterfiend>
musicmatze: it has no way of doing, you can sort on different features using sort_by
<musicmatze>
basitserfiend: Oh, your right.
monkegjinni has quit [Remote host closed the connection]
<musicmatze>
I didn't think about this. You're completely right!
adr has quit [Ping timeout: 255 seconds]
jonathanwallace has quit [Quit: WeeChat 0.3.9.2]
riffraff1691 has joined #ruby
jonathanwallace has joined #ruby
<riffraff1691>
i have a ruby problem, i will make a pastie for the code and the error
dmerrick_ has joined #ruby
philcrissman has quit [Remote host closed the connection]
dmerrick has quit [Read error: Operation timed out]
<Ohga>
riffraff1691: I'm sure that should start with "@cache[:users] =", right?
Stilo has joined #ruby
rismoney has joined #ruby
tspike has quit [Quit: leaving]
LiquidIn1ect has joined #ruby
LiquidIn1ect has quit [Client Quit]
dhruvasagar has joined #ruby
motto has quit [Quit: Sto andando via]
<riffraff1691>
ah i reset my information
pdamer has quit [Quit: pdamer]
<riffraff1691>
it should be @cache[:users]=....
<riffraff1691>
thanks for catching my error, i needed another set of eyes on it
RubyHunter has quit [Quit: Verlassend]
m8 has joined #ruby
bonhoeffer has quit [Quit: bonhoeffer]
mikepack has quit [Remote host closed the connection]
atyz has joined #ruby
jamesfung14 has joined #ruby
aderyabin has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<marwinism>
I am putting database rows in @variables. This works flawlessly in Eclipse when I run the project there, but I try to launch the same code on a webserver with sinatra, and then it says it can't convert nil to string. JSON handles numbers straight forward?
yshh has quit [Remote host closed the connection]
allaire has joined #ruby
neurone-1337 has quit [Ping timeout: 240 seconds]
mikepack has joined #ruby
riffraff1691 is now known as riffraff169
interactionjaxsn has joined #ruby
<Bira>
marwinism: That message means that an object your code expected not to be nil is nil.
jphpsf has quit [Ping timeout: 245 seconds]
<Bira>
Probably something on which you're calling to_s
<Bira>
Maybe you're not getting any database rows back?
<marwinism>
It works in eclipse, so I get the rows back, but the to_s I have somewehere, might be a debugging i forgot to comment out somewhere! I'll just have to go over the code some more. Thanks!
shevy has quit [Quit: ""]
alvaro_o has joined #ruby
d2dchat has joined #ruby
rickmasta has quit [Quit: Leaving...]
akhet has quit [Remote host closed the connection]
ninjanoise has left #ruby [""*poof*""]
jphpsf has joined #ruby
xardas has joined #ruby
zedr has quit [Quit: Lost terminal]
aaronmcadam has quit [Read error: Operation timed out]
havenn_ has quit [Remote host closed the connection]
kornnflake_zzz is now known as kornnflake
fizman has joined #ruby
Astralum has quit [Ping timeout: 246 seconds]
<Hanmac>
ofcan i think you are in the wrong channel
bean__ has joined #ruby
noop has quit [Ping timeout: 255 seconds]
etcetera has joined #ruby
drale2k has quit [Ping timeout: 250 seconds]
<fizman>
is there a specific time when you can return from from .each?
dr_bob3 has left #ruby [#ruby]
imami|afk is now known as banseljaj
doja has joined #ruby
lewix has joined #ruby
lewix has quit [Changing host]
lewix has joined #ruby
<wormwood>
is there anyway to serialize a compiled program and have it run within ruby?
ozgura has joined #ruby
<realDAB>
fizman: i'm not sure what you mean
<ofcan>
Hanmac: how?
<eimajenthat>
I'm writing a little Ruby script, and using the RubyMoney module. When I use a money object in a string (I think it's getting converted to string implicitly?), the decimal is handled correctly (2 decimal places, even w/ zeros), but I am not seeing the currency symbol added as I expect. I'm pretty new to Ruby (using this as a chance to learn a bit more). Wondered if anyone could point my in right direction.
<Hanmac>
ofcan ... so are you using rails or not?
adkron has quit [Ping timeout: 260 seconds]
<eimajenthat>
Will paste a link to my code, one sec
adkron_ has quit [Ping timeout: 252 seconds]
<ofcan>
Hanmac: nope
<Hanmac>
fizman i think you want break
mockra has quit [Remote host closed the connection]
timonv has joined #ruby
<Hanmac>
wormwood: some ruby interpreters like jruby or rubinius can generate "bytecode" ... but not all of them, and this code is maybe platform depend
kojul has joined #ruby
eAlchemist has joined #ruby
<marwinism>
wow.. my "Can't convert nil to String" was me trying to return the wrong variable. FML..
<wormwood>
Hanmac: right @ the platform dependant. That would be ok in my case. But yeah, the idea is storing a programing (serialized") and being
<wormwood>
able to run that someone at a later point
adkron_ has joined #ruby
mafolz has quit [Ping timeout: 260 seconds]
<wormwood>
storing a program* rather
Vainoharhainen has quit [Quit: Leaving...]
<wormwood>
sometime*
forrest has joined #ruby
<fizman>
break also works but i guess it doesnt throw an error when it has to yield something
<Hanmac>
wormwood: if you only want to store data, you could use Marshal ... for storing an entire programm you need jruby or rubinius ... but beware, some rubygems does not work with jruby
niklasb has joined #ruby
kofno has quit [Remote host closed the connection]
realDAB has quit [Quit: realDAB]
<wormwood>
Hanmac: darn, np. thanks and sorry for the mal-formed questions I've been asking :X
<havenn>
wormwood: Do you want to serialize objects and store them to file or db?
<cr3>
is there an existing data structure or example that can be used like a hash table but prints a list of command line options: --foo=bar etc.
<wormwood>
havenn: an entire program ( small )
<wormwood>
a asm / c program
<havenn>
wormwood: So you want to save a text file to disk? I'm confused?!
Ontolog has joined #ruby
itsdavem has joined #ruby
Al_ has quit [Quit: Al_]
itsdavem has quit [Remote host closed the connection]
<havenn>
wormwood: Ohhh, kk, i'm slow - no coffee yet.
<wormwood>
havenn: lets say I have a asm program that prints 'Hello World'. I want to embed that some how in a ruby datastructure and be able to call it at a later time
tenmilestereo has joined #ruby
breakingthings has joined #ruby
<wormwood>
havenn: np, I'm in the same position :), haven't slept in a while. Very interesting how it affects my engrish skills
failshell has quit [Remote host closed the connection]
becom33 has joined #ruby
<e-dard>
Hi, capistrano is asking for my SSH key passphrase. Why can't it use Keychain/ssh-agent like everything else on my system? (OSX 10.8)
<aedorn>
I like my explicit returns =(
<becom33>
is there a way of keeping a config file for thor application . where I can use it in any task ? without having to require the config class into every task
<e-dard>
This is when I execute cap that is
mmitchell has joined #ruby
girija has quit [Ping timeout: 264 seconds]
<interactionjaxsn>
aedorn: with great power comes great responsibility... oh wait, wrong channel
daze has joined #ruby
Uranio has quit [Quit: while you reading this, a kitty dies]
brianpWins has joined #ruby
akashj87 has joined #ruby
icole has joined #ruby
<daze>
can I use bundler to install all the gems in a directory of my choice? I don't want to clutter my system with pacman unmanaged files and would prefer to have gems inside my webapps dir, if possible. Currently, bundle install asks for password and installs the gems into the system. I'm new to this :/
adkron_ has quit [Read error: Connection reset by peer]
adkron_ has joined #ruby
adkron___ has joined #ruby
fermion has quit [Ping timeout: 250 seconds]
<interactionjaxsn>
aedorn: as do i. return 'all the things' unless foo
ffranz has quit [Read error: Connection reset by peer]
axhlf has quit [Remote host closed the connection]
<interactionjaxsn>
daze: if you use rvm you can create gemsets that manage your dependancies on a per app basis
<aedorn>
daze: --path /path/
rboyd has quit [Read error: Connection reset by peer]
mark_locklear has quit [Quit: Leaving]
<aedorn>
also bundle --deployment will install to the app directory, but probably not a good idea for development
rboyd has joined #ruby
SolidResolve has joined #ruby
SolidResolve has quit [Max SendQ exceeded]
adkron has quit [Ping timeout: 240 seconds]
SolidResolve has joined #ruby
SolidResolve has quit [Max SendQ exceeded]
ffranz has joined #ruby
SolidResolve has joined #ruby
SolidResolve has quit [Max SendQ exceeded]
Stilo has joined #ruby
<daze>
ok, the --path argument seems to work. Thanks ;) Can you elaborate on the rvm, though? Is it better than bundler?
_nitti has quit [Remote host closed the connection]
ferdev has quit [Quit: ferdev]
SolidResolve has joined #ruby
SolidResolve has quit [Max SendQ exceeded]
stkowski has joined #ruby
jphpsf has quit [Ping timeout: 264 seconds]
<Hanmac>
daze both are used for differnt purposes
<interactionjaxsn>
daze: it's not a matter of better
SolidResolve has joined #ruby
SolidResolve has quit [Max SendQ exceeded]
<daze>
I'm using ruby for sass/compass/guard/livereload, so development only. Which should I use? :)
<aedorn>
Use RVM or chruby if you want to separate your Ruby installs from system packages, or if you need to switch Ruby versions often. If you only care about gems, then you probably don't necessarily need those, but self experience matters here. (IOW - whatever you like best)
<daze>
hmm.. so rvm and chruby+chgems does the same, right?
<aedorn>
hmmm.. maybe I should take this time to reload this system.
akashj87 has quit [Quit: leaving]
<Hanmac>
daze can a bit more with gemsets
<havenn>
daze: Yeah, just different take on how to do it. RVM does a lot more, but is monolithic. While chruby and chgems just attempt to do one thing each, and do it well.
<daze>
yeah, but if I'm not using named gemsets (using rvm with 'default'), it's essentially chruby+chgems
duosrx has quit [Remote host closed the connection]
cburyta has quit [Remote host closed the connection]
pyrac has quit [Quit: pyrac]
jphpsf has joined #ruby
mockra has quit [Ping timeout: 240 seconds]
cburyta has joined #ruby
poikon_work has quit [Remote host closed the connection]
carloslopes has quit [Remote host closed the connection]
_nitti has joined #ruby
Takehiro has quit [Remote host closed the connection]
akashj87 has joined #ruby
<becom33>
how can I use a config file in a thor application if I have multiple task and subtask and If I want to use the config file detail in any of the task . for a example "colorizing enabled" . how can I use it in other task . . I have multiple files . I was wondering if there is a way without having to include or require the config file in to each and every ruby file where config is needed
tay1 has joined #ruby
caveat- has joined #ruby
quazimodo has quit [Ping timeout: 260 seconds]
tay11 has joined #ruby
pyrac has joined #ruby
maxmanders has quit [Quit: Computer has gone to sleep.]
yashshah has quit [Read error: Connection reset by peer]
cburyta has quit [Ping timeout: 264 seconds]
lewix has joined #ruby
lewix has quit [Changing host]
lewix has joined #ruby
helvete has joined #ruby
skattyadz has joined #ruby
helvete has quit [Client Quit]
alex__c2022 has quit [Read error: Connection reset by peer]
yashshah has joined #ruby
pellis_ has joined #ruby
<pellis_>
hello
alex__c2022 has joined #ruby
<interactionjaxsn>
pellis_: howdy
<pellis_>
anyone actually seeing speed improvements with Ruby 2.0?
jekotia has joined #ruby
<havenn>
pellis_: yes :)
<pellis_>
havenn, is this on a typical web workload?
tay1 has quit [Ping timeout: 252 seconds]
<havenn>
pellis_: substantially improved load times for larger apps, some float calculations are much faster, forking web server memory use is lower
<pellis_>
I've noticed a nice startup time, but as for request/sec - actually degraded
<havenn>
pellis_: What web server are you using?
<pellis_>
unicorn, and nginx
<pellis_>
i'm attributing this to the strings now all being utf8
jgrevich has quit [Remote host closed the connection]
<pellis_>
which is what I read somewhere
<havenn>
pellis_: With CoW friendly GC you should see less memory usage. And app startup speed. Those are two biggest wins I think for that scenario.
<Hanmac>
pellis_ & havenn in ruby2.1 float are more funny because they got fixed ids :P
sandstrom has joined #ruby
<havenn>
Hanmac: :O
maxmanders has joined #ruby
<sandstrom>
Using rbenv on a fresh OS X machine. Getting this error when I run `bundle install`: "Gem::InstallError: ZenTest requires RubyGems version ~> 1.8. Try 'gem update --system' to update RubyGems itself."
sonda has quit [Remote host closed the connection]
<havenn>
sandstrom: What happens if you run?: gem update --system
<Paradox>
also
<sandstrom>
havenn: `gem --version` returns 2.0.3
<Paradox>
thats your problem
allan_hills has quit [Quit: allan_hills]
<Paradox>
tell the gem maintainer to fix their dependencies
<Paradox>
or fork it and do it yourself
<sandstrom>
is that for me or someone else
<Paradox>
ypu
<Paradox>
you
<becom33>
how can I use a config file in a thor application if I have multiple task and subtask and If I want to use the config file detail in any of the task . for a example "colorizing enabled" . how can I use it in other task . . I have multiple files . I was wondering if there is a way without having to include or require the config file in to each and every ruby file where config is needed
<Paradox>
wat
aderyabin has joined #ruby
codecop has joined #ruby
<bean__>
whuttt
<havenn>
sandstrom: You can even just install ZenTest and go edit its zentest.gemspec file if you want. But like Paradox said, fork it or ask em to fix.
yshh has joined #ruby
<Paradox>
(protip, fork it, fix it, and pull request would get it fixed faster)
<Paradox>
what am i a daft punk song
<Paradox>
fork it fix it gem it push it pull request it
Criztian has quit [Remote host closed the connection]
<becom33>
how can I use a config file in a thor application if I have multiple task and subtask and If I want to use the config file detail in any of the task . for a example "colorizing enabled" . how can I use it in other task . . I have multiple files . I was wondering if there is a way without having to include or require the config file in to each and every ruby file where config is needed
cburyta has joined #ruby
<Paradox>
aedorn, oreilley books are good at that
thone has quit [Ping timeout: 260 seconds]
tjbiddle has quit [Read error: Connection reset by peer]
_br_ has quit [Excess Flood]
<tay11>
this isa dumb question but how do i output something like 1-50?
<Ohga>
havenwood: yeah, that's the high level parsing.. would like something about token and event parsing though..
tjbiddle has joined #ruby
<aedorn>
Yeah, one of the MySQL books is O'Reilly. Hmm
<havenwood>
Ohga: Not easy to find. Maybe we need to write one.
_br_ has joined #ruby
<Ohga>
tay11: "puts '1-50'" ?
<tay11>
i am still having trouble understanding certain things in ruby
<Paradox>
aedorn, my path to ruby is dotted with oreilley books
Takehiro has joined #ruby
<Paradox>
tay11, i recommend picking up a copy of the pickaxe book
<Ohga>
havenwood: hm.. like.. right now?
<Paradox>
if you want shelf-fillers, oreilley is the best way to go
<Paradox>
if you want books you'll read
<Ohga>
havenwood: could do if you have the time?
cmarques has quit [Ping timeout: 264 seconds]
<Paradox>
pragmatic press
nfk has quit [Quit: yawn]
<aedorn>
I have a lot of Pragmatic books, too
<havenwood>
tay11: What do you mean by 1-50? The string '1-50'? Or the strings '1' up to '50' separated by whitespace?
<tay11>
yeah 1,2,3,4,5,6.. etc
jpcamara has joined #ruby
<havenwood>
tay11: So a string from 1 up to 50 separated by commas with no whitespace?
<Paradox>
1..50.each { |x| print "x " }
<Paradox>
oh
<Paradox>
1..50.each { |x| print "x," }
<Paradox>
there you go
<Paradox>
that will do it
<tay11>
white space, no whitespace doesnt matter
<tay11>
ok
<interactionjaxsn>
[*1..50].join(' ')
<Paradox>
>1..50.each { |x| print "x," }
<Ohga>
Paradox: you have to handle one less comma at the end..
cburyta has quit [Ping timeout: 264 seconds]
kofno has joined #ruby
<Paradox>
ah yeah
<Paradox>
just do a join then
<Hanmac>
:P (1..50).each &:display
<Paradox>
as interactionjaxsn said
<pellis_>
anyone experiencing macvim to be slower than vvim?
<tay11>
basically im trying to build a simple calendar
cmarques has joined #ruby
<aedorn>
1.upto(50) {|x| print "#{x} "}
<tay11>
ok
madb055 has quit [Ping timeout: 245 seconds]
<havenwood>
Ohga: Does sound interesting to explore Psych and do a writeup, but I'm hungry! Maybe on weekend put something together?
<Paradox>
if you wanna skip steps it gets a lot more complicated
_emptymag00 has joined #ruby
lewix has quit [Ping timeout: 252 seconds]
<_emptymag00>
which ruby 1.9 version is closet to 1.8.7
<_emptymag00>
I need to upgrade to 1.9 but I need this to be pretty seemless
<ninjanoise>
Hanmac so the rational library has a lcm method in it and it's using that right?
<aedorn>
They are all equally different to 1.8.x
<_emptymag00>
seamless*
<ninjanoise>
Hanmac, skipping back to my question a while ago
<banisterfiend>
_emptymag00: go straight to 2.0
<_emptymag00>
right but do they support backwards compatibility?
<_emptymag00>
banisterfriend: not a chance
<banisterfiend>
then 1.9.3 :)
tylersmith has quit [Read error: Connection reset by peer]
workmad3 has joined #ruby
<_emptymag00>
I mean this is a legacy project that has a lot of dependencies
mneorr has quit [Remote host closed the connection]
<Hanmac>
ninjaoise hm no lcm comes from integer
tylersmith has joined #ruby
mneorr has joined #ruby
woolite64_ has quit [Ping timeout: 252 seconds]
<Paradox>
1.9 should have been 2.0
marr has quit []
<Paradox>
i know it was done for 20th anniversary things
<Paradox>
but really
woolite64_ has joined #ruby
<Paradox>
1.9 broke a ton of apis
<Paradox>
2.0 didnt
<Paradox>
hell, im bad about following semver too
<Paradox>
but really
jphpsf has quit [Ping timeout: 260 seconds]
_br_ has quit [Excess Flood]
<aedorn>
_emptymag00: What you are looking for - a seamless upgrade - you probably won't get. As Paradox mentioned, 1.9.x broke quite a bit that people used to use in 1.8.x.
<ninjanoise>
hanmac, ah, the example I saw had require 'rational'
<ninjanoise>
*shrug*
<Hanmac>
ninjanoise ... hm on newer ruby rational is allready required
mneorr_ has joined #ruby
<ninjanoise>
hanmac AHH!!! that's probably it!
<ninjanoise>
;)
kornnflake_zzz is now known as kornnflake
<Hanmac>
ninjanoise it may be defined IN rational, but its defined AT integer
mneorr has quit [Read error: Connection reset by peer]
_br_ has joined #ruby
shevy2 has joined #ruby
shevy2 is now known as shevy
Nisstyre-laptop has joined #ruby
<_emptymag00>
aedorn: yeah I know I've done several upgrades its just been awhile and couldn't remember if there was some inbetween version like rails has for 2 - 3
<_emptymag00>
either way we just found a work around for what we were doing
yshh has joined #ruby
xnm has joined #ruby
eldariof has quit []
rickmasta has joined #ruby
jphpsf has joined #ruby
<_emptymag00>
thanks anyways guys
<becom33>
how can I use a config file in a thor application if I have multiple task and subtask and If I want to use the config file detail in any of the task . for a example "colorizing enabled" . how can I use it in other task . . I have multiple files . I was wondering if there is a way without having to include or require the config file in to each and every ruby file where config is needed
bonhoeffer has joined #ruby
headius has joined #ruby
_br_ has quit [Excess Flood]
fermion has joined #ruby
mockra has joined #ruby
banjara has quit [Quit: Leaving.]
slainer68 has joined #ruby
banjara has joined #ruby
ofcan has quit [Read error: Connection reset by peer]
AJC_Z0 has joined #ruby
banjara has quit [Client Quit]
banjara has joined #ruby
_br_ has joined #ruby
banjara has quit [Client Quit]
banjara has joined #ruby
ananthakumaran has quit [Quit: Leaving.]
rdark has quit [Quit: leaving]
Rious has quit [Ping timeout: 252 seconds]
banjara has quit [Client Quit]
goleldar has quit []
banjara has joined #ruby
<shevy>
becom33 I dont know thor
failshell has quit [Remote host closed the connection]
yshh has quit [Read error: Connection reset by peer]
<ninjanoise>
Hanmac: so this is what that code is doing basically right?
__Big0___ has quit [Remote host closed the connection]
Catbuntu has joined #ruby
<ninjanoise>
just making sure I'm understanding things ..
npx has quit [Read error: Operation timed out]
<ninjanoise>
(1..20).inject(1) { |result, n| result.lcm n }
<ninjanoise>
that's the piece of code I'm looking at right now
__Big0__ has joined #ruby
<shevy>
I hate inject
<Hanmac>
ninjanoise you can do: (1..20).inject(1,:lcm)
<shevy>
when I see it, I always have to think
Rious has joined #ruby
havenwood has joined #ruby
<_emptymag00>
but its so powerful
<shevy>
but why is it named inject :(
banjara has quit [Client Quit]
leeder-krenon has quit [Quit: No Ping reply in 180 seconds.]
banjara has joined #ruby
<Hanmac>
shevy because the other name "reduce" sound like so reducing :P
spanner has joined #ruby
mityaz has quit [Remote host closed the connection]
banjara has quit [Client Quit]
ananthakumaran has joined #ruby
theRoUS has quit [Ping timeout: 255 seconds]
<shevy>
that is also a bad name
banjara has joined #ruby
<shevy>
with reduce, I ask myself how do I reduce anything, by adding to it
motto has joined #ruby
zcreative has joined #ruby
banjara has quit [Client Quit]
<Hanmac>
shevy ... i had a science magazin about different infinities ... and there was a chapter what infinities can Grow and then at some point thes "implode" and disapear :P
banjara has joined #ruby
<shevy>
aren't all infinites equal?
rtdp has quit [Ping timeout: 245 seconds]
banjara has quit [Client Quit]
banjara has joined #ruby
beneggett has quit [Quit: Computer has gone to sleep.]
m8 has quit [Ping timeout: 246 seconds]
<ninjanoise>
There are infinite numbers between 0 and 1. There's .1 and .12 and .112 and an infinite collection of others. Of course, there is a bigger infinite set of numbers between 0 and 2, or between 0 and a million. Some infinities are bigger than other infinities.
<ninjanoise>
o_O
mmitchell has quit [Read error: Connection reset by peer]
<Hanmac>
shevy: the count of Integer numbers is infinite, the count of Float numbers is infinite too, but the second one is bigger than the first :P
<shevy>
how is this possible
Xeago has quit [Remote host closed the connection]
jurassic has joined #ruby
<shevy>
how could infinity + infinity be larger than infinity?
mmitchell has joined #ruby
banjara has quit [Client Quit]
<havenwood>
shevy: It isn't larger.
banjara has joined #ruby
banjara has quit [Client Quit]
<Hanmac>
infinity is one of the few cases where a + a = a :P
<havenwood>
shevy: An infinite set of fibonacci numbers is the same size as an infinite set of negative odd numbers.
banjara has joined #ruby
ananthakumaran has quit [Client Quit]
Takehiro has joined #ruby
snearch_ has joined #ruby
averiso has quit [Quit: Computer has gone to sleep.]
<Hanmac>
havenwood .... are you sure? as ninjanoise said infinites does have different sizes
npx has joined #ruby
<AJC_Z0>
Is there a more concise, correct or elegant form of this conditional? My RTFM and STFW haven;t yet turned if $hostname == 'hosta2' || $hostname == 'hostb2' || $hostname == 'hostc' { include foo }
<ninjanoise>
lol
<ninjanoise>
that's a quote .. must give credit where it's due
<ninjanoise>
John Green, The Fault in Our Stars
kornnflake is now known as kornnflake_zzz
<shevy>
Hanmac that can only be possible if infinity are not equal
<AJC_Z0>
Excuse me. I didn't finish typing the excuse part of the question (but you've heard it before)
<shevy>
Hanmac no, I would not have any idea what it does :)
maxmanders has quit [Quit: Computer has gone to sleep.]
cburyta has joined #ruby
banjara has quit [Quit: Leaving.]
<shevy>
All I know is it checks for equality!!!
duosrx has quit [Ping timeout: 264 seconds]
<shevy>
x == y
<shevy>
THERE
banjara has joined #ruby
<interactionjaxsn>
AJC_Z0: do_this if foo == A or B or C
Xeago has joined #ruby
jrajav has quit [Quit: I tend to be neutral about apples]
Mattix has quit [Ping timeout: 252 seconds]
banjara has quit [Client Quit]
banjara has joined #ruby
kpshek has quit []
gommo has joined #ruby
shock_one has quit [Ping timeout: 260 seconds]
<shevy>
I really want a RubyOS... but without having to spend 1000 hours on it :(
<waxjar>
interactionjaxsn, that would evaluate to (foo == A) or B or C, no?
wallcloc_ has quit [Remote host closed the connection]
<Gadgetoid>
shevy: a RubyOS?
<shevy>
Gadgetoid yeah Ruby everywhere!
sambao21 has quit [Quit: Computer has gone to sleep.]
jurassic has quit [Quit: jurassic]
<shevy>
or at least
<shevy>
as much ruby as possible
Xeago has quit [Read error: Connection reset by peer]
<Gadgetoid>
shevy: There's only so much Ruby a man can take!
kpshek has joined #ruby
<shevy>
and then compromises for that
Xeago has joined #ruby
<Gadgetoid>
I think such an OS might possibly have trouble not sucking :D
<shevy>
Gadgetoid, well... pure ruby code may not be the best solution everywhere. for instance, I find config files are better without being tied to any language
<becom33>
Hanmac, can u help with me for the thor config question
<Gadgetoid>
But it'd be an interesting thing to explore
<shevy>
Gadgetoid, ok but the other OSes suck quite a lot too :\
<Gadgetoid>
If only because it'd present the core concepts of building an OS in a language I have a hope of understanding
<shevy>
windows is now like a big HTML5 app ...
<Gadgetoid>
shevy: Definitely don't dispute that1
<Hanmac>
becom33 i cant help with thor
<interactionjaxsn>
shevy: i would help you but i have no clue
<shevy>
linux is split into a million distributions
<shevy>
dunno about osx
<hoelzro>
heh
<interactionjaxsn>
osx is bsd based
<interactionjaxsn>
i think
<shevy>
but the osx users scare me :\
<havenwood>
shevy: bsd has fewer distros than linux
rboyd has joined #ruby
realDAB has joined #ruby
<waxjar>
shevy: boo
<havenwood>
shevy: be afraid!! muahahhaa
<interactionjaxsn>
waxjar: not sure...
snearch_ has quit [Quit: Verlassend]
<shevy>
bsd is not bad, I liked the idea of pc-bsd
yacks has quit [Ping timeout: 248 seconds]
bonhoeffer has quit [Quit: bonhoeffer]
<havenwood>
shevy: FreeBSD and OS X are close relatives imho.
<shevy>
there are always nice ideas here and there, it would be cool to be able to combine them all into one super awesome thing with ease
beneggett has joined #ruby
<waxjar>
i think the world could do without an extra OS :p
kpshek has quit [Client Quit]
<shevy>
waxjar yeah, but only if it would suck :P
<waxjar>
someone link that xkcd comic
<interactionjaxsn>
waxjar: and your right...
antijava has joined #ruby
<shevy>
not sucking is hard
<hoelzro>
I wish there were more OSes
<hoelzro>
not enough diversity
<antijava>
If I have a SSLSocket object, how do I tell if there is data to read in a non-blocking way?
<shevy>
more good OSes
<shevy>
hmm I liked haiku
<shevy>
but is progresses at snail speed
<shevy>
*it
wobblini has quit [Ping timeout: 248 seconds]
snearch has joined #ruby
* Gadgetoid
is a scary OSX user
<antijava>
I'm talking to the server that only sends a response on errors, so I can't just blindly read or I block on success waiting for a response that never comes.
chipotle_ has joined #ruby
<hoelzro>
shevy: then help out ;)
snearch has quit [Max SendQ exceeded]
sambao21 has joined #ruby
jurassic has joined #ruby
<shevy>
hoelzro hmm
<shevy>
hoelzro perhaps not on haiku
<hoelzro>
why not?
<waxjar>
i read a blog post a while ago by a guy that started building an OS from scratch
<shevy>
I dunno... it is not entirely within philosophies I really like
<waxjar>
dunno what became of it, though
_nitti has quit [Ping timeout: 250 seconds]
blacktulip has quit [Ping timeout: 245 seconds]
_nitti_ has joined #ruby
pettsson has joined #ruby
xnm has quit [Ping timeout: 250 seconds]
davetherat has quit [Remote host closed the connection]
davetherat has joined #ruby
jurassic has quit [Client Quit]
<hoelzro>
shevy: which philosophies would those be?
<shevy>
I like app-dirs ... I like a lot about the unix philosophy, like pipes... I like the flexibility one has with linux... hmm... I'd also like to have just one toolkit/GUI to rule everything, guess it will have to be html/css/javascript :(
<hoelzro>
waxjar: which OS?
<Gadgetoid>
I think I've run out of ways to make my blog more performant on the Pi
<waxjar>
can't remember any details I'm afraid hoelzro
<hoelzro>
=(
davetherat has quit [Remote host closed the connection]
<hoelzro>
there are a *lot* of hobby OSes out there
becom33 has quit [Quit: Leaving]
davetherat has joined #ruby
* hoelzro
needs to work on rose more
<shevy>
yeah :(
<shevy>
I saw some of them die over the years
<waxjar>
i don't get what's so spectacular about pipes. they're just a different way of wrapping stuff in parenthesis aren't they?
etcetera has quit []
becom33 has joined #ruby
dmerrick has quit [Quit: dmerrick]
* waxjar
is a cli noob tho
<shevy>
waxjar not sure... but do you know the language avisynth? it was a "scripting language" for video and audio data, and it was really awesome to use
<shevy>
now just imagine if you would have objects everywhere, and you can connect them together
jonathanwallace has quit [Quit: WeeChat 0.3.9.2]
<hoelzro>
holy crap pipes are amazing
markisonfire has joined #ruby
etcetera has joined #ruby
davetherat has quit [Remote host closed the connection]
davetherat has joined #ruby
<shevy>
waxjar, in avisynth, you could basically chain together different filters on your video data, without having to master a GUI
stkowski has quit [Quit: stkowski]
davetherat has quit [Remote host closed the connection]
davetherat has joined #ruby
stkowski has joined #ruby
<shevy>
something like this, without restriction to the format at hand, at the OS level, for everything, would be awesome
txdv has quit [Read error: Operation timed out]
blacktulip has joined #ruby
kpshek has joined #ruby
<shevy>
I found sed and awk too hard to memorize :\
<hoelzro>
I know *some* sed
<hoelzro>
if you know Perl/Ruby, you don't need sed or awk
<hoelzro>
you can just use one-liners
<Ohga>
hoelzro: care to share an example?
<shevy>
yeah
yshh has joined #ruby
<hoelzro>
Ohga: of a Perl/Ruby one-liner?
<Ohga>
yeah...
txdv has joined #ruby
<shevy>
Ohga hmm let me check on google
sandstrom has quit [Remote host closed the connection]
<hoelzro>
perl -n -E 'say if /Ruby|Perl/'
<shevy>
I myself usually put them into a .rb file, into a method, and call that method then
<hoelzro>
cat a list of programming language to that command =)
<h-elp>
If I need to get an user input and it must to be number, and input is a string, will be input = input.to_i enough? As I see "a".to_i == 0, but in all cases?
<shevy>
hehe he wants both key and value at the same time
<canton7>
becom33, I mean, give us an example hash, and your desired output
teddyp1cker has quit [Remote host closed the connection]
<shevy>
or perhaps a repetitive todo list
<Hanmac>
hm or make Array#=== be an alias for include?
etcetera has quit []
sambao21 has joined #ruby
<Hanmac>
shevy do you mean a gem for todo lists? :P
mrsolo has quit [Quit: Leaving]
<interactionjaxsn>
Hanmac: don't be reasonable... we went from goats to something that makes sense ;]
carraroj has quit [Quit: Konversation terminated!]
<canton7>
Hanmac, I was playing around with that idea - slightly surprised to see it didn't work already
yshh has joined #ruby
<canton7>
I had the impression you could use arrays in case statements
hiroyuki has joined #ruby
<waxjar>
you can give when multiple arguments
akhet has quit [Remote host closed the connection]
pdamer has joined #ruby
ArchBeOS is now known as ArchBeOS-Towelie
<canton7>
aah that's it
<canton7>
so it's the when doing the magic, not ===
etcetera has joined #ruby
dustint has quit [Ping timeout: 256 seconds]
justsee has joined #ruby
justsee has joined #ruby
justsee has quit [Changing host]
nomenkun has quit [Remote host closed the connection]
mouse-_ has joined #ruby
ferdev has joined #ruby
objectivemo has quit [Ping timeout: 264 seconds]
cantonic has quit [Quit: cantonic]
jimeh has quit [Quit: Computer has gone to sleep.]
<mouse-_>
hi ruby aficionados. does anyone have a favorite tutorial or could direct me to some information on implementing a undo command pattern (emulating a board game requiring undo for some invalid actions)
theoros_ is now known as theoros
Clownz has joined #ruby
br4ndon has quit [Quit: Lorem ipsum dolor sit amet]
huoxito has joined #ruby
<canton7>
mouse-_, sounds like a very general question
piotr has quit [Read error: Connection reset by peer]
<mouse-_>
it's a general pattern :P
<interactionjaxsn>
no cheating in monopoly
<mouse-_>
boy, someone's got my number
<mouse-_>
interactionjaxsn: don't report me to parker bros, please
<interactionjaxsn>
mouse-_: as long as you don't tell them about what i do in free parking
kornnflake is now known as kornnflake_zzz
banjara has left #ruby [#ruby]
<mouse-_>
what happens in free parking, stays in free parking (i hate that money-on-free-parking rule!)
beneggett has quit [Quit: Computer has gone to sleep.]
monkegjinni has joined #ruby
pellis has quit [Quit: Leaving]
phantasm66 has quit [Quit: *sleeeep….]
<interactionjaxsn>
mouse-_: i play that rule. it's frowned on by the brothers
_nitti_ has quit [Ping timeout: 264 seconds]
aleph-null has joined #ruby
<mouse-_>
don't worry, there's a !rule set command
madb055 has joined #ruby
<mouse-_>
you can play how you like :) hehe
<interactionjaxsn>
mouse-_: sounds like your project is done
chipotle_ has quit [Quit: cya]
<mouse-_>
it is, in C, back in 1997. it's got some long standing bugs in it that are just too heinous to tackle, therefore i shall rewrite it in the great ruby
piotr has joined #ruby
<mouse-_>
you know, during my "if you can't write it in C it isn't worth writing" phase
<interactionjaxsn>
mouse-_: haha, on a serious note, i have never run across that use case. i would assume a class that holds the last x 'moves' in memory
<breakingthings>
mouse-_: wouldn't you just… store last actions in some format that would allow you to play the move backwards
<shevy>
cool mouse-_
hashmal has quit [Quit: Computer has gone to sleep.]
<breakingthings>
after all, if you can add information you can take it back can you not
<mouse-_>
i have "Design Patterns In Ruby" book but it's a bit ... i'm not sure the word
<shevy>
mouse-_ I think the simplest way to undo is to just store the game state every turn into an array or hash
halogenandtoast has joined #ruby
<mouse-_>
was just hoping for maybe some example code (command/memento pattern or what not)
<breakingthings>
shevy is right
Mattix has quit [Ping timeout: 248 seconds]
halogenandtoast has quit [Client Quit]
<shevy>
I did that in ruby-gtk minesweeper :D
<breakingthings>
suppose it matters exactly what you intend to undo
<breakingthings>
if it's a round format that's probably the best metho
<breakingthings>
*d
<shevy>
but for difficult games, it's probably much more work to add
chrishough has quit [Quit: chrishough]
<shevy>
I want more games in ruby!
<breakingthings>
To keep a running list of individual actions you would probably have to come up with some type of format that would describe the action, and the before and after values of whatever was manipulated..
cantonic has joined #ruby
<mouse-_>
perhaps a function with the parameters as a option hash, then it's easy enough to undo (save func/opts on stack) as you suggest
<breakingthings>
eg. the action was a 'move', player started on space X, ended on space Y. Undo plays back as 'move' player to space X.
<interactionjaxsn>
breakingthings: i like that disclaimer. needs to be on more products
tjbiddle_ has joined #ruby
h-elp is now known as {b_d}
<mouse-_>
perfect hanmac! I have the 'Design Patterns In Ruby' book, but it's a bit dated and the examples aren't that great (for this particular pattern)
* mouse-_
reads
<Hanmac>
mouse- after a few time with ruby you dont use design patterns because of the pattern, you will automatic use the right way because you can feel it :P
<Amfy>
aedorn sure that it can validate if IPv4/IPv6?
<leo2007>
how does instance variables lookup work in ruby?
<Amfy>
Thought it can only do if IP or not
<Paradox>
also, anyone ever play with sup?
<Hanmac>
leo2007 what do you mean?
<aedorn>
Amfy: I'm not really sure what you're asking. What type of validation are you looking for besides if it's an IP or not?
w400z has joined #ruby
generali_ has quit [Remote host closed the connection]
jtharris has quit [Quit: WeeChat 0.4.0]
artofraw has quit [Remote host closed the connection]
<Amfy>
aedorn something like if ipaddress.ipv4 elsif ipaddress.ipv6 else
<leo2007>
I was just confused by subclass inherits only methods from superclass. but it seems I can still define instance variables with the same names in subclass to change the behaviour of the inherited methods.
mneorr_ has quit [Remote host closed the connection]
<aedorn>
Amfy: Then yes. You just check against #ipv4? and #ipv6? methods
kirun has quit [Quit: Client exiting]
yshh has joined #ruby
<fourq>
IS RVM considered a proper solution for development boxes, or a frowned upon in best practices?
adkron has joined #ruby
blacktul_ has joined #ruby
drumond19 has quit [Ping timeout: 260 seconds]
blacktulip has quit [Ping timeout: 240 seconds]
Sigma00 is now known as Sigma01
drumond19 has joined #ruby
cr3 has quit [Quit: leaving]
spider-mario has quit [Remote host closed the connection]
AJC_Z0 has left #ruby ["I have to return some videotapes"]
apalmblad has joined #ruby
bluOxigen has quit [Ping timeout: 240 seconds]
justinmcp has quit [Remote host closed the connection]
wormwood has joined #ruby
R_Macy has joined #ruby
R_Macy has quit [Max SendQ exceeded]
pdamer has quit [Quit: pdamer]
R_Macy has joined #ruby
R_Macy has quit [Max SendQ exceeded]
<leo2007>
Hanmac: comments?
tomzx_mac has joined #ruby
DrShoggoth has joined #ruby
khismetix has joined #ruby
<Hanmac>
leo2007 superclass methods can access the same instance variables than subclasses, and otherway around too
openstandards has quit [Quit: Leaving]
headius has quit [Quit: headius]
<dasdasdas>
does people use 2.0 ?
jjbohn has quit [Quit: Leaving...]
<dasdasdas>
or 1.9 ?
mpfundstein has joined #ruby
lewix has quit [Remote host closed the connection]
apalmblad has quit [Client Quit]
ArchBeOS has joined #ruby
DrCode has joined #ruby
ArchBeOS has quit [Changing host]
ArchBeOS has joined #ruby
apalmblad has joined #ruby
fourq_ has joined #ruby
<leo2007>
Hanmac: thanks
wmoxam has quit [Ping timeout: 256 seconds]
Sigma01 is now known as Sigma00
onetonturd has quit [Quit: leaving]
fourq has quit [Disconnected by services]
fourq_ is now known as fourq
<Hanmac>
dasdasdas 2.0 is outdated ... live in the future and use 2.1 :D
<dasdasdas>
?
<dasdasdas>
ruby-lang says 2.0.0 is last one
pdamer has joined #ruby
<dasdasdas>
24-feb-2013
<dasdasdas>
there is no 2.1
<Hanmac>
dasdasdas i am using the trunk
<aedorn>
lol
<dasdasdas>
thats not a release
<dasdasdas>
so please, trolling apart
<dasdasdas>
is recommended to run 2.0 or still 1.9 ?
<Hanmac>
you never said it needed to be a release :P
<dasdasdas>
i cant find a gentoo 2.0 ebuild
<aedorn>
You should update to 2.0, yes, but you don't have to just yet.
<dasdasdas>
im doing a fresh install
<Paradox>
dasdasdas, use 2.0.3
emergion has quit [Quit: Computer has gone to sleep.]
<Paradox>
oh
<Paradox>
ruby or rubygems
etcetera has quit []
pepper_chico has joined #ruby
<dasdasdas>
ruby..
brandon_ has quit [Read error: Operation timed out]
<dasdasdas>
anyone using ruby 2+ on gentoo?
<Gadgetoid>
I like that Ruby now supports method definitions so utterly complex that only future space people from the outer worlds will be able to understand them
<aedorn>
dasdasdas: Yes, but I don't use portage for Ruby. I doubt there will be an ebuild for it for at least awhile unless you make one yourself.
jerius has quit [Ping timeout: 240 seconds]
<mnemon>
Gadgetoid: such as?
rboyd_ has joined #ruby
lancepantz_ is now known as lancepantz
luckyruby has quit [Remote host closed the connection]
<Gadgetoid>
mnemon: allowing defaults for optional parameters to use the values of previous parameters is a ... curious choice
carlyle has quit [Remote host closed the connection]
rboyd has quit [Ping timeout: 245 seconds]
rboyd_ is now known as rboyd
gommo has joined #ruby
yshh has quit [Ping timeout: 264 seconds]
<Gadgetoid>
But I suppose one could bandy around terms like "expressive"
ArchBeOS has left #ruby ["Leaving"]
rboyd has left #ruby [#ruby]
monkegjinni has joined #ruby
<Hanmac>
Gadgetoid did you know that you can use ** to turn every object into an Hash? :P
w400z has quit []
<Paradox>
sigh
<banisterfiend>
Gadgetoid: ruby has always supported that afaik
<Paradox>
i know people love trollop
<banisterfiend>
Gadgetoid: also let* from lisp allows that too :)
<Paradox>
but really, optionsparser is good enough for me
blacktul_ has quit [Remote host closed the connection]
<mouse-_>
heh and here i am stuck on 1.8.7 still, i was just thinking about my first 1.9 project and here they go announcing 2 ;)
jpcamara has quit [Quit: jpcamara]
<Gadgetoid>
Paradox: what's missing?
<Paradox>
Gadgetoid, wat?
<mouse-_>
at least i read the transition will be easier
<aedorn>
Paradox: I've been using slop
<Paradox>
aedorn, how do you like it
<banisterfiend>
Paradox: optionparser is a pain
frem has quit [Quit: Computer has gone to sleep.]
fschuindt has joined #ruby
<Gadgetoid>
Paradox: I somehow read "not" in that sentence... I accidentally inserted a word
<Paradox>
banisterfiend, i spose you would know more than anyone, heh
<Hanmac>
mouse- your 1.9 stuff should work for 2.0 too
* mouse-_
nods
<Paradox>
yeah, i can see why others would be needed
<Paradox>
optionparser is very verbose
<Paradox>
and trollop is nice
<Paradox>
does trollop support easy negation?
<banisterfiend>
Paradox: well the author of slop was the one who ported our code from optionparser to slop ;) it definitely saved us a few hundred/thousand lines of boilerplate
forced_request has quit [Read error: Connection reset by peer]
<Paradox>
er, slop
<Paradox>
not trollop
<Paradox>
well
<Paradox>
either really
<Paradox>
by negation, i mean --[no-]paramiter
<Paradox>
so you can do stuff like rubygems new --no-doc
<Paradox>
i know how to do it with optionsparser
<banisterfiend>
Paradox: still, option parser is very cool compared to option libs in other languages
<Paradox>
oh easily
<dasdasdas>
aedorn what do you use then?
<dasdasdas>
make ?
rickmasta has joined #ruby
hoelzro is now known as hoelzro|away
<Paradox>
i just bring it up because i skimmed through the pragprog book on ruby CLI applets
statarb3 has joined #ruby
statarb3 has joined #ruby
statarb3 has quit [Changing host]
<Paradox>
at the bookstore the other day
<Gadgetoid>
I suspect by the time I've got anything approaching a comprehensive knowledge of even Ruby 1.9, there will be a 5.0.0 out
<Paradox>
and he seemed to focus on optionsparser
emergion has joined #ruby
<Paradox>
which i spose, if you want to minimize dependencies, or just have a few flags, is more than good enough
monkegjinni has quit [Ping timeout: 264 seconds]
eykosioux has quit [Ping timeout: 260 seconds]
ner0x has joined #ruby
<Paradox>
ie herp -v derp
NiteRain has quit [Ping timeout: 246 seconds]
tjbiddle has quit [Quit: tjbiddle]
evenix has quit [Remote host closed the connection]
philcrissman has quit [Remote host closed the connection]
pdamer has quit [Quit: pdamer]
<aedorn>
Paradox: It's easy... boolean options have --no-whatever by default.
evenix has joined #ruby
<Paradox>
ah
<dasdasdas>
also... when installing ruby 1.9 is usefull to have 1.8 too?
<Paradox>
so if you set something to default true
<Paradox>
dasdasdas, no
<dasdasdas>
or a waste of disk space
generalissimo has joined #ruby
etcetera has joined #ruby
<dasdasdas>
ty
<Paradox>
realistically you shouldnt use 1.8
<Paradox>
because its EOL next month
<Paradox>
if a gem or script only works on 1.8
<Paradox>
yell at the maintainer or find an alternative
<aedorn>
dasdasdas: Yes, from source. If you aren't comfortable with that, then maybe you should look at chruby or rvm and ruby-build
<dasdasdas>
i see
<Gadgetoid>
Whew, finally unbroke my websockets stats server
<Paradox>
speaking of versions, whats the idiomatic way to determine what version of ruby someone's on and provide different method signatures depending on version
<Paradox>
ie 1.9 use the old hash-catchall trick for keywords
<Paradox>
and 2 use keyword args
<dasdasdas>
well i prefer run 1.9.3 rather than destroy my portage :P
drumond1_ has joined #ruby
<dasdasdas>
i cant belive no one made an ebuild already...
<Paradox>
or is it best just to wait a few months then EOL my 1.9x version and say "use 2x noob"
<Gadgetoid>
Paradox: write the bare essentials for the lowest common denominator then monkeypatch up to whatever ruby version you detect?
<Paradox>
gah
<Paradox>
ill just stick with 1.9 because it works
hasimo has joined #ruby
tvw has joined #ruby
evenix has quit [Ping timeout: 245 seconds]
<Paradox>
not like i really need more complicated stuffs anyway
<Paradox>
yeah ill miss not having sexy keyword args, but w/r
<mouse-_>
i was sticking with 1.8 but i do think now is the time to yell at a maintainer
<mouse-_>
go 1.9 or bust
fire is now known as baba
<Paradox>
eh
<Paradox>
i'd love for more people to go 2.x
<mouse-_>
whoa, slow down
<Paradox>
so adoption is faster
pdamer has joined #ruby
<mouse-_>
:D
<mouse-_>
hehe
<Paradox>
but realistically
<Paradox>
ill be happy with 1.9
_nitti has joined #ruby
* Zelest
pokes mouse-_ in the eye
eAlchemist is now known as 18VAAUD1K
drumond19 has quit [Ping timeout: 264 seconds]
xardas has quit [Ping timeout: 272 seconds]
<mouse-_>
Ow! ;)
_nitti has quit [Remote host closed the connection]
mercwithamouth has joined #ruby
idkazuma has joined #ruby
_nitti has joined #ruby
Stilo has joined #ruby
Myconix has joined #ruby
markisonfire has joined #ruby
anderse has quit [Quit: anderse]
willob has quit [Quit: Leaving.]
huoxito has quit [Ping timeout: 260 seconds]
khismetix has quit [Ping timeout: 240 seconds]
pdamer has quit [Quit: pdamer]
kornnflake is now known as kornnflake_zzz
justsee has quit [Quit: Leaving...]
cburyta has quit [Remote host closed the connection]
justinmcp has joined #ruby
cburyta has joined #ruby
kornnflake_zzz is now known as kornnflake
mmitchell has quit [Read error: Operation timed out]
cburyta_ has joined #ruby
picca3 has joined #ruby
CodeGnome has quit [Remote host closed the connection]
cburyta has quit [Read error: Connection reset by peer]
yshh has joined #ruby
Spooner has quit [Remote host closed the connection]
_veer has quit [Ping timeout: 260 seconds]
alanp_ has joined #ruby
emergion has quit [Ping timeout: 264 seconds]
invisime has joined #ruby
_veer has joined #ruby
<invisime>
are there any decent distributed database frameworks written in ruby?
stkowski has joined #ruby
idkazuma has quit [Remote host closed the connection]
zul has joined #ruby
chipotle_ has joined #ruby
banseljaj is now known as imami|afk
alanp has quit [Ping timeout: 260 seconds]
thecodethinker has joined #ruby
<thecodethinker>
Can anyone get rvm to install rubinius?
<zul>
hi all, I'm a newbie. I'm testing a gem of twitter, I print some tweets in a html page using sinatra. Now I would like to use some cool graphic framework such as twitter bootstrap but I cant' find any example
adeponte has quit [Read error: Connection reset by peer]
<zul>
could you pass me any link or tutorial to improve the html UI?
<thecodethinker>
zul: That is out of the scope of ruby :'(
adeponte has joined #ruby
<thecodethinker>
zul: u would need to learn HTML5, js, and jquery
gyre007 has quit [Ping timeout: 245 seconds]
<thecodethinker>
js is easy.. and u can use coffeescript which is similar to ruby
_veer has quit [Ping timeout: 264 seconds]
hasimo has quit [Remote host closed the connection]
idkazuma has joined #ruby
<thecodethinker>
zul: the "looks" of things on the web has nothing to do with ruby... so... go google some web design tutorials
Yakko has quit [Remote host closed the connection]
<zul>
I need some example to mix such as css3 jqwery and ruby
<thecodethinker>
codeschool.com has A TON of good stuff but it costs teh monies
realDAB has joined #ruby
jonahR has quit [Quit: jonahR]
<zul>
ok thanks I look your links.. thanks a lot
<thecodethinker>
zul: don't expect to make anything amazing by yourself. You need graphic artists to make the images that you simple manipulate with css and html