|
|
|
|
|
|
| |
| |
|
|
|
|
| |
| |
|
|
On Fri, 03 Apr 2009 18:08:30 -0300, nemesis wrote:
> When the company
> was closing doors, they realized the tool was quite complete and good
> enough perhaps not for going commercial
I understood that it used to be commercially available....
Jim
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
nemesis wrote:
> The community literally bought a former proprietary product and
> open-sourced it. Even Stallman gone hurrah. :)
I'd read about the first part, but not the auction. That's pretty clever.
--
Darren New, San Diego CA, USA (PST)
There's no CD like OCD, there's no CD I knoooow!
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
Darren New <dne### [at] sanrrcom> wrote:
> nemesis wrote:
> > C++/Haskell/Lisp/Tcl all at the same time!
>
> I know Tcl. I'm trying to learn Python. ;-)
Hey, me too. I'm in love already. With numpy and scipy too, I can control the
hardware, collect data, and process it efficiently in the same language! It's
really a great compromise. And dictionaries? Outstanding.
- Ricky
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
triple_r wrote:
> And dictionaries? Outstanding.
Actually, python dictionaries are pretty lame compared to dictionaries in
some other languages, like PHP. Lots of good uses for them, but they're
really nothing more than a hashtable.
--
Darren New, San Diego CA, USA (PST)
There's no CD like OCD, there's no CD I knoooow!
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
Darren New wrote:
> nemesis wrote:
>> The community literally bought a former proprietary product and
>> open-sourced it. Even Stallman gone hurrah. :)
>
> I'd read about the first part, but not the auction. That's pretty clever.
Pretty much like the ones you spot from time to time in the headers of
wikipedia. It was an amazing event in any way.
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
Jim Henderson wrote:
> On Fri, 03 Apr 2009 18:08:30 -0300, nemesis wrote:
>
>> When the company
>> was closing doors, they realized the tool was quite complete and good
>> enough perhaps not for going commercial
>
> I understood that it used to be commercially available....
Not quite sure about that. But the company was definitely closing doors
and seemingly not interested in maintaining it though they saw its value.
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
Darren New wrote:
> Actually, python dictionaries are pretty lame compared to dictionaries
> in some other languages, like PHP.
I don't know PHP, so I'm curious if you could elaborate a bit, since I'm
used to viewing "dictionary" as more of less a synonym for "hashtable"
in this context.
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
Darren New <dne### [at] sanrrcom> wrote:
> Actually, python dictionaries are pretty lame compared to dictionaries in
> some other languages, like PHP.
Really? Interesting, but perhaps I should clarify. The only other languages I
know are C/C++, Fortran, Matlab, and... let's see... POV-Ray? I'm sure they're
perfectly capable, but having it built in is really great.
- Ricky
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
Kevin Wampler <wam### [at] uwashingtonedu> wrote:
> Darren New wrote:
> > Actually, python dictionaries are pretty lame compared to dictionaries
> > in some other languages, like PHP.
>
> I don't know PHP, so I'm curious if you could elaborate a bit, since I'm
> used to viewing "dictionary" as more of less a synonym for "hashtable"
> in this context.
Yeah, me too. What is it lacking exactly? Specially compared to an aberration
like PHP?
Python 2.5.2 (r252:60911, Jul 31 2008, 17:28:52)
[GCC 4.2.3 (Ubuntu 4.2.3-2ubuntu7)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> d = {}
>>> type( d )
<type 'dict'>
>>> d['foo'] ="bar"
>>> d
{'foo': 'bar'}
>>> dir( d )
['__class__', '__cmp__', '__contains__', '__delattr__', '__delitem__',
'__doc__', '__eq__', '__ge__', '__getattribute__', '__getitem__', '__gt__',
'__hash__', '__init__', '__iter__', '__le__', '__len__', '__lt__', '__ne__',
'__new__', '__reduce__', '__reduce_ex__', '__repr__', '__setattr__',
'__setitem__', '__str__', 'clear', 'copy', 'fromkeys', 'get', 'has_key',
'items', 'iteritems', 'iterkeys', 'itervalues', 'keys', 'pop', 'popitem',
'setdefault', 'update', 'values']
>>> d.items()
[('foo', 'bar')]
>>> d[1] = 2
>>> d[1]
2
>>> d[2]=lambda x:x+1
>>> d
{1: 2, 2: <function <lambda> at 0x8198fb4>, 'foo': 'bar'}
>>> d[2](3)
4
>>> for k,v in d.items():
.... print k, " => ", v
....
1 => 2
2 => <function <lambda> at 0x8198fb4>
foo => bar
>>>
It can take arbitrary objects as keys and has a wealth of good methods to choose
from. Perhaps it's time for some friday night troll? ;)
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
Kevin Wampler wrote:
> I don't know PHP, so I'm curious if you could elaborate a bit, since I'm
> used to viewing "dictionary" as more of less a synonym for "hashtable"
> in this context.
Hmmm... A dictionary in PHP is more like an array of key/value pairs. So
they preserve the order in which you inserted elements, they have integer
indecies, but they also act as hash tables. Plus, you can say things like
x[] = 27
to append 27 to the end of the array, whatever size it is. So they work as
both dictionaries, arrays, and ordered maps.
http://us3.php.net/manual/en/language.types.array.php
Honestly, I don't think I've ever *used* the fact that the keys maintain an
order even when they're not integers.
Lua dictionaries (called "tables") are also kind of odd, in that they are
apparently hashtables with special rules for entries with integer keys as
well as an independent "size", but I didn't follow it far enough to
understand what was going on exactly there. It was kind of funky mixing
integer and non-integer indecies, in the tutorials I was reading.
--
Darren New, San Diego CA, USA (PST)
There's no CD like OCD, there's no CD I knoooow!
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
|
|