apeiros changed the topic of #ruby to: Ruby 1.9.3-p374: http://ruby-lang.org (ruby-2.0.0-rc1) || Paste >3 lines of text on http://gist.github.com
zeade has joined #ruby
Goopyo_ has joined #ruby
darkc0met has quit [Quit: ZNC - http://znc.in]
reinaldo_ has joined #ruby
DrShoggoth has joined #ruby
reinaldob has quit [Ping timeout: 240 seconds]
jgarvey has quit [Quit: Leaving]
banisterfiend has quit [Remote host closed the connection]
jackyalcine has quit [Quit: Quit]
epylinkn has joined #ruby
Goopyo has quit [Ping timeout: 272 seconds]
Goopyo_ is now known as Goopyo
kiyoura has joined #ruby
carloslopes has joined #ruby
MattRB has joined #ruby
TomyLobo has quit [Quit: Standby mode...]
generalissimo has quit [Remote host closed the connection]
x0F has quit [Disconnected by services]
x0F_ has joined #ruby
x0F_ is now known as x0F
pu22l3r has joined #ruby
pu22l3r has quit [Remote host closed the connection]
pu22l3r has joined #ruby
nateberkopec has quit [Quit: Leaving...]
reinaldo_ has quit [Remote host closed the connection]
yshh has joined #ruby
banisterfiend has joined #ruby
yshh has quit [Remote host closed the connection]
ivar has joined #ruby
<ivar> noob q: what do I have to require in order to use stdlib ?
d2dchat has joined #ruby
<ivar> in particular.. DateTime
nari has quit [Ping timeout: 246 seconds]
tommyvyo_ has quit [Quit: http://thomasvendetta.com]
asteve has quit [Quit: Computer has gone to sleep.]
Virunga_ has joined #ruby
jblack has joined #ruby
kirun has quit [Quit: Client exiting]
banisterfiend has quit [Ping timeout: 248 seconds]
Virunga has quit [Ping timeout: 276 seconds]
allsystemsarego has quit [Quit: Leaving]
<aedornm> ivar: require 'date'
banisterfiend has joined #ruby
<ivar> aedornm: thank you! .. how would I be able to find that for myself in the future ?
<ivar> from http://www.ruby-doc.org/stdlib-1.9.3/libdoc/date/rdoc/DateTime.html it would be to require the 'parent' ?
techhelp has quit [Quit: This computer has gone to sleep]
etcetera has quit []
shorts has quit [Quit: shorts]
<Spooner> ivar http://www.ruby-doc.org/stdlib-1.9.3/ has a list of what you need to require on the left.
<Spooner> Package names, that is.
zeade has quit [Quit: Leaving.]
<Spooner> ivar, Yeah, DateTime is an odd one. 'date' gives more stuff on Date as well as giving DateTime. Usually not like that.
etcetera has joined #ruby
<aedornm> yeah, what Spooner says.
<ivar> ahh.. it's embarassing that I've been using ruby for so long and never knew how to do this. your answers are much appreciated
<aedornm> DateTime is a bit of a red headed step child
warb0 has quit [Quit: Textual IRC Client: www.textualapp.com]
nateberkopec has joined #ruby
nateberkopec has quit [Client Quit]
musl has joined #ruby
Zac_o_O has joined #ruby
<ivar> I suppose that makes my ignorance slightly more forgivable :)
DrShoggoth has quit [Ping timeout: 248 seconds]
f03lipe has joined #ruby
bjeanes has quit [Ping timeout: 248 seconds]
<banisterfiend> anyone here play sc2?
tatsuya_o has quit [Remote host closed the connection]
<banisterfiend> davidcelis: ?
dougireton has quit [Quit: Leaving.]
reset has quit [Quit: Leaving...]
<davidcelis> i have sc2 but im lolbad
jds_ has joined #ruby
sclarson_ has joined #ruby
darkc0met has joined #ruby
clj_newb has quit [Ping timeout: 276 seconds]
bjeanes has joined #ruby
<banisterfiend> davidcelis: is it worth buying 'wings of liberty' ? also, did u buy it or sneak it from somewhere ? :D
<davidcelis> i bought it
<davidcelis> it's a good game
<davidcelis> i'm just bad at online play
artOfWar has quit [Read error: Connection reset by peer]
artOfWar has joined #ruby
shorts has joined #ruby
<banisterfiend> davidcelis: which one? just sc2 or the wings of liberty expansion too?
<reactormonk> banisterfiend, those bastards didn't want to convert my EU version to an US one
<banisterfiend> cos together they're like 140 euro
<banisterfiend> reactormonk: you live in US now?
<reactormonk> banisterfiend, exactly
<banisterfiend> reactormonk: wtf are you doing in U.S? you're too europed in the head to live in usa
<reactormonk> banisterfiend, btw, the expansion has a different name, the original is sc2: wings of liberty
<banisterfiend> ;)
<davidcelis> banisterfiend: wings of liberty
<davidcelis> isn't an expansion
<davidcelis> it's the first part of sc2
<reactormonk> banisterfiend, studing
<banisterfiend> davidcelis: well explain this to me then: http://cl.ly/image/2e0h2Q3p3534
<banisterfiend> 'wings of liberty' is a separate purchase
<davidcelis> heart of the swarm is part 2
zph has quit [Quit: Computer has gone to sleep.]
<banisterfiend> that's from teh blizzard site
<davidcelis> yeah...
<davidcelis> wings of liberty + heart of the swarm + some unannounced protoss campaign == the full SC2 experience
<banisterfiend> oh
<banisterfiend> i misunderstood
<banisterfiend> the main option is buying both
<banisterfiend> but the secondary option is buying just the first one
pskosinski has quit [Ping timeout: 248 seconds]
<banisterfiend> that's totally backward
<banisterfiend> i figured it would be 1. the main one 2. the optional expansion back
<reactormonk> banisterfiend, one is (R) the other tm? ^^
artOfWar has quit [Read error: Connection reset by peer]
That-BRMatt has joined #ruby
artOfWar has joined #ruby
<banisterfiend> davidcelis: so do you recommend i buy the full experience or just wings of liberty?
<banisterfiend> im a noob
<davidcelis> well heart of the swarm isn't out yet
<banisterfiend> i have 0 experience with starcraft in any way shape or form
x82_nicole has joined #ruby
<davidcelis> i'd probably just buy wings of liberty and see if you like it
bjeanes has quit [Ping timeout: 248 seconds]
<davidcelis> but if you have 0 experience i'd recommend playing starcraft 1 first
ivar has left #ruby [#ruby]
<banisterfiend> davidcelis: no, that came out in like 1997 didnt it?
baroquebobcat has quit [Ping timeout: 248 seconds]
<banisterfiend> i cant travel that far back in time, it'll dig up old child hood memories
cantonic has quit [Ping timeout: 245 seconds]
<davidcelis> yep and it's still awesome
s1n4 has joined #ruby
<banisterfiend> i'll cast my manhood down in a flood of remembrance
<banisterfiend> and weep like a child for the past
jds_ has quit [Ping timeout: 264 seconds]
breakingthings has joined #ruby
pyreal has left #ruby [#ruby]
BRMatt has quit [Ping timeout: 260 seconds]
carloslopes has quit [Remote host closed the connection]
gyre007 has quit [Remote host closed the connection]
clj_newb has joined #ruby
<plotplanexe> starcraft 1 is better imo
<breakingthings> Hello Gentlemens, I have an inquiry, which in entirety is as follows: How should I use rspec/a testing framework in a gem (eg. can/should I define a dependency on RSpec? Can I limit it to development?)
slainer68 has quit [Remote host closed the connection]
gyre008 has quit [Remote host closed the connection]
<Spooner> breakingthings, use #add_development_dependency for stuff you don't need to use the gem itself.
etcetera has quit []
s1n4 has quit [Client Quit]
<breakingthings> okay, so I was right… And should I put that in my .gemspec, or Gemfile (I came across a SO question that said Gemfile, but that seems… strange)
alx- has quit [Read error: Operation timed out]
dankest has quit [Quit: Leaving...]
karasawa has joined #ruby
<Spooner> breakingthings, In your Gemfile, for a gem, you jsut put "gemspec" so it reads from the spec.
<Spooner> You don't repeat the dependencies.
<breakingthings> I let bundler initialize it so that's already there, I thought it was strange that the answer I saw on SO was saying to put it on the Gemfile.
<breakingthings> Thanks for clarifying.
etcetera has joined #ruby
jtgiri__ has joined #ruby
jtgiri_ has quit [Read error: Connection reset by peer]
jtgiri__ is now known as jtgiri_
zastern has quit [Remote host closed the connection]
<Spooner> You put dependencies directly in the Gemfile only for applications.
resetexistence has joined #ruby
bjeanes has joined #ruby
<Kovensky> banisterfiend: download the SC2 trial
MattRB has quit [Quit: This computer has gone to sleep]
resetexistence has quit [Client Quit]
<Kovensky> you can play the campaign and play with friends (as terran only)
<lectrick> Is there any way to subtract (intersect, etc) character sets in Ruby's Regex implementation?
<Kovensky> if you use your google-fu you can also find a tool that lets you launch player-vs-CPU skirmishes (as any race) with the trial version
<Kovensky> then decide whether to buy it :>
karasawa has quit [Ping timeout: 256 seconds]
recycle has quit [Remote host closed the connection]
MattRB has joined #ruby
freakazoid0223 has joined #ruby
<aedornm> I played SC2 during beta ...
jaequery has quit [Quit: Computer has gone to sleep.]
phinfonet has quit [Quit: Linkinus - http://linkinus.com]
louisror has quit [Ping timeout: 276 seconds]
<banisterfiend> Kovensky: this mother fucking thing is asking for my 'redeem' code
<banisterfiend> and telling me it'sin my email, there is NOTHING in the email it sent me that says it's my redeem coc
<banisterfiend> code
<banisterfiend> ping davidcelis
artOfWar has quit [Ping timeout: 244 seconds]
jblack has quit [Ping timeout: 252 seconds]
arya_ has quit [Ping timeout: 248 seconds]
codezombie is now known as codezombie|away
arya_ has joined #ruby
babonk has quit [Quit: babonk]
<breakingthings> RSpec is giving me a bunch of rbenv related details… Isn't there a way to add a local-version of the gem…?
<breakingthings> (As in, it's giving me "unitialized constant ClassName (NameError) from […] .rbenv/versions..."
<breakingthings> which is adding a bunch of extra output to the rspec test)
statarb3 has quit [Ping timeout: 264 seconds]
RagingDave has quit [Quit: Ex-Chat]
swarles has joined #ruby
<swarles> > puts "is this the eval command, I forget"
<swarles> >> puts "is this the eval command, I forget"
<eval-in> swarles: Output: "is this the eval command, I forget\n" (http://eval.in/7369)
<swarles> there we go
bjeanes has quit [Ping timeout: 248 seconds]
<swarles> >> puts [1,2,3].methods.include? :">>"
<eval-in> swarles: Output: "false\n" (http://eval.in/7370)
<swarles> k
tatsuya_o has joined #ruby
<banisterfiend> >> puts [].methods
<eval-in> banisterfiend: Output: "inspect\nto_s\nto_a\nto_ary\nfrozen?\n==\neql?\nhash\n[]\n[]=\nat\nfetch\nfirst\nlast\nconcat\n<<\npush\npop\nshift\nunshift\ninsert\neach\neach_index\nreverse_each\nlength\nsize\nempty?\nfind_index\nindex\nrindex\njoin\nreverse\nrev ..." (http://eval.in/7371)
yshh has joined #ruby
hackerdude has joined #ruby
alexy has joined #ruby
alexy has left #ruby [#ruby]
<swarles> I wonder what the applications of a >> method would be
jerius has quit []
<swarles> It would seem silly, given that it wouldn't actually operate on the object itself I wouldn't think
huoxito has joined #ruby
syamajala has joined #ruby
<banisterfiend> swarles: c++ uses it
elaptics is now known as elaptics`away
headius has quit [Quit: headius]
<heftig> death to cin
<banisterfiend> swarles: cin >> blah;
<banisterfiend> takes input from the cin stream and sticks it in blah
<banisterfiend> oppsoite of cout << blah; which writes blah to the cout stream
<swarles> eh
Takehiro_ has joined #ruby
<swarles> It seems like you can avoid that by changing the way you do the operation
<swarles> to make it seem less odd and more consistent
<swarles> also, for some reason writing this line of my lexer made me more happy than I expected it to
<swarles> token TkStabbyLambda { <TkMinus> <TkGreaterThan> } #= '->'
bjeanes has joined #ruby
ckrailo has quit [Quit: Computer has gone to sleep.]
mrsolo has quit [Quit: Leaving]
epylinkn has quit [Quit: Leaving.]
<swarles> public private and protected are really just methods aren't they?
ebobby has quit [Quit: Lost terminal]
tatsuya_o has quit [Ping timeout: 248 seconds]
<banisterfiend> Yeah
<banisterfiend> magic methods
<swarles> So you wouldn't consider them keywords?
headius has joined #ruby
headius has quit [Client Quit]
MattRB has quit [Quit: This computer has gone to sleep]
bjeanes has quit [Ping timeout: 248 seconds]
miskander has quit [Quit: miskander]
bjeanes has joined #ruby
slainer68 has joined #ruby
sclarson_ has quit [Quit: sclarson_]
Virunga_ has quit [Remote host closed the connection]
<swarles> what keywords am I forgeting? http://pastebin.com/cM4sa6Ue
TheFuzzball has quit [Quit: Computer has gone to sleep.]
<swarles> Also, I quoted all of those strings, so disregard the syntax showing that they are keywords of perl6
<banisterfiend> swarles: ->
<swarles> I have that as TkStabbyLambda, I suppose I need to alias it as a Keyword
<swarles> oh, I also need to add proc and lambda
<swarles> wait, those are methods aren't they
bradhe has quit [Remote host closed the connection]
<banisterfiend> swarles: next/break/return
bradhe has joined #ruby
TheFuzzball has joined #ruby
<banisterfiend> swarles: redo
<banisterfiend> retry
<banisterfiend> tc
<banisterfiend> etc
MattRB has joined #ruby
wallerdev has joined #ruby
vervain has joined #ruby
bradhe has quit [Ping timeout: 264 seconds]
slainer68 has quit [Ping timeout: 244 seconds]
adeponte has quit [Ping timeout: 248 seconds]
jblack has joined #ruby
noxoc has joined #ruby
adeponte has joined #ruby
toekutr has joined #ruby
Spooner has quit [Remote host closed the connection]
reppard has joined #ruby
taoru has joined #ruby
bricker`LA has joined #ruby
<swarles> ah, thanks
poikon has quit [Remote host closed the connection]
apeiros_ has joined #ruby
hadees has joined #ruby
kwejkee has joined #ruby
orcris has quit [Quit: Konversation terminated!]
noxoc has quit [Ping timeout: 256 seconds]
kwejkee has quit [Client Quit]
cb0ss has quit [Quit: ( www.nnscript.com :: NoNameScript 4.22 :: www.esnation.com )]
adeponte has quit [Ping timeout: 256 seconds]
bricker`1A has quit [Ping timeout: 255 seconds]
mikepack has quit [Remote host closed the connection]
nwertman has quit [Ping timeout: 252 seconds]
ryanf has quit [Ping timeout: 252 seconds]
SCommette has joined #ruby
autumn is now known as subroutine
maletor has quit [Quit: Computer has gone to sleep.]
codezombie|away is now known as codezombie
Asher has quit [Quit: Leaving.]
aeontech has joined #ruby
aeontech has left #ruby [#ruby]
subroutine is now known as autumn
Playground has quit [Ping timeout: 252 seconds]
orcris has joined #ruby
Asher has joined #ruby
MattRB has quit [Quit: This computer has gone to sleep]
jblack has quit [Remote host closed the connection]
embs is now known as eita
eita is now known as embs
jblack has joined #ruby
JumpMast3r has joined #ruby
sclarson_ has joined #ruby
embs has quit [Quit: Konversation terminated!]
embs has joined #ruby
embs is now known as embs_
mva3212 has joined #ruby
adeponte has joined #ruby
clj_newb has quit [Ping timeout: 240 seconds]
ckrailo has joined #ruby
ckrailo has quit [Client Quit]
daxroc has quit [Ping timeout: 264 seconds]
tommyvyo_ has joined #ruby
daxroc has joined #ruby
didge has quit [Quit: Textual IRC Client: www.textualapp.com]
bradhe has joined #ruby
havenn has quit [Remote host closed the connection]
karasawa has joined #ruby
havenn has joined #ruby
MattRB has joined #ruby
d2dchat has quit [Remote host closed the connection]
F1skr has quit [Quit: WeeChat 0.4.0]
earthquake has joined #ruby
Maziz has joined #ruby
Takehiro_ has quit [Remote host closed the connection]
tommyvyo_ has quit [Quit: http://thomasvendetta.com]
tommyvyo has quit [Quit: http://twitter.com/tommyvyo]
araujo has joined #ruby
araujo has quit [Changing host]
araujo has joined #ruby
karasawa has quit [Ping timeout: 248 seconds]
havenn has quit [Ping timeout: 244 seconds]
didge has joined #ruby
Playground has joined #ruby
TheFuzzball has quit [Quit: Computer has gone to sleep.]
orcris has quit [Quit: Konversation terminated!]
gyre007 has joined #ruby
mockra has quit [Remote host closed the connection]
dankest has joined #ruby
gyre007 has quit [Ping timeout: 240 seconds]
bradhe has quit [Remote host closed the connection]
nari has joined #ruby
dmiller has quit [Ping timeout: 256 seconds]
khimera has joined #ruby
banisterfiend is now known as banister`sleep
nfk has quit [Quit: yawn]
Asher has quit [Ping timeout: 244 seconds]
techhelp has joined #ruby
DrShoggoth has joined #ruby
chrismhough has quit [Quit: chrismhough]
havenn has joined #ruby
jtgiri_ has quit [Quit: jtgiri_]
Asher has joined #ruby
forced_request has joined #ruby
arya_ has quit [Ping timeout: 276 seconds]
arya_ has joined #ruby
havenn has quit [Read error: Connection reset by peer]
SCommette has quit [Quit: SCommette]
havenn_ has joined #ruby
ttt_ has joined #ruby
codezombie is now known as codezombie|away
caleb_io has quit [Quit: caleb_io]
dnyy has quit [Remote host closed the connection]
sn0wb1rd has quit [Quit: sn0wb1rd]
dnyy has joined #ruby
codezombie|away is now known as codezombie
dmiller has joined #ruby
dnyy has quit [Remote host closed the connection]
ryanh has joined #ruby
havenn_ has quit [Ping timeout: 276 seconds]
dnyy has joined #ruby
ryanf has joined #ruby
zph has joined #ruby
bricker is now known as bricker`work
That-BRMatt has quit [Read error: Operation timed out]
ViPi has quit [Quit: Computer has gone to sleep.]
dnyy has quit [Remote host closed the connection]
dnyy has joined #ruby
<breakingthings> Question for anyone around: I'm building a gem, which is more or less going to be a module that give access to some common stuff for IRC and make it easy to build a bot around it
sclarson_ has quit [Quit: sclarson_]
<breakingthings> Cinch's way is to give you a DSL for the entire bot, but it sort of makes it weird when you're essentially writing procedural-like code to configure and start your bot.
codezombie is now known as codezombie|away
<mva3212> breakingthings: I recommend you try #rubyonrails
megha has joined #ruby
dnyy has quit [Remote host closed the connection]
<breakingthings> It's not really a rails question, though...
<dominikh> breakingthings: you can use Cinch in a "procedural" style, too. There's a full proper API
ryanh has quit [Ping timeout: 252 seconds]
<dominikh> and yeah, what the heck has that to do with rails :)
dnyy has joined #ruby
account has quit [Ping timeout: 245 seconds]
<mva3212> oh
andrewhl has joined #ruby
<mva3212> I was just suggesting cuz this channel is always dead
<mva3212> lo
yacks has joined #ruby
<breakingthings> Well, dominikh, what I mean is… I want to structure my bot in such a way that you can do the simple way that Cinch allows for but also to use it in a class that includes/extends my irc module
<breakingthings> So I was curious how I could best accomplish that
<breakingthings> With Cinch, almost all of the functionality is in Cinch::Bot
CreativeEmbassy has joined #ruby
<dominikh> uhm, there's almost no functionality in the Cinch::Bot class ;)
dnyy has quit [Remote host closed the connection]
<breakingthings> Well, that's where it all consolidates.
sclarson_ has joined #ruby
<breakingthings> Is what I mean
<breakingthings> Like, to use Cinch it's intended that you use Bot#new
<breakingthings> and Bot#start
etcetera has quit []
dnyy has joined #ruby
khimera has quit [Quit: khimera]
<breakingthings> unless I don't understand something (which is entirely possible considering my fledgling ruby understanding)
<dominikh> mostly right, yes
sailias has joined #ruby
<breakingthings> But I was wondering if there might be a better way to go about structuring it such that you can include the module in your own Bot class, that then has access to the functions and such
<breakingthings> access to my module's API, I guess is what I mean
etcetera has joined #ruby
Playground has quit [Ping timeout: 248 seconds]
<breakingthings> And if possible, maybe also allow for a little flexibility in being able to have a DSL similar to Cinch that allows for really quick small bots
jjbohn has joined #ruby
dnyy has quit [Remote host closed the connection]
<breakingthings> so you can play it procedural-ish or OOP
slainer68 has joined #ruby
<breakingthings> Hopefully I'm making sense. If you have any input it'd be greatly appreciated.
dnyy has joined #ruby
<dominikh> mostly thinking with my reptile brain right now. as for including and extensibility: the only parts you could make mix-inable are generic helper functions. everything that has to deal with the actual network side kind of relis on some expected foundation
megha is now known as database
dnyy has quit [Remote host closed the connection]
<breakingthings> What about as an extend
inokenty has quit [Remote host closed the connection]
dnyy has joined #ruby
tommyvyo has joined #ruby
<breakingthings> which… I don't know, if I can somehow define a module method that handles the connection
<dominikh> what exactly are you hoping to achieve? compare it to for example the plugin architecture in Cinch (which, essentially, is an include+extend of Cinch::Plugin in your own class)
dnyy has quit [Remote host closed the connection]
<breakingthings> Well, maybe I just don't get it, but it seems weird for Cinch::Bot to be the cornerstone of, well, your own bot.
slainer68 has quit [Ping timeout: 244 seconds]
dnyy has joined #ruby
<breakingthings> I didn't see any uses of it in a more OO manner so I'm not sure how it looks if you can do that well
<breakingthings> I'll check the examples on their repo to see if there's one...
<dominikh> breakingthings: what if you called it Cinch::Connection instead, would it make a difference?
mahmoudimus has quit [Quit: Computer has gone to sleep.]
arya_ has quit [Ping timeout: 248 seconds]
<dominikh> in its essence, Cinch::Bot is a connection and message broker
<breakingthings> dominikh: Eh, kinda. But there's something that I just don't know how to articulate that I'm wondering about
<didge> Does anyone in the channel have experience using the gem mysql2 on MacOSX ?
dnyy has quit [Remote host closed the connection]
joofsh has joined #ruby
DrShoggoth has quit [Ping timeout: 256 seconds]
mahmoudimus has joined #ruby
<didge> I'm getting an error message "dyld: lazy symbol binding failed: Symbol not found: _mysql_get_client_info references from mysql2.bundle
dnyy has joined #ruby
<breakingthings> I took a look at the examples from Cinch's repo, but all of them are just procedural-like using the DSL
bradhe has joined #ruby
dnyy has quit [Remote host closed the connection]
<dominikh> breakingthings: there are to sets of examples. one's labelled basic, one plugins
<dominikh> one uses the sinatra-like DSL, one uses plugin classes
dnyy has joined #ruby
apok has quit [Read error: Connection reset by peer]
aytch_ is now known as aytch__
apok has joined #ruby
freakazoid0223 has quit [Quit: Leaving]
dnyy has quit [Remote host closed the connection]
<dominikh> which one is it that you looked at?
dnyy has joined #ruby
<breakingthings> dominikh: I had looked at all the basic and then took a look at the plugins
<breakingthings> here's what I was thinking
<breakingthings> I don't know if that's more hassle than the DSL but I felt it might be a little better then you can built bot-specific bits outside of the plugins
<dominikh> what would be the advantage of that? compared to, say, class MyBot < Cinch::Bot
* breakingthings shrugs
dnyy has quit [Remote host closed the connection]
arya_ has joined #ruby
mahmoudimus has quit [Ping timeout: 255 seconds]
vervain has quit [Quit: leaving]
<breakingthings> Well, I guess that would do too
<breakingthings> but I just thought include/extending the module would make more sense
dnyy has joined #ruby
<swarles> >> String.new.methods.include? "=~"
<eval-in> swarles: Output: "" (http://eval.in/7372)
<swarles> >> puts String.new.methods.include? "=~"
<eval-in> swarles: Output: "false\n" (http://eval.in/7373)
<swarles> >> puts String.new.methods.include? "~"
<eval-in> swarles: Output: "false\n" (http://eval.in/7374)
<swarles> >> puts String.new.methods
<eval-in> swarles: Output: "<=>\n==\n===\neql?\nhash\ncasecmp\n+\n*\n%\n[]\n[]=\ninsert\nlength\nsize\nbytesize\nempty?\n=~\nmatch\nsucc\nsucc!\nnext\nnext!\nupto\nindex\nrindex\nreplace\nclear\nchr\ngetbyte\nsetbyte\nbyteslice\nto_i\nto_f\nto_s\nto_str\ninspect\nd ..." (http://eval.in/7375)
<swarles> ...
<breakingthings> And then I figure I could have a DSL as well that can mimic these… or something. I dunno, I'm sorta jumping head-first into this a little.
<swarles> I juse did include? =~
<swarles> \n=~
generalissimo has joined #ruby
dnyy has quit [Remote host closed the connection]
asym has quit [Ping timeout: 255 seconds]
dnyy has joined #ruby
mahmoudimus has joined #ruby
<dominikh> breakingthings: I'm really not able to wrap my head around what you're trying to achieve, sorry
dnyy has quit [Remote host closed the connection]
<breakingthings> dominikh: It's alright, I understand I'm being a little cryptic, I can't really articulate what I'm trying to think of
<breakingthings> thanks for trying anyway
dnyy has joined #ruby
bradhe has quit [Ping timeout: 248 seconds]
apok has quit [Quit: apok]
khimera has joined #ruby
dnyy has quit [Remote host closed the connection]
dnyy has joined #ruby
elkclone has quit [Read error: Connection reset by peer]
dnyy has quit [Remote host closed the connection]
dnyy has joined #ruby
aytch__ is now known as aytch
dnyy has quit [Remote host closed the connection]
sn0wb1rd has joined #ruby
ryanh has joined #ruby
dnyy has joined #ruby
jjbohn has quit [Quit: Linkinus - http://linkinus.com]
kold_ has joined #ruby
dnyy has quit [Remote host closed the connection]
dnyy has joined #ruby
karasawa has joined #ruby
angusiguess has quit [Ping timeout: 240 seconds]
joeycarmello has quit [Remote host closed the connection]
mmitchell has joined #ruby
dnyy has quit [Remote host closed the connection]
adeponte has quit [Remote host closed the connection]
emmanuelux has quit [Remote host closed the connection]
jblack_ has joined #ruby
tvw has quit [Ping timeout: 252 seconds]
dnyy has joined #ruby
<shevy> breakingthings you seem to be very enthusiastic about DSLs
tvw has joined #ruby
<breakingthings> shevy: I think they're cool, but I don't think the Cinch way makes sense because it kind of just eschews OOP for the DSL
<shevy> I think that is the case with many DSLs
<breakingthings> I'd like to have a DSL if it makes sense, but I'd like to have a more appropriate OO way to accomplish it
<shevy> they become quite the same as:
<breakingthings> than what I feel is weirdly implemented in Cinch
<shevy> object.set_bla 5
<shevy> object.lala = :xyz
CreativeEmbassy has quit [Quit: Textual IRC Client: http://www.textualapp.com/]
<shevy> options do |o|
dnyy has quit [Remote host closed the connection]
<shevy> o.help_on '--t','set time'
<shevy> on a sidenote, I can't stand OptionParser
karasawa has quit [Ping timeout: 255 seconds]
dnyy has joined #ruby
jbw has quit [Ping timeout: 245 seconds]
MattRB has quit [Quit: This computer has gone to sleep]
dnyy has quit [Remote host closed the connection]
MattRB has joined #ruby
dnyy has joined #ruby
<dominikh> breakingthings: sorry, but I really don't think you "get" Cinch. What about Cinch doesn't feel OO to you?
shorts has quit [Quit: shorts]
<breakingthings> dominikh: The end result, not the actual Cinch classes.
<dominikh> yes, that's what I mean as well
<breakingthings> maybe I just don't get it
<breakingthings> it just seems weird to me
bricker`LA has quit [Ping timeout: 256 seconds]
<dominikh> have you actually used it before? :)
<breakingthings> Yes
<breakingthings> It's easy, it just seems weird.
<dominikh> any public code?
dnyy has quit [Remote host closed the connection]
<breakingthings> Nothing that I've published, just threw together a simple bot with it to see how it worked
dnyy has joined #ruby
caleb_io has joined #ruby
JoeJulian has left #ruby ["Leaving"]
generalissimo has quit [Remote host closed the connection]
mercwithamouth has quit [Ping timeout: 252 seconds]
<dominikh> show me an example then :)
xnm has quit [Ping timeout: 245 seconds]
dnyy has quit [Remote host closed the connection]
dnyy has joined #ruby
Hanmac has joined #ruby
squidBits has quit [Quit: whoops]
banister`sleep has quit [Remote host closed the connection]
<breakingthings> dominikh it was pretty much just the hello.rb example, nothing very fancy.
banister`sleep has joined #ruby
swarles has quit [Ping timeout: 256 seconds]
tomzx_mac has joined #ruby
jblack_ has quit [Ping timeout: 255 seconds]
Hanmac1 has quit [Ping timeout: 248 seconds]
dnyy has quit [Remote host closed the connection]
bigmac has joined #ruby
dnyy has joined #ruby
asym has joined #ruby
bricker`LA has joined #ruby
samphippen has quit [Quit: Computer has gone to sleep.]
mahmoudimus has quit [Quit: Computer has gone to sleep.]
dnyy has quit [Remote host closed the connection]
MattRB has quit [Quit: This computer has gone to sleep]
dnyy has joined #ruby
kold_ has quit [Remote host closed the connection]
f03lipe has quit [Quit: Leaving]
aedornm has quit [Remote host closed the connection]
daniel_- has quit [Ping timeout: 252 seconds]
eMBee has joined #ruby
etcetera has quit []
pu22l3r has quit [Ping timeout: 276 seconds]
eMBee has left #ruby [#ruby]
jbw has joined #ruby
dnyy has quit [Remote host closed the connection]
dnyy has joined #ruby
joeycarmello has joined #ruby
mrsolo has joined #ruby
bricker`1A has joined #ruby
ryanh has quit [Quit: Computer has gone to sleep.]
etcetera has joined #ruby
bricker`LA has quit [Ping timeout: 264 seconds]
nwertman has joined #ruby
dnyy has quit [Remote host closed the connection]
kiwnix has joined #ruby
io_syl has quit [Ping timeout: 255 seconds]
dnyy has joined #ruby
bradhe has joined #ruby
xemu has quit [Quit: Nettalk6 - www.ntalk.de]
Swarley_ has joined #ruby
Takehiro has joined #ruby
jblack_ has joined #ruby
Michael_ has quit [Remote host closed the connection]
asym has quit [Ping timeout: 264 seconds]
dnyy has quit [Remote host closed the connection]
xnm has joined #ruby
dnyy has joined #ruby
sailias has quit [Remote host closed the connection]
havenn has joined #ruby
dnyy has quit [Remote host closed the connection]
dnyy has joined #ruby
alvaro_o has quit [Quit: Ex-Chat]
quest88 has joined #ruby
bradhe has quit [Ping timeout: 248 seconds]
dnyy has quit [Remote host closed the connection]
kold_ has joined #ruby
dnyy has joined #ruby
techhelp has quit [Quit: Leaving]
angusiguess has joined #ruby
etcetera has quit []
dnyy has quit [Remote host closed the connection]
dnyy has joined #ruby
NeRMe has joined #ruby
Zac_o_O has quit [Remote host closed the connection]
caleb_io has quit [Quit: caleb_io]
dnyy has quit [Remote host closed the connection]
mercwithamouth has joined #ruby
dnyy has joined #ruby
c0rn has quit [Quit: Computer has gone to sleep.]
syamajala has quit [Quit: leaving]
dnyy has quit [Remote host closed the connection]
Michael_ has joined #ruby
dnyy has joined #ruby
sepp2k1 has quit [Read error: Connection reset by peer]
epylinkn has joined #ruby
sailias has joined #ruby
banister`sleep is now known as banisterfiend
dnyy has quit [Remote host closed the connection]
Mokosha has joined #ruby
dnyy has joined #ruby
ForSpareParts has joined #ruby
adkron_ has joined #ruby
adkron has joined #ruby
dnyy has quit [Remote host closed the connection]
zph has quit [Quit: Computer has gone to sleep.]
<ForSpareParts> Does anyone know why linecache19 takes so long to build, and if there's a way to do something about it?
DrShoggoth has joined #ruby
dnyy has joined #ruby
ngoldman has joined #ruby
Mokosha has quit [Read error: Connection reset by peer]
evanx has joined #ruby
francisfish has quit [Read error: Connection reset by peer]
hadees has quit [Quit: hadees]
esing has joined #ruby
francisfish has joined #ruby
dnyy has quit [Remote host closed the connection]
dnyy has joined #ruby
database has quit [Quit: WeeChat 0.3.9.2]
pu22l3r has joined #ruby
dnyy has quit [Remote host closed the connection]
NeRMe has quit [Remote host closed the connection]
dnyy has joined #ruby
tvw has quit [Remote host closed the connection]
<evanx> Hi
mrFrog has joined #ruby
dwu1 has joined #ruby
<mrFrog> i'm having a hard time with time zones. i have this time "1358911653 -0700" - if i do this: time = DateTime.strptime(time_raw, '%s %z') then time ends up 7 hours off (2013-01-23T03:27:33+00:00). why is that? how do i adjust for that?
dnyy has quit [Remote host closed the connection]
havenn has quit [Remote host closed the connection]
<mrFrog> i would have thought that strptime with %z took care of the zone adjusting, maybe it's more complex than i thought?
__BigO__ has joined #ruby
<evanx> can somebody help me with this https://gist.github.com/4601645 ?
dnyy has joined #ruby
havenn has joined #ruby
jblack has quit [Remote host closed the connection]
jduan1981 has quit [Ping timeout: 244 seconds]
adeponte has joined #ruby
jblack has joined #ruby
MattRB has joined #ruby
quest88 has quit [Quit: quest88]
dnyy has quit [Remote host closed the connection]
diegoviola has quit [Quit: WeeChat 0.4.0]
dnyy has joined #ruby
__BigO__ has quit [Read error: Connection reset by peer]
__BigO__ has joined #ruby
zph has joined #ruby
didge has quit [Quit: Textual IRC Client: www.textualapp.com]
dnyy has quit [Remote host closed the connection]
havenn has quit [Ping timeout: 248 seconds]
dnyy has joined #ruby
kold_ has quit [Remote host closed the connection]
Michael_ has quit [Remote host closed the connection]
dnyy has quit [Remote host closed the connection]
dnyy has joined #ruby
robert__ has joined #ruby
robert__ has quit [Changing host]
robert__ has joined #ruby
n1x has quit [Ping timeout: 248 seconds]
bradhe has joined #ruby
jphpsf- is now known as jphpsf
ryanf has quit [Ping timeout: 264 seconds]
dnyy has quit [Remote host closed the connection]
jackyalcine has joined #ruby
dnyy has joined #ruby
thinkclay has joined #ruby
robert_ has quit [Ping timeout: 260 seconds]
mrFrog has left #ruby [#ruby]
mercwithamouth has quit [Quit: Yaaic - Yet another Android IRC client - http://www.yaaic.org]
dnyy has quit [Remote host closed the connection]
mercwithamouth has joined #ruby
rakl has quit [Quit: sleeping]
bradhe has quit [Remote host closed the connection]
dnyy has joined #ruby
bel3atar_ has joined #ruby
JumpMast3r has quit [Quit: JumpMast3r]
flip_digits has joined #ruby
rakl has joined #ruby
pu22l3r has quit [Remote host closed the connection]
dnyy has quit [Remote host closed the connection]
codezombie|away is now known as codezombie
rakl has quit [Client Quit]
dnyy has joined #ruby
joeycarmello has quit [Remote host closed the connection]
mahmoudimus has joined #ruby
dnyy has quit [Remote host closed the connection]
dnyy has joined #ruby
SCommette has joined #ruby
dnyy has quit [Remote host closed the connection]
bigmac has quit [Quit: Leaving]
dnyy has joined #ruby
browndawg has joined #ruby
dnyy has quit [Remote host closed the connection]
pu22l3r has joined #ruby
dnyy has joined #ruby
mdel has joined #ruby
sailias has quit [Quit: Leaving.]
forced_request has quit [Read error: Connection reset by peer]
GeekSir has joined #ruby
dnyy has quit [Remote host closed the connection]
reppard has quit [Quit: leaving]
GeekSir has quit [Client Quit]
dnyy has joined #ruby
sailias has joined #ruby
n1x has joined #ruby
jekotia has quit [Quit: ChatZilla 0.9.89-rdmsoft [XULRunner 1.9.0.17/2009122204]]
dnyy has quit [Remote host closed the connection]
dnyy has joined #ruby
PragCypher has quit [Quit: Leaving]
Maziz has quit [Read error: Connection reset by peer]
dnyy has quit [Remote host closed the connection]
Maziz has joined #ruby
dnyy has joined #ruby
angusiguess has quit [Ping timeout: 246 seconds]
dnyy has quit [Remote host closed the connection]
Umren has joined #ruby
dnyy has joined #ruby
crackfu has joined #ruby
mmitchell has quit [Remote host closed the connection]
dnyy has quit [Remote host closed the connection]
dnyy has joined #ruby
joofsh has quit [Remote host closed the connection]
codezombie has quit [Quit: Linkinus - http://linkinus.com]
aapzak has quit [Ping timeout: 248 seconds]
crackfu has quit [Remote host closed the connection]
dnyy has quit [Remote host closed the connection]
jduan1981 has joined #ruby
dmiller1 has joined #ruby
ViPi has joined #ruby
dmiller has quit [Ping timeout: 248 seconds]
dnyy has joined #ruby
x82_nicole has quit [Quit: Computer has gone to sleep.]
aapzak has joined #ruby
ryanf has joined #ruby
crackfu has joined #ruby
kpshek has joined #ruby
dnyy has quit [Remote host closed the connection]
dnyy has joined #ruby
toekutr has quit [Remote host closed the connection]
dnyy has quit [Remote host closed the connection]
dnyy has joined #ruby
havenn has joined #ruby
kpshek has quit [Ping timeout: 246 seconds]
dnyy has quit [Remote host closed the connection]
dnyy has joined #ruby
dnyy has quit [Remote host closed the connection]
havenn has quit [Remote host closed the connection]
ananthakumaran has joined #ruby
dnyy has joined #ruby
dnyy has quit [Remote host closed the connection]
flip_digits has quit [Quit: ["Textual IRC Client: www.textualapp.com"]]
dnyy has joined #ruby
crackfu has quit [Remote host closed the connection]
joeycarmello has joined #ruby
crackfu has joined #ruby
dnyy has quit [Remote host closed the connection]
mneorr has quit [Remote host closed the connection]
dnyy has joined #ruby
chrismhough has joined #ruby
dnyy has quit [Remote host closed the connection]
n1x has quit [Ping timeout: 248 seconds]
dnyy has joined #ruby
shorts has joined #ruby
crackfu has quit [Ping timeout: 276 seconds]
mneorr has joined #ruby
dnyy has quit [Remote host closed the connection]
dnyy has joined #ruby
drago757 has joined #ruby
pu22l3r has quit [Read error: Connection reset by peer]
pu22l3r_ has joined #ruby
dnyy has quit [Remote host closed the connection]
dnyy has joined #ruby
friskd has joined #ruby
dnyy has quit [Remote host closed the connection]
dnyy has joined #ruby
jaequery has joined #ruby
Teffen has joined #ruby
<Teffen> hello
Teffen has quit [Client Quit]
dankest is now known as dankest|away
dnyy has quit [Remote host closed the connection]
v0n has joined #ruby
dnyy has joined #ruby
JaTochNietDan has quit [Ping timeout: 245 seconds]
kmczn has joined #ruby
yshh has quit [Remote host closed the connection]
dnyy has quit [Remote host closed the connection]
jpun has quit [Remote host closed the connection]
haxrbyte has joined #ruby
jonahR has joined #ruby
dnyy has joined #ruby
haxrbyte_ has joined #ruby
crackfu has joined #ruby
radic_ has quit [Read error: Operation timed out]
haxrbyt__ has joined #ruby
dnyy has quit [Remote host closed the connection]
dnyy has joined #ruby
dnyy has quit [Remote host closed the connection]
kiwnix has quit [Quit: Saliendo]
dnyy has joined #ruby
haxrbyte has quit [Ping timeout: 248 seconds]
haxrbyte_ has quit [Ping timeout: 248 seconds]
ffranz has quit [Quit: Leaving]
epicurus has joined #ruby
tommyvyo has quit [Quit: http://twitter.com/tommyvyo]
<epicurus> dooooooo
dnyy has quit [Remote host closed the connection]
n1x has joined #ruby
<epicurus> chat do
dnyy has joined #ruby
joeycarmello has quit [Remote host closed the connection]
joeycarmello has joined #ruby
khimera has quit [Ping timeout: 264 seconds]
Liothen has joined #ruby
dnyy has quit [Remote host closed the connection]
jduan1981_ has joined #ruby
dnyy has joined #ruby
jduan1981 has quit [Read error: Connection reset by peer]
jduan1981_ is now known as jduan1981
io_syl has joined #ruby
heftig has quit [Quit: leaving]
dnyy has quit [Remote host closed the connection]
crackfu has quit [Remote host closed the connection]
dnyy has joined #ruby
crackfu has joined #ruby
browndawg has quit [Ping timeout: 248 seconds]
pu22l3r has joined #ruby
mneorr has quit [Remote host closed the connection]
dnyy has quit [Remote host closed the connection]
techlife has joined #ruby
rakl has joined #ruby
dnyy has joined #ruby
jaequery has quit [Quit: Computer has gone to sleep.]
dnyy has quit [Remote host closed the connection]
mneorr has joined #ruby
x82_nicole has joined #ruby
banisterfiend has quit [Remote host closed the connection]
dnyy has joined #ruby
crackfu has quit [Ping timeout: 248 seconds]
__BigO__ has quit [Read error: Connection reset by peer]
radic has joined #ruby
dankest|away is now known as dankest
dnyy has quit [Remote host closed the connection]
pu22l3r has quit [Quit: leaving]
dnyy has joined #ruby
quest88 has joined #ruby
heftig has joined #ruby
Umren has quit [Read error: Connection reset by peer]
dnyy has quit [Remote host closed the connection]
sailias has quit [Quit: Leaving.]
dnyy has joined #ruby
dnyy has quit [Remote host closed the connection]
n1x has quit [Ping timeout: 248 seconds]
dnyy has joined #ruby
JohnBat26 has joined #ruby
JohnBat26 has quit [Client Quit]
bradhe has joined #ruby
JohnBat26 has joined #ruby
jblack_ has quit [Ping timeout: 256 seconds]
jaequery has joined #ruby
dmiller1 has quit [Ping timeout: 244 seconds]
dnyy has quit [Remote host closed the connection]
dnyy has joined #ruby
mneorr has quit [Remote host closed the connection]
browndawg has joined #ruby
dnyy has quit [Remote host closed the connection]
dnyy has joined #ruby
<dyeske> anyone set breakpoints in .rdebugrc?
esing has quit [Remote host closed the connection]
a_a_g has joined #ruby
etcetera has joined #ruby
dmiller1 has joined #ruby
bradhe has quit [Ping timeout: 255 seconds]
dnyy has quit [Remote host closed the connection]
dnyy has joined #ruby
dnyy has quit [Remote host closed the connection]
thansen has quit [Read error: No route to host]
dnyy has joined #ruby
pen has quit [Remote host closed the connection]
dnyy has quit [Remote host closed the connection]
dnyy has joined #ruby
tommyvyo has joined #ruby
khimera has joined #ruby
bricker`1A is now known as bricker
dnyy has quit [Remote host closed the connection]
dnyy has joined #ruby
<hemanth> how to re-write browser.input(:name,"password").visible? with send()
<hemanth> browser.send(input,:name,password).visible?
<hemanth> ?
dmiller1 has quit [Ping timeout: 244 seconds]
friskd has quit [Remote host closed the connection]
macmartine has joined #ruby
dnyy has quit [Remote host closed the connection]
dnyy has joined #ruby
dnyy has quit [Remote host closed the connection]
dnyy has joined #ruby
babonk has joined #ruby
babonk has joined #ruby
babonk has quit [Changing host]
pu22l3r_ has quit [Remote host closed the connection]
dnyy has quit [Remote host closed the connection]
dnyy has joined #ruby
dnyy has quit [Remote host closed the connection]
mneorr has joined #ruby
dnyy has joined #ruby
<TTilus> :input
bradhe has joined #ruby
kenneth has quit [Quit: kenneth]
dnyy has quit [Remote host closed the connection]
<TTilus> "password"
<TTilus> otherwise exactly correct
dnyy has joined #ruby
slainer68 has joined #ruby
thinkclay has quit [Quit: Leaving.]
<hemanth> TTilus, thanks!
ttt_ has quit [Remote host closed the connection]
dnyy has quit [Remote host closed the connection]
<hemanth> TTilus, .browser.send(:elem,:attrib,value).visible? sounds fine?
dnyy has joined #ruby
earthquake has quit [Quit: earthquake]
eaven has joined #ruby
jtgiri_ has joined #ruby
dnyy has quit [Remote host closed the connection]
dnyy has joined #ruby
slainer68 has quit [Ping timeout: 248 seconds]
etcetera has quit []
<TTilus> hemanth: equivalent to browser.elem(:attrib, value).visible?
huoxito has quit [Quit: Leaving]
dnyy has quit [Remote host closed the connection]
<hemanth> TTilus, yup exactly what I was looking for
dnyy has joined #ruby
ner0x has quit [Quit: Leaving]
alexhq has joined #ruby
a_a_g has quit [Read error: Connection reset by peer]
dnyy has quit [Remote host closed the connection]
a_a_g has joined #ruby
<alexhq> Do you know any static site generator as alternative to middleman and tilt with their worst encoding issues unresolved for years? I need just Erb layouts and templates + sprockets. Sprockets is not strictly required.
dnyy has joined #ruby
ananthakumaran has quit [Quit: Leaving.]
etcetera has joined #ruby
dnyy has quit [Remote host closed the connection]
browndawg has quit [Quit: Leaving.]
dnyy has joined #ruby
<alexhq> macmartine: cool
sayan has joined #ruby
sayan has quit [Changing host]
sayan has joined #ruby
bradhe has quit [Remote host closed the connection]
dnyy has quit [Remote host closed the connection]
dnyy has joined #ruby
<hemanth> TTilus, PM?
jtgiri_ has quit [Quit: jtgiri_]
dnyy has quit [Remote host closed the connection]
dnyy has joined #ruby
<hemanth> TTilus, I ended up with : browser.send(elem.to_sym,attrib.to_sym,value).exists?
x82_nicole has quit [Quit: Computer has gone to sleep.]
dnyy has quit [Remote host closed the connection]
dnyy has joined #ruby
Swarley_ has quit [Ping timeout: 256 seconds]
dnyy has quit [Remote host closed the connection]
jenrzzz has joined #ruby
dnyy has joined #ruby
tommyvyo has quit [Quit: http://twitter.com/tommyvyo]
bradhe has joined #ruby
dnyy has quit [Remote host closed the connection]
mneorr has quit [Remote host closed the connection]
robert___ has joined #ruby
robert___ has quit [Changing host]
robert___ has joined #ruby
dnyy has joined #ruby
macmartine has quit [Quit: ["Textual IRC Client: www.textualapp.com"]]
mrsolo has quit [Quit: Leaving]
dnyy has quit [Remote host closed the connection]
dnyy has joined #ruby
eaven is now known as Eaven
robert__ has quit [Ping timeout: 248 seconds]
jaequery has quit [Quit: Computer has gone to sleep.]
tomzx_mac has quit [Ping timeout: 255 seconds]
etcetera has quit []
dawkirst has joined #ruby
a_a_g has quit [Read error: Connection reset by peer]
khimera has quit [Quit: khimera]
a_a_g has joined #ruby
earthquake has joined #ruby
jaequery has joined #ruby
eddie_ has joined #ruby
<eddie_> can i use respond_with from a non CRUD method
<eddie_> ?
banisterfiend has joined #ruby
mneorr has joined #ruby
ananthakumaran has joined #ruby
ananthakumaran has quit [Max SendQ exceeded]
ananthakumaran has joined #ruby
<eddie_> can i use respond_with from a non CRUD method?
<eddie_> anyone?
JumpMast3r has joined #ruby
aaronmacy has quit [Quit: Leaving.]
mercwithamouth has quit [Ping timeout: 252 seconds]
yshh has joined #ruby
<Spaceghost|cloud> eddie_: #rubyonrails
a_a_g has quit [Read error: Connection reset by peer]
a_a_g has joined #ruby
banisterfiend has quit [Ping timeout: 248 seconds]
jblack has quit [Read error: Connection reset by peer]
arkiver has joined #ruby
tk_ has joined #ruby
bradhe has quit [Remote host closed the connection]
dnyy has quit [Remote host closed the connection]
uris has quit [Quit: Leaving]
sayan has quit [Read error: Connection reset by peer]
dnyy has joined #ruby
bean__ has joined #ruby
mercwithamouth has joined #ruby
angusiguess has joined #ruby
breakingthings has quit []
mockra has joined #ruby
<shevy> eddie_: #hot-wild-sexy-girls
kenneth has joined #ruby
a_a_g has quit [Read error: Connection reset by peer]
<eddie_> shevy: ???
a_a_g has joined #ruby
a_a_g has quit [Read error: Connection reset by peer]
<shevy> eddie_ they know ruby!
a_a_g has joined #ruby
ttt has joined #ruby
<eddie_> kidding?
bean__ has quit [Remote host closed the connection]
mneorr has quit [Remote host closed the connection]
<shevy> perhaps a bit
arya_ has quit [Ping timeout: 252 seconds]
sclarson_ has quit [Quit: sclarson_]
pu22l3r has joined #ruby
zph has quit [Quit: Computer has gone to sleep.]
pu22l3r has quit [Remote host closed the connection]
fram has quit [Ping timeout: 252 seconds]
fyolnish has joined #ruby
v0n has quit [Ping timeout: 264 seconds]
fram has joined #ruby
vlad_starkov has quit [Remote host closed the connection]
maletor has joined #ruby
arya has joined #ruby
joeycarmello has quit [Remote host closed the connection]
chrismhough has quit [Quit: chrismhough]
MattRB has quit [Quit: This computer has gone to sleep]
generalissimo has joined #ruby
rdark has joined #ruby
a_a_g has quit [Read error: Connection reset by peer]
Zolo has joined #ruby
MetaCosm has joined #ruby
a_a_g has joined #ruby
<shevy> hmm how to remove an @ivar again ...
m4n has joined #ruby
<shevy> ah yes, found it... remove_instance_variable(:@foo)
<shevy> is this overkill?
drago757 has quit [Quit: drago757]
<shevy> right now I am kind of in the mood to kill all instance variables which I wont need at runtime
<TTilus> hemanth: no pm, that way you deny others from helping you and learning from your problemn
rakl has quit [Quit: sleeping]
<TTilus> hemanth: thats equivalent to browser.foo(attrib.to_sym, value).exists?
<TTilus> hemanth: given elem.to_sym == :foo
cableray has quit [Quit: cableray]
Zolo has quit [Remote host closed the connection]
browndawg has joined #ruby
mneorr has joined #ruby
otters has quit [Ping timeout: 252 seconds]
tjbiddle_ has joined #ruby
tjbiddle_ has quit [Client Quit]
evanx_ has joined #ruby
evanx has quit [Ping timeout: 248 seconds]
evanx_ is now known as evanx
ViPi has quit [Quit: Computer has gone to sleep.]
nomenkun has joined #ruby
tjbiddle_ has joined #ruby
tjbiddle_ has quit [Client Quit]
tjbiddle has quit [Ping timeout: 260 seconds]
ttt has quit [Remote host closed the connection]
nomenkun has quit [Remote host closed the connection]
tjbiddle has joined #ruby
tjbiddle has quit [Client Quit]
karasawa has joined #ruby
jeffreybaird has quit [Quit: jeffreybaird]
EPIK has quit [Ping timeout: 255 seconds]
m4n has quit [Ping timeout: 256 seconds]
<TTilus> hemanth: judging by your questions it might be good to refresh the concepts of method call, variable and symbol literal
a_a_g has quit [Read error: Connection reset by peer]
a_a_g has joined #ruby
dankest is now known as dankest|away
arya has quit [Ping timeout: 248 seconds]
hackerdude has quit [Remote host closed the connection]
tagrudev has joined #ruby
angusiguess has quit [Ping timeout: 248 seconds]
xpen has joined #ruby
arya has joined #ruby
joeycarmello has joined #ruby
karasawa has quit [Ping timeout: 248 seconds]
Zespre has quit [Ping timeout: 244 seconds]
quest88 has quit [Quit: quest88]
dankest|away is now known as dankest
brain_shim_ has joined #ruby
brain_shim_ has quit [Quit: Leaving]
mercwithamouth has quit [Ping timeout: 255 seconds]
mockra has quit [Remote host closed the connection]
yacks has quit [Quit: Leaving]
karasawa has joined #ruby
DrShoggoth has quit [Quit: Leaving]
jonahR has quit [Quit: jonahR]
mockra has joined #ruby
m4n has joined #ruby
crazedpsyc has quit [Quit: ZNC - http://znc.in]
yshh has quit [Remote host closed the connection]
crazedpsyc has joined #ruby
karasawa has quit [Ping timeout: 256 seconds]
alexhq has quit [Quit: Page closed]
rezzack has quit [Quit: Leaving.]
a_a_g has quit [Read error: Connection reset by peer]
a_a_g has joined #ruby
Takehiro has quit [Remote host closed the connection]
incomplete has joined #ruby
apeiros_ has quit [Ping timeout: 264 seconds]
arya has quit [Ping timeout: 252 seconds]
bradhe has joined #ruby
arya has joined #ruby
jtgiri_ has joined #ruby
clocKwize has joined #ruby
epylinkn has left #ruby [#ruby]
jaequery has quit [Quit: Computer has gone to sleep.]
bradhe has quit [Ping timeout: 248 seconds]
ViPi has joined #ruby
slainer68 has joined #ruby
Solnse has joined #ruby
incomplete has left #ruby ["Leaving"]
alup has quit [Ping timeout: 248 seconds]
robustus has quit [Ping timeout: 248 seconds]
mockra has quit [Remote host closed the connection]
zommi has joined #ruby
robustus has joined #ruby
<dawkirst> Hi guys. New to Ruby (and programming in general). I'm trying to call a method every one minute. What is the best way to do this?
karasawa has joined #ruby
Dakuan has joined #ruby
<heftig> loop { foobar; sleep 60 }
<heftig> will execute foobar roughly every 60 seconds
<dawkirst> heftig, thanks. The rest of the program will execute though?
a_a_g has quit [Read error: Connection reset by peer]
a_a_g has joined #ruby
<heftig> what rest?
<heftig> that loop never ends
ViPi has quit [Quit: Computer has gone to sleep.]
<dawkirst> I mean code outside of that loop
<heftig> as i said, the loop never ends. whatever comes after is not executed
mdel has quit [Remote host closed the connection]
<dawkirst> ok
<dawkirst> thanks heftig
dhruvasagar has joined #ruby
<heftig> you can run the loop in another thread if you want parallel execution
answer_42 has joined #ruby
earthquake has quit [Quit: earthquake]
a_a_g has quit [Read error: Connection reset by peer]
<dawkirst> heftig, that might work better, any pointers?
a_a_g has joined #ruby
Phoop has joined #ruby
adeponte has quit [Remote host closed the connection]
generalissimo has quit [Remote host closed the connection]
<heftig> Thread.new
eldariof has joined #ruby
yshh has joined #ruby
kiyoura has quit [Quit: Leaving]
frihd has joined #ruby
yacks has joined #ruby
schaerli has joined #ruby
<dawkirst> thanks
stkowski has quit [Quit: stkowski]
mneorr has quit [Remote host closed the connection]
mahmoudimus has quit [Quit: Computer has gone to sleep.]
ViPi has joined #ruby
kmczn has quit [Quit: Page closed]
jds_ has joined #ruby
angusiguess has joined #ruby
ViPi has quit [Client Quit]
jackyalcine_ has joined #ruby
osaut has joined #ruby
sh00p has joined #ruby
robert__ has joined #ruby
robert__ has quit [Changing host]
robert__ has joined #ruby
az7ar has joined #ruby
a_a_g has quit [Read error: Connection reset by peer]
angusiguess has quit [Ping timeout: 246 seconds]
Dakuan has quit [Remote host closed the connection]
maletor has quit [Quit: Computer has gone to sleep.]
ChampS666 has joined #ruby
robert___ has quit [Ping timeout: 256 seconds]
a_a_g has joined #ruby
vlad_starkov has joined #ruby
ViPi has joined #ruby
ViPi has quit [Client Quit]
BizarreCake has joined #ruby
jduan1981 has quit [Quit: jduan1981]
a_a_g has quit [Read error: Connection reset by peer]
<sh00p> is it possible to reconfigure ERB somehow to format the output differently? i.e. instead of typing like this:
<sh00p> <% @drive_list.each do |drive| %>
<sh00p> And drive '<%= drive.name %>' has a drive IO with name '<%= drive.ioname %>'
<sh00p> <% end %>
<sh00p> i would type: <% @drive_list.each do |drive| %> And drive '<%= drive.name %>' has a drive IO with name '<%= drive.ioname %>' <% end %>
a_a_g has joined #ruby
vlad_starkov has quit [Ping timeout: 252 seconds]
chriskk has quit [Quit: chriskk]
<sh00p> but still get newlines that is
adeponte has joined #ruby
ananthakumaran1 has joined #ruby
ttt has joined #ruby
babonk has quit [Quit: babonk]
ananthakumaran has quit [Ping timeout: 248 seconds]
mafolz has joined #ruby
Morkel has joined #ruby
dhruvasagar has quit [Ping timeout: 256 seconds]
m4n has quit [Ping timeout: 244 seconds]
dhruvasagar has joined #ruby
a_a_g has quit [Read error: Connection reset by peer]
a_a_g has joined #ruby
frihd has quit [Quit: Leaving.]
az7ar has quit [Ping timeout: 264 seconds]
aganov has joined #ruby
bradhe has joined #ruby
yshh has quit [Read error: No route to host]
yshh_ has joined #ruby
frihd has joined #ruby
filipe has joined #ruby
marr has joined #ruby
frihd has quit [Client Quit]
jds_ has quit [Ping timeout: 248 seconds]
arya has quit [Ping timeout: 248 seconds]
ForSpareParts has quit [Read error: Connection reset by peer]
karasawa has quit [Ping timeout: 245 seconds]
blaxter has joined #ruby
a_a_g has quit [Read error: Connection reset by peer]
tPl0ch has joined #ruby
a_a_g has joined #ruby
SCommette has quit [Quit: SCommette]
dankest has quit [Quit: Leaving...]
slainer68 has quit [Remote host closed the connection]
swankier has joined #ruby
az7ar has joined #ruby
<swankier> I'm having a heck of a time getting the pagerduty handler for sensu working. Could anyone offer a tutorial or help?
chalky has joined #ruby
arya has joined #ruby
chalky has quit [Client Quit]
ViPi has joined #ruby
ephemerian has joined #ruby
dr_bob has joined #ruby
aaronmacy has joined #ruby
Takehiro has joined #ruby
pathou has joined #ruby
epicurus has quit [Ping timeout: 255 seconds]
az7ar has quit [Client Quit]
beliveyourdream has joined #ruby
bradhe has quit [Remote host closed the connection]
karasawa has joined #ruby
timmow has joined #ruby
a_a_g has quit [Read error: Connection reset by peer]
Takehiro has quit [Ping timeout: 256 seconds]
adeponte has quit [Remote host closed the connection]
a_a_g has joined #ruby
lkba has quit [Ping timeout: 256 seconds]
m4n has joined #ruby
wallerdev has quit [Quit: wallerdev]
zigomir has joined #ruby
arya has quit [Ping timeout: 252 seconds]
Eaven has quit [Read error: Connection reset by peer]
main has joined #ruby
samuel02 has joined #ruby
emergion has joined #ruby
_veer has quit [Read error: Connection reset by peer]
Eaven has joined #ruby
locriani_ has joined #ruby
karasawa has quit [Ping timeout: 256 seconds]
locriani has quit [Read error: Connection reset by peer]
browndawg has quit [Quit: Leaving.]
Hanmac_ has joined #ruby
arya has joined #ruby
timmow has quit [Ping timeout: 252 seconds]
SCommette has joined #ruby
a_a_g has quit [Quit: Leaving.]
jackyalcine_ has quit [Read error: Connection reset by peer]
jackyalcine_ has joined #ruby
Jacky has joined #ruby
jackyalcine has quit [Read error: No route to host]
noxoc has joined #ruby
mklappstuhl has joined #ruby
<mklappstuhl> Hey
ryanf has quit [Quit: leaving]
timonv has joined #ruby
<mklappstuhl> having a hash like {id: 1, name: "tom", street: "xy"} how would I easily transform that into {id: {:name: "tom", street: "xy"}} ?
karasawa has joined #ruby
apeiros_ has joined #ruby
elaptics`away is now known as elaptics
elaptics is now known as elaptics`away
emergion has quit [Quit: Computer has gone to sleep.]
etcetera has joined #ruby
mahmoudimus has joined #ruby
TheFuzzball has joined #ruby
ViPi has quit [Quit: Computer has gone to sleep.]
etcetera has quit [Client Quit]
SCommette has quit [Quit: SCommette]
jackyalcine_ has quit [Remote host closed the connection]
Jacky has quit [Read error: Connection reset by peer]
w|t has quit [Quit: Cya.]
clooth has joined #ruby
nomenkun has joined #ruby
karasawa has quit [Ping timeout: 255 seconds]
hoelzro|away is now known as hoelzro
yewton has quit [Excess Flood]
louisror has joined #ruby
pyro111 has joined #ruby
w|t has joined #ruby
yewton has joined #ruby
<Hanmac_> mklappstuhl hm something like that? key,values = hash.to_a.partition.with_index{|*,i| i==0}; {key[0][0] => Hash[values]}
angusiguess has joined #ruby
<Hanmac_> hm better: {:id => hash.select {|k,*| k != :id}}
andrewhl has quit [Remote host closed the connection]
Liothen has quit [Ping timeout: 244 seconds]
ViPi has joined #ruby
Dakuan has joined #ruby
Dakuan has quit [Read error: Connection reset by peer]
Dakuan has joined #ruby
jgrevich has quit [Quit: jgrevich]
jtgiri_ has quit [Quit: jtgiri_]
frihd has joined #ruby
ViPi has quit [Quit: Computer has gone to sleep.]
ngoldman has quit [Remote host closed the connection]
megha has joined #ruby
Dakuan has quit [Remote host closed the connection]
Dakuan has joined #ruby
megha is now known as hack
Dakuan has quit [Remote host closed the connection]
emocakes has joined #ruby
Elhu has joined #ruby
devtom has joined #ruby
devtom has quit [Client Quit]
Takehiro has joined #ruby
bradhe has joined #ruby
JaTochNietDan has joined #ruby
gyre008 has joined #ruby
sporkbomb has quit [Read error: Connection reset by peer]
sporkbomb has joined #ruby
arya has quit [Ping timeout: 264 seconds]
That-BRMatt has joined #ruby
mahmoudimus has quit [Quit: Computer has gone to sleep.]
EhyehAsherEhyeh has joined #ruby
bradhe has quit [Ping timeout: 240 seconds]
emergion has joined #ruby
arya has joined #ruby
razibog has joined #ruby
noxoc has quit [Quit: noxoc]
reinaldob has joined #ruby
Xeago has joined #ruby
blacktulip has joined #ruby
jds_ has joined #ruby
pathou has quit [Ping timeout: 245 seconds]
pcarrier has quit []
ChampS666 has quit [Ping timeout: 256 seconds]
Xeago has quit [Remote host closed the connection]
jds_ has quit [Ping timeout: 248 seconds]
k610 has joined #ruby
chussenot has joined #ruby
marr has quit [Ping timeout: 252 seconds]
nfk has joined #ruby
arya_ has joined #ruby
slainer68 has joined #ruby
arya has quit [Ping timeout: 255 seconds]
noxoc has joined #ruby
ViPi has joined #ruby
frytaz1_ has quit [Ping timeout: 260 seconds]
arya_ has quit [Ping timeout: 255 seconds]
robert___ has joined #ruby
robert___ has quit [Changing host]
robert___ has joined #ruby
piotr__ has quit [Ping timeout: 245 seconds]
Rydefalk has quit []
jimeh has joined #ruby
Rydefalk has joined #ruby
Rydefalk has quit [Client Quit]
Pufferfood has joined #ruby
alup has joined #ruby
robert__ has quit [Ping timeout: 252 seconds]
Vainoharhainen has joined #ruby
arya has joined #ruby
banisterfiend has joined #ruby
RagingDave has joined #ruby
gyre008 has quit [Read error: Connection reset by peer]
S1kx has joined #ruby
Pufferfood has quit []
Pufferfood has joined #ruby
Siavash has joined #ruby
<Siavash> hi all
pskosinski has joined #ruby
<Siavash> Is it possible to create a struct from an array of strings?
<apeiros_> yes
<tobiasvl> ANYTHING IS POSSIBLE IN RUBY
<heftig> ruby's successor will be called zombo
nari has quit [Ping timeout: 276 seconds]
* apeiros_ fails at that reference
<hoelzro> apeiros_: http://zombo.com/
<hoelzro> THE INFINITE IS POSSIBLE IN RUBY
<heftig> Struct.new(:foo, :bar, :baz).new(*["1","2","3"])
<Siavash> aha, "*" was the key :)
<apeiros_> lol
nomenkun_ has joined #ruby
nomenkun has quit [Ping timeout: 244 seconds]
<apeiros_> (the lol was @ zombo.com, just to be clear :-) )
tatsuya_o has joined #ruby
mikecmpbll has joined #ruby
elaptics`away is now known as elaptics
<Siavash> thanks
snearch has joined #ruby
angusiguess has quit [Ping timeout: 256 seconds]
az7ar has joined #ruby
snearch has quit [Client Quit]
poikon has joined #ruby
arya has quit [Ping timeout: 245 seconds]
karasawa has joined #ruby
[Neurotic] has quit [Read error: Connection reset by peer]
pathou has joined #ruby
arturaz has joined #ruby
arya has joined #ruby
joeycarmello has quit [Ping timeout: 248 seconds]
clj_newb has joined #ruby
clocKwize has quit [Quit: clocKwize]
wunz has quit [Read error: Operation timed out]
joeycarmello has joined #ruby
pathou has quit [Ping timeout: 245 seconds]
pcarrier has joined #ruby
Xeago has joined #ruby
clocKwize has joined #ruby
adambeynon has joined #ruby
bradhe has joined #ruby
maxmanders has joined #ruby
pcarrier has quit [Ping timeout: 246 seconds]
aaronmacy has quit [Quit: Leaving.]
snearch has joined #ruby
pcarrier has joined #ruby
Zespre has joined #ruby
wunz has joined #ruby
fyolnish has quit [Ping timeout: 255 seconds]
bradhe has quit [Ping timeout: 276 seconds]
paolooo has joined #ruby
marr has joined #ruby
JonnieCache has quit [Quit: Reconnecting]
JonnieCache has joined #ruby
nobitanobi has joined #ruby
timmow has joined #ruby
jpfuentes2 has quit [Quit: Computer has gone to sleep.]
megha has joined #ruby
clj_newb has quit [Ping timeout: 276 seconds]
<nobitanobi> Given a particular date, how can I find the previous date which day is "17" and the next date which day is "19" - So if I am in the 16th of January of 2013, I would like to get -> 17 of December of 2012 and 19th of January of 2013 - How can I do that with date?
hack has quit [Ping timeout: 264 seconds]
<hoelzro> nobitanobi: a naive but working solution would be to create a before date and after date object
<hoelzro> init before to yesterday, and after to tomorrow
arya has quit [Ping timeout: 255 seconds]
<hoelzro> decrement before by a day while its day is != 17
<hoelzro> and increment after by a day while its day is != 19
tPl0ch_ has joined #ruby
<nobitanobi> hoelzro: that's exactly how I am doing it :P
banisterfiend has quit [Remote host closed the connection]
<nobitanobi> thanks hoelzro..
<hoelzro> nobitanobi: so stick with it =)
<hoelzro> there are definitely more intelligent ways of doing it
mjbamford has joined #ruby
<hoelzro> but this approach is simple, clean, and most importantly, it works
dwu1 has quit [Quit: Leaving.]
hamed_r has joined #ruby
jenrzzz has quit [Ping timeout: 248 seconds]
<apeiros_> Date#+ and Date#-
<apeiros_> date = Date.today; yesterday = date-1; tomorrow = date+1
<apeiros_> @ nobitanobi & hoelzro
<apeiros_> oh, or did I misunderstand the question?
<apeiros_> hm, think so
<nobitanobi> apeiros_: yup :)
tPl0ch has quit [Ping timeout: 248 seconds]
<Xeago> apeiros_: I don't understand the question at all, hoelzro made it more vagye for me xD
<hoelzro> he wants the most recent date before today that has the day of the month == 16
<apeiros_> I'd use partial construction
<hoelzro> and the nearest date in the future after today that has hte day of the month == 19
beliveyourdream has quit [Ping timeout: 255 seconds]
snearch has quit [Quit: Verlassend]
<apeiros_> before, after = Date.civil(date.year, date.month, 17), Date.civil(date.year, date.month, 19)
<apeiros_> before << 1 if before > date; after >> 1 if after < date
yshh_ has quit [Remote host closed the connection]
<JonnieCache> hmm
<JonnieCache> you know its a good day when youve broken out wireshark before half 10 am
arya has joined #ruby
<apeiros_> <</>> subtracts/adds 1 month
<hoelzro> ugh
<hoelzro> apeiros_: that's a good solution
<nobitanobi> jesus
<nobitanobi> nice apeiros_
<hoelzro> I just don't like overriding <</>>
<hoelzro> ;)
<apeiros_> ?
<apeiros_> there's no overriding of <</>> involved…
workmad3 has joined #ruby
nkr has joined #ruby
gyre007 has joined #ruby
<hoelzro> apeiros_: what I meant to say is I don't care for when classes override <</>>
<hoelzro> Array, Date, etc
<apeiros_> I'm even more confused now :D
<hoelzro> (maybe a better choice of words would be "define")
<hoelzro> when I see <<, I think "bit shift"
<hoelzro> I don't like it to mean anything else
<apeiros_> aha
<hoelzro> it's a personal taste thing, forget I mentioned it =)
<apeiros_> think of months as binary numbers then ;-p
<nobitanobi> apeiros_: what would be "date" in your construction?
<apeiros_> nobitanobi: your original date
yshh has joined #ruby
<apeiros_> the one from which you want the relative dates you mentioned
b1rkh0ff has joined #ruby
arya has quit [Ping timeout: 244 seconds]
daniel_- has joined #ruby
baphled has joined #ruby
tPl0ch_ is now known as tPl0ch
<nobitanobi> apeiros_: thanks :)
yacks has quit [Remote host closed the connection]
beliveyourdream has joined #ruby
kjellski has joined #ruby
<JonnieCache> hoelzro: surely you dont mind `[] << :foo`
karasawa has quit [Ping timeout: 252 seconds]
<JonnieCache> so neat and clear
<hoelzro> I do
<JonnieCache> youre a monster
samuel02 has quit [Remote host closed the connection]
* JonnieCache thinks he should do more bitwise programming so he can look down on people more effectively
<hoelzro> I prefer named methods =)
arya has joined #ruby
samuel02 has joined #ruby
<JonnieCache> how about [1,2,3] += [4,5] does that upset you
<JonnieCache> or is it just binary operators
<hoelzro> JonnieCache: + is a binary operator ;)
<Xeago> hoelzro: not in the case of carry
<nobitanobi> apeiros_: the solution you gave actually doesn't do what I am looking for…If I give the today's date (23rd of January) it should give 17th of January and 19th of February. It gives both in January.
<hoelzro> Xeago: hmm?
<Xeago> binary operators don't do carry or overflow
<ninegrid> do people prefer heterogenous array instances or instances of multiple arrays? what are some common patterns for dealing with heterogenous arrays?
<JonnieCache> what exactly do you mean by hetrogenous here?
<hoelzro> JonnieCache: + for Arrays and Strings bug me, but method names are often too lengthy for String concatentation, and I don't think there's a method alternative for Array#+ (but I could very well be wrong)
<JonnieCache> all elements the same type?
<ninegrid> JonnieCache: elements of different type
<hoelzro> Xeago: are you referring to + here?
<JonnieCache> hoelzro: [].concat [] does the same as [] += [] assuming youre not concerned about object identity
<Xeago> hoelzro: yup
<hoelzro> JonnieCache: right, but array.concat new_array modifies array
<JonnieCache> hoelzro: thats what i said ;)
<hoelzro> whereas array + new_array does not, right?
<apeiros_> nobitanobi: right, made a mistake. dates are immutable.
<apeiros_> need to change the 2nd line to before <<= 1 if before > date; after >>= 1 if after < date
<Xeago> if overflow/carry is ignored it is a binary operation
samuel02 has quit [Ping timeout: 240 seconds]
<JonnieCache> ninegrid: in ruby it doesnt really matter if you mix types in an array
<hoelzro> Xeago: when I say "binary operator", I refer to operators that operate on two operands
az7ar has quit [Quit: Leaving]
<JonnieCache> ninegrid: can you be more specific about your problem?
<apeiros_> ninegrid: common pattern in ruby says "class doesn't matter, behavior does"
<Xeago> ah, I was thinking on a lower level :)
<ninegrid> JonnieCache: I understand that, but what are the common practices when dealing with elements of differing type... other than using shared method names
<nobitanobi> apeiros_: awesome.
<ninegrid> JonnieCache: I don't have a specific problem, just trying to gain some understanding...
<nobitanobi> So, taking advantage of this case, what is a good way to return two elements in a method? I usually use hashes
<apeiros_> ninegrid: and if by heterogenous you don't just refer to type/class, but also behavior relevant for your case, then I'd say: wtf? why?
<JonnieCache> ninegrid: have you heard of the term "duck typing?" because thats what youre basically discussing
<ninegrid> I have heard of that
<JonnieCache> well basically if everything in your array behaves in a common way then it doesnt matter what type it is
frihd has quit [Read error: Operation timed out]
<ninegrid> Then one would avoid persuing different types in a single array in the absence of duck typing?
frihd has joined #ruby
<JonnieCache> yeah. well in a strongly typed language like java you arent allowed to mix types in an array
<ninegrid> What i mean is, barring the obvious use like to_s, if there were no other shared method names, then you would avoid it
<ninegrid> I'm coming from ML
<JonnieCache> ninegrid: it would probably make sense to do so yes
<ninegrid> and haskell
<JonnieCache> there isnt a hard and fast reason why you shouldnt do it, its more one of those "if youre doing this then its a good sign you might be confused about the problem youre solving" type of things
<ninegrid> thanks for the help
<JonnieCache> np
<Hanmac_> ninegrid in ruby you can do this [:in, "ruby", 2,{},[], true, false, nil ] ... and then join it all together with join :P
reinaldob has quit [Remote host closed the connection]
<Hanmac_> or the enumerable module is a good sample for duck typing ... they functions do not care in what class they are included ... the object only needs an each method
<JonnieCache> ninegrid: generally in ruby you should get used to being able to do whatever insane thing you want, and shouldering the responsibility of deciding for yourself what is and isnt a good idea
<JonnieCache> (or ask someone here of course. the point is the language/interpreter wont decide for you)
<ninegrid> Hanmac_: but isnt that essentially concatenating to_s
yacks has joined #ruby
<Hanmac_> you mean with join? yea it uses an to_s method
nobitanobi has quit [Quit: Leaving.]
h8R has quit [Read error: Connection reset by peer]
megha has quit [Ping timeout: 252 seconds]
h8R has joined #ruby
arya has quit [Ping timeout: 255 seconds]
mrdtt has joined #ruby
timonv has quit [Read error: Connection reset by peer]
timonv has joined #ruby
paolooo has quit [Quit: Page closed]
arya has joined #ruby
baphled has quit [Ping timeout: 248 seconds]
banisterfiend has joined #ruby
swankier has quit [Quit: well, that was silly.]
reinaldob has joined #ruby
reinaldob has quit [Remote host closed the connection]
frihd has left #ruby [#ruby]
Maziz has quit [Quit: Maziz]
no_i_wont has quit [Quit: ZNC - http://znc.sourceforge.net]
reinaldob has joined #ruby
bradhe has joined #ruby
keanehsiao has joined #ruby
emaiax has joined #ruby
bradhe has quit [Ping timeout: 248 seconds]
hamed_r has quit [Ping timeout: 240 seconds]
berserkr has joined #ruby
Kakera has joined #ruby
robert__ has joined #ruby
robert__ has quit [Changing host]
robert__ has joined #ruby
vedarthk has joined #ruby
<vedarthk> I am not able to install pg gem in Ubuntu 12.10 stackoverflow question : http://stackoverflow.com/questions/14477825/not-able-to-install-pg-gem-on-ubuntu-12-10
<vedarthk> Can anyone guide me through this ?
<hoelzro> vedarthk: you need to install the pg client library
yshh has quit [Remote host closed the connection]
<hoelzro> and probably its headers too
<vedarthk> hoelzro I have already installed every package of postgresql available on Ubuntu
<hoelzro> I see
<hoelzro> interesting
<vedarthk> I have a list of installed packages on the question posted on stackoverflow
robert___ has quit [Ping timeout: 252 seconds]
grzywacz has joined #ruby
fyolnish_ has joined #ruby
nkts has joined #ruby
Takehiro has quit [Remote host closed the connection]
<workmad3> vedarthk: did you install libpq-dev ?
<workmad3> vedarthk: note, that's libpQ (lowercase)
<workmad3> ah, that's a yes
<vedarthk> yes
<workmad3> hmm, you have headers there, but it can't seem to link against the library
<vedarthk> yes
<workmad3> that's normally a build-chain issue
Michae___ has joined #ruby
wunz has quit [Ping timeout: 255 seconds]
banister_ has joined #ruby
<vedarthk> how can I solve that, I also tried with --with-pg-lib and --with-pg-include parameters
daniel_- has quit [Ping timeout: 252 seconds]
<vedarthk> but nothing cheanged
<vedarthk> *changed
<workmad3> you need to start by digging out the complete build logs from within rubygems
<workmad3> so that you can see the exact commands it was using
banister_ has quit [Read error: Connection reset by peer]
banister_ has joined #ruby
<vedarthk> Ok I will give it a shot
elico has joined #ruby
robert___ has joined #ruby
robert___ has quit [Changing host]
robert___ has joined #ruby
banisterfiend has quit [Ping timeout: 248 seconds]
Spooner has joined #ruby
emaiax has quit [Remote host closed the connection]
xpen has quit [Remote host closed the connection]
pavilionXP has quit [Read error: Connection reset by peer]
Maneta has joined #ruby
robert__ has quit [Ping timeout: 248 seconds]
hemanth has quit [Read error: Connection reset by peer]
hemanth has joined #ruby
telli has joined #ruby
verto|off is now known as verto
verto is now known as Guest52294
<Hanmac_> vedarthk the gem install sould make an mkmf.log file ... can you attach or pastie it?
timonv has quit [Ping timeout: 256 seconds]
tvw has joined #ruby
beiter has joined #ruby
Phoop has quit [Quit: Phoop]
banisterfiend has joined #ruby
timonv has joined #ruby
tPl0ch_ has joined #ruby
tastedancin has joined #ruby
banister_ has quit [Ping timeout: 256 seconds]
banisterfiend has quit [Read error: Connection reset by peer]
joiir has joined #ruby
joiir has left #ruby [#ruby]
banisterfiend has joined #ruby
BulleTime has joined #ruby
Michae___ has quit [Remote host closed the connection]
tPl0ch has quit [Ping timeout: 256 seconds]
fragmachine has joined #ruby
maximilianoo has joined #ruby
fyolnish_ has quit [Remote host closed the connection]
<fragmachine> hello
fyolnish has joined #ruby
puppeh has joined #ruby
mikecmpbll has quit [Quit: ["Textual IRC Client: www.textualapp.com"]]
ryanh has joined #ruby
mikecmpbll has joined #ruby
banisterfiend has quit [Ping timeout: 240 seconds]
Bry8Star has quit [Ping timeout: 276 seconds]
Kuifje has joined #ruby
banisterfiend has joined #ruby
banisterfiend has quit [Remote host closed the connection]
banisterfiend has joined #ruby
banister_ has joined #ruby
niklasb has joined #ruby
mklappstuhl has quit [Read error: Connection reset by peer]
Bry8Star has joined #ruby
banisterfiend has quit [Ping timeout: 256 seconds]
karasawa has joined #ruby
megha has joined #ruby
sullenel has joined #ruby
revenant has joined #ruby
Siavash has quit [Ping timeout: 248 seconds]
banisterfiend has joined #ruby
Playground has joined #ruby
<vedarthk> Hanmac_ i am not able to locate it
Playground has quit [Client Quit]
eddie_ has quit [Quit: Ex-Chat]
arya has quit [Ping timeout: 264 seconds]
banister_ has quit [Ping timeout: 252 seconds]
sullenel has quit [Quit: WeeChat 0.4.0]
elico has quit [Quit: elico]
arya has joined #ruby
tPl0ch__ has joined #ruby
bradhe has joined #ruby
Elhu has quit [Ping timeout: 252 seconds]
tPl0ch_ has quit [Ping timeout: 276 seconds]
hoelzro is now known as hoelzro|away
Elhu has joined #ruby
banister_ has joined #ruby
bradhe has quit [Ping timeout: 255 seconds]
wunz has joined #ruby
reinaldob has quit [Remote host closed the connection]
hoelzro|away is now known as hoelzro
banisterfiend has quit [Ping timeout: 264 seconds]
Eaven has quit [Remote host closed the connection]
reinaldob has joined #ruby
banister_ has quit [Ping timeout: 256 seconds]
revenant has quit [Ping timeout: 248 seconds]
karasawa has quit [Ping timeout: 255 seconds]
ViPi has quit [Quit: Computer has gone to sleep.]
BSaboia has joined #ruby
awarner has quit [Read error: Connection reset by peer]
Takehiro has joined #ruby
horofox has joined #ruby
awarner has joined #ruby
maz-dev__ has quit [Read error: Operation timed out]
hybris has joined #ruby
Takehiro_ has joined #ruby
Takehiro has quit [Read error: Connection reset by peer]
lkba has joined #ruby
v0n has joined #ruby
yshh has joined #ruby
tPl0ch__ is now known as tPl0ch
carloslopes has joined #ruby
pothibo has joined #ruby
karasawa has joined #ruby
yshh has quit [Ping timeout: 255 seconds]
banisterfiend has joined #ruby
griffindy has joined #ruby
arya has quit [Ping timeout: 252 seconds]
TomyLobo has joined #ruby
browndawg has joined #ruby
browndawg has quit [Client Quit]
enroxorz-work has quit [Quit: KVIrc 4.2.0 Equilibrium http://www.kvirc.net/]
banisterfiend has quit [Read error: Connection reset by peer]
timonv has quit [Read error: Connection reset by peer]
timonv has joined #ruby
banisterfiend has joined #ruby
arya has joined #ruby
maz-dev__ has joined #ruby
F1skr has joined #ruby
dustint has joined #ruby
dustint_ has joined #ruby
karasawa has quit [Ping timeout: 244 seconds]
banister_ has joined #ruby
zigomir has quit [Quit: zigomir]
buibex has joined #ruby
banisterfiend has quit [Ping timeout: 256 seconds]
fyolnish has quit [Remote host closed the connection]
banisterfiend has joined #ruby
recycle has joined #ruby
fyolnish has joined #ruby
mikecmpbll has quit [Quit: Computer has gone to sleep.]
kjellski has quit [Quit: Leaving]
zigomir has joined #ruby
timonv has quit [Read error: Connection reset by peer]
banister_ has quit [Ping timeout: 256 seconds]
timonv has joined #ruby
banisterfiend has quit [Read error: Connection reset by peer]
banisterfiend has joined #ruby
bluenemo has joined #ruby
bluenemo has quit [Changing host]
bluenemo has joined #ruby
emergion has quit [Quit: Computer has gone to sleep.]
banisterfiend has quit [Read error: Connection reset by peer]
Solnse has quit [Ping timeout: 248 seconds]
karasawa has joined #ruby
ryanh has quit [Quit: Computer has gone to sleep.]
banisterfiend has joined #ruby
waxjar has quit [Read error: Operation timed out]
waxjar has joined #ruby
recycle has quit [Remote host closed the connection]
v0n has quit [Read error: Operation timed out]
karasawa has quit [Ping timeout: 248 seconds]
phinfonet has joined #ruby
blaxter has quit [Ping timeout: 246 seconds]
_bart has quit [Quit: _bart]
mikecmpbll has joined #ruby
reinaldob has quit [Remote host closed the connection]
pcarrier has quit []
hamed_r has joined #ruby
god has joined #ruby
god is now known as halph
This-BRMatt has joined #ruby
banisterfiend has quit [Ping timeout: 248 seconds]
BSaboia__ has joined #ruby
griffindy has quit [Quit: Computer has gone to sleep.]
bradhe has joined #ruby
maz-dev__ has quit [Remote host closed the connection]
tatsuya_o has quit [Ping timeout: 252 seconds]
That-BRMatt has quit [Ping timeout: 248 seconds]
BSaboia has quit [Ping timeout: 248 seconds]
louisror has quit [Ping timeout: 246 seconds]
bradhe has quit [Ping timeout: 264 seconds]
vedarthk has quit [Quit: Leaving]
sailias has joined #ruby
tPl0ch_ has joined #ruby
banisterfiend has joined #ruby
pcarrier has joined #ruby
mark_locklear has joined #ruby
dfyuij has joined #ruby
gyre008 has joined #ruby
gyre008 has quit [Remote host closed the connection]
sclarson_ has joined #ruby
buibex has quit [Remote host closed the connection]
pnkbst` has joined #ruby
blaxter has joined #ruby
iPhoneMRZ has joined #ruby
iPhoneMRZ has quit [Client Quit]
tPl0ch has quit [Ping timeout: 248 seconds]
adkron_ has quit [Ping timeout: 256 seconds]
adkron has quit [Ping timeout: 256 seconds]
pnkbst has quit [Ping timeout: 256 seconds]
banisterfiend has quit [Ping timeout: 255 seconds]
samuel02 has joined #ruby
mmitchell has joined #ruby
banisterfiend has joined #ruby
k610 has quit [Quit: Leaving]
banisterfiend has quit [Read error: Connection reset by peer]
banisterfiend has joined #ruby
keanehsiao has quit [Quit: keanehsiao]
dustint has quit [Remote host closed the connection]
tatsuya_o has joined #ruby
banisterfiend has quit [Read error: Connection reset by peer]
banisterfiend has joined #ruby
<Hanmac_> shevy ubuntu will get rolling releases :P
taoru has quit [Remote host closed the connection]
tastedancin has quit [Quit: tastedancin]
Playground has joined #ruby
EPIK has joined #ruby
robotmay has joined #ruby
<Spaceghost|cloud> Hanmac_: It will?
x0F has quit [Disconnected by services]
x0F_ has joined #ruby
robert__ has joined #ruby
robert__ has quit [Changing host]
robert__ has joined #ruby
x0F_ is now known as x0F
<phinfonet> Hi
<phinfonet> i need to do an object serialization, how i can do it with pure ruby?
<phinfonet> i need to "filter" values by key like it
<phinfonet> object.each do |value|
tPl0ch_ has quit [Ping timeout: 248 seconds]
<phinfonet> value.key
<phinfonet> edn
<phinfonet> *end
<phinfonet> how i can do it?
banisterfiend has quit [Remote host closed the connection]
sailias has quit [Quit: Leaving.]
arya has quit [Ping timeout: 246 seconds]
<Hanmac_> " object serialization" can be done with Marshal.dump
ovatsug25 has joined #ruby
<phinfonet> but i can do it up?
vlad_starkov has joined #ruby
buibex has joined #ruby
allsystemsarego has joined #ruby
drago757 has joined #ruby
<phinfonet> i just need to do an each like rails
MattRB has joined #ruby
<phinfonet> i'm trying it with a mongoDB hash
robert___ has quit [Ping timeout: 260 seconds]
<Spaceghost|cloud> Hanmac_: Nifty. I'll read it, but wait for some Canonical person to pipe up on the subject like they always do.
<waxjar> phinfonet, do you just want to iterate over a Hash?
joofsh has joined #ruby
rmartin has joined #ruby
phinfonet has quit [Read error: Connection reset by peer]
xemu has joined #ruby
phinfonet has joined #ruby
arya has joined #ruby
mva3212 has quit [Read error: Operation timed out]
ishtu has joined #ruby
tomzx_mac has joined #ruby
recycle has joined #ruby
ryanh has joined #ruby
niklasb has quit [Quit: WeeChat 0.3.9.2]
sambio has joined #ruby
arya_ has joined #ruby
<ishtu> hello mates! plz advise first reading for ruby newcomer. The main aim is system administration with chef
sepp2k has joined #ruby
arya has quit [Ping timeout: 255 seconds]
tommyvyo has joined #ruby
jfl0wers has joined #ruby
b1rkh0ff has quit [Ping timeout: 256 seconds]
pcarrier has quit []
tPl0ch_ has joined #ruby
moos3 has joined #ruby
recycle_ has joined #ruby
recycle has quit [Read error: Connection reset by peer]
mjolk_afk is now known as mjolk
io_syl has quit [Quit: Computer has gone to sleep.]
daniel_- has joined #ruby
ishtu has left #ruby [#ruby]
pcarrier has joined #ruby
recycle_ has quit [Remote host closed the connection]
allanm_ has quit [Read error: Connection reset by peer]
arya_ is now known as arya
ttt has quit [Remote host closed the connection]
jonahR has joined #ruby
earthquake has joined #ruby
moos3 has quit [Quit: Computer has gone to sleep.]
VanM has joined #ruby
pcarrier has quit [Ping timeout: 246 seconds]
pu22l3r has joined #ruby
pu22l3r has quit [Read error: Connection reset by peer]
pu22l3r has joined #ruby
pcarrier has joined #ruby
brandon|work has quit [Ping timeout: 248 seconds]
b1rkh0ff has joined #ruby
SKEPTIC has joined #ruby
<SKEPTIC> how can i get payment via cardit card on my site?
tastedancin has joined #ruby
clocKwize has quit [Quit: clocKwize]
<Spooner> SKEPTIC, #rubyonrails
wreckimnaked has joined #ruby
sclarson_ has quit [Quit: sclarson_]
sclarson_ has joined #ruby
griffindy has joined #ruby
clocKwize has joined #ruby
sclarson_ has quit [Client Quit]
ninp0 has quit [Ping timeout: 255 seconds]
jrajav has joined #ruby
baphled has joined #ruby
<phinfonet> i need to do object serialization in pure ruby, anyone can help-me?
dhruvasagar has quit [Ping timeout: 256 seconds]
bradhe has joined #ruby
yshh has joined #ruby
MattRB has quit [Quit: This computer has gone to sleep]
<apeiros_> phinfonet: you're a bit low on information
<phinfonet> i've an db query
SKEPTIC has left #ruby [#ruby]
<phinfonet> that find my fields
<phinfonet> but i'm using mongoDB
<phinfonet> and i receive a bson object
<phinfonet> i just need to do it:
buibex has quit [Remote host closed the connection]
<apeiros_> (sorry, work interrupted, will be back soon)
<phinfonet> object.each do |value|
segv- has joined #ruby
<phinfonet> value.field_name
<phinfonet> end
buibex has joined #ruby
statarb3 has joined #ruby
Uranio has joined #ruby
zigomir has quit [Quit: zigomir]
bradhe has quit [Ping timeout: 256 seconds]
earthquake has quit [Quit: earthquake]
uris has joined #ruby
brandon|work has joined #ruby
aquaranto has joined #ruby
ananthakumaran1 has quit [Quit: Leaving.]
<Hanmac_> shevy ping
karasawa has joined #ruby
Coolhand|laptop has joined #ruby
uris has quit [Client Quit]
uris has joined #ruby
ffranz has joined #ruby
<shevy> hey
Neomex has joined #ruby
shorts has left #ruby [#ruby]
Neomex has quit [Client Quit]
aquaranto has quit [Remote host closed the connection]
kayloos has joined #ruby
v0n has joined #ruby
postmodern has quit [Quit: Leaving]
breakingthings has joined #ruby
aquaranto has joined #ruby
dougireton has joined #ruby
<Hanmac_> shevy do you think that my archive gem need the low functions ? like Archive.write(path) {|ar| ar.write_entry(); ar.write_data() } and similar stuff or do you think that they are unwanted?
s__dana_ has joined #ruby
<shevy> dunno. if you can add stuff to the archive via << then I suppose you wont need these three methods
<shevy> it's also a bit confusing. what is the difference for a user between .write and << of your gem?
Zespre has quit [Read error: Connection reset by peer]
jtharris has joined #ruby
solidoodlesuppor has joined #ruby
robotmay has quit [Ping timeout: 248 seconds]
_bart has joined #ruby
s__dana has quit [Ping timeout: 255 seconds]
s__dana_ is now known as s__dana
<Spooner> phinfonet, I am not sure. try ["field_name"] or [:field_name
<Hanmac_> currently << "path" opens the archive, stores its data in an array of strings, add the file from the << to the array, and then write it back to the archive ... while the class method write wouldnot store anything
<phinfonet> ok
pu22l3r has quit [Remote host closed the connection]
pu22l3r has joined #ruby
mengu has joined #ruby
<phinfonet> thaks Spooner
_nitti has joined #ruby
<phinfonet> i was tried it like rails
<phinfonet> hehe
<Spooner> phinfonet, value["field_name"] I guess was right?
<apeiros_> phinfonet: did your question get solved in the meantime?
<phinfonet> yes
<phinfonet> thanks Spooner and apeiros_
VanM has quit [Quit: Leaving]
d2dchat has joined #ruby
nari has joined #ruby
bluenemo has quit [Read error: Operation timed out]
MattRB has joined #ruby
robotmay has joined #ruby
Coolhand has quit [Remote host closed the connection]
s__dana_ has joined #ruby
geekbri has joined #ruby
lusory has quit [Quit: leaving]
invisime has joined #ruby
schaerli has quit [Remote host closed the connection]
Playground has quit [Ping timeout: 276 seconds]
Kakera has quit [Ping timeout: 248 seconds]
freeayu has quit [Remote host closed the connection]
thomasfedb has quit [Ping timeout: 244 seconds]
invisime has left #ruby [#ruby]
sayan has joined #ruby
sayan has quit [Changing host]
sayan has joined #ruby
s__dana has quit [Ping timeout: 256 seconds]
s__dana_ is now known as s__dana
EPIK has quit [Ping timeout: 256 seconds]
osaut has quit [Quit: osaut]
Neomex has joined #ruby
tagrudev has quit [Remote host closed the connection]
<Mo0O> hello
_nitti has quit [Remote host closed the connection]
<Mo0O> I'm trying to install gitlab, so in the install proccess I need to run the following : sudo -u gitlab bundle exec rake environment resque:work QUEUE=* RAILS_ENV=production BACKGROUND=yes
jean-louis has joined #ruby
<Mo0O> but it return : rake aborted!
<Mo0O> Don't know how to build task 'resque:work'
<Mo0O> somebody know how to fix it ?
jerius has joined #ruby
<Hanmac_> shevy i think first i add the other nice functions ... its a killer feature for my version of libarchive gem that you DONT need to call the low functions :P
<JonnieCache> Mo0O: are you running it from the right directory?
arya has quit [Ping timeout: 248 seconds]
<dr_neek> Mo0O: Did you bundle install?
blazes816 has quit [Quit: blazes816]
drago757 has quit [Quit: drago757]
thomasfedb has joined #ruby
<rmartin> Mo0O: Did you require 'resque/tasks' in your Rakefile?
jrist-afk is now known as jrist
zph has joined #ruby
lusory has joined #ruby
buibex has quit []
speckz has joined #ruby
nari has quit [Ping timeout: 248 seconds]
poikon has quit [Remote host closed the connection]
<Mo0O> JonnieCache: yes I'm in the right directory ;)
<Mo0O> dr_neek: yes I bundle install
<Mo0O> rmartin: no I didn't equire 'resque/tasks' in my Rakefile
baroquebobcat has joined #ruby
<rmartin> try that and let me know
sailias has joined #ruby
_nitti has joined #ruby
<Mo0O> ok, I try right now :)
karasawa has quit [Ping timeout: 248 seconds]
maz-dev has joined #ruby
telli has quit [Remote host closed the connection]
daniel_- has quit [Ping timeout: 248 seconds]
<Mo0O> rmartin: cannot load such file -- resque/tasks
<speckz> Hi! I hope somone can help m,e. I'm trying to install vines as per https://gist.github.com/4606967 but it comploains about needing >= 1.9.2 but according to what I see I have 1.9.3p0.
Maziz has joined #ruby
<rmartin> Mo0O: if you do a "gem list" do you see resque listed there?
<speckz> eregon, errors https://gist.github.com/4606967 install as per @ http://www.getvines.org/ruby/
stopbit has joined #ruby
browndawg has joined #ruby
browndawg has quit [Max SendQ exceeded]
asteve has joined #ruby
browndawg has joined #ruby
BulleTime has quit [Ping timeout: 256 seconds]
<dawkirst> hi guys, super silly question: I'm trying to get Ruby to print 'foo' to the console, but I'm not seeing anything in my console (I'm on Ubunutu 12.04). Any ideas?
<Mo0O> rmartin: no, so I think I need to install it ;)
browndawg has quit [Max SendQ exceeded]
<Muz> dawkirst: what are you executing?
arkiver has quit [Ping timeout: 248 seconds]
<rmartin> Mo0O: yes :) then do the require in you're Rakefile and should be ready to go. Regards!
samphippen has joined #ruby
<Hanmac_> dawkirst did you run ruby directly or something like irb?
<rmartin> Mo0O: *your Rakefile
<Mo0O> rmartin: thanks a lot
browndawg has joined #ruby
<dawkirst> Muz, puts "foo!\n"
<dawkirst> Hanmac, in terminal 'ruby foo.rb'
<rmartin> Mo0O: no prob.
jaequery has joined #ruby
biello has joined #ruby
Playground has joined #ruby
<Hanmac_> dawkirst in that chase it should be wisible ...
Neomex has quit [Quit: Neomex]
quest88 has joined #ruby
_bart has quit [Quit: _bart]
<dawkirst> Hanmac_, any idea how I can debug?
<Hanmac_> dawkirst can you make a gist or pastie of the foo.rb? i am not sure if ruby reaches the puts line
digifiv5e has joined #ruby
<dawkirst> Hanmac_, it definitely does, it's the first line :p
<dawkirst> brb
drfreeze_ has joined #ruby
<dawkirst> Hanmac_, restart of terminal did the trick
carlzulauf has quit [Ping timeout: 256 seconds]
mikecmpbll has quit [Quit: ["Textual IRC Client: www.textualapp.com"]]
drfreeze has quit [Ping timeout: 248 seconds]
tomzx_mac has quit [Ping timeout: 276 seconds]
spexx has joined #ruby
mikecmpbll has joined #ruby
cha1tanya has joined #ruby
cha1tanya has quit [Changing host]
cha1tanya has joined #ruby
carlzulauf has joined #ruby
zigomir has joined #ruby
interactionjaxsn has joined #ruby
spexx has left #ruby [#ruby]
speckz has quit [Read error: Operation timed out]
Dataholic has joined #ruby
ttt has joined #ruby
x82_nicole has joined #ruby
ner0x has joined #ruby
gyre007 has quit [Remote host closed the connection]
brunosaboia__ has joined #ruby
clocKwize has quit [Quit: clocKwize]
andrew has joined #ruby
andrew is now known as Guest42701
x82_nicole has quit [Max SendQ exceeded]
Guest42701 has left #ruby [#ruby]
This-BRMatt has quit [Ping timeout: 248 seconds]
x82_nicole has joined #ruby
Guest42701 has joined #ruby
Guest42701 has left #ruby [#ruby]
louisror has joined #ruby
bradhe has joined #ruby
jeffreybaird has joined #ruby
jaequery has quit [Quit: Computer has gone to sleep.]
arturaz has quit [Ping timeout: 256 seconds]
gyre007 has joined #ruby
BSaboia__ has quit [Ping timeout: 276 seconds]
dawkirst has quit [Remote host closed the connection]
mercwithamouth has joined #ruby
fragmachine has quit [Ping timeout: 252 seconds]
__BigO__ has joined #ruby
x82_nicole has quit [Ping timeout: 246 seconds]
pothibo has quit [Quit: pothibo]
nateberkopec has joined #ruby
bradhe has quit [Ping timeout: 248 seconds]
ttt has quit [Ping timeout: 276 seconds]
blaxter has quit [Ping timeout: 246 seconds]
ananthakumaran has joined #ruby
blaxter|2 has joined #ruby
Jackneill_ has joined #ruby
carlzulauf has quit [Ping timeout: 248 seconds]
quest88 has quit [Quit: quest88]
jeffreybaird has left #ruby [#ruby]
hamed_r has quit [Quit: Leaving]
jrist is now known as jrist-mtg
carlzulauf has joined #ruby
MattRB has quit [Quit: This computer has gone to sleep]
jaequery has joined #ruby
joofsh has quit [Remote host closed the connection]
_nitti has quit [Remote host closed the connection]
fragmachine has joined #ruby
sharms has joined #ruby
generalissimo has joined #ruby
nomenkun_ has quit [Remote host closed the connection]
manifold has joined #ruby
blaxter|2 is now known as blaxter
dougireton has quit [Quit: Leaving.]
jeffreybaird_ has joined #ruby
jlast has joined #ruby
dougireton has joined #ruby
moos3 has joined #ruby
jeffreybaird_ has left #ruby [#ruby]
pjackson has quit [Quit: http://quassel-irc.org - Chat comfortably. Anywhere.]
arya has joined #ruby
m4n has quit [Read error: Operation timed out]
sayan has quit [Read error: Connection reset by peer]
SCommette has joined #ruby
joofsh has joined #ruby
baphled has quit [Ping timeout: 256 seconds]
philcrissman has joined #ruby
arya has quit [Ping timeout: 248 seconds]
autumn has quit [Ping timeout: 272 seconds]
autumn has joined #ruby
Maneta has quit [Remote host closed the connection]
<manifold> Is it possible to substitute my system ruby with rvm ruby? I want to deal with only one implementation of ruby. I have tried to remove system ruby but failed, because it has dependants.
tk_ has quit [Quit: ばいばい]
jrist-mtg is now known as jrist
emocakes has quit [Quit: emocakes]
phantasm66 has joined #ruby
phantasm66 has joined #ruby
phantasm66 has quit [Changing host]
v0n has quit [Quit: WeeChat 0.4.0]
chussenot has quit [Quit: chussenot]
schaerli has joined #ruby
maxmanders has quit [Quit: Computer has gone to sleep.]
<Hanmac_> manifold there should be a few lines that should be added into .bashrc ...
Kakera has joined #ruby
maxmanders has joined #ruby
timonv has quit [Read error: Connection reset by peer]
browndawg has quit [Quit: Leaving.]
timonv_ has joined #ruby
arya has joined #ruby
stayarrr has joined #ruby
chussenot has joined #ruby
dougireton has quit [Quit: Leaving.]
_nitti has joined #ruby
zommi has left #ruby [#ruby]
<manifold> Hanmac_ I haven't found anything
jlast_ has joined #ruby
jlast has quit [Read error: Connection reset by peer]
<Hanmac_> a good point for the first look is there : https://rvm.io/integration/gnome-terminal/
fourq has joined #ruby
<daxroc> Evening all
<daxroc> Whats a portable way to hide the stdout of a system call?
joshman_ has joined #ruby
<Spooner> daxroc, Use: output = `command`
<daxroc> result = system "ruby -c #{current_file} > /dev/null" but this would neglect windows users.
<hoelzro> or use the redirection options
<hoelzro> (see Kernel.spawn)
inokenty has joined #ruby
jlast_ has quit [Read error: Connection reset by peer]
theRoUS has joined #ruby
theRoUS has joined #ruby
jlast has joined #ruby
gyre007 has quit [Remote host closed the connection]
<Hanmac_> i sometimes do STDOUT.reopen(File::NULL)
failshell has joined #ruby
greenarrow has quit [Quit: IRC is just multiplayer notepad]
jlast has quit [Remote host closed the connection]
<Hanmac_> (ok its a lie, i often do STDERR.reopen("crash.log"))
greenarrow has joined #ruby
jtgiri_ has joined #ruby
baroquebobcat has quit [Quit: baroquebobcat]
Roa has quit [Ping timeout: 245 seconds]
carlzulauf has quit [Ping timeout: 240 seconds]
rapha has joined #ruby
<rapha> Hi!
Neomex has joined #ruby
Neomex has quit [Client Quit]
<hoelzro> rapha: howdy
<rapha> How can I match a character in a regexp that when printed in irb presents itself as "\u001F"?
cha1tanya has quit [Quit: Leaving]
baphled has joined #ruby
Roa has joined #ruby
Roa has quit [Changing host]
Roa has joined #ruby
<daxroc> Hanmac_: how would you resume normal output?
aedornm has joined #ruby
carlzulauf has joined #ruby
zer0bytes has joined #ruby
<hoelzro> >> puts("\u001F" =~ /\u001F/)
<eval-in> hoelzro: Output: "0\n" (http://eval.in/7421)
<hoelzro> rapha: that seems to work
<rapha> hmm wierd ... let me try again
kpshek has joined #ruby
_nitti has quit [Remote host closed the connection]
v0n has joined #ruby
waxjar has quit [Ping timeout: 255 seconds]
<Hanmac_> daxroc, orginal = STDOUT.dup ..... STDOUT.reopen(orginal)
jfl0wers has quit [Quit: jfl0wers]
<Hanmac_> (but i often use it only with STDERR because when my stuff crashs i get more output than i can scroll)
sayan has joined #ruby
<hoelzro> can't you just do something like system args, :redirection => { 1 => :close }?
etcetera has joined #ruby
<hoelzro> I'm not sure of the exact syntax, but that's what the documentation seems to indicate
<daxroc> Hanmac_: nice, appreciate it
<rapha> hoelzro: looks like the rest of my regexp is the problem. The string is blahblahblah\u001Fblahblahblah\u001Fblahblahblah and i want to get the first part before the control char and the part after that. so i said .match(/(.*)\u001F(.*)\u001F/)[0].to_s - am I using the groups incorrectly?
baphled has quit [Ping timeout: 264 seconds]
baphled has joined #ruby
<aedornm> rapha: use .*?
<aedornm> Otherwise that regex will match to the last occuring \u001F
etcetera has quit [Client Quit]
kayloos has quit [Quit: kayloos]
rippa has joined #ruby
kayloos has joined #ruby
carloslopes has quit [Remote host closed the connection]
<Spooner> rapha, Your regexp is fine, but you want to use 1 and 2, not 0 and 1 to get the strings out.
arturaz has joined #ruby
<aedornm> oh I guess there's two in there... man I need a new font
<Hanmac_> hm you also could do string.split("\u001F")
<rapha> Spooner: I still get the whole string...
chrismhough has joined #ruby
<rapha> Hanmac_: good idea, the regexps are actually overkill for this :)
<Spooner> rapha, You don't. You get the whole string for match[0], but not for match[1] or match[2]
puppeh has quit [Remote host closed the connection]
<Spooner> rapha, Remember that if you aren't using Match objects, you use $1 and $2, not $0.
thillux has joined #ruby
waxjar has joined #ruby
<rapha> Spooner: didn't know that, thanks! :)
<Hanmac_> rapha you could also do match().captures
wallerdev has joined #ruby
<Spooner> rapha, So your regexp is fine, but as others said, a simple split would do it as well.
<Hanmac_> >> print "blahblahblahA\u001FblahblahblahB\u001Fblahblahblah".match(/(.*)\u001F(.*)\u001F/).captures
<eval-in> Hanmac_: Output: "[\"blahblahblahA\", \"blahblahblahB\"]" (http://eval.in/7422)
hydrozen has joined #ruby
kaen has joined #ruby
woolite64 has joined #ruby
<aedornm> oh good, I can read again now. Going blind is very counter productive for IRC.
<chiel> hm.. when doing require 'class', do the contents of the file get executed every single time, or only the first time?
<Spooner> chiel, require works once. #load runs every time.
<chiel> hm ok, i thought so
<chiel> in that case i am even more confused :D
x82_nicole has joined #ruby
<Hanmac_> >> print "blahblahblahA\u001FblahblahblahB\u001FblahblahblahC".scan(/[^\u001F]+/)
<eval-in> Hanmac_: Output: "[\"blahblahblahA\", \"blahblahblahB\", \"blahblahblahC\"]" (http://eval.in/7423)
stayarrr has quit [Quit: Leaving...]
<lectrick> If I use Regexp#match(string), how do I get ALL the grouped matches and not just the first one? There are multiple matches in this one-line string and it's only returning the first one.
alex__c2022 has joined #ruby
_nitti has joined #ruby
<Spooner> lectrick, Use scan, as Hanmac_ just described :D
baphled has quit [Read error: Connection reset by peer]
<lectrick> Spooner: oh wow. same wavelength. nice. ty
tPl0ch_ has quit [Quit: Verlassend]
Takehiro_ has quit [Remote host closed the connection]
autumn has quit [Quit: Bye~ xo]
mikepack has joined #ruby
<chiel> hm.. i get the feeling Pow is messing with my mind
<chiel> for every request it seems to spawn two workers
Dataholic has quit [Quit: Lost terminal]
autumn has joined #ruby
alex__c2022 has quit [Read error: Connection reset by peer]
dr_bob has quit [Quit: Leaving.]
volk_ has joined #ruby
<chiel> i get "DEBUG nack worker 3632 spawned", "DEBUG nack worker exited", "DEBUG nack worker 3690 spawned", "DEBUG nack worker exited"
<chiel> i don't understand.
<volk_> does anybody here use the draper gem? wondering what the difference would be between python decorator and draper besides the fact that the python decorator is built into the language
<Hanmac_> Spooner imo there should be an require_into or load_into ... like a file is "class A;end" and you do module B; require_into file, binding;end you get B::A
baphled has joined #ruby
alex__c2022 has joined #ruby
thinkclay has joined #ruby
lolmaus has quit []
GeekSir has joined #ruby
dr_bob has joined #ruby
<Spooner> Hanmac, That would be nice, certainly.
Lynx_Eyes has joined #ruby
thinkclay has quit [Client Quit]
sh00p has quit [Remote host closed the connection]
DaZ has quit [Ping timeout: 260 seconds]
<chiel> hm yeah, this definitely looks like a Pow thing, with thin it only shows the log messages once
<chiel> weird.
<chiel> i guess it's to do with the always_restart mechanic.
GeekSir has left #ruby [#ruby]
jlast has joined #ruby
<chiel> no idea why it needs to spawn two workers for that though
<Hanmac_> Spooner & shevy: it can be mimic'd with module B; binding.eval(File.read(path));end, but an require command would be more nice ..
<shevy> ack
<shevy> EVAL
etcetera has joined #ruby
<Hanmac_> shevy its more evil ... its a binding.eval :D
io_syl has joined #ruby
reinaldob has joined #ruby
bradhe has joined #ruby
<ericwood> >> eval("p 'evalllll'")
<eval-in> ericwood: Output: "\"evalllll\"\n" (http://eval.in/7424)
autumn has quit [Quit: Bye~ xo]
snearch has joined #ruby
kayloos has quit [Quit: kayloos]
grzywacz has quit [Quit: :wq]
<Hanmac_> (PS: an load or require is similar to an eval(File.read(path)) so whatever)
otters has joined #ruby
autumn has joined #ruby
jfl0wers has joined #ruby
amaya_the has joined #ruby
<amaya_the> :(
syamajala has joined #ruby
Virunga has joined #ruby
pcarrier has quit [Ping timeout: 246 seconds]
manifold has quit [Quit: Leaving]
Takehiro has joined #ruby
bradhe has quit [Ping timeout: 256 seconds]
<Hanmac_> hm... imo an module or a class should allow an Mod.binding where you can access the inner binding of the Mod ... (Mod.send(:binding) is still the toplevel binding)
robbyoconnor has quit [Ping timeout: 256 seconds]
<lectrick> Spooner/Hanmac_ : Is there a way to do (?>some_pattern) in a non-capturing fashion?
enebo has joined #ruby
alv-r- has joined #ruby
clj_newb has joined #ruby
<shevy> one day we will overcome the class vs. module distinction
<shevy> in ruby 5.0
<davidcelis> >> puts `ls -a`
<eval-in> davidcelis: Output: "" (http://eval.in/7425)
<davidcelis> :(
maxmanders has quit [Quit: Computer has gone to sleep.]
<Hanmac_> >> puts Dir["*"]
<eval-in> Hanmac_: Output: "output-8a5701434649\nsource-8a5701434649\ninput-8a5701434649\n" (http://eval.in/7426)
<Spooner> lectrick, (?: ) is a non-capturing group, useful if you want to use | for example.
<lectrick> Spooner: But I want an atomic group, that is not captured
<davidcelis> >> require 'fileutils'; puts FileUtils.pwd;
<eval-in> davidcelis: Output: "/tmp/execpad-649cfbfd9f85\n" (http://eval.in/7427)
<lectrick> So (?> ) is atomic, but I believe it is captured
<davidcelis> >> require 'fileutils'; puts FileUtils.pwd;
<eval-in> davidcelis: Output: "/tmp/execpad-8eef398aa7d5\n" (http://eval.in/7428)
<davidcelis> new every time
daniel_- has joined #ruby
Lynx_Eyes has quit [Quit: Leaving]
<Spooner> lectrick, Sorry, then I don't know what you mean by an atomic group then.
<Hanmac_> shevy make an fork of ruby and then a pull request (or a feature request in general) :P
robbyoconnor has joined #ruby
<shevy> Hanmac_ nah that will never work. it will always need approval by matz
joofsh has quit [Remote host closed the connection]
<shevy> if matz says no, it would be wasted work
syamajala has quit [Quit: leaving]
baroquebobcat has joined #ruby
jeffreybaird has joined #ruby
<shevy> making a new language is even more work :(
<Spooner> shevy, Just for Ruby into another language then. Call it Shuby!
eldariof has quit [Ping timeout: 244 seconds]
maxmanders has joined #ruby
Virunga has quit [Remote host closed the connection]
<shevy> lol
<shevy> sounds like a salt n pepper song
schaerli has quit [Remote host closed the connection]
joofsh has joined #ruby
dankest has joined #ruby
<aedornm> aww Reia is apparently a dead project
blazes816 has joined #ruby
Takehiro has quit [Read error: Connection reset by peer]
etcetera has quit []
carloslopes has joined #ruby
ddd has joined #ruby
<ner0x> Is there a way to, in one line, do three things and return an array of it?
<hoelzro> ner0x: why do you need to do it in a line?
<ner0x> users = 3.times { create('user') } # something similar.
<shevy> ner0x may be, if you use () perhaps
<ner0x> hoelzro: I don't *have* to but it's in a rspec let so I'd like to.
<ner0x> If I can't, I'm okay with it.
<ner0x> Just seeing what my options are.
robbyoconnor has quit [Ping timeout: 244 seconds]
beliveyourdream has quit [Read error: Connection reset by peer]
<shevy> ner0x your code example will assign 3 to users, I think
<Hanmac_> users = 3.times.map { create('user') }
RORgasm has joined #ruby
sclarson_ has joined #ruby
dankest has quit [Client Quit]
m4n has joined #ruby
<shevy> that one seems better
<shevy> :O
DatumDrop has joined #ruby
generalissimo has quit [Remote host closed the connection]
gyre007 has joined #ruby
<JonnieCache> 3.times.map wtf
<shevy> hey you forgot a .
<JonnieCache> does 3.times with no block return an enumerator or smth
bean__ has joined #ruby
<shevy> 3.times.map.wtf
<Hanmac_> JonnieCache yes it does :D
<shevy> enumerators are so cool
<Hanmac_> 3.times.with_object([]) {|*,u| u << create('user') }
* JonnieCache wretches
<shevy> |*,)|
jtgiri_ has quit [Quit: jtgiri_]
<shevy> the block-smiley operator
<Hanmac_> 3.times.inject([]) {|u,*| u << create('user') }
<shevy> someone remind me to never ever maintain anything of Hanmac_'s code please
<apeiros_> Hanmac_: aaaaah
<Spooner> Or, simpler: 3.times.map { create('user') } :D
biello has quit [Remote host closed the connection]
<shevy> you can really use both |u,*| and |*,u| ??
<apeiros_> Array.new(3) { create('user') }
<shevy> hehehe
Umren has joined #ruby
<shevy> Hanmac_ why do you always pick the worst examples :(
<ner0x> Thank you sirs.
<Hanmac_> iDo because iCan :D
<apeiros_> iSee
<Spooner> iDespair
<apeiros_> iHide
Virunga has joined #ruby
<shevy> iSex
carloslopes has quit [Ping timeout: 248 seconds]
vlad_starkov has quit [Read error: Connection reset by peer]
<Spooner> iPickleMyKneesInCheese
aganov has quit [Remote host closed the connection]
joofsh has quit [Remote host closed the connection]
<shevy> I just realize... those iThings are rather selfish
vlad_starkov has joined #ruby
<shevy> why isnt there a:
<shevy> uSick
dfyuij has quit [Ping timeout: 256 seconds]
alvaro_o has joined #ruby
pcarrier has joined #ruby
<Spooner> There is a wiiRemote ;)
daniel_- has quit [Ping timeout: 252 seconds]
robbyoconnor has joined #ruby
<Hanmac_> maybe because the customers have to much iEgo :P
<Hanmac_> shevy http://www.bbc.co.uk/news/world-europe-21141244 << "Norway goat cheese fire closes tunnel" "The fire raged for five days" - "biggest Raclette ever " :P
pothibo has joined #ruby
<shevy> yeah they do love cheese in norway
<shevy> is there any ruby hacker from norway here?
uris has quit [Quit: Leaving]
<JonnieCache> mmmm
<shevy> we gots... germany switzerland austria UK ... hmm USA ... one from greece...
<JonnieCache> raclette....
joofsh has joined #ruby
<hoelzro> shevy: are you counting country of origin, or country of residence?
havenn has joined #ruby
warb0 has joined #ruby
angusiguess has joined #ruby
razibog has quit [Ping timeout: 252 seconds]
<shevy> hoelzro oh... I think country of origin more... or perhaps citizenship, as that seems to be used most often for self-identification
tjbiddle has joined #ruby
maletor has joined #ruby
<shevy> but yeah, country of origin!
<hoelzro> oh, ok
ViPi has joined #ruby
tjbiddle has quit [Client Quit]
vlad_starkov has quit [Remote host closed the connection]
emocakes has joined #ruby
robbyoconnor has quit [Ping timeout: 248 seconds]
generalissimo has joined #ruby
clooth has quit [Quit: clooth]
joeycarm_ has joined #ruby
bey0nd has joined #ruby
Zolo has joined #ruby
frem has joined #ruby
n1x has joined #ruby
snearch has quit [Quit: Verlassend]
bradhe has joined #ruby
mockra has joined #ruby
joeycarmello has quit [Ping timeout: 245 seconds]
mockra has quit [Remote host closed the connection]
_nitti has quit [Remote host closed the connection]
io_syl has quit [Quit: Computer has gone to sleep.]
joeycarm_ has quit [Ping timeout: 255 seconds]
arya has quit [Ping timeout: 248 seconds]
BulleTime has joined #ruby
Ralt has joined #ruby
<Ralt> hello people
phinfonet_ has joined #ruby
<hoelzro> ahoy
arya has joined #ruby
<Ralt> I'm proficient in some languages (JS, Python, PHP, Common Lisp), and I want to learn Ruby. Which resource do you recommend? :-)
<hoelzro> The Ruby Programming Language
<Ralt> I'd like to learn Ruby "the right way"
<Ralt> okay, thanks :)
phinfonet has quit [Read error: Connection reset by peer]
<hoelzro> I *highly* recommend it
<hoelzro> it's a really great book
<Ralt> is it for beginners?
<Ralt> I'd like something like Accelerated C++, I guess.
<hoelzro> Ralt: it's for people with one or more languages under their belt
andrewhl has joined #ruby
<hoelzro> and it doesn't skimp on the details
<Ralt> hoelzro: oh, cool then :)
<Ralt> that's great!
ephialtes480 has joined #ruby
stetho has joined #ruby
Spooner has quit [Remote host closed the connection]
<aedornm> Accelerated C++ .. wish they'd update that book
robbyoconnor has joined #ruby
<Ralt> Hanmac_: haha, ok
sclarson_ has quit [Quit: sclarson_]
<Hanmac_> or this http://www.ruby-lang.org/en/documentation/ page in general
hoelzro is now known as hoelzro|away
undersc0re97 has quit [Ping timeout: 244 seconds]
alv-r- has quit [Ping timeout: 245 seconds]
eldy has joined #ruby
BizarreCake has quit [Remote host closed the connection]
cawaker has quit [Quit: Linkinus - http://linkinus.com]
Criztian has joined #ruby
<eldy> hi
<Hanmac_> shevy did you know about:
<Hanmac_> >> p "a" "x#{nil}x" "b"
<eval-in> Hanmac_: Output: "\"axxb\"\n" (http://eval.in/7429)
Takehiro has joined #ruby
zigomir has quit [Ping timeout: 264 seconds]
xsarin has joined #ruby
jpfuentes2 has joined #ruby
spider-mario has joined #ruby
joeycarmello has joined #ruby
amaya_the has quit [Read error: Connection reset by peer]
mercwithamouth has quit [Ping timeout: 256 seconds]
recycle has joined #ruby
jean-louis has quit [Ping timeout: 252 seconds]
amaya_the has joined #ruby
asym has joined #ruby
robert___ has joined #ruby
robert___ has quit [Changing host]
robert___ has joined #ruby
DaZ has joined #ruby
bey0nd has quit [K-Lined]
eldy has quit [Quit: Leaving]
undersc0re97 has joined #ruby
undersc0re97 has joined #ruby
undersc0re97 has quit [Changing host]
bradhe has quit [Remote host closed the connection]
etcetera has joined #ruby
EhyehAsherEhyeh has quit [Ping timeout: 248 seconds]
JohnBat26 has quit [Ping timeout: 252 seconds]
sooso has joined #ruby
dr_bob1 has joined #ruby
freakazoid0223 has joined #ruby
dr_bob has quit [Ping timeout: 256 seconds]
pcarrier has quit [Ping timeout: 252 seconds]
mjbamford has quit [Quit: Leaving...]
phinfonet_ is now known as phinfonet
mikecmpbll has quit [Quit: ["Textual IRC Client: www.textualapp.com"]]
<shevy> Hanmac_ man...
robert__ has quit [Ping timeout: 276 seconds]
mafolz has quit [Remote host closed the connection]
clj_newb has quit [Ping timeout: 264 seconds]
<Hanmac_> "Hanmac - finding unknown creepy features since '88"
atmosx has joined #ruby
Takehiro has quit [Ping timeout: 276 seconds]
phinfonet has quit [Quit: Linkinus - http://linkinus.com]
<JonnieCache> wtf
<shevy> hehe
phinfonet has joined #ruby
<shevy> JonnieCache has a wtf day today :D
<JonnieCache> yeah pretty much
<Xeago> yea he started this morning with wireshark :)
<shevy> haha
<Xeago> he at least knew it ahead of time :D
<JonnieCache> nah that was good. that was finishing yesterdays api stuff
<JonnieCache> the WTFs started after i closed wireshark
<JonnieCache> which is a very odd thing to day, i recognise that
<JonnieCache> s/day/say
yacks has quit [Quit: Leaving]
Maziz has quit [Quit: Maziz]
sn0wb1rd has quit [Quit: sn0wb1rd]
browndawg has joined #ruby
sooso has quit [K-Lined]
<Hanmac_> >> p "like" "in" "C" "in" "ruby" "strings" "parted" "with" "only" "whitespaces" "are" "parsed" "as" "one" "string"
<eval-in> Hanmac_: Output: "\"likeinCinrubystringspartedwithonlywhitespacesareparsedasonestring\"\n" (http://eval.in/7430)
jaequery has quit [Quit: Computer has gone to sleep.]
hemanth has quit [Read error: Connection reset by peer]
hemanth has joined #ruby
apeiros_ has quit [Remote host closed the connection]
drago757 has joined #ruby
<Hanmac_> >> p "like""in""C""in""ruby""strings""parted""with""without""spaces""are""parsed""as""one""string""too"
<eval-in> Hanmac_: Output: "\"likeinCinrubystringspartedwithwithoutspacesareparsedasonestringtoo\"\n" (http://eval.in/7431)
sclarson_ has joined #ruby
fyolnish has quit [Remote host closed the connection]
zer0bytes has left #ruby [#ruby]
_nitti has joined #ruby
filipe has quit [Remote host closed the connection]
fyolnish has joined #ruby
Liothen has joined #ruby
Liothen has quit [Changing host]
Liothen has joined #ruby
mantas322 has joined #ruby
dougireton has joined #ruby
<mantas322> hello
<mantas322> whats the preferred database for ruby or ruby on rails?
<mantas322> mySQL?
<JonnieCache> mysql is fine
<GeekOnCoffee> or PostgreSQL
<Hanmac_> real programmers use post-Its :P
<JonnieCache> yeah postgresql is amazing
<mantas322> do the majority of you guys use somesort of toolkit to do stuff with it?
rippa has quit [Ping timeout: 240 seconds]
<JonnieCache> rails is that toolkit
<aedornm> I was thinking of converting our databases over to PostgreSQL from MySQL for awhile now. That's about as far as I've gotten with it, too - thinking.
<mantas322> right, right.
Xeago has quit [Ping timeout: 252 seconds]
tommyvyo has quit [Quit: http://twitter.com/tommyvyo]
rippa has joined #ruby
tr4656 has quit [Ping timeout: 276 seconds]
amaya_the has quit [Read error: Connection reset by peer]
amaya_the has joined #ruby
choffstein has joined #ruby
harushimo has joined #ruby
<harushimo> quick question for everyone
<harushimo> when do you class animal and class Dog < animal, so this does mean Dog is the object of class animal
<harushimo> am I saying this correctly?
mantas322 has quit [Quit: Page closed]
Hanmac_ has quit [Ping timeout: 245 seconds]
wallerdev has quit [Quit: wallerdev]
browndawg has left #ruby [#ruby]
dmiller1 has joined #ruby
<JonnieCache> dog is a new class inheriting from the animal class
<harushimo> that make sense
joofsh has quit [Remote host closed the connection]
jgrevich has joined #ruby
<harushimo> what ever functions were coded in class animal. Dog inherits them
geekbri has quit [Remote host closed the connection]
elico has joined #ruby
dougireton has quit [Quit: Leaving.]
choffstein has quit [Remote host closed the connection]
<shevy> yay
<shevy> we have animal fun again
noxoc has quit [Quit: noxoc]
<harushimo> right
<harushimo> hehe
tr4656 has joined #ruby
emptyflask has joined #ruby
bradhe has joined #ruby
dougireton has joined #ruby
ovatsug25 has quit [Remote host closed the connection]
dr_bob1 has quit [Quit: Leaving.]
mantas322 has joined #ruby
<mantas322> I have to admin, ruby does have some nifty methods
daniel_- has joined #ruby
fyolnish has quit [Remote host closed the connection]
sn0wb1rd has joined #ruby
clj_newb has joined #ruby
m4n has quit [Ping timeout: 276 seconds]
Takehiro has joined #ruby
t0rc has joined #ruby
stayarrr has joined #ruby
schaerli has joined #ruby
wreckimnaked has quit [Ping timeout: 252 seconds]
nga4 has joined #ruby
beckyconning has joined #ruby
<shevy> you have to admin?
angusiguess has quit [Ping timeout: 255 seconds]
Takehiro has quit [Ping timeout: 245 seconds]
<beckyconning> how do i pre make a block / function / lambda / proc such that i can do something like: a_hash.map(function) ?
mercwithamouth has joined #ruby
volk_ has quit [Quit: volk_]
joofsh has joined #ruby
jrajav has quit [Quit: I tend to be neutral about apples]
rakl has joined #ruby
elico has quit [Quit: elico]
wallerdev has joined #ruby
noxoc has joined #ruby
<pyro111> started gem kind of rspec for scripts wthout .shoulds, using refinements https://github.com/sowcow/testdo/blob/master/features/testdo.feature
sayan has quit [Ping timeout: 252 seconds]
apeiros_ has joined #ruby
<aedornm> So ... got this thing to bring up a VM, build a package with the local environment USE variables, and spit out the binary tar ball back to the client that emerge can install via a Ruby wrapper over portage. Now I'm stuck ... I don't know how I can use multiple environments.
<pyro111> a_hash.map &proc{...}
Zolo has quit [Remote host closed the connection]
biello has joined #ruby
jtharris has quit [Quit: WeeChat 0.3.9.2]
fyolnish has joined #ruby
<beckyconning> pyro111: oh cool. so how would i go about that? what would be the two liner? defining the proc and then applying it?
fragmachine has quit [Remote host closed the connection]
yoshie902a has joined #ruby
ovatsug25 has joined #ruby
jaequery has joined #ruby
jgrevich_ has joined #ruby
jgrevich has quit [Ping timeout: 255 seconds]
jgrevich_ is now known as jgrevich
Goles has joined #ruby
robert_ has joined #ruby
<pyro111> pyro111: jsut put it in variable
daniel_-_ has joined #ruby
daniel_-_ has quit [Client Quit]
<beckyconning> pyro111: so like this?
MattRB has joined #ruby
<beckyconning> pyro111: https://gist.github.com/4610786
Xeago has joined #ruby
amaya_the has quit [Quit: ChatZilla 0.9.89 [Firefox 18.0.1/20130116073211]]
robert___ has quit [Ping timeout: 252 seconds]
daniel_- has quit [Ping timeout: 248 seconds]
<pyro111> beckyconning: yes? you can even test that code
bradhe has quit [Remote host closed the connection]
Kingy has joined #ruby
tcstar has joined #ruby
mantas322 has quit [Quit: Page closed]
Spooner has joined #ruby
slainer68 has quit [Remote host closed the connection]
baphled has quit [Ping timeout: 252 seconds]
breakingthings has quit []
<beckyconning> pyro111: sorry its just that its failing so i was confused thanks anyway
sayan has joined #ruby
dyrot has joined #ruby
ananthakumaran has quit [Quit: Leaving.]
adeponte has joined #ruby
<tcstar> I'm running ubuntu -- and i'm trying to get ruby to install or upgrade... but can't seem to figure out how.. apt-get doesn't seem to have any upgrades -- rvm won't install properly.. i'm at a loss - so if anyone can point me in some decent info so i can begin my RoR learning i'd appreciate it.
DrShoggoth has joined #ruby
elaptics is now known as elaptics`away
<Spooner> tcstar, apt-get should have 1.9.3, but it will be called "1.9" or "1.9.1". You could look at rbenv instead if rvm doesn't like you.
<Spooner> tcstar, This Ubuntu has 1.9.3 as a specific apt-get package actually.
karasawa has joined #ruby
kenneth has quit [Quit: kenneth]
<tcstar> yeah i just installed ruby1.9.3 -- then run ruby -v
<tcstar> and this is my output: ruby 1.8.7 (2011-06-30 patchlevel 352) [x86_64-linux]
<pyro111> >> rename=proc{123}; p Hash[*10.times.map(&rename)]
<eval-in> Pyro111: Output: "{123=>123}\n" (http://eval.in/7433)
adeponte has quit [Remote host closed the connection]
<Spooner> tcstar, You can only manage one system Ruby, which is what rvm/etc are all about helping with. You probably have ruby1.9.3 on ruby1.9 or similar command. Either uninstall ruby1.8-full or use rvm/rbenv/other and symlink ruby1.9 to ruby to have multiple versions..
AndChat| has joined #ruby
arya has quit []
arya has joined #ruby
inokenty has quit [Quit: Leaving.]
<Spooner> tcstar Oops: Either uninstall ruby1.8-full AND symlink ruby1.9 to ruby OR use rvm/rbenv/other to have multiple versions..
<tcstar> rvm doesn't install correctly either.. every time i run the rvm command -- it tells me it can't be found...
jeffreybaird has quit [Quit: jeffreybaird]
<tcstar> i never installed ruby though, so i don't know why ruby1.8 would be on there... let me try to remove
<Spooner> Have you restarted the terminal?
adeponte has joined #ruby
eldariof has joined #ruby
<beckyconning> thanks pyro111 i must be doing something else wrong
<beckyconning> getting "wrong number of arguments(1 for 0)"
bradhe has joined #ruby
<tcstar> Yeah i've restarted my terminal (Guake) and used the standard term too
kpshek has quit []
fragmachine has joined #ruby
<AndChat|> Tcstar getting angry?
<Spooner> It sometimes fails to add the right stuff in your .bash_profile
<beckyconning> pyro111: thanks : ) got it working
philips_ has quit [Excess Flood]
ckrailo has joined #ruby
<tcstar> Yes and no AndChat -- but, i'm sure i'll get it figured out
kpshek has joined #ruby
<Spooner> tcstar, I always had problems with rvm the same as you. I use rbenv now ;)
<Spooner> tcstar, Just need to manually put a line in your dot files: http://stackoverflow.com/questions/3243088/installing-rvm-ruby-version-manager
<tcstar> whats crazy is even ruby itself -- is uninstalled completely and purged -- but running ruby -v still shows 1.8.7...
<Spooner> Odd.
alex__c2022 has quit [Quit: alex__c2022]
razibog has joined #ruby
dougireton has quit [Quit: Leaving.]
maxmanders has quit [Quit: Computer has gone to sleep.]
<Spooner> tcstar, Do you have a ruby19 or ruby1.9 command?
<Spooner> I forget how it gets installed as the system. Still, generally better to use rvm if you can get it sussed.
_nitti has quit [Remote host closed the connection]
pavilionXP has joined #ruby
Solnse has joined #ruby
karasawa has quit [Ping timeout: 255 seconds]
<tcstar> no, but apparently i have a ruby 1.8 command
dougireton has joined #ruby
<tcstar> bleh! maybe i just need to reboot the system....
c0rn_ has joined #ruby
tcstar has quit [Remote host closed the connection]
karasawa has joined #ruby
Vainoharhainen has quit [Quit: Leaving...]
<Spooner> Nah, that link tells you what you need to add to your dot files.
<Spooner> Do that and restart your terminal.
<Spooner> Then it should see rvm and you can install to your heart's content!
_nitti has joined #ruby
philips_ has joined #ruby
<yoshie902a> hi everyone!, I just finished a parser and it seems to be taking an excessive amount of time to run one file. what is the best way to approach figuring out the bottle neck?
mrkris has joined #ruby
jpfuentes2 has quit [Quit: Computer has gone to sleep.]
noxoc has quit [Quit: noxoc]
<Spooner> yoshie902a, Look at profile (standard lib) or ruby-prof (gem).
dmiller1 has quit [Ping timeout: 248 seconds]
<yoshie902a> I'm reading up on ruby-prof now, found the same recommendation on stack overflow. Any preference between the two?
mahmoudimus has joined #ruby
<apeiros_> ruby-prof is like 10-50x faster
jimeh has quit [Quit: Computer has gone to sleep.]
io_syl has joined #ruby
<Spooner> ruby-prof is better, but it is a gem.
<apeiros_> so if you can, by all means, use ruby-prof
<Xeago> do I need an apostrophe at documents? "Elasticsearch shards documents based on a hash of the documents unique identifier."
jtharris has joined #ruby
<workmad3> Xeago: no on the first, yes on the second
<Xeago> knew it
<workmad3> Xeago: because the second reference is actually a possessive, you're refering to the document's unique identifier
Virunga is now known as LennyLinux
clooth has joined #ruby
_bart has joined #ruby
<workmad3> Xeago: it might be more correct to say 'a hash of a document's unique identifier' too
JumpMast3r has quit [Quit: JumpMast3r]
bel3atar_ has left #ruby [#ruby]
tjbiddle has joined #ruby
tastedancin has quit [Quit: tastedancin]
tjbiddle has quit [Remote host closed the connection]
<Xeago> thanks, that reads better, yes
brianpWins has joined #ruby
<Spooner> workmad3, Xeago I'd say it should be "the hash of a" since the hash is unique itself.
_bart has quit [Remote host closed the connection]
<workmad3> Spooner: I was wondering about that
<Xeago> Spooner: actually, the hash doesn't have to be unique
<yoshie902a> Xeago: might want to try #elasticsearch, Shay and the other ES guys hang around there to answer questions.
alex__c2022 has joined #ruby
<Xeago> it just needs to reduce to a fairly low number of collisiopns
tjbiddle has joined #ruby
<workmad3> Spooner: but wondered if it would imply that a specific hashing algorithm was in use
<Xeago> yoshie902a: already in there, but that is no place to ask english stuff :)
volk_ has joined #ruby
carloslopes has joined #ruby
<workmad3> Spooner: so didn't suggest it :)
<Spooner> Xeago, The id produces a single hash. Not that it was unique for all ids. *weaselled out of it*
<yoshie902a> In general is parsing usually slow?
<Xeago> Spooner: it gets bucketed/sharded
<Spooner> yoshie902a, How long is a piece of string?
<workmad3> Spooner: I guess it would depend on if 'the hash' had already been introduced to mean a specific hash method :)
ddd has left #ruby [#ruby]
mockra has joined #ruby
<Spooner> workmad3, Oh, OK. Fair enough.
<Xeago> workmad3: not the case, first use of hash in the document
pyro111 has quit [Quit: Leaving]
<harushimo> here another a question, when you do a return :add, this is calling a method or function within the class correct?
<workmad3> Xeago: right, then I'd say 'a hash' was more correct than 'the hash'
<Xeago> thanks!
<Spooner> harushimo, No, you are just returning a Symbol, :add.
<Xeago> gotta walk home now, will be back in a bit
Xeago has quit [Remote host closed the connection]
<harushimo> I'm looking at some code. They do is a lot
<yoshie902a> My string length is 187206, it's an html document
elico has joined #ruby
<Spooner> harushimo, Symbols are used for a lot of things...
<harushimo> i figured. I'm looking at the ruby doc right now too
<harushimo> I may have another question
Solnse has quit [Quit: Leaving.]
<Spooner> yoshie902a, If it is html, then you are using Nokogiri, which is pretty fast.
sclarson_ has quit [Quit: sclarson_]
Solnse has joined #ruby
bondar has joined #ruby
<Spooner> I, however, have to go.
Spooner has quit [Remote host closed the connection]
Elhu has quit [Quit: Computer has gone to sleep.]
<yoshie902a> yes, I use nokogiri to recursively go through each node and I extract the text from each node. run it through openNLP to mark sentences markers
kennyvb has quit [Ping timeout: 260 seconds]
osaut has joined #ruby
beckyconning has quit [Quit: beckyconning]
mneorr has joined #ruby
dougireton has quit [Remote host closed the connection]
ddd has joined #ruby
kennyvb has joined #ruby
dougireton has joined #ruby
kenneth has joined #ruby
<yoshie902a> is there a way to see if I have an infinite loop or something? I always just end up canceling my code after a few minutes or running. I feel my processor heating up and I just stop it.
tcstar has joined #ruby
chrismhough has quit [Quit: chrismhough]
<tcstar> got both ruby 1.9.3 and rvm working.. thanks guys ;)
dougireton1 has joined #ruby
dougireton has quit [Remote host closed the connection]
AccessGranted has joined #ruby
<AccessGranted> Death to Ruby, death to Ruby. PHP is the hackers' language!
AndChat| has quit [Ping timeout: 248 seconds]
bel3atar has left #ruby ["WeeChat 0.4.0"]
<AccessGranted> And by the way death to America
jrist has quit [Read error: Connection reset by peer]
AccessGranted has left #ruby ["Leaving"]
megha has quit [Quit: WeeChat 0.3.9.2]
jonathanwallace has quit [Quit: WeeChat 0.3.9.2]
beckyconning has joined #ruby
megha has joined #ruby
<apeiros_> *sob*, idiots never go extinct…
megha has quit [Client Quit]
<pothibo> rofl
beneggett has quit [Remote host closed the connection]
<yoshie902a> troll
benlieb has joined #ruby
<pothibo> I don't even know what to response to that, it's too pathetic for my brain to process
<apeiros_> the generic response is kickban. he politely left. probably knowing that it'd have happened anyway.
brandon|work has quit [Remote host closed the connection]
jonathanwallace has joined #ruby
jrist has joined #ruby
brandon|work has joined #ruby
LennyLinux has quit [Remote host closed the connection]
tspike has joined #ruby
moos3 has quit [Quit: Computer has gone to sleep.]
shevy has quit [Ping timeout: 246 seconds]
fragmachine has quit [Remote host closed the connection]
banisterfiend has joined #ruby
Xeago has joined #ruby
banisterfiend has quit [Read error: Connection reset by peer]
banisterfiend has joined #ruby
Solnse has quit [Read error: No route to host]
Solnse has joined #ruby
sepp2k1 has joined #ruby
apok has joined #ruby
<kenneth> hey
mantovani has quit [Quit: leaving]
Solnse has quit [Client Quit]
arietis has joined #ruby
<yoshie902a> any ideas why this is not parsing correctly with nokogiri? https://gist.github.com/4611332
Solnse has joined #ruby
baphled has joined #ruby
sepp2k has quit [Ping timeout: 248 seconds]
mrkris has quit [Quit: 'MURICA!]
<kenneth> any reason you can't do multiple assignment and default value in blocks together?
<kenneth> eg
<kenneth> let do |(f,l) = ["24 Dec 2011", "23 Jan 2013"].map {|d| Date.parse(d) }| …
timmow has quit [Ping timeout: 252 seconds]
statarb3 has quit [Ping timeout: 244 seconds]
<kenneth> you can do
<kenneth> l = lambda do |(f,l)| …, l.call(…)
<kenneth> and you can do
<kenneth> let do |a = ["24 Dec 2011", "23 Jan 2013"].map {|d| Date.parse(d) }| …
oddover has joined #ruby
karasawa has quit [Ping timeout: 276 seconds]
<oddover> can anyone point me to someplace that lists all the FNM_ params for File.fnmatch?
ViPi has quit [Quit: Computer has gone to sleep.]
TouchFluffyTail has joined #ruby
frogstarr78 has joined #ruby
bondar has quit [Quit: Leaving]
tenmilestereo has joined #ruby
kpshek has quit []
chussenot has quit [Quit: chussenot]
TouchFluffyTail has left #ruby [#ruby]
aapzak has quit [Remote host closed the connection]
angusiguess has joined #ruby
t0rc has quit [Quit: WeeChat 0.3.9.2]
shevy has joined #ruby
hukl has joined #ruby
stayarrr has quit [Quit: Leaving...]
<apeiros_> oddover: File.constants.grep(/FNM/)
reinaldob has quit [Remote host closed the connection]
<oddover> apeiros_: Thank you! I didn't know you could do that
Solnse has quit [Quit: Leaving.]
Solnse has joined #ruby
baphled has quit [Ping timeout: 252 seconds]
stayarrr has joined #ruby
babonk has joined #ruby
babonk has quit [Changing host]
babonk has joined #ruby
niklasb has joined #ruby
Eaven has joined #ruby
breakingthings has joined #ruby
c0rn_ has quit [Quit: Computer has gone to sleep.]
adamjleonard has joined #ruby
ChampS666 has joined #ruby
girafe has joined #ruby
girafe has quit [Max SendQ exceeded]
caleb_io has joined #ruby
emptyflask has quit [Remote host closed the connection]
benlieb has quit [Quit: benlieb]
headius has joined #ruby
c0rn has joined #ruby
mneorr has quit [Remote host closed the connection]
mneorr has joined #ruby
axiak has quit [Quit: leaving]
axiak has joined #ruby
otters has quit [Ping timeout: 252 seconds]
benlieb has joined #ruby
Xeago has quit [Remote host closed the connection]
mrsolo has joined #ruby
mneorr has quit [Remote host closed the connection]
Guest52294 is now known as verto|off
mneorr has joined #ruby
Takehiro has joined #ruby
friskd has joined #ruby
LennyLinux has joined #ruby
biello has quit [Remote host closed the connection]
apeiros_ has quit [Remote host closed the connection]
jrist is now known as jrist-afk
dfyuij has joined #ruby
apeiros_ has joined #ruby
jgarvey has joined #ruby
Agis__ has joined #ruby
<friskd> is there anything special I need to do to make passenger parse .rb files via apache?
<friskd> I have installed passenger and setup the local host
oddover has left #ruby [#ruby]
sailias has quit [Quit: Leaving.]
<friskd> but the rb files are not parsed.
hybris has quit [Read error: Connection reset by peer]
Agis__ is now known as hoihr
mrdtt has quit [Quit: mrdtt]
geekbri has joined #ruby
Neomex has joined #ruby
c0rn has quit [Ping timeout: 256 seconds]
headius has quit [Quit: headius]
recycle has quit [Read error: No route to host]
maxmanders has joined #ruby
recycle has joined #ruby
statarb3 has joined #ruby
danneu has joined #ruby
Takehiro has quit [Ping timeout: 276 seconds]
unix1 has quit [Remote host closed the connection]
headius has joined #ruby
maycon has joined #ruby
c0rn has joined #ruby
emptyflask has joined #ruby
yalue has joined #ruby
adamjleonard has quit [Quit: Linkinus - http://linkinus.com]
alex__c2022_ has joined #ruby
<tcstar> being that i run apache, whats the easiest/cheapest way to deploy so apache can process the ror site? I was looking @ passenger but @ 99 a year probably not going to happen..
vlad_starkov has joined #ruby
dfyuij has quit [Ping timeout: 256 seconds]
havenn_ has joined #ruby
havenn has quit [Read error: Connection reset by peer]
joofsh has quit [Remote host closed the connection]
slainer68 has joined #ruby
reinaldob has joined #ruby
Hanmac_ has joined #ruby
alex__c2022 has quit [Ping timeout: 240 seconds]
alex__c2022_ is now known as alex__c2022
Kingy has quit [Quit: Leaving]
<breakingthings> tcstar: Doesn't passenger have a free and enterprise version
<tcstar> Not that i saw -- i'll look again
haxrbyt__ has quit [Remote host closed the connection]
tatsuya_o has quit [Remote host closed the connection]
haxrbyte has joined #ruby
benlieb has quit [Quit: benlieb]
<tcstar> ooh they do have an O.S version
elkclone has joined #ruby
<danneu> I wrote a scraper gem that returns listings allowing the gem user to do things like listing.title and listing.price. if the price node is missing, then it's set to nil. generally speaking is it sensible to coerce the nil to 0 in this situation?
tommyvyo has joined #ruby
elkclone has quit [Changing host]
elkclone has joined #ruby
benlieb has joined #ruby
Dann1 has joined #ruby
epylinkn has joined #ruby
speakingcode-wor has joined #ruby
ewag has joined #ruby
sambio has quit [Ping timeout: 256 seconds]
jpfuentes2 has joined #ruby
joofsh has joined #ruby
aeontech has joined #ruby
chridal has joined #ruby
havenn_ has quit [Ping timeout: 276 seconds]
<danneu> that way, gem users can do stuff like listings.sort_by{|n| n.price} without nil errors. but that seems to mangle the api now since the listings aren't actually $0.
<danneu> sort of a conceptual what's-a-better-api question
chussenot has joined #ruby
maximilianoo has quit [Quit: maximilianoo]
<Hanmac_> danneu how about .sort_by(&:price)
<Hanmac_> it does not solv your nil problem but makes this a bit better
Solnse has quit [Read error: Connection reset by peer]
Solnse has joined #ruby
<friskd> tcstar: did you get apache working so that it actually parses the ruby files?
<friskd> is anyone else using apache + passenger on osx?
Xeago has joined #ruby
<tcstar> No, i just installed the passenger -- but haven't got apache to recognize the ruby yet
<friskd> I have it installed, but apache is setup to point to the correct dir.
<friskd> Same here, its not parsing my .rb files.
<friskd> Not sure why.
<friskd> i don't even have ROR in there
brunosaboia__ has quit [Quit: Fui embora]
BSaboia has joined #ruby
<friskd> just a default.rb file
<friskd> that loops through an array
rapha has left #ruby ["bye and thanks again for the help"]
Eaven has quit [Read error: Connection reset by peer]
elux has joined #ruby
<friskd> tcstar: you on linux or mac?
Neomex has quit [Quit: Neomex]
<tcstar> linux.. and aha
Uranio has quit [Quit: while you reading this, a kitty dies]
<friskd> What did you find?
<tcstar> it's the public folder... going to localhost/first_app/public displays ;)
mneorr has quit [Remote host closed the connection]
Eaven has joined #ruby
<friskd> what does the folder have to do w/ it?
mneorr has joined #ruby
<friskd> in my case i setup a vhost to point to local.ruby.com
<tcstar> that should be the 'document root' for the vhost
<friskd> and have a default.rb file in it
Nuck has quit [Ping timeout: 245 seconds]
<tcstar> hmm not sure..
<friskd> so you saw your ruby get parsed?
_nitti has quit [Remote host closed the connection]
drago757 has quit [Quit: drago757]
JarJar has joined #ruby
adambeynon has quit [Quit: ["Textual IRC Client: www.textualapp.com"]]
<tcstar> it's displaying in my browser... but, it's also just the basic structure atm... from doing rails new first_app -- i haven't gotten much deeper than that yet
recycle has quit [Ping timeout: 255 seconds]
mneorr has quit [Remote host closed the connection]
mneorr has joined #ruby
mockra has quit [Ping timeout: 255 seconds]
mockra_ has joined #ruby
recycle has joined #ruby
hoihr has quit [Quit: hoihr]
maletor has quit [Remote host closed the connection]
Michael_ has joined #ruby
mascool has joined #ruby
ryanh has quit [Quit: Computer has gone to sleep.]
mitchellh has joined #ruby
mitchellh has left #ruby [#ruby]
adambeynon has joined #ruby
maasha has joined #ruby
<yoshie902a> tcstar: sorry, I missed some of the conversion, but you could deeply to heroku for free
<yoshie902a> s/deeply/deploy
<Xeago> apeiros_: Ping!
mark_locklear has quit [Remote host closed the connection]
miskander has joined #ruby
<maasha> Hi, I am wondering if you can tweak Ruby to function in a command line sort of way: http://pastie.org/5838961
<friskd> tcstar: ok. Yea i wonder if its since i'm just using a single .rb file and not rails
<friskd> i have read a few posts and seems like you have to do some sort of rack interface to get it to parse...
<friskd> Not like PHP where it would just load the file and parse it....
<maasha> the trick is to pass a single line from method to method without keeping everything in memory
bananastalktome has joined #ruby
<maasha> sort of like bash I guess
<banisterfiend> maasha: not sure what u're asking tbh
<banisterfiend> can u show the code u want to have?
bananastalktome has left #ruby [#ruby]
<maasha> banisterfiend: eh, that paste was sort of the idea
<banisterfiend> maasha: but i mean, why cant you just do that? what's the issue?
a_a_g has joined #ruby
angusiguess has quit [Ping timeout: 245 seconds]
<canton7> maasha, like Rush?
alex__c2022 has quit [Remote host closed the connection]
alex__c2022 has joined #ruby
nomenkun has joined #ruby
ryanh has joined #ruby
<maasha> banisterfiend: I fail to see how to pass a single line though these steps at a time
<banisterfiend> maasha: what do u mean 'a single line' ? sry i dont understand
carloslopes has quit [Remote host closed the connection]
<maasha> banisterfiend: So I dont want to load all of test.txt into memory. Only line by line.
<maasha> canton7: https://github.com/adamwiggins/rush ? or what do you mean?
clj_newb has quit [Ping timeout: 252 seconds]
krainboltgreene has joined #ruby
shock_one_ has joined #ruby
<banisterfiend> maasha: why are oyu calling class methods on the instance ?
oddover has joined #ruby
havenn has joined #ruby
<banisterfiend> maasha: why not have: ios = Cmd.new; ios.cat(input: "file.txt")
<oddover> is anyone familiar with how Dir.glob works?
fourq has quit [Ping timeout: 256 seconds]
<banisterfiend> maasha: ios.grep(pattern: "foobar") etc
<maasha> banisterfiend: no particular reason. I want to see if this could work and how much that can be abstracted away to produce a truly minimal syntax.
etcetera has quit []
<shock_one_> oddover, the same as bash globbing, I guess.
a_a_g has quit [Quit: This computer has gone to sleep]
Nuck has joined #ruby
Nuck has quit [Changing host]
Nuck has joined #ruby
<oddover> The reason I ask is I'm trying to use it to look for a .gz file somewhere in a directory, and it has to follow symlinks to find it
<maasha> having played a bit with rails and gems for rails I see that you can really bastardize code to look like plain text! Capybera and cucumber e.g.
luckyruby has joined #ruby
<oddover> but it seems to be not working
adambeynon has quit [Quit: ["Textual IRC Client: www.textualapp.com"]]
schaerli has quit [Remote host closed the connection]
chriskk has joined #ruby
<shock_one_> oddover, you can use Dir#entries and filter them with File#symlink?
mneorr has quit [Remote host closed the connection]
<oddover> oh. it's not necessarily below a symlink
<oddover> it just might be
mneorr has joined #ruby
<oddover> I need to recursively search starting from a directory, in everything below it
etcetera has joined #ruby
<shock_one_> oddover, I believe glob only resolves file names, so if symlink doesn't have .gz extension you should use something different. So you need a list of gz files in some directory (recursively) plus symlinks that follow to gz files, right?
binaryplease has joined #ruby
[diecast] has joined #ruby
tommyvyo has quit [Quit: http://twitter.com/tommyvyo]
[diecast] has left #ruby [#ruby]
fourq has joined #ruby
<shock_one_> *point to
<maasha> banisterfiend: so if we do it like this: https://gist.github.com/4612174 how can you control the flow of lines from cat to grep?
<oddover> not quite. What I need is all .gz files contained within the directory (recursively, including symlinks to directories)
<oddover> does that make sense?
osaut has quit [Quit: osaut]
<oddover> so I have /tmp/blah/ which is a symlink to /tmp/blah2, and in blah2/, there's a .gz file somewhere
<oddover> (not necessarily at the root of blah2
<banisterfiend> maasha: we have some code in pry that does that, one sec
dr_tetsus is now known as cunninghamwich
nomenkun has quit [Remote host closed the connection]
tvw has quit [Ping timeout: 272 seconds]
<shock_one_> oddover, I'll try to write something.
<oddover> thanks!
benlieb has quit [Quit: benlieb]
Morkel has quit [Read error: Connection reset by peer]
krainboltgreene has quit [Quit: Computer has gone to sleep.]
blaxter has quit [Quit: foo]
Morkel has joined #ruby
dfyuij has joined #ruby
Zolo has joined #ruby
<maasha> banisterfiend: how does it work?
Rizzle has joined #ruby
<yoshie902a> need some advice, totally stuck on this ..https://gist.github.com/4612046
tommyvyo has joined #ruby
<banisterfiend> maasha: well, we read in the entire file at the start
<banisterfiend> and break it up into lines
<banisterfiend> then we manipulate the lines
<banisterfiend> we have an Loc class which manages line numbers and lines of code
<maasha> banisterfiend: so if the file is potentially bigger than mem?
<tcstar> friskd -- it's not working for me truely either... when i run rails s it works fine, but not through apache.
<banisterfiend> maasha: that's not a use case we care about, we're only interested in the typical use of cat to show the output for source files
<friskd> Right.
<friskd> tcstar: i just figured out why
<friskd> So w/ ModRuby installed
_nitti has joined #ruby
<banisterfiend> maasha: but it's not hard to support that, there's just a 99.99999% chance you/your users dont care
<banisterfiend> (for our case)
<friskd> You still need to have your stuff configured so that ruby can be interpretted by rack
ddd has left #ruby [#ruby]
<maasha> banisterfiend: right, but for my case I am concerned about memory - I want to keep as little in mem as possible - which mean read in one line - pass it through all methods - and then the next line. If only you could do that with an iterator and yield some smart way.
<friskd> So basically ruby runs as a cgi script that is interpretted via the rack api and then served up via passenger.
<maasha> banisterfiend: like bash
<maasha> and pipes
<friskd> If your coming from the PHP world its quite different.
maxmanders has quit [Quit: Computer has gone to sleep.]
freakazoid0223 has quit [Quit: Leaving]
<banisterfiend> maasha: i would set up the methods as just setting some kind of flag
<tcstar> so i have to have rack, passenger and mod_ruby installed.... seeing as how i've got passenger integrated with apache -- figured that'd be enough.... guess that's what i get for doing my own thinking
<banisterfiend> maasha: not actually applying them until the very end
<tcstar> Yeah, i'm def coming from the PHP world -- and really only for 1 project that we just got....
atmosx has quit [Quit: And so the story goes…]
oddover has quit [Read error: Connection reset by peer]
bradhe has quit [Remote host closed the connection]
rjmt___ has quit [Ping timeout: 256 seconds]
<tcstar> but, it'll be nice to be able to put ruby and RoR into our company knowledge base
bradhe has joined #ruby
<banisterfiend> maasha: and at the very end i iterate through the file using: File.open(file, "r") { |f| loop-until-eof { apply_methods(f.readline) } }
<maasha> banisterfiend: and how may that look? hmmm
reinaldob has quit [Remote host closed the connection]
_nitti has quit [Ping timeout: 276 seconds]
mneorr has quit [Remote host closed the connection]
mneorr has joined #ruby
<banisterfiend> maasha: Pry::Code works that way to
<banisterfiend> maasha: you can do stuff like: Pry::Code.from_file(blah).take_lines(5..20).with_line_numbers.around(30, 40).to_s
<banisterfiend> the stuff is only applied at the to_s
<banisterfiend> too*
<maasha> banisterfiend: yeah, I should study pry closely.
horofox has quit [Quit: horofox]
pcarrier has joined #ruby
jtgiri_ has joined #ruby
<maasha> banisterfiend: right, thanks, I will do some reading for now.
oddover has joined #ruby
<tcstar> friskd -- just got mod_ruby installed now too... any further getting the ruby to run as cgi or whatever to get that to work -- appreciated... should be the same for all my machines which will be nice...
bradhe has quit [Ping timeout: 256 seconds]
osaut has joined #ruby
<oddover> shock_one_: I don't know if you messaged back. I got disconnected.
robert__ has joined #ruby
<friskd> tcstar: so you likely won't get ruby to just run as a single file unless you use rails, sinatra, or something that implements the rake api and you run.
stayarrr has quit [Quit: Leaving...]
<shock_one_> oddover, I came up with a rather ugly solution but it's pretty straightforward https://gist.github.com/c58cce48d37e36c902d6 Oh, and I din't test it by the way
<RubyPanther> mod_ruby should give you a traditional cgi capability
maxmanders has joined #ruby
<RubyPanther> whereas passenger is aka mod_rack and is not a general purpose apache tool
<RubyPanther> mod_ruby has a lot of limitations and is not normally used at all anymore
<wmoxam> mod_ruby was barely used at all ever
<wmoxam> fastCGI was usually a better option
danneu has quit [Quit: WeeChat 0.3.8]
<wmoxam> I don't think that mod_ruby ever supported > 1 instance of an app running at a time properly
slainer68 has quit [Remote host closed the connection]
aaronmacy has joined #ruby
jtgiri_ has quit [Quit: jtgiri_]
maasha has quit [Ping timeout: 245 seconds]
<RubyPanther> when I started with rails mod_ruby was the main way of running it
robert_ has quit [Ping timeout: 276 seconds]
<RubyPanther> it was so bad people were actually happy to adopt fcgi. Which had already flopped with everybody else. ;)
jeffreybaird has joined #ruby
<RubyPanther> fcgi was so bad people were actually happy to adopt mongrel_cluster
<tcstar> problem i'm having is when i go to: localhost/first_app -- i just get directory listing from the mvc view of rails.... if i go to localhost/first_app/app/controllers/controller.rb in the browser -- it loads but it's forbidden
<RubyPanther> you're just not going to get happy CGI out of Ruby, you have to learn rack
MattRB has quit [Quit: This computer has gone to sleep]
<tcstar> I'm fine either way -- just need it to work...
Playground is now known as Automorphism
tcstar has left #ruby ["Leaving"]
tcstar has joined #ruby
cunninghamwich is now known as tetsus
mahmoudi_ has joined #ruby
<tcstar> thanks RubyPanther -- i'll take a look and hopefully we'll get something happening out of it...
<RubyPanther> generally when you install the passenger gem it tells you exactly what to do
LennyLinux has quit [Remote host closed the connection]
stayarrr has joined #ruby
mahmoudimus has quit [Ping timeout: 245 seconds]
Solnse1 has joined #ruby
harushimo has left #ruby ["Leaving"]
maletor has joined #ruby
miskander has quit [Quit: miskander]
volk__ has joined #ruby
Solnse1 has quit [Client Quit]
Solnse2 has joined #ruby
Solnse has quit [Ping timeout: 246 seconds]
Solnse2 is now known as Solnse
dmiller1 has joined #ruby
jduan1981 has joined #ruby
saltcod has quit [Quit: saltcod]
bradhe has joined #ruby
punkrawkR^Home has joined #ruby
Zolo has quit [Remote host closed the connection]
ddd has joined #ruby
MattRB has joined #ruby
elico has quit [Remote host closed the connection]
volk_ has quit [Ping timeout: 248 seconds]
volk__ is now known as volk_
Takehiro has joined #ruby
tatsuya_o has joined #ruby
mneorr has quit [Remote host closed the connection]
miskander has joined #ruby
_nitti has joined #ruby
jrist-afk is now known as jrist
mneorr has joined #ruby
Takehiro has quit [Ping timeout: 264 seconds]
_nitti has quit [Remote host closed the connection]
_nitti has joined #ruby
chrismhough has joined #ruby
saltcod has joined #ruby
etcetera has quit []
alex__c2022 has quit [Read error: Connection reset by peer]
<shock_one_> oddover, Are you here? This thing must work. puts Dir.glob("/home/shock_one/test/**{,/*/**}/*.mkv")
tcstar has quit [Read error: Connection reset by peer]
jlast has quit [Remote host closed the connection]
adambeynon has joined #ruby
<oddover> shock_one_: I am still here
jlast has joined #ruby
alex__c2022 has joined #ruby
arya has quit [Ping timeout: 248 seconds]
mneorr has quit [Remote host closed the connection]
etcetera has joined #ruby
<oddover> that's sorta the approach I tried, but I couldn't get it to work
mneorr has joined #ruby
_dak_ has joined #ruby
binaryplease has quit [Quit: WeeChat 0.4.0]
<shock_one_> Works for me. Can you send me zip archive with files you're testing the script on?
emptyflask has quit [Remote host closed the connection]
<oddover> oh, wait. I missed the bracketed part
<oddover> that made it work
<oddover> what does that mean?
<_dak_> I'm trying to install command-t for vim, and when I use rvm to switch to system ruby I get "theme_precmd:12: command not found: rbenv_prompt_info"
<graft> does anyone know how to tell where a gem is being required from?
<shock_one_> If all works, forget it :-)
<oddover> shock_one_: heh
<banisterfiend> graft: yeah
arya has joined #ruby
theRoUS has quit [Ping timeout: 255 seconds]
<graft> banisterfiend: what's the secret?
<Eiam> I'm trying to get started with rubyprof, so I follow the guides, require 'ruby-prof' and do a start/stop around a block of code I wanted to profile. (Its code in a gem that my rails app calls) so I fire up rails s & hit the route.. RuntimeError (RubyProf is already running): hmm
<shock_one_> graft, you can write wrapper around require which will tell you what you want.
krainboltgreene has joined #ruby
<oddover> shock_one_: The way I started going was using the Find module
justinlilly is now known as justinabrahms
<oddover> shock_one_: But I like this way better. Thanks a lot!
<banisterfiend> graft: Gem.loaded_specs["your_gem"].gem_dir
<banisterfiend> shock_one_: dont suggest silly stuff :)
<banisterfiend> :P
<shock_one_> oddover, You're welcome
oddover has left #ruby [#ruby]
Goles has quit [Quit: Computer has gone to sleep.]
tcstar has joined #ruby
Jackneill_ has quit [Read error: Connection reset by peer]
krainboltgreene has quit [Client Quit]
mahmoudimus has joined #ruby
clooth has quit [Quit: clooth]
slainer68 has joined #ruby
mikepack has quit [Remote host closed the connection]
<aedornm> hmmm... isn't MRI set to abort thread on exceptions by default?
maletor has quit [Quit: Computer has gone to sleep.]
adambeynon has quit [Quit: Computer has gone to sleep.]
<shock_one_> graft, What about monkey patching? https://gist.github.com/c58cce48d37e36c902d6
mahmoudi_ has quit [Ping timeout: 252 seconds]
Criztian has quit [Remote host closed the connection]
<graft> shock_one_: jeez, what a masochist
daniel_- has joined #ruby
daniel_- has quit [Changing host]
daniel_- has joined #ruby
<graft> shock_one_: but good idea
<banisterfiend> graft: did u not see the code i sent u?
musl has quit [Quit: WeeChat 0.3.9.2]
<shock_one_> graft, Why masochist? I always thought that it's convenient technique.
nomenkun has joined #ruby
<banisterfiend> shock_one_: it's not safe, at least with an alias name like that
<graft> banisterfiend: i realized what i needed wasn't a gem but just a require line
razibog has quit [Ping timeout: 256 seconds]
razibog has joined #ruby
<graft> banisterfiend: just doing some hunting to debug my irb, this won't go in to any production or even development code
dougireton1 has quit [Quit: Leaving.]
<graft> now i just can't figure out why bond won't work
mneorr has quit [Remote host closed the connection]
mneorr has joined #ruby
slainer68 has quit [Ping timeout: 256 seconds]
musl has joined #ruby
shock_one_ has quit [Quit: Leaving]
dougireton has joined #ruby
<Eiam> okay, apparently I cannot start & stop profiling at the top/bottom of a method thats calledin a loop because ruby-prof is already running
shock_one_ has joined #ruby
<Eiam> not sure that makes any sense at all
w400z has joined #ruby
Banistergalaxy has joined #ruby
jduan1981 has quit [Quit: jduan1981]
user666 has joined #ruby
<user666> Evening
banisterfiend has quit [Ping timeout: 252 seconds]
<user666> I'm not sure if this is the right place to ask, but I'm going to do it anyway
banisterfiend has joined #ruby
<banisterfiend> dc
<banisterfiend> stupid connection
<banisterfiend> graft: how do u know what require line corresponds to what gem?
arya_ has joined #ruby
evilsushi has joined #ruby
evilsushi has quit [Changing host]
evilsushi has joined #ruby
evilsushi is now known as awkwords
<user666> Anyway, I have this line of code: row = db.execute "INSERT INTO \"bblog\" (\"id\",\"channel\",\"server\",\"count\") VALUES (NULL,'#{$output[2]}','#{$currentServer}','0')"
<user666> Which results in the following error: no such column: rizon
<user666> What am I doing wrong?
joeycarmello has quit [Remote host closed the connection]
<canton7> are you certain that's the query which is causing the error? :P
arya has quit [Ping timeout: 248 seconds]
<canton7> also, "a\"b" => %Q[a"b]
<awkwords> ive got a list of 40 names, i want to print 10 names into a file.. so like 1-10 name1.txt 11-21 name2.txt
<Eiam> awkwords: enumerable + take
<user666> The query is fine, I was able to insert it using that query
<user666> But not with ruby it seems
epylinkn has left #ruby [#ruby]
razibog has quit [Ping timeout: 244 seconds]
cespare has quit [Quit: WeeChat 0.3.7]
<shock_one_> user666, Yes, looks like you picked up wrong query.
carloslopes has joined #ruby
recycle has quit [Read error: No route to host]
<user666> But I just inserted something using that query
recycle has joined #ruby
<Eiam> awkwords: my_names.to_enum.take(10) {|items| Marshal dump it out}
CalebMingle has joined #ruby
caleb_io has quit [Read error: Connection reset by peer]
<shock_one_> user666, maybe this query works fine and that's some other one, that gives you the error.
joeycarmello has joined #ruby
CalebMingle has quit [Read error: Connection reset by peer]
<user666> It's the only query I'm firing unfortunately
<Eiam> awkwords: oh that won't loop though. well, you could wrap it in a loop. or do a slice on the data… This sounds like homework ;)
cespare has joined #ruby
ddd has quit [Ping timeout: 245 seconds]
<shock_one_> user666, Have you tried to find the word «rizon» in your project?
<user666> That's #{$currentServer}
<shevy> yikes
<tcstar> I think i got it working -- but on the base app -- when i click on the link to see the properties -- it just errors out with this error: no such file to load -- bundler
hybris has joined #ruby
<shevy> btw cant you omit the #{} when you use globals, user666 ?
maletor has joined #ruby
<Eiam> awkwords: better answer, ["joe","jack","john","jim"].each_slice(2) { |names| // array of two names }
recycle_ has joined #ruby
<user666> I honestly have no idea shevy :x
<shevy> ah
<shevy> you can drop a bit at least:
<shevy> $abc = 'world'; puts "hello #$abc" # => "hello world"
recycle has quit [Read error: No route to host]
<shevy> still ugly however
<Eiam> awkwords: or each_by(10), or even better haha this is my favorite, [//yourarray].each {|a,b,c,d,e,f,g,h,i,j,k| // there are your 10 names}
<user666> #{$var} looks better than #$var don't you think
<Eiam> (don't do that last one)
osaut has quit [Quit: osaut]
<user666> At least I think it does
<user666> Oh well
<shevy> user666 dunno. I tend to prefer what is terser and shorter usually
rmartin has quit [Remote host closed the connection]
<Eiam> awkwords: (and you'd need to enclose in () for it to work)
<shevy> problem is, I hate $vars, so I dont think there is any real improve for those things
Elhu has joined #ruby
<user666> It's my first thing in ruby shevy, so there's lots of room to improve luckily :)
<yoshie902a> ugh, still stuck on this parsing issue :(
beiter has quit [Read error: Connection reset by peer]
<user666> Also, I think I found why the error pops up. It now errors on a different query which shouldn't fire in the first place
blazes816 has quit [Quit: blazes816]
themayor has joined #ruby
LennyLinux has joined #ruby
blazes816 has joined #ruby
beiter has joined #ruby
sayan has quit [Ping timeout: 256 seconds]
aaronmacy has quit [Quit: Leaving.]
NobbZ is now known as NobbZ|wech
miskander has quit [Quit: miskander]
<shevy> programming is simple
<shevy> if the code is too complicated
<shevy> it is wrong
<user666> Nah forgot the part where I inserted the query myself
recycle_ has quit [Read error: Connection reset by peer]
<user666> So obviously the else of the if was fired
<DrShoggoth> is there an official rails chan?
recycle has joined #ruby
MattRB has quit [Quit: This computer has gone to sleep]
<shock_one_> #rubyonrails
CamonZ has quit [Quit: Linkinus - http://linkinus.com]
robert___ has joined #ruby
miskander has joined #ruby
<yoshie902a> shevy: easy for you maybe, I'm struggling
<Hanmac_> others call it purgatory :D
miskander has quit [Client Quit]
sintrix has joined #ruby
robert__ has quit [Ping timeout: 276 seconds]
<RubyPanther> Programming is simple. That's why we Learn Code the Hard Way. It's just programming-motherfucker (.com)
rezzack has joined #ruby
Neomex has joined #ruby
Neomex has quit [Client Quit]
Eaven has quit [Remote host closed the connection]
ChampS666 has quit [Ping timeout: 276 seconds]
miskander has joined #ruby
<yoshie902a> RubyPanther: not when things go wrong, like debugging. for example, i've spent all day on this one issue, getting nokogiri to parse html/xml, but it doesn't https://gist.github.com/4612046, yes, it should be simple, but sometimes you just want to bang your head
<RubyPanther> yoshie902a: honestly I saw your gist but it was just a tiny bit of scraper code, a giant block of data, and no clear question.
<yoshie902a> Nokogiri is not parsing this correctly. It returns blank. What can I do to parse the body from here?
ryanf has joined #ruby
<RubyPanther> I've actually never really used nokogiri I was already super-happy with Hpricot when nokogiri came out so I'm still using it. But scrapers are hard, finicky, and not fun or technically interesting.
jduan1981 has joined #ruby
<RubyPanther> even as a nokogiri hater I am very very skeptical that it is not parsing correctly. People use it in bots that scrape millions of pages a day.
Eaven has joined #ruby
<yoshie902a> Then it's my code, I just have no idea why it won't work
<RubyPanther> well, don't scrape.
<RubyPanther> that is the "best practices" answer.
jblack has joined #ruby
<RubyPanther> if an API is not available, right that first. If it isn't your data... ask for an appropriate format. And then wait until it it provided.
<RubyPanther> s/right/write/
_dak_ has quit [Quit: Lost terminal]
[Neurotic] has joined #ruby
benlieb has joined #ruby
Eaven has quit [Remote host closed the connection]
ChampS666 has joined #ruby
<yoshie902a> RubyPanther: sometimes, appropriate formatted data is not available. it's from an SEC document. thousands of companies files these files, no 100% consistent format. only one source directly from the gov.
cableray has joined #ruby
aaronmacy has joined #ruby
<RubyPanther> I've done jobs writing scrapers. And I can tell you, almost every time they have to hire multiple people in a row to do it, because the first few fail.
maletor has quit [Quit: Computer has gone to sleep.]
<yoshie902a> can you give me the last person's name, haha
<yoshie902a> not fun!
<RubyPanther> It is hard, and it is not even something worth doing. The value is guaranteed to be low. If the value was high, the data would be purchased in the correct format.
eldariof has quit []
<jblack> ruby: so true.
<jblack> Not so true on the latter.
<yoshie902a> it can be purchased, at 10K a month
ilyam has joined #ruby
sharms has quit [Ping timeout: 256 seconds]
<yoshie902a> not something I can afford
<RubyPanther> exactly. point proven.
<jblack> yup. those licensing costs for various datasets can be silly.
<shock_one_> yoshie902a, It returns data for me.
<RubyPanther> that means they don't want you to have it. Use different data.
<yoshie902a> shock_one_: it did? did you change anything?
ilyam has quit [Client Quit]
<shock_one_> Renamed code to code.rb
ilyam has joined #ruby
<yoshie902a> shock_one_: could you get the body tag?
<jblack> yosie: I deal with a similiar problem involving SoS sites and entity registrations.
dwn has quit [Ping timeout: 244 seconds]
<jblack> So I'm rather familiar with your type of problem. They like to bolt down public domain information and put up arbitrary barriers so that they can charge a premium
<shock_one_> It returns a lot of data. Write me the code to execute and I'll give you the output https://dl.dropbox.com/u/608214/scrn/1358976222.png
<Hanmac_> yoshie902a that page is SO ugly :D
aaronmacy has quit [Client Quit]
Guedes0 has joined #ruby
<jblack> yoshie902a: how far have you gotten?
hybris has quit [Quit: hybris]
<Hanmac_> made from HTML before it got cool :P
rapha has joined #ruby
<rapha> Hi again! :)
<yoshie902a> I keep getting [], as output, so I got no where, let close my terminal and restart to clear any weirdness
<yoshie902a> jblack: not far
<jblack> Would you like to take this conversation private, or keep it here/
<rapha> Do we have something similar like the Python guys with http://www.tutorialspoint.com/python/string_translate.htm ?
carloslopes has quit [Remote host closed the connection]
MattRB has joined #ruby
atmosx has joined #ruby
<shock_one_> yoshie902a, I use nokogiri 1.5.6 and ruby 1.9.3p194 if it can help you
nkr has quit [Quit: Linkinus - http://linkinus.com]
<rapha> or would you just use .each in ruby?
geekbri has quit [Remote host closed the connection]
jfl0wers has quit [Quit: jfl0wers]
<Hanmac_> yoshie902a it works for me, maybe your nokogiri version is broken?
sambio has joined #ruby
<yoshie902a> maybe, I'm using jruby
<yoshie902a> I'm going to switch to 1.9.3
cakehero has joined #ruby
elkclone has quit [Quit: It's never too late to unplug and run.]
<Hanmac_> rapha: look at String#tr
maletor has joined #ruby
s__dana_ has joined #ruby
<tcstar> man this is fun... got the error to go away, now it just shows a 404.. though going to localhost:3000 shows it fine still..
neersighted has quit [Ping timeout: 245 seconds]
nimred has quit [Remote host closed the connection]
nimred has joined #ruby
<Hanmac_> rapha: look at String#tr
<rapha> Hanmac_: thank you!
<yoshie902a> shock_one_: damn! you are right, 1.9.3 worked
<rapha> huh?! either ruby-doc.org is broken or my browser is
<yoshie902a> is there a way to run some code on jruby and some on 1.9.3?
tatsuya_o has quit [Read error: Connection reset by peer]
bricker`work has quit [Ping timeout: 240 seconds]
themayor has quit [Ping timeout: 248 seconds]
<shock_one_> yoshie902a, So, now you agree that programming is simple? :-)
tatsuya_o has joined #ruby
<yoshie902a> I have a gem that need to use jruby , but it seems I may also need to use 1.9.3
s__dana has quit [Ping timeout: 240 seconds]
s__dana_ is now known as s__dana
bricker`work has joined #ruby
dfyuij has quit [Remote host closed the connection]
<rapha> Hanmac_: looks like it's not even the best thing for what I'm trying to do. I have an array or Unicode characters and I want all of them removed from a string. Sounds more like a job for a regexp ... but how to form the array into a regexp - with .join?
<shock_one_> yoshie902a, you can execute this piece of code as external command if you won't find better way. body = %x( ruby code.rb )
carloslopes has joined #ruby
jtgiri_ has joined #ruby
user666 has quit [Quit: goodnight]
<yoshie902a> shock_one_: that is an idea
<Hanmac_> rapha if you want to remove them look for gsub
arietis has quit [Quit: Textual IRC Client: http://www.textualapp.com/]
<havenn> yoshie902a: Nokogiri 1.5.6 works swell with Jruby 1.7.2.
<shevy> yoshie902a it is not easy for me at all. I simply and consistently reject complex code, that's all
<Hanmac_> yoshie902a using java is a bad idea ... oracle gets money for each update
hukl has quit [Quit: Linkinus - http://linkinus.com]
<yoshie902a> Hanmac_: need to because I am using openNLP
<RubyPanther> in school they taught that "genius level programming" is worthless code that nobody else can understand or maintain
jtgiri_ has quit [Client Quit]
<breakingthings> genius level programming that isn't properly separated and made in easy-to-understand-chunks isn't worth squat.
<RubyPanther> any genius you have, apply it only to debugging. ;)
<breakingthings> Your 500 character regex may perfectly validate emails, but nobody else is gonna have a clue what to do with it.
<shock_one_> RubyPanther, in my school they taught how to use Microsoft Word, so you're lucky.
<breakingthings> :
<breakingthings> :d*
bricker`work has quit [Ping timeout: 248 seconds]
<rapha> Hanmac_: gsub, sure ... just would you really do something like CHARS_TO_REMOVE=['\u1234', '\u2345']; my_string.gsub(CHARS_TO_REMOVE.join, '') ? Somehow that looks like it couldn't be right...
jtgiri_ has joined #ruby
<Hanmac_> RubyPanther you just descriped 75% of my gems :D
<banisterfiend> breakingthings: _why did pretty well with it :)
icole has joined #ruby
<banisterfiend> breakingthings: i.e "genius level programming that isn't properly separated and made in easy-to-understand-chunks isn't worth squat."
mockra_ has quit [Remote host closed the connection]
<banisterfiend> breakingthings: cf projects like mixico
<RubyPanther> Hanmac_: genius debugging, or worthless code? :P
mach1ne has joined #ruby
<shock_one_> breakingthings, That's why God created comments http://stackoverflow.com/a/5719838/1149074
<yoshie902a> havenn: it does not seem to work well in this case. If I rvm 1.9.3 it works well, if I switch to jruby 1.7.2, it does not
<yoshie902a> my nokogiri version is 1.5.6
aaronmacy has joined #ruby
<breakingthings> Gentlemen pls.
Solnse has quit [Read error: No route to host]
<tcstar> RubyPanther thanks for that link it helps other than when going to http://localsite/rails/info/properties -- that's giving a 404 but other than that, looks like it's running fine
<havenn> yoshie902a: JRuby version?
<Hanmac_> RubyPanther: " code that nobody else can understand or maintain" :P
<RubyPanther> I've never heard of "needing jruby" except when running on java-based shared web hosting or android
<yoshie902a> havenn: jruby 1.7.2 (1.9.3p327)
<headius> RubyPanther: most common "need" case we see is when the only or best lib for X is a Java lib
<headius> you could call those through rjb too, but it's easier in jruby
mach1ne has quit [Client Quit]
adeponte has quit [Remote host closed the connection]
<RubyPanther> tcstar: I would make sure apache is working as expected without passenger. Generally something like an unexpected 404 is straight apache wrangling
<shock_one_> RubyPanther, with jruby you can also use Java libraries
<havenn> yoshie902a: OS/Distro?
<tcstar> let me check my other application that is running codeigniter -- so no passenger
punkrawkR^Home has quit [Read error: Connection reset by peer]
<yoshie902a> havenn: OSX 10.8.2
<tcstar> that pulls up fine..
<RubyPanther> sure, but most tasks people have there are going to be C libs for it, so MRI isn't exactly lacking functionality from gems
* Hanmac_ points and laugh about java&mac users
emergion has joined #ruby
<headius> but in the C lib case you usually have to have an existing Ruby C ext, or an existing FFI binding
<headius> in JRuby, Ruby => Java just works out of the box
<RubyPanther> if there is actually some kind of important functionality where the C libs don't have a wrapper, let me know, I love Ruby C
<tcstar> lol.. My moms husband bought a brand new mac a few years ago -- then asked if i'd put windows on it... lol
<shock_one_> RubyPanther, there is also a case when all the project code is written in Java and you have to access some libraries from it in Ruby.
<tcstar> on another note, looks like it's not reading my assets either
neersighted has joined #ruby
<havenn> yoshie902a: I guess double check that you have libiconv, libxml2 and libxslt installed? Hrmm.: brew install libiconv libxml2 libxslt
JarJar has left #ruby ["Leaving"]
<pothibo> if I'm not mistaken, jruby has better perfs than MRI
<headius> that too
<RubyPanther> pothibo: you are mostly mistaken
<shock_one_> pothibo, not since 1.9
<pothibo> oh
<havenn> JRuby has a higher scrabble word score than Ruby.
<headius> much higher
<Hanmac_> RubyPanther i love Ruby+C++ as combi :D
volk_ has quit [Remote host closed the connection]
<headius> RubyPanther: mostly mistaken?
volk_ has joined #ruby
cakehero has quit [Quit: Computer has gone to sleep.]
<Hanmac_> pothibo can you do 3d programming with >200FPS in Jruby too? :D i can with MRI
mockra has joined #ruby
<headius> yes, you can
DrShoggoth has quit [Quit: Leaving]
<RubyPanther> I'm sure you can find a poorly interpreted or narrow case benchmark where JRuby is faster, and I'm sure you can find fans who like it strongly enough to make the claim.
<shock_one_> Hanmac_, But why to use Ruby for 3D programming?
<headius> JRuby should be faster than MRI in general, not just for specific cases
<RubyPanther> why "should" it be? Because Java is faster than C, right?
bel3atar has joined #ruby
<headius> because JRuby actually ends up compiling Ruby code to native
<headius> and MRI does not
<RubyPanther> That has little meaning. What does "native" mean there?
phinfonet has quit [Ping timeout: 248 seconds]
* pothibo puts popcorn in the microwave
<shock_one_> headius, bytecode isn't native
<headius> native as in CPU-native
<headius> as in x86_64
<Gate> pothibo: concur, this is going to be fun :)
<headius> as in real native JIT
<headius> we compile to JVM bytecode, and JVM JITs to native
<Hanmac_> shock_one_ iDo because iCan
emergion has quit [Quit: Computer has gone to sleep.]
berserkr has quit [Ping timeout: 248 seconds]
aeontech has quit [Ping timeout: 245 seconds]
zph has quit [Quit: Computer has gone to sleep.]
<yoshie902a> havenn: Just finished brew install and setting gem install nokogiri -- --with-xslt-dir=/usr/local/Cellar/libxslt/1.1.26
<headius> I spend a considerable amount of my time optimizing JRuby reading through x86 assembly output
<shock_one_> headius, I'm pretty sure at some point ruby code it also converted to machine instructions
<headius> shock_one_: it most definitely is not
<Hanmac_> headius: wrong! MRI1.9 does make bytecode too
<headius> MRI is a pure bytecode interpreter
<RubyPanther> I'm sure you do, but you should probably leave it to your users to tell people how great it is or how fast it is for them
moos3 has joined #ruby
<rapha> Hanmac_: I used the string.gsub(ARRAY.join, '') method now and it seems to be working just fine. Thanks for pointing me in the right direction!
<headius> Hanmac_: and never JITs it to native code
thone_ has joined #ruby
maycon has quit [Remote host closed the connection]
<headius> RubyPanther: they do
bel3atar has quit [Quit: good bye cruel world]
<headius> perhaps you should leave it to JRuby users to say it's not faster, since you have no idea what you're talking about
cawaker has joined #ruby
<yoshie902a> still not working
<yoshie902a> havenn: did you get it working with jruby 1.7.2 and nokogiri 1.5.6?
bel3atar has joined #ruby
<banisterfiend> headius: RubyPanther is a well-known know-it-all and babbler, he's banned from #ruby-lang for talking nonstop nonsense there too (iirc)
<RubyPanther> I do use it. And it is not very pleasant compared to MRI. It certainly isn't faster. If I want to see my Ruby code go really fast I run Ruby 2
<havenn> yoshie902a: yup
MattRB has quit [Quit: This computer has gone to sleep]
kirun has joined #ruby
<headius> RubyPanther: if you have a nontrivial case that's slower in JRuby, please show me
<GeekOnCoffee> headius: keep up the good work <3 a former jruby user
<yoshie902a> ugh :(
<havenn> headius: Starting up Pry. :P
<headius> havenn: startup time we know about
emptyflask has joined #ruby
<headius> banisterfiend: I know…I just don't let misinformation sit
thone has quit [Ping timeout: 240 seconds]
<banisterfiend> :)
<Hanmac_> headius: RubyVM::InstructionSequence.compile("1+2").disasm
<havenn> JRuby won my horribly-unscientific serialization benchmark by a long shot: https://gist.github.com/4513627
<headius> that's just YARV bytecode
ner0x has quit [Quit: Leaving]
<RubyPanther> Nobody can cheerlead code like the author, and nobody is a more un-biased critic either.
whowantstolivef1 has joined #ruby
moshee has quit [Ping timeout: 248 seconds]
moshee has joined #ruby
moshee has quit [Changing host]
moshee has joined #ruby
<havenn> RubyPanther: JRuby is lightning fast, that is just true.
<headius> RubyPanther: I will put my money where my mouth is…show me something we're slower at and I'll fix it
<yoshie902a> havenn: did you modify the html file at all?
<headius> I don't say we're fastest at everything, but where we're not it's a bug
<GeekOnCoffee> RubyPanther: having run complex apps side by side, jruby is significantly faster than MRI once it's running
* pothibo giggles
<RubyPanther> when you say "where we're not it's a bug" that really sounds like total crazy-talk.
<GeekOnCoffee> it's only crazy talk if you prove him wrong
<havenn> VisualVM is fun to use with JRuby, I like watching threads. /popcorn
<Hanmac_> i cant bind my lovly gems against jruby (bwcause they are c++ code), that allso includes an gem for a 3d engine
maxmanders has quit [Quit: Textual IRC Client: www.textualapp.com]
<headius> to you, maybe…to me, it comes from years of investigating perf problems and having them end up impl bugs
<headius> Hanmac_: there's some folks using FFI to bind C++, but it's fiddly like you'd expect
<RubyPanther> I don't mean that as an insult, it just sounds very strange. If you take it as an engineering claim, it is just the same as Java people have been saying for over a decade.
renanoronfle has joined #ruby
<headius> wmeissner is working on a new project that's basically FFI + a C compiler so you can basically do everything you'd do in an ext but still just use FFI
<headius> that might work for your case
<RubyPanther> Why should it be faster than C? It shouldn't be.
<Hanmac_> and shock_one_ yeah with that i can make 3d games in ruby
dmiller1 has quit [Ping timeout: 244 seconds]
<headius> RubyPanther: it doesn't have to be faster than C in general…just in the specific cases needed to run Ruby programs faster
segv-_ has joined #ruby
<havenn> RubyPanther: Compare JVM GC to Ruby GC...
segv- has quit [Read error: Connection reset by peer]
segv-_ is now known as segv-
<headius> in JRuby, almost all Ruby code eventually ends up compiled to JVM bytecode, which means it almost all ends up as native optimized assembly
<pothibo> RubyPanther: I think you misunderstand the reason why Jruby is faster (C has nothing to do with it)
<headius> much, much faster than MRI's interpreter
<renanoronfle> hi, one question can i change respond_with message?
<headius> and we and the JVM are also able to optimize away a lot of the overhead of making Ruby calls
<headius> MRI can't do that
<Hanmac_> headius: it may require that the C++ itself has an C-API ... and in some libs this is NOT possible, because you cant backport anything back into C
<shock_one_> Hanmac_, I can write web-sites in C++ but I never will
<RubyPanther> havenn: but then that proves the lie, because then anywhere that JRuby has better perf would be a MRI "bug" or misfeature
<headius> our core classes are sometimes faster, sometimes slower than MRI's
<Gate> renanoronfle: sorry, flame war in progress. You want to change how it does what? How the HTML looks?
dmiller1 has joined #ruby
<Hanmac_> pah i can write web-sites in C
<headius> RubyPanther: I consider JRuby being slower to be a bug because if we're optimizing like I've designed us to we should beat MRI every time
<headius> MRI could certainly add a native JIT
<Gate> Hanmac_: been there, done that, got the T-Shirt, quit that job as fast as I could.
<RubyPanther> The Ruby is the same, the best case without extra moving parts is going to be the same, why should Java be assumed to have a better best case, or less moving parts?
<Hanmac_> shock_one_ explain why an game should not be written in ruby
<havenn> Forget Sinatra, lets all write web frameworks in C, mmm Raphters: https://github.com/DanielWaterworth/Raphters
<RubyPanther> if you said JRuby shouldn't actually be any faster, but it is, maybe it would be true or not but at least it would be a claim that doesn't defeat itself
<yoshie902a> I'm going to restart my computer and try again. BRB
mengu has quit [Quit: Konversation terminated!]
yoshie902a has left #ruby [#ruby]
<Gate> RubyPanther: I don't think you understand how interpreters and compilers work.....
<headius> but the best case is not the same
<headius> MRI's interpreter does *much* more branching and memory indirection than actual jitted native code
<RubyPanther> Gate: Assume I do and check if there is an interpretation of my words that is still valid. ;)
<Hanmac_> Gate what is the problem writing games in ruby? is it the speed?
jeffreybaird has quit [Read error: Connection reset by peer]
<headius> and on top of that it allocates per-call structures that increase overhead compared to Ruby many times over
<RubyPanther> if so, go with that one
jeffreybaird has joined #ruby
<headius> JRuby optimizes much of that away
haxrbyte has quit [Read error: Connection reset by peer]
<Gate> Hanmac_: I was referring to your comment about C website dev.
<headius> and the JVM can actually inline Ruby code and optimize it like any other JVM language
<Gate> Hanmac_: I did a stint on a C++ IISAPI + Java *nightmare* that I consider to be the single most torturous period of my career to date.
dustint_ has quit [Quit: Leaving]
nomenkun has quit [Remote host closed the connection]
slainer68 has joined #ruby
<Hanmac_> Gate: i learned it as part of my education, i also learned to code asm but i would not recomend it ...
<shock_one_> Hanmac_, Because it works so much slover than C++, for example. I also believe there is much less libraries, best practices and stackoverflow answers
tommyvyo has quit [Quit: http://twitter.com/tommyvyo]
io_syl has quit [Quit: Textual IRC Client: www.textualapp.com]
<pothibo> I honestly didn't expect 9 words to bring that much turmoil
<Gate> Ruby would be fine for the gamelogic portion of the code, with the rendering happening in C or something on a seperate thread.
yoshie902a has joined #ruby
<RubyPanther> if I put any tight loops or bottlenecks it a tiny bit if C, the rest of the app logic being in Ruby isn't going to make it slow. That's true even with a slow Ruby like 1.8
<headius> and in JRuby, there's far less pressure to have to do that
aeontech has joined #ruby
ddd has joined #ruby
<Hanmac_> shock_one_ i played with my gem that bindes an c++ lib .. one that can use GPU programms ... from the seed my little test game has nearly the same speed as the real C++ Programm ...
<headius> the pure-Ruby rbtree, for example, runs as fast in JRuby as the C ext does in MRI
<yoshie902a> I'm back, restart didn't help either
<headius> that certainly could indicate the C ext is poorly-written, but when you can beat MRI + C ext with JRuby + Ruby, I call that a win
<renanoronfle> Gate, :) i want change the message when i create obj, im not render html, render json
berserkr has joined #ruby
_nitti has quit [Quit: Leaving...]
<yoshie902a> havenn: when I did brew install, did I need to do anything else?
<yoshie902a> havenn: what system are you on? os X?
<RubyPanther> The idea that you can replace C libs with pure Ruby made me lol
nga4 has quit [Ping timeout: 264 seconds]
bradhe has quit [Remote host closed the connection]
<havenn> yoshie902a: Yeah, 10.8
<headius> it's within the realm of possibility
<Gate> renanoronfle: So if I recall correctly, what respond_with will do is render the model's JSON, are you saying that you would rather render your own JSON instead?
Dann1 has quit [Quit: GODDAMNIT]
<shock_one_> yoshie902a, brew link, maybe
<yoshie902a> shock_one_: brew link?
<pothibo> shock_one_, yoshie902a: brew doctor might be of some help too
<havenn> yoshie902a: you may need to pass those flags to the `gem install nokogiri`
<renanoronfle> Gate, yep
pothibo has quit [Quit: pothibo]
<Gate> renanoronfle: you probably want something like this then: https://gist.github.com/4614612
<Hanmac_> shock_one_ when my gem is more finish i can give you a link (the engine is realy fast)
bricker_ has joined #ruby
bricker_ is now known as bricker`work
adeponte has joined #ruby
<Amnesia> hm, question, for some reason the multiline option isn't working as I expected it to work
<shock_one_> Hanmac_, better send me a game when you finish writing it in Ruby :-)
<Amnesia> for some reason it's stops at $
<Amnesia> -> \n
jlast_ has joined #ruby
ericwood has quit [Ping timeout: 255 seconds]
beiter has quit [Quit: beiter]
<yoshie902a> havenn: working on it now, running brew doctor and reinstalling the gem
ericwood has joined #ruby
<shock_one_> yoshie902a, I would try to execute some other nokogiri methods to make sure it works properly.
<Amnesia> and the regex I'm using: /.*-(\d{3}-\d{4}).*?(yes|no).*/m
<yoshie902a> shock_one_: the weird thing is that they do, if I have a html string that I type in.
dougireton has quit [Quit: Leaving.]
jlast__ has joined #ruby
<Gate> headius: out of curiosity, have you done memory footprint benchmarks? My google-fu isn't coming up with any
rapha has left #ruby ["bye!"]
<Hanmac_> shock_one_ currently the is no 3d game planned ... maybe an game engine, but not own game (yet)
dougireton has joined #ruby
phinfonet has joined #ruby
jlast has quit [Ping timeout: 248 seconds]
<Hanmac_> but for 2d games there is something planed *g (there is an game-engine planed too, but also an "maker")
Morkel has quit [Quit: Morkel]
<havenn> Amnesia: What are you trying to match? The yes / no? http://rubular.com/r/elfikiQtU1
jlast has joined #ruby
tcstar has quit [Remote host closed the connection]
beckyconning has quit [Quit: beckyconning]
jlast_ has quit [Ping timeout: 245 seconds]
<Amnesia> havenn: the {3}-\d{4} after apps- or contents-, and whether it's downloaded or not
<headius> Gate: we definitely use more memory
<Amnesia> the above regex is working fine for one rule
<Amnesia> but not the others..
<Amnesia> it just omits them
<headius> most of that is due to the JVM always wanting a much larger heap than your working set of data, to make GC more efficient
etcetera has quit [Ping timeout: 255 seconds]
<renanoronfle> Gate, nice man, tks
<Gate> renanoronfle: np
<havenn> Amnesia: If you remove the trailing 'm'?
jduan1981 has quit [Quit: jduan1981]
<yoshie902a> havenn: when I copy and paste the final gem install command in the console, it tried to execute each line separately, if I were to try to use the gem install command in a gem file, do I need to put all the flags on the same line?
<Gate> headius: not surprising, I was just curious as to orders of magnitude. I'm not going to quibble over a few megs of ram if I get a nice speed boost.
<havenn> yoshie902a: Ah, yup - all on the same line
carloslopes has quit [Read error: Connection reset by peer]
ryanh has quit [Read error: Connection reset by peer]
<Amnesia> havenn: nope, same behaviour
<headius> Gate: yeah, it varies greatly on the type of app, data in-memory, number of workers needed, etc
<Gate> Understood
dougireton has quit [Quit: Leaving.]
<havenn> headius: Can't you do crazy stuff like shrink the heap if you want to though?
rboyd_ has joined #ruby
<headius> you can set maximums
jlast__ has quit [Ping timeout: 276 seconds]
carloslopes has joined #ruby
<shock_one_> Amnesia, check line separator value «$/»
tommyvyo has joined #ruby
jlast has quit [Read error: Connection reset by peer]
jlast has joined #ruby
jerius has quit [Ping timeout: 276 seconds]
dougireton has joined #ruby
<Amnesia> shock_one_: sorry, could you please elaborate?
spider-mario has quit [Remote host closed the connection]
<yoshie902a> havenn: what's the syntax to add flags in a gemfile?
<havenn> yoshie902a: Good question. I don't know. Hrm.
<shock_one_> Amnesia, m modifier makes dot match the character in global variable $/. It's usually /n but maybe it's changed somehow in your code.
dougireton has quit [Client Quit]
timonv_ has quit [Remote host closed the connection]
chrismhough has quit [Quit: chrismhough]
timonv has joined #ruby
Elhu has quit [Quit: Computer has gone to sleep.]
<Amnesia> shock_one_: think it's \r\n
ryanh has joined #ruby
ryanh has quit [Max SendQ exceeded]
speakingcode-wor has quit [Remote host closed the connection]
<Amnesia> (it's output from an interactive shell -> expect.rb)
ryanh has joined #ruby
ryanh has quit [Max SendQ exceeded]
<shock_one_> Amnesia, you're using Windows, aren't you? What version of ruby?
<Amnesia> nope, linux
<Amnesia> and both 1.8 and 1.9.1
ryanh has joined #ruby
elux has quit [Quit: Leaving...]
io_syl has joined #ruby
dmiller1 has quit [Ping timeout: 245 seconds]
<shock_one_> It don't think it'll help, but just in case. Try to change $/ to '/n'
stayarrr has quit [Quit: Linkinus - http://linkinus.com]
Spooner has joined #ruby
<shock_one_> Can you upload your code somewhere?
mdw has quit [Read error: Operation timed out]
timonv has quit [Ping timeout: 256 seconds]
mdw has joined #ruby
<Amnesia> shock_one_: sure
Goles has joined #ruby
<Amnesia> /n -> ascii 8 bit ?
<Amnesia> #80
bel3atar has quit [Quit: good bye cruel world]
oz has quit [Ping timeout: 252 seconds]
bel3atar has joined #ruby
miskander has quit [Quit: miskander]
<shock_one_> Amnesia, no idea. It must have the same ord in unicode, though
<Amnesia> ah k
emmanuelux has joined #ruby
whowantstolivef1 has quit [Quit: quit]
<Amnesia> the raw output is: https://privatepaste.com/f29dcbc13f
beckyconning has joined #ruby
<shock_one_> You know what? You typed n instead of m
Monie has quit [Ping timeout: 246 seconds]
<Amnesia> that's cause of: 23:30 shock_one : It don't think it'll help, but just in case. Try to change $/ to '/n'
<Amnesia> "{
Monie has joined #ruby
<Amnesia> :P *, I tried /m before
pu22l3r_ has joined #ruby
hadees has joined #ruby
SCommette has quit [Read error: Connection reset by peer]
<Amnesia> (since that made sense:P)
<shock_one_> OK, you misunderstood me. I wanted you to add this code: «$/ = '/n'»
Dwarf has joined #ruby
bean__ has quit [Quit: Computer has gone to sleep.]
rdark has quit [Ping timeout: 248 seconds]
froginvasion has joined #ruby
<Amnesia> ah, near the top?
<froginvasion> hi all
SCommette has joined #ruby
<shock_one_> Yes. Could you simplify the code somehow so I don't have to figure out how it works?
<froginvasion> I'm confused with Proc and return statement, if someone can bother to explain? My understanding is that a return will break out of the method where it is being called
chrismhough has joined #ruby
<froginvasion> but it's confusing me a lot as in where it actually returns to
<rboyd_> to the caller
<Eiam> ^
<banisterfiend> froginvasion: you ask cool questions :)
phantasm66 has quit [Quit: *sleeeep….]
pu22l3r has quit [Ping timeout: 264 seconds]
<froginvasion> banisterfiend: i have an exam tomorrow about this stuff so.. well yeah :D
<banisterfiend> froginvasion: an exam about ruby? cool
<froginvasion> I wrote a paper comparing smalltalk and ruby
etcetera has joined #ruby
<froginvasion> I have to defend it
atmosx has quit [Ping timeout: 255 seconds]
<Amnesia> shock_one_: adding that $/ assignment, breaks my gets function
<froginvasion> but the gritty details freak me out even though i should know by now... but yeah
<froginvasion> banisterfiend let me reread what you said last time though
<banisterfiend> froginvasion: oh ok, well, in the case of 'return' in a block, pretend the block isnt there
Kakera has quit [Ping timeout: 255 seconds]
<banisterfiend> froginvasion: pretend it was just a bare return statement
pu22l3r_ has quit [Remote host closed the connection]
<banisterfiend> froginvasion: it will behave the same as if it was a bare return statement
<froginvasion> that's my thoughts, but then there's statements in books i've read:
caleb_io has joined #ruby
<Amnesia> shock_one_: the box I'm connecting to isn't windows either, so I guess the newline char \n should be fine
pu22l3r has joined #ruby
<banisterfiend> froginvasion: def hello; proc { return }.call } identical to: def hello; return; end
louisror has quit [Ping timeout: 255 seconds]
<froginvasion> "in a proc, return behaves differently. Rather than return from the proc, it returns from the scope where the proc itself was defined"
asym has quit [Ping timeout: 245 seconds]
dmiller1 has joined #ruby
<froginvasion> and this phrase is what is confusing me :p
plotplanexe has quit [Remote host closed the connection]
<banisterfiend> froginvasion: yes, that's the same as what i said
robert___ is now known as robert_
<shock_one_> Amnesia, don't use it if it doesn't help
metaphori has joined #ruby
<banisterfiend> froginvasion: so. where is proc defined in the def hello example above?
dougireton has joined #ruby
<froginvasion> inside the definition
<banisterfiend> froginvasion: right, so it'll return out of the method definition
<froginvasion> but what happens if the proc was made in a totally different scope?
<froginvasion> like, some other class
pyx has joined #ruby
<Amnesia> shock_one_: ok, "1\n2\n3\n".match(/\d+.*/m) does return all lines :/
<banisterfiend> froginvasion: then it'll return from that totally different scope, if it can. But in many cases that frame has already been popped off the stack so you'll get a LocalJumpError
<froginvasion> so, in other words, Procs are not true closures? or is that not the issue here
<banisterfiend> froginvasion: try this for example: def hello; proc { return }; end; my_proc = hello; my_proc.call #=> Error
<banisterfiend> froginvasion: that's not the issue here
<banisterfiend> (they are true closures)
metaphori has quit [Read error: Connection reset by peer]
<banisterfiend> froginvasion: https://gist.github.com/3be7c70afa7dae578336
<banisterfiend> froginvasion: try to explain why that results in a LocalJumpError
workmad3_ has joined #ruby
<froginvasion> one sec
workmad3 has quit [Ping timeout: 244 seconds]
beckyconning has quit [Quit: beckyconning]
chussenot has quit [Quit: chussenot]
Automorphism has quit [Ping timeout: 248 seconds]
<Eiam> because the local context is gone?
<froginvasion> yeah
<froginvasion> so wait let me try something
<banisterfiend> right
arturaz has quit [Ping timeout: 252 seconds]
<froginvasion> in this case it is gone, but if the block would reference some variable it should still exist
<Eiam> I'm amused that I answered that but I have no idea what that means ;)
techlife has quit [Ping timeout: 252 seconds]
pu22l3r has quit [Ping timeout: 264 seconds]
<banisterfiend> froginvasion: no, the block makes a snapshot of the stack frame
d2dchat has quit [Remote host closed the connection]
<banisterfiend> but that frame is not necessarily still on the stack
<banisterfiend> the block just carries around a snapshot of it
chussenot has joined #ruby
<banisterfiend> 'return' only makes sense if the frame is still actually on the stack
<shock_one_> Amnesia, This code works correctly too. https://gist.github.com/c58cce48d37e36c902d6 Is my input good enough? Maybe the problem isn't in the regex?
failshell has quit [Remote host closed the connection]
<Amnesia> hm guess so yes
wf2f has quit [Read error: Connection reset by peer]
<Amnesia> I think expect is the problem
xbayrockx has joined #ruby
xbayrockx is now known as wf2f
<banisterfiend> froginvasion: i recommend u read the book 'ruby under the microscope' it explains all this stuff in lots of detail
<Eiam> banisterfiend: so a block carries around a potentially invalid picture of reality?
<banisterfiend> froginvasion: it even shows you the YARV instructions that are generated
Guedes0 has quit [Ping timeout: 256 seconds]
w400z has quit []
xsarin has quit [Quit: xsarin]
tommyvyo has quit [Quit: http://twitter.com/tommyvyo]
<blazes816> AcidBlock
arya_ has quit [Ping timeout: 264 seconds]
<banisterfiend> Eiam: no, it's how closures work, it carries around its environment
<froginvasion> hm, okay. it's very odd, i had a code example in my paper showing the difference between proc and lambda in case of returns, and it worked previously, but since reinstallation it gives a localjumperror like you said
<banisterfiend> so all the locals and so on
<banisterfiend> the 'self' the __method__ etc
<Eiam> banisterfiend: right, but in the case of this example, there are no locals
luisalima has quit [Ping timeout: 245 seconds]
dougireton has quit [Remote host closed the connection]
<Eiam> so the closure is empty?
<froginvasion> it still carries self, regardless of no vars i think
<banisterfiend> Eiam: environment is more than just locals, it's lots of stuff
tatsuya_o has quit [Read error: Connection reset by peer]
arya has joined #ruby
tatsuya_o has joined #ruby
<banisterfiend> it carries around cref/default definee/self/the current 'block', and so on
<Eiam> banisterfiend: but its missin the stuff that allows it to return up, because that stuff is gone ?
techlife has joined #ruby
techlife has quit [Max SendQ exceeded]
mdw has quit [Ping timeout: 276 seconds]
<froginvasion> that's also where im puzzled, despite the explanation
<Eiam> froginvasion: glad I'm not defending this ;) I've always sucked at understanding this stuff, I just write code. and sometimes it works.
techlife has joined #ruby
techlife has quit [Max SendQ exceeded]
<Eiam> banisterfiend: if the closure is supposed to contain stuff, how can it not be found in the context, the whole point of the closure is to.. enclose your context
<banisterfiend> froginvasion: youer' confusing the copy of the local environment that the proc carries around with the _actual_ stack frame?
<Eiam> so its valid when you want it
peteyg has joined #ruby
Kuifje has quit [Ping timeout: 256 seconds]
<havenn> We need to add Matz to Programming Lang Inventor or Serial Killer? site! http://www.malevole.com/mv/misc/killerquiz/
techlife has joined #ruby
techlife has quit [Max SendQ exceeded]
elico has joined #ruby
__BigO__ has quit [Remote host closed the connection]
<froginvasion> lets get one think straight that i'm not confusing again (im tired, so doesn't help):
<peteyg> Is "class MyClass << ModuleName" equivalent to "class MyClass; extend ModuleName"?
<banisterfiend> Eiam: i dont understand your q :)
<banisterfiend> peteyg: no
<Eiam> froginvasion: sorry i'll step out o the conv im no helping
<banisterfiend> peteyg: your first example isnt valid ruby ;)
<peteyg> banisterfiend: Okay, got it.
<froginvasion> Eliam dw about that, keep talking
<Eiam> banisterfiend: gonna go snag a drink, I probbably don't even understand what I'm asking ;)
<banisterfiend> hehe
<Eiam> still working on SICP =p
<banisterfiend> froginvasion: let me show you something
<froginvasion> ok banisterfiend
<peteyg> banisterfiend: I see things like class MyClass << self, I'm guessing that's Ruby's metaprogramming at work? Making addition's the existing class definitions?
Rix has quit [Ping timeout: 248 seconds]
ccsidiot has joined #ruby
<banisterfiend> froginvasion: does this page load for you? http://www.ruby-doc.org/core-1.9.3/Binding.html
<froginvasion> peteyg you are correct. The construct you just typed is one that changes the context of self
<ccsidiot> Hi there
<froginvasion> yes it does
<banisterfiend> froginvasion: cool, well *that* is really what a proc carries around with it
philcrissman has quit [Remote host closed the connection]
kold_ has joined #ruby
<banisterfiend> that's the 'eenvironment' that it is the snapshot of a given stack frame
v0n has quit [Quit: WeeChat 0.4.0]
<ccsidiot> I have a quick question. I am new to Ruby, I wonder how do I change Time.now to get in a particular timezone
caleb_io has quit [Quit: caleb_io]
techlife has joined #ruby
techlife has quit [Max SendQ exceeded]
metaphori has joined #ruby
<ccsidiot> I tried getLocal("-8:00") however, it's expecting only 0 argument.
workmad3_ is now known as workmad3
<banisterfiend> froginvasion: you can even go Proc#binding to get it directly, and you can eval() code inside it
techlife has joined #ruby
Monie has quit [Quit: Quit]
interactionjaxsn has quit [Remote host closed the connection]
<banisterfiend> froginvasion: so your question is this: how can a proc fail to 'return' from its stack frame when it's always carrying it around with it, is that right?
<froginvasion> yes. That's the thing i dont get :)
metaphori has quit [Client Quit]
elico has quit [Quit: elico]
tommyvyo has joined #ruby
griffindy has quit [Quit: Computer has gone to sleep.]
<froginvasion> let me just get this straight with an example
<froginvasion> one sec
tommyvyo_ has joined #ruby
<Hanmac_> banisterfiend: do you like class A;binding().eval(File.read("moduleB"));end that is turned into A::B ?
<banisterfiend> froginvasion: ok, the answer is that the thing it carries around with it is just a *copy* of a given stack frame, it's just there to support 'closure' behaviour, it's not the real stack frame. 'return' only works for a real stack frame, so it'll only work if the frame actually still exists on the stack
<banisterfiend> Hanmac_: yeah we use that in pry quite a bit
<banisterfiend> Hanmac_: better to do: binding.eval(File.read("moduleB.rb"), "moduleB.rb") though, so that source_location works properly :)
<shock_one_> banisterfiend, Proc.new doesn't create a new stack frame?
<froginvasion> wait, step by step. Lets look at this:
benlieb has quit [Quit: benlieb]
<froginvasion> this doesnt work, because it can't return from top-level, correct?
linux01 has joined #ruby
<Hanmac_> it would be cool if the is an class A; load:_into("moduleB");end :P
breakingthings has quit []
<froginvasion> or because the stack frame is gone?
<banisterfiend> froginvasion: yes, because 'return' doesnt make sense at top-level
<banisterfiend> froginvasion: no, it just doesnt make sense
jtharris has quit [Quit: WeeChat 0.3.9.2]
<banisterfiend> froginvasion: not because top-level doesn't exist (because it does) but because 'return' is meaningless there, it's not a method context
<ccsidiot> I have a quick question. I am new to Ruby, I wonder how do I change Time.now to be in a particular timezone, I tried using Time.now.getlocal("+8:00"), it showed me getlocal should be having 0 arguments
sorbo_ has joined #ruby
<Hanmac_> froginvasion: image you are standing on "Start" and someone says to you "return" and you are puzzles where you need to return
<yoshie902a> I'm getting this warning, could this be the problem.. WARNING: Nokogiri was built against LibXML version 2.7.3, but has dynamically loaded 2.7.8
<yoshie902a> how would I go about resolving the warning
alanp_ has joined #ruby
<banisterfiend> froginvasion: so, yeah, ok, there's two situations return wont work: 1. the proc was defined in a method and that method frame is no longer on the stack 2. the proc was not defined in a method so 'return' has no meaning, it doesnt make sense to use it
<Hanmac_> yoshie902a: reinstall the nokogiri gem
benlieb has joined #ruby
Takehiro has joined #ruby
alanp_ has joined #ruby
<froginvasion> banisterfiend, alright, i think my brain is starting to get the hang of it :D
ryanh has quit [Quit: Computer has gone to sleep.]
<mnemon> ccsidiot: should work .. irb(main):003:0> Time.now.getlocal("+01:00") => 2013-01-24 00:01:24 +0100
allsystemsarego has quit [Quit: Leaving]
<froginvasion> i think i'll read the book you said sometime, but not before tomorrow ;)
apeiros_ has quit [Remote host closed the connection]
RORgasm has quit [Remote host closed the connection]
<froginvasion> I hope my questions are not too dumb though :).
<shock_one_> banisterfiend, you almost destroyed my world, but proc sure does create a stack frame https://dl.dropbox.com/u/608214/scrn/1358982091.png
apok has quit [Quit: apok]
<ccsidiot> I have a quick question. I am new to Ruby, I wonder how do I change Time.now to be in a particular timezone
<workmad3> shock_one_: to my understanding, stack frames are reasonably irrelevant to this discussion :)
<banisterfiend> shock_one_: i know, lots of things create stack frames: methods, class definitions, blocks, lambdas, eval strings, etc
alanp has quit [Disconnected by services]
alanp_ is now known as alanp
<froginvasion> ccsidiot http://www.ruby-doc.org/core-1.9.3/Time.html did you check this first?
<workmad3> shock_one_: they're a bit of a red herring
aeontech has quit [Ping timeout: 245 seconds]
epylinkn has joined #ruby
blacktulip has quit [Remote host closed the connection]
etcetera has quit [Ping timeout: 255 seconds]
tenmilestereo has quit [Quit: Leaving]
<froginvasion> banisterfiend thanks for your help
<froginvasion> we will meet again
<banisterfiend> np keep asking interesting questions
<banisterfiend> goodluck
Takehiro has quit [Ping timeout: 248 seconds]
kold_ has quit [Remote host closed the connection]
etcetera has joined #ruby
froginvasion has quit [Quit: Leaving]
Rym has quit [Read error: Connection reset by peer]
<shock_one_> ccsidiot, If you can use activesupport, here is the method you want http://api.rubyonrails.org/classes/DateTime.html#method-i-in_time_zone
Rym has joined #ruby
<workmad3> banisterfiend: does ruby under a microscope get into the details of how the behaviour of 'return' changes between a proc and a lambda?
hydrozen has quit [Quit: Computer has gone to sleep.]
<banisterfiend> workmad3: yes i think so
<banisterfiend> workmad3: it's really thorough about blocks/procs/lambdas
Goles has quit [Quit: Computer has gone to sleep.]
emocakes has quit [Quit: emocakes]
<workmad3> I guess they're some of the more interesting bits of ruby, from an implementation perspective
<banisterfiend> yeah, it's really cool to learn about it
<Hanmac_> interersting bits? what about that you can subclass TrueClass? :D
<workmad3> Hanmac_: yeah, but what would you do with it? :P
<Hanmac_> >> "p class A << TrueClass;end"
<eval-in> Hanmac_: Output: "" (http://eval.in/7449)
plotplanexe has joined #ruby
plotplanexe has quit [Changing host]
plotplanexe has joined #ruby
<shock_one_> Why do we need different return behaviour in lambdas and procs?
mneorr has quit [Remote host closed the connection]
<Hanmac_> workmad3 i would forbit it, like its forbidden to make subclasses of singleton classes
bradhe has joined #ruby
jimeh has joined #ruby
Kingy has joined #ruby
mneorr has joined #ruby
beckyconning has joined #ruby
Rix has joined #ruby
<workmad3> Hanmac_: I can see your point
<workmad3> Hanmac_: however, I can also see that doing so would introduce annoying edgecases that makes the implementation more complex, probably needlessly
bradhe has quit [Remote host closed the connection]
nari has joined #ruby
bradhe has joined #ruby
forced_request has joined #ruby
<ccsidiot> I have a quick question. I am new to Ruby, I wonder how do I change Time.now to be in a particular timezone
beilabs has joined #ruby
MattRB has joined #ruby
gyre007 has quit [Remote host closed the connection]
<Hanmac_> workmad3: try to make an instance of a a childclass of TrueClass :D
jrist is now known as jrist-afk
<workmad3> Hanmac_: I know, subclassing is useless ;)
bradhe has quit [Read error: Connection reset by peer]
<ccsidiot> :(
<workmad3> Hanmac_: however, prohibiting subclassing of a few specific classes also seems useless, and also arbitrary
bradhe has joined #ruby
rboyd_ has quit [Ping timeout: 244 seconds]
<shock_one_> They could introduce final class concept, like in Java
dougireton has joined #ruby
RagingDave has quit [Quit: Ex-Chat]
jonahR has quit [Quit: jonahR]
techlife has quit [Ping timeout: 252 seconds]
<ccsidiot> I have a quick question. I am new to Ruby, I wonder how do I change Time.now to be in a particular timezone
techlife has joined #ruby
MattRB has quit [Quit: This computer has gone to sleep]
<Hanmac_> shock_one_ no, final is bad, i saw it in C++11 too, but only the basics of the Basics class (True,False,Nil) does not make sense when subclassign
<workmad3> Hanmac_: does it make sense to introduce an idea of an un-inheritable class purely for those 3 classes though?
<workmad3> Hanmac_: I see that as un-necessary complication personally :)
<workmad3> Hanmac_: while being able to subclass them is an amusing foible more than un-necessary complication :)
b1rkh0ff has quit [Ping timeout: 248 seconds]
hydrozen has joined #ruby
EPIK has joined #ruby
<shock_one_> ccsidiot, Time.now - hours*3600
MattRB has joined #ruby
stopbit has quit [Quit: Leaving]
answer_42 has quit [Ping timeout: 276 seconds]
<shock_one_> I would implement the inherited callback in these classes like this: def inherited(d); raise CantInheritException; end
chridal has quit [Quit: leaving]
<shock_one_> Clever, huh?
Xeago has quit [Remote host closed the connection]
krainboltgreene has joined #ruby
mjolk has quit [Ping timeout: 276 seconds]
<Hanmac_> >> p (Object.constants - [:Config]).select {|c| Object.const_get(c).is_a?(Class) && !Object.const_get(c).respond_to?(:new) }
<eval-in> Hanmac_: Output: "[:NilClass, :TrueClass, :FalseClass, :Encoding, :Symbol, :Integer, :Fixnum, :Float, :Bignum, :MatchData, :Method, :UnboundMethod, :Binding, :RubyVM, :Rational, :Complex]\n" (http://eval.in/7450)
chridal has joined #ruby
<Hanmac_> workmad3 that is my list of this classes where subclassing is useless
<banisterfiend> shock_one_: what's the rationale behind disallowing subclassing?
apok has joined #ruby
etcetera has quit []
<shock_one_> banisterfiend, I have no idea.
chridal has quit [Client Quit]
toekutr has joined #ruby
chridal has joined #ruby
<banisterfiend> workmad3: do u know? :)
<Hanmac_> hm the Data class is an evil one too
MattRB has quit [Quit: This computer has gone to sleep]
<workmad3> banisterfiend: Hanmac_ objects to being able to subclass from a limited number of core ruby classes
etcetera has joined #ruby
<workmad3> banisterfiend: on the grounds that subclassing them is useless :)
<banisterfiend> workmad3: i mean in general, what's the purpose of a sealed/final class?
<banisterfiend> in c#/java
<workmad3> banisterfiend: oh... there
<workmad3> I guess to indicate that this class is not suitable for subclassing
postmodern has joined #ruby
Guest__ has joined #ruby
<workmad3> which does make sense if you've got a good, strict separation between abstract classes for inheritance and concrete leaf classes that shouldn't be inherited from
joshman_ has quit [Ping timeout: 248 seconds]
MattRB has joined #ruby
nirix has joined #ruby
alex__c2022 has quit [Quit: alex__c2022]
main has quit [Ping timeout: 246 seconds]
nirix has left #ruby ["Textual IRC Client: www.textualapp.com"]
Guedes0 has joined #ruby
beckyconning has quit [Quit: beckyconning]
<shock_one_> banisterfiend, Wikipedia says that Java final classes works faster. Also in C++ bad things happen when class not designed for deriving (without virtual destructor) is subclassed
<banisterfiend> workmad3: it just doesnt seem like the part of OOD tha should be emphasized, at least not nearly to the point of it being a language feature
chridal has quit [Client Quit]
TheFuzzball has quit [Quit: Computer has gone to sleep.]
<workmad3> banisterfiend: I'd agree :)
Kingy_ has joined #ruby
chridal has joined #ruby
<workmad3> banisterfiend: and shock_one_ makes a good point with C++ at least, a non-virtual destructor in a class in C++ should be, on its own, a strict 'no inheriting' error on compilation IMO
embs_ is now known as embs
Kingy has quit [Ping timeout: 244 seconds]
<workmad3> banisterfiend: I guess it's really down to trust at the end of the day... a lot of java is about not trusting developers IMO... java security stuff baked into the VM that allows an admin to determine what apps can call what methods... final classes so that library authors and 'architects' can dictate who is allowed to inherit from what... because the bottom rung of developers can't be trusted to know what they're doing
<workmad3> banisterfiend: which is potentially a bleak and cynical way of looking at java as a whole
b1rkh0ff has joined #ruby
mahmoudimus has quit [Quit: Computer has gone to sleep.]
jgarvey has quit [Quit: Leaving]
<workmad3> banisterfiend: and java as a whole emphasises more class-based design than I think is good... but if you're emphasising it, it makes sense to put in controls, because the java ideal is that if you can just get that perfect class hierarchy into your app, and then seal your classes to ensure your perfect model is free from being tinkered with unexpectedly, then your application will be perfect
hadees has quit [Quit: hadees]
<banisterfiend> workmad3: actually, i guess it makes sense
<banisterfiend> workmad3: because subclasses get access to the private interface of a class
<workmad3> ah I'd forgotten about that :)
dougireton has quit [Quit: Leaving.]
<banisterfiend> so, if you allow subclassing on any old class, client code can break when they use your private interface (which they're allowed to do)
<workmad3> wait, I thought it was the protected interface that subclasses could access?
solidoodlesuppor has quit [Quit: ChatZilla 0.9.89 [Firefox 18.0.1/20130116073211]]
alanp has quit [Ping timeout: 244 seconds]
elico has joined #ruby
<workmad3> or are we talking about ruby again? :)
<banisterfiend> workmad3: hm, i'm corrupted by ruby...our 'private' is equivalent to 'protected' in java/c++
emmanuelux has quit [Remote host closed the connection]
<shock_one_> In Java you have to make immutable classes final because subclassing can break immutability.
tommyvyo_ has quit [Quit: http://twitter.com/tommyvyo]
<jblack> I think that private in ruby isn't actually really that private.
<shock_one_> nopper, subclasses can only access protected methods.
griffindy has joined #ruby
<Hanmac_> jblack yeah because in ruby you can access nearly everything :D
thillux has quit [Remote host closed the connection]
friskd has quit [Quit: friskd]
<banisterfiend> yeah the difference between protected/private in ruby is really tiny
nfk has quit [Quit: yawn]
<jblack> right. it's more like a "You get both pieces when you break this" warning right before you dive off into introspection. =)
emptyflask has quit [Remote host closed the connection]
<banisterfiend> shock_one_: how can subclassing break immutability
jimeh has quit [Quit: Computer has gone to sleep.]
mmercer has quit [Ping timeout: 276 seconds]
<LiquidInsect> I like to warn people in comments that if I catch someone using send to get around a provate-declared method I will make fun of their hair
<LiquidInsect> doesn't generally help
jlast has quit [Remote host closed the connection]
b1rkh0ff has quit [Read error: Connection reset by peer]
<banisterfiend> hehe
h4mz1d has joined #ruby
<shock_one_> If you have a list of object of your immutable class (which can include instances of subclasses, remember?) you can't be sure that all the objects will remain the same.
baphled has joined #ruby
elico has quit [Ping timeout: 244 seconds]
halph has quit [Read error: Connection reset by peer]
skcin7 has joined #ruby
god has joined #ruby
god is now known as Guest57178
MattRB has quit [Quit: This computer has gone to sleep]
elico has joined #ruby
<shock_one_> I hope you just pasted wrong link?
dougireton has joined #ruby
andrewhl has quit [Remote host closed the connection]
segv- has quit [Quit: segv-]
tommyvyo has quit [Quit: http://thomasvendetta.com]
SCommette has quit [Quit: SCommette]
alanp has joined #ruby
MattRB has joined #ruby
Rym has quit [Quit: Rym]
statarb3 has quit [Quit: Leaving]
Coolhand|laptop has quit [Ping timeout: 255 seconds]
colonolGron has joined #ruby
nateberkopec has quit [Quit: Linkinus - http://linkinus.com]
<shock_one_> sonne, I have a question for you, guys. It's generally known, that you can't access singleton class of one object from another object. But there is one exception when you actually can do it. What is that exception?
miskander has joined #ruby
friskd has joined #ruby
Rizzle has quit [Ping timeout: 245 seconds]
chussenot has quit [Quit: chussenot]
friskd has quit [Remote host closed the connection]
<shock_one_> Is it my client changing words or is it some server settings?
kiyoura has joined #ruby