fflush changed the topic of #ruby to: Ruby 1.9.3-p194: http://ruby-lang.org || Paste > 3 lines of text on pastebin.com
sailias has joined #ruby
beneggett has quit [Quit: Computer has gone to sleep.]
ephemerian has quit [Quit: Leaving.]
sneakyness_wk has quit [Quit: JUST ADD BEEF]
baroquebobcat has quit [Quit: baroquebobcat]
tds has joined #ruby
triptec has quit [Read error: Operation timed out]
Takehiro has quit [Ping timeout: 252 seconds]
karakedi has joined #ruby
mercwith1mouth has quit [Ping timeout: 244 seconds]
<dekz> answer to my question is yes and it's accesible through RACKUP inside the configuration file RACKUP[:port] for eample.
mrdodo has quit [Remote host closed the connection]
<t0rc> I am having trouble installing bundler on Mountain Lion. I started with the CLI then switched to using the RVM GUI and it says it installs yet I cannot access the commands, gem says it isn't installed.
mrdodo has joined #ruby
<t0rc> nevermind for some reason itw orks now
O123 is now known as IlPorco
davidcelis has quit [Quit: K-Lined.]
andrewstewart has quit [Quit: Linkinus - http://linkinus.com]
clj_newb has quit [Ping timeout: 245 seconds]
stabby_lambda has joined #ruby
Monie has joined #ruby
Monie has quit [Changing host]
Monie has joined #ruby
stabby_lambda is now known as rjsamson
maxmmurphy has quit [Quit: maxmmurphy]
eroc has quit [Quit: eroc]
peregrine81 has quit [Quit: Computer sleeping.]
recycle has quit [Remote host closed the connection]
moted has quit [Remote host closed the connection]
nari has quit [Ping timeout: 276 seconds]
blessYAHU has joined #ruby
yshh has joined #ruby
savage- has quit [Ping timeout: 276 seconds]
jz has joined #ruby
jz is now known as Guest79876
adeponte has quit [Remote host closed the connection]
BullShark` is now known as BullShark
hipertracker has quit [Ping timeout: 265 seconds]
cableray has quit [Quit: cableray]
adamkittelson has quit [Remote host closed the connection]
enyo has quit [Ping timeout: 245 seconds]
mrdodo has quit [Ping timeout: 245 seconds]
JoeTheGuest has quit [Changing host]
JoeTheGuest has joined #ruby
BSaboia has joined #ruby
sailias has quit [Quit: Leaving.]
cakehero has quit [Quit: Computer has gone to sleep.]
mrsolo has quit [Quit: Leaving]
banisterfiend` has quit [Remote host closed the connection]
rcloak has quit [Quit: rcloak]
tds has quit [Quit: tds]
banisterfiend has joined #ruby
robbyoconnor has joined #ruby
LouisGB has quit [Ping timeout: 252 seconds]
yaymukund has left #ruby [#ruby]
IlPorco is now known as O123
rudyl313 has quit [Quit: Page closed]
jgrevich has joined #ruby
linuxsable has quit [Quit: linuxsable]
jgrevich has quit [Client Quit]
kyb3r has joined #ruby
jgrevich has joined #ruby
yshh has quit [Remote host closed the connection]
wpaulson has joined #ruby
awarner has joined #ruby
wpaulson has quit [Client Quit]
insulator has joined #ruby
awarner has quit [Remote host closed the connection]
gtuckerkellogg has quit [Quit: Computer has gone to sleep.]
nateberkopec has quit [Quit: Linkinus - http://linkinus.com]
perryh is now known as perry
karakedi has quit [Read error: Connection reset by peer]
tiripamwe has quit [Ping timeout: 260 seconds]
yshh has joined #ruby
mrdodo has joined #ruby
yshh has quit [Remote host closed the connection]
banisterfiend has quit [Remote host closed the connection]
mrdodo has quit [Remote host closed the connection]
jgrevich has quit [Ping timeout: 248 seconds]
sterex has quit [Quit: sterex]
jso has quit []
Russell^^ has quit [Quit: Russell^^]
eignerchris has quit [Remote host closed the connection]
mwilson` has quit [Excess Flood]
davidcelis has joined #ruby
mwilson` has joined #ruby
sagax has quit [Ping timeout: 245 seconds]
remi has joined #ruby
remi has quit [Changing host]
remi has joined #ruby
koshii has quit [Read error: No route to host]
awarner has joined #ruby
Foxandxss has quit [Quit: KVIrc 4.2.0 Equilibrium http://www.kvirc.net/]
sepp2k has quit [Remote host closed the connection]
iori has joined #ruby
phantasm66 has joined #ruby
yshh has joined #ruby
linuxsable has joined #ruby
awarner has quit [Remote host closed the connection]
moted has joined #ruby
snuglepuss has quit [Remote host closed the connection]
jasonkuhrt has quit [Quit: Leaving...]
chrishunt has quit [Quit: Leaving...]
jasonkuhrt has joined #ruby
jgrevich_ has joined #ruby
yours_truly has joined #ruby
Nisstyre_ has quit [Ping timeout: 264 seconds]
Takehiro has joined #ruby
yours_truly has quit [Read error: Connection reset by peer]
cj3kim has joined #ruby
cj3kim has quit [Changing host]
cj3kim has joined #ruby
mengu has quit [Remote host closed the connection]
deadSnowman has quit [Ping timeout: 244 seconds]
seanyo has joined #ruby
bradhe has quit [Remote host closed the connection]
rsanchez2010 has joined #ruby
rsanchez2010 has quit [Client Quit]
cakehero has joined #ruby
Takehiro has quit [Ping timeout: 246 seconds]
Nisstyre_ has joined #ruby
sterex has joined #ruby
Monie has quit [Ping timeout: 276 seconds]
machty has quit [Ping timeout: 252 seconds]
fermion has quit [Quit: Textual IRC Client: http://www.textualapp.com/]
jasonkuhrt has quit [Quit: Leaving...]
blazes816 has quit [Quit: blazes816]
mc0e has quit [Ping timeout: 240 seconds]
headius has joined #ruby
Monie has joined #ruby
Monie has quit [Changing host]
Monie has joined #ruby
O123 is now known as Pork
banisterfiend has joined #ruby
bricker88 has quit [Quit: Leaving.]
quazimodo has joined #ruby
mascool has quit [Ping timeout: 240 seconds]
mahmoudimus has quit [Quit: Computer has gone to sleep.]
cj3kim has quit [Quit: This computer has gone to sleep]
freeayu has joined #ruby
Hanmac1 has joined #ruby
Hanmac has quit [Ping timeout: 252 seconds]
phantasm66 has quit [Quit: *poof*]
mmitchell has joined #ruby
verto is now known as verto|off
nateberkopec has joined #ruby
karakedi has joined #ruby
mc0e has joined #ruby
headius has quit [Quit: headius]
iori has quit [Remote host closed the connection]
mmitchell has quit [Remote host closed the connection]
tomzx_ has joined #ruby
Moggle has joined #ruby
karakedi has quit [Ping timeout: 246 seconds]
jasonkuhrt has joined #ruby
nari has joined #ruby
zeromodu_ has joined #ruby
freeayu has quit [Read error: Connection reset by peer]
tomzx_ has quit [Ping timeout: 246 seconds]
Pork has quit [Remote host closed the connection]
pingfloyd has joined #ruby
CodeFriar has joined #ruby
mercwith1mouth has joined #ruby
linuxsable has quit [Quit: linuxsable]
horofox has joined #ruby
artOfWar has quit [Remote host closed the connection]
rakl has joined #ruby
justsee has joined #ruby
justsee has quit [Changing host]
justsee has joined #ruby
voodoofish430 has quit [Quit: Leaving.]
banisterfiend` has joined #ruby
banisterfiend has quit [Ping timeout: 240 seconds]
chrishunt has joined #ruby
apok_ has joined #ruby
apok_ has quit [Client Quit]
JustinCampbell has joined #ruby
JustinCampbell has quit [Remote host closed the connection]
apok has quit [Ping timeout: 264 seconds]
freeayu has joined #ruby
jrist is now known as jrist-afk
uris has joined #ruby
robbyoconnor has quit [Ping timeout: 272 seconds]
stuartrexking has joined #ruby
alvaro_o has quit [Quit: Ex-Chat]
Monie has quit [Ping timeout: 244 seconds]
gtuckerkellogg has joined #ruby
bradhe has joined #ruby
BSaboia has quit [Read error: Connection reset by peer]
chrishunt has quit [Quit: Linkinus - http://linkinus.com]
banisterfiend` has quit [Remote host closed the connection]
Takehiro has joined #ruby
remi has quit [Quit: leaving]
seanyo has quit [Ping timeout: 252 seconds]
fyolnish_ has joined #ruby
cableray has joined #ruby
chrishunt has joined #ruby
uris has quit [Read error: Connection reset by peer]
g_rotbart has quit [Read error: Connection reset by peer]
g_rotbart has joined #ruby
Takehiro has quit [Ping timeout: 244 seconds]
awarner has joined #ruby
karakedi has joined #ruby
maletor has quit [Quit: Computer has gone to sleep.]
awarner has quit [Remote host closed the connection]
awarner has joined #ruby
justsee has quit [Quit: Leaving...]
AlbireoX has joined #ruby
radic has quit [Disconnected by services]
radic_ has joined #ruby
radic_ is now known as radic
bradhe has quit [Remote host closed the connection]
artOfWar has joined #ruby
c0rn_ has quit [Quit: Computer has gone to sleep.]
vitor-br has joined #ruby
baroquebobcat has joined #ruby
ryanf has joined #ruby
cableray has quit [Ping timeout: 245 seconds]
savage- has joined #ruby
etank has quit [Ping timeout: 264 seconds]
stephenjudkins has quit [Quit: stephenjudkins]
shadoi has quit [Quit: Leaving.]
justsee has joined #ruby
justsee has quit [Changing host]
justsee has joined #ruby
cableray has joined #ruby
iori has joined #ruby
Vert has quit [Remote host closed the connection]
fearoffish has quit [Quit: ["Textual IRC Client: www.textualapp.com"]]
pu22l3r has quit [Remote host closed the connection]
sterex has quit [Quit: sterex]
Monie has joined #ruby
Monie has quit [Changing host]
Monie has joined #ruby
cableray has quit [Quit: cableray]
xorgnak has joined #ruby
macmartine has joined #ruby
josh^ has quit [Ping timeout: 246 seconds]
<dekz> How do people here do their distributed performance testing against a deployment?
awarner has quit [Remote host closed the connection]
Chryson has quit [Quit: Leaving]
g_rotbart has quit [Read error: Connection reset by peer]
aristidesfl has joined #ruby
cableray has joined #ruby
cableray has quit [Client Quit]
<fowl> dekz: with a lot of phone calls and special favors ;)
g_rotbart has joined #ruby
josh^ has joined #ruby
justinmcp has quit [Remote host closed the connection]
wpaulson has joined #ruby
AlbireoX has quit [Ping timeout: 268 seconds]
JohnDu has joined #ruby
jenrzzz has quit [Ping timeout: 248 seconds]
<dekz> fowl: aww
sonkei has joined #ruby
<dekz> fowl: I'm talking frameworks that go beyond some capistrano script that runs a basic rake task to :hit_server_hard
Bosma has joined #ruby
xorgnak has quit [Ping timeout: 246 seconds]
bradhe has joined #ruby
peregrine81 has joined #ruby
CarlB_the_great has joined #ruby
wpaulson has quit [Quit: Colloquy for iPhone - http://colloquy.mobi]
sonkei has quit [Quit: Computer has gone to sleep.]
CarlB_th_ has joined #ruby
bradhe has quit [Remote host closed the connection]
CarlB_the_great has quit [Ping timeout: 252 seconds]
aristidesfl has quit []
adeponte has joined #ruby
torarne1 has quit [Quit: Leaving.]
Takehiro has joined #ruby
pu22l3r has joined #ruby
savage- has quit [Read error: Connection reset by peer]
savage- has joined #ruby
tds has joined #ruby
bradhe has joined #ruby
cakehero has quit [Quit: Computer has gone to sleep.]
stephenjudkins has joined #ruby
Takehiro has quit [Ping timeout: 268 seconds]
Takehiro has joined #ruby
bradhe has quit [Remote host closed the connection]
gfontenot has joined #ruby
bricker88 has joined #ruby
bricker88 has quit [K-Lined]
minijupe has joined #ruby
awarner has joined #ruby
jenrzzz has joined #ruby
headius has joined #ruby
n_blownapart has joined #ruby
n_blownapart has quit [Remote host closed the connection]
sambio has quit [Quit: Saliendo]
Spooner has quit [Ping timeout: 264 seconds]
CodeFriar has quit [Quit: Leaving...]
CodeFriar has joined #ruby
rakl has quit [Quit: sleeping]
reset has quit [Ping timeout: 245 seconds]
tds has quit [Quit: tds]
awarner has quit [Remote host closed the connection]
rakl has joined #ruby
bradhe has joined #ruby
horofox has quit [Quit: horofox]
tds has joined #ruby
tds has quit [Client Quit]
sonkei has joined #ruby
areil has joined #ruby
fbernier has joined #ruby
jenrzzz has quit [Ping timeout: 276 seconds]
bradhe has quit [Read error: Operation timed out]
mahmoudimus has joined #ruby
CarlB_th_ has quit [Remote host closed the connection]
sonkei has quit [Client Quit]
freeayu has quit [Ping timeout: 246 seconds]
<t0rc> if I want to remove a binary from the path, how would I do it?
<t0rc> it's not a standard entry in the path, so say I'd want to remove nmap from the path and it's located in /usr/local/bin
ananthakumaran has joined #ruby
<t0rc> how could I omit just nmap from being found in the path while everything else in /usr/local/bin is still found?
chimkan_ has joined #ruby
quazimodo has quit [Ping timeout: 245 seconds]
kiler6 has joined #ruby
<kiler6> can it be replaced by 1 line? Why?
<kiler6> client.request :process do
<kiler6> soap.body = { x: 1, y: 1 }
<kiler6> end
<kiler6> this is client is a Savon.client instance
xorgnak has joined #ruby
freeayu has joined #ruby
Progster has joined #ruby
Progster has quit [Excess Flood]
Progster has joined #ruby
Progster has quit [Excess Flood]
Progster has joined #ruby
Progster has quit [Excess Flood]
guns has joined #ruby
Progster has joined #ruby
Progster has quit [Excess Flood]
Progster has joined #ruby
Progster has quit [Excess Flood]
Progster has joined #ruby
Progster has quit [Excess Flood]
Progster has joined #ruby
Progster has quit [Excess Flood]
Progster has joined #ruby
Progster has quit [Excess Flood]
Bosma has quit [Ping timeout: 252 seconds]
Progster has joined #ruby
Progster has quit [Excess Flood]
Progster has joined #ruby
Progster has quit [Excess Flood]
deryl has quit [Quit: deryl]
Progster has joined #ruby
Progster has quit [Excess Flood]
baroquebobcat has quit [Quit: baroquebobcat]
Progster has joined #ruby
Progster has quit [Excess Flood]
hipertracker has joined #ruby
rjsamson has quit [Remote host closed the connection]
Progster has joined #ruby
Progster has quit [Excess Flood]
Progster has joined #ruby
Progster has quit [Excess Flood]
Progster has joined #ruby
Progster has quit [Excess Flood]
jgrevich_ has quit [Quit: jgrevich_]
<Paradox> yolo
Progster has joined #ruby
Progster has quit [Excess Flood]
Guest79876 has quit [Ping timeout: 272 seconds]
Progster has joined #ruby
Progster has quit [Excess Flood]
Progster has joined #ruby
Progster has quit [Excess Flood]
jasonkuhrt has quit [Quit: Leaving...]
Progster has joined #ruby
Progster has quit [Excess Flood]
Progster has joined #ruby
Progster has quit [Excess Flood]
CarlB_the_great has joined #ruby
Guest5516 has joined #ruby
Progster has joined #ruby
Progster has quit [Excess Flood]
Progster has joined #ruby
Progster has quit [Excess Flood]
ZachBeta has quit [Quit: Computer has gone to sleep.]
dmiller has quit [Ping timeout: 260 seconds]
Progster has joined #ruby
Progster has quit [Excess Flood]
Bosma has joined #ruby
Progster has joined #ruby
Progster has quit [Excess Flood]
Progster has joined #ruby
Progster has quit [Excess Flood]
t0rc has quit [Quit: WeeChat 0.3.8]
Progster has joined #ruby
Progster has quit [Excess Flood]
Progster has joined #ruby
Progster has quit [Excess Flood]
Progster has joined #ruby
Progster has quit [Excess Flood]
Progster has joined #ruby
Progster has quit [Excess Flood]
Progster has joined #ruby
Progster has quit [Excess Flood]
dmiller has joined #ruby
Progster has joined #ruby
Progster has quit [Excess Flood]
Progster has joined #ruby
Progster has quit [Excess Flood]
Flugel has joined #ruby
zeromodu_ has quit [Remote host closed the connection]
macmartine has quit [Quit: Computer has gone to sleep.]
SP891 has joined #ruby
Progster has joined #ruby
zeromodulus has joined #ruby
tommyvyo has quit [Quit: Computer has gone to sleep.]
Flugel has left #ruby [#ruby]
xorgnak has quit [Ping timeout: 276 seconds]
igotnolegs has joined #ruby
Flugel has joined #ruby
horofox has joined #ruby
Progster has quit [Client Quit]
Bosma has quit [Ping timeout: 245 seconds]
Flugel has quit [Client Quit]
headius has quit [Quit: headius]
butblack has quit [Quit: butblack]
kiler6 has quit [Remote host closed the connection]
<mdelcx> are the stats on RubyGems.org skewed or something?
<mdelcx> i cant see how my gem has 100+ downloads in 2 days without me promoting it
<GeekOnCoffee> mdelcx: what is your gem?
<GeekOnCoffee> is it a dependency in another project? something that a CI server would be gem installing on every commit, or something like that?
macmartine has joined #ruby
quazimodo has joined #ruby
SP891 has quit [Quit: irc2go]
quazimodo has quit [Remote host closed the connection]
etank has joined #ruby
<bnagy> mdelcx: bots
justinmcp has joined #ruby
Takehiro has quit [Remote host closed the connection]
gfontenot has quit []
Takehiro has joined #ruby
keyvan has quit [Remote host closed the connection]
peregrine81 has quit [Quit: Computer sleeping.]
peregrine81 has joined #ruby
<fowl> >> 1&1
<al2o3cr> (Fixnum) 1
<fowl> >> 1&2
<al2o3cr> (Fixnum) 0
ananthakumaran has quit [Quit: Leaving.]
<fowl> >>(1|2)&2
<al2o3cr> (Fixnum) 2
yasushi has joined #ruby
chendo_ has quit [Ping timeout: 244 seconds]
AlbireoX has joined #ruby
chendo_ has joined #ruby
chendo_ has quit [Changing host]
chendo_ has joined #ruby
peregrine81 has quit [Quit: Computer sleeping.]
c0rn_ has joined #ruby
lolsuper_ has quit [Read error: Connection reset by peer]
lolsuper_ has joined #ruby
lolsuper_ has quit [Changing host]
lolsuper_ has joined #ruby
horofox has quit [Quit: horofox]
chimkan_ has quit [Quit: chimkan_]
peregrine81 has joined #ruby
mahmoudimus has quit [Quit: Computer has gone to sleep.]
Takehiro has quit [Remote host closed the connection]
Takehiro has joined #ruby
Takehiro has quit [Remote host closed the connection]
rohit has joined #ruby
Takehiro has joined #ruby
arietis has joined #ruby
CarlB_the_great has quit [Remote host closed the connection]
dmiller has quit [Ping timeout: 240 seconds]
jorge_ has quit [Remote host closed the connection]
Guest5516 has quit [Quit: Guest5516]
tonini has joined #ruby
macmartine has quit [Read error: Connection reset by peer]
noyb has joined #ruby
justsee has quit [Quit: Leaving...]
peregrine81 has quit [Quit: Computer sleeping.]
rohit has quit [Ping timeout: 248 seconds]
<mdelcx> GeekOnCoffee: swift_file
<mdelcx> bnagy: that's what i thought
justsee has joined #ruby
justsee has quit [Changing host]
justsee has joined #ruby
iamjarvo has quit [Ping timeout: 244 seconds]
ryanf has quit [Read error: Connection reset by peer]
mahmoudimus has joined #ruby
ryanf has joined #ruby
mahmoudi_ has joined #ruby
yasushi has quit [Remote host closed the connection]
mahmoudimus has quit [Ping timeout: 244 seconds]
beneggett has joined #ruby
ryanf has quit [Read error: Connection reset by peer]
ryanf has joined #ruby
maletor has joined #ruby
blessYAHU has quit [Ping timeout: 245 seconds]
rohit has joined #ruby
pu22l3r has quit [Remote host closed the connection]
kyb3r has quit []
burgestrand has joined #ruby
karakedi has quit [Ping timeout: 240 seconds]
Z_Mass has joined #ruby
keyvan has joined #ruby
keyvan has quit [Changing host]
keyvan has joined #ruby
sonkei has joined #ruby
rohit has quit [Quit: Leaving]
bradhe has joined #ruby
justsee has quit [Quit: Leaving...]
yxhuvud has joined #ruby
maxmmurphy has joined #ruby
g33k has joined #ruby
fbernier has quit [Read error: Connection reset by peer]
linuxsable has joined #ruby
arkiver has joined #ruby
justsee has joined #ruby
justsee has quit [Changing host]
justsee has joined #ruby
bradhe has quit [Ping timeout: 255 seconds]
adeponte has quit [Remote host closed the connection]
adeponte has joined #ruby
adeponte has quit [Ping timeout: 248 seconds]
banisterfiend has joined #ruby
g33k has quit [Quit: Leaving]
arkiver has quit [Quit: Leaving]
gtuckerkellogg has quit [Quit: Computer has gone to sleep.]
maxmmurphy has quit [Quit: maxmmurphy]
jgrevich has joined #ruby
ananthakumaran has joined #ruby
ryanf has quit [Ping timeout: 245 seconds]
karstensrage has joined #ruby
<karstensrage> ruby newbie, what does "run the server" mean?
<burgestrand> karstensrage: different things in different contexts. What application are you trying to run?
<karstensrage> that
<burgestrand> karstensrage: have you ever used rails before?
minijupe has quit [Quit: minijupe]
<karstensrage> no :(
<burgestrand> karstensrage: here’s their starter guide, specifically the section on starting the server: http://guides.rubyonrails.org/getting_started.html#starting-up-the-web-server
<burgestrand> karstensrage: the repository you have there is how an example application using devise could look like, but most likely not something to continue building from
digitalcakestudi has quit [Ping timeout: 246 seconds]
<karstensrage> not something? or something to continue building from?
<burgestrand> karstensrage: not something to continue building from, but rather something to look at to see of how you could use devise
<burgestrand> karstensrage: kind of like a blueprint
<karstensrage> ok i see
<burgestrand> karstensrage: for example, it is using a slightly older version of rails than you should use when starting a new application, especially if you are new to rails in general, since the current guide material for rails is for newer versions
<karstensrage> rails is like the framework, right?
<burgestrand> it’s not *really* old, but slightly out of date :)
g33k has joined #ruby
<karstensrage> it says i have ruby 1.8.7 and WEBrick 1.3.1
<karstensrage> oh
<burgestrand> karstensrage: yes, rails kind of enforces a structure on how you should write your code, and where you should put your code, in order to help you build web applications faster and in a good way
<karstensrage> and Rails 3.0.10
guns has quit [Ping timeout: 244 seconds]
<burgestrand> karstensrage: yes :) that is because of the file named Gemfile in that repository, it tells your application which gems (libraries) and versions you should use when running the application
zz_fbernier has joined #ruby
<karstensrage> oh i see yes
<karstensrage> and 3.0.10 is old?
<burgestrand> karstensrage: together with the Gemfile.lock file, it is the single authorative documentation of what versions that application can use
<burgestrand> karstensrage: yes, not very old, but we have version 3.2 now, which is the most recent one
zz_fbernier is now known as fbernier
<karstensrage> gotcha
<burgestrand> karstensrage: new releases often come with new features, and many guides may use some of these new features, which means that if you follow a new guide with an old version, you might get confused
guns has joined #ruby
arkiver has joined #ruby
guns is now known as Guest32664
Guest32664 has quit [Client Quit]
<burgestrand> karstensrage: are you new to both ruby and rails?
Guedes has quit [Ping timeout: 246 seconds]
<karstensrage> yes
<burgestrand> welcome :)
fbernier is now known as zz_fbernier
<karstensrage> my goal is write a devise plugin for my service
<karstensrage> thank you
<burgestrand> karstensrage: you know other languages before ruby?
<karstensrage> yup
<karstensrage> mostly java, php, some python and i cut my teeth on symbolics lisp and C programming
<burgestrand> sounds like a good arsenal, ruby has many similarities to python, more so than the other languages you know from earlier, but has a very different culture and structure in it’s applications
answer_42 has joined #ruby
<karstensrage> would you recommend a good intro from my background to introduce me to the culture and structure aspects?
<karstensrage> i found the lacking in python
<karstensrage> just big api docs
lolsuper_ has quit [Read error: Connection reset by peer]
<karstensrage> and focus on sugar as if the intro to lisp was by showing you 'loop'
<burgestrand> culture is probably best received from idling in this channel and possibly even #ruby-lang, it comes with time and is hard to read to
_veer has joined #ruby
_veer has quit [Changing host]
_veer has joined #ruby
<bnagy> yeah ganesh help us all if this chan is the exemplar for 'culture' ;)
<burgestrand> I have a note I regularly give to new people of ruby, trying to find the link
<burgestrand> our culture is vast :p
AlbireoX has quit [Read error: Connection reset by peer]
AlbireoX has joined #ruby
<bnagy> ... I had to try SO hard to avoid a mom joke there
<burgestrand> karstensrage: http://simp.ly/publish/ymW6Jk
<burgestrand> the list of blogs is kind of outdated, I should move that to the bottom
jastix has joined #ruby
mc0e has quit [Ping timeout: 246 seconds]
justinmcp has quit [Remote host closed the connection]
<burgestrand> karstensrage: apart from that document, it’s all about how you learn best, some people read books, some people watch videos, some people follow online tutorials, and some people just wing it
matrixise has quit [Ping timeout: 272 seconds]
fantazo has quit [Remote host closed the connection]
ryanf has joined #ruby
mohits has joined #ruby
mohits has quit [Changing host]
mohits has joined #ruby
Kneferilis has joined #ruby
williamherry has joined #ruby
arturaz has joined #ruby
mahmoudi_ has quit [Quit: Computer has gone to sleep.]
RubyPanther has quit [Ping timeout: 240 seconds]
thaz has joined #ruby
robbyoconnor has joined #ruby
luckyruby has joined #ruby
ryanf has quit [Ping timeout: 244 seconds]
abrausch has joined #ruby
r0bby has joined #ruby
tagrudev has joined #ruby
ph^ has joined #ruby
mascool has joined #ruby
r0bby has quit [Read error: Connection reset by peer]
robbyoconnor has quit [Read error: Connection reset by peer]
r0bby has joined #ruby
maesbn has joined #ruby
daniel_hinojosa has quit [Ping timeout: 276 seconds]
gtuckerkellogg has joined #ruby
bhavesh_a_p has joined #ruby
bradhe has joined #ruby
und3f has joined #ruby
mercwith1mouth has quit [Ping timeout: 240 seconds]
burgestrand has quit [Quit: Leaving.]
<bhavesh_a_p> hello
bradhe has quit [Ping timeout: 276 seconds]
bradhe has joined #ruby
bhavesh_a_p has quit [Quit: Leaving]
yxhuvud has quit [Ping timeout: 255 seconds]
jprovazn_away is now known as jprovazn
kyb3r has joined #ruby
heisenmink has joined #ruby
Z_Mass has quit [Quit: Leaving]
linuxsable has quit [Ping timeout: 248 seconds]
sonkei has quit [Quit: Computer has gone to sleep.]
Takehiro has quit [Remote host closed the connection]
s1n4 has joined #ruby
bradhe has quit [Remote host closed the connection]
bradhe has joined #ruby
ryanf has joined #ruby
Y_Ichiro has quit [Read error: Connection reset by peer]
cantonic has joined #ruby
yshh has quit [Quit: Leaving...]
bradhe has quit [Ping timeout: 248 seconds]
kjellski has joined #ruby
heisenmink has quit [Remote host closed the connection]
hipertracker has quit [Quit: hipertracker]
linuxsable has joined #ruby
ph^ has quit [Remote host closed the connection]
Mister5 has joined #ruby
nilg has joined #ruby
igotnolegs has quit [Ping timeout: 268 seconds]
luckyruby has quit [Remote host closed the connection]
zeromodulus has quit [Ping timeout: 268 seconds]
LouisGB has joined #ruby
savage- has quit [Remote host closed the connection]
cantonic has quit [Quit: cantonic]
Mister5 has quit [Quit: Leaving]
williamherry has quit [Quit: WeeChat 0.3.7]
noyb has quit [Ping timeout: 255 seconds]
aarwine has quit [Remote host closed the connection]
Mister5 has joined #ruby
triptec has joined #ruby
christor has joined #ruby
christor is now known as alphoro
<alphoro> Hi, is there a simple way to convert char to hex? ex: "abc" to \x61\x62\x63 ?
qwerxy has joined #ruby
justinmcp has joined #ruby
lolmaus has joined #ruby
JJMalina has joined #ruby
<bnagy> well if you enter "\x61" you'll just get 'a'
<fowl> >> "a" == "\x61"
<al2o3cr> (TrueClass) true
<bnagy> you can convert to hex a few ways, depending on what you want the output to look like
<fowl> >> "abc".each_char.map { |c| c.ord.to_s 16 }
<al2o3cr> (Array) ["61", "62", "63"]
<alphoro> I have a chain of character like "regverbgtr" to convert in the format \x72\x....
<bnagy> I usually do str.bytes.map {|b| "0x%.2x" % b}
nateberkopec has quit [Ping timeout: 252 seconds]
mascool has quit [Ping timeout: 240 seconds]
<bnagy> >> "foo".bytes.map {|b| "\\x%.2x" % b}.join
<al2o3cr> (String) "\\x66\\x6f\\x6f"
KevinSjoberg has joined #ruby
<fowl> alphoro: r and \x72 are the same character
<bnagy> those \\ are only one \ in real life
<alphoro> fowl: yess I want to convert char to hex so it is the same
<fowl> alphoro: it _is_ the same
dhruvasagar has joined #ruby
<fowl> >> "\x61\x62\x63" === "abc"
<al2o3cr> (TrueClass) true
<alphoro> I have a string like "azereazrfezat" and I want to get a chain like "\x61\x......"
<bnagy> "foo" is 3 bytes "\x66\x6f\x6f" is 3 bytes
Takehiro has joined #ruby
<bnagy> "\\x66\\x6f\\x6f" is 12 bytes
stepnem has joined #ruby
<fowl> alphoro: are you thick?
<alphoro> fowl: no , just try to understand how to get my result :)
<alphoro> I need to use Zlib::Inflate.inflate(compressed) ( where compressed is \x... and I cannot put directly the string)
<fowl> alphoro: then why arent you reading what the people who are trying to help you are saying
matrixise has joined #ruby
<bnagy> alphoro: ok, you need to explain exactly what you want, because if you want a string representation of the hex values, that will not be the same
Mister5 has quit [Quit: Leaving]
Takehiro has quit [Ping timeout: 240 seconds]
<bnagy> as far as ruby is concerned 'A' and 0x41 and 65 are all exactly the same thing
<bnagy> it's just a byte
luckyruby has joined #ruby
Mister5 has joined #ruby
<bnagy> if you want to display a backslash, an x and a 4 and a 1, that's gonna be 4 bytes
ph^ has joined #ruby
Mister5 has quit [Max SendQ exceeded]
zz_fbernier has quit [Read error: Connection reset by peer]
Mister5 has joined #ruby
<alphoro> bnagy: I know that , I need to use Zlib to uncompress data. Currently my data are in the format "aaa" and I need to convert aaa in \x61\x61\x61. Zlib::Inflate.inflate(aaa) does not work, I need to set Zlib::Inflate.inflate(\x61\x61\x61)
<fowl> what i do when working with bytes, (just to display them!) something like str.bytes.map {|b| b.to_s(16)}.join' '
<bnagy> alphoro: you're mistaken
<bnagy> I odn't know what you're problem is, but that's not it
<bnagy> *your
<bnagy> frickin finger memory
aganov has joined #ruby
<fowl> the problem is that is not a valid header
<fowl> >> require'zlib'; Zlib.deflate('abc')
<al2o3cr> (String) "x\x9CKLJ\x06\x00\x02M\x01'"
<bnagy> well we assume he's not actually trying to inflate 'aaa' :P
<fowl> see how it comes out with with characters like x, K, L, J
<fowl> even '
<fowl> >> require'zlib'; Zlib.inflate Zlib.deflate('abc')
<al2o3cr> (String) "abc"
r0bby has quit [Read error: Connection reset by peer]
r0bby has joined #ruby
charliesome has joined #ruby
zommi has joined #ruby
JohnBat26 has joined #ruby
pefavre has joined #ruby
JJMalina has quit [Quit: Linkinus - http://linkinus.com]
khakimov has quit [Quit: Computer has gone to sleep.]
heisenmink has joined #ruby
<alphoro> fowl: you right the header are not valid
<fowl> alphoro: i can't help you because you arent reading. how do you expect to get anything from a text-based chat if you wont read?
<suborbital> sooo
<bnagy> to be honest, I don't really trust Zlib, had it break on some valid stuff before
<bnagy> you should test shelling out to gunzip
<alphoro> fowl: I m reading , just not understanding your point of view may be due to my lack of knowledge on ruby
<alphoro> the exercice is to decrypt a chain coded in base64 and encrypted with zlib. Here the chain : eJyr9A8uyIjKrPCKSgvIBgAjFQT0
Mister5 has quit [Read error: Connection reset by peer]
Takehiro has joined #ruby
specialGuest has joined #ruby
<bnagy> zlib is not encryption
<alphoro> sorry compressed
frogprince_mac has joined #ruby
igotnolegs has joined #ruby
Morkel has joined #ruby
Mister5 has joined #ruby
<bnagy> what's it supposed to end up as?
<bnagy> cause it looks like ascii junk to me
<Mon_Ouie> I get yOSphZixJZfPk if I try Base64.decode + Zlib.inflate
jgrevich has quit [Quit: jgrevich]
<bnagy> Mon_Ouie: I was trying not to do people's homework for them :/
<Mon_Ouie> Oh, sorry :p
<alphoro> bnagy: of course , don t worry I have a timing to send the answer and it change everytime
_bart has quit [Quit: _bart]
<alphoro> bnagy: this is why I need to script it because I have 2 sec to send the answer
<banisterfiend> Mon_Ouie: 'alut
<bnagy> well if that ascii junk is correct, then job done
<Mon_Ouie> 'alut
saschagehlich has joined #ruby
<alphoro> Oh I got it :)
<alphoro> ok my apologies, I thought in the inflate we need only hex value but it s working with char as well.
thone_ has joined #ruby
<bnagy> siiigh
<alphoro> :p
<bnagy> alphoro: there IS NO DIFFERENCE
<Mon_Ouie> hex values don't exist, they're just a different way of representing integers (or characters in this case)
<alphoro> yes ok I will know it
<fowl> bnagy: lets go to an irc channel and ask for help but not read what people say
wobr has joined #ruby
<fowl> bnagy: u and me, it can be our first date ;)
eldariof has joined #ruby
<alphoro> I agree with that but a module can be done in a way to wait string like "\x" to force the hexa no?
<bnagy> alphoro: NO
<bnagy> because ther IS NO DIFFERENCE
thone has quit [Ping timeout: 240 seconds]
<bnagy> internally they are exactly the same
keymone has joined #ruby
rakl has quit [Quit: sleeping]
rakunHo has joined #ruby
Mister5 has quit [Quit: Leaving]
pskosinski has joined #ruby
<Mon_Ouie> "a" == "\x61" #=> true
pefavre has quit [Remote host closed the connection]
luckyruby has quit [Remote host closed the connection]
AxonetBE has joined #ruby
beneggett has quit [Quit: Computer has gone to sleep.]
linuxsable has quit [Quit: linuxsable]
<AxonetBE> I have a mysql process that stays sleeping and it is linked to a Rack process .How can I see what this rack process is doing?
chimay has joined #ruby
chimay has quit [Changing host]
chimay has joined #ruby
qwerxy has quit [Quit: offski]
jimeh4 has joined #ruby
jimeh4 has quit [Read error: Connection reset by peer]
statarb3 has joined #ruby
statarb3 has quit [Changing host]
statarb3 has joined #ruby
savage- has joined #ruby
croz has quit [Read error: Connection reset by peer]
croz has joined #ruby
jimeh4 has joined #ruby
ryanf has quit [Ping timeout: 246 seconds]
jsmonkey has joined #ruby
<jsmonkey> hi, If I have a variabel called x and lets say I want to set it to y but only if y is not nil if not I want to run a reduce function on an array. Of course I can check this with a simple if condition but if I remember correctly (was some time ago I used ruby) there should be like x = y || do.. something something that returns the reduce. anyone catch what I am after?
goodieboy has joined #ruby
saschagehlich has quit [Quit: saschagehlich]
c0rn_ has quit []
banisterfiend has quit [Remote host closed the connection]
<Hanmac1> jsmonkey what do you want to reduce within your array? an sum or an product?
Hanmac1 is now known as Hanmac
<jsmonkey> Hanmac: that is some default business data stuffy thingy-ingy. can I just do like x = y || my_bla.reduce({}).... ?
vectorshelve has joined #ruby
<bnagy> you can, but it looks horrible
Criztian has joined #ruby
<jsmonkey> bnagy: how then? can I do like this? x = y || do (new line and there have my reduce stuff and then end the block?
abrausch has quit [Ping timeout: 246 seconds]
<bnagy> just use an if statement
<jsmonkey> is that really that much nicear?
<bnagy> unless your reduce is ultra short, but I still don't like it cause what does y have to do with some_other_thing.reduce...
abrausch has joined #ruby
<jsmonkey> bnagy: it is kinda short but for learning purposes. what other way can I solve it with ruby?
<jsmonkey> preferebly in some block way
PapaSierra has joined #ruby
PapaSierra has left #ruby [#ruby]
<bnagy> I don't know what you're trying to do - it's hard to refactor simplified examples with fake variable names
<jsmonkey> bnagy: I hear you
Criztian has quit [Ping timeout: 245 seconds]
djdb has joined #ruby
igotnolegs has quit [Quit: Computer has gone to sleep.]
nilg has quit [Remote host closed the connection]
Criztian has joined #ruby
haxrbyte has joined #ruby
haxrbyte has quit [Remote host closed the connection]
haxrbyte has joined #ruby
Rochefort has joined #ruby
<Mon_Ouie> Also, when you do reduce({}), it's likely you will be mutating the hash instead of changing the accumulator
<Mon_Ouie> So you might as well use #each_with_object
workmad3 has joined #ruby
adambeynon has joined #ruby
M- has quit [Quit: This computer has gone to sleep]
<jsmonkey> Mon_Ouie: what do you mean? if I pass in an empty hash to reduce that is exactly what I want to mutate, not the accumlated values
<jsmonkey> what am I missing?
xorigin has joined #ruby
elaptics`away is now known as elaptics
Criztian has quit [Ping timeout: 240 seconds]
nilg has joined #ruby
artOfWar has quit [Remote host closed the connection]
<Mon_Ouie> reduce is not when you want to mutate a specific object, it's when you want to return a new accumulator after each iteration
<Mon_Ouie> e.g. inject { |acc, e| acc + e }
beneggett has joined #ruby
<Mon_Ouie> It looks awkward when you use it for mutating: inject({}) { |h, e| h[e] = stuff; h }
savage- has quit [Remote host closed the connection]
stuartrexking has quit [Quit: Linkinus - http://linkinus.com]
<matti> Hi Mon_Ouie
<Mon_Ouie> 'alut matti
<jsmonkey> Mon_Ouie: hm okey you are probaly correct but I have used reduce many times to mutate a sent in start value like an empty hash or something else
<jsmonkey> but I get your point
hipertracker has joined #ruby
Kabaka has quit [Quit: Rebooting for kernel upgrade]
Vert has joined #ruby
Jrz has joined #ruby
bradhe has joined #ruby
kjellski has quit [Remote host closed the connection]
<bnagy> in 1.8 you had no option, since each_with_object you can (and should) stop abusing poor inject :)
Kabaka has joined #ruby
Kabaka has quit [Excess Flood]
Kabaka has joined #ruby
justsee has quit [Quit: Leaving...]
kjellski has joined #ruby
baphled has joined #ruby
bradhe has quit [Ping timeout: 240 seconds]
cezar has joined #ruby
ephemerian has joined #ruby
cezar has quit [Client Quit]
frogprince_mac has quit [Quit: Leaving...]
BiHi has joined #ruby
manouche has quit [Remote host closed the connection]
jayne has quit [Quit: shutting down]
jayne has joined #ruby
alphoro has quit [Quit: leaving]
dhruvasagar has quit [Ping timeout: 240 seconds]
diegoviola has quit [Ping timeout: 246 seconds]
goodieboy has quit [Remote host closed the connection]
dhruvasagar has joined #ruby
Ev3r10sT has joined #ruby
<Ev3r10sT> hey there
qwerxy has joined #ruby
<Ev3r10sT> I'm trying to translate a ruby script to another langage. It's ok until now... Can someone tell me what that does :
<Ev3r10sT> Digest::MD5.hexdigest(data[9 .. 28])
<Ev3r10sT> ?
maletor has quit [Quit: Computer has gone to sleep.]
mneorr has joined #ruby
techsurvivor has quit [Quit: WeeChat 0.3.8]
<lupine_85> Ev3r10sT, calculates an md5sum of a subset of the contents of the data string
mklappstuhl has joined #ruby
arietis has quit [Quit: Computer has gone to sleep.]
sdwrage has quit [Quit: geekli.st/programmer]
<Ev3r10sT> oh ok! thanks lupine_85
Banistergalaxy has joined #ruby
gtuckerkellogg has quit [Quit: Computer has gone to sleep.]
JohnDu has quit [Quit: HydraIRC -> http://www.hydrairc.com <- Chicks dig it]
Criztian has joined #ruby
pingfloyd has quit [Quit: pingfloyd]
jwbuurlage has joined #ruby
sagax has joined #ruby
saschagehlich has joined #ruby
g33k has quit [Quit: Leaving]
arkiver has quit [Quit: Leaving]
morsik has joined #ruby
<morsik> hi
<morsik> i'm trying to update gitlab to latest version and it needs capybara-webkit. well... the problem is that i can't install it for unknown reason: http://pastebin.com/Srpf9wzx
<helpa> Hi morsik. We in #rubyonrails would really appreciate it if you did not use pastebin during your time with us.
<helpa> Pastebin is not good because it loads slowly for most, has ads which are distracting and has terrible formatting. Please use Gist (http://gist.github.com) or Pastie (http://pastie.org) instead. Thanks!
tonini has quit [Remote host closed the connection]
Criztian has quit [Read error: Connection reset by peer]
<morsik> i read in capbara-webkit docs that i need Qt, but it even don't try to run configure or anything like that...
Criztian_ has joined #ruby
robotmay has joined #ruby
<bnagy> helpa: you're not in #rubyonrails
lampe2 has joined #ruby
<morsik> bnagy: it's bot... ;D
<bnagy> well get it the frack out then
hoelzro|away is now known as hoelzro
AxonetBE has left #ruby [#ruby]
saschagehlich has quit [Ping timeout: 268 seconds]
<hoelzro> hi guys; does anyone know of a good library for manipulating SSH keys? (namely, checking if a password is the right one for a key)
<bnagy> morsik: read the log it tells you to read (or pastie it)
<morsik> bnagy: this is log! i pasted it. gen_make.out contains only "/home/git/ruby/bin/ruby extconf.rb"
<morsik> and nothing else
<bnagy> try just gem install capybara-webkit
<bnagy> do you have dev tools installed?
<bnagy> that accounts for about 90% of those failures
<morsik> dev tools for ruby?
<bnagy> no for your os
wallerdev has quit [Quit: wallerdev]
<morsik> i have ruby 1.9.1 compiled by myself
specialGuest has quit [Ping timeout: 244 seconds]
kyb3r has quit []
<morsik> bnagy: well... i think yes. i have installed native nokogiri
<bnagy> well I'd just work on getting capybara-webkit installed by itself
<bnagy> it will definitely need qt libs
<morsik> i installed qt-devel (centos 6.3)
<bnagy> HAHAHAH CENTOS
<morsik> but it doesn't try to run some configure or anything like that...
<morsik> it doesn't show any error or etf
<morsik> wtf
<morsik> bnagy: ? :D
<bnagy> worst. linux. evar.
<morsik> nope.
<morsik> the same.
<bnagy> anyway, I've installed capybara-webkit following rhe instructions on the github page on osx and proper linux
hoelzro is now known as hoelzro|away
<bnagy> and home/git/ruby/lib/ruby/gems/1.9.1/gems/capybara-webkit-0.12.1/./gem_make.out is just that one line?
<morsik> yes
<morsik> there ↑ is something more... it try to run at least qmake.
specialGuest has joined #ruby
<morsik> for me, qmake is even not started
<morsik> i don't see any "Command not found" or something like that
<bnagy> try to run that command manually then
<bnagy> /home/git/ruby/bin/ruby extconf.rb
<bnagy> from the right dir, obviously
<morsik> oh well
<morsik> ln -s /usr/bin/qmake-qt4 /usr/bin/qmake
<morsik> and i got something
<morsik> who the fuck hide "command not found" error?!
statarb3 has quit [Quit: Leaving]
lampe2 has quit [Quit: Verlassend]
<morsik> Successfully installed capybara-webkit-0.12.1
<morsik> 1 gem installed
<morsik> bnagy: thanks for help...
<morsik> someone should fix bundler/whatever to show stupid errors like that
<bnagy> :>
<Muz> Was the error not in the gem_make.out log?
<bnagy> allegedly not
<morsik> Muz: gen_make.out contained: "/home/git/ruby/bin/ruby extconf.rb"
<morsik> that's all
mneorr has quit [Quit: Leaving.]
Morkel_ has joined #ruby
Virunga has joined #ruby
SeySayux_ has joined #ruby
fyolnish_ has quit [Remote host closed the connection]
lump has joined #ruby
<shevy> <morsik> someone should fix bundler/whatever to show stupid errors like that
SeySayux has quit [Ping timeout: 240 seconds]
Morkel has quit [Ping timeout: 240 seconds]
jmeeuwen has joined #ruby
jmeeuwen has quit [Read error: Connection reset by peer]
SeySayux_ is now known as SeySayux
froy has quit [Ping timeout: 240 seconds]
Morkel_ is now known as Morkel
<shevy> ^^^ bundler will always suck :)
bradhe has joined #ruby
jenrzzz has joined #ruby
specialGuest has quit [Ping timeout: 244 seconds]
alistar has quit [Read error: Connection reset by peer]
Ev3r10sT has quit [Quit: leaving]
mneorr has joined #ruby
enyo has joined #ruby
bradhe has quit [Ping timeout: 246 seconds]
Afal has joined #ruby
Afal has left #ruby [#ruby]
savage- has joined #ruby
_bart has joined #ruby
chimay has quit [Ping timeout: 246 seconds]
kjellski has quit [Ping timeout: 252 seconds]
dhruvasagar has quit [Remote host closed the connection]
savage- has quit [Ping timeout: 246 seconds]
banisterfiend has joined #ruby
cascalheira has joined #ruby
Rochefort has quit [Remote host closed the connection]
mr_dynamix has joined #ruby
kjellski has joined #ruby
cascalheira has quit [Quit: Linkinus - http://linkinus.com]
SeySayux has quit [Remote host closed the connection]
Jrz has quit [Quit: Textual IRC Client: http://www.textualapp.com/]
resure has joined #ruby
jastix has quit [Quit: Leaving]
insulator has quit [Ping timeout: 276 seconds]
Kabaka has quit [Quit: Tinkering with my kernel. Be back soon (hopefully).]
SeySayux has joined #ruby
specialGuest has joined #ruby
jwbuurlage has left #ruby [#ruby]
krz has quit [Quit: krz]
torarne1 has joined #ruby
Kabaka has joined #ruby
Kabaka has quit [Excess Flood]
Banistergalaxy has quit [Ping timeout: 246 seconds]
statarb3 has joined #ruby
statarb3 has quit [Changing host]
statarb3 has joined #ruby
Kabaka has joined #ruby
dhruvasagar has joined #ruby
wez has joined #ruby
iori has quit [Remote host closed the connection]
torarne1 has quit [Quit: Leaving.]
mneorr has quit [Quit: Leaving.]
cascalheira has joined #ruby
slainer68 has joined #ruby
<slainer68> hi
x0F has quit [Disconnected by services]
x0F_ has joined #ruby
morsik has left #ruby [#ruby]
x0F_ is now known as x0F
Xeago has joined #ruby
<slainer68> i've got 2 arrays : a & b. how can i test if array b is equal or is at least a subarray of array a (== test if array b is equal to array a or contains at least all the elements of array a). thanks.
<Xeago> slainer68: look at methods provided in Array and enumerable
<slainer68> Xeago: yes i've just looked at the rdoc.
burgestrand has joined #ruby
<Xeago> if nothing's there, b.all { |element| a.contains element } however that performs horrible
KevinSjoberg has quit [Quit: Computer has gone to sleep.]
sepp2k has joined #ruby
Takehiro has quit [Read error: Connection reset by peer]
saschagehlich has joined #ruby
Takehiro_ has joined #ruby
triptec has quit [Ping timeout: 244 seconds]
wez has quit [Quit: Colloquy for iPhone - http://colloquy.mobi]
Criztian_ has quit [Read error: Connection reset by peer]
<slainer68> Xeago: ok. my answer was just a - b == []
elico has quit [Ping timeout: 264 seconds]
<fowl> slainer68: thats just a weird test for equality, it doesnt cover all the cases you described
Virunga has quit [Remote host closed the connection]
<fowl> b - a would be more accurate
<slainer68> fowl: what cases are not covered ?
<Xeago> if a has more elements than b
matti has quit [Ping timeout: 252 seconds]
<fowl> if array b is equal or is at least a subarray of array a
<fowl> >> a, b = [1,2,3,4], [1,2,3]; b - a
<al2o3cr> (Array) []
<fowl> >> a, b = [1,2,3,4], [1,2,3]; a - b
<al2o3cr> (Array) [4]
triptec has joined #ruby
<Xeago> and you should just call .empty?
<Xeago> instead of compare to []
tomask has joined #ruby
tomask has quit [Changing host]
tomask has joined #ruby
gogiel has joined #ruby
nari has quit [Ping timeout: 245 seconds]
<slainer68> thanks Xeago and fowl
specialGuest has quit [Quit: WeeChat 0.3.8]
suborbital is now known as ferocity
Rochefort has joined #ruby
bluenemo has joined #ruby
bluenemo has quit [Changing host]
bluenemo has joined #ruby
fermion has joined #ruby
carl_ has joined #ruby
ferocity is now known as suborbital
_bart has quit [Read error: Connection reset by peer]
deryl has joined #ruby
mohits has quit [Ping timeout: 245 seconds]
vlad_starkov has joined #ruby
Guedes_out is now known as Guedes
mohits has joined #ruby
mohits has joined #ruby
mohits has quit [Changing host]
burgestrand has quit [Quit: Leaving.]
burgestrand has joined #ruby
_bart has joined #ruby
jenrzzz has quit [Ping timeout: 244 seconds]
carl_ has quit [Quit: Linkinus - http://linkinus.com]
Takehiro_ has quit [Remote host closed the connection]
jasonkuhrt has joined #ruby
burgestrand has quit [Quit: Leaving.]
Rochefort has quit [Read error: Connection reset by peer]
Rochefortes has joined #ruby
BiHi has quit [Quit: Computer has gone to sleep]
hoelzro|away is now known as hoelzro
lkba has joined #ruby
mneorr has joined #ruby
robotmay has quit [Read error: Connection reset by peer]
robotmay has joined #ruby
Takehiro has joined #ruby
Banistergalaxy has joined #ruby
znake has joined #ruby
Rochefort has joined #ruby
jasonkuhrt has quit [Quit: Leaving...]
Rochefortes has quit [Ping timeout: 246 seconds]
mneorr has quit [Quit: Leaving.]
Rochefortes has joined #ruby
Squarepy has joined #ruby
Squarepy has quit [Changing host]
Squarepy has joined #ruby
znake has quit [Ping timeout: 268 seconds]
Squarepy has quit [Read error: Connection reset by peer]
Squarepy has joined #ruby
Rochefort has quit [Ping timeout: 246 seconds]
Squarepy_ has joined #ruby
Virunga has joined #ruby
und3f has quit [Quit: Leaving.]
Squarepy has quit [Read error: Connection reset by peer]
Squarepy__ has joined #ruby
bradhe has joined #ruby
Squarepy__ has quit [Client Quit]
Squarepy has joined #ruby
Squarepy has quit [Changing host]
Squarepy has joined #ruby
beneggett has quit [Quit: Computer has gone to sleep.]
Gesh has quit [Remote host closed the connection]
Squarepy__ has joined #ruby
Squarepy_ has quit [Ping timeout: 260 seconds]
Squarepy has quit [Read error: Connection reset by peer]
Guedes has quit [Quit: Saindo]
Squarepy_ has joined #ruby
Guedes has joined #ruby
Guedes has quit [Changing host]
Guedes has joined #ruby
Beoran_ has joined #ruby
Gesh has joined #ruby
bradhe has quit [Ping timeout: 244 seconds]
KevinSjoberg has joined #ruby
Squarepy_ has quit [Changing host]
Squarepy_ has joined #ruby
zz_fbernier has joined #ruby
Squarepy_ is now known as Squarepy
zigomir has quit [Quit: Leaving]
Beoran__ has quit [Ping timeout: 246 seconds]
Squarepy__ has quit [Ping timeout: 276 seconds]
chimay has joined #ruby
chimay has quit [Changing host]
chimay has joined #ruby
yshh has joined #ruby
ph^_ has joined #ruby
tomask has quit [Quit: Quit]
Squarepy has quit [Read error: Connection reset by peer]
lupine_85 has quit [Excess Flood]
thunderstrike has joined #ruby
Squarepy has joined #ruby
vlad_starkov has quit [Remote host closed the connection]
Squarepy_ has joined #ruby
Squarepy has quit [Read error: Connection reset by peer]
ph^ has quit [Ping timeout: 246 seconds]
mengu has joined #ruby
lupine_85 has joined #ruby
vlad_starkov has joined #ruby
Squarepy_ has quit [Ping timeout: 252 seconds]
awarner has joined #ruby
zz_fbernier is now known as fbernier
lupine_85 has quit [Changing host]
lupine_85 has joined #ruby
matrixise has quit [Ping timeout: 268 seconds]
matrixise has joined #ruby
ZachBeta has joined #ruby
chendo_ has quit [Ping timeout: 255 seconds]
chendo_ has joined #ruby
awarner has quit [Remote host closed the connection]
<hahaha> What's this? def save(*); end;?
<JonnieCache> is that even valid?
<JonnieCache> >> def save(*); puts "lol"; end; save
<al2o3cr> (NilClass) nil, Console: lol
<JonnieCache> hmm ive never seen that before
hoelzro is now known as hoelzro|away
ZachBeta has quit [Client Quit]
<JonnieCache> >> def save(*); puts "lol"; end; save(1, 2, 3)
<al2o3cr> (NilClass) nil, Console: lol
<bnagy> slainer68: use Sets
<JonnieCache> i guess you can just pass in anything
<hahaha> ah
<hahaha> That makes sense.
<JonnieCache> pretty useless
<JonnieCache> youre meant to do this:
<hahaha> I'm seeing it in activerecord's code.
<JonnieCache> >> def save(*foo); puts foo.to_s; end; save(1, 2, 3)
<al2o3cr> (NilClass) nil, Console: [1, 2, 3]
<JonnieCache> it turns it into an array
<Mon_Ouie> You could use that along with super to pass the arguments when you don't actually need them in the new implementation
<Mon_Ouie> def foo(*); super; …other stuff…; end
awarner has joined #ruby
<JonnieCache> Mon_Ouie: yeah but if its only * then how do you access them? does the super call do it automatically?
<Mon_Ouie> super with no parentheses passes all the arguments implicitly
<JonnieCache> ahhhh right ok
thunderstrike has quit [Remote host closed the connection]
<Mon_Ouie> super() passes only the block, super(&nil) passes nothing at all
<JonnieCache> the blessing and the curse of ruby: so much weird shit. it goes on forever
awarner has quit [Remote host closed the connection]
mr_dynamix has quit [Quit: mr_dynamix]
chendo_ has quit [Ping timeout: 244 seconds]
_bart has quit [Quit: _bart]
lushious has quit [Ping timeout: 252 seconds]
thunderstrike has joined #ruby
larissa has joined #ruby
haxrbyte_ has joined #ruby
resure has quit [Remote host closed the connection]
chendo_ has joined #ruby
geekbri has joined #ruby
Squarepy has joined #ruby
haxrbyte has quit [Ping timeout: 246 seconds]
lushious has joined #ruby
haxrbyte has joined #ruby
rs-ix has joined #ruby
Squarepy has quit [Read error: Connection reset by peer]
Squarepy_ has joined #ruby
baphled has quit [Read error: Operation timed out]
haxrbyte_ has quit [Ping timeout: 244 seconds]
SecretAgent has joined #ruby
justinmcp has quit [Remote host closed the connection]
banisterfiend has quit [Remote host closed the connection]
banisterfiend has joined #ruby
Squarepy_ has quit [Ping timeout: 246 seconds]
enroxorz-work has joined #ruby
mneorr has joined #ruby
chendo_ has quit [Ping timeout: 244 seconds]
meiosis has joined #ruby
meiosis has quit [Remote host closed the connection]
chendo_ has joined #ruby
Squarepy has joined #ruby
DarkFoxDK has quit [Remote host closed the connection]
Squarepy_ has joined #ruby
DarkFoxDK has joined #ruby
irving has joined #ruby
wuzzzzaah has joined #ruby
Squarepy has quit [Ping timeout: 246 seconds]
<wuzzzzaah> hi guys
bradhe has joined #ruby
Squarepy_ has quit [Read error: Connection reset by peer]
yshh has quit [Remote host closed the connection]
Squarepy_ has joined #ruby
lampe2 has joined #ruby
zarubin has quit []
bradhe has quit [Ping timeout: 240 seconds]
Squarepy_ has quit [Read error: Connection reset by peer]
mark_locklear has joined #ruby
Squarepy_ has joined #ruby
Squarepy_ has quit [Read error: Connection reset by peer]
Squarepy_ has joined #ruby
Criztian has joined #ruby
Squarepy_ has quit [Read error: Connection reset by peer]
jimeh5 has joined #ruby
jimeh4 has quit [Read error: Connection reset by peer]
freeayu has quit [Read error: Connection reset by peer]
_bart has joined #ruby
rakunHo has quit [Remote host closed the connection]
irving has left #ruby [#ruby]
norm_ has joined #ruby
sailias has joined #ruby
chendo_ has quit [Ping timeout: 244 seconds]
Guest5516 has joined #ruby
horofox has joined #ruby
chendo_ has joined #ruby
Norm has quit [Ping timeout: 245 seconds]
norm_ is now known as norm
jonathanwallace has quit [Remote host closed the connection]
jonathanwallace has joined #ruby
freeayu has joined #ruby
vjt has quit [Remote host closed the connection]
vjt has joined #ruby
theRoUS has joined #ruby
theRoUS has quit [Changing host]
theRoUS has joined #ruby
jrajav has joined #ruby
kvirani has joined #ruby
<jrajav> Not that anybody's using it (or even talking), but just fyi, the bot's going down for a bit
jonathanwallace has quit [Ping timeout: 276 seconds]
iamjarvo has joined #ruby
al2o3cr has quit [Remote host closed the connection]
zarubin has joined #ruby
Paradox has quit [Ping timeout: 260 seconds]
<Xeago> >> puts "NO NOT THE BOT!"
<jrajav> I'm honestly surprised it managed to stay up as long as it did, with no daemon script behind it :P
<suborbital> bahh gn rubes
<jrajav> I guess it's too hard to break now or people got bored of trying
<suborbital> i guess
suborbital has left #ruby [#ruby]
<JonnieCache> both i think
fantazo has joined #ruby
BiHi has joined #ruby
Guedes has quit [Remote host closed the connection]
yonggu has joined #ruby
mr_dynamix has joined #ruby
yonggu has quit [Client Quit]
snuglepuss has joined #ruby
imami|afk is now known as banseljaj
yasushi has joined #ruby
cakehero has joined #ruby
dpk has joined #ruby
Criztian has quit []
Spooner has joined #ruby
triptec has quit [Read error: Connection reset by peer]
tommyvyo has joined #ruby
Paradox has joined #ruby
sailias has quit [Quit: Leaving.]
mc0e has joined #ruby
Targen has quit [Ping timeout: 246 seconds]
awarner has joined #ruby
justinmcp has joined #ruby
cezar has joined #ruby
al2o3cr has joined #ruby
<jrajav> >> "Alive?"
<al2o3cr> (String) "Alive?"
snearch has joined #ruby
sambio has joined #ruby
Jay_Levitt has quit [Quit: Jay_Levitt]
Paradox has quit [Ping timeout: 245 seconds]
jonathanwallace has joined #ruby
nim__ has quit [Ping timeout: 255 seconds]
jgarvey has joined #ruby
heisenmink has quit [Remote host closed the connection]
awarner has quit [Remote host closed the connection]
mneorr has quit [Quit: Leaving.]
_bart has quit [Quit: _bart]
justinmc_ has joined #ruby
mneorr has joined #ruby
triptec has joined #ruby
philcrissman has joined #ruby
cantonic has joined #ruby
Virunga has quit [Remote host closed the connection]
yasushi has quit [Remote host closed the connection]
carloslopes has joined #ruby
justinmcp has quit [Ping timeout: 244 seconds]
horofox has quit [Quit: horofox]
cakehero has quit [Quit: Computer has gone to sleep.]
arkiver has joined #ruby
bluebie has joined #ruby
jonathanwallace has quit [Ping timeout: 244 seconds]
linoj has joined #ruby
charliesome has quit [Quit: Textual IRC Client: www.textualapp.com]
Paradox has joined #ruby
jitesh_shetty has quit [Remote host closed the connection]
lolzie has joined #ruby
rs-ix has quit [Remote host closed the connection]
Virunga has joined #ruby
awarner has joined #ruby
justinmc_ has quit [Remote host closed the connection]
gtuckerkellogg has joined #ruby
uris has joined #ruby
emmanuelux has joined #ruby
aristidesfl has joined #ruby
yasushi has joined #ruby
nim__ has joined #ruby
Paradox has quit [Ping timeout: 272 seconds]
Banistergalaxy has quit [Ping timeout: 252 seconds]
Banistergalaxy has joined #ruby
yshh has joined #ruby
krawchyk has joined #ruby
norm has quit [Quit: norm]
m4rtijn has joined #ruby
<m4rtijn> hi anyone here who could help with a mongoid query?
<m4rtijn> I have an array of user_ids - now I try to find a thread where all user_ids are participants..
<JonnieCache> try in the mongoid channel
<JonnieCache> or the mongodb one
velikasha has joined #ruby
velikasha has left #ruby [#ruby]
jrist-afk is now known as jrist
digitalcakestudi has joined #ruby
GoGoGarrett has joined #ruby
Rochefort has joined #ruby
<JonnieCache> or just read the documentation tbh
tdelam has joined #ruby
Axsuul has quit [Ping timeout: 255 seconds]
naz has quit [Ping timeout: 272 seconds]
<m4rtijn> JonnieCache, I cant find it in the docs
<m4rtijn> looked through it quite thoroughly
jonathanwallace has joined #ruby
johnjohnson has joined #ruby
bigmeow has quit [Ping timeout: 244 seconds]
banseljaj is now known as imami|afk
asobrasil has joined #ruby
cantbecool has joined #ruby
Rochefortes has quit [Ping timeout: 246 seconds]
vectorshelve has quit [Quit: Page closed]
vlad_starkov has quit [Remote host closed the connection]
dmiller has joined #ruby
tk_ has joined #ruby
thunderstrike has quit [Remote host closed the connection]
frogprince_mac has joined #ruby
nilg has quit [Remote host closed the connection]
bigmeow has joined #ruby
nilg has joined #ruby
iamjarvo has quit [Ping timeout: 244 seconds]
lolzie has quit [Quit: Page closed]
arietis has joined #ruby
BSaboia has joined #ruby
axl_ has joined #ruby
Coolhand_ has joined #ruby
mercwith1mouth has joined #ruby
rjsamson has joined #ruby
rjsamson has quit [Remote host closed the connection]
bluebie has quit [Quit: Linkinus - http://linkinus.com]
dmiller has quit [Ping timeout: 248 seconds]
stopbit has joined #ruby
saschagehlich has quit [Ping timeout: 264 seconds]
the_jeebster has joined #ruby
jasonkuhrt has joined #ruby
bbttxu has joined #ruby
freeayu has quit [Remote host closed the connection]
ttilley has joined #ruby
cantbecool has quit [Quit: Textual IRC Client: www.textualapp.com]
s1n4 has quit [Quit: Lost terminal]
horofox has joined #ruby
<JonnieCache> goddammit activerecord.
<JonnieCache> bring on the new job...
vlad_starkov has joined #ruby
awarner has quit [Remote host closed the connection]
<GeekOnCoffee> JonnieCache: why the hate?
gfontenot has joined #ruby
Guest47318 has joined #ruby
pu22l3r has joined #ruby
djdb has quit [Quit: Ухожу я от вас (xchat 2.4.5 или старше)]
<JonnieCache> it does crazy stuff and is too complicated
* Guest47318 Hello Everybody
johnlcox has joined #ruby
<banisterfiend> JonnieCache: you're moving away from ruby?
<banisterfiend> or rails at least? :)
m4rtijn has quit [Quit: Verlassend]
<JonnieCache> nope
bradhe has joined #ruby
<JonnieCache> the new place uses sequel and redis
<JonnieCache> and mostly sinatra, although some rails
<banisterfiend> k00
BrokenCog has quit [Quit: leaving]
BrokenCog has joined #ruby
CarlB_the_great has joined #ruby
Guest47318 is now known as The_Game
<JonnieCache> activerecord makes me feel like some sort of noobish phpmonkey having used it for so long - im looking forward to working more directly with the database
frogprince_mac has quit [Quit: Leaving...]
philcrissman has quit [Remote host closed the connection]
bradhe has quit [Ping timeout: 240 seconds]
philcrissman has joined #ruby
clj_newb has joined #ruby
fbernier has quit [Ping timeout: 245 seconds]
CarlB_the_great has quit [Ping timeout: 246 seconds]
Virunga has quit [Remote host closed the connection]
The_Game has quit []
Danielpk has joined #ruby
CarlB_the_great has joined #ruby
nari has joined #ruby
jonathanwallace has quit [Remote host closed the connection]
jonathanwallace has joined #ruby
kvirani has quit [Remote host closed the connection]
sailias has joined #ruby
verto|off is now known as verto
Banistergalaxy has quit [Ping timeout: 272 seconds]
ph^_ has quit [Remote host closed the connection]
Banistergalaxy has joined #ruby
jonathanwallace has quit [Ping timeout: 276 seconds]
sagax has quit [Quit: Ухожу я от вас]
datsik33 has joined #ruby
internet_user has joined #ruby
thaz has quit [Quit: thaz]
cakehero has joined #ruby
takamichi has quit [Ping timeout: 244 seconds]
pu22l3r has quit [Remote host closed the connection]
jrajav has quit [Quit: The best darkness is strange and surprising]
takamichi has joined #ruby
fasta_ is now known as fasta
billyoc has joined #ruby
mmitchell has joined #ruby
fbernier has joined #ruby
dangerousdave has joined #ruby
nilg has quit [Remote host closed the connection]
mucker has joined #ruby
invisime has joined #ruby
jjbohn has joined #ruby
SirRamonGabriel has joined #ruby
SirRamonGabriel has left #ruby [#ruby]
larissa has quit [Ping timeout: 246 seconds]
joshman_ has joined #ruby
SirRamonGabriel has joined #ruby
ananthakumaran has quit [Quit: Leaving.]
mklappstuhl has quit [Ping timeout: 246 seconds]
fbernier_ has joined #ruby
SCommette has joined #ruby
thunderstrike has joined #ruby
trooney has joined #ruby
pu22l3r has joined #ruby
gtuckerkellogg has quit [Quit: Textual IRC Client: http://www.textualapp.com/]
iamjarvo has joined #ruby
<trooney> Noob question: With DataMapper/Sinatra, how can I make my Model.get() return a namespaced Json object? like, { Model: { foo: bar } } instead of just { foo: bar } ?
pricees has joined #ruby
BrokenCog has quit [Quit: leaving]
joshman_ has quit [Quit: Textual IRC Client: http://www.textualapp.com/]
jonathanwallace has joined #ruby
<hahaha> This thing prints digital digits: http://sprunge.us/QXAL
_bart has joined #ruby
kvirani has joined #ruby
Spooner_ has joined #ruby
triptec has quit [Ping timeout: 240 seconds]
Spooner has quit [Ping timeout: 276 seconds]
Foxandxss has joined #ruby
nilg has joined #ruby
BrokenCog has joined #ruby
yasushi has quit [Remote host closed the connection]
BrokenCog has quit [Changing host]
BrokenCog has joined #ruby
rcloak has joined #ruby
Takehiro has quit [Remote host closed the connection]
digitalcakestudi has quit [Quit: Leaving.]
digitalcakestudi has joined #ruby
the_jeebster1 has joined #ruby
the_jeebster has quit [Ping timeout: 245 seconds]
`brendan has joined #ruby
minijupe has joined #ruby
rippa has joined #ruby
statarb3 has quit [Ping timeout: 245 seconds]
bbttxu has quit [Quit: bbttxu]
jclem has joined #ruby
baroquebobcat has joined #ruby
Danielpk has quit [Quit: Danielpk]
fyolnish has joined #ruby
clj_newb has quit [Ping timeout: 240 seconds]
abrausch has quit [Quit: abrausch]
resure has joined #ruby
ezra has joined #ruby
ezra has quit [Changing host]
ezra has joined #ruby
jimeh5 has quit [Ping timeout: 240 seconds]
levieraf has joined #ruby
zz_chrismcg is now known as chrismcg
nanderoo has joined #ruby
jonathanwallace has quit [Ping timeout: 246 seconds]
CodeFriar has quit [Quit: Linkinus - http://linkinus.com]
fyolnish has quit [Ping timeout: 245 seconds]
resure has quit [Ping timeout: 246 seconds]
jonathanwallace has joined #ruby
mercwith1mouth has quit [Ping timeout: 268 seconds]
rhodee has joined #ruby
<rhodee> under what conditions should self be a method argument?
bbttxu has joined #ruby
fyolnish has joined #ruby
ph^ has joined #ruby
<banisterfiend> rhodee: never, ruby has an implicit self
h4mz1d has joined #ruby
rcloak has quit [Quit: rcloak]
awarner has joined #ruby
chrismcg is now known as zz_chrismcg
Criztian has joined #ruby
jimeh has joined #ruby
bradhe has joined #ruby
mmitchel_ has joined #ruby
CodeFriar has joined #ruby
<rhodee> banisterfiend: which I gathered from the David Black's book however in other texts I've seen this approach and was confused -- def publish blog.add_entry(self) end
verto is now known as verto|off
<banisterfiend> rhodee: nothing unusual about that, self is an object, and can be passed around to other objects that act on it, just as any other object
fearoffish has joined #ruby
<banisterfiend> rhodee: there's no way to know whether to pass self other than 'does it make sense to pass self here?' :)
jjbohn is now known as jjbohn|afk
statarb3 has joined #ruby
<rhodee> banisterfiend: why not just say def publish blog.add_entry(post) end?
<banisterfiend> wait
rjsamson has joined #ruby
yasushi has joined #ruby
mmitchell has quit [Ping timeout: 245 seconds]
Paradox has joined #ruby
<banisterfiend> rhodee: what is 'post' there? it's not possible to know what you're talking about without more context. But clearly 'self' there is a kind of post
<banisterfiend> so passing it in to add_entry() makes sense
qwerxy has quit [Quit: offski]
<banisterfiend> rhodee: are you new to programming in general out of interest?
wmoxam has joined #ruby
bradhe has quit [Ping timeout: 276 seconds]
<rking> Hey guys — does anyone know what the bad algorithms are called where they're like a highway painter who painted his first mile in 1 day, his second in 2 days, his third in 4 days, etc., and when asked why he told his boss, "Simple. I had to keep walking further and further back to the paint can."
nari has quit [Ping timeout: 240 seconds]
jchauncey has joined #ruby
sonkei has joined #ruby
zemanel has joined #ruby
<Xeago> what
cezar has quit [Quit: Leaving]
<Xeago> that joke is just O(2n)
clj_newb has joined #ruby
nim__ has quit [Ping timeout: 276 seconds]
joshman_ has joined #ruby
<rhodee> banisterfiend: I made a paste to describe the use case: http://pastie.org/4668571
fyolnish has quit [Remote host closed the connection]
RegEchse has joined #ruby
<Xeago> blog.add_entry expects a post
<rking> http://en.wikipedia.org/wiki/Schlemiel_the_Painter%27s_algorithm # I'm a bit embarassed to find out it was a Joel Spolsky thing embedded in my brain.
<Xeago> self refers to the current instance of the class post
<Xeago> it is an object of type post
<Xeago> hence you're passing a post to add_entry
<rking> Xeago: O(2n) for any one segment, but more for the total stripe-painting, right?
fyolnish has joined #ruby
Goles has joined #ruby
qwerxy has joined #ruby
<Xeago> n equals the amount of times he has to get paint per mile
<Xeago> no that's worng
<Xeago> but what are you trying to know?
CodeFriar has quit [Quit: Linkinus - http://linkinus.com]
kalleth has quit [Read error: Connection reset by peer]
mikepack has joined #ruby
IrishGringo has quit [Quit: ChatZilla 0.9.88.2 [Firefox 15.0/20120824154833]]
<rhodee> Xeago: I understand that bit, where I am getting confused is self is typically a receiver of messages but I've seen it used as an argument (see pastie). Just wanting to know why not simply map blog.add_entry(post) vs. the blog.add_entry(self)
CodeFriar has joined #ruby
<Xeago> because post is not a variable in your context
<Mon_Ouie> Or a method
<banisterfiend> rhodee: self is just an object, as an object it ca be passed around
dmiller has joined #ruby
maxmmurphy has joined #ruby
<Xeago> 'post' does not exist within your scope in publish
takamichi has quit [Ping timeout: 264 seconds]
<rking> Xeago: Something seems off. It's probably my Big O understanding, but it seems like it's closer to exponential.
<rhodee> so because add_entry is a method from Blog the method add_entry is effectively grabbing a post obj from the correct domain (e.g. Post)
takamichi has joined #ruby
<banisterfiend> Xeago: you dont know that actually, it could be a method
<Mon_Ouie> According to his pastie it isn't
dhruvasagar has quit [Ping timeout: 246 seconds]
heda has joined #ruby
spanner has quit [Ping timeout: 246 seconds]
Paradox has quit [Quit: derpderp]
<banisterfiend> ah you're right
<rking> He can paint a 50m line in no time, refilling his brush 10 times but only walking a negligible extra distance. But the same 50m put 1km down the road is going to take him a very, very long time, because he has to walk 10k extra.
g_rotbart has quit [Read error: Connection reset by peer]
<rhodee> so banister fiend: I know it seems simple self is just an object and in all other contexts its very clear
Paradox has joined #ruby
<heda> hi all, is there a way to stop a struct from being enumerable? i.e its members being considered independent parts of the set? like if i have an array of structs I want to iterate over the discrete structs not each ones independent members?
apok has joined #ruby
<Xeago> rking: what are you getting to?
g_rotbart has joined #ruby
<rhodee> but in the case of say method existing in the same domain but using self as an arg what benefit would there be to pointing to self as an arg
<rking> Xeago: Overall or with my question in reply to your O(2n)?
<rhodee> ..say *a...
arturaz has quit [Read error: Operation timed out]
JohnBat26 has quit [Quit: KVIrc 4.1.3 Equilibrium http://www.kvirc.net/]
<Xeago> overall
<Xeago> as o(2n) is just wrong
<Xeago> it has n not reliably defined
fbernier_ has quit [Read error: Connection reset by peer]
<banisterfiend> rhodee: you're as confused as an octopus in a garage
<JonnieCache> rhodee: sometimes you just want to pass the current object to another method. youre right in thinking that it can sometimes be an indicator of strange code or bad design
mc0e1 has joined #ruby
<banisterfiend> :P
<JonnieCache> but its a perfectly legit thing to do
<rhodee> well that settles it.
<rhodee> danke to all.
<Xeago> if the method you're calling exists in the scope of self, there is no point in passing self
<rhodee> that is what I always understood
<rking> Xeago: I would assume that the "n" is the distance of road covered, and I thought things like "number of trips back to the bucket per mile" were washed out in Big O notation as constants that don't affect the fundamental shape of the graph.
<rhodee> I was looking at this code for the first time in OO on Rails and was confused
snearch has quit [Quit: Verlassend]
<rking> Xeago: But overall I was only trying to remember the name, "Schlemiel the Painter's algorithm", so I'm already happy.
<JonnieCache> rhodee: theres MUCH weirder shit than that in rails. if you want to do rails youre gonna have to get used to it :)
mc0e has quit [Ping timeout: 264 seconds]
<rhodee> JonnieCache: :(
<JonnieCache> dont worry about it, its a learning experience
<rhodee> Seriously thanks for all the responses.
mengu has quit [Quit: Konversation terminated!]
<banisterfiend> rhodee: there's nothing actually weird in passing 'self', dont think that the code is weird (it's not) :)
<JonnieCache> no it isnt. maybe ive given the wrong impression
elux has joined #ruby
<JonnieCache> i just meant that it can SOMETIMES be an INDICATOR of weirdness, it isnt weird in itself
<rking> Whatever you do, do *not* base your definition of weird on that of banisterfiend.
<banisterfiend> yeah, i have a feeling he's dealt with his confusion by just htinking 'oh that's weird code, i dont have to worry about it'
<rhodee> Its not intimidating or anything I really enjoy ruby and i was doing some exploring, figured I ask
<Xeago> rhodee do you understand why we pass self, and not post?
arkiver has quit [Quit: Leaving]
robustus has joined #ruby
<rhodee> banisterfiend: lots of assuming going on
larissa has joined #ruby
KevinSjoberg has quit [Quit: ["Textual IRC Client: www.textualapp.com"]]
<rhodee> Xeago: yes in this case I do
<Xeago> is there a case where you wouldn't?
<rhodee> it actually fits well with the David Black book
<rhodee> the more I think about it
adamos has joined #ruby
<rking> The other day banisterfiend said this line is "k00", meaning "cool": https://github.com/svitla-systems/pretty_dialogs/blob/master/lib/pretty_dialogs.rb#L13
pricees has quit [Quit: leaving]
<banisterfiend> it is pretty cool :)
jjbohn|afk is now known as jjbohn
Nisstyre_ has quit [Remote host closed the connection]
<Xeago> wait, what why?
<Xeago> why would you eval it?
<adamos> How do i put the mysql result into an array? When I am trying to create an array with the result from a mysql select statement i get this: can't convert Mysql::Result into Array (TypeError)
<rking> Xeago: It's a pretty odd line, IMO. But it puts that var in the caller's scope.
<GeekOnCoffee> adamos: why are you trying to put it in an array
<rking> I don't get why you'd do something so roundabout for such an inconveniently long name.
<rking> A normal person would pass a var to "yield"
Takehiro has joined #ruby
<Xeago> why not eval only the right part?
<adamos> i am writing something that pulls the sha1 sums from mysql and compares it with the local server. I want to compare two arrays basically
<rking> Xeago: Because then the caller's local vars are left unchanged.
<JonnieCache> rking: aaaargh. that link.
<rking> Hehe, I know!
berserkr has joined #ruby
<adamos> the central server puts the sah1 sums into mysql and i want to compare against it
ckrailo has joined #ruby
<rking> JonnieCache: What's funny about it is that this was part of an interview process. Like, "Here's my Github ID."
<JonnieCache> were you looking to contract "svitla systems" or something
jasonkuhrt has quit [Quit: Leaving...]
<rking> JonnieCache: I also ♡ the part at the top that completely arbitrarily starts talking about :corporate_data.
<Xeago> but if dialog_builder is not accessible outside of eval
<Xeago> then what is the point of evaling?
mercwith1mouth has joined #ruby
<banisterfiend> Xeago: it's defined in the caller scope
wahly has left #ruby [#ruby]
<JonnieCache> rking: its the most mundane shit ever as well: a helper for doing modal dialogs
ph^ has quit [Remote host closed the connection]
<Xeago> banisterfiend: still have no clue what it does
<JonnieCache> how could someone who knows about ObjectSpace end up with that as a solution to html building?
<banisterfiend> he's essentially changing the value of a variable in the caller, it's like a cute version of binding_of_caller
<rking> JonnieCache: Yeah. I sent out a listing for a Rails position and this was one of the people that contacted me.
rakuN has joined #ruby
<rking> JonnieCache: LOL! I know!!
<rking> JonnieCache: Thank you for making me feel sane. Banister's "k00" reaction to this code made me doubt myself severely.
<banisterfiend> like i said, i wasn't evaluating it in terms of code structure or design
<rking> banisterfiend: Hehe
<Xeago> so eval can replace a variable regardless of scope?
clj_newb has quit [Ping timeout: 240 seconds]
<banisterfiend> i was looking at the issue he was solving, injecting a local object into a scope, and i thought his technique was pretty original
<GeekOnCoffee> adamos: you could do something like results = []; resultset.each{|r| results << r}
<JonnieCache> also wtf is "extend self" doing there
ananthakumaran has joined #ruby
maesbn has quit [Remote host closed the connection]
<banisterfiend> teh altnerative to that is to use globals or thread locals
baroquebobcat has quit [Quit: baroquebobcat]
spopescu has joined #ruby
sailias has quit [Read error: Connection reset by peer]
sailias1 has joined #ruby
<JonnieCache> seriously though someone please explain `extend self` to me
<banisterfiend> JonnieCache: extend self is like module_function
<Xeago> puts methods from module on Object?
<rking> JonnieCache: It's an alternative to singleton's. I had to look it up as well. 1min.
<banisterfiend> JonnieCache: it amkes the methods avaiable as instance methods and class methods
h4mz1d has quit [Ping timeout: 246 seconds]
<JonnieCache> lol amazing
MasterIdler has joined #ruby
<JonnieCache> thats actually quite neat to be fair, although it does make a mess
bbttxu has quit [Quit: bbttxu]
<banisterfiend> it's a fairly common pattern
<banisterfiend> i've seen it in a lot of code bases
<Xeago> imo
<banisterfiend> (extend self)
rakuN has quit [Client Quit]
<Xeago> it makes immediate ugly code
jprovazn is now known as jprovazn_away
<JonnieCache> i suppose i should say its quite clever, something cannot simultaneously be neat and make a mess
<Xeago> it's easy and convenient
<banisterfiend> JonnieCache: people use it in places where they'd used module_function
<banisterfiend> and either (1) dont know about module_function (2) want public instance methods (module_function gives private instanc emethods)
<JonnieCache> tbh i just do def self.method_name but thats not very dry if you need a lot of methods
<JonnieCache> now youre going to tell me thats not the same and im going to look a fool
daniel_hinojosa has joined #ruby
maxmmurphy has quit [Quit: maxmmurphy]
sailias1 has quit [Read error: Operation timed out]
<rking> JonnieCache: "class << self" is pretty good for declaring a bunch of class methods without all the "self."s, but no it's very different.
baphled has joined #ruby
<JonnieCache> yeah i was going to say that as well. can you do class << self inside a module?
<JonnieCache> being as a class is also a module
<rking> JonnieCache: You can't ever instantiate a module, so how would it be useful?
<JonnieCache> hmmm now im confused
<banisterfiend> rking: how would what be useful?
daniel_hinojosa1 has joined #ruby
<banisterfiend> class << self works fine inside a module
daniel_hinojosa has quit [Read error: Connection reset by peer]
<Xeago> what's the use of it banisterfiend
<Xeago> ?
<banisterfiend> Xeago: for defining class methods
<banisterfiend> module Pig; class << self; def a; end; def b; end; end; end
<banisterfiend> Pig.a
<Xeago> >> module Pig; class << self; def a; end; def b; end; end; end; Pig.a
<al2o3cr> (NilClass) nil
<JonnieCache> i do that all the time, when i want a class thats never instantiated basically, a place to put utility functions and the like
<banisterfiend> >> module Pig; class << self; def a; "Noob city here tonight"; end; def b; end; end; end; Pig.a
<al2o3cr> (String) "Noob city here tonight"
<banisterfiend> :P
<JonnieCache> i know thats bad design but its so often needed
<rking> Hehe
macmartine has joined #ruby
haxrbyte has quit [Ping timeout: 272 seconds]
<Xeago> >> module Pig; def a; end; def b; end; end; end; Pig.a
<al2o3cr> -e:1:in `eval': (eval):1: syntax error, unexpected keyword_end, expecting $end (SyntaxError), module Pig; def a; end; def b; end; end; end; Pig.a, ^, from -e:1:in `<main>'
<Xeago> >> module Pig; def a; end; def b; end; end; end; Pig::a
<al2o3cr> -e:1:in `eval': (eval):1: syntax error, unexpected keyword_end, expecting $end (SyntaxError), module Pig; def a; end; def b; end; end; end; Pig::a, ^, from -e:1:in `<main>'
triptec has joined #ruby
<JonnieCache> yeah so basically in conclusion there is literally no reason to do `extend self` when you can just wrap it in class << self; end or define every method on self. correct?
baroquebobcat has joined #ruby
<JonnieCache> and therefore avoid creating two versions of every method
<Xeago> >> module Pig; def a; end; def b; end; end; end; Pig::a()
<al2o3cr> -e:1:in `eval': (eval):1: syntax error, unexpected keyword_end, expecting $end (SyntaxError), module Pig; def a; end; def b; end; end; end; Pig::a(), ^, from -e:1:in `<main>'
<Xeago> how the hell does a module work?
jonathanwallace has quit [Remote host closed the connection]
<Xeago> how'd I call a in the last case?
jonathanwallace has joined #ruby
<rking> Xeago: This is one way:
<rking> >> module Pig; def a; 3 end end; class WartHog; extend Pig end; WartHog.a
<al2o3cr> (Fixnum) 3
chrishunt has quit [Quit: Leaving...]
yasushi has quit [Remote host closed the connection]
krawchyk has quit [Remote host closed the connection]
<JonnieCache> banisterfiend: can you tell me if what i said is correct or not, im going crazy here
linoj has quit [Ping timeout: 248 seconds]
<Xeago> >> module Pig; def a; 3 end end; extend Pig; a
<Xeago> wow, did I crash it?
aganov has quit [Quit: aganov]
tagrudev has quit [Quit: ...---...]
punkrawkR has joined #ruby
<banisterfiend> JonnieCache: no there's still reason
<banisterfiend> JonnieCache: cos, extend self is when you want BOTH instance methods AND clas smethods
<banisterfiend> JonnieCache: like htis
tk_ has quit [Quit: ばいばい]
Emmanuel_Chanel has quit [Quit: Leaving]
bigkevmcd has quit [Quit: outta here]
matrixise has quit [Ping timeout: 246 seconds]
<JonnieCache> banisterfiend: i understand that. i was implicitly saying that i dont believe theres any good reason to want that ;)
bigkevmcd has joined #ruby
<banisterfiend> JonnieCache: Math has that
<banisterfiend> JonnieCache: Math.sin
<rking> Xeago: I'm not sure why al2o3cr didn't reply, that's valid.
<banisterfiend> JonnieCache: or if u include Math
<banisterfiend> u can just go sin()
<JonnieCache> yeah and it annoys me every time i see it
<JonnieCache> i guess its useful for scripting
<banisterfiend> JonnieCache: Pry helpers work in a similar way
<JonnieCache> a stylistic thing i suppose
ph^ has joined #ruby
chimay has quit [Quit: WeeChat 0.3.9-rc1]
<banisterfiend> inside command context you can just go helper1()
samflores has joined #ruby
<banisterfiend> outside command context you have to go Pry::Helpers.helper1()
<banisterfiend> or whatever
samflores has left #ruby [#ruby]
jjbohn has quit [Quit: Leaving...]
<JonnieCache> ah right that makes sense
larissa has quit [Quit: Leaving]
alvaro_o has joined #ruby
jonathanwallace has quit [Ping timeout: 252 seconds]
jsmonkey has quit [Quit: Lost terminal]
<JonnieCache> but the main thing is that my understanding of that other stuff was correct. i was feeling my confidence as a ruby programmer draining away for a minute there!
<banisterfiend> hehe
<JonnieCache> >> puts "bot still there?"
<al2o3cr> (NilClass) nil, Console: bot still there?
<JonnieCache> maybe it didnt like `end end` without a ;
<Xeago> >> module Pig; def a; 3 end; end; extend Pig; a
<JonnieCache> >> module Pig; def a; 3 end; end; extend Pig; a
<al2o3cr> (Fixnum) 3
<JonnieCache> you put a space before the >>
<Xeago> derp
<davidcelis> >> Process.pid
<al2o3cr> (Fixnum) 518
sailias has joined #ruby
<Xeago> panic
<rking> Hehe, I didn't catch that, either. No the ; before end's is unneccessary.
seanwash has joined #ruby
<Xeago> >> panic
<al2o3cr> -e:1:in `eval': undefined local variable or method `panic' for main:Object (NameError), from -e:1:in `eval', from -e:1:in `<main>'
<Xeago> !panic
<al2o3cr> PANIC
<al2o3cr> Phew!
<davidcelis> >> Kernel.panic!
<al2o3cr> -e:1:in `eval': undefined method `panic!' for Kernel:Module (NoMethodError), from -e:1:in `eval', from -e:1:in `<main>'
<Xeago> what does sample do?
wobr has quit [Ping timeout: 272 seconds]
<Xeago> what does Array.sample do?
<JonnieCache> randomly picks from the array i think
paul_andrew has joined #ruby
<Xeago> take a random?
<davidcelis> Xeago: I believe you will find the answer to that in the documentation, good sir and/or madam
<JonnieCache> check out permute thats a recent favourite
<Xeago> !panic
<al2o3cr> PANIC
<al2o3cr> Phew!
<Xeago> !panic
<al2o3cr> AAAAUUUUGH
<al2o3cr> Phew!
SphericalCow has joined #ruby
davidcelis has quit [Quit: K-Lined.]
headius has joined #ruby
Se7enTime has joined #ruby
Bosma has joined #ruby
johnlcox has quit [Quit: ["Textual IRC Client: www.textualapp.com"]]
Se7enTime has left #ruby [#ruby]
chimay has joined #ruby
chimay has quit [Changing host]
chimay has joined #ruby
tobyo has joined #ruby
<Xeago> what does pkill do?
<Xeago> or in what essence is it different than kill
<Muz> It fires up a browser, takes you to a search engine and enters your query.
<Xeago> a niftier form of kill?
blazes816 has joined #ruby
bradhe has joined #ruby
DrShoggoth has joined #ruby
<Hanmac> Xeago it kills the parent process
mneorr has quit [Quit: Leaving.]
yasushi has joined #ruby
otters has quit [Read error: Connection reset by peer]
* Muz shakes his head.
otters has joined #ruby
ph^ has quit [Read error: No route to host]
ph^ has joined #ruby
Emmanuel_Chanel has joined #ruby
bradhe has quit [Ping timeout: 276 seconds]
<shevy> Xeago, via "pkill gdm" you can kill running gdm for example
Eplemosen has joined #ruby
horofox has quit [Quit: horofox]
Synthead has joined #ruby
jonathanwallace has joined #ruby
hoelzro|away is now known as hoelzro
h4mz1d has joined #ruby
SirRamonGabriel has quit [Remote host closed the connection]
nim_ has joined #ruby
eldariof has quit [Read error: Operation timed out]
haxrbyte has joined #ruby
Takehiro has quit [Remote host closed the connection]
h4mz1d has quit [Ping timeout: 276 seconds]
ctp has joined #ruby
Takehiro has joined #ruby
manouche has joined #ruby
lampe2 has quit [Ping timeout: 246 seconds]
maxmmurphy has joined #ruby
Takehiro has quit [Remote host closed the connection]
sailias1 has joined #ruby
robotmay has quit [Remote host closed the connection]
Takehiro has joined #ruby
sailias1 has left #ruby [#ruby]
sailias has quit [Ping timeout: 268 seconds]
krawchyk has joined #ruby
saschagehlich has joined #ruby
dmiller has quit [Remote host closed the connection]
beneggett has joined #ruby
haxrbyte_ has joined #ruby
ephemerian has quit [Quit: Leaving.]
vitor-br has quit [Ping timeout: 276 seconds]
Speed has joined #ruby
Speed has quit [Changing host]
Speed has joined #ruby
<Xeago> anyone with knowledge about duff's device?
timonv has quit [Ping timeout: 246 seconds]
kjellski has quit [Ping timeout: 260 seconds]
Know1edge has joined #ruby
haxrbyte has quit [Ping timeout: 255 seconds]
jonathanwallace has quit [Remote host closed the connection]
jonathanwallace has joined #ruby
luxurymode has joined #ruby
pu22l3r has quit [Remote host closed the connection]
mahmoudimus has joined #ruby
spanner has joined #ruby
qwerxy has quit [Quit: offski]
sonkei has quit [Quit: Computer has gone to sleep.]
machty has joined #ruby
torarne1 has joined #ruby
timonv has joined #ruby
maletor has joined #ruby
SphericalCow has quit [Remote host closed the connection]
SphericalCow has joined #ruby
hoelzro is now known as hoelzro|away
jshsu has joined #ruby
jso has joined #ruby
jshsu has left #ruby [#ruby]
jonathanwallace has quit [Ping timeout: 276 seconds]
pricees has joined #ruby
qwerxy has joined #ruby
spanner has quit [Ping timeout: 246 seconds]
mmitchel_ has quit [Remote host closed the connection]
johnjohnson has quit [Ping timeout: 252 seconds]
nim__ has joined #ruby
resure has joined #ruby
<Sou|cutter> is `` just an alias for system() ?
<rking> Sou|cutter: Nope.
johnjohnson has joined #ruby
<rking> It's Kernel#`, and it acts rather dif'runtly. (It captures the output as an expression, and handles errors dif'runtly.)
<rking> And it always does evil shell interpolation, which if you don't know about ShellWords escaping you should probably not use except in the dirtiest of situations.
wallerdev has joined #ruby
<rking> (system will also, if you give it a single string arg. Compare system "echo foo > /dev/null" vs system %w(echo foo > /dev/null) )
<Xeago> I rather like duff's device..
bradhe has joined #ruby
nim_ has quit [Ping timeout: 252 seconds]
wuzzzzaah has quit [Quit: wuzzzzaah]
<Sou|cutter> rking: thanks
verto|off is now known as verto
GMFlash has joined #ruby
pdtpatrick has joined #ruby
Guedes has joined #ruby
Guedes has quit [Changing host]
Guedes has joined #ruby
lolmaus has quit []
mrsolo has joined #ruby
josh^ has quit [Ping timeout: 244 seconds]
lolapaloza has joined #ruby
spanner has joined #ruby
s1n4 has joined #ruby
jgrevich has joined #ruby
<lolapaloza> hello #ruby, whats mean the symbol ||= ??
<Xeago> if the left side evals to false, assign right
<lolapaloza> thanks Xeago!.
<rking> Xeago: A key bit, "However, the standard C library provides the function memcpy for this purpose; it will not perform worse than this code, and may contain architecture specific optimizations that will make it significantly faster."
<Xeago> >> var = nil; var ||="set"
<al2o3cr> (String) "set"
sailias has joined #ruby
savage- has joined #ruby
adeponte has joined #ruby
<JonnieCache> >> var = 1; var ||="set"; puts var
<al2o3cr> (NilClass) nil, Console: 1
<rking> lolapaloza: I wish there was a "syntax Google" that wouldn't mush out what punctuation you enter in.
chrishunt has joined #ruby
artOfWar has joined #ruby
smellynoser has quit [Quit: This computer has gone to sleep]
<Xeago> memory copy is not available when writing to hardware
<JonnieCache> rking: expand the thing on the left and click "verbatim"
<blazes816> rking, there used to be
<Xeago> hence I like it :D
areil_ has joined #ruby
josh^ has joined #ruby
<JonnieCache> its not perfect but it helps
<lolapaloza> thanks to all :)
<blazes816> JonnieCache, awesome thanks
zommi has quit [Quit: Leaving.]
<rking> Actually, DDG wins already: http://duckduckgo.com/?q=%7C%7C%3D
flayer has joined #ruby
flayer has quit [Read error: Connection reset by peer]
flayer has joined #ruby
<rking> JonnieCache: What thing on the left?
yshh has quit [Remote host closed the connection]
<JonnieCache> "show search tools"
<rking> Oh, gotcha.
<rking> Yeah, DDG wins on this one.
areil has quit [Ping timeout: 240 seconds]
<JonnieCache> tbh it doesnt really keep the punctuation but it stops a lot of the google guesswork
<JonnieCache> ddg is best for searching for code i agree
davidcelis has joined #ruby
<rking> JonnieCache: Every year I have to put more and more things in quotes or prefix with +'s in Google.
flayer has quit [Read error: Connection reset by peer]
<JonnieCache> thats what verbatim was created to address
flayer has joined #ruby
johnjohnson has quit [Ping timeout: 260 seconds]
burgestrand has joined #ruby
<Xeago> ddg is cool ;O
flayer has quit [Read error: Connection reset by peer]
<rcassidy> does verbatim handle punctuation well?
flayer has joined #ruby
<JonnieCache> no it still ignores a lot of it
artOfWar_ has joined #ruby
Bosma has quit [Ping timeout: 268 seconds]
<JonnieCache> i think google dont index the punctuation for performance reasons
ph^ has quit [Remote host closed the connection]
zemanel has quit [Quit: Remote hottie closed the connection]
johnjohnson has joined #ruby
Eplemosen has quit [Quit: NOPE]
<rking> I can't blame them for dropping it, it's the easy thing to do.
<JonnieCache> especially with the instant search thing
<rking> But it'd be nice if there was a search engine that was like, "We split on \s. Nothing else."
yasushi has quit [Remote host closed the connection]
bradhe has quit [Remote host closed the connection]
apok has quit [Ping timeout: 264 seconds]
mercwith1mouth has quit [Ping timeout: 268 seconds]
horofox has joined #ruby
<rking> There used to be a Google Source search thing that was close, but they killed it because they have some dragon that requires them to kill X number of projects per year or else he rampages. Apparently.
khakimov has joined #ruby
velikasha1 has joined #ruby
<juha_> how do i get current date -1 day or +1 day?
carloslopes has quit [Quit: Leaving.]
artOfWar has quit [Ping timeout: 252 seconds]
rhodee has quit [Quit: rhodee]
davidcelis has quit [Quit: K-Lined.]
stopbit has quit [Read error: Connection reset by peer]
<rking> juha_: Date manipulation is always gross.
<Xeago> juha_ with active support: 1.day.ago
<rking> But yeah, I was definitely going to recommend ActiveSupport's date stuff.
<JonnieCache> that is the best thing about activesupport hands down
stopbit has joined #ruby
jonathanwallace has joined #ruby
* Xeago feels like toast
<JonnieCache> if you only need to do it once id look up the api rather than import activesupport though
<Xeago> as with every library import^^
<JonnieCache> except crypto
<Xeago> why?
<JonnieCache> NEVER WRITE YOUR OWN CRYPTO OR AUTHENTICATION CODE
<Xeago> copy?
<JonnieCache> you are not a cryptographer. you will get it wrong.
<Xeago> I actually studied cryptonalysis
<Xeago> if I spell that correctly
<blazes816> hahaha, burn
davidcelis has joined #ruby
<Xeago> however, I don't aught myself capable of making an algo
<Xeago> as it was basic
<Xeago> "
<Xeago> :\
<Xeago> mostly understanding why it works
sepp2k has quit [Ping timeout: 246 seconds]
Vert has quit [Read error: Connection reset by peer]
davidcelis has quit [Read error: Connection reset by peer]
<JonnieCache> we've all studied it. doesnt mean we should be doing it in the wild
davidcelis has joined #ruby
<Xeago> I know lots and tons of software engineers that have not studied it xD
<Xeago> it's a worthy course to take
<Xeago> second course, I'd recommend is optimizing it
Danielpk has joined #ruby
<JonnieCache> oh i agree, study it, but dont impose your homegrown crypto on other people. its morally wrong.
geggam has joined #ruby
spanner has quit [Ping timeout: 245 seconds]
<Danielpk> i trying to install rconv but i get this error: ERROR: Failed to build gem native extension.
<Danielpk> any1 know how i can fix it?
ringotwo has joined #ruby
<JonnieCache> thats like giving people rides in your car with homemade safety features. even if youre a good mechanic, youre not qualified to design airbags etc
<JonnieCache> (obv not a perfect analogy, you know what i mean)
rcloak has joined #ruby
NiteRain has joined #ruby
mohits has quit [Quit: Leaving]
iamjarvo has quit [Ping timeout: 244 seconds]
<Xeago> anyone has some good reads for me
<Xeago> got a long ride home
<Xeago> and need material to get me through
carrythezero has quit [Quit: Lost terminal]
Xeago_ has joined #ruby
frogprince_mac has joined #ruby
<Synthead> is there a .find that returns all matches (instead of the first one)?
xorigin has quit [Quit: leaving]
Xeago_ has quit [Remote host closed the connection]
stkowski has joined #ruby
mercwith1mouth has joined #ruby
davidcelis is now known as homie
homie is now known as davidcelis
<levieraf> Hi guys
<levieraf> I have a question
<levieraf> when I use capistrano I need installed that in the server, o i need install that in my local pc and run there?
<levieraf> or I need install on the server production?
<levieraf> ??
davidcelis is now known as jessepinkman
<JonnieCache> capistrano runs locally it doesnt need to be on the server
ringotwo has quit [Remote host closed the connection]
Paradox has quit [Ping timeout: 245 seconds]
Xeago has quit [Ping timeout: 245 seconds]
<levieraf> JonnieCache, so, I need only install locally and run here for deploy in other server web for rails e.q
<JonnieCache> yep
<levieraf> JonnieCache, right?
<levieraf> awesome
<levieraf> JonnieCache, thanks man
spanner has joined #ruby
horofox has quit [Ping timeout: 252 seconds]
havenn has joined #ruby
jessepinkman is now known as davidcelis
ph^ has joined #ruby
slainer68 has quit [Remote host closed the connection]
sepp2k has joined #ruby
spanner has quit [Ping timeout: 244 seconds]
apok has joined #ruby
shevy has quit [Ping timeout: 244 seconds]
linuxsable has joined #ruby
Goles has quit [Quit: Computer has gone to sleep.]
timonv has quit [Remote host closed the connection]
mwilson` has quit [Excess Flood]
mmitchell has joined #ruby
mmitchell has quit [Read error: Connection reset by peer]
mwilson` has joined #ruby
spanner has joined #ruby
mmitchell has joined #ruby
c0rn_ has joined #ruby
ananthakumaran has quit [Ping timeout: 255 seconds]
frogprince has joined #ruby
hipertracker has quit [Quit: hipertracker]
ph^ has quit [Remote host closed the connection]
frogprince_mac has quit [Read error: Connection reset by peer]
haxrbyte_ has quit [Ping timeout: 252 seconds]
sambio has quit [Ping timeout: 244 seconds]
mmitchell has quit [Read error: Connection reset by peer]
linuxsable has left #ruby [#ruby]
havenn has quit [Remote host closed the connection]
stephenjudkins has quit [Quit: stephenjudkins]
mmitchel_ has joined #ruby
spanner has quit [Ping timeout: 272 seconds]
ananthakumaran has joined #ruby
lolzie has joined #ruby
Nami-Doc has joined #ruby
Foxandxss has quit [Quit: KVIrc 4.2.0 Equilibrium http://www.kvirc.net/]
yxhuvud has joined #ruby
spanner has joined #ruby
areil_ has quit [Ping timeout: 276 seconds]
qwerxy has quit [Quit: offski]
carrythezero has joined #ruby
<levieraf> I have a question
<levieraf> is posible use capistrano for other lenguage
<levieraf> ?
<levieraf> e.q python, php, pel
<levieraf> perl?
mascool has joined #ruby
mercwith1mouth has quit [Ping timeout: 246 seconds]
fsdfds has joined #ruby
flayer has quit [Ping timeout: 246 seconds]
shevy has joined #ruby
sneakyness_wk has joined #ruby
bluenemo has quit [Remote host closed the connection]
<davidcelis> #capistrano
mmitchell has joined #ruby
ctp has quit [Quit: Linkinus - http://linkinus.com]
havenn has joined #ruby
alanp has joined #ruby
nilg has quit [Ping timeout: 255 seconds]
eldariof has joined #ruby
c0rn_ has quit [Quit: Computer has gone to sleep.]
havenn has quit [Remote host closed the connection]
blazes816 has quit [Quit: blazes816]
nilg has joined #ruby
blazes816 has joined #ruby
diegoviola has joined #ruby
elux has quit [Read error: Connection reset by peer]
eroc has joined #ruby
mmitchel_ has quit [Ping timeout: 240 seconds]
wallerdev has quit [Quit: wallerdev]
lampe2 has joined #ruby
sterex has joined #ruby
<Essobi> anyone played around with a sphinx client in ruby?
alvaro_o has quit [Quit: Ex-Chat]
cjz has joined #ruby
spanner has quit [Ping timeout: 245 seconds]
<davidcelis> yes
<davidcelis> thinking-sphix
<davidcelis> thinking-sphinx*
<davidcelis> though that's for rails
s1n4 has quit [Quit: leaving]
imami|afk is now known as banseljaj
headius has quit [Quit: headius]
<cjz> good morning, I was playing around last night with RestClient and I was curious about conventions… when you install the gem, its 'gem install rest-client' with a dash, but when you use the "library?" you do require 'rest_client' with an underscore, is that following some kind of ruby/rails/gem convention?
jgrevich_ has joined #ruby
baphled has quit [Remote host closed the connection]
alvaro_o has joined #ruby
saschagehlich has quit [Quit: saschagehlich]
chussenot has joined #ruby
matti has joined #ruby
elaptics is now known as elaptics`away
spanner has joined #ruby
jgrevich has quit [Ping timeout: 244 seconds]
jgrevich_ is now known as jgrevich
havenn has joined #ruby
ph^ has joined #ruby
havenn has quit [Remote host closed the connection]
c0rn_ has joined #ruby
Pleiadian has joined #ruby
<davidcelis> cjz: Gems can have hyphens or underscores, it doesn't really matter. that's up to the author
<davidcelis> cjz: But class names and module names are underscored for require statements. i.e. to require the module RestClient, you do `require 'rest_client'`
macmartine has quit [Quit: Computer has gone to sleep.]
<workmad3> davidcelis: you can require a hypenated file too
<davidcelis> wat
<davidcelis> oh you're right it's just the file name
<davidcelis> ugh
<davidcelis> disregard me
voodoofish430 has joined #ruby
<workmad3> cjz: most gems try to keep gemname and the lib to require in-sync
<workmad3> cjz: some older gems haven't done so
velikasha1 has left #ruby [#ruby]
<workmad3> cjz: some go through silly lengths to provide for all forms (active-support was one I believe, where iirc it used to support 'require "activesupport"' 'require "active-support" ' and 'require "active_support" '
jimeh has quit [Quit: bye]
Takehiro has quit [Remote host closed the connection]
<workmad3> cjz: a fairly common convention (especially in rails, which bases autoloading on it) is the ClassName to class_name conversion though
c0rn_ has quit [Client Quit]
carloslopes has joined #ruby
mneorr has joined #ruby
havenn has joined #ruby
havenn has quit [Remote host closed the connection]
kidoz has joined #ruby
<cjz> ok interesting
wallerdev has joined #ruby
sagax has joined #ruby
BSaboia__ has joined #ruby
adamkittelson has joined #ruby
havenn has joined #ruby
bradhe has joined #ruby
nim__ has quit [Ping timeout: 255 seconds]
c0rn_ has joined #ruby
Moggle has quit [Ping timeout: 240 seconds]
havenn has quit [Remote host closed the connection]
BSaboia has quit [Ping timeout: 246 seconds]
seanyo has joined #ruby
havenn has joined #ruby
pu22l3r has joined #ruby
bradhe has quit [Ping timeout: 276 seconds]
chussenot has quit [Ping timeout: 246 seconds]
BiHi has quit [Quit: Computer has gone to sleep]
nwest has joined #ruby
datapolitical has joined #ruby
<datapolitical> anyone alive in here?
<workmad3> braaaaains
stephenjudkins has joined #ruby
jromine has joined #ruby
Rochefort has quit [Remote host closed the connection]
r0bby has quit [Ping timeout: 240 seconds]
<datapolitical> i'm running into a path error when trying to execute a gem
<datapolitical> on Mac OS X
<workmad3> braaaaaaaains
kn330 has joined #ruby
mmitchell has quit [Remote host closed the connection]
eldariof has quit [Ping timeout: 240 seconds]
<reactormonk> heeeeaaaaaaaaaadddds
nilg` has joined #ruby
cj3kim has joined #ruby
cj3kim has quit [Changing host]
cj3kim has joined #ruby
mmitchell has joined #ruby
nim__ has joined #ruby
kn330 has quit [Ping timeout: 246 seconds]
spanner has quit [Ping timeout: 245 seconds]
evilsushi has joined #ruby
evilsushi has joined #ruby
evilsushi has quit [Changing host]
nilg has quit [Ping timeout: 252 seconds]
havenn has quit [Remote host closed the connection]
manizzle has quit [Ping timeout: 248 seconds]
ada2358 has joined #ruby
<burgestrand> datapolitical: you need to be a lot more specific than that
timonv has joined #ruby
shadoi has joined #ruby
Moggle has joined #ruby
workmad3 has quit [Read error: Operation timed out]
datapolitical has quit [Quit: This computer has gone to sleep]
Goles has joined #ruby
Axsuul has joined #ruby
Spooner_ has quit [Ping timeout: 246 seconds]
seanyo has quit [Ping timeout: 246 seconds]
hukl has joined #ruby
Criztian has quit [Read error: Connection reset by peer]
rakunHo has joined #ruby
joofsh has joined #ruby
havenn has joined #ruby
havenn has quit [Remote host closed the connection]
diegoviola has quit [Ping timeout: 252 seconds]
evilsushi has quit [Quit: leaving]
havenn has joined #ruby
luxurymode has quit [Quit: Computer has gone to sleep.]
havenn has quit [Remote host closed the connection]
evilsushi has joined #ruby
evilsushi has quit [Changing host]
evilsushi has joined #ruby
<joofsh> Hi, noobie question. I'm trying to use String.insert and to_s at the same time.
<joofsh> Why doesn't zipcode.insert(0,"hi).to_s work?
berserkr has quit [Quit: Leaving.]
ringotwo has joined #ruby
<shevy> wat
<blazes816> joofsh: that won't work unless zip code is a string before calling to_s
<shevy> what is "zipcode"
<Hanmac> what type is zipcode? is it an array or string?
<shevy> probably an array
<joofsh> zipcode is an integer. I want to convert it to a string and then insert
<shevy> also, you miss a "
<blazes816> zipcode.to_s.insert(0, "hi") ?
<shevy> there is no method called .insert for integer
<shevy> hehe
<blazes816> "hi#{zipcode}"
vu33 has joined #ruby
<shevy> so you first have to (1) convert it to string, then (2) .insert ;)
<shevy> in your code right now you call .insert first, which does not exist
<joofsh> right, i could do it that way. But I need it to be dynamic. I'm really doing insert( 0, StringVariable)
<shevy> for Fixnums
kn330 has joined #ruby
<shevy> blazes816 showed that you must convert it to a string first
<joofsh> okay, so there's no way to do it in 1 line of code?
seanwash has quit [Quit: Computer has gone to sleep.]
<shevy> blazes816 showed you that, didn't he?
<blazes816> it's as one-line as yours
<shevy> hehe
machty_ has joined #ruby
<shevy> blazes816, perhaps you added invisible newlines
<joofsh> like i said, it needs to be dynamic
<blazes816> zipcode.to_s.insert(0, string_var)
<joofsh> or could i do "#{variable}#{zipcode}"
<blazes816> yep
<joofsh> okay. Thank you :)
machty has quit [Read error: Connection reset by peer]
machty_ is now known as machty
<blazes816> that'd be nicer
<blazes816> np
<joofsh> sorry for the noob question :(
jerrad has joined #ruby
fyolnish has quit [Remote host closed the connection]
nilg`` has joined #ruby
<joofsh> to extend my question. Is there ever a valid use for insert? seems like you could always just do var = "hi#{variable}"
arietis has quit [Quit: Textual IRC Client: http://www.textualapp.com/]
kidoz has quit [Quit: Ухожу я от вас]
ph^ has quit [Read error: Connection reset by peer]
Moggle has quit [Ping timeout: 264 seconds]
<shevy> you modify the string object via .insert
ph^ has joined #ruby
<shevy> if you have a variable, and want to build it up slowly, for some reason, step by step
<shevy> you could do:
<shevy> x = "foo"
<shevy> x.insert 5,'lo'
<shevy> x.insert -5,'ack '
<shevy> x << 'yippie ey yoh'
<shevy> new_var = "hi#{x}"
reset has joined #ruby
reset has quit [Read error: Connection reset by peer]
araujo has quit [Ping timeout: 272 seconds]
<joofsh> I see, Okay thank you shevy
nilg` has quit [Ping timeout: 276 seconds]
love_color_text has joined #ruby
<shevy> you can use [] too rather than insert btw
<shevy> x = 'foo'
<shevy> x[0,0] = 'this will be appended '
<joofsh> oh wow, good to know
mercwithamouth has joined #ruby
<shevy> x # => "this will be appended foo"
reset has joined #ruby
ananthakumaran has quit [Quit: Leaving.]
bigdc1 has joined #ruby
<joofsh> thank you! :)
<burgestrand> >> x = 'foo'; x[0,0] = 'hi! '; x
<al2o3cr> (String) "hi! foo"
<love_color_text> Hi, I'm trying to use Dir.mkdir "my_folder", 0777 to create a world writeable directory -- but i get ALMOST there: drwxrwx--x... not sure what to do
<shevy> I like it more for some reason. works on Array too. though .insert works on Array as well, I guess it may come down to personal preferences
fermion has quit [Quit: P]
<shevy> love_color_text tried fileutils?
<love_color_text> nope
<burgestrand> love_color_text: what is the value of File::umask?
<burgestrand> >> File::umask
<al2o3cr> (Fixnum) 18
<love_color_text> 6
reset has quit [Client Quit]
<shevy> hmm
<burgestrand> love_color_text: that’s why then, it will apply to your permissions and change them
iamjarvo has joined #ruby
<love_color_text> hm, strange. is there a simple way to create chmod 777 directoriess?
johnjohnson has quit []
<love_color_text> other than doing `chmod 777 #{dir}` after :P
<burgestrand> love_color_text: set the umask before, and set it back after ^^
beneggett has quit [Quit: Computer has gone to sleep.]
<love_color_text> I didn't know it was settable. pass 18 into File::umask, do the mkdir, then make it 6 again?
<love_color_text> ill try this
<burgestrand> love_color_text: http://pastie.org/4669470
<burgestrand> Something like that. Did not try it.
krz has joined #ruby
nim__ has quit [Ping timeout: 240 seconds]
<love_color_text> burgestrand: a noble attempt, but it didnt work
<love_color_text> burgestrand: sorry, it DID work
* burgestrand shrugs
<love_color_text> thank you!
<love_color_text> i passed it 777 instead of 0777, which is why i spoke to soon
<love_color_text> thank you
spanner has joined #ruby
* burgestrand bows
maletor has quit [Quit: Computer has gone to sleep.]
<burgestrand> love_color_text: would probably make something like this if you plan on creating files and such, too: http://pastie.org/4669478
<love_color_text> i will need to study up about umask, i didn't realize there is this constant just set like this -- thanks for leading me to the knowledge
billyoc has quit [Remote host closed the connection]
<burgestrand> love_color_text: you can just type umask in your terminal, it exists there too
araujo has joined #ruby
sterex_ has joined #ruby
sterex has quit [Read error: Connection reset by peer]
sterex_ is now known as sterex
GMFlash has quit [Quit: Computer has gone to sleep.]
psycho_one has joined #ruby
mikepack has quit [Remote host closed the connection]
<love_color_text> burgestrand: yeah that is nicer, since i can pass files or folders or anything in the umask(0) context via a block. good stuff thank you
* love_color_text just learned more :P
jrist is now known as jrist-afk
spanner has quit [Ping timeout: 246 seconds]
w400z has joined #ruby
headius has joined #ruby
mikepack has joined #ruby
maletor has joined #ruby
Takehiro has joined #ruby
joofsh has quit [Ping timeout: 245 seconds]
Paradox has joined #ruby
wpaulson has joined #ruby
havenn has joined #ruby
v0n has joined #ruby
<trooney> What's the file you can drop to describe what gems your app needs to function?
<davidcelis> the... Gemfile...?
<trooney> davidcelis: ah, cool. that's easy. sorry, been using ruby for like.. 8 hours :P
Takehiro has quit [Ping timeout: 245 seconds]
dhruvasagar has joined #ruby
spanner has joined #ruby
adambeynon has quit [Quit: ["Textual IRC Client: www.textualapp.com"]]
dmiller has joined #ruby
beneggett has joined #ruby
mucker has quit [Remote host closed the connection]
mneorr has quit [Quit: Leaving.]
johnlcox has joined #ruby
psycho_one has quit [Remote host closed the connection]
clj_newb has joined #ruby
wpaulson_ has joined #ruby
love_color_text has quit [Remote host closed the connection]
<rking> trooney: The Gemfile would refer to this: http://gembundler.com/
Hugo-Boss has joined #ruby
<rking> Or s/refer to/be referenced by/. Or maybe it's some kind of advanced mutual reference.
<Hugo-Boss> hi am very new here
wpaulson_ has quit [Client Quit]
spinagon has joined #ruby
hipertracker has joined #ruby
<rking> Hugo-Boss: Just ask.
mercwithamouth has quit [Ping timeout: 240 seconds]
<Hugo-Boss> plz tell me how can i start learning ruby easily
<trooney> rking: yes. is there something more... low level than this? -- asking in case if there is something i should familiarize myself with before using bundler.
<rking> Hugo-Boss: Sure. Tell us your background so we can start you at the right level.
wpaulson has quit [Ping timeout: 240 seconds]
<Hugo-Boss> i know php but i am interested in ruby but dunno why i want to switch to ruby :)
<rking> trooney: Well, there's "gem" itself. Whatever you install with it will be available to "require".
<rking> Hugo-Boss: Kk.
<rking> Hugo-Boss: Do this and ask us questions as you go: http://www.ruby-lang.org/en/documentation/quickstart/
rippa has quit [Ping timeout: 272 seconds]
<trooney> rking: yep. similar to RPMs or PEAR or what not. just wondering if bundler is to apt as gem is to rpm or if bundler is to aptitude and i'm missing something :)
bradhe has joined #ruby
<Hugo-Boss> rking: one more thing is ruby is easy than php ?
xyon has quit [Quit: WeeChat 0.3.8]
<blazes816> Hugo-Boss: yes
<Hanmac> Hugo-Boss: we feel sorry for you that you know php :(
<blazes816> better answer
<trooney> Hugo-Boss: Me too. There's like... a ton of good stuff on learning ruby. Grab "The Ruby Programming Language" it's pretty good.
wpaulson has joined #ruby
xyon has joined #ruby
<Hugo-Boss> i see
<blazes816> Hugo-Boss: you'll soon never need to google something like "str_replace" because you don't remember the order of arguments
<rking> trooney: I wouldn't give it an exact equivalence to anything else I've seen exactly. The thing about Bundler is that it's strict. If you don't have a gem in the Gemfile, it will not exist as far as programs run under "bundle exec" are concerned.
fsdfds has quit [Ping timeout: 272 seconds]
<rking> This strictness is good, meaning you don't have to wonder if you're accidentally depending on something.
<Hanmac> Hugo-Boss: http://www.ruby-lang.org/en/documentation/ruby-from-other-languages/to-ruby-from-php/ << there is a good compare between ruby and php
<rking> Then the next thing about Bundler is it has really good version specification. Look at how "~> 1.2.3" works, and also the git versions.
<trooney> rking: Ah. So only what's listed is available during runtime? Good.
pdtpatrick has quit [Quit: pdtpatrick]
thunderstrike has quit [Remote host closed the connection]
<rking> Hanmac: That could do a *lot* more salesmanship.
<Hugo-Boss> my career wasdestroyed one year ago i never touch the computer from one year. But now I am feeling powerful so i like to choose ruby
<davidcelis> alindeman: ...
<davidcelis> alindeman: wait wtf, i didnt want to highlight you
<Hugo-Boss> Hanmac>Hugo-Boss: we feel sorry for you that you know php .....lol
<rking> Hugo-Boss: It'll be like tumbling down a Pleasant Surprise Escalator if you're coming from PHP.
xyon has quit [Client Quit]
xyon has joined #ruby
<trooney> rking: tumbling down an escalator is never pleasant.
bradhe has quit [Ping timeout: 264 seconds]
<davidcelis> trooney: pleasant was a modifier for the surprises, not the escalator itself or tumbling down it
<Hugo-Boss> i doing wrong to coming to ruby after learning php ?
nim_ has joined #ruby
jenrzzz has joined #ruby
<Hanmac> Hugo: noo ruby is more cool than php
<davidcelis> php is a sinking ship, abandon it
<trooney> davidcelis: You must kill at parties :)
<davidcelis> trooney: im here til next tuesday
<Hugo-Boss> heheheh thanks
spopescu has quit [Quit: Leaving]
<trooney> davidcelis: i need someone to entertain at my strunk & white soiree
niklasb has joined #ruby
lampe2 has quit [Ping timeout: 276 seconds]
<davidcelis> i believe you mean a soirée, good sir
jpreyer has joined #ruby
<trooney> vous êtes aimable, monsieur.
nim_ has quit [Ping timeout: 255 seconds]
techsurvivor has joined #ruby
resure has quit [Remote host closed the connection]
Muz has quit [Ping timeout: 272 seconds]
spanner has quit [Ping timeout: 246 seconds]
Muz has joined #ruby
<davidcelis> je ne parlez pas français
<davidcelis> parle*
<fbernier> moi oui :)
spinagon is now known as rippa
havenn has quit [Remote host closed the connection]
nateberkopec has joined #ruby
mmitchell has quit [Remote host closed the connection]
lectrick__ has left #ruby [#ruby]
apok has quit [Remote host closed the connection]
apok has joined #ruby
lectrick has joined #ruby
wpaulson_ has joined #ruby
wpaulson_ has quit [Client Quit]
<trooney> lol good show
mneorr has joined #ruby
GMFlash has joined #ruby
chimay has quit [Quit: WeeChat 0.3.9-rc1]
jenrzzz has quit [Ping timeout: 264 seconds]
rjsamson has quit [Remote host closed the connection]
sambio has joined #ruby
wpaulson has quit [Ping timeout: 252 seconds]
saschagehlich has joined #ruby
ringotwo has quit [Remote host closed the connection]
ph^ has quit [Remote host closed the connection]
carloslopes has quit [Quit: Leaving.]
carloslopes has joined #ruby
mmitchell has joined #ruby
torarne1 has quit [Ping timeout: 244 seconds]
digitalcakestudi has quit [Read error: Connection reset by peer]
<skyjumper> question about the example under #11 on http://www.ruby-doc.org/docs/Newcomers/ruby.html
torarne1 has joined #ruby
<skyjumper> i'm using 1.9.3p194 and am getting a different result for the 4th line
<skyjumper> ('test' and nil) == nil
havenn has joined #ruby
<skyjumper> but in the example it's supposed to be 'test'
<skyjumper> is the example wrong?
manizzle has joined #ruby
<Hanmac> skyjumber: no you didnt understand it... try to print out both after each line
bricker88 has joined #ruby
c0rn_ has quit [Quit: Computer has gone to sleep.]
<skyjumper> ah, duh. the assignment has precedence
<bricker88> What is the difference between yield &block, or yield some_method, and block.call?
manizzle has quit [Remote host closed the connection]
<Hanmac> >> a = 'test'; b = nil; both = a && b; p "first both #{both.inspect}"; both = a and b; p "second both #{both.inspect}";nil
<al2o3cr> (NilClass) nil, Console: "first both nil", "second both \"test\""
manizzle has joined #ruby
<davidcelis> bricker88: i believe that the first and third are just syntactically different
<invisime> is there a way to tell rdoc not to document a method that matches a particular pattern? I'm making a gem with a c extension and I don't want it to document all of the extension methods.
banisterfiend has quit [Remote host closed the connection]
<Hanmac> bricker88 (yield object) does not create a proc object when using an block
banisterfiend has joined #ruby
<bricker88> Hanmac: I see, that makes sense. Thanks
<bricker88> thanks davidcelis
<Hanmac> invisime: what kind of extension? do you write it yourself or do you use some kind of swig?
Guest29448 is now known as fred
stephenjudkins has quit [Quit: stephenjudkins]
fred has quit [Changing host]
fred has joined #ruby
<invisime> Hanmac: rolling it myself. all of the extension methods are public class methods on a particular singleton class and all of their names match /\Ac_/
c0rn_ has joined #ruby
<Hanmac> ... hm why do you do that? i mean why do they need to be public? you could use some kind of "syntax" sugar
timonv has quit [Remote host closed the connection]
nim_ has joined #ruby
c0rn_ has quit [Client Quit]
<invisime> Hanmac: they're public because they have to be. as far as I can tell, there's no way to make a private singleton method from within c.
bradhe has joined #ruby
banisterfiend has quit [Ping timeout: 244 seconds]
bbttxu has joined #ruby
ckrailo has quit [Quit: Leaving...]
ckrailo has joined #ruby
<Hanmac> invisime i mean why need the method accessable from ruby? why not make it hidden inside your stuff?
eignerchris has joined #ruby
<invisime> Hanmac: because a bunch of the functionality of the rest of the gem uses it. they're basically internal class stuff for a communication API. the private methods are things like "open_communication, close_communication, send_raw" and then the ruby methods are the actual API that I want to expose.
mmitchell has quit [Remote host closed the connection]
<Hanmac> hm i still dont see a reason for that ... i think it works without ...
<Hanmac> is your gem online in a repository?
<invisime> Hanmac: no. proprietary. >_>
nim_ has quit [Ping timeout: 252 seconds]
* invisime works for The Man.
Jay_Levitt has joined #ruby
Bosma has joined #ruby
cascalheira has quit [Quit: Linkinus - http://linkinus.com]
<Hanmac> invisime: https://github.com/Hanmac/libarchive-ruby/blob/master/ext/archive.cpp << as you can see the C-lib methods are not all exposed as ruby methods ...
headius has quit [Quit: headius]
mikepack has quit [Remote host closed the connection]
<invisime> Hanmac: yes, that's correct. I also want to hide the analog of your format, compression, etc.
axl__ has joined #ruby
<invisime> really, I don't care that they're exposed, I just don't want them in my documentation.
sonkei has joined #ruby
deryl has quit [Quit: deryl]
<Hanmac> i would do: rb_define_singleton_method( ... ); //:nodoc:
<Hanmac> that protects rdoc from parsing the method imo ...
<Hanmac> but i dont like accessable but undocumented methods ... its shitty like swig generated methods or ruby-gnome2
axl_ has quit [Ping timeout: 268 seconds]
axl__ is now known as axl_
<invisime> they're not *really* accessible. since the API is designed to be called via IPC and the transfer format uses a :send but filters out things that aren't on the whitelist.
<invisime> Hanmac: adding //:nodo: to the end of the line with the definte_method isn't working. :-/
mneorr has left #ruby [#ruby]
axl_ has quit [Remote host closed the connection]
axl_ has joined #ruby
gdawg has joined #ruby
krawchyk has quit [Remote host closed the connection]
gdawg has quit [Client Quit]
cj3kim has quit [Quit: This computer has gone to sleep]
mikepack has joined #ruby
Bosma has quit [Quit: leaving]
atmosx has joined #ruby
spanner has joined #ruby
mmitchell has joined #ruby
w400z has quit []
joofsh has joined #ruby
<trooney> Should I be using rSpec with Sinatra or is there something better?
<invisime> trooney: <3 rspec with sinatra.
<blazes816> trooney: better is subjective. e.g. I hate rspec and love minitest
Juul has joined #ruby
maletor has quit [Quit: Computer has gone to sleep.]
<atmosx> Any RoR dev interested in working in Germany? There's a company looking for RoR devs in GE apparently, if anyone is interested msg me
<GeekOnCoffee> atmosx: I'd try #rubyonrails
<invisime> Hanmac: apparently, rdoc can't find // comments, only /* */ comments. and it only looks just above the definitions of the c methods. adding /* :nodoc: */ above each of them.
nanderoo has left #ruby [#ruby]
fermion has joined #ruby
<atmosx> I'm not working for them, just sent me an email because they saw a ruby+sqlite twitter dumper I wrote on github, and a fail2ban script
<atmosx> so I don't care really.
<GeekOnCoffee> ahh
Maniacal has joined #ruby
insulator has joined #ruby
<Hanmac> invisime you are right ... i normaly use the backwards way ... i need to make methods visible when there are no one :P
<burgestrand> invisime: just call private on the singleton class like you would in ruby with rb_funcall. Or, if you want to, call private in ruby code after loading your extension.
<burgestrand> Won’t help with rdoc but it makes them private at least.
fantazo has quit [Remote host closed the connection]
cableray has joined #ruby
jrist-afk is now known as jrist
jchauncey has quit [Quit: jchauncey]
rjsamson has joined #ruby
mmitchel_ has joined #ruby
jlogsdon has joined #ruby
<invisime> burgestrand: I don't actually want them private, I just want them not documented. since I'm filtering the commands I'll pass to #send via a whitelist, they're already inaccessible. I just definitely don't want them cluttering up my documentation. thanks though! :-)
wmoxam has quit [Ping timeout: 244 seconds]
Goles has quit [Ping timeout: 244 seconds]
rjsamson has quit [Remote host closed the connection]
mmitchell has quit [Ping timeout: 260 seconds]
bradhe has quit [Remote host closed the connection]
andrewpthorp has joined #ruby
headius has joined #ruby
<Hanmac> i use rb_define_attr inside a #if 0 block :P
elux has joined #ruby
iocor has joined #ruby
verto is now known as verto|off
<iocor> are there any types for which object.is_a? NilClass wil evaluate to false?
luxurymode has joined #ruby
<Hanmac> >> true.is_a? NilClass
<al2o3cr> (FalseClass) false
<burgestrand> iocor: all for which object does not have NilClass as superclass
<davidcelis> >> Object.new.is_a? NilClass
<al2o3cr> (FalseClass) false
<Hanmac> iocor ... use .nil? for the nil checking ... its a bit faster
hipertracker has quit [Quit: hipertracker]
snearch has joined #ruby
gen0cide_ has joined #ruby
c0rn_ has joined #ruby
horofox has joined #ruby
<trooney> blazes816: why do you prefer minitest over rspec? just style?
<blazes816> trooney: yeah. minitest is like a small comfy tool store, and rspec is like megalo-mart presents disney world
Rochefort has joined #ruby
horofox_ has joined #ruby
<davidcelis> rspec is bloat
<davidcelis> you won't use most of it; if you like the semantics of specification testing, MiniTest::Spec is nice
br4ndon has joined #ruby
horofox has quit [Ping timeout: 246 seconds]
<Muz> You can of course install parts of rspec and include just those.
c0rn_ has quit [Quit: Computer has gone to sleep.]
<Muz> gem install rspec-expectations; require 'rspec/expectations' # I commonly use just that from rspec in various cucumber suites.
maletor has joined #ruby
<davidcelis> ew cucumber :(
<Muz> Meh, $work foams at the mouth over it.
GMFlash has quit [Quit: Computer has gone to sleep.]
c0rn_ has joined #ruby
jjbohn has joined #ruby
<lectrick> OK so I have written a bunch of potentially useful code at this point and it's time to push some gems out to the community. I have never gemmed out my code so this is exciting. I am planning on watching http://asciicasts.com/episodes/245-new-gem-with-bundler to get this up on github (I knew of Jeweler but I didn't realize bundler also had a way to generate gemspecs). Anyone know any caveats to thi
<lectrick> s process?
geggam has quit [Read error: Connection reset by peer]
<davidcelis> don't fuck up
answer_42 has quit [Quit: WeeChat 0.3.8]
<davidcelis> don't .gitignore the .gemspec file because that's super lame and i hate everyone who does that
arkiver has joined #ruby
bradhe has joined #ruby
<burgestrand> lectrick: it’s not too bad. Install gemcutter if you ever need to yank a version from rubygems. Also quick-read this in case you are unsure about something: http://guides.rubygems.org/
<burgestrand> lectrick: personally I’ve skimmed this a few times: http://docs.rubygems.org/read/chapter/20
machty_ has joined #ruby
<lectrick> davidcelis: roger
baphled has joined #ruby
<lectrick> burgestrand: ty
<burgestrand> I use the same process for my gems. I’d however advise you against adding bundler as a development dependency, and making sure the Rakefile can be run without bundler installed :)
jjbohn has quit [Client Quit]
Hugo-Boss has left #ruby [#ruby]
havenn has quit [Remote host closed the connection]
iocor has left #ruby ["Textual IRC Client: http://www.textualapp.com/"]
machty has quit [Read error: Connection reset by peer]
machty_ is now known as machty
sambio_ has joined #ruby
sambio_ has quit [Client Quit]
<burgestrand> Same with anything that is not essential for development. Your contributors don’t need rake tasks for releasing your gem.
havenn has joined #ruby
al-ol has joined #ruby
<trooney> blazes816: davidcelis: cool. thanks for the advice
<lectrick> burgestrand: ok that's another thing- should I set up a different gemset with RVM for each gem separately to manage all its dependencies completely separately, or is a Gemfile an OK addition? (Or are you saying a Gemfile is a Bundler dependency?)
geekbri has quit [Remote host closed the connection]
<lectrick> The problem is I'm currently working on projects on multiple Rails versions and Bundler makes it easy for me to do that with only one gemset
<shevy> ahhhhhh the neverending joy of bundler...
<lectrick> Is it wrong that I don't use Rake to run tests and I write tests that are runnable (ideally) by passing the path to the test directly to the Ruby executable? :)
arkiver has quit [Ping timeout: 244 seconds]
ph^ has joined #ruby
jenrzzz has joined #ruby
havenn has quit [Ping timeout: 245 seconds]
GMFlash has joined #ruby
atmosx has quit [Ping timeout: 255 seconds]
andrewpthorp has quit [Quit: Linkinus - http://linkinus.com]
asshopo has joined #ruby
specialGuest has joined #ruby
cj3kim has joined #ruby
cj3kim has quit [Changing host]
cj3kim has joined #ruby
specialGuest has quit [Changing host]
specialGuest has joined #ruby
ph^ has quit [Ping timeout: 255 seconds]
<asshopo> stupid question that's driving me insane.. I need a simple function or a 1 liner to give me the offset between 2 timezones, taking DST into account.. everything Im trying for 'America/Central' is returning -6 instead of -5.
havenn has joined #ruby
havenn has quit [Remote host closed the connection]
havenn has joined #ruby
<invisime> asshopo: central *is* UTC -6 right now.
<blazes816> asshopo: CST != CDT
<blazes816> also, that
<invisime> err, standard.
<invisime> right now it's -5.
<asshopo> exactly my point.. its 5 hours behind right now, not 6
br4ndon has quit [Read error: Connection reset by peer]
stephenjudkins_ has joined #ruby
br4ndon has joined #ruby
Guest5516 has quit [Ping timeout: 252 seconds]
samflores has joined #ruby
<asshopo> heh, thats what I figured
lolapaloza has quit [Quit: Lost terminal]
<asshopo> something so simple, someones have to had this issue before
samflores has left #ruby [#ruby]
cj3kim has quit [Quit: This computer has gone to sleep]
<blazes816> asshopo: are you trying to use tzinfo? that's all i've ever used for ruby time stuff
<asshopo> TZInfo doesnt seem to give you an offset in general (I might have missed something)
<asshopo> Ive also tried ActiveSupport::TimeZone, which almost does what I need
<asshopo> except it doesnt include DST
zeromodulus has joined #ruby
<asshopo> blazes816: not that you'd know (based on you saying you've only used TZInfo), but I currently have: ActiveSupport::TimeZone.seconds_to_utc_offset(ActiveSupport::TimeZone.new("America/Chicago").utc_offset)
<asshopo> that returns -6, not -5
cj3kim has joined #ruby
cj3kim has quit [Changing host]
cj3kim has joined #ruby
jenrzzz has quit [Ping timeout: 268 seconds]
mmitchel_ has quit [Remote host closed the connection]
Targen has joined #ruby
Guedes is now known as Guedes_out
r0bby has joined #ruby
m_3 has quit [Quit: leaving]
elico has joined #ruby
ringotwo has joined #ruby
mmitchell has joined #ruby
<blazes816> asshopo: sorry, can't figure it out. try #rubyonrails, they probably know a lot more about AS than anyone here
<asshopo> blazes816: I figured it out.. puts DateTime.now().in_time_zone('Central Time (US & Canada)').strftime("%z")
<asshopo> thats using rubys build in DateTime, thats close enough to what I need
<asshopo> thanks for trying tho
<blazes816> ah, nice
horofox_ is now known as horofox
ttilley has quit [Quit: ttilley]
stephenjudkins_ has quit [Quit: stephenjudkins_]
jenrzzz has joined #ruby
erichmenge has joined #ruby
maletor has quit [Quit: Computer has gone to sleep.]
yxhuvud has quit [Ping timeout: 240 seconds]
Chryson has joined #ruby
stephenjudkins has joined #ruby
brett has joined #ruby
jbw has quit [Ping timeout: 246 seconds]
m_3 has joined #ruby
r0bby has quit [Ping timeout: 246 seconds]
bbttxu has quit [Read error: Connection reset by peer]
bbttxu_ has joined #ruby
kvirani has quit [Remote host closed the connection]
iamjarvo has quit [Ping timeout: 246 seconds]
sailias has quit [Quit: Leaving.]
hipertracker has joined #ruby
dmiller has quit [Remote host closed the connection]
mark_locklear has quit [Remote host closed the connection]
bwwrd has joined #ruby
statarb3 has quit [Quit: Leaving]
wpaulson has joined #ruby
enroxorz-work has quit [Quit: KVIrc 4.2.0 Equilibrium http://www.kvirc.net/]
straind has joined #ruby
joofsh has quit [Ping timeout: 245 seconds]
bbttxu_ has quit [Read error: Connection reset by peer]
bbttxu has joined #ruby
_veer has quit [Ping timeout: 246 seconds]
SphericalCow has quit [Quit: Leaving]
_veer has joined #ruby
_veer has quit [Changing host]
_veer has joined #ruby
paul_andrew has quit [Quit: leaving]
mneorr has joined #ruby
mr_dynamix has quit [Quit: mr_dynamix]
hahaha has quit [Ping timeout: 246 seconds]
clj_newb has quit [Ping timeout: 255 seconds]
Asher has quit [Quit: Leaving.]
niklasb has quit [Ping timeout: 245 seconds]
dpk has quit [Quit: Ceci n'est pas une broken pipe.]
dpk has joined #ruby
jbw has joined #ruby
bradhe has quit [Remote host closed the connection]
<trooney> Is there a Ruby doc source that contains examples alongside the methods or something to that effect?
<canton7> most of the stuff on ruby-doc.org has examples
<trooney> canton7: i'm looking at http://www.ruby-doc.org/stdlib-1.9.3/libdoc/json/rdoc/JSON.html -- guess it just doesn't?
<canton7> yeah, that particular one doesn't look too helpful
<canton7> if you've got a specific question about it, ask away, and someone might know off the top of their head
atmosx has joined #ruby
sonkei has quit [Quit: Computer has gone to sleep.]
<trooney> canton7: cool. thanks. it's frustrating to know what you want to do but not how to do it :)
<canton7> sounds like a challenge! what are you trying to do?
<trooney> canton7: oh, nothing. just encode/decode json. learning me some ruby.
<canton7> obj = JSON::parse(json_str); json_str = obj.to_json
bradhe has joined #ruby
<trooney> canton7: got this minitest running and want to validate the output of the api i'm fiddling with in sinatra.
<fowl> trooney: install the json gem, then its as easy as JSON({a: hash}) or JSON('{"some": "json"}')
<fowl> JSON() in that case is a method btw
<canton7> ooh yes, or that
<trooney> How do you handle invalid json? like, will it throw an exception?
bbttxu has quit [Read error: Connection reset by peer]
<fowl> try it in irb
bbttxu has joined #ruby
erichmenge has quit [Quit: Linkinus - http://linkinus.com]
<canton7> (it fires off a JSON::ParserError)
zz_chrismcg is now known as chrismcg
<trooney> ah yes. irb. forgot about that.
<invisime> >> require 'json' #will this work?
<al2o3cr> (TrueClass) true
<invisime> >> JSON('{"some": "json"}')
<al2o3cr> -e:1:in `eval': undefined method `JSON' for main:Object (NoMethodError), from -e:1:in `eval', from -e:1:in `<main>'
<invisime> >> require 'json'; JSON('{"some": "json"}')
<al2o3cr> (Hash) {"some"=>"json"}
rippa has quit [Ping timeout: 255 seconds]
sambio has quit [Quit: Saliendo]
<bricker88> >> "test"
<al2o3cr> (String) "test"
<bricker88> neat
fermion has quit [Quit: Textual IRC Client: http://www.textualapp.com/]
<invisime> yep.
<invisime> bricker88: if you want to play with it/try to break it, feel free to do so in private messages! :-D
<bricker88> will do
<trooney> thanks guys!
<bricker88> did one of you guys write it?
<trooney> first unit tests.. then something... then.. profit!
<invisime> bricker88: presumably.
bwwrd has quit [Quit: ["Textual IRC Client: www.textualapp.com"]]
asklov has joined #ruby
Pleiadian has left #ruby [#ruby]
gfontenot has quit []
Faris has joined #ruby
Faris has left #ruby [#ruby]
timonv has joined #ruby
br4ndon has quit [Quit: Lorem ipsum dolor sit amet]
sailias has joined #ruby
clj_newb has joined #ruby
br4ndon has joined #ruby
chrismcg is now known as zz_chrismcg
tommyvyo has quit [Quit: Textual IRC Client: http://www.textualapp.com/]
tdelam has quit [Remote host closed the connection]
rakunHo has quit [Remote host closed the connection]
carloslopes has quit [Quit: Leaving.]
moted has quit [Ping timeout: 246 seconds]
Vert has joined #ruby
ringotwo has quit [Remote host closed the connection]
wpaulson has quit [Quit: Colloquy for iPhone - http://colloquy.mobi]
atmosx has quit [Ping timeout: 244 seconds]
jclem has quit [Quit: Leaving...]
Nami-Doc has quit [Quit: q+]
moted has joined #ruby
busybox42 has quit [Quit: Leaving.]
busybox42 has joined #ruby
recycle has joined #ruby
recycle has quit [Remote host closed the connection]
m_3 has quit [Quit: leaving]
atmosx has joined #ruby
bwlang has joined #ruby
SCommette has quit [Quit: SCommette]
pu22l3r has quit [Ping timeout: 272 seconds]
banseljaj is now known as imami|afk
rcassidy has quit [Quit: leaving]
SCommette has joined #ruby
m_3 has joined #ruby
statarb3 has joined #ruby
atmosx has quit [Client Quit]
tommyvyo has joined #ruby
tommyvyo has quit [Changing host]
tommyvyo has joined #ruby
timonv has quit [Remote host closed the connection]
Targen has quit [Ping timeout: 252 seconds]
frogprince has quit [Quit: Leaving...]
Asher has joined #ruby
Targen has joined #ruby
iamjarvo has joined #ruby
br4ndon has quit [Read error: Connection reset by peer]
br4ndon has joined #ruby
alec has joined #ruby
recycle has joined #ruby
verto|off is now known as verto
workmad3 has joined #ruby
sambio has joined #ruby
auntieNeo has joined #ruby
joofsh has joined #ruby
sonkei has joined #ruby
Maniacal has quit [Ping timeout: 264 seconds]
deadSnowman has joined #ruby
elaptics`away is now known as elaptics
clj_newb has quit [Ping timeout: 248 seconds]
alec is now known as alec-c4
minijupe has quit [Quit: minijupe]
vlad_starkov has quit [Remote host closed the connection]
geggam has joined #ruby
recycle has quit [Ping timeout: 248 seconds]
Criztian has joined #ruby
Spooner has joined #ruby
elux has quit [Quit: Leaving...]
<trooney> Using Sinatra+DataMapper+MiniTest -- How can I mock the Model.find() objects within my routes? I don't quite see how to pass either a mock object in the test
cj3kim has quit [Quit: This computer has gone to sleep]
adamkitt_ has joined #ruby
Speed has quit [Quit: When two people dream the same dream, it ceases to be an illusion.]
adamkittelson has quit [Read error: Connection reset by peer]
internet_user has quit [Remote host closed the connection]
alec-c4 has left #ruby [#ruby]
Danielpk_ has joined #ruby
chrishunt has quit [Quit: Leaving...]
Danielpk has quit [Ping timeout: 246 seconds]
Danielpk_ is now known as Danielpk
verto is now known as verto|off
ephemerian has joined #ruby
sailias has quit [Quit: Leaving.]
luxurymode has quit [Quit: Computer has gone to sleep.]
jenrzzz has quit [Ping timeout: 255 seconds]
Maniacal has joined #ruby
wmoxam has joined #ruby
maletor has joined #ruby
hukl has quit [Quit: Leaving...]
bradhe has quit [Remote host closed the connection]
doomMonkey has quit [Quit: Leaving]
Morkel has quit [Quit: Morkel]
eroc has quit [Quit: eroc]
doomMonkey has joined #ruby
deryl has joined #ruby
Maniacal has quit [Ping timeout: 276 seconds]
havenn has quit [Remote host closed the connection]
deryl has quit [Client Quit]
Jay_Levitt has quit [Ping timeout: 265 seconds]
bbttxu has quit [Quit: bbttxu]
havenn has joined #ruby
havenn has quit [Remote host closed the connection]
jenrzzz has joined #ruby
insulator has quit [Read error: Connection reset by peer]
dmiller has joined #ruby
<joofsh> var = File.new("filename","w") works no problem, and creates a new file in the current directory. But how can I create a file in a subdirectory. I keep getting errors with var =File.new("/subdir1/subdir2/filename","w")
fantazo has joined #ruby
br4ndon has quit [Quit: Lorem ipsum dolor sit amet]
<blazes816> joofsh: you need to create the directories first
<shevy> joofsh what is the error
<canton7> obvious question: did you mean to put that leading slash on?
GoGoGarrett has quit [Remote host closed the connection]
<joofsh> blaze816: already did create the directories
<shevy> what is the error
<joofsh> canton7: not necessarily? I was trying all the variants I could think of
<blazes816> canton7, good call my man
<blazes816> joofsh: the leading slash tells it to start at the root of your file system
<canton7> leading slash means relative to the root of the filesystem
nwest has quit [Quit: Textual IRC Client: http://www.textualapp.com/]
cj3kim has joined #ruby
cj3kim has quit [Changing host]
cj3kim has joined #ruby
<joofsh> `block in create_form_letters': undefined method `/' for nil:NilClass (NoMethodError)
mmitchell has quit [Remote host closed the connection]
<shevy> that's an odd message for that line of code :-)
<joofsh> removing the slash doesn't change the error
<shevy> I get
<shevy> var =File.new("/subdir1/subdir2/filename","w")
<shevy> Errno::ENOENT: No such file or directory - /subdir1/subdir2/filename
<canton7> and that error is *not* relates to the line of code you pasted
<canton7> *related
<blazes816> gist your code
<joofsh> 1 sec then
rjsamson has joined #ruby
<joofsh> ok, lemme gist it
kenneth has joined #ruby
<shevy> you can create the subdirs via FileUtils.mkdir_p() I think
gfontenot has joined #ruby
<kenneth> hey there, is there a way to do this as a one-liner?
<kenneth> while (h,b = f.receive)
Chryson has quit [Ping timeout: 240 seconds]
<kenneth> #where f.reveice returns a two-element array that i'd like to directly assign to two variables
Foxandxss has joined #ruby
<canton7> shevy, you're right :)
IrishGringo has joined #ruby
<joofsh> https://gist.github.com/d30e2d9b9e11027b9efb in the create_form_letter
<canton7> what line is the rror on?
<blazes816> kenneth: while(h,b = *f.receive) ?
<joofsh> And yea, was the wrong error. It's (Errno::ENOENT) on 106
Maniacal has joined #ruby
<blazes816> 0o
<canton7> joofsh, what are you trying to do on line 106?
<blazes816> string bro
<joofsh> I already created an output folder within my directory
<canton7> cos dividing two strings doesn't make sense :P
<blazes816> output = File.new("output/filename","w")
<kenneth> i get a SyntaxError: (eval):4: multiple assignment in conditional
<shevy> canton7 aaah joofsh just confused me :P
<joofsh> haha, not trying to be confusing ! :(
v0n has quit [Ping timeout: 246 seconds]
<canton7> joofsh, where, exactly, do you want to write the file?
machty has quit [Ping timeout: 245 seconds]
<shevy> kenneth an eval??
<blazes816> joofsh: but looking above you probably just want output = File.new(filename,"w")
piotr__ has joined #ruby
alanp_ has joined #ruby
alanp_ has quit [Read error: Connection reset by peer]
<joofsh> blaze816: It will work that way, but then it creates 20 files in my main directory, its really messy
<blazes816> ?
<Hanmac> joofsh read about File.open , File.new is maybe not soo good
<canton7> joofsh, the filename variable is "output/thanks_<stuff>/html"
<shevy> kenneth well perhaps ruby doesnt like that construct you try to use :D
machty has joined #ruby
alanp_ has joined #ruby
<canton7> joofsh, thus, the files will go in output/
statarb3 has quit [Quit: Leaving]
<joofsh> hanmac: okay i'll look into FIle.open
<Hanmac> joofsh and change "letter = File.open("form_letter.html", "r").read" to     "letter = File.read("form_letter.html", "r")" ...
<Hanmac> using open without an block and without close is a very bad idea
bradhe has joined #ruby
invisime has quit [Quit: Leaving.]
<joofsh> hanmac, doesn't the "r" already make it readable only? file.read with "r' seems redundant?
fbernier has quit [Ping timeout: 246 seconds]
<Hanmac> you are right
jenrzzz has quit [Ping timeout: 244 seconds]
alanp has quit [Ping timeout: 252 seconds]
DrShoggoth has quit [Quit: Leaving]
`brendan has quit [Quit: - nbs-irc 2.39 - www.nbs-irc.net -]
<joofsh> but yea. you're right i should be using File.read
snearch has quit [Quit: Verlassend]
theRoUS has quit [Ping timeout: 260 seconds]
carrythezero has quit [Ping timeout: 255 seconds]
<joofsh> canton7: I want to write it to the subdirectory "output" with the filename "thanks_<variable>"
fbernier has joined #ruby
<joofsh> No such file or directory - output/thanks_Nguyen_Allison.html (Errno::ENOENT)
dagnachewa has joined #ruby
<joofsh> but I already do have a directory output. Just not the file yet, hence I wanted to create it
<canton7> joofsh, then changing line 106 to 'File.new(filename, "w")' should work fine
<canton7> make sure the 'output' folder exists first
<fowl> "w+"
<canton7> File.mkdir('output')
carrythezero has joined #ruby
<Hanmac> like that File.write(filename,output)
recycle has joined #ruby
<joofsh> oh, hmm
e is now known as root
<fowl> ah w+ is r/w i thoguht it was read/create but w does that
<canton7> yeah
<Hanmac> canton7 not tell him that he should use File.new(filename, "w"), in 99,99% there are better ways
hukl has joined #ruby
<joofsh> hmm
<canton7> joofsh, next point: use File.new(filename, "w"){ |f| f.write(custom_letter) } also
<canton7> oops. File.open not File.new
<joofsh> File.mkdir('output') gives me an error. says mkdir method does not exist for File?
<joofsh> canton7, good call, that's much cleaner. Hadn't gotten there yet
<canton7> so File.open(filename, "w"){ |f| f.write(custom_letter }
<canton7> that takes care of closing the file
hukl has quit [Client Quit]
<canton7> and I'm an idiot. it's Dir.mkdir
minijupe has joined #ruby
<Hanmac> canton7 yes you are :P
* canton7 bows his head. been too long since I did file manipulation in ruby
<canton7> in general, using File.new is bad, and using File.open without a block is bad
<joofsh> lol, sorry this is so irregular to do file manipulation in ruby
minijupe has quit [Client Quit]
<Hanmac> "File.write(filename,custom_letter)" is the same as "File.open(filename, "w"){ |f| f.write(custom_letter) }"
<canton7> nah it's perfectly fine and natural
<fowl> joofsh: actually it isnt, its like every other language, open a file, read/write to it, close it
<canton7> Hanmac, aha good call thanks. joofsh ^^
<joofsh> will File.write() also create the file like open will?
<Hanmac> but unlike other languages ruby can close the files for you automaticly if you use the right methods /arguments
<Hanmac> joofsh yeah
<Hanmac> fowl: no w+ is not like r/w ... w+ means that its running in "add"-mode
<fowl> Hanmac: no it doesnt :)
sonkei has quit [Quit: Computer has gone to sleep.]
<canton7> w is overwrite iirc. a is append
<joofsh> Okay cool, File.write(filename, custom_letter) works really smoothly. But I still can only get it to write to the main directory. if I set Dir.mkdir('output') it gives me `mkdir': File exists - output (Errno::EEXIST)
<blazes816> Hanmac: you're thinking of 'a'
<fowl> Hanmac: w and w+ will always truncate the file
<canton7> joofsh, replace line 105 with filename = File.join('output', "thanks_#{line[:last_name]}_#{line[:first_name]}.html")
dmiller has quit [Remote host closed the connection]
igotnolegs has joined #ruby
justinmcp has joined #ruby
dagnachewa has quit [Quit: Leaving]
cj3kim has quit [Quit: This computer has gone to sleep]
ellsworth has joined #ruby
<Hanmac> joofsh use FileUtils.mkdir_p for dir creation ... its safe
bwlang has left #ruby [#ruby]
<joofsh> canton7, that's essentially the same as writing it manually, no? Either way still errors
<joofsh> hanmac, okay i'll try that
philcrissman_ has joined #ruby
<canton7> hrm, it makes sure the directory separator is the same, though it shouldn't matter much.
<canton7> I though the problem was with it not writing files in the output/ directory?
Marwan_ has joined #ruby
joshman_ has quit [Ping timeout: 264 seconds]
philcrissman_ has quit [Remote host closed the connection]
Guedes has joined #ruby
<joofsh> correct. it's something about the Dir.mkdir or something not worrking. Hanmac: i'll try FileUtils
<canton7> well the Dir.mkdir is failing because the output/ folder already exists
NiteRain has quit [Quit: KVIrc 4.1.3 Equilibrium http://www.kvirc.net/]
<Marwan_> hi guys any one know how i can install feedzirra
<blazes816> mkdir_p yo
dmiller has joined #ruby
CarlB_the_great has quit [Remote host closed the connection]
philcrissman has quit [Ping timeout: 264 seconds]
pricees has quit [Quit: leaving]
RichieEvan has joined #ruby
Danielpk has quit [Quit: Danielpk]
<joofsh> canton7: Even when I delete the folder, it still errors. I prob just need to fiddle with it some more. Thanks guys for all your help
<joofsh> It's almost there :)
<canton7> joofsh, the Dir.mkdir errors?
<joofsh> canton7, yes
<canton7> then something's wrong. e.g. you're deleting the wrong folder
<canton7> or the error changes to e.g. a permissions one
<fowl> Marwan_: gem install feedzirra ?
<joofsh> it still creates the new folder, but then errors on that same line, saying it already exist
<joofsh> exists*
<canton7> joofsh, pastie your code, with the mkdir, which is erroring?
awarner has quit [Remote host closed the connection]
<Marwan_> @fowl: doesn't work - i got this error http://imgur.com/aFHX3
<joofsh> http://pastie.org/4670689 line 105
<fowl> Marwan_: the error is a missing libcurl you need to install curl for windows
<Marwan_> fowl: ok how i do that
Takehiro has joined #ruby
<fowl> Marwan_: google
<canton7> fowl, yeah, shocker. that loop goes round 20 times, and each time tries to create the directory. so it succeeds the first time, and fails the second
<Marwan_> fowl: ok thanks man
stopbit has quit [Quit: Leaving]
<canton7> put either Dir.mkdir('output') unless Dir.directory?('output') OR FileUtils.mkdir_p('output') above the loop
hersoy has quit [Ping timeout: 240 seconds]
<canton7> so, on line 100 or so
yasushi has joined #ruby
<joofsh> oh god lol
<joofsh> so obvious
<blazes816> or do both!
ellsworth has quit [Remote host closed the connection]
recycle has quit [Read error: Connection reset by peer]
robustus has quit [Ping timeout: 244 seconds]
mneorr has quit [Quit: Leaving.]
<joofsh> canton7: works perfectly now. Duh, can't have the mkdir inside a loop lol. Thank you so much
<canton7> cool!
<canton7> and it's outputting to the right directory?
Takehiro has quit [Ping timeout: 240 seconds]
<joofsh> yep, it puts all the files in /output
<canton7> sweet
vlad_starkov has joined #ruby
bier has quit [Ping timeout: 252 seconds]
yasushi has quit [Ping timeout: 276 seconds]
hersoy has joined #ruby
<keyvan> attention contractors, i am looking to bring on 2-3 ruby developers with BDD experience (or if you want me to teach you) to help with this rails app. if interested please PM me
stepnem has quit [Ping timeout: 252 seconds]
the_jeebster1 has quit [Quit: Leaving.]
vlad_starkov has quit [Ping timeout: 240 seconds]
GMFlash has quit [Quit: Computer has gone to sleep.]
havenn has joined #ruby
levieraf has quit [Quit: Saliendo]
<rking> keyvan: Pretty generous.
<keyvan> rking: i didnt say how much i can afford to pay, what do you mean?
<Hanmac> keyvan you should try it in #rubyonrails
<keyvan> yep i did thanks Hanmac
<keyvan> accidently did it in #ruby actually, didn't mean to
<rking> keyvan: Actually, I care more about the open-mindedness that would understand that a decent developer could learn something new on the job over plain old open-walletedness.
* Hanmac dont even know that BDD means
<fowl> i could use the money but i never used rails :<
<keyvan> Hanmac: BDD refers to acceptance tests written in cucumber, basically a high level way of testing user experience via "Scenarios" that describe your "Features"
<davidcelis> Hanmac: actually we hate recruiters going in there
<davidcelis> please don't send them to #rubyonrails. thanks
<keyvan> i'm not a recruiter, im a ruby developer.
<davidcelis> what i mean is
<keyvan> big difference i think lol
mneorr has joined #ruby
<davidcelis> people don'tw ant to be recruited there
<fowl> davidcelis: you should know by now we send things that we hate to #rubyonrails
<davidcelis> it's a help channel, not for job acquisition
MasterIdler_ has joined #ruby
MasterIdler_ has quit [Client Quit]
mneorr has left #ruby [#ruby]
recycle has joined #ruby
<keyvan> if it makes you feel any better, nobody PM'd me :P
<Hanmac> we need some kind of #ruby-job channel :P
<keyvan> worked pretty well a couple years back
recycle has quit [Read error: Connection reset by peer]
<trooney> oh damn insuffurable people wanting to hire me all the time!
<trooney> Can't a man walk down the street without being offered a job?
<keyvan> sorry :(
MasterIdler has quit [Ping timeout: 264 seconds]
baphled has quit [Ping timeout: 246 seconds]
Targen has quit [Ping timeout: 244 seconds]
* Hanmac is searching for a job, but he dont want to use rails
pdtpatrick has joined #ruby
naz has joined #ruby
<fowl> ^
bier has joined #ruby
Marwan_ has quit [Quit: Page closed]
<trooney> Oops. Sorry. *takes foot out of mouth*
shadoi has quit [Quit: Leaving.]
<keyvan> fowl: what about RubyMotion :)
cj3kim has joined #ruby
cj3kim has quit [Changing host]
cj3kim has joined #ruby
<fowl> keyvan: this might be shocking but not everybody uses or likes macs
SCommette has quit [Quit: SCommette]
<keyvan> not shocking, my Dad is insistent on using Windows all the time... every time i go visit he asks me for a recommendation for a new comp.. i've stopped bothering to say "get a mac"
<blazes816> shift-option-cmd-lol
Tachyon has joined #ruby
<keyvan> he loves to start conversations with me about Windows 8 and whatever else MS is doing...
<trooney> $ usually throws people off. plus their 15+ years of experience.
johnlcox has quit [Ping timeout: 276 seconds]
<trooney> windows 8 is actually pretty slick, imo
<blazes816> and should be shot
<blazes816> aw, you said 'slick'
<blazes816> now i just sound crazy
<trooney> s/l//g
bigdc1 has quit []
<Hanmac> windows8 does notify microsoft about all Programs you download from the internet (per default)
samflores has joined #ruby
samflores has quit [Client Quit]
GMFlash has joined #ruby
<trooney> does that really matter? everything you do on every device is tracked in some way.
Rochefort has quit [Remote host closed the connection]
eric has joined #ruby
shadoi has joined #ruby
mmitchell has joined #ruby
eric is now known as Guest71629
recycle has joined #ruby
mneorr has joined #ruby
Guest71629 is now known as fumduq
flagg0204 has quit [Quit: leaving]
<Hanmac> trooney imo it shouldnt be allowed
sneakyness_wk has quit [Quit: YOU MUST BACON HARDER]
mneorr has quit [Client Quit]
deryl has joined #ruby
futini has joined #ruby
<Tachyon> I need to make new Hash that has the operators [] and []= redefined. How do i do that ?
mmitchell has quit [Ping timeout: 276 seconds]
CarlB_the_great has joined #ruby
datsik33 has quit [Quit: This computer has gone to sleep]
mrsolo has quit [Quit: Leaving]
<fowl> >> h = {}; def h.[]=(key, value) puts "haha #{key} is not being set to #{value} bcuz im leet" end; h[5] =43; h
bradhe has quit [Read error: Connection reset by peer]
<al2o3cr> (Hash) {}, Console: haha 5 is not being set to 43 bcuz im leet
stkowski has quit [Quit: stkowski]
bradhe has joined #ruby
qwerxy has joined #ruby
kvirani has joined #ruby
<Tachyon> fowl: thx!
kalleth has joined #ruby
specialGuest has quit [Ping timeout: 246 seconds]
juarlex has quit [Ping timeout: 246 seconds]
<deryl> Got news today. Because my adoption was done in Canada, not the US, the USA won't accept the adoption. As a result, all my github repos have been moved from github.com/deryldoucette to under github.com/davidderyldowney [This info is for those following any of my repos]
jlogsdon has quit [Remote host closed the connection]
beneggett has quit [Quit: Computer has gone to sleep.]
mmitchell has joined #ruby
CarlB_the_great has quit [Remote host closed the connection]
punkrawkR has quit [Quit: - nbs-irc 2.39 - www.nbs-irc.net -]
<trooney> deryl: You moved GitHubrepos because of adoption records? Crazy.
dhruvasagar has quit [Ping timeout: 252 seconds]
lkba has quit [Ping timeout: 268 seconds]
CarlB_th_ has joined #ruby
<deryl> trooney: No it was done due to the repos were under my legal name (well legal for canada) since i'm back in the states and so some orgs can't say I'm attempting to hide behind a moniker I changed it to what the US considers my legal name.
<deryl> long story
<davidcelis> wtf is wrong with your name
CarlB_th_ has quit [Remote host closed the connection]
mmitchell has quit [Ping timeout: 276 seconds]
<trooney> davidcelis: i bet jack bauer had him on his list
<blazes816> doucette isn't US friendly perhaps
torarne1 has quit [Ping timeout: 252 seconds]
<davidcelis> that shit hasn't mattered since ellis island
evilsushi has quit [Quit: Lost terminal]
Y_Ichiro has joined #ruby
Y_Ichiro has quit [Changing host]
Y_Ichiro has joined #ruby
kaushik_ has joined #ruby
<trooney> Hmm. My Sinatra app isn't matching routes when running under MiniTest, but works fine in brwoser...
piotr__ has quit [Ping timeout: 246 seconds]
torarne1 has joined #ruby
Nisstyre_ has joined #ruby
cjz has quit [Quit: Leaving.]
ttilley has joined #ruby
fbernier has quit [Ping timeout: 245 seconds]
lkba has joined #ruby
Targen has joined #ruby
emmanuelux has quit [Remote host closed the connection]
fbernier has joined #ruby
c0rn_ has quit [Quit: Computer has gone to sleep.]
Bosma has joined #ruby
bsilvereagle has joined #ruby
<bsilvereagle> I'm sitting in an intro ruby talk right now, and don't want to interupt the presenter. If I know python, does ruby have an distinct advantages?
ezra has quit [Ping timeout: 276 seconds]
brett has left #ruby [#ruby]
recycle has quit [Read error: Connection reset by peer]
<canton7> ruby has blocks
<canton7> and a different approach to stick stuff in the global namespace
<canton7> and no explicit 'self' :P
emmanuelux has joined #ruby
<bsilvereagle> no explicit self is a feature?!
<bsilvereagle> and I guess he hasn't gotten to blocks yet
beneggett has joined #ruby
<canton7> it's a matter of opinion
<canton7> most of the ruby/python "advantages"/"disadvantages" are though tbf
<canton7> some people like the global namespace littered with functions; some don't
<bsilvereagle> alright fair enough. One of his major points is RoR but Python has Django
Takehiro has joined #ruby
<canton7> some like prefer list comprehension to #map
<canton7> mah, I don't agree with that one
GMFlash has quit [Quit: Textual IRC Client: http://www.textualapp.com/]
<canton7> some prefer python's "one obvious way", while others prefer the expresiveness that ruby has, allowing you to make your intentions more clear in your code
horofox has quit [Quit: horofox]
jenrzzz has joined #ruby
<canton7> but python doesn't have blocks, so that's a definitely unarguable feature for ruby :P
<blazes816> some like having the object a method is called on an explicit argument, others know how OOP works
<bsilvereagle> haha valid
cj3kim has quit [Quit: This computer has gone to sleep]
luckyruby has joined #ruby
deryl has quit [Ping timeout: 240 seconds]
<canton7> the thing that annoyed me was when python complained that there's a problem with the 4th argument to a function. but ti's not the 4th, it's the 3rd/5th (can't remember) due to that damn 'self'
saschagehlich has quit [Quit: saschagehlich]
<blazes816> yeah, not cool
headius has quit [Quit: headius]
elaptics is now known as elaptics`away
emmanuelux has quit [Remote host closed the connection]
Takehiro has quit [Ping timeout: 240 seconds]
havenn has quit [Remote host closed the connection]
<bsilvereagle> For an internship, I had to use the Blender Python API and self got me quite a bit. On that note, does a lot of stuff have Ruby API?
<canton7> more and more stuff
cj3kim has joined #ruby
rjsamson has quit [Remote host closed the connection]
cj3kim has quit [Changing host]
cj3kim has joined #ruby
codyrobbins has joined #ruby
<trooney> Am I doing this wrong? Trying to run test on Sinatra app -- ruby tests/test_app.rb (https://github.com/trooney/sinatra_rest)
Danielpk has joined #ruby
deryl has joined #ruby
Synthead has quit [Remote host closed the connection]
<helpa> Hi Tachyon. We in #rubyonrails would really appreciate it if you did not use pastebin during your time with us.
<helpa> Pastebin is not good because it loads slowly for most, has ads which are distracting and has terrible formatting. Please use Gist (http://gist.github.com) or Pastie (http://pastie.org) instead. Thanks!
uris has quit [Quit: leaving]
codyrobbins has left #ruby [#ruby]
<Tachyon> ... I would use another pastebin, i even wanted. But since you recommend it in the topic ...
<drags> why does the bot yell at people for using the pastebin specified in the channel topic?
emmanuelux has joined #ruby
<drags> why does the bot yell at people for using the pastebin specified in the channel topic?
<drags> why does the bot yell at people for using the pastebin specified in the channel topic?
<canton7> and why is it talking about #rubyonrails
<canton7> methinks it's listening in the wrong channel ;)
<Tachyon> anyway... why doesn't the code work, what is the problem with the mutex ?
<Tachyon> hm!
<Tachyon> i'm retarder probably mmnt
<Tachyon> retarded ...
tommyvyo has quit [Quit: Computer has gone to sleep.]
Synthead has joined #ruby
<trooney> Anyone? Help a little noob? :P
<Tachyon> hm no, missing thread class wasn't the problem
recycle has joined #ruby
stretchlimo has quit [Quit: ChatZilla 0.9.88.2 [Firefox 15.0/20120824154833]]
yoklov has joined #ruby
<fowl> whos bot is that
<drags> trooney: what's the output you're getting or not getting?
nateberkopec has quit [Quit: Linkinus - http://linkinus.com]
<drags> fowl: someone trying to be helpful, clearly
<drags> *headdesk*
<fowl> drags: get that rails trash out of here
<drags> not me
<fowl> drags: our rubies are crystal clear and refract light like nothing you've seen before
<trooney> drags: says route not matched. works fine browsing site in rack, but under test just asks me to add the route
<drags> I'm headdesking over people joining their random unaffiliated bots
<drags> trooney: is your rack_env set correctly? (do you have a configure :test block in your app)
<drags> trooney: disclaimer, I'm not actually very good at this stuff, just been working on testing a sinatra app recently :)
blazes816 has quit [Quit: blazes816]
<trooney> drags: better than me. started 5 hours ago :P i have env[rack_env] in test but not app...
blazes816 has joined #ruby
fmcgeough has joined #ruby
daniel_hinojosa1 has quit [Quit: Leaving.]
Vert has quit [Read error: Connection reset by peer]
recycle has quit [Read error: Connection reset by peer]
davidcelis has quit [Quit: K-Lined.]
codyrobbins has joined #ruby
<drags> fowl: fyi, someone with the nick 'Radar' was irc'ing from the same linode host as the helpa bot
vladislav has joined #ruby
<codyrobbins> Is there an easy way to create a sort of proxy object that acts like IO and has a #read method, but which I can pass a block to the way Enumerator works and have the block feed data?
ephemerian has quit [Quit: Leaving.]
joofsh has quit [Ping timeout: 245 seconds]
<codyrobbins> I have a library that expects an IO object to stream data to a server, but I'm building the data on the fly and don't want it to touch the actual filesystem because there's a lot of it.
gfontenot has quit []
bsilvereagle has left #ruby ["WeeChat 0.3.2"]
<mc0e1> pastebin has ads? I'd never noticed.
qwerxy has quit [Quit: offski]
<drags> not everyone runs adblock :)
datsik33 has joined #ruby
vladislav has quit [Client Quit]
<mc0e1> but amongst programmers? surely there's not many?
<drags> some of my coworkers have philosophical stances against adblocking
<drags> front end programmers also need to see ads for their work (why they can't just add exceptions for their own sites.. *le shrug*)
<mc0e1> you can turn it off selectively for sites you work on