<banisterfiend>
colonolGron: but i got kind of stuck in the UI
<banisterfiend>
but it works
x82_nicole has quit [Quit: Computer has gone to sleep.]
<banisterfiend>
i try like 50 times to quit
<banisterfiend>
but htat's probably my fault
<banisterfiend>
not the library
Kingy_ has quit [Quit: Leaving]
SCommette has joined #ruby
<colonolGron>
but how did you get it to run? o_O
SCommette has quit [Client Quit]
gyre007 has joined #ruby
krisfremen has quit [Quit: hmm]
TomRone has quit [Ping timeout: 248 seconds]
ryanh has joined #ruby
<banisterfiend>
colonolGron: i went into the examples/ folder
<banisterfiend>
colonolGron: and typed: ruby test2.rb
<banisterfiend>
colonolGron: here i'll show u the whole process
<banisterfiend>
one sec
TomRone has joined #ruby
MattRB has joined #ruby
kirun has quit [Quit: Client exiting]
joofsh has quit [Remote host closed the connection]
tommyvyo has joined #ruby
yoshie902a has joined #ruby
friskd is now known as markalanevans
mmitchell has quit [Remote host closed the connection]
ViPi has quit [Quit: Computer has gone to sleep.]
DaZ has quit [Read error: Operation timed out]
baroquebobcat has quit [Quit: baroquebobcat]
<yoshie902a>
I created a file myfiles.rb and than I created another file mycode.rb and put typed the first line as "require 'myfiles'", both files are in the same folder. Is my syntax off? I get a can not load such file -- myfiles (load error)
zeade has joined #ruby
<havenn>
yoshie902a: "." isn't in the $LOAD_PATH by default.
markalanevans has quit [Quit: markalanevans]
<havenn>
yoshie902a: you can use `require_relative`, `require './myfile'` or add the dir to the $LOAD_PATH.
krisfremen has joined #ruby
krisfremen has quit [Changing host]
krisfremen has joined #ruby
<colonolGron>
banisterfiend: i have a problem with my terminal emulator...if you already posted the second url..i cant scroll up to look for it. could you do it again? :)
ichilton has quit [Ping timeout: 276 seconds]
<banisterfiend>
colonolGron: i gave up on the second url sorry :)
<havenn>
yoshie902a: If i'm just in Pry, and want the dir I'm in to become available, i usually do something like: $: << Dir.pwd
<banisterfiend>
my setup wouldn't let me do it
MattRB has quit [Quit: This computer has gone to sleep]
eric has joined #ruby
jackyalcine has joined #ruby
jackyalcine has quit [Changing host]
<colonolGron>
banisterfiend: wouldnt let you do what?
jackyalcine has joined #ruby
<eric>
Guys Im not quite sure how to do this: if(url = "*"+".com" or +".net" or +".org")
eric is now known as Guest30452
<Guest30452>
I need the url to equal anything + .com or w.e.
<banisterfiend>
colonolGron: post the second url
<havenn>
yoshie902a: (P.S.: `$:` is shorthand for `$LOAD_PATH`)
F1skr has quit [Quit: WeeChat 0.4.0]
markalanevans has joined #ruby
<colonolGron>
banisterfiend: why not?
<banisterfiend>
colonolGron: because the program im using to record the screen doesn't let me use ruby binaries
<colonolGron>
mmhh
<Guest30452>
<eric> Guys Im not quite sure how to do this: if(url = "*"+".com" or +".net" or +".org")
<colonolGron>
banisterfiend: so you went into the example folder of the rbcurse gem?
yshh has quit [Remote host closed the connection]
<banisterfiend>
colonolGron: yes
<yoshie902a>
havenn: great, thanks!
<banisterfiend>
colonolGron: in pry it's easy, do this: gem-cd rbcurse
<aces23up>
http://codepad.org/EqcSXqLX can some here help me with converting two strings to an array of hashes?
<banisterfiend>
then type: .cd examples
<banisterfiend>
.ruby test2.rb
<Guest30452>
Anyone
wargasm has joined #ruby
<yoshie902a>
havenn: I switched to MRI 1.9.3 and now I'm getting a Invalid next (SyntaxError)
<yoshie902a>
on this line: next if orig.strip.empty?
<havenn>
Guest30452: What are you trying to do? See if the url includes those or ends with those?
<yoshie902a>
is my syntax for next if incorrect too?
<yoshie902a>
my require line and this next if line worked fine in jruby
moshee has quit [Ping timeout: 248 seconds]
karupanerura has quit [Excess Flood]
moshee has joined #ruby
moshee has quit [Changing host]
moshee has joined #ruby
<colonolGron>
banisterfiend: gem-cd doesnt work, so i manually navigated into /Library/Ruby/Gems/1.8/gems/rbcurse-core-0.0.3 but there is not test2.rb
<havenn>
yoshie902a: Out of context it looks fine.
<colonolGron>
banisterfiend: what happens to my already installed gems?
<banisterfiend>
colonolGron: u'll need to reinstall them
<colonolGron>
and how to remove the old ones?
fyolnish has quit [Remote host closed the connection]
ChampS666 has quit [Ping timeout: 264 seconds]
ephemerian has quit [Quit: Leaving.]
<banisterfiend>
colonolGron: forget about them
<colonolGron>
banisterfiend: now the example runs. thank you!
dougireton has quit [Remote host closed the connection]
<colonolGron>
maybe you can point me out where to learn about all these ruby related stuff? i didnt know rvm and pry up to know. is there more i need to dig into?
tcstar has joined #ruby
carloslopes has quit [Ping timeout: 264 seconds]
tcstar has quit [Quit: Leaving]
<banisterfiend>
colonolGron: buy a book
<banisterfiend>
colonolGron: probalby 'eloquent ruby' would sort u out
adeponte has quit [Remote host closed the connection]
<colonolGron>
one last question: now that i installed rvm, gems seem to get installed in a different location. otherwise i guess i still could access my already installed ones, where is the new location?
woolite64 has quit [Quit: Leaving]
bradhe has quit [Remote host closed the connection]
bradhe has joined #ruby
MattRB has joined #ruby
nopolitica has joined #ruby
workmad3 has quit [Ping timeout: 255 seconds]
phinfonet has quit [Ping timeout: 264 seconds]
RORgasm has joined #ruby
joofsh has joined #ruby
<Eiam>
so when you guys sit down to write a gem or add some new code into ruby, do you start off by writing unit tests( TDD?) I find myself sitting down and thinking about what I need, then writing some methods that do it
d2dchat has joined #ruby
<Eiam>
just wondering how others go about doing it
arya has quit [Ping timeout: 244 seconds]
<yfeldblum>
Eiam, depends on the case
aeontech has quit [Read error: Operation timed out]
<Eiam>
right now there is a gem I have that has some functionality and I need to add the ability to do x+1, so my first thought is just crack open the gem, add a method to do x+1 and be done with it
<jblack>
I usually write tests to test code I just wrote
arya has joined #ruby
<Eiam>
but man I hate writing code in gems cause they are a pain in the ass to test
x82_nicole has joined #ruby
ccsidiot has quit [Ping timeout: 245 seconds]
<Eiam>
i just found bundle console which I can call from within the gem git repo and thats been wonderful
fjfish has joined #ruby
mrsolo has quit [Quit: Leaving]
<Eiam>
I don't really get TDD because it seems like now I've got a second layer to worry about -- is my test wrong or is my method wrong?
baphled has joined #ruby
<Eiam>
dunno guess I have to debug them both now.
kmczn has joined #ruby
bradhe has quit [Ping timeout: 252 seconds]
chridal has quit [Ping timeout: 245 seconds]
aeontech has joined #ruby
RORgasm has quit [Ping timeout: 248 seconds]
recycle has joined #ruby
dmiller1 has joined #ruby
francisfish has quit [Ping timeout: 248 seconds]
angusiguess has joined #ruby
DrShoggoth has joined #ruby
etcetera has quit []
RubyPanther has quit [Ping timeout: 260 seconds]
taoru has joined #ruby
taoru has quit [Remote host closed the connection]
joofsh has quit [Remote host closed the connection]
RubyPanther has joined #ruby
dmiller1 has quit [Ping timeout: 252 seconds]
nateberkopec has joined #ruby
etcetera has joined #ruby
yshh has quit [Remote host closed the connection]
<yfeldblum>
Eiam, why is it a pain in the ass to test?
<yfeldblum>
Eiam, as we speak, i happen to be writing a whole bunch of tests right now
<yfeldblum>
Eiam, it's often just a matter of getting familiar with the practice, and getting some practice in
zph has joined #ruby
yshh has joined #ruby
<Eiam>
yfeldblum: well, typically I'm using a bunch of gems in a rails app, so when I modify the gems I have to modify the gemfile to point to the local version on my system path, restart rails to pick up the changes, then hit the code path to trigger it
<yfeldblum>
Eiam, when you modify the gems, don't test them from your app; instead, test the gem from the gem itself
<Eiam>
right, I suspected that would be the answer
<Eiam>
hence my questiona bout how people develop gems
<yfeldblum>
Eiam, just like i described
colonolGron has quit [Quit: Lost terminal]
<Eiam>
often times I suspect what I wrote is correct, but i dno't know till I call it
<Eiam>
typically in rails c
<yfeldblum>
Eiam, make a dummy app and embed it in the gem's test/fixture (or something like that) directory
<Eiam>
yfeldblum: which basically means go learn rspec or whatever the hell the testing DSL is, go write a test, then run rake test or whatever against it
<yfeldblum>
Eiam, indeed
alex__c2022 has joined #ruby
<Eiam>
meh
<Eiam>
doing things right is so expensive
<Eiam>
=)
<yfeldblum>
Eiam, not when you have practiced it and it becomes second-nature
<jblack>
oh man, flog is soo cool
<yfeldblum>
Eiam, it's only the learning that's expensive, and of course learning is always expensive
<aedornm>
It could be worse. You could be writing tests to a Ruby app that encompasses a separate technology that makes you try and retry broken pieces A, B, C, D, and E just to get to point F for the actual test all while having 0 access to fix said broken pieces.
LennyLinux has quit [Remote host closed the connection]
<aedornm>
and points A, B, C, D, and E can all fail in 10 different ways. Each. Randomly.
<Eiam>
aedornm: that sounds like my code? =)
<Eiam>
all my data is basically joining up data from other services & turning it into something usable and buffering/abstracting their errors & failures out to something managable
alex__c2022 has quit [Ping timeout: 248 seconds]
<yfeldblum>
ensure that A never fails, using tests; then ensure that B never fails, using tests; etc ?
frem has quit [Quit: Computer has gone to sleep.]
<yfeldblum>
then when you get to F, developing that is a breeze
aposmontier has joined #ruby
<aedornm>
No.. more like.. You have to get through A-E just to test F. Nobody will ever fix A-E. Just work around the problems to get to the final point.
ddd has quit [Ping timeout: 245 seconds]
moshee has quit [Ping timeout: 246 seconds]
moshee has joined #ruby
moshee has quit [Changing host]
moshee has joined #ruby
Takehiro has joined #ruby
<aedornm>
So we know A will fail 65% of the time with some random problem that is near impossible to replicate. Code, pray its fixed, continue. lol
h4mz1d has quit [Ping timeout: 245 seconds]
<yfeldblum>
i prefer my way
<aedornm>
and by "fixed" I really mean "it can somehow rescue the process and continue"
maletor has quit [Quit: Computer has gone to sleep.]
<aedornm>
that reminds me of Johnny Mnemonic
<Eiam>
yfeldblum: any recommended guides for getting started with that portion of the stack?
<Eiam>
aedornm: except when your brain starts leaking cause you put too much data in..
<Eiam>
I always pack my harddrives too full & data leaks out, its wild.
slainer68 has quit [Remote host closed the connection]
<Eiam>
maybe if it was like that sweet sweet hard drive from china where it would just rewrite over itself when it ran out of data that was awesome
<Eiam>
it would take any file of any size!
krz has joined #ruby
jtgiri_ has joined #ruby
cableray has quit [Quit: cableray]
etcetera has quit []
Spooner has quit [Quit: Leaving]
yoshie902a has left #ruby [#ruby]
moos3 has quit [Ping timeout: 240 seconds]
daniel_- has quit [Quit: WeeChat 0.3.9.2]
mmitchell has joined #ruby
etcetera has joined #ruby
ryanh has quit [Quit: Computer has gone to sleep.]
Kelet has joined #ruby
nopolitica has quit [Quit: Lost terminal]
moshee has quit [Ping timeout: 245 seconds]
lusory has quit [Read error: Connection reset by peer]
moshee has joined #ruby
etcetera has quit [Client Quit]
<yfeldblum>
Eiam, depends how much experience you've got with testing
<Kelet>
Hi - I was wondering, if this sounds right. I'm using MiniMagick and it takes ~5 seconds to add a circle to a 2000x2000 image on a 4.8ghz quad core? :/ Does anyone have any solution that could be faster? I need to add ~1000 dots preferably in less than a minute or two.
Goles has joined #ruby
<Kelet>
using command $image.draw "circle #{x},#{y} #{x+30},#{y+30}" where $image is MiniMagick::Image.open("fullmap.png")
<Eiam>
yfeldblum: testing as a career, I did automated tested and black box qa for 5 years. I don't mean automated testing like unit tests, I mean writing code to go press widgets & buttons and so forth
<f0ster>
Kelet: sorry if this isn't helpful, but if you need speed for somethign like that you should be using c or c++
<Eiam>
testing like how ruby seems to think of it? none? =)
<yfeldblum>
Eiam, i mean writing automated tests
pavilionXP has quit [Remote host closed the connection]
<Kelet>
f0ster: I would imagine that the bottleneck is in ImageMagick or MiniMagick or my usage thereof and not related to Ruby
mmitchell has quit [Ping timeout: 248 seconds]
<Eiam>
I was working on some rspec code to test some sproutcore applications a year or two ago =)
<Eiam>
didnt' get too far though before i quit! ;)
<Eiam>
unrelated to rspec o course haha
etcetera has joined #ruby
blazes816 has quit [Quit: blazes816]
<yfeldblum>
Eiam, get practice ... make a personal todo app (cli app, rails app, whatever ... just something real simple) with tests for everything
<f0ster>
Kelet: yeah I guess so, the imagemagick functions that are called are in c ?
baphled has quit [Ping timeout: 245 seconds]
<yfeldblum>
Eiam, start with the simplest possible app, and just get practice writing one simple test covering some simple functionality, and then another simple test covering the same bit of functionality, etc
jtgiri_ has quit [Quit: jtgiri_]
peteyg has quit [Ping timeout: 255 seconds]
banisterfiend is now known as banister`sleep
mahmoudimus has joined #ruby
peteyg has joined #ruby
goraxe has quit [Ping timeout: 248 seconds]
squidBits has joined #ruby
generalissimo has joined #ruby
emptyflask has joined #ruby
bricker_ has joined #ruby
c0rn has quit [Quit: Computer has gone to sleep.]
Spooner has joined #ruby
Spooner has quit [Client Quit]
havenn has quit [Remote host closed the connection]
the_jeebster has quit [Quit: Leaving.]
billy_ran_away has quit [Ping timeout: 256 seconds]
emptyflask has quit [Ping timeout: 244 seconds]
billy_ran_away has joined #ruby
quest88 has joined #ruby
bricker has quit [Ping timeout: 256 seconds]
dougireton has joined #ruby
ckrailo has quit [Quit: Computer has gone to sleep.]
<Nuck>
... That's cool if the user has firefox. But there's something like 70% of the internet which doesn't.
fragmachine has joined #ruby
dwu1 has joined #ruby
mercwithamouth has quit [Ping timeout: 248 seconds]
<jrabbit>
Nuck: they'd probably wrap each operating system's "open" analogue
kenneth has quit [Quit: kenneth]
<jrabbit>
linux has one
icole has quit [Ping timeout: 248 seconds]
<Nuck>
jrabbit: Yeah, I know. Something like XDEOpen or something, I forget. Either way, I'd prefer a lib to handle this bit — I think MacRuby has bindings to WebKit that could provide a nicer frame too. There's a lot of solutions.
<Nuck>
jrabbit: Ah yeah Launchy looks sanest. I think I'll just use that. Thanks!
<havenn>
Nuck: That repo is some crazy thing where I rolled my own .app with Ruby code to install the Sinatra gem on system Ruby and use Sinatra to serve up content to WebKit. >.>
<jblack>
But thanks for covering my rear, jrabbit. =)
fragmachine has quit [Remote host closed the connection]
mneorr has quit [Remote host closed the connection]
<Nuck>
havenn: ... Egads.
mneorr has joined #ruby
<Nuck>
havenn: I am shocked and apalled.
<havenn>
Nuck: :D
bradhe has joined #ruby
JumpMast3r has quit [Quit: JumpMast3r]
bradhe has quit [Remote host closed the connection]
sayan has quit [Read error: Connection reset by peer]
pu22l3r has quit [Remote host closed the connection]
jaequery has quit [Quit: Computer has gone to sleep.]
fram has quit [Ping timeout: 276 seconds]
fram has joined #ruby
joofsh has joined #ruby
Takehiro has quit [Remote host closed the connection]
MattRB has joined #ruby
sorbo_ has quit [Quit: sorbo_]
mockra has joined #ruby
mneorr has quit [Remote host closed the connection]
adeponte has joined #ruby
mneorr has joined #ruby
ninegrid has quit [Quit: bbl]
forced_request has quit [Read error: Connection reset by peer]
adkron_ has quit [Ping timeout: 245 seconds]
adkron has quit [Ping timeout: 245 seconds]
jtgiri_ has joined #ruby
jonahR has joined #ruby
embs is now known as embs_
zeade has quit [Quit: Leaving.]
ttt has joined #ruby
bricker_ has quit [Ping timeout: 255 seconds]
<shevy>
anyone of you can recommend a ruby GUI that you personally also use regularly ?
<erichmenge>
shevy: Do you mean IDE?
<Nuck>
Or perhaps a GUI Toolkit?
tjbiddle has joined #ruby
bricker has joined #ruby
<shevy>
erichmenge a GUI toolkit for ruby
<erichmenge>
ah
<shevy>
I only need notepad for .rb files :)
<erichmenge>
Just wanted to clarify :)
sepp2k1 has quit [Remote host closed the connection]
<erichmenge>
That's a good question, I played around a bit with MacRuby and it seemed interesting. I'd be curious to know as well about any other approaches.
<erichmenge>
it isn't an area I've played much in.
ttt has quit [Ping timeout: 276 seconds]
apok has quit [Quit: apok]
<shevy>
hmmmm
<shevy>
anyone else!!!
<shevy>
noone is using ruby along with GUIs anymore... :(
Zespre has joined #ruby
jblack has quit [Ping timeout: 264 seconds]
<shevy>
I am writing lots of commandline .rb scripts
<shevy>
every day new ones come along
<shevy>
but as far as GUIs are concerned... that's one dead area here right now
<erichmenge>
Yeah...
ixx is now known as anoldhacker
n1x has quit [Ping timeout: 248 seconds]
danktamagachi has quit [Ping timeout: 256 seconds]
anoldhacker is now known as ixx
<shevy>
~5 years ago I used ruby-gnome, it was not great, but ok
<heftig>
shevy: i heard there are some nice frameworks for jruby
<shevy>
nowadays, I cant even get it to compile properly anymore
<shevy>
hmm heftig, do you use that yourself though?
<heftig>
ruby-gir-ffi is where the gtk development is at
<shevy>
aha
<shevy>
going to search for that
adeponte has quit [Remote host closed the connection]
adeponte has joined #ruby
earthquake has joined #ruby
jonahR has quit [Quit: jonahR]
adeponte has quit [Ping timeout: 276 seconds]
arya has quit [Ping timeout: 248 seconds]
b1rkh0ff has quit [Ping timeout: 248 seconds]
elux_ has quit [Quit: Bye!]
joofsh has quit [Remote host closed the connection]
havenn has quit [Remote host closed the connection]
m4n has quit [Ping timeout: 256 seconds]
apok has joined #ruby
angusiguess has quit [Ping timeout: 276 seconds]
lolmaus has joined #ruby
jblack has quit [Ping timeout: 256 seconds]
recycle has joined #ruby
n1x has joined #ruby
epylinkn has joined #ruby
hackerdude has joined #ruby
chriskk has quit [Quit: chriskk]
h4mz1d has joined #ruby
cableray has quit [Quit: cableray]
mercwithamouth has joined #ruby
ananthakumaran has joined #ruby
ananthakumaran1 has joined #ruby
jenrzzz has joined #ruby
a_a_g has joined #ruby
jean-louis has joined #ruby
slainer68 has joined #ruby
n1x has quit [Ping timeout: 245 seconds]
osaut has joined #ruby
anchorspark has quit [Quit: WeeChat 0.3.8]
cableray has joined #ruby
adeponte has joined #ruby
ananthakumaran has quit [Ping timeout: 240 seconds]
crackfu has joined #ruby
baroquebobcat has joined #ruby
slainer68 has quit [Ping timeout: 248 seconds]
cha1tanya has joined #ruby
cha1tanya has quit [Changing host]
cha1tanya has joined #ruby
sambio has quit []
bricker_ has joined #ruby
brianpWins has joined #ruby
bricker has quit [Ping timeout: 240 seconds]
arya_ has joined #ruby
arya has quit [Ping timeout: 248 seconds]
ttt has joined #ruby
DrShoggoth has quit [Quit: Leaving]
maletor has joined #ruby
ryanf has quit [Quit: leaving]
quest88 has joined #ruby
dougireton has quit [Quit: Leaving.]
markalanevans has quit [Quit: markalanevans]
ninegrid has joined #ruby
ilyam has quit [Quit: ilyam]
markalanevans has joined #ruby
wmoxam has quit [Ping timeout: 252 seconds]
arya_ has quit [Read error: Connection reset by peer]
a_a_g has quit [Quit: This computer has gone to sleep]
huoxito has quit [Quit: Leaving]
ttt has quit [Remote host closed the connection]
tjbiddle has joined #ruby
tomzx_mac has quit [Read error: Operation timed out]
wmoxam has joined #ruby
arya has joined #ruby
tjbiddle has quit [Client Quit]
kenneth has joined #ruby
gokul has joined #ruby
undersc0re97 has joined #ruby
undersc0re97 has joined #ruby
undersc0re97 has quit [Changing host]
ner0x has quit [Quit: Leaving]
ner0x has joined #ruby
ner0x has quit [Client Quit]
ryanf has joined #ruby
aaronmacy has joined #ruby
h4mz1d has quit [Ping timeout: 255 seconds]
himsin has joined #ruby
maletor has quit [Quit: Computer has gone to sleep.]
Takehiro has joined #ruby
etcetera has joined #ruby
caleb_io has quit [Quit: caleb_io]
m4n has joined #ruby
asuka_ has quit [Ping timeout: 260 seconds]
yacks has quit [Remote host closed the connection]
xpen has joined #ruby
crackfu has quit [Remote host closed the connection]
tatsuya_o has joined #ruby
Takehiro has quit [Remote host closed the connection]
Playground has joined #ruby
wchun has quit [Ping timeout: 240 seconds]
Takehiro has joined #ruby
headius has joined #ruby
danktamagachi has joined #ruby
etcetera has quit [Ping timeout: 256 seconds]
aaronmacy has quit [Quit: Leaving.]
tatsuya_o has quit [Ping timeout: 248 seconds]
osaut has quit [Quit: osaut]
ryanf has quit [Quit: broken pipes |||]
asuka has joined #ruby
djdb has joined #ruby
justinwe1ss has quit [Quit: leaving]
wchun has joined #ruby
ryanf has joined #ruby
ryanf has quit [Client Quit]
ryanf has joined #ruby
baroquebobcat has quit [Quit: baroquebobcat]
noyb has joined #ruby
nat2610 has quit [Quit: Leaving.]
caleb_io has joined #ruby
mahmoudimus has joined #ruby
osaut has joined #ruby
a_a_g has joined #ruby
sayan has joined #ruby
sayan has quit [Changing host]
sayan has joined #ruby
recycle has quit [Remote host closed the connection]
recycle has joined #ruby
JohnBat26 has joined #ruby
recycle has quit [Remote host closed the connection]
recycle has joined #ruby
recycle has quit [Remote host closed the connection]
<benlieb>
I have a multi-language hash that is causing a syntax error: https://gist.github.com/4618140 Is this not possible to have this?
tagrudev has joined #ruby
mercwithamouth has quit [Ping timeout: 245 seconds]
yacks has joined #ruby
BizarreCake has joined #ruby
pootieta1g has joined #ruby
<Nuck>
I'm fairly new to Ruby, but I keep seeing this class Thing { attr_accessible :attr } and whatnot in Rails, and am curious how this whole method-call-in-a-class-definition thing is done. Any good guides?
Morkel has joined #ruby
arkiver has joined #ruby
nimred has quit [Ping timeout: 244 seconds]
nimred has joined #ruby
nimred has quit [Changing host]
nimred has joined #ruby
pootietang has quit [Ping timeout: 244 seconds]
joeycarmello has quit [Remote host closed the connection]
ninegrid has quit [Quit: brb]
pootietang has joined #ruby
ninegrid has joined #ruby
vlad_starkov has quit [Remote host closed the connection]
<Nuck>
I had expected something more complicated than that
nga4 has joined #ruby
danktamagachi has quit [Ping timeout: 245 seconds]
<Nuck>
Oh Ruby, you never fail to amaze me.
pootieta1g has quit [Ping timeout: 248 seconds]
markalanevans has quit [Quit: markalanevans]
mercwithamouth has joined #ruby
Takehiro has quit [Read error: Connection reset by peer]
pootieta1g has joined #ruby
stayarrr has joined #ruby
dhruvasagar has joined #ruby
pootietang has quit [Ping timeout: 245 seconds]
Playground has quit [Quit: When I come back, please tell me in what new ways you have decided to be completely wrong.]
fuzai_ has joined #ruby
earthquake has quit [Quit: earthquake]
Takehiro has joined #ruby
<fuzai_>
Hiya, i'm trying to install radianCMS on ubuntu 12.04 64 bit using ruby-1.9.3. I'm getting this error and i'm not sure how to proceed, http://pastie.org/5840884 is my error log and i was trying to follow the 5 minute heroku radiantcms howto. Any sugestions? thank you
dhruvasagar has quit [Read error: Connection reset by peer]
pootietang has joined #ruby
pootieta1g has quit [Ping timeout: 248 seconds]
dhruvasagar has joined #ruby
<fuzai_>
radiantCMS excuse me this keyboard is screwin up
nat2610 has joined #ruby
ttt has joined #ruby
shock_one_ has joined #ruby
aytch is now known as God
osaut has quit [Quit: osaut]
etcetera has quit [Ping timeout: 252 seconds]
God is now known as aytch
pootieta1g has joined #ruby
pootietang has quit [Ping timeout: 255 seconds]
noyb has quit [Ping timeout: 256 seconds]
shock_one_ is now known as shock_one
ttt has quit [Remote host closed the connection]
shock_one is now known as yournick
RORgasm has joined #ruby
yournick is now known as shock_one
hackerdude has quit [Remote host closed the connection]
xpen has quit [Remote host closed the connection]
xpen has joined #ruby
brianpWins has quit [Quit: brianpWins]
bricker_ is now known as bricker
nat2610 has quit [Ping timeout: 255 seconds]
markalanevans has joined #ruby
RORgasm has quit [Ping timeout: 248 seconds]
xpen has quit [Ping timeout: 246 seconds]
amaya_the has joined #ruby
Takehiro has quit [Remote host closed the connection]
arya has quit [Ping timeout: 245 seconds]
mercwithamouth has quit [Ping timeout: 245 seconds]
joeycarmello has joined #ruby
beilabs has quit [Ping timeout: 276 seconds]
angusiguess has joined #ruby
vlad_starkov has joined #ruby
sayan has quit [Read error: Connection reset by peer]
<amaya_the>
:)
<benlieb>
fuzai_: I don't think heroku supports 1.9.3 yet
<fuzai_>
so i need to be able to modify the subscription and i'm trying really hard not to handle credit cards but i don't see me being able to avoid that
fyolnish_ has joined #ruby
fyolnish has quit [Read error: Connection reset by peer]
v0n has quit [Ping timeout: 248 seconds]
etcetera has joined #ruby
<shock_one>
benlieb, Thank you. Any other suggestions?
<benlieb>
That should keep you busy for a while :) If you're just getting going, I'll tell you what someone told me, and I didn't get it at the time, but now I do: In the beginning don't use extra gems unless you HAVE TO. Learn the basics and then you'll appreciate them.
haxrbyte has joined #ruby
<benlieb>
shock_one: also, one thing I wish I knew years ago, when you add gems to the Gemfile, always be as specific as you can with the version number.
haxrbyte_ has joined #ruby
haxrbyte_ has quit [Remote host closed the connection]
haxrbyte_ has joined #ruby
<benlieb>
you can always upgrade if it gets deprecated or incompatible, but you'll pull your hair out every time you bundle install and your gems are going crazy with changes making all your tests fail
sayan has quit [Read error: Connection reset by peer]
megha has quit [Ping timeout: 244 seconds]
joeycarmello has joined #ruby
vlad_starkov has quit [Remote host closed the connection]
<Hanmac>
shevy what if i have a script that can use: h.inspect #=> 4;h.class #=> Fixnum; h.to_f!
<Hanmac>
h.inspect #=> 4.0;h.class #=> Float
<shevy>
man what are you doing
<shevy>
shapechanging objects?
gyre007 has quit [Remote host closed the connection]
vlad_starkov has joined #ruby
jenrzzz has quit [Ping timeout: 245 seconds]
<Hanmac>
yeah somthing like that, i invent some kind of hidden decorator :P
joeycarmello has quit [Ping timeout: 246 seconds]
<shevy>
hehe
arturaz has quit [Read error: Connection reset by peer]
arturaz has joined #ruby
wallerdev has quit [Quit: wallerdev]
ttt has quit [Remote host closed the connection]
<Hanmac>
i allready rewrite it and build it on the top of SimpleDelegator
ttt has joined #ruby
ttt has quit [Read error: Connection reset by peer]
<workmad3>
Hanmac: hehe :) nice
ttt_ has joined #ruby
<workmad3>
Hanmac: never considered doing that before
schaerli has joined #ruby
<workmad3>
Hanmac: not sure I'd ever consider doing it again either... but still, nice :)
jaequery has quit [Quit: Computer has gone to sleep.]
codecaster has joined #ruby
fyolnish_ has quit [Ping timeout: 255 seconds]
jenrzzz has joined #ruby
aaronmacy has quit [Quit: Leaving.]
reinaldob has joined #ruby
jaequery has joined #ruby
<shock_one>
In my father cell phone plan it's expensive to call other providers's numbers. So I appended an exclamation mark to the end of the names of such contacts. Ruby style, bitch!
<JonnieCache>
shock_one: that would be a good app idea if you could do automate that
<workmad3>
oops, forgot to inherit from BasicObject there... just edited
clooth has joined #ruby
jenrzzz has quit [Ping timeout: 256 seconds]
<Hanmac>
hm i may implment it ... the difference i had (what i can add too: is that when you do to_i.to_f.to_s.to_i you do not leave the decorator-chain :P)
<workmad3>
Hanmac: hmm, yeah I just saw that
<workmad3>
Hanmac: that's just an extra conditional in the method_missing though ;)
[Neurotic] has quit [Remote host closed the connection]
arkiver has quit [Quit: Leaving]
io_syl has quit [Quit: Computer has gone to sleep.]
<workmad3>
Hanmac: hmm, reload... what do you think?
aaronmacy has joined #ruby
<Hanmac>
hm i think about :P
mikecmpbll has joined #ruby
joeycarmello has joined #ruby
etcetera has quit [Ping timeout: 276 seconds]
<shevy>
Hanmac evil code
arya_ has quit [Ping timeout: 248 seconds]
mjolk has joined #ruby
mjolk is now known as Guest59167
sayan has joined #ruby
sbear has quit [Ping timeout: 244 seconds]
joeycarmello has quit [Ping timeout: 245 seconds]
arya has joined #ruby
jprovazn has joined #ruby
jaequery has quit [Quit: Computer has gone to sleep.]
<JonnieCache>
all the other weird shit that hangs out around rna molecules
statarb3 has joined #ruby
statarb3 has quit [Changing host]
statarb3 has joined #ruby
<workmad3>
Hanmac: :)
<workmad3>
shevy: also, you may as well go 'look at computers! 2 different states determine all programs!'
<Hanmac>
you can do: HiddenDelegator.new("abc").each_char.to_a #=> ["a", "b", "c"] but you cant trust the output, because its still an hidden delegator :D
<shevy>
RNA is nothing but a copy of DNA so it has four states (with T becoming U) just as well.
<JonnieCache>
yeah but its not just about the bases its about the configuration
<shevy>
That is the interpretation of the dataset.
<workmad3>
shevy: right
* Hanmac
thinks that DNA should have more than only four states ... six or eight are more interesting :P
<workmad3>
shevy: all my programs are just 2 states
<workmad3>
shevy: that's the equivalent of what you just claimed for DNA :P
<JonnieCache>
shevy: thats a contentious question. where does the data end and the interpreter begin?
<JonnieCache>
there has been much ink spilled on that subject
<shevy>
workmad3 your programs are not self sustainable
<shevy>
JonnieCache without an interpreter DNA is useless
<shevy>
but the interpreter is coded inside the DNA too
<JonnieCache>
exactly
samuel02 has joined #ruby
reinaldob has quit [Remote host closed the connection]
<JonnieCache>
if youve read GEB he talks about this a lot
<shevy>
Epigenetics does not change any of the inherent meaning of the four bases. It tages Methyl groups to those DNA bases, which are interpreted again by molecules. But you can have living system without epigenetics just as well, it is a means of handling complexity.
<shevy>
I will show you the moment I can bootstrap new cells via viruses alone :P
<workmad3>
shevy: right but all of it, despite being *built* from a simple base, is massively more complex than that simple base
stkowski has quit [Quit: stkowski]
adambeynon has quit [Quit: Computer has gone to sleep.]
<workmad3>
shevy: you're pointing to the simpleness of the alphabet as an indicator to the simpleness of words, sentences and books
<shevy>
workmad3, you refer to systems that were not designed
<workmad3>
shevy: the presence or absence of a designer is of no relevance here
<shevy>
it most definitely is because your constraints are totally different to someone who designs a simple system from the start
<workmad3>
shevy: you were the one claiming DNA is simple
<shevy>
it seems as if you doubt the folks workong in the fields of synthetic biology
<workmad3>
shevy: and I'm pointing out the difference between simpleness of representation and simpleness of constructs :P
<workmad3>
shevy: how those constructs came into being is irrelevant
<shevy>
you diluted from the fact, with RNA and epigenetics - RNA has 4 different states, epigenetics is not required for the design of biological entities
<workmad3>
shevy: even ignoring that
<shevy>
but you still have natural evolution and competing organisms in reallife then
etcetera has joined #ruby
<workmad3>
shevy: yes, but that doesn't mean that they are simple, even if they are built from a very simple base
<workmad3>
shevy: emergent complexity
<shevy>
if you want to survive, you need to have more tradeoffs :(
<shevy>
I didn't claim that life as a whole is simple at all :)
<workmad3>
shevy: you claimed that DNA was simple though
vlad_starkov has quit [Remote host closed the connection]
<workmad3>
shevy: and even that isn't simple
Tux-Tn has joined #ruby
<shevy>
DNA is super simple
<workmad3>
shevy: no, the stuff that DNA is made from is super-simple
<shevy>
it's just a polymer
<workmad3>
shevy: if I wrote a program using just 1 and 0 then, by your definition it is simple
<workmad3>
shevy: no matter what
joeycarmello has joined #ruby
<shevy>
1 and 0 is complex?
<workmad3>
shevy: no
chussenot has quit [Quit: chussenot]
<workmad3>
shevy: but the stuff you can build using just them can be
shorts has joined #ruby
<workmad3>
shevy: in the same way that the bases in DNA are simple, but the stuff built from it isn't
baphled has quit [Ping timeout: 245 seconds]
dwu1 has quit [Quit: Leaving.]
<JonnieCache>
life is fractally complex
chussenot has joined #ruby
<JonnieCache>
it doesnt get any more complex than life
<JonnieCache>
life gets away with it by not having a conciousness in charge that gets upset by complexity
<workmad3>
shevy: and pointing out people who created simple DNA and claiming DNA is simple is as bad an argument as pointing to a simple program and claiming programs are simple :P
joeycarmello has quit [Ping timeout: 252 seconds]
b1rkh0ff has joined #ruby
<shevy>
simple DNA? the biobrick cells work perfectly well. won't take long and you will have perfect assembly lines for every organic chemical material, optimized in completely artifical cells
<workmad3>
shevy: great, so DNA can be simple for at least some tasks
<workmad3>
shevy: it doesn't make all DNA simple
<shevy>
well, proteins are very complicated
sayan has joined #ruby
ChampS666 has joined #ruby
reinaldob has joined #ruby
renanoronfle has quit [Quit: Saindo]
<shevy>
life would be better off with just DNA and RNA
aaronmacy has quit [Quit: Leaving.]
jpfuentes2 has quit [Quit: Computer has gone to sleep.]
sayan has quit [Max SendQ exceeded]
<shevy>
perhaps that may be possible one day :)))
browndawg has left #ruby [#ruby]
nat2610 has joined #ruby
wreckimnaked has quit [Read error: No route to host]
wreckimnaked has joined #ruby
pskosinski has joined #ruby
etcetera has quit [Ping timeout: 248 seconds]
sayan has joined #ruby
sayan has quit [Changing host]
sayan has joined #ruby
caleb_io has quit [Quit: caleb_io]
browndawg has joined #ruby
<workmad3>
shevy: by my understanding... unlikely
hamed_r has quit [Quit: Leaving]
<shevy>
:(
<workmad3>
shevy: but feel free to cling to your illusions of simplicity ;)
<shevy>
I may eventually try to!
nat2610 has quit [Ping timeout: 252 seconds]
fyolnish has joined #ruby
Takehiro has quit [Remote host closed the connection]
postmodern has quit [Quit: Leaving]
arya has quit [Ping timeout: 248 seconds]
frihd has quit [Quit: Leaving.]
schaerli has quit [Remote host closed the connection]
arya has joined #ruby
chussenot_ has joined #ruby
atmosx has quit [Quit: And so the story goes…]
chussenot has quit [Ping timeout: 240 seconds]
chussenot_ is now known as chussenot
shock_one has quit [Remote host closed the connection]
<whowantstolivefo>
since yesterday night, i look many apis and tutorials, i didnt figure out
<shevy>
30.times { puts 'Ruby!'}
<shevy>
whowantstolivefo it is best if you try to understand the syntax
<shevy>
do you know what is the {} there
biello has joined #ruby
Takehiro has joined #ruby
<Hanmac>
times has an buildin counter, working with times {|counter| ... }
<whowantstolivefo>
i know shevy and Hanmac this say me puts 30 times ruby... ` print 30.times "ruby" ` isnt corrent ? or put instead of print ?
TIBS02 has quit [Read error: Operation timed out]
tvw has joined #ruby
<shevy>
whowantstolivefo you must first understand the {} there
<tobiasvl>
whowantstolivefo: puts and print isn't the significant thing to understand here
<tobiasvl>
whowantstolivefo: but puts outputs a newline after the string and print does not
jonahR has joined #ruby
<whowantstolivefo>
i know but you guys know i am newbie, it is hard to figure out sometimes
<tobiasvl>
sure
<Spaceghost|cloud>
whowantstolivefo: Is this your first programming language exposure?
amaya_the has quit [Ping timeout: 248 seconds]
<whowantstolivefo>
i have 0 programming background
<shevy>
whowantstolivefo yes, but you think in your problem domain right now, you must stop thinking in that problem domain for a second, and instead try to understand something new, in this case the {}, which is a block
<whowantstolivefo>
only worked as web designer and quit that job 4 months ago
<shevy>
whowantstolivefo do you know what is a function/method
<whowantstolivefo>
only using firebird sql for reports in hospital where i work
<shevy>
well
<shevy>
there are some concepts that you only have to understand ONCE, regardless of the programming language
<Hanmac>
i hate pages that wants annoy me with fakebook ...
banister`sleep has quit [Ping timeout: 240 seconds]
<whowantstolivefo>
where should i start from ? this page is good because shows and makes example
rezzack has quit [Quit: Leaving.]
Takehiro has quit [Remote host closed the connection]
reinaldob has quit [Remote host closed the connection]
noxoc has quit [Quit: noxoc]
<whowantstolivefo>
i finished from codecademy.com "An introduction to the Ruby programming language." course and "Control Flow in Ruby Learn how to change your Ruby programs' behavior based on user input."
<whowantstolivefo>
last 1-2 months i hang on ruby and rails channels for getting help and learning better
<shevy>
you can skip the "homework"
charliesome has joined #ruby
<shevy>
after reading that page, you will understand iterators, methods and blocks
schaerli has joined #ruby
<Spaceghost|cloud>
PLease don't skip the homework entirely.
<shevy>
:)
<whowantstolivefo>
hmmm okay, i will download that pdf, and do what this book says.
<shevy>
read it online!!!
banister`sleep has joined #ruby
<shevy>
a downloaded pdf is a dead-weight pdf!
<whowantstolivefo>
okay shevy
noxoc has joined #ruby
<shevy>
whowantstolivefo are you using linux?
ryanh has joined #ruby
<whowantstolivefo>
i use ubuntu 12.04 and ruby installed via rvm
<whowantstolivefo>
using ruby 1.9.3p194 (2012-04-20 revision 35410) [i686-linux]
<whowantstolivefo>
and my gem 1.8.24 and rails 3.2.11
noxoc has quit [Client Quit]
<nga4>
you kids and your rvms and rock musics
etcetera has joined #ruby
carloslopes has joined #ruby
<shevy>
ok good
etcetera has quit [Max SendQ exceeded]
<whowantstolivefo>
shevy: Spaceghost|cloud and Hanmac if you dont tell me anything, i am going to start learning how you say!
<shevy>
you can write lots of ruby scripts
shock_one has quit [Remote host closed the connection]
reinaldob has joined #ruby
yshh has quit [Remote host closed the connection]
<shevy>
keep them small and simple, the less code you have to use the better
* Hanmac
is not an rails friend
shock_one has joined #ruby
<shevy>
I dont use rails either
<whowantstolivefo>
okay, see you guys, if i stuck somewhere i will keep disturbing you guys
<shevy>
:)
<whowantstolivefo>
whenever i get online i see you all guys online so i know yoy all from nicknames
<workmad3>
nga4: nowt wrong with music with rocks in
<shock_one>
shevy, I have some offtopic quesion. Are you native english?
<Spaceghost|cloud>
Quick, everyone /nick to something else!
amaya_the has joined #ruby
jonahR has quit [Quit: jonahR]
<shevy>
shock_one I am not a native english speaker but workmad3 and Spaceghost|cloud are :)))
<shevy>
and ESPECIALLY Hanmac
Goles has joined #ruby
etcetera has joined #ruby
<Spaceghost|cloud>
shock_one: No habla.
noxoc has joined #ruby
<shevy>
go ask Hanmac
<Spaceghost|cloud>
shevy: Jerk!
<shevy>
shock_one just ask here
etcetera has quit [Max SendQ exceeded]
wreckimnaked has quit [Ping timeout: 240 seconds]
Goles has quit [Max SendQ exceeded]
angusiguess has joined #ruby
<workmad3>
shevy: not me... I'm really just a spanish version of ALICE hooked up to google translate
<shock_one>
shevy, is it correct to use either in this case«I dont use rails either»? I think «either» means either one or another but not both.
etcetera has joined #ruby
Goles has joined #ruby
<tobiasvl>
«either is sometimes used, especially in North American English, where neither would be more traditionally accurate: "I'm not hungry." "Me either."»
<shevy>
hmm
Goles has quit [Max SendQ exceeded]
<shevy>
that one got me stumped many times as well
<workmad3>
it's idiomatic, more than technically correct, I suspect
<shock_one>
I would write «I don't use rails too» or «I also don't use rails»
Goles has joined #ruby
<workmad3>
shock_one: I'd probably reply 'neither do I' personally
<Spaceghost|cloud>
Yo tampoco.
<Spaceghost|cloud>
Or whatever.
<shevy>
mi perro es un gato
Goles has quit [Max SendQ exceeded]
<shock_one>
А я еще и непонятными буквами писать умею
<workmad3>
shevy: cool story, bro
<shevy>
shock_one yeah... if you have two roads, and both are blocked... do you say... "I can't go either way." or do you say "I can't go neither way."
angusiguess has quit [Ping timeout: 252 seconds]
<workmad3>
shevy: I wonder how the hell I got there in the first place
<shevy>
workmad3 I learned spanish from 14-18! but I forgot 98% :(
karasawa has quit [Ping timeout: 276 seconds]
Goles has joined #ruby
Goles has quit [Remote host closed the connection]
GeekSir has joined #ruby
karasawa has joined #ruby
nari has joined #ruby
<workmad3>
shevy: also 'I can go neither way' is an acceptable response ;)
* Spaceghost|cloud
wonders if he accidentally walked into ##English
<workmad3>
Spaceghost|cloud: nope, this is still #ruby, a.k.a. ##procrastination
<tobiasvl>
Spaceghost|cloud: hey, this is boolean logic
<kalleth>
workmad3: i disagree
<kalleth>
but then i'm awkward
<kalleth>
and annoying
<kalleth>
also, fuck locales
<Spaceghost|cloud>
Brocrastination is more likely.
<workmad3>
kalleth: lets have a 30 minute argument about it ;)
GeekSir has left #ruby [#ruby]
<kalleth>
workmad3: vim > emacs
<workmad3>
kalleth: I agree with that one :P
<kalleth>
dammit
<Spaceghost|cloud>
Um, no. pico > *
<workmad3>
kalleth: but I'll learn emacs simply to argue with you, if you want ;)
<shock_one>
Spaceghost|cloud, sorry about that.
etcetera has quit [Ping timeout: 276 seconds]
DuoSRX has joined #ruby
aaronmcadam has joined #ruby
adambeynon has joined #ruby
aaronmcadam has quit [Quit: aaronmcadam]
aaronmcadam has joined #ruby
emptyflask has joined #ruby
megha has joined #ruby
main has quit [Remote host closed the connection]
emptyflask has quit [Ping timeout: 245 seconds]
dkannan has quit [Ping timeout: 252 seconds]
zommi has joined #ruby
nkr has joined #ruby
main has joined #ruby
arya has quit [Ping timeout: 248 seconds]
sayan has quit [Ping timeout: 256 seconds]
Guest59167 is now known as mjolk
arya has joined #ruby
arturaz has quit [Ping timeout: 248 seconds]
BulleTime has joined #ruby
mergoth has joined #ruby
horofox has joined #ruby
renanoronfle has joined #ruby
reinaldob has quit [Remote host closed the connection]
arturaz has joined #ruby
pcarrier has joined #ruby
reinaldob has joined #ruby
bluenemo has joined #ruby
bluenemo has quit [Changing host]
bluenemo has joined #ruby
pcarrier has quit [Ping timeout: 245 seconds]
etcetera has joined #ruby
<shevy>
why is here noone who loves emacs
F1skr has joined #ruby
pcarrier has joined #ruby
osaut has joined #ruby
krz has quit [Quit: krz]
banister`sleep has quit [Remote host closed the connection]
moos3 has joined #ruby
<tobiasvl>
shevy: aw :)
<tobiasvl>
(i don't either though)
<shevy>
hehehe
<shevy>
only matz likes emacs
<shock_one>
It doesn't comly with Unix philosophy.
huntercool has joined #ruby
<shevy>
I think the only area where the Unix philosophy failed were the GUIs
timonv has quit [Remote host closed the connection]
huntercool has left #ruby [#ruby]
whowantstolivefo has quit [Quit: need to concentration to learning ruby and rails so i close everything and only left open pine's learn to program page. see you guys]
aaronmcadam has quit [Read error: Connection reset by peer]
aaronmcadam_ is now known as aaronmcadam
v0n has quit [Ping timeout: 252 seconds]
<Hanmac>
that what i dont like on github: you cant send members private messages :/ (as far as i know) ... sometimes you want to diskuss something that does not fit into an bug ticket
<banister_>
Hanmac: you used to be able to
karasawa has quit [Ping timeout: 276 seconds]
<banister_>
Hanmac: but they got rid of it ------------- i dont know whyyyyyyyyyy
kold_ has quit [Remote host closed the connection]
karasawa has joined #ruby
nari has quit [Ping timeout: 248 seconds]
<Spooner_>
Hanmac, Yeah, it is a shame. Should at least be something you can turn on/off in case you get spammed by idiots.
<Hanmac>
i think we should fork the github repo on github :D
fyolnish has quit [Remote host closed the connection]
fyolnish has joined #ruby
wting has quit [Ping timeout: 276 seconds]
<Spooner_>
I think we should fork the whole of github on bitbucket.
samphippen has joined #ruby
<GeekOnCoffee>
bitbucket makes me sad
<Spooner_>
And then fork bitbucket on github and see which one explodes first.
<Spaceghost|cloud>
I think the git or ssh transport for the github project on github has a lot of occurrences of the string 'git'
<Spooner_>
Why's that, GeekOnCoffee?
wting has joined #ruby
Inoperable has joined #ruby
Inoperable has quit [Max SendQ exceeded]
<GeekOnCoffee>
it's just not nearly as enjoyable an experience as github
<GeekOnCoffee>
but the free private repos are a big deal
* Spaceghost|cloud
still prefers mailing lists and request pull
andrewh has joined #ruby
dkannan has joined #ruby
<Hanmac>
bitbucket is nice too, but it does have a freaky few when you have multible branches ... github can show it VERY nice
<Spooner_>
GeekOnCoffee, Perhaps not, but I make use of their free private repos.
<GeekOnCoffee>
yeah, exactly
Coolhand has joined #ruby
<shock_one>
You know what is cool? You can authorize on bitbucket through github
Inoperable has joined #ruby
Inoperable has quit [Max SendQ exceeded]
invisime has joined #ruby
geekbri has quit [Read error: Connection reset by peer]
pcarrier has quit [Ping timeout: 245 seconds]
geekbri has joined #ruby
earthquake has joined #ruby
<GeekOnCoffee>
working on a project that will hopefully generate enough recurring income to justify paying for a github plan and save the effort… https://leanpub.com/quickbooks/
Inoperable has joined #ruby
Inoperable has quit [Max SendQ exceeded]
mercwithamouth has joined #ruby
osaut has quit [Read error: Connection reset by peer]
pcarrier has joined #ruby
samphippen has quit [Client Quit]
banister_ has quit [Remote host closed the connection]
mikecmpbll has joined #ruby
fyolnish has quit [Ping timeout: 256 seconds]
angusiguess has quit [Ping timeout: 256 seconds]
end_guy has joined #ruby
blacktul_ has quit [Ping timeout: 240 seconds]
gyre007 has joined #ruby
gyre007 has quit [Read error: Connection reset by peer]
gyre008 has joined #ruby
sepp2k has joined #ruby
Banistergalaxy has quit [Read error: Connection reset by peer]
haxrbyt__ has quit [Read error: Connection reset by peer]
RagingDave has joined #ruby
haxrbyte_ has joined #ruby
shock_one has joined #ruby
drago757 has quit [Quit: drago757]
shock_one has quit [Remote host closed the connection]
shock_one has joined #ruby
shock_one has quit [Remote host closed the connection]
Targen has joined #ruby
haxrbyte has quit [Ping timeout: 252 seconds]
__BigO__ has joined #ruby
niklasb has joined #ruby
frem has joined #ruby
pu22l3r has joined #ruby
pu22l3r has quit [Remote host closed the connection]
Goles has joined #ruby
dustint has quit [Remote host closed the connection]
pu22l3r has joined #ruby
dustint has joined #ruby
karasawa has quit [Read error: Connection reset by peer]
Goles has quit [Max SendQ exceeded]
Neomex has joined #ruby
swex has joined #ruby
Neomex has quit [Client Quit]
samphippen has joined #ruby
pu22l3r_ has joined #ruby
SgtKabukiManNYPD is now known as enroxorz-away
schaerli has quit [Remote host closed the connection]
pu22l3r has quit [Read error: Connection reset by peer]
philcrissman has joined #ruby
Virunga has quit [Remote host closed the connection]
nat2610 has joined #ruby
v0n has joined #ruby
niklasb has quit [Ping timeout: 276 seconds]
etcetera has quit [Ping timeout: 244 seconds]
philcrissman has quit [Remote host closed the connection]
mengu_ has joined #ruby
philcrissman has joined #ruby
arkiver has joined #ruby
stopbit has joined #ruby
tk_ has quit [Quit: ばいばい]
Goles has joined #ruby
fmcgeough has joined #ruby
JumpMast3r has joined #ruby
nat2610 has quit [Ping timeout: 255 seconds]
segv- has joined #ruby
mengu has quit [Ping timeout: 256 seconds]
aedornm has joined #ruby
BizarreCake has quit [Ping timeout: 255 seconds]
CamonZ has joined #ruby
Virunga has joined #ruby
mrdtt has quit [Remote host closed the connection]
blaxter has joined #ruby
niklasb has joined #ruby
mrdtt has joined #ruby
Inoperable has joined #ruby
Michael_ has joined #ruby
baroquebobcat has joined #ruby
arya has quit [Ping timeout: 248 seconds]
jlast has joined #ruby
Inoperable has quit [Quit: "Man who fight with wife all day, get no peace at night!"]
ogamita has quit [Read error: Connection reset by peer]
relixx has quit [Quit: relixx]
zastern has joined #ruby
DuoSRX has quit [Remote host closed the connection]
awarner has quit [Read error: No route to host]
sbear has joined #ruby
awarner has joined #ruby
arya has joined #ruby
elico has joined #ruby
larissa has quit [Quit: Leaving]
DuoSRX has joined #ruby
jg2600 has joined #ruby
m4n has quit [Ping timeout: 248 seconds]
TomyLobo has joined #ruby
bradhe has joined #ruby
jeffreybaird has joined #ruby
Astralum has joined #ruby
bean__ has joined #ruby
fmcgeough has quit [Ping timeout: 240 seconds]
johngalt2600 has quit [Ping timeout: 255 seconds]
fmcgeough has joined #ruby
mmitchell has joined #ruby
palyboy has joined #ruby
elico has quit [Client Quit]
osaut has quit [Quit: osaut]
mark_locklear has joined #ruby
mmitchell has quit [Remote host closed the connection]
SCommette has joined #ruby
mmitchell has joined #ruby
arkiver has quit [Ping timeout: 252 seconds]
bradhe_ has joined #ruby
elico has joined #ruby
Inoperable has joined #ruby
Inoperable has quit [Max SendQ exceeded]
dareign8 has joined #ruby
Inoperable has joined #ruby
Inoperable has quit [Max SendQ exceeded]
io_syl has joined #ruby
Inoperable has joined #ruby
Inoperable has quit [Max SendQ exceeded]
etcetera has joined #ruby
<Xeago>
what is would the proper use of hyphens be in this sentence: "Patrick decided to use Elasticsearch for a distributed full text search environment. "
rwilcox has joined #ruby
<Xeago>
distributed full-text search-environment?
bradhe_ has quit [Remote host closed the connection]
relixx has joined #ruby
Morkel has quit [Quit: Morkel]
anoNxeRo has joined #ruby
tagrudev has quit [Remote host closed the connection]
dareign85 has quit [Ping timeout: 240 seconds]
elico has quit [Client Quit]
<yfeldblum>
Xeago, 'ElasticSearch' with a capital S; full-text is hyphenated but nothing else needs to be
bradhe_ has joined #ruby
<Xeago>
yfeldblum: the current recommended casing for Elasticsearch is Elasticsearch
<Xeago>
thanks!
bradhe has quit [Ping timeout: 276 seconds]
RORgasm has joined #ruby
<Xeago>
Elasticsearch used to be dua cap and all lowercase as well, Kimchy replied in #elasticsearch for this question
sterNiX has quit [Ping timeout: 245 seconds]
<Xeago>
dual cap.*
bradhe_ has quit [Remote host closed the connection]
<yfeldblum>
ah cool
cantonic has joined #ruby
fuleo2 has joined #ruby
jekotia has joined #ruby
dareign85 has joined #ruby
dareign8 has quit [Read error: Connection reset by peer]
beliveyourdream has quit [Read error: Connection reset by peer]
mockra has quit [Remote host closed the connection]
<Xeago>
how do you call different writing forms?
fourq has left #ruby [#ruby]
mengu_ has quit [Quit: This computer has gone to sleep]
<shevy>
legasthenics
headius has joined #ruby
sayan has quit [Read error: Connection reset by peer]
Inoperable has joined #ruby
elico has joined #ruby
alex__c2022 has joined #ruby
dareign85 has quit [Ping timeout: 255 seconds]
reinaldob has joined #ruby
apeiros_ has quit [Remote host closed the connection]
chussenot has quit [Quit: chussenot]
a_a_g has joined #ruby
PragCypher has quit [Quit: Leaving]
rakl has joined #ruby
dareign85 has joined #ruby
shock_one has joined #ruby
chussenot has joined #ruby
nari has quit [Ping timeout: 255 seconds]
jonathanwallace has quit [Ping timeout: 256 seconds]
PragCypher has joined #ruby
<Xeago>
wikipedia doesn't know it :<
shock_one has quit [Remote host closed the connection]
arya has quit [Ping timeout: 248 seconds]
akemrir has quit [Quit: WeeChat 0.4.0]
shock_one has joined #ruby
etcetera has quit [Ping timeout: 276 seconds]
arya has joined #ruby
dareign85 has quit [Ping timeout: 276 seconds]
<shevy>
hehe
karasawa has joined #ruby
karasawa has quit [Client Quit]
karasawa has joined #ruby
tomoyuki28jp has joined #ruby
karasawa has quit [Client Quit]
karasawa has joined #ruby
PragCypher has quit [Remote host closed the connection]
tomoyuki28jp has left #ruby [#ruby]
Zolo has joined #ruby
EhyehAsherEhyeh has quit [Ping timeout: 248 seconds]
emptyflask has joined #ruby
thatguycraig has joined #ruby
thatguycraig has quit [Max SendQ exceeded]
PragCypher has joined #ruby
PragCypher has quit [Read error: Connection reset by peer]
mikepack has joined #ruby
kpshek has quit []
osaut has joined #ruby
dareign85 has joined #ruby
emptyflask has quit [Ping timeout: 244 seconds]
dekroning has quit [Ping timeout: 252 seconds]
beiter has joined #ruby
elico has quit [Quit: elico]
dareign85 has quit [Read error: Connection reset by peer]
dareign85 has joined #ruby
mkillebrew has quit [Ping timeout: 260 seconds]
thatguycraig has joined #ruby
thatguycraig has quit [Client Quit]
shock_one has quit [Remote host closed the connection]
shock_one has joined #ruby
MattRB has joined #ruby
baroquebobcat has quit [Quit: baroquebobcat]
emocakes has joined #ruby
ttt has joined #ruby
joshman_ has joined #ruby
dekroning has joined #ruby
karasawa has quit [Ping timeout: 244 seconds]
nomenkun_ has joined #ruby
nomenkun has quit [Ping timeout: 256 seconds]
karasawa has joined #ruby
drago757 has joined #ruby
emptyflask has joined #ruby
ttt has quit [Ping timeout: 256 seconds]
puppeh has quit [Remote host closed the connection]
Pip has joined #ruby
<Pip>
Okay, what's the default gems shipped with ruby?
<Pip>
banister`sleep, I put user installed gems in their homes
andrewhl has joined #ruby
<Pip>
Officially shipped gems in /usr
<banister`sleep>
cool
wallerdev has joined #ruby
pithagorians has joined #ruby
<Pip>
And it's really cool that if you issue the command prefixed with :sudo, it only list the official gems
<Pip>
Precisely, those installed in /usr
<Pip>
*lists
dr_bob has quit [Quit: Leaving.]
jgrevich has joined #ruby
etcetera has joined #ruby
kpshek has joined #ruby
francisfish has quit [Remote host closed the connection]
Virunga has quit [Remote host closed the connection]
banister`sleep has quit [Remote host closed the connection]
banister`sleep has joined #ruby
Umren has joined #ruby
dr_bob has joined #ruby
jonathanwallace has joined #ruby
oldB has joined #ruby
drago757 has quit [Quit: drago757]
aaronmcadam has quit [Quit: aaronmcadam]
enebo has joined #ruby
<pithagorians>
hello all. we want to use a service of some company and it has the option to use our email server to send emails. their app is ruby one. when they test connection to our server on SMTP by TLS on port 465, they get timeout. they sent the code that is doing test https://gist.github.com/1c810a690fdd12aa98e8 . please give some clue on what can be wrong. i'm not a ruby programmer and it's not very easy to give them an answer
oldB has quit [Client Quit]
<failshell>
on Linux, I have a pid, how can I check if its running?
aaronmcadam has joined #ruby
nateberkopec has joined #ruby
vlad_starkov has joined #ruby
<failshell>
all i can find are references to executing a system command
woolite64 has joined #ruby
dkannan has quit [Quit: dkannan]
pyro111 has quit [Remote host closed the connection]
<shevy>
failshell you could try to run "ps ax", then parse that string
chrismhough has joined #ruby
<shevy>
result = `ps ax`
<failshell>
was hoping for some that didnt rely on that
<failshell>
i wonder why Process doesnt have a method for that
jekotia has quit [Quit: ChatZilla 0.9.89-rdmsoft [XULRunner 1.9.0.17/2009122204]]
danktamagachi has joined #ruby
jekotia has joined #ruby
<shevy>
you can only find out the pid of the running script Process.pid
mkillebrew has joined #ruby
megha has quit [Quit: WeeChat 0.3.9.2]
<shevy>
I think you must ask the operating system
banister`sleep has quit [Ping timeout: 256 seconds]
<shevy>
I would have no idea how else ruby could find out that a .rb file is running or not
<Spaceghost|cloud>
Ask an atheist!
<shevy>
you could workaround by writing files, when the file is running, and removing the file when it has stopped
banister`sleep has joined #ruby
<Spaceghost|cloud>
shevy: pidfiles?
<shevy>
the .rb file
haxrbyte_ has quit [Remote host closed the connection]
<shevy>
I like to call them catfiles
<shevy>
because I like cats
<Spaceghost|cloud>
unnecessary abuse of cat
<Spaceghost|cloud>
Isn't there an interface around getting processes in rubeh?
<failshell>
hehe /var/litterbox
haxrbyte has joined #ruby
<Spaceghost|cloud>
/srv/ur_face
haxrbyte has quit [Remote host closed the connection]
biff_tannen has joined #ruby
Nisstyre-laptop has joined #ruby
haxrbyte has joined #ruby
Pip has quit [Ping timeout: 246 seconds]
mikecmpbll has joined #ruby
wallerdev has quit [Quit: wallerdev]
eka has quit [Ping timeout: 240 seconds]
<aedornm>
there's not by standard library, but you can use Dir["/proc/#{pid}/cmdline"]. If the array is empty it's not running
jjbohn has joined #ruby
dougireton has joined #ruby
eka has joined #ruby
tlvb has joined #ruby
etcetera has quit [Ping timeout: 255 seconds]
<shock_one>
Does anybody use RubyMine on linux?
baroquebobcat has joined #ruby
hackerdude has joined #ruby
martinklepsch has joined #ruby
<failshell>
shevy: Unix has a special feature of the kill system call around signal zero. Error checking is performed, but no signal is sent.
DatumDrop has quit [Remote host closed the connection]
wallerdev has joined #ruby
<martinklepsch>
defining a class intance variable which is an array how would I set that up to allow for things like "Class.arr << ["test"]"
<failshell>
actually, its Process.kill(signal, pid)
jtgiri_ has joined #ruby
hoelzro is now known as hoelzro|away
axl_ has joined #ruby
<martinklepsch>
problem is that .arr is only the getter and just returns the array that is contained. This results in arr << "test" being returned but not Class.arr being set
shock_one has quit [Read error: No route to host]
joeycarmello has joined #ruby
beiter has quit [Quit: beiter]
shock_one has joined #ruby
aganov has quit [Remote host closed the connection]
_nitti has quit [Remote host closed the connection]
Virunga has joined #ruby
Virunga has quit [Remote host closed the connection]
<banister`sleep>
martinklepsch: so what's the deal?
axl_ has joined #ruby
MissionCritical has quit [Ping timeout: 256 seconds]
<relixx>
hey guys, is there a more "intuitive| or user-friendly IMAP library for ruby out there?
headius has joined #ruby
<relixx>
than Net::IMAP
elico has joined #ruby
<relixx>
if not, that's OK, but I seem to remember I've seen one somewhere
<relixx>
can't recall where or even if it was for ruby
punkrawkR^Home has joined #ruby
wallerdev has quit [Quit: wallerdev]
<martinklepsch>
banister`sleep: well thanks, we tried to get it sth like that to work but made the mistake to define @arr inside class << self
<banister`sleep>
martinklepsch: ah
<pen>
anyone tried mruby on arduinuo??
<banister`sleep>
martinklepsch: that will put the ivar on the metaclass :)
dekroning has quit [Ping timeout: 255 seconds]
Zolo has quit [Remote host closed the connection]
samphippen has quit [Quit: Computer has gone to sleep.]
elico has quit [Remote host closed the connection]
jean-louis has quit [Ping timeout: 245 seconds]
freakazoid0223 has joined #ruby
elux has joined #ruby
asym has joined #ruby
pu22l3r_ has quit [Remote host closed the connection]
ilyam has joined #ruby
a_a_g has quit [Quit: This computer has gone to sleep]
_nitti has joined #ruby
<martinklepsch>
banister`sleep: yup, we also made this discovery as we figured out the difference between your and our approach
n1x has joined #ruby
<banister`sleep>
martinklepsch: your approach should have raised an exception, im surprised it didnt
reinaldob has quit [Remote host closed the connection]
<martinklepsch>
banister`sleep: by any chance: do you have any article/guide at hand that gives a good overview about the different class-"types" etc?
reinaldob has joined #ruby
<martinklepsch>
banister`sleep: our approach in the end was way more complex my description above was more the original problem we were trying to solve
<jtcoon>
the stack trace for me is just one item, the entry point call to evildoer
cdt has quit [Quit: Ex-Chat]
timmow has quit [Quit: has left the building]
timmow has joined #ruby
<jtcoon>
I'd prefer something like java, where you can at least see into the problematic trace -- the reason my jimmies are rustled is this same problem prevents me from figuring out what part of ActiveRecord is choking to death on a weird model save scenario
c0rn has joined #ruby
timmow has quit [Client Quit]
dougireton has joined #ruby
timmow has joined #ruby
<shock_one>
jtcoon: thats because of tail recursion optimization, i think. Try recursire(n) + 1
joeycarmello has quit [Remote host closed the connection]
<jtcoon>
does the same, but that is a good point
dekroning has quit [Ping timeout: 276 seconds]
<shock_one>
And Java doesn't have TCO
<banister`sleep>
neither does ruby
psyprus has joined #ruby
Takehiro has quit [Remote host closed the connection]
<psyprus>
which gem / adapter is the most recent that should be used for postgres connectivity
<psyprus>
im seeing 3.. btw new to ruby.. pg, dm-post adapt, postgres
<aedornm>
wouldn't that be what you use binding.pry for?
templaedhel has joined #ruby
Banistergalaxy has quit [Ping timeout: 245 seconds]
punkrawkR^Home has quit [Ping timeout: 244 seconds]
sayan has quit [Read error: Connection reset by peer]
rdark has quit [Ping timeout: 248 seconds]
interactionjaxsn has quit [Remote host closed the connection]
<aedornm>
Is that what pry-rescue does? Signal trap, Pry, continue?
punkrawkR^Home has joined #ruby
<banister`sleep>
aedornm: no, it does lots of things. It also has the ability to drop you into the context of any exceptions that arise in your program
emptyflask has quit [Remote host closed the connection]
jblack has quit [Ping timeout: 248 seconds]
<aedornm>
mmkay .. speaking of pry.. I really like it, but I found myself instinctively typing 'irb' instead. I ended up making irb an alias to pry. It feels a little dirty ... heh
statarb3 has quit [Ping timeout: 248 seconds]
eldariof has joined #ruby
Playground has joined #ruby
Vert has quit [Ping timeout: 252 seconds]
chrismhough has quit [Quit: chrismhough]
<banister`sleep>
aedornm: cool
dougsko has joined #ruby
ananthakumaran1 has quit [Quit: Leaving.]
biello has quit [Remote host closed the connection]
tvw has quit [Remote host closed the connection]
Takehiro has joined #ruby
Takehiro has quit [Read error: Connection reset by peer]
<dougsko>
hey guys, i have a binary string that im trying to do some bitwise math on but i cant figure out how to encode it properly. my string looks like, "-\xC1\fqdwe\e\xAA" and I want to '& 0xf' it
<banister`sleep>
aedornm: yeah it seems that was actually a barrier to our adoption in the early days (people so used to typing 'irb')
tenmilestereo has joined #ruby
Michae___ has quit [Remote host closed the connection]
<aedornm>
banister`sleep: muscle memory is a pain in the ass sometimes
joofsh has quit [Remote host closed the connection]
kmczn has quit [Ping timeout: 245 seconds]
aaronmcadam has joined #ruby
<banister`sleep>
aedornm: should probably write a pry-irb plugin that just overrides the executable :)
kenneth has quit [Quit: kenneth]
Takehiro has joined #ruby
dougireton has quit [Remote host closed the connection]
Pip has joined #ruby
Takehiro has quit [Read error: Connection reset by peer]
dougireton has joined #ruby
nat2610 has quit [Quit: Leaving.]
joschi has quit [Quit: No Ping reply in 180 seconds.]
iamjarvo has joined #ruby
joschi has joined #ruby
Proshot has joined #ruby
nat2610 has joined #ruby
shevy has quit [Ping timeout: 248 seconds]
squidBits has joined #ruby
jenrzzz has quit [Ping timeout: 276 seconds]
jduan1981 has quit [Quit: jduan1981]
Takehiro has joined #ruby
vlad_starkov has joined #ruby
yakko has joined #ruby
Takehiro has quit [Remote host closed the connection]
Takehiro has joined #ruby
<banister`sleep>
aedornm: out of itnerest, what are the commands you use primarily?
<shock_one>
dougsko: look at String#bytes
<banister`sleep>
aedornm: or if your'e inclined, u could install the pry-popularity plugin
hasse has quit [Ping timeout: 245 seconds]
<banister`sleep>
and then run pry-popularity
<banister`sleep>
it'll look at your history and figure out which commands you've used most often
Dann1 has joined #ruby
s__dana has joined #ruby
aaronmacy has joined #ruby
sepp2k1 has joined #ruby
sepp2k has quit [Ping timeout: 256 seconds]
<dougsko>
shock_one: thanks! i just started messing with each_byte. that looks like itll work
hadees has quit [Ping timeout: 248 seconds]
Zai00 has quit [Quit: Zai00]
<shock_one>
dougsko: Learn you API!
<shock_one>
dougsko: Learn your API!
<Dann1>
Okay, here's a dumb question:
<Dann1>
(ie. logging purposes)
<Dann1>
Is it possible to trigger a background process when mannually closing a ruby console?
<dougsko>
is this different from 1.8? because im pretty sure this piece of code i have used to work at one point
<shock_one>
It will trigger even if program exit normally, without interruption. I don't remember if it was in ruby or another language but google KeyboardInterruptException or something
<Dann1>
mmmkay
breakingthings has joined #ruby
DuoSRX has quit [Remote host closed the connection]
horrror has quit [Quit: horrror]
<lectrick>
Is there any way with the Ruby regexp parser to have named matches fire off events?
Takehiro has quit [Remote host closed the connection]
jpfuentes2 has joined #ruby
breakingthings is now known as unclethings
shevy has joined #ruby
dr_bob has quit [Quit: Leaving.]
pawilon has joined #ruby
kmczn has joined #ruby
pawilon has left #ruby [#ruby]
<Dann1>
Is there a way to keep a console window working in the background?
Takehiro has joined #ruby
capsule_toy has quit []
ffranz1 has joined #ruby
_nitti has quit [Remote host closed the connection]
karasawa has quit [Quit: Lost terminal]
<shock_one>
lectrick: you can monkey patch match method
<aedornm>
banister`sleep: If I were to aggregate across all the machines I use, I can easily say show-source, cd/ls, nesting, jump-to, find-method. There's some Ruby apps I use for some of our products that are ungodly difficult to debug and that's really where I use it the most.
<banister`sleep>
aedornm: interesting, i didnt think jump-to was useful to anyone
elaptics is now known as elaptics`away
<banister`sleep>
aedornm: if you set, Pry.prompt = Pry::NAV_PROMPT you might find it's not so useful anymore
<banister`sleep>
(jump-to)
swingha has joined #ruby
<banister`sleep>
same with nesting
h4mz1d has joined #ruby
karasawa has quit [Quit: Lost terminal]
karasawa has joined #ruby
mneorr has quit [Remote host closed the connection]
Takehiro has quit [Remote host closed the connection]
mneorr has joined #ruby
karasawa has quit [Client Quit]
dekroning has joined #ruby
kmczn has quit []
<aedornm>
banister`sleep: In a normal console, not so useful... using a phone to SSH into a machine and debug something while in the middle of nowhere, it's still very useful
karasawa has joined #ruby
<banister`sleep>
hehe
karasawa has quit [Client Quit]
Virunga has joined #ruby
dekroning has quit [Client Quit]
dekroning has joined #ruby
workmad3 has quit [Ping timeout: 264 seconds]
ffranz1 has quit [Quit: Leaving]
TIBS02 has quit [Ping timeout: 245 seconds]
chriskk has joined #ruby
chriskk has quit [Read error: Connection reset by peer]
chriskk has joined #ruby
<aedornm>
and I'm sure not very many people need to do that, but I've had to many times while on the road. Data roaming charges aren't that bad if you limit things to some text. I don't think I would ever try to use a 3g/4g adapter in non-service areas with a laptop instead of a phone for those cases
hybris has quit [Read error: Connection reset by peer]
babonk has joined #ruby
babonk has quit [Changing host]
babonk has joined #ruby
h4mz1d has quit [Ping timeout: 240 seconds]
Targen has quit [Ping timeout: 246 seconds]
yakko has quit [Remote host closed the connection]
ddd has joined #ruby
kevinchu has joined #ruby
jpfuentes2 has quit [Quit: Computer has gone to sleep.]
<shevy>
beaky, you see, if you use strings, their object id is never the same
<shevy>
also ruby symbols are very boring
<shock_one>
beaky: they're immutable strings with special literal syntax but it doesn't matter. They're widely used as identifiers
<amh345>
aedornm: "500".rjust(6, "0") does the trick. but i can't get 5.00 to a string without losing the trailing "0"'s
<aedornm>
er
<shevy>
the amount of time people have to spend understanding them isn't worth the investment :(
<graft>
basically, they save you the trouble of typing an extra "
<shevy>
yeah :)
<beaky>
heh
<shevy>
that's the best use I found for them too
<rwilcox>
beaky: except Ruby uses symbols everywhere, and for tons of different things: options in a hash (dictionary), names of methods to call, constants...
havenn has quit [Remote host closed the connection]
Monie has joined #ruby
<graft>
Guest14483: so, you're not doing any checking at all to see if you connected, eh?
<graft>
why would you expect this to work?
<Guest14483>
no
<Guest14483>
you see it works
<Guest14483>
it just doesnt connect
<Guest14483>
to the channel
<Guest14483>
because join
<Guest14483>
is being sent
<Guest14483>
too early
<graft>
please don't use enter as punctuation
<Guest14483>
:I
<graft>
this is not a haiku contest
<Guest14483>
No shit !
<Guest14483>
Can you help or not
<graft>
well, you need to read the output and wait until you get an auth message
dekronin1 has joined #ruby
<graft>
in your until loop
<Guest14483>
How do i do that
<Guest14483>
that is my problem
<Guest14483>
I can't figure that part out
<graft>
something like msg1.match(/Welcome to IRCx/) { s.puts "JOIN #{channel}" } i imagine
Takehiro has joined #ruby
<breakingthings>
Hey, I was wondering if anyone could help me figure out something… I'm trying to run rspec on my gem, and when it hits my first test, it fails (nameerror), which is expected, but it's also printing out a lot of extra lines with "from .../.rbenv/..." and I was wondering if I can get rid of those by adding a dependency in the gemspec… and somehow running a local version of rspec? I'm not sure how this works yet.
<Guest14483>
Ah
<Guest14483>
are u sure "match"
<Guest14483>
would work?
<shock_one>
Wow, there is a bot that evaluates stuff!
<graft>
no, but you can always try it
pavilionXP has joined #ruby
angusigu1ss has joined #ruby
<Guest14483>
:I
jimeh has joined #ruby
vlad_starkov has joined #ruby
eykosioux has joined #ruby
<postmodern>
breakingthings, could you paste the error
<breakingthings>
It was on the Hash class, so that… that makes sense.
<Dann1>
Nope you're not
s0ber has quit [Ping timeout: 240 seconds]
<shock_one>
breakingthings: you can make class method like empty_object which would return «the empty object», whatever it means, and compare against it.
* breakingthings
goes and walks into a wall
s0ber_ is now known as s0ber
blazes816_ has joined #ruby
<danneu>
if you need to test SomeClass.new, it sounds like you're doing too much in your initializer
vlad_starkov has quit [Remote host closed the connection]
Bottesque has joined #ruby
dougireton has quit [Client Quit]
blazes816 has quit [Ping timeout: 256 seconds]
blazes816_ is now known as blazes816
<breakingthings>
I understand that
<graft>
i'm still unclear what you want to be empty, breakingthings - like, if you want some specific instance variable to be nil, why don't you just test that?
<breakingthings>
I was just confused why they were doing it because I overlooked what they were doing
<breakingthings>
Nevermind, graft
<breakingthings>
I'm just apparently not awake enough to be doing things.
<danneu>
my bad, i was scrolled up in the history. i see there have been 50 lines since then
<graft>
aye
mdw- has joined #ruby
<shock_one>
breakingthings: can you show us what they are doing?
vlad_starkov has joined #ruby
<breakingthings>
shock_one: <breakingthings> It was on the Hash class, so that… that makes sense.
<breakingthings>
I was just not reading their example fully
<breakingthings>
so I had a derp
<danneu>
haha
<breakingthings>
I was wondering wtf they were doing and didn't even read the class name
dougireton has joined #ruby
xyzodiac has joined #ruby
<breakingthings>
But I geddit now
Goles has quit [Quit: Computer has gone to sleep.]
neo314 has quit [Ping timeout: 245 seconds]
pcarrier has quit []
dougireton has quit [Client Quit]
atno has quit [Read error: Connection reset by peer]
atno_ has joined #ruby
graft has quit [Ping timeout: 252 seconds]
mark_locklear has quit [Read error: Connection reset by peer]
vlad_starkov has quit [Remote host closed the connection]
relixx has quit [Read error: Connection reset by peer]
<shock_one>
reactormonk: integers are immutable but we apply increment to the variable, not the literal.
<reactormonk>
shock_one, well, if you want to change the variable, you have to reassign to it
<shock_one>
What is the problem? I would expect i++ to work exactly like i +=1
geekbri has quit [Remote host closed the connection]
axl_ has quit [Quit: axl_]
andrewhl has quit [Remote host closed the connection]
<reactormonk>
shock_one, well, you could do a syntax rewrite
<danneu>
shock_one: for the same reason scala didn't implement i++, which is because it sort of hides the fact that it would be an expression that returns i + 1 where i++ usually mutates i in most other languages.
<danneu>
so the syntactic sugar was never added
<shock_one>
danneu: Odersky says that c++ is expression with an error :)
<danneu>
frankly, i prefer i += 1, opeartory symmetry
<elico>
Hey there, I am looking for an example app that parses small XML docs.
theRoUS has quit [Ping timeout: 255 seconds]
<danneu>
banister`sleep: deliberately thinking about immutability vs mutability. thinking functionally instead of imperatively. using something like Array#partition instead of an imperative solution i'd usually come up with. thinkingn recursively.
<banister`sleep>
shock_one: what the hell? what's with all that random unicode? did their program crash when it generated the cert?
<danneu>
haha
<shock_one>
banister`sleep: What are you talking about? It's just my name isn't in ASCII
skcin7 has quit [Quit: Computer has gone to sleep.]
caleb_io has quit [Quit: caleb_io]
<banister`sleep>
shock_one: looks like a system crash :P
<danneu>
that's how i would always write my name
<shock_one>
banister`sleep: My name looks like a system crash? Thank you.
templaedhel has quit [Client Quit]
<shock_one>
banister`sleep: do you understand the type system?
<danneu>
yeah, not sure how you see 'system crash' before 'slavic glyphs' or at least 'not english'
angusiguess has quit [Ping timeout: 245 seconds]
chendo_ has quit [Ping timeout: 240 seconds]
bradhe has quit [Remote host closed the connection]
Bottesque has quit [Read error: Connection reset by peer]
<danneu>
i really liked the eclipse worksheet realtime evaluation
ckrailo has joined #ruby
<banister`sleep>
shock_one: teasing of course, i just rarely see slavs write their name in their full cyrilic glory, most of the time it's anglicised and written in the latin alphabet
cakehero has joined #ruby
bradhe has joined #ruby
<banister`sleep>
danneu: how does that work in the case the code is writing to a file or something like that, wouldn't that be annoying?
<banister`sleep>
i can understand it's useful for pure functional code, but for code that's mutating stuff it woudl be annoying, no?
<danneu>
well sure. but that's no different than testing things out in a repl
otherj has joined #ruby
dougireton has quit [Quit: Leaving.]
Pip has left #ruby ["Leaving"]
<banister`sleep>
danneu: well it is, because code in a repl doesn't evaluate until you explicitly call it, but in the worksheet, isn't it evalling lines even in a method def as you type out the method? (i.e you haven't called the method yet)
<Dann1>
Well, thanks for all the help guys.
<Dann1>
G'night
<danneu>
sure, but why would i put the file IO in the worksheet. my functions would depend on string data.
<danneu>
and if i wanted to, i would just do some setup at the top and teardown at the bottom. but i wouldnt
jrajav has quit [Quit: I tend to be neutral about apples]
<banister`sleep>
danneu: so, i think the worksheet is probably different to what i had in mind:) i figured it was like the lighttable thing
dyrot has joined #ruby
<danneu>
banister`sleep: no, that's right. it shows line by line eval.
Guest57178 has quit [Ping timeout: 245 seconds]
<danneu>
but i also wouldn't put external calls to Facebook in there either.
<shock_one>
Actually I started learning ruby after scala. I was really mad there are no placeholders(_), pass-by-name, higher order functions and other cool functional stuff
otherj has quit [Client Quit]
<banister`sleep>
danneu: but lighttable is used for writing actual code, not just playing around
mrrhead has joined #ruby
Villadelfia_ has joined #ruby
kpshek has quit []
nat26101 has joined #ruby
Villadelfia has quit [Ping timeout: 248 seconds]
<banister`sleep>
danneu: so in so far as it's used for writing actual code, it could/should have any kind of code in there, including mutator methods and file system writes, etc
arturaz has quit [Remote host closed the connection]
<danneu>
banister`sleep: the worksheet i'm talking about is just a text file with a repl. like any repl, you'd use it to parcel out what you want to do and then move it into a real file.
nat2610 has quit [Read error: Connection reset by peer]
pavilionXP has quit [Remote host closed the connection]
xyzodiac has quit [Quit: Computer has gone to sleep.]
<banister`sleep>
danneu: oh, i do actual repl-oriented development (when i can) which doesn't require me to have two phases like that, let me show u
<danneu>
but yeah, it's not some special catchall directive or anything.
<shock_one>
but not (1..10).map(_ * 2)
<danneu>
shock_one: yeah i agree
<danneu>
shock_one: i miss that too
axl_ has joined #ruby
SeySayux has joined #ruby
<danneu>
ruby feels so explicit compared to that
mergoth has quit [Read error: Connection reset by peer]
mockra has joined #ruby
dougireton has joined #ruby
zph has quit [Quit: Computer has gone to sleep.]
mergoth has joined #ruby
<tylersmith>
The Zen of Ruby says explicit is better than implicit right?
<danneu>
tylersmith: i didnt mean explicit, i meant verbose
<shock_one>
danneu: Have you seen haskell? There is no need for even placeholder.«*» is a function that takes two arguments, but «*2» returns another function that takes one arguments. It's really cool
<tylersmith>
danneu: true
<danneu>
shock_one: i actually just printed out that Learn You a Haskell book
<shock_one>
:)
haxrbyte_ has joined #ruby
nyuszika7h has quit [Quit: Reconnecting]
browndawg has left #ruby [#ruby]
<shock_one>
danneu: You are going to love functional style. I promise that.
haxrbyte has quit [Read error: Connection reset by peer]
bean__ has joined #ruby
<danneu>
odersky's course + Gary Bernhardt helped me understand how to actually separate out my Objects. it used to be sort of arbitrary for me. but now i can see the boundaries, and they often involve centralizing the necessary imperative stuff and then describing your domain within classes that have functional methods.
<danneu>
so now my OOP is really just a way of organizing immutable FP. it's much better. obvious in hindsight, even
<danneu>
banister`sleep: dope. paused the vid to point out that your cl prompt looks like a charm bracelet
<shock_one>
danneu: There were nearly nothing about OOP in Scala in the course, it was concentrated on functional programming. There is a very good book written by Odersky (1st edition for free, but you better pirate 2nd) with pretty throughout coverage of Scala
<banister`sleep>
davidcelis: yeah i know, hope he'll fix it soon enough
theRoUS has joined #ruby
theRoUS has quit [Changing host]
theRoUS has joined #ruby
caleb_io has joined #ruby
buibex has joined #ruby
nyuszika7h_ has joined #ruby
nyuszika7h_ is now known as nyuszika7h
<danneu>
shock_one: right. but at the end of the day i need to reel in the things i learned about FP to my craft and dayjob. it's an OOP one. and FP certainly isn't incompatible with it.
<banister`sleep>
davidcelis: there's also ascii.io
<banister`sleep>
danneu: can u explain what u mean by: "OOP is really just a way of organizing immutable FP"
buibex has quit [Remote host closed the connection]
<banister`sleep>
havenn: cool, is it nearly production ready?
<shock_one>
danneu: after the tour of scala I haven't used for loot a single time.
<havenn>
Elixir repl (iex) seems awesome.
bluOxigen has joined #ruby
<danneu>
banister`sleep: nice. i use Pry + interactive_editor (vim). seems similar, but i dont use Pry's features much, unfortunately.
<banister`sleep>
havenn: cool, can u do a showterm cast of it?
<shock_one>
*for loop
<banister`sleep>
danneu: i dont know why you use interactive_editor when pry does pretty much all of that afaict
<havenn>
banister`sleep: Yeah, I think it is production ready, not sure?
emptyflask has joined #ruby
nate_h has joined #ruby
dekroning has quit [Ping timeout: 240 seconds]
<banister`sleep>
havenn: cool, can u do a showterm/ascii.io of the elixir repl?
jduan1981 has joined #ruby
<havenn>
banister`sleep: yeah, sure - will do
DatumDrop has quit [Remote host closed the connection]
<nate_h>
Hey can someone help me with some basic ruby. https://gist.github.com/865129. I'm trying to understand what the brackets on line 5 and 9 do in the script.rb
<shock_one>
havenn: As if erlang isn't weird enough they made another language on top of it.
zastern has quit [Remote host closed the connection]
Rix has quit [Ping timeout: 245 seconds]
<danneu>
banister`sleep: because i was using irb+interactive_editor and pretty much replaced irb with pry superficially. still need to dig into pry
<banister`sleep>
shock_one: i think the goal is to make it less weird :) cf javascript --> coffeescript :)
<nate_h>
i assume its some kind of array thing, because later on we reference that loop variable ips with those values
<Gate>
nate_h: sure! Ruby has an implicit return, meaning that the last evaluated statement in the script will be returned
<Gate>
nate_h: So that method is just returning an array
<nate_h>
Gate, so basically its building an array with those values in it.
hackerdude has quit [Remote host closed the connection]
<danneu>
shock_one: i noticed that as well. i realized how many of these #each blocks can be expressed with #map, #partition, #chunk, etc.
<nate_h>
on line 12, they don't use an actual variable map name, and use the "_" character
<nate_h>
what does that do
<Gate>
nate_h: yep! Its doing so with a little bit of wierdness, I greatly dislike building blocks inside of arrays like that, but to each their own
arya_ has joined #ruby
sailias has quit [Quit: Leaving.]
<shock_one>
danneu: Do you know that grep with a block works like map+filter?
<nate_h>
Gate, yeah I think they are only doing that so they can ensure the threads return in order, I don't care about that part so i'm trying to figure out what I can drop and yet still iterate through the threads.
biff_tannen has quit [Read error: Connection reset by peer]
arya has quit [Ping timeout: 248 seconds]
<danneu>
shock_one: i just found out about that this week. i've been doing google queries for 'functional programming, ruby'.
etcetera has quit []
answer_42 has quit [Remote host closed the connection]
templaedhel has joined #ruby
<danneu>
banister`sleep: gary bernhardt expresses it well (destroyallsoftware.com). he has talks where he speaks of it as 'functional core, imperative shell'.
<Gate>
nate_h: the _ is using an implicit array split, so basically (a,b,_) = [1,2,3,4,5,6], a = 1, b = 2, _ means ignored values in this case
<banister`sleep>
danneu: can you give me an example?
enebo has joined #ruby
Playground has joined #ruby
<shock_one>
nate_h: they're doing it because there is no tuples in ruby
<banister`sleep>
danneu: i'm not going to subscribe to his screencasts, he's too much of an annoying blow-hard on twitter, it put me off a long time ago :)
Umren has quit [Read error: Connection reset by peer]
<nate_h>
shock_one, gotcha, that's kinda what I figured. a way to map things. I'm just going to throw all that out then, and do it in random order since my thread results don't need to be in order. more like http://pastie.org/5851179
<nate_h>
just trying to learn threading a little.
thone has joined #ruby
<shock_one>
nate_h: No, it's just a way to return a couple of things from the method
<shock_one>
nate_h: ips gets assigned to three things: label, thread and line
ner0x has quit [Quit: Leaving]
kuzushi has quit [Ping timeout: 260 seconds]
frogstarr78 has joined #ruby
<banister`sleep>
Gate: you can use * for that too
<danneu>
banister`sleep: i'm just talking about objects that have referential transparency, usually on their initializer state
thone_ has quit [Ping timeout: 252 seconds]
<Gate>
banister`sleep: for ignored value, or do you mean splating the array?
<Gate>
shock_one: quality screencasts take time to make, people like Ryan Bates put in a crapload of work, and still most of his screencasts are free. He charges for redux and in-depth episodes. If they are valuable to you, pay for them. If not, then don't.
caleb_io has quit [Quit: caleb_io]
<banister`sleep>
havenn: thanks
dougireton has quit [Quit: Leaving.]
caleb_io has joined #ruby
nwertman has quit [Quit: Lost terminal]
<danneu>
banister`sleep: if you have a function `new_path(old_path)` string->string, imagine if you encapsulated that in `Page.new(path).new_path` with any other relevant methods. perhaps Page.new(path, content).to_html.
<havenn>
banister`sleep: No prob! Yeah, the tab-completion is pretty nice with iex.
<ckrailo>
any of yall rocking https://github.com/karmi/tire and ActiveRecord? i could use some help figuring out the best way to setup indexes. (i was hoping Tire would automagically discover the model attributes, but i must be doing something wrong.)
kpshek has joined #ruby
dougireton has joined #ruby
schaerli has quit [Remote host closed the connection]
<nate_h>
shock_one, if I wanted to push the results of a thread into an array then what would I do for syntax? note line 6 http://pastie.org/5851205
<nate_h>
shock_one, there must be a syntax for a code block, right?
<havenn>
banister`sleep: I kinda like how they show the method arity like: method/2
yalue has quit [Read error: Connection reset by peer]
menace has left #ruby [#ruby]
<banister`sleep>
havenn: yeah that's nice
<banister`sleep>
havenn: how do they show * arity, -1 ?
mergoth has quit [Read error: Connection reset by peer]
wargasm has joined #ruby
dekroning has joined #ruby
<banister`sleep>
danneu: so, by referentially transparent you just mean for the same input to the initializer the methods behave the same way? isn't that true for all objects that don't rely on global state?
mergoth has joined #ruby
<shock_one>
nate_h: you can even push inside the thread
<banister`sleep>
danneu: i mean it would have to be a very unusual object for which: MyObject.new(blah).meth1 behaves differently if you give it the same blah each time
chussenot has quit [Quit: chussenot]
<havenn>
banister`sleep: hrm, dunno - the standard methods are all between /0 and /4. No splats in sight.
tenmilestereo has quit [Quit: Leaving]
spider-mario_ has quit [Remote host closed the connection]
notVert has quit [Remote host closed the connection]
<nate_h>
shock_one, really? like arr.push(output) ?
caleb_io has quit [Quit: caleb_io]
<shock_one>
nate_h: Yes. It can introduce race conditions but you don't push in that array from other places, do you?
<nate_h>
no
<nate_h>
i just want to store all the results of the threads
<banister`sleep>
havenn: that is a cool idea though, we should steal it for p-dogg :P
<banister`sleep>
(showing arity like that: /n )
DrShoggoth has quit [Ping timeout: 264 seconds]
<danneu>
banister`sleep: in real world code, i see the equivalent of giving that Page class a #save option that does a File.write instead of handling that externally. Or I see a lot of code wehre Page.new(path) actually File.reads the path. Or how about classes that arbitrarily mutate their isntance variables. Cat.meth1 is something different over here than it is there. etc.
bradhe has quit [Remote host closed the connection]
notVert has joined #ruby
<danneu>
i'm not saying this is some profound next-level shit
templaedhel has quit [Quit: Leaving...]
bradhe has joined #ruby
cheekee has joined #ruby
<shock_one>
nate_h: Do you know the lines can be out of order?
<nate_h>
shock_one, out of order is fine, its just returning a number
<shock_one>
nate_h: And now there is no point to have arr. Your outer block maps threads and stores them in «ips»
zehrizzatti has joined #ruby
<nate_h>
shock_one, oh
aedornm has quit [Remote host closed the connection]
<banister`sleep>
danneu: so, Page.new(path).render #=> html is bad code for u?
<nate_h>
so that's what the map function does.. got it.
bradhe has quit [Ping timeout: 255 seconds]
thams has joined #ruby
notVert has quit [Read error: Connection reset by peer]
<danneu>
banister`sleep: no. keep in mind your initial question to me was asking me what i meant by "organizing my FP with OOP".
<banister`sleep>
danneu: but your answer was referential transparency of objects :) So i'm trying to understand that
_nitti has joined #ruby
benlieb has joined #ruby
templaedhel has joined #ruby
kpshek has quit []
jackyalcine has joined #ruby
<danneu>
banister`sleep: i would say Page.new(path).contents is undesirable compared to moving the File.read outside of the class though, yes.
[Neurotic] has joined #ruby
markalanevans has joined #ruby
<benlieb>
I'm upgrading a project from 1.8.7 to 1.9.2 and it seems that a method definition of mine is causing an error? def test_create( users_with_access, creatable_rezource, access_proc=nil) => ArgumentError: wrong number of arguments (0 for 2).
<benlieb>
What am I missing?
<banister`sleep>
danneu: but, even if you do put the File.read elsewhere it doesnt change the fact that the 'Page' class is not referentially transparent, right?
zehrizzatti has quit [Quit: Leaving...]
<banister`sleep>
danneu: nm, apart from gary bernhardt, any other links or ideas where i can learn about our FP core/imperative shell?
<banister`sleep>
it sounds cool
<banister`sleep>
your*
<danneu>
banister`sleep: maybe i better word is 'deterministic'
notVert has joined #ruby
zph has joined #ruby
templaedhel has quit [Quit: Leaving...]
<danneu>
what i'm really trying to express is dropping the dependency on the order in which events are executed in the program surrounding the object. Page.new(path).render certainly is not deterministic. it's annoying to test. its dependent on the filesystem.
<benlieb>
can anyone help me understand why the following method definition even with not content is providing the shown argument error when I switched from 1.8.7 to 1.9.2 https://gist.github.com/4628703
doug___ has joined #ruby
<doug___>
whoa, i'm triple underbarred today
mercwithamouth has quit [Ping timeout: 246 seconds]
<shock_one>
danneu: Are you saying that an object should rely only on it's own state and not some outer variables?
doug___ is now known as doug
<banister`sleep>
danneu: u could pass in an IO object instead of a path, and then pass in a StringIO when u come to test it
DrShoggoth has joined #ruby
_nitti has quit [Remote host closed the connection]
<doug>
got this line: grades, subjects, role = "", "", ""
<banister`sleep>
danneu: but that's beside the point, i'm genuinely interested in learning more about FP core / imperative shell
<banister`sleep>
danneu: any other links?
<doug>
looks messy. there a way to avoid three ""'s? and ideally not use 3.times { "" } either...
<shock_one>
Yes, FP sure has some issues with IO
<danneu>
banister`sleep: if Page can represent a web page or a textfile, why would it do the IO itself? Page doesnt represent a location on the internet or the filesystem. it represents data in my example. so why poison it?
<shock_one>
banister`sleep: I know The Right Way, but it will be very hard. Do you want a link?
<reactormonk>
shock_one, well, they have some nice solutions for it
<shock_one>
Like monads?
<danneu>
shock_one: no, i'm not expressing that an object can only act on its initialize arguments. i'm just suggesting that you can handle IO externally and make the object more robust.
Jamone has joined #ruby
AlSquirrel has joined #ruby
axl_ has quit [Read error: Connection timed out]
Kuifje has quit [Ping timeout: 255 seconds]
AlSquire has quit [Read error: Connection reset by peer]
<shock_one>
danneu: I believe the FP approach is immutable objects.
<banister`sleep>
shock_one: sure
<doug>
i guess that's [""] * 3
adambeynon has joined #ruby
<danneu>
shock_one: right. that's what i'm expressing. Page.new(contents).to_html does not mutate anything.
jaequery has quit [Quit: Computer has gone to sleep.]
Morkel has quit [Quit: Morkel]
<shock_one>
banister`sleep: There is also video lectures somewhere
doug has left #ruby [#ruby]
adeponte has quit [Ping timeout: 256 seconds]
Monie has quit [Ping timeout: 256 seconds]
zehrizzatti has joined #ruby
moos3 has quit [Quit: Computer has gone to sleep.]
<shock_one>
I dropped out at exercise «fibonacci number in O(log n) time»
<danneu>
banister`sleep: finally, i'm not saying that objects can't deal with mutation. the world around you is mutable. filesystems, databases. you can wrap your necessary mutation and imperative design in objects as well. but you can keep your domain objects clean.
zehrizzatti has quit [Client Quit]
Jamone has quit [Ping timeout: 264 seconds]
Monie has joined #ruby
adeponte has joined #ruby
wf2f has quit [Ping timeout: 246 seconds]
<shock_one>
danneu: what is clean?
workmad3 has joined #ruby
zph has quit [Quit: Computer has gone to sleep.]
<danneu>
shock_one: deterministic
xbayrockx has joined #ruby
xbayrockx is now known as wf2f
<shock_one>
danneu: Always return the same output on the same input?
<danneu>
shock_one: yeah.
<LiquidInsect>
so by clean you mean "idempotent"
ryanjh has joined #ruby
<banister`sleep>
danneu: it's not hard doing filesystem tests btw, just use the temp file api
jds has quit [Remote host closed the connection]
<shock_one>
But output depends on the inner state of the object. And if you change the state, then output should be different
<banister`sleep>
danneu: also there is a project called FakeFileSystem that is pretty far along i think
|Monie| has quit [Ping timeout: 264 seconds]
zehrizzatti has joined #ruby
failshell has quit [Remote host closed the connection]
<cheekee>
Given an array [16], Is there a way to iteratively print 4 elements at a time, only using the "each" method?
blacktulip has joined #ruby
<danneu>
cheekee: i think it's Array#each_slice
dekroning has joined #ruby
<danneu>
banister`sleep: right, but the annoyance is a side-effect of my main point
phantasm66 has quit [Quit: *sleeeep….]
<cheekee>
I know that works, but I was trying to do it using "each"
<shock_one>
cheekee: why?
ryanjh has quit [Ping timeout: 245 seconds]
beiter has quit [Quit: beiter]
<cheekee>
shock_one: that was the challenge
relixx has joined #ruby
blacktu__ has joined #ruby
<danneu>
cheekee: you could write your own Iterator
maletor has quit [Quit: Computer has gone to sleep.]
blacktul_ has quit [Ping timeout: 264 seconds]
<shock_one>
cheekee: you can store values in some array and when it's size is 4 print and clean it
<banister`sleep>
danneu: but you'll still ahve to test the other object which does read from the file system :)
<banister`sleep>
so you just delay the problem
<banister`sleep>
but i dont know which design you had in mind
GattoLino has quit [Quit: See you soon...]
mneorr has joined #ruby
snearch has joined #ruby
blacktulip has quit [Ping timeout: 246 seconds]
<cheekee>
shock_one: danneu : ok thanks! it can't be done basically
GattoLino has joined #ruby
<danneu>
cheekee: what's an example of basic
GattoLino has quit [Client Quit]
dekroning has quit [Ping timeout: 276 seconds]
<danneu>
people.each(4) { |group| ... } ?
angusiguess has joined #ruby
<shock_one>
cheekee: the right way is to use each_slice.
<cheekee>
danneu: ah! I did not know that.
<banister`sleep>
cheekee: each_slice
<danneu>
banister`sleep: I'd assert that you are never testing 'File.read'. you might be testing an object that determines the path, but else you are just testing Ruby's standard library.
<danneu>
cheekee: you can't do .each(4). i was just wondering what you want. you can do .each_slice(4) though
<banister`sleep>
danneu: that's an ugly API, esp if the primary use case is reading from files
TheFuzzball has quit [Quit: Computer has gone to sleep.]
maletor has joined #ruby
<Quadlex>
I'm trying to figure out if California allows me to claim back Duty if I leave the same day
<Quadlex>
And their state website is very pretty and almost entirely useless
<tylersmith>
wtf is Duty?
<banister`sleep>
danneu: sounds like way overengineering, if pages are 99% of teh time rendered from content in files then u should have a from_file class method IMO
<danneu>
shock_one: in CA you get a free Call of Duty game whenever you quit
<danneu>
er
<danneu>
not to shock_one
<shock_one>
tylersmith: I'm sure some ruby related stuff. Why else would he write to #ruby channel?
<banister`sleep>
danneu: passing in a File.read() 99% of teh time you use it just looks silly
benlieb has quit [Quit: benlieb]
<danneu>
banister`sleep: i was talking about a test.
benlieb has joined #ruby
benlieb has quit [Client Quit]
denken has joined #ruby
DrShoggoth has quit [Ping timeout: 264 seconds]
<banister`sleep>
danneu: so you always let testability drive your APIs? i agree most of the time testable code is also good code, but if you're forced to make your API bloated and weird just to make it testable, then you're taking it so far. Just grin and bear it and write the tests anyway, even if it's slightly more difficult
dmiller2 has joined #ruby
Xeago_ has joined #ruby
Xeago has quit [Killed (adams.freenode.net (Nickname regained by services))]
Xeago_ is now known as Xeago
wargasm has left #ruby [#ruby]
invisime has quit [Quit: Leaving.]
<danneu>
well, what's your point? why not just use global variables, too?
samuel02 has quit [Remote host closed the connection]
<shock_one>
So you say that Page.new(path).render is worse then Page.new(File.read(path)).render?
<danneu>
why even do OOP?
<danneu>
just have a "include 'functions.php'"
samuel02 has joined #ruby
<banister`sleep>
danneu: can i see your github page? :)
bean__ has quit [Quit: Computer has gone to sleep.]
<danneu>
You're hung up on the API of an object that exists in a fictional system. we haven't gotten that far
DatumDrop has quit [Ping timeout: 276 seconds]
mmitchell has quit [Ping timeout: 252 seconds]
cheekee has quit [Quit: Lost terminal]
elux has quit [Quit: Bye!]
jerius has quit [Ping timeout: 255 seconds]
<shock_one>
danneu: So you're saying that Page.new(File.read(path)).render is better then Page.new(path).render?
<Gate>
-_^
<breakingthings>
I think he was saying Page.from_file(path).render would be better.
<danneu>
shock_one: we can't really determine that without expressing how Page is actually used in our system. let's say that Page exists in a system that compiles your static blog.
jrist is now known as jrist-afk
* breakingthings
backs out of the conversation again
<Gate>
I suppose one could make that argument if you were to take the law of demeter to lunacy
__BigO__ has quit [Remote host closed the connection]
alanp has quit [Read error: Operation timed out]
samuel02 has quit [Ping timeout: 256 seconds]
alanp has joined #ruby
<danneu>
if your use of page is a rake task that does paths.each {|path| content = File.read(path); page=Page.new(path,content); FIle.write(page.new_path, page.compiled) }, then you've done nothing to improve the API of class.
<danneu>
except dillute its responsibility
dv_ has quit [Ping timeout: 245 seconds]
dustint has quit [Quit: Leaving]
<danneu>
this isn't Law of Demeter taken to lunacy. it's seperating responsibilities, immutability from mutability.
<banister`sleep>
danneu: i like the idea of what your'e saying but im not convinced by your speciic examples, do you have any links that discuss this FP core / imperative shell more?
<danneu>
no
<danneu>
not off hand. i would like to find some as well, though.
apok has quit [Quit: apok]
nat26101 has quit [Quit: Leaving.]
nat2610 has joined #ruby
chrismhough has quit [Quit: chrismhough]
joofsh_ has quit [Remote host closed the connection]
<Quadlex>
shock_one: I was making a guess that there are plenty of SF residents in here:P