_whitelogger [_whitelogger!~whitelogg@kaunan.whitequark.org] has joined #ruby-lang
_whitelogger1 [_whitelogger1!~whitelogg@kaunan.whitequark.org] has joined #ruby-lang
_whitelogger0 [_whitelogger0!~whitelogg@kaunan.whitequark.org] has joined #ruby-lang
_whitelogger1 [_whitelogger1!~whitelogg@kaunan.whitequark.org] has joined #ruby-lang
_whitelogger0 [_whitelogger0!~whitelogg@kaunan.whitequark.org] has joined #ruby-lang
_whitelogger0 [_whitelogger0!~whitelogg@kaunan.whitequark.org] has joined #ruby-lang
_whitelogger0 [_whitelogger0!~whitelogg@kaunan.whitequark.org] has joined #ruby-lang
_whitelogger [_whitelogger!~whitelogg@kaunan.whitequark.org] has joined #ruby-lang
<wallerdev>
is ruby 1.9.3 stable?
dv310p3r [dv310p3r!~dv310p3r@c-98-203-41-91.hsd1.fl.comcast.net] has joined #ruby-lang
<whitequark>
wallerdev: theoretically, yes
<whitequark>
I was able to crash it, but not deterministically enough to make a bugreport (no gems/C-exts involved)
<whitequark>
and that did not happen on 1.9.2
<whitequark>
I'd be wary.
banister_ [banister_!~baniseter@115.189.34.200] has joined #ruby-lang
<wallerdev>
ah
<wallerdev>
okay
<wallerdev>
thanks for the advice :)
<whitequark>
well, I actually use it on one production site, and it's fine (it was before I've discovered the bug)
<whitequark>
but if you'll encounter a weird, possibly GC-related crash, try 1.9.2 first.
<wallerdev>
yeah i was just starting up a new production site but didn't see it listed in rvm so i was a little confused
<whitequark>
oh, then you have old rvm
<whitequark>
rvm get head
<wallerdev>
ah
<wallerdev>
gotcha
<wallerdev>
i used to be on top of these things haha
<wallerdev>
i appreciate how rvm's installer addresses me by name :D
<whitequark>
on the other hand, Rails 3 leaks memory on 1.9.2 (again, my personal findings)
<whitequark>
so if you'll encounter a memory leak... try 1.9.3 first :D
<wallerdev>
haha
<whitequark>
that's why I have switched in first place
<wallerdev>
i remember discovering a memory leak a long time ago in rails 2
<banister_>
hey can someone here try out a new debugging gem i released?
<whitequark>
that leak is not in Rails, but somewhere in the 1.9.2 internals
<wallerdev>
if you changed your log level to :warn or something it would write all the logs into memory and would continue doing that until you restarted rails
<wallerdev>
memory usage grew accordingly
macmartine [macmartine!~macmartin@c-24-21-112-60.hsd1.or.comcast.net] has joined #ruby-lang
<whitequark>
huh
<whitequark>
pretty stupid
<wallerdev>
banister_: i'll try it maybe
<wallerdev>
what does it do
<banister_>
wallerdev: let's you walk the call stack
<wallerdev>
oh i don't use pry since it's for newbs
<banister_>
wallerdev: just do: gem install pry pry-stack_explorer
<banister_>
and then put a binding.pry in your app somewhere
<banister_>
and use up/down/frame/show-stack to get around the call stack
<banister_>
wallerdev: hehe
<wallerdev>
well i can't stop my app at the moment
<whitequark>
wallerdev: lol. it's like not using rails because it's for newbs and sticking to php instead
<wallerdev>
does it have a way to attach to a running one
<banister_>
wallerdev: im sure you have more than one app to try it on ;)
<wallerdev>
my ruby script has been running for like 5 days now scraping some data (i should have made it multithreaded it would've finished in a few hours) lol
<banister_>
wallerdev: even a small sample program would be suffiicient, i could even write the sample code for you
<wallerdev>
ill try it out on something small then
<wallerdev>
i just need to install rvm 1.9.3 first
<banister_>
wallerdev: it works on 1.9.2 as well
simon_weber [simon_weber!u4119@gateway/web/irccloud.com/x-rdnbewweyjgdubzc] has joined #ruby-lang
<wallerdev>
I'm still on 1.8.4
<whitequark>
banister_: how do you get the parent binding?
<headius>
I assume that's what you wanted to get at
<headius>
if not, then the original binding object has the raw info you probably want
jaisoares [jaisoares!~jsoares@bl7-44-30.dsl.telepac.pt] has quit [#ruby-lang]
<headius>
fwiw, binding.of_caller is an awful feature for any VM that wants to optimize
<banister_>
yeah, im just using it for debugging
<whitequark>
headius: you were faster than me :D
<headius>
whitequark: so you figured it out too then
<whitequark>
yes
<headius>
that's the only real complication when poking around JRuby internals...there's two sides
<whitequark>
I prefer the one with cookies
<headius>
we hide all the java stuff from Ruby unless you ask for it
<headius>
mmm
<banister_>
whitequark: just as a full example, could oyu show me the equivalent of: binding.of_caller(4) (binding of 4th caller)
<headius>
that will be trckier
<headius>
we don't provide a simple method for nth caller
<headius>
current and previous
<whitequark>
yeah, and I don't see a way to iterate up in the stack
<headius>
but you can do what they do manually...it's just tricky because you're doing it from within a binding
<whitequark>
hm
<headius>
so you're monkeying with the stack you're trying to walk
<headius>
even in rubinius this is C++ code
<headius>
you can't arbitrarily walk bindings with just your own Ruby unless they expose it for you
<whitequark>
I thought of executing lambda{ binding } in the context of upward stack frames
<banister_>
in MRI it's kind of trivial to do this with a C ext
<whitequark>
but looks like I have nothing to execute the lambda within
<headius>
banister_: same deal here
<banister_>
headius: cool
<headius>
whitequark: that would still be a downstream binding from the one you got from ThreadContext
<whitequark>
hm
<banister_>
i have to go now for a while, but im really interested in the outcome, could you send me a message with the solution (if u find one) to https://github.com/banister
<banister_>
thx
<whitequark>
headius: I don't see a way to execute a lambda in arbitrary context without a pre-exisiting binding
Banistergalaxy [Banistergalaxy!~AndChat@222.153.223.45] has joined #ruby-lang
<Banistergalaxy>
headius: btw isn't there a jruby debugger that has code to do exactly this?
<whitequark>
headius: and frame.block.getProcObject is nil too
<whitequark>
and all the bodies are null
<whitequark>
I'd say that this is impossible in pure Ruby
<headius>
debuggers only need to access the current frame at debug time, which is at the top of the stack there
<whitequark>
am I right?
<headius>
some debuggers can access arbitrary frames, but not the typical ruby debuggers
<headius>
whitequark: most of that is used for caching
<headius>
the fact that there's nothing there means there's never been a proc made from that frame
<headius>
and no block was passed into that frame
<whitequark>
ah, got it
wmoxam [wmoxam!~wmoxam@pdpc/supporter/active/wmoxam] has joined #ruby-lang
jaisoares [jaisoares!~jsoares@bl7-44-30.dsl.telepac.pt] has joined #ruby-lang
nfxgosu [nfxgosu!~nekid@117.202.84.231] has joined #ruby-lang
<erikh>
bnagy: you're correct -- they aren't being shared across threads though, I have one receiver running in one thread and another sender running in another
<erikh>
using hte push/pull strategy
<erikh>
which should, in theory, be fine
<erikh>
anyhow, sorry to bother you all -- not quite ready to share this code yet, but I appreciate the assistance
<bnagy>
also I had some weird issues with the ffi gem until I updated to 2.1.11
<erikh>
yeah this is a new gem written by a coworker, lourens naudé
Stalkr_ [Stalkr_!~Stalkr@x1-6-e0-46-9a-1f-97-a2.k617.webspeed.dk] has joined #ruby-lang
<erikh>
so it's entirely possible I'm hitting something in that
tla [tla!~tla@2.108.171.233] has joined #ruby-lang
<erikh>
I'm just not skilled enough to appropriately debug it
luckydev [luckydev!~Adium@117.202.145.133] has joined #ruby-lang
<bnagy>
cremes in #zeromq is a machine - super helpful, if you get really stuck
nfxgosu [nfxgosu!~nekid@117.202.84.231] has joined #ruby-lang
<erikh>
good to know, thanks.
<luckydev>
im confused about file handling in ruby. not about the methods. but the way we specify files/directors like "./somehting.rb" or "/**/*.rb" .. there are various forms of representing files and directories.. where can i learn about 'em
vladalive [vladalive!~vladalive@176.52.68.243] has joined #ruby-lang
nfxgosu [nfxgosu!~nekid@117.202.84.231] has joined #ruby-lang
<bnagy>
luckydev: maybe start with the doc for Dir.glob
<luckydev>
bnagy: thanks
<bnagy>
then File.join File.expand_path, that should get you most of the way
<luckydev>
ok
<luckydev>
but these are standard unix representations… so i can use 'em even in node.js or python…. right?
<bnagy>
don't think /**/ is
<Phrogz>
luckydev: directory globbing patterns are standard beyond Ruby, but not at the filesystem level. I cannot say whether either of those suppose /**/*
<luckydev>
ok
<Asher>
ruby globs intepret ** as a recursive wildcard
<Phrogz>
w00t!
* Phrogz
just added Markdown formatting to his site along with live as-you-type preview. So I can pretend to be in Stack Overflow when editing my own stuff :)
amerine [amerine!~mturner@bc171197.bendcable.com] has joined #ruby-lang
jaisoares [jaisoares!~jsoares@bl7-44-30.dsl.telepac.pt] has joined #ruby-lang
jaisoares [jaisoares!~jsoares@bl7-44-30.dsl.telepac.pt] has joined #ruby-lang
luckydev [luckydev!~Adium@117.202.145.133] has quit [#ruby-lang]
jaisoares [jaisoares!~jsoares@bl7-44-30.dsl.telepac.pt] has joined #ruby-lang
chezduck [chezduck!~chezduck@46.231.84.226] has joined #ruby-lang
jaisoares [jaisoares!~jsoares@bl7-44-30.dsl.telepac.pt] has joined #ruby-lang
jaisoares [jaisoares!~jsoares@bl7-44-30.dsl.telepac.pt] has joined #ruby-lang
jaisoares [jaisoares!~jsoares@bl7-44-30.dsl.telepac.pt] has joined #ruby-lang
dr0id [dr0id!~andy@unaffiliated/dr0id] has joined #ruby-lang
michael_mbp [michael_mbp!~Marin@62.215.214.4] has joined #ruby-lang
michael_mbp_ [michael_mbp_!~Marin@62.215.214.4] has joined #ruby-lang
rpowell [rpowell!~rpowell@CPE-121-218-215-158.lnse4.cht.bigpond.net.au] has joined #ruby-lang
nfxgosu [nfxgosu!~nekid@117.202.84.231] has joined #ruby-lang
JohnBat26 [JohnBat26!~Eugene@89.175.77.79] has joined #ruby-lang
h4y4shi [h4y4shi!~chatzilla@rrcs-67-79-54-130.sw.biz.rr.com] has joined #ruby-lang
frangiz [frangiz!~frangiz@user26.77-105-206.netatonce.net] has joined #ruby-lang
solars [solars!~solars@194.208.132.118] has joined #ruby-lang
heftig [heftig!~Jan@archlinux/developer/heftig] has joined #ruby-lang
nfxgosu [nfxgosu!~nekid@117.202.84.231] has joined #ruby-lang
thone [thone!~thone@g225085180.adsl.alicedsl.de] has joined #ruby-lang
nfxgosu [nfxgosu!~nekid@117.202.84.231] has joined #ruby-lang
nfxgosu [nfxgosu!~nekid@117.202.84.231] has joined #ruby-lang
context [context!context@november.xen.prgmr.com] has quit [#ruby-lang]
nfxgosu [nfxgosu!~nekid@117.202.84.231] has joined #ruby-lang
solars [solars!~solars@194.208.132.118] has joined #ruby-lang
nfxgosu [nfxgosu!~nekid@117.202.84.231] has joined #ruby-lang
<erikh>
got it, yay
<erikh>
had to read thread.rb to get there
<erikh>
LEVEL UP
<masterkorp>
erikh: lebel 85 ?
<erikh>
more like 2
<erikh>
I was hitting a few deadlocks more or less with the multiple queues I was managing
nfxgosu [nfxgosu!~nekid@117.202.84.231] has joined #ruby-lang
dr0id [dr0id!~andy@unaffiliated/dr0id] has quit [#ruby-lang]
yxhuvud [yxhuvud!mongo@h-5-47.a212.priv.bahnhof.se] has joined #ruby-lang
nfxgosu [nfxgosu!~nekid@117.202.84.231] has joined #ruby-lang
nfxgosu [nfxgosu!~nekid@117.202.84.231] has joined #ruby-lang
nfxgosu [nfxgosu!~nekid@117.202.84.231] has joined #ruby-lang
<h4y4shi>
Anyone use Ruby in Steels?
<h4y4shi>
*Steel
looopy [looopy!~looopy@c-68-34-92-100.hsd1.md.comcast.net] has joined #ruby-lang
nfxgosu [nfxgosu!~nekid@117.202.84.231] has joined #ruby-lang
Indian_ [Indian_!~Indian@unaffiliated/londonmet050] has joined #ruby-lang
ultimoo [ultimoo!~ultimoo@123.201.199.106] has joined #ruby-lang
nfxgosu [nfxgosu!~nekid@117.202.84.231] has joined #ruby-lang
roadkith [roadkith!~kith@unaffiliated/kith] has joined #ruby-lang
kyrylo [kyrylo!~kyrylo@46.118.235.140] has joined #ruby-lang
kyrylo [kyrylo!~kyrylo@subtle/user/kyrylo] has joined #ruby-lang
havenn [havenn!~skipper@pool-71-189-127-105.lsanca.fios.verizon.net] has joined #ruby-lang
voker57 [voker57!~voker57@128-70-8-28.broadband.corbina.ru] has joined #ruby-lang
voker57 [voker57!~voker57@kvirc/developer/Voker57] has joined #ruby-lang
rpowell [rpowell!~rpowell@CPE-121-218-215-158.lnse4.cht.bigpond.net.au] has joined #ruby-lang
cmatheson [cmatheson!~cam@71-219-45-53.slkc.qwest.net] has joined #ruby-lang
paulblart [paulblart!~paul@71-219-45-53.slkc.qwest.net] has joined #ruby-lang
paulblart [paulblart!~paul@71-219-45-53.slkc.qwest.net] has quit [#ruby-lang]
paulblart [paulblart!~paul@71-219-45-53.slkc.qwest.net] has joined #ruby-lang
stoor [stoor!~stoor@095-097-012-177.static.chello.nl] has joined #ruby-lang
cyri_ [cyri_!~cyri_@149.93.119.80.rev.sfr.net] has joined #ruby-lang
Natch| [Natch|!~natch@178.73.217.238] has joined #ruby-lang
<shevy>
masterkorp what is that? emacs?
<shevy>
oh
<shevy>
vim
<shevy>
the top bar comes from the window manager?
<masterkorp>
shevy: yeah, vim and awesome wm
ovnimancer [ovnimancer!~anton@212.59.96.38] has quit [#ruby-lang]
zmack [zmack!~zmack@109.99.235.103] has joined #ruby-lang
flooose [flooose!~chris@mnch-5d86e5af.pool.mediaWays.net] has joined #ruby-lang
<DEac->
i want to create a rake-file-task in a namespace: namespace :log do file '.lzma' => '.log' end # i thought this works like in Makefile, but rake does not find this task: Don't know how to build task 'passenger.3001.log.lzma' / Don't know how to build task 'log:passenger.3001.log.lzma'
<DEac->
how i can create those tasks
molgrew [molgrew!~bozo20@85.182.139.18] has joined #ruby-lang
<DEac->
i tried rule instead file, too: namespace :log do rule '.lzma' => '.log' end # same errors
[zaf]-Coral [[zaf]-Coral!~quassel@41-133-59-28.dsl.mweb.co.za] has joined #ruby-lang
flowerpot [flowerpot!~flower@ec2-50-112-114-252.us-west-2.compute.amazonaws.com] has joined #ruby-lang
toretore [toretore!~toretore@crr06-3-82-231-12-81.fbx.proxad.net] has joined #ruby-lang
<_hasso_>
ok, upgraded rubygems, problem solved
_hasso_ [_hasso_!~hasso@hasso.estpak.ee] has quit [#ruby-lang]
ultimoo [ultimoo!~ultimoo@123.201.199.106] has joined #ruby-lang
coderrr [coderrr!~steve@pdpc/corporate-sponsor/privateinternetaccess.com/coderrr] has joined #ruby-lang
gianlucadv [gianlucadv!~gianlucad@st-dellaved.statistica.unimib.it] has joined #ruby-lang
cyri__ [cyri__!~cyri_@232.93.119.80.rev.sfr.net] has joined #ruby-lang
butchanton [butchanton!~butchanto@c-71-202-131-177.hsd1.ca.comcast.net] has joined #ruby-lang
ylluminate [ylluminate!~ylluminat@rrcs-24-123-53-166.central.biz.rr.com] has joined #ruby-lang
shevy [shevy!~shevy@91-113-95-182.adsl.highway.telekom.at] has joined #ruby-lang
chezduck [chezduck!~chezduck@46.231.84.226] has joined #ruby-lang
dave_miles [dave_miles!~davemiles@gatej.mh.bbc.co.uk] has joined #ruby-lang
robotmay [robotmay!~robotmay@94.30.13.228] has joined #ruby-lang
Indian [Indian!~Indian@unaffiliated/londonmet050] has joined #ruby-lang
KillerFox [KillerFox!~rn@home.protection-fault.ch] has joined #ruby-lang
Natch| [Natch|!~natch@178.73.217.238] has joined #ruby-lang
tla_ [tla_!~tla@2.106.137.250] has joined #ruby-lang
virunga [virunga!~virunga@151.64.17.124] has joined #ruby-lang
virunga [virunga!~virunga@151.64.17.124] has quit [#ruby-lang]
Natch| [Natch|!~natch@178.73.217.238] has joined #ruby-lang
vladalive [vladalive!~vladalive@176.52.68.243] has joined #ruby-lang
gregmore_ [gregmore_!~gregmoren@S01067444012f4469.vc.shawcable.net] has joined #ruby-lang
jasiek [jasiek!~jps@sanepid.org] has joined #ruby-lang
x0F__ [x0F__!~x0F@unaffiliated/x0f] has joined #ruby-lang
x0F [x0F!~x0F@unaffiliated/x0f] has joined #ruby-lang
tekin [tekin!~tekin@88-96-65-166.dsl.zen.co.uk] has joined #ruby-lang
ramonmaruko [ramonmaruko!~marco@122.52.126.66] has joined #ruby-lang
ramonmaruko [ramonmaruko!~marco@122.52.126.66] has joined #ruby-lang
NinoScript [NinoScript!~anonymous@pc-50-243-241-201.cm.vtr.net] has joined #ruby-lang
enikar [enikar!~gil@cl-140.mrs-01.fr.sixxs.net] has joined #ruby-lang
enikar [enikar!~gil@cl-140.mrs-01.fr.sixxs.net] has quit [#ruby-lang]
|Vargas| [|Vargas|!~luke@host101-153-dynamic.40-79-r.retail.telecomitalia.it] has joined #ruby-lang
|Vargas| [|Vargas|!~luke@pdpc/supporter/profesional/vargas] has joined #ruby-lang
niklasb [niklasb!~codeslay0@scc-wkit-clx-217-219.scc.kit.edu] has joined #ruby-lang
Fullmoon [Fullmoon!~Fullmoon@dsl-stat-43-17.mmc.at] has joined #ruby-lang
empity [empity!~user@149.255.121.162] has joined #ruby-lang
stoor [stoor!~stoor@095-097-012-177.static.chello.nl] has joined #ruby-lang
kvsm [kvsm!~kvsm@94-193-245-6.zone7.bethere.co.uk] has joined #ruby-lang
vladalive [vladalive!~vladalive@176.52.68.243] has joined #ruby-lang
gix [gix!~gix@e180009041.adsl.alicedsl.de] has joined #ruby-lang
banisterfiend [banisterfiend!~baniseter@222.153.223.47] has joined #ruby-lang
jstemmer [jstemmer!~cheetah@mrpwn.stemmertech.com] has joined #ruby-lang
heftig [heftig!jan@archlinux/developer/heftig] has joined #ruby-lang
judofyr [judofyr!~judofyr@195.159.219.65] has joined #ruby-lang
tla [tla!~tla@2.106.137.250] has joined #ruby-lang
dr0id [dr0id!~andy@unaffiliated/dr0id] has joined #ruby-lang
jmeeuwen [jmeeuwen!~kanarip@white.kolabsys.com] has joined #ruby-lang
robbyoconnor [robbyoconnor!~wakawaka@guifications/user/r0bby] has joined #ruby-lang
dkannan [dkannan!u480@gateway/web/irccloud.com/x-ipjbrwvnkhgzfmcp] has joined #ruby-lang
michael_mbp [michael_mbp!~Marin@62.215.214.4] has joined #ruby-lang
<banisterfiend>
.
kvsm [kvsm!~kvsm@94-193-245-6.zone7.bethere.co.uk] has joined #ruby-lang
Natch| [Natch|!~natch@178.73.217.238] has joined #ruby-lang
chezduck [chezduck!~chezduck@46.231.84.226] has joined #ruby-lang
twittard [twittard!~twittard@cpe-76-169-74-39.socal.res.rr.com] has joined #ruby-lang
rippa [rippa!~splitta@85.158.54.234] has joined #ruby-lang
DEac- [DEac-!~deac@81.16.104.86] has joined #ruby-lang
cynosure [cynosure!~cynosure@centrumnet.hu] has joined #ruby-lang
mitchty [mitchty!~mitchty@ec2-50-19-41-37.compute-1.amazonaws.com] has joined #ruby-lang
EvilJStoker [EvilJStoker!jstoker@unaffiliated/jstoker] has joined #ruby-lang
<andrewvos>
..
jaisoares [jaisoares!~jsoares@bl7-44-30.dsl.telepac.pt] has joined #ruby-lang
demeth [demeth!~leto@c83-249-208-141.bredband.comhem.se] has joined #ruby-lang
Fullmoon [Fullmoon!~Fullmoon@85-127-14-208.dynamic.xdsl-line.inode.at] has joined #ruby-lang
yadav [yadav!~quassel@dsl-173-248-230-235.acanac.net] has joined #ruby-lang
publicvoid__ [publicvoid__!~publicvoi@p4FCAF92B.dip.t-dialin.net] has joined #ruby-lang
_inc [_inc!~inc@host81-152-6-45.range81-152.btcentralplus.com] has joined #ruby-lang
_inc [_inc!~inc@unaffiliated/-inc/x-0498339] has joined #ruby-lang
jMCg [jMCg!~hiro@apache/committer/igalic] has joined #ruby-lang
malev [malev!~malev@190.210.138.237] has joined #ruby-lang
mark_locklear [mark_locklear!~jlocklear@ab-tech-lan-to-ab-tech-gw.ncren.net] has joined #ruby-lang
takaokouji [takaokouji!~takaokouj@nat35.mable.ne.jp] has joined #ruby-lang
wyhaines [wyhaines!~wyhaines@65.39.118.15] has joined #ruby-lang
vdrab [vdrab!~vdrab@p922ecb.kyotnt01.ap.so-net.ne.jp] has joined #ruby-lang
pxjorge [pxjorge!~pxjorge@a89-152-235-119.cpe.netcabo.pt] has joined #ruby-lang
cynosure [cynosure!~cynosure@centrumnet.hu] has joined #ruby-lang
csherin [csherin!~csherin@202.164.151.110] has joined #ruby-lang
cynosure [cynosure!~cynosure@centrumnet.hu] has joined #ruby-lang
enikar [enikar!~gil@cl-140.mrs-01.fr.sixxs.net] has joined #ruby-lang
stoor [stoor!~stoor@ip4da85716.direct-adsl.nl] has joined #ruby-lang
enikar [enikar!~gil@cl-140.mrs-01.fr.sixxs.net] has quit ["WeeChat 0.3.6"]
wyhaines [wyhaines!~wyhaines@65.39.118.15] has joined #ruby-lang
robotmay [robotmay!~robotmay@94.30.13.228] has joined #ruby-lang
fayimora [fayimora!~fayimora@95.175.159.48] has joined #ruby-lang
dfr|mac [dfr|mac!~dfr|work@ool-18baf7e7.dyn.optonline.net] has joined #ruby-lang
path[l]2 [path[l]2!~path@59.162.86.164] has joined #ruby-lang
Stalkr_ [Stalkr_!~Stalkr@x1-6-e0-46-9a-1f-97-a2.k617.webspeed.dk] has joined #ruby-lang
codewrangler [codewrangler!~codewrang@pool-72-66-12-100.washdc.fios.verizon.net] has joined #ruby-lang
tla [tla!~tla@2.106.137.250] has joined #ruby-lang
robbrit [robbrit!~rob@38.108.76.250] has joined #ruby-lang
gianlucadv [gianlucadv!~gianlucad@rna.bio.disco.unimib.it] has joined #ruby-lang
yfeldblum [yfeldblum!~Jay@pool-71-246-76-76.bltmmd.east.verizon.net] has joined #ruby-lang
robbrit [robbrit!~rob@38.108.76.250] has joined #ruby-lang
krz [krz!~foobar@unaffiliated/krz] has joined #ruby-lang
dv310p3r [dv310p3r!~dv310p3r@host-208-68-238-122.biznesshosting.net] has joined #ruby-lang
headius [headius!~headius@71-37-230-236.mpls.qwest.net] has joined #ruby-lang
rippa [rippa!~rippa@109-161-67-90.pppoe.yaroslavl.ru] has joined #ruby-lang
butchanton [butchanton!~butchanto@c-71-202-131-177.hsd1.ca.comcast.net] has joined #ruby-lang
elux [elux!~peter@96.45.198.150] has joined #ruby-lang
elux_ [elux_!~peter@96.45.198.150] has joined #ruby-lang
scampbell [scampbell!~scampbell@c-98-224-240-62.hsd1.mi.comcast.net] has joined #ruby-lang
Paoc_ [Paoc_!~paoc@pc-29-167-104-200.cm.vtr.net] has joined #ruby-lang
niklasb [niklasb!~codeslay0@p5B3103AD.dip0.t-ipconnect.de] has joined #ruby-lang
dreinull [dreinull!dreieins@217.18.70.225] has joined #ruby-lang
Natch| [Natch|!~natch@178.73.218.168] has joined #ruby-lang
takaokouji [takaokouji!~takaokouj@nat35.mable.ne.jp] has joined #ruby-lang
Spooner [Spooner!~Miranda@host-78-144-139-130.as13285.net] has joined #ruby-lang
JEG2 [JEG2!~JEG2@ip72-198-103-217.ok.ok.cox.net] has joined #ruby-lang
slyphon [slyphon!~weechat@unaffiliated/slyphon] has joined #ruby-lang
_dustin [_dustin!~anonymous@99-7-24-156.lightspeed.iplsin.sbcglobal.net] has joined #ruby-lang
macmartine [macmartine!~macmartin@069-064-227-254.pdx.net] has joined #ruby-lang
niklasb [niklasb!~codeslay0@p5B3103AD.dip0.t-ipconnect.de] has joined #ruby-lang
Paoc_ [Paoc_!~paoc@pc-29-167-104-200.cm.vtr.net] has joined #ruby-lang
<zzak>
hey john
looopy [looopy!~looopy@c-68-34-92-100.hsd1.md.comcast.net] has joined #ruby-lang
mbriggs [mbriggs!~mattb@64.215.160.39] has joined #ruby-lang
wmoxam [wmoxam!~wmoxam@pdpc/supporter/active/wmoxam] has joined #ruby-lang
roblally [roblally!~roblally@195-11-205-194.suip.mezzonet.net] has joined #ruby-lang
mrneighborly [mrneighborly!~mrneighbo@154.25.119.70.cfl.res.rr.com] has joined #ruby-lang
outoftime [outoftime!~mat@ip-160-79-101-2.autorev.intellispace.net] has joined #ruby-lang
slyphon [slyphon!~weechat@unaffiliated/slyphon] has joined #ruby-lang
gregmore_ [gregmore_!~gregmoren@S01067444012f4469.vc.shawcable.net] has joined #ruby-lang
slyphon_ [slyphon_!~weechat@unaffiliated/slyphon] has joined #ruby-lang
tomzx [tomzx!~tomzx@dsl-136-201.aei.ca] has joined #ruby-lang
apeiros_ [apeiros_!~apeiros@194.209.75.58] has joined #ruby-lang
gregmore_ [gregmore_!~gregmoren@S01067444012f4469.vc.shawcable.net] has joined #ruby-lang
dfr|mac [dfr|mac!dfr|work@nat/google/x-jkzhzxzrlejcjuit] has joined #ruby-lang
GiambalaGiambala [GiambalaGiambala!~virunga@151.64.24.102] has joined #ruby-lang
codewrangler [codewrangler!~codewrang@pool-72-66-12-100.washdc.fios.verizon.net] has joined #ruby-lang
bitrot [bitrot!~smd@rrcs-50-84-14-82.sw.biz.rr.com] has joined #ruby-lang
Indian [Indian!~Indian@unaffiliated/londonmet050] has joined #ruby-lang
rayners [rayners!~rayners@38.102.22.194] has joined #ruby-lang
gregmore_ [gregmore_!~gregmoren@S01067444012f4469.vc.shawcable.net] has joined #ruby-lang
context [context!context@november.xen.prgmr.com] has joined #ruby-lang
Austin__ [Austin__!~austin@96.45.197.22] has joined #ruby-lang
Defusal [Defusal!Defusal@196-209-88-23.dynamic.isadsl.co.za] has joined #ruby-lang
Defusal [Defusal!Defusal@unaffiliated/ecnerifed] has joined #ruby-lang
dnjaramba [dnjaramba!~dnjaramba@41.72.193.86] has joined #ruby-lang
slyphon [slyphon!~weechat@unaffiliated/slyphon] has joined #ruby-lang
imperator [imperator!~djberg96@184-96-115-43.hlrn.qwest.net] has joined #ruby-lang
vladalive [vladalive!~vladalive@176.52.68.243] has joined #ruby-lang
nofxx [nofxx!~nofxx@unaffiliated/nofxx] has joined #ruby-lang
gianlucadv [gianlucadv!~gianlucad@2.197.146.117] has joined #ruby-lang
robgough [robgough!~robgough@li184-32.members.linode.com] has quit [#ruby-lang]
JohnBat26 [JohnBat26!~Eugene@80.251.120.55] has joined #ruby-lang
rolfb [rolfb!~rolfb@77.94.232.40] has joined #ruby-lang
h4y4shi [h4y4shi!~chatzilla@rrcs-67-79-54-130.sw.biz.rr.com] has joined #ruby-lang
gokulnath [gokulnath!~gokulnath@117.207.164.120] has joined #ruby-lang
tla [tla!~tla@2.108.171.233] has joined #ruby-lang
retro|cz [retro|cz!~retro@106.142.broadband6.iol.cz] has joined #ruby-lang
gregmore_ [gregmore_!~gregmoren@S01067444012f4469.vc.shawcable.net] has joined #ruby-lang
perryh_ [perryh_!~root@fremont.perryhuang.com] has joined #ruby-lang
h4y4shi [h4y4shi!~chatzilla@rrcs-67-79-54-130.sw.biz.rr.com] has joined #ruby-lang
Dreamer3 [Dreamer3!~Dreamer3@74-134-34-116.dhcp.insightbb.com] has joined #ruby-lang
<nofxx>
Anyone using Graylog2 ? really cool (ruby-related for that matter) project..... was wondering which backend to use, syslog-ng or rsyslog...
darkf [darkf!~darkf_dix@unaffiliated/darkf] has joined #ruby-lang
<raggi>
i prefer rsyslog
<raggi>
iirc, graylog2 has some seriously ghetto code inside
<nofxx>
raggi, who cares? It is pinky and use custom font-faces ;)
* raggi
walks
ivanoats [ivanoats!~ivanoats@pdpc/supporter/active/ivanoats] has joined #ruby-lang
<nofxx>
raggi, ah, just kidding mate, have to try it better, just playing with the UI for now
<nofxx>
raggi, do you need to pipe/fifo logs from software that doesn't support syslog natively?
Paoc_ [Paoc_!~paoc@pc-29-167-104-200.cm.vtr.net] has joined #ruby-lang
Phrogz [Phrogz!~phrogz@184-96-128-49.hlrn.qwest.net] has joined #ruby-lang
<nofxx>
*in rsyslog
<injekt>
heh
Phrogz [Phrogz!~phrogz@pdpc/supporter/professional/phrogz] has joined #ruby-lang
<nofxx>
but this whole central logging thing is really cool, should have started it earlier, I still receive mail notifications =/
virunga [virunga!~virunga@151.64.24.102] has joined #ruby-lang
GiambalaGiambala [GiambalaGiambala!~virunga@151.64.56.162] has joined #ruby-lang
gianlucadv [gianlucadv!~gianlucad@109.54.242.126] has joined #ruby-lang
tbuehlmann [tbuehlmann!~Tobias@unaffiliated/tovias] has joined #ruby-lang
virunga [virunga!~virunga@151.64.58.76] has joined #ruby-lang
fayimora [fayimora!~fayimora@lt38-201.eecs.qmul.ac.uk] has joined #ruby-lang
Sailias [Sailias!~jonathan@s72-38-77-178.static.comm.cgocable.net] has joined #ruby-lang
<darix>
rsyslog over syslog-ng any time
<darix>
spooling support in case your syslog peer is down
<darix>
db, mongo, even hadoop backends for logging
<darix>
relp support
stef_204 [stef_204!~kvirc@unaffiliated/stef-204/x-384198] has joined #ruby-lang
yoshie902a [yoshie902a!~yoshie902@38.104.99.146] has joined #ruby-lang
<nofxx>
darix, thanks man... let me ask , and software that doesn't support sending to a syslogd, I'm checking out this Text File Input Module
<nofxx>
nginx/redis won't do it w/o patching... I'm looking for alternatives
<darix>
nofxx: pipe logging + "logger"?
<nofxx>
darix, mkfifo then
<darix>
no
<darix>
atleast in lighty you can do something like
<darix>
access.log="|/usr/bin/logger ...."
<darix>
which then would spam your access log into syslog
<nofxx>
darix, that's nice! 'logger'.. looking for it , thank you
yoshie902a [yoshie902a!~yoshie902@38.104.99.146] has quit [#ruby-lang]
benanne [benanne!~rijdier@ip-213-49-105-205.dsl.scarlet.be] has joined #ruby-lang
<queequeg1>
I have been pulling my hair out for two days on google.
<erikh>
use 1.8.7
<erikh>
it's not ported to 1.9.2+ yet
<erikh>
you can tell because of the macros it's using.
<queequeg1>
ah, well sheeeit.
<rue>
Looks like it's using RARRAY->len or whatever the nonsense was
<erikh>
yep
<queequeg1>
It could have given me a clearer error than that.
workmad3 [workmad3!~workmad3@cpc1-bagu10-2-0-cust81.1-3.cable.virginmedia.com] has joined #ruby-lang
<rue>
queequeg1: Alternately, convert to RARRAY_LEN() and so no
<erikh>
well they're just pass-through compiler errors
<erikh>
right, you can probably patch it
<rue>
I dunno, I think it's a pretty exact error :) You're trying to access len of an RArray, but it doesn't define such a property.
<erikh>
it has a check for unistd.h? that seems.. superfluous
<erikh>
rue: not to someone who doesn't know C
<rue>
Better safe than sorry
<queequeg1>
I was assuming that ncurses was important enough that it would have been ported by now. I guess that is what I get for assuming.
<queequeg1>
I will send myself to bed without supper.
dous [dous!~dous@cm171.sigma67.maxonline.com.sg] has joined #ruby-lang
dous [dous!~dous@unaffiliated/dous] has joined #ruby-lang
lsegal [lsegal!jinx@modemcable249.109-177-173.mc.videotron.ca] has joined #ruby-lang
robbrit [robbrit!~rob@38.108.76.250] has quit [#ruby-lang]
gogo_it [gogo_it!~joshuaman@38.104.99.146] has joined #ruby-lang
Indian [Indian!~Indian@unaffiliated/londonmet050] has joined #ruby-lang
tenderlove [tenderlove!~tenderlov@pdpc/supporter/active/tenderlove] has joined #ruby-lang
mark_locklear [mark_locklear!~jlocklear@ab-tech-lan-to-ab-tech-gw.ncren.net] has joined #ruby-lang
lupine_85 [lupine_85!~lupine_85@unaffiliated/lupine-85/x-7392152] has joined #ruby-lang
tenderlove [tenderlove!~tenderlov@pdpc/supporter/active/tenderlove] has joined #ruby-lang
workmad3 [workmad3!~workmad3@cpc1-bagu10-2-0-cust81.1-3.cable.virginmedia.com] has joined #ruby-lang
s0ber [s0ber!~s0ber@114-36-235-136.dynamic.hinet.net] has joined #ruby-lang
y3llow_ [y3llow_!~y3llow@114-36-235-136.dynamic.hinet.net] has joined #ruby-lang
<erikh>
queequeg1: I think there's a ffi ncurses lib out there, it should be compatible with 1.9.2
twittard [twittard!~twittard@wc.lax.truecarcorp.com] has joined #ruby-lang
frangiz_ [frangiz_!~frangiz@user26.77-105-206.netatonce.net] has joined #ruby-lang
pigdude [pigdude!~tallen@li61-243.members.linode.com] has quit [#ruby-lang]
y3llow [y3llow!~y3llow@114-36-235-136.dynamic.hinet.net] has joined #ruby-lang
RORgasm [RORgasm!~rorgasm@nyv-exweb.iac.com] has joined #ruby-lang
jonathangreenber [jonathangreenber!~jonathang@dsl-066-037-093-213.citizip.com] has joined #ruby-lang
y3llow [y3llow!~y3llow@114-36-235-136.dynamic.hinet.net] has joined #ruby-lang
havenn [havenn!~skipper@pool-71-189-127-105.lsanca.fios.verizon.net] has joined #ruby-lang
frangiz [frangiz!~frangiz@user26.77-105-206.netatonce.net] has joined #ruby-lang
y3llow [y3llow!~y3llow@114-36-235-136.dynamic.hinet.net] has joined #ruby-lang
y3llow [y3llow!~y3llow@114-36-235-136.dynamic.hinet.net] has joined #ruby-lang
Pupeno [Pupeno!~pupeno@pdpc/supporter/active/pupeno] has joined #ruby-lang
frangiz [frangiz!~frangiz@user26.77-105-206.netatonce.net] has joined #ruby-lang
dgs [dgs!~dgs@203-97-51-73.dsl.clear.net.nz] has joined #ruby-lang
wallerdev [wallerdev!~wallerdev@72.44.102.30] has joined #ruby-lang
<wallerdev>
is there a fast library for json
<dgs>
i've noticed a few uses of 'y' as a form of puts - I think it puts an object to yaml. having a hard time googling for it though. Is there a list of these sorts of short commands? (would be interesting to browse thru)
<erikh>
I think that's a library
<erikh>
or at least def y(obj); require 'yaml'; puts YAML.dump(obj); end
<wallerdev>
yeah its from the yaml gem I'm pretty sure
<wallerdev>
adds Kernel#y
jensn [jensn!~Jens@c-83-233-145-148.cust.bredband2.com] has joined #ruby-lang
Stalkr_ [Stalkr_!~Stalkr@x1-6-e0-46-9a-1f-97-a2.k617.webspeed.dk] has joined #ruby-lang
<dgs>
still on my version at least. thanks for the info =)
virunga [virunga!~virunga@151.64.11.94] has joined #ruby-lang
<wallerdev>
haha i can't believe i still make the mistake of thinking I'm in irb when I'm just at a bash prompt
<wallerdev>
and never recognize the error messages haha
<erikh>
stop setting your irb prompt to %
<erikh>
:P
<wallerdev>
:P
<wallerdev>
one is > and the other is $
<imperator>
wait, i know, let's make a shell in ruby!
<imperator>
we'll call it...rash
<wallerdev>
lol
<wallerdev>
theres rush
<wallerdev>
if that's still around
<wallerdev>
i guess i just have too much data
<wallerdev>
blah
<wallerdev>
stupid to_json so slow haha
<erikh>
actually I made one
<erikh>
but it's intentionally very limited
<erikh>
internal project
<wallerdev>
you made a ruby shell?
<erikh>
yeah. it wasn't particularly hard
ltd- [ltd-!~z@zx.io] has joined #ruby-lang
<wallerdev>
yeah we had to make a shell in one of my computer science courses
<erikh>
it's just a command shell
Axsuul [Axsuul!~Axsuul@75-140-75-52.dhcp.mtpk.ca.charter.com] has joined #ruby-lang
<wallerdev>
i can't help but think something must be wrong with this json library for it to take 1.8seconds to serialize
qpingu [qpingu!~Adium@67.218.117.238] has joined #ruby-lang
jensn_ [jensn_!~Jens@c-83-233-145-148.cust.bredband2.com] has joined #ruby-lang
<wallerdev>
wtf
<wallerdev>
what is as_json
qpingu [qpingu!~Adium@67.218.117.238] has joined #ruby-lang
wyhaines [wyhaines!~wyhaines@65.39.118.15] has joined #ruby-lang
rpowell [rpowell!~rpowell@101.161.11.105] has joined #ruby-lang
yours_truly [yours_truly!~yours@c-208-90-102-250.netflash.net] has joined #ruby-lang
<rue>
Ass json?
<apeiros>
wallerdev: in rails?
<wallerdev>
yeah it doesn't look like anything useful
<apeiros>
had to go through weird hoops to get rails to use the C gem (I might be doing it wrong, though)
<wallerdev>
do you remember what hoops you went through? i can't really tell which it's using
<apeiros>
I added Rails.root.join('lib') to $: in boot.rb, put an empty active_support/core_ext/json.rb (I think that was the file) into it, and required that right in boot.rb
<apeiros>
that made rails think it was loaded.
<apeiros>
in the real file, it requires 'json' and then overrides its .to_json methods. with the empty file in its place, that didn't happen.
<apeiros>
back in ruby 1.8, a simple $" << "fake/required/file" was sufficient :-/
Nisstyre [Nisstyre!~yours@c-208-90-102-250.netflash.net] has joined #ruby-lang
<apeiros>
ah, active_support/core_ext/object/to_json.rb was the file
<apeiros>
if you find a better way, please tell me. I find this egregiously hackish :-S
<wallerdev>
any idea how to tell which way it's using? besides performance numbers?
<wallerdev>
haha i already had that page loaded in safari
<imperator>
apeiros, indeed, that's my experience with it
<apeiros>
imperator: oracle?
<imperator>
we went to pg, was pretty good; certainly good enough for our needs
<imperator>
yah
<apeiros>
imperator: what's been your main obstacles with pg?
<apeiros>
(we're getting there too, yay! *happydance*)
<imperator>
personally i didn't have any, thought it worked pretty good
<apeiros>
great. anything to watch out for?
<imperator>
the dba had some issues with it, but i don't remember what they were
<apeiros>
hehe, the dba needs the most pushing here. but he started to play with pg a bit and seems less against it…
<wallerdev>
something is really wrong with rails
<wallerdev>
maybe rails adds things to to_json
<apeiros>
rails' to_json can do quite a bit more than json gem's to_json iirc.
<imperator>
apeiros, converting tables is easy; converting all that other crap? not so easy
<wallerdev>
like if i do require 'json/pure' to require the pure ruby version, it speeds it up
<apeiros>
though as far as I understood the to_json/as_json article, that should have been shoved off to as_json
<wallerdev>
if i do require 'json/ext' it just tells me false
<wallerdev>
(this is without your boot.rb trick enabled)
<imperator>
apeiros, oh, i don't think pg could do data striping, or something; can't remember...
<imperator>
*couldn't*
<apeiros>
wallerdev: as said, in that file I mentioned, they explicitly do 'require "json"', in order to be able to override its to_json methods
<apeiros>
they even state that
<apeiros>
imperator: striping? like a raid would?
<apeiros>
imperator: well, we're not yet moving the big systems. only our webapps. and there we most often deal with a couple of thousand records, a couple of millions max. you could fit that all in ram easily :)
<apeiros>
man, computing has come a long way… holding the entire swiss phone book in ram is now easy-peasy and a mobile phone can do it…
<imperator>
i can't remember; maybe i should send him an email
SkramX [SkramX!~SkramX@pool-173-73-134-143.washdc.east.verizon.net] has joined #ruby-lang
nwonknu [nwonknu!c18c2a8d@gateway/web/freenode/ip.193.140.42.141] has joined #ruby-lang
dous [dous!~dous@unaffiliated/dous] has joined #ruby-lang
<wallerdev>
apeiros: haha i just had a look at that active support to_json.rb, i see why things don't work now :|
<wallerdev>
it just overwrites everything on purpose with its own things
<shevy>
hmm
<shevy>
does it ever occur to you sometimes that ruby could be made ... simpler?
<wallerdev>
shevy: in what way?
h4y4shi [h4y4shi!~chatzilla@rrcs-67-79-54-130.sw.biz.rr.com] has joined #ruby-lang
Phrogz [Phrogz!~phrogz@pdpc/supporter/professional/phrogz] has joined #ruby-lang
<wallerdev>
most languages could be simpler
dejongge [dejongge!~jonke@pD9E0DD4B.dip0.t-ipconnect.de] has joined #ruby-lang
<shevy>
wallerdev in every way! for one in removing some features... like @@ but also in other ways. Like no class/subclass/module distinction any more but another inheritance scheme... and then there are the *evals ... I find them complicated and not easy at all
<wallerdev>
you want to get rid of inheritance?
<wallerdev>
in favor of composition or something?
<apeiros>
wallerdev: yes, which is why I pretended it was already loaded
<apeiros>
23:50 apeiros: wallerdev: as said, in that file I mentioned, they explicitly do 'require "json"', in order to be able to override its to_json methods
yfeldblum [yfeldblum!~Jay@c-98-218-48-253.hsd1.md.comcast.net] has joined #ruby-lang
<shevy>
wallerdev hmm yeah. I have not completely thought about it yet. But I think objects should be more dynamic, one should be able to isolate all behaviours and data at any specific point, and transfer that part (subpart) to other objects (or classes, if you want to)
<wallerdev>
apeiros: yeah the only other way i can think of dealing with this would be to use a different json gem or something
<shevy>
oh and of course, to undo this easily at a later time too
havenn [havenn!~skipper@pool-71-189-127-140.lsanca.fios.verizon.net] has joined #ruby-lang
<jbwiv>
is there a way to break the outermost loop with next in the case of nested loops?
<apeiros>
also, consider rephrasing your problem. most likely you don't need throw/catch
<wallerdev>
jbwiv: haha kinda, ruby doesn't have goto but i tend to use that when i run into nested loops
<apeiros>
wallerdev: the precise code is at work, but I think that's about what I did
<drbrain>
return_bang!
<wallerdev>
apeiros: thanks, i've got it working from your description earlier, i was just looking more into why this came up
<jbwiv>
apeiros, I have a script which iterates through all files provided in ARGV. it then loops through the lines in each file, looking for a pattern. when it hits the pattern, I want it to move on to the next file, but "next" from within the line iteration will move to the next line
<jbwiv>
if i recall from my perl days, you could label blocks and call next <label> to do something like this
<jbwiv>
but that was looong ago, so I could be wrong
<wallerdev>
jbwiv: i think thats similar to what drbrain suggested
<drbrain>
don't use return_bang, it's a joke
<wallerdev>
haha
<wallerdev>
i didn't read it too closely but i was just reading the testimonials
<apeiros>
does grep return an enumerator if used without block?
<apeiros>
hm, no, does not
<wallerdev>
nope
<jbwiv>
apeiros, so you would suggest catch/throw in this case?
qpingu [qpingu!~Adium@67.218.117.238] has joined #ruby-lang
<jbwiv>
apeiros, well, sorry, I cheated in my explanation. it actually loops through and waits until it's found two matches. once those two matches have hit (on different lines) it moves on to the next file
<apeiros>
first(2) then
* apeiros
fails to see what's difficult about that
<wallerdev>
apeiros: did you look at yajl-ruby at all?
<apeiros>
wallerdev: nope
<apeiros>
should I?
<wallerdev>
not sure
<apeiros>
tell me if you think I should :)
<wallerdev>
looks like another json c implementation
<wallerdev>
ill see if its any faster for my data set
<h4y4shi>
so if I want to use p to check an object, is there a way that I can put the objects on the same line? For example would this work? p rat, frog, hero, snake, rabbit
<apeiros>
savage-: no. as said, that will find all occurrences. it will NOT stop at the first hit.
<apeiros>
savage-: all it will do is return only the first from all hits. but it won't short-cut.
<zenspider>
h4y4shi: did you try it?
<savage->
apeiros: ah I see, gotcha!
<h4y4shi>
I didnt try
<zenspider>
you should
<zenspider>
that's one of the nice things about ruby
<zenspider>
fire up irb, try something out
<zenspider>
even just ruby -e 'blah blah'
<zenspider>
I do that aaaaaalllllll the time
<apeiros>
yupp, irb & ruby -e == <3
<h4y4shi>
zenspider: Wow... I guess I am starting to get the hang of this language lol. It worked. Usually when I think of things they dont work lol.
<apeiros>
alias re='ruby -r/some/file/with/all/you/need -e'
Heimidal [Heimidal!~heimidal@factory-smtp.factorylabs.com] has joined #ruby-lang
<apeiros>
makes using ruby -e even nicer…
<apeiros>
reminds me I should update my dotfiles on this computer. I have one at work that checks for ./lib and adds it with -I
<apeiros>
dontcha wanna come over and party here? :)
<h4y4shi>
Is Ruby becoming more popular?
<apeiros>
h4y4shi: it's around top10 of most popular programming languages
<zenspider>
nah. it matches world population growth
<outoftime>
from within the context of a class body, is it possible to tell what the current visibility is?
<outoftime>
e.g. if one were to define a method right here, what its visibility would be
<zenspider>
outoftime: as in public/private?
<outoftime>
zenspider: yep
<drbrain>
outoftime: look up in your editor
<h4y4shi>
apeiros: thats good.
<zenspider>
meh. why bother with private... other than rails controllers they don't matter at ll
<zenspider>
but yeah. look up :P
<h4y4shi>
do you need tabs? Or will a program function without them?
<drbrain>
don't use tabs
curtism [curtism!~curtis@bas11-montreal02-1128531121.dsl.bell.ca] has joined #ruby-lang
<drbrain>
use two spaces
<outoftime>
zenspider: I'm afraid to say I disagree. anyway, what I mean is, if I'm evaluating a class method, say one that were defined by a module that then extended the class itself
<outoftime>
can I tell what the current visibility is for that class, at the point where the class method had been called. I notice that if I use define_method or module_eval "def foo; end" after a private statement, the methods defined are still public, so I fear there may not be
<apeiros>
zenspider: it helps with discoverability. at least I first read docs on public methods.
<heftig>
visibility is like a locla variable
<zenspider>
on what grounds do you disagree? I'll fuck your private methods sideways :P
<heftig>
local
<h4y4shi>
drbrain: Okay but the reason I want to know is because sometimes I get an error and I dont know if it is because of not enough space or not enough tabs. And if there isnt any real meaning to the tabbing out then I wont have to waste my time counting how many spaces I put inmy program.
<drbrain>
outoftime: that sounds like insanity
<outoftime>
zenspider: visibility allows classes to keep themselves in a consistent state. Rails (ActiveRecord specifically) walks all over this, and gives you lifecycle hooks and validations to deal with it instead, but I think it's an anti-pattern.
<drbrain>
h4y4shi: ruby does not require that you indent your code at all, but everyone uses two space indentation
<savage->
apeiros: that's a really nice trick by the way, I like it. :-)
<zenspider>
outoftime: the current visibility of a class is an internal opaque value unfortunately... just a parse time iirc
<apeiros>
savage-: enum_for is TEH awesome
<outoftime>
drbrain: just some metaprogramming, but I'm probably not describing it well.
<savage->
yes!
<h4y4shi>
drbrain: Okay thank you.
<outoftime>
zenspider: yeah, that was my fear that it's happening at the parser level
<drbrain>
outoftime: it's ok, you had me at metaprogramming
<outoftime>
drbrain, zenspider: thanks for talking it over with me
<drbrain>
outoftime: if you're really concerned, just call public method_name
<zenspider>
outoftime: you can always call private with the name of your newly generated method
<savage->
apeiros: and in your example, instead of invoking enum_for(:grep, a).first you did enum_for(:grep, a).last it would then actually go through all matches, right?
<zenspider>
define_method :x do ... end ; private :x
<wallerdev>
apeiros: i did some unofficial benchmarking with my own data (about 1.3MB of json): https://gist.github.com/1685905
<outoftime>
zenspider: yes, absolutely -- was just wondering if there were some way the library code could take care of that
<outoftime>
zenspider: based on the current visibility "state" of the class. but that doesn't really make any sense anyway, since you could also call such a class method outside of the class body, in which case it would be a meaningless question
<zenspider>
it _still_ doesn't matter. private isn't private... and if these are generated methods, then the doco argument gets thrown out the window too
SuperTaz_work [SuperTaz_work!~supertaz_@vpn.lax.truecarcorp.com] has joined #ruby-lang
<wallerdev>
i might just use yajl just so i don't need to hack my rails
<outoftime>
zenspider: I think we'll have to agree to disagree.
Euver [Euver!~nnscript@103.53.18.95.dynamic.jazztel.es] has joined #ruby-lang
<Euver>
javi tienes menos fuerza ke los pedos de Nisstyre
<Euver>
javi kizas has perdido el konocimiento de las hostias ke te estas llevando
<Euver>
javi soy un arkitecto triunfador
<Euver>
javi deja de floodear o te largas
<Euver>
javi cuando vas a encular a tu abuela?
<Euver>
javi no sales de kasa en la puta vida, mas pena no puedes dar
<Euver>
javi eres un minusvalido facial
<Euver>
javi eres konsciente de la aberracion humana ke eres?
<Euver>
javi dame tu direccion ke kiero koserte a pu
<Euver>
javi das un asko atroz, tirate por la ventana
<Euver>
javi de un guantazo kon la mano abierta te rompo el kuello gordo de mierda
Euver was kicked from #ruby-lang by zenspider [Kicked]
<wallerdev>
good work zenspider haha
<zenspider>
it's what I'm here for...
<zenspider>
sorry I didn't catch it sooner. I was reading about cat facts
guns [guns!~guns@c-98-228-72-208.hsd1.il.comcast.net] has joined #ruby-lang
<wallerdev>
do you get those sent to your phone too?
<zenspider>
that was me!
<zenspider>
(kidding)
<apeiros>
savage-: yes
<h4y4shi>
What would be the best control structure to use for commands using a command line? For example. If I want to make seperate commands for inspecting objects, exiting the program, etc
<zenspider>
seriously bad spelling of spanish...
<Asher>
it's too consistently bad not to be intentional tho :P
<wallerdev>
maybe a hash to symbol
<apeiros>
wallerdev: thanks. seems yajl is slightly faster,eh?
<wallerdev>
string to symbol
<wallerdev>
apeiros: yeah it seems to be for my data
<wallerdev>
not by much though
<wallerdev>
and the averages went +- 10ms on all of em
<wallerdev>
but at least all i need for it is to put it in my gem file and use Yajl::Encoder.encode instead of to_json
<wallerdev>
so it won't break when rails changes things around haha