I am interested in High-performance computing exploration and research, comparison of algorithms and platforms and tools. Example applications are optimization algorithms are Monte Carlo Simulations of Lattice QCD.
Posts Tagged ‘programming’
Popular computing
Posted by arnulfo on 2009/11/02
Posted in Uncategorized | Tagged: Internet, linkedin, mathematics, programming, Science, Software, Technology | Leave a Comment »
The Nature of Lisp
Posted by arnulfo on 2007/07/27
Taken from http://www.defmacro.org/ramblings/lisp.html#note-blaise
Posted in Uncategorized | Tagged: Lisp, programming | Leave a Comment »
google talk
Posted by arnulfo on 2007/07/26
Peter Seibel
ABSTRACT In the late 1920’s linguists Edward Sapir and Benjamin Whorf hypothesized that … all » the thoughts we can think are largely determined by the language we speak. In his essay “Beating the Averages” Paul Graham echoed this notion and invented a hypothetical language, Blub, to explain why it is so hard for programmers to appreciate programming language features that aren’t present in their own favorite language. Does the Sapir-Whorf hypothesis hold for computer languages? Can you be a great software architect if you only speak Blub? Doesn’t Turing equivalence imply that language choice is just another implementation detail? Yes, no, and no says Peter Seibel, language lawyer (admitted, at various times, to the Perl, Java, and Common Lisp bars) and author of the award-winning book _Practical Common Lisp_. In his talk, Peter will discuss how our choices of programming language influences and shapes our pattern languages and the architectures we can, or are likely to, invent. He will also discuss whether it’s sufficient to merely broaden your horizons by learning different programming languages or whether you must actually use them.
Posted in Uncategorized | Tagged: programming | Leave a Comment »
classmethod python
Posted by arnulfo on 2007/07/26
classmethod(function)
Returns a class method for function.
A class method receives the class as implicit first argument, just like an instance method receives the instance. To declare a class method, use this idiom:
class C:
@classmethod
def f(cls, arg1, arg2, ...): ...
The @classmethod form is a function decorator — see def for details.
It can be called either on the class (such as C.f()) or on an instance (such as C().f()). The instance is ignored except for its class. If a class method is called for a derived class, the derived class object is passed as the implied first argument.
My personal experience is that I almost *never* want a staticmethod.
The things that I would have written as a staticmethod in Java I simply
write as a module-level function in Python.
I do occasionally used classmethods though to build alternate
constructors. I recently had a class with a constructor that looked like:
class C(object):
def __init__(self, *args):
…
I already had code working with this constructor, but I needed to add an
optional ‘index’ parameter. I found the clearest way to do this was
something like:
class C(object):
def __init__(self, *args):
…
@classmethod
def indexed(cls, index, *args):
…
obj = cls(*args)
obj.index = index
…
return obj
Then the classes that needed the ‘index’ parameter simply use
C.indexed() as the constructor instead of C().
STeVe
Posted in Uncategorized | Tagged: programming, python | Leave a Comment »
Python Generator Tricks
Posted by arnulfo on 2007/07/26
By Pramode C.E.
The Python programming language’s support for generators is described in PEP 255. This article demonstrates a few simple programs which make use of this feature to do some fun stuff like filtering out prime numbers, representing an `infinite’ series expansion in a finite way, applying the Euler `accelerator’ to make a series converge faster etc. Many of the programs which I describe here have been taken from `test_generators.py’ which is available with the Python source distribution. A few ideas have been stolen from the Computer Science classic, Structure and Interpretation of Computer Programs.
Posted in Uncategorized | Tagged: programming, python | Leave a Comment »
Weak reference
Posted by arnulfo on 2007/07/26
From Wikipedia, the free encyclopedia
In computer programming, a weak reference is a reference that does not protect the referent object from collection by a garbage collector. An object referenced only by weak references is considered unreachable (or “weakly reachable”) and so may be collected at any time. Weak references are used to prevent circular references and to avoid keeping in memory referenced but unneeded objects. Many garbage-collected, object-oriented languages feature weak references, such as Java, Python, REALbasic, and ActionScript 3.0.
Posted in Uncategorized | Tagged: programming | Leave a Comment »
and or python
Posted by arnulfo on 2007/07/26
4.6. The Peculiar Nature of and and or
In Python, and and or perform boolean logic as you would expect, but they do not return boolean values; instead, they return one of the actual values they are comparing.
This trick may seem like more trouble than it’s worth. You could, after all, accomplish the same thing with an if statement, so why go through all this fuss? Well, in many cases, you are choosing between two constant values, so you can use the simpler syntax and not worry, because you know that the a value will always be true. And even if you need to use the more complicated safe form, there are good reasons to do so. For example, there are some cases in Python where if statements are not allowed, such as in lambda functions.
Further Reading on the and-or Trick
- Python Cookbook discusses alternatives to the and-or trick.
Posted in Uncategorized | Tagged: Language, programming, python, Software | Leave a Comment »
PHP 4 out of support
Posted by arnulfo on 2007/07/21
Posted in Uncategorized | Tagged: php, programming | Leave a Comment »
Networld
Posted by arnulfo on 2007/07/09
Six ways to fight back against botnets
Botnets are a growing threat, but there are six steps that security professionals can take to fight back.
Novell to SUSE users: Don’t worry about Microsoft’s stand on GPLv3
Microsoft moves to avoid any legal ambiguity over GPLv3, but Novell says SUSE Linux users have nothing to worry about.
Average zero-day bug has 348-day lifespan, exec says
The average zero-day bug has a lifespan of 348 days before it is discovered or patched, but some vulnerabilities live on for much longer, according to security vendor Immunity’s CEO.
Posted in Uncategorized | Tagged: microsoft, nix, programming, Security, Software | Leave a Comment »
The Reinvention of Software
Posted by arnulfo on 2007/07/09
Optimize (06/07)No. 68, P. 48; Chou, Timothy
The consumer Internet is an excellent resource for determining the next wave of business software, because that is where next-generation business applications are coming from, writes author and former Oracle On Demand President Timothy Chou. The ease of use of Google is key to its adoption, and this example provides an object lesson on the tremendous value of simplification.
Posted in Uncategorized | Tagged: programming, Software | Leave a Comment »