#apache #archlinux #asterisk #centos #debian #gentoo #haskell #kde #kubuntu #lisp #math #mysql #perl #python #ruby-lang #rubyonrails #suse #ubuntu #vim #wikipedia 0 1 2 3 4 5 6 7 8 9 10 
Top Prev 7044 7045 7046 7047 7048 7049 7050 7051 7052 7053 7054 7055 7056 7057 7058 7059 7060 7061 7062 Next

#ruby-lang

<rixxon> dict.include? word
<LoganCapaldo> (Set works on top of hash)
<rixxon> or is a hash faster, really?
<blink> require 'set'; dict=Set.new; words.each{|word| dict.add word };
<LoganCapaldo> Hash is amortized O(1) for has_key?
<LoganCapaldo> arrays are O(n) for include?
<blink> Set#include
<blink> Set#include? exists, right?
<LoganCapaldo> I hope so :)
<blink> heh
<imperator> anyone here got a FreeBSD 4.x system I can have access to?
<imperator> the SF compile farm went bye bye
<mirzapirza__> and the Set#include? is hash-lookup speed?
<blink> yes
<rixxon> imperator: why don't you run a virtual machine
<LoganCapaldo> yes
<mirzapirza__> nice
<blink> Set is a hash based unordered collection.
<LoganCapaldo> Its just doing what you are doing but hiding the [word] = true part
<mirzapirza__> handy
<imperator> rixxon, don't know how
<blink> mirzapirza__: are yoou doing a passwd check, out of curiosity?
<mirzapirza__> i guess i could use a set for storing the right words i've found, too- since they have to be unique
<mirzapirza__> i'm working away on an extra credit assignment for discrete math
<blink> ...
<blink> ewwwww.
<blink> discrete math++
<mirzapirza__> not that i have time for this, but it's fun
<LoganCapaldo> huzzah
<LoganCapaldo> discrete math is the bestest
<blink> LoganCapaldo: indeed. i loves it.
<blink> ta ta ya'll. off for some rock.
<mirzapirza__> it's fun, but sometimes i worry that i'm doing it wrong
<LoganCapaldo> don't worry
<LoganCapaldo> just accept that you are almost certainly doing it wrong ;)
<mirzapirza__> like for longest increasing and decreasing subsequences, i just found them all and checked which was the longest. kinda brute forced, but it was way faster than Rosen's
<mirzapirza__> haha :/
<motion> anyone here listen to cranberries
<LoganCapaldo> I've tried, but they don't make a lot of noise
<LoganCapaldo> at least not off the plant
<motion> :-/
<motion> ill throw that in the bad jokes category :p
<LoganCapaldo> You have a bad jokes category?
<LoganCapaldo> What are the morphisms?
<motion> whats a morphism :x
<LoganCapaldo> http://en.wikipedia.org/wiki/Category_theory
<teferi> LoganCapaldo: feed lines, of course
<LoganCapaldo> You should probably place that in the bad jokes category too
<LoganCapaldo> maybe also in the obscure reference category
<teferi> if that's obscure, i don't want to be mainstream

Previous Page  Next Page

Search ircarchive.info