>>1
they smell good and you can pick fruits and stuff of them.
you should go more outside.
Name:
Anonymous2010-05-28 15:08
They're good for making paper, for one thing.
Name:
Anonymous2010-05-28 15:10
trees are used to group data for fast lookup.
*b-trees are used in sql databases to make greater than less than lookups work quickly.
*r-trees are used for spatial indexing.
*distributed hash tables can provide fast lookup of peers in a decentralized network by organizing nodes into a tree.
Name:
Anonymous2010-05-28 15:18
>>5
And how are those better than basic hash tables?
Trees are useful in very special circumstances, you never need to know them for general tasks and when you need them you'll find an implementation easily.
Numbers are useful in very special circumstances, you never need to know them for general tasks and when you need them you'll find an implementation easily.
>>13
If you are using strings for that instead of an array/list of numbers, then you are a moron (or an erlang user)
Name:
Anonymous2010-05-28 19:06
>>14
if you are using something for strings other than sequences of characters and something for characters other than sequences of bits (which are numbers), then you are a moron (or using a quantum computer, but then you have infinitely many problems).
Name:
Anonymous2010-05-28 19:15
>>1
They helped to make the best hardcover book of all time. SICP.
>>15
I see this has gotten out of hand. >>11 was me taking the piss out of >>1. In >>14 I was talking about the general case of needing a representation of a sequence of numbers (which a string like "12 13 14" is a poor data structure for), and not how strings are implemented in your computer. I hope thats cleared everything up
>>18
the way I interpreted his post was as an answer to the question "what good are strings". Therefor "you've never had to use sequences of numbers?" seemed to me as if he was suggesting, "strings are good for representing sequences of numbers". As for the format, it was an arbitrary decision and could have been represented in a different manner.
And just for the record, I believe that having strings by an array(or list) of numbers a la C (arguably) and erlang, instead of having a separate character type is stupid.
>>30
besides copy-tree and the like, subst/-if/-if-not and related, do let you map over a tree and replace elements selectively.
Mind explaining what kind of functions you'd like to see? Most of the times I needed to work with complex circular lists, I was dealing with graphs and more complex structures, and for those, I needed a full-fledged graph manipulation library (which I did find, altough, the documentation sucked, but was overall easy to use).
I ended up writing a recursive function to do it and just wondered why there isn't something like this built into the language when there are lots of other constructs you could also just reinvent on your own but are useful enough to include. Or maybe I'm just missing something obvious.
>>34
They can be useful if you have a lot of data and need a faster way than iteration to look up an element (and you cannot just use regular indexing because the keys are too large).
>>19
many languages do have a separate character type, but that character type is almost always an integral type.
in haskell this is not the case, until you do something like this: both :: Arrow a => a b c -> a (b, b) (c, c)
both = join (***)
instance Num Char where
fromInteger = chr . fromInteger
(+) = ((chr . flip mod (ord maxBound + 1) . uncurry (+)) .) . curry (both ord)
(*) = ((chr . flip mod (ord maxBound + 1) . uncurry (*)) .) . curry (both ord)
(-) = ((chr . flip mod (ord maxBound + 1) . uncurry (-)) .) . curry (both ord)
negate = chr . (ord maxBound + 1 -) . ord
abs = id
signum = chr . signum . ord
instance Real Char where
toRational = toRational . ord
instance Integral Char where
quotRem = ((both chr . uncurry quotRem) .) . curry (both ord)
toInteger = toInteger . ord
>>36
It's not like Haskells solution is much better, really, since all you are doing is performing a type conversion before each (primitive number) operation and informing the type system that "it's cool bro". If the cost wasn't so minimal, you'd be better off converting once, doing your number operations and then converting back, which is what I'd do in Scheme (Yes, i fully accept it's cheating the type system). If we could agree on a method for doing generic functions, I imagine we could get a solution similar to the Haskell one, but getting Schemers to agree is....yeah.
On a separate note, with that solution can you intermix it with other Numeric types? I was under the impression that you couldn't mix types within a typeclass instance. So, with your solution I imagine that you can't do 'I' + 3 and get 'L'. Or will Haskell "do the right thing" as it does for other cases where you intermix numbers?
If the cost wasn't so minimal, you'd be better off converting once, doing your number operations and then converting back,
it's nice to be able to do things like uncurry (flip (:)) . (ap ((!!) . (: [[]]) . f) (0 ^) *** ('0' +) . fromInteger) . flip divMod 10, tho.
On a separate note, with that solution can you intermix it with other Numeric types? I was under the impression that you couldn't mix types within a typeclass instance. So, with your solution I imagine that you can't do 'I' + 3 and get 'L'. *Test> 'I' + 3
'L'
(0.00 secs, 0 bytes)
*Test>
but that's not actually mixing types. both 'I' and 3 in 'I' + 3 are Chars.
>>46
What, Twitter? When it's become so popular even politicians and grandmothers are using it, I think it stops being ``hipster shit'' by definition. Meanwhile, hating Twitter has become a hipster fad akin to not having a Facebook out loud and being proud of not owning a TV.
It's fair enough not to have a Twitter account of your own because you don't think it's useful or you don't trust Twitter to be competent enough to keep your data safe, but hating it because people use it is childish.
>>49
I was proud to have no TV before the internet was cool, i.e. when it actually was cool (read: devoid of advertising.) Now that the internet has TV (complete with ads--gotta love it, this is actual piracy) the fact that I do not own a television is sort of meaningless.
Twitter is difficult to hate. They don't seem to be doing anything underhanded and the users are less annoying than one would expect. I have an account but I haven't used it in any capacity for quite some time.
Facebook is easy to hate, though. The network gives people all the tools they need to be as annoying as possible (you'd have to hand out free cellphones to make it any worse), and underhandedness seems to be in the mission statement somewhere.
>>49
I don't have a Facebook account but I don't understand people loudly exclaiming that (they don't have one) like a badge of honor. Is it part of some attempt to sound nouveau-trendy?
I keep track of people I know with phone calls, liberal instant messaging, and very conservative text messaging; all of this is, of course, trumped by actually being there with them in person.
>>52 share every single detail you put on your profile
Again, the problem there isn't Facebook, but you. Don't fucking put it on the public Internet if you don't want people to see it. Social networking exists entirely to disseminate the information you give it.
>>58
You should be downloading British TV shows instead.
Name:
Anonymous2010-05-30 15:32
Tv, facebook, and twitter are shit
The only thing you should be doing is watching b-rated movies with girlfriends that you aren't dating just for the sex.
>>59 You should be downloading British TV shows instead.
Fully one third of the TV shows Xarn lists as his favorite on his Facebook profile are American!
Name:
Anonymous2010-05-31 1:15
>>59
I do like Charlie Brooker. I watch some of his shows on Youtube from time to time.
>>60
No, you should watch those things with some bros. I have yet to meet a girl who gets the appeal of MST3K. Nevermind non-riffed masterpieces such as Samurai Cop.