apeiros changed the topic of #ruby-lang to: Nick registration required to talk || Ruby 2.0.0-p247: http://ruby-lang.org (Ruby 1.9.3-p448) || Paste >3 lines of text on http://gist.github.com
coca_rails has quit [Read error: Connection reset by peer]
coca_rails has joined #ruby-lang
lun__ has quit [Remote host closed the connection]
coca_rails has quit [Read error: Connection reset by peer]
yfeldblum has joined #ruby-lang
coca_rails has joined #ruby-lang
lun__ has joined #ruby-lang
workmad3 has quit [Ping timeout: 259 seconds]
jasonjmcghee has joined #ruby-lang
havenwood has quit [Ping timeout: 272 seconds]
woollyams has joined #ruby-lang
kitak has quit [Read error: Connection reset by peer]
lun__ has quit [Ping timeout: 265 seconds]
kitak has joined #ruby-lang
albioner has joined #ruby-lang
kurko_ has quit [Quit: Computer has gone to sleep.]
bzb has quit [Read error: Connection reset by peer]
arooni-mobile has quit [Ping timeout: 272 seconds]
elia has quit [Quit: Computer has gone to sleep.]
symm- has joined #ruby-lang
hogeo has joined #ruby-lang
CoreData has quit [Ping timeout: 245 seconds]
cnivolle has quit [Remote host closed the connection]
Thanatermesis has quit [Quit: ɯlɐɔ uı ʞɹoʍ oʇ ƃuıoƃ]
earthquake has quit [Quit: earthquake]
CoreData has joined #ruby-lang
coca_rails has quit [Remote host closed the connection]
coca_rails has joined #ruby-lang
|jemc| has quit [Ping timeout: 246 seconds]
Johz has quit [Quit: Leaving]
__butch__ has quit [Quit: Leaving.]
datanoise has quit [Ping timeout: 240 seconds]
marr has quit [Ping timeout: 246 seconds]
bf4 has joined #ruby-lang
Cakey has joined #ruby-lang
a1ph4g33k has quit [Quit: Leaving]
bzb has joined #ruby-lang
Cakey has quit [Ping timeout: 264 seconds]
coca_rails has quit [Remote host closed the connection]
KM has quit [Read error: Connection reset by peer]
kitak has quit [Read error: Connection reset by peer]
kitak has joined #ruby-lang
jasonjmcghee has joined #ruby-lang
coca_rails has joined #ruby-lang
tylersmith has quit [Remote host closed the connection]
datanoise has quit [Ping timeout: 272 seconds]
jackhammer2022 has quit [Quit: Computer has gone to sleep.]
sevvie has quit [Ping timeout: 246 seconds]
Cakey has joined #ruby-lang
bzb has quit [Remote host closed the connection]
saarinen has quit [Quit: saarinen]
earthquake has joined #ruby-lang
micalexander has joined #ruby-lang
<micalexander>
Whats the diff between require 'Capitalize' vs require 'lowercase'?
<micalexander>
It almost seems as if one requires the class and the other the file
<micalexander>
idk tho
datanoise has joined #ruby-lang
<lianj>
micalexander: nothing
saarinen has joined #ruby-lang
<lianj>
with bad luck youre even on a case insensitive fs
<drbrain>
micalexander: ↑
sevvie has joined #ruby-lang
bastilian has quit [Read error: Connection reset by peer]
<micalexander>
Well when I have a module with a global variable in it in a file called variable.rb when I require 'Variable' it throws an error "already initialized constant" and "previous definition of VARIABLE was here". But when i require 'variable' no error and everything works fine
iliketurtles has joined #ruby-lang
jasonjmcghee has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
Cakey has quit [Ping timeout: 246 seconds]
jasonjmcghee has joined #ruby-lang
makarakao has joined #ruby-lang
coca_rails has quit [Remote host closed the connection]
coca_rails has joined #ruby-lang
|jemc| has joined #ruby-lang
hogeo has quit [Remote host closed the connection]
momomomomo has quit [Quit: momomomomo]
jasonjmcghee has quit [Ping timeout: 264 seconds]
<drbrain>
ruby is case sensitive but your file system is not
<drbrain>
require 'foo'; require 'foo' does not load the contents of foo.rb twice
coca_rails has quit [Ping timeout: 245 seconds]
tlewin has joined #ruby-lang
kurko_ has joined #ruby-lang
hogeo has joined #ruby-lang
yfeldblu_ has joined #ruby-lang
<micalexander>
drbrain: so why would require 'Foo' load twice if its something totally diff?
kurko_ has quit [Client Quit]
<drbrain>
micalexander: what OS are you on?
<micalexander>
os x
CaptainJet has joined #ruby-lang
<drbrain>
on OS X, if you have 'foo.rb' you also have 'Foo.rb'
<drbrain>
(by default)
<drbrain>
so they are the same file, thus the warnings
yfeldblum has quit [Ping timeout: 260 seconds]
<drbrain>
bus time for me
yfeldblu_ has quit [Ping timeout: 245 seconds]
jhulten_ has quit [Remote host closed the connection]
brianpWins has quit [Quit: brianpWins]
jhulten has joined #ruby-lang
nverba has quit [Remote host closed the connection]
chad_ has quit [Quit: Leaving.]
kitak has quit [Remote host closed the connection]
kitak has joined #ruby-lang
jhulten has quit [Ping timeout: 240 seconds]
kitak has quit [Read error: Connection reset by peer]
kitak has joined #ruby-lang
fuhgeddaboudit has joined #ruby-lang
bzalasky has joined #ruby-lang
bzalasky has quit [Remote host closed the connection]
bzalasky has joined #ruby-lang
CaptainJet has quit []
vlad_starkov has joined #ruby-lang
knu has quit [Ping timeout: 246 seconds]
bzalasky has quit [Ping timeout: 240 seconds]
mannyt has quit [Quit: mannyt]
jasonobject has joined #ruby-lang
brianpWins has joined #ruby-lang
jithu has joined #ruby-lang
vpretzel has quit [Quit: Adios!]
dhruvasagar has joined #ruby-lang
iliketurtles has quit [Quit: zzzzz…..]
Technodrome has joined #ruby-lang
<Technodrome>
Good day
jasonobject has quit [Client Quit]
rickhull1 has quit [Quit: Leaving.]
woollyams has quit [Ping timeout: 252 seconds]
jonahR has joined #ruby-lang
cored has quit [Ping timeout: 240 seconds]
woollyams has joined #ruby-lang
<joevandyk>
is autoload threadsafe in 2.0?
<joevandyk>
so much conflicting information. wondering if I can enable threads in development mode on rails 4 and mri 2.0. the jruby channel says i can with jruby.
saarinen has quit [Quit: saarinen]
iliketurtles has joined #ruby-lang
r0bby_ has quit [Ping timeout: 245 seconds]
lsegal has joined #ruby-lang
dingus_khan has quit [Remote host closed the connection]
dingus_khan has joined #ruby-lang
earthquake has quit [Quit: earthquake]
chad_ has joined #ruby-lang
chad_ has joined #ruby-lang
chad_ has quit [Changing host]
<RickHull>
autoload is an antifeature imho
jithu has quit [Quit: Mother, did it need to be so high?]
<RickHull>
what's so hard about declaring your dependencies?
dingus_khan has quit [Ping timeout: 260 seconds]
<RickHull>
maybe a nice dev-only feature for hot reloads and such
chad_ has left #ruby-lang [#ruby-lang]
<drbrain>
RickHull: autoload isn't about reloading
<RickHull>
conceding i might have the wrong idea. but this is the thing that looks for undeclared constants and symbols
<RickHull>
and tries to map them to source code
<RickHull>
and require the source code for you?
<drbrain>
maybe in Rails?
<RickHull>
i do have a rails-ism in mind
<drbrain>
in ruby autoload declares a mapping between a constant and a file
<drbrain>
when you try to look up an unloaded constant ruby requires the file automatically
<RickHull>
yeah, i can see the attraction, but definitely an antifeature imho
<drbrain>
it lets you present a nice require interface to users
<drbrain>
require 'top_level'
mistym has joined #ruby-lang
<RickHull>
if you've got a source code file with Foo, and you haven't declared Foo, and nothing in your requires have declared Foo, you have a bug
dhruvasagar has quit [Ping timeout: 260 seconds]
<RickHull>
i've never had a problem with that
<drbrain>
autoload declares foo
<drbrain>
I have that problem in rdoc
jarib has quit [Ping timeout: 252 seconds]
<drbrain>
I don't want people to be requiring random files to load seldom-used features
<RickHull>
conditional requires, maybe
<drbrain>
especially if they load the wrong thing first and get circular require errors
<RickHull>
but ok, i can see where this can go
<drbrain>
if it's a commonly used constant, no need for autoload
io_syl has quit [Ping timeout: 272 seconds]
<RickHull>
i think the feature sweeps structural problems under the rug, and ultimately trades for other problems
<RickHull>
and if i were king, i would fix the structural problems
<drbrain>
if your requires aren't structured right autoload probably won't fix your problem
tylersmith has joined #ruby-lang
<RickHull>
it might look like it does, though
<drbrain>
yep
vlad_starkov has quit [Ping timeout: 240 seconds]
tylersmith has quit [Remote host closed the connection]
<RickHull>
this maxim has never caused me any heartache: without using autoload or anything like it, every .rb file inside lib should "stand on its own"
<RickHull>
we can talk about what the last quote means, but it should be fairly clear
tylersmith has joined #ruby-lang
<drbrain>
yeah
lfox has joined #ruby-lang
<drbrain>
you have to get to "stand on its own" before you can apply autoload
<drbrain>
sanely, anyhow
<RickHull>
but the very fact of autoload, doesn't it tend to take away the pain of not upholding the maxim?
<drbrain>
no, because if you don't follow it you get the same NameErrors for missing constants
<RickHull>
hm, ok. i think i do have the wrong idea, then. at least a little bit
<drbrain>
your fears are well founded
Technodrome has quit [Quit: Technodrome]
<drbrain>
if foo/bar defines Foo::Bar and Foo::Baz, autoload won't help you load Baz
<drbrain>
well, you can autoload two constants onto the same file, but that's as much a bad habit as thinking the user will know to require 'foo/bar' to get Foo::Baz
<RickHull>
ok. i had in mind that autoload facilitates lazy developers. but it actually is a sort of runtime optimization
<drbrain>
autoload is a different beast in Rails
mannyt has joined #ruby-lang
<RickHull>
would you say that, in keeping with my maxim, autoload provides the benefit of declaring your requires, while only actually requiring them conditionally, as needed?
<drbrain>
yes
<RickHull>
cool, TIL
<RickHull>
is it baked in to ruby x.x ?
<drbrain>
IMO, it only makes sense to use autoload when you have large parts of your library that aren't commonly used
<drbrain>
back to 1.8.7
<drbrain>
(at least)
fijimunkii has quit [Ping timeout: 246 seconds]
<drbrain>
using autoload when those files are going to be required within ms of the autoload declaration is just plain silly
jithu has joined #ruby-lang
<RickHull>
any concrete downside besides silliness?
<RickHull>
(don't worry i'm not about to go on an awk/sed spree)
bf4 has joined #ruby-lang
<drbrain>
not that I know of
<drbrain>
maybe in 1.8.7 it's not thread safe
<RickHull>
i like the fact of the very semantics that seem to say, "this is not commonly used"
sevvie has quit [Read error: Connection reset by peer]
datanoise has joined #ruby-lang
sepp2k has joined #ruby-lang
datanoise has quit [Ping timeout: 272 seconds]
jaimef has joined #ruby-lang
cored has joined #ruby-lang
nofxx has joined #ruby-lang
jsullivandigs has joined #ruby-lang
jsullivandigs has quit [Ping timeout: 264 seconds]
RickHull has quit [Quit: Leaving.]
symm- has quit [Ping timeout: 245 seconds]
moonglum has joined #ruby-lang
cored has quit [Quit: leaving]
banisterfiend has quit [Quit: Computer has gone to sleep.]
skade has joined #ruby-lang
elia has joined #ruby-lang
dhruvasagar has quit [Read error: Connection reset by peer]
tbuehlmann has quit [Ping timeout: 264 seconds]
<yorickpeterse>
herro
mdedetrich has joined #ruby-lang
<gnufied>
seriously,
<gnufied>
it is veery quite here today
<yorickpeterse>
I worked from home in the morning, infra changes
<yorickpeterse>
so that probably explains
banisterfiend has joined #ruby-lang
skade has quit [Quit: Computer has gone to sleep.]
kitak has quit [Remote host closed the connection]
flip_digits has joined #ruby-lang
r0bglees0n has joined #ruby-lang
tylersmith has joined #ruby-lang
lun__ has joined #ruby-lang
Mon_Ouie has joined #ruby-lang
tylersmith has quit [Ping timeout: 272 seconds]
tbuehlmann has joined #ruby-lang
lun__ has quit [Ping timeout: 246 seconds]
DouweM has joined #ruby-lang
elia has quit [Quit: Computer has gone to sleep.]
nofxx has quit [Ping timeout: 260 seconds]
mbj has quit [Read error: Operation timed out]
ecnalyr has joined #ruby-lang
datanoise has joined #ruby-lang
elia has joined #ruby-lang
datanoise has quit [Ping timeout: 246 seconds]
hogeo has quit [Remote host closed the connection]
hogeo has joined #ruby-lang
marr has quit [Ping timeout: 272 seconds]
jarib has joined #ruby-lang
mucker has quit [Remote host closed the connection]
mucker has joined #ruby-lang
toretore has joined #ruby-lang
Johz has joined #ruby-lang
hogeo has quit [Ping timeout: 272 seconds]
flip_digits has quit []
mucker has quit [Ping timeout: 261 seconds]
madog has joined #ruby-lang
priodev has quit [Ping timeout: 245 seconds]
mucker has joined #ruby-lang
mistym has joined #ruby-lang
vondruch has quit [Ping timeout: 264 seconds]
skade has joined #ruby-lang
jonahR has joined #ruby-lang
tlewin has joined #ruby-lang
elia has quit [Quit: Computer has gone to sleep.]
vondruch has joined #ruby-lang
ItSANgo has joined #ruby-lang
jiuweigui has joined #ruby-lang
retro|cz has joined #ruby-lang
marr has joined #ruby-lang
Technodrome has joined #ruby-lang
<Technodrome>
Good day
vlad_starkov has joined #ruby-lang
mistym has quit [Remote host closed the connection]
SteveBenner9 has quit [Quit: Leaving]
SteveBenner9 has joined #ruby-lang
priodev has joined #ruby-lang
elia has joined #ruby-lang
tylersmith has joined #ruby-lang
jonahR has quit [Quit: jonahR]
<yorickpeterse>
today's best Mongoid hack:
<yorickpeterse>
field :_type, :type => String # fuck you inheritence nonsense
<yorickpeterse>
(using an inherited model outside of the app where the subclasses are not available, this breaks by default)
jonahR has joined #ruby-lang
tylersmith has quit [Ping timeout: 245 seconds]
jonahR has quit [Client Quit]
Snibble has joined #ruby-lang
imperator has joined #ruby-lang
vpretzel has joined #ruby-lang
<imperator>
good morning
sevvie has joined #ruby-lang
sevvie has quit [Read error: Connection reset by peer]
jsullivandigs has joined #ruby-lang
breakingthings has joined #ruby-lang
mistym has joined #ruby-lang
mistym has quit [Remote host closed the connection]
jsullivandigs has quit [Ping timeout: 240 seconds]
atmosx has joined #ruby-lang
hogeo has joined #ruby-lang
yalue has joined #ruby-lang
fijimunkii has joined #ruby-lang
cnivolle_ has joined #ruby-lang
tomzx_mac has joined #ruby-lang
cnivolle_ has quit [Remote host closed the connection]
cnivolle_ has joined #ruby-lang
cnivolle has quit [Ping timeout: 253 seconds]
dhruvasagar has joined #ruby-lang
DEac- has quit [Ping timeout: 246 seconds]
DEac- has joined #ruby-lang
csaunders_ has quit [Remote host closed the connection]
mistym has joined #ruby-lang
shinnya has joined #ruby-lang
csaunders has joined #ruby-lang
vlad_starkov has quit [Remote host closed the connection]
Olipro has quit [Ping timeout: 246 seconds]
mistym has quit [Quit: Leaving...]
mistym has joined #ruby-lang
arooni-mobile has joined #ruby-lang
Olipro has joined #ruby-lang
ItSANgo has quit [Ping timeout: 246 seconds]
wmoxam_ has quit [Quit: leaving]
wmoxam has joined #ruby-lang
wmoxam has quit [Changing host]
wmoxam has joined #ruby-lang
Olipro has quit [Ping timeout: 246 seconds]
arooni-mobile has quit [Ping timeout: 240 seconds]
nigerianceo has joined #ruby-lang
yfeldblu_ has joined #ruby-lang
yfeldblum has quit [Ping timeout: 260 seconds]
tylersmith has joined #ruby-lang
<ljarvis>
hi
fuhgeddaboudit has joined #ruby-lang
io_syl has joined #ruby-lang
mdedetrich has quit [Quit: Computer has gone to sleep.]
tkuchiki_ has quit [Remote host closed the connection]
tkuchiki has joined #ruby-lang
tylersmith has quit [Ping timeout: 265 seconds]
hogeo has quit [Remote host closed the connection]
<yorickpeterse>
oh nice, pretty important features that appear to be broken
<yorickpeterse>
quite possibly for quite some time
<ljarvis>
yay
<yorickpeterse>
though I can't rule out not seeing some hidden HTTP request somewhere that still does it
<ljarvis>
field :_type
<ljarvis>
D:
<yorickpeterse>
haha it's my best hack
tkuchiki has quit [Ping timeout: 240 seconds]
<ljarvis>
this is to get around sti?
<yorickpeterse>
tl;dr: if _type is set to, say, "Foo::Bar" it will try to use the root Foo class
<yorickpeterse>
which is fine if you actually have that one
<yorickpeterse>
This particular project however does not
<yorickpeterse>
(and has no need for it either)
<ljarvis>
mongoid uses type for sti too?
<yorickpeterse>
yap
<yorickpeterse>
I'd probably be better off using the raw mongo driver here but meh
<tbuehlmann>
can't you disable the search for 'type' like in AR for STI?
<yorickpeterse>
tbuehlmann: not that I know of
<ljarvis>
yeah you can
<yorickpeterse>
oh?
<ljarvis>
but it's not ideal
<tbuehlmann>
in mongoid?
<ljarvis>
oh sorry for mongoid
<ljarvis>
my bad its monday
<tbuehlmann>
:D
<ljarvis>
I usually end up with 'table_prefix'_type
<ljarvis>
ie users_type
<ljarvis>
which is not ideal, but beats _type
momomomomo has joined #ruby-lang
datanoise has joined #ruby-lang
arooni-mobile has joined #ruby-lang
VTLob has joined #ruby-lang
yfeldblu_ has quit [Remote host closed the connection]
yfeldblum has joined #ruby-lang
skade has quit [Quit: Computer has gone to sleep.]
bjh13 has joined #ruby-lang
datanoise has quit [Ping timeout: 246 seconds]
<micalexander>
Hey is there a way to store the the mysql access denied error to a variable instead of having it output to the terminal so I can do something with it (provide a prettier error)?
<ljarvis>
micalexander: rescue the exception and then you can do what you want with it
<micalexander>
ljarvis: and it wont output to the terminal?
<micalexander>
can you provide a simple example by chance?
<ljarvis>
micalexander: what's your current code?
datanoise has joined #ruby-lang
Mon_Ouie has quit [Ping timeout: 272 seconds]
jonahR has joined #ruby-lang
<micalexander>
dont have anything yet just trying to conceptialize a way to attempt to login as root and but check if user and pass are correct first
<ljarvis>
with what library?
<micalexander>
ljarvis: just straight up, could not find a library that would allow me to mysqldump and import
<micalexander>
yorickpeterse: standard output I believe
benlovell has joined #ruby-lang
<micalexander>
It's a standard MySQL access denied error that starts with an error code
mistym has joined #ruby-lang
<yorickpeterse>
paste the error in a pastebin
<yorickpeterse>
the full thing
<yorickpeterse>
(trim any passwords w/e if needed)
<micalexander>
I'm driving right now you have to give me a second
lfox has joined #ruby-lang
<waxjar>
dont ruby and drive :p
<yorickpeterse>
micalexander: get off IRC already
<yorickpeterse>
for your own darn safety
rippa has joined #ruby-lang
micalexander has quit [Remote host closed the connection]
<momomomomo>
That's the first time I've seen someone irc and drive
<yorickpeterse>
second time for me
<yorickpeterse>
in this channel
<yorickpeterse>
oh no wait, that was another one
elia has quit [Quit: Computer has gone to sleep.]
aley has joined #ruby-lang
bf4 has joined #ruby-lang
tylersmith has joined #ruby-lang
jsullivandigs has joined #ruby-lang
bjh13 has quit [Quit: leaving]
tylersmith has quit [Ping timeout: 244 seconds]
wallerdev has joined #ruby-lang
wallerdev has quit [Client Quit]
wallerdev has joined #ruby-lang
jsullivandigs has quit [Ping timeout: 244 seconds]
elia has joined #ruby-lang
imperator has quit [Quit: Valete!]
vlad_starkov has joined #ruby-lang
bzalasky has quit [Remote host closed the connection]
bzalasky has joined #ruby-lang
micalexander has joined #ruby-lang
WeirdThall has joined #ruby-lang
Cakey has joined #ruby-lang
bjh13 has joined #ruby-lang
vlad_starkov has quit [Remote host closed the connection]
micalexander has quit [Remote host closed the connection]
bzalasky has quit [Ping timeout: 272 seconds]
<WeirdThall>
Hey guys, me again :P. Having some issues with usernames etc with freenode. I have a bit of code https://gist.github.com/weirdthall/aafccb68d569f9fe24ef setup and wanted to change it to the user's nick like WeirdThall not b0192692 like it does atm.
aley has quit [Quit: aley]
<WeirdThall>
Do I change the (username) to (user(nick))?
vlad_starkov has joined #ruby-lang
verto has joined #ruby-lang
vlad_starkov has quit [Remote host closed the connection]
<ljarvis>
WeirdThall: what library are you using?
<ljarvis>
cinch
<ljarvis>
right
<WeirdThall>
it uses cinch yeah
<ljarvis>
im confused at what you want still
<ljarvis>
dominikh: doesn't cinch have a better way to lookup users? like User(nick) or something
<ljarvis>
i forgot
bzalasky has joined #ruby-lang
heftig has quit [Quit: Quitting]
<WeirdThall>
its the bitbot irc bot framework, it hold users in a database and on geekshed it held users as their nick but here is holds them as a random number like INFO here shows me as WeirdThall!b019269@blahblahblah rather than just WeirdThall so my bot holds the b0192... in the database
<WeirdThall>
rather than my nick
micalexander has joined #ruby-lang
<micalexander>
yorickpeterse: ha, what you dont ruby n roll?
bzalasky has quit [Remote host closed the connection]
<micalexander>
yorickpeterse: ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: YES)
bzalasky has joined #ruby-lang
bin7me has quit [Read error: Operation timed out]
<micalexander>
that is the error. It is a mysql error that you get when you do mysql -hlocalhost -uuser -ppass, and the password is wrong
tlewin has quit [Ping timeout: 246 seconds]
<ljarvis>
WeirdThall: oh right, you just need to ignore the bots name
<ljarvis>
WeirdThall: clearly bitbot does not do that itself (maybe that's a good reason to contribute and send them a pull request?)
<WeirdThall>
sorry...not understanding how that helps the issue?
bzalasky has quit [Ping timeout: 260 seconds]
lfox has quit [Ping timeout: 272 seconds]
michd is now known as MichD
shinnya has quit [Ping timeout: 246 seconds]
bryno is now known as bri
<yorickpeterse>
micalexander: ... wait
|jemc| has joined #ruby-lang
<yorickpeterse>
micalexander: do you get this error when you run mysql from the CLI or from a Ruby script?
<micalexander>
both, because Im just shelling it out in my ruby script
<yorickpeterse>
check the exit status
<yorickpeterse>
exit 1 means its borken
<yorickpeterse>
if you catch STDERR you can do whatever you want with it
<yorickpeterse>
HOWEVER
<ljarvis>
exit not 0*
<yorickpeterse>
You really shouldn't have to shell out for MySQL
enebo has joined #ruby-lang
<micalexander>
I guess that is what Im asking how do I catch it
<yorickpeterse>
don't shell out for a bloody database query
<micalexander>
yorickpeterse: there is no other way to do a dump or import
<micalexander>
that library doesnt allow for that
<micalexander>
I looked
<micalexander>
obly selects etc
<micalexander>
cause mysqldump is external
tlewin has joined #ruby-lang
<micalexander>
aswell as imports, as far as I can find
<yorickpeterse>
eh, mysqldump basically just does a select all on every table
<yorickpeterse>
you can do that in ruby quite easily
vsorlov has joined #ruby-lang
cads has quit [Ping timeout: 260 seconds]
<micalexander>
yeah, but is it going to expot it to the sql file withe the correct statements on it, as in an actual dump. Theres a lot of crazy crap on it
<Siyfion>
If I want to have a private ruby "application" that does some processing on AWS, what's the best way to package this app? Build it as a Gem (but don't release it)? Simple scripts..?
dagobah has quit [Remote host closed the connection]
atmosx has quit [Quit: Lost in trance]
<Siyfion>
Essentially, I love the look of the "Prawn" PDF library...
<yorickpeterse>
Heroku is probably the easiest
<Siyfion>
I want to use it to generate PDFs for my customers; and I'll be using JSON primarily... Ruby seemed like a good fit
<Siyfion>
(Node.js would have been better, but the PDF library's just aren't "there" yet.)
Guest57771 has left #ruby-lang [#ruby-lang]
<yorickpeterse>
You can do that on Heroku as long as you don't save the files on the server itself (read-only filesystem)
iliketurtles has joined #ruby-lang
benwoody has joined #ruby-lang
<yorickpeterse>
On AWS, there are a million ways to host and deploy applications
<Siyfion>
yorickpeterse: Heroku... What do they offer in terms of non-web apps?
<Siyfion>
Really I'm asking a more fundamental question.. What's the best way to make a non-web Ruby app?
<Siyfion>
(That *isn't* a public Gem)
<yorickpeterse>
it's not much different from web apps
<yorickpeterse>
for the most part you can just follow the standard Gem structure
Snibble has joined #ruby-lang
brianpWins has quit [Quit: brianpWins]
diegoviola has quit [Ping timeout: 248 seconds]
<Siyfion>
Okay, cool.
<Siyfion>
So using something like jeweler would be a good idea?
__butch__ has joined #ruby-lang
vlad_starkov has joined #ruby-lang
<yorickpeterse>
never was much of a fan of those tools, it's just a bunch of directories you create
<Siyfion>
As a complete novice to Ruby, I was just looking for a more "templated" approach, to stop me doing anything too crazy-stupid.
<yorickpeterse>
NoMethodError: undefined method `queues' for #<AWS::SQS:0x00000001274060>
<yorickpeterse>
HOW'S THAT EVEN POSSIBLE?
tlewin has joined #ruby-lang
<yorickpeterse>
Probs a race condition or something
yfeldblum has quit [Ping timeout: 245 seconds]
toretore has quit [Quit: Leaving]
yfeldblu_ has quit [Read error: Connection reset by peer]
Snibble has quit [Quit: Leaving.]
MichD is now known as michd
therealtesseract has joined #ruby-lang
tbuehlmann has quit [Quit: Konversation terminated!]
jhulten has joined #ruby-lang
SteveBenner9 has quit [Ping timeout: 272 seconds]
Mon_Ouie has joined #ruby-lang
<Siyfion>
yorickpeterse: Ewww... I'm hoping I don't have to deal with those sort of errors. :\
<Siyfion>
I'm using AWS SQS in my Ruby app :S
<yorickpeterse>
unlikely
<yorickpeterse>
I'm doing webscale stuff right here
<yorickpeterse>
(lol)
jonahR has joined #ruby-lang
<yorickpeterse>
oh they have an eager load option, that might be useful
elia has quit [Ping timeout: 264 seconds]
jonahR is now known as jonahoffline
apeiros has joined #ruby-lang
<yorickpeterse>
oh shoot I forgot the alarm
<yorickpeterse>
I have 10 minutes to get out of here
MaddinXx has quit [Quit: Leaving...]
mistym has quit [Remote host closed the connection]
brianpWins has joined #ruby-lang
brianpWins has quit [Client Quit]
Siyfion has quit [Ping timeout: 264 seconds]
ikawnoclast has quit [Quit: ikawnoclast]
bdnchr has joined #ruby-lang
<bf4>
Sifion a rubygem is just a compressed folder with some metadata in it. gem install gets that tarball from rubygems.org
<bf4>
so, as long as you keep your source code private and don't publish your code anywhere, it's private
<bf4>
drat * Siyfion
iliketurtles has joined #ruby-lang
ikawnoclast has joined #ruby-lang
<bf4>
a gem, per se, is just a packaged library written in ruby and yaml. so, no need to make a gem
ikawnoclast has quit [Client Quit]
mbj has joined #ruby-lang
bdnchr has quit [Remote host closed the connection]
bdnchr has joined #ruby-lang
<apeiros>
making it a gem may still make sense @ bf4
<apeiros>
we have over a dozen private gems at my workplace
earthquake has joined #ruby-lang
Snibble has joined #ruby-lang
rickhull1 has joined #ruby-lang
ikawnoclast has joined #ruby-lang
ikawnoclast has quit [Client Quit]
__butch__1 has joined #ruby-lang
__butch__ has quit [Ping timeout: 240 seconds]
tylersmith has joined #ruby-lang
kirin` has quit [Ping timeout: 245 seconds]
tylersmith has quit [Remote host closed the connection]
vlad_starkov has quit [Remote host closed the connection]
mistym has joined #ruby-lang
kirin` has joined #ruby-lang
momomomomo has quit [Quit: momomomomo]
havenwood has quit []
tylersmith has joined #ruby-lang
symm- has quit [Ping timeout: 272 seconds]
vlad_starkov has joined #ruby-lang
banisterfiend has quit [Quit: Computer has gone to sleep.]
banisterfiend has joined #ruby-lang
jaimef has quit [Remote host closed the connection]
mistym_ has joined #ruby-lang
lun__ has joined #ruby-lang
joelroa has joined #ruby-lang
franckverrot has quit [Remote host closed the connection]
pipecloud has quit [Remote host closed the connection]
grandy has quit [Remote host closed the connection]
herpless has quit [Read error: Connection reset by peer]
randym_ has quit [Remote host closed the connection]
Guest85414___ has quit [Write error: Broken pipe]
<bf4>
apeiros, yeah, if you want to use it as a library, but if you're just writing an app, what's the point?
mistym has quit [Ping timeout: 248 seconds]
<apeiros>
same thing as `use it as a library`. easy to distribute, install and update. -distribute if you're on a single machine.
colstrom has quit [Remote host closed the connection]
chickenflu has quit [Remote host closed the connection]
beawesomeinstead has quit [Remote host closed the connection]
akahn has quit [Remote host closed the connection]
Domon_ has quit [Remote host closed the connection]
L0rdShrek_____ has quit [Remote host closed the connection]
kitallis-cloud has quit [Remote host closed the connection]
Naeblis has quit [Remote host closed the connection]
momomomomo has joined #ruby-lang
chickenflu has joined #ruby-lang
_rgn has quit [Remote host closed the connection]
vivekrai has quit [Remote host closed the connection]
shaileshg_ has quit [Remote host closed the connection]
jds has quit [Remote host closed the connection]
ggherdov has quit [Remote host closed the connection]
kitallis-cloud has joined #ruby-lang
sepp2k has joined #ruby-lang
_rgn has joined #ruby-lang
vsorlov_ has joined #ruby-lang
banisterfiend has quit [Quit: Computer has gone to sleep.]
vsorlov_ has quit [Client Quit]
banisterfiend has joined #ruby-lang
MrZYX|off is now known as MrZYX
<banisterfiend>
anyone here got an MBA 2013 ? is the battery as good as they say?
<apeiros>
banisterfiend: check whether anandtech or arstechnica has a review. those are usually pretty good.
ikawnoclast has joined #ruby-lang
beawesomeinstead has joined #ruby-lang
<banisterfiend>
apeiros thx, are you on mba 13 or 11 btw?
<apeiros>
I'm on a 15" MBP retina now. my wife got my MBA ;-)
<apeiros>
banisterfiend: remember though that battery depends highly on your usage. on my old MBA (2011 I think) I had ~4h of video or ~10h of ruby coding
hahuang65 has joined #ruby-lang
<apeiros>
and that one was rated ~7h by apple
<banisterfiend>
apeiros oh, the new MBA 2013 is supposed to have a 12 hour battery
<banisterfiend>
which is pretty damn incredible..
<apeiros>
yupp
<apeiros>
I'd expect >16h of ruby coding on it
akahn has joined #ruby-lang
<apeiros>
and since hardware video decoding got better, it might even do better than just linearly increase video playback time
<apeiros>
but as said, ars & anand usually do such testing rather throughly
ecnalyr has joined #ruby-lang
dostoyevsky has joined #ruby-lang
Guest85414___ has joined #ruby-lang
L0rdShrek_____ has joined #ruby-lang
<dostoyevsky>
Is there a more reliable way to do this: n = Time.now.to_i; month_secs = 60*60*24*32; [n, n - month_secs, n - 2 * month_secs].map {|s| Time.at(s).strftime("%m") }
vlad_starkov has quit [Remote host closed the connection]
loincloth has quit [Remote host closed the connection]
loincloth has joined #ruby-lang
<Technodrome>
apeiros: you running mavericks?
<apeiros>
Technodrome: yes
<Technodrome>
good , even better battery then :)
<Technodrome>
you a chrome user or safari?
<apeiros>
yeah, well, my MBR already has quite a few cycles on the battery :-/
<cout>
Technodrome: bah, maverick meerkat is old :)
<Technodrome>
chrome drains the battery
<Technodrome>
safari you can probably get an extra hour or so
<apeiros>
usually safari
loincloth has quit [Ping timeout: 246 seconds]
<apeiros>
damn, already 450 cycles on the battery =(
<Technodrome>
i need to use more safari honestly
Pupeno has quit [Ping timeout: 272 seconds]
solars has joined #ruby-lang
pipecloud has joined #ruby-lang
loincloth has joined #ruby-lang
arooni-mobile__ has quit [Ping timeout: 272 seconds]
randym_ has joined #ruby-lang
<Technodrome>
chrome just kills it
Naeblis has joined #ruby-lang
grandy has joined #ruby-lang
lfox has quit [Quit: ZZZzzz…]
vivekrai has joined #ruby-lang
cnivolle_ has joined #ruby-lang
therealtessera-1 has joined #ruby-lang
therealtesseract has quit [Read error: Operation timed out]
ggherdov has joined #ruby-lang
Domon_ has joined #ruby-lang
cnivolle has quit [Ping timeout: 252 seconds]
cnivolle_ has quit [Ping timeout: 252 seconds]
lfox has joined #ruby-lang
UziMonkey has quit [Remote host closed the connection]
pkondzior___ has quit [Remote host closed the connection]
ecnalyr has joined #ruby-lang
banisterfiend has quit [Quit: Computer has gone to sleep.]
__butch__ has joined #ruby-lang
banisterfiend has joined #ruby-lang
pkondzior___ has joined #ruby-lang
<Technodrome>
yeah man, damn , chrome kills the shit
jaimef has joined #ruby-lang
__butch__1 has quit [Ping timeout: 264 seconds]
shaileshg_ has joined #ruby-lang
ecnalyr has quit [Ping timeout: 245 seconds]
jds has joined #ruby-lang
colstrom has joined #ruby-lang
lfox has quit [Ping timeout: 248 seconds]
ecnalyr has joined #ruby-lang
UziMonkey has joined #ruby-lang
jds_ has joined #ruby-lang
jiuweigui has quit [Quit: iQuit!]
Snibble has quit [Quit: Leaving.]
havenwood has joined #ruby-lang
rippa has quit [Quit: {#`%${%&`+'${`%&NO CARRIER]
vlad_starkov has joined #ruby-lang
efrainolivares_ has joined #ruby-lang
efrainolivares has quit [Ping timeout: 245 seconds]
vlad_sta_ has joined #ruby-lang
momomomomo has joined #ruby-lang
CoreData has joined #ruby-lang
vlad_starkov has quit [Ping timeout: 245 seconds]
jaimef has quit [Remote host closed the connection]
jaimef has joined #ruby-lang
benwoody has quit [Quit: benwoody]
<dostoyevsky>
When I want to pass on a block, do I pass it on as &block or block?
jonahoffline has quit [Ping timeout: 246 seconds]
CoreData has quit [Quit: CoreData]
CoreData has joined #ruby-lang
<banisterfiend>
dostoyevsky &block
CoreData has quit [Client Quit]
<MrZYX>
dostoyevsky: block would pass it on as a proc
<banisterfiend>
MrZYX hello
CoreData has joined #ruby-lang
<MrZYX>
hey
<dostoyevsky>
Ok... but when I call the block I do block.call()... without the &..
<MrZYX>
because if you call it that way, you call a proc
<banisterfiend>
MrZYX do u have tmate.io instaled?
Cakey has joined #ruby-lang
<MrZYX>
nope
<MrZYX>
(never heard of)
<MrZYX>
dostoyevsky: if you capture a block with def foo(&block) it gets converted into a Proc object
<MrZYX>
and assigned to the local variable block
thepumpkin has quit [Ping timeout: 272 seconds]
<MrZYX>
banisterfiend: looks like another wemux?
ecnalyr has quit [Remote host closed the connection]
<dostoyevsky>
&block.class.name gives me an error message...
achiu1 has joined #ruby-lang
<MrZYX>
yes
<MrZYX>
because that's invalid syntax
<MrZYX>
&block is only valid in method definitions and calls
Snibble has joined #ruby-lang
ecnalyr has joined #ruby-lang
<MrZYX>
try block.class.name
achiu has quit [Ping timeout: 245 seconds]
jonahoffline has joined #ruby-lang
cnivolle has joined #ruby-lang
robbyoconnor has joined #ruby-lang
jonahoffline has quit [Client Quit]
<dostoyevsky>
MrZYX: Proc...
<MrZYX>
as I said ;)
Cakey has quit [Ping timeout: 272 seconds]
<apeiros>
20:35 dostoyevsky: When I want to pass on a block, do I pass it on as &block or block?
<apeiros>
`&block.class.name` is not "passing"
<apeiros>
`foo(&block.class.name)` this is passing, but since block.class.name is likely a string, it makes no sense. `foo(&block)` would make sense.
<MrZYX>
dostoyevsky: are you aware of yield and block_given?
lun__ has quit [Remote host closed the connection]
ecnalyr has quit [Ping timeout: 245 seconds]
lun__ has joined #ruby-lang
Snibble has quit [Ping timeout: 244 seconds]
<dostoyevsky>
MrZYX: Yes. I just feel that &block is not very object-oriented..
<MrZYX>
why not?
<dostoyevsky>
Because I can't do &block.class
<MrZYX>
okay
<MrZYX>
again
brianpWins has joined #ruby-lang
<MrZYX>
def foo(&block) captures the block passed to a method call to foo by converting it into a Proc object and assigning it to the variable called block
<MrZYX>
so block does hold your Proc object
r0bby_ has joined #ruby-lang
<MrZYX>
bar(&block) is a method call, it takes the Proc object in the local variable block and converts it to a block that is passed to the method
<MrZYX>
a block isn't an object nor is it assigned to a variable at any time
<MrZYX>
a proc however is
<dostoyevsky>
And &proc_instance converts a Proc into a non-object
<dostoyevsky>
which can then be passed on an captured again
<MrZYX>
so the ways to access a block are syntax (yield, block_given? the & operator in method definitions and calls)
loincloth has quit [Read error: Connection reset by peer]
loinclot_ has joined #ruby-lang
vsorlov has quit [Ping timeout: 260 seconds]
r0bby_ has quit [Read error: Connection reset by peer]
Authenticator has quit [Remote host closed the connection]
simoz2 has joined #ruby-lang
simoz has quit [Ping timeout: 272 seconds]
fijimunkii has quit [Quit: leaving]
<Snibble>
…or…maybe even ruby-ier "puts "time found" if Time.new.strftime("%H:%M:%S") == '20:04:00'"
Bosox20051 has quit [Ping timeout: 246 seconds]
simoz2 has quit [Ping timeout: 248 seconds]
<apeiros>
Time.now please
joelroa has quit [Quit: Computer has gone to sleep.]
visof has joined #ruby-lang
<visof>
hi
yfeldblum has quit [Ping timeout: 260 seconds]
<visof>
i tried to run system("rpmbuild -ba file.spec") but with it got the wrong rpm, but if i execute rpmbuild -ba file.spec from the shell directly it got the right rpm
<visof>
is system or `` or exec need some kind of env to add or what's going on
<visof>
?
fijimunkii has joined #ruby-lang
saarinen has quit [Quit: saarinen]
r0bby_ has joined #ruby-lang
imperator2 has joined #ruby-lang
benwoody has joined #ruby-lang
<tubbo>
visof: ruby uses `sh`, not `bash`, so that might change things.
robbyoconnor has joined #ruby-lang
enebo has quit [Quit: enebo]
r0bby_ has quit [Ping timeout: 272 seconds]
saarinen has joined #ruby-lang
ninjago has joined #ruby-lang
<visof>
tubbo: `rpmbuild -ba file.spec` ?
<visof>
tubbo: or what do you mean?
Snibble has quit [Quit: Leaving.]
<tubbo>
visof: not sure what you didn't understand about what i said. ruby uses sh, the shell. it doesn't use bash. your direct shell probably uses bash. that's why it's different.
ninjago has left #ruby-lang [#ruby-lang]
<visof>
tubbo: what do you think about to solving this or force ruby to use bash?
<tubbo>
visof: provide the full path to rpmbuild that you want, like /usr/local/bin/rpmbuild
momomomomo has quit [Quit: momomomomo]
<tubbo>
so it's not dependent on which rpmbuild is in your shell's $PATH
<tubbo>
alternatively, add the bin dir to sh's $PATH, though this would require you to be conscious of which user ruby is running as and where their shell config is located, as well as permissions. probably easier to just specify the full path.
<visof>
tubbo: i did this but i guess rpmbuild read additional env and info
fuhgeddaboudit has quit [Quit: Ex-Chat]
<visof>
tubbo: what i try to do exactly is to package rails app as war then war as rpm, i uses warbler to get war
<visof>
and if i created rpm from inside ruby script using `` or system , i got malformed war when install rpm unlike if i created it directly from the shell , i got correct war installed
<tubbo>
hmm, not sure then....
<visof>
anyone can suggest anything in this
iliketurtles has joined #ruby-lang
benwoody has quit [Quit: benwoody]
ecnalyr has joined #ruby-lang
tdm00 has joined #ruby-lang
nofxx has joined #ruby-lang
benwoody has joined #ruby-lang
<visof>
tubbo: can i open bash then execute commands in it
<tubbo>
visof: oh yeah i guess... `bash -c 'rpmbuild..'`
ecnalyr has quit [Ping timeout: 245 seconds]
<visof>
tubbo: thanks man
<visof>
tubbo: that's may work i hope ISA
robbyoconnor has quit [Ping timeout: 260 seconds]
ozzloy has joined #ruby-lang
vlad_sta_ has quit [Remote host closed the connection]
breakingthings has joined #ruby-lang
makarakao has joined #ruby-lang
vlad_starkov has joined #ruby-lang
yalue has quit [Quit: Leaving]
Snibble has joined #ruby-lang
visof has quit [Ping timeout: 240 seconds]
<Snibble>
aperios: I was struck by Time.new also…but if Time.now is just an alias for Time.new, is there really a benfit?
robbyoconnor has joined #ruby-lang
<apeiros>
Snibble: my nick is not aperios.
<apeiros>
Snibble: also: discover the power of tab-completion for nicks.
<apeiros>
Snibble: and to answer your question: clarity of your code.
<Snibble>
You're right, my apologies. Not reading or typing so well today, I guess.
<imperator2>
it's not an alias, it's a synonym
<apeiros>
Snibble: I wasn't angry (just saying because feelings translate badly in irc)
<imperator2>
subtle, i know ;)
<imperator2>
to wit, Time.now does not take arguments
hrs has joined #ruby-lang
hrs has quit [Client Quit]
r0bby_ has joined #ruby-lang
simoz has joined #ruby-lang
robbyoconnor has quit [Ping timeout: 268 seconds]
visof has joined #ruby-lang
<Snibble>
I got "alias" from the docs. "now() Alias for ::new." I agree that Time.now is more clear than Time.new with no arguments.
aley has quit [Quit: aley]
cnivolle_ has joined #ruby-lang
heftig has quit [Quit: Quitting]
cnivolle has quit [Ping timeout: 240 seconds]
heftig has joined #ruby-lang
banisterfiend has quit [Quit: Computer has gone to sleep.]
dhruvasagar has quit [Ping timeout: 260 seconds]
momomomomo has joined #ruby-lang
<Snibble>
Maybe calling it an alias is "clear enough" because it's non-sensical to pass arguments to Time::now to initialize it to some given time?
<apeiros>
it would make sense to pass arguments to Time.new
r0bby_ has quit [Ping timeout: 246 seconds]
<apeiros>
since not every time you want to construct is *now*
yfeldblum has joined #ruby-lang
<imperator2>
right; as apeiros mentioned before, it's really just about clarity
<imperator2>
i never use Time.new without arguments; i always use Time.now in that case - just reads cleaner
<imperator2>
so, strictly necessary? no. nice to have? yes
Technodrome has quit [Quit: Technodrome]
<Snibble>
I think we're in violent agreement. I was just exploring the corners of the words to get them more clear in my own mind. Thanks!
<Snibble>
Because, honestly, I had to look up if Time::new did what it seemed to be doing…I had never used it before. Time.now makes more sense to me, too.
<imperator2>
no problem, you're welcome!
mbj has quit [Ping timeout: 244 seconds]
vlad_starkov has quit [Remote host closed the connection]
sevvie has joined #ruby-lang
sepp2k has quit [Ping timeout: 240 seconds]
simoz2 has joined #ruby-lang
simoz has quit [Ping timeout: 265 seconds]
Technodrome has joined #ruby-lang
<cout>
well this is silly; I can't call #each on an OpenStruct
toretore has joined #ruby-lang
simoz2 has quit [Ping timeout: 246 seconds]
yfeldblum has quit [Remote host closed the connection]
Technodrome has quit [Quit: Technodrome]
yfeldblum has joined #ruby-lang
Bosox20051 has joined #ruby-lang
yfeldblu_ has joined #ruby-lang
benlovell has quit [Ping timeout: 265 seconds]
<waxjar>
there's each_pair
yfeldblum has quit [Ping timeout: 240 seconds]
yfeldblu_ has quit [Remote host closed the connection]
iliketurtles has quit [Quit: zzzzz…..]
sepp2k has joined #ruby-lang
tdm00 has quit [Quit: Make like a banana and split!]
Snibble has quit [Quit: Leaving.]
kirin` has quit [Ping timeout: 272 seconds]
Snibble has joined #ruby-lang
kirin` has joined #ruby-lang
Bosox20051 has quit [Ping timeout: 246 seconds]
arBmind has quit [Quit: Leaving.]
therealtessera-1 has quit [Quit: therealtessera-1]
workmad3 has joined #ruby-lang
iliketurtles has joined #ruby-lang
vbatts has joined #ruby-lang
benlovell has joined #ruby-lang
Johz has quit [Remote host closed the connection]
yfeldblum has joined #ruby-lang
ruby-lang544 has joined #ruby-lang
Johz has joined #ruby-lang
yfeldblum has quit [Remote host closed the connection]
makaraka_ has joined #ruby-lang
yfeldblum has joined #ruby-lang
fijimunkii has quit [Ping timeout: 244 seconds]
makarakao has quit [Ping timeout: 268 seconds]
ruby-lang544 has quit [Ping timeout: 250 seconds]
yfeldblum has quit [Ping timeout: 240 seconds]
yfeldblum has joined #ruby-lang
yfeldblum has quit [Remote host closed the connection]
FastJack has quit [Ping timeout: 264 seconds]
yfeldblum has joined #ruby-lang
FastJack has joined #ruby-lang
fijimunkii has joined #ruby-lang
Snibble has quit [Quit: Leaving.]
saarinen has quit [Quit: saarinen]
verto has quit [Ping timeout: 240 seconds]
mistym has quit [Remote host closed the connection]
yfeldblum has quit [Ping timeout: 240 seconds]
yfeldblu_ has joined #ruby-lang
<zenspider>
rawr
visof has quit [Ping timeout: 268 seconds]
arooni-mobile__ has quit [Ping timeout: 260 seconds]
banisterfiend has joined #ruby-lang
makarakao has joined #ruby-lang
kek has joined #ruby-lang
arooni-mobile__ has joined #ruby-lang
visof has joined #ruby-lang
makaraka_ has quit [Ping timeout: 268 seconds]
adambeynon has joined #ruby-lang
yfeldblu_ has quit [Remote host closed the connection]
arooni-mobile__ has quit [Ping timeout: 240 seconds]