Spooner has quit [Remote host closed the connection]
ibtkm has joined #ruby
chrishun_ has joined #ruby
phretor has joined #ruby
d2dchat has quit [Remote host closed the connection]
<phretor>
is it possible to tell `bundle install` to install the gems in a local directory?
apeiros_ has joined #ruby
AlSquire has joined #ruby
<ibtkm>
hey every body, How can I put all methods among just one "rescue" statement? I don't want to put each method in a "rescue" statement.
`p has quit [Ping timeout: 264 seconds]
chrishunt has quit [Read error: Operation timed out]
chrishun_ is now known as chrishunt
ivar has joined #ruby
NiteRain has joined #ruby
<ivar>
I have a class that mixes in Enumberable, so I need to implement 'each'. I want to delegate 'each' to an ActiveRecord.find_in_batches query. If I didn't have to supply args to find_in_batches, this would be doable with delegate. How should I do this ?
<havenwood>
XVirus: If you `gem install pry` from in Pry you can type `help` to see Pry-specific commands (worth a read).
ttt has joined #ruby
<lewix>
XVirus: don't believe everything you read on irc
cyong has quit [Max SendQ exceeded]
jrendell has quit [Read error: Operation timed out]
<XVirus>
I still don't understand how is irb a problem in my case
cyong has joined #ruby
<lewix>
XVirus: why don't you just run the file with the ruby interpreter
<havenwood>
XVirus: Pry has received a lot more love than irb. Very, very helpful. In your current case you need to reset irb, pry can do that.
cyong has quit [Max SendQ exceeded]
sam113101 has quit [Quit: WeeChat 0.3.8]
<lewix>
banisterfiend: I'll install pry when I'm done learning =)
<XVirus>
isn't a re load "file.rb" enough ?
cyong has joined #ruby
<havenwood>
Anyways, Pry doesn't make it harder for noobs and very powerful as you learn it.
sam113101 has joined #ruby
cyong has quit [Max SendQ exceeded]
jerius has joined #ruby
<lectrick>
havenwood: reverse_each.with_object is faster/better t han reverse.each_with_object ?
<XVirus>
pry looks very neat
<banisterfiend>
lewix: i dont see how that follows, it'll aid you in your learning IMO
splud has joined #ruby
<havenwood>
lectrick: Yup, instead of doing a sort, then iterating - it iterates from back to front! :D
cyong has joined #ruby
<banisterfiend>
pull source/docs for nearly any method, etc
danman has joined #ruby
<lectrick>
XVirus: Pry is the bees' knees. When you lurves it, don't forget to thank banisterfiend :)
cyong has quit [Max SendQ exceeded]
<XVirus>
banisterfiend: Thanks :-)
<havenwood>
lectrick: So no sort overhead. Just iterates in opposite direction.
<lewix>
banisterfiend: i don't have much space on my computer. it's the macbook air
cyong has joined #ruby
vierja has quit [Read error: Connection reset by peer]
<lewix>
banisterfiend: it's either irb or pry
cyong has quit [Max SendQ exceeded]
<banisterfiend>
:)
<lectrick>
havenwood: aha. nice
ilyam has quit [Quit: ilyam]
cyong has joined #ruby
cyong has quit [Max SendQ exceeded]
cyong has joined #ruby
<lewix>
XVirus: load 'file.rb' is enough, but if you run attr_accessor :balance in irb before irb still remembers it
krislappy is now known as krisfremen
philcrissman has quit [Remote host closed the connection]
<havenwood>
banisterfiend: Thanks for Pry!! ♥╣[-_-]╠♥
<lewix>
lol
<banisterfiend>
cool emoticon :D
cyong has quit [Max SendQ exceeded]
Voodoofish430 has quit [Quit: Leaving.]
<lewix>
banisterfiend: thanks for pry.i love the love
cyong has joined #ruby
admitted_limited has quit [Quit: admitted_limited]
cyong has quit [Max SendQ exceeded]
cyong has joined #ruby
cyong has quit [Max SendQ exceeded]
Choobie has joined #ruby
Choobie has quit [Changing host]
Choobie has joined #ruby
becom33 has joined #ruby
jef_abraham has joined #ruby
admitted_limited has joined #ruby
cyong has joined #ruby
<charlie_>
Hello - question about modules. To define a method in a module, like Math::sqrt or something, you need to do module Math; def Math.sqrt(...); ...; end; end yeah? does that mean that methods in modules are really in the singleton class of the module? I'm confused
<becom33>
I want to a validate a only a url a clear url
mockra_ has quit [Remote host closed the connection]
cyong has joined #ruby
gyre007 has joined #ruby
dmiller has quit [Ping timeout: 256 seconds]
hbpoison has quit [Ping timeout: 255 seconds]
cyong has quit [Max SendQ exceeded]
<havenwood>
becom33: require 'uri'; URI::regexp
<lectrick>
The ability to chain Ruby enumerators (and the almost-magic currying of block args) is amazing.
cyong has joined #ruby
cyong has quit [Max SendQ exceeded]
cyong has joined #ruby
twoism has quit [Remote host closed the connection]
cyong has quit [Max SendQ exceeded]
<havenwood>
becom33: URI.regexp i mean.
apeiros_ has quit [Ping timeout: 264 seconds]
newUser1234 has joined #ruby
<havenwood>
becom33: URI::ABS_URI
<lewix>
charlie_: you defined a singleton method in the module Math, you could have defined an instance method that could be call by the instance of the a class that mix in module Math
quila23 has quit [Ping timeout: 256 seconds]
<lewix>
called*
joofsh has joined #ruby
<Quadlex>
"The Ruby answer to both kinds of bugs is to write automated tests, lots and lots of automated tests" This is both the truest and funniest thing I have ever heard about Ruby
<lectrick>
shevy: dude just use inline tests, it's stupid easy
<havenwood>
becom33: If you don't want to allow spaces, try: URI::ABS_URI
<charlie_>
lewix: this is why I'm confused: when you call a method on an object, you check the singleton class, then the class. so when i call Math::sqrt, how does it find sqrt? sqrt is a method in the module Math, not in the class of Math, which is Module, see what I mean?
dmiller has joined #ruby
huoxito has joined #ruby
<shevy>
lectrick what for?
icole has quit [Remote host closed the connection]
ddd has quit [Ping timeout: 245 seconds]
<lectrick>
if __FILE__==$PROGRAM_NAME; require 'test/unit'; class WtfHappenedToRefinementsTest < Test::Unit::TestCase; def test_refinement; end; end; end # And you're off! Just stick that at the bottom of any Ruby file.
<havenwood>
becom33: URI::ABS_URI seems to meet your test case expectations: url =~ URI::ABS_URI
<becom33>
havenwood, ABS_URI works fine
<becom33>
:D
<havenwood>
becom33: :)
<shevy>
charlie_ you can use module methods
ndngvr has joined #ruby
<becom33>
thanks
<lectrick>
shevy: because it validates your code, and when you're first building something out you rip out so much and change so much in a unit of time that it is the only way to validate that your cool-ass refactor didn't break anything
<becom33>
hey shevy after a long time man
<shevy>
lectrick ok now you argued for a big project here that requires refactoring. what about standalone .rb files?
<shevy>
charlie_ for instance: module Test; def self.yes; puts 'this is yes'; end; end; Test.yes # this is yes
jef_abraham has quit [Ping timeout: 248 seconds]
<shevy>
hey becom33 still in the wrong part of the world, are you? :-)
<charlie_>
shevy: thanks, so is yes a method of the singleton class of the object Test?
<shevy>
charlie_ well not sure what you mean with object here
jef_abraham has joined #ruby
jef_abraham has quit [Client Quit]
<shevy>
are modules objects? hmm
<charlie_>
shevy: yeah modules are objects, instances of the class Module
<shevy>
what
<shevy>
ohhhh
<lewix>
what do you mean by Math::sqrt
<shevy>
Module.new works hmmmmm
<havenwood>
shevy: I agree with the refactoring argument for tests. When I don't TDD I often seem to go back and add tests just cause I love refactoring and tests save a ton of time. Also, minitest/pride is awesome, all the colors make the code seem win.
<charlie_>
shevy: classes are also modules
<shevy>
whaaaat... classes are modules?!?!
<charlie_>
shevy: ruby's object oriented, so everything is an object
<lewix>
whats your point
rocket has joined #ruby
<havenwood>
shevy: Class.superclass; #=> Module
<shevy>
oh
<havenwood>
shevy: Module.class; #=> Class
<shevy>
I find that a bit confusing right now :-)
<shevy>
the superclass of Class is Module, but Module is also a class... hmmmm
<lewix>
calss.ancestors
<lewix>
class.ancestors*
adkron__ has joined #ruby
<charlie_>
shevy: yeah well this is why i'm confused about where Math.sqrt lives. is is a method in the object Math, or is it a method of the singleton class of Math
<havenwood>
shevy: The superclass of a Class is a Module whose class is Class, whose superclass is a Class ad infinitum.
<lewix>
it's a method
<shevy>
charlie_ I dunno, I never thought of calling Math an object before
<shevy>
I was always happy to say that Math is a module and sqrt is a class method (or do you say module method here??? hmmmm)
rupee has quit [Quit: Leaving]
<becom33>
shevy, yes I am
<lewix>
havenwood: It's a well engineered circle
<shevy>
I need beer now, afk ;-)
<becom33>
btw dude I goota as . I'm working on a cli app and I was wondering if there is a way I add a code that copies the output coming out from the script into clipboard
<becom33>
ask &
<becom33>
ask *
<havenwood>
lewix: Oops, except I messed up and my last Class should have been Module. Now I need a beer too. >.>
<charlie_>
when I do Math.sqrt, i'm calling a method on the object Math, calling a method looks in the class and singleton class of the object. the class of Math is Module, so you can see where i'm confused about how Math.sqrt works, unless sqrt is actually a method on the singleton class of Math
ddd has joined #ruby
<havenwood>
lewix: Agreed, hurts my head but seems to really make cool stuff possible.
Quebert has quit [Ping timeout: 248 seconds]
<havenwood>
charlie_: Math is a Module and sqrt is a class method.
jdunck has quit [Quit: Computer has gone to sleep.]
tjbiddle has joined #ruby
<lectrick>
shevy: ok I ate my own dogfood and added some quick tests to the "roman numerals just for fun" code I just wrote: https://gist.github.com/pmarreck/5104951
<havenwood>
charlie_: E.g.: module Math; def self.sqrt end
<lectrick>
shevy: That's my "i just need a test that runs only when this file is run by itself" pattern. You can start there and later move it into a suite.
<havenwood>
becom33: yeah, you can redirect output to also go to clipboard
<lectrick>
shevy: A lot of my Ruby class files have unit tests like that, except once I move the actual test out, I just require it at the bottom. That way whenever I edit a class in Sublime Text 2 I can literally just hit command-B and instantly know if I broke anything
<becom33>
havenwood, I was wondering how . I'm still googling for some awnsers
ryanf has quit [Ping timeout: 250 seconds]
jekotia has quit [Quit: ChatZilla 0.9.90-rdmsoft [XULRunner 18.0.2/20130201065344]]
mahmoudimus has quit [Quit: Computer has gone to sleep.]
<lectrick>
shevy: And this has saved my ass countless times. And this is why tests are cool. They're easy, and you're going to be "puts"ing some output anyway to prove your code works to yourself, so it's just 1 hop away from that
bonhoeffer has joined #ruby
jekotia has joined #ruby
<charlie_>
havenwood: if methods of modules are class method, then how are methods like puts found? Kernel gets mixed in by Object, but mixing in a module does not mix in the singleton class (where class methods live, is that right?)
Hanmac1 has quit [Ping timeout: 256 seconds]
h4mz1d has joined #ruby
<lectrick>
havenwood: I added tests to my gist lol. Just to prove how easy it is
<havenwood>
becom33: Do you need to support a variety of platforms or just one OS?
<lectrick>
havenwood: (and I should have STARTED with the test, I know)
<havenwood>
becom33: Do you want to have `puts` both write to stdout and clipboard?
Ontolog_ has joined #ruby
tjbiddle has quit [Quit: tjbiddle]
tomzx_mac has joined #ruby
<havenwood>
lectrick: Yeah..... I don't often do that either. >.<
<becom33>
I would love if it supports for linux, win & mac
apok has quit [Quit: apok]
<becom33>
havenwood, what do u mean puts before
<becom33>
?
<becom33>
oh yea
<becom33>
like if there are two string output and only one string is copied to the clipboard . yes
TTilus has quit [Ping timeout: 264 seconds]
daed has quit [Ping timeout: 264 seconds]
TTilus has joined #ruby
daed has joined #ruby
<havenwood>
becom33: I'd write a method that takes a block and inside the block does clip/stout printing.
<havenwood>
becom33: Writing to STDOUT and IO.popen should do the trick, just need the disto-specific clipboard code.
<charlie_>
lewis: ah awesome, so they are singleton methods. thanks very much. now I just don't understand how I can call a method like puts in any object. Kernel is mixed in, but the singleton class of a mixed in module is NOT mixed in as well
<havenwood>
lectrick: For exploratory hacking sometimes i find tests offensive, i know its heresy to some, oh well.
<lewix>
charlie_: Kernel.singleton_methods.include?(:puts) => true , banisterfiend: another exception?
sam113101 has quit [Quit: WeeChat 0.3.8]
<havenwood>
lectrick: I'd just change it to minitest, but I like it. ;)
NiteRain has joined #ruby
sam113101 has joined #ruby
<lectrick>
havenwood: offensive is a strong word lol. Here's what I find... after I write some code I will often "puts" some output to prove it works. A test is just a step from that. I actually think the asserts should be a core part of the language. and havenwood, I usually use minitest but this works out of the box
<charlie_>
lewix: i'm just trying to figure out how this works, and now I can't solve the problem it's frustrating me and i'd like to resolve it
<charlie_>
lewix: there's no particular wider problem that I'm trying to solve
<becom33>
aww now I get havenwood
<havenwood>
lectrick: Yeah, heh, offensive is harsh. Was just being silly trying to mirror the vitriol that i hear towards non-testers from a few BDD folk..
<havenwood>
becom33: Just checked it on OS X, and it indeed copies puts to clipboard.
<havenwood>
becom33: So just modify it to puts to both STDOUT and IO.popen and g2g.
cmdr-prmpt has joined #ruby
<lectrick>
havenwood: it is wrong to force anyone to do anything. unfortunately, the best way for people to realize what is better is for them to keep trying what is worse for long enough until they realize. unfortunate, because it takes time.
<havenwood>
lectrick: aye
alexim has quit [Quit: sleep]
mercwithamouth has joined #ruby
<havenwood>
lectrick: And like pajamas, can be awesome but not always perfect for the situation.
apeiros_ has quit [Ping timeout: 245 seconds]
echobinary has quit [Read error: Connection reset by peer]
echobinary has joined #ruby
ffranz has quit [Quit: Leaving]
sporangiola56 has quit [Remote host closed the connection]
trichloronitrome has joined #ruby
hybris has quit [Quit: hybris]
<lectrick>
havenwood: LOL, when my gf asked me to get her these kid-like adult pajamas for xmas, I was like, errrr... uhhh... do they have g-string pajamas?
etcetera has joined #ruby
<lewix>
charlie_: I know it is
<havenwood>
becom33: Avdi's RubyTapas has something just like what you need. He proxies puts output and has really good explanation of modifying $stdout. Can't remember the episodes.
robbyoconnor has joined #ruby
<becom33>
ok bro let me check into it
sirish_ has joined #ruby
<havenwood>
lectrick: hehe
<lewix>
charlie_: I've already accepted it as exception until proved otherwise
sirish has quit [Ping timeout: 256 seconds]
tjbiddle has quit [Quit: tjbiddle]
twoism has joined #ruby
<lectrick>
ok i gotta leave ruby and this channel or I will never decompress this evening. off to play Borderlands 2... /afk
pac1 has quit [Ping timeout: 252 seconds]
<charlie_>
lewix: I've figured it out: module methods are defined using module_function, http://ruby-doc.org/core-2.0/Module.html#method-i-module_function, so it's not an exception in the vm, it's that the methods go into more places than just either the singleton or the object
<charlie_>
lewix: thanks for helping me think it through
<charlie_>
lewix: yeah, it also sets some properties on it
<charlie_>
lewix: wow, it's certainly a hell of a lot more complicated than method Foo; def self.foo; end; end
sam113101 has quit [Quit: WeeChat 0.3.8]
yacks has joined #ruby
sam113101 has joined #ruby
<lewix>
charlie_: actually now it makes sense. the fact that it's private
DaltonUS has joined #ruby
DaltonUS has quit [Client Quit]
<lewix>
charlie_: It seems we have both the singleton and the private instance methods define in Kernel, which explain it
<lewix>
defined*
gyre007 has joined #ruby
Rioji has quit [Remote host closed the connection]
Emplitz has joined #ruby
<lewix>
charlie_: Object.puts "lewis" doesn't work for a reason
twoism has quit [Read error: Connection reset by peer]
danman has quit [Quit: danman]
ryanf has quit [Ping timeout: 255 seconds]
twoism_ has joined #ruby
bonhoeffer has quit [Quit: bonhoeffer]
<charlie_>
lewix: i couldn't see this because the docs don't say what imperative actions, such as module_method, have been run after the methods have been defined, so you have no way of knowing that stuff without reading the source code
twoism_ has quit [Remote host closed the connection]
squidBits has quit [Quit: whoops]
<lewix>
charlie_: knowing what?
jjbohn has joined #ruby
twoism_ has joined #ruby
<lewix>
charlie_: I didn't read the source code, it's all deduction. take what I say with a grain of salt, but so far it seems reasonable to me
<UberNerdGirl>
hemanth: are you from Hacker School?
<Es0teric>
UberNerdGirl where in NY is the hackerschool at?
<UberNerdGirl>
havenwood: I must say your handle/username is so soothing to look at
h4mz1d has quit [Ping timeout: 276 seconds]
<hemanth>
UberNerdGirl, yes
<UberNerdGirl>
Es0teric: it is in downtown NY
<havenwood>
UberNerdGirl: I like Project Euler! Haven't done one in a while, get my 25 badge with one more. :) Never took math after high school so I have to look em up a lot!
<sam113101>
what about mine?
<hemanth>
UberNerdGirl, i'm in there team, but not in ny
<UberNerdGirl>
sam113101: sorry yours is … (voice lowers to a whisper) … (drumroll)… generic!!! :O
<Es0teric>
wow how did i not know about hackerschool and i've been living in NYC for awhile
<Es0teric>
i feel... deprived
<sam113101>
fits my personality
<sam113101>
I'm just a man
<UberNerdGirl>
hemanth: orly? i iz confuzzled. do we know each other in person?
<sam113101>
a generic guy
<UberNerdGirl>
uh oh
<havenwood>
Look up the definitions of math terms i mean, not the answers. >.>
<UberNerdGirl>
that's a tragedy
<UberNerdGirl>
havenwood: what did you study in college, if i may ask?
<Es0teric>
girl programmers are pretty cool... very hard to come by them though
Honeycomb has quit [Quit: Leaving.]
<UberNerdGirl>
hemanth: i visited your flickr
<Es0teric>
very rare
<UberNerdGirl>
Es0teric: that makes me depressed
<UberNerdGirl>
i wish i had more girl friends
_br_ has joined #ruby
<hemanth>
UberNerdGirl, heh heh ok, checkout my site as well...
<UberNerdGirl>
i am so obsessed with programming i am so seriously confused as to why more girls are not ecstatically flocking to such lush pastures of paradise
<Es0teric>
lol well UberNerdGirl it happens... i mean i have a friend that has her CCNA and Linux admin cert
<Es0teric>
which is wierd, because i have never seen a girl have that
<UberNerdGirl>
hemanth: i saw your flickr pic and you look familiar! did we meet through LispNYC?
<UberNerdGirl>
I loooove Lisp
<havenwood>
UberNerdGirl: My little sis applied, would have been there too...! But she didn't get in, she'd just started programming and they told her to keep studying and reapply.
<UberNerdGirl>
Scheme and Racket are my favorites. Here in New York, hackers love playing with Clojure
pdamer has quit [Quit: pdamer]
<UberNerdGirl>
havenwood: so you had the video interviews? with whom did you interview?
<hemanth>
UberNerdGirl, nope
rburton- has joined #ruby
<UberNerdGirl>
i'll have to talk to the co-founders tomorrow saying we crossed paths and you helped me earlier on IRC. They would wear a huge grin on their face :)
<havenwood>
UberNerdGirl: Yeah, I'm terrible with names though, let me look and see who it was.
<UberNerdGirl>
hemanth: actually, I am the most UBER NERDY girl I know, and I am so lucky b/c I am in Hacker School surrounded by very exciting, fun, cute, charming, silly, intelligent, girls
R_Macy has joined #ruby
banjara has joined #ruby
Banistergalaxy has quit [Ping timeout: 250 seconds]
mattbl has quit [Quit: This computer has gone to sleep]
<hemanth>
UberNerdGirl, good for you.
<Es0teric>
lol
Banistergalaxy has joined #ruby
<UberNerdGirl>
yes, i am extremely puzzled as to why more people aren't wildly neurotically obsessed with programming
_br_ has quit [Excess Flood]
* hemanth
poke Es0teric
<Es0teric>
sup, hemanth
<UberNerdGirl>
i did web design / graphic design / light front-end web development for 10+ years
<UberNerdGirl>
then 1.5 years ago
<Es0teric>
UberNerdGirl some people find it intimidating
<havenwood>
UberNerdGirl: Allison and David
echobin25 has quit [Remote host closed the connection]
<UberNerdGirl>
I discovered Ruby, functional programming, Lisp.
<UberNerdGirl>
I felt I had died and gone to heaven
<hemanth>
Es0teric, nothing new, just pawing at some Ruby2.0
<Es0teric>
UberNerdGirl last month i discovered ruby... made the switch from PHP
<UberNerdGirl>
Now all my unbridled nerdy fantasies are slowly coming true
<UberNerdGirl>
havenwood: David is criminally adorable
<Es0teric>
hemanth yeah whats new in ruby 2.0 anyway?
<UberNerdGirl>
He wears a red little winter cap and he looks like a charming lawn gnome
<UberNerdGirl>
it kills me every time i see it
<UberNerdGirl>
so awesome
apeiros_ has quit [Ping timeout: 256 seconds]
<UberNerdGirl>
and he gives such encouraging, empowering, inspiring speeches to us at Hacker School :D :D
Amnesthesia has quit [Remote host closed the connection]
ryanf has quit [Ping timeout: 255 seconds]
<shevy>
the & is really weird
<FuzaiDesktop>
that looks more like what i'm trying to do
<UberNerdGirl>
wow that looks awesome
<UberNerdGirl>
.tap &:shift
<UberNerdGirl>
lmao
<UberNerdGirl>
i loves it
<havenwood>
FuzaiDesktop: #tap can be handy, and to_proc is always fun :P
<hemanth>
shevy, yes & is weird
<FuzaiDesktop>
how do i use that inside a hash?
hogeo has joined #ruby
tish has joined #ruby
<UberNerdGirl>
oh i have an array question to. say I have defined an integer.prime? which returns 'true' or 'false' depending on whether the number is prime
<UberNerdGirl>
if I have a range upwards to infinity, like
<FuzaiDesktop>
hash = { "sayings" => JSON.parse(`cat file`) } and i seem get the name of the file on the front of the return
<UberNerdGirl>
2.upto(1/0.0)
banjara has quit [Quit: Leaving.]
<UberNerdGirl>
or, as my favorite Rubyist Spooner would write 2.upto(Float::INFINITY)
banjara has joined #ruby
<havenwood>
Float::INFINITY
<FuzaiDesktop>
nm i think i see whats going on
<havenwood>
haha, was gunna say
<UberNerdGirl>
havenwood: when i first saw that
<UberNerdGirl>
i exclaimed
<UberNerdGirl>
OH YES, I would like to float to infinity!
<UberNerdGirl>
upon the cottony pillows of clouds! :D
<shevy>
man
<shevy>
that's some enthusiasm there
<UberNerdGirl>
anyways if I have a range upwards to infinity like 2.upto(infinity).bring_me_the_first(10) { |x| x.prime? }
<UberNerdGirl>
how do i do that?
<UberNerdGirl>
shevy: you should see me in person. I jump up and down
cflux has quit []
gyre007 has quit [Ping timeout: 252 seconds]
<UberNerdGirl>
my question is worded in a ghastly way, sorry
browndawg has joined #ruby
<shevy>
it would scare me too much, I am more like a hermit in a cave with a computer
browndawg has quit [Max SendQ exceeded]
<UberNerdGirl>
how do I take the first instances in which the .prime? was true?
_br_ has quit [Excess Flood]
<UberNerdGirl>
so basically, the first 10 prime numbers in the range I pass it in ( 2 up to infinity )
<UberNerdGirl>
i looked at take_while, and step
pyx has joined #ruby
<UberNerdGirl>
and i couldn't make sense of it :(
<UberNerdGirl>
that and i am sleepy
mahmoudimus has joined #ruby
browndawg has joined #ruby
banjara has quit [Client Quit]
<shevy>
only chuck norris can count to infinity without falling asleep
<shevy>
he did so even twice
banjara has joined #ruby
<UberNerdGirl>
shevy: quit watching adventure movies and answer my question
banjara has quit [Client Quit]
stopbit has quit [Quit: Leaving]
<UberNerdGirl>
;)
banjara has joined #ruby
<shevy>
well I am not sure about that prime method
banjara has quit [Client Quit]
pyro111 has joined #ruby
banjara has joined #ruby
<UberNerdGirl>
shevy: oh i said, assuming I have already created it
<havenwood>
2.upto(∞).slice(10) would be groups of 10.
<UberNerdGirl>
i wrote my own prime boolean that tells me whether a number is prime
<shevy>
oh slicing
girija has quit [Ping timeout: 248 seconds]
<UberNerdGirl>
so 2.upto( wow! how did you make that symbol? ).slice(10) would return the first group of 10?
mpfundstein has joined #ruby
<sam113101>
>not using the prime lib
dougireton has quit [Quit: Leaving.]
_br_ has joined #ruby
<havenwood>
UberNerdGirl: On OS X, ∞ is option-5
banjara has quit [Client Quit]
<shevy>
UberNerdGirl don't you just return an array here anyway?
banjara has joined #ruby
<havenwood>
UberNerdGirl: I like to do: ∞ = Float::INFINITY
DrCode has quit [Remote host closed the connection]
<shevy>
UberNerdGirl that's the enthusiasm of youth, the old ones become lazy
<UberNerdGirl>
shevy: i am slowly becoming a mummified fossil
<UberNerdGirl>
i will leave my 20's very soon
<UberNerdGirl>
:(
<havenwood>
UberNerdGirl: Yeah, I had fun doing it myself on ones that weren't too slow. I didn't actually implement sieves of eratosthenes, but.. that would actually be a fun challenge.
<UberNerdGirl>
havenwood: how exciting!!
* lushious
pastures
<UberNerdGirl>
i was gazing at sieves of eratosthenes like 14 ago!!!!
<UberNerdGirl>
i loved it!
<UberNerdGirl>
so many different sieves and tricks with primes! :D
<UberNerdGirl>
14 mos
DrCode has joined #ruby
apeiros_ has joined #ruby
_br_ has joined #ruby
_br_ has quit [Excess Flood]
_br_ has joined #ruby
DrCode has quit [Remote host closed the connection]
heyitsdave has quit [Ping timeout: 276 seconds]
elico has quit [Quit: elico]
DrCode has joined #ruby
girija has joined #ruby
sepp2k has joined #ruby
<lewix>
20:56 UberNerdGirl: yes, i am extremely puzzled as to why more people aren't wildly neurotically obsessed with programming : lol
<UberNerdGirl>
lewix: so what?
<UberNerdGirl>
i want to tattoo the metacircular evaluator in Scheme on my back
<UberNerdGirl>
lewix: how long have you been coding?
<lewix>
UberNerdGirl: I discovered it when I was ten, played around with the syntax of a few languages and took it seriously recently myself.
sayan has quit [Quit: Leaving]
_br_ has joined #ruby
<lewix>
UberNerdGirl: I was pretty into it back then until I discovered girls, it slowed me down for a while
<UberNerdGirl>
boring boring boring
<hemanth>
:D
<lewix>
haha
<UberNerdGirl>
people who get distracted by boys/girls are so boring to me
mattbl has joined #ruby
<havenwood>
Wow, i guess i've been coding for 2 and a half years. Doesn't seem that its been that long.
<UberNerdGirl>
i never got distracted by boys
<havenwood>
Had to look at Github join date to remember. Heh.
t-mart has joined #ruby
<aedornm>
you people make me feel old.
<UberNerdGirl>
wat
<lewix>
havenwood: UberNerdGirl: if you /nick info lewix you'll see how long I've been on IRC playing with different languages
havenwood is now known as info
<lewix>
But i ended up 'mastering' none
Michae___ has joined #ruby
info is now known as havenwood
<lewix>
havenwood: lol /nickserv info*
_br_ has quit [Excess Flood]
<havenwood>
:P
<UberNerdGirl>
awwww
<aedornm>
I've been programming for 30 years. Hence you people make me feel old.
<UberNerdGirl>
havenwood: did you get into the current batch?
<lewix>
UberNerdGirl: havenwood : aedornm : how old are you
<UberNerdGirl>
aedorn: the guy I have a crush on has been programming for about that length of time too
_br_ has joined #ruby
<hemanth>
aedorn, kool, what is the one thing you regret for not doing it 30 years ago?
<lewix>
aedornm: what languages
hbpoison has joined #ruby
<lewix>
UberNerdGirl: so you do get distracted..
Jalada has quit [Read error: Operation timed out]
<UberNerdGirl>
nope
<UberNerdGirl>
he helps me code
<UberNerdGirl>
he helps me with a lot of Lisp
<UberNerdGirl>
in fact, he *wrote* dialects of Lisp
<havenwood>
UberNerdGirl: Hrm, I interviewed in Sept. I guess that'd be this one or?
<lewix>
sounds nice
<lewix>
nobody answered the age question
<aedornm>
hemanth: Regret? There's no time for that!
* lewix
smiles
artofraw has joined #ruby
<UberNerdGirl>
awww
<hemanth>
aedorn, wow! ok
<lewix>
aedornm: agreed!
<UberNerdGirl>
havenwood: that was the previous batch
<havenwood>
UberNerdGirl: ahh, kk
<UberNerdGirl>
lewix: who gives a crap, grow up
<havenwood>
UberNerdGirl: Yeah, they said if my sched cleared i could come to the current one then, but it didn't.
<UberNerdGirl>
you're making this sound like the 90's
<havenwood>
UberNerdGirl: I still wanna go though.
<UberNerdGirl>
a/s/l ?
<UberNerdGirl>
places
<UberNerdGirl>
havenwood: you should, people change in profound ways
carlyle has quit [Remote host closed the connection]
Michae___ has quit [Ping timeout: 250 seconds]
<lewix>
I can't stand disrespectful people
<havenwood>
lewix: just turned 34
ryanf has quit [Ping timeout: 276 seconds]
rippa has joined #ruby
<lewix>
havenwood: I see.
tish has quit [Quit: Leaving.]
<aedornm>
lewix: I started with a TRS-80 doing machine code, and followed the "natural" progression of BASIC, 8086/8088 assembly, C, C++, and everything else.
* hemanth
is more intrested in what aedorn and havenwood are doing, rather than how old they are ....
<havenwood>
UberNerdGirl: I'd love to get exposed to people who code in different languages that immersively.
_br_ has quit [Excess Flood]
* UberNerdGirl
agrees with hemanth
<lewix>
aedornm: impressive! what's your favorite
<UberNerdGirl>
havenwood: i see you are from socal
<UberNerdGirl>
I
<UberNerdGirl>
I used to live in West LA and Cerritos :) :) :)
ananthakumaran has joined #ruby
<UberNerdGirl>
i only moved to NYC 1.5 years ago
<havenwood>
UberNerdGirl: Nice! I've been in LA for 1.5 years.
<havenwood>
Moved here from Minnesota. Way more Rubyists in LA.
<UberNerdGirl>
if you visit, please let me know, I will show you some nice things and introduce you to awesome hackers
<havenwood>
Guess nothing like San Francisco, but..
<UberNerdGirl>
havenwood: my relatives are in Minnesota :D
Eiam has quit [Read error: Connection reset by peer]
<UberNerdGirl>
anyways, regarding Ruby… .taint never made any sense to me
<UberNerdGirl>
it always made me laugh
<UberNerdGirl>
like… i would feel guilty to use that
<lewix>
okay guys nice talking to you. It reminded me if I have still a lot to learns.going back to do some more coding
<aedornm>
lewix: They're all interesting, but still Ruby. At least until the next great thing comes along.
<lewix>
aedornm: I was amazed by Ruby elegance. It blew me away
<UberNerdGirl>
aedorn: have you been seduced yet?
<UberNerdGirl>
by...
<UberNerdGirl>
the Lispsssssssss
Jalada has joined #ruby
_br_ has joined #ruby
<havenwood>
UberNerdGirl: From Ruby man page: "[If you] like the concept of LISP, but don't like too many parentheses, Ruby might be your language of choice."
<aedornm>
UberNerdGirl: If I have to look at another function that ends with a million parenthesis I'll scream. =)
<havenwood>
hrm, i guess manpage is one word?
<UberNerdGirl>
aedornm: I iz severely disappoint to hear that, sir
_br_ has quit [Excess Flood]
<UberNerdGirl>
havenwood: have you played with Lisps?
<UberNerdGirl>
Hacker Schoolers tend to love meddling with Lisps
<UberNerdGirl>
especially Scheme and Clojure
<havenwood>
UberNerdGirl: Nope, not at all! Most recently been playing with Elixir but Scheme particularly looks nice to me.
artofraw has quit [Remote host closed the connection]
<UberNerdGirl>
havenwood: oh wow!!! a few people are playing with Elixir here! :D
<aedornm>
havenwood: Yeah, Elixir is pretty nice
<havenwood>
Yeah, i've been really impressed. Fun to explore with iex REPL, definitely some interesting concepts.
<havenwood>
I get kinda used to seeing method arity like: puts/1
iamjarvo has quit [Quit: Leaving.]
_br_ has joined #ruby
<aedornm>
Psuedo off-topic, but also been liking Felix and Go.
apeiros_ has joined #ruby
<havenwood>
aedornm: Yeah, I liked going through the basic Go tutorials. Have you looked at Ilya Grigorik's Agent gem?: https://github.com/igrigorik/agent
_br_ has quit [Excess Flood]
etcetera has joined #ruby
<havenwood>
aedornm: What is Felix? What are its strong suits?
<havenwood>
aedornm: Fun to see Erlang and Go concurrency ideas come to Ruby!
noop has joined #ruby
<havenwood>
I think tarcieri said he was considering upstreaming Celluloid concepts to Erlang.
<felixjet>
Felix is me
<felixjet>
xD
<aedornm>
havenwood: I have not, but I'll check it out. And Felix is basically a scripting language on top of C++.
<felixjet>
really?
<havenwood>
aedornm: ahh
<felixjet>
im the owner of a scripting language and i dont have the rights?
Choobie has quit [Read error: Operation timed out]
<felixjet>
oh, bah...
_br_ has quit [Excess Flood]
<lewix>
There's too many languages out there
iamjarvo has joined #ruby
<felixjet>
there is a "felix" language, and appears felix the cat
<felixjet>
how original.. xD
_br_- has joined #ruby
<lewix>
lol
jalcine has quit [Excess Flood]
_br_- is now known as _br_
sailias has joined #ruby
becom33 has quit [Ping timeout: 248 seconds]
r4um has joined #ruby
<aedornm>
lewix: hmmm, I don't think so. Objective C is more like an extension of syntax to C. I can't recall for sure, since I never used it myself. (Never used NeXT or Apple products!)
<lewix>
aedornm: you're right
<aedornm>
I bet on the other underdog, and lost (OS/2 and REXX, etc)
a_a_g has quit [Quit: Leaving.]
codecop has joined #ruby
<aedornm>
I did that again with WebOS ... yup, I pick all the winners.
mahmoudimus has quit [Quit: Computer has gone to sleep.]
tommyvyo has quit [Quit:]
<lewix>
lol
_br_ has quit [Excess Flood]
nachtwandler has joined #ruby
toekutr has joined #ruby
apeiros has joined #ruby
apeiros has quit [Remote host closed the connection]
<aedornm>
Rooting for Firefox OS. Everyone might want to stay away from that knowing my streak!
apeiros_ has quit [Ping timeout: 252 seconds]
_br_ has joined #ruby
ngotho has quit [Ping timeout: 245 seconds]
codecop has quit [Remote host closed the connection]
codecop has joined #ruby
mockra has quit [Remote host closed the connection]
* lewix
takes note
* lewix
downloads google chrome
<lewix>
waiting for google OS
ryanf has joined #ruby
<lewix>
android?
MrSamuel has joined #ruby
<bean>
chromebooks run as close to a "google OS" as you'll ever get
<aedornm>
Chrome OS.. but they're talking about long term plans of ChromeOS and Android merging together.
<aedornm>
Next time I'm at Google maybe I'll go take a peak.
_br_ has quit [Excess Flood]
a_a_g has joined #ruby
_br_- has joined #ruby
a_a_g has quit [Client Quit]
_br_- is now known as _br_
rezzack has quit [Quit: Leaving.]
averiso has joined #ruby
dougireton has quit [Quit: Leaving.]
Choobie has joined #ruby
carlyle has joined #ruby
becom33 has joined #ruby
becom33 has quit [Changing host]
becom33 has joined #ruby
averiso has quit [Read error: Connection reset by peer]
UberNerdGirl has left #ruby [#ruby]
pyx has quit [Quit: WeeChat 0.4.0]
_br_ has quit [Excess Flood]
timonv has joined #ruby
coderhs has joined #ruby
ngotho has joined #ruby
_br_ has joined #ruby
averiso has joined #ruby
_br_ has quit [Excess Flood]
averiso has quit [Read error: Connection reset by peer]
carlyle has quit [Ping timeout: 245 seconds]
ryanf has quit [Ping timeout: 245 seconds]
carraroj has joined #ruby
_br_ has joined #ruby
pseudonymous has quit [Read error: Operation timed out]
quazimodo has quit [Ping timeout: 245 seconds]
quazimodo has joined #ruby
xbayrockx has joined #ruby
xbayrockx is now known as wf2f
timonv has quit [Remote host closed the connection]
iamjarvo has quit [Quit: Leaving.]
_br_ has quit [Excess Flood]
<lewix>
21:37 <#ruby> havenwood: lewix: Why doesn't everyone code? I missed that lol
_br_- has joined #ruby
_br_- is now known as _br_
<hemanth>
Hanmac, meow?
<lewix>
havenwood: they're too busy using our apps
<Hanmac>
huch?
justsee has quit [Quit: Leaving...]
chrishunt has quit [Quit: ZzZzZz...]
rippa has quit [Ping timeout: 240 seconds]
whitedawg has joined #ruby
cyong has quit [Quit: Leaving.]
fixl has joined #ruby
jurassic has joined #ruby
<hemanth>
Hanmac, wasssup
sambio_ has quit []
<Hanmac>
i because i need to goto bath an then goto work
_br_ has quit [Excess Flood]
jborica has quit [Ping timeout: 276 seconds]
averiso has joined #ruby
SirWolfgang has joined #ruby
<SirWolfgang>
So, whats a good time to use object.send(:func) rather then object.func ?
_br_ has joined #ruby
rippa has joined #ruby
* SirWolfgang
is trying to understand the use of send
<hemanth>
Hanmac, okies! cya soon then
<felixjet>
anyone recommends a ruby starting tutorial?
jborica has joined #ruby
<felixjet>
something like php handbook :p
<hemanth>
SirWolfgang, when you want to invoke a function that invokes a function
<Hanmac>
SirWolfgang: and when func is private you may need send to call it
_br_ has quit [Excess Flood]
jekotia has quit [Quit: ChatZilla 0.9.90-rdmsoft [XULRunner 18.0.2/20130201065344]]
<felixjet>
codeacademy
<felixjet>
looks nice
<felixjet>
is translated to my language
<SirWolfgang>
Hanmac: but doesnt that really just break the pinceples of OOP, if you need external access your doing something wrong, or it should be accessable
<felixjet>
ah no, just the UI lol
icole has quit [Remote host closed the connection]
<felixjet>
i dont think it helps for this, as i dont see it there
<felixjet>
but maybe for another style questions
Honeycomb has joined #ruby
hemanth_ has joined #ruby
hemanth has quit [Read error: Connection reset by peer]
ryanf has joined #ruby
hemanth_ has quit [Read error: Connection reset by peer]
hemanth_ has joined #ruby
_br_ has quit [Excess Flood]
nachtwandler has quit [Remote host closed the connection]
averiso has quit [Ping timeout: 255 seconds]
<SirWolfgang>
felixjet: Ya, i dont see it either
hbpoison has quit [Ping timeout: 276 seconds]
<SirWolfgang>
the C programmer me says @var since this.var is more typing
<SirWolfgang>
but i also would use {} rather then do end, in every case
_hemanth has joined #ruby
hemanth_ has quit [Read error: Connection reset by peer]
_hemanth has quit [Read error: Connection reset by peer]
* SirWolfgang
doesnt like needless typing.
<felixjet>
sirecote well yea
<felixjet>
its covered in the style guide
<felixjet>
just scroll to the very bottom :P
_hemanth has joined #ruby
<felixjet>
above all else
<SirWolfgang>
heh
Skylab has joined #ruby
_hemanth has quit [Read error: Connection reset by peer]
<SirWolfgang>
I am trying to keep with the "rubyist" style and be nice to the lang. I dont like to write my own styles until I know the lang inside and out
hemanth_ has joined #ruby
hemanth_ has quit [Read error: Connection reset by peer]
<SirWolfgang>
a good style prevents errors
hemanth_ has joined #ruby
Mon_Ouie has quit [Ping timeout: 276 seconds]
mootpointer has quit [Quit: Computer has gone to sleep.]
<lewix>
SirWolfgang: plain send can call an object private method and public_send can't
_br_ has joined #ruby
_br_ has quit [Excess Flood]
<SirWolfgang>
ya, i get that. I just dont get a good case when to use send
<SirWolfgang>
to get access to private method seems like bad OOP design to me
apok has quit [Quit: apok]
<SirWolfgang>
the entire point of private/protected methods is people dont use them...
<lewix>
SirWolfgang: it works well in cases where you need to pass a method without the dot operator - when you don't know the method name and you have to pass it as an argument
browndawg has joined #ruby
<lewix>
SirWolfgang: private/protected does not mean the same thing in ruby
<lewix>
as in C
<lewix>
do*
mattbl has quit [Quit: This computer has gone to sleep]
_br_ has joined #ruby
<Hanmac>
rubys protected is like friend in C
statarb3 has joined #ruby
averiso has joined #ruby
<SirWolfgang>
Wait, so your telling me that Ruby is in fact not C! :p
<Paradox>
SirWolfgang, erm ah gerd
hogeo has quit [Read error: Connection reset by peer]
<lewix>
SirWolfgang: if name.respond_to?(lewix) ; puts name.send(lewis) ; else puts "How come lewix is not in your database" end
<SirWolfgang>
Hanmac: that reminds me, the whole nil == false, but 0 == true is going to take a long time for me to keep stright
mattbl has joined #ruby
pen has joined #ruby
<Hanmac>
SirWolfgang ... i think its more clear
pepper_chico has quit [Quit: Computer has gone to sleep.]
cantonic has quit [Quit: cantonic]
_br_ has joined #ruby
_br_ has quit [Excess Flood]
r4um has quit [Ping timeout: 255 seconds]
JohnBat26 has quit [Read error: Operation timed out]
_br_ has joined #ruby
<SirWolfgang>
Hanmac: I see the reason behind it, it makes testing if valid easier in somecases, but i think in C and Bin, which means 0/Null/False are all the same, and are tested with accordingly. if(NULL) to me should be false
mattbl is now known as MattRB
Honeycomb has quit [Quit: Leaving.]
dmiller has quit [Ping timeout: 245 seconds]
havenwood has quit [Remote host closed the connection]
wallerdev has quit [Quit: wallerdev]
<SirWolfgang>
but I like ruby simply becouse you can do things like this:
charliesome has joined #ruby
goganchic has joined #ruby
<Hanmac>
then you may land in php where you need to be really really sure that the method returns FALSE and not 0 ... something like: func() ===== FALSE :P
<SirWolfgang>
[:each, :map, :select].each do |method| define_method(method) do |&block| games.send(method, &block) end end
pseudonymous has joined #ruby
<Hanmac>
yeah ... but i think this whould be a job for method_missing
_br_ has quit [Excess Flood]
<goganchic>
SirWolfgang, may be delegate :each, :map, :select, :to => :games will be better?
<Hanmac>
goganchic delegate looks after a fails .. äh i mean rails method
<goganchic>
Hanmac, yep
JohnBat26 has joined #ruby
<Hanmac>
this is the non-rails channel
Doc_X has joined #ruby
Doc_X_ has quit [Read error: Connection reset by peer]
<peterhellberg>
Great… getting `const_missing': uninitialized constant YAML (NameError) when running rake under 2.0.0 and 1.9.3-p392, did I miss the memo on that while being away on vacation?
atyz has joined #ruby
lolmaus has joined #ruby
<peterhellberg>
Hanmac: Heh, "nasty" but effective :)
<Hanmac>
peterhellberg ... yaml is not in core ... did you forget to require it?
hasimo has quit [Remote host closed the connection]
horofox_ has joined #ruby
becom33 has joined #ruby
becom33 has quit [Changing host]
becom33 has joined #ruby
DrCode has quit [Ping timeout: 276 seconds]
aganov has joined #ruby
<peterhellberg>
I absolutely need to require yaml, but I just wondered about the change between the 1.9.3 patch levels
_br_ has quit [Excess Flood]
<becom33>
can I ask ruby thor framework question or is there a channel for that ?
<peterhellberg>
becom33: Just ask, someone might be able to answer :)
<keepguessing>
Could not find on my anything that maps to it in ruby 1.9.3
<keepguessing>
Anyone can help me here
DrCode has quit [Remote host closed the connection]
Demux has joined #ruby
jborica has quit [Ping timeout: 248 seconds]
DrCode has joined #ruby
monkegjinni has joined #ruby
greenarrow has quit [Read error: Connection reset by peer]
_br_- has quit [Excess Flood]
greenarrow has joined #ruby
zigomir has joined #ruby
<mntzn>
Hi, what's the nicest wait of setting $log.level = Logger::something via a variable? log_level = 'Logger::ERROR' $log.level = log_level doesnt seem to work
monkegjinni has quit [Remote host closed the connection]
_br_ has joined #ruby
pseudonymous has joined #ruby
anderse has joined #ruby
Mattix has joined #ruby
punkrawkR has joined #ruby
lewix has joined #ruby
lewix has quit [Changing host]
lewix has joined #ruby
sayan has quit [Read error: Connection reset by peer]
<peterhellberg>
mntzn: Why do you use a string instead of the actual constant?
<mntzn>
I dont know )
<mntzn>
I will be passed as a string later on I think
<peterhellberg>
log_level = Logger::ERROR and then $log.level = log_level
<mntzn>
yeah, removing the quotes works
hbpoison has quit [Ping timeout: 255 seconds]
_br_ has quit [Excess Flood]
horofox_ has joined #ruby
<peterhellberg>
I’d probably write a method that sets the log level
<peterhellberg>
Especially if you need to set it based on a string/parameter
timonv has joined #ruby
apeiros_ has joined #ruby
_br_- has joined #ruby
pseudonymous has quit [Ping timeout: 276 seconds]
timonv has quit [Remote host closed the connection]
blaxter has joined #ruby
jimeh has joined #ruby
elico has quit [Quit: elico]
atyz has quit [Quit: Leaving...]
hasimo has quit [Remote host closed the connection]
_br_- has quit [Excess Flood]
tonini has quit [Remote host closed the connection]
atyz has joined #ruby
<mntzn>
yeah I probably will
lkba has quit [Ping timeout: 245 seconds]
<mntzn>
do you need to reqire something for const_get to work?
tonini has joined #ruby
horofox_ has quit [Quit: horofox_]
_br_ has joined #ruby
rakl has quit [Quit: sleeping]
nomenkun has joined #ruby
TheFuzzball has joined #ruby
<Hanmac>
mntzn hm no ... const_get is build in
<mntzn>
yeah I was doing it wrong, thanks
mritr_ has quit [Ping timeout: 240 seconds]
jgrevich has quit [Remote host closed the connection]
<Hanmac>
i like this:: "Logger::ERROR".split("::").inject(Object,:const_get)
axhlf has joined #ruby
_br_ has quit [Excess Flood]
anderse has quit [Quit: anderse]
timonv has joined #ruby
_br_- has joined #ruby
_br_- is now known as _br_
<peterhellberg>
Hanmac: Why not just use Kernel.const_get "Logger::Error"?
hasimo has joined #ruby
Emmanuel_Chanel has quit [Read error: Connection reset by peer]
kevinfagan has joined #ruby
Evixion has quit [Read error: Connection reset by peer]
<Hanmac>
hm okayy ... that const_get can solv :: is a bit new
kevinfagan has quit [Client Quit]
ss13 has joined #ruby
<peterhellberg>
mntzn: Logger::ERROR is just a Fixnum btw, so you could just send 3 instead
ephemerian has joined #ruby
eAlchemi_ has quit [Remote host closed the connection]
ss13 has quit [Client Quit]
Mchl has joined #ruby
ferdev has quit [Quit: ferdev]
eAlchemist has joined #ruby
_br_ has quit [Excess Flood]
Choobie has quit [Ping timeout: 250 seconds]
<mntzn>
debug being 0 and fatal 4 then?
_br_ has joined #ruby
jrendell has joined #ruby
<peterhellberg>
Right
<Hanmac>
using constants is better than using the numbers directly
monkegjinni has joined #ruby
znode has joined #ruby
aqabiz has joined #ruby
ozgura has quit [Remote host closed the connection]
<bw_>
hmm, i'm quite new to ruby, could anyone point me to a overview how the several webservers/webstacks .. well stack on each other?
<peterhellberg>
Absolutely, the constants are there for a reason :)
<becom33>
in speak task I want to have ither --file option or the argvment and second problem is i get a exception error if I didnt mention the file path after I mention the --file option
<bw_>
i read about rack, thin, unicorn, sinatra and some of those seems to sit on top of another
<peterhellberg>
bw_: Do you have a decent understanding of how Rack works?
<bw_>
nope
Emmanuel_Chanel has joined #ruby
_br_ has joined #ruby
blackcat has joined #ruby
lkba has joined #ruby
<peterhellberg>
bw_: Rack is pretty much the de facto standard for servers to implement when it comes to serving Ruby applications.
blackcat has left #ruby ["No boundaries on the net!"]
rzs has joined #ruby
<bw_>
peterhellberg: its like wsgi in the python world?
<peterhellberg>
You might think of it like WSGI for Ruby
<peterhellberg>
Yes
bubdan has joined #ruby
<peterhellberg>
(There is enough similarities for Phusion Passenger to support both Rack and WSGI)
slainer68 has quit [Remote host closed the connection]
hbpoison has joined #ruby
bubdan has left #ruby [#ruby]
_br_ has quit [Excess Flood]
znode has quit [Remote host closed the connection]
timonv has quit [Remote host closed the connection]
<bw_>
peterhellberg: so every other project is a layer on top of rack and in some cases middleware?
<peterhellberg>
The different servers (webrick, thin, unicorn, puma, passenger, etc.) are just different solutions to the same problem, serving Ruby (Rack) applications
haxrbyte has joined #ruby
<peterhellberg>
bw_: Pretty much, Rack isn’t the _only_ way to serve Ruby applications on the web
<peterhellberg>
bw_: But it is by far the most popular
<peterhellberg>
Frameworks like Sinatra and Rails implement Rack on the other end
<peterhellberg>
So it is possible to run a Sinatra app on all the different servers
QaDeS has joined #ruby
<bw_>
ahh, now i see
matrixise has quit [Read error: Operation timed out]
<bw_>
rack beening more like a interface not a server must have slipped me
txdv has joined #ruby
matrixise has joined #ruby
<bw_>
and started the confusion
<bw_>
peterhellberg: many thanks for the elaborate explaination :)
gregorg has quit [Read error: Connection reset by peer]
monkegjinni has quit [Remote host closed the connection]
_br_ has quit [Excess Flood]
postmodern has quit [Quit: Leaving]
S1kx has quit [Ping timeout: 245 seconds]
strk has joined #ruby
elico has joined #ruby
_br_ has joined #ruby
S1kx has joined #ruby
S1kx has joined #ruby
S1kx has quit [Changing host]
_br_ has quit [Excess Flood]
_br_ has joined #ruby
emocakes has quit [Quit: emocakes]
marr has joined #ruby
ExxKA has joined #ruby
brijesh_ has quit [Read error: Connection reset by peer]
oposomme has joined #ruby
elico has quit [Quit: elico]
rzs has joined #ruby
<rzs>
Im getting the error 'cannot load such file -- rack'. When i do bundle show rack i get '/usr/local/rvm/gems/ruby-1.9.3-p385/gems/rack-1.4.5' which means rack is already installed
whitedawg has joined #ruby
<rzs>
The ruby version on my system is ruby 1.9.3p362
<rzs>
Whats causing this error ?
_br_ has quit [Excess Flood]
nomenkun has quit [Ping timeout: 252 seconds]
strk has left #ruby [#ruby]
xpen has quit [Remote host closed the connection]
fixl has quit [Remote host closed the connection]
nomenkun has joined #ruby
_br_- has joined #ruby
emergion has joined #ruby
_br_- has quit [Excess Flood]
_br_ has joined #ruby
<unflores>
:rzs when do you get the error 'cannot load such file -- rack' ?
nari has joined #ruby
tonini has quit [Remote host closed the connection]
vlad_starkov has quit [Remote host closed the connection]
Mattix has quit [Quit: Leaving]
<rzs>
unflores: im installing redmine, a bug tracking tool written in rails. When i do rake generate_secret_token , that is when i get this error
<rzs>
Any reason why it says cannot load the file even though the gem is already installed ?
<Hanmac>
it feels that using bundle with rvm looks after a bad idea ...
gregorg_taf has quit [Changing host]
gregorg_taf has joined #ruby
gregorg_taf is now known as gregorg
<Hanmac>
rzs what does gem list shows you? does it list rake?
<peterhellberg>
becom33: And you don’t use the words variable
<becom33>
petecheslock, this is just a example for my question
<peterhellberg>
becom33: And you open the file read only, is that what you want?
shirokuro11 has joined #ruby
haxrbyte has joined #ruby
<becom33>
petecheslock, well yea . thats not my problem if u run the script "test.rb help speak" it will give u the options
<peterhellberg>
becom33: Yes, then it will print the help
S1kx has quit [Ping timeout: 255 seconds]
haxrbyte_ has quit [Read error: Connection reset by peer]
includex has quit [Ping timeout: 245 seconds]
ferdev has quit [Quit: ferdev]
<becom33>
ok what I want to do is to pass the parameter or give a path to speak . but the when u do just "test.rb speak" it won't do anything coz words param is eq to nil
<Hanmac>
becom33 why do you use File.open in this from? didnt we told you not to do that?
<becom33>
what I want is to give a warning or a message when there are no parameters passed
Mon_Ouie has joined #ruby
Mon_Ouie has quit [Changing host]
Mon_Ouie has joined #ruby
vagmi has quit [Quit: vagmi]
NiteRain has quit [Ping timeout: 246 seconds]
DrCode has quit [Ping timeout: 276 seconds]
<becom33>
Hanmac, just a demo
<becom33>
I used file read as a example
<peterhellberg>
becom33: http://whatisthor.com/ Just read the documentation about the usage of :required
DrCode has joined #ruby
<peterhellberg>
becom33: I told you to read it earlier today :)
nkr has joined #ruby
sailias has joined #ruby
<becom33>
yes I did
threesome has joined #ruby
<becom33>
hold on
gregorg_taf has joined #ruby
<becom33>
required is for the option . if the option is required
wallclockbuilder has quit [Read error: Connection reset by peer]
hybris has joined #ruby
<becom33>
thats not what I want
wallclockbuilder has joined #ruby
<becom33>
I wan't get a error if parameter OR the option is not passed
linusoleander has joined #ruby
linusoleander has quit [Read error: Connection reset by peer]
gregorg has quit [Read error: Connection reset by peer]
<peterhellberg>
Then you are actively trying to do something Thor doesn’t support out of the box
<becom33>
hmm then I get I have pass both as options right ?
hemanth has joined #ruby
<becom33>
I guess *
malte_ has quit [Quit: malte_]
dustint has joined #ruby
<becom33>
is there a method or somthing where I can get the message which displays when the "help speak" is called ?
<becom33>
inside the script ofc
adT has joined #ruby
Es0teric has joined #ruby
<adT>
hi
<adT>
I have a string like this "0A" (always a byte in hexadecimal). How can I convert that to a integer (10 in this case)
hasimo has quit [Remote host closed the connection]
kristofers has quit [Read error: Connection reset by peer]
lolmaus has quit [Read error: Connection reset by peer]
yewton has joined #ruby
yewton has quit [Excess Flood]
lolmaus has joined #ruby
yewton has joined #ruby
otherj has joined #ruby
Udom0 has joined #ruby
skattyadz has joined #ruby
shirokuro11 has quit [Ping timeout: 272 seconds]
<adT>
Hanmac: thank you so much I'm gonna try it
sailias has quit [Ping timeout: 248 seconds]
chussenot has joined #ruby
rzs has joined #ruby
ikst has joined #ruby
<adT>
Hanmac: it seems It works correctly, thank you so much.
haxrbyte_ has joined #ruby
<adT>
just a doubt. If I had "\x0A" instead, using "\x0A".to_i(16) returns 0
m8 has joined #ruby
<adT>
I'm trying to know the reason
Elhu has joined #ruby
Gues_____ has joined #ruby
Gues_____ is now known as Guest1234
haxrbyte has quit [Ping timeout: 248 seconds]
echobinary has quit [Read error: Connection reset by peer]
echobinary has joined #ruby
vlad_starkov has quit [Remote host closed the connection]
ozgura_ has joined #ruby
ozgura has quit [Ping timeout: 252 seconds]
fire has joined #ruby
mark_locklear has joined #ruby
iamjarvo has joined #ruby
dekroning has quit [Ping timeout: 264 seconds]
mootpointer has joined #ruby
justsee has joined #ruby
justsee has joined #ruby
justsee has quit [Changing host]
yacks has joined #ruby
tonini has quit [Remote host closed the connection]
<oposomme>
hi, I need to thumbnails image is it possible to do it with ruby built in library or do I have to use RMagick?
<keymone>
there is minimagick - rmagick without bloat
skattyadz has quit [Quit: skattyadz]
mark9 has left #ruby [#ruby]
rippa has joined #ruby
<oposomme>
keymone: thx I will have a look
robustus has quit [Ping timeout: 255 seconds]
emocakes has joined #ruby
robustus has joined #ruby
Targen has quit [Ping timeout: 255 seconds]
yshh has joined #ruby
sambio has joined #ruby
gyre008 has joined #ruby
sandGorgon has quit [Read error: Connection reset by peer]
banjara has quit [Quit: Leaving.]
atyz has quit [Quit: Leaving...]
swingha has quit [Quit: WeeChat 0.4.0]
sandGorgon has joined #ruby
gyre007 has quit [Ping timeout: 248 seconds]
gyre008 has quit [Read error: Connection reset by peer]
yshh has quit [Read error: Connection reset by peer]
yshh has joined #ruby
Whoop has quit [Quit: Gone]
gyre007 has joined #ruby
chichou has quit [Remote host closed the connection]
ffranz has joined #ruby
Whoop has joined #ruby
gebbione has joined #ruby
MrSamuel has quit [Quit: MrSamuel]
<gebbione>
hi all, an suggested eclipse plugin to work with ruby?
<gebbione>
hi all, do you know any suggested eclipse plugin to work with ruby?
geekbri has joined #ruby
sirfilip has joined #ruby
lemonsparrow has joined #ruby
<Zelest>
*reads lemonparty* :(
dblack_ has joined #ruby
<sirfilip>
morning
<Hanmac>
gebbione: when you look in the eclipse plugins repo you find one, but it may not work with ruby1.9 syntax
whowantstolivef1 has joined #ruby
tjbiddle has joined #ruby
eka has joined #ruby
<Hanmac>
hm and there is also a little bug than you cant "debug" an project wich has the "wrong" type ... one of my project is C++ and ruby at the same time
beiter has joined #ruby
tjbiddle has quit [Read error: Connection reset by peer]
emocakes has quit [Quit: emocakes]
axhlf has quit [Remote host closed the connection]
apod has quit []
<gebbione>
Hanmac: i installed something to help with dynamic languages, for Ruby but no highlights or changes after restarting ... do you just use a text editor?
NiteRain has joined #ruby
takeru has joined #ruby
freeayu has quit [Remote host closed the connection]
mootpointer has quit [Quit: Computer has gone to sleep.]
dorei has joined #ruby
v0n has joined #ruby
<dorei>
is there any ruby data structure for handling bitfields?
akhet has joined #ruby
otherj has quit []
ebouchut has joined #ruby
tonini has joined #ruby
skattyadz has joined #ruby
wmoxam has joined #ruby
vagmi has joined #ruby
<JonnieCache>
gebbione: its not common to use a heavy ide like eclipse with ruby
<JonnieCache>
gebbione: because of the dynamic nature of the language you cant reliably do code completion or navigation
gregorg_taf has quit [Read error: Connection reset by peer]
`gregorg` has joined #ruby
<JonnieCache>
gebbione: most people use a text editor
rzs has quit [Quit: Leaving]
slainer68 has quit [Read error: Connection reset by peer]
tonini has quit [Ping timeout: 248 seconds]
girija has quit [Ping timeout: 276 seconds]
slainer68 has joined #ruby
<wmoxam>
gebbione: RubyMine is popular for folk who desire IDEs
<Hanmac>
JonnieCache i use Eclispe for my gems ... but they are in C++ and have > 100 *.cpp files
hasimo has joined #ruby
drale2k has joined #ruby
tommyvyo has joined #ruby
pdamer has joined #ruby
enroxorz has joined #ruby
enroxorz has quit [Changing host]
enroxorz has joined #ruby
ddd has quit [Read error: Connection reset by peer]
tealmage has joined #ruby
hasimo has quit [Ping timeout: 260 seconds]
tonini has joined #ruby
newUser1234 has joined #ruby
daniel_- has joined #ruby
johnnygoodmancpa has joined #ruby
krawchyk has joined #ruby
breakingthings has joined #ruby
johnnygoodmancpa has left #ruby [#ruby]
ddd has joined #ruby
tomzx_mac has joined #ruby
<tommylommykins>
hmm
<tommylommykins>
does anyone use netbeans for Ruby?
* tommylommykins
really liked the netbeans plugin
<tommylommykins>
seemed less buggy than other ruby IDEs
<breakingthings>
using an ide for anything but a compiled language is sillypants
<tommylommykins>
shame it's unmaintained now, I guess :s
<tommylommykins>
breakingthings: But if you're doing staticish things in your dynamic language, which you probably are, then there's no reason not to use an IDE?
echobin86 has joined #ruby
echobinary has quit [Read error: Connection reset by peer]
<breakingthings>
all dem have syntax highlighting, and bracket stuff, and...
pdamer has joined #ruby
VinceThePrince has left #ruby [#ruby]
pdamer has quit [Client Quit]
<tommylommykins>
sublime text doesn't parse your code though... if you get a "you're missing a end", sublime doesn't offer tools to help you with that?
<tommylommykins>
gebbione: But it has all the bugs!
<tommylommykins>
and its options window is almost as unnavigable as eclipse
<tommylommykins>
and it wants all your money
solidoodlesuppor has joined #ruby
jerius has joined #ruby
<gebbione>
after 30 days
Mattix has joined #ruby
Neomex has joined #ruby
Neomex has quit [Client Quit]
* tommylommykins
installs sublimelinter
<breakingthings>
Now you're thinking with packages
idkazuma has joined #ruby
cmdr-prmpt has joined #ruby
<tommylommykins>
breakingthings: But it can't give me a convenient squiggly red line under the error as I type?
carraroj has joined #ruby
<breakingthings>
tommylommykins: sublimelinter highlights the line on save
<tommylommykins>
ooh
<tommylommykins>
that'll do :D
uris has joined #ruby
Targen has joined #ruby
<breakingthings>
you have package control, yea?
newUser1234 has quit [Remote host closed the connection]
<breakingthings>
that's the most important important thing to be important about.
<tommylommykins>
yeah
newUser1234 has joined #ruby
oposomme|away is now known as oposomme
jerius_ has joined #ruby
<JonnieCache>
sublimelinter is great
<JonnieCache>
especially for js
jgarvey has joined #ruby
jerius has quit [Ping timeout: 252 seconds]
jerius_ is now known as jerius
pac1 has quit [Read error: Connection reset by peer]
vlad_starkov has joined #ruby
hemanth has quit [Quit: This computer has gone to sleep]
Criztian has quit [Remote host closed the connection]
takeru has quit [Remote host closed the connection]
newUser1234 has quit [Ping timeout: 248 seconds]
becom33 has joined #ruby
becom33 has quit [Changing host]
becom33 has joined #ruby
browndawg has quit [Ping timeout: 276 seconds]
azm has quit [Ping timeout: 276 seconds]
hasse has joined #ruby
jrajav has joined #ruby
philcrissman has quit [Remote host closed the connection]
johnnygoodmancp1 has joined #ruby
wallclockbuilder has quit [Remote host closed the connection]
johnnygoodmancp1 has left #ruby [#ruby]
joofsh has joined #ruby
bean__ has quit [Ping timeout: 264 seconds]
adkron__ has joined #ruby
<hasse>
My app uses a Client to connect to an API. The app uses the client on different places. Im thinking of doing the client to an singleton class and do the setup in an init file. Is that a bad idea?
jtharris has joined #ruby
huoxito has joined #ruby
SCommette has joined #ruby
joofsh has quit [Remote host closed the connection]
vlad_starkov has quit [Ping timeout: 276 seconds]
joofsh has joined #ruby
ikst has quit [Remote host closed the connection]
sandGorgon has quit [Ping timeout: 252 seconds]
Vert has joined #ruby
Gwyxx has quit [Ping timeout: 245 seconds]
eik3 has joined #ruby
miskander has joined #ruby
justsee has quit [Quit: Leaving...]
<becom33>
anyone for me ?
gebbione has quit [Quit: Page closed]
AlSquire has quit [Quit: This computer has gone to sleep]
v0n has quit [Ping timeout: 276 seconds]
<eik3>
How can I avoid gets() emitting a \n character? I want to read an input but stay on the same line..
<apeiros_>
it's not gets which emits the \n
<apeiros_>
you'd have to take control over the IO
<apeiros_>
in 1.9, you can use require 'io/console', see IO docs. you want noecho
<Hanmac>
eik3 just strip the \n from gets
<flam_>
/w 33
garbagecollectio has joined #ruby
AlSquire has joined #ruby
eik3_ has joined #ruby
garbagecollectio has left #ruby [#ruby]
<breakingthings>
eik3: gets().chomp
<apeiros_>
I don't think that's his issue @ Hanmac & breakingthings
adkron has quit [Ping timeout: 240 seconds]
<apeiros_>
eik3: the ugly thing about noecho - you have to manually reimplement any line editing
tealmage has quit [Remote host closed the connection]
cmdr-prmpt has quit [Quit: Done-zo]
adkron_ has quit [Ping timeout: 276 seconds]
eik3 has quit [Ping timeout: 248 seconds]
carlyle has joined #ruby
<eik3_>
sorry had a disconnect, first line i got was "<breakingthings> eik3: gets().chomp"
Xeago has quit [Remote host closed the connection]
<apeiros_>
15:23 apeiros_: it's not gets which emits the \n
<apeiros_>
15:23 apeiros_: you'd have to take control over the IO
<apeiros_>
15:24 apeiros_: in 1.9, you can use require 'io/console', see IO docs. you want noecho
<apeiros_>
the part about noecho is wrong, though. it's insufficient.
<apeiros_>
it just waits until it gets the data back
<pseudonymous>
Is there a way to bind a method to a variable ? It's just a regular ol' method and I'd rather wait before I apply it
<apeiros_>
but if you take over control over the input device, then you're responsible for handling *every* input on that device.
browndawg has joined #ruby
<eik3_>
do you know of any library that handles that?
<dblack_>
pseudonymous: m = object.method(method_name)
<apeiros_>
you might check whether curses, highline or readline provide facilities for what you want
<apeiros_>
but I doubt it
<apeiros_>
it's not really a common usecase what you want
bluOxigen has joined #ruby
xbob has joined #ruby
DaltonUS has joined #ruby
DaltonUS has quit [Client Quit]
<eik3_>
ok so I'll work around it - thanks for your time!
DrShoggoth has joined #ruby
blueOxigen has quit [Ping timeout: 245 seconds]
eik3_ has quit [Quit: connection reset by beer]
bluOxigen has quit [Client Quit]
generalissimo has joined #ruby
cek has joined #ruby
pdamer has joined #ruby
<cek>
what's the best way to define method dynamically? I'd like the debugger to "see" them.
dhruvasagar has joined #ruby
nick_h has joined #ruby
<cek>
self.class_eval etc doesn't quite work
Virunga has joined #ruby
vlad_starkov has quit [Ping timeout: 255 seconds]
daniel_- has quit [Quit: WeeChat 0.3.9.2]
phantasm66 has joined #ruby
xbob has quit [Quit: Leaving]
<walbert>
cek: self.define_method might be what you're looking for
<sirfilip>
why class_eval dont work ?
newUser1234 has joined #ruby
<cek>
debugger doesn't step in
pdamer has quit [Quit: pdamer]
a_a_g has quit [Quit: Leaving.]
nsxt has joined #ruby
vlad_starkov has joined #ruby
stopbit has joined #ruby
<nsxt>
So I'm writing my first gem, but I'm having a little trouble deciding where best to put some mustache templates that will be parsed by the library itself... Is it best to put them in a /templates folder at the project root?
<whitequark>
nsxt: ruby 1.8 is approaching end of life. in 3 months there will be no more updates, including security
<whitequark>
it's also ancient.
<whitequark>
use 1.9.
<nsxt>
No, I was referring to your "for example" response to my question.
slainer68 has quit [Ping timeout: 248 seconds]
<whitequark>
nsxt: ah. yes, you can use, for example, /templates in the root of your gem
sirish has joined #ruby
echobin86 has quit [Read error: Connection reset by peer]
gothicsouth has joined #ruby
echobinary has joined #ruby
<nsxt>
whitequark: Great. What's the best way, then, to require those templates without doing a "../../templates" sort of thing? Is there a common idiom to load paths in something like a Config class, and then refer to that?
slainer68 has joined #ruby
vlad_starkov has quit [Read error: Connection reset by peer]
enebo has joined #ruby
vlad_starkov has joined #ruby
swex_ has quit [Read error: Connection reset by peer]
aaronmcadam has joined #ruby
swex has joined #ruby
<aaronmcadam>
anyone use tmux and rvm? I'm having really annoying issues trying to run rails server, it keeps looking in @global gemset instead of my @project one
<aaronmcadam>
"...ruby-1.9.3-p392@global/gems/bundler-1.3.1/lib/bundler/rubygems_integration.rb:214:in `block in replace_gem': rail│* 7a001a4 Merge pull request #6 from crowdlab-uk/update-factory-girl Aaron Mc Adam, 24h ago
<aaronmcadam>
ties is not part of the bundle. Add it to Gemfile. (Gem::LoadError) "
<aaronmcadam>
whoops soz
frem has joined #ruby
<walbert>
nsxt: You probably don't want to use strictly relative paths - because you probably don't have too much control over the pwd - especially from a gem. I don't know of any idiomatic way of doing it other than File.dirname(__FILE__) + "../relative/path/to/file"
includex has joined #ruby
ananthakumaran has joined #ruby
ttt has quit [Remote host closed the connection]
wf2f has quit []
Illusioneer has joined #ruby
ttt has joined #ruby
<whitequark>
nsxt: yeah, what walbert said
QaDeS_ has joined #ruby
<nsxt>
Right, but I'd rather not litter the source with relative path requires - is it considered a 'good practice' to set that once in some sort of Config class? Or does that have its own drawbacks as well?
AxisOfEval has joined #ruby
<walbert>
nsxt: Of course. If you're duplicating code, it's "good practice" to avoid duplicating code . If you need that path more than once, you should tuck it away somewhere.
QaDeS has quit [Ping timeout: 240 seconds]
vlad_starkov has quit [Remote host closed the connection]
joofsh has quit [Remote host closed the connection]
<nsxt>
walbert: Sure. Makes sense... thanks!
caveat- has joined #ruby
<apeiros_>
the good practice for requires is to properly set up $LOAD_PATH
ttt has quit [Ping timeout: 276 seconds]
quazimodo has quit [Read error: No route to host]
choclo1 has quit [Ping timeout: 252 seconds]
choclo has joined #ruby
<nsxt>
apeiros_: but if these files are not rb files?
<walbert>
apeiros_: Even for a gem? I don't really want my $LOAD_PATH tainted by a third party
interactionjaxsn has joined #ruby
adambeynon has joined #ruby
<walbert>
Especially if the third party is going to "win" if there's a filename collision
averiso has quit [Ping timeout: 260 seconds]
jrajav has quit [Quit: I tend to be neutral about apples]
drale2k has quit [Quit: Leaving...]
<apeiros_>
nsxt: when you say "require", I assume Kernel#require
beiter has quit [Quit: beiter]
<nsxt>
apeiros_: Poor word choice. I was referring to mustache templates.
<apeiros_>
walbert: for a gem you don't have to do anything, because rubygems properly sets up $LOAD_PATH for you
ExxKA has quit [Quit: This computer has gone to sleep]
<apeiros_>
nsxt: ah. Gem.datadir is what I use. though the method to retrieve the datadir seems to be due for deprecation.
averiso has joined #ruby
xbayrockx has joined #ruby
drale2k has joined #ruby
xbayrockx is now known as wf2f
<apeiros_>
walbert: if you require_relative in a gem, "you're doing it wrong"™ ;-) (all requires relative to 'lib' will work automatically)
<nsxt>
apeiros_: I'll take a look anyway, thanks.
<apeiros_>
nsxt: the mechanism is not being deprecated. only the way to retrieve the datadir.
mntzn has quit [Quit: leaving]
<apeiros_>
an oddity of the datadir is that the gemname is repeated in the path. e.g. YOURGEM/data/YOURGEM/
astegman has joined #ruby
<nsxt>
apeiros_: I'm trying to find an example of its usage, I'm not having much luck.
chrishough has quit [Read error: Connection reset by peer]
chrishough has joined #ruby
<johannesbodannes>
Why would...
<johannesbodannes>
"'hi'".gsub(/'/, "\\'")
_nitti has joined #ruby
<johannesbodannes>
just give me "hi'hi"?
<johannesbodannes>
I was looking to prepend each apostrophe with a backslash
Zolo has joined #ruby
<apeiros_>
because \' is special
v0n has joined #ruby
<johannesbodannes>
Oh yes? Hm...
<apeiros_>
"'hi'".gsub(/'/, "\\\\'")
<apeiros_>
ugly, but necessary
wallerdev has quit [Quit: wallerdev]
danneu has joined #ruby
<johannesbodannes>
Fantastic, thanks!
girija has joined #ruby
johnnygoodmancpa has joined #ruby
filipe_ has quit [Remote host closed the connection]
nomenkun has quit [Ping timeout: 252 seconds]
hemanth has joined #ruby
PigDude has joined #ruby
<VinceThePrince>
I'm having some difficulty starting foreman: http://pastie.org/6412223 I'm not using ruby 1.8.7 and he's complaining about it?
pavilionXP has quit [Remote host closed the connection]
huoxito has quit [Quit: Leaving]
pavilionXP has joined #ruby
Targen has quit [Read error: Connection reset by peer]
jjbohn has joined #ruby
Targen has joined #ruby
Rioji has joined #ruby
nomenkun has joined #ruby
pdamer has joined #ruby
Morkel has quit [Quit: Morkel]
joshman_ has joined #ruby
samphippen has joined #ruby
sambao21 has joined #ruby
jlast has joined #ruby
<PigDude>
I need help with using the -r option to `irb` and `ruby`. Why can I require 'foo' from the shell, invoked by `irb -rubygems`, but `irb -rubygems -rfoo` does not locate foo?
johnnygoodmancpa has left #ruby [#ruby]
carloslopes has quit [Remote host closed the connection]
danman has joined #ruby
maycon_ has quit [Changing host]
maycon_ has joined #ruby
maycon_ is now known as maycon
brandon|_ has quit [Remote host closed the connection]
braoru has quit [Quit: Leaving]
bean__ has joined #ruby
bean__ has quit [Max SendQ exceeded]
<walbert>
VinceThePrince: Perhaps when your json gem was compiled, it found ruby 1.8.7's headers rather than 1.9.3's - and compiled/linked against it? That's not a normal error, regardless. Try "gem uninstall json -v 1.7.7", and try a fresh bundle install for foreman.
brandon|work has joined #ruby
_maes_ has joined #ruby
wyhaines has joined #ruby
<VinceThePrince>
walbert, i'm doing that :) hope it will work
bean__ has joined #ruby
bean__ has quit [Max SendQ exceeded]
maycon is now known as Inseto_Verde
girija has quit [Ping timeout: 264 seconds]
Inseto_Verde is now known as maycon
bean__ has joined #ruby
nari has quit [Ping timeout: 250 seconds]
_nitti has quit [Remote host closed the connection]
monkegjinni has quit [Remote host closed the connection]
imami|afk is now known as banseljaj
<VinceThePrince>
walbert, same bug but now with eventmachine :s
_nitti has joined #ruby
mmitchell has joined #ruby
<walbert>
Yeah - it's defintiely related to your json gem, and not local to foreman.
Targen has quit [Ping timeout: 255 seconds]
sirfilip has quit [Quit: Leaving]
flakrat has joined #ruby
tonini has quit [Remote host closed the connection]
terrorpup has joined #ruby
<Hanmac>
.... isnt json in stdlib so you dont need an json gem??
thone has joined #ruby
pyro111 has quit [Quit: Leaving]
AndChat| has quit [Ping timeout: 248 seconds]
chrishunt has joined #ruby
Banistergalaxy has joined #ruby
<walbert>
Hanmac: The json in stdlib is pure ruby, but there's a gem of the same name which relies heavy on C extensions for a speed advantage.
whowantstolivef1 has quit [Ping timeout: 248 seconds]
Xeago has joined #ruby
<flakrat>
I have a variable populated by an ldap search that results in "dn", my code then does a pattern match of: next if attribute =~ /dn/ this successfully skips on one system, but on another it's fails and continues the loop
blaxter is now known as iblaxter
bean__ has joined #ruby
angle has joined #ruby
_jc has quit [Quit: Computer has gone to sleep.]
pen has quit [Ping timeout: 248 seconds]
angle has quit [Max SendQ exceeded]
<flakrat>
I've done a puts on that variable and it only contains dn, any idea why the pattern match wouldn't work? If I hard code it, it does work, but populating the variable from ldap.search the pattern match fails
gothicsouth has joined #ruby
angle has joined #ruby
angle has quit [Read error: Connection reset by peer]
<walbert>
Hanmac: You've got me there. Though what I said certainly used to be the case.
<flakrat>
I've tried /dn/ /^dn/ and == 'dn', all of those work on my Fedora 18 workstation, but fail on a CentOS 5.8
jjbohn is now known as jjbohn|afk
baba has joined #ruby
fire has quit [Ping timeout: 245 seconds]
jjbohn|afk is now known as jjbohn
malte_ has joined #ruby
swoosh has quit [Quit: Computer has gone to sleep.]
Vert has quit [Remote host closed the connection]
<Hanmac>
walbert: ruby does ship the json gem inside too same for rdoc, rake, bigdecimal and others
eldariof has joined #ruby
girija has joined #ruby
angle has joined #ruby
anonymuse has joined #ruby
angle has quit [Max SendQ exceeded]
nateberkopec has joined #ruby
<VinceThePrince>
walbert, reinstall of rvm did the trick :)
angle has joined #ruby
drale2k has quit [Quit: Leaving...]
mattbl has joined #ruby
angle has quit [Max SendQ exceeded]
razibog has quit [Ping timeout: 250 seconds]
drale2k has joined #ruby
j^2 has joined #ruby
whitedawg has joined #ruby
mercwithamouth has joined #ruby
Virunga has quit [Remote host closed the connection]
tagrudev has quit [Quit: Me = Awesome]
gothicsouth has quit [Ping timeout: 245 seconds]
Elhu has quit [Ping timeout: 252 seconds]
<flakrat>
hmm, strange, I had to add to_s to get it to work: next if attribute.to_s =~ /^dn/
Elhu has joined #ruby
apeiros_ has quit [Remote host closed the connection]
locriani has joined #ruby
echobinary has quit [Read error: Connection reset by peer]
skattyadz has quit [Quit: skattyadz]
forrest has joined #ruby
testingb0t1 has quit [Quit: Leaving.]
echobinary has joined #ruby
gothicsouth has joined #ruby
ebouchut has quit [Quit: Quitte]
<Hanmac>
flakrat ... i think is a difference between 1.8 and 1.9+ ... =~ works for symbol on 1.9 ... on 1.8 it does not
drumond19 has joined #ruby
azm has joined #ruby
azm has quit [Changing host]
azm has joined #ruby
_andre has joined #ruby
<_andre>
hello
<_andre>
does anyone know how to create a File object from a file descriptor in a C extension?
carloslopes has joined #ruby
<flakrat>
Hanmac, thanks, that explains it then
spider-mario has joined #ruby
<Hanmac>
_andre: ... so you have a FILE or and int of the fd?
<flakrat>
I was thinking something along the lines of non printable characters, but attempting stuff like attribute.chomp produced an undefined method, this lead to the realization that it was a symbol and not a string :-)
<_andre>
Hanmac: an int
forced_request has quit [Remote host closed the connection]
sambao21 has quit [Quit: sambao21]
<walbert>
_andre: I believe you can instantiate an object of the IO class with just a fd - is it imperative that you create a File object?
mikecmpbll has joined #ruby
<_andre>
walbert: 'imperative' is a strong word :) but i would like to be able to call #lstat on the object
<_andre>
which is available in File but not in IO
joshman_ has quit [Ping timeout: 264 seconds]
nomenkun has quit [Ping timeout: 252 seconds]
daniel_- has joined #ruby
<Hanmac>
_andre: rb_funccall(rb_cIO,rb_intern("for_id"),INT2NUM(fd)) .... but you cant get lstat for it :(
hbpoison has quit [Ping timeout: 276 seconds]
joshman_ has joined #ruby
sambao21 has joined #ruby
carloslopes has quit [Ping timeout: 252 seconds]
takeru has joined #ruby
PigDude has left #ruby [#ruby]
caveat- has quit [Ping timeout: 245 seconds]
chrishunt has quit [Quit: ZzZzZz...]
chrishunt has joined #ruby
nomenkun has joined #ruby
BizarreCake has quit [Quit: Leaving]
alex__c2022 has joined #ruby
aed has joined #ruby
puppeh has quit [Remote host closed the connection]
girija has quit [Read error: Operation timed out]
miskander has quit [Read error: Connection reset by peer]
io_syl has quit [Quit: Computer has gone to sleep.]
miskander has joined #ruby
takeru has quit [Ping timeout: 255 seconds]
ttt has joined #ruby
sambao21 has quit [Quit: sambao21]
ferdev has joined #ruby
io_syl has joined #ruby
<becom33>
I know what I have done here is wrong https://gist.github.com/anonymous/b670d337896c0ac75a25, what I wanted to do is get the array string/strings which has (deleted) in it and get the value (in this script "26")
peterhellberg has left #ruby [#ruby]
rubarlion has joined #ruby
geggam_wk has joined #ruby
Coolhand|laptop has joined #ruby
echobinary has quit [Quit: -a-]
Ageo_ has joined #ruby
<Ageo_>
Hello all
echobinary has joined #ruby
<Ageo_>
I have a little problem with ruby, can you help me plz ?
<Ageo_>
i don't find a solution on internet, 2h i test -_-
d2dchat has joined #ruby
nomenkun has quit [Ping timeout: 245 seconds]
<dblack_>
Ageo_: if you have a question just ask it :-)
<Ageo_>
ok :)
ttt has quit [Ping timeout: 256 seconds]
baba has quit [Quit: WeeChat 0.4.0]
<Ageo_>
i try to install sql3-ruby-1.3.3.gem
jonahR has joined #ruby
<Ageo_>
i have installed gem, and dll sqlite on C:\Ruby200\bin
<Ageo_>
but when i try to "gem install sql3-ruby-1.3.3.gem"
hbpoison has joined #ruby
<becom33>
nvm I got it done
<Ageo_>
i have this error: unable to resolve dependencies sqlite3-ruby require sqlite3
cek has quit [Quit: жопа диридай диридиридай]
io_syl has quit [Read error: Operation timed out]
huoxito has joined #ruby
<Ageo_>
i have look all google on this problem but anithing resolv this -_-
rubarlion has quit [Ping timeout: 255 seconds]
garbagecollectio has joined #ruby
Targen has joined #ruby
<garbagecollectio>
what is a rack app vs a rails app
<walbert>
Ageo_: First of all, you shouldn't download the gem file. Rubygems (the gem command) will work much better if you allow it to find and install the packages you want by itself. "gem install sqlite3-ruby" should suffice without the gem file.
<walbert>
Ageo_: Second of all, make sure that the sqlite dll is in a directory your PATH environment variable contains. On windows, that's probably something you'll have to double-check.
<Ageo_>
same error walbert and if i try to gem install sqlite3 i have "unable to download data from rubygem.org"
Takehiro has quit [Remote host closed the connection]
Hanmac has quit [Ping timeout: 240 seconds]
jonahR has quit [Quit: jonahR]
aganov has quit [Quit: aganov]
<Ageo_>
on my path, i have this: C:\Ruby200\bin
<Ageo_>
where my sqlite dll is stocked
naquad has joined #ruby
Morkel has joined #ruby
baroquebobcat has joined #ruby
baroquebobcat has quit [Client Quit]
Bira has joined #ruby
vagmi is now known as bitcoinnoob
bitcoinnoob is now known as vagmi
<Ageo_>
and i have sqlite3.dll & sqlite3.def on the folder
<Spooner_>
You probably don't want to use the ruby version (rather than the binary version) and you don't need to specify the directory since it will find it since that will be on the path already.
shevy2 has joined #ruby
<Spooner_>
You want the x86-mingw32 version (which will be the one it downloads by defaut).
<Ageo_>
no need to compile sqlite3 -_- WTF
locriani has quit [Remote host closed the connection]
adayzdone has joined #ruby
<Spooner_>
"gem install sqlite3" would be fine.
Zolo has joined #ruby
walbert has left #ruby [#ruby]
walbert has joined #ruby
chussenot has joined #ruby
skattyadz has joined #ruby
baroquebobcat has joined #ruby
monkegjinni has joined #ruby
Gwyxx has joined #ruby
hbpoison has quit [Ping timeout: 276 seconds]
hbpoison has joined #ruby
joeycarmello has quit [Remote host closed the connection]
carloslopes has joined #ruby
joeycarmello has joined #ruby
cmdr-prmpt has joined #ruby
crised has joined #ruby
VinceThePrince has quit [Quit: Leaving]
<crised>
Do I need rails to make a contact form?
<Spooner_>
Ageo_, The -ruby version is pure source, so you'd have to compile it. In this case, of course, you can just download the pre-compiled version.
idkazuma has quit [Remote host closed the connection]
Stilo has joined #ruby
<Spooner_>
crised, You can create a contact form with Rails, but no, you could use any framework to make it.
samphippen has quit [Quit: Computer has gone to sleep.]
<crised>
Spooner_: Which is the easiest way to do this?
<Spooner_>
I'd recommend using 1.9.3 if you are having problems of any kind (or are new to Ruby). 2.0 has only been released for a few weeks and not all gems work with it yet.
radic has joined #ruby
<Ageo_>
how ok
<Ageo_>
i test tomorrow with 1.9.3 :) my day is done now
mattbl has quit [Quit: This computer has gone to sleep]
<Spooner_>
crised, Sinatra is a much lighter-weight framework than Rails. Might suit you.
<Ageo_>
RubyInstaller 1.9.3-p392 released
<Spooner_>
Ageo_, You can use "pik" to manage multiple versions of Ruby on one machine.
<Spooner_>
*one Windows machine.
<Ageo_>
ok thx spooner i try tomorrow
<Ageo_>
i leave my work
<Ageo_>
i have nice day all and thx :)
<Ageo_>
bb
Targen has quit [Ping timeout: 264 seconds]
jjbohn is now known as jjbohn|afk
mahmoudimus has joined #ruby
Ageo_ has quit [Quit: Page closed]
mahmoudimus has quit [Client Quit]
mockra has joined #ruby
Targen has joined #ruby
averiso has quit [Quit: Quit.]
<shevy2>
dumdedum
shevy2 is now known as shevy
ckrailo has joined #ruby
monkegjinni has quit [Remote host closed the connection]
hasse has quit [Ping timeout: 245 seconds]
apod has quit []
zigomir has quit [Quit: zigomir]
danneu has quit [Quit: WeeChat 0.3.8]
Takehiro has joined #ruby
<splud>
I'm having lots of grief working with an array of arrays...
<breakingthings>
splud how so
<splud>
Currently, want to delete (delete_if seems appropriate) elements where there's another with a duplicate value, but I want to be selective about which gets deleted:
<splud>
a = [[1,"string1],[4,"string1"],[1,"string2"]]
dougireton has joined #ruby
<splud>
the numbers represent signal strength, the strings, an essid.
<splud>
(actual list is much larger)
DrShoggoth has quit [Remote host closed the connection]
hbpoison has quit [Ping timeout: 264 seconds]
<splud>
(and contains many other elements in the array)
hoelzro is now known as hoelzro|away
<Spooner_>
That doesn't look too complex. Depends on your criteria for deletion though.
cmdr-prmpt has quit [Quit: Done-zo]
froy has joined #ruby
huoxito has quit [Quit: Leaving]
<breakingthings>
splud: well, give an example of what you want to do with your example array there
huoxito has joined #ruby
a_a_g has quit [Quit: Leaving.]
<splud>
delete only if count of elements where the string matches is >1, and where the numeric is less than or equal to the max.
<Spooner_>
Max of what?
<splud>
max of the elements where the strings match.
khismetix has joined #ruby
EzeQL has left #ruby [#ruby]
a_a_g has joined #ruby
mattbl has joined #ruby
a_a_g has quit [Client Quit]
<splud>
I desire to end up with a = [[4,"string1"],[1,"string2"]]
Davey has joined #ruby
<splud>
(given the above example).
epta has quit [Ping timeout: 248 seconds]
<Spooner_>
The number is _always_ going to be less than or equal to the max.
<splud>
yes, as long as there are MORE THAN 1 matching string.
<Spooner_>
What you mean is "delete the element with the lowest value until there is only one left"?
epta has joined #ruby
echobinary has quit [Read error: Connection reset by peer]
<splud>
a = [[4,"string1"],[4,"string1"],[1,"string1"]]
becom33 has quit [Ping timeout: 248 seconds]
echobinary has joined #ruby
<shevy>
hmm there is funny character in the middle
<splud>
Spooner : that'd work, though "lowest" needs to accomodate equal.
<Spooner_>
Does the order of the outer array matter?
mattbl is now known as MattRB
<splud>
may not be ordered.
<splud>
I can re-order afterwards.
jpfuentes2 has joined #ruby
joeycarmello has quit [Remote host closed the connection]
markalanevans has quit [Quit: markalanevans]
<splud>
This operation is to remove same-named ESSIDs from a network scan and retain just the strongest one, as the association would be with the ESSID (textual name of the network), not the BSSID (basically MAC of the individual AP)
<whitequark>
splud: didn't read all of the backlog, but it seems that you need `sort_by`
girija has quit [Ping timeout: 264 seconds]
crised has left #ruby [#ruby]
jbueza has joined #ruby
timonv has quit [Remote host closed the connection]
hemanth has quit [Quit: This computer has gone to sleep]
<splud>
Still wondering how I match and delete here...
_nitti has quit [Remote host closed the connection]
danneu has joined #ruby
eAlchemist has joined #ruby
<whitequark>
splud: don't delete. a.sort_by { |(a,*),(b,*)| a <=> b }.first
<splud>
I can sort the array fine (on a single element at least). Not sure how I'd sort on essid and subsort on strength...
<splud>
dpm
<splud>
don't ?
sepp2k1 has joined #ruby
<whitequark>
splud: yes. don't delete elements, replace the whole array with one of its elements
<whitequark>
as per essid/strength
robbyoconnor has joined #ruby
mercwithamouth has quit [Ping timeout: 276 seconds]
<whitequark>
you can sort by two factors like this: [ssid1, rssi1] <=> [ssid2, rssi2]
<whitequark>
arrays delegate sorting to their elements
francisfish has quit [Remote host closed the connection]
DrShoggoth has joined #ruby
<k610>
y but again you need to have a partial match of the gem name
banjara has quit [Client Quit]
<Spooner_>
But yeah, get the gem name from gem list and look it up on rubygems.org. Never been a huge problem that I can't do more in-depth searches.
banjara has joined #ruby
<Spooner_>
I just search in google if I can't guess part of the name.
<splud>
hrm...
banjara has quit [Client Quit]
idkazuma has quit [Remote host closed the connection]
banjara has joined #ruby
phretor has quit [Quit: phretor]
motto has joined #ruby
banjara has quit [Client Quit]
<k610>
e.g i'd like to search for gems that do something with readline "gem query --remote readline" is the closest i can get but i have to script the result and search description for each. Does everyone really does that each time ?
banjara has joined #ruby
<shevy>
no, I dont even use query at all
banjara has quit [Client Quit]
adT has quit [Ping timeout: 240 seconds]
cpruitt has joined #ruby
<shevy>
I have 145 .gem files locally from other people here, of which I use about 20% regularly
banjara has joined #ruby
<shevy>
and readline comes with standard ruby
jetblack_ has joined #ruby
<splud>
how to accomplish .max on an array of quoted values? f = ["-35", "5", "10"] ? f.max returns "5"...
<shevy>
the highline gem may be useful http://highline.rubyforge.org/ and Mon_Ouie has something related to io-console, but I always forget the name
m8 has quit [Read error: Operation timed out]
banjara has quit [Client Quit]
alvaro_o has joined #ruby
`p has quit [Remote host closed the connection]
<splud>
(which is evaluated as string)
slainer68 has quit [Remote host closed the connection]
banjara has joined #ruby
bricker`1A has joined #ruby
artofraw has joined #ruby
<shevy>
how to you use .max on strings
feedbackloop has joined #ruby
jmeeuwen_ has joined #ruby
<Mon_Ouie>
Coolline. But still, t doesn't help more than Readline in his case.
<k610>
i'll dig deeper in highline & look into coolline & readline ... thanks
<splud>
trying to wedge that into the dupe remover...
banjara has quit [Client Quit]
banjara has joined #ruby
malkomalko has quit [Read error: Connection reset by peer]
threesome has quit [Ping timeout: 252 seconds]
<k610>
i mean are cisco like cli apps bad and should be replaced by gem like apps ?
malkomalko has joined #ruby
<Spooner_>
splud You probably want to learn a bit more Ruby rather than needing to ask at every step of your development.
<k610>
whateva im making some squires port if i can
Villadelfia_ has joined #ruby
geggam__wk has joined #ruby
dougireton has joined #ruby
sn0wb1rd has joined #ruby
<Mon_Ouie>
They're not bad. See e.g. Pry which has similar a
<alx->
Hi, I have a paperclip question: how can i pass auto_orient => false when using a proc to calculate image size: :styles => lambda { |p| { :medium => Proc.new { |instance| instance.resize_image } }
<Mon_Ouie>
a similar command system*
idkazuma has joined #ruby
<k610>
true that pry is awsome
<Mon_Ouie>
(It just also evaluates Ruby code)
<splud>
would love to have the time to sit down and learn more, but need to add some code to an existing framework.
r0bby has joined #ruby
adayzdone has quit [*.net *.split]
geggam_wk has quit [*.net *.split]
stopbit has quit [*.net *.split]
yalue has quit [*.net *.split]
nkr has quit [*.net *.split]
crankycoder has quit [*.net *.split]
KRF has quit [*.net *.split]
walbert has quit [*.net *.split]
jmeeuwen has quit [*.net *.split]
bricker`LA has quit [*.net *.split]
jetblack has quit [*.net *.split]
noop has quit [*.net *.split]
feedbackloop_ has quit [*.net *.split]
musl has quit [*.net *.split]
Villadelfia has quit [*.net *.split]
felixjet has quit [*.net *.split]
gogiel has quit [*.net *.split]
Weazy has quit [*.net *.split]
jwang has quit [*.net *.split]
pietr0 has quit [*.net *.split]
tetsu has quit [*.net *.split]
mattp_ has quit [*.net *.split]
yxhuvud2 has quit [*.net *.split]
marienz has quit [*.net *.split]
anekos has quit [*.net *.split]
Villadelfia_ is now known as Villadelfia
jmeeuwen_ is now known as jmeeuwen
wallclockbuilder has joined #ruby
robbyoconnor has quit [Read error: Connection reset by peer]
skum is now known as Vainoharhainen
Vainoharhainen has joined #ruby
Vainoharhainen has quit [Changing host]
arietis has joined #ruby
Xeago has quit [Remote host closed the connection]
<Spooner_>
splud, Subcontract :D
banjara has quit [Ping timeout: 256 seconds]
jerius has quit [Ping timeout: 255 seconds]
sirish has joined #ruby
Virunga has joined #ruby
g0tcha has quit []
<splud>
I sorted the placement of the to_i to get what I needed. Thanks for your assist.
hbpoison has quit [Ping timeout: 264 seconds]
a_a_g has joined #ruby
jamesfung14 has quit [Ping timeout: 250 seconds]
etcetera has quit []
a_a_g has quit [Client Quit]
techlife has quit [Ping timeout: 256 seconds]
r0bby has quit [Remote host closed the connection]
r0bby_ has joined #ruby
mattp_ has joined #ruby
marienz has joined #ruby
scriabin has joined #ruby
stopbit has joined #ruby
musl has joined #ruby
tcstar has quit [Quit: Leaving]
jwang has joined #ruby
yalue has joined #ruby
noop has joined #ruby
tcstar has joined #ruby
locriani has joined #ruby
jjbohn|afk is now known as jjbohn
Astralum has quit [Ping timeout: 240 seconds]
<scriabin>
guys I have two csv files which ought to map to sets (they contain rows which have two attributes: a unique identifier, and a version number)
jamesfung14 has joined #ruby
<scriabin>
these csv files ought to contain the same lines, but the versions may differ
walbert has joined #ruby
banjara has joined #ruby
techlife has joined #ruby
anekos has joined #ruby
Astralum has joined #ruby
artofraw has quit [Remote host closed the connection]
<scriabin>
I'm wondering how to create a ruby script to detect the differences in the two files so I can list "identifiers in the first file but not in the second", "identifiers in the second file but not in the first", etc.
failshell has quit [Remote host closed the connection]
<scriabin>
I was thinking of reading the files with the CSV library in 1.9.3, then bringing the data structure into a hash
timmow has quit [Ping timeout: 252 seconds]
<scriabin>
from there can I perform set functions on the two hashes?
r0bby_ has quit [Remote host closed the connection]
verysoftoiletppr has quit []
robbyoconnor has joined #ruby
markalanevans has joined #ruby
markalanevans has quit [Read error: Connection reset by peer]
markalanevans has joined #ruby
alexim has joined #ruby
sirish_ has joined #ruby
idkazuma has quit [Remote host closed the connection]
wreckimnaked has quit [Read error: Operation timed out]
_br_ has quit [Excess Flood]
freakazoid0223 has joined #ruby
sirish has quit [Ping timeout: 252 seconds]
Elhu has quit [Quit: Computer has gone to sleep.]
statarb3 has quit [Ping timeout: 245 seconds]
robbyoconnor has quit [Max SendQ exceeded]
etcetera has joined #ruby
<Guest1234>
is anyone familiar with a good process for software deliveries with respect to managing configuration properties?
<Guest1234>
I know of an am using Puppet
<Guest1234>
but I'm trying to figure out a good way to get parameters presented in a more manageable fashion for multiple data centers
echobinary has quit [Read error: Connection reset by peer]
otherj has joined #ruby
echobinary has joined #ruby
otherj has quit [Client Quit]
danneu has quit [Quit: WeeChat 0.3.8]
_br_ has joined #ruby
<Spooner_>
scriabin, You can just load the identifiers into Set and do set ops (& for intersection and | for intersection).
jerius has joined #ruby
drale2k has joined #ruby
chrishough has quit [Quit: chrishough]
halogenandtoast has joined #ruby
Vainoharhainen has quit [Ping timeout: 245 seconds]
etcetera has quit [Client Quit]
<Spooner_>
(or -, of course).
etcetera has joined #ruby
robbyoconnor has joined #ruby
_br_ has quit [Excess Flood]
brianpWins has joined #ruby
kevinfagan has quit [Quit: Leaving...]
mityaz has joined #ruby
skattyadz has quit [Quit: skattyadz]
nga4 has joined #ruby
rupee has joined #ruby
_br_ has joined #ruby
etcetera has quit []
_nitti_ has quit [Ping timeout: 245 seconds]
_nitti has joined #ruby
hadees has joined #ruby
whowantstolivef1 has joined #ruby
browndawg has quit [Quit: Leaving.]
vbbgggb has joined #ruby
jrendell has joined #ruby
Spooner_ has quit [Remote host closed the connection]
azm has quit [Ping timeout: 264 seconds]
takeru has joined #ruby
hbpoison has joined #ruby
gaahrdner has quit [Ping timeout: 260 seconds]
AlSquire has quit [Quit: This computer has gone to sleep]
adT has joined #ruby
Ontolog has joined #ruby
jjbohn has quit [Read error: Connection reset by peer]
_br_ has quit [Excess Flood]
Eldariof-ru has joined #ruby
takeru has quit [Ping timeout: 250 seconds]
<lectrick>
Is it possible to capture a non-matching group in regex?
dougireton has quit [Quit: Leaving.]
k610 has quit [Ping timeout: 245 seconds]
drale2k has quit [Ping timeout: 255 seconds]
Ontolog_ has joined #ruby
eldariof has quit [Read error: Operation timed out]
<halogenandtoast>
lectrick: Do you just mean text that doesn't match a given expression?
twoism has joined #ruby
breakingthings has quit []
<lectrick>
I want to capture a string that is not the next match in sequence
_br_ has joined #ruby
Phibs has left #ruby [#ruby]
Ontolog has quit [Ping timeout: 264 seconds]
<lectrick>
Like, if the next character is a 0 (detected via forward-lookahead), I want to consume it but then actually capture a 1
<halogenandtoast>
You can tell an expression not to include a capture
<halogenandtoast>
(?:0)
swex_ has joined #ruby
maxmanders has quit [Quit: Computer has gone to sleep.]
zeade has joined #ruby
_br_ has quit [Excess Flood]
pandawarrior1 has joined #ruby
<lectrick>
yes, I know that, but in this case I want TO capture something, but not have it match
<halogenandtoast>
can you give me a more explicit string example.
mrsolo has joined #ruby
alexim has quit [Ping timeout: 252 seconds]
bradhe has joined #ruby
dougireton has joined #ruby
swex has quit [Ping timeout: 248 seconds]
_br_ has joined #ruby
<lectrick>
basically, I want a regex that when set upon a string 'a', $1 returns 'b'
_nitti has quit [Remote host closed the connection]
<halogenandtoast>
I see
pepper_chico has quit [Quit: Computer has gone to sleep.]
joshman_ has quit [Remote host closed the connection]
<lectrick>
is that even possible?
joshman_ has joined #ruby
<lectrick>
"if the next character is a, capture a b"
Virunga has quit [Remote host closed the connection]
ilyam has quit [Read error: Connection reset by peer]
mrsolo has left #ruby [#ruby]
Virunga has joined #ruby
ilyam has joined #ruby
<halogenandtoast>
Nothing I know of will allow you to do this, but gsub allows you to give it a block where you can mutate the string contents.
<pandawarrior1>
russfrank: cool, i didn't know gsub takes blocks...
<halogenandtoast>
Sure pandawarrior1 thank russfrank even though I just said it
dblack_ has joined #ruby
<halogenandtoast>
lectrick: I don't think that problem falls under the wheelhouse of what regex was designed for.
whitedawg has quit [Quit: Leaving.]
<pandawarrior1>
halogenandtoast: you did? soz, mate...
<lectrick>
halogenandtoast: I realize that, I am just wondering what is possible :O
<halogenandtoast>
At a basic level regex is designed to determine if a lexeme fits into a defined language
jerius has quit []
<halogenandtoast>
mmm state machines
<lectrick>
Well, it is already able to capture, but captures have to match, I can't see it being that hard to implement a non-matching capture :O
maletor has joined #ruby
maletor has quit [Max SendQ exceeded]
pepper_chico has joined #ruby
pepper_chico has quit [Max SendQ exceeded]
jerius has joined #ruby
<halogenandtoast>
lectrick: You'd have to extend the regex language itself, which is already altered by perl regular expressions (which are not true regular expressions).
pseudonymous has quit [Ping timeout: 260 seconds]
<halogenandtoast>
It might not be "hard" but you'd have to come up with a syntax for it.
maletor has joined #ruby
pepper_chico has joined #ruby
pepper_chico has quit [Max SendQ exceeded]
maletor has quit [Max SendQ exceeded]
<russfrank>
lol
<halogenandtoast>
At the same time I think you'd be cross pollinating concerns.
<russfrank>
halogenandtoast: sorry for stealing your credit buddy hahaha
pepper_chico has joined #ruby
pepper_chico has quit [Max SendQ exceeded]
<halogenandtoast>
I know right!
tomzx_mac has quit [Ping timeout: 255 seconds]
maletor has joined #ruby
<halogenandtoast>
I was crushed for 5.23 seconds, it was horrible.
pepper_chico has joined #ruby
pepper_chico has quit [Max SendQ exceeded]
mengu has quit [Quit: Konversation terminated!]
pepper_chico has joined #ruby
pepper_chico has quit [Max SendQ exceeded]
kirun has joined #ruby
pepper_chico has joined #ruby
pepper_chico has quit [Max SendQ exceeded]
AxisOfEval has quit [Quit: Leaving...]
pepper_chico has joined #ruby
nsxt has quit [Ping timeout: 264 seconds]
Mo0O has quit [Quit: WeeChat 0.4.0]
AxisOfEval has joined #ruby
jurassic has joined #ruby
axxT has quit [Quit: ( .Ng Gaming ver.1337 :: www.NinpoGaming.com :: Now Leaving mIRC Teleport +1 )]
<varane>
why is this possible ? puts "hello" if a > b i just saw that in a book and it really confused me because on the ruby website the 20 minute tutorial doesn't do that
apok has joined #ruby
<banisterfiend>
varane: it's just a convenient short-hand
ebobby has joined #ruby
<onewheelskyward>
Well, a 20 minute tutorial can't really cover everything.
<banisterfiend>
varane: instead of going: if a > b; puts "hello"; end
thone_ has joined #ruby
<banisterfiend>
you can just go: puts "hello" if a > b
<varane>
banisterfiend: oh okay is there a place where i can learn about all the short hands ? i don't wanna get suprised anymore :P
hbpoison_ has joined #ruby
<banisterfiend>
varane: buy a book :P i recommend "the ruby programming language" by o'reilly
chussenot has joined #ruby
marr has quit [Ping timeout: 256 seconds]
<onewheelskyward>
And even with that, you'll still get surprised occasionally. Ruby is always evolving.
<varane>
banisterfiend: okay awesome thanks
<becom33>
how can I get the path from a string like "/this/and/this/and/that/meee.flv"
<varane>
onewheelskyward: like perl ? :P
thone has quit [Ping timeout: 252 seconds]
<onewheelskyward>
Heh. Absolutely.
skattyadz has joined #ruby
jurassic has quit [Quit: jurassic]
<becom33>
anyone ?
gaahrdner has joined #ruby
hbpoison has quit [Ping timeout: 252 seconds]
<onewheelskyward>
becom33 Check out File.dirname.
<lectrick>
Is there something like "prev" to do the opposite of "succ"?
<_andre>
i'm trying to wrap the fstatat() function
rdark has quit [Quit: leaving]
wallclockbuilder has quit [Ping timeout: 252 seconds]
<banisterfiend>
Hanmac: what music do you listen to?
wallclockbuilder has joined #ruby
Chocobo has joined #ruby
<Chocobo>
Total newb here. Where in ruby-doc.org should I look for an explanation of what this is doing: "something.each do |a,b|" ?
phretor has quit [Quit: phretor]
<csmrfx>
Chocobo: in Array
<Hanmac>
banister currently nothing ... otherwise JPop or RPG-midi music
<halogenandtoast>
Depends on what something is
<csmrfx>
Chocobo: try $ ri Array.each
<halogenandtoast>
it's likely to be an array
<halogenandtoast>
csmrfx: *highfive* for ri
<csmrfx>
looks bit like key-and value pair next to do, though
<Hanmac>
Chocobo or do you mean the |a,b| ?
_nitti has quit [Remote host closed the connection]
drale2k has joined #ruby
dougireton has joined #ruby
<Chocobo>
Ok, thanks... |a,b| is what I am most interested in... my guess is that (I may switch to python lingo, pardon me) that it is an array of tuples, and |a,b| are giving those parts a name
luckyruby has quit [Remote host closed the connection]
<Chocobo>
Nothing known about Array.each <=== result of # ri Array.each
<yxhuvud>
chocobo: it follows the same rules as multiple assignment.
brianpWins has quit [Quit: brianpWins]
_jc has joined #ruby
<Hanmac>
hm try Array#each
bitcoin00b has quit [Quit: bitcoin00b]
Davey has quit [Quit: Computer has gone to sleep.]
<Chocobo>
Nothing known about Array#each
<Hanmac>
:(
DrShoggoth has joined #ruby
<Chocobo>
Hmmm, I think ruby-doc might be a good refrence, but I think I have to go on a quest for a good tutorial.
geggam_wk has quit [Ping timeout: 260 seconds]
duosrx has quit [Remote host closed the connection]
<banisterfiend>
Chocobo: hi
<banisterfiend>
Chocobo: |a, b| is (usually) used to destructure the object passed to the block
<csmrfx>
Chocobo: perhaps something wrong with your ri
<Chocobo>
Ahh thanks banisterfiend. That is about what I thought might be going on. I am more familiar with Python, but I am going to learn ruby so I can use Chef effectively.
<csmrfx>
try ri<tab>
<csmrfx>
and no, those are not tuples
<csmrfx>
just an array of objects, supposing it is an array
<Chocobo>
ri ri-ruby-2.0.0-p0 ri-ruby-2.0.0-p0@global
jtharris has joined #ruby
<csmrfx>
looks like rvm
brianpWins has joined #ruby
<csmrfx>
anyway, ri Array.each or ri Array#each should return docs on each
<apeiros_>
Chocobo: if you installed ruby via rvm -> `rvm docs generate`
<banisterfiend>
>> def hello; yield([1,2]); end; puts hello { |x, y| x + y }
<apeiros_>
after that, ri will give output for `ri Array#each`
<halogenandtoast>
it's odd that ri has an entry for Foo
khismetix has joined #ruby
wallclockbuilder has quit [Remote host closed the connection]
hadees has quit [Quit: hadees]
<csmrfx>
must be an distributed ruby test deak
<csmrfx>
*deal
danman has quit [Quit: danman]
<Chocobo>
building :)
<banisterfiend>
Chocobo: does python allow this kind of thing? x,y = [1, 2]
<banisterfiend>
cos that's what's happening inside that block
tetsu_ is now known as tetsus
sam113101 has quit [Quit: WeeChat 0.3.8]
sonda has quit [Remote host closed the connection]
<Chocobo>
banisterfiend: yes it does.
<banisterfiend>
if you just had { |x| } instead of |x, y| then you'd get the full array, i.e [1, 2] inside the block
bean__ has joined #ruby
_nitti has joined #ruby
<banisterfiend>
Chocobo: do you play ff?
<Chocobo>
Ok, that makes sense. Now I need to work on symbols! :)
<Hanmac>
pah that is nothing ... does python can this: a,(b,c),d = [1,[2,3],4] #too? :P
<_andre>
Hanmac: did you have a chance to have a look at that code?
<Chocobo>
banisterfiend: Ahh... ff7 made me a happy young boy for many months :)
brianpWins has quit [Client Quit]
<Hanmac>
_andre yeah but not way to test it yet :(
AlSquire has joined #ruby
* csmrfx
goes back to dwarf fortress
<_andre>
this error is crazy "wrong argument type stat (expected stat)"
<interactionjaxsn>
Chocobo: I was a huge fan of tactics. just my two cents
<Chocobo>
csmrfx: you are my hero. Dwarf fortress is the best! If you ever find a good map that has a surface volcano let me know :)
<bean__>
df is a great.
hadees has joined #ruby
<bean__>
i want to play it but am at work :(
<Chocobo>
interactionjaxsn: Also a great game!
philcrissman has quit [Remote host closed the connection]
<Chocobo>
bean__: so? bean ... any relation the "Ender's Game" series of books?
<bean__>
of course.
<Chocobo>
excellent
<bean__>
my other nick is julian-delphiki
<Chocobo>
Haha nice. This channel is full of awesome things.
bean__ is now known as julian-delphiki
elaptics is now known as elaptics`away
<julian-delphiki>
sadly there is a guy who is using "bean_"
brianpWins has joined #ruby
<julian-delphiki>
and he won't let me has it.
<Chocobo>
I always liked Bean better than Ender.
brianpWins has quit [Client Quit]
<shevy>
Bean is better than Mean, and Gender better than Ender
<banisterfiend>
Chocobo: ff12 was the best
<banisterfiend>
;)
<julian-delphiki>
gtfo
<banisterfiend>
heh heh
<jrajav>
ff12? what the hell is that?
<jrajav>
I thought they skipped straight from 11 to 13
<Chocobo>
banisterfiend: is that the one where girls wear different clothes to give themselves power? or something equally horrible?
<banisterfiend>
Chocobo: nah that's 10
<jrajav>
10-2
<Chocobo>
Hold on... if I remember XII is pretty good.
<jrajav>
It's actually not terrible
<jrajav>
It's just a running joke that no one ever acts like it even existed
<banisterfiend>
jrajav: y dat
wargasm has quit [Read error: Connection reset by peer]
<Chocobo>
I had to look it up, but yeah I played that one. If I remember correctly the most annoying thing was the loading between areas.
aedorn has quit [Quit: Leaving]
axhlf has joined #ruby
<_andre>
Hanmac: just realized the 1.8 code works
<jrajav>
heck if I know
Michae___ has joined #ruby
<Chocobo>
I still think Earthbound may be my favorite RPG
BizarreCake has quit [Remote host closed the connection]
echobin92 has joined #ruby
echobinary has quit [Read error: Connection reset by peer]
Udom0 has joined #ruby
<Chocobo>
wow, takes a while to build the documentation.
io_syl has joined #ruby
sk87 has joined #ruby
k610 has joined #ruby
Morkel has quit [Ping timeout: 245 seconds]
<Chocobo>
is there a difference between arr.each { |a| print a -= 10, " " } and arr.each do |a| .... end ?
Morkel_ has joined #ruby
io_syl has quit [Client Quit]
dblack__ has joined #ruby
jrendell has quit [Quit: jrendell]
io_syl has joined #ruby
neku has joined #ruby
<whitequark>
Chocobo: yes and no
<whitequark>
two of your snippets are equivalent
Udom0 has left #ruby [#ruby]
<whitequark>
but: `a b { c }` and `a b do c end` parse differently
<whitequark>
in the first case the block is bound to the rightmost method, i.e. `b`
<shevy>
Chocobo {} is shorter than do end
<whitequark>
Chocobo: but in the second one that's `a`
<becom33>
how can I fix the syntax pattern in ruby easily
<becom33>
code is mess
<whitequark>
Chocobo: the general idea is that {} is for 'inline' blocks, and do...end is for bigger, multiline ones
R_Macy has joined #ruby
lewix has joined #ruby
lewix has quit [Changing host]
lewix has joined #ruby
<whitequark>
becom33: google for "ruby code formatter" or "code beautifier"
<Chocobo>
Hmm, ok thanks. Interesting.
theRoUS has quit [Ping timeout: 260 seconds]
sirish_ has quit [Ping timeout: 255 seconds]
dougireton has quit [Quit: Leaving.]
* whitequark
places his psychic powers back
<interactionjaxsn>
whitequark: how you do that?
jcsims has left #ruby [#ruby]
<whitequark>
interactionjaxsn: what in particular?
<interactionjaxsn>
places his psychic...
<whitequark>
interactionjaxsn: /me
* interactionjaxsn
sheds tear of joy
_nitti_ has joined #ruby
rburton- has joined #ruby
jlast has quit [Remote host closed the connection]
_nitti_ has quit [Read error: No route to host]
Eldariof-ru has quit []
TheFuzzball has quit [Ping timeout: 256 seconds]
_nitti_ has joined #ruby
_nitti has quit [Ping timeout: 252 seconds]
jlast has joined #ruby
rippa has quit [Ping timeout: 240 seconds]
takeru has joined #ruby
TheFuzzball has joined #ruby
bigkevmcd has quit [Read error: No route to host]
<Chocobo>
I love asking really annoying questions to people who know more than me... so here we go. arr = [[1,2],[2,3],[3,4]]; arr.each { |a,b| print a+b }; 357 => [[1, 2], [2, 3], [3, 4]]
<Chocobo>
I get the "357" by why the => [[1, 2], [2, 3], [3, 4]]
samphippen has joined #ruby
<Hanmac>
Chocobo .each returns self
<GeekOnCoffee>
and rib prints the return value
<GeekOnCoffee>
irb even
<Chocobo>
ohhh... that would make sense. doh.
kirun_ has joined #ruby
bigkevmcd has joined #ruby
Xeago has joined #ruby
<Chocobo>
Thanks, I will go back to my corner now :)
joshman_ has quit [Ping timeout: 260 seconds]
workmad3 has joined #ruby
aedorn has joined #ruby
cmdr-prmpt_ has joined #ruby
yashshah has quit [Read error: Connection reset by peer]
sepp2k1 has quit [Read error: Connection reset by peer]
_nitti_ has quit [Read error: Connection reset by peer]
chongyu123 has joined #ruby
_nitti has joined #ruby
<Hanmac>
shevy i found this error: "undef leaked to the Ruby space" :D
flowerhack has joined #ruby
atyz has joined #ruby
Xeago has quit [Remote host closed the connection]
axl_ has joined #ruby
jrendell has joined #ruby
theRoUS has joined #ruby
kirun__ has joined #ruby
ryanf has joined #ruby
kirun__ has quit [Client Quit]
malte_ has joined #ruby
Guest8893 is now known as guyz
jrendell_ has joined #ruby
jrendell has quit [Read error: Connection reset by peer]
jrendell_ is now known as jrendell
kirun_ has quit [Ping timeout: 250 seconds]
_nitti has quit [Remote host closed the connection]
yshh has quit [Read error: No route to host]
guyz is now known as Guest3957
<Chocobo>
huh... symbols are kind of neat.
cmdr-prmpt_ has quit [Quit: Done-zo]
_nitti has joined #ruby
jdunck has joined #ruby
drale2k has quit [Quit: Leaving...]
SCommette has quit [Quit: SCommette]
<julian-delphiki>
symbols are very neat
<julian-delphiki>
:)
Xeago has joined #ruby
kayloos has joined #ruby
<halogenandtoast>
I've never described them as neat.
codecop has joined #ruby
emocakes has joined #ruby
<halogenandtoast>
But I came from languages with atoms.
helvete has joined #ruby
<becom33>
can anyone tell me how can I get ruby script to play a file in linux default media player ?
rgbdev has joined #ruby
<shevy>
Hanmac odd error
rgbdev has left #ruby [#ruby]
nsxt has quit [Ping timeout: 252 seconds]
yshh has joined #ruby
<halogenandtoast>
becom33: Kernel.exec or if it has a c-api use that (but I doubt the later).
huoxito has joined #ruby
sirish has joined #ruby
heliumsocket has quit [Quit: heliumsocket]
<Squarepy>
becom33, call the process f.i. with system(), I guess it is commandline callable
<csmrfx>
becom33: ri system or ri `
<becom33>
halogenandtoast, umm sorry I dont thin I understand what you ment
<TTilus>
" linux default media player"? theres no such thing
<becom33>
TTilus, what ever the OS has it as a default player
<halogenandtoast>
csmrfx: why system or ` over exec, I'd assume you'd want to replace the current process.
<Hanmac>
_andre: i didnt get the 1.9 version working ... i have ENOUGH !!! i will make a ticket request for stat -> VALUE ... and no one can stop me :D
<TTilus>
becom33: once you find out about the desktop env the user has and find the default media player executable name you can run it using system-method
nomenkun has joined #ruby
verysoftoiletppr has joined #ruby
<becom33>
TTilus, thats the problem how can I find it
jtharris has quit [Read error: Connection reset by peer]
jtharris has joined #ruby
helvete has quit [Ping timeout: 248 seconds]
sam113101 has joined #ruby
ablemike has joined #ruby
<ablemike>
anyone know why bundler keeps storing gems in vendor/cache?
<csmrfx>
halogenandtoast: in fact, you want to use `
<csmrfx>
it is said to be a bit faster than system
<ablemike>
someone on the team did something and now everytime i bundle in this project vendor/cache keeps getting filled up with cache's of the gems
<TTilus>
becom33: there are dozen of different preference systems, pick one and use it
<halogenandtoast>
csmrfx: I've had problems with media players when they aren't the parent process.
<halogenandtoast>
In particular mplayer
davetherat has joined #ruby
<shevy>
becom33 is there a "default player" on linux? where would that be stored?
<csmrfx>
it just runs in a subshell, I don tsee what the problem could be there
<shevy>
hey, I would not have any idea about the names :) but let's say "the latest apple OS always"
<shevy>
ack, never read exo-open before...
pkrnj has joined #ruby
<halogenandtoast>
darwin is the kernel, you can boot into single user mode
<shevy>
ah ok
<halogenandtoast>
which loads the OS sans GUI
sirish has quit [Ping timeout: 276 seconds]
<TTilus>
shevy: its a unix, heavens sake!
<shevy>
it's quite bastardized on the outside
phinfonet has joined #ruby
<halogenandtoast>
osx?
<halogenandtoast>
If so, I agree.
<TTilus>
osx is more unix than linux distros
<shevy>
!!!
Gu_______ has joined #ruby
<TTilus>
honest
<shevy>
I find no words, only !
<TTilus>
see conformance to single unix spec!
<shevy>
I must overwrite your nick with !
jpfuentes2 has quit [Quit: Computer has gone to sleep.]
jrendell has quit [Ping timeout: 264 seconds]
<TTilus>
my god, it is basically nextstep on top of bsd =D
dougireton has quit [Remote host closed the connection]
R_Macy has quit [Ping timeout: 250 seconds]
_nitti has quit [Remote host closed the connection]
adkron has quit [Ping timeout: 272 seconds]
adkron_ has quit [Ping timeout: 260 seconds]
<lsoa>
Hanmac: so, I managed to fix my code, and part of my thought process too :)
_nitti has joined #ruby
banjara has quit [Quit: Leaving.]
eliasp has joined #ruby
helvete has joined #ruby
<lsoa>
Hanmac: which got me thinking... let's say I need to encapsulate my C extension logic in a Class. Wouldn't it be easier to create an AbstractClass in ruby, then create a Class < AbstractClass in C just to perform the glue part? keeping struct vars in sync etc?
banjara has joined #ruby
nsxt has joined #ruby
backjlack has quit [Remote host closed the connection]
banjara has quit [Client Quit]
<apeiros_>
lsoa: you can have parts in ruby and parts in C without an abstract class
<Hanmac>
i dont know
monkegjinni has quit [Remote host closed the connection]
banjara has joined #ruby
<apeiros_>
pointless IMO
<lsoa>
apeiros_: yes, but I want to avoid the endless rb_iv_set rb_iv_get
statarb3 has quit [Quit: Leaving]
<Hanmac>
i prefer, when i make an C(++) gem to write everything in C(++)
cmarques has quit [Ping timeout: 245 seconds]
atyz has quit [Ping timeout: 264 seconds]
<apeiros_>
lsoa: then don't. you can use self.foo= on the ruby side instead of ivars.
<lsoa>
apeiros_: then my life is so much easier, if I want to write a binding
duosrx has quit [Ping timeout: 264 seconds]
R_Macy has joined #ruby
mootpointer has joined #ruby
ad_r has joined #ruby
banjara has quit [Client Quit]
<ad_r>
hi
<shevy>
becom33 [[]].flatten.empty? # => true
nazty has quit [Read error: Connection reset by peer]
banjara has joined #ruby
nsxt has quit [Ping timeout: 250 seconds]
drale2k has joined #ruby
<lsoa>
I can write the low level stuff in C, then add high level methods in pure ruby
<lsoa>
after I can access the structs I need
<apeiros_>
exactly
echobin92 has quit [Read error: Connection reset by peer]
banjara has quit [Client Quit]
<lsoa>
I think I understand it better now
mmitchel_ has joined #ruby
<lsoa>
thanks :D
s__dana has quit [Ping timeout: 276 seconds]
s__dana_ is now known as s__dana
banjara has joined #ruby
echobinary has joined #ruby
<apeiros_>
you can also prototype in ruby
<apeiros_>
then when you think something is a bottleneck, move that part to C too
<adT>
hi
heliumsocket has joined #ruby
banjara has quit [Client Quit]
jrendell has quit [Quit: jrendell]
<lsoa>
I see. but it's kind of the reverse I'm trying to do now
<lsoa>
I have this lib in C which I want to use in ruby
banjara has joined #ruby
<Hanmac>
and when C is bottlenecking move that part to ASM :P
johnnygoodmancp1 has joined #ruby
<lsoa>
and then you move it to the *cloud*
<adT>
when I do something like "\x00\x11\x22\x33"[1,2].unpack('v*')[0] I get the correct value => 8721 But If I do "\x00\x11\x22\x33"[1,1].unpack('v*')[0] (just offset 1) I get nil
* lsoa
ducks :D
banjara has quit [Client Quit]
s__dana_ has joined #ruby
<adT>
can I solved that using other way?
_jc has joined #ruby
dblack__ has quit [Quit: dblack__]
johnnygoodmancp1 has left #ruby [#ruby]
<shevy>
lsoa ruby needs you!
banjara has joined #ruby
<shevy>
ruby needs C people
<lsoa>
I'm hardly a C person :D
<shevy>
you know C
<apeiros_>
adT: why do you even expect that to work?
<lsoa>
I'm just a nosy sysadmin
<apeiros_>
v needs 2 bytes
soulisson has joined #ruby
<lsoa>
eheheheh
<jrajav>
Judgmental Asian dad says: Why you C person? Why you no A person?
<shevy>
I don't know C but I know ruby a bit
<lsoa>
jrajav: haha
<apeiros_>
if you want to unpack 1 byte, use the proper template string. e.g. "C"
<shevy>
jrajav must be the local entertainer at work
banjara has quit [Client Quit]
<adT>
apeiros_: I kwno that that could not work :p but is there any way to add padding to avoid that. My problem is that the offset is a var --> "\x00\x11\x22\x33"[1,i].unpack('v*')[0]
mmitchell has quit [Ping timeout: 252 seconds]
<jrajav>
Also I feel very comfortable using that meme because I have several Asian friends (from different countries even), and their dads (or moms filling in for the role) are literally that, exactly.
banjara has joined #ruby
<adT>
and I would like to add padding in the case I have just a nible
dougireton has joined #ruby
<lsoa>
well thanks guys, let me hammer my problem a lil more then I'll bring some more issues to you :D
banjara has quit [Client Quit]
banjara has joined #ruby
theRoUS has quit [Ping timeout: 276 seconds]
phretor has joined #ruby
s__dana has quit [Ping timeout: 250 seconds]
s__dana_ is now known as s__dana
banjara has quit [Client Quit]
banjara has joined #ruby
Virunga_ is now known as Virunga
<soulisson>
hi, sorry about this question but i'm having troubles understanding the concept of attribute in oop, can someone explain as simply as possible ?
huoxito has quit [Read error: Connection timed out]
alexyz has joined #ruby
banjara has quit [Client Quit]
<alexyz>
does rescue always require a begin?
huoxito has joined #ruby
hadees has quit [Quit: hadees]
banjara has joined #ruby
<apeiros_>
alexyz: yes. but `def` can also act as `begin`
Onii-san has quit [Ping timeout: 245 seconds]
<shevy>
alexyz hmm I think so
samphippen has joined #ruby
<apeiros_>
ah, there's also inline rescue
reset has joined #ruby
<apeiros_>
but I'd rather disadvise its use
dougireton has quit [Remote host closed the connection]
<alexyz>
apeiros_: so one could write: def name <statements> rescue ... end?
<aaronmcadam>
anyone know if bundler have dropped the --binstubs flag?
<aaronmcadam>
gives an error now
<apeiros_>
alexyz: yes
<alexyz>
interesting... thanks apeiros_
cheese1756 has quit [Ping timeout: 245 seconds]
<apeiros_>
nice for short methods
banjara has quit [Client Quit]
adkron__ has quit [Ping timeout: 240 seconds]
enroxorz is now known as abed-zorz
banjara has joined #ruby
<shevy>
but how could such a short method fail?
vierja has joined #ruby
banjara has quit [Client Quit]
Squarepy has quit [Quit: Leaving]
solidoodlesuppor has quit [Remote host closed the connection]
banjara has joined #ruby
<alexyz>
shevy: I imagine it could be a 3rd party system call, i/o etc
gothicsouth has quit [Ping timeout: 255 seconds]
banjara has quit [Client Quit]
banjara has joined #ruby
<shevy>
hmm
moca has joined #ruby
s0ber_ has joined #ruby
aztak has joined #ruby
dougireton has joined #ruby
etcetera has quit []
jonathanwallace has quit [Quit: WeeChat 0.3.9.2]
banjara has quit [Client Quit]
banjara has joined #ruby
gothicsouth has joined #ruby
<apeiros_>
shevy: in all ways possible
<apeiros_>
sometimes even in some impossible ways
banjara has quit [Client Quit]
Guest45517 has joined #ruby
banjara has joined #ruby
s0ber has quit [Ping timeout: 245 seconds]
s0ber_ is now known as s0ber
jbueza has left #ruby [#ruby]
tonini has quit [Remote host closed the connection]
Gwyxx has quit [Ping timeout: 256 seconds]
jbueza has joined #ruby
hbpoison has joined #ruby
jonathanwallace has joined #ruby
mpfundstein has joined #ruby
<Guest45517>
hi all, i'm trying to install redmine 2.2.3 on windows server 2012 x64, with mysql. i have a lot of trouble, mainly with imagemagick and with mysql connector too. is there a "step guide" (i've tried to follow the wiki's one, without success) that can help me? i know that this is not mainly a ruby problem, but i think that the issue is related to the gem installation of the product...
jlast has quit [Remote host closed the connection]
<julian-delphiki>
THat sounds god damn terrifying
nsxt has joined #ruby
<julian-delphiki>
i'm not sure why anyone trys to do anything ruby on windows.
<Guest45517>
julian, i undestand... but my company want it on windows
<Guest45517>
i know that this doesn't sound great :'(
rkj has joined #ruby
banjara has quit [Client Quit]
banjara has joined #ruby
etcetera has joined #ruby
Davey has joined #ruby
soulisson has quit [Remote host closed the connection]
banjara has quit [Client Quit]
banjara has joined #ruby
sam113101 has joined #ruby
hbpoison_ has quit [Ping timeout: 252 seconds]
banjara has quit [Client Quit]
robbyoconnor has joined #ruby
banjara has joined #ruby
akashj87 has quit [Ping timeout: 245 seconds]
jtharris has quit [Quit: WeeChat 0.4.0]
banjara has quit [Client Quit]
banjara has joined #ruby
MattRB has quit [Quit: Leaving]
<Guest45517>
julian, you think this is not good or that this is not really possible? :(
jtharris has joined #ruby
duosrx_ has quit [Remote host closed the connection]
banjara has quit [Client Quit]
aleph-null has joined #ruby
banjara has joined #ruby
<scriabin>
is there any Head|Tail list functionality somewhere in Ruby? (like erlang etc.)
abed-zorz is now known as enroxorz
<scriabin>
I have an array of arrays which I need to convert into some set-like data structure
banjara has quit [Client Quit]
samphippen has quit [Quit: Computer has gone to sleep.]
banjara has joined #ruby
<scriabin>
trouble is, in at least one case, the arrays inside aren't the same size
Es0teric has joined #ruby
banjara has quit [Client Quit]
banjara has joined #ruby
<whitequark>
scriabin: so?
<scriabin>
long story, sorry
jtharris has quit [Client Quit]
Bira has quit [Ping timeout: 276 seconds]
yalue has quit [Read error: Connection reset by peer]
<whitequark>
scriabin: I don't understand your problem. Anyway, look up Array#flatten
<shevy>
%w( abc def ghi ).grep(/de/) # should give me back "1" eventually
<shevy>
ah ok thanks apeiros_
<jsonperl>
Hanmac: thanks!
banjara has quit [Client Quit]
banjara has joined #ruby
<apeiros_>
scriabin: Hash[ary.map { |k,*v| [k,v] }] if you want it normalized
jtharris has joined #ruby
banjara has quit [Client Quit]
<apeiros_>
if you really want this denormalized "once the value is an array, once not" oddball thingy, then add a check for v.size == 1
banjara has joined #ruby
jurassic has quit [Quit: jurassic]
<scriabin>
apeiros_: does the *v deal with the irregular tail?
jurassic has joined #ruby
<Hanmac>
it turns everything into an array :P
<scriabin>
ok I'll *try* it :)
<scriabin>
thanks
<apeiros_>
irb is your friend
<apeiros_>
or pry
sam113101 has quit []
<whitequark>
scriabin: note that head|tail in erlang and [h,*t] construct in ruby are very different internally and exist for completely different reasons
Quebert has joined #ruby
jurassic has quit [Client Quit]
whowantstolivef1 has quit [Ping timeout: 264 seconds]
testingb0t has joined #ruby
DrShoggoth has joined #ruby
huoxito has joined #ruby
arturaz_ has quit [Remote host closed the connection]
horofox_ has quit [Quit: horofox_]
<scriabin>
ape that's totally awesome - thanks
pkrnj has quit [Quit: Computer has gone to sleep.]
jonahR has quit [Quit: jonahR]
<jsonperl>
Hanmac: it seems as if rb_global_variable will never release the memory until the program exits
joofsh has quit [Remote host closed the connection]
bradhe has quit [Ping timeout: 260 seconds]
<Hanmac>
jsonperl what else did you expect?
<jsonperl>
Hanmac: It looks as though rb_gc_register_address and rb_gc_unregister_address should allow me to clean it up
<jsonperl>
well i want to hold it… till i no longer want it
<jsonperl>
but this is a server… so it will create and reclaim a lot of times
<jsonperl>
but that function pointed me to those, so very much appreciate
generalissimo is now known as trollissimo
<halogenandtoast>
maybe you don't want a global.
cmarques has joined #ruby
<Hanmac>
hm i didnt get rb_gc_register_address working for me ... so i use an hash with rb_global_variable and then store the object like { INT2NUM(obj) => obj } inside the hash
khismetix has joined #ruby
<jsonperl>
ill go give it a shot
Stilo has joined #ruby
<Hanmac>
PS: you cant use an array for that because it will bite you
<jsonperl>
back in 5 :)
horofox_ has joined #ruby
huoxito has quit [Ping timeout: 240 seconds]
<jsonperl>
a comprehensive ruby c api doc would be amazing
<jsonperl>
i found most info in random forum posts
Spooner has joined #ruby
bradhe has joined #ruby
<Hanmac>
jsonperl: that is nothing :P ... i have an lib where an C++ object forces an Ruby Object to stay alive as long the C++ object lives :P
huoxito has joined #ruby
<jsonperl>
i started trying to c++ some of my logic
<jsonperl>
kinda gave up for the time
<jsonperl>
i've got some BEEEFY stuff going on in c
<jsonperl>
the api is very powerful, once you know it
<jsonperl>
deepworldgame.com
<jsonperl>
the backend is all ruby/c
baustin has quit [Read error: Connection reset by peer]
brianpWins has joined #ruby
kpshek has quit []
wf2f has quit []
becom33 has quit [Quit: Leaving]
testingb0t has quit [Quit: Leaving.]
j^2 has quit [Ping timeout: 264 seconds]
chussenot has quit [Quit: chussenot]
<jsonperl>
i think rb_gc_unregister_variable is gone
<jsonperl>
maybe it was once there
horofox_ has quit [Quit: horofox_]
sparrovv has joined #ruby
huoxito has quit [Ping timeout: 260 seconds]
alexim has quit [Ping timeout: 252 seconds]
mark_locklear has quit [Read error: Operation timed out]
Michae___ has quit [Remote host closed the connection]
arturaz_ has joined #ruby
vipjun has quit [Ping timeout: 256 seconds]
sirish has quit [Ping timeout: 276 seconds]
hbpoison has joined #ruby
theRoUS has joined #ruby
wobblini has joined #ruby
sambio has joined #ruby
<scriabin>
when you convert an Array of Arrays to a Hash, if the Array of Arrays has multiple "keys" then some of the records get dropped. Is there any nifty ruby-way of knowing which records got dropped?
pandawarrior1 has quit [Quit: Leaving.]
mootpointer has quit [Quit: Computer has gone to sleep.]
mercwithamouth has joined #ruby
<scriabin>
a = [["a",1],["a",2]]
<scriabin>
h = Hash[*a]
<scriabin>
a.size != h.size
<apeiros_>
a) select duplicate values, b) use merge with a block instead of Hash::[]
<apeiros_>
there are probably a couple of other ways
<scriabin>
but if you're worried, unplug it from the wall and put on a hat fashioned from tin foil. Also bag up your poop in ziplocks
<Hanmac>
apeiros_ only if its the EA version :P
<apeiros_>
Hanmac: the EA version won't run offline
<scriabin>
so are there *no* set functions for hashes?
<scriabin>
bummer
<Hanmac>
yeah that what i meant ;P
<apeiros_>
scriabin: ¿que?
<scriabin>
hashes seem a lot like sets, right?
francisfish has quit [Remote host closed the connection]
ozgura has joined #ruby
<apeiros_>
well, you can express about every data structure as a set
<scriabin>
I'm trying to compare two csv files in ruby
dahood has left #ruby [#ruby]
elux has quit [Quit: Leaving...]
<scriabin>
the files ought to be identical, if they're not, I want to list what's present in file a but not in file b or vise-versa
<zeta>
apeiros_: ok, I think its all good and tell breakingthing I don't have a
emergion has joined #ruby
<zeta>
botnet, lol
<Quadlex>
scriabin: Is order important?
<scriabin>
no it's not
<scriabin>
I mean the file should start alphabetized, but I can manipulate it in any order
<breakingthings>
zeta ur all the botnets
<Quadlex>
So you couldn't use diff
<breakingthings>
i am russian hacker
<breakingthings>
ha ha
joshman_ has quit [Ping timeout: 256 seconds]
aaronmcadam has quit [Quit: Leaving...]
<zeta>
breakingthings: I'm sure you're a hacker but my computer has not become a zombie machine by you
<breakingthings>
zeta yes it has
<breakingthings>
you do not know
<breakingthings>
ha ha
emocakes has quit [Quit: emocakes]
<apeiros_>
scriabin: so basically you want to compare rows
<zeta>
breakingthings: of course I know bitch, I know what is happening now and if you're such a hacker then go ahead and gain remote access to me
<apeiros_>
scriabin: just use Set then
<scriabin>
apeiros_: yeah but since ruby is always so amazing I try not to iterate as a first try :)
<apeiros_>
a = Set.new(CSV.read(file1)); b = Set.new(CSV.read(file1)); a-b; b-a
<breakingthings>
LOL
<breakingthings>
zeta
<breakingthings>
i'm just screwing around bud
<zeta>
give my my location, prove your hackiness because I have tracerouted all the IP addresses and they all come back whitlisted
joshman_ has joined #ruby
<breakingthings>
calm yo self
<apeiros_>
b should obviously be file2
<breakingthings>
can't you tell by the horrible "I AM RUSSIAN" 'accent'
aaronmcadam has joined #ruby
banseljaj is now known as imami|afk
Bira has quit [Ping timeout: 272 seconds]
<scriabin>
again: amazing
<scriabin>
I didn't know csv could just be read into a set
havenn has joined #ruby
<scriabin>
if there are duplicate keys they just get dropped?
jamesfung14 has joined #ruby
<scriabin>
silently?
jgrevich_ has joined #ruby
emergion has quit [Quit: Computer has gone to sleep.]
<zeta>
breakingthings: lol oh
<zeta>
k sorry
<scriabin>
boris and natasha ovuh heeya
ablemike has quit [Remote host closed the connection]
jgrevich has quit [Ping timeout: 276 seconds]
jgrevich_ is now known as jgrevich
georgi has joined #ruby
mikurubeam has quit [Quit: +1 (Yes.) -1 (No.) i (WTF?)]
kayloos has quit [Read error: Connection reset by peer]
georgi has quit [Client Quit]
jekotia has joined #ruby
<julian-delphiki>
zeta: what software are you running with ruby.
<havenn>
scriabin: A duplicate key is the same key with a new valueB but prolly should check if keys are unique as you parse them to Hash, since Hash keys are unique.
<breakingthings>
julian-delphiki: it's some OSX internal stuff.
<apeiros_>
scriabin: duplicate records would only occur once, yes
Giorgio has joined #ruby
Criztian has quit [Remote host closed the connection]
etcetera has quit []
tomku has quit [Ping timeout: 248 seconds]
<apeiros_>
if records can be duplicated, I'd use counting hashes instead and compare occurrence counts
<scriabin>
so I'm thinking I read csv into a hash and into a set, check if there are dup's in the array (using the nifty group_by) on the array, then proceed with set functions
<apeiros_>
a = Hash.new(0); CSV.read(file1).each do |row| a[row] += 1 end
<zeta>
julian-delphiki: yes osx running network ruby scripts or some shit like that, nothing malicous because I have tracerouted the ip addresses and everything is whitelisted
<scriabin>
apeiros_: if there are dups, then they are in error, but there may be dups.
<julian-delphiki>
lol
lewix has quit [Remote host closed the connection]
<scriabin>
this ought to be a file of application's on a server, [package_name,version]
<havenn>
scriabin: So what is the desired behavior when you're parsing csv to hash and you find a dup? Raise an error? Rename the dup?
DrShoggoth has joined #ruby
<scriabin>
it's a report, so I'
<scriabin>
I'll just report it
tomku has joined #ruby
chrishough has quit [Quit: chrishough]
invisime has quit [Quit: Leaving.]
<scriabin>
"In file a, these records were defined more than once: ..."
garbagecollectio has quit [Quit: garbagecollectio]
pkrnj has quit [Quit: Computer has gone to sleep.]
emergion has joined #ruby
phantasm66 has quit [Quit: *sleeeep….]
phretor has quit [Quit: phretor]
kofno has quit [Remote host closed the connection]
halogenandtoast has quit [Quit: halogenandtoast]
<epta>
How can I found unused `require's in ruby file?
<epta>
Or unused variables
rocket_ has joined #ruby
mootpointer has joined #ruby
rocket- has joined #ruby
<julian-delphiki>
i don't know about requires, but ruby -w would tell you some
<havenn>
epta: An unnecessary require will return false. Ruby 2.0 can report assigned but unused variables.
johnnygoodmancpa has joined #ruby
reppard has joined #ruby
<havenn>
epta: Oh, by unnecessary require do you mean that it has already been required or that the class or module in the required file isn't used?
tjbiddle_ has joined #ruby
<johnnygoodmancpa>
exit will stop the script, break will stop the loop.
<johnnygoodmancpa>
Is there a ruby command to stop executing only THIS PASS on a loop?
<havenn>
johnnygoodmancpa: next
gyre007 has quit [Ping timeout: 248 seconds]
<johnnygoodmancpa>
havenn: hug
Quebert has quit [Ping timeout: 250 seconds]
idkazuma has joined #ruby
<epta>
havenn: be unused require I mean `require 'some'' which is useless because non of imported objects are not used
jekotia_ has joined #ruby
<havenn>
epta: ah, gotcha
jekotia has quit [Ping timeout: 252 seconds]
jekotia_ is now known as jekotia
rocket_ has quit [Ping timeout: 252 seconds]
<scriabin>
havenn ok I've come full circle
<havenn>
epta: I guess you've got to decide what used means. If there is a single constant referenced or monkey patch or method on main.
<scriabin>
reading a csv file into a set returns a set of arrays (that makes sense I'm sure)
<apeiros_>
a row is an array of fields
tjbiddle has quit [Ping timeout: 272 seconds]
tjbiddle_ is now known as tjbiddle
<scriabin>
{["apache","2.6.12"],["sshd","1.8.9"]}
<scriabin>
etc.
slainer68 has joined #ruby
jpfuentes2 has quit [Ping timeout: 272 seconds]
<scriabin>
surely file_a_set < file_b_set won't work in a set-like way?
kristofers has quit []
<havenn>
I like that Ruby 2 doesn't report _-prefixed variables if they are assigned an unused. Nice idiom.
dougireton has quit [Quit: Leaving.]
<apeiros_>
and what would "set1 smaller than set2" do?
<apeiros_>
in a set-like way…
brianpWins has quit [Ping timeout: 255 seconds]
emergion has quit [Ping timeout: 264 seconds]
havenn is now known as havenwood
<apeiros_>
havenwood: rubymine was/is clever that way too
gaahrdner has quit [Remote host closed the connection]
<apeiros_>
(and yes, good that ruby does that now too)
<scriabin>
sorry I used < to mean 'is a subset of"
<apeiros_>
scriabin: let me introduce you to ri
<apeiros_>
`ri Set` in your bash or whatever shell will give you a list of all methods of Set
khismetix has quit [Ping timeout: 245 seconds]
<apeiros_>
I'm sure you'll find the method you're looking for
<havenwood>
apeiros_: Nice. I checked out a beta EAP release of RubyMine and it seemed pretty cool. Have you used it for larger projects? Fast enough? Worth it to deal with complexity?
<apeiros_>
scriabin: alternatively you could look at the code I gave you, which ends with `a-b` and `b-a`
<scriabin>
proper_subset, asliased as <
jpfuentes2 has joined #ruby
jso_ is now known as jso
<apeiros_>
havenwood: I don't use it myself. coworker does. seems nice. but make sure you've shitloads of ram ready for it
<scriabin>
I'm asking whether that kind of function works for a set of arrays, not a set of primals?
<scriabin>
I'll test in irb
emergion has joined #ruby
Progster has joined #ruby
<havenwood>
apeiros_: I've got 16GB but just flop between TextMate 2 and VIM.
khismetix has joined #ruby
<havenwood>
apeiros_: Tried to get emacs working with xiki but gave up without really trying very hard
axl_ has quit [Quit: axl_]
<aedorn>
havenwood: That's like my gaming machine... it has 32GB, but it just sits there collecting dust. *sigh* Okay, not quite like my gaming rig then.
* apeiros_
is switching between sublime and bbedit
<apeiros_>
but I think sublime will win
R_Macy has quit [Quit: Computer has gone to sleep.]
johnnygoodmancpa has left #ruby [#ruby]
breakingthings has quit []
mercwithamouth has joined #ruby
<Quadlex>
aedorn: Aww, but what do you play FTL on?
dougireton has joined #ruby
khismetix has quit [Client Quit]
<aedorn>
Quadlex: my work laptop!
<Quadlex>
I like your style.
* Quadlex
awards 5 points
<havenwood>
apeiros_: mm, i've got a sublime license and actually really like the overview-thingy on the right - tempting to use because of OS X, Linux, Win support. But I like TM2.
<apeiros_>
funny, overview-thingy was the first thing I disabled
<shevy>
hehehe
brnrdbrk has joined #ruby
<brnrdbrk>
exit
<havenwood>
apeiros_: That is the think I like! >.>
brnrdbrk has quit [Quit: leaving]
<havenwood>
s/think/thing
<apeiros_>
I should probably search for a plugin which enables a focus mode like eiffel's IDE had
<apeiros_>
it showed you only the current method
<havenwood>
tooling ftw
huoxito has quit [Ping timeout: 272 seconds]
SCommette has joined #ruby
<apeiros_>
well, bed time for me
<apeiros_>
gn8
<havenwood>
later
<Spooner>
I turned off the code thumbnail thing in Sublime. It was pretty, but I didn't find it actually useful.
brianpWins has joined #ruby
<havenwood>
Spooner: I found i recognized the shape of spots in the code from the overview. Thats how i do written pages too though. Maybe kinda a synesthesia thing.
<aedorn>
I use the overview to find empty spaces. If there's too much space then there's room for more obfuscation to torture the future with.
<havenwood>
Spooner: Just for larger files.
echobinary has quit [Read error: Connection reset by peer]
echobinary has joined #ruby
Michae___ has joined #ruby
otherj has joined #ruby
<Spooner>
havenwood, I usually edit in a half-width window and it just stopped me seeing 80 columns. It needed to be more useful ;)
<havenwood>
I'd love to have more visualization tools for code. :)
<havenwood>
Spooner: Space is precious.
julian-delphiki has quit [Quit: Computer has gone to sleep.]
<Spooner>
Now Rubymine's Git integration colouring on the sidebar; that is useful!
__Big0__ has quit [Remote host closed the connection]
jimeh has quit [Quit: Computer has gone to sleep.]
Michae___ has quit [Read error: Connection reset by peer]
Micha____ has joined #ruby
etcetera has joined #ruby
<aedorn>
Spooner: so how much RAM does RubyMine really eat?
<Spooner>
I also hard-code a 80 column code width, so my code isn't so obviously raggedy as it might be (so doesn't look so interesting in an overview).
forrest has quit [Quit: Leaving]
<Spooner>
It is chunky, but I've never worried about it. Why do I need RAM while I'm editing?
alanp_ has joined #ruby
alanp has quit [Disconnected by services]
__Big0__ has joined #ruby
<havenwood>
Spooner: I sometimes have a twinge of guilt over 78
<aedorn>
You don't ... but I have so many VMs running, I tend to worry about it.
alanp_ is now known as alanp
Coolhand|laptop has quit [Ping timeout: 264 seconds]
emergion has quit [Ping timeout: 264 seconds]
etcetera has quit [Client Quit]
<havenwood>
aedorn: I think i'd be willing to spare a few gig of ram if the coding experience was substantially improved, but yeah for portability whatev you cant count on resources
tylersmith has joined #ruby
<Spooner>
aedorn, Right. I do use VMs a bit, but only one or two at a time. There was a time when I was developing in Windows when I used to edit with Rubymine in Windows and run tests in a Lubuntu VM because they ran faster!
c0rn has quit [Ping timeout: 252 seconds]
interactionjaxsn has quit [Remote host closed the connection]
emmanuelux has quit [Remote host closed the connection]
cmarques has quit [Ping timeout: 260 seconds]
<havenwood>
<3 Vagrant
<Spooner>
I just (finally) got a free open-source license for Rubymine. I will buy it if I need it for a large Ruby project though (I'm just using Sublime for short Python&Ruby scripts at the mo).
nari has joined #ruby
<aedorn>
Well, let me quantify "many". An average day requires about 13 to be up. Now doing this on one system is "A Dumb Idea", but some jerk in the cube over likes to keep the temperature at a constant 75, and sitting around a bunch of machines makes my immediate area around 85. I'm trying to avoid local warming.
<Spooner>
Ouch! That is a lot.
horofox has joined #ruby
c0rn has joined #ruby
<havenwood>
Virtualize ALL THE THINGS! \o/
markalanevans_ has joined #ruby
spider-mario has quit [Read error: Connection reset by peer]
heliumsocket has quit [Quit: heliumsocket]
dougireton has quit [Quit: Leaving.]
skattyadz has quit [Quit: skattyadz]
<aedorn>
Yeah... testing network devices becomes a whole different type of beast.
markalanevans has quit [Read error: Operation timed out]
markalanevans_ is now known as markalanevans
horofox has quit [Client Quit]
stkowski has joined #ruby
jerius has quit [Ping timeout: 250 seconds]
theRoUS has quit [Ping timeout: 276 seconds]
<Spooner>
aedorn, At least you don't have to recursively virtualise 13 times. The last VM would run as fast as if it was running on a calculator from 1980 ;)
R_Macy has joined #ruby
horofox_ has joined #ruby
<aedorn>
Spooner: hmmm... I do love me some HP48g action.
jgarvey has quit [Quit: Leaving]
adkron has joined #ruby
adkron_ has joined #ruby
moted has quit [Ping timeout: 245 seconds]
<Spooner>
havenwood, Ubernerdgirl says "hello!"
garbagecollectio has joined #ruby
<havenwood>
Spooner: Are you in NYC??
emocakes has joined #ruby
<Spooner>
Nope, but I have Skype :D
dougireton has joined #ruby
<havenwood>
Spooner: Aha!
moted has joined #ruby
heliumsocket has joined #ruby
nonotza has joined #ruby
<shevy>
hmm
Xeago has quit [Remote host closed the connection]
newUser1234 has quit [Remote host closed the connection]
ebobby has quit [Ping timeout: 276 seconds]
garbagecollectio has left #ruby [#ruby]
newUser1234 has joined #ruby
dmiller has joined #ruby
<shevy>
man Spooner
<shevy>
you are like the ruby-teleprompter
<shevy>
"gimme a call, I'll translate your thoughts into ruby code"
pandawarrior1 has joined #ruby
scriabin has quit [Quit: Page closed]
<Spooner>
That was just a paste. One day humanity will link Skype with IRC, but for today, there is cut-and-paste Spooner :D
emocakes has quit [Quit: emocakes]
<pandawarrior1>
can anyone give an instance when they would use a proc/lambda/block?
tvw has quit []
<wildcard1>
pandawarrior1: command pattern
hasimo has joined #ruby
<pandawarrior1>
i'll look up what that is...
<aedorn>
hmmm.. Skype message redirect
<aedorn>
I could see it
brianpWins has quit [Ping timeout: 272 seconds]
<havenwood>
pandawarrior1: I'd use block unless there is a compelling reason to do something else. Matz gives block syntactic sugar to make its use sweet.
<shevy>
pandawarrior1 a block is ubiquitous to a method in ruby man
newUser1234 has quit [Ping timeout: 255 seconds]
<shevy>
I use blocks all the time and almost never any procs
<havenwood>
pandawarrior1: If you need to assign a var to your closure, lambda. If you need proc's return, proc.
<pandawarrior1>
is this stuff covered anywhere?
aaronmcadam has quit [Quit: Leaving...]
rgbdev has joined #ruby
bwulf has joined #ruby
<pandawarrior1>
i this in the relms of meta type thinking?
mpfundstein has quit [Remote host closed the connection]
wyhaines has quit [Remote host closed the connection]
<havenwood>
pandawarrior1: Yeah, there are some good screencasts and blog posts. The best thorough comparison I can think of is a talk Wycatz gave. Sec, i'll find.
<wildcard1>
most of the time i use procs is to name blocks
<wildcard1>
in case you want to pass/call them out of scope
j^2 has joined #ruby
<pandawarrior1>
1 hour plus :) nice
<havenwood>
wildcard1: Yeah, that is what Yehuda argues for. I'd prefer to use lambda for same return functionality as block. If you need named + loose arity or procs return then proc. Guess it is just preference.
adkron_ has quit [Ping timeout: 276 seconds]
adkron has quit [Ping timeout: 276 seconds]
<havenwood>
wildcard1: Wycatz goes as far as to say he'd prefer lambda be deprecated.
<Quadlex>
Delicious closures
<wildcard1>
hmm
walbert has joined #ruby
<wildcard1>
that's interesting. mostly the reason i differentiate is based on the return behavior like you said
<havenwood>
wildcard1: I like lambda. Named block, stabby syntax, win.
<wildcard1>
i'll have to look at the reasons he suggest deprecation
pepper_chico has quit [Quit: Computer has gone to sleep.]
<wildcard1>
i should look at the way they're implemented too. it maybe give some insight into further differences
m8 has quit [Quit: Sto andando via]
kofno has joined #ruby
luckyruby has joined #ruby
<havenwood>
wildcard1: His point was just that block and proc are sufficient as to what he was discussing. He touched on lambda being odd-man-out with strict arity, but I think since he was discussing tenet's correspondence principle lambda was really irrelvant.
<wildcard1>
ah
geggam_wk has quit [Remote host closed the connection]
kofno has quit [Remote host closed the connection]
reppard has quit [Ping timeout: 264 seconds]
<havenwood>
wildcard1: On the other hand, proc and lambda varying from each other in two non-conflicting ways is the Ruby-way. Wycatz's recommendation of proc could be an interesting debate, since Matz seems to prefer -> unless proc is needed.
malkomalko has quit [Remote host closed the connection]
julian-delphiki has joined #ruby
ebobby has joined #ruby
c0rn has quit [Ping timeout: 276 seconds]
<havenwood>
wildcard1: Actually, I'm more sure that Avdi is in the lambda court than Matz. But I'd like to hear Avdi and Wycatz discuss the issue.
<wildcard1>
i've always looked at them as farly synonymous except for the return behavor. im not sure that i'd develop a strong opinion either way unless i found out that there's some other drastic difference i've overlooped
<havenwood>
wildcard1: strict versus loose arity and return behavior are the only two differences (other than each's pairs of syntax varying) that i know of