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]
<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
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.
<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>
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.
<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
<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...
<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
<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?
<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]
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
<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
<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]
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]
<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
<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_>
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)
<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]
<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?
<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
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
<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]
<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]
<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]
<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.
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]
<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)?
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>
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.
<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]
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.]
<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.
<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 }
<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.
<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