<deryl>
I need to do something akin to cp File.dirname(__FILE__) $CWD where __FILE__ is the relative to an installed gem's location and $CWD is relative to the *user. I need the command to be part of the installed gem itself. (eg I have dtf and dtf-session. dtf is installed with gem install dtf, and now need to copy out files from that gem to the cwd for me, the user.
<deryl>
sorry kids were arguing.. anyone have a link to docs for that? I thought I could use @gem = Gem::Specification.find_by_name('dtf') which does give me the full spec, and I see the files in @gem.files array, but I can't see how to determine the directory is installed *in*.
brianpWins has joined #ruby-lang
<drbrain>
Gem.loaded_specs['dtf'].gem_dir
<drbrain>
deryl: ^^
<deryl>
using @gem.gem_dir works if I'm not in another gem's drectory (like I'm basically trying to copy files from dtf into dtf-session's directory) but when run from dtf-session's dir it keeps giving me the local directory not the installed directory
<deryl>
oh. thanks drbrain
<drbrain>
deryl: don't use Gem::Specification.find_by_name
<drbrain>
it can give you the wrong version
<drbrain>
… if the user has two copies installed
<deryl>
ah didn't realize that.
ztirf has quit [Ping timeout: 252 seconds]
<deryl>
ok, lets see where the Gem.loaded_spec takes me. that one I take it (when run from dtf-session) will return the loaded spec for the version of dtf that dtf-session is using (via Gemfile.lock)
<deryl>
dtf-session has a dep on dtf
<drbrain>
yup
<deryl>
perfect. thanks a lot drbrain. twas driving me batty :)
CarlB_the_great has quit [Ping timeout: 260 seconds]
sandbags has quit [Remote host closed the connection]
chendo_ has joined #ruby-lang
chendo_ has quit [Changing host]
chendo_ has joined #ruby-lang
towski has quit [Remote host closed the connection]
umttumt has joined #ruby-lang
<steveklabnik>
so, turns out turbolinks helps a lot
<steveklabnik>
actually.
<steveklabnik>
who knew?
BMF has left #ruby-lang [#ruby-lang]
chimkan has joined #ruby-lang
ryanlecompte has quit [Remote host closed the connection]
lcdhoffman has joined #ruby-lang
znowi has quit [Ping timeout: 240 seconds]
mixtli_ has joined #ruby-lang
xyzodiac has quit [Quit: Computer has gone to sleep.]
xyzodiac has joined #ruby-lang
ryanf has joined #ruby-lang
s0ber has quit [Ping timeout: 244 seconds]
tenderlove has joined #ruby-lang
catmtking has joined #ruby-lang
s0ber has joined #ruby-lang
sailias has quit [Quit: Leaving.]
felixc has joined #ruby-lang
<deryl>
drbrain: thanks. you solved my issue. Final invocation is: FileUtil.cp(Dir.glob("#{File.join("#{Gem.loaded_specs['dtf'].gem_dir}", 'db/migrate/*.rb')}"), 'db/migrate/')
<deryl>
err FileUtils even
headius has joined #ruby-lang
urbanmonk has quit [Quit: Bye!]
retro|cz has quit [Ping timeout: 265 seconds]
krohrbaugh has joined #ruby-lang
xyzodiac has quit [Quit: Computer has gone to sleep.]
krohrbaugh1 has quit [Ping timeout: 246 seconds]
qpingu has quit [Quit: Leaving.]
chimkan has quit [Quit: chimkan]
umttumt has quit [Remote host closed the connection]
headius has quit [Quit: headius]
petercooper has quit [Remote host closed the connection]
thatdutchguy has quit [Remote host closed the connection]
mixtli_ has quit [Quit: mixtli_]
alvaro_o has quit [Quit: Ex-Chat]
lcdhoffman has quit [Quit: lcdhoffman]
tooky has joined #ruby-lang
^sandbags^ has joined #ruby-lang
^sandbags^ has joined #ruby-lang
^sandbags^ has quit [Changing host]
sandbag__ has joined #ruby-lang
sandba___ has joined #ruby-lang
felixc has quit [Quit: Leaving.]
sandb____ has joined #ruby-lang
tooky has quit [Ping timeout: 245 seconds]
towski has joined #ruby-lang
^sandbags^ has quit [Ping timeout: 245 seconds]
chendo_ has quit [Ping timeout: 245 seconds]
chendo_ has joined #ruby-lang
chendo_ has quit [Changing host]
chendo_ has joined #ruby-lang
felixc has joined #ruby-lang
sandbag__ has quit [Ping timeout: 245 seconds]
sandba___ has quit [Ping timeout: 248 seconds]
towski has quit [Ping timeout: 246 seconds]
crankharder has quit [Read error: Connection reset by peer]
jperry2_ has quit [Quit: jperry2_]
chendo_ has quit [Ping timeout: 255 seconds]
faces has joined #ruby-lang
maek has joined #ruby-lang
<maek>
i know this is OT but… anyone know how to make a Thor task show its long_desc?
chendo_ has joined #ruby-lang
chendo_ has joined #ruby-lang
chendo_ has quit [Changing host]
facest has quit [Ping timeout: 244 seconds]
tooky has joined #ruby-lang
sent-hil has joined #ruby-lang
sush24 has joined #ruby-lang
xuser has left #ruby-lang [#ruby-lang]
bastilian has joined #ruby-lang
Aphelion has joined #ruby-lang
jperry2_ has joined #ruby-lang
m3nd3s_ has joined #ruby-lang
brianpWins_ has joined #ruby-lang
Xzyx987X has joined #ruby-lang
krohrbaugh has quit [Quit: Leaving.]
ttilley has quit [Ping timeout: 265 seconds]
bastilian has quit [Quit: Leaving...]
tooky has quit [Ping timeout: 245 seconds]
jperry2 has quit [Read error: Connection reset by peer]
Xzyx987X_ has quit [Read error: Connection reset by peer]
m3nd3s has quit [Read error: Connection reset by peer]
jperry2_ is now known as jperry2
brianpWins has quit [Read error: Connection reset by peer]
brianpWins_ is now known as brianpWins
ehutzelman has quit [Remote host closed the connection]
guns has joined #ruby-lang
<drbrain>
not OT, but I don't know
<maek>
drbrain: ty
sent-hil has quit [Remote host closed the connection]
jtoy has joined #ruby-lang
sush24 has quit [Quit: This computer has gone to sleep]
ricardovaleriano has joined #ruby-lang
towski has joined #ruby-lang
amzan has joined #ruby-lang
amzan has quit [Client Quit]
towski_ has joined #ruby-lang
towski has quit [Read error: Connection reset by peer]
towski_ has quit [Ping timeout: 248 seconds]
towski has joined #ruby-lang
tRAS has joined #ruby-lang
CarlB_th_ has quit [Remote host closed the connection]
CarlB_the_great has joined #ruby-lang
towski has quit [Ping timeout: 246 seconds]
CarlB_the_great has quit [Remote host closed the connection]
towski has joined #ruby-lang
<deryl>
maek: long_desc "your long description" then thor help class_name:task and it should display it (I put mine right under the 'desc' line (e.g desc "install", "Installs database migrations, the main schema, and configuration files" ; long_desc "This is a really long description that is longer than the initial desc"
sduckett has quit [Ping timeout: 248 seconds]
<deryl>
maek: so for me its class DtfSetup < Thor ; desc "install", "Installs database migrations, the main schema, and configuration files" ; long_Desc "super long one here. say twice as long as desc" ; method_options :force => :boolean etc etc
imajes has quit [Excess Flood]
<maek>
deryl: thank you! I got the long_desc working in the task but had no idea how to access it
<deryl>
i call it with thor help dtf_setup:install and it will show the Description: field in the output which maps to long_desc
<deryl>
np
imajes has joined #ruby-lang
ricardovaleriano has quit [Remote host closed the connection]
CarlB_th_ has joined #ruby-lang
headius has joined #ruby-lang
jtoy has quit [Quit: jtoy]
gllmpn has joined #ruby-lang
jtoy has joined #ruby-lang
Nisstyre-laptop has joined #ruby-lang
nariyal has joined #ruby-lang
tRAS has quit [Quit: Mother, did it need to be so high?]
towski has quit [Ping timeout: 252 seconds]
jtoy has quit [Quit: jtoy]
CarlB_th_ has quit [Remote host closed the connection]
sandb____ has quit [Remote host closed the connection]
ryanlecompte has joined #ruby-lang
znowi has joined #ruby-lang
nariyal has quit [Quit: Computer has gone to sleep.]
chimkan_ has joined #ruby-lang
ryanf has quit [Quit: leaving]
ryanlecompte has quit [Remote host closed the connection]
nariyal has joined #ruby-lang
chimkan_ has quit [Quit: chimkan_]
pygmael has joined #ruby-lang
chimkan has joined #ruby-lang
CrazyHorse18 has joined #ruby-lang
<CrazyHorse18>
okey-dokey
<CrazyHorse18>
so i have this SMTP server, and i have to make sure it runs all the time
<CrazyHorse18>
and if it crashes, know why it crashes
<CrazyHorse18>
i could simply run something like a cron job in process every minute that checks
<CrazyHorse18>
or should i use something like god?
crudson has joined #ruby-lang
nariyal has quit [Ping timeout: 240 seconds]
<erikh>
what ghetto smtp server do you use that crashes all the time?
<CrazyHorse18>
it's not really an smtp server
ryanf has joined #ruby-lang
<CrazyHorse18>
it's a tcp server written in ruby
<CrazyHorse18>
built to slurp up data from these devices that communicate via email
<erikh>
hrm
<CrazyHorse18>
i'm going to rewrite the server
<CrazyHorse18>
but as a stop gap
<CrazyHorse18>
i need to just make sure it's running all the time as it is
<erikh>
don't rewrite the server, replace it with something like procmail or milters
<CrazyHorse18>
it's not suppose to be a mail server
<erikh>
thank me later
<CrazyHorse18>
it's not doing any deliveries or anything
<erikh>
but it's recieving them, right?
<CrazyHorse18>
yeah
<erikh>
yeah. milters, or procmail
<erikh>
you don't need a whole server for this and you're blowing your leg off trying.
<CrazyHorse18>
nah, it's not supposed to deliver any emails :)
<CrazyHorse18>
also we need a lot of information
<CrazyHorse18>
it's just a bunch of devices that happen to use SMTP as the protocol
<CrazyHorse18>
most of our other devices use a custom protocol over udp
<CrazyHorse18>
and they work fine
<CrazyHorse18>
it's just whoever coded this server was a bit amerturish
sgonyea has joined #ruby-lang
<erikh>
eh
<erikh>
SMTP is a hard protocol
<CrazyHorse18>
ah all this has to do
<CrazyHorse18>
is responde 250 OK
<CrazyHorse18>
and the device spits out all the data
<CrazyHorse18>
so it's pretty easy
<CrazyHorse18>
so it's not like it even has to support the full smtp protocol
mk03 has quit [Ping timeout: 252 seconds]
icooba has quit [Quit: Computer has gone to sleep.]
chimkan has quit [Quit: chimkan]
sgonyea has quit [Remote host closed the connection]
sgonyea has joined #ruby-lang
sent-hil has joined #ruby-lang
josh^ has quit [Remote host closed the connection]
josh^ has joined #ruby-lang
catmtking has quit [Quit: catmtking]
tRAS has joined #ruby-lang
ljsdfc_ has joined #ruby-lang
gllmpn has quit [Remote host closed the connection]
gmci has quit [Quit: Computer has gone to sleep.]
gmci has joined #ruby-lang
cjs226 has quit [Ping timeout: 260 seconds]
jarred has joined #ruby-lang
headius has quit [Quit: headius]
justinseiter has quit [Remote host closed the connection]
sent-hil has quit [Remote host closed the connection]
CrazyHorse18 has quit [Quit: Leaving.]
crankharder has joined #ruby-lang
<crankharder>
trying to dig an email out of markup: https://gist.github.com/3798050 -- how can i modify this regex so that it matches?
agarie has joined #ruby-lang
<bnagy>
try just taking out the \A \z
<bnagy>
but I do not endorse regexes for this
d3vic3 has quit [Read error: Operation timed out]
twittard has joined #ruby-lang
d3vic3 has joined #ruby-lang
<crankharder>
bnagy: better suggestion?
sgonyea has quit [Ping timeout: 255 seconds]
twittard is now known as sgonyea
<faces>
you could probably just strip the junk out with a slice
<whitequark>
ow. melbourne gem only implements 1.8 :/
rippa has joined #ruby-lang
<erikh>
what's wrong with ruby_parser?
<erikh>
... and, isn't rubinius stuck in 1.8 land still?
<whitequark>
erikh: rubinius implements 1.9 [syntax] for like ages
<erikh>
orly
<whitequark>
aaand ruby_parser has tons of quirks
<erikh>
I don't pay much attention I guess
<whitequark>
last time I looked it wasn't able to parse full 1.9 grammar
<whitequark>
it only recently gained an ability to parse -> and so
<erikh>
yeah, ruby_parser has some hangups there
CrazyHorse18 has joined #ruby-lang
<whitequark>
well, this is kinda unacceptable for me
<bnagy>
so, I should know this, but.. what's the right way to use private functions in modules?
<erikh>
you should work with zenspider on fixing it, I think he was looking for someone with interest
<bnagy>
like utility functions that aren't supposed to be in the api
<erikh>
bnagy: put them in a different module?
<whitequark>
erikh: actually, I have melbourne which is both complete and with better API. why should I care?
<bnagy>
and include that?
<erikh>
whitequark: it still doesn't parse 1.9?
<bnagy>
I guess. /
<erikh>
bnagy: either that, or just reference it
<whitequark>
erikh: melbourne is both a gem and a component of rubinius. I'll just forward-port the rbx Cext to the gem and call it a day
<erikh>
I've had a lot of whiskey
<erikh>
I may not be making sense
<bnagy>
erikh: like self::meth or something?
<erikh>
bnagy: right
<erikh>
module PrivateFoo; def self.blah; 1; end; end
<bnagy>
guess using another module is less ugly
<bnagy>
yeah self.blah is how I do my 'exported' methods
<bnagy>
methods I want to appear on the module
<bnagy>
these are internal methods
<whitequark>
erikh: (by "better API" I mean that I like its AST format more than ruby_parser's sexps)
<erikh>
whitequark: sure. I mean, use what works for you
CrazyHorse181 has joined #ruby-lang
<whitequark>
I will actually need to convert the melbourne AST to my own sexp-alike IR later, but otherwise I like it more
<whitequark>
and ruby_parser'
<whitequark>
's output would need preprocessing anyway.
<erikh>
you know, aside from this, it's amazing after ~15 years of professional work that one can carry a conversation about these topics drunk off their ass
CrazyHorse18 has quit [Ping timeout: 255 seconds]
<erikh>
I don't think I'm special or anything, it just kind of surprises me how effective the human brain is at times
<whitequark>
erikh: well, since I've been told at university how alcohol actually affects the brain, that doesn't surprise me much anymore
<erikh>
yeah? I know very little about it, save the whole anecdotal experience bit.
<whitequark>
and judging from your typing speed and amount of errors [zero], you're not that drunk anyway :)
<postmodern>
bnagy, with all these mobile devices, resistance is futile
guns has joined #ruby-lang
<whitequark>
postmodern: btw, gcc isn't an assembler, binutils are
<postmodern>
whitequark, gcc is a toolchain
<bnagy>
postmodern: anyway I knew 0 about x64 asm, the ABI is completely different
<bnagy>
mucho confuse
<whitequark>
postmodern: ok
<postmodern>
whitequark, er the GNU toolchain, which inclues gcc, gas, ld
<postmodern>
whitequark, dumbled in the clusterfuck that is gcc, is opcodes.c
<postmodern>
whitequark, *bundled
<postmodern>
bnagy, x86 is fun
CrazyHorse181 has quit [Quit: Leaving.]
<postmodern>
bnagy, er 64
<postmodern>
bnagy, they really need to stop renaming the new cpu features
<postmodern>
bnagy, apparently NX bit was renamed to XN
<postmodern>
bnagy, i kind of like the new syscall op
<whitequark>
postmodern: whichever it is, only assembler you actually need is LLASM (unless you aim on writing shellcode.)
<postmodern>
bnagy, but the data-model isn't standardized between OSes
<postmodern>
whitequark, checkout yasm
<postmodern>
whitequark, also llasm relies on llvm, and doesn't allow you to assemble pure ASM
voker57 has quit [Remote host closed the connection]
<whitequark>
postmodern: I mean that you don't need to know about details of the platform opcodes in order to compile stuff. One mid-level representation is enough
<bnagy>
whitequark: sadly, I need basically shellcode in thise case
<whitequark>
postmodern: that's the point
<postmodern>
whitequark, pure ASM allows you greater control over shellcode, where you can craft small shellcode
<postmodern>
whitequark, checkout yasm and ronin-asm
<bnagy>
I wish I could rip out just the assembly part of metasm, but I can't fricking find it
<whitequark>
postmodern: I know that :) I just say that 99% of people don't need to write shellcode ever. Unrelated to bnagy's problems, that is.
<erikh>
shell all the codes
<postmodern>
whitequark, people in infosec need to write shellcode
<whitequark>
postmodern: I know.
twintail has joined #ruby-lang
<postmodern>
whitequark, also llvm lacks support for a ton of archs
<erikh>
llvm is comparatively immature
<bnagy>
llvm is still the way and the light
<bnagy>
just, not for this tony problem
<postmodern>
yeah, it will improve
<bnagy>
*tiny
<whitequark>
postmodern: indeed, but it's fairly trivial to add an arch to llvm, compared to (oh god) gcc or writing a complete toolchain
<postmodern>
whitequark, protip: never use the word trivial when talking about programming :P
<postmodern>
esp when extending a large C++ codebase
<erikh>
^
<whitequark>
postmodern: "the most used word on Lambda the Ultimate is `obviously'"
<erikh>
this
<erikh>
heh
mars__ has joined #ruby-lang
<erikh>
ltu is the reddit of the ivory tower
<postmodern>
lol
<whitequark>
ltu is quite hardcore
<erikh>
I mean, it's a nice site, but filled with idealistic people who think they don't exist in the real world, with real world problems.
<postmodern>
like going to an esparanto user-group
<whitequark>
erikh: you've just described like 95% of the internet audience
<erikh>
whitequark: well sure
fireglow has joined #ruby-lang
<whitequark>
so it's a representative slice of the overall population
<erikh>
I gotta be honest, I don't get along with most programmers, and this is why
<erikh>
it's easy to see a lot of them spend a lot of effort pursuing ideals when they're actually just shipping code for some site that sells shoes on the intenret
<erikh>
when confronted with that, they're obviously not doing that, they're changing the world
<erikh>
something which 95% of the populace could give two fucks about
<erikh>
anyhow, I'm just an old man with a lot of grudges. don't mind me :)
<postmodern>
learn from the grudges of your elders
* whitequark
has recently wrote a statically compiled and verified templating language for, err, service for publishing musicians' sites
<erikh>
heh!
<whitequark>
it has reduced our production response times roughly 10x
<erikh>
I used to work for Guitar Center
<whitequark>
and it is yet unoptimized
<erikh>
we called our job, "selling guitars to stoners"
<erikh>
it was pretty accurate.
<whitequark>
rofl
justinmcp has quit [Remote host closed the connection]
guns has quit [Quit: guns]
<erikh>
but I guess my point is, as curmudgeonly as it sounds
<erikh>
chances are, all that intellectual pursuit is likely going to service someone else that got a better foothold on life; they were born into a family with a lot of money or they know the right people
<erikh>
you're not going to win anything based on your technical knowledfe.
<erikh>
and I am way too drunk and am going to bed.
<whitequark>
it all depends on your definition of "win".
seoaqua has quit [Ping timeout: 256 seconds]
<postmodern>
erikh, unless you combine that technical knowledge with people who understand the tradecraft of crime ;)
<postmodern>
obligatory reference to scheme used in adware
avakarev has quit [Remote host closed the connection]
nariyal has joined #ruby-lang
<faces>
I know a lot of people like that, they get personally involved in the code they write and everything they ship is world-changing [despite the code ending up selling shoes online]
<faces>
and a lot of them position themselves above other members of staff in non-coding positions because of it
<whitequark>
postmodern: I believe that was malware
<postmodern>
where is the upvote button?
<whitequark>
faces: I guess that doesn't include just programmers.
<faces>
it doesn't, but from experience non-programmers tend to base their awesomeness on their actual position over others, supervisor, managerial or whatever
<faces>
rather than just perception of the job they just completed
avakarev has quit [Remote host closed the connection]
yats_ has quit [Ping timeout: 245 seconds]
wallerdev has quit [Quit: wallerdev]
kain has quit [Read error: Connection reset by peer]
kain has joined #ruby-lang
kain has quit [Read error: Connection reset by peer]
kain has joined #ruby-lang
kain has quit [Remote host closed the connection]
<faces>
i guess it's probably common in creative jobs
rippa has quit [Ping timeout: 252 seconds]
sandbag__ has quit [Remote host closed the connection]
<bnagy>
postmodern: Syscall.call32( rand(0xffff), *(Array.new(6).map {rand 2**32}) ) until @bsod
<bnagy>
one line syscall fuzzer :P
zmack has joined #ruby-lang
twintail has quit [Quit: Leaving.]
sandbags has joined #ruby-lang
sandbags has quit [Changing host]
sandbags has joined #ruby-lang
agarie has quit [Remote host closed the connection]
woollyams has quit [Quit: Computer has gone to sleep.]
QoQOoO has joined #ruby-lang
areil has joined #ruby-lang
<postmodern>
bnagy, nice!
sepp2k has joined #ruby-lang
<bnagy>
nb: not a very good one
<bnagy>
fkn funny though
<bnagy>
my screen keeps locking
kain has joined #ruby-lang
twintail has joined #ruby-lang
twintail has quit [Client Quit]
VGoff_afk is now known as VGoff
tenderlove has quit [Remote host closed the connection]
tooky has joined #ruby-lang
QoQOoO has quit [Read error: Connection reset by peer]
wyhaines has joined #ruby-lang
<erikh>
fart
<postmodern>
erikh, one is never drunk enough for the internet ;)
tooky has quit [Ping timeout: 245 seconds]
wyhaines_ has joined #ruby-lang
wyhaines has quit [Ping timeout: 252 seconds]
gregmoreno has quit [Read error: Connection reset by peer]
gregmoreno has joined #ruby-lang
<whitequark>
sigh, only two years have passed and code is already rot beyond any reason
rue|w has joined #ruby-lang
<whitequark>
gems are deprecated, APIs are broken, nothing works
twintail has joined #ruby-lang
chendo_ has quit [Ping timeout: 255 seconds]
rippa has joined #ruby-lang
chendo_ has joined #ruby-lang
Theueip has quit [Read error: Connection reset by peer]
nariyal has quit [Quit: Computer has gone to sleep.]
justinmcp has quit [Remote host closed the connection]
Madis has joined #ruby-lang
tenderlove has quit [Ping timeout: 252 seconds]
d3vic3 has quit [Quit: leaving]
hakunin has quit [Remote host closed the connection]
jupito_ has quit [Quit: leaving]
areil_ has joined #ruby-lang
<soahccc>
Is it "easy" and usable to stub ruby completely? I only need it for some simple scripts on the same architecture and OS. Just to do a ./rubystub file.rb
areil_ has quit [Client Quit]
areil has quit [Ping timeout: 245 seconds]
<andrewvos>
yes
<soahccc>
Can you give me a hint for what I have to search for? ruby and bundle(r) aren't good keywords D:
<matti>
;]
<yorickpeterse>
soahccc: what platform are you on?
<yorickpeterse>
Winders or Lunix?
sandbags has quit [Remote host closed the connection]
chendo__ has joined #ruby-lang
areil has joined #ruby-lang
chendo__ has quit [Client Quit]
josh^ has quit [Ping timeout: 245 seconds]
josh^ has joined #ruby-lang
chendo_ has quit [Ping timeout: 245 seconds]
cantonic_ has joined #ruby-lang
chendo_ has joined #ruby-lang
seoaqua has quit [Ping timeout: 248 seconds]
felixc has quit [Quit: Leaving.]
cantonic has quit [Ping timeout: 248 seconds]
cantonic_ is now known as cantonic
gaveen has quit [Ping timeout: 244 seconds]
tenderlove has joined #ruby-lang
shyouhei has quit [Remote host closed the connection]
kain has quit [Read error: Connection reset by peer]
tenderlove has quit [Ping timeout: 245 seconds]
kain has joined #ruby-lang
gaveen has joined #ruby-lang
chendo_ has quit [Ping timeout: 255 seconds]
gmci has quit [Quit: Computer has gone to sleep.]
gmci has joined #ruby-lang
chendo_ has joined #ruby-lang
vlad_starkov has joined #ruby-lang
x0F has quit [Disconnected by services]
x0F_ has joined #ruby-lang
x0F_ is now known as x0F
justinmcp has joined #ruby-lang
workmad3 has joined #ruby-lang
nariyal has quit [Quit: Computer has gone to sleep.]
nariyal has joined #ruby-lang
nariyal has quit [Client Quit]
zenspider has joined #ruby-lang
<zenspider>
rawr
<rue|w>
1337 o’clock rawr
<matti>
Hi zenspider
<matti>
rue :)
<matti>
drbrain, zzak: /j #ruby-docs
<matti>
zenspider: Are you helping out with documentation as well?
Mon_Ouie has joined #ruby-lang
<zenspider>
matti: not actively... but I do what I can
<matti>
:>
<zenspider>
rue|w: I just contacted that hotel we talked about. still think january is is good aurora hunting time?
<andrewvos>
You guys got something romantic planned?
<zenspider>
something like that
<yorickpeterse>
zenspider: your best bet is to look at data from NASA about when they expect CMEs to occur
<yorickpeterse>
Not sure if they have it available for a longer time into the future though
<rue|w>
zenspider: Definitely
kain has quit [Read error: Connection reset by peer]
<zenspider>
I don't think they plan them that far out :)
kain has joined #ruby-lang
<zenspider>
rue|w: awesome. thanks.
<zenspider>
hopefully they'll get back to me soon... and be reasonably (enough) priced
<rue|w>
It’s always dependent on solar activity, obviously, but my understanding is that north of the arctic circle, January is the peak activity
<zenspider>
Statistically, the equinox months of September and March are best for aurora activity. The winter months of October-thru-February are also good (there is definitely no shortage of darkness!).
<judofyr>
bnagy: why did they do that? +5.75. really?
<bnagy>
yep, NPT
<bnagy>
didn't want to be the same as india
<judofyr>
" Nepal Standard Time is one of only two official time zones with a 45-minute increment from UTC"
<bnagy>
some island somewhere?
vlad_starkov has quit [Remote host closed the connection]
kain has quit [Read error: Connection reset by peer]
<judofyr>
yeah
<judofyr>
Chatham
tenderlove has quit [Ping timeout: 244 seconds]
<judofyr>
in New Zealand
kain has joined #ruby-lang
robie137_ has joined #ruby-lang
<soahccc>
Is there only this approach of autoloading? expected something more dynamic. Is there any lightweight rails like autoloading? autoload :BCrypt, 'bcrypt'
robie1373 has quit [Ping timeout: 246 seconds]
<gnufied>
rails autoloading is anything but lightweight
<gnufied>
also, autoload will be deprecated afaik in next big ruby version.
<gnufied>
2.0
<bnagy>
thank Krishna
<soahccc>
gnufied: No autoloading at all? So I have to require each damn file or what? What I mean with lightweight is to #underscore the constant and try to require it
<soahccc>
I thought this is what rails does
runeb has joined #ruby-lang
<gnufied>
well, well. it uses const_missing hook for that.
<gnufied>
and it patches Kernel#load method
<soahccc>
Hmmm so there is no Foo::FooBar => require "foo/foo_bar"
isale-eko has joined #ruby-lang
<gnufied>
there is only autoload atm
<soahccc>
Then I might require the whole directory… I doesn't have to be performant
vlad_starkov has joined #ruby-lang
<gnufied>
go for it. nobody died [yet] from requiring while directories.
<gnufied>
whole*
<whitequark>
i accidentally the while directory!
cjs226 has quit []
m3nd3s_ has quit [Remote host closed the connection]
m3nd3s has joined #ruby-lang
m3nd3s has quit [Ping timeout: 246 seconds]
icooba has joined #ruby-lang
tooky has quit [Remote host closed the connection]
tooky has joined #ruby-lang
jamjam has joined #ruby-lang
Criztian has quit [Remote host closed the connection]
tooky has quit [Ping timeout: 248 seconds]
Mon_Ouie has quit [Ping timeout: 246 seconds]
pbjorklund has quit [Read error: Connection reset by peer]
pbjorklund has joined #ruby-lang
postmodern has quit [Remote host closed the connection]
chendo__ has joined #ruby-lang
runeb has quit [Remote host closed the connection]
<soahccc>
The only thing I still have a problem with is how to change #const_get on Module
<gnufied>
?
<gnufied>
module.const_get("Blah") usually works
<judofyr>
soahccc: change?
<soahccc>
It works if line 1 is class Boss but not if is a module… Then ruby just skips all of it and directly complains about a missing constant https://gist.github.com/d8727079505ce6678e74
Quatrerwin has joined #ruby-lang
cantonic has quit [Quit: cantonic]
mantono has quit [Excess Flood]
Axsuul has quit [Ping timeout: 252 seconds]
mantono has joined #ruby-lang
<judofyr>
soahccc: Module.const_missing is never invoked, right?
<judofyr>
soahccc: what are you trying to autoload? what's the constant name?
<soahccc>
judofyr: Boss::Development if Boss is a class it works, if a module not… so it not getting invokes, right
zinjacoder has joined #ruby-lang
josh^ has quit [Remote host closed the connection]
<judofyr>
gah, constant lookup is a mess
cantonic has joined #ruby-lang
wyhaines has joined #ruby-lang
justinmcp has quit [Remote host closed the connection]
sush24 has joined #ruby-lang
strong has joined #ruby-lang
<soahccc>
So you have no more ideas? I'm not sure if the class Module == module
<gnufied>
Module#const_missing not being invoked makes sense though
<judofyr>
gnufied: it is though.
<judofyr>
or wait
<judofyr>
doh
mxktmdude has quit [Remote host closed the connection]
<judofyr>
soahccc: the correct method to override is: class Module; def const_missing(name) … end end
tRAS has quit [Quit: Mother, did it need to be so high?]
<soahccc>
judofyr: Thank you! It has to be a instance method for sure
<gnufied>
yup.
<gnufied>
Boss is class or module, it is instance of Module and hence defining const_missing as instance method in Module makes sense.
<soahccc>
Now it works perfectly. Still don't get why this approach is that evil that there is no implementation for that
cjs226 has quit [Ping timeout: 252 seconds]
<gnufied>
soahccc: which ruby version you are using?
<soahccc>
1.9.2
<gnufied>
the assumption you are making about path itself is not universally applicable
<soahccc>
p320 I think
<gnufied>
you are searching from current path
<gnufied>
or requiring from current path
<judofyr>
soahccc: I don't see the issue with just requreing-stuff
<gnufied>
^ that too
<soahccc>
It'll search through all load paths, wouldn't it?
gsav_ has quit [Read error: Connection reset by peer]
gsav has quit [Read error: Connection reset by peer]
17SABVBN6 has joined #ruby-lang
<soahccc>
judofyr: In general this is true but this is for dynamic recipes where I don't want to edit the handler for… Only other soultion would be "load everything at startup"… As they require more libraries it wouldn't be that nice
<gnufied>
soahccc: thats corretc
jtoy has joined #ruby-lang
rue|w has quit [Remote host closed the connection]
<zzak>
good morning!
strong has left #ruby-lang [#ruby-lang]
jtoy has quit [Ping timeout: 245 seconds]
17SABVBN6 has quit [Quit: 17SABVBN6]
gnufied has quit [Quit: Leaving.]
wallerdev has joined #ruby-lang
cjs226 has joined #ruby-lang
jtoy has joined #ruby-lang
robie137_ has quit [Ping timeout: 255 seconds]
thillux has quit [Remote host closed the connection]
retro|cz has joined #ruby-lang
carloslopes has joined #ruby-lang
JustinCampbell has joined #ruby-lang
kain has quit [Read error: Connection reset by peer]
kain has joined #ruby-lang
kain has quit [Read error: Connection reset by peer]
kain has joined #ruby-lang
kain has quit [Read error: Connection reset by peer]
kain has joined #ruby-lang
jtoy has quit [Quit: jtoy]
krzkrzkrz has joined #ruby-lang
ricardovaleriano has joined #ruby-lang
kain has quit [Read error: Connection reset by peer]
runeb has quit [Remote host closed the connection]
d3vic3 has joined #ruby-lang
runeb has joined #ruby-lang
zmack has quit [Remote host closed the connection]
ztirf has joined #ruby-lang
lucas__ has quit [Ping timeout: 260 seconds]
mistym has joined #ruby-lang
mistym has joined #ruby-lang
mistym has quit [Changing host]
ztirf has quit [Client Quit]
Criztian has joined #ruby-lang
ricardovaleriano has quit [Remote host closed the connection]
ricardovaleriano has joined #ruby-lang
tenderlove has joined #ruby-lang
Weems has quit [Ping timeout: 256 seconds]
ricardovaleriano has quit [Ping timeout: 246 seconds]
tenderlove has quit [Ping timeout: 260 seconds]
<masterkorp>
oh man one of our chef-client is using 2GB or ram
tRAS has joined #ruby-lang
<chris2>
what a lowly cost for easy deployment
Criztian has quit [Remote host closed the connection]
__butch__ has quit [Remote host closed the connection]
jtoy has joined #ruby-lang
rwilcox has joined #ruby-lang
gaveen has quit [Remote host closed the connection]
burgestrand has joined #ruby-lang
jackhammer2022 has joined #ruby-lang
dhruvasagar has quit [Ping timeout: 246 seconds]
sepp2k1 has joined #ruby-lang
benanne has joined #ruby-lang
sepp2k has quit [Ping timeout: 245 seconds]
tooky has joined #ruby-lang
qpingu has joined #ruby-lang
havenn has joined #ruby-lang
imajes has quit [Excess Flood]
workmad3 has quit [Ping timeout: 260 seconds]
Sambalero has quit [Remote host closed the connection]
imajes has joined #ruby-lang
Raduwen has quit [Quit: Leaving...]
Criztian_ has quit [Remote host closed the connection]
mixtli_ has joined #ruby-lang
sush24 has quit [Ping timeout: 260 seconds]
sush24 has joined #ruby-lang
havenn has quit [Remote host closed the connection]
gaveen has joined #ruby-lang
gaveen has quit [Changing host]
gaveen has joined #ruby-lang
sailias has quit [Quit: Leaving.]
corundum has quit [Disconnected by services]
sgonyea has quit [Quit: sgonyea]
runeb has quit [Remote host closed the connection]
vlad_starkov has quit [Remote host closed the connection]
corundum has joined #ruby-lang
zinjacoder has quit [Read error: Connection reset by peer]
sgonyea has joined #ruby-lang
jtoy has quit [Quit: jtoy]
sush24 has quit [Quit: This computer has gone to sleep]
sgonyea has quit [Client Quit]
ianblenke1 has joined #ruby-lang
mars__ has quit [Quit: Leaving]
dc5ala has quit [Quit: Ex-Chat]
mxktmdude has quit [Remote host closed the connection]
Aphelion is now known as ttilley
richardjortega has joined #ruby-lang
<richardjortega>
hello
<richardjortega>
why doesn't this work ? Date.parse("9/28/2012") get an invalid date arugmenterror
chimkan has joined #ruby-lang
<richardjortega>
I've also tried Date.strptime('9/28/2012', '%m-%d-%Y') and received invalid date argument error as well
<cout>
the first one doesn't work because it's ambiguous
<cout>
the second one doesn't work because your format string uses - instead of /
<richardjortega>
good lord i didn't even notice that in the api docs!
<richardjortega>
@cout thank you so much!
<znowi>
is there a simpler alternative to sanitize gem without nokogiri dependency?
tankdilla has joined #ruby-lang
havenn has joined #ruby-lang
Mon_Ouie has joined #ruby-lang
<znowi>
well, gsub(%r{</?[^>]+?>}, '') will do for my use case
sockmonk has joined #ruby-lang
sgonyea has joined #ruby-lang
__butch__ has joined #ruby-lang
ianblenke1 has quit [Quit: Leaving.]
lcdhoffman has joined #ruby-lang
shajith has joined #ruby-lang
shajith_ has quit [Ping timeout: 246 seconds]
My_Hearing has joined #ruby-lang
Mon_Ouie has quit [Quit: WeeChat 0.3.8]
My_Hearing is now known as Mon_Ouie
jperry2_ has quit [Quit: jperry2_]
burgestrand has quit [Quit: Leaving.]
jtoy has joined #ruby-lang
RegEchse has quit [Quit: <3 WeeChat (v0.3.9-rc2)]
jxie has joined #ruby-lang
havenn has quit [Remote host closed the connection]
heftig has quit [Quit: leaving]
burgestrand has joined #ruby-lang
justinseiter has quit [Ping timeout: 255 seconds]
gregmore_ has joined #ruby-lang
ivanoats_ has joined #ruby-lang
gregmoreno has quit [Ping timeout: 260 seconds]
havenn has joined #ruby-lang
ivanoats has quit [Remote host closed the connection]
heftig has joined #ruby-lang
<rue>
(You think)
mistergibson has joined #ruby-lang
m3nd3s_ has quit [Remote host closed the connection]
runeb has joined #ruby-lang
m3nd3s has joined #ruby-lang
runeb has quit [Ping timeout: 260 seconds]
havenn has quit [Remote host closed the connection]
hakunin has joined #ruby-lang
<andrewvos>
znowi: What's wrong with Nokogiri?
carloslopes has quit [Quit: Leaving.]
gaveen has quit [Remote host closed the connection]
sgonyea has quit [Remote host closed the connection]
<znowi>
andrewvos: nothing. i just don't feel like loading it for a small task.
sgonyea has joined #ruby-lang
deryl has quit [Quit: Leaving.]
sailias has joined #ruby-lang
r1s1ng-ph03n1x has joined #ruby-lang
datanoise has quit [Ping timeout: 260 seconds]
jperry2_ has joined #ruby-lang
zlangley has quit [Quit: leaving]
workmad3 has joined #ruby-lang
jackhammer2022 has quit [Read error: Connection reset by peer]
m3nd3s has quit [Ping timeout: 245 seconds]
jackhammer2022 has joined #ruby-lang
mytrile has joined #ruby-lang
m3nd3s has joined #ruby-lang
m3nd3s_ has joined #ruby-lang
swarley has joined #ruby-lang
sepp2k1 has quit [Remote host closed the connection]
Guedes is now known as Guedes_out
m3nd3s has quit [Ping timeout: 245 seconds]
justinseiter has joined #ruby-lang
brianpWins has quit [Read error: Connection reset by peer]
swarley has quit [Read error: Connection reset by peer]
swarley has joined #ruby-lang
msch has quit [Ping timeout: 248 seconds]
brianpWins has joined #ruby-lang
m3nd3s_ has quit [Remote host closed the connection]
lcdhoffman has quit [Quit: lcdhoffman]
m3nd3s has joined #ruby-lang
sailias has quit [Quit: Leaving.]
nXqd has joined #ruby-lang
nXqd has quit [Client Quit]
nXqd has joined #ruby-lang
rue|w has joined #ruby-lang
Nisstyre has quit [Quit: Leaving]
runeb has joined #ruby-lang
mytrile1 has joined #ruby-lang
havenn has joined #ruby-lang
wyhaines has quit [Remote host closed the connection]
Nisstyre-laptop has quit [Ping timeout: 245 seconds]
mytrile has quit [Ping timeout: 260 seconds]
kain has quit [Ping timeout: 252 seconds]
brianpWins_ has joined #ruby-lang
havenn has quit [Ping timeout: 260 seconds]
brianpWins has quit [Ping timeout: 246 seconds]
brianpWins_ is now known as brianpWins
lcdhoffman has joined #ruby-lang
lcdhoffman has quit [Client Quit]
lcdhoffman has joined #ruby-lang
sent-hil has joined #ruby-lang
workmad3 has quit [Read error: Operation timed out]
unsymbol has joined #ruby-lang
unsymbol has left #ruby-lang [#ruby-lang]
chimkan has quit [Quit: chimkan]
<znowi>
ruby-doc.org is down?
<rcassidy>
seems it
<rwilcox>
znowi: seems like it to me too
<swarley>
PING ruby-doc.org (75.125.194.82) 56(84) bytes of data.
<swarley>
64 bytes from 75.125.194.82: icmp_req=1 ttl=48 time=57.9 ms
<swarley>
sloooooooooooooow
<eam>
57ms is slow now?
<swarley>
compared to google it is
<swarley>
PING 8.8.8.8 (8.8.8.8) 56(84) bytes of data.
<swarley>
64 bytes from 8.8.8.8: icmp_req=1 ttl=50 time=17.1 ms
<eam>
57ms is approx cross-coast latency
<eam>
if you were elsewhere in the world you might see the two values reversed
<eam>
8.8.8.8 is special; it uses anycast routing to find a local cluster
<swarley>
meh, its not "slow" let's just say its not "fast"
<eam>
tl;dr: you're not measuring the same thing
<eam>
57ms is fast, for a cross-coast connection
<eam>
which coast are you on?
<swarley>
east
<eam>
well ruby-doc is in texas
<eam>
so that's why
<eam>
8.8.8.8 is anycast routing likely to a site in upstate NY
<eam>
or VA
<eam>
can't argue with the speed of light bro
kain has joined #ruby-lang
qpingu has quit [Quit: Leaving.]
* swarley
searches for another server in houstan
JustinCampbell has quit [Remote host closed the connection]
<eam>
swarley: try mta-v4.mail.vip.mud.yahoo.com
<swarley>
60ms
qpingu has joined #ruby-lang
<eam>
there you go :)
msch has joined #ruby-lang
Weems has joined #ruby-lang
Weems has quit [Changing host]
Weems has joined #ruby-lang
datanoise has joined #ruby-lang
kain has quit [Ping timeout: 240 seconds]
cjs226 has quit []
lcdhoffman has quit [Quit: lcdhoffman]
jtoy has quit [Quit: jtoy]
stiang has joined #ruby-lang
m3nd3s has quit [Remote host closed the connection]
jperry2_ has quit [Quit: jperry2_]
chimkan_ has joined #ruby-lang
<yorickpeterse>
Ugh, method definition lookup (to see if class X has method Y) is seriously a PITA
<yorickpeterse>
I'm getting there though
sockmonk has quit [Ping timeout: 268 seconds]
<zenspider>
how is method lookup a pita?
<zenspider>
it's kinda the most important thing to OO...
<yorickpeterse>
zenspider: as in, without code evaluation
<yorickpeterse>
If you were to evaluate code you'd just do something like `Foo.instance_methods.include?(:whatever)`. However, this isn't going to work out very well for a linter
<yorickpeterse>
Probably should've mentioned that
r1s1ng-ph03n1x has left #ruby-lang [#ruby-lang]
<yorickpeterse>
So basically I just spent the night writing code that knows that `foo = 'hello'; foo.upcasexxx` is invalid without running it
xyzodiac has quit [Ping timeout: 255 seconds]
<burgestrand>
Sounds like fun.
<burgestrand>
Especially when you factor in monkey patches, singleton methods, method missing crap and just adding things to Object D:
<zenspider>
yorickpeterse: *nod* ok. that's good. it'll fall down a fair amount in things like rails or other more dynamic things
<zenspider>
like, some of my code uses send w/ interpolation.
xyzodiac has joined #ruby-lang
<yorickpeterse>
Yeah
<zenspider>
other code might define method_missing... respond_to might be an option, but instatiation will be prone to error
<yorickpeterse>
That's a problem I still have to solve somehow
<yorickpeterse>
though method_missing is fairly trivial
<zenspider>
if by trivial you mean you punt when you see it... sure
<yorickpeterse>
As technically all called methods are in that case considered "valid"
<yorickpeterse>
But yes, the big issue will be the crazy Ruby meta programming
xyzodiac has quit [Quit: Computer has gone to sleep.]
xyzodiac has joined #ruby-lang
jperry2_ has joined #ruby-lang
<yorickpeterse>
Well, it's a pretty crazy language in terms of what you can do with it and how much you can bend it to your will
<TTilus>
trying to do static analysis to ruby code sure will drive anybody crazy
<TTilus>
what are you doing it for?
<zenspider>
(prediction: because it's there)
<yorickpeterse>
Oh tell me about it. I wrote this code for detecting instance/class methods last night while sleep high. Spent the past few hours fixing it so it didn't cause my head to explode
<yorickpeterse>
TTilus: A linter for Ruby
<yorickpeterse>
one that actually runs
<TTilus>
uh-oh
<TTilus>
runs != works :)
<yorickpeterse>
The only "decent" think I could find was "laser" or something like that. When I ran it it just spat out a big stacktrace
<yorickpeterse>
* thing
<yorickpeterse>
I also couldn't make any sense of the code