twoism has quit [Read error: Connection reset by peer]
jeekl has joined #ruby
twoism has joined #ruby
<ryanf>
is there any reason to use inject instead of map/collect for either of those?
ptwobrussell has quit [Quit: ptwobrussell]
enjoy-a has joined #ruby
DanKnox is now known as DanKnox_away
lkba has joined #ruby
kvirani has quit [Remote host closed the connection]
<mostlybadfly>
hi guys, was wondering if someone can help explain why the return value is dictated by wetsBed in this example: http://pastebin.com/J1BtWfnS
lukec has quit [Quit: lukec]
<mostlybadfly>
it's from the Pine tutorial
kvirani has joined #ruby
brennanMKE has joined #ruby
pipework has quit [Remote host closed the connection]
enjoi has quit [Ping timeout: 264 seconds]
mikepack has quit [Remote host closed the connection]
<mostlybadfly>
oh i just realized why duh
funburn has joined #ruby
rsc33 has joined #ruby
postmodern has quit [Quit: Leaving]
[[thufir]] has joined #ruby
<mostlybadfly>
i think hehe
[[thufir]] has quit [Max SendQ exceeded]
RichardBaker has quit [Quit: RichardBaker]
moted has quit [Quit: moted]
kofno has quit [Remote host closed the connection]
banister`sleep has quit [Read error: Operation timed out]
jamesaanderson has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<yoshie902a>
hey, weird question, but I'm trying to learn rspec and I'm wondering if anyone would spend a half hour with a screen sharing program to help write a few simple rspec tests. I would like to get it solved another way, but this seems like the most efficient.
Tricon has joined #ruby
<yoshie902a>
I have a basic script I wrote, I just want to learn how to test it.
Tricon has quit [Client Quit]
Tricon has joined #ruby
jbomo has joined #ruby
tkuchiki has joined #ruby
iamjarvo has quit [Remote host closed the connection]
<sevenseacat>
that seems like the most backward way to learn testing
iamjarvo has joined #ruby
jamesaanderson has joined #ruby
banisterfiend has joined #ruby
mmitchell has quit [Remote host closed the connection]
emanu has quit [Quit: emanu]
tylersmith has joined #ruby
Spami has joined #ruby
Spami has joined #ruby
<yoshie902a>
sevenseacat: I've gone through many tutorials and books. I understand the basics. But I'm making some API calls and I really do not know the best way to mock and stub the data.
<yoshie902a>
plus, I'm not sure if my design patterns are any good.
Ripp__ has joined #ruby
<yoshie902a>
I'd just love to get feedback from a real developer. I'm just a hack ;(
parzo has joined #ruby
iamjarvo has quit [Ping timeout: 264 seconds]
<volty>
sorry, this time ready only for some womenspec :)
<volty>
yoshie902a: nobody is going to join you, testing is the most boring part of programming /// testing just compares calculated with expecting. There's no (special) science there.
kvirani has quit [Remote host closed the connection]
<volty>
s/expecting/expected/
kvirani has joined #ruby
<asdfqwer>
i hate testing with mocks
<asdfqwer>
or mocha
<Rym>
testing isn't so bad, paired up it can be kinda funky at times
marcdel has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
virt|a|work has joined #ruby
<asdfqwer>
i'd rather let the test timeout
virtualize has quit [Ping timeout: 276 seconds]
<yoshie902a>
ya, I wish I had people to pair with. :)
Rym_ has joined #ruby
<volty>
for me (but maybe just for me) that kind of testing is useless
duard has quit [Remote host closed the connection]
skinkitten has joined #ruby
miskander has joined #ruby
<yoshie902a>
volty: why don't know find value in it?
alekst has quit [Quit: Computer has gone to sleep.]
<volty>
i bet you fix more re-reading your sources than writing testing scripts
<volty>
yoshie902a: i can't understand
alekst has joined #ruby
kvirani has quit [Ping timeout: 276 seconds]
<yoshie902a>
I find that I'm testing as I write code through IRB or just running the my code 1000 times, so I figured rspec would help with that.
Rym has quit [Ping timeout: 240 seconds]
Rym_ is now known as Rym
<asdfqwer>
it's fine as long as you can apperciate the context of teh test
JimmyNeutron has joined #ruby
<asdfqwer>
i'm not but a handful of other guys i work with are in sqs hell righ tnow
Monie has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<yoshie902a>
I also have been learning that rspec testing acts as pretty good documentation
<yoshie902a>
what is sqs?
aeontech has joined #ruby
<volty>
i don't believe that. I think that just relaxing, thinking, re-reading is more productiv.e. I don't beleive in comparative tests because it's too trivial to catch errors
<yoshie902a>
simple queue services?
<asdfqwer>
it's an amazon web service
<asdfqwer>
yeah
Ziarkaen has quit [Read error: Connection reset by peer]
<yoshie902a>
volty: but as you projects get larger and larger, don't you find it impossible to test everything?
quazimodo has joined #ruby
pkrnj has quit [Quit: Computer has gone to sleep.]
<asdfqwer>
testing will save your ass
Hanmac1 has joined #ruby
<volty>
as your projects get larger and larger, comparative testing will grow exponentially
<yoshie902a>
volty: yah, but you will find if you introduce a bug that changes something unexpectedly
<yoshie902a>
you also do not need to test everything every time.
<asdfqwer>
no but if you break a class
<asdfqwer>
your test coverage will save you
<skinkitten>
anyone know how to solve the libv8 gem install error asking for python27 on a windows7
<yoshie902a>
you can run partial testing to speed things up
<skinkitten>
python27 is in my path
<volty>
too many potential bugs to catch them: murphy law, if somebody's wrong you are not going to find it with your (LIMITED) tests
jlast has joined #ruby
tylersmith has joined #ruby
<volty>
s/somebody/something/
<yoshie902a>
volty: do you find value in using testing as documention?
Hanmac has quit [Ping timeout: 245 seconds]
visof has quit [Quit: Leaving]
<volty>
i find it only cluttering
tonni_ has joined #ruby
ericmathison has joined #ruby
bzitzow has quit [Ping timeout: 246 seconds]
beneggett-alt has joined #ruby
<yoshie902a>
fair enough. I'd prefer to learn it. from everything I've read, it seems like a best practice and I think it can provide value to me.
<yoshie902a>
but I totally get you view
seich- has joined #ruby
<yoshie902a>
s/you/your
<[[thufir]]1>
havenwood: thanks for the em help
<[[thufir]]1>
volty: I'll try simple telnet, too
<volty>
We all test our code, when it isn't quite trivial. The question is how, though: i prefer manual puts, or something more complicated, but never that kind of comparative tests.
tonni has quit [Ping timeout: 264 seconds]
nari has quit [Ping timeout: 268 seconds]
<[[thufir]]1>
wait, how does locate help to know the require syntax for a gem?
ewnd9 has joined #ruby
<yoshie902a>
volty: that's what I'm currently doing, I output put statements all over the place. I figure and rspec test would help speed up the process.
dayepa has quit [Quit: dayepa]
<volty>
thur: somebody above told you that probably you have to write require 'em/simple_telnet', ok ? So, when requireing 'em_simple_telnet' doesn't work you do "locate simple_telnet" and see where files with that name reside, if they are in a folder called 'em' etc etc etc
andbutsothen has quit [Quit: andbutsothen]
adeponte has quit [Remote host closed the connection]
<volty>
yoshie902a: it depends on what, and how, you write. I never had problems with expected results but had problems inside functions. And I found the errors without comparative tests. The prob. with those comparative tests is that the tests you write will all give you the correct results but you'll have some obscure bugs elsewhere.
atyz has joined #ruby
s00pcan has quit [Quit: Lost terminal]
s00pcan has joined #ruby
jamesaanderson has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<volty>
I have yet to see compative test examples on something not trivial.
<yoshie902a>
heading to bed. have a good night everyone!
pkrnj has joined #ruby
yoshie902a has left #ruby [#ruby]
tylersmith has quit [Ping timeout: 240 seconds]
<volty>
gn
havenwood has quit [Remote host closed the connection]
havenwood has joined #ruby
brennanMKE has quit [Remote host closed the connection]
<skinkitten>
can someone break this down if python_version !~ /^2/
nfk has quit [Quit: yawn]
jamesaanderson has joined #ruby
Demo_of_doom_ has joined #ruby
<volty>
what do you mean by 'break'?
<skinkitten>
plain english
havenwood has quit [Ping timeout: 264 seconds]
zodiak has quit [Read error: Connection reset by peer]
<[[thufir]]1>
I'm getting 'cannot load such file' for the em-simple_telnet gem: ▒│
<volty>
returns if the line / strings starts with 2
<volty>
returns false (in ruby) if the line / strings starts with 2
sergicles has quit [Quit: sergicles]
yoshie902a has joined #ruby
postmodern has joined #ruby
joofsh has joined #ruby
miskander has quit [Quit: miskander]
<yoshie902a>
Hi, I'm back, real quick questions, I know how to use FIXTURES with YAML files, but can I put hashes in a fixture too?
<yoshie902a>
if so, any good reference material?
<volty>
thur: give the output of 'locate simple_telnet' or the output of "find -iname '*telnet*'" (run from the /usr/lib/ruby)
ptwobrussell has joined #ruby
<skinkitten>
volty: is there something wrong with this code? http://bpaste.net/show/mHwVEhC5KtWSEf6I2hv8/ I do have python27 in the path YET I keep getting the error raised in that code when gem install libv8
aeontech has quit [Quit: aeontech]
ptwobrussell has quit [Client Quit]
dayepa has joined #ruby
<skinkitten>
libv8 is such a pain for a windows user
miskander has joined #ruby
freerobby has joined #ruby
seich- has quit [Ping timeout: 264 seconds]
idoru has quit [Remote host closed the connection]
Lewix has quit [Remote host closed the connection]
idoru has joined #ruby
rickmasta has joined #ruby
__username__ has joined #ruby
<volty>
skinkitten: i think you have to change you code to if python_version =~ /^2/ (if the pythong version starts with '2')
idoru has quit [Remote host closed the connection]
jamesaanderson has quit [Ping timeout: 260 seconds]
<volty>
skinkitten: dump out the content of python_version (with puts)
idoru has joined #ruby
idoru has quit [Remote host closed the connection]
lyanchih has joined #ruby
<skinkitten>
volty I have this C:\Python27; in my path is it not picking it up because it starts with P instead of 2?
mrsolo has quit [Quit: Leaving]
jamesaanderson has joined #ruby
<volty>
skinkitten: the path issue is different from the issue what python_version variable holds. If it holds 2.7.3 (for example) you code should be .... =~ /^2/, if it holds 'Python 2.7.3' you have to match it with /^Python 2/
Domon has joined #ruby
axl_ has quit [Quit: axl_]
yoshie902a has left #ruby [#ruby]
snovak_ has joined #ruby
wallerdev has joined #ruby
haxrbyte_ has quit [Read error: Connection reset by peer]
asdfqwer has quit [Ping timeout: 264 seconds]
<volty>
it is much easier to put an 'puts python_version' and paste the output here
twoism has quit [Remote host closed the connection]
haxrbyte has joined #ruby
Domon has quit [Remote host closed the connection]
starship has joined #ruby
starship has quit [Changing host]
starship has joined #ruby
Voodoofish430 has quit [Quit: Leaving.]
<volty>
('puts puthon_version' before the if )
twoism has joined #ruby
Domon has joined #ruby
asdfqwer has joined #ruby
Domon has quit [Read error: Connection reset by peer]
Domon has joined #ruby
moofish has quit [Ping timeout: 264 seconds]
iliketur_ has quit [Quit: zzzzz…..]
miskander has quit [Quit: miskander]
kvirani has joined #ruby
<volty>
a bit tired , wait
nanoxd has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
pkrnj has quit [Quit: Computer has gone to sleep.]
<volty>
sorry skinkitten
snovak_ has quit [Ping timeout: 264 seconds]
nanoxd has joined #ruby
mvangala_ has joined #ruby
<volty>
you do not have which on windows
dodosan has joined #ruby
pkrnj has joined #ruby
mvangal__ has joined #ruby
<volty>
go and change your line, for now, to unless system 'C:\Python27\<execname>'
twoism has quit [Ping timeout: 268 seconds]
bradhe has joined #ruby
asdfqwer has quit [Read error: Connection reset by peer]
mvangala has quit [Ping timeout: 240 seconds]
mvangala_ has quit [Ping timeout: 264 seconds]
<volty>
skinkitten: that script is for linux but you are on windows
Demo_of_doom_ has quit [Read error: Connection reset by peer]
druonysus has joined #ruby
<skinkitten>
can you put it in a gist?
<volty>
i'm quite fuzy and going to bed, 4 a.am here
tbrock has quit [Ping timeout: 256 seconds]
ssvo has joined #ruby
bradhe has quit [Ping timeout: 268 seconds]
maletor has quit [Quit: Computer has gone to sleep.]
<volty>
sorry man, sorry also for my being distracted before, bye
volty has quit [Quit: Konversation terminated!]
cpruitt has quit [Ping timeout: 264 seconds]
hogeo has quit [Remote host closed the connection]
hogeo has joined #ruby
asdfqwer has joined #ruby
wmoxam has quit [Ping timeout: 264 seconds]
druonysus has quit [Ping timeout: 248 seconds]
lyanchih has quit [Quit: lyanchih]
jackjackdrpr has quit [Ping timeout: 245 seconds]
splittingred has quit [Quit: splittingred]
Lewix has joined #ruby
kvirani has quit [Remote host closed the connection]
kvirani has joined #ruby
helvete has joined #ruby
asdfqwer_ has joined #ruby
asdfqwer has quit [Read error: Connection reset by peer]
pitzips has quit [Ping timeout: 256 seconds]
endash has quit [Quit: endash]
lyanchih has joined #ruby
Rym has quit [Quit: Rym]
adeponte has joined #ruby
atyz has quit [Ping timeout: 245 seconds]
blandflakes has quit [Quit: Page closed]
kvirani has quit [Ping timeout: 276 seconds]
endash has joined #ruby
woebtz has left #ruby [#ruby]
nanoxd has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
nanoxd has joined #ruby
forced_request has quit [Read error: Connection reset by peer]
c0rn has quit [Ping timeout: 268 seconds]
Spami has quit [Quit: This computer has gone to sleep]
sailias has joined #ruby
__username__ has quit [Ping timeout: 264 seconds]
<Todd>
when I'm looping over an integer using the times method how do I check if I'm on the last loop? I thought last would work but it didn't.
<Todd>
so I want to say something like puts "derp" unless last
niftylettuce has quit [Quit: Updating details, brb]
niftylettuce has joined #ruby
lyanchih has quit [Quit: lyanchih]
tspike has joined #ruby
_maes_ has joined #ruby
rcosta has quit [Remote host closed the connection]
marcdel has joined #ruby
pweems has quit [Ping timeout: 260 seconds]
jamesaanderson has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
_maes_ has quit [Read error: Connection reset by peer]
<banisterfiend>
Todd like this? 10.times { |n| puts "derp" unless n == 10 }
pkrnj has quit [Quit: Computer has gone to sleep.]
pweems has joined #ruby
snooc has joined #ruby
soba has joined #ruby
sayan has joined #ruby
brennanMKE has quit [Ping timeout: 268 seconds]
mengu has quit [Quit: This computer has gone to sleep]
splittingred has joined #ruby
mrsolo has joined #ruby
pkrnj has joined #ruby
lyanchih has joined #ruby
krz has joined #ruby
snooc has quit [Quit: snooc]
pipework has joined #ruby
hardbit has joined #ruby
endash has quit [Quit: endash]
pvizcay has quit [Quit: leaving]
Astralum has joined #ruby
idoru has joined #ruby
bricker has quit [Ping timeout: 246 seconds]
snooc has joined #ruby
KobraKao has quit [Quit: Saindo]
tylersmith has joined #ruby
alekst has quit [Quit: Leaving...]
goleldar has joined #ruby
snooc is now known as snooc-booh
ewnd9 has quit [Ping timeout: 264 seconds]
tiglog has joined #ruby
tylersmith has quit [Ping timeout: 268 seconds]
__username__ has joined #ruby
kofno has quit [Remote host closed the connection]
nowthatsamatt has quit [Quit: nowthatsamatt]
maletor has quit [Quit: Computer has gone to sleep.]
nanoxd has quit [Ping timeout: 264 seconds]
jlast has quit [Remote host closed the connection]
asdfqwer_ has quit [Ping timeout: 264 seconds]
freerobby has quit [Quit: Leaving.]
kofno has joined #ruby
asdfqwer has joined #ruby
nanoxd has joined #ruby
[[thufir]]1 has quit [Quit: Leaving.]
snooc-booh has quit [Quit: leaving]
kofno has quit [Remote host closed the connection]
<goleldar>
I am unit testing to assert an error is raised. But the error shows up when I run the test. How can I test and have all the tests pass with no errors?
digital-ghost has quit [Remote host closed the connection]
maletor has joined #ruby
kofno has joined #ruby
<banisterfiend>
goleldar sounds like your' just using the wrong matcher, in bacon when i want to assert an exception i do this: lambda { raise ArgumentError, "hello" }.should.raise ArgumentError
<banisterfiend>
you're*
joofsh has quit [Remote host closed the connection]
dodosan has quit [Remote host closed the connection]
asdfqwer has quit [Quit: Lost terminal]
crucify_me has joined #ruby
brettnem has quit [Ping timeout: 256 seconds]
brettnem has joined #ruby
banisterfiend is now known as banister`sleep
chinkung has joined #ruby
kayloos has quit [Remote host closed the connection]
snooc has joined #ruby
seich- has joined #ruby
Targen has joined #ruby
kung has quit [Ping timeout: 256 seconds]
snooc has left #ruby [#ruby]
<goleldar>
figured it out :) had to use this assert_raises(RuntimeError) { } as opposed to this assert_raises RuntimeError {}
<[[thufir]]>
drafterzz: lol, no, it's a real mystery, this process of how to know to import something. I don't get it.
jamesaanderson has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
splittingred has quit [Quit: splittingred]
freeayu has joined #ruby
drafterzz has left #ruby [#ruby]
hiyosi has quit [Ping timeout: 246 seconds]
JohnBat26|2 has joined #ruby
locriani has joined #ruby
<pontiki>
[[thufir]]: change require 'em/simple_telnet' to require 'em-simple_telnet' and see if that does it?
<[[thufir]]>
pontiki: I think I tried that, I'll check. thaks.
<pontiki>
[[thufir]]: and you are right. sometimes it makes no sense
anay has joined #ruby
<[[thufir]]>
pontiki: thanks for not making me feel like an idiot. I think it's the same, or similar result: http://pastebin.com/RCcmUp5u
<pontiki>
no, quite a bit different...
* [[thufir]]
checks again
<pontiki>
this time you got a connection failed, not a require error
<pontiki>
if i'm reading that right
<[[thufir]]>
ohhhhh, yeah, I see that now. pardon, I stopped reading the errors! yes, you're right!
<pontiki>
lol
<pontiki>
not a good idea!!!
<[[thufir]]>
I'll go check some other telnet things :)
<pontiki>
heehee
awarner_ has quit [Remote host closed the connection]
Monie has joined #ruby
S0da has joined #ruby
jamesaanderson has joined #ruby
companion is now known as Companion
wallerdev has quit [Quit: wallerdev]
wallerdev has joined #ruby
<[[thufir]]>
I tried a weather connection, which works from Java and telnet. it doesn't work with this ruby gem: http://pastebin.com/59JFHiUb now, is that a connection error? seems odd.
mpereira has quit [Ping timeout: 256 seconds]
Companion is now known as companion
c0rn has joined #ruby
Thai-San has joined #ruby
viszu has quit [Quit: Leaving.]
marcdel has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
dmyers has joined #ruby
tiglog has quit [Quit: Leaving]
tater has quit [Read error: Connection reset by peer]
<pontiki>
thufir, i'm not a whiz at this, but it doesn't seem like your prompt will be found on that wunderground telnet
<[[thufir]]>
ohhhh
<[[thufir]]>
ok, just say what you mean by that a bit please. how, or why, do you think that?
butblack has joined #ruby
Davey has quit [Quit: Computer has gone to sleep.]
aryaching has joined #ruby
<pontiki>
line 25, your yaml file sets Prompt: /[#]/ -- to me that says wait until you get a # for the prompt
Domon has quit [Remote host closed the connection]
<[[thufir]]>
ok, right, yes. are they using an "invisible" character for prompt, I wonder? how do you find out?
pkrnj has quit [Ping timeout: 248 seconds]
<pontiki>
first thing i got at that wunderground telnet is 'Press return to continue:'
Domon has joined #ruby
<[[thufir]]>
so, no prompt? I know what you mean. (this is for a MUD game with a similar interface)
<pontiki>
i can't say for sure, as i've not coded with this
<pontiki>
but that's my guess
pkrnj has joined #ruby
__username__ has quit [Ping timeout: 245 seconds]
<[[thufir]]>
even if you're wrong, it's worth checking out. I was fiddling with binmode...
marcdel has joined #ruby
marcdel has quit [Max SendQ exceeded]
marcdel has joined #ruby
aryaching has quit [Client Quit]
wallerdev has quit [Quit: wallerdev]
nowthatsamatt has joined #ruby
snooc has joined #ruby
apeiros has quit [Remote host closed the connection]
Domon has quit [Ping timeout: 256 seconds]
snovak_ has joined #ruby
Domon has joined #ruby
ewnd9 has joined #ruby
<pontiki>
also, um, reading the em-simple_telnet code, i don't know where you get the options you list in your yaml file
beneggett-alt has joined #ruby
iamjarvo has joined #ruby
helvete has quit [Ping timeout: 264 seconds]
yfeldblum has quit [Ping timeout: 248 seconds]
hardbit has quit [Quit: hardbit]
wallerdev has joined #ruby
snovak_ has quit [Ping timeout: 264 seconds]
codecop has joined #ruby
starship has quit [Ping timeout: 248 seconds]
Senjai has quit [Read error: Operation timed out]
marcdel has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
huoxito has quit [Quit: Leaving]
pkrnj has quit [Ping timeout: 264 seconds]
osvico has quit [Ping timeout: 256 seconds]
pweems has quit [Ping timeout: 264 seconds]
aryaching has joined #ruby
boblu has joined #ruby
pkrnj has joined #ruby
butblack has quit [Quit: butblack]
snooc has quit [Quit: snooc]
hardbit has joined #ruby
snooc has joined #ruby
BizarreCake has quit [Read error: Operation timed out]
willman has joined #ruby
tspike has quit [Quit: leaving]
<[[thufir]]>
pontiki: good point. It might be a holdover from another API
pweems has joined #ruby
|Dave has quit [Remote host closed the connection]
eoinkelly has quit [Quit: eoinkelly]
iamjarvo has quit [Remote host closed the connection]
mneorr has quit [Remote host closed the connection]
Ripp__ has quit [Remote host closed the connection]
lkba has quit [Ping timeout: 240 seconds]
Ripp__ has joined #ruby
Guest23220 has quit [Ping timeout: 264 seconds]
pwh has quit [Quit: pwh]
Bosox20051 has joined #ruby
ahawkins has joined #ruby
bio has joined #ruby
bio is now known as Guest71984
3JTAAAHNF has joined #ruby
snovak_ has joined #ruby
pranny has quit [Quit: Leaving.]
hardbit has quit [Remote host closed the connection]
test42 has quit [Quit: Page closed]
patternal has joined #ruby
<patternal>
Hi
<patternal>
I have a design pattern question if someone has a few minutes
zastern has quit [Remote host closed the connection]
zodiak has quit [Ping timeout: 264 seconds]
so-rude has quit [Killed (idoru (Spam is off topic on freenode.))]
eoinkelly has joined #ruby
funburn has joined #ruby
<patternal>
I have a model called Asset where I have a list of assets in the db, but I can also find assets in other sources and I want to refer to those as ExtAssets. ExtAssets can come from various sources, for example PMAsset, IPAsset, etc.
<patternal>
and I would like to make it possible for the view to find both Assets and ExtAssets seamlessly
snovak_ has quit [Ping timeout: 268 seconds]
<patternal>
so first question is how should I go about ExtAssets and the individual concrete assets? should that be structural pattern or should it be a creational pattern
futilegames has joined #ruby
<patternal>
and then the second question is should I aggregate ExtAsset and Asset together into something called AggregateAsset?
duard has joined #ruby
hamed_r has joined #ruby
Xeago has quit [Remote host closed the connection]
<bnagy>
patternal: try a rails channel I think it's #rubyonrails
<patternal>
what is wrong with asking here?
<patternal>
why did you assume I am using rails?
<bnagy>
it's not a ruby question
<patternal>
wtf?
<patternal>
it is a design pattern question
<bnagy>
but mainly you'll have better luck in a webby channel
<bnagy>
it's not, it's a web design question
rpgsimmaster_ has quit []
<bnagy>
but whatever, do what you want I'm not the cops
<patternal>
meh
pierre1 has joined #ruby
<patternal>
your IQ is not that much higher
<bnagy>
:)
<bnagy>
first time here?
<Karpah>
lol
<Karpah>
'you said something i dont like, therefore you are stupid'
locriani has quit [Remote host closed the connection]
<patternal>
Karpah: no that is not it
bzitzow has quit [Ping timeout: 248 seconds]
bartj3 has joined #ruby
locriani has joined #ruby
<tobiasvl>
patternal: I have a design pattern question if you have a few minutes
<tobiasvl>
what's a design pattern?
<tobiasvl>
what's an asset
<Karpah>
well how else can you insult someones intelligence based on like three sentences?
<patternal>
I asked a question about a design pattern, that may equally be applicable in an MVC paradigm or other paradigms, and even if it was an MVC paradigm it could have been a gui app
<tobiasvl>
what's a source here
<tobiasvl>
what's a structural pattern
<tobiasvl>
what's a creational pattern
<patternal>
so being told this is not a ruby question and it is a web design question is not a logical response
funburn has quit [Quit: funburn]
patternal has left #ruby [#ruby]
locriani has quit [Ping timeout: 245 seconds]
maasdesigner has quit [Quit: whowantstolivefo]
goto has quit [Ping timeout: 276 seconds]
<tobiasvl>
patternal, come back :(
n1x has joined #ruby
lyanchih has quit [Quit: lyanchih]
ssvo has quit [Ping timeout: 256 seconds]
<bnagy>
what _is_ a 'creational pattern' anyway?
<tobiasvl>
we should know, this is a ruby channel after all
<bnagy>
does anyone IRL use mvc for non-web stuff anymore?
<canton7>
iOS devices?
<canton7>
(objective-c, not ruby, though)
<bnagy>
oh yeah?
funburn has joined #ruby
<apeiros>
bnagy: to a degree I even use that approach with CLI apps
brtdv has joined #ruby
<apeiros>
the borders are less clear/strict than with e.g. rails, though
<bnagy>
well 'to a degree' I guess a lot of stuff does
<apeiros>
of course. MVC is IMO a result of SRP
<bnagy>
kind of happens naturally with any sane design
flughafen has left #ruby [#ruby]
<apeiros>
that said, rails fails badly with SRP in many regards, *sob*
binw has joined #ruby
<apeiros>
(models contain persistence, validation, authorization, state progression and lots more…)
ewnd9 has joined #ruby
tesuji has joined #ruby
<apeiros>
also the way views are coupled to controllers… horrible :(
<apeiros>
anyway, gotta stop ranting and get back to work :)
pranny has joined #ruby
seich- has joined #ruby
blz37 has quit [Quit: WeeChat 0.4.1]
aaronmcadam has joined #ruby
lyanchih has joined #ruby
kaspergrubbe has joined #ruby
andikr has joined #ruby
marcgg has joined #ruby
kizzx2 has joined #ruby
kizzx2 has quit [Max SendQ exceeded]
postmodern has joined #ruby
crucify_me has quit [Remote host closed the connection]
kizzx2 has joined #ruby
kizzx2 has quit [Max SendQ exceeded]
kizzx2 has joined #ruby
brtdv has quit [Quit: brtdv]
<jrobeson>
apeiros, people were like.. what? there's something wrong with controller instance vars being used in views?
<jrobeson>
and "how would you do it?"
crucify_me has joined #ruby
<jrobeson>
i'm like.. wut?
crucify_me has quit [Remote host closed the connection]
<jrobeson>
every other framework i've used.. including php frameworks from circa 2002.. they never did that..
<jrobeson>
it's always.. return data that is used to fill the view.
<Karpah>
no its not, it's assign things to the view
eka has joined #ruby
RTG has joined #ruby
zarubin has joined #ruby
<Karpah>
i was part of that discussion, i can defend myself :P
RTG is now known as Guest82434
<jrobeson>
Karpah, it's still wrong from an SRP perspective
<apeiros>
jrobeson: I'm not even talking about that. that's failure of proper interface. no, I was talking about: ever tried to render a view without a controller?
<apeiros>
(though, that's also interface failure actually)
<jrobeson>
apeiros, ah.. that didn't look too hard..
<apeiros>
jrobeson: haha, yeah, until you actually try…
<jrobeson>
i've never done it.. but it seems like.. instantiate the template engine. setup the helpers.. and it should work
mrsolo has joined #ruby
<Karpah>
views and controllers are tightly coupled, yeah. the M is the only easily swappable part
<apeiros>
jrobeson: yeah. it seems like. it really isn't.
jlast has quit [Read error: Connection reset by peer]
<jrobeson>
lol
<apeiros>
there are insane couplings going on there… I wouldn't believe it myself if I hadn't tried.
<jrobeson>
Karpah, i know how it is.. and what you said. that doesn't make it the right way to do it :)
RTG` has quit [Ping timeout: 276 seconds]
<jrobeson>
i didn't think you were defending rails practice.. just stating it
<Karpah>
to be honest, violation of SRP doesnt bother me much in rails because it's a full-stack framework, the core concepts are designed to be used together as a unit.
<Karpah>
and they work well together as a unit
Guest82434 is now known as RTG`
<jrobeson>
they could work just as well without that coupling though
<jrobeson>
even without changing the instance var assignment in the controller
<Karpah>
i doubt that
<jrobeson>
unlike php.. ruby actually has easy reflection
<Karpah>
and im sure people much smarter than me have tried to fix it
jlast has joined #ruby
<jrobeson>
i've seen some ways, like the basic_assumption gem
locriani has joined #ruby
starfox21 has joined #ruby
atmosx has joined #ruby
<Karpah>
reading through the readme now, that seems.... like an odd way to do it
duard has quit [Remote host closed the connection]
<jrobeson>
this person does it with more helper methods
<buzzybron>
how do i generate random in 1.8.6?
<jrobeson>
that's certainly one way to do it
<apeiros>
you could separate it easily
<apeiros>
you could even do it in a backwards compatible way
<apeiros>
were you just leave "copy all ivars" as the default
<jrobeson>
yep.. that's what i was thinking
<jrobeson>
turn them all into locals
rickmasta has joined #ruby
ssvo has joined #ruby
<jsaak>
buzzybron: rand(5)
<Karpah>
interesting approach in that slimming article
Bry8Star{T2 has quit [Ping timeout: 240 seconds]
<jrobeson>
Karpah, to me.. it doesn't seem like there is a technical problem in solving it. feels more like a political problem
<buzzybron>
jsaak : thank
<buzzybron>
s
<apeiros>
helpers are another horror topic… can't use them outside of rails views. rather sad as it wouldn't take much to make them actually useful outside of rails views.
<Karpah>
i'm not sure i would ever use it, but still
<Karpah>
yeah helpers are handled poorly by rails
<apeiros>
in most cases a simple `module_function` at the start of the module would do
<jrobeson>
and how would you tie it to the view?
<Karpah>
and them being global by default is naffed
<apeiros>
so you could do FooHelper.helpful_method(bar)
<jsaak>
(rails is flawed by design, better avoid it)
<apeiros>
jrobeson: most helpers have no tie to the view
<apeiros>
they take a value and return another
eoinkelly has quit [Quit: eoinkelly]
<jrobeson>
i like the idea of injecting a list of helpers
<apeiros>
there's no reason to not make it available as module_function's
<jrobeson>
but then again.. i tend to prefer sandboxed template engines
<apeiros>
same
pipework has joined #ruby
<apeiros>
but sandboxed template engine is orthogonal to including helpers
alup has joined #ruby
<apeiros>
can do both, nothing stops you
eoinkelly has joined #ruby
eoinkelly has quit [Client Quit]
<apeiros>
and can even do it by either inheriting template class and include helper, or by extending the view instance
<jrobeson>
if you inject a list of registered helpers.. it's fine ..
<jrobeson>
i'm suprised to find myself missing twig
<apeiros>
ruby is powerful that way (even though #extend kills method lookup cache, which makes that approach sadly a not very viable choice :-/)
<jrobeson>
in theory i'm more friendly with logicless templates
<jrobeson>
like mustache
<jrobeson>
or logic-less template engine :)
kilophoton has joined #ruby
<jrobeson>
apeiros, so.. it's true that rails doesn't use tilt (or some modern equivalent) ?
<jrobeson>
apeiros, my ruby mostly comes from playing with sinatra some years ago
tonni has quit [Remote host closed the connection]
<apeiros>
it is true
jbpros has joined #ruby
seich- has quit [Ping timeout: 264 seconds]
<apeiros>
I was working on a drop-in replacement for rails views, but not enough time and my company sadly can live with the workarounds we're using :(
<jrobeson>
ooh..
<jrobeson>
have you played wiht padrino yet?
<jrobeson>
i haven't had the chance
<apeiros>
no
<apeiros>
my time is very limited :-|
locriani has quit [Ping timeout: 245 seconds]
<jrobeson>
right now i'm just procrastinating on a terrible php project :(
<apeiros>
our main issue with rails view system is that we want to use all its offers to generate pdfs
<apeiros>
but we can't go through controllers for that
<jrobeson>
ah.. so you really do need to split it out .. especially if you wanna generate them from the console or something
<apeiros>
we use princexml, so basically we render html and push it through prince
<apeiros>
correct
<jrobeson>
neat .. and nobody has already done this?
<apeiros>
we have those things in presenters, so we can present e.g. an application form for an insurance as pdf
skaby has joined #ruby
<apeiros>
I haven't found anything which did it to the extent I/we need it
funburn has quit [Quit: funburn]
<apeiros>
or with the comfort-level I'd want :)
<jrobeson>
well good to know.. just in case i run into something
<jrobeson>
i'll pass it on
blackmesa has joined #ruby
<apeiros>
I want: Template.new(:@ivar => value).render
<jrobeson>
don't we all :)
<jrobeson>
hehe
<jrobeson>
i mean.. dont i .. :)
ssvo has quit [Ping timeout: 268 seconds]
buibex has joined #ruby
obs has joined #ruby
kilophoton has quit [Ping timeout: 264 seconds]
<jrobeson>
apeiros, that's pretty much how it works in symfony2 .. everything returns a Response object.. so as long as you end up with a Response.. it works
<jrobeson>
but ther'es also a View event.. so.. you could just do return Hash.new{...}
jbomo has quit [Ping timeout: 248 seconds]
<jrobeson>
and the view event will take it and render it with the default engine.. (or whatever else)
<jrobeson>
seems like a good way to do it
rickmasta has quit [Quit: Leaving...]
<jrobeson>
that view event is where the ivars could be turned into locals
jefflyne has joined #ruby
Xeago has joined #ruby
boblu has joined #ruby
snovak_ has joined #ruby
<jrobeson>
i'm going to have fun with this one day
artm has joined #ruby
buibex has quit [Ping timeout: 260 seconds]
flughafen has joined #ruby
rdark has joined #ruby
camilasan has joined #ruby
snovak_ has quit [Ping timeout: 268 seconds]
blaxter_ has joined #ruby
tonni has joined #ruby
<krz>
why does {a:'a',b:'b'}.reject { |k,v| false } output {a:'a',b:'b'}
<krz>
shouldnt it output an emtpy hash?
boblu has quit [Ping timeout: 264 seconds]
Tippler has quit [Remote host closed the connection]
kevinykchan has joined #ruby
<tobiasvl>
no
<tobiasvl>
"Deletes every key-value pair from hsh for which block evaluates to true."
Kabaka_ has joined #ruby
<buzzybron>
i am trying to do this > str = "this is a '#{fullofquote_str}' "
<buzzybron>
how can i escape the quotes found within the full of quote str?
<buzzybron>
how can i escape the quotes found within the fullofquote_str?
Kabaka has quit [Ping timeout: 240 seconds]
visof has joined #ruby
visof has joined #ruby
wudofyr has quit [Remote host closed the connection]
nitrodex has quit [Ping timeout: 260 seconds]
diegoviola has joined #ruby
noname001 has joined #ruby
wudofyr has joined #ruby
Zolo has joined #ruby
eoinkelly has joined #ruby
nitrodex has joined #ruby
Zai00 has joined #ruby
nitrodex is now known as Guest92121
<krz>
tobiasvl: hmm how can i get this to work: {created_at: 'asdf', a:'foo'}.reject { |k,v| !{create
<krz>
d_at: 'asdf'}.values.include? k }
<tobiasvl>
??
<krz>
basically want to output {created_at:'asdf'}
<tobiasvl>
ah ok i get it
love_color_text has quit [Ping timeout: 264 seconds]
<krz>
since a:'foo' doesnt exist in the 2nd hash
<tobiasvl>
why are you comparing the value to the key
senayar has quit [Remote host closed the connection]
senayar has joined #ruby
jax0mbrown has joined #ruby
Dreamer3 has joined #ruby
<jax0mbrown>
سمـووحخ خ خ خ امارتيخ خ
<Dreamer3>
what's a quick way to count the occurrences of a substring inside a string?
<Dreamer3>
count?
<Dreamer3>
seriously
<Dreamer3>
oh it doesn't do regex
toddWork_ has quit [Remote host closed the connection]
mneorr has quit [Remote host closed the connection]
rickruby has joined #ruby
mneorr has joined #ruby
<Dreamer3>
ok scan
mikecmpbll has joined #ruby
adambeynon has joined #ruby
dweeb has joined #ruby
jbpros has quit [Quit: jbpros]
seich- has joined #ruby
locriani has joined #ruby
Gooder has joined #ruby
erry has quit [Read error: Connection reset by peer]
[[thufir]] has quit [Ping timeout: 264 seconds]
nomenkun has joined #ruby
shaunbaker has joined #ruby
ssvo has joined #ruby
erry__ has joined #ruby
_bart has joined #ruby
Advocation has joined #ruby
hogeo_ has joined #ruby
<lurch_>
hi, anyone have experience with gemfury.org and bundler? can bundler handle a push to gemfury? can't seem to get it to work with --host.. it always uses rubygems.org
nixmaniack has joined #ruby
nomenkun has quit [Read error: Connection reset by peer]
hogeo has quit [Ping timeout: 264 seconds]
nomenkun has joined #ruby
erry__ is now known as erry
shredding has joined #ruby
hamed_r has quit [Quit: Ex-Chat]
ssvo has quit [Ping timeout: 248 seconds]
bartj3 has joined #ruby
Karpah is now known as sevenseacat
thebastl has joined #ruby
buibex has joined #ruby
dweeb has quit [Remote host closed the connection]
Fire-Dragon-DoL has joined #ruby
dweeb has joined #ruby
s0ber has quit [Remote host closed the connection]
niceguyjames has joined #ruby
funburn has joined #ruby
prisonguard has joined #ruby
s0ber has joined #ruby
BRMatt has joined #ruby
jefflyne has quit [Quit: My Mac Mini has gone to sleep. ZZZzzz…]
s0ber has quit [Remote host closed the connection]
snovak_ has joined #ruby
s0ber has joined #ruby
timonv has joined #ruby
artm has quit [Read error: Connection reset by peer]
gstamp has quit [Quit: Computer has gone to sleep.]
klaut has joined #ruby
buibex has quit [Ping timeout: 245 seconds]
Zolo has quit [Remote host closed the connection]
persand has quit [Quit: persand]
Xaitec has joined #ruby
Xaitec has quit [Remote host closed the connection]
<Xeago>
I dislike designers that can't express their desires and refuse to image it from his toolbox of set components
anonymuse has joined #ruby
<Xeago>
just had a 2 hour discussion over what text should be shown where, I never got the information on what text should be displayed
Guest83706 has joined #ruby
KobraKao has joined #ruby
Advocation has quit [Quit: Advocation]
yacks has joined #ruby
axeman- has quit [Read error: Connection reset by peer]
Guest83706 has quit [Client Quit]
ntus1017 has joined #ruby
axeman- has joined #ruby
failshell has joined #ruby
kofno has joined #ruby
stayarrr has joined #ruby
persand has quit [Quit: persand]
Advocation has joined #ruby
Neomex has joined #ruby
blackmesa has joined #ruby
staafl has quit [Ping timeout: 264 seconds]
ndrei has joined #ruby
ldnunes has joined #ruby
Rym has joined #ruby
locriani has joined #ruby
leokaito has quit [Remote host closed the connection]
neo_ has joined #ruby
hogeo has quit [Remote host closed the connection]
sailias has joined #ruby
tagrudev has quit [Remote host closed the connection]
camilasan has quit [Remote host closed the connection]
ssvo has joined #ruby
buzzybron has quit [Quit: Leaving.]
ananthakumaran1 has joined #ruby
leokaito has joined #ruby
neo_ has quit [Client Quit]
b0oh has joined #ruby
caju has joined #ruby
tagrudev has joined #ruby
ananthakumaran has quit [Ping timeout: 264 seconds]
starship has joined #ruby
quazimodo has quit [Ping timeout: 248 seconds]
pranny1 has quit [Read error: Connection reset by peer]
pranny has joined #ruby
seich- has quit [Ping timeout: 264 seconds]
ananthakumaran1 has quit [Read error: Connection reset by peer]
buzzybron has joined #ruby
hogeo has joined #ruby
ssvo has quit [Ping timeout: 268 seconds]
wmoxam has quit [Ping timeout: 268 seconds]
hogeo has quit [Remote host closed the connection]
mneorr_ has quit [Remote host closed the connection]
ananthakumaran has joined #ruby
jbpros has joined #ruby
puppeh has left #ruby ["bb"]
ndrei has quit [Remote host closed the connection]
veleno has joined #ruby
oussama has joined #ruby
buzzybron has quit [Client Quit]
<_br_>
Aren't designers supposed to handle all that and you get a nice mockup you can slice and dice to implement then?
<veleno>
hello. is this the most efficient way to write this simple line of ruby code https://gist.github.com/anonymous/632fcf42af97fc761474 ? I need it to be as fast as possible, as it could be invoked up to thousands of times per second in the worst case
Trynemjoel has quit [Quit: Trynemjoel]
oussama has quit [Client Quit]
persand has joined #ruby
<_br_>
veleno: Fast as possible? In only pure Ruby? Or is C Builder fine as well?
<veleno>
_br_: ruby
starship has quit [Ping timeout: 256 seconds]
jefflyne has quit [Quit: My Mac Mini has gone to sleep. ZZZzzz…]
seich- has joined #ruby
shredding has joined #ruby
tyman has quit [Quit: tyman]
lyanchih has quit [Quit: lyanchih]
funburn has quit [Quit: funburn]
jbpros has quit [Ping timeout: 256 seconds]
Rym has quit [Quit: Rym]
ananthakumaran has quit [Read error: Connection reset by peer]
jp- has quit [Ping timeout: 268 seconds]
Wildhoney has quit [Quit: Wildhoney]
caju has quit [Remote host closed the connection]
ananthakumaran has joined #ruby
Wildhoney has joined #ruby
s0ny123 has joined #ruby
Wildhoney has quit [Client Quit]
Trynemjoel has joined #ruby
xeon has joined #ruby
IceyEC has joined #ruby
ramblex has joined #ruby
freeayu has quit [Remote host closed the connection]
ananthakumaran1 has joined #ruby
Criztian has quit [Remote host closed the connection]
tbrock has joined #ruby
pranny1 has joined #ruby
ananthakumaran has quit [Ping timeout: 245 seconds]
fbernier has joined #ruby
Neomex has quit [Quit: Neomex]
linux_noob_666 has quit [Remote host closed the connection]
rbento has joined #ruby
pranny has quit [Ping timeout: 268 seconds]
mlpinit has joined #ruby
ntus1017_ has joined #ruby
sailias has quit [Ping timeout: 264 seconds]
dash_ has quit [Ping timeout: 245 seconds]
ntus1017 has quit [Ping timeout: 245 seconds]
kvirani has joined #ruby
kaspergrubbe has quit [Remote host closed the connection]
antulik has quit [Remote host closed the connection]
gyre007 has quit [Remote host closed the connection]
mark_locklear has joined #ruby
jbpros has joined #ruby
kaspergrubbe has joined #ruby
ntus1017 has joined #ruby
rbento has quit [Remote host closed the connection]
ntus1017 has quit [Remote host closed the connection]
ntus1017 has joined #ruby
scottradcliff has joined #ruby
pranny1 has quit [Quit: Leaving.]
fixl has quit [Remote host closed the connection]
dash_ has joined #ruby
philcrissman_ has joined #ruby
ntus1017_ has quit [Ping timeout: 264 seconds]
locriani has quit [Ping timeout: 264 seconds]
krz has quit [Quit: krz]
enjoi has joined #ruby
sambao21 has joined #ruby
ayaz has quit [Remote host closed the connection]
platzhirsch has joined #ruby
_maes_ has joined #ruby
<platzhirsch>
[:a, :b].inject( {} ) do |hash, key| = hash[key] = 43 end does not work, any idea why? {} is not a symbol, hmpf
Banistergalaxy has quit [Ping timeout: 256 seconds]
jbpros has quit [Ping timeout: 256 seconds]
optimusprimem has joined #ruby
optimusprimem has joined #ruby
optimusprimem has quit [Changing host]
gilesw_ has joined #ruby
<tobiasvl>
uh
<apeiros>
platzhirsch: `= hash[key] = 43`
yoshie902a has joined #ruby
<tobiasvl>
first remove that first =
Banistergalaxy has joined #ruby
<apeiros>
that's not valid. what should a prefixed `=` do?
<tobiasvl>
which ruby should've told you is a syntax error
<_br_>
veleno: Well, as fast as possible is relative then. I would suggest to do heavy profiling and see if that will actually be an issue under heavy load.
<apeiros>
platzhirsch: also, you want each_with_object, not inject
<canton7>
gilesw_, did you read what I wrote above?
mneorr has joined #ruby
breakingthings has joined #ruby
<gilesw_>
ah
<apeiros>
gilesw_: it's not foo.send("bar(1,2,3)"), it is foo.send("bar", 1,2,3)
<apeiros>
otherwise it'd be pretty difficult to deal with non-string arguments
KobraKao has joined #ruby
<apeiros>
i.e., first argument to send is the method to invoke, the rest are the arguments as you'd pass them to the "original" method
thebastl has joined #ruby
snovak_ has joined #ruby
yxhuvud has joined #ruby
jroes has joined #ruby
<gilesw_>
thanks chaps that worked a treat
blackmesa has quit [Remote host closed the connection]
<jroes>
is it just me, or does anyone know why whenever I'm stepping through ruby code using pry/debugger, I seem to step into methods I never asked to?
blackmesa has joined #ruby
<jroes>
for example, I might type "next" at a breakpoint, but I end up deep in some method call in a dependency
thebastl has quit [Remote host closed the connection]
fantazo has joined #ruby
thebastl has joined #ruby
coffeecoco has quit [Remote host closed the connection]
jbpros has joined #ruby
snovak_ has quit [Ping timeout: 240 seconds]
thebastl has quit [Remote host closed the connection]
jroes has left #ruby [#ruby]
mengu has joined #ruby
philcrissman_ has quit [Remote host closed the connection]
shaunbaker has quit [Remote host closed the connection]
ntus1017 has quit [Remote host closed the connection]
Zolo has quit [Remote host closed the connection]
ntus1017 has joined #ruby
ntus1017 has quit [Remote host closed the connection]
lkba has quit [Read error: Connection reset by peer]
wallerdev has joined #ruby
sevenseacat has joined #ruby
philcrissman_ has joined #ruby
jbpros has quit [Ping timeout: 256 seconds]
scottradcliff has quit [Quit: scottradcliff]
blackmesa has quit [Ping timeout: 240 seconds]
lkba has joined #ruby
perry|dnd has quit [Ping timeout: 240 seconds]
v0n has joined #ruby
perry|dnd has joined #ruby
buibex has joined #ruby
scottradcliff has joined #ruby
tkuchiki has quit [Remote host closed the connection]
dweeb has quit [Quit: Computer has gone to sleep.]
diegoviola has quit [Ping timeout: 248 seconds]
gyre007 has joined #ruby
Caius is now known as Ca1us
Ca1us is now known as Caius
bartj3 has quit [Quit: quit]
lkba has quit [Read error: Connection reset by peer]
fmcgeough has joined #ruby
lkba has joined #ruby
bartj3 has joined #ruby
dweeb has joined #ruby
lkba has quit [Read error: Connection reset by peer]
varfoo has quit [Quit: Leaving]
lkba has joined #ruby
tk__ has joined #ruby
mengu has quit [Quit: This computer has gone to sleep]
pweems has quit [Ping timeout: 240 seconds]
pen has joined #ruby
tkuchiki has joined #ruby
Rym has quit [Remote host closed the connection]
staafl has joined #ruby
forgot has joined #ruby
ssvo has joined #ruby
Advocation has quit [Quit: Advocation]
staafl has quit [Read error: Connection reset by peer]
ewnd9 has quit [Ping timeout: 268 seconds]
tonni has quit [Remote host closed the connection]
rickruby has quit [Remote host closed the connection]
mklappstuhl has quit [Remote host closed the connection]
pen has quit [Remote host closed the connection]
pen has joined #ruby
dangerousdave has joined #ruby
nowthatsamatt has joined #ruby
ssvo has quit [Ping timeout: 264 seconds]
yoshie902a has quit [Quit: yoshie902a]
pipework has quit [Remote host closed the connection]
tkuchiki has quit [Remote host closed the connection]
Rym has joined #ruby
brettnem has joined #ruby
<brettnem>
good morning all!
dweeb has quit [Quit: Computer has gone to sleep.]
wallerdev has quit [Quit: wallerdev]
<brettnem>
So I'm trying to use an Activerecord connection along with peach (parallel each). Activerecord is setup before peach is called, but then I reference an active record inside of the peach and I'm getting a ConnectionTimeout error.. This just happens inside the peach (supposedly this is in a new thread from where Activerecord was setup). Is there something special I need to do to make my objects available inside the peach(thre
<brettnem>
Thanks
krawchyk has joined #ruby
<brettnem>
the use case is basically, use Activerecord to select 1000 rows, then use peach to process them 10 simultaneously at a time
jkamenik has joined #ruby
shaunbaker has joined #ruby
platzhirsch has left #ruby [#ruby]
bluenemo has joined #ruby
scarolan has joined #ruby
hone has joined #ruby
jlast has quit [Ping timeout: 256 seconds]
IceyEC has quit [Remote host closed the connection]
jerius has joined #ruby
IceyEC has joined #ruby
scarolan_ has quit [Ping timeout: 268 seconds]
ryannielson has joined #ruby
Wildhoney has joined #ruby
Ripp__ has quit [Quit: Ripp__]
pipework has joined #ruby
<_br_>
brettnem: Activerecord is quite 'railsy' you might want to try #rubyonrails or #rails you might have more luck there.
snovak_ has joined #ruby
<brettnem>
_br_: Honestly, I don't want to use Activerecord at all, since I'm not doing any railsy stuff. I can't find good docs on just regular old mysql connections. Forgive me I'm a bit new at ruby, so I may just be looking in the wrong places. The overwhelming amount of rails content kinda eclipses the non-rails stuff
<_br_>
brettnem: That being said, connection time out error depending on what you try to do and depending on how the libs work internally might result in a writer starvation causing this trouble. Try increasing the timeout value in database.yaml
<brettnem>
_br_: yeah, it's a standalone script.. no rails bits at all
<_br_>
brettnem: Well, there is nothing wrong with an ORM (depending on your usecase). No need maybe to go directly into the adapter.
<_br_>
brettnem: There should still be some timeout values configurable, no?
<brettnem>
_br_: I'm having to do flips to make my funky queries work in the ORM. There's good use cases for an ORM, but for what I'm doing, I'm butchering it
flaviodesousa has joined #ruby
<_br_>
brettnem: Well, if you already circumvent the whole ORM it certainly makes little sense.
sami_ has joined #ruby
<brettnem>
right
binaryplease has joined #ruby
Boohbah has quit [Ping timeout: 256 seconds]
<brettnem>
oh, you know I just found mysql2 which is the adapter in github. I'm going to give this a shot. Maybe it's the whole active record bits unhappy with me
joonty has quit [Quit: WeeChat 0.4.1]
sami_ is now known as sami
locriani has joined #ruby
sami has left #ruby [#ruby]
<_br_>
mysql2 is fine, just read how the lib handles thread safety.
<brettnem>
it's preferred over the mysql adapter isn't; it?
caju has joined #ruby
kaldrenon has joined #ruby
swordsmanz has quit [Remote host closed the connection]
bigkevmcd has quit [Ping timeout: 245 seconds]
jpinnix has joined #ruby
jpinnix has left #ruby [#ruby]
MasterAsia has quit [Ping timeout: 264 seconds]
JDHankle has joined #ruby
shaunbaker has quit [Remote host closed the connection]
caju has quit [Remote host closed the connection]
Advocation has joined #ruby
b0oh has quit [Quit: Leaving.]
lurch__ has joined #ruby
__username__ has joined #ruby
alekst has joined #ruby
lurch_ has quit [Read error: Operation timed out]
lurch__ is now known as lurch_
mpereira has joined #ruby
iamjarvo has joined #ruby
mneorr has quit [Remote host closed the connection]
wmoxam has joined #ruby
iamjarvo has quit [Remote host closed the connection]
iamjarvo has joined #ruby
nari has quit [Ping timeout: 240 seconds]
soba has quit [Ping timeout: 264 seconds]
whowantstolivefo has quit [Ping timeout: 264 seconds]
iamjarvo has quit [Read error: Connection reset by peer]
jbomo has joined #ruby
Banistergalaxy has quit [Ping timeout: 248 seconds]
krandi has quit [Ping timeout: 245 seconds]
iamjarvo has joined #ruby
devoldmx has quit [Ping timeout: 248 seconds]
robbyoconnor has quit [Quit: Konversation terminated!]
devoldmx has joined #ruby
buibex has quit [Remote host closed the connection]
yojimbo_ has quit [Quit: Leaving]
goodcodeguy has joined #ruby
fgo has joined #ruby
phantasm66 has joined #ruby
gyre007 has joined #ruby
tonni has joined #ruby
MrThePlague has joined #ruby
MrThePlague has quit [Changing host]
MrThePlague has joined #ruby
goodcodeguy has left #ruby [#ruby]
goodcodeguy has joined #ruby
gyre008 has joined #ruby
nowthatsamatt has quit [Quit: nowthatsamatt]
tomzx_mac has quit [Read error: Operation timed out]
asobrasil has joined #ruby
sarkis has joined #ruby
devoldmx has quit [Read error: Connection reset by peer]
rhys has joined #ruby
devoldmx3 has joined #ruby
dkamioka has joined #ruby
snooc has quit [Quit: snooc]
kaspergrubbe has quit [Remote host closed the connection]
mengu has joined #ruby
gyre007 has quit [Ping timeout: 264 seconds]
Wildhoney has quit [Ping timeout: 264 seconds]
snooc has joined #ruby
IceDragon has joined #ruby
mengu has quit [Client Quit]
baordog has joined #ruby
mr3 has joined #ruby
ezotrank has joined #ruby
seich- has joined #ruby
Uranio has joined #ruby
anonymuse has joined #ruby
kaspergrubbe has joined #ruby
swordsmanz has quit [Quit: ooh ponies kinkeyyy]
ezotrank has left #ruby [#ruby]
sayan has quit [Ping timeout: 264 seconds]
tesuji has quit [Read error: Connection reset by peer]
tagrudev has quit [Remote host closed the connection]
Wildhoney has joined #ruby
thirdknife_ has quit [Quit: Leaving]
scottradcliff has quit [Quit: scottradcliff]
antulik has joined #ruby
BillCriswell has joined #ruby
freerobby has quit [Quit: Leaving.]
pen has quit [Remote host closed the connection]
freerobby has joined #ruby
_maes_ has joined #ruby
BizarreCake has quit [Read error: Connection reset by peer]
dkamioka has quit []
dkamioka has joined #ruby
<dkamioka>
hello ppl :)
<dkamioka>
anyone here at rubyconf2013 brazil ? :)
whitemage has joined #ruby
persand has quit [Quit: persand]
snath has quit [Ping timeout: 264 seconds]
<_br_>
nope, I wish. Videos already flying around somewhere?
timonv has quit [Remote host closed the connection]
jprovazn has quit [Ping timeout: 264 seconds]
zoee has joined #ruby
whitemage has left #ruby [#ruby]
cortexman has quit [Quit: Leaving.]
interactionjaxsn has joined #ruby
rdark has quit [Ping timeout: 256 seconds]
timonv has joined #ruby
swordsmanz has joined #ruby
noopq has quit [Ping timeout: 264 seconds]
antulik has quit [Ping timeout: 260 seconds]
lucazi has joined #ruby
cortexman has joined #ruby
swordsmanz has left #ruby [#ruby]
Astral_ has joined #ruby
rdark has joined #ruby
awarner has joined #ruby
<Xeago>
is this proper english? "Thanks, I greatly appreciate the dedication towards me."
juarlex has joined #ruby
<Xeago>
context: my employer is setting aside quite some time to get me started there
Astralum has quit [Ping timeout: 245 seconds]
shaunbak_ has quit [Remote host closed the connection]
tyman has joined #ruby
randomau_ has quit [Remote host closed the connection]
shaunbaker has joined #ruby
alex__c2022 has joined #ruby
sr78ger has joined #ruby
devoldmx3 has quit [Read error: Connection reset by peer]
randomautomator has joined #ruby
<IceDragon>
Xeago: "dedication" seems like the wrong word to use in that case
lnormous has joined #ruby
fgo has quit [Remote host closed the connection]
<IceDragon>
Apart from that the sentence seems fine :D
<Xeago>
hence why I am asking, what would be the proper word?
suffix_ has left #ruby [#ruby]
cody-- has quit [Quit: Computer has gone to sleep.]
ixti has quit [Ping timeout: 264 seconds]
brettnem has quit [Quit: brettnem]
dweeb has quit [Quit: Computer has gone to sleep.]
<banister`sleep>
Xeago just give him a heart melting look with watery eyes and he'll know what u mean
ananthakumaran1 has quit [Quit: Leaving.]
<Xeago>
banister`sleep: I needed you yesterday
<sam113101>
lawl
<Xeago>
now I choose an iPhone without asking you about a google nexus
<banister`sleep>
if i was to buy another phone now, i'd get the HTC one
<banister`sleep>
that thing is sexy
randomautomator has quit [Ping timeout: 245 seconds]
devoldmx has joined #ruby
<Xeago>
anyways, how do I politely thank them for their welcoming gesture
<banister`sleep>
Xeago write good c0d3
<IceDragon>
banister`sleep: in this day and age, it may result in the wrong meaning
blandflakes has joined #ruby
freerobby1 has joined #ruby
<Xeago>
"commitment"?
<IceDragon>
:D
<IceDragon>
Ah that may work
freerobby has quit [Read error: Connection reset by peer]
<sam113101>
STILL SOUNDS WEIRD
<Xeago>
Thanks, I greatly appreciate the commitment towards me.
<Xeago>
sam113101: agreed
<IceDragon>
yeah
<IceDragon>
>:
antulik has joined #ruby
<IceDragon>
Xeago: "Thanks, I greatly appreciate your efforts towards me" ?
shaunbaker has quit [Remote host closed the connection]
siera08 has joined #ruby
mansi has joined #ruby
axeman- has quit [Read error: Connection reset by peer]
<Stygia>
Unusual question. I'm considering using Ruby for a large personal project of mine. However, before I commit time to Ruby, I'd love to know something: You here, who use and (presumably) like ruby, what things do you think are poorly done and annoying in ruby? What things do you find are missing from other languages you enjoy? Any reasons to _not_do a major project in Ruby?
Wildhoney has quit [Read error: No route to host]
jprovazn has joined #ruby
axeman- has joined #ruby
<banister`sleep>
Xeago: "i felt like a butterfly, gently cradled in your large masculine arms, i never felt so safe before (p.s we should be together too)"
<Xeago>
banister`sleep: are you drunk?
<banister`sleep>
no
<banister`sleep>
just trying to help u out
<IceDragon>
._.
<IceDragon>
Xeago: I think he's still half asleep
<Xeago>
he should be getting tired, it is nearly dinner time
<IceDragon>
Stygia: its probably just a C thing, but I really miss n++ (increment operator), but we do have a handful of work arounds (like n = n.succ)
nowthatsamatt has joined #ruby
<IceDragon>
Stygia: I haven't had any real drawbacks with Ruby (apart from performance, which can be fixed by extensions most of the time)
Wildhoney has joined #ruby
filipe has quit [Ping timeout: 245 seconds]
<Stygia>
IceDragon, Huh, that doesn't exist? Weird.
<Stygia>
IceDragon, And, weren't the real performance issue, the "bad" mark-and-sweep GC, fixed with 1.9 and 2.0?
xeon has quit [Read error: Operation timed out]
<IceDragon>
nah, sometimes I end up doing some non-ruby things in ruby
<Stygia>
IceDragon, How do you mean, non-ruby things?
<Xeago>
I initially missed n++ as well
<Stygia>
IceDragon, I'm considering ruby _without_ rails. I don't want a heavy framework.
<IceDragon>
Image pixel manipulation
<sam113101>
I prefer n += 1 now
<IceDragon>
Like crazy manipulation and blending for GAME
<Xeago>
not anymore tho, I haven't come over a scenario where I would need it
<Xeago>
most of the time you do it during loops
<IceDragon>
I still miss ++ -- '_'
<Xeago>
but that is not needed in ruby
sr78ger has quit [Ping timeout: 264 seconds]
Spami has joined #ruby
tyman has quit [Quit: tyman]
mikepack has joined #ruby
<Stygia>
IceDragon, Yea alright, fair enough. I'd more say "non interpreted language".
<heftig>
rust isn't getting --/++ either. would just bloat the language
blackmesa has joined #ruby
<IceDragon>
True
<IceDragon>
Ruby does what it does best
<IceDragon>
:D Being simple and awesome
KobraKao has quit [Remote host closed the connection]
<IceDragon>
with plenty of sugar
<IceDragon>
which... has given some diabetes...
gyre008 has quit [Remote host closed the connection]
<heftig>
(and lead to discussions about preincrement/postincrement, et cetera)
mneorr has joined #ruby
<IceDragon>
Anyway Stygia, whatever you plan to do with Ruby should suffice
<Stygia>
IceDragon, Hmm yea.
<IceDragon>
Its even usuable for games, >,> I just wish we had more engines to choose from
<Stygia>
IceDragon, It is _mildly_ concering that you guys only seem to complain about minor things.
iamjarvo has quit [Read error: Operation timed out]
<IceDragon>
Gosu seems to be the GOTO for ruby ;_;
<Stygia>
IceDragon, IMO "good" languages tend to have adherets who love to complain about it.
<Stygia>
IceDragon, But nope, not a game or anything unfit for an interpreted language. :)
<IceDragon>
C++
<IceDragon>
>,>
<Xeago>
Stygia: I don't like require :)
<Stygia>
IceDragon, Basically.... a version of Lotus Notes that doesn't suck.
<IceDragon>
D:
<Xeago>
UI stuff,
<Xeago>
don't like that either..
<IceDragon>
DAFUQ XEAGO!
jkamenik has left #ruby [#ruby]
ssvo has joined #ruby
<IceDragon>
HOW CAN YOU NOT LIKE REQUIRE!
<IceDragon>
:D
<Stygia>
I could explain in more debt, basically it's a way to create UI's and interfaces with a GUI
<IceDragon>
D: **
iamjarvo has joined #ruby
Criztian has joined #ruby
akells has quit [Read error: Connection reset by peer]
akells_ has joined #ruby
<IceDragon>
:P I think it could be done
<banister`sleep>
IceDragon we have x += 1
<IceDragon>
Yup
<Stygia>
banister`sleep, Ah, hmm, well that more or less makes up for it.
<IceDragon>
Hence why I don't complain about incrementing anymore
<Stygia>
banister`sleep, I'd miss ++/--, honestly. But not a huge issue.
<banister`sleep>
Stygia that kind of explicit incrementation is quite rare in ruby anyway, mostly we can get away with Enumerable
siera08 has quit [Quit: ChatZilla 0.9.90.1 [Firefox 23.0.1/20130814063812]]
blackmesa has quit [Ping timeout: 240 seconds]
<Stygia>
banister`sleep, Yea I know, I'm "with "python right now, I never really needed it.
<IceDragon>
true we rarely get touchy with maths in ruby...
<IceDragon>
>.>
<IceDragon>
There be a slim chance of seeing Math# functions around...
<banister`sleep>
Stygia you mean you never needed it in python? does python have ++ ?
<quazimodo>
how do I define a << style method?
ahawkins has quit [Quit: leaving]
<quazimodo>
def butts<< butt; @butts << butt; end as a contrived example
camilasan has joined #ruby
<Stygia>
banister`sleep, Well it does, and I may have used it in python once or twice. But usually I would just use an iterable or list, and I didn't need to increment things.
<IceDragon>
quazimodo: def <<(value) ; do_stuff ; end
<IceDragon>
>.>
<banister`sleep>
quazimodo def butts.<<(butt) ...
<IceDragon>
its not rocket science
<quazimodo>
bizzare, because I couldn't freaking find the answer and it made me frustrated
akells_ is now known as akells
snooc has quit [Quit: snooc]
<quazimodo>
bizarre, rather
mrsolo has quit [Quit: This computer has gone to sleep]
<hoelzro>
I think the confusion was that quazimodo probably thought that object.butts << 1 was associated with object
<hoelzro>
rather than butts
Astralum has joined #ruby
leokaito has quit [Read error: Connection reset by peer]
filipe has joined #ruby
dawkirst has quit [Ping timeout: 268 seconds]
shaunbaker has joined #ruby
leokaito has joined #ruby
<IceDragon>
ruby has a lot of black magic if you look at it...
<IceDragon>
>,>
tylersmith has joined #ruby
<banister`sleep>
IceDragon what magic homeboy
<quazimodo>
hoelzro: right, i did
bricker has joined #ruby
<IceDragon>
>,> like the ability to define new methods on instances..
<IceDragon>
that is black magic
Villadelfia has quit [Ping timeout: 264 seconds]
<IceDragon>
and blocks
<Stygia>
IceDragon, Which actually is a negative in my book when considering Ruby. I like the "sensible" approach Python often takes, but python isn't consistent and can be a bit annoying. I like the regexp perlism, but not most others.
dawkirst has joined #ruby
<Stygia>
And, here's a thing, I actually _like_ significant whitespace. I think it's a great idea.
<quazimodo>
how does ["foo"] << "butts" work then?
<quazimodo>
is that not a method on the array instance?
<IceDragon>
array has a << method
leokaito has quit [Read error: Connection reset by peer]
<hoelzro>
quazimodo: object.butts returns an object
<hoelzro>
which itself has a << method
lurch_ has quit [Quit: lurch_]
leokaito has joined #ruby
ixti has joined #ruby
<quazimodo>
:/
pentameter has joined #ruby
Villadelfia has joined #ruby
<banister`sleep>
Stygia i just find the python approach boring and python has a tonne of warts
Astral_ has quit [Ping timeout: 264 seconds]
aganov has quit [Remote host closed the connection]
<Stygia>
banister`sleep, Yea I know. Their unittest framework just pisses me off.
<banister`sleep>
Stygia like the fact default arguments to a function are only evaluated when the function is defined
<Stygia>
Copy-paste from Java? Really?
<Stygia>
And no ability to use regexp properly, or in ifs... That I miss so badly from perl.
<quazimodo>
hrm ok
<IceDragon>
Python is still weird looking to me
<Stygia>
banister`sleep, Hmm. As for the default arguments. How would that be an issue?
<hoelzro>
def foo(stuff = ['bar']): ...
dkamioka has quit [Remote host closed the connection]
sevenseacat has quit [Quit: Leaving.]
<Stygia>
IceDragon, You'll adjust. I personally found that significant whitespace is great once you adjust.
thebastl has joined #ruby
<Stygia>
IceDragon, The general look of the language aside.
<IceDragon>
is there like some: Ruby > Python Bytecode compiler out there that I have no idea about?
<hoelzro>
there's that Ruby impl on RPythopn
<hoelzro>
*RPython
bluenemo has quit [Remote host closed the connection]
<IceDragon>
Stygia: I kinda love my 2 spaces indent, the ability to indent my code how I see fit.
<banister`sleep>
Stygia say you want to default to a random number, you'll only get the same random number each time you call the method, i.e: enemy_position(x = rand, y = rand)
<IceDragon>
You know, actually writing code that feels like mine.
thebastl has quit [Remote host closed the connection]
havenwood has joined #ruby
<banister`sleep>
Stygia also, i think there's something terrifying where if you default to an empty array, then if that array is modified later on, the next time you call that function with defaults you don't get an empty array anymore..you get whatever was stuffed into it
<banister`sleep>
(the equivalent of that in python)
<Stygia>
banister`sleep, Yea... alright, that would be a major issue.
<Stygia>
banister`sleep, The only reason I originally went for python over ruby was the gc performance issues... and AFAIK those are fixed now.
<Stygia>
I _especially_ miss first-class (right?) regexes.
<Stygia>
My favourite thing in perl.
DrShoggoth has joined #ruby
n1x has quit [Ping timeout: 260 seconds]
<Stygia>
banister`sleep, Hmm. I sorta fear ruby's heavy black magic, though. Another thing I enjoyed in Python was the relative clarity of what was going on, the plainness of the logic.
<forgot>
how to prevent unicorn kill a time-consuming job?
tyman has joined #ruby
<Stygia>
Also... it's heavily in the ruby community's favour that you guys are willing to engage in this talk. I think over at #perl I'd get flamed (I have).
cody-- has joined #ruby
rcosta_ has joined #ruby
devoldmx has quit [Read error: Connection reset by peer]
<IceDragon>
Perl, ;-; I never got to try Perl
<IceDragon>
I'm such a later starter...
mneorr has quit [Remote host closed the connection]
tonni has quit [Remote host closed the connection]
m8 has joined #ruby
<banister`sleep>
Stygia yeah, but magic is just something that you don't understand, once you understand it it's no longer magic :)
robscomputer has joined #ruby
mneorr has joined #ruby
<banister`sleep>
Stygia and if you use a tool like pry you can uncover how all that works fairly quickly
fgo has joined #ruby
<Stygia>
banister`sleep, Yea, I know, but I find that the magic in perl, for example, damages maintain- and readability.
Davey has joined #ruby
<Stygia>
banister`sleep, While I can learn it, and use tools to read and learn, having non-obvious behind-the-scenes things is often harder to maintain.
iamjarvo has quit [Ping timeout: 264 seconds]
<banister`sleep>
Stygia i think the perl magic and the ruby magic are different kinds of things, perl magic afaik is enormous amounts of syntactic sugar built into the language
mrsolo has joined #ruby
gyre008 has joined #ruby
<Stygia>
banister`sleep, And someone spilled salt into the sugar. But quite possible.
<banister`sleep>
Stygia whereas ruby magic is more metaprogramming stuff, that is actually quite simple, but appears magic because of the power
tyman has quit [Client Quit]
<banister`sleep>
anyway, you have to give an example of ruby magic that you find scary and we can dissect it for u
veleno has quit [Quit: veleno]
rcosta has quit [Ping timeout: 248 seconds]
BlakeRG has joined #ruby
mneorr_ has joined #ruby
mneorr has quit [Read error: Connection reset by peer]
niceguyjames has quit [Quit: Computer has gone to sleep.]
<Stygia>
banister`sleep, Heh, but in order to find that sort of thing, I'd have to invest time to properly learn ruby.
antulik has quit [Remote host closed the connection]
MrThePlague has quit [Remote host closed the connection]
<Stygia>
banister`sleep, Which I probably will. :) I really like the language at a glance.
juarlex has quit [Remote host closed the connection]
MrThePlague has joined #ruby
kobain has joined #ruby
<Stygia>
banister`sleep, My idea was, though, to try and look at the lang in some depth without actually learning it. Whether that's possible is another matter.
<banister`sleep>
Stygia wait so you say you're scared of ruby magic, but you can't actually point to any examples? :P so it's just based on hear-say ?
juarlex has joined #ruby
forgot_ has joined #ruby
<terrellt>
BlakeRG: It's either an old version of RubyMine or it doesn't like the space before the colon.
ssvo has quit [Ping timeout: 260 seconds]
<Stygia>
banister`sleep, Well no, I just know that ruby is a language that _has_ magic. And like I said, I found that I agreed with the principle of transparency in python. I'm a perl programmer historically, so I've got an aversion to magic, often (excepting regex).
<BlakeRG>
terrellt: i ran "format code" on that section and it added those spaces for whatever reason
<BlakeRG>
and i'm on the latest version
<terrellt>
BlakeRG: If you remove them do the complaints go away?
Macaveli has joined #ruby
<Macaveli>
Can I ask question about cron here?
gyre008 has quit [Ping timeout: 260 seconds]
<banister`sleep>
Stygia yeah
<BlakeRG>
terrellt: i took out the spaces. the tooltip is saying "Expected: ="
forgot has quit [Ping timeout: 245 seconds]
andikr has joined #ruby
forgot_ is now known as forgot
<terrellt>
Wat
<BlakeRG>
oh, weird
banister`sleep has quit [Remote host closed the connection]
<BlakeRG>
i just changed my ruby SDK to 2.0.0 and they went away
robscomputer has quit [Remote host closed the connection]
<BlakeRG>
it was set to 1.9.x
fgo has quit [Ping timeout: 264 seconds]
swordsmanz has joined #ruby
akells has quit [Remote host closed the connection]
<BlakeRG>
but i thought 1.9.x supported this new syntax?
<terrellt>
Maybe it's classifying them as keyword arguments now.
banisterfiend has joined #ruby
Targen has quit [Ping timeout: 264 seconds]
<BlakeRG>
this is a replacement for a hashrocket right?
tylersmith has quit [Read error: Connection reset by peer]
<terrellt>
Yeah, but 2.0 added keyword arguments which has a similar syntax.
randomautomator has joined #ruby
hiyosi has joined #ruby
<Stygia>
Oh, while I remember. Is ruby 1.9 and 2.0 comparable to python 3, that is, is there an ongoing effort to port libraries etc, and a significant number of modules I'd miss out on if I used this newest version?
eka has joined #ruby
<terrellt>
Stygia: No. There's practically no backwards incompatibility between 2.0 and 1.9.
<terrellt>
Stygia: Even if there was, the Ruby community's phenomenal at switching revisions.
<Stygia>
terrellt, Fantastic.
<BlakeRG>
does anyone know if rubymine obeys the "ruby "2.0.0"" line in my gemfile?
<BlakeRG>
liek RVM does
forgot has quit [Read error: Connection reset by peer]
<Stygia>
terrellt, See, I really _want_ to use ruby. To me it's Python with the parts of Perl I really like. I'm just worried I'll get going on my project and then wish I'd used, eh, clojure or something. Or python still, I guess.
<Stygia>
terrellt, So I hope you'll put up with my silly questions for a bit. :)
<terrellt>
Stygia: It's a solid, fun to play with language. Not to mention the community is fantastic - they're genuinely concerned with best practices and maintainability, so they've built the toolsets necessary to accomodate that.
scottradcliff has joined #ruby
AndChat| has quit [Ping timeout: 264 seconds]
<BlakeRG>
so :a => b is analogous to a: => b
<BlakeRG>
?
jprovazn has quit [Quit: Odcházím]
Criztian has quit [Remote host closed the connection]
Banistergalaxy has joined #ruby
<Stygia>
terrellt, Yup, that's what I've noticed.
<terrellt>
BlakeRG: Yup.
<terrellt>
Wait
<Stygia>
terrellt, I was especially impressed with unittests seemingly being an integral part of ruby and rails as communities.
<terrellt>
I read that wrong, I don't know the answer to that.
kaspergrubbe has quit [Remote host closed the connection]
digital-ghost has joined #ruby
Advocation has joined #ruby
<terrellt>
Stygia: If we're talking about Rails, it's not just unit tests either. Integration tests - you'll often find Rails projects that will boot up a headless browser that will click around and ensure everything works through all layers, because it's the right thing to do.
<banisterfiend>
terrellt not that phenomenal, 1.8 survived way too long imo, but hopefully that bitch is finally dead
<Stygia>
terrellt, Hmm, yup. My project would suffer from using something as heavy as rails, but still.
razi has joined #ruby
<terrellt>
Stygia: Right, that's just an example. Capybara works for other Ruby frameworks as well.
hasrb has joined #ruby
<terrellt>
BlakeRG: {:a => b} == {a: b}
jlast has joined #ruby
jefflyne has joined #ruby
jefflyne has quit [Remote host closed the connection]
<Stygia>
terrellt, Yea I know, like I said, the ruby community strikes me as great (You guys actually put up with my attempt here to find bad things about ruby), unittests and best practice is important... and I can actually use regexes like in perl.
<BlakeRG>
terrellt: very cool, i'm more familiar with the new syntax coming from PHP/JS background
<Stygia>
I know I've said that a lot, but goddamn do I hate python's re class.
<terrellt>
BlakeRG: I had the same background - I still like hash rockets.
<terrellt>
Stygia: Lol.
<Stygia>
terrellt, But seriously, inability to use re in conditionals is just ridiculous.
<Stygia>
terrellt, IMO makes it more or less useless as a quick scripting language.
<BlakeRG>
is it preferred to use && or "and" - || vs OR in conditionals?
pothibo has joined #ruby
<banisterfiend>
Stygia the coolest thing about ruby is executable class bodies IMO
<terrellt>
BlakeRG: They're too different things. Make your life easier and use &&/||
<terrellt>
Two.
<terrellt>
Wow, I'm tired.
<BlakeRG>
oh, they are different? weird
<terrellt>
The execution order is different.
<Stygia>
banisterfiend, Hmm, you mean the "code blocks" thing?
<BlakeRG>
i need to read up on the ruby style guide i supoose
niceguyjames has joined #ruby
alup has quit [Quit: Leaving]
<banisterfiend>
Stygia no i mean things like this: class Hello; attr_accessor :x; end
<BlakeRG>
== checks for equality but does === check for equality and data type?
akells has joined #ruby
<Stygia>
banisterfiend, What exactly is that?
<banisterfiend>
Stygia attr_accessor isn't a keyword but a class-method, the class definition is executed like any other code and you can run methods in there, in this case i'm running a method called "attr_accessor" which actually creates methods for me (in this case a getter and a setter method for 'x')
<Stygia>
banisterfiend, Oooh right, I remember that.
rippa has joined #ruby
<Stygia>
banisterfiend, Python has it but much more involved. Well not necessary executable bodies, but the accessor methods etc.
St_Marx has quit [Quit: Ex-Chat]
<banisterfiend>
Stygia yeah, and all that stuff is about to get even cooler in ruby 2.1
<Stygia>
banisterfiend, I remember really liking that when I read a ruby book way back when.
<Stygia>
terrellt, coming from an insomniac, if you're tired, drink cold water.
<BlakeRG>
terrellt: thanks :) and yes, PHP is weird lol
<banisterfiend>
Stygia in 2.1 method definitions return the name of the method (as a symbol) so we can decorate the method inline as we define it, it will result in some pretty slick looking code
jamesaanderson has joined #ruby
ananthakumaran has joined #ruby
<Stygia>
banisterfiend, Fancy.
brettnem has joined #ruby
<terrellt>
banisterfiend: Shiny.
<Stygia>
banisterfiend, I'll have to admit it would have taken something extraordinarily annoying for me to consider alternatives to ruby.
<Stygia>
.. maybe clojure or something.
<terrellt>
Stygia: JVM makes me sad. =(
<Stygia>
banisterfiend, For example, being flamed for "talking shit" about ruby would have done it. :P
stack has joined #ruby
ewnd9 has quit [Ping timeout: 260 seconds]
havenwood has quit [Remote host closed the connection]
<Stygia>
terrellt, Hmm yea I could see that as being an issue. The reason i'd call that my go-to LISP is because you can use Java's standard library (and most other LIPS's don't have significant libraries as such).
<banisterfiend>
Stygia clojure looks like a cool language too, haskell is even nicer
<terrellt>
Scala's a popular java-type thing lately.
<Stygia>
banisterfiend, I hear too many people saying haskell is a "toy" or academic language, though. Would be silly of me to claim it, since I've never learned it, but still.
swordsmanz has quit [Quit: swordsmanz]
<banisterfiend>
Stygia nah, haskell is incredible and is only increasing in popularity. Even john carmack was saying great things about it in a recent interview
<Stygia>
banisterfiend, Like I said, I don't know if that is actually true.
<Stygia>
banisterfiend, And haskell's definitively high on my list of languages to learn.
stack_ has quit [Ping timeout: 245 seconds]
randomau_ has joined #ruby
<Stygia>
banisterfiend, If I'd been asked, I'd say right after ruby that'd be it.
colonolGron has joined #ruby
<banisterfiend>
Stygia well i guess the primary problem preventing companies using it is that it's hard to find good haskell programmers to work for you :)
supergiantrobot has joined #ruby
brettnem has quit [Ping timeout: 260 seconds]
bricker has quit [Read error: Connection reset by peer]
<Stygia>
banisterfiend, I'd say third-party libraries could also be an issue. But that's true for most other languages.
<terrellt>
I thought it was interesting when that one company switched to Go, were concerned about hiring good programmers, and discovered they got the best ones.
<terrellt>
Or at least, what they classified as "best"
<terrellt>
Who knows. ;)
anay has joined #ruby
bricker has joined #ruby
pitzips has joined #ruby
Spami has quit [Quit: This computer has gone to sleep]
dash_ has quit [Quit: dash_]
<Stygia>
terrellt, I don't think most shitty programmers go and learn languages like go or haskell, or at least won't before they're popular.
randomautomator has quit [Ping timeout: 264 seconds]
<BlakeRG>
Stygia: thats kind of an arrogant statement, i've meet quite a few amazing programmers who like and use Go, almost all languages have their time and place
rcosta_ has quit [Remote host closed the connection]
ssvo has joined #ruby
<Stygia>
BlakeRG, Oh, you either read me wrong or I said it wrong.
<BlakeRG>
Stygia: sorry, probably not following the conversation
<Stygia>
BlakeRG, I meant to say, shitty programmers do _not_ go and learn languages like that, usually, since they wouldn't care about academic explorations of programming or novel approaches.
<BlakeRG>
ahh, sorry!
<Stygia>
BlakeRG, It was actually intended as a general statement complimenting the programmers who do. Of course it isn't always true, but I would assume that the sort of coders who go into that love their trade.
phracker has quit [Ping timeout: 240 seconds]
Niamkik has quit [Read error: Operation timed out]
<BlakeRG>
Stygia: yes, people who don't seek out new things and are comfortable with the things they've been using for years on end aren't usually top tier
Macaveli has quit [Quit: Computer has gone to sleep.]
camilasan has quit [Remote host closed the connection]
<Stygia>
BlakeRG, Not just that, it's more that people who care about their trade tend to be better, and those who explore the "novel" languages would presumably tend to care more.
fgo has joined #ruby
<BlakeRG>
i was playing with Qbasic a few weeks ago in FreeDos, does that count? :P
Tricon has joined #ruby
anay has quit [Remote host closed the connection]
<BlakeRG>
oh god, memories
<Stygia>
BlakeRG, Hah.
<Stygia>
BlakeRG, The first language I ever learned was VBA
<Stygia>
BlakeRG, Well I didn't learn it, really. But I was supposed to.
freerobby1 has quit [Read error: Connection reset by peer]
<Stygia>
BlakeRG, My first, shittiest job, their whole application was in microsoft access...
freerobby has joined #ruby
johnnyfuchs has joined #ruby
<BlakeRG>
i was thinking how cool it would be to write an HTTP server in Qbasic, then i realized there's no TCP stack :(
<BlakeRG>
lol Stygia
<sam113101>
Stygia: wow
zodiak has joined #ruby
Scient has quit [Ping timeout: 264 seconds]
jamesaanderson has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<banisterfiend>
BlakeRG you can do anything with peek and poke, though :)
tk__ has quit [Quit: ばいばい]
<BlakeRG>
banisterfiend: this is amazing
KobraKao has joined #ruby
<BlakeRG>
how in the hell he managed to pull this off is beyond me
fgo has quit [Ping timeout: 240 seconds]
MrThePlague has quit [Remote host closed the connection]
MrThePlague has joined #ruby
MrThePlague has joined #ruby
MrThePlague has quit [Changing host]
<banisterfiend>
BlakeRG yeah, it's incredible. But i remember back when i did some quickbasic back in the day we used to write assembly routines and write them out to memory using peek & poke, doing that we got things like sound blaster support, mouse support, svga graphics and so on
forgot has joined #ruby
<banisterfiend>
it's possible to do cool stuff it's just an absolute pain in the ass
<BlakeRG>
the guy who wrote this must be a masochist
Monie has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
Rym has quit [Read error: Connection reset by peer]
<Stygia>
And hah... since this company threated all us interns like shit, I can't help but laugh
<Stygia>
They "updated" their program to silverlight
Wildhoney has quit [Ping timeout: 264 seconds]
Hanmac1 is now known as Hanmac
BSaboia has joined #ruby
Davey has quit [Quit: Computer has gone to sleep.]
<Stygia>
I warned them that might get obsolete after a few years and we should just generate things in html/js/etc
<Stygia>
And now silverlight is going obsolete :P And I cheer for all my other former employers, even the one that fired me, but fuck those guys, seriously.
phracker has joined #ruby
seich- has quit [Ping timeout: 264 seconds]
<banisterfiend>
Hanmac would you ever date a chicken?
thebastl has joined #ruby
anay has joined #ruby
<Hanmac>
banisterfiend: in later epiosdes the line was "i am not overreacting! i am a teenager!" :P
Rym_ has quit [Ping timeout: 260 seconds]
<banisterfiend>
cute
blackmesa has joined #ruby
geekbri has joined #ruby
soba has joined #ruby
luist has joined #ruby
<Xeago>
is it possible to have an else on an unless?
splittingred has quit [Ping timeout: 264 seconds]
<banisterfiend>
Xeago Yeh
<Xeago>
can you have an elsif?
<canton7>
by that point, you're better off using 'if' instead of 'unless'
thebastl has quit [Remote host closed the connection]
havenwood has joined #ruby
<Xeago>
the condition is more readable with an unless..
<canton7>
many style guides say 'unless cond ... else' is unaccepptable - use 'if !conf ... else'
<Mon_Ouie>
It matches even though the first character is not a digit, which is why you should use \A to reference the beginning of the string
x1337807x has joined #ruby
prisonguard has joined #ruby
pwh has joined #ruby
<goodcodeguy>
right, I was going to suggest that
<goodcodeguy>
you are right
mlpinit has joined #ruby
<goodcodeguy>
.. /\A[0-9]/ =~ '3foo'
<goodcodeguy>
would be more appropriate correct?
<apeiros>
[0-9] --> \d
nomenkun has quit [Remote host closed the connection]
pwh has quit [Client Quit]
<Mon_Ouie>
Yup
pkrnj has quit [Quit: Computer has gone to sleep.]
atno is now known as atno|HoldingBall
flaviodesousa has quit [Ping timeout: 264 seconds]
<goodcodeguy>
apeiros: yar, I always forget about \d :)
atno|HoldingBall is now known as atnoHoldingBalls
juarlex has quit [Client Quit]
digital-ghost has joined #ruby
Spami has joined #ruby
juarlex has joined #ruby
pvizcay has quit [Quit: leaving]
Spami has quit [Changing host]
Spami has joined #ruby
jaimef has quit [Excess Flood]
flaviodesousa has joined #ruby
alvaro_o has joined #ruby
carraroj has quit [Read error: Connection reset by peer]
karl___ has quit [Read error: Connection reset by peer]
carraroj has joined #ruby
altamic has joined #ruby
__userna1 has joined #ruby
mmitchell has quit [Remote host closed the connection]
altamic has quit [Excess Flood]
pen has joined #ruby
fgo has joined #ruby
__username__ has quit [Ping timeout: 264 seconds]
xk_id has quit [Quit:
fantazo has quit [Remote host closed the connection]
xk_id has joined #ruby
soba_ has quit [Read error: Connection reset by peer]
Neomex has quit [Quit: Neomex]
<Hanmac>
there is also [[:digit:]] but its different from \d
jaimef has joined #ruby
fgo has quit [Ping timeout: 276 seconds]
pel_daniel has joined #ruby
jamesaanderson has joined #ruby
snath has joined #ruby
binaryplease has quit [Ping timeout: 264 seconds]
ArchBeOS has quit [Quit: Leaving]
wallerdev has quit [Quit: wallerdev]
pkrnj has joined #ruby
nwertman has joined #ruby
axl_ has quit [Ping timeout: 260 seconds]
jlast_ has joined #ruby
atyz has joined #ruby
dreinull has joined #ruby
MrThePlague has quit [Remote host closed the connection]
pen has quit [Remote host closed the connection]
axl_ has joined #ruby
<dreinull>
how do I require a gem unless I'm on jruby?
jlast has quit [Read error: Operation timed out]
pen has joined #ruby
<nprice>
سمَـَّوُوُحخ ̷̴̐خ ̷̴̐خ ̷̴̐خ امارتيخ ̷̴̐خ
endless_walrus has joined #ruby
mlpinit has quit [Remote host closed the connection]
kaspergrubbe has quit [Remote host closed the connection]
digital-ghost has quit [Remote host closed the connection]
pen has quit [Remote host closed the connection]
digital-ghost has joined #ruby
dreinull has quit [Remote host closed the connection]
mlpinit has joined #ruby
pkrnj has quit [Ping timeout: 245 seconds]
failshell has quit [Read error: Operation timed out]
dreinull has joined #ruby
darksoox has quit [Quit: leaving]
kofno has quit [Remote host closed the connection]
<dreinull>
sorry my client crashed
kofno has joined #ruby
<dreinull>
using JRUBY_VERSION is the standard way of doing it?
breakingthings has quit [Remote host closed the connection]
seich- has quit [Ping timeout: 240 seconds]
akells has quit [Remote host closed the connection]
breakingthings has joined #ruby
xk_id has quit [Remote host closed the connection]
zigomir_ has quit [Quit: Leaving]
<endless_walrus>
Hey all - I'm making POST requests using Faraday with Typhoeus as its adapter. Locally it works fine, but on our production servers, the requests are getting interpreted as GET.. the headers are showing that its definitely a POST though.. any thoughts on how I can debug this?
wrseward has quit [Ping timeout: 246 seconds]
senayar has joined #ruby
marcdel has joined #ruby
<dreinull>
endless_walrus: what about manual post requests?
banister`gym has quit [Remote host closed the connection]
iamjarvo has quit [Remote host closed the connection]
juarlex has quit [Remote host closed the connection]
<endless_walrus>
dreinull: good question, looking into it
banisterfiend has joined #ruby
mary5030 has joined #ruby
iamjarvo has joined #ruby
rickmasta has quit [Quit: Leaving...]
pkrnj has joined #ruby
d2dchat_ has joined #ruby
grits has joined #ruby
ndrei has quit [Ping timeout: 264 seconds]
devoldmx3 has joined #ruby
sh00p has joined #ruby
iliketur_ has joined #ruby
<grits>
Can someone please explain what is happening in the 2nd part of this line? (the => part) : before_filter :validate_auth, :var => [:validate_session]
n1x has joined #ruby
blackmesa has quit [Ping timeout: 240 seconds]
ixti has joined #ruby
<Morrolan>
That's a hash without braces.
pen has joined #ruby
<Morrolan>
If you add brackets, braces and these things, it would look like this: before_filter(:validate_auth, { :var => [:validate_session] })
kofno has quit [Remote host closed the connection]
Advocation has quit [Client Quit]
Usse has quit [Remote host closed the connection]
Usse has joined #ruby
relix has joined #ruby
Criztian has quit [Remote host closed the connection]
pkrnj has joined #ruby
<IceDragon>
Hey guys, I got a lazy question: Has anyone ever written a script that splits a single source file into seperate files, containing only 1 class each. (Yup I'm feeling that lazy, staring at these 10000+ line scripts)
carraroj has quit [Quit: Konversation terminated!]
dkamioka has joined #ruby
radic_ has joined #ruby
aaronmcadam has quit [Quit: Leaving...]
ch_ has joined #ruby
colonolGron has joined #ruby
banzounet has joined #ruby
woolite64 has joined #ruby
nwertman has joined #ruby
zodiak has quit [Ping timeout: 264 seconds]
krawchyk has quit [Remote host closed the connection]
Tolnaiz has quit [Remote host closed the connection]
Advocation has joined #ruby
Advocation has quit [Client Quit]
xefi_ has quit [Ping timeout: 245 seconds]
xefi_ has joined #ruby
workmad3 has joined #ruby
ch_ has left #ruby [#ruby]
jaynewstrom has quit [Remote host closed the connection]
jaynewstrom has joined #ruby
Fire-Dragon-DoL has quit [Ping timeout: 264 seconds]
Uranio has quit [Quit: while you reading this, a kitty dies]
rickmasta has joined #ruby
moted has quit [Quit: moted]
dkamioka has quit [Ping timeout: 245 seconds]
dallasm_ has joined #ruby
Fire-Dragon-DoL has joined #ruby
Companion is now known as companion
mikepack has joined #ruby
seich- has quit [Ping timeout: 240 seconds]
eoinkelly has joined #ruby
Fire-Dragon-DoL has quit [Client Quit]
Fire-Dragon-DoL1 has joined #ruby
Fire-Dragon-DoL1 has left #ruby [#ruby]
stayarrr has joined #ruby
Fire-Dragon-DoL has joined #ruby
Kabaka_ has quit [Remote host closed the connection]
Banistergalaxy has quit [Read error: Connection reset by peer]
Banistergalaxy has joined #ruby
workmad3 has quit [Ping timeout: 264 seconds]
ndrei has joined #ruby
seich- has joined #ruby
phracker has quit [Ping timeout: 240 seconds]
eldariof has quit [Ping timeout: 248 seconds]
i_s has joined #ruby
s0ny123 has quit [Quit: Lost terminal]
Kabaka_ has joined #ruby
obs has quit [Quit: Konversation terminated!]
relix has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
russt has quit [Remote host closed the connection]
tabolario has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
sventon has joined #ruby
Kabaka_ has quit [Excess Flood]
efrainolivares has quit [Quit: efrainolivares]
bluOxigen has quit [Ping timeout: 246 seconds]
ndrei has quit [Ping timeout: 276 seconds]
thebastl has joined #ruby
ndrei has joined #ruby
sventon has quit [Remote host closed the connection]
obs has joined #ruby
phracker has joined #ruby
funburn has joined #ruby
funburn has quit [Client Quit]
efrainolivares has joined #ruby
i_s has quit [Ping timeout: 245 seconds]
zigomir has quit [Ping timeout: 264 seconds]
kofno has joined #ruby
bzitzow has joined #ruby
chrisja has quit [Quit: leaving]
Kabaka_ has joined #ruby
Usse has quit [Remote host closed the connection]
tonni has joined #ruby
freerobby has quit [Quit: Leaving.]
MrZYX is now known as MrZYX|off
funburn has joined #ruby
i_s has joined #ruby
wems has joined #ruby
haxrbyte_ has joined #ruby
shredding has quit [Quit: shredding]
Advocation has joined #ruby
haxrbyte has quit [Read error: Connection reset by peer]
MrZYX|off is now known as MrZYX
kofno has quit [Ping timeout: 245 seconds]
dkamioka has joined #ruby
phantasm66 has quit [Quit: *sleeeep….]
codecop has quit [Remote host closed the connection]
sh00p has quit [Ping timeout: 264 seconds]
fgo has joined #ruby
jds_ has joined #ruby
Advocation has quit [Client Quit]
marcdel has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<apeiros>
and of course reading a foreign language is less readable *to you* than one you've learnt
<MorbidOne>
lol
<Morrolan>
Hanmac: Heh.
v0n has quit [Ping timeout: 264 seconds]
kaldrenon has quit [Ping timeout: 245 seconds]
<apeiros>
Hanmac: in 2.1, it's even a literal
fmcgeough has quit [Quit: fmcgeough]
jds_ has quit [Ping timeout: 245 seconds]
breakingthings has quit [Remote host closed the connection]
hasrb has joined #ruby
elaptics`away is now known as elaptics
breakingthings has joined #ruby
jonahR has quit [Quit: jonahR]
efrainolivares has quit [Quit: efrainolivares]
<banisterfiend>
apeiros sup
saarinen has quit [Remote host closed the connection]
JDHankle has quit [Remote host closed the connection]
pothibo has quit [Remote host closed the connection]
thebastl has quit [Remote host closed the connection]
ferdev has quit [Remote host closed the connection]
<Hanmac>
apeiros: WTF ;P
ldnunes has quit [Quit: Leaving]
<apeiros>
banisterfiend: playing ff7
<apeiros>
u?
saarinen has joined #ruby
<banisterfiend>
apeiros in an emulator?
madb055 has quit [Ping timeout: 260 seconds]
<apeiros>
banisterfiend: no, on win7
fcahoon has joined #ruby
<banisterfiend>
apeiros watching an attenborough documentary, but generally bored out of my nut
<banisterfiend>
Hanmac has adventure time now finished for this season?
themilkboy has joined #ruby
benwoody has joined #ruby
<Hanmac>
banisterfiend: i watched the TooOld episode ... the LemonTribe totally CREAPS ME OUT ... did you see what they use as Toilet??
echevemaster has joined #ruby
echevemaster has quit [Changing host]
echevemaster has joined #ruby
MrThePlague has joined #ruby
MrThePlague has joined #ruby
<banisterfiend>
Hanmac yes i saw it, but is that the last episode for this season?
jamesaanderson has joined #ruby
iamjarvo has joined #ruby
jp- has quit [Ping timeout: 264 seconds]
saarinen has quit [Remote host closed the connection]
themilkboy is now known as mlkby
breakingthings has quit [Remote host closed the connection]
mlkby is now known as mkby
saarinen has joined #ruby
pkrnj has quit [Ping timeout: 240 seconds]
v0n has joined #ruby
<Hanmac>
banisterfiend: hm there are min 2 more but they are coming at 2. september ... next one is called "Earth & Water" features PB and FB ... (that would be very interesting)
<banisterfiend>
Hanmac who is FB ?
<Hanmac>
i mean FP
<banisterfiend>
ah
ukd1 has quit [Remote host closed the connection]
_bart has joined #ruby
argentum has quit [Remote host closed the connection]
MrThePlague has quit [Remote host closed the connection]
goodcodeguy has quit [Quit: leaving]
<Eiam>
oh bubble gum
<Eiam>
my kids love adventure time
starfox21 has joined #ruby
<Eiam>
and I feel bad for letting them watch it
<Eiam>
favorite episode are fionna & cake ones, and I do wish they'd spin it off into its own thing, since all my kids are girls
defaultro has quit [Quit: defaultro]
tabolario has joined #ruby
<banisterfiend>
Eiam fiona is thick
<Eiam>
thick as in, body?
<banisterfiend>
i was impressed they chose to make her like that
<banisterfiend>
Yeah
rickmasta has quit [Quit: Leaving...]
<banisterfiend>
she's got back
<Eiam>
yes
pkrnj has quit [Ping timeout: 264 seconds]
<Eiam>
its perfect, she's perfect
akells has quit [Remote host closed the connection]
yekta has quit [Quit: yekta]
<banisterfiend>
Eiam do they watch MLP too?
dash_ has quit [Quit: dash_]
<Hanmac>
Eiam Warning ... newer episodes are maybe to creapy for kids ;P ... then you could also let your kids watch DoctorWho episodes made by "Steven Moffat" ...
pkrnj has joined #ruby
iamjarvo_ has quit [Read error: Connection reset by peer]
<Eiam>
banisterfiend: not very often..
<Eiam>
banisterfiend: but I think its a pretty good one for girls too
<banisterfiend>
Eiam how old are they?
<Eiam>
6 & 5
iamjarvo has joined #ruby
<banisterfiend>
cute
phracker has joined #ruby
prisonguard has quit [Read error: Connection reset by peer]
BillCriswell has quit [Remote host closed the connection]
fenicks has quit [Remote host closed the connection]
benwoody has quit [Ping timeout: 264 seconds]
benwoody has joined #ruby
axeman- has quit [Remote host closed the connection]
elux has quit [Quit: Bye!]
Woodsman has joined #ruby
iamjarvo has quit [Ping timeout: 246 seconds]
pkrnj has quit [Ping timeout: 246 seconds]
wmoxam has quit [Ping timeout: 268 seconds]
osvico has joined #ruby
mengu has joined #ruby
rickmasta has joined #ruby
phracker has quit [Ping timeout: 240 seconds]
<Woodsman>
out of curiosity, can ruby itself easily access databases or does is it much simpler with ruby on rails?
neo_ has joined #ruby
neo_ has quit [Client Quit]
fcahoon has quit [Quit: Leaving]
asobrasil has left #ruby [#ruby]
Yakko has joined #ruby
alex__c2022 has quit [Quit: alex__c2022]
<EricArchitrave>
@Woodsman plenty of non-Rails-based db access libraries for use with Ruby. DataMapper is a popular alternative.
<Woodsman>
cool, thanks. i'll check that out
pkrnj has joined #ruby
brianpWins has quit [Quit: brianpWins]
efrainolivares has joined #ruby
ericmathison has quit [Read error: Operation timed out]
noname001 has quit [Ping timeout: 264 seconds]
Bry8Star{T2 has joined #ruby
dallasm_ has quit [Remote host closed the connection]
eka has joined #ruby
lewis_ has joined #ruby
lewis_ is now known as Lewix
colonolGron has quit [Quit: Lost terminal]
txdv has joined #ruby
Lewix has quit [Changing host]
Lewix has joined #ruby
axl_ has joined #ruby
kofno has joined #ruby
<apeiros>
Woodsman: ruby on rails itself has nothing to do with db access. as a full-stack webdev framework it comes with activerecord included.
efrainolivares has quit [Client Quit]
<apeiros>
Woodsman: you can use activerecord outside of rails too
ner0x has joined #ruby
<apeiros>
outside of rails I prefer the gem 'sequel', though
<Hanmac>
Eiam www.bbc.co.uk/doctorwho/episodes/fearforecast.shtml << in category 1 - 5 they have also 5.5 for "Off the scale!" and 6 for "Beyond Fear" ... imo some episodes from AT should fall into the same categories
forgot has joined #ruby
forgot has quit [Client Quit]
efrainolivares has joined #ruby
razi has quit [Ping timeout: 248 seconds]
twoism has quit [Read error: Connection reset by peer]
kilophoton has quit [Ping timeout: 264 seconds]
twoism has joined #ruby
juarlex has joined #ruby
n_blownapart has joined #ruby
phracker has joined #ruby
forgot has joined #ruby
n_blownapart has quit [Remote host closed the connection]
kofno has quit [Ping timeout: 260 seconds]
pkrnj_ has joined #ruby
mib_mib has joined #ruby
chrismerrill has joined #ruby
<mib_mib>
hi guys - is there any easy way to append to an IO object
pkrnj has quit [Ping timeout: 260 seconds]
pkrnj_ is now known as pkrnj
<mib_mib>
or do i have to 'read it' as a string, then concatenate and wrap it again
jamesaanderson has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
dreinull has quit [Remote host closed the connection]
ninegrid has quit [Quit: brb]
jamesaanderson has joined #ruby
thinkdevcode has joined #ruby
zacts has joined #ruby
<chrismerrill>
is it a buffer you can write to or can you transform it into one?
jibi has quit [Quit: .]
<Hanmac>
mib_mib: the problem is that most IOs are read-only or write-only so you cant easily "append" something
<mib_mib>
Hanmac: technically its a rails Tempfile
<apeiros>
with files you can seek & write. but depends on the mode it was opened.
mikecmpbll has joined #ruby
<apeiros>
also if you open it yourself, there's append mode
volty has joined #ruby
<apeiros>
see IO::open
<mikecmpbll>
is there a standard way of parsing fractional characters?
mkby has quit [Quit: Leaving]
<mikecmpbll>
1¼ = 1.25
<mikecmpbll>
for instance
alekst has quit [Ping timeout: 264 seconds]
seich- has quit [Ping timeout: 240 seconds]
Matriks has quit [Remote host closed the connection]
endzyme has quit [Remote host closed the connection]
zacts has quit [Client Quit]
jaimef has quit [Excess Flood]
thinkdevcode has quit [Remote host closed the connection]
nuclearblast has joined #ruby
d2dchat_ has quit [Remote host closed the connection]
jaimef has joined #ruby
Mon_Ouie has quit [Ping timeout: 245 seconds]
mansi has quit [Remote host closed the connection]
mansi has joined #ruby
<Hanmac>
mikecmpbll: hm no there is not, but you can use gsub:
<goleldar>
what is the best way to create a hash that contains all the permutations of an array with each key representing every possible permutation length
stonevil has joined #ruby
<goleldar>
example hash[2] = array.permutation(2).to_a, hash[3] = array.permutation(3), etc
<goleldar>
you think there is a way to optimize the speed ?
tylersmith has joined #ruby
kilophoton has quit [Ping timeout: 246 seconds]
snovak has quit [Ping timeout: 264 seconds]
<yoshie902a>
goleldar: not that I can think of.
nwertman has quit [Remote host closed the connection]
ewnd9 has quit [Remote host closed the connection]
mikecmpbll has quit [Quit: Page closed]
rickruby has joined #ruby
banisterfiend has quit [Remote host closed the connection]
banisterfiend has joined #ruby
<yoshie902a>
does anyone have any idea how to write an rspec test for something like this.. https://gist.github.com/yoshie902a/78262ef20e947b1c7fdd where the @client is making a http request and returning values that are being returned in the block.
<yoshie902a>
I guess the block is throwing me off
gstamp has joined #ruby
chrismerrill has left #ruby [#ruby]
MrZYX is now known as MrZYX|off
<yoshie902a>
should I stub or mock the @client http request? and if so, how is that handled in terms of syntax with the block?
<yoshie902a>
see gist above for reference
AlSquire has quit [Read error: Operation timed out]
emptyflask has quit [Remote host closed the connection]
<behavioral>
can anyone offer me some advice on choosing a strategy vs a builder vs a chain of responsibility?
smashwilson has left #ruby [#ruby]
jamesaanderson has quit [Ping timeout: 245 seconds]
stonevil has quit [Ping timeout: 276 seconds]
devoldmx has joined #ruby
Fire-Dragon-DoL has quit [Quit: Leaving.]
mansi has quit [Ping timeout: 276 seconds]
JMcAfreak has left #ruby ["("]
<banisterfiend>
behavioral lol put your 'design patterns' book down and live a little
<banisterfiend>
:P
<behavioral>
I have an application that deals with assets and accounts. An Asset can be of different kinds, PMAsset, CurrAsset, IPAsset,REAsset. Accounts can have one or more of these assets and my question is whether going for a behavioral pattern like a strategy where the account type/asset combination is implemented in the strategy or to go for a builder that can create an account and return an array of accounts numbers that were created
_maes_ has quit [Ping timeout: 260 seconds]
tylersmith has quit [Remote host closed the connection]
jamesaanderson has joined #ruby
devoldmx has quit [Ping timeout: 264 seconds]
x1337807x has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
devoldmx has joined #ruby
ccolorado has joined #ruby
<ccolorado>
Hi i have an array of strings that contain an an hour in the "%H:%M%p" format and a DateTime object with only the date and timezone filled out (e.g Fri, 09 Aug 2013 00:00:00 -0500 . how can I make DateTimes with the combination of both
tomzx_mac has joined #ruby
axl_ has left #ruby [#ruby]
ericmathison has quit [Ping timeout: 245 seconds]
S0da has joined #ruby
<dkamioka>
jstrong: you already helped me so much, thanks!
flaviodesousa has quit [Ping timeout: 245 seconds]
toshiBR has joined #ruby
<dkamioka>
toshiBR: :D
snovak has joined #ruby
ericmathison has joined #ruby
raul782_ has joined #ruby
MrZYX|off is now known as MrZYX
Senjai has joined #ruby
Senjai has joined #ruby
blackmesa has quit [Ping timeout: 240 seconds]
Drewch has quit [Quit: Computer has gone to sleep.]
arkoriex has joined #ruby
devoldmx has quit [Ping timeout: 260 seconds]
devoldmx3 has joined #ruby
kevinykchan has quit [Quit: Computer has gone to sleep.]
iliketur_ has quit [Quit: zzzzz…..]
stonevil has joined #ruby
stonevil has quit [Remote host closed the connection]
mansi has joined #ruby
danman has quit [Quit: danman]
stonevil has joined #ruby
pipework has joined #ruby
jamesaanderson has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
defaultro has joined #ruby
<volty>
behavioral: i do not fully understand what you are doing but anyway i suggest you to think it as a database (decoupled), it gives you more freedom
<behavioral>
volty as a database how?
snovak has quit [Ping timeout: 245 seconds]
arkoriex has quit [Remote host closed the connection]
<volty>
a table of (#account, ...) and table of (#asset, #account_id, ...)
hasrb has quit [Remote host closed the connection]
<behavioral>
how does that relate to picking a pattern?
Lewix has quit [Remote host closed the connection]
<behavioral>
anyone here has some design patterns experience?
cpruitt has quit [Quit: cpruitt]
pkrnj has quit [Ping timeout: 276 seconds]
<volty>
whoever wrote more than 500 lines of code has design patterns experience - though he doesn't know he was using them :) // i agree with banisterfiend
<volty>
but maybe that I do not fully understand what are you talking about...
mikepack has quit [Remote host closed the connection]
jamesaanderson has joined #ruby
pkrnj has joined #ruby
pel_daniel has left #ruby [#ruby]
Yakko has quit [Remote host closed the connection]
nfk has quit [Quit: yawn]
cody-- has quit [Quit: Computer has gone to sleep.]
mlpinit has joined #ruby
efrainolivares has quit [Quit: efrainolivares]
gr33n7007h has quit [Ping timeout: 264 seconds]
iliketur_ has joined #ruby
pkrnj has quit [Quit: Computer has gone to sleep.]
zarubin has quit [Ping timeout: 268 seconds]
flaviodesousa has joined #ruby
kilophoton has joined #ruby
MrZYX is now known as MrZYX|off
pkrnj has joined #ruby
mlpinit has quit [Ping timeout: 264 seconds]
thesheff17 has joined #ruby
predator117 has quit [Ping timeout: 240 seconds]
<pipework>
behavioral: What's your question, sir?
<Nilium>
Question: if a cat falls on a bed and nobody is around to hear it, does the cat exist?
gr33n7007h has joined #ruby
predator117 has joined #ruby
kofno has joined #ruby
<behavioral>
pipework
haxrbyte has quit [Read error: Connection reset by peer]
<behavioral>
can anyone offer me some advice on choosing a strategy vs a builder vs a chain of responsibility?
<behavioral>
I have an application that deals with assets and accounts. An Asset can be of different kinds, PMAsset, CurrAsset, IPAsset,REAsset. Accounts can have one or more of these assets and my question is whether going for a behavioral pattern like a strategy where the account type/asset combination is implemented in the strategy or to go for a builder that can create an account and return an array of accounts numbers that were created
pweems has quit [Ping timeout: 260 seconds]
nitish has joined #ruby
nitish has quit [Changing host]
nitish has joined #ruby
Alina-malina has quit [Ping timeout: 256 seconds]
<pipework>
Nilium: Is the bed in a box?
rcosta has quit [Read error: No route to host]
rcosta has joined #ruby
<volty>
you ppl try to understand what he wants, i want to make a joke: behavioral just needs a boss that tells hIm: FUCKPATTERNS, JUST DO IT!
<terrellt>
behavioral: I usually use a strategy.
<yoshie902a>
Nilium: yes, it exists, same as if a tree falls, it made a sound.
<volty>
behavioral: but you are talking about your data, not about what you have to do with that data!
<pipework>
behavioral: Strategies are nifty when you can determine the path of execution based on the initial input.
butblack has left #ruby [#ruby]
ewnd9 has joined #ruby
kofno has quit [Ping timeout: 264 seconds]
<pipework>
A builder is great when you have an input which you need to cajole into another form, such as turning JSON into a tree of objects.
<terrellt>
I feel like a builder would get too big or too complicated.
<terrellt>
At least in that case.
zastern has quit [Remote host closed the connection]
stonevil has quit [Remote host closed the connection]
pkrnj has quit [Ping timeout: 245 seconds]
stonevil has joined #ruby
<behavioral>
terrellt yes but the thing is that I need to return to the director/context an array of these thigns together
<pipework>
A chain of responsibility is pretty cool even when you're using them in concert with strategies. I use them when I have many units of work I need to apply to a given input in a chain-like fashion.
<behavioral>
and my understanding is strategy is mainly used when you have 1 thing but that one thing can be A or B
<behavioral>
however in my case I have 1-4 things and they can be A,B,C,D
<pipework>
So, an account is created based on assets?
seich- has quit [Ping timeout: 240 seconds]
<behavioral>
well you get back up to 4 accounts
<behavioral>
depending on what you put in
<behavioral>
so you can choose to create 1 account of one type of asset, or you can create multiple accounts of multiple types of assets
ssvo has quit [Ping timeout: 245 seconds]
dkamioka has quit [Remote host closed the connection]
pkrnj has joined #ruby
freeayu has joined #ruby
<volty>
maybe better we go straight to the point: what is the aim, goal, objective?
efrainolivares has joined #ruby
locriani has quit [Remote host closed the connection]
locriani has joined #ruby
<volty>
i couldn't be just creating accounts and assets, could it ?
<volty>
s/i/it/
<behavioral>
volty : once you have the accounts you can then deposit/withdraw into the accounts
KobraKao has quit [Read error: Connection reset by peer]
<pipework>
behavioral: Hm, that sounds like a good time to use a strategy pattern in front, for the initial selection of what kind of account/asset to create.
KobraKao has joined #ruby
<volty>
is it ruby on rails ?
<behavioral>
okay, but if i have multiple? do I call each strategy?
<behavioral>
volty no it is not
<pipework>
Given input x, use code execution path y based on the attributes of x.
<volty>
simple ruby?
<behavioral>
yes simple ruby
<pipework>
volty: Does that matter?
gr33n7007h has quit [Ping timeout: 245 seconds]
toshiBR has quit [Ping timeout: 250 seconds]
noopq has quit [Ping timeout: 240 seconds]
<behavioral>
pipework : I dunno what is going on, it is like it is a sin to ask about an SE topic in a ruby channel
pweems has joined #ruby
<volty>
it is so trivial, it is a database organization question
<behavioral>
sigh
<pipework>
behavioral: What's SE?
<behavioral>
Software Engineering
<pipework>
volty: I don't see what this has to do about databases.
<pipework>
No one has even talked about persistence.