Domon_ has quit [Read error: Connection reset by peer]
Domon_ has joined #ruby-lang
saarinen has quit [Quit: saarinen]
sstrickl has quit [Quit: sstrickl]
hahuang65 has quit [Quit: WeeChat 0.4.1]
hahuang65 has joined #ruby-lang
hahuang65 has quit [Client Quit]
hahuang65 has joined #ruby-lang
neilc has quit [Quit: leaving]
ilyam has quit [Quit: ilyam]
pkrnj has quit [Ping timeout: 240 seconds]
enaqxx has joined #ruby-lang
joonty has quit [Ping timeout: 248 seconds]
pkrnj has joined #ruby-lang
joonty has joined #ruby-lang
hahuang65 has quit [Quit: WeeChat 0.4.1]
hahuang65 has joined #ruby-lang
pkrnj has quit [Client Quit]
lewis1711 has quit [Quit: ChatZilla 0.9.90.1 [Firefox 21.0/20130512193848]]
lsegal has joined #ruby-lang
saarinen has joined #ruby-lang
Artheist has joined #ruby-lang
joshuawscott has quit [Quit: Leaving.]
ilyam has joined #ruby-lang
ilyam has quit [Client Quit]
ledestin has joined #ruby-lang
saarinen has quit [Ping timeout: 256 seconds]
rshetty has joined #ruby-lang
arooni-mobile has quit [Quit: Leaving]
joshuawscott has joined #ruby-lang
apeiros has quit [Read error: Connection reset by peer]
apeiros has joined #ruby-lang
anonymuse has quit [Remote host closed the connection]
apeiros has quit [Remote host closed the connection]
apeiros has joined #ruby-lang
Guest25324 has left #ruby-lang [#ruby-lang]
sush24 has joined #ruby-lang
chimkan has joined #ruby-lang
rippa has joined #ruby-lang
chimkan has quit [Ping timeout: 264 seconds]
chimkan has joined #ruby-lang
mistym has quit [Remote host closed the connection]
rohit_ has joined #ruby-lang
r0bgleeson has quit [Ping timeout: 256 seconds]
rippa has quit [Quit: {#`%${%&`+'${`%&NO CARRIER]
joshuawscott has quit [Quit: Leaving.]
itcharlie has quit [Quit: Leaving]
mistym has joined #ruby-lang
hogeo_ has joined #ruby-lang
apeiros has quit [Remote host closed the connection]
rohit_ has quit [Ping timeout: 264 seconds]
<erikh>
hello
<erikh>
i am doing things with computer
hogeo has quit [Ping timeout: 276 seconds]
Artheist has quit [Remote host closed the connection]
saarinen has joined #ruby-lang
rohit_ has joined #ruby-lang
<gnufied>
good luck
<gnufied>
these days believe my computer does things on its own
<gnufied>
I*
io_syl has joined #ruby-lang
io_syl has quit [Read error: Connection reset by peer]
beerdy has joined #ruby-lang
TvL2386 has joined #ruby-lang
rohit_ has quit [Read error: Connection reset by peer]
<TvL2386>
hi guys, I'm documenting with yard for the first time, and I have a method that does "return JSON.parse(string)". I have no clue and cannot know what it is that will be returned, what should I do here with "@return [...]"?
LauraE has joined #ruby-lang
<TvL2386>
I suppose I'll just say @return [Object] ?
sush24 has quit [Quit: This computer has gone to sleep]
<erikh>
that would be a good thing
<TvL2386>
:)
<erikh>
this is a lost art I guess, but pushing for duck typing -- having your callers determine what they're working with by probing for features -- is generally better than explicit type returns
charliesome has joined #ruby-lang
<erikh>
not always, but it tends to be a better way to work, especially wiht polymorphism
<whitequark>
erikh: I'm not sure if it's a good idea in this case
<whitequark>
TvL2386: I'd just leave the return type blank, or write a non-class here, like "@return [JSON object]"
GeissT_ has joined #ruby-lang
<erikh>
whitequark: yeah, it's only going to return one of three types really
<erikh>
makes sense
<TvL2386>
whitequark, JSON object sounds good, I thought it should always match a class name
<whitequark>
no, YARD doesn't care a slightest
<erikh>
it will be marked up as a class if so, rihgt?
<whitequark>
yeah
<whitequark>
simple string matching there
<erikh>
sure
GeissT has quit [Ping timeout: 268 seconds]
<TvL2386>
alrighty! thanks for the advice
<erikh>
should I upgrade octopress
<erikh>
or just get writing
<erikh>
I will probably regret upgrading
<TvL2386>
Also: with yard, or documenting in general, is it correct to say '@return [A]' where A is actually a parent class of what's actually returned?
kith has quit [Quit: kith]
<TvL2386>
for example '@return [Hash]' where it is actually a HashWithIndifferentAccess
<erikh>
yeah -- that's the duck typing thing
<erikh>
specifying a return there is kind of ... well...
<TvL2386>
alrighty :)
kith has joined #ruby-lang
<whitequark>
TvL2386: well, I would document HWIA explicitly
<whitequark>
it's kind of important
<TvL2386>
HWIA?
<charliesome>
hash with idiotic access
TvL2386 has quit [Quit: Ex-Chat]
TvL2386 has joined #ruby-lang
<TvL2386>
accidentally closed...
<TvL2386>
ha lol, hash with idiotic access
<TvL2386>
I was also thinking to change this to 'always use String instead of Symbol', that way I can throw out activesupport entirely
mdedetrich has quit [Quit: Computer has gone to sleep.]
<bnagy>
I am not good at gems. If I want a gem where require 'gemname/subthing' works, what must the actual file be?
<bnagy>
gemroot/lib/subthing/subthing.rb ?
<whitequark>
lib/gemname/subthing.rb
<bnagy>
oh ok
saarinen has quit [Quit: saarinen]
dhruvasagar has quit [Ping timeout: 264 seconds]
<bnagy>
and require 'gemname' just gets you lib/gemname.rb as a convenience?
<bnagy>
oh, no sorry I just misread
<bnagy>
right, cool, that's all fine then. Thanks :)
<bnagy>
so is lib/gemname/lib/support files here frowned on?
<whitequark>
support ?
<whitequark>
never seen anyone use this
<bnagy>
well subthing.rb has three lib files
<bnagy>
sorry I didn't mean literally a dir called support
wallerdev has quit [Quit: wallerdev]
nivanson has joined #ruby-lang
<bnagy>
root/lib/gemname/subthing.rb wants to use root/lib/gemname/lib/a.rb etc
mdedetrich has joined #ruby-lang
<whitequark>
don't think anyone uses two nested /lib
lsegal has quit [Quit: Quit: Quit: Quit: Stack Overflow.]
maxmanders has joined #ruby-lang
injekt_ has left #ruby-lang [#ruby-lang]
injekt has joined #ruby-lang
<injekt>
stupid ban
<rue>
erikh: Sure, but remember I’m dumb
marr has quit [Ping timeout: 264 seconds]
<injekt>
hey now, you're only as dumb as you look
sush24 has quit [Quit: This computer has gone to sleep]
rshetty has joined #ruby-lang
mytrile has joined #ruby-lang
mytrile has quit [Remote host closed the connection]
benlovell has joined #ruby-lang
elia has joined #ruby-lang
hashkey_ has joined #ruby-lang
hashkey is now known as Guest39361
Guest39361 has quit [Killed (morgan.freenode.net (Nickname regained by services))]
hashkey_ is now known as hashkey
sush24 has joined #ruby-lang
swav_ has joined #ruby-lang
<erikh>
rue: I posted it @ erik.hollensbe.org
ryez has joined #ruby-lang
enaqxx has joined #ruby-lang
skade has joined #ruby-lang
elia has quit [Ping timeout: 246 seconds]
dhruvasagar has quit [Ping timeout: 276 seconds]
dhruvasagar has joined #ruby-lang
duckinator has quit [Quit: Narratore di falsità, i pantaloni hanno bruciata!]
elia has joined #ruby-lang
<sush24>
hi.. I've deployed sinatra using passenger
<sush24>
i want to know how to log the messages in to a file
<sush24>
the nginx logs only have "internal server error" etc
<wnd>
I have file path "/path/to/XYZZY/1/2/foobar", and I want to have the stuff after /XYZZY/ ("1/2/foobar"). In Perl I'd use $full_path =~ s:.*/XYZZY/:: . What would be the preferred way to get the same result in Ruby?
<wnd>
that's what I've been doing, but I started wonding if there's a better/more rubyish way to do it
<injekt>
no split is fine
<lupine>
it's a slightly odd requirement, I'm not sure there's a more rubyish way
glebm has quit [Ping timeout: 264 seconds]
<henrikhodne>
The equivalent way would be "/path/to/XYZZY/1/2/foobar".gsub(%r{.*/ZYZZY/}, ""), but I'm not sure I would call it more Rubyish.
<henrikhodne>
Also, with split I would do "/path…".split("/XYZZY/"), not .split(/XYZZY/).
stamina has joined #ruby-lang
Mon_Ouie has quit [Ping timeout: 264 seconds]
enaqxx has quit [Remote host closed the connection]
enaqxx has joined #ruby-lang
enaqxx has quit [Remote host closed the connection]
enaqxx has joined #ruby-lang
elia has quit [Ping timeout: 248 seconds]
elia has joined #ruby-lang
dhruvasagar has quit [Ping timeout: 240 seconds]
dhruvasagar has joined #ruby-lang
realDAB has joined #ruby-lang
henrikhodne has quit [Ping timeout: 264 seconds]
nofxx_ has quit [Remote host closed the connection]
TvL2386 has joined #ruby-lang
<TvL2386>
Hi guys, still busy with yard here... If I have a method that accepts true or false, what would I do? '@param [TrueClass, FalseClass]' or '@param [Boolean]' or '@param [true, false]' ?
vlad_starkov has quit [Remote host closed the connection]
<tubbo>
sush24: in your RAILS_ROOT
<tubbo>
oh wait you're using Sinatra
<tubbo>
haha
<tubbo>
sush24: umm, probably in your app root there should be a log/production.log. if not, check apache's error_log for "permission denied" errors, which would point to the path it's looking to write a log file in..
relix has joined #ruby-lang
arooni-mobile has joined #ruby-lang
zomgbie has joined #ruby-lang
_jpb_ has joined #ruby-lang
<sush24>
in the docs i see that Sinatra will use whatever it will find in env['rack.logger']
<yorickpeterse>
note to self: don't try to read a 100MB file 10 times using threads
<yorickpeterse>
it froze my entire OS
Nisstyre-laptop has joined #ruby-lang
<whitequark>
yorickpeterse: sounds like a shitty OS
<whitequark>
(or disk, or you tweaked it to death.)
arooni-mobile has quit [Ping timeout: 264 seconds]
<r0bgleeson>
sush24: look at Rack::Logger
<r0bgleeson>
its a configurable middleware
jsullivandigs has joined #ruby-lang
anonymuse has quit [Remote host closed the connection]
LauraE has joined #ruby-lang
LauraE has left #ruby-lang [#ruby-lang]
Nisstyre-laptop has quit [Ping timeout: 265 seconds]
agile has quit [Quit: Ex-Chat]
agile has joined #ruby-lang
mdedetrich has quit [Quit: Computer has gone to sleep.]
benlovell has quit [Ping timeout: 246 seconds]
mdedetrich has joined #ruby-lang
mdedetrich has quit [Client Quit]
fbernier has joined #ruby-lang
joonty has quit [Quit: WeeChat 0.4.1]
anonymuse has joined #ruby-lang
vlad_starkov has joined #ruby-lang
matti has quit [Quit: Oh dear...]
vlad_starkov has quit [Remote host closed the connection]
rshetty has quit [Quit: Sleeping]
hahuang65 has joined #ruby-lang
__butch__ has joined #ruby-lang
hahuang65 has quit [Client Quit]
hahuang65 has joined #ruby-lang
rshetty has joined #ruby-lang
mbj has quit [Ping timeout: 264 seconds]
glebm has joined #ruby-lang
zomgbie has quit [Ping timeout: 276 seconds]
mbj has joined #ruby-lang
bgant has quit [Quit: Leaving.]
sstrickl has joined #ruby-lang
relix has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
rshetty has quit [Quit: Sleeping]
mbj has quit [Ping timeout: 264 seconds]
jds has joined #ruby-lang
<jds>
Heya
enebo has quit [Quit: enebo]
Paradox has quit [Ping timeout: 245 seconds]
<jds>
RTL text is breaking my mind. Can anyone explain how on earth this output occurs : https://gist.github.com/jdelStrother/6090264 ? Or where I should go for a RTL text manipulation 101 ?
dagobah has quit [Remote host closed the connection]
realDAB has quit [Quit: realDAB]
henrikhodne has joined #ruby-lang
pellis has joined #ruby-lang
bgant has joined #ruby-lang
<pellis>
what's an easy way to profile ruby and optimize a code path?
relix has joined #ruby-lang
<whitequark>
perftools.rb
DEac-_ has quit [Read error: Connection reset by peer]
<whitequark>
for profiling
<whitequark>
and using your brain for optimizing :)
DEac- has joined #ruby-lang
vlad_starkov has joined #ruby-lang
elia has quit [Ping timeout: 260 seconds]
<pellis>
whitequark, thanks i only knew ruby-prof. this one is interesting - are you using it with success?
<whitequark>
yes
<whitequark>
tip: use kcachegrind
<pellis>
for visualizing the output?
<whitequark>
yes
<whitequark>
it's much more convenient
<pellis>
i'm wondering if any of the built-in Mac tools can help
<pellis>
i remember vaguely that they did a good job there
<whitequark>
no clue, never used osx
<pellis>
at least on dtrace and visualizing dtrace
<whitequark>
ruby 2.0 has dtrace support I think.
<whitequark>
maybe 2.1.
<gnufied>
2.0 def. has dtrace support
<jds>
Instruments.app is great, but I've struggled in the past to set it up right with ruby's dtrace hooks
<pellis>
gnufied, nope i'm just getting my feet wet. looks like tmm1 is doing a lot of work in this space
redderhs has joined #ruby-lang
<gnufied>
yep
<redderhs>
Hi, the link in this message is in regards to an Open Source Computing to further the developments of hardware for the mobile industry. It's time for Linux to be the #1 Consumer Operating System, Ubuntu Edge movement! http://pastebin.com/j57Dc29E We can all make a difference for as little as One Dollar! Thank You for your time.
redderhs has left #ruby-lang [#ruby-lang]
relix has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<gnufied>
bah, Bot
<gnufied>
I was about to ask some nasty questions about Ubuntu edge
rshetty has joined #ruby-lang
* whitequark
shrugs
<spike|spiegel>
gnufied: you need to clarify that the 'D language' is not the 'D programming language'
Paradox has joined #ruby-lang
<gnufied>
okay. do you think it matters that much, because I am sure within 2 minutes of exploring D programming language and D scripting interface of Dtrace the distinction becomes quite clear.
<gnufied>
I did think about it and did not think it was important.
<spike|spiegel>
google will fail people
relix has joined #ruby-lang
<pellis>
anyone has an idea what to use to visualize perftools output on OSX?
<gnufied>
perftools.rb?
<gnufied>
graphiz
<gnufied>
it ships with its own gif/png/svg generator isn't it?
<whitequark>
graphviz does
mrsolo has joined #ruby-lang
<gnufied>
yes, perftools uses graphviz internally for generating those images
<pellis>
any chance Instruments.app can work with that?
<gnufied>
No
<gnufied>
there is little to no chance
shinnya has joined #ruby-lang
elia has quit [Ping timeout: 246 seconds]
zmike has joined #ruby-lang
<pellis>
any idea why pprof shouts "substr outside of string at…" when i try to output with text?
<pellis>
gmm.. file is empty
cored has quit [Quit: leaving]
skmp has joined #ruby-lang
vlad_sta_ has joined #ruby-lang
vlad_starkov has quit [Ping timeout: 246 seconds]
Nisstyre-laptop has joined #ruby-lang
vlad_sta_ has quit [Write error: Broken pipe]
<pellis>
i think perftools isn't working for me because i'm working across threads
intellitech has quit [Quit: intellitech]
beerdy has quit [Remote host closed the connection]
<spike|spiegel>
haha
_jpb_ has quit [Ping timeout: 260 seconds]
apeiros has quit [Remote host closed the connection]
maxmanders has quit [Quit: Computer has gone to sleep.]
symm- has joined #ruby-lang
pr0ton has joined #ruby-lang
dominikh has quit [Quit: WeeChat 0.4.0-dev]
dominikh1 has joined #ruby-lang
sush24 has quit [Quit: This computer has gone to sleep]
tylersmith has joined #ruby-lang
rshetty has quit [Quit: Sleeping]
pellis has left #ruby-lang ["Leaving"]
tylersmi_ has joined #ruby-lang
netShadow has joined #ruby-lang
tylersmith has quit [Read error: Connection reset by peer]
realDAB has joined #ruby-lang
relix has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
tkuchiki has quit [Remote host closed the connection]
skmp has quit [Ping timeout: 256 seconds]
x0f has quit [Ping timeout: 268 seconds]
itcharlie has joined #ruby-lang
vlad_starkov has joined #ruby-lang
skmp has joined #ruby-lang
x0f has joined #ruby-lang
saarinen has joined #ruby-lang
hinbody has joined #ruby-lang
enebo has joined #ruby-lang
pr0ton has quit [Quit: pr0ton]
realDAB has quit [Quit: realDAB]
sstrickl has quit [Quit: sstrickl]
vlad_starkov has quit [Remote host closed the connection]
vlad_starkov has joined #ruby-lang
maxmanders has joined #ruby-lang
bradsmith has quit [Remote host closed the connection]
vlad_starkov has quit [Remote host closed the connection]
dominikh1 is now known as dominikh
maxmanders has quit [Ping timeout: 248 seconds]
jonahR has joined #ruby-lang
kstuart has quit [Ping timeout: 268 seconds]
hinbody has quit [Ping timeout: 268 seconds]
bradsmith has joined #ruby-lang
vlad_starkov has joined #ruby-lang
rickruby has quit [Remote host closed the connection]
intellitech has joined #ruby-lang
glebm has quit [Quit: Computer has gone to sleep.]
glebm has joined #ruby-lang
io_syl has joined #ruby-lang
ffio has quit [Quit: WeeChat 0.4.1]
Barn_ has joined #ruby-lang
glebm has quit [Client Quit]
rickruby has joined #ruby-lang
Barn_ has quit [Quit: Page closed]
kuja_ is now known as kuja
relix has joined #ruby-lang
itcharlie has quit [Read error: No route to host]
forrest has joined #ruby-lang
glebm has joined #ruby-lang
rickruby has quit [Remote host closed the connection]
havenwood has joined #ruby-lang
killtheliterate is now known as killthe|me
killthe|me is now known as killthe|food
mistym has quit [Remote host closed the connection]
melter has quit [Read error: Connection reset by peer]
maxmanders has joined #ruby-lang
_jpb_ has joined #ruby-lang
vlad_starkov has quit [Ping timeout: 246 seconds]
rippa has quit [Ping timeout: 248 seconds]
enebo has quit [Ping timeout: 264 seconds]
itcharlie has joined #ruby-lang
gregmoreno has joined #ruby-lang
maxmanders has quit [Quit: Computer has gone to sleep.]
arooni-mobile has joined #ruby-lang
grosser has joined #ruby-lang
grosser has quit [Client Quit]
firstdayonthejob has joined #ruby-lang
yfeldblum has quit [Read error: Connection reset by peer]
yfeldblum has joined #ruby-lang
_jpb_ has quit [Ping timeout: 240 seconds]
mbj has joined #ruby-lang
realDAB has joined #ruby-lang
sstrickl has joined #ruby-lang
sstrickl has joined #ruby-lang
sstrickl has quit [Changing host]
zmike has quit [Quit: ~]
tubbo is now known as pipesoup
pipework has quit [Remote host closed the connection]
pipesoup is now known as tubbo
tylersmi_ has quit [Remote host closed the connection]
_tockitj has joined #ruby-lang
_tockitj has left #ruby-lang [#ruby-lang]
_tockitj has joined #ruby-lang
s0ber has quit [Read error: Connection reset by peer]
s0ber has joined #ruby-lang
mbj has quit [Read error: Connection reset by peer]
dhruvasagar has joined #ruby-lang
mbj has joined #ruby-lang
fuhgeddaboudit has joined #ruby-lang
spuk has quit [Ping timeout: 256 seconds]
sstrickl has quit [Read error: Connection reset by peer]