Topic for #ruby is now Ruby programming language || ruby-lang.org || RUBY SUMMER OF CODE! rubysoc.org/ || Paste >3 lines of text in http://pastie.org || Para a nossa audiencia em portugues http://ruby-br.org/
odinswand [odinswand!~odinswand@27-32-234-171.static.tpgi.com.au] has joined #ruby
<apeiros_> Phrogz_: by what logic? I don't see how that's modulo…
<Phrogz_> arex\: I hope you're still there :)
<Phrogz_> apeiros_: I felt that there must be some method involving adding before or after and then modding. Anyhow, no longer important. I'm just finishing it up now.
<Phrogz_> Ready for you to make it far more elegant.
<apeiros_> Phrogz_: hardly
<apeiros_> I must be around 2‰
aetaric [aetaric!~aetaric@74-130-83-237.dhcp.insightbb.com] has joined #ruby
<Phrogz_> arex\: http://pastie.org/3272874
<Phrogz_> (And apeiros_, for elegance time)
<apeiros_> DECODE = ENCODE.invert
<arex\> I'm here
<Phrogz_> invert!
<arex\> Checking it out now
<apeiros_> even drunk I'm still AWESOME!
<ishikawa> "There is a method for that"
<Moxon> ur not
<apeiros_> ur mom?
<Phrogz_> apeiros_: Never knew that one, thanks.
<apeiros_> Phrogz_: I wished there was an invert that'd map the keys to arrays
<Phrogz_> apeiros_: For collisions?
<apeiros_> i.e. {:a => 1, :b => 1, :c => 2}.multi_invert # => {1 => [:a, :b], 2 => [:c]}
<apeiros_> yes
<apeiros_> what's the antonym of accumulate?
<Moxon> distribute ?
<apeiros_> ooh, nice
<apeiros_> invert_accumulate and invert_distribute?
<apeiros_> hm
<arex\> disperse
odinswand [odinswand!~odinswand@27-32-234-171.static.tpgi.com.au] has joined #ruby
<Moxon> much better!
<apeiros_> code looks fönni
oakesy [oakesy!~anonymous@host-2-99-81-100.as13285.net] has joined #ruby
tyraeltong [tyraeltong!~tyraelton@li381-238.members.linode.com] has joined #ruby
dwon [dwon!~dwon@2607:f2c0:a000:c0:217:31ff:fe53:f7c7] has joined #ruby
<apeiros_> fuck, how much is 1oz in a sane metric system?
<apeiros_> ah, 0.0295735296L it seems
<Phrogz_> arex\: reload http://pastie.org/3272874 On average the encoded is 28.2% the size of the original
<Phrogz_> Wait, less.
<Moxon> Q: what is a good ruby lang online reference which I might even use offline (something like the pragmatic programmers guide) for 1.8 and beyond?
<Phrogz_> 25.06%
<Phrogz_> Moxon: ri?
<apeiros_> wtf? if I drink a bottle of vodka I'm at 3.5‰?
<mpapis> apeiros_: is that bad ?
<Moxon> Phrogz_: sound good. Still I need really basic information like what is a class variable and how to initialize it.
<apeiros_> mpapis: well, from the page that converted "gender + weight + drink + time" to BAC: "Above 2.5‰: Serious health issues, including death"
<arex\> Phrogz_: Cool!
<mpapis> apeiros_: I was at max 8 ... so 3.5 is not highest
<arex\> Phrogz_: Thanks so much. Still working on my own weird one just to try :) Will end up using yours :P
<mpapis> anyone: is https://github.com/genki/gem_plugin a good choice or there are more decent alternatives for ruby/gems/plugins ?
sdwrage [sdwrage!~sdwrage@cpe-184-57-83-165.columbus.res.rr.com] has joined #ruby
cook1es [cook1es!~chatzilla@c83-248-93-185.bredband.comhem.se] has joined #ruby
<Phrogz_> Is there a better way to hard-set the last two bits of a number than num = num & 0b11111100 + num_less_than_4 ?
<Moxon> another question: if I plan to develop stuff in ruby with a near term deliery time (6 months), shall I stick to 1.8 or adjust to 1.9+?
gentz [gentz!ilab@ancient.webfoundation.net] has joined #ruby
<shevy> Moxon well. 1.8 is kinda not actively developed anymore
<shevy> the better way is to try and write ruby code that works on both versions for now
youdonotexist [youdonotexist!~youdonote@68.178.70.244] has joined #ruby
mikeric [mikeric!~mike@S0106c03f0e8b23f3.vc.shawcable.net] has joined #ruby
Jelco [Jelco!~jelco@portal42.net] has joined #ruby
Jelco [Jelco!~jelco@unaffiliated/jelco] has joined #ruby
<Moxon> shevy: is it really worthwhile to enable both versions? I _am_ able fix the version so ...
<shevy> which is somewhat easy. don't use "foo: bla" notations in hashes ... dont use "->" ... and watch out for your Encoding if you have a need to for that (like, if you use german umlauts)
<shevy> dunno
<shevy> I am on 1.8.x :)
<Moxon> 1.8.7 my distro tells me.
<shevy> Encoding is still my main gripe with 1.9.x
<shevy> I have a 1.9.3 here to test my code too
aldo33 [aldo33!~Antony79@host153-110-dynamic.53-79-r.retail.telecomitalia.it] has joined #ruby
<shevy> ruby 1.8.7 (2011-12-28 patchlevel 357) [i686-linux]
aldo33 [aldo33!~Antony79@host153-110-dynamic.53-79-r.retail.telecomitalia.it] has quit [#ruby]
<shevy> and
<shevy> ruby 1.9.3p0 (2011-10-30 revision 33570) [i686-linux]
<Moxon> Somehow I do not consider encoding a key element - at least for me. I am more concerned about language features and incompatibilities.
<Moxon> kubuntu gives you: ruby 1.8.7 (2011-06-30 patchlevel 352) [x86_64-linux]
<shevy> yeah, if you use UTF-8 for instance and have no need for any fancy characters then encoding won't be an overly huge problem
<shevy> there are not that many incompatibilities really
<Moxon> excatly!
<shevy> key: value change ... some more warnings...
<Moxon> hm.
<shevy> like "circular requires detected" warning
<Moxon> I really should have a look at some comparioson documents.
<shevy> I think case when also disallows when "bla": call_method, the : is forbidden now I think in case/when
<shevy> these are really just small things IMO
<Moxon> ic.
<shevy> one funny new warning was...
<shevy> "mismatched indent detected" :)
<Moxon> lol
<Moxon> sounds like python ...
mikepack [mikepack!~mikepack@c-174-51-77-22.hsd1.co.comcast.net] has joined #ruby
<shevy> yeah but there was some other error before that code
<shevy> oh
<Phrogz_> arex\: Reload; made decode 10% faster
<shevy> I found it hilarious though
<shevy> parse.c: "mismatched indentations at '%s' with '%s' at %d",
* Moxon agrees.
sandstrom [sandstrom!~sandstrom@unaffiliated/sandstrom] has joined #ruby
<shevy> if (parser->parser_token_info_enabled) {
<shevy> rb_compile_warn(ruby_sourcefile, linenum,
<Moxon> whitespace should be largely irrelecant.
<Moxon> -c+v
<shevy> static void
<shevy> token_info_pop(struct parser_params *parser, const char *token)
<shevy> yeah it is a bit odd
<Phrogz_> You know what would be hawt? Take this library written for LUDS and rewrite it for an arbitrary set of characters.
boulderdan [boulderdan!~boulderda@c-24-9-63-217.hsd1.co.comcast.net] has joined #ruby
<shevy> I think that was what guido said about python, if there would be one thing to change, or?
<shevy> he'd change the indent requirement
<arex\> Phrogz_: Here is mine, but I haven't incorporated the pad bits yet: http://pastie.org/3272959
<Moxon> shevy: that would be a hughe change to the language. Although indenting is good for readability.
<shevy> yes but the thing is without proper indent, the language breaks
<ishikawa> ugh javascript
<ishikawa> needs indent requirements
<shevy> I think no programming language should fail on a wrongful indent, that sounds a bit like an unclean design
daidoji [daidoji!~123fakema@108-206-96-25.lightspeed.okldca.sbcglobal.net] has joined #ruby
<shevy> but then again I think most programming languages suck anyway
<Moxon> shevy: fully agreed. in the end it is a cosmetical requirement which enhances some -abilities in code but the compiler should be smarter than that.
<shevy> I often want to omit "end" in ruby
<Moxon> I do like the {} from C and C++.
<Moxon> less visual static.
<shevy> what I dont understand is... in python, even though you have indent, you need to use :
<shevy> def foobar():
<shevy> I hate the ":"
MxBot [MxBot!~rbot@178-26-92-180-dynip.superkabel.de] has joined #ruby
josefig [josefig!~josef@187.156.91.147] has joined #ruby
josefig [josefig!~josef@unaffiliated/josefig] has joined #ruby
<Moxon> my favourites are C++ and ruby having been able to program logo, prolog, beta, eiffel, c, c++, assembler, java, perl, python, bash, emacs lisp
<Moxon> and gawk
<shevy> "How does the compiler parse the indentation?"
<shevy> that part is a good read
<shevy> "In the following table, you can see the tokens produced on the left, and the indentation stack on the right."
statarb3 [statarb3!~CoreD@546A56AA.cm-12-3b.dynamic.ziggo.nl] has joined #ruby
statarb3 [statarb3!~CoreD@unaffiliated/statarb3] has joined #ruby
<shevy> why don't we have a page about ruby with that information about the stack handling and parser handling!
<shevy> <INDENT> <if> <bar> <:> [0, 4]
<shevy> hmm off topic
<shevy> "\n" is newline but what is "\r" standing for? redo? restart?
<Moxon> really OT ... talking about ASCII history.
akem [akem!~akem@unaffiliated/akem] has joined #ruby
<Moxon> is it still in UTF-8?
akem [akem!~akem@unaffiliated/akem] has joined #ruby
<ishikawa> Carriage return, '\r'
<Moxon> reminds me of the early beginngs when people still used typewriters
<Moxon> and printer basically have been automated typewriters.
<ishikawa> These characters are based on printer commands
<ishikawa> why don't we return to stacks of punched cards? :)
<Moxon> ishikawa: my prof alked about that ... really ancien history!
bwlang [bwlang!~anonymous@static-71-245-233-146.bstnma.fios.verizon.net] has joined #ruby
tyraeltong_ [tyraeltong_!~tyraelton@210.74.149.155] has joined #ruby
kajico [kajico!~kajico@24-155-117-50.dyn.grandenetworks.net] has joined #ruby
<kajico> had no idea there were that many ruby rooms in freenode
<shevy> ah thanks ishikawa
<shevy> will associate \r with "return" (of the carriage) in my brain
stephenjudkins [stephenjudkins!~stephen@199.223.122.34] has joined #ruby
<shevy> my brain likes simple mappings
<shevy> kajico there should be only three main ones more or less. #ruby ... #ruby-lang and #rubyonrails
<shevy> the "official" channel for Ruby is #ruby-lang
bootris [bootris!~bootris@69-196-167-37.dsl.teksavvy.com] has joined #ruby
<kajico> figured as much, was just trying to find the most active room to ask questions on
looopy [looopy!~looopy@c-68-34-92-100.hsd1.md.comcast.net] has joined #ruby
Phrogz [Phrogz!~phrogz@pdpc/supporter/professional/phrogz] has joined #ruby
<shevy> well rails channel for rails obviously so that leaves two. on #ruby there are more newbies, and some older folks on #ruby-lang refuse to be here, so it depends. It mostly depends on people who can try to help. #ruby is more easy going than #ruby-lang though, the amount of people banned from #ruby-lang can be fairly high :P
friskd [friskd!~friskd@cpe-76-172-2-7.socal.res.rr.com] has joined #ruby
odinswand [odinswand!~odinswand@27-32-234-171.static.tpgi.com.au] has joined #ruby
milkpost_ [milkpost_!~dec@173-28-195-157.client.mchsi.com] has joined #ruby
<kajico> hahaha, well that's good to know.
<Phrogz> Though I'd say those banned from #ruby-lang are generally with good reason.
<Phrogz> But perhaps I'm an old man on his porch.
wyhaines [wyhaines!~wyhaines@65.39.118.15] has joined #ruby
<kajico> so, on to my problem at hand, guess this is a good a place as any to ask. Anybody familiar with HTTP class in Ruby, specifically making Post requests?
<wroathe> So I understand that a = b and c would evaluate to be a == b with the keyword and. What happens in this situation? @node = node_object if @parent_node and @other_parent_node
PaciFisT [PaciFisT!~PeaCE@CPE0023be436752-CM0023be436750.cpe.net.cable.rogers.com] has joined #ruby
<wroathe> would it stop at the first parent_node and not evaluate the other_parent_node?
bootris [bootris!~bootris@69-196-167-37.dsl.teksavvy.com] has joined #ruby
<wroathe> Actually this looks like a better question for IRB :P
<shevy> Phrogz nah. I remember a few situations where people got banned for getting into an argument with zenspider.
chiel [chiel!~chiel@kunkels.me] has joined #ruby
<chiel> Hi guys. Is there a ruby equivalent for php's "isset()" ?
<shevy> wroathe those situations always confuse me. I try to avoid things that confuse me too
<chiel> basically I want to check if a key is set in the post data
<wroathe> Well I'm dealing with legacy code.
<banisterfiend> chiel: hash.key?
<shevy> chiel, perhaps if defined?("foo"). or, if it is a key in a hash, you can try .has_key? perhaps
<wroathe> And in case you were wondering it does evaluate the last object
<shevy> wroathe that's always the best :D
mikeric [mikeric!~mike@S0106c03f0e8b23f3.vc.shawcable.net] has joined #ruby
<Phrogz> wroathe: defined? is what you want (it's not a method, shevy, so no parend needed) but usually that's a bad sign if you need to use it.
<Phrogz> wroathe: Sorry, that was meant for chiel
<chiel> shevy: yeah, i get the params variable, I am using sinatra
<Phrogz> chiel: Yes, param.key?( "..." )
<chiel> alright, cheers. :)
<Phrogz> chiel: For future reference, params is just a Hash, so: http://www.ruby-doc.org/core-1.9.3/Hash.html
<kajico> Anybody mind giving this a once over, it's driving me insane: http://pastie.org/3273146 basically I keep getting an error from a REST api that I'm using that says I'm not passing the body, but I have another exact same usage for authenticating that works just fine. It's not the REST service because when I use curl with the data I'm passing through it works just fine.
bootris [bootris!~bootris@69-196-167-37.dsl.teksavvy.com] has joined #ruby
mando [mando!~mando@99-39-117-82.lightspeed.austtx.sbcglobal.net] has joined #ruby
<chiel> hmm.. it doesn't seem to be doing what I work
<chiel> basically, I want to check if a checkbox has been checked
ctp [ctp!~ctp@dslc-082-083-157-081.pools.arcor-ip.net] has joined #ruby
<chiel> any ideas? :)
<bootris> no ix i had kratom a few times it is cheap ill say that
<Phrogz> kajico: I don't know what that means, sorry
<kajico> you could try != nil but i'm not familiar with rails enough to know how it handles the post or get data you're passing.
<Phrogz> chiel: notchecked = params['foo'].nil? || params['foo'].empty?
flazmot [flazmot!~root@69-196-167-37.dsl.teksavvy.com] has joined #ruby
<chiel> kajico: I'm not using rails. :)
<chiel> Phrogz: seems just doing checked = params[:name] ? 1 : 0 does the trick :)
<chiel> Phrogz: thanks though! :)
<bootris> good to see the ubigraphclient lib in the OC repository. The other benefit of this is not having the messy install process. You can delete the libubigraphclient-hack directory
<Phrogz> chiel: Good enough :)
<chiel> yeah, it's just so easy, huh :)
<Phrogz> (Yes, that works because checkboxes do not submit any value if unchecked, and all string values in Ruby are truthy.)
scannon [scannon!~sean@adsl-69-221-162-74.dsl.akrnoh.ameritech.net] has joined #ruby
<chiel> yeah, i was just wondering if there was somehow a cleaner way to do it, that's all. :)
<Phrogz> chiel: Well, not if you want a 1 versus a 0.
<Phrogz> IF you just want the boolean, .key? would do it for you.
jranck88 [jranck88!~jranck88@c-76-27-192-84.hsd1.or.comcast.net] has joined #ruby
Jelco [Jelco!~jelco@unaffiliated/jelco] has joined #ruby
gigamonkey [gigamonkey!~user@adsl-99-155-192-199.dsl.pltn13.sbcglobal.net] has joined #ruby
strat-o-caster [strat-o-caster!~strat-o-c@pool-70-109-163-238.cncdnh.east.myfairpoint.net] has joined #ruby
kajico [kajico!~kajico@24-155-117-50.dyn.grandenetworks.net] has joined #ruby
zakwilson [zakwilson!~quassel@c-69-180-70-100.hsd1.fl.comcast.net] has joined #ruby
blueadept [blueadept!~blueadept@unaffiliated/blueadept] has joined #ruby
<mpapis> anyone: is https://github.com/genki/gem_plugin a good choice or there are more decent alternatives for ruby/gems/plugins ?
<davidcelis> mpapis: looks old
<mpapis> but also the code is pretty valid, and I would write something similar
danibx [danibx!~danibx@187.104.236.95] has joined #ruby
<arex\> Phrogz apeiros_: im done with my own! http://pastie.org/3273264
<arex\> i'm not claiming it's good :P
LiquidInsect [LiquidInsect!~billabney@c-98-208-52-180.hsd1.ca.comcast.net] has joined #ruby
<burgestrand> chiel: it’s often better to generate a hidden field with a value of 0, in the case where you might actually want a value if the checkbox is unchecked
Jelco [Jelco!~jelco@portal42.net] has joined #ruby
Jelco [Jelco!~jelco@unaffiliated/jelco] has joined #ruby
thomasdebenning [thomasdebenning!~thomasdeb@c-69-181-139-137.hsd1.ca.comcast.net] has joined #ruby
jranck88 [jranck88!~jranck88@c-76-27-192-84.hsd1.or.comcast.net] has quit [#ruby]
<shevy> hmm why is Hash#rehash required?
fayimora [fayimora!~fayimora@95.175.159.8] has joined #ruby
<apeiros_> shevy: for when you do stupid things like mutating one of your keys
scannon [scannon!~sean@adsl-69-221-161-193.dsl.akrnoh.ameritech.net] has joined #ruby
<arex\> Phrogz: i'll use yours, since mine is 4 times slower :P
<Phrogz> :)
<chiel> burgestrand: yeah, possibly :)
<chiel> will check more tomorrow... now bed! :D
<chiel> o/
<Phrogz> arex\: I feel like someone with serious pack/unpack skills could make a much faster version.
sdwrage [sdwrage!~sdwrage@cpe-184-57-83-165.columbus.res.rr.com] has joined #ruby
mpabst [mpabst!~mpabst@c-67-188-8-151.hsd1.ca.comcast.net] has joined #ruby
SamWhited [SamWhited!~SamWhited@c-71-56-64-198.hsd1.ga.comcast.net] has joined #ruby
<arex\> Phrogz: Hmm. With our compression scheme = 102 MB - with symbols = 97 MB
jackerran [jackerran!~jackerran@71-8-67-189.dhcp.leds.al.charter.com] has joined #ruby
<Phrogz> Awww...
<Phrogz> That's the memory footprint of the app?
<arex\> yes
<Phrogz> I guess there are a lot of duplicates.
<arex\> no
<Phrogz> Well, at least more than 4x duplicates.
<arex\> but there may be another reason
<Phrogz> No? You sure?
<arex\> yes, because it's the keys im compressing
<Phrogz> Tried a .uniq.length?
rickmast [rickmast!~rickmasta@pool-71-183-247-164.nycmny.fios.verizon.net] has joined #ruby
<arex\> Phrogz: i'm converting words in a wordlist into "LUDS" format, then counting them, basically
<Phrogz> But that's certain to result in tons of duplicates, no?
<arex\> only one element in the hash is created?
<Phrogz> Oh, I see; gotcha. Huh.
<arex\> Phrogz: What is so annoying is that I'm reading a 20 MB file, but I need 97 MB to store that hash. Using symbols.
<Phrogz> What about symbols of our compressed version? :)
<arex\> oh
<arex\> interesting
<arex\> Phrogz: 69 MB! Nice.
c0rn [c0rn!~c0rn@50-0-142-2.dsl.dynamic.sonic.net] has joined #ruby
<Phrogz> Yay :D
<arex\> it's still a factor of 3.5 which feels weird
jfoley [jfoley!~jfoley@c-67-173-240-154.hsd1.co.comcast.net] has joined #ruby
<arex\> i mean, there's even much less information than in the file
i8degrees [i8degrees!~i8degrees@ip70-178-131-208.ks.ks.cox.net] has joined #ruby
<apeiros_> arex\: hu? why do you convert the wordlist to LUDS?
<shevy> convert to LULS!
<arex\> apeiros_: lower, upper, digits, symbols... analysis
<Phrogz> heh
<arex\> I can post the complete code
<apeiros_> I see
<apeiros_> so "Foo9" would be ULLD ?
<arex\> yes!
<apeiros_> and performance matters?
<apeiros_> also space consumption matters?
<arex\> my memory usage is horrible
<apeiros_> each word becomes a hash key - why a hash?
Xerife [Xerife!~Soarez@a79-169-26-117.cpe.netcabo.pt] has joined #ruby
<apeiros_> as in - if the LUDS is the key, what's the value?
<arex\> a count
<arex\> 0, 1, 2...
<arex\> here is the code, the offending line is marked :P https://github.com/arex1337/Passpal/blob/master/passpal.rb#L329
mikeric [mikeric!~mike@S0106c03f0e8b23f3.vc.shawcable.net] has joined #ruby
<Phrogz> arex\: The question is, why is it interesting that there are 6524 ULLDs in your source database?
<apeiros_> if it wasn't 3 o clock in the morning, I could probably speed your thing up quite a bit
<arex\> Phrogz: password analysis: http://thepasswordproject.com/passpal
moshee [moshee!~moshee@c-50-135-229-127.hsd1.wa.comcast.net] has joined #ruby
moshee [moshee!~moshee@unaffiliated/moshee] has joined #ruby
<arex\> apeiros_: guaranteed. maybe i'll catch you in a similar mood later :D
<Phrogz> arex\: Your README.md is not very illuminating :p
<arex\> Phrogz: if you click it, it is!
<apeiros_> arex\: between 20.00 and 22.00 CET would be your best bet
<arex\> apeiros_: i'll set an alarm ;P
<apeiros_> I'm usually bored around that time but too lazy to work on anything serious
<apeiros_> (yeah, no, sorry, no offense, but foreign work is not considered serious :-p)
<arex\> hehe
<arex\> hah, i got him to run it. backd00red!
<arex\> (jk)
wilmoore [wilmoore!~wilmoore@c-67-190-17-108.hsd1.co.comcast.net] has joined #ruby
<apeiros_> arex\: you could probably precompute a bit to improve performance. e.g. a lookup table for 4 chars to LUDS. it'd be only 256 entries. can be stored in marshal if you don't want to compute it on every boot.
<apeiros_> hm
<apeiros_> I should get some sleep. I can watch the gears & sprockets in my brain turning…
bjensen [bjensen!~brianj@3007ds3-ar.0.fullrate.dk] has joined #ruby
<arex\> apeiros_: hmm
<apeiros_> arex\: look at String#tr
<apeiros_> might be of help for the initial conversion to luds on a character basis
<arex\> precompute for just length 4? then check words 4 chars at a time, then compute anything str.length != 4?
<arex\> yeah, probably a good idea to use tr instead of gsub
<apeiros_> e.g. tr("A-Za-z0-9", "U"*26+"L"*26+"D"*10)
<apeiros_> precompute the arguments too
<apeiros_> or write them out
* apeiros_ lazy
<apeiros_> arex\: yes, precompute only for length 4. the remaining 0-3 chars you can use a 1 char lookup table. alternatively you can extend the LUT
<arex\> memory usage is my main problem atm, will it help that?
<apeiros_> oh, actually you could use the precomputed one for 4 chars and just pad it for the lookup, and cut the result.
<apeiros_> should. less objects generated.
<apeiros_> you could use unpack("N*") to iterate over the 4 byte packages
<apeiros_> since that'll yield fixnums - no objects created at all
<apeiros_> (Fixnums are immediates, they're stored in the VALUE)
<apeiros_> actually the padding idea is great - you can then just override the last 2 bits with the padding info as discussed a few hours ago
poindontcare [poindontcare!~user@cloudbovina.bovinasancta.com] has joined #ruby
ePirat [ePirat!~ePirat@p57A97A2F.dip.t-dialin.net] has joined #ruby
ePirat [ePirat!~ePirat@unaffiliated/epirat] has joined #ruby
<arex\> hm
<apeiros_> anyway, I'm gonna get some sleep
<apeiros_> gn8
<bootris> I love you
<arex\> wat
guns [guns!~guns@c-98-228-72-208.hsd1.il.comcast.net] has joined #ruby
sonkei [sonkei!~sonkei@d14-69-26-171.try.wideopenwest.com] has joined #ruby
looopy [looopy!~looopy@c-68-34-92-100.hsd1.md.comcast.net] has joined #ruby
<flazmot> http://arbornet.org/~flamoot/telepathic-critterdrug.html artificial consciousness evolver for linux and windows
<arex\> is there a platform agnostic way of getting the memory amount consumed by the current ruby script?
[RHQme]stringo0 [[RHQme]stringo0!~JLstring@bas1-toronto42-1279600537.dsl.bell.ca] has joined #ruby
<arex\> platform independent, whatever
mikeric [mikeric!~mike@S0106c03f0e8b23f3.vc.shawcable.net] has joined #ruby
banisterfiend [banisterfiend!~baniseter@118.82.185.158] has joined #ruby
guns [guns!~guns@c-98-228-72-208.hsd1.il.comcast.net] has joined #ruby
slippyd [slippyd!~slippyd@pool-71-241-153-24.nycmny.fios.verizon.net] has joined #ruby
<slippyd> Howdy all.
<slippyd> Would anyone know if there's a length limit on string in Ruby?
<canton7> available memory?
poindontcare [poindontcare!~user@cloudbovina.bovinasancta.com] has joined #ruby
techhelp [techhelp!~Dan@ip70-162-10-229.ph.ph.cox.net] has joined #ruby
LiquidInsect [LiquidInsect!~billabney@c-98-208-52-180.hsd1.ca.comcast.net] has joined #ruby
maletor [maletor!~maletor@c-69-181-24-86.hsd1.ca.comcast.net] has joined #ruby
gilaniali [gilaniali!63e6b48a@gateway/web/freenode/ip.99.230.180.138] has joined #ruby
<gilaniali> Hi. What is the main difference between gets and stdin.gets? When is each suitable for use
ghosTM55 [ghosTM55!~user@li279-245.members.linode.com] has joined #ruby
<slippyd> canton7: Not 2,147,483,647 characters?
ph^ [ph^!~ph^@84.212.225.74] has joined #ruby
ank [ank!~ank@c-67-172-16-188.hsd1.pa.comcast.net] has joined #ruby
Mon_Ouie [Mon_Ouie!~Mon_Ouie@subtle/user/MonOuie] has joined #ruby
<slippyd> The RString struct looks to have a ‘long len;’ in it. That would make the limit the length of a unsigned 32-bit int, unless I'm missing somethign.
<banisterfiend> slippyd: long is 64 bits on 64 bit systems
<slippyd> Alright, 2,147,483,647 or 9,223,372,036,854,775,807.
<slippyd> But not unlimited?
<slippyd> Nor limited by system RAM?
<gilaniali> banisterfiend: Where did you pull up this info from? It seems incomplete?
<banisterfiend> slippyd: pointer is 32/64 bit too, so that's all that's addressable anyway
<banisterfiend> gilaniali: how is it incomplete
<banisterfiend> gilaniali: it's both docs + code for each method
bier [bier!~bier@p5085DF48.dip.t-dialin.net] has joined #ruby
<banisterfiend> gilaniali: it's $stdin.gets and then gets
eighty4 [eighty4!~eighty4@unaffiliated/eighty4] has joined #ruby
<slippyd> 8 exabytes of strings. ;-)
asuka_ [asuka_!asuka@home.hadiko.uni-karlsruhe.de] has joined #ruby
<gilaniali> banisterfiend: ah ok, thanks, going through it now
wereHamster [wereHamster!~tomc@unaffiliated/werehamster] has joined #ruby
hSATAC [hSATAC!~cat@221.169.252.14] has joined #ruby
<burgestrand> " " * 9_223_372_036_854_775_806 isn’t working very well for me
<burgestrand> I think I need more ram
ezkl [ezkl!ezkl@ezkl.net] has joined #ruby
<canton7> I suspect there's probably the restriction of contiguous memory
<gilaniali> banisterfiend: is it common to use STDIN.gets or gets generally?
<banisterfiend> gilaniali: $stdin.gets is more common than STDIN.gets
<gilaniali> banisterfiend: you mean stdin.gets is more common than gets?
csherin [csherin!~csherin@202.164.151.110] has joined #ruby
<slippyd> member:banisterfiend: True.
msch [msch!~msch@static.74.108.46.78.clients.your-server.de] has joined #ruby
fortysixandtwo [fortysixandtwo!~fortysixa@77.40.186.166] has joined #ruby
MekkisFreenode [MekkisFreenode!~MekkisFre@2a00:dd0:0:6:80a6:4fff:fec7:d456] has joined #ruby
poindontcare [poindontcare!~user@cloudbovina.bovinasancta.com] has joined #ruby
rickmasta [rickmasta!~rickmasta@pool-71-183-247-164.nycmny.fios.verizon.net] has joined #ruby
i8degrees [i8degrees!~i8degrees@ip70-178-131-208.ks.ks.cox.net] has joined #ruby
zakwilson [zakwilson!~quassel@c-69-180-70-100.hsd1.fl.comcast.net] has joined #ruby
srid [srid!u3297@gateway/web/irccloud.com/x-kgcxzszjpmlwevnq] has joined #ruby
Emmanuel_Chanel [Emmanuel_Chanel!star2@L057107.ppp.dion.ne.jp] has joined #ruby
davidcelis [davidcelis!~david@c-76-115-58-79.hsd1.or.comcast.net] has joined #ruby
marcoshack_br [marcoshack_br!~mhack@c9345b97.virtua.com.br] has joined #ruby
<marcoshack_br> hi there
<marcoshack_br> I'm facing a problem with rb-fsevent on Mac OS X Lion
MekkisFreenode [MekkisFreenode!~MekkisFre@2a00:dd0:0:6:80a6:4fff:fec7:d456] has joined #ruby
<marcoshack_br> Any clue?
akem [akem!~akem@unaffiliated/akem] has joined #ruby
<mpapis> marcoshack_br: i might be wrong but do you have osx-gcc-installer or Xcode ?
<bootris> hi akem.. how are you?. well...people talk a lot here im seeing
<marcoshack_br> mpapis: Xcode
MoMo [MoMo!u1590@gateway/web/irccloud.com/x-xhjozxmhjmqrrrss] has joined #ruby
davidboy [davidboy!u3228@gateway/web/irccloud.com/x-dexqyhbcriqjskwd] has joined #ruby
<mpapis> marcoshack_br: that's all I could ask, as I remember it requires Xcode, maybe version is wrong ?
akem [akem!~akem@unaffiliated/akem] has joined #ruby
bluehavana [bluehavana!u2820@gateway/web/irccloud.com/x-aozcshgrtxjhkhyr] has joined #ruby
<marcoshack_br> mpapis: I'm using Xcode 4.1 Build 4B110, I'll take a look on rb-fsevent documentation to see if there's any restrictions
<marcoshack_br> mpapis: thanks!
milkpost_ [milkpost_!~dec@173-28-195-157.client.mchsi.com] has joined #ruby
<mpapis> marcoshack_br: Xcode 4.1 seams perfectly sane version (the last one with GCC included) ... I would be surprised if it would be not supported
<marcoshack_br> mpapis: yeah, you should be right. anyway, do you use spork/guard/fsevent on Mac OS X Lion?
poindontcare [poindontcare!~user@cloudbovina.bovinasancta.com] has joined #ruby
blueadept [blueadept!~blueadept@72.21.137.199] has joined #ruby
blueadept [blueadept!~blueadept@unaffiliated/blueadept] has joined #ruby
stephenjudkins [stephenjudkins!~stephen@c-76-115-1-70.hsd1.or.comcast.net] has joined #ruby
<mpapis> marcoshack_br: sorry i dont have it installed, just "gem install fsevent" right ? ... but as i remember we removed Xcode from that server ... so this might be an issue
a_a_g [a_a_g!~aag@115.109.9.44] has joined #ruby
marcoshack_br [marcoshack_br!~marcoshac@c9345b97.virtua.com.br] has joined #ruby
<slippyd> marcoshack_br: gcc --version ?
<marcoshack_br> slippyd: gcc version 4.2.1 (Based on Apple Inc. build 5658) (LLVM build 2335.15.00)
radic_ [radic_!~radic@dslb-178-002-239-184.pools.arcor-ip.net] has joined #ruby
<burgestrand> marcoshack_br: what is the problem?
<slippyd> The dastardly LLVM-only.
randym [randym!~randym@EM1-112-61-182.pool.e-mobile.ne.jp] has joined #ruby
<slippyd> build.
<marcoshack_br> burgestrand: rb-fsevent is not detecting file changes
dagnachewa [dagnachewa!~dagnachew@modemcable142.238-179-173.mc.videotron.ca] has joined #ruby
<slippyd> I've had numerous issues with it. Backed down to Snow Leopard (for now), but it might be worth looking into that osx-gcc-installer thing.
<burgestrand> I’ve had the same issues; I recall at that moment rb-fsevent noticed changes but fired the wrong events.
<burgestrand> Was nearly half a year ago now though.
<marcoshack_br> probably that one
wmoxam [wmoxam!~wmoxam@pdpc/supporter/active/wmoxam] has joined #ruby
<marcoshack_br> slippyd: I'll take a look on that
<slippyd> marcoshack_br: I haven't tried it myself; just going of off @mpapis's suggestion.
<slippyd> I'm curious myself if that'll help/fix your issue.
<mpapis> marcoshack_br: slippyd ... ok i'm rvm maintainer and rvm by default uses GCC=/usr/bin/gcc-4.2 ... this way no LLVM would be used
odinswand [odinswand!~odinswand@27-32-234-171.static.tpgi.com.au] has joined #ruby
Phrogz [Phrogz!~phrogz@pdpc/supporter/professional/phrogz] has joined #ruby
poindontcare [poindontcare!~user@cloudbovina.bovinasancta.com] has joined #ruby
looopy [looopy!~looopy@c-68-34-92-100.hsd1.md.comcast.net] has joined #ruby
p0y_ [p0y_!~p0y@112.210.35.138] has joined #ruby
<marcoshack_br> (sorry by the newbie question, but is there a way to see old messages in a IRC channel? my client crashed and I think I loose some messages about the rb-fsevent conversation)
techhelp [techhelp!~Dan@ip70-162-10-229.ph.ph.cox.net] has quit ["Leaving"]
<Phrogz> marcoshack_br: I don't know of anyone logging this channel, so you need to either have logs saved by your client, or find someone awake in here who does.
<Phrogz> I don't think I was in here when such a discussion took place, so I have no helpful logs.
<marcoshack_br> Phrogz: thanks anyway! just activated my client's log :)
<bootris> it's a nice little language. (Case in point: {} + [] === 0 -> true :)
odilontalk [odilontalk!odilontalk@187.65.142.32] has joined #ruby
hasrb [hasrb!~hasrb@108-85-134-26.lightspeed.austtx.sbcglobal.net] has joined #ruby
drknus [drknus!~user@142.68.215.147] has joined #ruby
<marcoshack_br> slippyd: it's looks like osx-gcc-installer just install exactly the same tools (gcc, llvm etc) without the Xcode itself
<slippyd> Damn.
<marcoshack_br> using Apple source code actually
wroathe [wroathe!~wroathe@173-17-249-11.client.mchsi.com] has joined #ruby
<mythmon> how can I have two files, a.rb and b.rb, and refer to functions written in a.rb from b.rb?
poindontcare [poindontcare!~user@cloudbovina.bovinasancta.com] has joined #ruby
zenergi_ [zenergi_!~zenergi@pdpc/supporter/student/zenergi] has joined #ruby
kstephens [kstephens!~kstephens@173-15-46-105-Illinois.hfc.comcastbusiness.net] has joined #ruby
CreativeEmbassy [CreativeEmbassy!~CreativeE@pool-209-158-5-18.altnpa.east.verizon.net] has joined #ruby
zenergi [zenergi!~zenergi@pdpc/supporter/student/zenergi] has joined #ruby
<odilontalk> mythmon maybe the method "require" method
Indian [Indian!~Indian@unaffiliated/londonmet050] has joined #ruby
igotnolegs [igotnolegs!~igotnoleg@75-162-83-166.slkc.qwest.net] has joined #ruby
Mon_Ouie [Mon_Ouie!~Mon_Ouie@subtle/user/MonOuie] has joined #ruby
savage- [savage-!~savage-@c-67-180-11-89.hsd1.ca.comcast.net] has joined #ruby
<mythmon> is the current directory (or the running file) on the search path by default?
<odilontalk> ruby 1.9.2 ?
<banisterfiend> mythmon: ruby doesnt have functions
mztriz [mztriz!~mztriz@74-136-75-114.dhcp.insightbb.com] has joined #ruby
<banisterfiend> mythmon: do you know about OO?
a_a_g [a_a_g!~aag@115.109.9.44] has joined #ruby
nivoc [nivoc!~matthias@ipc-hosting.de] has joined #ruby
<mythmon> i would prefer something that works on 1.8
<mythmon> banisterfiend: everything is a method? there are no bare functions?
<banisterfiend> mythmon: exactly
<odilontalk> mythmon: so, directory '.' already included in load path
<odilontalk> the change seems to be 1.9.2+
<mythmon> banisterfiend: interseting. I mainly know python, where there are both functions and methods.
<banisterfiend> mythmon: Yeah, so, basically a method defined outside of any class/object context becomes a method on the Object class itself
<banisterfiend> mythmon: and since all objects in Ruby inherit from Object, it is effectively the same as a 'function'
<mythmon> except not really :)
<banisterfiend> since it can be invoked anywhere, by anything
<banisterfiend> mythmon: yeah, except not really, in that you can still write to ivars
<banisterfiend> and the ivar that's modified will be the ivar of the receiver
<mythmon> ivars?
<banisterfiend> instance variables
<mythmon> instance variables?
<banisterfiend> Yeah
<slippyd> marcoshack_br: I just checked out the packages for both the 10.6 and 10.7 builds of the OSX GCC Installer.
<slippyd> Both seem to contain the same non-LLVM version of GCC.
<slippyd> I just extracted them to my desktop with Pacifist, but I assume you'd get the same files if you installed it proper.
PnoyGem [PnoyGem!~PnoyGem@c-67-191-136-183.hsd1.ga.comcast.net] has joined #ruby
thomasdebenning [thomasdebenning!~thomasdeb@c-69-181-139-137.hsd1.ca.comcast.net] has joined #ruby
jetblack [jetblack!~jetblack@99-32-20-118.uvs.evtnil.sbcglobal.net] has joined #ruby
<marcoshack_br> slippyd: got it. well, think I've to live without fsevents/guard for now
techsilo [techsilo!techsilo@cpe-67-248-158-164.nycap.res.rr.com] has joined #ruby
wilmoore [wilmoore!~wilmoore@c-67-190-17-108.hsd1.co.comcast.net] has joined #ruby
ershad [ershad!~ershad@117.204.96.239] has joined #ruby
a_a_g [a_a_g!~aag@115.109.9.44] has joined #ruby
poindontcare [poindontcare!~user@cloudbovina.bovinasancta.com] has joined #ruby
wallerdev [wallerdev!~wallerdev@c-68-43-58-191.hsd1.mi.comcast.net] has joined #ruby
jwmann [jwmann!~Adium@modemcable242.110-201-24.mc.videotron.ca] has joined #ruby
tomzx [tomzx!~tomzx@66-77.162.dsl.aei.ca] has joined #ruby
ershad_ [ershad_!~ershad@117.204.107.253] has joined #ruby
fismo [fismo!~fismo@cpe-24-193-156-28.nyc.res.rr.com] has joined #ruby
Axsuul [Axsuul!~Axsuul@75-140-75-52.dhcp.mtpk.ca.charter.com] has joined #ruby
Axsuul [Axsuul!~Axsuul@75-140-75-52.dhcp.mtpk.ca.charter.com] has joined #ruby
Axsuul [Axsuul!~Axsuul@75-140-75-52.dhcp.mtpk.ca.charter.com] has joined #ruby
Axsuul [Axsuul!~Axsuul@75-140-75-52.dhcp.mtpk.ca.charter.com] has joined #ruby
jlogsdon [jlogsdon!~jlogsdon@99-101-69-28.lightspeed.tukrga.sbcglobal.net] has joined #ruby
[[thufir]] [[[thufir]]!~thufir@184.65.42.92] has joined #ruby
Skaag [Skaag!~Skaag@cpe-67-247-51-89.nyc.res.rr.com] has joined #ruby
yoklov [yoklov!~yoklov@24-177-5-183.dhcp.nwtn.ct.charter.com] has joined #ruby
josefig [josefig!~josef@187.156.91.147] has joined #ruby
josefig [josefig!~josef@unaffiliated/josefig] has joined #ruby
randym [randym!~randym@EM1-112-61-182.pool.e-mobile.ne.jp] has joined #ruby
nivoc [nivoc!~matthias@ipc-hosting.de] has joined #ruby
hasrb [hasrb!~hasrb@108-85-134-26.lightspeed.austtx.sbcglobal.net] has joined #ruby
brownies [brownies!~brownies@unaffiliated/brownies] has joined #ruby
dilas [dilas!odilontalk@189.6.73.119] has joined #ruby
poindontcare [poindontcare!~user@cloudbovina.bovinasancta.com] has joined #ruby
Bardosity [Bardosity!~john@202-89-189-137.static.dsl.amnet.net.au] has joined #ruby
mdel [mdel!~mdel@pool-71-175-17-16.phlapa.fios.verizon.net] has joined #ruby
lakewood [lakewood!~user@99-45-120-223.lightspeed.cicril.sbcglobal.net] has joined #ruby
_LowKey [_LowKey!rhel@69.197.60.117] has joined #ruby
gilaniali [gilaniali!63e6b48a@gateway/web/freenode/ip.99.230.180.138] has joined #ruby
<gilaniali> Hi. How do i open a .gem file to read the code inside?
fismo [fismo!~fismo@cpe-24-193-156-28.nyc.res.rr.com] has joined #ruby
<csherin> gilaniali: gem unpack gem_name.gem
<Know1edge> Any of you guys on Forsst ?
looopy [looopy!~looopy@c-68-34-92-100.hsd1.md.comcast.net] has joined #ruby
<RubyPanther> gilaniali: a gem is just a .tar archive named .gem you can also open it with a normal archive tool
tectonic [tectonic!~tectonic@c-67-164-98-164.hsd1.ca.comcast.net] has joined #ruby
Indian [Indian!~Indian@unaffiliated/londonmet050] has joined #ruby
<mpapis> davidcelis: i found something better then the gem: Gem.find_files('pattern/*.rb')
stephenjudkins [stephenjudkins!~stephen@c-76-115-1-70.hsd1.or.comcast.net] has joined #ruby
nivoc [nivoc!~matthias@adsl-71-135-47-253.dsl.pltn13.pacbell.net] has joined #ruby
hasrb [hasrb!~hasrb@108-85-134-26.lightspeed.austtx.sbcglobal.net] has joined #ruby
i8igmac [i8igmac!~bigmac@c-67-185-190-112.hsd1.wa.comcast.net] has joined #ruby
senthil [senthil!~senthil@99-51-1-6.lightspeed.snjsca.sbcglobal.net] has joined #ruby
senthil [senthil!~senthil@99-51-1-6.lightspeed.snjsca.sbcglobal.net] has quit [#ruby]
senthil [senthil!~senthil@99-51-1-6.lightspeed.snjsca.sbcglobal.net] has joined #ruby
i8degrees [i8degrees!~i8degrees@ip70-178-131-208.ks.ks.cox.net] has joined #ruby
jsaak [jsaak!~jsaak@catv-89-134-200-70.catv.broadband.hu] has joined #ruby
<i8igmac> im looking for help with a loop... i have a example, is there a way to block 5 arrays at a time? http://pastebin.com/H05qc8hh
<i8igmac> i dont want to use counters, or while loop
poindontcare [poindontcare!~user@cloudbovina.bovinasancta.com] has joined #ruby
yekta [yekta!~yekta@c-24-1-182-219.hsd1.il.comcast.net] has joined #ruby
<i8igmac> if you have a 100 names, and you want to process 5 at a time, how would you do this?
nerdy [nerdy!~textual@66-44-118-195.c3-0.grg-ubr1.lnh-grg.md.cable.rcn.com] has joined #ruby
wookiehangover [wookiehangover!~wookiehan@c-67-161-138-118.hsd1.co.comcast.net] has joined #ruby
guns [guns!~guns@c-98-228-72-208.hsd1.il.comcast.net] has joined #ruby
<csherin> i8igmac: Enumerable#each_cons
<banisterfiend> i8igmac: or each_slice(5)
<csherin> sorry each_slice applies to you
<csherin> each_cons repeats elements
odinswand [odinswand!~odinswand@27-32-234-171.static.tpgi.com.au] has joined #ruby
hasrb [hasrb!~hasrb@108-85-134-26.lightspeed.austtx.sbcglobal.net] has joined #ruby
dnyy [dnyy!~dnyy@c-98-237-138-38.hsd1.wa.comcast.net] has joined #ruby
<i8igmac> names.each_slice(5){|x| puts x; puts ""}
nwonknu_ [nwonknu_!nwonknu@gateway/shell/anapnea.net/x-lybjvovwrvpkwwsn] has joined #ruby
p0y [p0y!~p0y@125.212.56.150] has joined #ruby
<csherin> i8igmac: names.each_slice(5).map { |slice| slice.map { |name| name.chomp }.join("%3B") }
afex [afex!~kthornhil@wsip-68-225-20-130.oc.oc.cox.net] has joined #ruby
<i8igmac> i was just woprking on that
<i8igmac> thanks
krz [krz!~foobar@unaffiliated/krz] has joined #ruby
poindontcare [poindontcare!~user@cloudbovina.bovinasancta.com] has joined #ruby
savage- [savage-!~savage-@c-67-180-11-89.hsd1.ca.comcast.net] has joined #ruby
keywoard [keywoard!~Adium@190.176.135.158] has joined #ruby
orospakr [orospakr!~orospakr@mobotropolis.orospakr.ca] has joined #ruby
ershad_ [ershad_!~ershad@117.204.107.253] has joined #ruby
ershad [ershad!~ershad@117.204.107.253] has joined #ruby
<keywoard> hi guys I have a doubt i need to install chef gem but whem I run gem install chef this return error like Errno::EINVAL: Invalid argument (http://rubygems.org/gems/net-ssh-2.1.4.gem) so I have to install dependencies one by one anyone knows why is this
<mpapis> keywoard: when do you see this error ?
<keywoard> when I ran gem install c hef
<keywoard> I get this
<keywoard> ERROR: While executing gem ... (Gem::RemoteFetcher::FetchError)
<keywoard> Errno::EINVAL: Invalid argument (http://rubygems.org/gems/erubis-2.7.0.gem)
<keywoard> then I install erubis and I get another gem
<keywoard> i have to install the dependencies manually
<keywoard> I dont know
<keywoard> why
<mpapis> kenperkins: ruby --version ... do you use rvm/rbenv ?
gianlucadv [gianlucadv!~gianlucad@host78-84-dynamic.44-79-r.retail.telecomitalia.it] has joined #ruby
<mpapis> keywoard: ^ ... kenperkins sorry for mentioning you without a reason
keywoard [keywoard!~Adium@190.176.135.158] has quit [#ruby]
<kajico> blargh, anybody familiar with using HTTP classes in ruby?
tk_ [tk_!~tk@p083005.doubleroute.jp] has joined #ruby
apok [apok!~apok@96.24.67.22] has joined #ruby
daglees [daglees!~belvedere@92.62.115.195] has joined #ruby
daglees [daglees!~belvedere@unaffiliated/daglees] has joined #ruby
savage- [savage-!~savage-@c-67-180-11-89.hsd1.ca.comcast.net] has joined #ruby
nwonknu [nwonknu!nwonknu@gateway/shell/anapnea.net/x-caqsubnjohyvdsvt] has joined #ruby
wallerdev [wallerdev!~wallerdev@c-68-43-58-191.hsd1.mi.comcast.net] has joined #ruby
wyhaines [wyhaines!~wyhaines@65.39.118.15] has joined #ruby
thone [thone!~thone@g226048223.adsl.alicedsl.de] has joined #ruby
Truthseeker [Truthseeker!~belvedere@unaffiliated/daglees] has joined #ruby
wilmoore [wilmoore!~wilmoore@c-67-190-17-108.hsd1.co.comcast.net] has joined #ruby
daglees [daglees!~belvedere@92.62.115.195] has joined #ruby
daglees [daglees!~belvedere@unaffiliated/daglees] has joined #ruby
<shevy> kajico not quite so
<kajico> i've been racking my brain over 1 issue and I can't figure out the root cause of it
<shevy> kajico well
<kajico> n/m i just solved it and I am raging like hell...
<shevy> what I often do is stand up, and do something else
<kajico> well i did, i just came back from doing something else
<shevy> in 95% my brain works better when I am not sitting in front of a computer, staring at the problem at hand
<shevy> hmm
<shevy> you didn't write the code on your own, right?
<kajico> i solved it, but it was such a stupid solution because it's not in our internal docs about it being necessary
<shevy> I always hate other people's code :)
<kajico> i'm using online examples, yes, but i'm using a REST api that is in private beta where I work.
<kajico> so it's not like I have a template to go by
vladyn [vladyn!~Adium@78.83.241.70] has joined #ruby
odinswand [odinswand!~odinswand@27-32-234-171.static.tpgi.com.au] has joined #ruby
a_a_g [a_a_g!~aag@115.109.9.44] has joined #ruby
<davidcelis> why hello there shevy
<davidcelis> would you like some more code to hate?
<shevy> hey davidcelis
<shevy> we already have rails code. that's enough to hate
<davidcelis> would you like to see some rails code?
<shevy> no
<shevy> well
<shevy> perhaps if it would be very very beautiful
<davidcelis> oh
<davidcelis> well
<kajico> there should be a rate my code site, like those old hot or not sites where people can pass judgement on your code
<davidcelis> isn't that github?
<shevy> I'd hate it all
<shevy> github is cool
<davidcelis> You have one new pull request from shevy
<davidcelis> "makin ur code not look like shit"
<davidcelis> Aw thanks, shevy
<shevy> nah
<davidcelis> anyway, i'm just excited to share that particular project
<shevy> I just hate other code but I wouldn't make any requests on code style
<davidcelis> it is my first open source project
<shevy> if anything, then solely on features, documentation and bugs
<davidcelis> and i'm proud enough of it
poindontcare [poindontcare!~user@cloudbovina.bovinasancta.com] has joined #ruby
<shevy> I am not a big commenter though. I think in 3 years... I filed a grand total of 8 issues in other projects
<kajico> congrats on both the project and having the patience to sit through a project
Ripp__ [Ripp__!~quassel@70-36-134-239.dsl.dynamic.sonic.net] has joined #ruby
<davidcelis> haha thanks
<davidcelis> it was actually tough not to work on it
<shevy> that's the easy part!
<davidcelis> ive wanted to do this particular engine for a while but finally buckled down and got started on it a few days ago
<shevy> the hard part is maintaining it for the next 10 years to come :)
<davidcelis> pushed the first working version to rubygems last night
<Ripp__> Any suggestions for distributed work queue software that will deal with one of the workers randomly crashing? Some of the machines on the network I'm using are a bit unreliable..
<Ripp__> I've tried RabbitMQ, but don't know how to force the queue to pull back the job if the worker process on one of the machines crashes
yxhuvud [yxhuvud!mongo@h-5-47.a212.priv.bahnhof.se] has joined #ruby
<Ripp__> And it doesn't look like these key store solutions (e.g. Redis) have a way to recover from this sort of error.
baniseterfiend` [baniseterfiend`!~baniseter@118.82.185.158] has joined #ruby
<kajico> have you looked at RabbitMQ's high availability options? http://www.rabbitmq.com/ha.html
bier [bier!~bier@pD9F8F5B5.dip.t-dialin.net] has joined #ruby
<Ripp__> I'll take a look right now
<Ripp__> Ah, but this is for the message broker failing?
<Ripp__> Not the consumers, I suppose?
<Ripp__> Basically my setup is 1 reliable broker, several unreliable worker machine which consume jobs from the broker, then write back their processed job to another queue..
<Ripp__> but i have no control over the reliability of the worker machines
<Ripp__> so i need some sort of callback behavior that let's the workers "peek" at the jobs and only removes the jobs from a queue completely only if the worker has fully processed it
bassplayerdoug [bassplayerdoug!~bassplaye@97-85-153-116.static.stls.mo.charter.com] has joined #ruby
DarFa [DarFa!~DFa@AStrasbourg-252-1-111-151.w109-217.abo.wanadoo.fr] has joined #ruby
<DarFa> Hello
<kajico> you want the workers to monitor what's in queue?
<Ripp__> I want that if the worker pulls a job from the queue and doesn't complete it in 5 minutes, or if we detect that the worker disconnects, the job the worker pulled and was processing gets placed back on the queue
eldariof [eldariof!~CLD@81.200.24.180] has joined #ruby
<Ripp__> if it doesn't finish the job in X minutes, it probably crashed, basically
<Ripp__> thanks, I'll take a look at that
<kajico> looks similar to how heartbeat works http://www.rabbitmq.com/pacemaker.html
randym [randym!~randym@EM114-48-249-107.pool.e-mobile.ne.jp] has joined #ruby
LowKey [LowKey!rhel@unaffiliated/lowkey] has joined #ruby
LowKey [LowKey!~rhel@unaffiliated/lowkey] has joined #ruby
flazmot_ [flazmot_!~root@69-196-187-48.dsl.teksavvy.com] has joined #ruby
a_a_g [a_a_g!~aag@115.109.9.44] has joined #ruby
maustin [maustin!~maustin@c-67-180-233-91.hsd1.ca.comcast.net] has joined #ruby
stayarrr [stayarrr!~olivererx@dslb-188-100-254-093.pools.arcor-ip.net] has joined #ruby
tectonic_ [tectonic_!~tectonic@c-67-164-98-164.hsd1.ca.comcast.net] has joined #ruby
indeterminate [indeterminate!~sei@user-3c2h3m6.cable.mindspring.com] has joined #ruby
<davidcelis> shevy: are you hamstar on github
<shevy> davidcelis wat!
<baniseterfiend`> davidcelis: no u
<shevy> wtf man!
<shevy> I am not a damn hamster!
<davidcelis> could have fooled me
<shevy> death to all hamsters
<shevy> especially the hipsters among them
<baniseterfiend`> shevy: what shall we do to punish davidcelis
<davidcelis> wow my YARD FINALLY generated
macmartine [macmartine!~macmartin@c-24-21-112-60.hsd1.or.comcast.net] has joined #ruby
<davidcelis> took long enough
<shevy> baniseterfiend` he is punished already, he will create many more rails project until one day he will have so many and hate them all and abandon them all
<davidcelis> but... i like rails... :(
<shevy> yeah
<shevy> there are many who do
<davidcelis> :(
<davidcelis> DONT YOU JUDGE ME...
<davidcelis> i think my code looks pretty good despite having used the mess that is rails
<shevy> what have I said about your code, it's you who keeps on mentioning it :)
<davidcelis> lol
<davidcelis> IM JUST SELF CONSCIOUS OKAY MAN GOD
<baniseterfiend`> davidcelis: im sure you'll change your mind about your code in a month's time ;)
<davidcelis> baniseterfiend`: I'm sure I'll hate all of it in four days
<baniseterfiend`> :)
a_a_g [a_a_g!~aag@115.109.9.44] has joined #ruby
jergason [jergason!~jergason@c-67-182-209-164.hsd1.ut.comcast.net] has joined #ruby
c0rn [c0rn!~c0rn@50-0-142-2.dsl.dynamic.sonic.net] has joined #ruby
poindontcare [poindontcare!~user@cloudbovina.bovinasancta.com] has joined #ruby
andrewsmith [andrewsmith!~fullsailo@ip24-250-174-76.ga.at.cox.net] has joined #ruby
azbarcea__ [azbarcea__!~quassel@86.125.232.51] has joined #ruby
a_a_g [a_a_g!~aag@115.109.9.44] has joined #ruby
ershad [ershad!~ershad@117.204.107.253] has joined #ruby
jergason [jergason!~jergason@c-67-182-209-164.hsd1.ut.comcast.net] has quit [#ruby]
r0bby [r0bby!~wakawaka@guifications/user/r0bby] has joined #ruby
iocor [iocor!~textual@unaffiliated/iocor] has joined #ruby
sandstrom [sandstrom!~sandstrom@s213-103-207-56.cust.tele2.se] has joined #ruby
sandstrom [sandstrom!~sandstrom@unaffiliated/sandstrom] has joined #ruby
fullsailor [fullsailor!~fullsailo@ip24-250-174-76.ga.at.cox.net] has joined #ruby
odinswand [odinswand!~odinswand@27-32-234-171.static.tpgi.com.au] has joined #ruby
poindontcare [poindontcare!~user@cloudbovina.bovinasancta.com] has joined #ruby
<kajico> is there a book anybody can recommend for good practices when it comes to writing up classes or hell creating a framework?
VictorMartins [VictorMartins!~VictorMar@87.196.107.112] has joined #ruby
LMolr [LMolr!~quassel@87.19.33.245] has joined #ruby
seivan [seivan!~seivan@cm242.eta204.maxonline.com.sg] has joined #ruby
eka [eka!~eka@181.28.169.86] has joined #ruby
<baniseterfiend`> kajico: 3 books
<baniseterfiend`> kajico: in order: eloquent ruby, ruby design patterns, refactoring: ruby edition
<kajico> thanks for the recommendation
Locke23rus [Locke23rus!~quassel@128-70-13-209.broadband.corbina.ru] has joined #ruby
shevy [shevy!~shevy@178-190-192-237.adsl.highway.telekom.at] has joined #ruby
<davidcelis> baniseterfiend`: no u
Johnnus_ [Johnnus_!~Johnnus_@c80-217-133-221.bredband.comhem.se] has joined #ruby
klaustsen [klaustsen!~klaustsen@c80-217-133-221.bredband.comhem.se] has joined #ruby
tvw [tvw!~tv@e176003108.adsl.alicedsl.de] has joined #ruby
<baniseterfiend`> davidcelis: go watch the tennis bitch
<davidcelis> no
Morkel [Morkel!~Morkel@xdsl-87-78-206-32.netcologne.de] has joined #ruby
flazmot [flazmot!~root@75-119-224-229.dsl.teksavvy.com] has joined #ruby
zakwilson [zakwilson!~quassel@c-69-180-70-100.hsd1.fl.comcast.net] has joined #ruby
poindontcare [poindontcare!~user@cloudbovina.bovinasancta.com] has joined #ruby
jbpros [jbpros!~jbpros@109-186-112-217.dyn.adsl.belcenter.be] has joined #ruby
<baniseterfiend`> davidcelis: i can now intercept arbitrary NameError exceptions, ph33r me
<davidcelis> wut
iocor [iocor!~textual@unaffiliated/iocor] has joined #ruby
<baniseterfiend`> davidcelis: methd_tha_does_not_exist generates a NameError, i can intercept it before it raises and do stuff
<DarFa> How can I declare a static method in ruby ?
<davidcelis> baniseterfiend`: are you talking about magic method_missing? bullshit
<baniseterfiend`> davidcelis: no
<davidcelis> oh ok
<davidcelis> show me
bjensen [bjensen!~brianj@3007ds3-ar.0.fullrate.dk] has joined #ruby
<baniseterfiend`> i'llshow you my generic rb_raise shim rather than th e rb_name_error one
<DarFa> I can't find how to do that in the doc :s
<davidcelis> DarFa: a static method?
<baniseterfiend`> davidcelis: https://gist.github.com/1698107
<davidcelis> what the fuck
<davidcelis> thats C
<DarFa> davidcelis yes
<davidcelis> DarFa: what are you talking about bro
<baniseterfiend`> davidcelis: Yeah it's the only way to hook an exception raised from core
<davidcelis> baniseterfiend`: yeah that code is out of my current skill set lol
<DarFa> davidcelis a method that I can call from the class and not from the instance
<davidcelis> DarFa: oh a CLASS method?
<davidcelis> DarFa: def self.class; ...; end;
<DarFa> maybe I don't know what's the name in ruby, I'm c# dev
<davidcelis> prepending a method with `self.` will define a class method
<csherin> DarFa: class Foo; def self.some_method; end; end
<davidcelis> because you're defining a method on self
<csherin> Foo.some_method
<davidcelis> which is the class
<DarFa> self.my_method #do something end ?
<davidcelis> Foo...
<davidcelis> DarFa: yep
<csherin> or class << self; def some_method; end; end
<davidcelis> DarFa: In that context, self refers to the singleton class
<DarFa> ok thanks a lot, sorry for my stupid question :s
<davidcelis> so you are defining a method on the class itself rather than instances of the class
<davidcelis> no prob
x0F_ [x0F_!~x0F@unaffiliated/x0f] has joined #ruby
<baniseterfiend`> davidcelis: self doesnt refer to the singleton class, it refers to the class itself :)
<davidcelis> yeah i misspake
<davidcelis> MY BAD DARFA
<baniseterfiend`> davidcelis: stop lying to people!!!
<baniseterfiend`> ;)
dilas [dilas!odilontalk@189.6.73.119] has joined #ruby
<nwonknu> The fiend.
Skaag [Skaag!~Skaag@cpe-67-247-51-89.nyc.res.rr.com] has joined #ruby
<kajico> >reading eloquent ruby.
advorak [advorak!~advorak@216-15-16-163.c3-0.161-ubr1.lnh-161.md.cable.rcn.com] has joined #ruby
<kajico> first i'm made to drop semi colons, and now paranthesis
<kajico> this is scary territory
<baniseterfiend`> kajico: you bought it already?
<kajico> safari online subscription, all three are on there
<baniseterfiend`> nwonknu: watch the tennis
<baniseterfiend`> kajico: cool
emmanuelux [emmanuelux!~emmanuel@2a01:e35:2e4d:9010:21d:60ff:fe0e:b818] has joined #ruby
fixl [fixl!~fixl@124-168-118-167.dyn.iinet.net.au] has joined #ruby
<DarFa> do you know why I have an "unexpected keyword_end" error ? http://pastebin.com/jbeAMDQw I don't understand that error
advorak [advorak!~advorak@216-15-16-163.c3-0.161-ubr1.lnh-161.md.cable.rcn.com] has quit ["Leaving"]
advorak [advorak!~advorak@216-15-16-163.c3-0.161-ubr1.lnh-161.md.cable.rcn.com] has joined #ruby
palcu [palcu!~alex@89.122.187.223] has joined #ruby
berserkr [berserkr!~david@212.122.111.205.dyn.user.ono.com] has joined #ruby
<thomasfedb> DarFa, it means you have an extra "end" somewhere. However the real cause of this problem is that you forgot "def" before your function definition.
<kajico> what's the difference between defining the method as self.Method instead of just calling it as self.Method?
n3m [n3m!~bla@188-22-24-249.adsl.highway.telekom.at] has joined #ruby
jamw [jamw!~j@cpc11-orpi3-2-0-cust53.2-3.cable.virginmedia.com] has joined #ruby
ePirat [ePirat!~ePirat@unaffiliated/epirat] has joined #ruby
norex [norex!~quassel@41-133-238-154.dsl.mweb.co.za] has joined #ruby
tvo [tvo!~tvo@katapult/developer/tvo] has joined #ruby
bassplayerdoug [bassplayerdoug!~bassplaye@97-85-153-116.static.stls.mo.charter.com] has joined #ruby
poindontcare [poindontcare!~user@cloudbovina.bovinasancta.com] has joined #ruby
<nwonknu> baniseterfiend`: I don't trust myself with you.
<baniseterfiend`> nwonknu: overcome by feelings of male-male love?
stephenjudkins [stephenjudkins!~stephen@c-76-115-1-70.hsd1.or.comcast.net] has joined #ruby
catphish [catphish!~charlie@2001:9d8:2005:12::3] has joined #ruby
<catphish> how do you detect an EOF with File#read ?
<catphish> ah File#eof? after the read
seivan [seivan!~seivan@cm242.eta204.maxonline.com.sg] has joined #ruby
bigkm [bigkm!~bigkm@60-241-223-44.static.tpgi.com.au] has joined #ruby
oddmunds [oddmunds!~oddmunds@s21-04214.dsl.no.powertech.net] has joined #ruby
faber [faber!~faber@ppp-131-41.26-151.libero.it] has joined #ruby
patrick99e99 [patrick99e99!~patrick@pool-71-105-87-54.lsanca.dsl-w.verizon.net] has joined #ruby
<nwonknu> baniseterfiend`: I'm not male, but sure.
<baniseterfiend`> nwonknu: wow i didnt think females actually existed, i figured you were just a marketing ploy to sell products
odinswand [odinswand!~odinswand@27-32-234-171.static.tpgi.com.au] has joined #ruby
bassplayerdoug [bassplayerdoug!~bassplaye@97-85-153-116.static.stls.mo.charter.com] has joined #ruby
havenn [havenn!~skipper@pool-71-189-127-105.lsanca.fios.verizon.net] has joined #ruby
nd____ [nd____!~nd@mnhm-5f74d1da.pool.mediaWays.net] has joined #ruby
<catphish> is there a way to created a named lock in ruby?
<catphish> i guess just appending a string to an array could suffice
<Asher> what are you wanting to lock
burgestrand [burgestrand!~burgestra@h-45-63.a155.priv.bahnhof.se] has joined #ruby
<baniseterfiend`> Asher: hey raffy
<Asher> hey
<nwonknu> baniseterfiend`: Very bright.
<nwonknu> Asher: How's the MBP?
<Asher> it's great
<catphish> Asher: right now i want to lock rows in a mysql table, i realise mysql has some row-based locking now, but wondered how it could be done in ruby
<baniseterfiend`> Asher: what are the spcs?
<catphish> something along the lines of NamedMutex.run('row10') { code }
<Asher> presumably you want to use the interface to mysql locking
<Asher> baniseterfiend` - nothing new… 17" mbp i7
<catphish> Asher: i know i can probably use innodb's locking in this case, just wondered if ruby had anything like that
<baniseterfiend`> Asher: would you consider upgrading to a top-spec MBA?
Jackneill [Jackneill!~Jackneill@unaffiliated/jackneill] has joined #ruby
<baniseterfiend`> Asher: 17" MBP soumds kind of bulky and ugly
<burgestrand> catphish: make a hash of mutexes keyed by row
<Asher> i'm still waiting for the 27" MBA
<baniseterfiend`> Asher: but im used to 11" MBA already ;)
<catphish> burgestrand: that's a good idea, could get a bit big if they exist forever though
<Asher> anything less than HD resolution is not ok
<baniseterfiend`> Asher: you honestly think they'll release a 27" MBA or are you being a lolcat?
<Asher> nah i don't expect them too but i am going to keep wanting it :P
<baniseterfiend`> Asher: when i want HD i use my imac 27", when i want portability and sex appeal (something that rocks me out) i use my MBA 11"
<baniseterfiend`> MBP 17" seems stuck in a no man's land between the two
<burgestrand> catphish: true, but if you clear them away too soon you’ll get separate mutexes for each locking operation and that’s bad :d
<Asher> nah 17" is the perfect combination of both
<catphish> burgestrand: how about something as simple as a single mutex that checks for the inclusion of the name in an array and appends it
<catphish> then deletes it when its done
<Asher> that is a non-native single threaded solution
mikeric [mikeric!~mike@S0106c03f0e8b23f3.vc.shawcable.net] has joined #ruby
<Asher> why do that when you can ask your db to lock a record
Spockz` [Spockz`!~Spockz@21pc198.sshunet.nl] has joined #ruby
<baniseterfiend`> Asher: i wouldnt call 17" very portable, and i imagine it's pretty damn heavy too
<Asher> super portable
<Asher> i take it everywhere i need
<baniseterfiend`> how heavy is it?
<Asher> 4.5lbs
<baniseterfiend`> Asher: the internet says it's 6.6 pounds
<burgestrand> catphish: yeah, ought to work
<burgestrand> catphish: need to keep a custom list of waiting threads though
<baniseterfiend`> Asher: 6.8 even
<burgestrand> but wouldn’t be too hard just use a conditionvariable to wake them up when ready
<Asher> then it's 6.6 pounds
<Asher> or 6.8
<Asher> what do i give a shit :)
poindontcare [poindontcare!~user@cloudbovina.bovinasancta.com] has joined #ruby
<baniseterfiend`> MBA is barely 2 pounds ;)
<Asher> yeah but MBA is tiny
<catphish> burgestrand: i figured the waiting threads would just loop checking the array, don't know how expensive that will be
<catphish> might be better to use a hash rather than an array anyway
niklasb [niklasb!~codeslay0@p5B31147E.dip0.t-ipconnect.de] has joined #ruby
<catphish> just a hash of {'name' => true}
<catphish> for faster lookups
<burgestrand> catphish: use Set
<catphish> on hash?
<burgestrand> catphish: no, to keep track of which rows are locked
<catphish> ah, never used Set
<catphish> is that like an indexed array?
<Asher> what's teh advantage of Set?
<burgestrand> catphish: it looks like an array but does not take duplicates
<burgestrand> fast lookups
<catphish> This is a hybrid of Array's intuitive inter-operation facilities and Hash's fast lookup.
<burgestrand> uses a hash under the covers
<catphish> awesome, thanks
<Asher> right so why not just use a hash?
<burgestrand> why use a hash when all values you ever store are true and false?
<catphish> actually they'd only ever store true
Houdini [Houdini!~Adium@h81-88-114-126.rev.domonet.ru] has joined #ruby
<burgestrand> Set is pretty much made for that use-case
<Asher> but it's using a hash internally
<catphish> they'd be deleted
<catphish> i doubt Set is written in ruby
<catphish> so its probably more efficient than using Hash
<catphish> though i could be wrong
<burgestrand> It is written in Ruby :)
<catphish> oh yeah!
<catphish> well in that case by using Hash i'd only be rewriting Set
<burgestrand> pretty much
<__null> does anyone here know of any hosting companies (rails, pg, shell) that offer 501(c)(3) discounts?
<catphish> 501(c)(3)?
<__null> irs type charity
<catphish> irs?
<__null> ranging from general to religious to educational to community benefactor
<__null> IRS, USA tax agency
<burgestrand> catphish: something like this maybe: http://pastie.org/private/8hltbd5xg86izqzm3vtnig
<catphish> i think this is the wrong country for that
dpiwowarski [dpiwowarski!~dpiwowars@195.187.156.125] has joined #ruby
<dpiwowarski> Hi.
<__null> the wrong country?
<catphish> lol sorry
<burgestrand> Hm, should probably do the last synchronization in an ensure block
<catphish> i'm in the UK, makes more sense now :)
<__null> well, a company that offers discounts to charities then
<__null> usually a 501(c)(3) is used as a standard for legitimate charities
<__null> but with the messy politics over here that's changing i suppose
<dpiwowarski> Do you know how to check is string has a proper utf8 encoding?
<burgestrand> catphish: this one better: http://pastie.org/private/d8k2ou4dpio0qsf6goktg :p
<burgestrand> dpiwowarski: string.encoding == Encoding::UTF_8 and string.valid_encoding?
<burgestrand> ^^
<dpiwowarski> thank you, I'll try it
<burgestrand> could probably do string.force_encoding('UTF-8').valid_encoding?
<catphish> burgestrand: awesome, thanks
<burgestrand> if you don’t mind changing the encoding from what it were
<catphish> burgestrand: what is Monitor?
<catphish> something smarter than while cond sleep 0.05
<catphish> i assume?
<burgestrand> catphish: it’s pretty much the same as mutex, but it allows for creating special condition variables (new_cond) attached to that lock
<burgestrand> catphish: it’s also re-entrant, which means that the same thread can lock the same lock multiple times without deadlocking
Nss [Nss!~nss@host241-19-dynamic.53-79-r.retail.telecomitalia.it] has joined #ruby
<burgestrand> catphish: the smarter thing is in the @condvar
<catphish> it's cool :)
<burgestrand> catphish: essentially, when you wait on a condvar you’ll only be woken up when the condvar is signalled by somebody else (line #25)
<catphish> oh i see, it doesn't have to poll
<burgestrand> yeah, it’s made to avoid that
<catphish> very cool
<burgestrand> it’s good practice to protect for spurious wakeups, this is why I use @condvar.wait_while { } instead of just an if-statement and no loop
<catphish> doesn't condvar need to be a class variable?
<catphish> or does it broadcast to all of them
<burgestrand> yeah, broadcast wakes up all waiters
<burgestrand> there’s also signal, which only wakes up one
<catphish> isn't there a risk that they all get woken up
<catphish> and all run
<burgestrand> they all will, but they go to sleep again if it’s not their turn yet (known by looking in the @busy line)
mpabst [mpabst!~mpabst@c-67-188-8-151.hsd1.ca.comcast.net] has joined #ruby
<burgestrand> you can improve it by using a condition variable for each name
_md [_md!~mduarte@cpc12-finc13-2-0-cust65.4-2.cable.virginmedia.com] has joined #ruby
<burgestrand> and then use signal instead
<catphish> hmm
<catphish> i'm not totally understand it yet :)
<catphish> for example can't only one wait_while be active at once because of the @monitor.synchronize around it?
<burgestrand> catphish: oh, sorry, thing with condition variables is that they also unlock their given mutex
<dpiwowarski> I've checked it using string.encoding, and looks that all string have utf8 encoding. But when I write it into the mysql db (using ActiveRecord), some diactricits are display wrong. In config/database.yml database is mysql and encoding is set to utf8.
<burgestrand> catphish: I’ll show you one with using only Mutex/ConditionVariable, it’s easier to grasp
<catphish> thanks
<dpiwowarski> I'm using rubyonrails 3.2
<catphish> burgestrand: i think i see, @monitor.synchronize isn't a mutex as i thought, its a Monitor
<dpiwowarski> maybe I should aks about it at rails #
dpiwowarski [dpiwowarski!~dpiwowars@195.187.156.125] has joined #ruby
<burgestrand> catphish: Monitor#synchronize behaves just like Mutex#synchronize, with the difference that you can nest it safely, like monitor.synchronize { puts "inside"; monitor.synchronize { puts "inside again!" } }
<catphish> burgestrand: my only remaining question is what's to stop all the waiting threads waking up simultaneously, does only one "@busy << name" run at once before the next one is woken?
<burgestrand> doing that with Mutex will have your thread wait for itself to unlock the lock
<burgestrand> catphish: when you wake up the threads, they continue execution from where they waited from, in my new code they’ll wake up inside the while-statement on line #19
oddmunds [oddmunds!~oddmunds@s21-04214.dsl.no.powertech.net] has joined #ruby
<burgestrand> catphish: so they all go through the @busy.include?(name) condition before they can continue
<burgestrand> catphish: and if their name is still busy, they go to sleep again
<catphish> is one of those versions better?
<burgestrand> catphish: the first one that uses Monitor instead allows you to do this:
<catphish> thanks for the code, might take me some playing to properly understand it
<burgestrand> catphish: ^
<burgestrand> … actually
<catphish> can that work?
<burgestrand> both allow that
<burgestrand> nevermind me
<burgestrand> they should be the same
<catphish> ok
<burgestrand> :p
<burgestrand> I have a better one coming up
<catphish> i can assure you i won't be nesting a lock of the SAME name :)
<burgestrand> that only wakes up the necessary threads
<catphish> the application is actually a fileserver with distributed backend storage
arash [arash!~arash@sideshowmel.olf.sgsnet.se] has joined #ruby
<burgestrand> this one is trickier in respect to cleaning up
<burgestrand> hmm
<arash> Is (arr << elem) O(1) amortized or does it make a whole realocation making it O(n)? I couldn't find anything about it in the Array Class documentation, anyone know why?
<arash> I'm new to ruby, and I find it very weird that the ruby-doc.org so rarely mention complexities.
<yxhuvud> It doesn't create a new array but instead modifies it inplace. I'd assume that to *not* be O(n)
<arash> Any idea about (arr1 += arr2)? Will it be linear in the size of only the second array or both?
apeiros_ [apeiros_!~apeiros@77-58-113-31.dclient.hispeed.ch] has joined #ruby
<arash> surely (arr1 + arr2) is O(n+m), so I fear += is naively implemented with +.
helpless [helpless!~jotham@unaffiliated/jotham] has joined #ruby
<yxhuvud> += creates a new array, so yes.
<helpless> what's the best way to convert string "1/2" into float 0.5 (and similar fractions)
<guns> helpless: Rational
<guns> Rational('1/2').to_f for instance
Xerife [Xerife!~Soarez@a79-169-26-117.cpe.netcabo.pt] has joined #ruby
jensn [jensn!~Jens@c-83-233-145-148.cust.bredband2.com] has joined #ruby
<apeiros_> arash: so how would you un-naively implement Array#+?
<guns> structural sharing, a la Clojure
<apeiros_> guns: then you lose O(1) access.
<guns> apeiros_: Well, sometimes O(small n) is good enough.
<guns> most of the time, it's good enough
<helpless> guns: that gives me NoMethodError: undefined method `gcd' for "1/2":String
<guns> helpless: ruby 1.9?
<apeiros_> guns: that may be, but don't abuse array for that.
<guns> apeiros_: :)
<helpless> ahh 1.8.7
<apeiros_> guns: also, small n == n
<apeiros_> the O(n+m) in Array#+ is small too (memcpy is pretty fast), it's still n+m
<guns> apeiros_: In the case of a structure-sharing Array implementation, n is the depth of the tree, which can be very shallow
<apeiros_> guns: that does *not* change the effect
<guns> but yeah, I use Array#+ all the time
<apeiros_> the promise of array is O(1) access. make it a tree and it is no longer an *array*
<guns> apeiros_: I don't think you'll like clojure much then :)
<apeiros_> if you want a tree, use a tree.
<apeiros_> guns: if they arbitrarily name datastructures, sure not.
<apeiros_> you don't call a chair a table, just because it's got a surface to put stuff on.
bwlang [bwlang!~anonymous@static-71-245-233-146.bstnma.fios.verizon.net] has joined #ruby
<guns> Even a hashmap is really a tree, and sometimes a simple List when small!
<apeiros_> no guns, it is not at tree.
<guns> crazy, but the tradeoffs are worth it (arguably)
<guns> in *clojure*
bjensen [bjensen!~brianj@3007ds3-ar.0.fullrate.dk] has quit [#ruby]
<apeiros_> great, so they indeed arbitrarily name stuff.
<apeiros_> yeah, you're right, I don't like clojure already.
<guns> apeiros_: However, creating new arrays/maps is O(1)
<guns> so functional patterns work well
<apeiros_> guns: impossible :)
<apeiros_> maybe "creating new arrays from existing ones"
<guns> apeiros_: that's right; (conj my-vector 1) is O(1); no need for full copy
<apeiros_> guns: if you do that n times, you get O(n) too.
<guns> apeiros_: I haven't said anything about _why_ you'd do this crazy thing
conor_ireland [conor_ireland!~conor_ire@89.100.121.49] has joined #ruby
<apeiros_> also, if you do that n times, you get an array with O(n) access time
<apeiros_> unless your conj isn't really O(1) but O(log n), then you can get an array with O(log n) access time.
<apeiros_> but then construction would be O(n log n) by doing n times a conj, and you get O(log n) access - yay trees. yay big-O
<guns> O(1) is constant time, regardless of (count array)
<guns> so yes
<guns> O(1)
dilas [dilas!odilontalk@189.6.73.119] has joined #ruby
<apeiros_> guns: as said, then it's impossible to create an array with O(1) or even O(log n) access time from doing n conj's
<guns> apeiros_: My point is that the same operation in Ruby is O(n)
<apeiros_> guns: my point is that that's NOT AN ARRAY.
<apeiros_> you know, datastructures have names for a reason.
<guns> :) I never argued that point. It is a fancy tree
<apeiros_> the reason being that you know which operation has what cost.
cousine [cousine!~cousine@196.218.42.9] has joined #ruby
<apeiros_> your clojure "Array" is not an array, it's operations have entirely different costs than what the name implies.
<guns> The point of this exercise is to ensure these data structures are immutable
<apeiros_> that's f'ing stupid, sorry.
<guns> no locking necessary, no concurrency headaches
<apeiros_> guns: that's fine with me, but don't use a name that implies something entirely different than what you have.
<guns> It's not called an array
<guns> it's called a List or Vector
<apeiros_> guns: great, so we're comparing different data structures.
<apeiros_> that's good, you know.
<guns> It fills the same rols
robbinn [robbinn!c136435d@gateway/web/freenode/ip.193.54.67.93] has joined #ruby
<apeiros_> but if you want that, you can get that in ruby too.
<guns> I would love to have that, personally
helpless [helpless!~jotham@unaffiliated/jotham] has quit [#ruby]
indeterminate [indeterminate!~sei@user-3c2h3m6.cable.mindspring.com] has joined #ruby
kirun [kirun!~kirun@78-86-154-194.zone2.bethere.co.uk] has joined #ruby
<baniseterfiend`> guns: you just got owned pretty heavily ;)
<guns> baniseterfiend`: Do you think? If we would like to be technical, Ruby Arrays are really implemented as linked lists of pointers, no?
<baniseterfiend`> guns: no, they're a thin wrapper over C arrays actually
canton7 [canton7!~canton7@87-194-161-58.bethere.co.uk] has joined #ruby
<guns> regardless, lists-as-trees are viable replacements for arrays for most uses, and have nice properties
<guns> that's all i claimed
bwlang [bwlang!~anonymous@static-71-245-233-146.bstnma.fios.verizon.net] has joined #ruby
<apeiros_> they're pointer arrays. yes, they have pointers, no, they're not linked lists.
<robbinn> hi
<apeiros_> linked lists don't have O(1) access either
<apeiros_> that'd be fascinating, really.
<robbinn> i have a file with that : foo foo ; bar
<arash> apeiros_, I think += need not be naively implemented with +
<robbinn> i need to delete : ; bat
<robbinn> i need to delete : ; bar
<arash> apeiros_, why not just append all elements of the rhs to the lhs array
<apeiros_> arash: you want Array#concat
<apeiros_> that does that
<arash> is it not concat! then?
<apeiros_> no
<apeiros_> it is not push! or shift! either for that matter.
<arash> ah, naturally, thanks apeiros_
<apeiros_> yw
<arash> btw, is there any real reason for += is implemented with +?
fayimora [fayimora!~fayimora@95.175.159.34] has joined #ruby
<apeiros_> arash: yes, the reason is that `a <op>= b` expands to `a = a <op> b`
<apeiros_> (with the notable exception of `a ||= b`, which expands to `a || a = b`
<robbinn> did you have a solution ?
<apeiros_> robbinn: what did you try?
<robbinn> to delete last caracter
<robbinn> i have that hello ; world
jsj [jsj!~jsj@78-70-253-105-no149.tbcn.telia.com] has joined #ruby
<robbinn> i need to delete ; world
<robbinn> in a string
<robbinn> its possible that ; 1
<robbinn> or ; foo
<apeiros_> robbinn: use sub/gsub with a regex
Fraeon [Fraeon!hartin@lehtori.cc.tut.fi] has joined #ruby
p0y [p0y!~p0y@125.212.56.150] has joined #ruby
<yxhuvud> apeiros_: well &&= also behaves as ||=
<apeiros_> yxhuvud: ah, I remember that I wanted to check up on that, but forgot. so it does? good to know :)
<robbinn> apeiros that didn t work but i have a differant string after my ;
<apeiros_> robbinn: pastie.org your input and your code
<apeiros_> and your expected output
<yxhuvud> not that &&= is as commonly used, but still
<canton7> apeiros_, o'reilly claims that a ||= b expands to a = a || b ...
<guns> canton7: that's what he said
<yxhuvud> canton7: then o'reilly is wrong.
<canton7> he said it expands to a || a = b
<apeiros_> canton7: many think it, since normally <op>= expands to that. ||= and &&= differ, though.
<canton7> there's even a half-page explaining why it's the case...
<guns> I read that wrong
<canton7> apeiros_, have you got a source for that? I'd be interested to read up on it
<apeiros_> canton7: you can check the mailing-list. a || a = b is confirmed there by matz. there's experimental evidence too.
<apeiros_> (thinking what that was)
<canton7> it's a bit hard to search for "a || a = b", google being what it is :(
hinogi [hinogi!~Stefan@mnsr-4db1df87.pool.mediaWays.net] has joined #ruby
hinogi [hinogi!~Stefan@facade/contributor/hinogi] has joined #ruby
lolcat_ [lolcat_!511e2139@gateway/web/freenode/ip.81.30.33.57] has joined #ruby
<lolcat_> hiya. I'm trying to understand fibers/eventmachine it does not fit in the brain
<lolcat_> anyone know a good screencast/docs about it
<apeiros_> ah, right, it should make a difference with foo= methods
<apeiros_> with x.y ||= z, it'd be x.y = x.y || z if you're correct, so #y= would be invoked no matter what
<apeiros_> if it expands to x.y || x.y = z, then #y= is invoked a) after #y, and b) only if #y returns nil/false
<apeiros_> I'll get myself something to eat, then come up with example code to exhibit the difference.
<canton7> apeiros_, gotcha, and reproduced. thanks for the sample!
ph^ [ph^!~ph^@cm-84.212.225.74.getinternet.no] has joined #ruby
<yxhuvud> it is very trivial to validate that the = method isn't invoked by ||= unless needed
<baniseterfiend`> = isnt a method
<baniseterfiend`> ;)
<baniseterfiend`> ah, i seewhat u mean
<yxhuvud> except when it is, by semantic sugar
<apeiros_> canton7: ah, you already reproduced
<apeiros_> damit, I didn't read that until I already had the code written :)
_2easy [_2easy!~nofuture@89-79-244-137.dynamic.chello.pl] has joined #ruby
<canton7> haha! ah well, save it away for the next doubter :P
<apeiros_> ^^
<apeiros_> http://pastie.org/3275738 - for anybody who's still in doubt and wants evidence ;-)
akem [akem!~akem@unaffiliated/akem] has joined #ruby
lolcat_ [lolcat_!511e2139@gateway/web/freenode/ip.81.30.33.57] has quit [#ruby]
<burgestrand> not a clean expand though, a || a = 5 will raise an error if a is undefined, a ||= 5 will not
<yxhuvud> (a=a) || a = 5 won't though ;)
<apeiros_> fun
jensn [jensn!~Jens@c-83-233-145-148.cust.bredband2.com] has joined #ruby
moshee [moshee!~moshee@unaffiliated/moshee] has joined #ruby
<robbinn> how delete character at position in a string ?
<MarcWeber> robbinn: use substr twice omitting the thing in the middle.
<MarcWeber> or use .gsub and replace (...)A by \1
<burgestrand> robbinn: str[index] = ''
<yxhuvud> note that burgestrand's solution can take a range as well
<baniseterfiend`> burgestrand: i can hook failures in testing libraries without monkey-patching the testing lib ;)
<apeiros_> robbinn: oh, sorry, I completely missed your paste
emocakes [emocakes!~om@p57974624.dip.t-dialin.net] has joined #ruby
<apeiros_> robbinn: gsub(/;.*/, '')
<burgestrand> baniseterfiend`: exception explorer? :p
<baniseterfiend`> burgestrand: https://gist.github.com/de0a727305b4c4ec058b
<apeiros_> though, you don't do anything with the result…
<baniseterfiend`> yeah, but i tricked it out a bit
rebagliatte [rebagliatte!~rebagliat@186.8.230.31] has joined #ruby
<burgestrand> baniseterfiend`: how do you do it? :d
<burgestrand> replace the method, enter the callers binding?
<baniseterfiend`> burgestrand: just this one line: EE.intercept(Bacon::Error, :skip => 2)
<burgestrand> ah
<baniseterfiend`> burgestrand: if there's a Bacon::Error exception then start a session two frames back
<burgestrand> baniseterfiend`: how do you know when the exception fires? replaced raise or something else?
<baniseterfiend`> burgestrand: yeah i monkey patch 'raise' ;)
<burgestrand> :d
<yxhuvud> aieeee
<burgestrand> baniseterfiend`: does it catch syntax errors too?
<burgestrand> baniseterfiend`: :p
<baniseterfiend`> burgestrand: i can catch some C exceptions, i wrote a shim that replaces the rb_raise function in libruby with a custom one
<burgestrand> baniseterfiend`: ah, cool
<baniseterfiend`> but stupidly C exceptions dont all go through rb_raise, some go through rb_name_error, and some go directl through rb_exc_raise or whateer it's called, so i just patch a couple of them
<baniseterfiend`> patching rb_exc_raise turned out to be an exercise in pain so i gave up
sandstrom [sandstrom!~sandstrom@s213-103-207-56.cust.tele2.se] has joined #ruby
sandstrom [sandstrom!~sandstrom@unaffiliated/sandstrom] has joined #ruby
<yxhuvud> and some don't raise exceptions but just kill the program..
<baniseterfiend`> ruby does a little of silly things, they should unify more of that code to make it easier for people to do inappropriate things with ruby internals
dnjaramba_ [dnjaramba_!~dnjaramba@41.72.193.86] has joined #ruby
<burgestrand> haha
randym [randym!~randym@EM114-49-28-189.pool.e-mobile.ne.jp] has joined #ruby
<yxhuvud> reminds me of that gem of zenspider/tenderlove where they make segfault (iirc) into a regular exception
<apeiros_> neverdie?
<burgestrand> I was actually considering using that for a project
<baniseterfiend`> burgestrand: what state woudl the C lib be in after tht? :P
<burgestrand> were writing bindings to a C library that would segfault at a given call, and wanted to know when the authors managed to fix it,
<burgestrand> I figured a segfault would be just as good as indication as a red piece of text anyway :p
jay_zawrotny [jay_zawrotny!~Jay@c-71-205-218-131.hsd1.mi.comcast.net] has joined #ruby
Pathou [Pathou!~pat95660@156.30-224-89.dsl.completel.net] has joined #ruby
<burgestrand> baniseterfiend`: seg…regated?
<baniseterfiend`> holy shit anyone watching the tennis final?
<baniseterfiend`> burgestrand: tune into the tennis it's insane
<burgestrand> I don’t think I have any sports channels
<baniseterfiend`> 4 hours 40 mins, nadal just one a tiebreaker, starting the 5th set now
<baniseterfiend`> won*
<burgestrand> all I have is 101 dalmations starring House as a burglar
<baniseterfiend`> you can probably stream it online if u looked hard enough, but maybe tennis isn't your thing
<baniseterfiend`> this is epic though, even if you're not into tennis you'd probably appreciate it
<burgestrand> hehe
fayimora [fayimora!~fayimora@2a01:388:201:3721:9892:de39:602e:f71f] has joined #ruby
<burgestrand> wtf
<shevy> burgestrand!
<shevy> I always have to think about burgers when I read your nick
<burgestrand> I just turned on the weirdest channel
<shevy> the weird part of youtube?
<shevy> it scares me
<burgestrand> no, it’s a boot screen
<shevy> that scares me as well
<shevy> I often read
<shevy> KERNEL PANIC - not syncing root fs
<burgestrand> no, srsly
<burgestrand> this is an actual channel, and the TV’s not connected to anything external D:
<shevy> wow
<shevy> on a TV, haven't seen that yet :)
<shevy> why are you breaking things burgestrand stop doing that!!!
<burgestrand> hehe, the rest of the channels work fine, apparently I have cartoon network
<shevy> hehehehe
<baniseterfiend`> burgestrand: haha, put a shirt on!
<baniseterfiend`> i see half a naked man reflect in the tv
<baniseterfiend`> at least i think that's what im seeing
seivan [seivan!~seivan@cm242.eta204.maxonline.com.sg] has joined #ruby
ikaros [ikaros!~ikaros@dslb-094-219-214-087.pools.arcor-ip.net] has joined #ruby
<burgestrand> baniseterfiend`: damnit, you caught me
<baniseterfiend`> burg pr0n
<baniseterfiend`> how do i set the message on an exception?
<burgestrand> e.message
<burgestrand> oh, set
<burgestrand> um
<burgestrand> def e.message?
<burgestrand> :P
<baniseterfiend`> hmm
<shevy> wat
<shevy> ohhhh
<shevy> funny. never saw the '?' used on a Singleton object before
<apeiros_> when you create it
<baniseterfiend`> apeiros_: is tere a way to set it after creating i wonder
<apeiros_> afaik not without monkey-patching
<apeiros_> I used extend DetailedMessage at some time to do that
<apeiros_> but I was too lazy to hold the pattern up :)
<catphish> burgestrand: thanks :)
<burgestrand> catphish: for most intents and purposes there should be no noticable difference between the new one and the old one, but the new one is much more complex :p
<burgestrand> it could be more performant if you have a larger amount of threads waiting for each name though
<catphish> cool, it should also be reasonably easy to extend it to support shared and exclusive locks
<catphish> i'll give it a go
zalesz [zalesz!~zalesz@user-46-112-91-14.play-internet.pl] has joined #ruby
emocakes [emocakes!~om@p57974624.dip.t-dialin.net] has joined #ruby
stephenjudkins [stephenjudkins!~stephen@c-76-115-1-70.hsd1.or.comcast.net] has joined #ruby
Jakee` [Jakee`!~Jakee`@5ad317fe.bb.sky.com] has joined #ruby
zakwilson [zakwilson!~quassel@c-69-180-70-100.hsd1.fl.comcast.net] has joined #ruby
rebagliatte [rebagliatte!~rebagliat@186.8.230.31] has joined #ruby
<robbinn> re
<robbinn> i have a problem for use URI.parse(url)
youdonotexist [youdonotexist!~youdonote@68.178.70.244] has joined #ruby
LMolr [LMolr!~quassel@87.19.33.245] has joined #ruby
mk03 [mk03!~mk03@112.136.51.23.er.eaccess.ne.jp] has joined #ruby
<robbinn> anyone know URI ?
<guns> robbinn: I've had a similar problem in the past; it was an encoding problem
<robbinn> yes i know
<guns> robbinn: you are using 1.8 though?
<robbinn> how know the version ?
<guns> well, you are
<guns> I don't remember the 1.8 solution, but JEG wrote a blog post on the subject a few years ago...
<robbinn> i have the version 1.6c
<robbinn> man uri -v ? no ?
<guns> robbinn: Oh I meant ruby
<robbinn> its not the same ?
<guns> robbinn: no, you are using the uri ruby library
<robbinn> ok
<guns> robbinn: okay, let me try something out
<robbinn> its ok i have resolve this
<robbinn> URI have a function
<guns> robbinn: gsub on +?
<guns> it's a syntax error
<robbinn> URI.parse(URI.encode(url))
<robbinn> just encode
<robbinn> resolve all
<guns> very good.
<robbinn> Hakuna Matata
bluOxigen [bluOxigen!ssf@unaffiliated/bluOxigen] has joined #ruby
stephenjudkins [stephenjudkins!~stephen@c-76-115-1-70.hsd1.or.comcast.net] has joined #ruby
wroathe [wroathe!~wroathe@173-17-249-11.client.mchsi.com] has joined #ruby
banseljaj [banseljaj!~Imami@182.186.84.101] has joined #ruby
yoklov [yoklov!~yoklov@24-177-5-183.dhcp.nwtn.ct.charter.com] has joined #ruby
<robbinn> how get information with URI
<robbinn> ?
mpapis [mpapis!~mpapis@cust27-176.p6.gorzow.infineo.pl] has joined #ruby
unixmechanic [unixmechanic!~mechanic@46.34.48.231] has joined #ruby
kirun [kirun!~kirun@78-86-154-194.zone2.bethere.co.uk] has joined #ruby
Phrogz [Phrogz!~phrogz@pdpc/supporter/professional/phrogz] has joined #ruby
dilas [dilas!odilontalk@189.6.73.119] has quit [#ruby]
ephemerian [ephemerian!~ian@82-71-51-229.dsl.in-addr.zen.co.uk] has joined #ruby
jfoley [jfoley!~jfoley@c-67-173-240-154.hsd1.co.comcast.net] has joined #ruby
csherin [csherin!~csherin@202.164.151.110] has joined #ruby
_2easy [_2easy!~nofuture@89-79-244-137.dynamic.chello.pl] has joined #ruby
affix [affix!~affix@fedora/Affix] has joined #ruby
Kambus [Kambus!~kambus@193.91.80.211] has joined #ruby
cemycc [cemycc!~cemycc@79.112.109.87] has joined #ruby
canton8 [canton8!~canton7@87-194-161-58.bethere.co.uk] has joined #ruby
<Seppman> I have some strange problem with a twodimensional array. I want to do "if firstdimension.each { |secdim| if secdim[0].match(/Somemessage/) then dosomething " but it gives me error about undefinded method match for 0:fixnum. Waht am i doing wrong? The secdim array is array of strings
<Seppman> Problem is i dont know what i'm doing wrong
kevinbond [kevinbond!~kevinbond@112.50.204.68.cfl.res.rr.com] has joined #ruby
<Seppman> samn, found it, some other function inserted integer at the end of the array
marcoshack_br [marcoshack_br!~marcoshac@c9345b97.virtua.com.br] has joined #ruby
<Seppman> so array has to be only made of strings
<Seppman> anyway, it seams to work now
<Seppman> sadly it does not work when part of tghe array has fixnum in it
Russell^^ [Russell^^!~Russell^^@88.97.51.87] has joined #ruby
seivan [seivan!~seivan@cm242.eta204.maxonline.com.sg] has joined #ruby
<arash> I'm about to implement a bfs and I need a simple queue structure, I see there is one called Queue, but it worries me that I should `require "thread"`, is it a normal queue or some concurrency-class?
josefig [josefig!~josef@187.156.91.147] has joined #ruby
josefig [josefig!~josef@unaffiliated/josefig] has joined #ruby
<apeiros_> arash: Queue is in thread because it's one of the very few thread-safe datastructures in ruby.
<apeiros_> if you don't need thread-safety, just use an array with push/shift
<apeiros_> (and/or pop & unshift)
<Seppman> but why doesnt if firstdim.each { |secdim| if secdim[0].match(/Something/) work, if there's Numbers in the Array? I mean if i prove that secdim[0] always is a string it should work, imo
<Seppman> is there some workaround?
<canton7> what are you trying to do? Find out if one of the elements matches some regex?
<arash> apeiros_, oh, shift is O(1)?
Russell^^ [Russell^^!~Russell^^@88.97.51.87] has joined #ruby
<apeiros_> arash: not completely. afaik it moves the start-pointer, so it's pretty low cost.
<apeiros_> I never sifted through the source, though.
<arash> but if it moves the start pointer then it should be O(n) it feels
<arash> O(1)**
DefV [DefV!~Jan@node-hahmcop4no4a1ruk1w.ipv6.as30961.net] has joined #ruby
<arash> i mean
<apeiros_> yes
<arash> seems good then
<apeiros_> but obviously you can't just keep moving the start pointer. you'd leak.
jwmann [jwmann!~Adium@modemcable242.110-201-24.mc.videotron.ca] has joined #ruby
<arash> oh ok, yea
<Seppman> canton7: exactly, see if matches
<apeiros_> arash: if you want true O(1) you can easily implement a linked list (or double linked list, depending on your needs). shouldn't take more than a couple of minutes.
<canton7> Seppman, well for starters, Fixnum doesn't have a .match method. You can only do regex matching on strings, in other words
<apeiros_> but it might very well be slower for most use cases than use plain array.
wroathe [wroathe!~wroathe@173-17-249-11.client.mchsi.com] has joined #ruby
<Seppman> jeah, but its a string, always in array[0] there will be a string.
p0y [p0y!~p0y@125.212.56.150] has joined #ruby
Phrogz [Phrogz!~phrogz@pdpc/supporter/professional/phrogz] has joined #ruby
<canton7> Seppman, well the error you were getting was because secdim[0] was a fixnum... Was that the only problem?
<Seppman> secdim[3] may be a fixnum, but i get fixnum error too when evaluating secdim[0]
<canton7> Seppman, have alook at secdim[0]... stick a "p secdim[0]" or "p secdim[0].class" before the if statement
<Seppman> whats p?
banseljaj [banseljaj!~Imami@182.186.90.209] has joined #ruby
ershad [ershad!~ershad@117.204.107.253] has joined #ruby
<Seppman> canton7: it works now. canged the arrays initialization from myarray = Array.new(1,Array.[]("somestring", "another", 3, 5)) to simply myarray=[["somestring", "another", 3, 5]]
iocor [iocor!~textual@unaffiliated/iocor] has joined #ruby
snearch [snearch!~snearch@e178056138.adsl.alicedsl.de] has joined #ruby
HAL9OOO [HAL9OOO!~quassel@212.244.23.11] has joined #ruby
wyhaines [wyhaines!~wyhaines@65.39.118.15] has joined #ruby
<apeiros_> Array.[]("somestring", "another", 3, 5) -- ugh
<apeiros_> [] methods aren't supposed to be used like that
<apeiros_> you didn't write secdim.[](0) either, did you?
<Seppman> nope :-) Dont know where i copied that above
genivf [genivf!~museun@c-98-252-146-102.hsd1.ga.comcast.net] has joined #ruby
<Seppman> now everything works like desired and expected. Thank you very much
<apeiros_> whereever you copied it from - if you come across the site again, close your window/tab. must be a terribly bad source.
<Seppman> will do that and will use less copy in the future
* Seppman proceeds writing his small irc bot
nerdy [nerdy!~textual@66-44-118-195.c3-0.grg-ubr1.lnh-grg.md.cable.rcn.com] has joined #ruby
akem [akem!~akem@253.195.84.79.rev.sfr.net] has joined #ruby
akem [akem!~akem@unaffiliated/akem] has joined #ruby
zakwilson [zakwilson!~quassel@c-69-180-70-100.hsd1.fl.comcast.net] has joined #ruby
<shevy> Seppman oh yeah I did that too once
p0y [p0y!~p0y@125.212.56.150] has joined #ruby
danibx [danibx!~danibx@187.104.236.95] has joined #ruby
thomasdebenning [thomasdebenning!~thomasdeb@c-69-181-139-137.hsd1.ca.comcast.net] has joined #ruby
jensn [jensn!~Jens@ip234-137.wireless.lu.se] has joined #ruby
herval [herval!~Adium@186.214.128.69] has joined #ruby
cousine [cousine!~cousine@196.218.42.9] has joined #ruby
sean_ [sean_!~seanmccan@d173-181-72-140.abhsia.telus.net] has joined #ruby
DDAZZA [DDAZZA!~DDAZZA@host-2-102-57-183.as13285.net] has joined #ruby
Dave [Dave!~DDAZZA@host-2-102-57-183.as13285.net] has joined #ruby
idarkside [idarkside!~YourNick@5e04aec4.bb.sky.com] has joined #ruby
berserkr [berserkr!~david@212.122.111.205.dyn.user.ono.com] has joined #ruby
blueadept [blueadept!~blueadept@unaffiliated/blueadept] has joined #ruby
Phrogz [Phrogz!~phrogz@pdpc/supporter/professional/phrogz] has joined #ruby
apok [apok!~apok@96.24.67.22] has joined #ruby
tvo [tvo!~tvo@5354CF57.cm-6-5d.dynamic.ziggo.nl] has joined #ruby
tvo [tvo!~tvo@katapult/developer/tvo] has joined #ruby
hadees [hadees!~hadees@72-48-91-73.dyn.grandenetworks.net] has joined #ruby
_md [_md!~mduarte@cpc12-finc13-2-0-cust65.4-2.cable.virginmedia.com] has joined #ruby
zag [zag!~zag@jem75-1-87-88-118-80.dsl.sta.abo.bbox.fr] has joined #ruby
cousine [cousine!~cousine@41.32.101.235] has joined #ruby
Xerife [Xerife!~Soarez@a79-169-26-117.cpe.netcabo.pt] has joined #ruby
deryl [deryl!deryl@perfecting.rubyists.com] has joined #ruby
zakwilson [zakwilson!~quassel@c-69-180-70-100.hsd1.fl.comcast.net] has joined #ruby
<zag> hello all, i have a noob question about product of arrays
<zag> many thanks!
_srp [_srp!~quassel@115.99.249.45] has joined #ruby
<shevy> I dont even know what means "develop"
<shevy> but the reply rocks ;)
<shevy> "I'm not sure I fully understand what you are trying to do to these poor arrays"
iocor [iocor!~textual@unaffiliated/iocor] has joined #ruby
savage- [savage-!~savage-@c-67-180-11-89.hsd1.ca.comcast.net] has joined #ruby
<apeiros_> showing your arrays that you love them is important for their development
<apeiros_> but you should also give them clear borders
<shevy> lol
Morkel [Morkel!~Morkel@xdsl-87-78-206-32.netcologne.de] has joined #ruby
<shevy> apeiros_ will be a good father
vraa [vraa!~vraa@99-20-202-44.lightspeed.hstntx.sbcglobal.net] has joined #ruby
<any-key> apeiros_: it's like making sure you null terminate C strings :P
jensn [jensn!~Jens@ip234-137.wireless.lu.se] has joined #ruby
jensn [jensn!~Jens@ip234-137.wireless.lu.se] has joined #ruby
daglees [daglees!~belvedere@91.186.226.125] has joined #ruby
daglees [daglees!~belvedere@unaffiliated/daglees] has joined #ruby
ksinkar [ksinkar!~ksinkar@115.241.239.27] has joined #ruby
abstrusenick [abstrusenick!~abstrusen@bb220-255-71-35.singnet.com.sg] has joined #ruby
Phrogz [Phrogz!~phrogz@pdpc/supporter/professional/phrogz] has joined #ruby
<canton7> zag, are you sure that the "another example" is correct?
<canton7> the intuitive way of seeing it, is that, at each "depth", we have an array of two elements, the first being a single key, and the second being another array of two elements...
<canton7> which isn't true on the example with 4 levels
mechanic [mechanic!~mechanic@46.34.48.231] has joined #ruby
palcu [palcu!~alex@89.122.187.223] has joined #ruby
mando [mando!~mando@99-39-117-82.lightspeed.austtx.sbcglobal.net] has joined #ruby
dnjaramba [dnjaramba!~dnjaramba@41.72.193.86] has joined #ruby
bwlang [bwlang!~anonymous@c-24-147-213-189.hsd1.ma.comcast.net] has joined #ruby
<shevy> hmm just realized something
<shevy> when I do rewrites... I think I will keep the deprecated classes for a while, until things have been cleanly replaced
<shevy> rather than want to replace them all at the same time!
Phrogz_ [Phrogz_!~phrogz@pdpc/supporter/professional/phrogz] has joined #ruby
<RubyPanther> the deprecation process takes years, if done correctly... unless you're the only person using your code
tomzx [tomzx!~tomzx@66-77.162.dsl.aei.ca] has joined #ruby
rebagliatte [rebagliatte!~rebagliat@186.8.230.31] has joined #ruby
quest88 [quest88!~quest88@c-98-207-205-137.hsd1.ca.comcast.net] has joined #ruby
cooper [cooper!~mitchell@unaffiliated/furryfishy] has joined #ruby
_|christian|_ [_|christian|_!~christian@190.232.98.61] has joined #ruby
<shevy> god I am lazy
<apeiros_> why are you telling me that?
pdtpatrick_ [pdtpatrick_!~pdtpatric@ip72-211-207-15.oc.oc.cox.net] has joined #ruby
looopy [looopy!~looopy@c-68-34-92-100.hsd1.md.comcast.net] has joined #ruby
iocor [iocor!~textual@unaffiliated/iocor] has joined #ruby
pgebhard [pgebhard!~pgebhard@216-15-55-105.c3-0.nmex-ubr1.lnh-nmex.md.cable.rcn.com] has joined #ruby
mohits [mohits!~mohit@unaffiliated/mohits] has joined #ruby
dnyy [dnyy!~dnyy@c-98-237-138-38.hsd1.wa.comcast.net] has joined #ruby
tommyvyo [tommyvyo!~tommyvyo@c-68-83-3-164.hsd1.nj.comcast.net] has joined #ruby
ePirat [ePirat!~ePirat@unaffiliated/epirat] has joined #ruby
daniel_hinojosa [daniel_hinojosa!~danno@67-0-117-93.albq.qwest.net] has joined #ruby
TheNumb [TheNumb!~TheNumb@unaffiliated/thenumb] has joined #ruby
moshef [moshef!~moshe@62.219.110.225] has joined #ruby
Tweeq [Tweeq!~Tweeq@host-95-199-11-87.mobileonline.telia.com] has joined #ruby
<moshef> hi, i have an array of hashes, and the keys are strings. i'd like to change them to symbols. i can use symbolize_keys but then i will have to run over the entire array and adjust each one
<moshef> is there a simpler way of doing it ?
mdp1 [mdp1!~mdp@173-203-238-184.static.cloud-ips.com] has joined #ruby
mdp1 [mdp1!~mdp@173-203-238-184.static.cloud-ips.com] has quit [#ruby]
<apeiros_> moshef: you're cross-posting. please don't do that, it's rude.
daglees [daglees!~belvedere@91.186.226.125] has joined #ruby
daglees [daglees!~belvedere@unaffiliated/daglees] has joined #ruby
<apeiros_> and as expected, of course you omitted to tell here that you got an answer in the other channel.
macmartine [macmartine!~macmartin@c-24-21-112-60.hsd1.or.comcast.net] has joined #ruby
moshef was kicked from #ruby by apeiros_ [should have done that right away]
trivol [trivol!~aurelien@ip-178.net-89-2-84.rev.numericable.fr] has joined #ruby
danielpunt [danielpunt!~danielpun@ip120-238-211-87.adsl2.static.versatel.nl] has joined #ruby
mechanic [mechanic!~mechanic@46.34.48.231] has joined #ruby
Kambus` [Kambus`!~kambus@62-77-250-188.pool.invitel.hu] has joined #ruby
dagnachewa [dagnachewa!~dagnachew@modemcable142.238-179-173.mc.videotron.ca] has joined #ruby
stephenjudkins [stephenjudkins!~stephen@c-76-115-1-70.hsd1.or.comcast.net] has joined #ruby
moshef [moshef!~moshe@62.219.110.225] has joined #ruby
moshef [moshef!~moshe@62.219.110.225] has quit [#ruby]
<RubyPanther> yeah, huh
<dagnachewa> hello everyone
moshef [moshef!~moshe@62.219.110.225] has joined #ruby
bluOxigen [bluOxigen!ssf@unaffiliated/bluOxigen] has joined #ruby
pantsman [pantsman!~pantsman@2.27.109.240] has joined #ruby
pantsman [pantsman!~pantsman@pdpc/supporter/active/pantsman] has joined #ruby
jensn [jensn!~Jens@c-83-233-145-148.cust.bredband2.com] has joined #ruby
tweequla [tweequla!~Tweeq@host-95-199-0-244.mobileonline.telia.com] has joined #ruby
robyurkowski [robyurkowski!~robyurkow@216.252.93.17] has joined #ruby
jergason [jergason!~jergason@c-67-182-209-164.hsd1.ut.comcast.net] has joined #ruby
zakwilson [zakwilson!~quassel@c-69-180-70-100.hsd1.fl.comcast.net] has joined #ruby
alphabitcity [alphabitcity!~Adium@pool-72-68-162-178.nycmny.east.verizon.net] has joined #ruby
Tweeq [Tweeq!~Tweeq@host-95-199-0-244.mobileonline.telia.com] has joined #ruby
<alphabitcity> is it possible to unzip a file in memory?
<burgestrand> don’t see why not
<i8igmac> im working with some socket... how to i read from the socket until eof... data=socket.read(eof)
<apeiros_> socket.read
<apeiros_> read reads until eof
bwlang [bwlang!~anonymous@c-24-147-213-189.hsd1.ma.comcast.net] has joined #ruby
Kambus_ [Kambus_!~kambus@91.83.153.59.pool.invitel.hu] has joined #ruby
<i8igmac> im working with http, the read part stands still until server sends disconnect
<apeiros_> that's because he doesn't send eof before disconnect
<apeiros_> or rather, the disconnect IS the eof
* dagnachewa finds "begining ruby" a great book to start learning ruby :)
<i8igmac> could be my get request
<i8igmac> maybe,
Guest30037 [Guest30037!~bart@86.81.38.115] has joined #ruby
jbpros [jbpros!~jbpros@109-186-112-217.dyn.adsl.belcenter.be] has joined #ruby
<i8igmac> can i do something like this... while line=gets; data<<line; end
<moshef> any-key: thanks. also, already managed to find answer :)
<apeiros_> i8igmac: you could use one of the existing http libs
<apeiros_> which do it correctly
<i8igmac> i dont like libs
<apeiros_> then good luck. correct http isn't that easy.
pxjorge [pxjorge!~pxjorge@a89-152-235-119.cpe.netcabo.pt] has joined #ruby
FlowState [FlowState!~fl0w@pool-74-107-116-232.bltmmd.fios.verizon.net] has joined #ruby
looopy [looopy!~looopy@c-68-34-92-100.hsd1.md.comcast.net] has joined #ruby
drknus [drknus!~user@142.68.215.147] has joined #ruby
<i8igmac> its like the connection stays alive
alphabitcity [alphabitcity!~Adium@pool-72-68-162-178.nycmny.east.verizon.net] has quit [#ruby]
<apeiros_> do you - by any chance, use http1.1 with keep-alive? :)
<i8igmac> i set keep-alive to 0 and yes 1.1
<i8igmac> ill have top read header ooptions
Axsuul [Axsuul!~Axsuul@75-140-75-52.dhcp.mtpk.ca.charter.com] has joined #ruby
<moshef> any reason why this wouldn't work? document[:items].map(&:symbolize_keys).delete(item.serialize_to_collection)
<i8igmac> lol, http 1.0
<i8igmac> i new it was something stupid ,-)
<i8igmac> thanks apeiros ,-)
<zag> canton7: well, finally, thank; it was already okay
n3m [n3m!~bla@188-23-158-94.adsl.highway.telekom.at] has joined #ruby
stephenjudkins [stephenjudkins!~stephen@c-76-115-1-70.hsd1.or.comcast.net] has joined #ruby
zakwilson [zakwilson!~quassel@c-69-180-70-100.hsd1.fl.comcast.net] has joined #ruby
Sailias_ [Sailias_!~jonathan@CPE0018f85e576d-CM001bd7aaaf96.cpe.net.cable.rogers.com] has joined #ruby
robyurkowski [robyurkowski!~robyurkow@28-73-252-216.dsl.colba.net] has joined #ruby
guns [guns!~guns@c-98-228-72-208.hsd1.il.comcast.net] has joined #ruby
jbw [jbw!~jbw@dsl-044-084.cust.imagine.ie] has joined #ruby
QaDeS [QaDeS!~mklaus@frbg-4d028a37.pool.mediaWays.net] has joined #ruby
<QaDeS> does anyone know what happened to swiftiply? is there anything that can replace it now, or is it so stable i can use the 2-year old version? :)
moshee [moshee!~moshee@c-50-135-229-127.hsd1.wa.comcast.net] has joined #ruby
moshee [moshee!~moshee@unaffiliated/moshee] has joined #ruby
<RubyPanther> QaDeS: it is not normally needed anymore because of Passenger.
uatecuk [uatecuk!~uatecuk@host-78-146-196-253.as13285.net] has joined #ruby
porco [porco!~porco@125.33.74.244] has joined #ruby
conor_ireland [conor_ireland!~conor_ire@89.100.121.49] has joined #ruby
h4mz1d [h4mz1d!~hamfz@DHCP-214-001.wireless-resnet.ua.edu] has joined #ruby
zakwilson [zakwilson!~quassel@c-69-180-70-100.hsd1.fl.comcast.net] has joined #ruby
pantsman [pantsman!~pantsman@pdpc/supporter/active/pantsman] has joined #ruby
porco [porco!~porco@125.33.74.244] has joined #ruby
stephenjudkins [stephenjudkins!~stephen@c-76-115-1-70.hsd1.or.comcast.net] has joined #ruby
CannedCorn [CannedCorn!~textual@cpe-66-65-101-248.nyc.res.rr.com] has joined #ruby
mechanic [mechanic!~mechanic@46.34.48.231] has joined #ruby
Tweeq [Tweeq!~Tweeq@host-95-199-0-244.mobileonline.telia.com] has joined #ruby
stephenjudkins [stephenjudkins!~stephen@c-76-115-1-70.hsd1.or.comcast.net] has joined #ruby
fayimora [fayimora!~fayimora@2a01:388:201:3721:ac93:3cfd:bfef:dd6f] has joined #ruby
<QaDeS> passenger doesn't scale over multiple servers, does it?
<QaDeS> like, you still need a load balancer on top, no?
tubgoat_ [tubgoat_!~tubgoat@gateway/tor-sasl/tugboat] has joined #ruby
ph^ [ph^!~ph^@cm-84.212.225.74.getinternet.no] has joined #ruby
<RubyPanther> QaDeS: yes but you can use normal generic ones
<RubyPanther> the reason swiftiply was used was because mongrel sucked and it monkey patched the worse part away
kstephens [kstephens!~kstephens@173-15-46-105-Illinois.hfc.comcastbusiness.net] has joined #ruby
<RubyPanther> but Passenger doesn't suck, and works well with normal apache stuff
mechanic [mechanic!~mechanic@46.34.48.231] has quit [#ruby]
moshef [moshef!~moshe@bzq-79-177-138-51.red.bezeqint.net] has joined #ruby
stringoO [stringoO!~JLstring@bas1-toronto42-1279600537.dsl.bell.ca] has joined #ruby
aknewhope [aknewhope!~aknewhope@cpe-75-82-205-249.socal.res.rr.com] has joined #ruby
aknewhope [aknewhope!~aknewhope@cpe-75-82-205-249.socal.res.rr.com] has joined #ruby
Emery [Emery!~Emery@unaffiliated/emery] has joined #ruby
fayimora_ [fayimora_!~fayimora@95.175.159.34] has joined #ruby
<Emery> I'm putting together an IRC bot (yet another) and i'm wondering. What do i use to space out 2 words for a command, i.e if command == "!test" ... I want to say !test 123.
<i8igmac> data=`whoami`
<i8igmac> site="www.google.com"
<i8igmac> data=`ping #{site}`
apok [apok!~apok@96.24.67.22] has joined #ruby
csherin [csherin!~csherin@202.164.151.110] has joined #ruby
amerine [amerine!~mturner@bc171197.bendcable.com] has joined #ruby
<apeiros_> Emery: I don't understand "space out"
<Emery> instead of !test
<Emery> i want to say ... !test 123
<Emery> use 2 words, as 1 command, well the bot responds to it as 1 command.
<apeiros_> and what is your problem with it?
<i8igmac> im not sure if your trying to print text to the screen or execute system commands
jdspiralz [jdspiralz!jdspiral@oberon.vectori.net] has joined #ruby
jbpros [jbpros!~jbpros@109-186-112-217.dyn.adsl.belcenter.be] has joined #ruby
<Emery> i'd like to know how i can use 2 words, and get the bot to reaslise that it's a command still
rebagliatte [rebagliatte!~rebagliat@186.8.230.31] has joined #ruby
<apeiros_> Emery: since we don't have the slightest idea how your bot works - how on earth should we be able to tell you?
<Emery> all i want to know is how to use !test 123 as a command
wallerdev [wallerdev!~wallerdev@c-68-43-58-191.hsd1.mi.comcast.net] has joined #ruby
<Emery> what do i use to seperate the 2 words, but still make it one command
<fullsailor> Use a Regex
<Emery> i just want to know what goes inbetween the 2 words, nothign else
<Emery> yes
<Emery> which regex
<i8igmac> string="hello world".map
dnyy [dnyy!~dnyy@c-98-237-138-38.hsd1.wa.comcast.net] has joined #ruby
<i8igmac> lol i dont know
<i8igmac> "my name is tim".split
<fullsailor> command =~ /!test ?(.*)?/
lakewood [lakewood!~user@99-45-120-223.lightspeed.cicril.sbcglobal.net] has joined #ruby
<fullsailor> command =~ /!test ?(.*)/
<Emery> But i'd like to use the 2 words, as one command
<Emery> so test 123
trivol [trivol!~aurelien@ip-178.net-89-2-84.rev.numericable.fr] has joined #ruby
<Emery> fullsailor, http://pastebin.com/jzhxBbUj
<Emery> like this
<moshef> I'm trying to do something like this - document[:items].map(&:symbolize_keys).delete(item.serialize_to_collection)
<moshef> problem is - symbolize keys doesn't set the new doc with the keys, so when I'm trying to remove it doesn't find it
<moshef> what do i do?
pantsman [pantsman!~pantsman@2.25.205.53] has joined #ruby
pantsman [pantsman!~pantsman@pdpc/supporter/active/pantsman] has joined #ruby
straind [straind!~stupidper@204.111.240.183] has joined #ruby
mikeric [mikeric!~mike@S0106c03f0e8b23f3.vc.shawcable.net] has joined #ruby
<moshef> anyone?
robyurkowski [robyurkowski!~robyurkow@28-73-252-216.dsl.colba.net] has joined #ruby
jdspiralz [jdspiralz!jdspiral@oberon.vectori.net] has joined #ruby
Sliker [Sliker!~ponies@87.114.96.212] has joined #ruby
regedarek [regedarek!regedarek@gateway/shell/bshellz.net/x-yzibtmkjpesookck] has joined #ruby
<regedarek> hi!
<regedarek> how to use count and size method in sinatra?
Pathou [Pathou!~pat95660@156.30-224-89.dsl.completel.net] has joined #ruby
zakwilson [zakwilson!~quassel@c-69-180-70-100.hsd1.fl.comcast.net] has joined #ruby
Emery [Emery!~Emery@unaffiliated/emery] has quit ["Leaving"]
Sliker [Sliker!~ponies@87.114.96.212] has joined #ruby
<catphish> regedarek: count and size on what?
<regedarek> activerecord class
jdspiralz [jdspiralz!jdspiral@oberon.vectori.net] has joined #ruby
<catphish> well you just do WhateverClass.count
dagnachewa [dagnachewa!~dagnachew@modemcable142.238-179-173.mc.videotron.ca] has joined #ruby
orfeas [orfeas!~orfeas@178.128.93.160.dsl.dyn.forthnet.gr] has joined #ruby
<orfeas> hello peeps
<orfeas> can someone help me with C?
hooper [hooper!~hooper@c-24-23-247-41.hsd1.ca.comcast.net] has joined #ruby
<Seppman> whats the best way to revom the first 3 characters of a string? I'd convert to array and remove the first 3 elements, if there's no better way
<Seppman> s/revom/remove/
<MxBot> Seppman meant: "whats the best way to remove the first 3 characters of a string? I'd convert to array and remove the first 3 elements, if there's no better way"
<guns> Seppman: string.chars.drop(3).join
<guns> like you said
<Seppman> thanksalot :-)
<guns> Or string[/.{3}(.*)/, 1]
<guns> or string.sub /.{3}/, ''
<guns> I bet the regexps are faster
<Seppman> i would have done it way more dumb, with to_a and delete_at
<RubyPanther> orfeas: if it is a Ruby extension...
<guns> Yeah, the regexps are faster by almost an order of magnitude
macmartine [macmartine!~macmartin@c-24-21-112-60.hsd1.or.comcast.net] has joined #ruby
<Seppman> works, thank you very much
<orfeas> people. If i have a pointer to pointer and let's say it's p[1][2]==3. If I want to make another array with k[3]=2 , how can i do it?
jgarvey [jgarvey!~jgarvey@cpe-174-097-248-211.nc.res.rr.com] has joined #ruby
<Seppman> i lack regexp knowledge, i should learn 'that shit'
<orfeas> I mean...
sdwrage [sdwrage!~sdwrage@cpe-184-57-83-165.columbus.res.rr.com] has joined #ruby
<davidcelis> Seppman: play around with http://rubular.com/
<davidcelis> best regex site
<guns> orfeas: what's the problem. You just add one more layer of indirection
c0rn [c0rn!~c0rn@50-0-142-2.dsl.dynamic.sonic.net] has joined #ruby
<Seppman> davidcelis: thanks for the thip
jdspiralz [jdspiralz!jdspiral@oberon.vectori.net] has joined #ruby
stephenjudkins [stephenjudkins!~stephen@c-24-21-199-70.hsd1.or.comcast.net] has joined #ruby
enherit [enherit!~enherit@66-214-13-183.dhcp.lnbh.ca.charter.com] has joined #ruby
adeponte [adeponte!~adeponte@pool-173-51-131-197.lsanca.fios.verizon.net] has joined #ruby
idletom [idletom!b@173-30-162-172.client.mchsi.com] has joined #ruby
zulax [zulax!~radarwork@99-120-232-161.lightspeed.iplsin.sbcglobal.net] has joined #ruby
apok [apok!~apok@96.24.67.22] has joined #ruby
banseljaj [banseljaj!~imami@42.83.85.41] has joined #ruby
<orfeas> sorry guns i wasn't here. What do you mean indirection? I'm talking about C btw, not c++
<orfeas> let me tell you exactly what i need
looopy [looopy!~looopy@c-68-34-92-100.hsd1.md.comcast.net] has joined #ruby
<orfeas> i have two pointer to pointers. **man and **wom.
<orfeas> their values are like this man[0][0]=1,man[0][1]=2, etc. The 1 and 2 are the first man's (the man0) women preferences
<orfeas> which means the first man prefers wom1, then prefers wom2, then whatever.
<orfeas> and I want to compare for a specific woman which man she prefers
salty-horse [salty-horse!~ori@bzq-79-179-10-177.red.bezeqint.net] has joined #ruby
Skaag [Skaag!~Skaag@cpe-67-247-51-89.nyc.res.rr.com] has joined #ruby
blueadept [blueadept!~blueadept@unaffiliated/blueadept] has joined #ruby
<arex\> apeiros_: am i too late? :P
Pathou [Pathou!~pat95660@156.30-224-89.dsl.completel.net] has quit [#ruby]
<orfeas> for what? apeiros, greek?
adeponte_ [adeponte_!~adeponte@pool-173-51-131-197.lsanca.fios.verizon.net] has joined #ruby
macmartine [macmartine!~macmartin@c-24-21-112-60.hsd1.or.comcast.net] has joined #ruby
Faris [Faris!~faris@41.140.178.137] has joined #ruby
<orfeas> Can someone help me with that?
Faris [Faris!~faris@41.140.178.137] has quit [#ruby]
mikepack [mikepack!~mikepack@c-174-51-77-22.hsd1.co.comcast.net] has joined #ruby
<orfeas> Anyone in here?
spyvsspy2 [spyvsspy2!~whistler@66.165.126.130] has joined #ruby
Fezzler [Fezzler!~anonymous@cpe-075-190-168-034.carolina.res.rr.com] has joined #ruby
savage- [savage-!~savage-@c-67-180-11-89.hsd1.ca.comcast.net] has joined #ruby
hubub [hubub!~hubub@94-193-241-95.zone7.bethere.co.uk] has joined #ruby
MetaCosm [MetaCosm!u514@gateway/web/irccloud.com/x-hhvvxbokrsxkcpmo] has joined #ruby
MoMo [MoMo!u1590@gateway/web/irccloud.com/x-momlpawhuvtxkhnq] has joined #ruby
brownies [brownies!~brownies@unaffiliated/brownies] has joined #ruby
<apeiros_> arex\: oh, I meant on workdays
Jake232 [Jake232!~textual@5e04b396.bb.sky.com] has joined #ruby
relix [relix!u2146@gateway/web/irccloud.com/x-czzkwfamfskjdyzb] has joined #ruby
kapowaz [kapowaz!~u546@gateway/web/irccloud.com/x-dbtbiuopoyyryzvy] has joined #ruby
GSpotAssassin [GSpotAssassin!u4086@gateway/web/irccloud.com/x-apqhtvxvkadefwen] has joined #ruby
davidboy [davidboy!u3228@gateway/web/irccloud.com/x-xezicnrkhcmuziqa] has joined #ruby
<guns> orfeas: Sorry, I was out with the dog. What are you trying to do now, associate men's prefs to the women pointers?
arnihermann [arnihermann!u1395@gateway/web/irccloud.com/x-pabycdtggmuirver] has joined #ruby
pusewicz_ [pusewicz_!u2036@gateway/web/irccloud.com/x-hvpjykrfwlpohvhn] has joined #ruby
shaatar [shaatar!u648@gateway/web/irccloud.com/x-jhlbusphbrnkhbmt] has joined #ruby
<arex\> apeiros_: ok :)
denysonique_ [denysonique_!u484@gateway/web/irccloud.com/x-jwwyfqfcwlxbzlsf] has joined #ruby
pooja [pooja!u4977@gateway/web/irccloud.com/x-bzjdzxpgkaffnepb] has joined #ruby
si14 [si14!u2619@gateway/web/irccloud.com/x-clgbixhszoxmunpm] has joined #ruby
VictorMartins [VictorMartins!~VictorMar@87.196.107.112] has joined #ruby
kapowaz [kapowaz!u546@gateway/web/irccloud.com/x-ykhkhthfzvdjkbvl] has joined #ruby
MoMo [MoMo!u1590@gateway/web/irccloud.com/x-acgjbzgconumqfie] has joined #ruby
jaywastaken [jaywastaken!~jaywastak@unaffiliated/jaywastaken] has joined #ruby
GSpotAssassin [GSpotAssassin!u4086@gateway/web/irccloud.com/x-yauletzfrblvrhbp] has joined #ruby
fcoury [fcoury!u2238@gateway/web/irccloud.com/x-wjgvagijqskkgbzp] has joined #ruby
Seisatsu [Seisatsu!~seisatsu@adsl-99-35-225-92.dsl.pltn13.sbcglobal.net] has joined #ruby
<guns> orfeas: Sounds like you should be using a struct for men and wom, with an array member of the same type that points to other men and wom
<guns> Or go ask in #C
dkannan [dkannan!u480@gateway/web/irccloud.com/x-sgdnvjwaieudxdvx] has joined #ruby
moeSeth [moeSeth!u1029@gateway/web/irccloud.com/x-hzzejxhrbbxzfuys] has joined #ruby
notbrent [notbrent!u5121@gateway/web/irccloud.com/x-tcbcakwdlveqpekw] has joined #ruby
friskd [friskd!~friskd@cpe-76-172-2-7.socal.res.rr.com] has joined #ruby
a|i [a|i!~ali@client-86-23-89-162.brhm.adsl.virginmedia.com] has joined #ruby
a|i [a|i!~ali@unaffiliated/ai/x-9091534] has joined #ruby
Guest3573 [Guest3573!~jrizzo@02d8ce98.bb.sky.com] has joined #ruby
y3llow_ [y3llow_!~y3llow@114-36-224-117.dynamic.hinet.net] has joined #ruby
s0ber_ [s0ber_!~s0ber@114-36-224-117.dynamic.hinet.net] has joined #ruby
<a|i> why is that when using popen3(), stdout and sterr readline gets stuck for large buffers?
<a|i> I don't see any hints about large stream buffers in the docs :/
MetaCosm [MetaCosm!u514@gateway/web/irccloud.com/x-dbjkdvtqhtslarjj] has joined #ruby
mensch [mensch!~mensch@c-174-62-210-182.hsd1.ma.comcast.net] has joined #ruby
dark3rdre4ms [dark3rdre4ms!~Ethan@unaffiliated/eth4n] has joined #ruby
<dark3rdre4ms> So I've been reading _why's poignant guide
y3llow [y3llow!~y3llow@114-36-224-117.dynamic.hinet.net] has joined #ruby
<dark3rdre4ms> It's amazing
<dark3rdre4ms> that guy sure was something
<a|i> dark3rdre4ms: please stop praising pseudo-rock-stars here.
Xerife [Xerife!~Soarez@a79-169-26-117.cpe.netcabo.pt] has joined #ruby
Nies [Nies!~Nies@43.Red-79-159-149.staticIP.rima-tde.net] has joined #ruby
<dark3rdre4ms> a|i: where do you recommend for me to do said thing?
y3llow [y3llow!~y3llow@114-36-224-117.dynamic.hinet.net] has joined #ruby
<a|i> dark3rdre4ms: there is programming, and there is hype. here is for discussing programming. for hype, please refer to twitter, facebook and other crap like that.
<dark3rdre4ms> a|i: Well, I know this place is for programming, but as usual this channel isn't too active
y3llow [y3llow!~y3llow@114-36-224-117.dynamic.hinet.net] has joined #ruby
<dark3rdre4ms> a|i: so like, unless you own this channel, I don't see a problem with said thing
y3llow [y3llow!~y3llow@114-36-224-117.dynamic.hinet.net] has joined #ruby
<dark3rdre4ms> a|
<dark3rdre4ms> a|i: I dunno how long you've been here but after midnight this place gets kind of active with midnight coders
<dark3rdre4ms> lul
giftae [giftae!~giftae@sf-nat.sourcefire.com] has joined #ruby
igotnolegs [igotnolegs!~igotnoleg@75-162-83-166.slkc.qwest.net] has joined #ruby
skaczor_ [skaczor_!~shogun@mail.prognosoft.biz] has joined #ruby
herval [herval!~Adium@186.214.128.69] has joined #ruby
TomJ [TomJ!~TomJ@unaffiliated/tomj] has joined #ruby
ph^ [ph^!~ph^@cm-84.212.225.74.getinternet.no] has joined #ruby
Mchl [Mchl!~Mchl@h1881165560.rev.rootvps.pl] has joined #ruby
rramsden [rramsden!~rramsden@s64-180-62-209.bc.hsia.telus.net] has joined #ruby
jensn [jensn!~Jens@c-83-233-145-148.cust.bredband2.com] has joined #ruby
vraa [vraa!~vraa@99-20-202-44.lightspeed.hstntx.sbcglobal.net] has joined #ruby
<Seppman> another one is coming up to me: i have an array of strings with function names, for example array[2] = "myfunctiontocall". I have a Function 'Myfunctioncall' too, but how do i get it called by evaluation of the array?
vraa_ [vraa_!~vraa@99-20-202-44.lightspeed.hstntx.sbcglobal.net] has joined #ruby
Animawish [Animawish!~Adium@71-35-237-7.slkc.qwest.net] has joined #ruby
salty-horse [salty-horse!~ori@bzq-79-179-10-177.red.bezeqint.net] has quit ["Leaving"]
zakwilson [zakwilson!~quassel@c-69-180-70-100.hsd1.fl.comcast.net] has joined #ruby
<Seppman> send(array[2]) doesnt work :-(
<Seppman> seems send only works for methods, but the function isn't any method, its just there
nivoc [nivoc!~matthias@199.188.193.145] has joined #ruby
igotnolegs [igotnolegs!~igotnoleg@75-162-83-166.slkc.qwest.net] has joined #ruby
guns [guns!~guns@c-98-228-72-208.hsd1.il.comcast.net] has joined #ruby
nivoc [nivoc!~matthias@ipc-hosting.de] has joined #ruby
<Seppman> can't this generally be deone?
friskd [friskd!~friskd@cpe-76-172-2-7.socal.res.rr.com] has joined #ruby
CannedCorn [CannedCorn!~textual@74.113.160.178] has joined #ruby
pabloh [pabloh!~pablo@186.22.82.39] has joined #ruby
<CannedCorn> how would one override the initialize method of a TestCase in Test::Unit
<CannedCorn> i want to have code run at the start of the tests in that class
Russell^^ [Russell^^!~Russell^^@88.97.51.87] has joined #ruby
catphish [catphish!~charlie@2001:9d8:2005:12::3] has quit ["Leaving"]
catphish [catphish!~charlie@2001:9d8:2005:12::3] has joined #ruby
<catphish> array[2].call
<catphish> if it contains a proc
Animawish [Animawish!~Adium@71-35-237-7.slkc.qwest.net] has quit [#ruby]
<Seppman> it only contains the string
<catphish> then how do you expect to call it?
<catphish> oh
<catphish> you that's the name of the method you want to call?
<catphish> *you men
<Seppman> exactly
<catphish> that should work afaik
Araxia_ [Araxia_!~Araxia@c-24-22-63-1.hsd1.or.comcast.net] has joined #ruby
logbot83725 [logbot83725!~cinch@boxand.lnk.telstra.net] has joined #ruby
rebagliatte [rebagliatte!~rebagliat@186.8.230.31] has joined #ruby
<Seppman> the problem is that i want to call from inside some object whereas the function is outside
<catphish> ruby-1.9.2-p290 :005 > "hello".send(methods[0]) => 5
<catphish> what are you trying to call with it?
<catphish> it certainly works on methods
Russell^^ [Russell^^!~Russell^^@88.97.51.87] has joined #ruby
<Seppman> are simple functions any method of some 'global' object?
<Seppman> when i call from my object i get 'undefinded method' error when using send(array[2])
<guns> Seppman: `simple functions` are actually calls to self. so send :foo, is self.send :foo
<CannedCorn> guys how can you get something to run at the start of a TestCase
<guns> so you'll want to send your method name to the proper object
<Seppman> hmm, so i hust have to find out object name?
<Seppman> Is there any naming convention for top level object?
<guns> CannedCorn: BEGIN ?
<CannedCorn> guns what about BEGIN?
<guns> Seppman: depends on where you are.
<guns> CannedCorn: like awk's BEGIN statement
<CannedCorn> guns sorry not following
<guns> ruby has one; that may have precedence
np_complete [np_complete!~feanor@8.Red-88-31-43.staticIP.rima-tde.net] has joined #ruby
<heftig> Seppman: methods declared at top-level scope become private instance methods of Object
<np_complete> any aidea how can I popup a GTK menu, without having to connect to any even?
<heftig> np_complete: could you rephrase that?
<guns> CannedCorn: But in general, can't you just prepare for your tests right in the file, outside of a test declaration?
aetaric [aetaric!~aetaric@74-130-83-237.dhcp.insightbb.com] has joined #ruby
<Seppman> damn, so ui can put all my code into the trash bin. i made some fancy object named cd, it has some sort of sethandler-method which takes a string and stores it in the array. if some conditions are met, it takes the proper array element and should call the function named that string. The functions are definid in the source file simple via def functionname
Russell^^ [Russell^^!~Russell^^@88.97.51.87] has joined #ruby
<guns> CannedCorn: anyway, about BEGIN: http://burkelibbey.posterous.com/rubys-other-begin
cooper [cooper!~chatzilla@unaffiliated/furryfishy] has joined #ruby
<np_complete> I'd like to have a ruby-gtk, that starts displaying a menu, without having to do any click first... I want it to displa the menu automatically.
zenergi [zenergi!~zenergi@pdpc/supporter/student/zenergi] has joined #ruby
<np_complete> a ruby-gtk2 app... I mean... the problem is that menu.popup takes event params...
<CannedCorn> hrm, not exactly what i want
<CannedCorn> since all the test classses are instatiated at once
<CannedCorn> i want something that runs at the start of each group of tests (in a testcase class)
ePirat [ePirat!~ePirat@unaffiliated/epirat] has joined #ruby
ryan0x2 [ryan0x2!~ryan0x2@c-75-70-78-223.hsd1.co.comcast.net] has joined #ruby
ryan0x2 [ryan0x2!~ryan0x2@c-75-70-78-223.hsd1.co.comcast.net] has joined #ruby
<guns> CannedCorn: MiniTest::Unit::TestCase#setup doesn't work for you?
<CannedCorn> well setup is called at the start and end of each test
<CannedCorn> i want something that would be called at the start and end of each testcase
<catphish> Seppman: do you mean like Kernel.puts
<catphish> Seppman: ie Kernel.send('puts', 'arrr')
macmartine [macmartine!~macmartin@c-24-21-112-60.hsd1.or.comcast.net] has joined #ruby
<catphish> afaik all methods exist on an object somewhere, self, Kernel, etc
<Seppman> thats the problem, essentially: http://pastebin.com/y3d5Agxh
<Seppman> the EXECUTE line is what isnt going
<guns> Seppman: Create a class with static methods; then you'll have a global reference
<Seppman> better that: http://pastebin.com/Heucdg86
<Seppman> guns: ok, will do that
<guns> or are you looking for file-level functions like in C
Sailias_ [Sailias_!~jonathan@CPE0018f85e576d-CM001bd7aaaf96.cpe.net.cable.rogers.com] has joined #ruby
c0rn [c0rn!~c0rn@adsl-69-110-13-69.dsl.pltn13.pacbell.net] has joined #ruby
h4mz1d [h4mz1d!~hamfz@DHCP-214-001.wireless-resnet.ua.edu] has joined #ruby
zakwilson [zakwilson!~quassel@c-69-180-70-100.hsd1.fl.comcast.net] has joined #ruby
<catphish> Seppman: we'd be a lot less confused if you told us what "command" was
<catphish> what are you trying to execute?
orospakr [orospakr!~orospakr@mobotropolis.orospakr.ca] has joined #ruby
tsd_usa [tsd_usa!~daniel_d@NYUFGA-WLESSAUTHCLIENTS-01.NATPOOL.NYU.EDU] has joined #ruby
<Seppman> some function, for example make some string and call that back to the object
<catphish> i don't understand
<Seppman> its exactly the problem like in http://pastebin.com/Heucdg86
<catphish> can't i have an example?
<catphish> ooh i see
<catphish> you want to execute the method in the root class
<Seppman> yep, that sounds like what i want to do
tommyvyo [tommyvyo!~tommyvyo@c-68-83-3-164.hsd1.nj.comcast.net] has joined #ruby
<catphish> i don't know where those methods can be found :(
<Seppman> i'll do like guns said and make some extra class and put all my callables there. Its not that beautyful, but as it will work....
<catphish> ok, it's called main and its an instance of object
<catphish> yes, making a class is much neater than trying to use main
<catphish> unless you were to pass self through
ephemerian [ephemerian!~ian@82-71-51-229.dsl.in-addr.zen.co.uk] has joined #ruby
<catphish> Seppman: http://pastebin.com/78NVj0SL
<catphish> still, doing it in a class is MUCH tidier
<catphish> my way passes self (the root object) through so you can call methods on it
dross_ [dross_!~dross@unaffiliated/dross] has joined #ruby
<Seppman> cool, thank you so much!
<catphish> but its not neat
<catphish> making classes is much better
<dross_> are there any threaded networking frameworks which come to anyone's mind?
<Seppman> catphish: i'll try both!
<catphish> dross_: eventmachine
<dross_> :|
<dross_> THREADED
<catphish> isnt event machine multithreaded?
<dross_> event machine is an event based library
<catphish> anyway, it's quite easy to make your own threaded network services, i always do it manually
<dross_> I should probably do what I'm trying to do in a langauge which doesn't have a global interpreter lock >.<
tommyvyo [tommyvyo!~tommyvyo@c-68-83-3-164.hsd1.nj.comcast.net] has joined #ruby
<catphish> dross_: depends what you're looking to achieve, if you need multithreaded cpu performance then ruby isn't for you
tommyvyo [tommyvyo!~tommyvyo@c-68-83-3-164.hsd1.nj.comcast.net] has joined #ruby
tommyvyo [tommyvyo!~tommyvyo@c-68-83-3-164.hsd1.nj.comcast.net] has joined #ruby
<dross_> catphish: :) On the other hand, a GIL and not having threads can be beneficial, esp if one of the developers touch my code
<dross_> :( I'm a sys admin who is a devop
<catphish> i'm a sysadmin
<catphish> and i exclusively use ruby
<dross_> I solve everyone's issues, even development's, even doing the job they're supposed to do
<catphish> its very rare that apps are cpu bound
<dross_> I use quite a few langauges :)
<catphish> and when they are i use fork
tommyvyo [tommyvyo!~tommyvyo@c-68-83-3-164.hsd1.nj.comcast.net] has joined #ruby
<dross_> catphish: I was just thinking how to mass control, monitor, and process logs from 500 servers with active monitoring
<dross_> nagios(I'm using icinga) only goes so far
<dross_> unfortunately I'm smarter than any developer there >.<
<dross_> which means if they "send patches," because I always tell people "Send patches or STFU," they may break my projects
<catphish> there really are quite a lot of ways to write it
<dross_> I know >.<
<catphish> really depends on you requirements
<catphish> *your
<catphish> but you can split monitoring and log receiving into separate processes, then use threads
pdtpatrick_ [pdtpatrick_!~pdtpatric@ip72-211-207-15.oc.oc.cox.net] has joined #ruby
<dross_> yeah
<dross_> I was just looking at sep processes per core
<dross_> I'm concerned since I'll be doing this on a VMWare server I'm going to build
<dross_> I need to be careful when I set up the scheduling
<catphish> how many cores do you need to use
<dross_> else I'm going to tank the server which will run other support tools. I'm probably going to be loading data in memory, else I'll be using all of the possible IOPs
<dross_> catphish: that depends on how much data I want to crunch :)
tommyvyo [tommyvyo!~tommyvyo@c-68-83-3-164.hsd1.nj.comcast.net] has joined #ruby
<dross_> there is zero monitoring on these servers
<catphish> well this depends very much on the quantity of data, how much of it you want to write to disk, and how much analysis is needed
<dross_> which are very sensitive servers, if one goes down anywhere from 30-100 quality of lives are affected
<dross_> yeah
<dross_> which is why I'm going to do lots of it in memory
<dross_> I don't need to save each and every piece of freekin data
<catphish> do you just need to receive lines of log, regex them and log alerts?
<dross_> :) I'm going to have the individual servers do some processing before they hit the server
<dross_> then process on from there, comparing the loads, IOPS, etc and reporting back, saving only daily averages
<catphish> i'd imagine you wont have any serious performance issues
<dross_> basically we've an app poorly written
<dross_> plus
<dross_> infrastructure which was not set up right
<dross_> who the hell places backups on the same drive as the running database?
<dross_> then perform to gzip -9 the database?
<dross_> I mean, holy hell when it's a 20G database
bigkm [bigkm!~bigkm@203-206-185-71.perm.iinet.net.au] has joined #ruby
c0rn [c0rn!~c0rn@adsl-69-110-13-69.dsl.pltn13.pacbell.net] has joined #ruby
<catphish> haha
<dross_> 1) services become slow and 2) You start receiving errors because rows aren't beign saved to the database fast enough, causing application errors
<dross_> this is not rocket science people >.<
<dross_> shit man
<dross_> I really dislike computer science graduates
reggal [reggal!~reggal@83.209.146.70] has joined #ruby
<reggal> Ruby st
<dross_> RegEchse: sorry, but I live on Python st
<dross_> reggal: ^
<reggal> Sum bum parlacktical barthy backthickal <new>
<dross_> not >.<
<dross_> *bot >.<
<dross_> reggal: quit
<reggal> /msg dross Do you want to take part in one of the greatest Cyberwars in history? irc.anonops.li #OpDownWithACTA is looking for people to help us in our DDoS against the RIAA. Simply download High Orbit Ion Cannon (hoic.exe) from google and get the Booster file from http://pastebin.com/LqYiDGFW and save as riaa.hoic Enter http://www.copyrightalliances.org into the hostname box and click "Firin
<reggal> my laser"
<dross_> :| what a piece of shit *goes to get the netops*
pdtpatrick_ [pdtpatrick_!~pdtpatric@ip72-211-207-15.oc.oc.cox.net] has joined #ruby
<dubellz> reggal: please, that's off topic for this network
__init__ [__init__!sactage@countervandalism/staff/Sactage] has joined #ruby
<catphish> reggal: that's illegal, please go away
robotmay [robotmay!~robotmay@5ad8f1da.bb.sky.com] has joined #ruby
<__init__> anyone able to point me to a good tutorial for learning ruby?
niko [niko!~niko@freenode/staff/ubuntu.member.niko] has joined #ruby
<dross> niko: just talk to it
<dross> <nick>: message
<dross> and it will try to spam you with that message
<dross> all I said was <nick>: quit
<dubellz> dross: i am currently speaking to it
<dross> :)
<dross> ah sorry, didn't realize you were also a netop
<dubellz> oh no, it's fine. :)
[RHQme]stringo0 [[RHQme]stringo0!~JLstring@bas1-toronto42-1279599475.dsl.bell.ca] has joined #ruby
<dubellz> reggal: ping
<dubellz> seems to be off
<catphish> dubellz: don't people like that get removed from the network?
<catphish> or do you try to avoid doing that
<dross> reggal: stop
frosty1313 [frosty1313!~frosty@li214-159.members.linode.com] has quit [#ruby]
<dross> reggal: quit
<dross> hmm
<dross> or it crashed
jemendja [jemendja!~jemendja@unaffiliated/jemendja] has joined #ruby
<__init__> nope
<__init__> still responding to pings
<dross> hmm
mikepack [mikepack!~mikepack@c-174-51-77-22.hsd1.co.comcast.net] has joined #ruby
<__init__> be glad it's off
<SpitfireWP> reggal: quit
<SpitfireWP> I don't think it's a bot tbh.
<dross> it's an actual person running scripts
<dross> cute
<SpitfireWP> mIRC
<SpitfireWP> Yeah.
<dross> who just happens to be a fucking retard
<dross> I called him a poorfag because he can't buy(rent) a botnet, then he proceeded to ask who the hell buys botnets
<__init__> or likes being annoying
<dross> that could be
<SpitfireWP> dubellz, are you actually in dialog with it?
<SpitfireWP> Because it's idle time is pretty low.
<dross> botnets go for about 20 cents per node per hour :)
<SpitfireWP> So unless that's you talking to it, it's probably PM spamming
<dross> it's me talking to him
<SpitfireWP> Ah.
<dross> I told him to turn around and walk away, that he's a script kiddie
macmartine [macmartine!~macmartin@c-24-21-112-60.hsd1.or.comcast.net] has joined #ruby
<dross> HIOC/LIOC, both tools of script kiddies
Bonkers [Bonkers!~matt@pool-108-27-21-239.nycmny.fios.verizon.net] has joined #ruby
<catphish> there's quite a lot of script kiddies on that server
<dross> there are many children which are butt hurt about megaupload getting shut down
<SpitfireWP> Meh, megaupload is nothing. Lots of other sites providing the same service.
<SpitfireWP> The only thing they should be concerned about it the legal precedent.
<SpitfireWP> is*
<tubgoat_> i think you two are missing the point
<tubgoat_> i guess there are more important things to talk about, like people on the internet and their lack of skill
<SpitfireWP> =p
* SpitfireWP shrugs.
<SpitfireWP> Internet'll always be full of people like that, nothing you can do about it.
<tubgoat_> why speak if you have no idea what youre talking about then?
<tubgoat_> bueller?
<SpitfireWP> umad
<tubgoat_> yea
idletom [idletom!b@173-30-162-172.client.mchsi.com] has joined #ruby
<dross> I might've pissed the script kiddie off
justicefries [justicefries!~justicefr@c-24-9-170-34.hsd1.co.comcast.net] has joined #ruby
havenn [havenn!~skipper@pool-72-67-31-188.lsanca.fios.verizon.net] has joined #ruby
<arex\> gz
<dross> dubellz: sorry if Freenode gets a DDoS
<dubellz> I probably made him a bit more mad than you did, so it would be my fault i assume
<dross> if lilo were here he'd say, ":| why do you always have to create trouble?"
mxweas [mxweas!~max@c-24-7-45-147.hsd1.ca.comcast.net] has joined #ruby
sontek [sontek!~sontek@opensuse/member/Sontek] has quit ["WeeChat 0.3.3"]
<dubellz> mhmm :-)
reggal [reggal!~reggal@83.209.146.70] has joined #ruby
<dross> reggal: I see you've come back for more :)
advorak [advorak!~advorak@216-15-16-163.c3-0.161-ubr1.lnh-161.md.cable.rcn.com] has joined #ruby
aetaric [aetaric!~aetaric@74-130-83-237.dhcp.insightbb.com] has joined #ruby
jetblack [jetblack!~jetblack@99-32-20-118.uvs.evtnil.sbcglobal.net] has joined #ruby
tommyvyo [tommyvyo!~tommyvyo@c-68-83-3-164.hsd1.nj.comcast.net] has joined #ruby
bwlang [bwlang!~anonymous@static-71-245-233-146.bstnma.fios.verizon.net] has joined #ruby
danielpunt [danielpunt!~danielpun@ip120-238-211-87.adsl2.static.versatel.nl] has joined #ruby
mengu [mengu!~mengu@unaffiliated/mengu] has joined #ruby
stephenjudkins [stephenjudkins!~stephen@c-76-115-1-70.hsd1.or.comcast.net] has joined #ruby
<reggal> yeah
<reggal> ¢Ò7¯Îð ¾#^µÙ$[>·”Mð:*IS²ƒK^œ{±,àïfÇþ¥ë
<reggal> @NG=GÂÊdSþ×%KyÍìú®îÛ5쐏üӡ2R k6›‰Èa"ãæãçǧmê)a?k`3#K!´¶ü~¡ûٟ#
<reggal> šˆ·çÒÓ9X›&s*¥Ÿ†©~ð̶´·u‰j
<reggal> D&ֱ3¬náp¼¸Ü޶-ÑL
<reggal> F¸cí
<reggal> yh‡Ï'ïÀ‚Ð,Š¤½@±‹‹ºÒú¦?~Fv֚±‰ðPؓáØ-‡>ˆøc ðwD]Ê
<reggal> ãu8ÆâÇâVµê±ú·K^
<reggal> Cø܀*FÄÈb’ŸƒäL&‹¡ôëWNJݤ™£"ÜÔ<zOZbc99ËþM)ÂòWOÀÊD0|ß>"]çÏs^Uªöuun£œñ{À´^1¤ìqo+j2‰¶_Äæy‹‰T&'AwêzZE0¿
<reggal> 2̘±CE©¶KnDn€ð98Qø¦ì¤ÐäÃ(
<reggal> heheh
<reggal> let's play guess the language
<reggal> சூப்பர் நல்ல எளிதாக கலிபோர்னியா இந்திய சிக்கிம் புதர்களை இளைஞர்கள் இலவச பேராசை மரம் தலைநகர் நிச்சயமாக கல்லூரியில் மூன்று நாற்பது ஏழு குதிரை இடையூ
<reggal> று செய்வது எளிதாக கொண்டு ரைம் இல்லை அது பழம் செய்கிறது
<kloeri> reggal: stop that
<reggal> what's that language
<affix> so this is the channel that made me want to install Syriak Fonts
<reggal> الكتاب تكلفة الطالب الذي يذاكر كثيرا عن اليونان البيرة للجميع للجميع في أوروبا اليوم نحتفل مثليون جنسيا وجنسهم الحمار رائعة نمت الليلة حتى زيارة عظة للزيارات غابة مجرد الجوع أو اثنين شجرة الضفادع الجياع فرس النهر وحيد
<reggal> القرن
<reggal> that's arabic
<davidcelis> reggal: ಠ_ಠ
<davidcelis> stop
<reggal> or is it...
<reggal> no wait, it's Urdu
<reggal> خوردن نخود فرنگی پوسته شیرینی خوش طعم نان ترکی نمی افزایش آلت تناسلی مرد سوار سفر به علت عادلانه غذا نمی خورد پرتقال دندان طعم طاعون تاج گل بپیچید تشنگی من برای آب و اسید هیدروفلوریک موسیقی اندیشمندانه تون تونی آلت تناسلی
<reggal> مرد سیب زمینی داغ
<reggal> now that's arabic
<dubellz> reggal: see your PMs
<davidcelis> apeiros_: Hi