ChanServ changed the topic of #ruby-lang to: Ruby 1.9.3-p125: http://ruby-lang.org | Paste >3 lines of text on http://pastie.org or use a gist
srbaker has joined #ruby-lang
igaiga has joined #ruby-lang
igaiga has joined #ruby-lang
ascarter has joined #ruby-lang
srbaker has joined #ruby-lang
burns180_ has joined #ruby-lang
x0F__ has joined #ruby-lang
<andrewvos> So the drama today is Sabu?
esad has joined #ruby-lang
srbaker has joined #ruby-lang
<zenspider> don't even know what that means
srbaker has joined #ruby-lang
<andrewvos> zenspider: Guy who was in charge of Anonymous was apparently working for the FBI for a few months. Makes a difference from the Rails drama at least.
esad has joined #ruby-lang
<erikh> a day with no rails drama?
<erikh> you must be seriously confused
<andrewvos> erikh: Just the one.
srbaker has joined #ruby-lang
takaokouji has joined #ruby-lang
<erikh> erryday I'm maury-in'
<andrewvos> ??
esad has joined #ruby-lang
srbaker has joined #ruby-lang
<erikh> maury povich. the king of drama.
<andrewvos> Oh right right
esad has joined #ruby-lang
srbaker has joined #ruby-lang
esad has joined #ruby-lang
srbaker has joined #ruby-lang
shevy has joined #ruby-lang
amerine_ has joined #ruby-lang
tommyvyo_ has joined #ruby-lang
kain has joined #ruby-lang
<dominikh> "in charge of anonymous"? I thought the whole idea is that nobody is in charge
<erikh> there's no one group either
<andrewvos> hehe
<andrewvos> I should have put that in quotes
<injekt> :)
<cout> erikh: that's what they want you to believe
burns180 has joined #ruby-lang
<erikh> sure
shajith_ has joined #ruby-lang
knightMBP has joined #ruby-lang
<injekt> tl;dr trololol
tenderlove has joined #ruby-lang
thone_ has joined #ruby-lang
tomzx has joined #ruby-lang
<andrewvos> hahaha
brushbox has joined #ruby-lang
jkyle_ has joined #ruby-lang
amerine has joined #ruby-lang
turboladen has joined #ruby-lang
burns180_ has joined #ruby-lang
neoesque has joined #ruby-lang
lsegal has joined #ruby-lang
jico has joined #ruby-lang
m3nd3s has joined #ruby-lang
slyphon has joined #ruby-lang
srbaker has joined #ruby-lang
burns180_ has joined #ruby-lang
brushbox has joined #ruby-lang
heppy_ has joined #ruby-lang
<bnagy> andrewvos: http://pastebin.com/zDTEqcfD re Sabu
<bnagy> although I don't know how I ended up in #sqlmap
ajaya has joined #ruby-lang
ajaya has joined #ruby-lang
<imperator> wow, an rt.cpan bug report resolved on one of my old libs, haven't see one of those in a while
v0yager has joined #ruby-lang
QoQOoO has joined #ruby-lang
v0yager_ has joined #ruby-lang
burns180 has joined #ruby-lang
shtirlic_ has joined #ruby-lang
rohit has joined #ruby-lang
brianpWins has joined #ruby-lang
QoQOoO has joined #ruby-lang
shajith_ has joined #ruby-lang
bryancp has joined #ruby-lang
krz has joined #ruby-lang
robbyoconnor has joined #ruby-lang
burns180_ has joined #ruby-lang
justinxreese has joined #ruby-lang
mikeric has joined #ruby-lang
robbyoconnor has joined #ruby-lang
looopy has joined #ruby-lang
robbyoconnor has joined #ruby-lang
macmartine has joined #ruby-lang
Z33K|Lux has joined #ruby-lang
mikeric has quit [#ruby-lang]
ascarter has joined #ruby-lang
ryanf has joined #ruby-lang
burns180 has joined #ruby-lang
Tearan has joined #ruby-lang
Fractality_ has joined #ruby-lang
jkyle has joined #ruby-lang
srbartlett has joined #ruby-lang
tdubz has joined #ruby-lang
qpingu has quit [#ruby-lang]
VladGh has joined #ruby-lang
looopy has joined #ruby-lang
darkf_ has joined #ruby-lang
wyhaines has joined #ruby-lang
burns180_ has joined #ruby-lang
rdavila has joined #ruby-lang
<rdavila> Hi folks
<rdavila> I'm playing with IO.popen between two Ruby programs but can't get things working: http://pastie.org/3538446
<rdavila> the ARGV variable always is nil, so always prints 'two'
<dominikh> rdavila: I don't exactly see why you'd expect ARGV[0] to be anything else than nil
<drbrain> rdavila: ARGV is on the command line
<dominikh> rdavila: ARGV holds the arguments passed on invocation, not stdin
<drbrain> so IO.popen "/path/to/one", "1"
<rdavila> mmm, I understand right now
<rdavila> so, how should I read the input on one script?
<dominikh> $stdin.gets is one way.
<dominikh> and any other IO operation that $stdin supports
hagabaka has joined #ruby-lang
<rdavila> ok, very thanks dominikh && drbrain
<dominikh> :)
elephants has joined #ruby-lang
srbaker has joined #ruby-lang
wmoxam has joined #ruby-lang
pp01bit has joined #ruby-lang
takaokouji has joined #ruby-lang
ankurgel has joined #ruby-lang
elephants has joined #ruby-lang
macmartine has joined #ruby-lang
Heimidal has joined #ruby-lang
<nofxx> OT: anyone got a das keyboard? was wondering how nice it is to code hehe
<nofxx> ruby* ... now it isn't OT
<drbrain> nofxx: I've got one, it's great
<drbrain> it's the previous edition
achiu has joined #ruby-lang
<nofxx> drbrain, think I'll get the silent one.... they sell earplugs! haha it scared me a lil
<drbrain> so the keys are loud with feedback
<oddmunds> i've been DK curious, too
<oddmunds> my idea was to go for the ultimate loud one, with black keys
<nofxx> drbrain, nice loud, don't piss off after some time?
<nofxx> oddmunds, sure, the black one! hehe flow -> noob sit your chair, noob looks down, noob get up
<drbrain> nofxx: I haven't used it in a long while, but nobody really cared
<drbrain> I didn't mind
<nofxx> drbrain, laptop keyboard ?
<drbrain> it wasn't louder than the music playing
<nofxx> nice
<oddmunds> noobs already scrath their head over my computers due to http://dactyl.sourceforge.net/pentadactyl/ and http://subforge.org/projects/subtle/wiki
<drbrain> I work in a coffee shop now, so the keyboard is not convenient to use anymore
twittard has joined #ruby-lang
<nofxx> drbrain, haha cool... didn't knew you liked coffee that much ;)
<drbrain> nofxx: actually, I don't drink coffee
<nofxx> I live in the brazilian coffee belt, there's farms everywhere
* deryldoucette stares in shock!
<drbrain> zenspider and tenderlove do, which is why I work here
<deryldoucette> no drinking the nectar of the gods? ;)
rippa has joined #ruby-lang
<drbrain> it's not my thing
<dominikh> coffee is so pointless :)
shevy2 has joined #ruby-lang
<oddmunds> who needs a point?
shevy has joined #ruby-lang
ttilley has joined #ruby-lang
dv310p3r has joined #ruby-lang
chimkan has joined #ruby-lang
rohit has joined #ruby-lang
chessguy has joined #ruby-lang
srbartlett has joined #ruby-lang
macmartine has joined #ruby-lang
rohit has joined #ruby-lang
AymericF has joined #ruby-lang
gsav has joined #ruby-lang
lchi has joined #ruby-lang
burns180 has joined #ruby-lang
tyman_ has joined #ruby-lang
yxhuvud has joined #ruby-lang
chimkan_ has joined #ruby-lang
tyman has joined #ruby-lang
tyman has quit [#ruby-lang]
macmartine has joined #ruby-lang
JohnBat26 has joined #ruby-lang
macmartine has joined #ruby-lang
x0F_ has joined #ruby-lang
srbaker has joined #ruby-lang
heppy has joined #ruby-lang
robbyoconnor has joined #ruby-lang
acts_as has joined #ruby-lang
acts_as_ has joined #ruby-lang
JohnBat26 has joined #ruby-lang
ryanf has joined #ruby-lang
mikeric has joined #ruby-lang
ltd- has joined #ruby-lang
WillMarshall has joined #ruby-lang
takaokouji has joined #ruby-lang
krz has joined #ruby-lang
looopy has joined #ruby-lang
dc5ala has joined #ruby-lang
Keva161 has joined #ruby-lang
Technodrome has joined #ruby-lang
<Technodrome> are smalltalk and ruby's block any different really?
burns180 has joined #ruby-lang
<Technodrome> also are core ruby methods written in ruby or written in C? …. each on an Array object for instance?
<rippa> C
|Vargas| has joined #ruby-lang
jstemmer has joined #ruby-lang
wmoxam has joined #ruby-lang
io_syl has joined #ruby-lang
<erikh> drbrain: you around?
<erikh> I'll send you a pm
burns180_ has joined #ruby-lang
frangiz has joined #ruby-lang
<Technodrome> rippa: I see, well I wanted to see the code for that each method but I guess I really can't do that with ease
<rippa> you can
<rippa> >click to toggle source
<Technodrome> i meant I wanted to see ruby code really hehe
mytrile has joined #ruby-lang
<rippa> you can browse rubinius sources
<rippa> it is mostly written in ruby
workmad3 has joined #ruby-lang
lucas has joined #ruby-lang
solars has joined #ruby-lang
chimkan_ has joined #ruby-lang
gasbakid has joined #ruby-lang
ankurgel has joined #ruby-lang
gnufied has joined #ruby-lang
burns180 has joined #ruby-lang
toretore has joined #ruby-lang
kitallis has joined #ruby-lang
<Technodrome> rippa: how does rubinius compare to mri?
<rippa> it's 1.8 only yet
<rippa> otherwise I'm not sure
<heftig> then you don't build master
<heftig> 1.9 support is quite good
<Technodrome> i wonder how good it is performance wise
<Technodrome> i mean mri is not to bad anymore
twittard has joined #ruby-lang
sym- has joined #ruby-lang
brushbox has joined #ruby-lang
Nss has joined #ruby-lang
andrewhl has joined #ruby-lang
workmad3 has joined #ruby-lang
rushed has joined #ruby-lang
urbino_ has joined #ruby-lang
<zenspider> rawr
zmack has joined #ruby-lang
ramonmaruko has joined #ruby-lang
gnufied has joined #ruby-lang
brushbox has quit [#ruby-lang]
gnufied has joined #ruby-lang
QoQOoO has joined #ruby-lang
achiu has joined #ruby-lang
gnufied has joined #ruby-lang
burns180_ has joined #ruby-lang
krzyhoo has joined #ruby-lang
<krzyhoo> andrewvos: u there ? need your sexy brain for a while :)
gnufied has joined #ruby-lang
<krzyhoo> anyone here with decent ERB knowledge?
<krzyhoo> is there any way to make this code smaller (passing the params while doing the binding??)
<zenspider> blech
<zenspider> dude... 2 spaces per indent and for god's sake refactor
<krzyhoo> zenspider: which is what I am trying to do
<krzyhoo> that was my question
<krzyhoo> how would you compact the code
<krzyhoo> am open tu suggestions
<yorickpeterse> Dat indentation
<zenspider> you need to make your code more presentable if you want us to be able (or willing) to read it and help
<krzyhoo> zenspider: ok, will switch to two spaces. but do you have any other suggestions on how to make it more compact?
<zenspider> I guess I'm not being clear... I don't want to read your code in its current state
<krzyhoo> zenspider:
<krzyhoo> ok. ot the message. am refactoring. do you have problem only with my idents? and god I am not being ironic. an honest to god question befor i paste it again
cyri_ has joined #ruby-lang
igaiga has joined #ruby-lang
aza_kibo_ has joined #ruby-lang
igaiga_ has joined #ruby-lang
tyman has joined #ruby-lang
gokul has joined #ruby-lang
burns180 has joined #ruby-lang
<krzyhoo> OK code changed:
tekin has joined #ruby-lang
<krzyhoo> zenspider, can you please take a look at it now?
<krzyhoo> observe, the first x idents are there because i did cut it out of a more complex code structure
<erikh> hrm
<zenspider> line 6, 15, 28, and 37
t4nk967 has joined #ruby-lang
<erikh> maybe use hash tables, and break out the conditional bodies into methods.
<t4nk967> Hi, guys. I'm new to Ruby. I have a problem with hashes. Can anybody tell me what I'm doing wrong? http://pastie.org/3539602
<krzyhoo> erikh: so passing something while result(binding) is not possible / frowned upon?
<erikh> that's not what I'm saying. you can still use the binding, just instead of repeating yourself abstract the cut and paste job
<zenspider> t4nk967: you've got ["a"] instead of "a" as your key
<zenspider> t4nk967: ah. it is because your scan is using a group
<zenspider> drop the parens
<zenspider> t4nk967: you can simplify to phrase.downcase.scan(/[a-z0-9]+/).each do ... end
<erikh> he could use /i there too, or was that dropped?
<zenspider> ri String.scan to see what the parens are doing
<zenspider> I assumed the downcase was intentional
<erikh> oh derp
<t4nk967> Ok thank you very much zenspider
<erikh> missed that.
<t4nk967> I will try
<zenspider> good use of Hash.new 0... a lot of newbs miss that
beiter has joined #ruby-lang
<t4nk967> Thanks
<krzyhoo> erikh: what you mean by saying abstract?
<erikh> krzyhoo: well,
<erikh> take from_instance for example.
<erikh> there's only two forms.
<beiter> hio
<erikh> and they always use an ivar
<erikh> that's a place where you can simplify your code by creating another method using a conditional on a boolean.
<erikh> to expound on that, you have a lot of additional repetition
<erikh> most of it (if I'm reading correctly) can be grouped
<erikh> take those groups, make methods out of them.
<krzyhoo> erikh: will it really save some code?
<erikh> then, instead of setting a bunch of things and calling binding, have those methods return a hash table of your values and then execute on the binding. that hash table will be available to ERB, which you can then use in your templates.
davidw has joined #ruby-lang
<erikh> it will be more readable and save you time when you need to edit it.
<erikh> this isn't about more/less code, really, it's about simplification.
<erikh> (which, as confusing as it may sound, is different.)
<krzyhoo> erikh: since I'm doing ruby not on such a regular basis
<erikh> for example, if you need to change the string 'Source Qualifier', you need to edit in three places.
<krzyhoo> i might habe problem with understanding what you just said
<erikh> this is not about ruby -- this is just good programming practice
<zenspider> krzyhoo: why don't you repeat the template 5 times, once per connector assignment?
<krzyhoo> can you post a link to an example of what you suggest?
<erikh> it's not going to help you if I do it
<krzyhoo> erikh: i know
<krzyhoo> but i could use aa link to docu which exmplains your suggestions
<krzyhoo> zenspider: am I not doing that?? :)
<zenspider> krzyhoo: how many times do you assign to template?
<krzyhoo> once
<zenspider> so why aren't you doing it 5 times?
<zenspider> once per block of code
<krzyhoo> maintenance in the future
<krzyhoo> once the template changes
<krzyhoo> would like to change it only in one place
vmoravec has joined #ruby-lang
<zenspider> you use it 5 times... but you don't assign it 5 times
<zenspider> why?
sandbags has joined #ruby-lang
roadkith has joined #ruby-lang
<krzyhoo> well, what you see is just a small fragment of creating a really big dynamic XML document
<krzyhoo> should the code for connectors change in the future
<zenspider> you're not answering my question
<krzyhoo> I'm affraid i will miss something while corrcting the template
<zenspider> why do you repeat the exact same to_field assignment 5 times?
<krzyhoo> no good reason, thist ist the only variable that stays constant
<krzyhoo> i could cut that one out
<erikh> thought about this while I was outside smoking: Hash#merge would be really beneficial here
<krzyhoo> what about something like template.result(binding :param => 'Value')
<krzyhoo> is there something like that available??
<krzyhoo> erikh: wow
<krzyhoo> looks great
nevynxxx has joined #ruby-lang
<krzyhoo> i think I'll give it a shot
schroedinbug has joined #ruby-lang
rolfb has joined #ruby-lang
kitallis has joined #ruby-lang
PhilCK has joined #ruby-lang
francisfish has joined #ruby-lang
burns180 has joined #ruby-lang
rohit_ has joined #ruby-lang
dejongge has joined #ruby-lang
rohit has joined #ruby-lang
QoQOoO has joined #ruby-lang
tommyvyo has joined #ruby-lang
rippa has joined #ruby-lang
uniqanomaly has joined #ruby-lang
lsegal has joined #ruby-lang
workmad3 has joined #ruby-lang
burns180_ has joined #ruby-lang
kitallis has joined #ruby-lang
burns180 has joined #ruby-lang
dhruvasagar has joined #ruby-lang
ammar2 has joined #ruby-lang
<ammar2> Hello, I was getting this error: "#<NoMethodError: undefined method `getbyte' for #<String:0x7fe7329e2cf0>>" and I have no idea why it is occuring as the string object does have a getbyte method(http://ruby-doc.org/core-1.9.3/String.html#method-i-getbyte)
Arnvald has joined #ruby-lang
<ammar2> The error occurs on line 7 here: http://pastebin.com/q5zFPcXV
lbrent has joined #ruby-lang
lbrent_ has joined #ruby-lang
lbrent has joined #ruby-lang
<zenspider> ammar2: ruby 1.8 or 1.9?
<ammar2> zenspider: 1.8
<zenspider> look at your url again
<ammar2> Oh. heh. Thanks, I'll go ahead and install 1.9
srbartlett has joined #ruby-lang
leriksenau has joined #ruby-lang
<zenspider> ammar2: or you can write 1.8 code
<zenspider> ammar2: look at String#[]
brushbox has joined #ruby-lang
<leriksenau> Hi all, I've been struggling with my sinatra app not writing its scss stylesheets out to my css_dir - it populates the cache, but no matter what I do it won't write to the public/stylesheets dir
m3nd3s has joined #ruby-lang
<leriksenau> here's my config.ru
<leriksenau> require 'rubygems'
<leriksenau> require 'logger'
<leriksenau> require 'sass/plugin/rack'
<leriksenau> use Sass::Plugin::Rack
<leriksenau> logger = Logger.new('sinatra.log')
<leriksenau> logger.level = Logger::DEBUG
<leriksenau> use Rack::CommonLogger, logger
<leriksenau> require File.join(File.dirname(__FILE__), 'src/coffee.rb')
<leriksenau> run Coffee
<leriksenau> sorry -havent use irc in about 6 years
<rolfb> leriksenau: read topic of this channel
<leriksenau> sorry -i types #sass - seems I got something else
<rolfb> leriksenau: was just thinking about the part about pasting > 3 lines
<zenspider> leriksenau: dude
<leriksenau> I did wonder about the ChanServ line - thought "you'd think they mention the version of sass!"
<rolfb> leriksenau: #sinatra can answer sinatra related questions
<leriksenau> I shall withdraw with what dignity I have left….
<rolfb> leriksenau: but provide them with a pastie.org or gist
<rolfb> :)
<leriksenau> ok shall learn about those
leriksenau has quit [#ruby-lang]
<rolfb> it's hard to be the new guy on irc
<zenspider> esp when you don't read
<rolfb> yup
rohit has joined #ruby-lang
burns180_ has joined #ruby-lang
kitallis has joined #ruby-lang
ankurgel has joined #ruby-lang
jsaak has joined #ruby-lang
gianlucadv has joined #ruby-lang
Hakon|mbp has joined #ruby-lang
futurechimp has joined #ruby-lang
dhruvasagar has joined #ruby-lang
machine2 has joined #ruby-lang
<ankurgel> Was trying out to make a fibonacci generator snippet which takes upper limit and adds fibonacci of all numbers from 1 to that_upper_limit.
<ankurgel> But, time complexity is screwed up in it.
<ankurgel> I tried using space by using arrays and made: http://ideone.com/jxtp5
<ankurgel> ^generates some error which is weird to figure out. Any help please?
<heftig> gen = Enumerator.new { |y| a,b = 0,1; loop { y << a; a,b = b,a+b } }
<heftig> gen.take(30)
<ankurgel> ^wow
burns180 has joined #ruby-lang
machine1 has joined #ruby-lang
tallship has joined #ruby-lang
Fractality has joined #ruby-lang
rolfb has joined #ruby-lang
looopy has joined #ruby-lang
looopy has joined #ruby-lang
PhilCK has joined #ruby-lang
Karmaon has joined #ruby-lang
vdrab has joined #ruby-lang
burns180_ has joined #ruby-lang
beiter has joined #ruby-lang
urbino has quit ["Leaving"]
mark_locklear has joined #ruby-lang
roadkith_ has joined #ruby-lang
esad has joined #ruby-lang
Sailias has joined #ruby-lang
Spooner has joined #ruby-lang
wyhaines has joined #ruby-lang
tomzx has joined #ruby-lang
bglusman has joined #ruby-lang
mephux has joined #ruby-lang
QaDeS has joined #ruby-lang
burns180_ has joined #ruby-lang
<manveru> anybody using sublime2 on linux?
<ankurgel> manveru, Installed earlier. But never used it.
looopy has joined #ruby-lang
<darix> manveru: vim! :p
<manveru> darix: well i use vim usually :)
<manveru> just trying to find out what sublime has to offer
enebo has joined #ruby-lang
<ankurgel> manveru, there is quite a buzz about it currently. Maybe good. Personally, not ready to experiment for now. :) Vim it is.
<manveru> dunno, maybe it's better on osx and windows
<manveru> the default gtk "open file" dialog just makes me wanna puke
<manveru> usability-wise, that is :)
Gray has joined #ruby-lang
Gray has quit [#ruby-lang]
esad has joined #ruby-lang
Gray|2 has joined #ruby-lang
reitelles has joined #ruby-lang
<cout> manveru: IMO the irony is that the one in gtk 1.2 was just fine, usability-wise
leonL has joined #ruby-lang
<Gray|2> Hi, Guys! Could you show Ruby interactive tutorials lik tryruby.org
lsegal has joined #ruby-lang
<kalleth> manveru: what's wrong with :e path/to/file
<kalleth> :P
<darix> kalleth: cant take multiple files!
<kalleth> ¬_¬
<manveru> lol
<kalleth> erm
<manveru> kalleth: that doesn't work in sublime
<kalleth> tbh
<kalleth> the interface of sublime might be ok, i guess
<kalleth> but its the editing that I can do in vim that's the best part
<kalleth> and not having to use the mouse :P
<ankurgel> ^THIS
<manveru> guys, please stop :P
<kalleth> negative
<manveru> i've been using vim for more than 7 years now
<ankurgel> manveru, :D That's quite lot of experience!
<rue> Gray|2: I don't think there are others of mention
<manveru> i'm not asking about it, i'm asking what sublime brings to the table
<rue> It's purdy
<rue> Apparently. And has the vim functionality that those who haven't used vim for 7 years think vim consists of
<manveru> that's how it asks me to open a file
<manveru> even with the added vim plugin, it doesn't have anything close to :e
<Gray|2> thx, for reply
<kalleth> dear god manveru
<kalleth> after the first day using that, i'd kill myself
<manveru> kalleth: exactly
<Gray|2> okay. I'am new in Ruby. I understand tryruby.org lessons, but what i should do next ? :)
<manveru> Gray|2: install ruby
<ankurgel> heftig, Please tell what's wrong I did there: http://ideone.com/jxtp5
<rue> kalleth: Yeah, I couldn't bear using Leenox either
<Gray|2> already
<rue> Gray|2: Well, what do you want to do?
<heftig> ankurgel: the second "return" will never be reached
<ankurgel> but why? only two cases are mentioned in that case.
<kalleth> rue: leenox?
<ankurgel> oh
<kalleth> excuse?
<rue> ankurgel: return(case …)
<ankurgel> it will return nil if it doesn't matches any case?
<ankurgel> damn
<Gray|2> rue: so, i want become a web developer. Want write clean code on ROR
<kalleth> i meant coding having to open each file using the file open mechanism...
<reitelles> Gray|2: http://rubymonk.com
<kalleth> /dialog
<manveru> kalleth: well, you can also create a project, and it'll list your files on the left
<rue> Gray|2: Then maybe the Rails Tutorial might be a good one to go with?
<kalleth> 'project'
<kalleth> but what if i want to open a file outside that project
<manveru> but you know... creating project seems like a lot of work :P
<manveru> exactly
<kalleth> i.e. i have two daemons and a rails app, do i have to create 3 seperate projects and switch between the 3 every time..oh god
<rue> Gray|2: As you go along, you'll find things you don't understand and can then practice those before moving further
<manveru> kalleth: i'm just seriously trying to understand the IDE mindset
<manveru> are people just blind?
<rue> kalleth: Come on now, project-based workflow has seen decades of quality software on Winders
<kalleth> i can understand it for languages that have stuff like step-through debugging and etc
malev has joined #ruby-lang
<kalleth> but then its basically a debugger with an editor in the middle
<kalleth> so :shrug:
<ankurgel> heftig, solved. thanks. :)
<rue> manveru: Your first mistake is trying to use it on !OS X
<rue> Your second mistake is trying to use it
<kalleth> your third mistake is not using vim
<kalleth> or *shudder* even emacs, i guess
malev has joined #ruby-lang
<kalleth> manveru: i guess also build/run/debug functionality and formbuilders for java/.net/etc
<kalleth> i'd quite like an IDE that was just vim, surrounded by a debugger and a formbuilder and a build/runner
* kalleth discovers :!
<Gray|2> rue: may be. Rails tutorial might be a good :) But i don't have no any experience in software development
<Gray|2> and i thought that should start with Ruby
flatliner has joined #ruby-lang
justinxreese has joined #ruby-lang
esad has quit ["["Textual IRC Client: www.textualapp.com"]"]
ruby_ has joined #ruby-lang
burns180_ has joined #ruby-lang
tekin has joined #ruby-lang
ankurgel has joined #ruby-lang
vdrab has joined #ruby-lang
slyphon has joined #ruby-lang
<yorickpeterse> If you have no experience I'd recommend against starting with Rails
reitelles_ has joined #ruby-lang
<yorickpeterse> Or any framework for that matter
<rue> Gray|2: It's a good idea to do so. You could try that rubymonks site, or rubykoans, or maybe do some of the Ruby Quiz problems
JEG2 has joined #ruby-lang
A124 has joined #ruby-lang
nofxx has joined #ruby-lang
<Gray|2> I already tried rubymonk. And can't finish last 3 exercises. http://rubymonk.com/chapters/9-more-ruby/lessons/42-functional-programming-in-ruby
dv310p3r has joined #ruby-lang
<Gray|2> so, may be i can find here a tutor? Who can help me with basics. And i can help after / writing for some opensource project / or pay.
<canton7> Gray|2, buy a good book?
<bnagy> I agree. Great way to take your mind off programming.
* kalleth can't stand programming books
<Gray|2> Books is not interactive. And I forget all after reading if i have no practice.
<krzyhoo> hello experts
<krzyhoo> if I have an erb template
<andrewvos> HI
<krzyhoo> can I escape ERB syntax in such a way
Sailias has joined #ruby-lang
dmathieu has joined #ruby-lang
<reitelles_> Gray|2: books can be interactive too, it depends if you try what's in it or not
adambeynon has joined #ruby-lang
<krzyhoo> that only part of it is going to be replaced once the ERB is "binded<2 the first time
<krzyhoo> and the rest once second binding occurs?
Fractality has joined #ruby-lang
<A124> Hey.
<A124> How can I define a method for an class instance, instead of the class itself?
dfr|mac has joined #ruby-lang
<reitelles_> Gray|2: but, you have a point, sites like tryruby or rubymonk make it much easier to newbies
robbrit has joined #ruby-lang
<krzyhoo> andrewvos: hope you got my question :)
<andrewvos> krzyhoo: sorry too busy brohan
<Gray|2> reitelles_: so, as i understand I have only one way: buy good book.
<Gray|2> learn english and after learn ruby :)
<robbrit> is it possible to grab Rack session data from within a em-websocket instance?
<krzyhoo> andrewvos: that sucks :(
<krzyhoo> was counting on you
scampbell has joined #ruby-lang
<krzyhoo> maybe this will help
<krzyhoo> "<%%= variable %>"
<Gray|2> reitelles_: so, i think tutor does not cancel the reading of books. But can help don't stuck.
<reitelles_> Gray|2: there are good tutorials online too, but i personally find a book more easier to read and search
<reitelles_> Gray|2: i bought matz book a month ago, only read a few chapters, it's quite good so far
<injekt> i wouldnt recommend that book for beginners personally
<Gray|2> reitelles_: may be you have expirience with another languages before?
<reitelles_> injekt: you're right, maybe ruby for pragmatic programmers is better?
<Gray|2> so, guys. To read Matz book i need open google translate online and "read"
<reitelles_> Gray|2: yes, a few... maybe it's not the best choice for beginners...
<reitelles_> :) or _why, of course
<reitelles_> by the way, hackety hack might be handy
<injekt> I hear good things about the koans
slyphon has joined #ruby-lang
<reitelles_> i checked koans.heroku.com, it's not very intuitive
burns180 has joined #ruby-lang
rdavila has joined #ruby-lang
<andrewvos> Right so suddently 1.8.7 is *not* installed. Disappeared?
<andrewvos> rvm lost it?
<injekt> hidden it because you should be using 1.9 perhaps
<injekt> :D
<Gray|2> thanks guys.
<reitelles_> Gray|2: you're welcome, that's what this channel is for, i guess ;)
<Mon_Ouie> Or you upgraded RVM and you don't have the latest patchlevel installed and need to specify it explicitly?
<A124> How can I define a method for an class instance, instead of the class itself? Please ^^
<andrewvos> Mon_Ouie: Ahh yeah. Exactly that :)
<injekt> A124: class Foo; def hello; end; end
<Gray|2> so, if I can't achieve the results by myself. should i try find a tutor ?
<injekt> oh wait instance of the classes class or instance of the class
<A124> injekt: What?
<injekt> A124: what are you trying to do?
<rue> Gray|2: You can, but chiefly you should just start doing stuff.
<A124> injekt: arry = Array.new; def ...
<rue> It's hard to know what you can do when you're starting out. The only way to find out is to try
<injekt> oh
<A124> injekt: I want to define method only for that particular instance
<mortice> 
<A124> injekt: or other way around, to achiev the same funtionality
rdavila has joined #ruby-lang
RickHull has joined #ruby-lang
<injekt> A124: def arry.meth; end
<A124> injekt: Oh. That simple. Will check it out. Thanks ;)
<A124> injekt: Oh yeah! Thank you a lot Sir!
andrewhl has joined #ruby-lang
<Gray|2> rue: do not want to seem like a whiner :) , but i tried before learn delphi spent a lot of time, but don't understand how to develop :)
<rue> No-one does, until they do it.
<A124> injekt: Noone answered me this today. It's object anyway. So I'm able to define it. I haven't though of it.
<rue> Gray|2: Nobody learns to program in a university, either, unless they do it separately
<reitelles_> injekt: nice, i didn't know you could do that
<rue> Sure you did
<A124> Umm.. I have a one one little: How can I undefine a method? .. Searching doesn't help in this case :(
<shevy> Gray|2 the only way to learn ruby is to write ruby scripts. reading books gives you only a foundation, but you should build the foundation by yourself and your brain and start to think in the ruby way practically - with real code
<rue> You just didn't realize that def self.foo; …; end is just def anyobject.foo; …; end
<shevy> A124, remove_method(:foo)
<reitelles_> ;)
<A124> shevy: Oh. Hai shevy xD
<A124> Thanks ;)
<Gray|2> shevy: sounds delicious)
<shevy> that's they key you see ruby
<shevy> you can use google to search for something and get the result Gray|2 :D
<shevy> google for "world domination with ruby"
<shevy> hrm
<shevy> too many rails results
<A124> shevy: Thanks, that does it. I googled, but no luck xD
<shevy> yay!
<A124> shevy: To be honest, the first was better. They just put it raw. And that was what I needed ; )
Ali1331 has joined #ruby-lang
<Ali1331> Hello all
<Ali1331> I'm trying to use RubyPython on a rails server and I'm unsure of the syntax
<shevy> A124 ok
<A124> Ali1331: I don't see any questin in that.
<injekt> zing
<shevy> what is that... a python snake having swallowed a ruby?
<Ali1331> ...what's the syntax
<shevy> and then rolling around on a rails
<Ali1331> pretty much
<injekt> the syntax for what?
<shevy> $/%)("% that is the syntax!
<shevy> the syntax for total enlightenment
<reitelles_> seems like rubysh
<Ali1331> RubyPython.start <something> RubyPython.stop how do I use python in the <something>
sbabiy has joined #ruby-lang
<shevy> never heard of RubyPython
<shevy> if it is a project that has any worth at all, it came with examples
<A124> shevy: Agreed. ^^
<shevy> cPickle = RubyPython.import("cPickle")
<shevy> p cPickle.dumps("Testing RubyPython.").rubify
<shevy> and it even has examples!
<Ali1331> examples that are far from clear
<shevy> well that may be, but I now know how to import python modules in RubyPython
rayners has joined #ruby-lang
<shevy> oh... it depends on ffi
dhruvasagar has joined #ruby-lang
<shevy> no examples/ directory :(
<Ali1331> so, I want to run the python string "dir(sys)" how do I do it and get the result to ruby?
beiter_ has joined #ruby-lang
<shevy> how about with .start
<injekt> wow that is ugly
<Ali1331> right I've .start'd now what
<injekt> dude c'mon
<Ali1331> The website isn't clear
<injekt> all we're going to do is read the docs FOR YOU
<Ali1331> at all
<shevy> dunno, you have to somehow trigger it to run the python code
igaiga has joined #ruby-lang
<shevy> then you can probably query the return value
<rue> Come up with something to show effort
<injekt> ^
<shevy> but I myself would not use a project that has shit docu
<shevy> let it die :)
<A124> shevy: Like Ruby early days :D
<A124> *?
<injekt> ruby still has shit docs
mistym has joined #ruby-lang
<injekt> :D
<Ali1331> just got a 1045 line stack trace
<shevy> A124 oh, there are lots of lacking documentation in ruby still
<shevy> it got a little better over the years
<shevy> but I mean, just take IRB, used by everyone and has crappy docs. I'd throw such things out instantly
<A124> injekt: Yeah. But they somehow improved, good for me xD
jxie has joined #ruby-lang
wmoxam has joined #ruby-lang
<Ali1331> oh...it caused a segmentation fault
<Ali1331> yayness
<shevy> Ali1331, the quality shows in love to detail... ;)
rippa has joined #ruby-lang
<shevy> though I think such a project will never become very popular
rippa has joined #ruby-lang
RickHull has joined #ruby-lang
RickHull has joined #ruby-lang
macmartine has joined #ruby-lang
elephants has joined #ruby-lang
reitelles_ has quit [#ruby-lang]
reitelles has joined #ruby-lang
burns180_ has joined #ruby-lang
outoftime has joined #ruby-lang
cdnz has joined #ruby-lang
cdnz has joined #ruby-lang
jkyle has joined #ruby-lang
rue has joined #ruby-lang
<Gray|2> can explain to me what does mean blocks?
<Gray|2> and what is yield
<deryldoucette> ri yield
<rue> “Let's go over that one more time. Ruby blocks are just lambdas.”
<Gray|2> deryldoucette: The most purposeful use of blocks is to abstract common types of loops into more friendly forms ... i don't understand...
<Gray|2> :(
<Gray|2> rue: just a function? okay, but why need function, lambdas, blocks?
<retro|cz> Can I use Python lib from ruby?
<retro|cz> I saw something like RubyPython
<retro|cz> but not sure where to find
<deryldoucette> i dont know how to explain it to you then. read the rest of that paragraph it gives an example for what he means
<rue> Gray|2: Do the examples on that page answer the question? Canonical example is [1, 2, 3].each {|number| puts number }
<rue> So, it's an anonymous function that's easy to pass around. (It's also a closure, but you'll learn about that later.)
m3nd3s has joined #ruby-lang
<outoftime> Gray|2: to be clear, the things you define with "def blah" are not functions -- they are methods. the difference is that a method is always bound to an object, referred to with "self". lambdas are closer to functions, in that they do not have an idea of "self"
nofxx has joined #ruby-lang
nofxx has joined #ruby-lang
slyphon has joined #ruby-lang
<shevy> Gray|2 did you understand what a block is?
<shevy> yield comes afterwards when you understand a block in ruby
<outoftime> Gray|2: "lambda", "block", "proc", and "function" are words that can be used more or less interchangeably in Ruby, although there are some subtle differences that you don't need to worry about right now.
<deryldoucette> hrmm people can correct me if i'm wrong so i'll explain it as i understand it in my head
<outoftime> Gray|2: do you know JavaScript?
Sailias_ has joined #ruby-lang
<Gray|2> guys, i reply not so fast, because i need time, to translate and understand :)
<deryldoucette> think of a ruby method (def blah where blah is the method name) see how the method is named? a block is the same thing but with no name. its a bunch of code between the { and } that you can pass around (hand off to methods ect) and yield is a keyword that, when you pass say the data returned from a method, whatever is passed in gets put where the yield keyword is
<deryldoucette> anyone want to refine that?
<outoftime> deryldoucette: it may not be helpful to elide the difference between methods and procs (functions)...
<deryldoucette> *I* have a hard time understanding procs :)
<outoftime> deryldoucette: the fact of methods being bound to objects and functions not is important, particularly with respect to Gray|2's question about why we have both
<deryldoucette> outoftime: ok. my knowledge is a bit flaky in some areas. probably why that came out wrong
<outoftime> deryldoucette: no worries, just accepting your invitation to refine : )
<deryldoucette> perfectly acceptable and glad you took it up :)
tla has joined #ruby-lang
<andrewvos> This little bot makes me laugh a few times a day. Good stuff
<outoftime> Gray|2: if you are comfortable with JavaScript, I can give you an example that may help explain what is going on inside blocks.
<Gray|2> outoftime: no, i'm sorry, but i don't know JavaScript.
<mistym> Is it possible to see what class an eigenclass is derived from from within the eigenclass? `self.class` from within a `class << self` block returns `Class`, not the class it's extending.
<outoftime> Gray|2: is Ruby your first programming language?
<outoftime> mistym: I'm guessing (class <<self; superclass; end)
robbrit has quit [#ruby-lang]
<outoftime> mistym: yep
<outoftime> mistym: class <<""; superclass; end #=> String
<mistym> outoftime: Thanks.
<Gray|2> outoftime: yes.
<outoftime> Gray|2: then I wouldn't worry too much about understanding exactly how blocks work. it's kind of advanced. just learn how to use them for their most common uses
<outoftime> Gray|2: [1, 2, 3].each { |i| puts i } #=> prints "1", then "2", then "3"
rubyplusplus has joined #ruby-lang
<Gray|2> outoftime: understand.
<mistym> Hm. Though actually, it's the superclass of the class it's extending! How interesting. I'm instantiating a subclass of a class with the `class << self` stuff happening in the superclass. `superclass` in the `class << self` is returning the parent class, not the specific subclass.
<outoftime> mistym: I think I'd need to see the code to understand what you're saying...
<outoftime> mistym: or a reduction thereof
dlazic88 has joined #ruby-lang
<mistym> E.g. `class A; class << self; ...; end ... class B << A; DSL goes here; end`
slyphon has joined #ruby-lang
<Gray|2> outoftime: as i undertand if i need more than one line, i should write this: [1, 2, 3].each do
<mistym> I'm trying to find out the name of B from within its DSL methods. `superclass`, written in A's eigenclass, returns A when accessing the method from B.
<outoftime> Gray|2: yes, that's just two options you have for the syntax.
<Gray|2> | i|
<Gray|2> outoftime: okay
burns180 has joined #ruby-lang
<Gray|2> where i can get simple more tasks for beginner?
<Gray|2> or may be you can write 2-5 tasks for me here? if it possible.
Sailias_ has joined #ruby-lang
slimfit has joined #ruby-lang
<Gray|2> guys? :)
<nofxx> Gray|2, got the chris pine book?
<nofxx> there's a puzzle every chapter
tenderlove has joined #ruby-lang
Hakon|mbp has joined #ruby-lang
<frem> Gray|2: that's by _why, the lucky stiff.
<nofxx> Gray|2, poignant is a nice book, I would recomend it too. But I mean http://pine.fm/LearnToProgram/
<Gray|2> nofxx: thanks, i try
<nofxx> those two, you don't need any other to start, search/tuts and docs online will rescue you later
<nofxx> with more advanced/specific topics
<nofxx> Gray|2, dunno what you like to play with, but nice first programs with persistence are nice in ruby! try writing a simple command line that write a line to 'redis'
<nofxx> its like, 15 lines of code...read write... nice example, there's all in the redis gem README
futurechimp has joined #ruby-lang
ttilley has joined #ruby-lang
mssola has joined #ruby-lang
pemeon has joined #ruby-lang
<Gray|2> nofxx: what does mean 'redis' ? :)
<shevy> it's the name of a game I suppose
<shevy> gem install redis
<shevy> I mean gem
<nofxx> Gray|2, it's a simple database, easy to play/install then sqlite/mysql .....
<Gray|2> oh)
<Gray|2> i know sql))
<nofxx> it's not really equal, there's no SQL.. but that not the point here
<shevy> Gray|2, did you work through this already? http://pine.fm/LearnToProgram/?Chapter=01
<nofxx> Gray|2, go with sqlite if you want, just as easy too
<injekt> why are you looking at databases, Gray|2?
<nofxx> injekt, he asked for a simple program to start
<injekt> nofxx: he doesn't know any ruby
<injekt> let alone redis
<nofxx> injekt, I suggested lil persistence, to make things more rich
<shevy> hehe
<shevy> poor Gray|2 :)
<nofxx> hehe... my bad
<injekt> nofxx: I agree with you, I think that's a couple of lessons away, though
<shevy> does he at least understand blocks now?
<shevy> here are blocks explained Gray|2 -> http://pine.fm/LearnToProgram/?Chapter=10
<injekt> I have been reading facebook dev docs all day, excuse me if I sound like an asshole. Those docs make me mad :-)
<shevy> but you can avoid using Proc for a very long time, it's really not needed to learn and understand all of ruby in one day
<nofxx> injekt, I need to make some work with that fbgraph thing too... using it? the gem
<Gray|2> block it's chunk of code(function) that can be passed as argument to another function
<injekt> nofxx: I'm not now no, I'm doing all the requests myself, I got tired of all the APIs :(
<Gray|2> shevy: okay, let me read plz
<shevy> haha
<injekt> nofxx: just made our work app able to accept users linking their accounts to twitter and facebook so it's posts to those too. It's a bit of a PITA
<shevy> Gray|2 well you should understand the chapters before it though
andrewvos has quit [#ruby-lang]
<shevy> best start at chapter 1, 2, 3, 4 ... :D
<nofxx> injekt, I did the login with the oauth gems, working nice. Need to post some stuff now.
<nofxx> injekt, need to get an action approved too... 'help a institution'
<nofxx> injekt, in brazil we can donate store invoices to charity, it;s a gov thing to increase fiscal income. Some cents go to charity.
<injekt> nofxx: neat
<nofxx> we made a app to help donation of those online. fb looks nice to support.
futurechimp has joined #ruby-lang
seoaqua has joined #ruby-lang
gasbakid__ has joined #ruby-lang
rippa has joined #ruby-lang
Nss has joined #ruby-lang
ascarter has joined #ruby-lang
francisfish has joined #ruby-lang
apeiros_ has joined #ruby-lang
burns180_ has joined #ruby-lang
kitallis has joined #ruby-lang
RomyRomy has joined #ruby-lang
Teste12344 has joined #ruby-lang
Teste12344 has quit [#ruby-lang]
io_syl has joined #ruby-lang
Hakon|mbp has joined #ruby-lang
slimfit has joined #ruby-lang
SuperTa__ has joined #ruby-lang
darkf has joined #ruby-lang
Jay_Levitt has joined #ruby-lang
aza_kibou has joined #ruby-lang
morozovm has joined #ruby-lang
morozovm has quit [#ruby-lang]
<nofxx> So, what's the ruby a like hype of the moment for mobile dev? ruboto, 3 or 4 I forget now...
morozovm has joined #ruby-lang
<nofxx> I imagine jruby should be nice in android
tekin has joined #ruby-lang
headius has joined #ruby-lang
twittard has joined #ruby-lang
Sailias__ has joined #ruby-lang
A124 has joined #ruby-lang
<deryldoucette> nofxx: ruboto is jruby
<deryldoucette> see ruboto core and rubuto startup on market
<deryldoucette> ruboto irb when launched if you look at the bottom left of your tablet/phone will show itializing jruby
any-key has joined #ruby-lang
<deryldoucette> i use that along with TextWarrior and MobileDoc Free+Ruby1.93 stdlib docs to do stuff on my asus transformer
frangiz_ has joined #ruby-lang
heppy has joined #ruby-lang
twittard has joined #ruby-lang
krzyhoo has joined #ruby-lang
<seoaqua> is there any site similar with tryruby.org?
arronmabrey has joined #ruby-lang
<krzyhoo> Hey guys. How can use use group_by for nested grouping? Heres a pseudo code of what i really need
<Gray|2> seoaqua: http://rubymonk.com
frangiz has joined #ruby-lang
tbuehlmann has joined #ruby-lang
achiu has joined #ruby-lang
Austin__ has joined #ruby-lang
<krzyhoo> anyone...? :(
<seoaqua> Gray|2, thanks
<deryldoucette> krzyhoo: dropping a url and then doing anyone? idn't asking for help.
<deryldoucette> your pastie is meant to ADD to your question not BE your question
<Mon_Ouie> deryldoucette: You missed his first sentence
RomyRomy has joined #ruby-lang
<deryldoucette> ahh so I did. I offer apologies
dustacio has joined #ruby-lang
<krzyhoo> krzyhoo> Hey guys. How can use use group_by for nested grouping? Heres a pseudo code of what i really need
H2H has joined #ruby-lang
<krzyhoo> but i deed post my question
<krzyhoo> so deryldoucette can you help me?
rolfb has joined #ruby-lang
<Gray|2> i don't understand how works inspect method
<Gray|2> could you show simple example to understand?
<Mon_Ouie> It just returns a string to describe the object
<Mon_Ouie> There's an example on the page you linked
<Gray|2> Mon_Ouie: :( i don't understand...
frangiz has joined #ruby-lang
reitelles has joined #ruby-lang
cyri_ has joined #ruby-lang
burns180 has joined #ruby-lang
Tearan has joined #ruby-lang
frangiz has joined #ruby-lang
<soahccc> Hmm when I call something like this (with system method) it echos the -n within the log instead of applying the option to the echo command... system('echo -n "\0" > foo.log')
<soahccc> If I paste the same thing into my terminal it works :/
zmack has joined #ruby-lang
<apeiros_> soahccc: try reading the docs on Kernel#system
<apeiros_> though…
<apeiros_> soahccc: yeah, system uses sh, your terminal uses (probably) bash
<soahccc> echo should be the same? o.O
frangiz_ has joined #ruby-lang
RickHull has joined #ruby-lang
<apeiros_> echo in bash is a built-in and probably probably more options
<drbrain> on linux, does bash as bash behave differently from bash as sh?
Heimidal has joined #ruby-lang
Zeitfrei has joined #ruby-lang
<drbrain> I think most times bash and sh are hard-linked, but I can't recall if they have special behavior
Heimidal has joined #ruby-lang
curtism has joined #ruby-lang
curtism has joined #ruby-lang
Carnage\ has joined #ruby-lang
<apeiros_> it actually interests me, but right now the apple event is more interesting :)
RickHull has joined #ruby-lang
<drbrain> I think BSD is the only common UNIX where sh is not bash
<apeiros_> in OSX, sh ain't bash afaik
<deryldoucette> ∴ sh --version
<deryldoucette> GNU bash, version 3.2.48(1)-release (x86_64-apple-darwin11)
<deryldoucette> it is bash
<drbrain> me too
<apeiros_> hmmm
<drbrain> they're 64 bytes different
t has joined #ruby-lang
<matled> does anyone know this file format https://gist.github.com/3f582c8a03cf86bb092e? it's a backup of an android app, I guess its sqlite database.
tekin has joined #ruby-lang
mrsolo has joined #ruby-lang
andrewvos has joined #ruby-lang
<krzyhoo> andrewvos: gotta a second?
<krzyhoo> i could use your help
StevenRingo has joined #ruby-lang
<krzyhoo> need to solve a problem on how to create nested group_by
<krzyhoo> here"s what i really need (in pseudo code)
<drbrain> matled: I'd be surprised if it's a sqlite database
<matled> drbrain: why?
twittard_ has joined #ruby-lang
<matled> just from looking at the file I think I'd be able to parse it and infere the table structure. I just thought there might be an existing parser already..
<drbrain> matled: because sqlite uses a binary format
<matled> drbrain: it's the content of the sqlite database in some other format
<andrewvos> krzyhoo: You shouldn't just ask one person a question
<andrewvos> krzyhoo: And also don't ask to ask :)
<matled> I just don't know what format it is :)
<andrewvos> krzyhoo: I'm not even that good at ruby
<matled> maybe it's just something the app has implemented...
<drbrain> matled: looks like it's a simple flat-file store
<drbrain> but, easy to parse
<krzyhoo> well i tried to ask the question to the general audience
<krzyhoo> but no one came up with a solution
<andrewvos> :/
<krzyhoo> and this one is killing me
<matled> drbrain: it would be nice to know the encoding rules without looking at examples :)
<drbrain> matled: yeah :/
<andrewvos> krzyhoo: Can you trim down the example?
<andrewvos> krzyhoo: It's like 18:20 here and my brain is fucked
<Gray|2> so, i finish a book
<andrewvos> krzyhoo: So...
<andrewvos> krzyhoo: Ok I got it
Gray|2 has quit ["Once you know what it is you want to be true, instinct is a very useful device for enabling you to know that it is"]
<krzyhoo> andrewvos: if you do manage to pull this one off i will buy you beer :)
tla has joined #ruby-lang
ascarter has joined #ruby-lang
benanne has joined #ruby-lang
Heimidal_ has joined #ruby-lang
<krzyhoo> andrewvos: btw, sorry for not responding too quick. my little daughter is crying
<krzyhoo> i hope you don't feel offended
<krzyhoo> but this issue is killing me
<krzyhoo> i modified the example a wee bit
<shevy> krzyhoo teach her ruby!
lightcap has joined #ruby-lang
<shevy> krzyhoo btw that example is complicated
<shevy> can you simplify the data structures?
<shevy> to the smallest part that you can use
<andrewvos> krzyhoo: meh close enough... I have to go now: a.map {|d| {d.first => d.drop(1)}}
srbaker has joined #ruby-lang
mark_locklear has joined #ruby-lang
<andrewvos> krzyhoo: Cool?
<andrewvos> Right I'm off peace
burns180_ has joined #ruby-lang
butchanton has joined #ruby-lang
StevenRingo has joined #ruby-lang
srbaker has joined #ruby-lang
<krzyhoo> andrewvos: willl check it out now
brianpWins has joined #ruby-lang
<krzyhoo> shevy: would do gladly
<krzyhoo> but had to display the complexity
Keva161 has joined #ruby-lang
<krzyhoo> andrewvos: it is awesome
tenderlove has joined #ruby-lang
<krzyhoo> does the trick
wallerdev has joined #ruby-lang
Skif has joined #ruby-lang
reitelles has quit [#ruby-lang]
retro-in-better- has joined #ruby-lang
srbaker has joined #ruby-lang
publicvoid has joined #ruby-lang
srbaker has joined #ruby-lang
qpingu has joined #ruby-lang
gregf has joined #ruby-lang
hagabaka has joined #ruby-lang
hagabaka has joined #ruby-lang
srbaker has joined #ruby-lang
Technodrome has joined #ruby-lang
srbaker has joined #ruby-lang
srbaker has joined #ruby-lang
frangiz has joined #ruby-lang
srbaker has joined #ruby-lang
savage- has joined #ruby-lang
gianlucadv has joined #ruby-lang
<krzyhoo> andrewvos: it is awesome/quit
Heimidal has joined #ruby-lang
frangiz_ has joined #ruby-lang
slyphon has joined #ruby-lang
srbaker has joined #ruby-lang
burns180 has joined #ruby-lang
solars has joined #ruby-lang
Keva161 has joined #ruby-lang
amerine has joined #ruby-lang
<rue> Awesome, Retry, Quit? > _
srbaker has joined #ruby-lang
tyman has joined #ruby-lang
postmodern has joined #ruby-lang
tyman has quit [#ruby-lang]
pemeon has joined #ruby-lang
frangiz has joined #ruby-lang
virunga has joined #ruby-lang
virunga_ has joined #ruby-lang
justinmcp has joined #ruby-lang
Heimidal has joined #ruby-lang
lbrent has joined #ruby-lang
cg433n has joined #ruby-lang
sbabiy has joined #ruby-lang
frangiz has joined #ruby-lang
rippa has joined #ruby-lang
srbaker has joined #ruby-lang
Heimidal has joined #ruby-lang
gix has joined #ruby-lang
srbaker has joined #ruby-lang
twittard has joined #ruby-lang
slyphon has joined #ruby-lang
futurechimp has joined #ruby-lang
bnagy has joined #ruby-lang
sdeobald__ has joined #ruby-lang
srbaker has joined #ruby-lang
Sailias has joined #ruby-lang
Jake232 has joined #ruby-lang
musicmatze has joined #ruby-lang
<musicmatze> Hi there! Can anyone help me, I want to learn how to write Ruby extensions in C.
chimkan_ has joined #ruby-lang
wdperson has joined #ruby-lang
<musicmatze> I don't need tutorials or stuff, I can google this stuff on my own, but I need a person who can help me if I get stuck with stuff
gnufied has joined #ruby-lang
chimkan has joined #ruby-lang
<RickHull> come back when you get stuck
gsav has joined #ruby-lang
<musicmatze> I already got stuck... I understood how to use the VALUE stuff in C, but I didn't understood: Can I create a variable (for example a global) in C, without useing it in Ruby for writing bindings, just as I learned it in C?
<RickHull> it's rare to get a one-on-one mentorship out of the blue. but if you have a problem that someone, most will be glad to
erics has joined #ruby-lang
<RickHull> that someone *can help with
burns180_ has joined #ruby-lang
looopy has joined #ruby-lang
<musicmatze> yes, thanks!
sbabiy_ has joined #ruby-lang
andrewhl has joined #ruby-lang
twittard has joined #ruby-lang
Heimidal has joined #ruby-lang
<musicmatze> maybe my wording was odd: Can I create Variables in C as I want, without make it accessable from Ruby?
<musicmatze> ... maybe for writing bindings?
srbaker has joined #ruby-lang
<matled> musicmatze: is it really important that it is not accessible? you can create new objects from C and unless you pass them assume that they're used only by you. if someone starts modifying the methods you use to create the object or gets your object from ObjectSpace its their own fault if things break...
srbaker has joined #ruby-lang
rippa has joined #ruby-lang
srbaker has joined #ruby-lang
<musicmatze> The thing is, I try to write a binding to X. I have to create global variables (in C) where the Display* is stored. I want to create a class in Ruby for the Display to access the Display with the functions from Xlib. It's useless to access the C global Display* from Ruby, right... ? So I don't need to pass the variable to Ruby...
srbaker has joined #ruby-lang
<matled> musicmatze: first of all Display* is no VALUE, i.e. it is no ruby object, secondly you don't have to store the display in a global variable in C. I think it would make sense to create a class that holds a pointer to the Display, so you can connect to multiple X servers from ruby
srbaker has joined #ruby-lang
aBound has joined #ruby-lang
<musicmatze> You may misunderstood me! I don't want to create connections to existing X servers, I want to write Bindings to the Xlib to be able to start Displays and stuff from Ruby, to write a Windowmanager in Ruby for example!
<shevy> yeah
<shevy> the RubyOS is forming slowly
<chris2> just implement x11 directly, no need to link against du libx11
<musicmatze> chris2: what do you mean?
<dominikh> it's a protocol, you can implement it in pure ruby
<musicmatze> Excuse me, I'm from Germany and I'm not exercised in english language
<musicmatze> Ouh. I think your right... I never thought about this!
srbaker has joined #ruby-lang
<shevy> ironic thing is that chris2 and dominikh are also from Germany :D
<chris2> musicmatze: x11 is just a network protocol
<lianj> shevy: and you speak german too ;)
<musicmatze> My girlfriend told me so: "Maybe the guys are also from germany, just try it!" -.-' I feel stupid now!
<chris2> perhaps start with https://github.com/rramsden/ruby-x11
<shevy> yup musicmatze you are surrounded by folks who understand you natively
<dominikh> "just try it" – This channel still is english only, so there's not much to try :P
<musicmatze> yeah, thats right for sure! I told her, it's an english channel, so I should "talk" english!
<shevy> they are just shy, now noone wants to use deutsch anymore
<dominikh> it's rather that German is a horrible language...
<musicmatze> chris2: Ouh yes, thanks a lot for the link! I will fork this for sure!
<chris2> there was a pretty complete version of it for ruby 1.6
Gekz has joined #ruby-lang
Gekz has joined #ruby-lang
kyrylo has joined #ruby-lang
<musicmatze> chris2: I searched X11 bindings yesterday and found none. Now I'm happy like little kids at Christmas!
rippa has joined #ruby-lang
ilyam has joined #ruby-lang
dhruvasagar has joined #ruby-lang
mephux has joined #ruby-lang
flebel has joined #ruby-lang
bglusman has joined #ruby-lang
Guest37890 has joined #ruby-lang
jayne has joined #ruby-lang
andrewhl has joined #ruby-lang
burns180_ has joined #ruby-lang
Sleck has joined #ruby-lang
mikeric has joined #ruby-lang
<Sleck> Hello everyone, I installed haste's gem but I cannot use haste command, why ?
<Sleck> Maybe a PATH error, I don't know so much gem.
<Sleck> Someone can help me ?
<rue> Omg it's a chris2
<musicmatze> lianj: thank you for the link, too! Do you know that guy?
<lianj> no, but i have taken part out of that lib for my own tinkering
gsav has joined #ruby-lang
andrewhl_ has joined #ruby-lang
<musicmatze> lianj: He's writing curious Ruby code! Indention of more than 2 spaces *_*
<musicmatze> lianj: what kind of tinkering do you do?
andrewhl__ has joined #ruby-lang
<Mon_Ouie> He's not using spaces, he's using tabs
<shevy> burn him!
<Sleck> Need help
sbabiy has joined #ruby-lang
<musicmatze> it's so ugly. I would like to fork him and fix this, but so much lines!? O_o
<yorickpeterse> What would be a good Ruby sandbox to prevent people from being able to execute "funny" code?
Swimming_Bird has joined #ruby-lang
<yorickpeterse> There's a bunch of GH projects but they don't seem to very active/popular
<Mon_Ouie> It's not the convention, but it's not ugly; it's just that tabs are being displayed as wide as 8 spaces in this case
<Mon_Ouie> Any editor can allow to reconfigure that to 2, 4, or whatever you want
Sleck has quit [#ruby-lang]
<shevy> musicmatze well it's easy to fix the indent in the editor
<musicmatze> right.
<shevy> but
<shevy> it is even easier to shoot the tab-users :>
<musicmatze> right, too! :-D
Heimidal_ has joined #ruby-lang
cored has joined #ruby-lang
cored has joined #ruby-lang
Heimidal_ has joined #ruby-lang
<musicmatze> allright, I'm off now! Bye
<chris2> rue: sup dude
<rue> chris2: Very little :) Did your 1.9 upgrade go OK?
<chris2> yes
<chris2> was not much work either
tekin has joined #ruby-lang
dominikh has joined #ruby-lang
cg433n has joined #ruby-lang
macmartine has joined #ruby-lang
kyrylo has joined #ruby-lang
kyrylo has joined #ruby-lang
sdeobald__ has joined #ruby-lang
sbabiy has joined #ruby-lang
benanne has joined #ruby-lang
PhilCK has joined #ruby-lang
jenrzzz has joined #ruby-lang
adambeynon has joined #ruby-lang
burns180 has joined #ruby-lang
Technodrome has joined #ruby-lang
LnxBil has joined #ruby-lang
<LnxBil> Hi everybody! I want to regmatch an utf8-string and it doesn't work. I use /.../u and ruby 1.9.3 - Regexpr works with english letters, but not with non-english. Any ideas?
<apeiros_> LnxBil: //u has no effect on 1.9
<apeiros_> LnxBil: ri Regexp, it has a quite good overview of available character classes
Heimidal has joined #ruby-lang
<apeiros_> oh, actually I have to correct myself, //u has an effect, it ensures that the encoding of the regexp itself is considered to be utf-8
outoftime has joined #ruby-lang
sheila has joined #ruby-lang
<LnxBil> For the record, \p{word} instead of \w does the trick. Thanks apeiros_
<apeiros_> oh, wow, if I'd had read your question properly, I could have even told you that :-S
<apeiros_> I thought you didn't want non-english letters to match, sry :)
<LnxBil> No problem, I found my answer :-D
davidw has joined #ruby-lang
phlipper has joined #ruby-lang
sheila has joined #ruby-lang
Kero has joined #ruby-lang
CodyD has joined #ruby-lang
gasbakid has joined #ruby-lang
DEac- has joined #ruby-lang
<Jake232> Is there a way I can make it so that I can access my hashs values
<Jake232> via
<Jake232> some_hash.some_key
<injekt> sure, but why?
<apeiros_> Jake232: reinventing openstruct?
<apeiros_> and yes, see Object#method_missing
<apeiros_> alternatively see Object#define_singleton_method
slimfit_ has joined #ruby-lang
<Jake232> I may have being thinking about this in the wrong way, pretty sure I just found a better way to do this
<kyrylo> What's up with ruby-lang.org?
<kyrylo> Ah, wait. Everything is ok now.
fayimora has joined #ruby-lang
<Jake232> still down here
brushbox has joined #ruby-lang
sheila has joined #ruby-lang
<drbrain> it's probably trying to buy the new iPad
erpelchen has joined #ruby-lang
<kyrylo> Did they air it today?
<drbrain> yes
<drbrain> new iPad, new apple TV
<erpelchen> hello everyone. im looking for advice on doing something the right way
burns180_ has joined #ruby-lang
<injekt> erpelchen: what's your question?
retro-in-better- has joined #ruby-lang
<erpelchen> working on a shell tool thats wrapping around another process. so i guess Id have to read and write both the in/out of my process as well as the other tools in-/output
<erpelchen> something as simple as gets and puts is sufficient, but I have to keep them from blocking each other. from what i know and have read, threads would be an option. are there better/easier ones?
<dominikh> IO.select
StevenRingo has joined #ruby-lang
brushbox has joined #ruby-lang
<erpelchen> @dominikh I’ll read up on that
srbartlett has joined #ruby-lang
JEG2 has joined #ruby-lang
brownies has joined #ruby-lang
Austin__ has quit [#ruby-lang]
gsav has joined #ruby-lang
jkyle_ has joined #ruby-lang
igaiga has joined #ruby-lang
havenn has joined #ruby-lang
H2H has joined #ruby-lang
<erpelchen> okay, so just to check if I understand: I’d give IO.select the output of the process that i monitor, and the stdin(?) of my program and would get back an array with those that have something new for me. How can I figure out which ones these are, if the actions what to do with that input differ?
virunga has joined #ruby-lang
<drbrain> erpelchen: you see if the socket you care about is in the return set
<erpelchen> argh. Its getting late, maybe I should continue tomorrow :D *facepalms self*
<erpelchen> thank you drbrain and dominikh
<dominikh> :)
burns180 has joined #ruby-lang
Swimming_Bird has joined #ruby-lang
morozovm has joined #ruby-lang
srbaker has joined #ruby-lang
leriksenau has joined #ruby-lang
yorickpeterse has joined #ruby-lang
leriksenau has quit [#ruby-lang]
QaDeS has joined #ruby-lang
<erpelchen> If I don’t do anything unless there is any input from the terminal or output from the controlled process, do I really need the timeout for IO.select ?
t has joined #ruby-lang
<jaimef> hate it when something works fine in irb but not irl under bundler
<wwalker> jaimef: it's controlled by the number of seals by the pier.
<drbrain> erpelchen: if you want user input to modify the subprocess, yes
<drbrain> hrm, actually, no
savage-_ has joined #ruby-lang
woollyams has joined #ruby-lang
<erpelchen> cool
<Technodrome> so who is working on a startup?
gsav has joined #ruby-lang
<drbrain> I worked on some startups
<injekt> I am
<wwalker> any recommendations for how to most cleanly handle class instance variable accessors? Currently I do: https://gist.github.com/1996998
<injekt> class << self; attr_accessor :base_dir; end
WillMars_ has joined #ruby-lang
<drbrain> wwalker: ^^
tla has joined #ruby-lang
<wwalker> injekt: drbrain: thank you! Of course while writing my question I thought about it differently and then searched again with different terms and found that same thing. Would you create an instance accessor like I did, or pepper the code with "self.class.base_dir"?
<wwalker> versus just base_idr
<wwalker> base_dir
Mon_Ouie has joined #ruby-lang
<Jake232> if I have ['string1','string2'], and I want to turn that to ['<p>string1</p>','<p>string2</p>'], am I better just usting the map function
<Jake232> and appending the beggining & ens of the string?
<injekt> Jake232: yes
ovnimancer has joined #ruby-lang
<jaimef> wwalker: hah
<drbrain> Jake232: I would use map too
<Jake232> I figured map was the way to go
<Jake232> thanks
<injekt> wwalker: meh, that's really down to you
<injekt> wwalker: the helper method is merely sugar, just document it so
srbartlett has joined #ruby-lang
Sailias has joined #ruby-lang
amerine has joined #ruby-lang
matti has joined #ruby-lang
srbaker has joined #ruby-lang
<wwalker> injekt: thanks.
retro-in-better- has joined #ruby-lang
ilyam_ has joined #ruby-lang
ilyam_ has joined #ruby-lang
burns180_ has joined #ruby-lang
jenrzzz has joined #ruby-lang
Heimidal has joined #ruby-lang
achiu has joined #ruby-lang
<zenspider> hoe 2.16.0 released
<deryldoucette> zenspider: she's been upgraded huh? ;)
Technodrome has joined #ruby-lang
shevy has joined #ruby-lang
phlipper has joined #ruby-lang