apeiros changed the topic of #ruby to: Ruby 1.9.3-p374: http://ruby-lang.org (ruby-2.0.0-rc1) || Paste >3 lines of text on http://gist.github.com
apok has joined #ruby
eka has quit [Quit: Computer has gone to sleep.]
nfk has quit [Quit: yawn]
w|t has quit [Quit: No Ping reply in 150 seconds.]
w|t has joined #ruby
w|t has joined #ruby
w|t has quit [Changing host]
TomyLobo has quit [Disconnected by services]
TomyLobo2 has joined #ruby
TomyLobo2 is now known as TomyLobo
sbear has joined #ruby
workmad3 has quit [Ping timeout: 276 seconds]
undersc0re97 has joined #ruby
pcarrier has joined #ruby
cableray has quit [Quit: cableray]
Bosox20051 has quit [Ping timeout: 256 seconds]
sepp2k has joined #ruby
jon_wingfield has joined #ruby
SQLDarkly has joined #ruby
v0n has quit [Ping timeout: 244 seconds]
cantonic has joined #ruby
<SQLDarkly> Taking post: http://pastebin.com/CrrDsxNv into consideration. Im getting the following error : >ArgumentError: wrong number of arguments (0 for 2)< when attempting to >Node.create< any help or advice would be appreciated. This is using mongomapper.
samphippen has quit [Quit: Computer has gone to sleep.]
pskosinski has quit [Quit: Learn Life's Little Lessons]
mikepack has joined #ruby
spider-mario has quit [Remote host closed the connection]
pskosinski has joined #ruby
mercwithamouth has joined #ruby
IrishGringo_ has joined #ruby
yshh has joined #ruby
SQLDarkly has quit [Quit: Leaving]
adkron_ has quit [Ping timeout: 256 seconds]
wpaulson has joined #ruby
havenn has joined #ruby
adkron has quit [Ping timeout: 276 seconds]
arya has quit [Ping timeout: 248 seconds]
s1n4 has quit [Quit: leaving]
slainer68 has quit [Remote host closed the connection]
banisterfiend is now known as banister`sleep
marr has quit [Ping timeout: 256 seconds]
yshh has quit [Read error: No route to host]
sailias has joined #ruby
yshh has joined #ruby
arya has joined #ruby
crackfu has joined #ruby
yshh has quit [Read error: No route to host]
yshh has joined #ruby
crackfu has quit [Remote host closed the connection]
idkazuma has quit [Remote host closed the connection]
crackfu has joined #ruby
chrismhough has joined #ruby
yshh has quit [Remote host closed the connection]
Kn|t3 has joined #ruby
Kn|t3_ has joined #ruby
karupanerura has quit [Excess Flood]
Targen has joined #ruby
Kn|t3 has quit [Ping timeout: 260 seconds]
Kn|t3_ is now known as Kn|t3
danshultz has joined #ruby
karupanerura has joined #ruby
s1n4 has joined #ruby
arya has quit [Ping timeout: 248 seconds]
Kudos has quit [Ping timeout: 248 seconds]
jenrzzz has joined #ruby
fenak has joined #ruby
phinfonet_ has quit [Quit: Linkinus - http://linkinus.com]
xAndy is now known as xandy
ozcanesen has joined #ruby
goodman1 has joined #ruby
<ozcanesen> hey how can set property for some gtk companent in ruby?
Kudos has joined #ruby
xandy is now known as xAndy
Kudos has quit [Changing host]
Kudos has joined #ruby
<ozcanesen> for example from doc: position-set: true or false (Read/Write)
arya has joined #ruby
drago757 has joined #ruby
huoxito has joined #ruby
w|t has quit [Quit: No Ping reply in 150 seconds.]
w|t has joined #ruby
w|t has quit [Changing host]
w|t has joined #ruby
Spooner has quit [Read error: Connection reset by peer]
arya has quit [Read error: Connection reset by peer]
freakazoid0223 has quit [Quit: Leaving]
TomyLobo has quit [Quit: Standby mode...]
<fuzai> Is there anyway to easily hook into the standout out of a ruby script from within a ruby script? I'm trying to capture the output buffer of one event machine loop and then export it over a websocket
busybox42 has joined #ruby
wpaulson has quit [Quit: Colloquy for iPhone - http://colloquy.mobi]
eka has joined #ruby
allaire has joined #ruby
w|t has quit [Read error: Connection reset by peer]
w|t has joined #ruby
w|t has quit [Changing host]
w|t has joined #ruby
eka has quit [Client Quit]
ctkahler has joined #ruby
emocakes has quit [Quit: emocakes]
generalissimo has quit [Remote host closed the connection]
banjara has joined #ruby
arya has joined #ruby
cozby has joined #ruby
yshh has joined #ruby
arya has quit [Client Quit]
cantonic has quit [Ping timeout: 276 seconds]
butblack has joined #ruby
elaptics is now known as elaptics`away
<butblack> which pagination gem do you typically use? will_paginate or kaminari?
sailias has quit [Quit: Leaving.]
danshultz has quit [Remote host closed the connection]
freeayu has joined #ruby
_bart has joined #ruby
joeycarmello has joined #ruby
banjara has quit [Ping timeout: 276 seconds]
eka has joined #ruby
mikepack has quit [Remote host closed the connection]
megha has quit [Read error: Operation timed out]
pkuyken has joined #ruby
survili has joined #ruby
joeycarmello has quit [Ping timeout: 246 seconds]
taoru has joined #ruby
matchaw_ has joined #ruby
stringoO has joined #ruby
mduvall has quit []
stringoO has quit [Client Quit]
survili has quit [Quit: Leaving]
bricker has joined #ruby
<halogenandtoast> butblack: I like kaminari based on the name alone
<butblack> halogenandtoast: thanks so much man
<halogenandtoast> They both function relatively the same, and most gems that work with one often work with the other
<halogenandtoast> sunspot for instance
havenn has quit [Remote host closed the connection]
breakingthings has joined #ruby
fuzai has quit [Ping timeout: 260 seconds]
slainer68 has joined #ruby
jon_wingfield has quit [Remote host closed the connection]
havenn has joined #ruby
slainer68 has quit [Ping timeout: 260 seconds]
megha has joined #ruby
jpfuentes2 has joined #ruby
goodman1 has quit [Ping timeout: 276 seconds]
zyrex has joined #ruby
cableray has joined #ruby
zyrex has quit [Client Quit]
jimeh has quit [Quit: Computer has gone to sleep.]
jjbohn has joined #ruby
adeponte has joined #ruby
banjara has joined #ruby
daniel_- has quit [Ping timeout: 244 seconds]
jblack has quit [Ping timeout: 256 seconds]
davidokner has joined #ruby
baroquebobcat has quit [Quit: baroquebobcat]
<davidokner> What do you think when somebody tells you that the programming jobs are going to India and that you shouldn't learn to program/
<davidokner> ?
<havenn> davidokner: Find new friends? :P
<halogenandtoast> davidokner: All the programming jobs that are going to India are the jobs I didn't want anyways
<erichmenge> davidokner: It's not really true.
<davidokner> havenn: My dad told me that when I told him I was interested in programming. He said somebody he was talking to that words at Vanguard told him that.
<halogenandtoast> Also there are plenty of fantastic ruby jobs available.
<halogenandtoast> In particular I know Boston and San Francisco currently have a developer shortage.
<davidokner> They were saying Cyber Security is a much better prospect.
<erichmenge> why can't that be outsourced?
<havenn> davidokner: It is more true that lawyers' jobs are replaceable/being-replaced with Indian outsourcing.
<tylersmith> the last job a human will ever do is programming a machine
<havenn> davidokner: Programming is about the best field along with Engineering for demand.
<davidokner> I think the idea is that Cyber Security would be less likely to be outsourced because security should be domestic.
<halogenandtoast> tylersmith: that and psychologists
cantonic has joined #ruby
<halogenandtoast> machines make terrible psychologists
kiwnix has quit [Quit: Saliendo]
<davidokner> I think a lot of the call centers get outsourced to india, but that isn't programming.
<halogenandtoast> davidokner: You should follow your heart.
<erichmenge> davidokner: It is always going to be easier to work on projects, with people in the same country.
<havenn> halogenandtoast: I've found that a cat makes a fine Psychologist. And when pets do a better job than cyborgs, forgo the effort. :P At least for now...
postmodern has joined #ruby
ozcanesen has quit [Quit: Leaving]
<erichmenge> davidokner: Especially when it comes to client work.
<halogenandtoast> havenn: My cat makes me want to forgo cats all together.
<havenn> davidokner: If you actually enjoy coding... do it!! You will get paid well for enjoying what you do.
<davidokner> Yeah, I'm interested in learning things other than programming too, like Linux+, Network+ and Security+.
<halogenandtoast> davidokner: what havenn said is a true statement
<havenn> davidokner: Which all end in programming.
<davidokner> havenn: That is very true. I don't know if I enjoy it yet, I'm just getting back into it, but in college I took CS and learned to hate it.
baroquebobcat has joined #ruby
baroquebobcat has quit [Client Quit]
<halogenandtoast> University CS is a thing to hate.
<davidokner> I actuallyed finished a computer scence degree and pretty much learned to hate programming.
freakazoid0223 has joined #ruby
cantonic_ has joined #ruby
<halogenandtoast> I have a degree in CS as well, i hated it in college.
<havenn> davidokner: I was never able to withstand the first day of a programming course in undergrad. Did a philosophy major and eventually on to a doctorate, but I've never completed a CS course. >.>
<halogenandtoast> I'm just now realizing that all those classes were useful
<halogenandtoast> and if they had explained them differently I would have loved them.
<havenn> ^
<davidokner> halogenandtoast: Interesting. I'm not so sure they were useful, though some of the topics were in some very advanced and indirect ways, but I'm not sure I got the value from them.
<halogenandtoast> I also learned that if you take college courses given by grad students instead of professors they are very much better.
baroquebobcat has joined #ruby
baroquebobcat has quit [Client Quit]
<tylersmith> wow, definitely not where I went
cantonic has quit [Ping timeout: 246 seconds]
cantonic_ is now known as cantonic
<davidokner> halogenandtoast: Like if I really wanted to study algorithm efficiency I suppose I could.
banjara has quit [Ping timeout: 252 seconds]
<havenn> davidokner: If you enjoy coding, it doesn't much matter what degree you get. You can get a job coding.
v0n has joined #ruby
<halogenandtoast> davidokner: I was thinking more along the lines of computer architecture
fenak has quit [Quit: leaving]
<havenn> davidokner: Certain things, like symbolic logic, or math, or linguistics, etc, etc might give you an advantage in programming.
<davidokner> halogenandtoast: Oh, I think my computer architecture class was creating programs in c that did things like a shell would.
Guest__ has joined #ruby
Guest__ is now known as rn
pskosinski has quit [Quit: Learn Life's Little Lessons]
<halogenandtoast> Mine was writing a MIPS processor in Verilog
Kn|t3 has quit [Quit: Kn|t3]
rn is now known as Guest6120
<davidokner> halogenandtoast: We did MIPS too, but the class was a waste, the professor was senile and died shortly after.
embs has joined #ruby
<halogenandtoast> I once had a professor who knew he already had another job it was awful
<halogenandtoast> he didn't give s hit
<halogenandtoast> Unfortunately that was the class that taught me lex and yacc
cantonic_ has joined #ruby
<davidokner> Knowing that MIPS exists is nice, but I don't think shuch a formal approach to understanding coding is necessary.
<halogenandtoast> Which I now use extensively
<halogenandtoast> davidokner: except that I like writing z80 emulators for fun now
<davidokner> I've never heard of lex and yacc
asgardBSD has joined #ruby
danshultz has joined #ruby
<halogenandtoast> they're used for tokenizing text and generating out ASTs using BNF grammar
<halogenandtoast> Mainly if you want to write a programming language
cantonic has quit [Ping timeout: 245 seconds]
cantonic_ is now known as cantonic
daslicious has quit [Quit: daslicious]
<halogenandtoast> Ruby uses bison which is a newer version of yacc
<halogenandtoast> It however does it's own tokenizing
<davidokner> ah, ok, if you need regular expressions I would think Ruby could do it.
jjbohn has quit [Quit: Leaving...]
<halogenandtoast> It's a bit more complicated then regexps
<halogenandtoast> also regexps aren't optimized
<davidokner> Have you guys thought or heard there is a Cyber Security Hype going on?
<halogenandtoast> nope
mengu has quit [Quit: Leaving]
<erichmenge> The term Cyber Security evokes mental images of sketchy companies and malware in my mind.
<havenn> Hack the Planet.
<halogenandtoast> All I know is I write rails apps, and make good money doing it, and I'm happy.
<davidokner> I don't mean security in the code, but the whole industry of sercurity after the code of pluggin holes. Like Cyber Security is the next big thing.
otters has quit [Ping timeout: 252 seconds]
<halogenandtoast> havenn: lol
<halogenandtoast> that is such a bad movie
<havenn> Buuuut, Angelina Jolie...
jaequery has joined #ruby
<halogenandtoast> I know… as a kid that movie was awesome
<davidokner> Have you guys heard of Jim Weaver at Oracle?
<halogenandtoast> You lost me at Oracle.
<halogenandtoast> to quote erichmenge "The term Cyber Security evokes mental images of sketchy companies and malware in my mind." <= Oracle
<davidokner> He thinks that making apps in the browser was a bad idea and it makes hell for developers and we should be using the client/server model and not a DOM/javascript/AJAX shoehorn model.
<erichmenge> davidokner: I doubt "cyber security" is "the next big thing". Generally those that are good at security have intimate knowledge with the inner workings of the products.
<erichmenge> davidokner: Which means that it is highly specialized. So as an industry it doesn't make much sense.
LKiS has quit [Ping timeout: 245 seconds]
<davidokner> I see it as only so many people can be guarding the chicken coop, ultimately you got to have lots of chickens.
<halogenandtoast> davidokner: I've always thought applications were a bad idea to start with
<erichmenge> At least not in the broad way I think you're thinking of.
<halogenandtoast> I mean without them we wouldn't have security problems.
<havenn> davidokner: If security is your interest, Ruby is a nice language. Ronin and Metasploit...
<davidokner> Jim Weaver at oracle thinks that the JVM should replace the browser for rich internet applications.
<halogenandtoast> bah ah ha haha
<halogenandtoast> he would
<erichmenge> Yeah that doesn't sound terrible at all.
<halogenandtoast> I think they called them applets
<tylersmith> he probably also thinks all data should be stored in Oracle
<davidokner> I sort of understand what he is talking about when he says look the DOM was not meant for applications, AJAX, javascript all this stuff instead of say imagine using MacRuby compared to web dev.
tommyvyo has quit [Quit: http://thomasvendetta.com]
<davidokner> halogenandtoast: Well he is not talking about running java in the browser, he is saying use java web start and download the app from the web page or something.
cozby has quit [Remote host closed the connection]
<erichmenge> davidokner: Problem with that is… We'd have to write Java.
<halogenandtoast> ^^
<davidokner> halogenandtoast: It is this whole new thing with JavaFX
danshultz has quit [Ping timeout: 255 seconds]
<davidokner> erichmenge: Well, you have JRuby and lots of of JVM languages, right?
<halogenandtoast> davidokner: his ideas aren't revolutionary, they're going about the same thing with NaCl
<havenn> davidokner: I don't know many who'd rather write Java than JavaScript. But NaCl or brethren are more intersting.
<tylersmith> also they're pretty much why java was invented
<halogenandtoast> ALthough if I recall he claimed NaCl was doing it all wrong
<davidokner> I forget what NaCL is, is that Matz company?
<halogenandtoast> Google
<davidokner> Oh
busybox42 has quit [Ping timeout: 246 seconds]
<whitequark> three things actually
fyolnish has joined #ruby
<havenn> davidokner: Chrome is only browser implementing it right now.
<halogenandtoast> Apparently they pronounce it Nackle
<erichmenge> davidokner: Yeah, but when you're talking about delivering apps to a desktop it becomes unpleasant to bundle all that stuff in.
LKiS has joined #ruby
<havenn> davidokner: Ruby merged NaCl patch.
<havenn> salt
<whitequark> MS simply won't implement NaCl, so it's not the 'future' in any way
<davidokner> Yeah, I remember it being named after salt.
<erichmenge> davidokner: Think about it this way. When you go to a website, do you want to have to download a 800MB platform to play with the app?
<erichmenge> or do you just want it to work in the browser you already have open?
<davidokner> Ah, NACL is like the JVM.
linux is now known as linuxarch
<whitequark> NaCl is nothing like JVM
<whitequark> it's a sandbox for native executables
<davidokner> Yeah, I was thinking in a lot of ways a bytecode sandbox would make more sense, but it would need to be an open standard.
<davidokner> oh
linuxarch is now known as archlinux
archlinux is now known as linuxarch
kascote has quit [Quit: Leaving...]
<halogenandtoast> I need to stop getting distracted by these discussion and get back to writing my VM
<davidokner> I don't think the browser is going away for apps anytime soon, but I'd hate to learn something and find out it it was a lot of effert only to find things going another way.
<whitequark> halogenandtoast: which does what?
<halogenandtoast> Handles byte code instructions for my programming language
<erichmenge> davidokner: Things are always going a different way in this industry
<erichmenge> You have to be flexible.
<davidokner> erichmenge: I guess you just have to keep adapting with it.
<davidokner> yeah
<whitequark> halogenandtoast: let me rephrase: how is it different from existing software doing the same task?
<erichmenge> It's not like you learn everything and then are done
adeponte has quit [Remote host closed the connection]
<havenn> davidokner: Ruby is a good bet. Not going away anytime soon. MRuby is a promising front as well.
<davidokner> So you need to ok with say learning RoR and then if that goes down the shoot, you learn the next thing
<halogenandtoast> whitequark: Probably nothing, but I won't learn as much using someone elses
marienz has joined #ruby
arya has joined #ruby
<erichmenge> davidokner: There will always be new things, but Rails won't be going away any time soon either.
<whitequark> people still write COBOL.
<erichmenge> ^^^
<havenn> Speaking of MRuby... compiled FizzBuzz to be executable without Ruby. Only 395k. >.>
<whitequark> >only
<whitequark> >395k
<whitequark> what the fuck is wrong with this world
<havenn> :O
<davidokner> havenn: Do you know how MRuby compares to RubyMotion?
<halogenandtoast> lol
adeponte has joined #ruby
pskosinski has joined #ruby
daslicious has joined #ruby
<havenn> 172B original, 1.9k compiled to C bytecode with wrapper, 395k standalone.
frowni has joined #ruby
<halogenandtoast> whitequark: Do you think the future of programming languages is to write them on top of existing vas?
aeontech has quit [Quit: aeontech]
<halogenandtoast> *VMs
<halogenandtoast> damn autocorrect
<frowni> Hey there, is there an easy way to update my 1.8 ruby to 1.9, using mac..
jinzhu has joined #ruby
<havenn> davidokner: The MRuby alternative to RubyMotion is MobiRuby: http://mobiruby.org
<halogenandtoast> davidokner: mobiruby looked horrible
<whitequark> halogenandtoast: for starters, I do not think that a programming language must run on a VM
<havenn> RubyMotion author did a nice writeup on MRuby.
<halogenandtoast> whitequark: it doesn't
<davidokner> havenn: And Matz is the one doing MobiRuby, but an Apple guy did RubyMotion.
<halogenandtoast> whitequark: I just feel like it makes the translation to the target language easier/
<havenn> frowni: chruby is a nice solution! https://github.com/postmodern/chruby
<whitequark> halogenandtoast: target _language_?
<whitequark> your target is machine code, and it is indeed wise to leverage existing infrastructure
<havenn> davidokner: Matz is actively working on MRuby, and MobiRuby makes use of that. Far as I know, Matz isn't working on MobiRuby itself (could be wrong).
<davidokner> Oh, matz did MRuby, not MobiRuby.
<frowni> havenn: seems painless, thanx a bunch
<davidokner> I get it, MobiRuby is a derivative of MRuby.
<halogenandtoast> whitequark: sure, I was planning on utilizing llvm
<davidokner> ok, then mRuby Makes sense, it is for non iOS, small embeded devices.
<whitequark> halogenandtoast: JVM and LLVM are two things which are most advanced there
jon_wingfield has joined #ruby
<whitequark> JVM's got a nice runtime for dynamic languages
<havenn> davidokner: MRuby can be run from pretty much anywhere Lua can (including as an extension within Lua... :O)
<whitequark> halogenandtoast: on the other hand, LLVM's strength is in hardcore optimizations. It can, for example, automatically vectorize loops or emit efficient code for DSPs.
<halogenandtoast> whitequark: You just stepped out of my realm of knowledge and into the twilight zone.
quest88 has joined #ruby
<whitequark> davidokner: mruby is not for embedded devices
<whitequark> it is far too big and heavy to be ever useful in embedded
<whitequark> and I'm not talking about your smartphone, which is more powerful than my notebook of 3 years ago
krz has joined #ruby
frowni has quit []
<postmodern> doesn't mruby have a compiler now?
<whitequark> mruby is for embedding into other software, just like lua is
<havenn> postmodern: Yeah, mrbc.
<postmodern> that can compile your ruby code into a static binary?
<whitequark> postmodern: still too fat
<postmodern> or does that just embed the ruby code with mruby?
<whitequark> postmodern: afaik it's a bytecode translator
<postmodern> that's pretty good
<whitequark> postmodern: similar to baseline compiler of a jvm, for example.
<whitequark> "pretty good"?
<whitequark> that's an unrolled loop
<postmodern> also i think you should make the distinction between embedded systems that are super minimal, like MCUs
<havenn> postmodern: It can compile it to readable C or to binary C code (which is more stable atm).
<postmodern> and from SoCs that run linux
<whitequark> postmodern: SoCs that run linux are either big enough to not be considered embedded devices
<halogenandtoast> Anyways once again back to learning how to write a programming language...
<whitequark> postmodern: or resource constrained enough to have problems running flavors of ruby.
<s1n4> is there any terminal pager for ruby? (something like the less software)
<postmodern> s1n4, most people just invoke less
<postmodern> s1n4, or ENV['PAGER']
banjara has joined #ruby
<whitequark> postmodern: see, it doesn't even unroll the interpreter loop
<whitequark> postmodern: just embeds the bytecode as an array
Kingy has quit [Quit: Leaving]
<s1n4> postmodern: hmm, I want to set a hotkey on my program, so I need something else
<postmodern> whitequark, ah ha!
<postmodern> s1n4, hmm might look into curses?
nari has joined #ruby
<whitequark> mruby was plain out advertised as "Lua from Japan" from the very beginning
pskosinski has quit [Quit: Learn Life's Little Lessons]
<whitequark> it's in matz' notes which I've translated from japanese years ago
<havenn> whitequark: japan > brazil?
<s1n4> postmodern: hah, what?
<whitequark> brazil?
<havenn> whitequark: Lua :P
<whitequark> ah
<havenn> whitequark: Moon in portugese
<whitequark> havenn: Japanese DoE has sponsored that work. guess they want domestic stuff in their software
ahokaomaeha has quit [Ping timeout: 245 seconds]
<postmodern> s1n4, well you can detect certain control keys via stdin.readchar
<havenn> whitequark: Their fork of MRuby is awesome. But can't get mirb working on IIJ.
<s1n4> postmodern: I want to write the output of my script into a pager, also I want to add a hotkey
<whitequark> havenn: whose fork?
<whitequark> and what's IIJ?
<postmodern> s1n4, you could also use curses (Ruby's ncurses bindings) to setup hot-keys
<s1n4> postmodern: cool, but less will check the key
<davidokner> whitequark: Ah, embeding into other software
<havenn> whitequark: Oh, I meant IIJ (Internet Initiative Japan).
kpshek has joined #ruby
<whitequark> davidokner: think of which problems could be solved by adding Lua. scripting in games.
<havenn> whitequark: https://github.com/iij/mruby
<havenn> mruby plus posix
<whitequark> davidokner: there were cases where big embedded systems incorporated lua, but it was only a controlling agent
<whitequark> all the heavy lifting was still done in C
<whitequark> there are tons of tasks for which mruby isn't fit, and couldn't be fit because its design does not allow for that
<s1n4> postmodern: so, won't less check keys?
<whitequark> davidokner: interrupt handling, to name the most important one
sorbo_ has left #ruby [#ruby]
<whitequark> postmodern: it is actually quite hilarious to watch people think that devices on the complexity of modern smartphones or even raspberry pi is a norm for embedded engineering
<davidokner> Becoming a C expert for embeded systems doesn't sound like my interest.
MattRB has joined #ruby
freeayu has quit [Ping timeout: 276 seconds]
jon_wingfield has quit [Remote host closed the connection]
<whitequark> postmodern: to name just one thing, the switching power supply of a Cortex-A and the core itself are heavily integrated to provide the core with just the right voltage, within 10 millivolts, corrected somewhere along the frequence of 1 kHz
<havenn> whitequark: IIJ has a ton of the mruby forks that should be in the future merged or available from within mruby.
<postmodern> whitequark, to be fair the SoC market exploded
<havenn> whitequark: Some of em are pretty buggy at the moment, but I look forward to them!
<whitequark> postmodern: it is mainly driven by the mobile revolution (or 'revolution' depending on your views), the profit margins are miniscule, and some major players are actually withdrawing from it
<whitequark> postmodern: e.g. Texas Instruments
<whitequark> postmodern: much more importantly, there's a hard physics-imposed limit to the minimal amount of energy a device can draw. and the optimum for battery-powered devices does not include gigabytes of RAM neither gigaherts of CPU.
kpshek has quit [Ping timeout: 240 seconds]
<whitequark> people forgot very quickly how phones used to last for weeks on one charge.
gnarmis has joined #ruby
ctkahler has quit [Quit: ctkahler]
<davidokner> whitequark: I forget about that. I'm even doubting it. Though before they were just phones.
cpruitt has quit [Ping timeout: 255 seconds]
<geggam> i still have that kind of phone whitequark , work makes me carry an iphone
<havenn> whitequark: http://www.johnsphones.com
<geggam> i put the iphone in the garage on the weekends
slainer68 has joined #ruby
<geggam> hate that damn thing
banjara has quit [Ping timeout: 252 seconds]
<whitequark> it is quite ironic how the desire for speed forces us to optimize CPU for RAM
<whitequark> and the RAM actually consumes energy even when the device is 'off', or in standby
<whitequark> loads of it
<havenn> Lasts for weeks, contacts are in a written pad on the back, no lcd, worldphone: http://www.johnsphones.com/about/item4
<whitequark> JIT, etc.
Guest6120 has quit [Quit: Textual IRC Client: http://www.textualapp.com/]
<s1n4> postmodern: uh, thanks Curses is exactly what I've been looking for
<erichmenge> havenn: Kinda expensive for what it is.
jaequery has quit [Quit: Computer has gone to sleep.]
<havenn> erichmenge: Yeah, the no-contract think does kinda warp the price. 3-week battery life is kinda awesome though.
<s1n4> postmodern: is it a built-in lib in both 1.8 and 1.9 ruby versions?
<whitequark> havenn: 3-week battery life is what GSM was originally designed for.
<postmodern> s1n4, yes both
<erichmenge> havenn: Yeah when you mentioned it I was kinda interested because I need to carry a phone while I'm cycling but I don't want to risk damaging the iPhone if I were to crash. Plus the long charge, etc.
<erichmenge> Was hoping for a lower price tag :)
<havenn> whitequark: Yet my GSM phone dies every day.
slainer68 has quit [Ping timeout: 260 seconds]
sorbo_ has joined #ruby
<erichmenge> I think I'll just get one of those pay as you go phones
<whitequark> havenn: probably because it's not actually GSM
<havenn> erichmenge: Yeah, an ultra-cheap version that is similar seems totally feasible.
<breakingthings> Anyone familiar with RSpec stub/mocks? Trying to write tests around classes that manage TCPSockets
emmanuelux has quit [Remote host closed the connection]
<breakingthings> And the only way I can figure out how to test them properly is to create a local TCPServer
<havenn> whitequark: Or cause its old and its lithium-ion batteries are shot. :P
<breakingthings> but then only one test can have that TCPServer at a time… Don't know if there's a way to initialize it before all the tests...
<erichmenge> http://www.johnsphones.com/store/johns-phone-bar/item46 is pretty though. Would get a lot of looks.
jon_wingfield has joined #ruby
<havenn> "the world’s simplest golden cell phone"
<davidokner> Johns phones are interesting. I was asking for that at the AT&T store.
Hanmac1 has joined #ruby
<davidokner> I said I want a super slim (they started to smile) phone that just makes phone calls and is super cheap, (their smile vanished)
<davidokner> They don't have that.
havenn has quit [Remote host closed the connection]
Nisstyre has joined #ruby
gridaphobe has joined #ruby
jjbohn has joined #ruby
davidokner has left #ruby [#ruby]
aaronmacy has quit [Quit: Leaving.]
Hanmac has quit [Ping timeout: 276 seconds]
Nisstyre_ has quit [Ping timeout: 252 seconds]
linuxarch has quit []
Takehiro has joined #ruby
flip_digits has joined #ruby
aaronmacy has joined #ruby
chrismhough has quit [Quit: chrismhough]
Nisstyre has quit [Ping timeout: 255 seconds]
Nisstyre has joined #ruby
joeycarmello has joined #ruby
icole has joined #ruby
Takehiro has quit [Ping timeout: 260 seconds]
freeayu has joined #ruby
<halogenandtoast> Does anyone know if there is a way to inspect the full AST from ruby, more than what ripper provides?
Luceo has quit [Ping timeout: 276 seconds]
mneorr has quit [Remote host closed the connection]
<halogenandtoast> Nevermind I think I realized how silly that seems, what I probably want to see is at the C level.
sorbo_ has left #ruby [#ruby]
thams has joined #ruby
<breakingthings> Where would be the appropriate area to run TCPServer#new for my RSpec tests?
Bosox20051 has joined #ruby
<breakingthings> should I just run that in spec_helper?
arya has quit [Ping timeout: 248 seconds]
arya has joined #ruby
mneorr has joined #ruby
andrewhl has joined #ruby
danshultz has joined #ruby
jbw has quit [Ping timeout: 256 seconds]
banjara has joined #ruby
andrewhl has quit [Remote host closed the connection]
Nisstyre_ has joined #ruby
jjbohn is now known as jjbohn|afk
dhruvasagar has joined #ruby
Kn|t3 has joined #ruby
adeponte has quit [Remote host closed the connection]
Kn|t3_ has joined #ruby
mrdtt has joined #ruby
<Spaceghost|cloud> breakingthings: Is it part of the system under test?
Nisstyre has quit [Ping timeout: 252 seconds]
<breakingthings> Spaceghost|cloud: The TCPServer itself is not; but the tests make extensive use of TCPSocket and I can't figure out how to stub/mock them in an effective way so it made more sense to me to create a local TCPServer for the tests to latch on to
<Spaceghost|cloud> Hm. I guess you could if you want.
<Spaceghost|cloud> It isn't the most exciting way to do it.
<breakingthings> I decided that it probably makes more sense to create it in a before(:all), but I can't find the appropriate method on TCPServer to then cleanup the server
<breakingthings> I don't know how I would mock tcpsockets
<breakingthings> if you know better, :d
ejnahc has quit [Max SendQ exceeded]
ejnahc has joined #ruby
danshultz has quit [Ping timeout: 245 seconds]
<Spaceghost|cloud> breakingthings: Random google result: https://gist.github.com/1470076
benlieb has joined #ruby
<breakingthings> currently I'm just testing that the instance variable is an instance of TCPSocket but eventually I will need readline and such
<halogenandtoast> whitequark: thanks for rxr I'm using it pretty often
ejnahc has quit [Max SendQ exceeded]
Kn|t3 has quit [Read error: Operation timed out]
Kn|t3_ is now known as Kn|t3
<s1n4> I cant find any helpful documentions for Curses
<breakingthings> hmm… that's interesting, I will try that out.
<breakingthings> s1n4: main docs not cutting it for you?
danshultz has joined #ruby
swills has joined #ruby
<Spaceghost|cloud> halogenandtoast: What's that?
<halogenandtoast> rxr.whitequark.org
<halogenandtoast> http://rxr.whitequark.org
pierre1 has joined #ruby
<swills> can someone take a look at https://github.com/swills/puppet/blob/4ab56d3fbb7de05afa5bc27bbd8275e917d74188/lib/puppet/provider/package/freebsd.rb and explain why lines 18 and 19 generate warnings "warning: class variable access from toplevel" and the correct way to fix it, that will also work with 1.8?
<Spaceghost|cloud> whitequark: Hey, nifty!
<halogenandtoast> swills: Don't use class variables in the toplevel
<breakingthings> On the subject of TCPSocket, how come the docs don't say much of anything about the methods it has, but there's apparently ton of them
<breakingthings> a ton*
jekotia has quit [Quit: ChatZilla 0.9.89-rdmsoft [XULRunner 1.9.0.17/2009122204]]
<halogenandtoast> swills: the simple solution would be to use globals
aaronmacy has quit [Quit: Leaving.]
<breakingthings> Apidock and main dock say it pretty much just has #new and #gethostbyname…
otters has joined #ruby
<breakingthings> s/ dock/ docs/
<halogenandtoast> swills or you could wrap the whole thing in a class
<halogenandtoast> which would be a better solution
ejnahc has joined #ruby
halogenandtoast has quit [Quit: halogenandtoast]
<swills> ok... i wonder how you would do that...
banjara has quit [Ping timeout: 276 seconds]
mockra has quit [Remote host closed the connection]
jjbohn|afk is now known as jjbohn
<s1n4> breakingthings: no, it's not a well document lib :/
<breakingthings> s1n4: what are you trying to do?
<Spaceghost|cloud> Why do people use mutexes with the class variable? I mean, is it to protect against descendants and inheritors from modifying it or something?
flip_digits has quit [Quit: Textual IRC Client: http://www.textualapp.com/]
mafolz has quit [Ping timeout: 252 seconds]
<s1n4> breakingthings: first off, I'm trying to make a simple pager (such as less/more)
Takehiro has joined #ruby
generali_ has joined #ruby
jonathanpenn has joined #ruby
mafolz has joined #ruby
<breakingthings> Spaceghost|cloud: I'm getting a LoadError on "mocks", from that gist you linked
<breakingthings> Any idea how to remedy this?
v10l3nt has joined #ruby
reset has quit [Quit: Leaving...]
<v10l3nt> can anyone help me turn a reg_binary from the windows registry to ascii using Ruby?
<Spaceghost|cloud> breakingthings: Nope, I just randomly linked it. The idea is just to make a mock which stubs the methods that a TCPServer uses.
<breakingthings> Right, I get it, but it has require 'mocks' and its throwing a LoadError
<Spaceghost|cloud> Right, so change that. :)
Takehiro has quit [Ping timeout: 276 seconds]
<Spaceghost|cloud> Don't be a copypasta programmer.
freezway has joined #ruby
<breakingthings> I just don't know why it requires mocks and how to solve this.
<breakingthings> :d
dhruvasagar has quit [Read error: Connection reset by peer]
jblack has joined #ruby
<Spaceghost|cloud> Umm... just switch out the mocking library and update the syntax of the mocks. Or just don't copypasta and write your own mock that implements those same methods.
<breakingthings> All that stuff you said? Yeah, not experienced enough with RSpec to follow just yet.
<breakingthings> Which… is why I'm asking these questions.
jjbohn is now known as jjbohn|afk
jlast has quit [Remote host closed the connection]
gridaphobe has quit [Remote host closed the connection]
aeontech has joined #ruby
mneorr has quit [Remote host closed the connection]
pkuyken has quit [Quit: pkuyken]
mockra has joined #ruby
arya has quit [Ping timeout: 248 seconds]
mbueti has joined #ruby
aaronmacy has joined #ruby
xemu has quit [Quit: Nettalk6 - www.ntalk.de]
slainer68 has joined #ruby
arya has joined #ruby
angusiguess has quit [Read error: Connection reset by peer]
mneorr has joined #ruby
butblack has quit [Quit: butblack]
slainer68 has quit [Ping timeout: 255 seconds]
banjara has joined #ruby
angusiguess has joined #ruby
hadees has quit [Quit: hadees]
AshleyWaffle has joined #ruby
arya has quit [Ping timeout: 248 seconds]
andrewhl has joined #ruby
banjara has quit [Ping timeout: 252 seconds]
dr_neek has joined #ruby
arya has joined #ruby
TheFuzzball has joined #ruby
Nisstyre_ has quit [Ping timeout: 255 seconds]
mneorr_ has joined #ruby
etcetera has joined #ruby
Nisstyre has joined #ruby
arya has quit [Ping timeout: 248 seconds]
Takehiro has joined #ruby
angusiguess has quit [Ping timeout: 240 seconds]
mneorr has quit [Ping timeout: 276 seconds]
arya has joined #ruby
heyitsdave has quit [Ping timeout: 260 seconds]
jjbohn|afk is now known as jjbohn
v0n has quit [Ping timeout: 246 seconds]
w|t has quit [Read error: Connection reset by peer]
charliesome has joined #ruby
w|t has joined #ruby
danshultz has quit [Remote host closed the connection]
jonathanpenn has quit [Remote host closed the connection]
stopbit has quit [Quit: Leaving]
mneorr has joined #ruby
jinzhu has quit [Read error: Connection reset by peer]
tjbiddle has joined #ruby
megha has quit [Quit: WeeChat 0.4.0]
jackyalcine has joined #ruby
jackyalcine has quit [Changing host]
jackyalcine has joined #ruby
freakazoid0223 has quit [Quit: Leaving]
mneorr_ has quit [Ping timeout: 276 seconds]
sepp2k has quit [Remote host closed the connection]
ManAmongHippos has joined #ruby
c0rn has joined #ruby
jackyalcine has quit [Ping timeout: 256 seconds]
tylersmith has quit [Quit: tylersmith]
yacks has joined #ruby
<freezway> so if I declare a global variable like "variable = []"
<freezway> then want to reference that in a method
<freezway> how do I do that
x82_nicole has quit [Quit: Computer has gone to sleep.]
AshleyWaffle has quit [Read error: Connection reset by peer]
iamjarvo has left #ruby [#ruby]
mockra has quit [Remote host closed the connection]
banjara has joined #ruby
jackyalcine has joined #ruby
jackyalcine has quit [Changing host]
jackyalcine has joined #ruby
<RubyPanther> that isn't a global, you can't reference it from in a method, and you don't do it
<freezway> actaully i just realzied its not in a method
angusiguess has joined #ruby
<freezway> but its in a each_wind_index block
w400z has joined #ruby
HAKEON has joined #ruby
huoxito has quit [Quit: Leaving]
adkron has joined #ruby
adkron_ has joined #ruby
<reactormonk> freezway, don't use global variables.
Umren has joined #ruby
otherj has joined #ruby
allaire has quit []
banjara has quit [Ping timeout: 252 seconds]
jaequery has joined #ruby
etcetera has quit [Ping timeout: 252 seconds]
xbayrockx has joined #ruby
xbayrockx is now known as wf2f
tommyvyo has joined #ruby
b1rkh0ff has quit [Ping timeout: 245 seconds]
b1rkh0ff has joined #ruby
s1n4 has quit [Quit: leaving]
etcetera has joined #ruby
etcetera has quit [Max SendQ exceeded]
jenrzzz has quit [Ping timeout: 245 seconds]
etcetera has joined #ruby
joofsh has quit [Remote host closed the connection]
etcetera has quit [Max SendQ exceeded]
toekutr has joined #ruby
Nisstyre has quit [Ping timeout: 260 seconds]
barjunk has joined #ruby
radic has joined #ruby
Nisstyre has joined #ruby
megha has joined #ruby
rippa has joined #ruby
radic_ has quit [Ping timeout: 276 seconds]
TheFuzzball has quit [Read error: No route to host]
w400z has quit []
ananthakumaran has joined #ruby
barjunk has quit [Quit: AndroIRC - Android IRC Client ( http://www.androirc.com )]
xpen has joined #ruby
Mon_Ouie has joined #ruby
Mon_Ouie has joined #ruby
jonathanwallace has quit [Ping timeout: 252 seconds]
TheFuzzball has joined #ruby
etcetera has joined #ruby
TheFuzzball has quit [Client Quit]
mockra has joined #ruby
dr_neek has quit [Quit: dr_neek]
dmiller has quit [Ping timeout: 276 seconds]
davidcelis has quit [Ping timeout: 256 seconds]
erichmenge has quit [Ping timeout: 256 seconds]
chrismhough has joined #ruby
Nisstyre_ has joined #ruby
davidcelis has joined #ruby
erichmenge has joined #ruby
Nisstyre has quit [Disconnected by services]
Nisstyre_ is now known as Nisstyre
jjbohn has quit [Quit: Leaving...]
etcetera has quit []
mockra has quit [Remote host closed the connection]
mbueti has quit [Quit: mbueti]
breakingthings has quit []
banjara has joined #ruby
meoblast001 has quit [Remote host closed the connection]
cozby has joined #ruby
ManAmongHippos has quit [Ping timeout: 255 seconds]
Nisstyre has quit [Ping timeout: 252 seconds]
Nisstyre-laptop has joined #ruby
mockra has joined #ruby
Bosox20051 has quit [Quit: Leaving]
GoldenCider has joined #ruby
jpfuentes2 has quit [Quit: Computer has gone to sleep.]
arya has quit [Ping timeout: 248 seconds]
Umren has quit [Read error: Connection reset by peer]
otherj has quit [Quit: otherj]
jblack has quit [Ping timeout: 240 seconds]
arya has joined #ruby
banjara has quit [Ping timeout: 255 seconds]
ner0x has quit [Quit: Leaving]
<shevy> freezway a global variable always has a $, where in your example do you use $
gnarmis has quit [Remote host closed the connection]
<freezway> oh, its not gloabal then
razieliyo has joined #ruby
<razieliyo> hi
<shevy> btw .each_wind_index you probably meant .each_with_index ? the iterator with an index
<razieliyo> any ruby enviroment from which I can do autocomplete?
<shevy> razieliyo, depends. if you use linux, you can use tab completion + readline module
pyreal has quit [Ping timeout: 255 seconds]
<shevy> you can enable this in irb too
<razieliyo> shevy: I use linux, of course
<razieliyo> shevy: thanks, I'll search info on that =)
Myconix has quit [Ping timeout: 256 seconds]
<shevy> require 'irb/completion'
joeycarmello has quit [Remote host closed the connection]
<shevy> and then something like Dir.l[PRESS TAB HERE] should work
<razieliyo> perfect
<shevy> but best google for more info :)
nari has quit [Ping timeout: 245 seconds]
angusiguess has quit [Ping timeout: 255 seconds]
<shevy> it's been years since I last needed it... after a while, your brain picks up like 70% of the stuff available
<razieliyo> yes, you're right, shevy
saltcod has quit [Ping timeout: 252 seconds]
<razieliyo> shevy: well, I'm gonna just start with ruby
<shevy> like the brain becomes a mini google
<shevy> cool
<shevy> always remember these days!
<razieliyo> hahaha
ananthakumaran has quit [Quit: Leaving.]
<razieliyo> I think it will be funny, really
andrewhl has quit [Remote host closed the connection]
jonathanwallace has joined #ruby
mockra has quit [Remote host closed the connection]
angusiguess has joined #ruby
HAKEON has quit [Quit: HAKEON]
<razieliyo> it seems the official guide will be my best bet
ddd has joined #ruby
c0rn has quit [Ping timeout: 240 seconds]
havenn has joined #ruby
c0rn has joined #ruby
saltcod has joined #ruby
jduan1981 has joined #ruby
MattRB has quit [Quit: This computer has gone to sleep]
angusiguess has quit [Ping timeout: 256 seconds]
jonathanwallace has quit [Ping timeout: 252 seconds]
thams has quit [Quit: thams]
havenn has quit [Ping timeout: 276 seconds]
v10l3nt has quit [Quit: v10l3nt]
adkron has quit [Ping timeout: 246 seconds]
nari has joined #ruby
adkron_ has quit [Ping timeout: 246 seconds]
crackfu has quit [Remote host closed the connection]
mikepack has joined #ruby
crackfu has joined #ruby
Takehiro has quit [Remote host closed the connection]
Myconix has joined #ruby
crackfu has quit [Ping timeout: 245 seconds]
bradhe has quit [Remote host closed the connection]
crackfu has joined #ruby
tjbiddle has quit [Read error: Connection reset by peer]
tjbiddle has joined #ruby
clocKwize has quit [Quit: clocKwize]
slainer68 has joined #ruby
arya has quit [Ping timeout: 248 seconds]
arya has joined #ruby
allure has joined #ruby
allure has quit [Changing host]
allure has joined #ruby
generali_ has quit [Remote host closed the connection]
girija has joined #ruby
slainer68 has quit [Ping timeout: 244 seconds]
bradhe has joined #ruby
lolmaus has joined #ruby
tomzx_mac has joined #ruby
bradhe has quit [Remote host closed the connection]
atno has quit [Quit: Get MacIrssi - http://www.sysctl.co.uk/projects/macirssi/]
mneorr has quit [Read error: Connection reset by peer]
mneorr has joined #ruby
ananthakumaran has joined #ruby
<shevy> I came from PHP
<shevy> PHP felt very limited and giving obstacles more than it needed
<shevy> so it was either python or ruby
<shevy> matz is cooler than guido though, so ...
jonathanwallace has joined #ruby
gnarmis has joined #ruby
<razieliyo> shevy: and is less syntax friendly
joeycarmello has joined #ruby
<razieliyo> shevy: what attracted me about ruby is people writing that ruby is very similar to lisp
<razieliyo> but purely object oriented
<razieliyo> shevy: personally, what do you recommend me to learn it? is that book good?
<razieliyo> I mean the pragmatic programmer
<ddd> The Well-Grounded Rubyist by David Black
<razieliyo> ddd: I'll check
<ddd> Manning Publishing
<shevy> razieliyo well, ruby as a whole is quite complex actually
<shevy> I started with the pickaxe sometime in... 2006 or so, it was ok
<shevy> but I think you can make use of the pickaxe only once
<shevy> if you reread years later, like 70% of the stuff you will already know
<razieliyo> shevy: do you mean this? http://www.rubycentral.com/pickaxe/ç
MattRB has joined #ruby
<razieliyo> sorry for the ç
wmoxam has joined #ruby
allure has quit [Quit: Saindo]
jonathanwallace has quit [Ping timeout: 246 seconds]
hail_kuato has joined #ruby
bradhe has joined #ruby
bradhe has quit [Remote host closed the connection]
hail_kuato has left #ruby [#ruby]
ananthakumaran has quit [Quit: Leaving.]
hail_kuato has joined #ruby
<shevy> it has examples + the standard library reference in the last ~200 pages
<shevy> which is always useful, even when you are not a newbie anymore
<shevy> but the beginning is useful only if you are a newcomer
<ddd> how often does a Major's stdlib get modified?
bradleyprice has joined #ruby
<shevy> I mean, it has examples on almost every page, I just mean that the stdlib-examples in the last part of the book
<ddd> often enough to render the ~200 obsolete fairly quick?
<shevy> ddd dunno... ruby's stdlib stayed around 80% the same I would say... new things came into it mostly, a few things were deprecated and got killed
<shevy> ddd nah most of it would still be useful
<shevy> but just take io-console
<shevy> it was not available in 1.8, but it is in 1.9.x it is fairly useful, ask Mon_Ouie :)
<shevy> he has some gem based on it
Takehiro has joined #ruby
<shevy> "The io/console extension provides methods for interacting with the console. The console can be accessed from IO.console or the standard input/output/error IO objects."
stringoO has joined #ruby
ananthakumaran has joined #ruby
Vert has quit [Ping timeout: 252 seconds]
<ddd> funny you picked IO. IO changed for java from 6 to 7, we're hitting 7 in class, and I keep futzing it up because I'm using 6 stuff that I picked up before I Started the class,
<ddd> and I keep trying to write Ruby in with the java. lol
<shevy> actually my ruby style is a bit javafied
<ddd> funny looking code when I try to dump something to file real fast. such a mix lol
<shevy> I prefer to use .set_bla to set @bla, whereas others use .bla =
lzy has quit [Ping timeout: 276 seconds]
<shevy> and aside from DSL, I always use {} for blocks rather than do/end
Vert has joined #ruby
<shevy> only drawback of {} is that you must use parens, if you pass arguments :(
<ddd> i prefer do/end, but i'm moving towards {} because of class
browndawg has joined #ruby
<shevy> invoke :this do run_cleanup end
<shevy> invoke :this { run_cleanup } # syntax error
<shevy> invoke(:this) { run_cleanup } # works, but is ugly
drago757 has quit [Quit: drago757]
joeycarmello has quit [Remote host closed the connection]
joeycarmello has joined #ruby
<shevy> I like the {} visually inside a method
<ddd> i know java is affecting my ruby because I'm starting to add () for almost all my method calls now
<shevy> normally you would have ... def foo; data.each do |bla|; end; end, <--- 2x end
<ddd> since java requires them, its been creeping into my ruby hehe
<razieliyo> shevy: thanks!
<shevy> def foo; data.each {|bla| }; end <--- only 1x end
<shevy> ddd yeah I can understand that
<razieliyo> so, that book is called the pickaxe
<razieliyo> so funny
<shevy> it seems to be simpler for the brain to act on known patterns
<ddd> yeah
<ddd> razieliyo: its named after the picture on the front
<ddd> most of the books are like taht
<ddd> err that
<razieliyo> lol
<razieliyo> I didn't noticed until now
jon_wingfield has quit [Remote host closed the connection]
<ddd> shevy: I'm also taking 3D modeling classes and we're using Autodesk Maya 2013. I'm waiting until we start covering the MEL (Maya's internal scripting language)
jon_wingfield has joined #ruby
<cozby> I read that string objects in a loops are created on each iteration unless frozen, is that true?
jrabbit has quit [Ping timeout: 248 seconds]
freezway has quit [Ping timeout: 240 seconds]
c0rn has quit [Ping timeout: 276 seconds]
<ddd> will have to use java to interact with it (since the same teacher also teaches my Computational Programming and Java classes), but I want to see how hard it will be to use ruby with it
Takehiro has quit [Ping timeout: 260 seconds]
<ddd> cozif its frozen it can't be changed
<Mon_Ouie> Since "foo" is mutable, every time it is evaluated, a new object should be created
Myconix has quit [Ping timeout: 260 seconds]
<Mon_Ouie> "foo".freeze is therefore just the same
<Mon_Ouie> (That's disregarding potential compiler optimization though)
<cozby> how is "foo".freeze the same?
<cozby> freezing makes the object immutable
<Mon_Ouie> It needs to evaluate "foo" before it can freeze it
<ddd> err? i thought .freeze made that object immutable thus it would fry the loop if the same string object was reused if it was frozen
<ddd> is that untrue?
<cozby> I see
<Mon_Ouie> It first creates the string and then freezes it
<cozby> so if "foo" were assigned as such x = "foo", then x.freeze
Myconix has joined #ruby
<Mon_Ouie> If you put it in a variable no matter whether or not you freeze it, no new object will be created
<cozby> it wouldn't be created on each iteration
<cozby> oh
<ddd> ahhh
<ddd> got taught something new too
rakl has quit [Quit: sleeping]
<cozby> so... to be crystal
<cozby> a string in a loop is only evaluated and created once
sayan has joined #ruby
sayan has quit [Changing host]
sayan has joined #ruby
<cozby> it will not be recreated on each iteration
* cozby searching for where he read this
<Mon_Ouie> It's not a string, it's a variable reference
<Mon_Ouie> If you put a string literal in a loop, it needs to create a string instance every time
<ddd> cozby: Mon_Ouie pointed out a specifics
<cozby> got it
<cozby> that makes sense
<cozby> thx
yugui_zzz is now known as yugui
mneorr has quit [Ping timeout: 245 seconds]
girija_ has joined #ruby
osaut has joined #ruby
quest88 has quit [Quit: quest88]
jackyalcine_ has joined #ruby
jackyalcine_ has quit [Changing host]
jackyalcine_ has joined #ruby
cha1tanya has joined #ruby
cha1tanya has quit [Changing host]
cha1tanya has joined #ruby
yacks has quit [Quit: Leaving]
jackyalcine has quit [Ping timeout: 260 seconds]
angusiguess has joined #ruby
girija has quit [Ping timeout: 252 seconds]
yewton has quit [Excess Flood]
tomzx_mac has quit [Ping timeout: 252 seconds]
Kudos has quit [Ping timeout: 252 seconds]
yewton has joined #ruby
blacktulip has joined #ruby
mneorr has joined #ruby
pyreal has joined #ruby
Myconix has quit [Ping timeout: 260 seconds]
c0rn has joined #ruby
Kudos has joined #ruby
Kudos has quit [Changing host]
Kudos has joined #ruby
Myconix has joined #ruby
tommyvyo has quit [Quit: http://thomasvendetta.com]
angusiguess has quit [Ping timeout: 246 seconds]
stringoO has quit [Quit: stringoO]
mockra has joined #ruby
benlieb has quit [Quit: benlieb]
mneorr has quit [Ping timeout: 240 seconds]
mneorr has joined #ruby
Kudos has quit [Ping timeout: 256 seconds]
Kudos has joined #ruby
chimkan has joined #ruby
zph has joined #ruby
mockra has quit [Ping timeout: 255 seconds]
sayan has quit [Ping timeout: 260 seconds]
sleetdrop has joined #ruby
<shevy> hmm "#{foo(columns)}" vs. foo(columns).to_s what is better to read?
JumpMast3r has quit [Quit: JumpMast3r]
girija_ has quit [Ping timeout: 244 seconds]
girija_ has joined #ruby
<ddd> i like the 2nd but thats me
<shevy> :\ I too... but most everyone prefers the first. I kind of find the #{} hard to discern visually... but not having to do .to_s is a definite plus hmmm
<shevy> *me too, rather
<ddd> the 2nd is less confusing at a fast paced scan
reset has joined #ruby
<shevy> IO.binread("testing_ioconsole.rb", 20) # <-- pretty cool, you read in 20 chars with that
<ddd> thats why i prefer it, but i do realize the 1st is convention
<shevy> ddd I always try to see the advantages and disadvantages, conventions come only at a later point
<shevy> ruby code can be hard to read
<ddd> not a bad way to look at it
<ddd> yeah it can.
slainer68 has joined #ruby
<shevy> and when there are lots of evals, hooks and what-not-if-lambdas, I cant really see anything going on anyway
maletor has joined #ruby
jackyalcine_ has quit [Ping timeout: 252 seconds]
<ddd> i don't think i've developed a personal style yet though. i've been changing how i write things a lot. but that again could just be because of the java class
hail_kuato has quit [Quit: hail_kuato]
<shevy> yeah, styles can change a lot
<ddd> i mean i have developed that i like a space after opening and before closing braces and stuff like that but beyond that i've not developed a solid preference on how to format codee, or particular conventions to use yet
emergion has joined #ruby
<shevy> that's why I try to come up with reasons why one style is used over another
<shevy> tabs vs. spaces - I was using tabs, until I noticed I try to use tabs to align documentation on the right side of my editor, which did not work too well. so I switched to spaces only ever since
<shevy> ddd that seems reasonable
c0rn has quit [Quit: Computer has gone to sleep.]
<shevy> you mean:
<ddd> well, personally i've come to believe that whitespace is a great organizer, and makes things easier to grok when you're scanning real fast (or even pouring over something) rather than tight fitted code.
<shevy> foo.each {|x|
<shevy> vs
<shevy> foo.each{|x|
<shevy> ?
<shevy> ddd do you use tabs or spaces
mikepack has quit [Remote host closed the connection]
<ddd> so i've come to prefer using whitespace to organize with, but there are a hell of a lot of different ways to write just the code itself that I haven't decided on yet
<ddd> oh, spaces
<ddd> i've even reformatted my java to use the 2 space convention
thams has joined #ruby
gnarmis has quit [Remote host closed the connection]
<ddd> hehe my professor hates it but won't make me stop :)
slainer68 has quit [Ping timeout: 240 seconds]
cozby has quit [Remote host closed the connection]
<ddd> "I'd really prefer that you use tabs in your java files, but I won't make you. However know that tabs is the preferred convention." heheh
<ddd> I almost wrote back "waaa" but stopped myself
<shevy> he is silly
chimkan_ has joined #ruby
<shevy> let me guess - he never comments to the right side of his code right?
<shevy> he'll solely use top-block comments introducing methods
<ddd> he's not really putting any effort into teaching the class anyways. He's trying to push using MS Visio for flowcharts only..
<shevy> in ruby, I really try to cram as much information as possible into 80 characters per line
<shevy> IF I know the code works fine
<ddd> spent the first week of classes telling everyone that the book was God, just read the book and do the end of chapter stuff, he's there only if you're *really* stuck but he'll take off points if its something the book covers
<shevy> if the code works, I dont need to have it spawn many lines, it can be terse and succinct, including comments (comment only minimally, but do comment often)
<Mon_Ouie> In most C style languages, preferred convention about indentation aren't much more variable than in say Ruby
<shevy> ddd I could not survive java classes...
<ddd> so basically he's making you self teach yourself with the book and the school is charging you to teach yourself
<shevy> ddd sounds familiar to most universities ;)
<ddd> meanwhile he collects a paycheck to shit on his ass
erichmenge has quit [Ping timeout: 260 seconds]
davidcelis has quit [Ping timeout: 260 seconds]
<ddd> err sit
<shevy> ddd and how are the exams? designed so that you have to redo it and pay again?
<ddd> idk, we haven't gotten to exams yet
chimkan has quit [Ping timeout: 252 seconds]
chimkan_ is now known as chimkan
<shevy> kk
<ddd> this is my first time back to college since I was 21. I'm 22
<ddd> err 42
nomenkun has joined #ruby
<shevy> well it depends on whether they want to teach anything really or whether they don't
<ddd> well, every other class I have does.
<ddd> he's the only one thats like "Its in the book. read the book. the book is god, go back and reread the book
bradleyprice has quit [Remote host closed the connection]
xybre has quit [Ping timeout: 256 seconds]
<ddd> and he's demanding that everyone use the 32bit JDK and NOT the 64 bit, but every damned person in the class has a 64 bit machine. He's got this old ass thinkpad laptop that he uses for class
joeycarmello has quit [Remote host closed the connection]
<shevy> hehe
<ddd> thats why he wants the 32bit. he can't run the 64bit JDK :-). Doesn't matter to him that 32bit JDK on 64bit machines affects a LOT more than jsut is friggin class
<shevy> I have a 64 bit computer and am using 32 bit toolchains right now, somehow 32 bit was easier, so many more things seem to be easily working with it
MattRB has quit [Quit: This computer has gone to sleep]
Kudos has quit [Ping timeout: 256 seconds]
<Mon_Ouie> Why does it matter to him? Don't people just send him the source code?
<heftig> ddd: not like it really matters when you have pure java code
recycle has quit [Remote host closed the connection]
<ddd> most of us in the class met after class in the cafeteria and tried to set up with the 32bit on our machines, and we all had browser issues on java sites, etc. Some of my work software requires the 64bit etc
tagrudev has joined #ruby
<ddd> Mon_Ouie: no clue. he's just a fat ass professor trying to collect a buck without really teaching anyone a damned thing
<ddd> even the Assistant Professor thinks he's nuts
recycle has joined #ruby
recycle has quit [Read error: Connection reset by peer]
mneorr_ has joined #ruby
recycle has joined #ruby
<ddd> he complained LOUDLY on the Blackboard forum for his class when someone complained they couldn't reach the syllabus for the class. Told them not to contact HIM about it, to contact the IT department for the school.
<ddd> wtf? why would students go to the IT department rather than their professor off the hop for something in HIS class's blackboard section related to HIS class?
Kudos has joined #ruby
Kudos has quit [Changing host]
Kudos has joined #ruby
kpshek has joined #ruby
<ddd> so glad none of my other professors are like that. ever one of em go out their way to help out
<ddd> makes up for one dick professor
mneorr has quit [Ping timeout: 245 seconds]
nomenkun has quit [Remote host closed the connection]
jgrevich_ has joined #ruby
<ddd> anyways, homework's done. going to bed. night
jgrevich has quit [Ping timeout: 244 seconds]
jgrevich_ is now known as jgrevich
pierre1 has quit [Remote host closed the connection]
apok has quit [Quit: apok]
melnik has joined #ruby
ChampS666 has joined #ruby
xybre has joined #ruby
xybre has quit [Changing host]
xybre has joined #ruby
bradhe has joined #ruby
jonathanwallace has joined #ruby
erichmenge has joined #ruby
davidcelis has joined #ruby
davidcelis has quit [Changing host]
davidcelis has joined #ruby
crackfu has quit [Remote host closed the connection]
crackfu has joined #ruby
Nisstyre has joined #ruby
az7ar has joined #ruby
toekutr has quit [Remote host closed the connection]
bradhe has quit [Remote host closed the connection]
jgrevich has quit [Ping timeout: 244 seconds]
xpen_ has joined #ruby
main has joined #ruby
crackfu has quit [Ping timeout: 245 seconds]
Kudos has quit [Ping timeout: 246 seconds]
MattRB has joined #ruby
jonathanwallace has quit [Ping timeout: 255 seconds]
shock_one has joined #ruby
xpen__ has joined #ruby
xpen has quit [Ping timeout: 276 seconds]
Mon_Ouie has quit [Ping timeout: 260 seconds]
kpshek has quit []
tjbiddle has quit [Quit: tjbiddle]
xpen_ has quit [Ping timeout: 240 seconds]
sayan has joined #ruby
benlieb has joined #ruby
rippa has quit [Ping timeout: 240 seconds]
puppeh has joined #ruby
a_a_g has joined #ruby
jgrevich has joined #ruby
arya has quit [Ping timeout: 248 seconds]
whowantstolivefo has joined #ruby
aaronmacy has quit [Quit: Leaving.]
osaut has quit [Quit: osaut]
caption is now known as ewilliam
arya has joined #ruby
cableray has quit [Quit: cableray]
joeycarmello has joined #ruby
aaronmacy has joined #ruby
puppeh has quit [Quit: Leaving...]
ChampS666 has quit [Ping timeout: 245 seconds]
caption has joined #ruby
ewilliam has quit [Quit: alice.]
caption is now known as ewilliam
jgrevich_ has joined #ruby
jgrevich has quit [Ping timeout: 260 seconds]
jgrevich_ is now known as jgrevich
hemanth has joined #ruby
browndawg has quit [Quit: Leaving.]
hemanth_ has joined #ruby
hemanth_ has quit [Read error: Connection reset by peer]
hemanth_ has joined #ruby
havenn has joined #ruby
hemanth_ has quit [Read error: Connection reset by peer]
robustus has quit [Ping timeout: 255 seconds]
robustus has joined #ruby
jonathanwallace has joined #ruby
havenn has quit [Ping timeout: 260 seconds]
MattRB has quit [Quit: This computer has gone to sleep]
maletor has quit [Quit: Computer has gone to sleep.]
tvw has joined #ruby
slainer68 has joined #ruby
Elhu has joined #ruby
benlieb has quit [Quit: benlieb]
Astral__ has quit [Read error: Connection reset by peer]
Astral__ has joined #ruby
mafolz has quit [Remote host closed the connection]
zommi has joined #ruby
mafolz has joined #ruby
mercwithamouth has quit [Ping timeout: 245 seconds]
jonathanwallace has quit [Ping timeout: 252 seconds]
slainer68 has quit [Ping timeout: 240 seconds]
Ralt has quit [Ping timeout: 276 seconds]
banister_ has joined #ruby
browndawg has joined #ruby
dhruvasagar has joined #ruby
banister`sleep has quit [Ping timeout: 246 seconds]
browndawg has left #ruby [#ruby]
browndawg has joined #ruby
MxG has quit [Remote host closed the connection]
browndawg has quit [Client Quit]
zph has quit [Quit: Computer has gone to sleep.]
az7ar has quit [Quit: Leaving]
MattRB has joined #ruby
MxG has joined #ruby
Morkel has joined #ruby
chimkan_ has joined #ruby
MxG has quit [Remote host closed the connection]
zph has joined #ruby
chimkan has quit [Ping timeout: 255 seconds]
chimkan_ is now known as chimkan
vlad_starkov has joined #ruby
thams has quit [Quit: thams]
vlad_starkov has quit [Read error: Connection reset by peer]
zph has quit [Client Quit]
vlad_starkov has joined #ruby
chrismhough has quit [Quit: chrismhough]
bradhe has joined #ruby
razieliyo has quit [Read error: Connection reset by peer]
bradhe_ has joined #ruby
bradhe has quit [Read error: Connection reset by peer]
skcin7 has quit []
bigkevmcd has joined #ruby
pnkbst has joined #ruby
bradhe_ has quit [Remote host closed the connection]
MattRB has quit [Quit: This computer has gone to sleep]
Dom_ has joined #ruby
ChampS666 has joined #ruby
Elhu has quit [Quit: Computer has gone to sleep.]
blaxter has joined #ruby
mahmoudimus has joined #ruby
arya has quit [Ping timeout: 248 seconds]
havenn has joined #ruby
jonathanwallace has joined #ruby
eldariof has joined #ruby
m8 has joined #ruby
punkrawkR has joined #ruby
arya has joined #ruby
crackfu has joined #ruby
jduan1981 has quit [Quit: jduan1981]
ChampS666 has quit [Ping timeout: 255 seconds]
taoru has quit [Remote host closed the connection]
sayan has quit [Read error: Connection reset by peer]
aganov has joined #ruby
io_syl has quit [Quit: Computer has gone to sleep.]
cha1tanya has quit [Ping timeout: 260 seconds]
Nisstyre_ has joined #ruby
jonathanwallace has quit [Ping timeout: 252 seconds]
crackfu has quit [Ping timeout: 276 seconds]
filipe has joined #ruby
Nisstyre has quit [Disconnected by services]
Nisstyre_ is now known as Nisstyre
Nisstyre-laptop has quit [Ping timeout: 240 seconds]
piotr_ has joined #ruby
reset has quit [Quit: Leaving...]
timonv has quit [Remote host closed the connection]
timonv has joined #ruby
robert__ has joined #ruby
robert__ has quit [Changing host]
robert__ has joined #ruby
veer has joined #ruby
pskosinski has joined #ruby
veer is now known as Guest69351
MetaCosm has quit [Quit: ZNC - http://znc.in]
robert_ has quit [Ping timeout: 245 seconds]
wupeng has joined #ruby
_veer has quit [Ping timeout: 256 seconds]
wallerdev has quit [Quit: wallerdev]
tjbiddle has joined #ruby
billy_ran_away has quit [Read error: Operation timed out]
billy_ran_away has joined #ruby
oh2lre has joined #ruby
mneorr_ has quit [Remote host closed the connection]
wupeng has quit [Client Quit]
timonv has quit [Ping timeout: 240 seconds]
clocKwize has joined #ruby
chussenot has joined #ruby
yacks has joined #ruby
dr_bob has joined #ruby
angusiguess has joined #ruby
pavilionXP has quit [Read error: Connection reset by peer]
Erfankam has quit [Quit: Leaving.]
osaut has joined #ruby
nomenkun has joined #ruby
stayarrr has joined #ruby
yugui is now known as yugui_zzz
eotl has quit [Quit: Leaving]
Nisstyre has quit [Ping timeout: 276 seconds]
<tjbiddle> Can someone explain what the difference between var = var + new_var and var << new_var is? I just happened to give << a try and my method worked properly. Example code: http://pastie.org/5894943
Kn|t3_ has joined #ruby
t3o has left #ruby [#ruby]
zigomir has joined #ruby
<nanothief> tjbiddle: var = var + new_var makes var a new string, leaving the old string unchanged. str << more CHANGES str to add more to the end. Your implementation depends on text being changed by inner methods
lkba has quit [Ping timeout: 276 seconds]
DrCode has quit [Remote host closed the connection]
jimeh has joined #ruby
Kn|t3 has quit [Ping timeout: 244 seconds]
Kn|t3_ is now known as Kn|t3
<nanothief> for example in irb x = "hello"; y = x; x << "test"; y evaluates to "hellotest"
[rust] has quit [Quit: This computer has gone to sleep]
<nanothief> while x = "hello"; y = x; x = x + "test" ; y evaluates to "hello"
johngalt2600 has joined #ruby
jaequery has quit [Quit: Computer has gone to sleep.]
<tjbiddle> nanothief: Interesting. So I'm assuming after it got out of the do loop that text was what printTree was given originally?
robotmay has joined #ruby
jaequery has joined #ruby
<nanothief> no, the key point is line 27 - the result of the recursive call isn't used. So the only way to get info back is through changing the passed in text. This occurs in the first version, but not the second
<nanothief> changing line 27 to text = printTree(d.id, level, text) may may the second version work as well
sayan has joined #ruby
sayan has joined #ruby
sayan has quit [Changing host]
johngalt2600 has quit [Client Quit]
megha has quit [Quit: WeeChat 0.4.0]
megha has joined #ruby
<tjbiddle> nanothief: Hm. I'll have to play around with that - Really interesting. Thanks!
DrCode has joined #ruby
main has quit [Ping timeout: 252 seconds]
jonathanwallace has joined #ruby
xpen__ has quit [Ping timeout: 260 seconds]
tjbiddle has quit [Quit: tjbiddle]
Takehiro has joined #ruby
hoelzro|away is now known as hoelzro
Nisstyre has joined #ruby
sayan has quit [Ping timeout: 260 seconds]
AxonetBE has joined #ruby
cha1tanya has joined #ruby
johngalt2600 has joined #ruby
megha has quit [Quit: WeeChat 0.4.0]
megha has joined #ruby
hamed_r has joined #ruby
jonathanwallace has quit [Ping timeout: 252 seconds]
mahmoudimus has quit [Quit: Computer has gone to sleep.]
robotmay has quit [Ping timeout: 244 seconds]
megha has quit [Client Quit]
nfk has joined #ruby
wreckimnaked has joined #ruby
browndawg has joined #ruby
Vert has quit [Ping timeout: 252 seconds]
johngalt2600 has quit [Quit: Ctrl-C at console.]
icole has quit [Remote host closed the connection]
Vert has joined #ruby
megha has joined #ruby
emocakes has joined #ruby
Hanmac has joined #ruby
k610 has joined #ruby
megha has quit [Client Quit]
TomyLobo has joined #ruby
samuel02 has joined #ruby
xpen has joined #ruby
johngalt2600 has joined #ruby
emergion has quit [Quit: Computer has gone to sleep.]
browndawg has quit [Ping timeout: 256 seconds]
techlife has quit [Ping timeout: 272 seconds]
Elhu has joined #ruby
Dom_ has quit [Remote host closed the connection]
Dom_ has joined #ruby
Dom_ has quit [Read error: Connection reset by peer]
Dom_ has joined #ruby
katzekintosh has joined #ruby
snearch has joined #ruby
jonahR has quit [Quit: jonahR]
marr has joined #ruby
techlife has joined #ruby
techlife has quit [Max SendQ exceeded]
browndawg has joined #ruby
nomenkun has quit [Remote host closed the connection]
techlife has joined #ruby
techlife has quit [Max SendQ exceeded]
snearch has quit [Read error: Connection reset by peer]
elico has quit [Ping timeout: 252 seconds]
buibex has joined #ruby
D4T has joined #ruby
AsgardBSD_ has joined #ruby
techlife has joined #ruby
techlife has quit [Max SendQ exceeded]
workmad3 has joined #ruby
tommyvyo has joined #ruby
techlife has joined #ruby
Vert has quit [Ping timeout: 252 seconds]
beiter has joined #ruby
buscon has joined #ruby
xpen_ has joined #ruby
Vert has joined #ruby
nomenkun has joined #ruby
asgardBSD has quit [Ping timeout: 276 seconds]
osaut has quit [Quit: osaut]
jonathanwallace has joined #ruby
ChampS666 has joined #ruby
xpen has quit [Ping timeout: 260 seconds]
marr has quit [Ping timeout: 256 seconds]
apeiros_ has joined #ruby
osaut has joined #ruby
Dom_ has quit [Remote host closed the connection]
Dom_ has joined #ruby
Proshot has quit [Quit: Leaving]
buscon has quit [Remote host closed the connection]
Xeago has joined #ruby
haxrbyte has joined #ruby
poikon has joined #ruby
main has joined #ruby
marr has joined #ruby
Dom_ has quit [Ping timeout: 240 seconds]
icole has joined #ruby
jonathanwallace has quit [Ping timeout: 245 seconds]
browndawg1 has joined #ruby
ananthakumaran1 has joined #ruby
browndawg has quit [Ping timeout: 240 seconds]
ananthakumaran has quit [Ping timeout: 252 seconds]
dhruvasagar has quit [Ping timeout: 252 seconds]
nomenkun has quit [Read error: Connection reset by peer]
nomenkun has joined #ruby
sayan has joined #ruby
sayan has quit [Changing host]
sayan has joined #ruby
dhruvasagar has joined #ruby
RagingDave has joined #ruby
blacktulip has quit [Remote host closed the connection]
jtsuero has joined #ruby
<jtsuero> what is going on people
mrap has joined #ruby
jtsuero is now known as ghostWhisperer
blacktulip has joined #ruby
mneorr has joined #ruby
ghostWhisperer is now known as rico_
tatsuya_o has joined #ruby
jgrevich has quit [Quit: jgrevich]
icole has quit [Ping timeout: 255 seconds]
noxoc has joined #ruby
<rico_>
chimkan_ has joined #ruby
aaronmcadam has joined #ruby
rico_ has left #ruby [#ruby]
samphippen has joined #ruby
chimkan has quit [Ping timeout: 244 seconds]
chimkan_ is now known as chimkan
mneorr has quit [Ping timeout: 255 seconds]
erry has joined #ruby
fumduq has joined #ruby
shock_one has quit [Remote host closed the connection]
clooth has joined #ruby
RailWolf has quit [Ping timeout: 272 seconds]
RailWolf has joined #ruby
mrap has left #ruby ["Textual IRC Client: www.textualapp.com"]
mrap has joined #ruby
rico_suave has joined #ruby
chimkan_ has joined #ruby
rico_suave has left #ruby [#ruby]
cdt has joined #ruby
rico_suave has joined #ruby
<rico_suave> ello?
mrap has left #ruby ["Textual IRC Client: www.textualapp.com"]
mrap has joined #ruby
<marienz> mrap: ok, now say something
<mrap> Hello!
<rico_suave> oh legit!
<mrap> marienz: did I finally figure it out?
<marienz> mrap: you've been here all along, as far as I can tell
timonv has joined #ruby
<mrap> Oh. Activity has just been shabby then… :(
chimkan has quit [Ping timeout: 252 seconds]
chimkan_ is now known as chimkan
<mrap> I couldn't figure out what the mode "+Ccnt" meant
rico_suave is now known as awesome_one
awesome_one is now known as awesome_ONE
awesome_ONE is now known as awesome_one
Dom_ has joined #ruby
rdark has joined #ruby
deed02392 has joined #ruby
<deed02392> how do I check that an entered path (as string) is a potentially valid path on the current OS?
rizzy has quit [Remote host closed the connection]
aeontech has quit [Quit: aeontech]
slainer68 has joined #ruby
Dom_ has quit [Remote host closed the connection]
daniel_- has joined #ruby
nari has quit [Ping timeout: 245 seconds]
jbw has joined #ruby
ananthakumaran has joined #ruby
ephemerian has joined #ruby
elaptics`away is now known as elaptics
<apeiros_> deed02392: define "valid"
<apeiros_> File.exist?(path) will test whether the given path resolves an actual file
Dom_ has joined #ruby
awesome_one has left #ruby [#ruby]
jonathanwallace has joined #ruby
ananthakumaran1 has quit [Ping timeout: 260 seconds]
Dom__ has joined #ruby
Dom_ has quit [Read error: Connection reset by peer]
<Hanmac> apeiros_ he means something like ? cant be as part of the pathname on windows
<deed02392> apeiros_, non-valid: (windows) "/usr/sbin/foo", valid: (nix) "/usr/sbin/foo", non-valid: "j89b6rbs'dfs]"
dhruvasagar has quit [Ping timeout: 252 seconds]
<deed02392> no, I don't care if the path resolves to a file, I just want to validate the string. basically I want to know if a given input string COULD BE a valid path on that system
D4T has quit [Quit: Textual IRC Client: www.textualapp.com]
mrap has quit [Quit: Textual IRC Client: www.textualapp.com]
dhruvasagar has joined #ruby
<Hanmac> deed02392 the last one is valid for me ...
TomyLobo has quit [Quit: Standby mode...]
Kn|t3 has quit [Quit: Kn|t3]
dcwu has quit [Quit: Leaving.]
sepp2k has joined #ruby
jonathanwallace has quit [Ping timeout: 252 seconds]
reinaldob has joined #ruby
cba has quit [Quit: Leaving]
<deed02392> yeah Hanmac, you get the gist though
ananthakumaran has quit [Ping timeout: 252 seconds]
<deed02392> also, it's she, thank you
jackyalcine_ has joined #ruby
jackyalcine_ has quit [Changing host]
jackyalcine_ has joined #ruby
answer_42 has joined #ruby
afd__ has joined #ruby
emergion has joined #ruby
dhruvasagar has quit [Ping timeout: 276 seconds]
chimkan_ has joined #ruby
dhruvasagar has joined #ruby
jaequery has quit [Quit: Computer has gone to sleep.]
Paradox is now known as EnglishMuffins
chimkan has quit [Ping timeout: 252 seconds]
chimkan_ is now known as chimkan
EnglishMuffins is now known as Paradox
<Hanmac> deed02392 and how should i know that? :P PS: it is very difficult to check if something is a path ... //xyz.local/abc is an valid path too
ncopa has joined #ruby
<ncopa> hi rmagick fails to build against new imagemagick
<ncopa> i think the problem is that it does not use pkg-config linker flags
<Paradox> cool
clocKwize has quit [Quit: clocKwize]
<ncopa> as a distromaintainer it is a pain that i cannot patch the .gem file...
vlad_starkov has quit [Read error: Connection reset by peer]
vlad_starkov has joined #ruby
<Hanmac> ncopa oO it does not use pkg-config oO ? imo that is a bug that should be fixed!
<ncopa> i havent checked but thats the feeling i got
<Hanmac> ncopa are the libmagick*-dev packages installed?
<ncopa> ofcourse
<ncopa> i'm the package maintainer for both
<ncopa> and i just upgraded image magick
<ncopa> i noticed that the filenames of the .so files changed
<ncopa> the .pc file looks correct
<Hanmac> :P nice, can you pastie the mkmf.log ?
<ncopa> but rmagick failed
<ncopa> where i find it?
<Hanmac> hm there should be an mkmf.log in the dirs methoded in the dpastie (i mean the dirs below)
Kn|t3 has joined #ruby
<ncopa> foudn it
robotmay has joined #ruby
m8 has quit [Quit: Sto andando via]
<ncopa> have_library: checking for InitializeMagick() in -lMagickCore...
<ncopa> it should not -lMagickCore
buscon has joined #ruby
main has quit [Ping timeout: 256 seconds]
Kn|t3 has quit [Client Quit]
<ncopa> $ pkg-config --libs ImageMagick
<ncopa> -lm -lMagickCore-Q16
ananthakumaran has joined #ruby
samphippen has quit [Quit: Computer has gone to sleep.]
blaxter has quit [Quit: foo]
<Hanmac> hm yeah (Rmagick looks to outdated ...)
<Hanmac> ... but something confuses me ... in your build log it shows TWO archs ... i386 & i486 ... i dont now if that could be a problem?
<ncopa> its not this problem at least
<ncopa> i think my CHOST is i386
clocKwize has joined #ruby
<ncopa> no i 486
main has joined #ruby
<ncopa> but i think ruby was patched to i386
<ncopa> or similar
<ncopa> should not patter
<ncopa> matter*
<Hanmac> hm someday i should crosscompile too ...
<ncopa> this is not cross
icole has joined #ruby
martinklepsch has joined #ruby
aaronmacy has quit [Quit: Leaving.]
<ncopa> looks like it uses Magick-config
<ncopa> $ Magick-config --libs
<ncopa> -lm -lMagickCore-Q16
sayan has quit [Ping timeout: 256 seconds]
<ncopa> nope...
mrdtt has quit [Remote host closed the connection]
Ralt has joined #ruby
dekroning has joined #ruby
<Hanmac> it uses Magick-config only for the version, not for the libs ... :/ ... its a bit badly programmed ...
mrdtt has joined #ruby
daniel_- has quit [Ping timeout: 255 seconds]
arya has quit [Ping timeout: 248 seconds]
main has quit [Max SendQ exceeded]
<ncopa> line 167
<ncopa> $LOCAL_LIBS = ENV["LIBS"].to_s + " " + `Magick-config --libs`.chomp
yacks has quit [Ping timeout: 245 seconds]
m8 has joined #ruby
jonathanwallace has joined #ruby
<ncopa> i dunno why it does not work
m8 has quit [Read error: Connection reset by peer]
ddd has quit [Ping timeout: 245 seconds]
<ncopa> but it seems like its reported already
havenn has quit [Remote host closed the connection]
yshh has quit [Remote host closed the connection]
<ncopa> and it is fixed in git
vlad_sta_ has joined #ruby
berserkr has joined #ruby
vlad_starkov has quit [Ping timeout: 244 seconds]
angusiguess has quit [Ping timeout: 245 seconds]
nkts has joined #ruby
m8 has joined #ruby
<ncopa> thanks!
<Hanmac> it is not against you, but i prefer my gems installed with gem and not with apt :P ...
<ncopa> i know some ppl do
Mon_Ouie has joined #ruby
<ncopa> unfortunally, some people have hard enough to learn one package manager
<ncopa> and learning another (gem) is out of question
megha has joined #ruby
<Hanmac> my current gems i working on are cool, but mosly depend on beta versions of libs wich are not packaged yet ...
tatsuya__ has joined #ruby
chimkan_ has joined #ruby
<ncopa> i would preferred that ppl just used the gems and dont bother repacking things
<ncopa> unfortunally i have to repack things to the distro package manager :-/
megha has quit [Read error: Connection reset by peer]
<Hanmac> for what distro are you the package manager?
<ncopa> alpine linux
yacks has joined #ruby
chimkan has quit [Ping timeout: 276 seconds]
chimkan_ is now known as chimkan
punkrawkR has quit [Read error: Connection reset by peer]
jonathanwallace has quit [Ping timeout: 256 seconds]
tatsuya_o has quit [Ping timeout: 252 seconds]
megha has joined #ruby
<Hanmac> hm uClibc ... i dont know if i like that ... my gems currently all wants an C++ compiler
<ncopa> we have c++
<ncopa> in fact our bug tracker is redmine
<ncopa> runs on alpine linux
fyolnish has quit [Remote host closed the connection]
<Hanmac> hm ok, then i may ping you when my gems are ready :P
<ncopa> sure :)
<Hanmac> i currently build on a nice one for libarchive
<ncopa> i'm personally not really a fan of ruby
<ncopa> i find it big and slow
<ncopa> but sure, i understand why ppl like it
<ncopa> nice OOP, ideas from smalltalk etc
nkr has joined #ruby
chimkan_ has joined #ruby
chimkan has quit [Ping timeout: 260 seconds]
<Hanmac> about the slowness it can composted when using C(++) libs in the background ... (like Rmagick do) ... i have an possible gem that bindes an entire 3d engine into ruby :D
chimkan_ is now known as chimkan
cha1tanya has quit [Quit: Leaving]
<ncopa> yes, use C libs for the stuff tha needs speed si the correct way to do it
<ncopa> and use ruby (or any other high level lang) to glue it together
sbear has quit [Ping timeout: 245 seconds]
yacks has quit [Ping timeout: 255 seconds]
haxrbyte_ has joined #ruby
asgardBSD has joined #ruby
AsgardBSD_ has quit [Ping timeout: 260 seconds]
haxrbyte has quit [Ping timeout: 276 seconds]
zigomir has quit [Quit: zigomir]
GoldenCider has quit [Quit: GoldenCider]
ananthakumaran has quit [Ping timeout: 252 seconds]
ananthakumaran has joined #ruby
dhruvasa1ar has joined #ruby
pyro111 has joined #ruby
buibex has quit [Remote host closed the connection]
dhruvasagar has quit [Ping timeout: 252 seconds]
icole has quit [Remote host closed the connection]
RagingDave has quit [Quit: Ex-Chat]
hamed_r has quit [Remote host closed the connection]
Kn|t3 has joined #ruby
stayarrr has quit [Quit: Leaving...]
yacks has joined #ruby
Takehiro has quit [Remote host closed the connection]
browndawg1 has quit [Quit: Leaving.]
megha has quit [Quit: WeeChat 0.4.0]
jonathanwallace has joined #ruby
megha has joined #ruby
Takehiro has joined #ruby
Kn|t3 has quit [Quit: Kn|t3]
timmow has joined #ruby
chimkan has quit [Ping timeout: 240 seconds]
wudofyr_ has quit [Remote host closed the connection]
wudofyr_ has joined #ruby
beliveyourdream has joined #ruby
ephemerian has quit [Ping timeout: 255 seconds]
jonathanwallace has quit [Ping timeout: 252 seconds]
cascalheira has joined #ruby
banister_ has quit [Remote host closed the connection]
mengu has joined #ruby
Takehiro has quit [Remote host closed the connection]
dhruvasa1ar has quit [Ping timeout: 276 seconds]
dhruvasagar has joined #ruby
wudofyr_ has quit [Remote host closed the connection]
wudofyr_ has joined #ruby
altamic has joined #ruby
megha has quit [Quit: WeeChat 0.4.0]
a_a_g has quit [Read error: Connection reset by peer]
a_a_g has joined #ruby
fermion has joined #ruby
Pandaen has joined #ruby
buibex has joined #ruby
nwertman has joined #ruby
gyre007 has joined #ruby
angusiguess has joined #ruby
chimkan has joined #ruby
jrajav has quit [Quit: phunq, sandwich store loop, WHAT NO UNIVERSE]
angusiguess has quit [Ping timeout: 256 seconds]
nwertman has quit [Ping timeout: 276 seconds]
banister`sleep has joined #ruby
buibex has quit [Ping timeout: 276 seconds]
Pandaen has quit [Ping timeout: 260 seconds]
BulleTime has joined #ruby
robert___ has joined #ruby
mmercer has quit [Ping timeout: 260 seconds]
horofox has joined #ruby
jonathanwallace has joined #ruby
buibex has joined #ruby
robert__ has quit [Ping timeout: 252 seconds]
krz has quit [Quit: krz]
yshh has joined #ruby
postmodern has quit [Quit: Leaving]
mmercer has joined #ruby
robert___ has quit [Ping timeout: 255 seconds]
sleetdrop has quit [Ping timeout: 276 seconds]
ChampS666 has quit [Ping timeout: 246 seconds]
yshh has quit [Ping timeout: 260 seconds]
wudofyr_ has quit [Remote host closed the connection]
Takehiro has joined #ruby
krz has joined #ruby
rippa has joined #ruby
jonathanwallace has quit [Ping timeout: 252 seconds]
vlad_sta_ has quit [Remote host closed the connection]
sayan has joined #ruby
sayan has quit [Changing host]
sayan has joined #ruby
wudofyr_ has joined #ruby
greenarrow has quit [Quit: IRC is just multiplayer notepad]
robert_ has joined #ruby
greenarrow has joined #ruby
wreckimnaked has quit [Ping timeout: 252 seconds]
TheFuzzball has joined #ruby
chussenot has quit [Quit: chussenot]
mrdtt_ has joined #ruby
Takehiro has quit [Ping timeout: 255 seconds]
mrdtt has quit [Ping timeout: 260 seconds]
mrdtt_ is now known as mrdtt
megha has joined #ruby
kylescottmcgill has quit [Quit: WeeChat 0.3.8]
krisfremen has quit [Remote host closed the connection]
kstephens has quit [Read error: Connection reset by peer]
krisfremen has joined #ruby
krisfremen has quit [Changing host]
krisfremen has joined #ruby
lunarjar has joined #ruby
kstephens has joined #ruby
samphippen has joined #ruby
razibog has joined #ruby
razibog1 has joined #ruby
banister`sleep has quit [Ping timeout: 260 seconds]
razibog1 has quit [Client Quit]
nari has joined #ruby
grzywacz has joined #ruby
horofox has quit [Quit: horofox]
wiboon has joined #ruby
xpen_ has quit [Remote host closed the connection]
pcarrier has quit []
imami|afk is now known as banseljaj
nwertman has joined #ruby
rippa has quit [Ping timeout: 240 seconds]
<shevy> hmmm
<shevy> is ruby more complex than perl?
<tobiasvl> shevy: i don't think so, but YMMV
ChampS666 has joined #ruby
<tobiasvl> ruby has a lot of syntactic sugar
<shevy> ncopa but scripting languages are always slow
icole has joined #ruby
<shevy> tobiasvl yeah I am wondering in general
<shevy> I am reading documentation about IO
Kudos has joined #ruby
Kudos has quit [Changing host]
Kudos has joined #ruby
<shevy> and today I saw .binread which is cool
<shevy> but I wonder... how many new things will there be in ruby? I learn new stuff daily
<hoelzro> Lua isn't slow ;)
<hoelzro> (for some value of slow)
<hoelzro> but I agree with ncopa's strategy
<tobiasvl> shevy: well, probably a lot? ruby and perl aren't that similar, although ruby has a perl-like syntax and is inspired by perl
wiboon has quit [Remote host closed the connection]
<hoelzro> use the scripting language for main logic, and drop to C when you need speed or lower level stuff
butblack has joined #ruby
butblack has quit [Client Quit]
chussenot has joined #ruby
<tobiasvl> shevy: i think ruby is easier to learn than perl. perl has a lot of idioms and special stuff
D4T has joined #ruby
<tobiasvl> @_ …
<Hanmac> hoelzo: i think there are too possibile ways: build the game in C(++) and use ruby as internal scripting language, or build the game in ruby and use the engine functions with a binding ... i think both ways has some cool facts
yshh has joined #ruby
<hoelzro> I find Ruby and Perl to be quite similar, at least philosophically
<tobiasvl> hoelzro: oh, sure. philosophically they're very similar
<hoelzro> Hanmac: yeah, it's the embedding vs extending distinction
<Hanmac> what do you prefer?
dekroning has quit [Ping timeout: 255 seconds]
<hoelzro> ntm that Ruby has a *lot* of stuff from Perl
<hoelzro> Hanmac: I tried embedding once; it worked ok
zigomir has joined #ruby
<hoelzro> when I do stuff with Lua, I tend to just build extensions instead of adding to an embedded interpeter
<hoelzro> makes the extensions easier to test individually
<hoelzro> but embedding makes sense in a lot of scenarios
icole has quit [Ping timeout: 260 seconds]
osaut has quit [Quit: osaut]
pavilionXP has joined #ruby
jonathanwallace has joined #ruby
r0bby has joined #ruby
robbyoconnor has quit [Ping timeout: 255 seconds]
[eDu] has joined #ruby
security has joined #ruby
megha has quit [Ping timeout: 240 seconds]
sepp2k has quit [Remote host closed the connection]
RurouniJones has joined #ruby
nari has quit [Ping timeout: 245 seconds]
buibex has quit [Remote host closed the connection]
r0bby has quit [Ping timeout: 246 seconds]
buibex has joined #ruby
wf2f has quit []
mrdtt_ has joined #ruby
mrdtt_ has quit [Read error: Connection reset by peer]
renanoronfle has joined #ruby
jonathanwallace has quit [Ping timeout: 252 seconds]
angusiguess has joined #ruby
mrdtt_ has joined #ruby
mrdtt has quit [Ping timeout: 246 seconds]
mrdtt_ is now known as mrdtt
filipe has quit [Ping timeout: 244 seconds]
freeayu has quit [Ping timeout: 256 seconds]
yacks has quit [Remote host closed the connection]
Takehiro has joined #ruby
Guest70986 has joined #ruby
danshultz has joined #ruby
elico has joined #ruby
elico has quit [Remote host closed the connection]
Guest70986 has left #ruby [#ruby]
RurouniJones has quit [Remote host closed the connection]
larissa has joined #ruby
beiter has quit [Quit: beiter]
beiter has joined #ruby
zigomir has quit [Quit: zigomir]
JohnBat26 has joined #ruby
RurouniJones has joined #ruby
krz has quit [Quit: krz]
RurouniJones has quit [Client Quit]
elico has joined #ruby
RurouniJones has joined #ruby
nkts has quit [Remote host closed the connection]
alup has quit [Ping timeout: 248 seconds]
dr_bob has quit [Quit: Leaving.]
filipe has joined #ruby
punkrawkR has joined #ruby
daniel_- has joined #ruby
<JonnieCache> javascript has no integers
<JonnieCache> JAVASCRIPT HAS NO INTEGERS.
<JonnieCache> what were they thinkng?
* apeiros_ senses a moment of bliss
<JonnieCache> it has no integers but it allows you to do bitwise operations on floats just for fun
HAKEON has joined #ruby
<apeiros_> ah, not bliss, enlightenment, I guess?
<JonnieCache> no just rage
<shevy> apeiros_ a moment of sex!
<JonnieCache> perhaps dismay
<shevy> JonnieCache or HATE
sleetdrop has joined #ruby
sambio has joined #ruby
baphled has joined #ruby
dekroning has joined #ruby
<apeiros_> JonnieCache: also no proper binary
<apeiros_> all string data is unicode
<JonnieCache> it has ways of dealing with bytes though im sure
chendo_ has joined #ruby
<apeiros_> yeah, all quirky beyond reason
<JonnieCache> you can definitely generate raw binary streams, people use it a lot in the html5 audio apis
<apeiros_> you can treat floats as integers too if you're careful
<apeiros_> and know the implementation details
<JonnieCache> its an interpreted, untyped language
<JonnieCache> if i have to be careful of implementation details, whats the point?
<JonnieCache> *weakly typed, whatever
rohrer has joined #ruby
<apeiros_> it was in reference to "it has a way to deal with binary"
griffindy has joined #ruby
<JonnieCache> ah right
<apeiros_> I completely agree with you (I think). I find it horrible that it has no proper integers
ephemerian has joined #ruby
allaire has joined #ruby
<allaire> Is there anything like using namespace foo (C++) or using Foo; (C#) in Ruby ?
[Neurotic] has quit [Ping timeout: 244 seconds]
mrdtt has quit [Quit: mrdtt]
yacks has joined #ruby
gregorg has joined #ruby
gregorg has quit [Changing host]
gregorg has joined #ruby
<tobiasvl> allaire: modules
<allaire> I was more talking about the method 'using' and 'using namespace'
<allaire> not the container itself
<tobiasvl> i don't really know C++ that well but
m8 has quit [Quit: Sto andando via]
<tobiasvl> >> module foo; bar = 1; end; print foo::bar
<eval-in> tobiasvl: Output: "/tmp/execpad-06209236de8b/source-06209236de8b:1: class/module name must be CONSTANT\nmodule foo; bar = 1; end; print foo::bar\n ^\n" (http://eval.in/7834)
<tobiasvl> oh lol sorry
<tobiasvl> well, you get the point.
ddd has joined #ruby
osaut has joined #ruby
<allaire> I was told include was not the right thing to avoid having to type the module each time
jonathanwallace has joined #ruby
<allaire> like 'using' in c# for exemple
baphled has quit [Ping timeout: 252 seconds]
moos3 has joined #ruby
<apeiros_> o0
<apeiros_> include is exactly the thing
<apeiros_> include Math; sin(0) # => 0.0
<apeiros_> so if somebody told you it was not, he better gave a good reason why it isn't.
<allaire> how 'include' works under the hood?
<allaire> does it literally includes all the methods where its called?
<allaire> or it's just a lookup if it can't find something in his current namespace
<apeiros_> an included module becomes part of the ancestry
<apeiros_> Array.ancestors.include?(Enumerable) # => true
<apeiros_> (Enumerable is a module)
banister`sleep has joined #ruby
<apeiros_> how it precisely works - check the C source.
<allaire> ok, then it was probably a logical issue why I was told it wasn't the good way to do it
security is now known as megha
<apeiros_> it may have been a "In this situation, that's not the proper solution"
<allaire> all my models are in a separated gem, fully namespaced by its name, and it gets old to always type it, but 'include models' in controllers is probably non-sense
<apeiros_> patterns don't always translate well between languages
<allaire> by its name (I mean gem name)
<JonnieCache> whats the proper name for the exponent of a number when you express it in scientific notation?
<Hanmac> allaire: including Modules into other modules or classes is good, including them into the main object/ into global space may be not so good
<allaire> Hanmac: how so?
nanothief has quit [Ping timeout: 255 seconds]
<allaire> any specific reason?
<allaire> I'm only being curious here, not challenging :)
<apeiros_> JonnieCache: still exponent? :)
<JonnieCache> yeah you know what i mean
<allaire> and if I'm tired of typing my models namespace in my gem, would it makes sense of not namespacing them, since the gem is for my personal use anyway?
<JonnieCache> "order of magnitude" is the best i can do but its not right
<apeiros_> significant and mantiassa?
<apeiros_> *significand
jonathanwallace has quit [Ping timeout: 252 seconds]
<apeiros_> ah no, that's the other side
<Hanmac> allaire: maybe i have A::Mod and B::Mod ... when A and B are modules (in there function as namespace) when you include both A & B into global space (like using main) you get an Mod object with is the combined of both A::Mod and B::Mod, with some overwritten and some non-functional functions
lunarjar has quit [Ping timeout: 276 seconds]
<apeiros_> Hanmac: not correct
<allaire> that could happens in normal namespace too
<apeiros_> ah well, partially correct, but it's a misleading description
angusiguess has quit [Ping timeout: 252 seconds]
<allaire> include B in A, no?
<allaire> and both have Mod method
alup has joined #ruby
vlad_starkov has joined #ruby
<apeiros_> with including, order defines what comes first. but indeed, if you have A#some_method which invokes A#other_method, and you have B#other_method, and you include A, then B, A#some_method will invoke B#other_method
<JonnieCache> apeiros_: im trying to abbreviate numbers, so 6000000 becomes 6M
angusiguess has joined #ruby
<apeiros_> the M is a factor
<JonnieCache> apeiros_: and im trying to google for elgenat techniques for doing that without writing a massive case statement, and failing because i lack the terms
<apeiros_> JonnieCache: you'd determine the factor by using log10
<JonnieCache> (i realise it can be done with simple division but i want to see if theres other ideas i can use)
HAKEON has quit [Quit: Colloquy for iPhone - http://colloquy.mobi]
<apeiros_> alternatively you use .round.to_s.size
butblack has joined #ruby
butblack has quit [Client Quit]
<JonnieCache> haha now thats an idea
rjmt___ has joined #ruby
<allaire> apeiros_: So include is not a direct translation to unsing namespace or anything, it's a module thing for mix ins, not to save on typing the namespace, even if it could work that way
codingjester has quit [Quit: WeeChat 0.3.9.2]
<JonnieCache> apeiros_: thanks those are just the kind of thing i was looking for
vlad_starkov has quit [Ping timeout: 256 seconds]
nkr has quit [Read error: Connection reset by peer]
hybris has joined #ruby
<apeiros_> JonnieCache: if you have e.g. {3 => "K", 6 => "M", 9 => "G", …}, you'd do (Math.log10(num)/3).floor*3
<workmad3> allaire: correct
buscon has quit [Read error: Connection timed out]
buscon_ has joined #ruby
<JonnieCache> apeiros_: why 3
<apeiros_> 1000 = 1K --> 3 zeros
<JonnieCache> oh yes of course
hamed_r has joined #ruby
<apeiros_> you can do the mapping whatever way you like, of course ;-)
<apeiros_> the fun thing is, it works for 0.001 etc. too
nkr has joined #ruby
<apeiros_> it'll be -3, -6 etc.
<apeiros_> (for milli, micro etc.)
<allaire> workmad3: So that's why I was told that including models in controllers is non-sense, since the two modules should not share any method/codebase.
<workmad3> allaire: not just that, but also you include modules, not classes
<allaire> workmad3 i was including a module in my class
<workmad3> allaire: basically, inclued != import (in the python or the java sense)
<workmad3> *include
<allaire> I was including the namespace of my gem, basically
yacks has quit [Ping timeout: 255 seconds]
answer_42 has quit [Ping timeout: 276 seconds]
<allaire> well the surrounding module of my gem
<allaire> workmad3: but Models are the only thing in my gem that it gets old of typing the full thing each time. Could I just remove my models from the gem namespace? Since the gem is for my own project, not sharing or anything
<workmad3> allaire: why are you shoving the models into a gem if you're not sharing them between projects?
cha1tanya has joined #ruby
cha1tanya has quit [Changing host]
cha1tanya has joined #ruby
shock_one has joined #ruby
clooth has quit [Read error: Connection reset by peer]
griffindy has quit [Quit: Computer has gone to sleep.]
clooth has joined #ruby
danshultz has quit [Remote host closed the connection]
baphled has joined #ruby
<JonnieCache> he's building a monument to computer science
<JonnieCache> we all have to do that occasionally
<Spaceghost|cloud> workmad3: Because rails is not your application.
<workmad3> Spaceghost|cloud: that doesn't rationalise pulling models into a gem
enroxorz-work has joined #ruby
<Spaceghost|cloud> workmad3: Not really. :D
<allaire> workmad3: I am
mjolk has joined #ruby
yacks has joined #ruby
<allaire> Spaceghost|cloud: I slept on it and keep thinking but it :p
chimkan_ has joined #ruby
<allaire> I'm freak like that
answer_42 has joined #ruby
<Spaceghost|cloud> Personally, removing a namespace to import stuff into your app is a bit silly. Unless that namespace has a use in some aspect or use, don't use it.
<workmad3> I'd just use the namespace myself :)
<Spaceghost|cloud> Rails, by default on most models, just puts them in the global namespace.
<Spaceghost|cloud> workmad3: Me too.
<allaire> thats what I'll do then
<allaire> I suppose I can do shortcut = Basement::Models ?
rmartin has joined #ruby
<allaire> and do shortcut::Contact
<Spaceghost|cloud> That's what you said you were doing before you went to sleep.
<allaire> ?
<JonnieCache> personally if youre doing the project for yourself then i think you should try namespacing everything just to see what happens
<Spaceghost|cloud> try and learn.
<JonnieCache> ^^
<allaire> Spaceghost|cloud: yeah but I thought about using namespace std and 'using' in c#
<allaire> and i was like, there must be something similar
<workmad3> allaire: nope :)
<allaire> but thats cool
<allaire> anyway, gotta run to Uni
<allaire> have a nice day guys
<allaire> thanks again
<workmad3> allaire: because in ruby there aren't really namespaces... just constants holding modules that can hold other constants :)
<allaire> Roger :)
<allaire> ttyl
allaire has quit []
browndawg has joined #ruby
lunarjar has joined #ruby
beiter has quit [Ping timeout: 276 seconds]
chimkan has quit [Ping timeout: 260 seconds]
chimkan_ is now known as chimkan
<Spaceghost|cloud> Mmm constants.
lunarjar has quit [Max SendQ exceeded]
melnik has left #ruby ["WeeChat 0.4.0"]
dr_bob has joined #ruby
geekbri has joined #ruby
wreckimnaked has joined #ruby
lunarjar has joined #ruby
<workmad3> Spaceghost|cloud: lots and lots of tasty constants
<workmad3> Spaceghost|cloud: that can change :D
baphled has quit [Ping timeout: 244 seconds]
jackyalcine_ has quit [Read error: Connection reset by peer]
jackyalcine_ has joined #ruby
jackyalcine_ has quit [Changing host]
jackyalcine_ has joined #ruby
jonathanwallace has joined #ruby
jrajav has joined #ruby
Pandaen has joined #ruby
Guest__ has joined #ruby
Guest__ is now known as Guest123
beiter has joined #ruby
dhruvasagar has quit [Ping timeout: 252 seconds]
lunarjar has quit [Ping timeout: 260 seconds]
<whitequark> Spaceghost|cloud: you're welcome :)
jackyalcine_ has quit [Client Quit]
Jacky has joined #ruby
Jacky has quit [Changing host]
Jacky has joined #ruby
rjmt___ has quit [Remote host closed the connection]
banister`sleep has quit [Remote host closed the connection]
baphled has joined #ruby
rjmt___ has joined #ruby
`brendan has joined #ruby
freeayu has joined #ruby
<Hanmac> workmad3 you could also hide constants in the singleton class of objects :D
idkazuma has joined #ruby
buscon_ has quit [Read error: Connection timed out]
tommyvyo has quit [Quit: http://thomasvendetta.com]
buscon_ has joined #ruby
banister`sleep has joined #ruby
ner0x has joined #ruby
pcarrier has joined #ruby
<deed02392> hey Hanmac, did you advise me on a solution for this? i think you did but I've lost it in the scrollback!
zigomir has joined #ruby
megha has quit [Quit: WeeChat 0.4.0]
ffranz has joined #ruby
x0F has quit [Disconnected by services]
x0F_ has joined #ruby
x0F_ is now known as x0F
browndawg has quit [Quit: Leaving.]
lunarjar has joined #ruby
griffindy has joined #ruby
xemu has joined #ruby
jlussier has joined #ruby
beiter_ has joined #ruby
AsgardBSD_ has joined #ruby
gyre008 has joined #ruby
jon_wingfield has quit [Ping timeout: 276 seconds]
jlussier has quit [Client Quit]
beiter has quit [Ping timeout: 240 seconds]
beiter_ is now known as beiter
moos3 has quit [Ping timeout: 252 seconds]
asgardBSD has quit [Ping timeout: 245 seconds]
dekroning has quit [Ping timeout: 276 seconds]
shock_one has quit [Ping timeout: 252 seconds]
Kn|t3 has joined #ruby
cantonic has quit [Quit: cantonic]
invisime has joined #ruby
lunarjar has quit [Ping timeout: 252 seconds]
gyre007 has quit [Ping timeout: 260 seconds]
bigkevmcd has quit [Quit: outta here]
bigkevmcd has joined #ruby
dustint has joined #ruby
didge has quit [Quit: Textual IRC Client: www.textualapp.com]
angusiguess has quit [Ping timeout: 256 seconds]
kpshek has joined #ruby
rohrer has left #ruby [#ruby]
buscon_ is now known as buscon
joofsh has joined #ruby
zph has joined #ruby
sanukcm has joined #ruby
Kn|t3 has quit [Quit: Kn|t3]
freeayu has quit [Ping timeout: 255 seconds]
chimkan_ has joined #ruby
krawchyk has joined #ruby
krawchyk has quit [Remote host closed the connection]
<Hanmac> deed02392 i dont think so ... there is no nice way to check that, like there is no nice way to check if an email is valid
chimkan has quit [Ping timeout: 246 seconds]
<deed02392> i think you're right Hanmac. damn
chimkan_ is now known as chimkan
Jacky has quit [Quit: Quit]
theRoUS has joined #ruby
theRoUS has joined #ruby
joofsh has quit [Remote host closed the connection]
fourq has joined #ruby
haxrbyte_ has quit [Remote host closed the connection]
freeayu has joined #ruby
kwargs has joined #ruby
<kwargs> Why do I get this error "SyntaxError: unexpected '=', expecting ')'" on this code - "def a(*args, options = {})"?
didge has joined #ruby
baphled has quit [Ping timeout: 256 seconds]
<hoelzro> kwargs: what version of Ruby are you using?
<kwargs> 1.9.3
carloslopes has joined #ruby
<hoelzro> I'd bet you can't have an optional argument following a splat one
<hoelzro> because a(1, 2) would be ambiguous
s1n4 has joined #ruby
jjbohn has joined #ruby
<pyro111> i recently had this problem http://eval.in/7848
RurouniJones has quit [Remote host closed the connection]
<kwargs> Hmm, I want that to parse as args [1, 2], options = {}. Would I just have to use a splat and check if last is a Hash?
<hoelzro> yes
<kwargs> hoelzro: pyro111, ok thanks.
jetblack has left #ruby [#ruby]
dekroning has joined #ruby
jlast has joined #ruby
fixl has joined #ruby
kwargs has quit [Quit: Page closed]
jetblack has joined #ruby
jetblack has left #ruby [#ruby]
ovatsug25 has joined #ruby
girija_ has quit [Ping timeout: 252 seconds]
jetblack has joined #ruby
a_a_g has quit [Quit: Leaving.]
inokenty has joined #ruby
Skylab has joined #ruby
yshh has quit [Remote host closed the connection]
wreckimnaked has quit [Read error: No route to host]
wreckimn1 has joined #ruby
yshh has joined #ruby
jjbohn_ has joined #ruby
<Hanmac> you could also do: opts = args.pop if args.last.is_a?(Hash)
timmow has quit [Read error: Connection reset by peer]
<deed02392> do I have to use -%> to close tags?
timmow has joined #ruby
jgarvey has joined #ruby
moos3 has joined #ruby
<deed02392> it seems to be happy if I <%= foo %> but all the xamples I see close say if statements like <% if foo -%>
jonathanwallace has quit [Ping timeout: 252 seconds]
Pandaen has quit [Ping timeout: 246 seconds]
<Hanmac> deed have you tryed it without?
<deed02392> I'm writing a chef recipe
<banister`sleep> Hanmac: as many nights endure without a moon or star
<deed02392> soo it takes like 5 minutes to test anything
jjbohn has quit [Ping timeout: 260 seconds]
jjbohn_ has quit [Client Quit]
browndawg has joined #ruby
Dom__ has quit [Remote host closed the connection]
Dom_ has joined #ruby
andrewhl has joined #ruby
Dom_ has quit [Read error: Connection reset by peer]
Dom_ has joined #ruby
terrorpup has quit [Ping timeout: 255 seconds]
<Hanmac> banister, last night, the mood was so bright, that you could read a book, at midnight :P
Kn|t3 has joined #ruby
buscon has quit [Quit: Leaving]
zooz has joined #ruby
<zooz> hi people
angusiguess has joined #ruby
<zooz> I wonder why does Ubuntu not package gem as deb packages?
<apeiros_> zooz: isn't that rather an #ubuntu question?
<ericwood> I'd recommend not installing ruby by apt-get
<zooz> apeiros_, maybe it is
aquaranto has joined #ruby
<zooz> ericwood, why is that?
<apeiros_> apt tends to fuck up ruby
<zooz> apt tends to fuck up the whole experience in general
<apeiros_> glad to hear that it's not isolated to ruby
banister`sleep has quit [Ping timeout: 255 seconds]
jrist-afk is now known as jrist
Hanmac has quit [Ping timeout: 245 seconds]
buibex has quit [Remote host closed the connection]
<s1n4> how can I execute a shell command without displaying its output?
<Xeago> "A survey will be held to determine whether the search results are better with the new system." — Is that proper english?
Hanmac has joined #ruby
<zooz> Xeago, sounds good to me
<Hanmac> sorry did i miss something?
<Xeago> s1n4: you redirect it to /dev/null
<Xeago> command > /dev/null
<apeiros_> s1n4: or you use spawn or popen
zooz has left #ruby ["Leaving"]
<s1n4> Xeago: using `system`?
<Hanmac> in ruby you could use File::NULL
cha1tanya has quit [Quit: Leaving]
<hoelzro> or you could use spawn/system's :redirection option
devdazed has joined #ruby
<hoelzro> and set :out => :close
<Xeago> s1n4: I was talking about shell redirects
<s1n4> hmm
ananthakumaran has quit [Quit: Leaving.]
<Xeago> what hoelzro said should work
<s1n4> Xeago: but I'm talking about running shell commands in ruby :)
F1skr has joined #ruby
jerius has joined #ruby
charliesome has quit [Quit: Textual IRC Client: www.textualapp.com]
<s1n4> ,system "echo hi", out: :close
<s1n4> huh?
Kn|t3 has quit [Quit: Kn|t3]
<hoelzro> s1n4: not quite
<hoelzro> read the docs on Kernel#spawn for details
<s1n4> hoelzro: could you say an example please?
drago757 has joined #ruby
nkr has quit [Ping timeout: 256 seconds]
<ericwood> s1n4: the docs will be more useful
tommyvyo[cloud]_ has joined #ruby
jonathanwallace has joined #ruby
<hoelzro> s1n4: system( 'ls', :out => :close )
<ericwood> no love for backticks?
<shevy> lol Hanmac
nga4 has joined #ruby
Banistergalaxy has joined #ruby
baphled has joined #ruby
ncopa has left #ruby ["Leaving"]
<s1n4> hoelzro: thanks, thats what I said
<hoelzro> ericwood: backticks gather the output; we want to discard it
<s1n4> I got it, thanks guys
<ericwood> hoelzro: > /dev/null
<hoelzro> ericwood: /dev/null isn't portable
fixl has quit [Quit: KVIrc 4.3.1 Aria http://www.kvirc.net/]
<ericwood> ah okay I missed the earlier discussion
<hoelzro> also, if you're building the command, I'd rather not interpolate it
<hoelzro> s1n4: sure enough, it was actually me who misread the documentation =)
philcrissman has joined #ruby
<tobiasvl> exec ?
theRoUS has quit [Quit: Leaving]
buibex has joined #ruby
<shevy> Hanmac are you experienced with web frameworks
<Hanmac> no
<hoelzro> tobiasvl: I think that s1n4 wants his/her code to return
<hoelzro> but I could be wrong
<Hanmac> >> p File::NULL
<eval-in> Hanmac: Output: "\"/dev/null\"\n" (http://eval.in/7851)
adkron has joined #ruby
adkron_ has joined #ruby
<Hanmac> hoelzro File::NULL is portable if you are interested :P (it should)
philcrissman has quit [Remote host closed the connection]
<tobiasvl> i don't exactly understand what s1n4 wants, so
<shevy> cool
<tobiasvl> i thought you wanted to discard it
<shevy> never saw File::NULL before
<hoelzro> Hanmac: that's true, but I personally prefer system([command, arguments...])
Bounga has joined #ruby
browndawg has quit [Quit: Leaving.]
Bounga has quit [Client Quit]
<hoelzro> although :out => File::NULL would also do the trick =)
Bounga has joined #ruby
angusiguess has quit [Ping timeout: 256 seconds]
<hoelzro> tobiasvl: discard the output, but probably continue the process
emergion has quit [Quit: Computer has gone to sleep.]
<Xeago> "A survey was held to determine whether the search results are better with the new system. VideofyMe's system administrator was questioned for a decrease in database strain." Are both sentences okay?
<tobiasvl> Xeago: "questioned for" -> "questioned about"?
<s1n4> I just wanted to run a shell command, but I don't like command's output to be displayed, thats it
<tobiasvl> s1n4: well, you don't need to actually DO anything with the returned string, do you?
<tobiasvl> i don't get it...
buibex has quit [Client Quit]
ephialtes480 has quit [Quit: Leaving...]
emergion has joined #ruby
<tobiasvl> what do you mean by "displayed"
<Xeago> tobiasvl: what is the difference, or was I just wrong?
jbw has quit [Quit: ┌∩┐(◣_◢)┌∩┐]
<tobiasvl> Xeago: "questioned for" sounds wrong to me. was he questioned ABOUT an actual decrease, or did someone REQUEST a decrease?
<s1n4> tobiasvl: e.g "cmd > /dev/null"
jbw has joined #ruby
<s1n4> it's not that so hard to understand :)
<tobiasvl> s1n4: but… a method in ruby doesn't automatically print its results, you know
<Xeago> there was also a request for decrease, but he is questioned whether there was a decrease
baphled has quit [Ping timeout: 240 seconds]
<s1n4> tobiasvl: but it does, try it out
d2dchat has joined #ruby
rippa has joined #ruby
tjbiddle has joined #ruby
<tobiasvl> s1n4: try what out? what's your code?
ephialtes480 has joined #ruby
matthewrobbins has joined #ruby
<s1n4> tobiasvl: anything, `ls` or system('ls')
matthewrobbins has left #ruby [#ruby]
BizarreCake has joined #ruby
<tobiasvl> system does print it
<tobiasvl> but backticks don't
<s1n4> tobiasvl: nevermind, hoelzro said how I can do it
<tobiasvl> neither does %x()
<hoelzro> backticks also return a value
<hoelzro> as does %x()
<tobiasvl> yep
<tobiasvl> but they don't print it
hamed_r has quit [Quit: Leaving]
<hoelzro> right, but why have Ruby create a value when you don't need one?
Spooner_ has joined #ruby
<tobiasvl> because <s1n4> I just wanted to run a shell command, but I don't like command's output to be displayed, thats it
mark_locklear has joined #ruby
<shevy> Xeago keep written english simple and to the point
<shevy> Xeago usually if you must show that you are a smart guy, you can do so by using clever words noone knows about
h4mz1d has joined #ruby
jtharris has joined #ruby
bean has joined #ruby
chimkan_ has joined #ruby
<shevy> like "accede" or "allay" or "gratuitous" or "gregarious"
banister`sleep has joined #ruby
<shevy> or do it like Hanmac and simply invent new words :D
<Xeago> shevy: I am already trying to keep it simple
freeayu has quit [Remote host closed the connection]
banister`sleep is now known as banisterfiend
jonahR has joined #ruby
puppeh has joined #ruby
<Xeago> but I am unsure about the apostrophe, 'question about' and the general tone of the sentence
Dom_ has quit [Remote host closed the connection]
shock_one has joined #ruby
<shevy> well, you want to convey some kind of message
chimkan has quit [Ping timeout: 260 seconds]
Uranio has joined #ruby
chimkan_ is now known as chimkan
Mon_Ouie has quit [Ping timeout: 260 seconds]
<shevy> there is a really cool book... written in like 1936 http://en.wikipedia.org/wiki/How_to_Win_Friends_and_Influence_People
banister_ has joined #ruby
tomzx_mac has joined #ruby
<shevy> the best examples are the letters from Abraham Lincoln
jpfuentes2 has joined #ruby
<s1n4> is there anything like less (the less/more software) in ruby?
<shevy> Xeago, look at http://www.angelfire.com/my/abrahamlincoln/Letters.html especially the letter to Mrs. Bixby
Dom_ has joined #ruby
<shevy> "I pray that our Heavenly Father may assuage the anguish of your bereavement"
obuywx has joined #ruby
stayarrr has joined #ruby
<shevy> s1n4 hmm
<hoelzro> pipe to less/more? ;)
<shevy> less just pipes output or? I think it would need ncurses
<shevy> and since everyone hates ncurses, that will probably never be written in ruby
wudofyr_ has quit [Remote host closed the connection]
wudofyr_ has joined #ruby
marienz has quit [Ping timeout: 245 seconds]
breakingthings has joined #ruby
<s1n4> hoelzro: it seems bad, because I'm adding a hotkey to my script too
<Xeago> shevy: I like ncurses..
banisterfiend has quit [Ping timeout: 256 seconds]
<shevy> Xeago lies!
<hoelzro> curses is ok; I really don't like the Ruby binding for it, though
<shevy> how much did you write in ncurses Xeago
baroquebobcat has joined #ruby
<s1n4> hoelzro: it has no good documentions
<hoelzro> s1n4: no, it doesn't
<Xeago> about 6 different programs utilities
<hoelzro> it relies on you knowing the C library fairly well
F1skr has quit [Quit: WeeChat 0.4.0]
Kn|t3 has joined #ruby
arya has joined #ruby
<Xeago> one of them is my own installer ui
<s1n4> I tried to write text into 'less' like IO.popen('less', 'w') ... and I want to add a hotkey too
drago757 has quit [Quit: drago757]
baroquebobcat has quit [Client Quit]
* Xeago note to self should put all of that on github
<hoelzro> s1n4: yeah, I don't think you can do that =(
<shevy> it really sucks when you use a higher level language like ruby, and then you have to dig down into the low level API
<hoelzro> someone should write a pager library
<s1n4> but it's basiclly impossible coz 'less' checks keys too
<Hanmac> because of that was shevy says my gems does all have an ruby-like API and not such a shity swig dirt
<s1n4> hoelzro: so, I think have to use curses for both hot-keys and printing texts
<hoelzro> s1n4: probably, sorry
osaut has quit [Quit: osaut]
<s1n4> why are you sorry? :D
joofsh has joined #ruby
<shevy> he is polite today so he is always sorry
<s1n4> hahahaha
baroquebobcat has joined #ruby
<shevy> I once wanted to write a hack and slay game in ruby-ncurses
baroquebobcat has quit [Client Quit]
* s1n4 hates ruby-ncurses
<hoelzro> please, I'm always polite ;)
otters has quit [Ping timeout: 276 seconds]
<hoelzro> the Ruby curses binding is pretty bad
tjbiddle has quit [Quit: tjbiddle]
<hoelzro> well, at least the lack of documentation
chimmy has joined #ruby
<shevy> hehehe
<hoelzro> I also don't like how the recommended way to use it is to include it into Kernel
<s1n4> hoelzro: by the way, you're pretty helpful, thanks in advance :)
<hoelzro> np
<shevy> you have to include it into Kernel?
filipe has quit [Ping timeout: 244 seconds]
<Hanmac> shevy .... i allready saw an game like that, but i dont have the source of it there ...
<Hanmac> but it was from one of the users in this channel
<Xeago> shevy: conio has a nice interface
<Xeago> c interface, but it has no bindings yet
<s1n4> any replacement for ncurses? :(
<hoelzro> shevy: I don't know if you *have* to, but that seems to be the recommended way
<Xeago> s1n4: conio has a nice interface — c interface but it has no bindings yet
nkr has joined #ruby
Mchl has quit [Quit: ZNC - http://znc.sourceforge.net]
<s1n4> Xeago: can I use ncurses for keybindings in conio?
ippif has joined #ruby
h4mz1d has quit [Ping timeout: 246 seconds]
<hoelzro> maybe I'll make that my next project; a non-crappy TUI library for Ruby
marienz has joined #ruby
nonotza has joined #ruby
<hoelzro> I haven't written anything in Ruby other than silly one-offs since I wrote my keepass bindings
<s1n4> hoelzro: nice, I'm in, you can count on me
lolmaus has quit []
ahokaomaeha has joined #ruby
Mchl has joined #ruby
* Hanmac is currently non-countable
interactionjaxsn has joined #ruby
<s1n4> haha
`brendan has quit [Quit: - nbs-irc 2.39 - www.nbs-irc.net -]
<shevy> man Hanmac
<shevy> do you ever finish anything as of late? :P
adkron has quit [Ping timeout: 256 seconds]
maz-dev has quit [Ping timeout: 256 seconds]
phantasm66 has joined #ruby
phantasm66 has joined #ruby
samphippen has quit [Quit: Computer has gone to sleep.]
jeffreybaird has joined #ruby
Dom_ has quit [Remote host closed the connection]
Virunga has joined #ruby
adkron_ has quit [Ping timeout: 276 seconds]
<Hanmac> currently not, but my projects are still in deviloping and not dead (ok revite some of them but now its one of the active ones)
x82_nicole has joined #ruby
segv- has joined #ruby
baroquebobcat has joined #ruby
lf|2 has joined #ruby
F1skr has joined #ruby
Takehiro has quit [Remote host closed the connection]
ananthakumaran has joined #ruby
jtharris has quit [Quit: WeeChat 0.3.9.2]
<shevy> hehe
<shevy> deviloping! that is the devil riding on an anteloee isn't it so?
<shevy> antelope
<shevy> Hanmac, I hate writing documentation, but I try to add a feature (when I maintain a project), and then I add documentation for that _one_ feature alone
<shevy> that is much easier than writing all documentation at a later time
theRoUS has joined #ruby
theRoUS has quit [Changing host]
theRoUS has joined #ruby
filipe has joined #ruby
jtharris has joined #ruby
baroquebobcat has quit [Quit: baroquebobcat]
lf|2 has quit [Quit: KVIrc 4.2.0 Equilibrium http://www.kvirc.net/]
tomzx_mac has quit [Ping timeout: 260 seconds]
<Hanmac> hm or is it more devilooping? :P
blaxter has joined #ruby
AxonetBE has left #ruby [#ruby]
samphippen has joined #ruby
catphish has joined #ruby
<catphish> sorry for the rails, but does anyone know if a rails controller can render a raw enumerable back to rack?
miskander has joined #ruby
<puppeh> catphish: why don't you try #rails?
<Hanmac> puppeh you are wrong, catphish should try #rubyonrails
DaltonUS has joined #ruby
<catphish> i am doing so
vlad_starkov has joined #ruby
<puppeh> yes sry
matthewrobbins has joined #ruby
cawaker has joined #ruby
zigomir has quit [Quit: zigomir]
<ericwood> no, he should try #railsonruby
<catphish> but the discussion there tends to be a bit high level so thought i'd be a pain and cross post here :)
matthewrobbins has quit [Client Quit]
chimmy has quit [Quit: Colloquy for iPhone - http://colloquy.mobi]
megha has joined #ruby
haxrbyte has joined #ruby
arya has quit [Ping timeout: 248 seconds]
haxrbyte has quit [Remote host closed the connection]
haxrbyte has joined #ruby
sleetdrop has quit [Read error: Connection reset by peer]
jon_wingfield has joined #ruby
daniel_- has quit [Quit: WeeChat 0.3.9.2]
arya has joined #ruby
jon_wingfield has quit [Remote host closed the connection]
jonathanwallace1 has joined #ruby
BulleTime has quit [Ping timeout: 252 seconds]
Kuifje has joined #ruby
sailias has joined #ruby
JumpMast3r has joined #ruby
jblack has joined #ruby
jonathanwallace has quit [Ping timeout: 252 seconds]
main has joined #ruby
pavilionXP__ has joined #ruby
<s1n4> ncurses doesnt support unicodes ;(
krz has joined #ruby
catphish has left #ruby ["Leaving"]
<Hanmac> non-unicode support is so pre-2000
Astralum has joined #ruby
stopbit has joined #ruby
clocKwize has quit [Ping timeout: 252 seconds]
joofsh has quit [Remote host closed the connection]
pithagorians has joined #ruby
<shevy> s1n4 do you really collect more reasons to hate it :D
SQLDarkly has joined #ruby
pavilionXP has quit [Ping timeout: 244 seconds]
<shevy> there are only very few good ncurses programs. one is http://sourceforge.net/projects/htop/files/htop/1.0.2/htop-1.0.2.tar.gz
Astral_ has joined #ruby
joofsh has joined #ruby
girija has joined #ruby
Astral__ has quit [Ping timeout: 255 seconds]
uris has joined #ruby
nomenkun has quit [Remote host closed the connection]
Astralum has quit [Ping timeout: 245 seconds]
<shevy> which ruby project has the most modules defined?
<ericwood> rails probably
<shevy> (internal only, not counting addons)
<shevy> hmm yeah, makes sense
Astral_ has quit [Ping timeout: 252 seconds]
_tockitj has joined #ruby
<Xeago> How to put this sentence in a passive construction: "We will first describe the infrastructure in use at VideofyMe and introduce new components."
<Xeago> e.g. to get rid of the pronoun
renanoronfle has quit [Quit: This computer has gone to sleep]
pithagorians has quit [Quit: Leaving]
<SQLDarkly> Anyone familiar with mongomapper? I cannot seem to find the cause to my error, and any help would be appreciated.
dr_neek has joined #ruby
<Xeago> I am getting criticized from multiple parties, 1 says to use I because it is less arrogant, clearly states that the document is written by 1 person. Others say that it is scientific writing style.
<Xeago> However using a passive construction i can comply with both, but I don't know how
Astralum has joined #ruby
sleetdrop has joined #ruby
jonahR has quit [Quit: jonahR]
<shevy> Xeago, well just get rid of the central "We" part
<shevy> it is unnecessary too
sbear has joined #ruby
<Xeago> shevy: how?
<shevy> "The infrastructure will be described while new components are being introduced."
<Xeago> I will have to show you the whole paragraph
sambio has quit []
Takehiro has joined #ruby
<shevy> well, ok
<shevy> right now you put emphasis on the "we" part
<shevy> you could try to reformulate so that rather than focusing on the "we", you focus on the "what" part
<Xeago> only the order of what will be described is important
jonathanwallace1 has quit [Quit: WeeChat 0.3.9.2]
<Xeago> shevy: I tried, I failed, I came to #ruby :)
jpfuentes2 has quit [Quit: Computer has gone to sleep.]
<shevy> no, you really just eliminate the "we", the sentences will make sense, I am pretty sure
<tobiasvl> the channel for all your basic english questions
Bounga has quit [Quit: Bounga]
<Xeago> tobiasvl: usually :) ##english is off topic most of the time
<shevy> you can easily kill about 12 words that way
<tobiasvl> Xeago: and now #ruby is off topic too
<shevy> scientific english is good by the way
jpfuentes2 has joined #ruby
<Xeago> tobiasvl: we have always been :)
jonathanwallace has joined #ruby
<workmad3> Xeago: does ##english speak in esperanto?
<Xeago> shevy: my mind seems to be miswired, I am unable to do so
zommi has quit [Quit: Leaving.]
whitedawg has joined #ruby
<Xeago> workmad3: I have seen several other languages go by in ##english, I am not aware of any language called esperanto
<workmad3> :)
<shevy> ewwww
<shevy> esperanto is like a language without a real basis
<Xeago> is it the new language will rule them all language that failed?
<workmad3> Xeago: I was just wondering how ##english could be off-topic, unless they spoke in other languages
<shevy> wer spricht deutsch
<Xeago> workmad3: I've seen high level math there..
<workmad3> and picked esperanto as the language to query about :)
<Xeago> they even have a math bot >.<
<workmad3> Xeago: were they talking about it in english?
<Xeago> nope, german
<workmad3> lol
<shevy> Voulez-vous coucher avec moi
nateberkopec has joined #ruby
<shevy> ok who does the japanese please
<workmad3> ok, talking about maths in german is off-topic for ##english :D but because of the german, not the maths :P
renanoronfle has joined #ruby
<Xeago> shevy: no, I will reconsider if you help me rephrase that paragraph
puppeh has quit [Remote host closed the connection]
<workmad3> Xeago: are you still wondering about that initial sentence btw?
<Xeago> the whole paragraph
<Xeago> but I figured the initial sentence should be enough to get me started
<Xeago> paragraph => https://gist.github.com/4656375
jetblack_ has joined #ruby
jrajav has quit [Quit: phunq, sandwich store loop, WHAT NO UNIVERSE]
<workmad3> Xeago: which could be phrased as 'Initially, the architecture in use at VideofyMe will be discussed, and new components will be introduced'
jetblack_ is now known as iambic
<Xeago> thanks!
<Xeago> that reads so much easier xD
<workmad3> (argue about whether I'm using commas correctly in 3... 2... 1...)
janjos has quit [Quit: Konversation terminated!]
emergion has quit [Quit: Computer has gone to sleep.]
<ericwood> COMMAS DO NOT WORK THAT WAY
<ericwood> ;)
<workmad3> ericwood: it's possible you're right :D
<Xeago> I removed the second comma (before I saw irc)
<ericwood> that's new!
keymone has joined #ruby
<workmad3> I'm not sure either of those commas is actually justified now I'm looking at it :)
<Xeago> I think the first one is
<workmad3> my use of commas can be somewhat... ballistic
iambic has quit [Client Quit]
tagrudev has quit [Remote host closed the connection]
<ericwood> that sounds pretty terrifying
<shevy> ok first try...
joshman_ has joined #ruby
<ericwood> he's coding again! Everyone duck down! These commas are BALLISTIC
SQLDarkly has left #ruby ["Leaving"]
bananastalktome has joined #ruby
<shevy> I HATE THE NEW pastie.org
marr has quit []
<ericwood> use gists, silly
<Xeago> shevy: paste.quakenet.org or gists
axl_ has joined #ruby
<shevy> ericwood, the old pastie was so sweet :(
<shevy> the new one just SUCKS... people who need "change" should resist to change working things...
<ericwood> well, gists are better than all the above, sooooo yeah
<shevy> gimme the old pastie
<ericwood> you have to earn it
Mon_Ouie has joined #ruby
<shevy> I am gonna slay the guy who coded the new pastie
<shevy> remember the days when the WWW got big... pink websites... bright flashing colours?
<shevy> angelfire homepages and what not
<ericwood> gists have an actual editor in them now adays, which is pretty badass
<shevy> gimme less features!!!!!
<ericwood> like, if someone writes some code in a gist and I want to modify it and show them I can do it all in the browser and it'll actually work like a real text editor
<ericwood> pretty useful if you ask me
<shevy> I take great pride in the fact that my mobile can only be used for calling people (ok I lie... it has some useless gimmicks... )
<shevy> like a tiny lamp
<shevy> which isn't so useful in a city... but perhaps I will end up in nature one day
<workmad3> Xeago: I added a comment with a potential rephrase of the paragraph
<shevy> surrounded by lions...
snearch has joined #ruby
<shevy> ericwood well live coding can be useful
arya has quit [Ping timeout: 248 seconds]
<shevy> there was some guy here some days ago who didnt even have ruby installed on his machine
arya has joined #ruby
<shevy> this is the future... virtual languages
<Xeago> awesome workmad3!
<shevy> never any installation hassle
adambeynon has joined #ruby
<workmad3> Xeago: I'm not fully happy with that, it doesn't quite flow right IMO
<Xeago> it flows better
<workmad3> Xeago: but it's a starting point, and I think it covers the same information without any pesky 'I' or 'We' pronouns in there :)
beliveyourdream has quit [Read error: Connection reset by peer]
<Xeago> yep, thanks a ton!
BulleTime has joined #ruby
thams has joined #ruby
blaxter has quit [Quit: foo]
iambic has joined #ruby
jean-louis has joined #ruby
ahokaomaeha has quit [Quit: When I come back, please tell me in what new ways you have decided to be completely wrong.]
iambic has left #ruby [#ruby]
thams has quit [Client Quit]
arya has quit [Ping timeout: 248 seconds]
<ericwood> the future is cloud
<Xeago> ofcurse
<Xeago> that is where the rain comes form
<ericwood> future cloud now 2.0
<Xeago> and rain makes new growth
<ericwood> synergy
failshell has joined #ruby
<ericwood> SaaS: Synergy as a Service
miskander has quit [Quit: miskander]
_nitti has joined #ruby
miskander has joined #ruby
arya has joined #ruby
berserkr has quit [Ping timeout: 252 seconds]
[rust] has joined #ruby
a_a_g has joined #ruby
alvaro_o has joined #ruby
geggam has quit [Remote host closed the connection]
atmosx has joined #ruby
minivan has joined #ruby
Hanmac has quit [Ping timeout: 245 seconds]
poikon has quit [Remote host closed the connection]
geggam has joined #ruby
poikon has joined #ruby
jonahR has joined #ruby
nkts has joined #ruby
eldariof has quit [Ping timeout: 255 seconds]
girija has quit [Ping timeout: 256 seconds]
otters has joined #ruby
idkazuma has quit [Remote host closed the connection]
daniel_- has joined #ruby
daniel_- has quit [Changing host]
daniel_- has joined #ruby
jrajav has joined #ruby
ckrailo has joined #ruby
sleetdrop has quit [Ping timeout: 252 seconds]
aganov has quit [Remote host closed the connection]
berserkr has joined #ruby
sleetdrop has joined #ruby
ahokaomaeha has joined #ruby
main has quit [Ping timeout: 256 seconds]
RagingDave has joined #ruby
mneorr has joined #ruby
mikepack has joined #ruby
atmosx has quit [Quit: And so the story goes…]
generalissimo has joined #ruby
Axsuul has joined #ruby
mercwithamouth has joined #ruby
girija has joined #ruby
[eDu] has quit [Quit: [eDu]]
xAndy is now known as xandy
arya has quit [Ping timeout: 248 seconds]
xandy is now known as xAndy
Takehiro has quit [Remote host closed the connection]
mmitchell has joined #ruby
adambeynon has quit [Quit: ["Textual IRC Client: www.textualapp.com"]]
razibog has quit [Ping timeout: 276 seconds]
<mosez> have somebody deployed ruby apps as a war file with warbler?
<mosez> and knows somebody how i can trigger specific rake tasks on init?
jekotia has joined #ruby
louisror has joined #ruby
arya has joined #ruby
carloslopes has quit [Remote host closed the connection]
hashpuppy has joined #ruby
m8 has joined #ruby
miskander has quit [Quit: miskander]
girija has quit [Read error: Connection reset by peer]
keymone has left #ruby [#ruby]
Coolhand has quit [Ping timeout: 276 seconds]
b1rkh0ff has quit [Ping timeout: 240 seconds]
D4T has quit [Quit: Textual IRC Client: www.textualapp.com]
BizarreCake has quit [Ping timeout: 245 seconds]
Takehiro has joined #ruby
<hashpuppy> i also asked this in #rubyonrails:
<hashpuppy> let's say I have some function that syncs my database with third party API data: `def self.sync`. how do i rewrite this so that it is testable, where i can plug-in (or mock) the data returned from third party API? should i create `def self.sync_with(data)` and have def self.sync` call that with the data from the third party?
asobrasil has joined #ruby
<Xeago> def self.sync connects to something right?
<Xeago> preferably you would have your tests connect it to something else
<Xeago> and have that cached
<hashpuppy> Xeago: yes
<Xeago> if it does network stuff
<Xeago> you should mock wherever self.sync gets its data from
<Xeago> mind pasting the code?
zigomir has joined #ruby
enebo has joined #ruby
nonotza has quit [Quit: nonotza]
JohnBat26 has quit [Ping timeout: 276 seconds]
<hashpuppy> i haven't written it yet
BizarreCake has joined #ruby
wyhaines has joined #ruby
sayan has quit [Read error: Connection reset by peer]
benlieb has joined #ruby
<Xeago> hashpuppy: you could consider DI
sbear has quit [Ping timeout: 252 seconds]
benlieb has quit [Remote host closed the connection]
<Xeago> but that might make things more cumbersome
<Xeago> in any case, make a clear boundary
wyhaines has quit [Remote host closed the connection]
<hashpuppy> yeah, i was considering that. someone in #rails suggested I look into fakeweb or webmock
DaltonUS has quit [Quit: DaltonUS]
kirkhaines has joined #ruby
arya has quit [Ping timeout: 248 seconds]
<Xeago> depending on your usecase those might be too late already
joeycarmello has quit [Read error: Connection reset by peer]
<Xeago> also vcr if you happen to go into that way
kirkhaines is now known as wyhaines
<Xeago> most of the time those are good enough
joeycarmello has joined #ruby
<Xeago> those mock out http calls
wyhaines has quit [Remote host closed the connection]
<hashpuppy> ohh.. yeah, that probably is too late
pavilionXP__ has quit [Ping timeout: 244 seconds]
shock_one has quit [Read error: Connection reset by peer]
[rust] has quit [Quit: This computer has gone to sleep]
whitedawg has quit [Quit: Leaving.]
niklasb has joined #ruby
<banister_> k
banister_ is now known as banisterfiend
girija has joined #ruby
jblack has quit [Ping timeout: 240 seconds]
ahokaomaeha has quit [Ping timeout: 255 seconds]
dr_neek has quit [Ping timeout: 260 seconds]
Kn|t3 has quit [Quit: Kn|t3]
io_syl has joined #ruby
arya has joined #ruby
mjolk has left #ruby ["Leaving"]
haxrbyte has quit [Read error: Connection reset by peer]
joeycarmello has quit [Ping timeout: 255 seconds]
maletor has joined #ruby
Virunga has quit [Remote host closed the connection]
Kn|t3 has joined #ruby
timmow has quit [Read error: Connection reset by peer]
timmow has joined #ruby
Kn|t3 has quit [Remote host closed the connection]
mahmoudimus has joined #ruby
w400z has joined #ruby
DrCode has quit [Remote host closed the connection]
jfl0wers has quit [Ping timeout: 276 seconds]
benlieb has joined #ruby
girija has quit [Read error: Connection reset by peer]
hoelzro is now known as hoelzro|away
wallerdev has joined #ruby
wallerdev has quit [Client Quit]
wallerdev has joined #ruby
traph has joined #ruby
aedorn has joined #ruby
razibog has joined #ruby
angusiguess has joined #ruby
v0n has joined #ruby
ippif has quit [Quit: Textual IRC Client: www.textualapp.com]
dekroning has quit [Ping timeout: 252 seconds]
tjbiddle has joined #ruby
carloslopes has joined #ruby
amaya_the has joined #ruby
maletor has quit [Quit: Computer has gone to sleep.]
amaya_the has quit [Client Quit]
beaky has joined #ruby
<beaky> hello
philcrissman has joined #ruby
<beaky> does ruby have a translate function that works like tr (1) or python's str.translate?
apeiros_ has quit [Remote host closed the connection]
rkneufeld has joined #ruby
chimkan_ has joined #ruby
amaya_the has joined #ruby
chussenot has quit [Quit: chussenot]
jaequery has joined #ruby
<workmad3> beaky: yes
<workmad3> >> p "foo".tr("of", "ab")
<eval-in> workmad3: Output: "\"baa\"\n" (http://eval.in/7864)
__BigO__ has joined #ruby
DrCode has joined #ruby
<amaya_the> :)
chimkan has quit [Ping timeout: 252 seconds]
chimkan_ is now known as chimkan
moshee has quit []
zph has quit [Quit: Computer has gone to sleep.]
pavilionXP has joined #ruby
Takehiro has quit [Remote host closed the connection]
buibex has joined #ruby
larissa has quit [Quit: Leaving]
<beaky> ah
carloslopes has quit [Ping timeout: 240 seconds]
moshee has joined #ruby
moshee has quit [Changing host]
moshee has joined #ruby
<beaky> what if I have a big Hash of things `i want to translate
DaltonUS has joined #ruby
banisterfiend has quit [Remote host closed the connection]
chussenot has joined #ruby
<workmad3> beaky: define 'big hash of things'
<Mon_Ouie> gsub accepts a hash as its second argument
<beaky> ah
<beaky> I guess gsub will work
<Mon_Ouie> You still need a pattern that will match all the keys though
<Mon_Ouie> e.g. Regexp.union(hash.keys)
amaya_the has quit [Client Quit]
<beaky> ah
minivan has quit [Quit: minivan]
girija has joined #ruby
nigelb has joined #ruby
huoxito has joined #ruby
tylersmith has joined #ruby
sn0wb1rd has quit [Quit: sn0wb1rd]
zph has joined #ruby
jtharris has quit [Ping timeout: 245 seconds]
jtharris_ has joined #ruby
razibog has quit [Ping timeout: 255 seconds]
cantonic has joined #ruby
adkron has joined #ruby
samphippen has quit [Quit: Computer has gone to sleep.]
banisterfiend has joined #ruby
etcetera has joined #ruby
<beaky> first-class regexps sounds neat
buibex has quit [Ping timeout: 264 seconds]
maetthew is now known as M
segv- has quit [Read error: Connection reset by peer]
swex has joined #ruby
M is now known as maetthew
segv-_ has joined #ruby
swex has quit [Read error: Connection reset by peer]
miskander has joined #ruby
jokke has quit [Quit: WeeChat 0.3.6]
<beaky> but I lost my Mastering Regular Expressions book :(
swex has joined #ruby
<jrajav> Uh-oh! Now you'll never master them!
altamic has quit [Quit: altamic]
goraxe has joined #ruby
<workmad3> beaky: http://rubular.com
Umren has joined #ruby
adkron_ has joined #ruby
girija has quit [Ping timeout: 244 seconds]
swex_ has quit [Ping timeout: 252 seconds]
whowantstolivef1 has joined #ruby
HAKEON has joined #ruby
spider-mario has joined #ruby
tjbiddle has quit [Quit: tjbiddle]
jtharris_ is now known as jtharris
zigomir has quit [Quit: zigomir]
cozby has joined #ruby
shtirlic has joined #ruby
dr_bob has quit [Quit: Leaving.]
carloslopes has joined #ruby
devdazed has quit [Ping timeout: 252 seconds]
<beaky> I wish other languages like C and C++ had regexps
jgrevich has joined #ruby
<Mon_Ouie> They have libraries for them (C++ has them in the standard library now), just now language support for regexp literals
<jrajav> They do
<aedorn> like <regex> in C++?
samphippen has joined #ruby
mercwithamouth has quit [Ping timeout: 240 seconds]
<Xeago> hmm it doesn't use pcre?
<LiquidInsect> probably depends on the c++ version you're using... Wasn't that brought in from Boost a few years ago?
<beaky> std::regex feels a bit experimental :(
HAKEON_ has joined #ruby
keymone_ has joined #ruby
<beaky> but I think boost::regex is fine :D
keymone_ has quit [Client Quit]
<jrajav> "Use PCRE"? PCRE is itself a C library already
<jrajav> Boost.regex is pretty solid though
renanoronfle has quit [Quit: This computer has gone to sleep]
jean-louis has quit [Ping timeout: 252 seconds]
havenn has joined #ruby
<beaky> yep
HAKEON_ has quit [Read error: Connection reset by peer]
devdazed has joined #ruby
<beaky> there's some C POSIX regex library
<jrajav> There's also http://tiny-rex.sourceforge.net/ , never used it though
mockra has joined #ruby
HAKEON has quit [Ping timeout: 246 seconds]
<jrajav> Doesn't look like it's POSIX exactly, or if it is I would expect it to say so
HAKEON has joined #ruby
<jrajav> Personally I'd go with one that specifically says it supports POSIX or PCRE; then you can depend on wide tooling and documentation.
<jrajav> Both of those have their own nasty bits that make them huge and/or difficult though
dekroning has joined #ruby
timonv has quit [Remote host closed the connection]
mercwithamouth has joined #ruby
interactionjaxsn has quit [Remote host closed the connection]
timonv has joined #ruby
thams has joined #ruby
megha has quit [Quit: WeeChat 0.4.0]
vlad_starkov has quit [Remote host closed the connection]
interactionjaxsn has joined #ruby
breakingthings has quit []
filipe has quit [Remote host closed the connection]
punkrawkR^Home has joined #ruby
nga4 has quit []
marr has joined #ruby
timonv has quit [Ping timeout: 245 seconds]
bradleyprice has joined #ruby
dekroning has quit [Ping timeout: 255 seconds]
tylersmith has quit [Quit: tylersmith]
s1n4 has quit [Quit: leaving]
bananastalktome has left #ruby [#ruby]
nga4 has joined #ruby
JMcAfreak has joined #ruby
joeycarmello has joined #ruby
joeycarmello has quit [Remote host closed the connection]
joeycarmello has joined #ruby
zastern has joined #ruby
sn0wb1rd has joined #ruby
cakehero has joined #ruby
kenichi has quit [Quit: ZNC - http://znc.sourceforge.net]
Coolhand has joined #ruby
jgrevich_ has joined #ruby
stkowski has joined #ruby
Bosma has quit [Quit: leaving]
jgrevich has quit [Ping timeout: 256 seconds]
jgrevich_ is now known as jgrevich
jaequery has quit [Quit: Computer has gone to sleep.]
k610 has quit [Quit: Leaving]
pyro111 has quit [Quit: Leaving]
tvw has quit [Ping timeout: 244 seconds]
ovatsug25 has quit [Remote host closed the connection]
ephemerian has quit [Quit: Leaving.]
ovatsug25 has joined #ruby
ovatsug25 has quit [Remote host closed the connection]
blazes816 has joined #ruby
ovatsug25 has joined #ruby
kenichi has joined #ruby
wallerdev has quit [Quit: wallerdev]
Virunga has joined #ruby
rjmt___ has quit [Remote host closed the connection]
angusiguess has quit [Ping timeout: 245 seconds]
Takehiro has joined #ruby
ovatsug2_ has joined #ruby
v0n has quit [Ping timeout: 246 seconds]
<beaky> when should I use symbols over strings?
<ericwood> always
<ericwood> jk symbols are best used for hash keys
noxoc has quit [Quit: noxoc]
<beaky> ah
<ericwood> and things you reuse a lot
renanoronfle has joined #ruby
snearch has quit [Quit: Verlassend]
adeponte has joined #ruby
<ericwood> basically...if it's some kind of designation that's only important within the code itself, use a symbol
<beaky> how do I convert to/from strings and symbols?
b1rkh0ff has joined #ruby
<LiquidInsect> Symbol#to_s, String#to_sym
renanoronfle has quit [Client Quit]
<beaky> ah
vlad_starkov has joined #ruby
ovatsug25 has quit [Ping timeout: 244 seconds]
<beaky> Ruby symbols seem like a pretty unique idea. What other programming languages have such a construct?
carloslopes has quit [Remote host closed the connection]
<LiquidInsect> lisp
<LiquidInsect> prolog, smalltalk
<beaky> ah smalltalk :D
<LiquidInsect> quite a few actually
<LiquidInsect> a lot of languages call them "atoms"
<beaky> ah I recall those from a C book :D
<LiquidInsect> well. Prolog and ML do anyway
Takehiro has quit [Read error: Connection reset by peer]
Takehiro has joined #ruby
danktamagachi has joined #ruby
<beaky> 'symbol' is a neat word imo
vlad_starkov has quit [Remote host closed the connection]
templaedhel has joined #ruby
Astral_ has joined #ruby
krz has quit [Quit: krz]
Virunga has quit [Remote host closed the connection]
carloslopes has joined #ruby
Stilo has joined #ruby
<Stilo> someone can help me with one exercise?
<jrajav> Say it slowly, it kind of rolls out of the mouth
<jrajav> syyyymmbooool
<beaky> better than saying "string" ^^
<Xeago> there are places where I like strings more than symbols :3
tjbiddle has joined #ruby
ner0x is now known as ner0xis_arilliou
ner0xis_arilliou is now known as ner0xis_arilious
tjbiddle has quit [Remote host closed the connection]
tjbiddle has joined #ruby
Takehiro has quit [Remote host closed the connection]
eldariof has joined #ruby
Astralum has quit [Ping timeout: 276 seconds]
<beaky> how has Ruby's japanese origins influenced the languages' featureset?
chussenot has quit [Quit: chussenot]
ner0xis_arilious is now known as ner0x
<Muz> Stunning UTF-8 support, right from the outse.... aaaaaaahahahahahah.
<LiquidInsect> you almost made it through the whole sentence
<Muz> Anyone with a clean conscience could never say that about Ruby
<Muz> .
<beaky> ah
Guedes0 has quit [Excess Flood]
ebobby has joined #ruby
maletor has joined #ruby
Guedes0 has joined #ruby
zigomir has joined #ruby
volk__ has joined #ruby
danktamagachi has quit [Ping timeout: 256 seconds]
adeponte has quit [Remote host closed the connection]
jslowe has joined #ruby
dekroning has joined #ruby
arkiver has joined #ruby
adeponte has joined #ruby
arkiver has quit [Read error: Connection reset by peer]
Astralum has joined #ruby
shock_one has joined #ruby
andrewhl has quit [Remote host closed the connection]
danktamagachi has joined #ruby
danshultz has joined #ruby
banister_ has joined #ruby
PragCypher has quit [Read error: No route to host]
banisterfiend has quit [Ping timeout: 256 seconds]
Takehiro has joined #ruby
xemu has quit [Ping timeout: 260 seconds]
JohnBat26 has joined #ruby
templaedhel has quit [Quit: Leaving...]
volk_ has quit [Ping timeout: 248 seconds]
volk__ is now known as volk_
Astral_ has quit [Ping timeout: 256 seconds]
xemu has joined #ruby
rjmt___ has joined #ruby
<jrajav> I would say that
<jrajav> For some values of "stunning," that is
gyre007 has joined #ruby
volk_ has quit [Remote host closed the connection]
ippif has joined #ruby
volk_ has joined #ruby
Xeago has quit [Remote host closed the connection]
fenak has joined #ruby
etcetera has quit []
fenak has left #ruby [#ruby]
v0n has joined #ruby
jaequery has joined #ruby
jrafanie has joined #ruby
gyre008 has quit [Ping timeout: 260 seconds]
dekroning has quit [Ping timeout: 245 seconds]
nwertman has quit [Ping timeout: 245 seconds]
ottbot has quit [Ping timeout: 260 seconds]
maz-dev has joined #ruby
fenak has joined #ruby
osaut has joined #ruby
cobragoat has joined #ruby
roadt has joined #ruby
ovatsug2_ has quit [Remote host closed the connection]
dr_neek has joined #ruby
rupee has joined #ruby
dr_neek has quit [Client Quit]
aaronmcadam has quit [Quit: aaronmcadam]
ottbot has joined #ruby
etcetera has joined #ruby
nat2610 has joined #ruby
BizarreCake has quit [Ping timeout: 256 seconds]
BizarreCake has joined #ruby
chimkan_ has joined #ruby
chrismhough has joined #ruby
cdt has quit [Quit: Ex-Chat]
nat2610 has quit [Client Quit]
blezar has joined #ruby
jduan1981 has joined #ruby
fermion has quit [Quit: P]
chimkan has quit [Ping timeout: 252 seconds]
blezar has left #ruby [#ruby]
nat2610 has joined #ruby
chimkan_ is now known as chimkan
b1rkh0ff has quit [Ping timeout: 252 seconds]
jrafanie has quit [Quit: jrafanie]
moted has quit [Remote host closed the connection]
b1rkh0ff has joined #ruby
HAKEON has quit [Ping timeout: 246 seconds]
ryanf has quit [Quit: leaving]
poikon has quit [Remote host closed the connection]
moted has joined #ruby
_nitti has quit [Remote host closed the connection]
timmow has quit [Read error: Connection reset by peer]
timmow has joined #ruby
carlyle has joined #ruby
slainer68 has quit [Remote host closed the connection]
dekroning has joined #ruby
gyre008 has joined #ruby
ottbot has quit [Ping timeout: 252 seconds]
<shevy> Muz!!! you almost forgot a '.' there!
spider-mario_ has joined #ruby
ahokaomaeha has joined #ruby
gyre007 has quit [Ping timeout: 264 seconds]
<shevy> beaky the number one influence is in the lack of english documentation
<shevy> it got better over the years though
spider-mario has quit [Ping timeout: 245 seconds]
<beaky> ah
otherj has joined #ruby
AlSquirikou is now known as AlSquire
mrsolo has joined #ruby
chimkan_ has joined #ruby
chimkan has quit [Ping timeout: 256 seconds]
chimkan_ is now known as chimkan
gyre008 has quit [Ping timeout: 244 seconds]
danktamagachi has quit [Ping timeout: 255 seconds]
jrajav has quit [Quit: I tend to be neutral about apples]
mmitchel_ has joined #ruby
zeade has joined #ruby
spider-mario has joined #ruby
spider-mario_ has quit [Ping timeout: 245 seconds]
a_a_g1 has joined #ruby
volk__ has joined #ruby
breakingthings has joined #ruby
Goles has joined #ruby
obuywx has quit [Remote host closed the connection]
Stilo has quit [Quit: Textual IRC Client: www.textualapp.com]
volk__ has quit [Remote host closed the connection]
ryannielson has joined #ruby
JumpMast3r has quit [Quit: JumpMast3r]
mmitchell has quit [Ping timeout: 245 seconds]
volk_ has quit [Read error: Connection reset by peer]
volk_ has joined #ruby
a_a_g has quit [Ping timeout: 252 seconds]
<benlieb> I'm upgrading a rails app from 1.8.7 to 1.9.2 to go on Heroku Cedar stack. They mention that all character encoding issues are accounted for. I've read this article and am flabbergasted that this should be an issue. http://www.samanage.com/blog/2011/09/tales-from-upgrading-to-ruby-1-9-2-character-encoding/
a_a_g has joined #ruby
<benlieb> Is this something that will always have to be accounted for. I'm having trouble seeing this as an 'improvement'
Stilo has joined #ruby
enebo has quit [Quit: enebo]
sambio has joined #ruby
kylescottmcgill has joined #ruby
_nitti has joined #ruby
a_a_g1 has quit [Ping timeout: 264 seconds]
Hanmac has joined #ruby
tatsuya__ has quit [Ping timeout: 260 seconds]
Xeago has joined #ruby
ngoldman has joined #ruby
bricker is now known as bricker`LA
bricker`work is now known as bricker
enebo has joined #ruby
andrewhl has joined #ruby
clooth has quit [Quit: clooth]
blaxter has joined #ruby
banister_ has quit [Remote host closed the connection]
<yfeldblum> benlieb, do these reported issues occur for you?
<havenn> benlieb: A Rails 2 or 3 app? Ruby 1.8 is end-of-life'ing in June. Really no option but go to 1.9 or 2.0.
jonahR has quit [Quit: jonahR]
robotmay has quit [Remote host closed the connection]
nkts has quit [Remote host closed the connection]
<havenn> benlieb: #RubyOnRails may be able to provide more specific Rails-related encoding advice.
<benlieb> yfeldblum: I'll be porting 3 apps in the next month, and one is already done. For the first app in one file I did have to use the magic comment
<yxhuvud> havenn: it will be interesting to see if centos manages to release a version of 1.9 before that.
<benlieb> it took me a while to figure out what was going on. it just makes my heart sink a little bit to think that dealing with multi-language apps will be buggy and error prone
<havenn> yxhuvud: I'd hope so! Running a Ruby that isn't receiving even security patches is a real bad idea!
<yxhuvud> my life would be so much easier if I could convince the platform guys that rbenv is the way to go :(
<beaky> how do i implement the null object pattern in ruby?
<Drager> Any idea if google cdn provides jquery ui css?
<yfeldblum> benlieb, beyond that, any problems?
Takehiro has quit [Remote host closed the connection]
<Drager> woops wrong channel
<Drager> sorry
<havenn> yxhuvud: Have you looked at chruby? https://github.com/postmodern/chruby
banseljaj is now known as imami|afk
<benlieb> yfeldblum: no, not yet. the first app I ported was my own.
<havenn> yxhuvud: Really nice alternative to rbenv. Lighter weight, no shims.
ossareh has joined #ruby
ryao has joined #ruby
<benlieb> yfeldblum: which I did as a test run, the next two are for clients and they want estimates on the time, etc
timmow has quit [Ping timeout: 252 seconds]
<ryao> Are any ruby specialists on that could help me resolve this failure? "unable to find dnssd header" I installed ruby gems because I wanted to install airstream, but I am getting a build failure from it. I am not familiar with Ruby at all.
<yxhuvud> well, doesn't solve my prolbem any better than rbenv. The big divide is managing to package it in a way that the platform people can agree with.
<ryao> I don't know what the dnssd header is.
<havenn> ryao: What OS/distro, which Ruby, using a Ruby version manager?
etcetera_ has joined #ruby
<ryao> havenn: Gentoo Linux. Ruby 1.9.3
<benlieb> yfeldblum: I guess we'll see. but that article's description of failing when it received utf-8 form data is not the kind of thing that inspires confidence. I've been a ruby/ rails dev for 4 years now, and it just doesn't seem like the kind of thing I would have to be accounting for so meticulously...
mmitchel_ has quit [Remote host closed the connection]
<ryao> havenn: I don't know what a Ruby version manager is. I focus on kernel and core userland stuff.
aaronmacy has joined #ruby
blaxter has quit [Ping timeout: 246 seconds]
etcetera has quit [Ping timeout: 245 seconds]
etcetera_ is now known as etcetera
mmitchell has joined #ruby
Xeago has quit [Read error: Connection reset by peer]
Xeago has joined #ruby
<ryao> I could probably ask the Gentoo ruby developers directly, but I would rather go through normal channels. Helping me with this would take time away from Gentoo development, especially since I am a complete beginner at Ruby.
<havenn> ryao: Looks like dnssd might require some additional config for Gentoo, hrmm. https://github.com/sandro/specjour/wiki/Running-specjour-on-Linux
johnjohn101 has joined #ruby
<johnjohn101> what's the deal with ruby 2.0?
<Xeago> not stable
<havenn> johnjohn101: It will be released Feb 24.
<ryao> havenn: That doesn't explain what dnssd is. Could you tell me what file it wants?
remaus has joined #ruby
<ryao> If I knew what file it needs, then I should be able to take it from there.
anachronistic has joined #ruby
anachronistic has quit [Client Quit]
tenmilestereo has joined #ruby
<johnjohn101> havenn: is there a document that explains what's new? I guess it's a giant step up for ruby, right?
noxoc has joined #ruby
remaus is now known as SirNicholas
<johnjohn101> am kind of upset that ironruby project has been sort of abandoned.
Elhu has quit [Quit: Computer has gone to sleep.]
<yfeldblum> johnjohn101, the release notes talk about what's new
<yfeldblum> johnjohn101, there probably wasn't enough interest in the MS-only shops for ironruby
<havenn> ryao: Hrmmmm, I really don't know. That is a tough one.
blaxter has joined #ruby
w400z has quit []
adkron_ has quit [Ping timeout: 245 seconds]
w400z has joined #ruby
<yfeldblum> johnjohn101, especially considering F# and C#'s dynamic types
adkron has quit [Ping timeout: 252 seconds]
<havenn> johnjohn101: 2.0 is more of an incremental update, keeps fully compatibility with 1.9. The 1.8 to 1.9 move was more major.
shock_one has quit [Read error: No route to host]
jonathanwallace has quit [Quit: WeeChat 0.3.9.2]
<yfeldblum> benlieb, well it's probably not going to be too much of a headache, though you may run into a few things
<ryao> havenn: Do you know anyone who might know?
<havenn> johnjohn101: 2.0 does have some nice GC improvements! A few new features.
<LiquidInsect> yeah, rub ydoesn't really follow semantic versioning
dougireton has joined #ruby
fenak has quit [Ping timeout: 245 seconds]
<yfeldblum> think of ruby's major version as 19 and minor version as 3
<LiquidInsect> refinements are coming in 2.0 also, but they're not quite what was originally planned
<johnjohn101> havenn, i'll probably check it out come april or so then. thanks for the timeline, I will watch for the release announcements
<benlieb> yfeldblum: I don't really understand the issue at its root, but I guess ASCII is a more efficient default than UTF-8?
dmerrick has joined #ruby
<havenn> johnjohn101: If you want the GC improvements now, you can get them in 1.9 with patch falcon.
jonathanwallace has joined #ruby
alvaro_o_ has joined #ruby
<yfeldblum> benlieb, the issue is that in ruby, all strings have an attached encoding and all strings are checked against their encoding
<yfeldblum> benlieb, sorry, in ruby-1.9+
<havenn> johnjohn101: I know some shops that run Unicorn are already running 2.0 or 1.9-patch-falcon in production.
<benlieb> benlieb: but it's a question of default, right? Would wouldn't the default use unicode instead of an American standard?
<johnjohn101> in production already? wow. I don't usually do production stuff until it's been out a while
<havenn> Copy-on-write friendly GC saves a lot of memory with forking-based webservers.
hybris has quit [Quit: Leaving]
Xeago has quit [Ping timeout: 256 seconds]
Xeago has joined #ruby
alvaro_o has quit [Ping timeout: 276 seconds]
<ryao> havenn: Installing avahi with mdnsresponder-compat made it work.
<havenn> ryao: Woot, nice!
Banistergalaxy has quit [Ping timeout: 252 seconds]
renanoronfle has joined #ruby
martinklepsch has quit [Ping timeout: 260 seconds]
<havenn> benlieb: At least in Ruby 2.0 the default encoding will be utf-8. Buh bye ascii.
* Hanmac still does not trust the falcon patches ...
hoelzro|away is now known as hoelzro
Banistergalaxy has joined #ruby
Virunga has joined #ruby
dougireton has quit [Quit: Leaving.]
zph has quit [Quit: Computer has gone to sleep.]
<Hanmac> havenn realy? thats cool :D
<maddog_> Hey, how can I create a class that accepts a hash like (name: 'foo', street: 'bar) for it's new method?
Xeago has quit [Ping timeout: 276 seconds]
yfeldblum has quit [Ping timeout: 252 seconds]
buibex has joined #ruby
<hoelzro> maddog_: I've done that a few times
<maddog_> So, how did you do it?
<Hanmac> maddog_ def intialize(opts = {})
<hoelzro> what I did is iterate over the kv pairs and check for a method with the name key + '='
zeade has quit [Quit: Leaving.]
ovatsug25 has joined #ruby
<maddog_> ah ok, so there is no built in mechanism for that then
<hoelzro> no, not that I know of
squidBits has joined #ruby
<maddog_> oki, thanks
<havenn> Hanmac: Pretty sure utf-8 default made it, Matz gave the go ahead if it doesn't break too much. Hrmm, gotta check!
ovatsug25 has quit [Remote host closed the connection]
wreckimn1 has quit [Ping timeout: 245 seconds]
a_a_g has quit [Quit: Leaving.]
TomyLobo has joined #ruby
marr has quit [Ping timeout: 276 seconds]
jrist is now known as jrist-afk
bluOxigen has joined #ruby
yacks has quit [Quit: Leaving]
shevy has quit [Read error: Operation timed out]
dougireton has joined #ruby
maletor has quit [Quit: Computer has gone to sleep.]
apok has joined #ruby
pewter_tao has joined #ruby
dougireton has quit [Client Quit]
rdark has quit [Quit: leaving]
banjara has joined #ruby
otherj has quit [Quit: otherj]
cableray has joined #ruby
clocKwize has joined #ruby
<pewter_tao> If you're installing a whole directory of gems (.../*.gem), then how do you figure out which one causes an invalid byte sequence error?
_nitti has quit [Remote host closed the connection]
biff_tannen has joined #ruby
Pandaen has joined #ruby
jaygen has joined #ruby
alv-r- has joined #ruby
Takehiro has joined #ruby
dougireton has joined #ruby
daniel_- has quit [Quit: WeeChat 0.3.9.2]
maletor has joined #ruby
Astral_ has joined #ruby
<beaky> what is the difference between Foo.bar and Foo::bar?
Guest546546 has joined #ruby
Guest546546 has quit [Client Quit]
megha has joined #ruby
daniel_- has joined #ruby
daniel_- has quit [Changing host]
daniel_- has joined #ruby
enebo has quit [Quit: enebo]
vlad_starkov has joined #ruby
rh1n0 has joined #ruby
ottbot has joined #ruby
MetaCosm has joined #ruby
MetaCosm has quit [Excess Flood]
Astralum has quit [Ping timeout: 252 seconds]
aaronmacy has quit [Quit: Leaving.]
<havenn> beaky: Foo.bar is used by convention to make it clear you are calling a method. Foo::Bar for namespace.
MetaCosm has joined #ruby
razieliyo has joined #ruby
<razieliyo> hi
reinaldob has quit [Remote host closed the connection]
<razieliyo> I'm starting with ruby, and I'm getting some error I can't figure out why
<razieliyo> uninitialized constant CLASS (NameError)
<razieliyo> I've googled, but nothing seems to work
<beaky> ah
<razieliyo> I've read something about this being some kind of bug
<Hanmac> beaky it does nor make a difference with small cases, but Foo.Bar looks for a method, Foo::Bar looks for a constant
<razieliyo> what I just do is @var = MyClass.new
<Hanmac> razieliyo show us your code with a pastie
<razieliyo> inside the initialize
<havenn> razieliyo: If you define the constant CLASS then CLASS will exist. Maybe you mean Class?
<razieliyo> Hanmac: it's the example code from the gosu lib, I'll paste it on pastebin
<razieliyo> or do you prefer another?
<Hanmac> its okay
Takehiro has quit [Ping timeout: 256 seconds]
Xeago has joined #ruby
pcarrier has quit []
pyreal has quit [Quit: pyreal]
<razieliyo> this is it
<razieliyo> the error I get is this
shevy has joined #ruby
huoxito has quit [Quit: Leaving]
peregrine81 has joined #ruby
<razieliyo> the weirdest thing is that I tried to run that
<razieliyo> but I just reset the computer and now, I get that error
poikon has joined #ruby
<razieliyo> Player is called ::Player because I read that that's a more explicit way to name a class to instance it or whatever
<razieliyo> but in the original it was just Player.new
zph has joined #ruby
<razieliyo> the change doesn't affect really
<Hanmac> razieliyo Player need to be defined above the window ... otherwise its defined to late
<razieliyo> Hanmac: boh, I'm gonna kick myself in the balls
<razieliyo> okay, I did it
<Banistergalaxy> Hanmac gave you seen the week be blood
<razieliyo> thanks, Hanmac
megha has quit [Quit: WeeChat 0.4.0]
<razieliyo> I'm just going to put them into separate files
<Hanmac> or like that
<razieliyo> this being a quick example, I just wrote everything line after line
miskander has quit [Quit: miskander]
bean has quit [Quit: Computer has gone to sleep.]
Uranio has quit [Quit: while you reading this, a kitty dies]
<razieliyo> it works perfect now, thanks
kaen has joined #ruby
miskander has joined #ruby
miskander has quit [Client Quit]
buibex has quit [Remote host closed the connection]
s1n4 has joined #ruby
havenn has quit [Remote host closed the connection]
JohnBat26 has quit [Quit: KVIrc 4.3.1 Aria http://www.kvirc.net/]
ananthakumaran has quit [Quit: Leaving.]
havenn has joined #ruby
jblack has joined #ruby
dougireton has quit [Quit: Leaving.]
jblack has quit [Client Quit]
ChampS666 has quit [Ping timeout: 252 seconds]
lusory has quit [Ping timeout: 255 seconds]
razieliyo has quit [Remote host closed the connection]
banisterfiend has joined #ruby
nomenkun has joined #ruby
jblack has joined #ruby
poikon has quit [Remote host closed the connection]
havenn has quit [Ping timeout: 244 seconds]
undersc0re97 has quit [Quit: "The destruction of balance constitutes leaping forward and such destruction is better than balance. Imbalance and headache are good things." - Mao]
sn0wb1rd has quit [Read error: Connection reset by peer]
sn0wb1rd has joined #ruby
poikon has joined #ruby
aaronmacy has joined #ruby
grzywacz has quit [Ping timeout: 260 seconds]
chrismhough has quit [Quit: chrismhough]
brianpWins has joined #ruby
lusory has joined #ruby
undersc0re97 has joined #ruby
undersc0re97 has quit [Changing host]
undersc0re97 has joined #ruby
rakl has joined #ruby
d2dchat has quit [Remote host closed the connection]
elkclone has joined #ruby
_nitti has joined #ruby
dougireton has joined #ruby
freakazoid0223 has joined #ruby
apeiros_ has joined #ruby
<apeiros_> beaky: I assume your tr question was answered with String#tr ?
biff_tannen has quit [Read error: Connection reset by peer]
bluOxigen has quit [Ping timeout: 245 seconds]
rh1n0 has quit [Quit: Linkinus - http://linkinus.com]
<beaky> yeah :D
<beaky> and gsub
Xeago has quit [Remote host closed the connection]
maxmanders has joined #ruby
jtharris has quit [Quit: WeeChat 0.3.9.2]
rakl has quit [Ping timeout: 256 seconds]
graft has quit [Ping timeout: 264 seconds]
bluOxigen has joined #ruby
icole has joined #ruby
graft has joined #ruby
graft has quit [Changing host]
graft has joined #ruby
megha has joined #ruby
Vert has quit [Ping timeout: 252 seconds]
_nitti has quit [Ping timeout: 256 seconds]
Elhu has joined #ruby
schaerli has joined #ruby
chrismhough has joined #ruby
Morkel_ has joined #ruby
peregrine81 has quit [Quit: Computer sleeping.]
peregrine81 has joined #ruby
jblack has quit [Ping timeout: 276 seconds]
Morkel has quit [Ping timeout: 255 seconds]
Morkel_ is now known as Morkel
daniel_- has quit [Ping timeout: 255 seconds]
a_a_g has joined #ruby
havenn has joined #ruby
aedorn has quit [Remote host closed the connection]
cconstantine has quit [Quit: Leaving]
Banistergalaxy has quit [Ping timeout: 245 seconds]
Xeago has joined #ruby
main_ has joined #ruby
aedorn has joined #ruby
Elhu has quit [Quit: Computer has gone to sleep.]
Elhu has joined #ruby
yfeldblum has joined #ruby
rippa has quit [Ping timeout: 240 seconds]
Banistergalaxy has joined #ruby
zph has quit [Quit: Computer has gone to sleep.]
johnjohn101 has quit [Quit: Leaving.]
main_ has quit [Ping timeout: 276 seconds]
miskander has joined #ruby
ippif has quit [Quit: Textual IRC Client: www.textualapp.com]
Goles has quit [Quit: Computer has gone to sleep.]
graft has quit [Ping timeout: 256 seconds]
zph has joined #ruby
ryanf has joined #ruby
graft has joined #ruby
graft has quit [Changing host]
graft has joined #ruby
Eiam has quit [Read error: Operation timed out]
banjara has quit [Quit: Leaving.]
banjara has joined #ruby
clooth has joined #ruby
banisterfiend has quit [Read error: Connection reset by peer]
_nitti has joined #ruby
banisterfiend has joined #ruby
techlife has quit [Ping timeout: 252 seconds]
megha has quit [Quit: WeeChat 0.4.0]
megha has joined #ruby
reset has joined #ruby
BizarreCake has quit [Remote host closed the connection]
jtharris has joined #ruby
atmosx has joined #ruby
nat2610 has quit [Quit: Leaving.]
maletor has quit [Quit: Computer has gone to sleep.]
cakehero has quit [Quit: Computer has gone to sleep.]
dallasm has joined #ruby
zeade has joined #ruby
techlife has joined #ruby
techlife has quit [Max SendQ exceeded]
techlife has joined #ruby
Elhu has quit [Quit: Computer has gone to sleep.]
techlife has quit [Max SendQ exceeded]
slainer68 has joined #ruby
w400z has quit []
maletor has joined #ruby
techlife has joined #ruby
techlife has quit [Max SendQ exceeded]
techlife has joined #ruby
techlife has quit [Max SendQ exceeded]
techlife has joined #ruby
techlife has quit [Max SendQ exceeded]
joeycarm_ has joined #ruby
techlife has joined #ruby
daniel_- has joined #ruby
postmodern has joined #ruby
vlad_starkov has quit [Remote host closed the connection]
cascalheira has quit [Quit: Linkinus - http://linkinus.com]
main_ has joined #ruby
ippif has joined #ruby
adambeynon has joined #ruby
templaedhel has joined #ruby
banjara has quit [Quit: Leaving.]
joeycarmello has quit [Ping timeout: 244 seconds]
banjara has joined #ruby
marr has joined #ruby
templaedhel has quit [Read error: Connection reset by peer]
templaedhel has joined #ruby
mmitchel_ has joined #ruby
moos3 has quit [Quit: Textual IRC Client: http://www.textualapp.com/]
shock_one has joined #ruby
templaedhel has quit [Client Quit]
timonv has joined #ruby
chimkan_ has joined #ruby
hoelzro is now known as hoelzro|away
kirun has joined #ruby
statarb3 has joined #ruby
statarb3 has quit [Changing host]
statarb3 has joined #ruby
<hashpuppy> is there an exists method on array that takes a block? looking for something equivalent to states.select{|x| x.abbreviation == "GA"}.length > 0
mneorr has quit [Remote host closed the connection]
ryanf has quit [Read error: Connection reset by peer]
ryanf has joined #ruby
saltcod has quit [Quit: saltcod]
Goles has joined #ruby
colonolGron has joined #ruby
<hashpuppy> .index >= 0 would probably be better, but anyway
<apeiros_> hashpuppy: .find would at least be faster
enebo has joined #ruby
mmitchell has quit [Ping timeout: 256 seconds]
<apeiros_> ah, you can use .any?
sarkis has joined #ruby
<sarkis> can someone help me understand (1..5).map {|n| "riak%02d" % n}) specifically i don't understand the % n part .. does that do a replace of %02d with (1..5)?
<hashpuppy> great! thanks
chimkan has quit [Ping timeout: 255 seconds]
chimkan_ is now known as chimkan
<hashpuppy> dumb question. why isn't any? listed here: http://www.ruby-doc.org/core-1.9.3/Array.html
grzywacz has joined #ruby
grzywacz has quit [Changing host]
grzywacz has joined #ruby
yakko has joined #ruby
<hashpuppy> it's on Enumerable?
havenn has quit [Remote host closed the connection]
<hashpuppy> it'd be nice if the docs also listed the methods in Enumerable
a_a_g has quit [Quit: Leaving.]
ephemerian has joined #ruby
moos3 has joined #ruby
Banistergalaxy has quit [Ping timeout: 246 seconds]
<sarkis> ok nvm i answered my own question, just tested it out :)
Stilo has quit [Quit: Textual IRC Client: www.textualapp.com]
techlife has quit [Read error: Connection reset by peer]
vlad_starkov has joined #ruby
<banisterfiend> hashpuppy: pry is your friend: https://gist.github.com/4658634
apeiros_ has quit [Remote host closed the connection]
techlife has joined #ruby
techlife has quit [Max SendQ exceeded]
swex has quit [Remote host closed the connection]
<hashpuppy> wow. how'd i not know about that
<hashpuppy> thanks
<banisterfiend> hashpuppy: http://pryrepl.org
<hashpuppy> can you use that with rails c?
bean has joined #ruby
swex has joined #ruby
<banisterfiend> hashpuppy: pry-rails
<hashpuppy> thanks, man
techlife has joined #ruby
techlife has quit [Max SendQ exceeded]
elux has joined #ruby
<banisterfiend> just add that to your Gemfile, but also add pry-doc
techlife has joined #ruby
apeiros_ has joined #ruby
ngoldman has quit [Remote host closed the connection]
ngoldman has joined #ruby
ChampS666 has joined #ruby
saltcod has joined #ruby
atmosx has quit [Quit: And so the story goes…]
pcarrier has joined #ruby
angusiguess has joined #ruby
pcarrier has quit [Max SendQ exceeded]
entrenador has joined #ruby
brianpWins has quit [Remote host closed the connection]
ryanf has quit [Remote host closed the connection]
pcarrier has joined #ruby
ryanf has joined #ruby
pcarrier has quit [Max SendQ exceeded]
crazedpsyc has quit [Ping timeout: 248 seconds]
jrist-afk is now known as jrist
crazedpsyc has joined #ruby
pcarrier has joined #ruby
pcarrier has quit [Max SendQ exceeded]
pcarrier has joined #ruby
chimkan has quit [Ping timeout: 252 seconds]
banjara has quit [Quit: Leaving.]
* s1n4 is still looking for a curses-like lib
banjara has joined #ruby
<apeiros_> s1n4: ruby comes with curses
elkclone has quit [Quit: It's never too late to unplug and run.]
<Hanmac> yeah with many curses :D
* Hanmac is one of them :D
<s1n4> apeiros_: I meant a replacement
<s1n4> ;D
<banisterfiend> s1n4: rbcurse doesnt look bad
<banisterfiend> at least teh demos are impressive
* s1n4 hates curses
<s1n4> banisterfiend: does that support unicode?
<banisterfiend> s1n4: i dont know anything about it, i just ran the demos :)
<banisterfiend> but i dont see why not
* Hanmac thinks that CEGUI does not help s1n4 :D
Goles has quit [Quit: Computer has gone to sleep.]
elkclone has joined #ruby
Goles has joined #ruby
inokenty has quit [Quit: Leaving.]
* s1n4 is tired of anything as Hanmac thinks :D
blaxter has quit [Quit: foo]
Elhu has joined #ruby
nat2610 has joined #ruby
<s1n4> :|
<s1n4> how people make cli tools using ruby? :|
joofsh has quit [Remote host closed the connection]
<s1n4> lack of good TUI :|
zph has quit [Quit: Computer has gone to sleep.]
* Hanmac uses real GUI tools for my programs
<shock_one> the same as with another languages, using ncurses
zph has joined #ruby
<spider-mario> s1n4: I’ve read Trollop is good
vlad_starkov has quit [Remote host closed the connection]
* s1n4 is gonna have a look at Trollop
renanoronfle has quit [Quit: This computer has gone to sleep]
banjara has quit [Quit: Leaving.]
banjara has joined #ruby
pcarrier has quit []
banjara has quit [Client Quit]
banjara has joined #ruby
entrenador has quit [Quit: Colloquy for iPad - http://colloquy.mobi]
Pandaen has quit [Ping timeout: 245 seconds]
zph has quit [Client Quit]
andrewhl has quit [Remote host closed the connection]
baphled has joined #ruby
zph has joined #ruby
havenn has joined #ruby
arietis has joined #ruby
Skylab has quit [Quit: Skylab]
ryannielson has quit [Quit: ryannielson]
daniel_-_ has joined #ruby
hakunin_ has joined #ruby
elfenars has joined #ruby
maxmanders has quit [Quit: Textual IRC Client: www.textualapp.com]
amacleod has joined #ruby
daniel_- has quit [Ping timeout: 240 seconds]
poikon has quit [Remote host closed the connection]
elfenars has left #ruby [#ruby]
elfenars has joined #ruby
mneorr has joined #ruby
Rizzle has quit [Ping timeout: 255 seconds]
<amacleod> Is there an Array method that combines the powers of select and collect?
<amacleod> I looked but didn't see anything obvious.
ahokaomaeha has quit [Quit: When I come back, please tell me in what new ways you have decided to be completely wrong.]
elfenars has left #ruby [#ruby]
<amacleod> I want something like my_array.collect { |x| x.cool? ? x.nifty : nil }.compact! but was hoping for one method call instead of two.
whowantstolivef1 has quit [Quit: quit]
hakunin has quit [Read error: Connection reset by peer]
embs has quit [Read error: Connection reset by peer]
embs has joined #ruby
<canton7> nah. #select's block return boolean, while #map's returns anything
<canton7> you could always write one
<amacleod> Yeah. I guess the trouble is deciding on what indicates membership. Sometimes you want map to put nils in the output.
<amacleod> True.
<canton7> yeah
* amacleod toddles off to write Array#filtermap.
Skylab has joined #ruby
nicoulaj has joined #ruby
<canton7> tbh since they're both method calls you could do my_array.select(&:cool?).map(&:nifty) and save yourself some space :P
ngoldman has quit [Remote host closed the connection]
<amacleod> Oh, yeah.
HAKEON has joined #ruby
dekroning has quit [Ping timeout: 255 seconds]
<amacleod> I haven't used that & syntax much, but that would simplify things a lot.
<canton7> I don't like it that much personally
baphled has quit [Ping timeout: 244 seconds]
niklasb has quit [Ping timeout: 256 seconds]
atmosx has joined #ruby
pkuyken has joined #ruby
<otters> anybody use rbenv and have a problem with .irbrc not executing?
alv-r- has quit [Quit: Konversation terminated!]
dougireton has quit [Quit: Leaving.]
eldariof has quit []
joeycarm_ has quit [Ping timeout: 252 seconds]
joeycarmello has joined #ruby
aaronmacy has quit [Quit: Leaving.]
<robacarp> rbenv. hah.
zeromodulus has joined #ruby
<postmodern> otters, i have not heard of that one
<atmosx> hah
failshell has quit [Remote host closed the connection]
jaygen has quit [Remote host closed the connection]
io_syl has quit [Quit: Textual IRC Client: www.textualapp.com]
kpshek has quit []
Vert has joined #ruby
<zeromodulus> Has anyone had Homebrew work with Xcode 4.6?
Steppen has joined #ruby
moshee has quit [Ping timeout: 240 seconds]
moshee has joined #ruby
moshee has quit [Changing host]
moshee has joined #ruby
chimkan has joined #ruby
kpshek has joined #ruby
<apeiros_> amacleod: also you do absolutely NOT want to use compact! here: x = foo.select { … }.compact!
<apeiros_> the reason being that compact! can return nil
freakazoid0223 has quit [Quit: Leaving]
<apeiros_> [1,2,3].compact! # => nil
<apeiros_> in general, you do NOT want to use bang methods if you want the return value.
<amacleod> apeiros_, ah, right. Mixing my mutable metaphors.
antonioh has joined #ruby
antonioh is now known as tuxillo
<tuxillo> hi
<tuxillo> how do I see if an INSERT failed while using ruby 1.9 + sqlite3?
<amacleod> So I could do blah = foo.map(whatever); blah.compact!
<banisterfiend> apeiros_: are you into studio ghibli?
reinaldob has joined #ruby
<apeiros_> banisterfiend: I think you've already asked me that ;-) and yes, they made some nice movies.
<amacleod> Probably better to do newblah = blah.select(condition).map(transformation) since I know the condition ahead of time.
<apeiros_> banisterfiend: how's sc2 so far?
<shock_one> amacleod, blah = foo.map(whatever).compact
<banisterfiend> apeiros_: did i tell u they recently collaborated on a video game?
<apeiros_> I think so, yes
<banisterfiend> ah ok..
* banisterfiend needs to get new material
<apeiros_> I don't remember which one
<apeiros_> but I've got a headache, which usually impedes my memory
<shock_one> amacleod, if you need select with map, use grep with block
<otters> is there a constant in irb for where it searches for .irbrc?
<apeiros_> shock_one: how's grep == select+map?
<amacleod> grep, hmmm
<shock_one> apeiros_, grep *with block*
<apeiros_> grep is only a specialized select
<amacleod> Is grep a method of Enumerable?
<shock_one> apeiros_, you're wrong
io_syl has joined #ruby
Xeago has quit [Remote host closed the connection]
dougireton has joined #ruby
<apeiros_> interesting, I expected grep with a block to behave similar to other such methods and return nil
<apeiros_> shock_one: anyway, the selecting is rather limited
<apeiros_> (can only use a === expression)
<apeiros_> amacleod: yes
joshman_ has quit [Ping timeout: 244 seconds]
c0rn has joined #ruby
<amacleod> Eh, yeah. I don't think grep would suit my purposes, since it's not equality that I want to select on, but rather just a single aspect of each item.
<s1n4> how do I print unicode chars using curses? :(
<shock_one> >> puts ['some', 3, 'text'].grep(String) {|x| x.upcase}
<eval-in> shock_one: Output: "SOME\nTEXT\n" (http://eval.in/7876)
atno has joined #ruby
rkneufeld has quit [Quit: Computer has gone to sleep.]
rmartin has quit [Remote host closed the connection]
jackyalcine has joined #ruby
jackyalcine has joined #ruby
jackyalcine has quit [Changing host]
vlad_starkov has joined #ruby
reinaldob has quit [Remote host closed the connection]
bean has quit [Quit: Textual IRC Client: www.textualapp.com]
dougireton has quit [Client Quit]
ngoldman has joined #ruby
psyprus has joined #ruby
<shock_one> amacleod, then use filter+map. Bang versions work faster by the way
Xeago has joined #ruby
<amacleod> Good to know. :)
<apeiros_> banisterfiend: why only 360p =(
mmitchel_ has quit [Remote host closed the connection]
<amacleod> I like the idea of "partial functions" like in Scala, which are essentially just a tuple of a predicate for the domain and the function itself.
<banisterfiend> apeiros_: ign sucks that way
banjara has quit [Quit: Leaving.]
mmitchell has joined #ruby
banjara has joined #ruby
didge has quit [Ping timeout: 256 seconds]
dougireton has joined #ruby
_bart has quit [Quit: _bart]
<shock_one> amacleod, are you talking about currying? Because it works not so good in Scala.
<apeiros_> banisterfiend: looks nice
joofsh has joined #ruby
<amacleod> shock_one, nah, that currying-like behavior in Scala is partial application.
Skylab has quit [Quit: Skylab]
baphled has joined #ruby
<apeiros_> banisterfiend: do you know whether they plan to release it for windows/mac too?
rtkl has joined #ruby
zph has quit [Quit: Computer has gone to sleep.]
<shock_one> amacleod, I hate that I should embrace each parameter separately.
<amacleod> Partial functions is like you could define something like divideBy = PartialFunction.new(number_nonzero?, divideby)
joofsh has quit [Remote host closed the connection]
<amacleod> shock_one, haha yeah, some of Scala's syntax and syntactic sugar is downright weird.
<banisterfiend> apeiros_: nah it's ps3 only afaict (and DS)
<apeiros_> :-/
<apeiros_> don't intend to buy a ps3
<banisterfiend> apeiros_: it's a jrpg
<banisterfiend> so their primary audience is japan
<Xeago> what is a jrpg
<amacleod> So in the example, the PF "divideBy" would know that 0 isn't in its domain.
<apeiros_> japan role play game
<Xeago> ah
<banisterfiend> apeiros_: im not sure japanese game on PCs
<apeiros_> *japanese
<shock_one> amacleod, I understand the reason — they can't make both function overloading and currying. But I still hate it.
<Xeago> what is currying?
<apeiros_> banisterfiend: well, they got the jp to port xenoblade, the last story and pandoras tower to english
<shock_one> Xeago, google it
wudofyr_ has quit [Read error: Connection reset by peer]
Pandaen has joined #ruby
wudofyr_ has joined #ruby
<apeiros_> so there's some hope
dallasm has quit [Remote host closed the connection]
__BigO__ has quit [Remote host closed the connection]
<banisterfiend> Xeago: applies one parameter to the callable and returns a new callable with n -1 parameters
<amacleod> Xeago, practically speaking, it's returning a function from a function in such a way that arguments to the outer function are captured within the definition of the inner.
poikon has joined #ruby
Steppen has quit [Quit: KVIrc 4.1.3 Equilibrium http://www.kvirc.net/]
<apeiros_> Xeago: also Proc#curry as of 1.9
<elux> so ive just read in an older blog post that Timeout.timeout spawns a new thread each time it runs a block.. i had no idea.. i checked Net::HTTP .. and it looks like it uses a Timeout as well for when opening connections.
clocKwize has quit [Quit: clocKwize]
<Xeago> Builder.new().cola(5).fanta(4).buy!
<Xeago> ?
<elux> i just want to make sure im understanding this correctly.. but for 1.9.3 (mri), jruby and other ruby vm's .. a new thread is spawned to carry out a connection within a Timeout.timeout() .. ? that kinda sucks..
arietis has quit [Quit: Computer has gone to sleep.]
Steppen has joined #ruby
vlad_starkov has quit [Ping timeout: 276 seconds]
otters has quit [Ping timeout: 256 seconds]
<elux> based on the source that ive read of net/http.rb and timeout.rb .. its pretty clear that is exactly what is happening.. im quite surprised
<amacleod> Currying is cool because it means that you can express the same computational structures using single-parameter functions and sequential calling as you can with multi-parameter functions.
jackyalcine has quit [Quit: Quit]
havenn has quit [Remote host closed the connection]
jackyalcine_ has joined #ruby
shtirlic has quit [Remote host closed the connection]
jackyalcine_ is now known as jalcine
niklasb has joined #ruby
pewter_tao has left #ruby [#ruby]
baphled has quit [Ping timeout: 244 seconds]
benlieb has quit [Quit: benlieb]
clocKwize has joined #ruby
Elhu has quit [Quit: Computer has gone to sleep.]
osaut has quit [Quit: osaut]
<amacleod> Xeago, more like howmany = quantify(4); pop = howmany("fanta"); pop(:buy)
benlieb has joined #ruby
joofsh has joined #ruby
arietis has joined #ruby
<Xeago> what is the effective use of that?
poikon has quit [Ping timeout: 256 seconds]
<Xeago> making(nested(expressions(possible?))))
<amacleod> Xeago, in most cases, multi-parameter methods are just easier to use, but currying can be handy in certain situations.
<Mon_Ouie> Higher order functions mostly. e.g. map (+5) [1, 2, 3] # no need to explicitly create an anonymous function/block in Ruby
<amacleod> Right--if you've got something like map that expects a single-argument function, then you have to find a way to give it what it wants.
Elhu has joined #ruby
otters has joined #ruby
<amacleod> It can also be handy if you want to store a handful of operations that differ in some parameter.
ebobby has quit [Ping timeout: 256 seconds]
preller has quit [Quit: Lost terminal]
<amacleod> something like op_sequence = [ delayedReplace("foo", "bar"), delayedDelete("baz") ]
shock_one has quit [Ping timeout: 240 seconds]
<amacleod> if delayedReplace and delayedDelete both return a 1-arg function, you can use the same code to apply them to whatever is having things replaced and deleted in/from it.
edilsrevoc has joined #ruby
<amacleod> (and chances are that code that applies them is some variant of map)
edilsrevoc has quit [Remote host closed the connection]
chimkan has quit [Quit: chimkan]
preller has joined #ruby
preller has quit [Changing host]
preller has joined #ruby
aaronmacy has joined #ruby
nat2610 has quit [Quit: Leaving.]
mercwithamouth has quit [Ping timeout: 256 seconds]
nat26101 has joined #ruby
c0rn has quit [Quit: Computer has gone to sleep.]
reinaldob has joined #ruby
jalcine is now known as JackyAlcine
angusiguess has quit [Ping timeout: 276 seconds]
Villadelfia has quit [Read error: Connection reset by peer]
benlieb has quit [Quit: benlieb]
reinaldob has quit [Remote host closed the connection]
elaptics is now known as elaptics`away
bricker_ has joined #ruby
chimkan has joined #ruby
SeySayux has quit [Ping timeout: 255 seconds]
blaxter has joined #ruby
bricker has quit [Ping timeout: 240 seconds]
benlieb has joined #ruby
SeySayux has joined #ruby
baphled has joined #ruby
edilsrevoc has joined #ruby
thufir_ has joined #ruby
clocKwize has quit [Quit: clocKwize]
arietis has quit [Quit: Textual IRC Client: http://www.textualapp.com/]
edilsrevoc has quit [Remote host closed the connection]
timonv has quit [Ping timeout: 264 seconds]
yfeldblum has quit [Ping timeout: 246 seconds]
c0rn has joined #ruby
Villadelfia has joined #ruby
ner0x has quit [Ping timeout: 255 seconds]
dougireton has quit [Quit: Leaving.]
timonv has joined #ruby
bricker_ is now known as bricker
answer_42 has quit [Remote host closed the connection]
rakl has joined #ruby
edilsrevoc has joined #ruby
edilsrevoc has quit [Remote host closed the connection]
mephux has quit [Excess Flood]
hashpuppy has left #ruby [#ruby]
thufir_ has quit [Remote host closed the connection]
mneorr has quit [Remote host closed the connection]
dustint has quit [Quit: Leaving]
reinaldob has joined #ruby
chrismhough has quit [Quit: chrismhough]
bluOxigen has quit [Ping timeout: 240 seconds]
ngoldman has quit [Ping timeout: 256 seconds]
carloslopes has quit [Remote host closed the connection]
mephux has joined #ruby
dougireton has joined #ruby
poikon has joined #ruby
banjara has quit [Quit: Leaving.]
banjara has joined #ruby
<mehwork> how do you say: x = y if defined? y
ahokaomaeha has joined #ruby
<mehwork> y is nil right now and x ends up being nil
ChampS666 has quit [Ping timeout: 255 seconds]
nomenkun has quit [Remote host closed the connection]
amoeba has joined #ruby
kylescottmcgill has quit [Quit: WeeChat 0.3.8]
wudofyr_ has quit [Remote host closed the connection]
wudofyr_ has joined #ruby
mockra has quit [Remote host closed the connection]
ngoldman has joined #ruby
<banisterfiend> mehwork: basically y will always be defined
<banisterfiend> mehwork: well is y a method?
<banisterfiend> or a local?
<mehwork> local var
<banisterfiend> if it's a local it's guaranteed to be defined
<banisterfiend> if it's defined in at least one code-path
<banisterfiend> if it's assigned to*
<amacleod> mehwork, what's the desired behavior?
arya has quit [Ping timeout: 248 seconds]
ner0x has joined #ruby
generalissimo has quit [Remote host closed the connection]
joshman_ has joined #ruby
nopolitica has joined #ruby
banjara has quit [Quit: Leaving.]
<amacleod> If I needed to distinguish between "set to nil" and "never set", I might use a hash and has_key?
psyprus has quit [Ping timeout: 248 seconds]
banjara has joined #ruby
zigomir_ has joined #ruby
gvz has joined #ruby
thone has joined #ruby
bcuz has joined #ruby
<workmad3> amacleod: you can also access the hash with '.fetch'
arya has joined #ruby
<workmad3> amacleod: e.g. hsh.fetch(:foo, "default") will return the string "default" if the key :foo isn't set, but if it was set to nil, you would get nil
psyprus has joined #ruby
beiter has quit [Quit: beiter]
rtkl has left #ruby [#ruby]
thone_ has quit [Read error: Operation timed out]
aquaranto has quit []
edilsrevoc has joined #ruby
bcuz has left #ruby [#ruby]
edilsrevoc has quit [Excess Flood]
mrc_ has joined #ruby
mark_locklear has quit [Quit: Leaving]
benlieb has quit [Quit: benlieb]
MattRB has joined #ruby
mephux has quit [Excess Flood]
<amacleod> Needing to distinguish between nil and "never set" is a bad code smell to me, though, so I'd probably try to refactor so I didn't need to rely on that information.
chrismhough has joined #ruby
carloslopes has joined #ruby
mephux has joined #ruby
<workmad3> amacleod: it's mostly useful for defaults
ner0x has quit [Ping timeout: 276 seconds]
edilsrevoc has joined #ruby
edilsrevoc has quit [Excess Flood]
<workmad3> amacleod: e.g. an option that defaults to on/true, and could be turned off by passing nil or false
mengu has quit [Ping timeout: 260 seconds]
banjara has quit [Quit: Leaving.]
edilsrevoc has joined #ruby
edilsrevoc has quit [Excess Flood]
banjara has joined #ruby
dr_neek has joined #ruby
moos3 has quit [Quit: Computer has gone to sleep.]
geekbri has quit [Remote host closed the connection]
arya has quit [Ping timeout: 276 seconds]
elico1 has joined #ruby
elico has quit [Read error: Connection reset by peer]
banjara has quit [Client Quit]
mockra has joined #ruby
banjara has joined #ruby
timonv_ has joined #ruby
timonv has quit [Read error: Connection reset by peer]
sailias has quit [Ping timeout: 240 seconds]
atmosx has quit [Quit: And so the story goes…]
dallasm has joined #ruby
tatsuya_o has joined #ruby
chussenot has joined #ruby
edilsrevoc has joined #ruby
edilsrevoc has quit [Remote host closed the connection]
robotmay has joined #ruby
ahokaomaeha has quit [Quit: When I come back, please tell me in what new ways you have decided to be completely wrong.]
ippif has quit [Quit: Textual IRC Client: www.textualapp.com]
yfeldblum has joined #ruby
arya has joined #ruby
Guest123 has quit [Quit: Textual IRC Client: http://www.textualapp.com/]
adambeynon has quit [Quit: ["Textual IRC Client: www.textualapp.com"]]
tatsuya_o has quit [Remote host closed the connection]
enroxorz-work has quit [Quit: KVIrc 4.2.0 Equilibrium http://www.kvirc.net/]
segv-_ has quit [Read error: Connection reset by peer]
doug has joined #ruby
segv- has joined #ruby
<doug> is there something like a "with" for hashes?
edilsrevoc has joined #ruby
edilsrevoc has quit [Excess Flood]
edilsrevoc has joined #ruby
edilsrevoc has quit [Remote host closed the connection]
<invisime> doug: you asking about rspec?
<doug> that'll translate hash keys to local references...
edilsrevoc has joined #ruby
edilsrevoc has quit [Excess Flood]
<doug> variables, defs, whatever
<doug> not rspec
JackyAlcine has quit [Read error: Connection reset by peer]
jackyalcine_ has joined #ruby
ahokaomaeha has joined #ruby
<doug> gotta hash, gotta bunch of hashvar['key1'] .. hashvar['key2'] ... hashvar['key3'] ... mentions
<invisime> doug: you could do something like this: http://pullmonkey.com/2008/01/06/convert-a-ruby-hash-into-a-class-object/
<doug> would rather just with hashvar do .. key1 ... key2 .. key3 .. end
<invisime> basically, it just uses reflection to accomplish what you're talking about by initializing an object with the hash.
arya has quit [Ping timeout: 252 seconds]
emergion has joined #ruby
schaerli has quit [Remote host closed the connection]
lkba has joined #ruby
<doug> figured that's how it'd be done, also figured someone (rails?) mighta wrapped that up already
edilsrevoc has joined #ruby
edilsrevoc has quit [Excess Flood]
<invisime> I think the ActiveRecord stuff does something like that already for the database columns, but the solution in that blog is smaller and more universal.
edilsrevoc has joined #ruby
<invisime> depends on what you need it for.
edilsrevoc has quit [Remote host closed the connection]
<invisime> whoa. when did it get to be after 5?
<invisime> I'm heading home.
<invisime> hope that helped. :-)
emmanuelux has joined #ruby
<doug> thanks
invisime has quit [Quit: Leaving.]
edilsrevoc has joined #ruby
ner0x has joined #ruby
edilsrevoc has quit [Read error: Connection reset by peer]
<heftig> ew
mneorr has joined #ruby
<doug> was kinda hoping for something that wouldn't pull along more lines of code than i'm trying to shorten
<heftig> define_method kills caches
<heftig> DO NOT call that in a hotspot
<heftig> even better yet, not at all after runtime setup
edilsrevoc has joined #ruby
tlvb has quit [Ping timeout: 240 seconds]
banjara has quit [Quit: Leaving.]
banjara has joined #ruby
<amacleod> The idea is to inject a hash's members into the variable namespace within the confines of a block?
v0n has quit [Ping timeout: 255 seconds]
havenn has joined #ruby
chussenot has quit [Quit: chussenot]
<doug> that'd be cool
timonv has joined #ruby
edilsrevoc1 has joined #ruby
timonv_ has quit [Read error: Connection reset by peer]
<doug> or whatever ruby calls evaluable tokens, maybe not variables specifically.
jslowe has quit [Quit: Leaving]
megha has quit [Read error: Operation timed out]
arya has joined #ruby
blacktulip has quit [Remote host closed the connection]
idkazuma has joined #ruby
haxrbyte has joined #ruby
edilsrevoc has quit [Ping timeout: 255 seconds]
ner0x has quit [Ping timeout: 245 seconds]
etcetera has quit []
<apeiros_> doug: hash.merge key: value, other_key: value
<apeiros_> or rather merge!, if you don't reassign/want in-place
guns has joined #ruby
etcetera has joined #ruby
wudofyr_ has quit [Remote host closed the connection]
wudofyr_ has joined #ruby
RagingDave has quit [Quit: Ex-Chat]
Xeago has quit [Remote host closed the connection]
poikon has quit [Remote host closed the connection]
Xeago has joined #ruby
haxrbyte_ has joined #ruby
<amacleod> Could the define_method stuff from that blog post be converted to use method_missing?
carloslopes has quit [Remote host closed the connection]
rezzack has joined #ruby
nimred has quit [Ping timeout: 256 seconds]
mkinitrd has joined #ruby
arya has quit [Ping timeout: 256 seconds]
haxrbyte has quit [Ping timeout: 256 seconds]
tlvb has joined #ruby
theRoUS has quit [Ping timeout: 246 seconds]
Morkel has quit [Quit: Morkel]
fourq has quit [Quit: Lost terminal]
carlyle has quit [Remote host closed the connection]
carlyle has joined #ruby
atmosx has joined #ruby
ahokaomaeha has quit [Quit: When I come back, please tell me in what new ways you have decided to be completely wrong.]
[Neurotic] has joined #ruby
louisror has quit [Ping timeout: 244 seconds]
otherj has joined #ruby
louisror has joined #ruby
kpshek has quit []
Skylab has joined #ruby
emergion has quit [Quit: Computer has gone to sleep.]
benlieb has joined #ruby
griffindy has quit [Quit: Computer has gone to sleep.]
benlieb has quit [Client Quit]
otherj has quit [Client Quit]
Xeago has quit [Ping timeout: 276 seconds]
mneorr has quit [Remote host closed the connection]
carlyle has quit [Ping timeout: 245 seconds]
mneorr has joined #ruby
ner0x has joined #ruby
megha has joined #ruby
arya has joined #ruby
nicoulaj has quit [Remote host closed the connection]
phantasm66 has quit [Quit: *sleeeep….]
ner0x has quit [Ping timeout: 264 seconds]
<carlzulauf> Anyone have a favorite tool for stress testing a web server? Doesn't have to be ruby-based, but that would make the learning curve lower.
v0n has joined #ruby
danshultz has quit [Remote host closed the connection]
<carlzulauf> examining tourbus, but just started looking
Steppen has quit [Quit: Leaving]
danshultz has joined #ruby
<spider-mario> carlzulauf: siege
brianpWins has joined #ruby
<spider-mario> possibly with the --benchmark option
arya has quit [Ping timeout: 248 seconds]
zigomir_ has quit [Quit: zigomir_]
Pandaen has quit [Read error: Connection reset by peer]
spider-mario has quit [Read error: Connection reset by peer]
tatsuya_o has joined #ruby
doug has left #ruby [#ruby]
kpshek has joined #ruby
elico1 is now known as elico
jtharris has quit [Quit: WeeChat 0.3.9.2]
jrafanie has joined #ruby
arya has joined #ruby
interactionjaxsn has quit [Remote host closed the connection]
<carlzulauf> simple C utility. perfect.
anonymuse has joined #ruby
atmosx has quit [Quit: And so the story goes…]
* carlzulauf sudo apt-get install siege
<carlzulauf> I love FOSS
swills has left #ruby [#ruby]
motto has joined #ruby
arya has quit [Ping timeout: 248 seconds]
mephux has quit [Excess Flood]
zeade has quit [Quit: Leaving.]
enebo has quit [Quit: enebo]
zeade has joined #ruby
mephux has joined #ruby
m8 has quit [Ping timeout: 245 seconds]
frowni has joined #ruby
<frowni> is it possible to write a 'ircii' style client with ruby for linux?
jeffreybaird has quit [Quit: jeffreybaird]
<carlzulauf> sure, its possible
<carlzulauf> and don't you mean irssi?
<frowni> yea irssi..typo :P
Mon_Ouie has quit [Ping timeout: 252 seconds]
<carlzulauf> oh. ircii is a real thing. i use irssi. All these years didn't know there was a difference.
havenn is now known as haven_
edilsrevoc1 has quit [Remote host closed the connection]
haven_ has left #ruby ["Leaving..."]
haven_ has joined #ruby
<frowni> i want to learn programming and ruby seems fun. irc client is something i always wanted to write :P
haven_ has quit [Remote host closed the connection]
havenn has joined #ruby
ilovemyherbz has joined #ruby
havenn is now known as havenwood
<carlzulauf> hmm... ircii has the better license. maybe I should switch.
<frowni> maybe you should :P
nkr has quit [Quit: Linkinus - http://linkinus.com]
<frowni> Is there a popular book for non-programmers to learn Ruby? I should order one.
alanp has quit [Read error: Connection reset by peer]
<carlzulauf> Yes, there are many popular books that do that. There are even a few free ones.
HAKEON has quit [Quit: HAKEON]
jrafanie has quit [Quit: jrafanie]
alanp has joined #ruby
DaltonUS has quit [Quit: DaltonUS]
breakingthings has quit [Ping timeout: 255 seconds]
nari has joined #ruby
dmiller has joined #ruby
<carlzulauf> if you want a quick introduction, check out tryruby.org ... takes about 15 minutes
danshultz has quit [Remote host closed the connection]
apeiros_ has quit [Remote host closed the connection]
emergion has joined #ruby
<ilovemyherbz> @frowni: I was just gonna recommend try ruby as well, if you want a BOOK, try Why's Poignant guide to Ruby
<carlzulauf> Here are a couple free books. Books like the famous pickaxe book are not expensive.
miskander has quit [Quit: miskander]
tenmilestereo has quit [Quit: Leaving]
clooth has quit [Quit: clooth]
haxrbyte has joined #ruby
haxrbyte_ has quit [Read error: Connection reset by peer]
<carlzulauf> why's guide is amazingly fun to read
psyprus has quit [Ping timeout: 248 seconds]
Myconix has quit [Ping timeout: 252 seconds]
<carlzulauf> the ruby he teaches is powerful, but also strange, and a little outdated
<frowni> http://mislav.uniqpath.com/poignant-guide/book/chapter-2.html ...lol this seems fun :) let me start with this
<ilovemyherbz> it is a blast. have fun
<frowni> thanx a bunch for all the recommendations~!~
_bart has joined #ruby
jerius has quit [Ping timeout: 246 seconds]
ilovemyherbz has quit [Read error: Connection reset by peer]
HAKEON has joined #ruby
banjara has quit [Quit: Leaving.]
banjara has joined #ruby
ilovemyherbz has joined #ruby
haxrbyte_ has joined #ruby
_bart has left #ruby [#ruby]
stayarrr has quit [Quit: Linkinus - http://linkinus.com]
noxoc has quit [Quit: noxoc]
atno has quit [Quit: Get MacIrssi - http://www.sysctl.co.uk/projects/macirssi/]
haxrbyte has quit [Ping timeout: 252 seconds]
ilovemyherbz has quit [Read error: Connection reset by peer]
<nate_h> is there a common accepted way to do a for loop with a step size in the iterator? is it just (0..last).step(int) ?
<carlzulauf> Awesome. I didn't realize ruby came with a terminal ui building tool in its standard lib. Curses <3
axl_ has quit [Quit: axl_]
chrisja has joined #ruby
aaronmacy has quit [Quit: Leaving.]
<bricker> `a && b || c` the same as `(a && b) || c`, or `a && (b || c)`
<amacleod> I think the former, but I'm not sure.
<amacleod> My assumption is that && and || have equal precedence and are left-associative.
<carlzulauf> nate_h: that's the most common way I know of
<bricker> that's what I guessed to amacleod
<nate_h> k
<havenwood> && has a precedence one higher than ||
andrewhl has joined #ruby
<amacleod> bricker, you could determine it (at least) two ways: empirically, and reading the docs.
<bricker> amacleod: I have done both and it's still unclear to me
<amacleod> havenwood, ah. Ok. I guess that's convenient for something like big && tasty || chilly && refreshing
philcrissman has quit [Remote host closed the connection]
<nate_h> carlzulauf, is there a difference between these loop syntaxes ? http://pastie.org/5919467
crazed has joined #ruby
timonv_ has joined #ruby
<bricker> amacleod: I'll forget this in a week though :D
<bricker> amacleod: then mixing in "and" / "or" in there is what gets me all messed up
<carlzulauf> nate_h: yes, the first one works. the second one doesn't.
aaronmacy has joined #ruby
<nate_h> carlzulauf, but i've seen examples of that second syntax
<crazed> hm, can anyone suggest a safe way to do Open.popen3('somefile') {|i,o,e} # blah}, with a Signal trap for the TERM/INT signals? i want to close stdin/out/err gracefully
<carlzulauf> but if you moved |i| inside of the block and got the second example working, then they would be the same. Just two different block syntaxes.
timonv has quit [Ping timeout: 244 seconds]
<amacleod> bricker, if you have a bad memory and are in doubt, adding parentheses works.
<bricker> for example, `self.slug.empty? and self.pending? || self.published?` - I *think* I know what that's going to do, but I would like to not have to second-guess myself
<amacleod> The worst that can happen is someone reading your code will poke fun at you for not remembering precedence rules.
<bricker> amacleod: yeah I know I can always do that, but it seems like that's just a way around not learning it properly
Guest69351 is now known as _veer
_veer has quit [Changing host]
_veer has joined #ruby
emergion has quit [Quit: Computer has gone to sleep.]
<nate_h> carlzulauf, would that only work with (0..5).step |i| { p i }
<nate_h> step vs each?
<amacleod> bricker, there's something to be said for memorizing the rules, but there's also something to be said for writing code that you and your colleagues can understand a month later without scratching your heads.
<bricker> amacleod: good point
<nate_h> carlzulauf, because this is right from the ruby reference range.step(2) {|x| puts x}
<amacleod> One thing I like to do (but maybe some people wouldn't like) is to bust things out into separate lines.
mmitchell has quit [Ping timeout: 255 seconds]
<whitequark> bricker: && is a boolean product, || is a boolean sum
timonv_ has quit [Ping timeout: 240 seconds]
<carlzulauf> nate_h: I was just pointing out your syntax error. |i| goes inside the block. (0..5).step{|i| p i }
<amacleod> For example: unwashed = dirt > 3; sticky = viscous && porous; disgusting = unwashed && sticky
Asher has quit [Quit: Leaving.]
<beaky> what is the difference between && and and, || and or, and ! and not?
<amacleod> whitequark, neat.
<whitequark> beaky: not = !, and/or have same precedence and it's way lower than arithmetics and boolean operators.
<beaky> ah
<beaky> which ones should I use?
<whitequark> http://www.techotopia.com/index.php/Ruby_Operator_Precedence for everyone in this discussion
workmad3 has quit [Ping timeout: 244 seconds]
<whitequark> beaky: avoid and/or.
<carlzulauf> nate_h: both examples you provided are examples of passing a ruby "block" to a method. It just so happens that your second example had an error, but otherwise they are the same thing, just different syntax.
<nate_h> carlzulauf, ahh i gotcha :) I was just wondering why there is a shortcut to remove the do, if it acted any different. It seems like there are WAY too many ways to form loops
<whitequark> beaky: they were only a source of bugs and confusions in the projects I've seen.
Hanmac1 has quit [Quit: Leaving.]
<carlzulauf> nate_h: ruby is one of the most flexible programming languages around. there are tons of ways to do everything. none of them wrong.
<bricker> whitequark: that is a very helpful description, thank you
Hanmac1 has joined #ruby
<nate_h> carlzulauf, yeah, i guess its like perl, its best to form a code style guide for projects/companies so that its easy to share code.
poikon has joined #ruby
haxrbyte_ has quit [Remote host closed the connection]
<carlzulauf> nate_h: yeah. we use the github style guide where I work
_nitti has quit [Remote host closed the connection]
<whitequark> ^ that
Kuifje has quit [Ping timeout: 246 seconds]
<beaky> what is the difference between require and include?
zigomir has quit [Ping timeout: 276 seconds]
<beaky> I guess require is textual substitution
<carlzulauf> beaky: one throws an error
<beaky> ah
<bricker> ohh ohh I know this one
<bricker> awwww
Skylab has quit [Quit: Skylab]
<nate_h> carlzulauf, yep, thanks looking that now :)
<carlzulauf> i think?
<bricker> beaky: require is for files, include is for modules
<whitequark> beaky: require checks if the file is in $LOADED_FEATURES, if not, `load's it
Xeago has joined #ruby
<whitequark> beaky: include adds the module to the inheritance chain of the current class/module
<whitequark> completely different.
<carlzulauf> oh. lol. how dare I mix up ruby with php
jgarvey has quit [Quit: Leaving]
<beaky> ah
<bricker> "The and and or keywords are banned. It's just not worth it. Always use && and || instead."
<bricker> why would the styleguide say that?
<whitequark> bricker: because the weird precedence rules lead to bugs.
<carlzulauf> bricker: because there are strange order of precedence issues
<carlzulauf> 'and' and 'or' have lower precedence than && and ||
cozby has quit [Remote host closed the connection]
<amacleod> As does not.
stopbit has quit [Quit: Leaving]
Xeago has quit [Remote host closed the connection]
<bricker> carlzulauf: I know, and that is useful in many cases
<whitequark> they have lower precedence than almost everything
<amacleod> So like, what does (not fun && sexy) mean?
zastern has quit [Remote host closed the connection]
<carlzulauf> bricker: yeah, but it can be confusing to other developers if you are relying on hokey order of precedence rules
<carlzulauf> that few people know or remmber
Xeago has joined #ruby
joshman_ has quit [Ping timeout: 256 seconds]
<whitequark> I fucking hate when coffeescript programmers go into our rails codebase and place ands and ors and nots here and there
<whitequark> and then hell breaks loose
end_guy has quit [Remote host closed the connection]
poikon has quit [Ping timeout: 245 seconds]
<bricker> carlzulauf: that's true. I guess I'm just upset that the styleguide used the word "banned" as if it's absolute blasphemy to use those keywords
<whitequark> protip: don't let the hell break loose.
<carlzulauf> yeah
<whitequark> bricker: it for sure makes sense
<carlzulauf> it rubbed me the wrong way when I first read it
baphled has quit [Ping timeout: 256 seconds]
<bricker> whitequark: well here's another styleguide: "Use &&/|| for boolean expressions, and/or for control flow. (Rule of thumb: If you have to use outer parentheses, you are using the wrong operators.)"
<havenwood> It is just Github's internal guide. They aren't trying to mandate anything for the community. Not like they've submitted a patch, and are proposing deprecating and/or.
<bricker> I know they are just "guides"
philcrissman has joined #ruby
<whitequark> bricker: if you come from perl, you know how to use and/or
danshultz has joined #ruby
<whitequark> chances that you're not; most folks come from python/js/etc these days.
<whitequark> so. on a shared codebase, it's not worth it.
<amacleod> !fun && !sexy
<bricker> whitequark: you're right. So you're saying just to use parens always instead of and/or ?
motto has quit [Quit: Sto andando via]
cakehero has joined #ruby
<whitequark> bricker: I simply avoid using &&/|| for nontrivial control flow which would require parentheses.
<whitequark> foo && foo.val? is fine
<amacleod> whitequark, if it's nontrivial, make a predicate?
end_guy has joined #ruby
<whitequark> "perform or render template: 'error'" isn't
* amacleod groans at the "or do this" idiom.
<beaky> are parentheses in method calls optional?
<whitequark> beaky: yep
<beaky> >> p :foo, :bar
<eval-in> beaky: Output: ":foo\n:bar\n" (http://eval.in/7884)
<beaky> wow :D
<havenwood> Seems to me that precedence is one of the easy things. Easy to look up if you forget, good to learn.
<whitequark> amacleod: also "render foo and return".
<beaky> it's like haskell
<havenwood> Another quibble I have with Github style guide is banning: unless else
<whitequark> havenwood: I hope I'll never work with your codebase
maletor has quit [Quit: Computer has gone to sleep.]
<whitequark> because that is confusing to 50% of people and perfectly clear to other 50%
<whitequark> and I belong to the first 50% for sure
Ohga has joined #ruby
<beaky> >> 5 unless nil else 4
<eval-in> beaky: Output: "/tmp/execpad-1c62f2ccb513/source-1c62f2ccb513:1: syntax error, unexpected keyword_else, expecting $end\n5 unless nil else 4\n ^\n" (http://eval.in/7885)
<havenwood> whitequark: I don't use unless/else for that reason, I just don't get the confusion. Seems like english to me.
<beaky> O.o
nricciar has quit [Ping timeout: 264 seconds]
Xeago has quit [Ping timeout: 252 seconds]
maletor has joined #ruby
<whitequark> havenwood: the problem is that english is declarative, whereas ruby is imperative
Virunga has quit [Remote host closed the connection]
segv- has quit [Quit: segv-]
nateberkopec has quit [Quit: Linkinus - http://linkinus.com]
Xeago has joined #ruby
<Ohga> Greetings. Does anyone have experience with therubyracer in the context of windows?
Asher has joined #ruby
<beaky> how do I run an external program under ruby?
kirun has quit [Quit: Client exiting]
<beaky> e.g. invoke gcc from ruby
<whitequark> beaky: system "gcc file.c"
<beaky> ah
<havenwood> whitequark: Do you dislike `unless foo? && bar?` as well?
mengu has joined #ruby
<nate_h> i wonder if there is some clever way to figure out what "step #" you are on, while you are stepping
<whitequark> havenwood: depends on context, but when in doubt, I change it to if and nots.
Kingy has joined #ruby
<nate_h> hmm maybe i'm just not thinking of this right..
jonathanwallace has quit [Ping timeout: 255 seconds]
Banistergalaxy has joined #ruby
chimkan has quit [Quit: chimkan]
DrShoggoth has quit [Ping timeout: 264 seconds]
gvz has quit []
<amacleod> nate_h, if you need to know which iteration you're on, it's probably simpler to iterate on that and then use multiples of that as indices into whatever you're iterating over.
danshultz has quit [Ping timeout: 252 seconds]
pcarrier has joined #ruby
arya has joined #ruby
<beaky> what is the difference between Ruby's subset of OOP and the subset of OOP in other languages (C++, Smalltalk, Lisp, Python, PHP, Scala, C#, Java...)?
<amacleod> beaky, that's almost a meaningless question.
<banisterfiend> beaky: ruby's is most similar to smalltalk
psyprus has joined #ruby
<beaky> ah
otherj has joined #ruby
<beaky> every language seems to have very different ideas about OOP :(
mrc_ has quit [Quit: Leaving.]
<amacleod> Different is good, right? :)
nga4 has quit [Ping timeout: 245 seconds]
Virunga has joined #ruby
ngoldman has quit [Remote host closed the connection]
dr_neek has quit [Quit: dr_neek]
<havenwood> amacleod: I don't think PHP's 'different' idea of OO is good. :P
nricciar has joined #ruby
<amacleod> Touche, salesman.
tatsuya_o has quit [Remote host closed the connection]
<amacleod> PHP's purpose is to remind me how good every other language is.
<havenwood> Does Lisp have a concept of OO unless you roll your own?
<whitequark> there isn't a single OOP for there to be a subset of it.
<amacleod> havenwood, it depends.
<whitequark> havenwood: there is also no single Lisp.
ngoldman has joined #ruby
bradleyprice has quit [Remote host closed the connection]
chimkan has joined #ruby
<amacleod> CLOS is purportedly a pretty solid OO system, and I believe a lot of Common Lisp systems currently available come with it bundled.
bradleyprice has joined #ruby
<beaky> I like how in ruby you can monkeypatch classes
tommyvyo has joined #ruby
<amoeba> beaky: with power comes great responsibility, don't overuse
<beaky> right
<havenwood> Yikes, I didn't know there was a dialect of Lisp embedded in Ruby: https://github.com/taw/rlisp
<amacleod> Haha that's excellent.
geggam has quit [Remote host closed the connection]
<whitequark> havenwood: there are numerous
<whitequark> most of them suck, if not all
<nate_h> amacleod, good point
DrShoggoth has joined #ruby
<amacleod> ought I to forward that "good point" to amoeba, or was it about CLOS?
tatsuya_o has joined #ruby
peregrine81 has quit [Quit: Computer sleeping.]
philcrissman has quit [Remote host closed the connection]
arya has quit [Ping timeout: 245 seconds]
ryanh has joined #ruby
ryanh has quit [Max SendQ exceeded]
ryanh has joined #ruby
ryanh has quit [Max SendQ exceeded]
razieliyo has joined #ruby
<razieliyo> hi guys
ryanh has joined #ruby
ryanh has quit [Max SendQ exceeded]
bradleyprice has quit [Ping timeout: 256 seconds]
ryanh has joined #ruby
cantonic has quit [Quit: cantonic]
<havenwood> razieliyo: hey
Elhu has quit [Quit: Computer has gone to sleep.]
stkowski has quit [Quit: stkowski]
<mehwork> is there a convention for where in a file to put BEGIN {} blocks?
<ericwood> I would say at the beginning
<mehwork> i assume either at the very top or the very bottom
<mehwork> ericwood: even above a class definition though?
<ericwood> I don't think it's advised to use those, though...
breakingthings has joined #ruby
emergion has joined #ruby