Search Results

Search found 16 results on 1 pages for 'clos'.

Page 1/1 | 1 

  • Des fonctions d'Ubuntu 13.04 seront développées à huis clos, vers une fermeture de l'OS ?

    Des fonctions d'Ubuntu 13.04 développées à huis clos Canonical adopte une nouvelle méthode de développement pour Raring Ringtail, vers une fermeture de l'OS ? À peine Canonical a publié Ubuntu 12.10, que la firme livre déjà quelques informations sur son successeur. Comme il est de coutume, l'OS est d'abord passé par la traditionnelle étape de définition de son nom de code. Ubuntu 13.04 sera baptisé « Raring Ringtail », d'après un billet de blog de Mark Shuttleworth, fondateur de Canonical. Cette mouture sera essentiellement centrée sur la mobilité. Le coeur du système d'exploitation sera nettoyé au maxim...

    Read the article

  • How to write (simple) macro?

    - by krzysz00
    I need to write a macro (with-hooks (monster method who what) &body body) for a game I'm writing. Monster is a CLOS object, method and who are strings and what is a function (#' notation). The macroexpansion would be something to the effect of (add-hook monster method who what) ,@body (remove-hook monster method who) I have absolutely no idea how to write such a macro, and I would appreciate some help.

    Read the article

  • Create a polynomial object from a number using change-class

    - by charlieb
    I have written a polynomial class along the lines described in SICP 2.5.3 (except using defclass). I would like to be able to seamlessly add and multiply polynomials and regular numbers but I can't make change-class accept a number. I tried to simplify the problem by changing class from an integer to a float: (change-class 4 'float) but that gave me the error: There is no applicable method for the generic function #<STANDARD-GENERIC-FUNCTION CHANGE-CLASS (7)> when called with arguments (4 #<BUILT-IN-CLASS FLOAT>). [Condition of type SIMPLE-ERROR] I get an error of the same form from (fyi): (change-class 4 'polynomial) I'm going to go ahead and implement a manual conversion but I would prefer to use the built-in clos facilities.

    Read the article

  • memory usage by objects in common lisp

    - by Farzad Bekran
    Is there a way to find out how much memory is used by an instance of a class or basic data types in general? I have a toy webframework in cl that creates and manages web pages with instances of classes that represent the html tags and their properties, and as they are supposed to make an html page, they have children in a slot called children. so I was thinking how much a user's session will cost the server if I take this approach. Thanks.

    Read the article

  • Using game of life or other virtual environment for artificial (intelligence) life simulation? [clos

    - by Berlin Brown
    One of my interests in AI focuses not so much on data but more on biologic computing. This includes neural networks, mapping the brain, cellular-automata, virtual life and environments. Described below is an exciting project that includes develop a virtual environment for bots to evolve in. "Polyworld is a cross-platform (Linux, Mac OS X) program written by Larry Yaeger to evolve Artificial Intelligence through natural selection and evolutionary algorithms." http://en.wikipedia.org/wiki/Polyworld " Polyworld is a promising project for studying virtual life but it still is far from creating an "intelligent autonomous" agent. Here is my question, in theory, what parameters would you use create an AI environment? Possibly a brain environment? Possibly multiple self contained life organisms that have their own "brain" or life structures. I would like a create a spin on the game of life simulation. What if you have a 64x64 game of life grid. But instead of one grid, you might have N number of grids. The N number of grids are your "life force" If all of the game of life entities die in a particular grid then that entire grid dies. A group of "grids" makes up a life form. I don't have an immediate goal. First, I want to simulate an environment and visualize what is going on in the environment with OpenGL and see if there are any interesting properties to the environment. I then want to add "scarce resources" and see if the AI environment can manage resources adequately.

    Read the article

  • Does CLOS have an eql specialization dispatch on strings?

    - by mhb
    Examples of what you can do. (defmethod some-fn ((num real)) (print "an integer")) (defmethod some-fn ((num real)) (print "a real")) (defmethod some-fn ((num (eql 0))) (print "zero")) (some-fn 19323923198319) "an integer" (some-fn 19323923198319.3) "a real" (some-fn 0) "zero" It also works with a general 'string type. (defmethod some-fn ((num string)) (print "a string")) (some-fn "asrt") "a string" Not with a specific string, however (defmethod some-fn ((num (eql "A")) (print "a specifict string"))) => doesn't compile I imagine it doesn't work because eql does not work on strings in the way that would be necessary for it to work. (eql "a" "a") => nil Is there a way to do it?

    Read the article

  • Why is short project lifetime and other situation-specific reasons used to excuse crappy code? [clos

    - by sharptooth
    Every now and then (including on SO) people say things implying that "if the project is short lived you can leave obvious defects there" or "that memory leak only accounts for 100 bytes per whole program lifetime and could be left". Now in my practice I always reuse company-owned code to the greatest extent I can. Like if I need something and I can find it in the company codebase I take it from there and reuse or adapt. This means that any crappy code will be reused as well and I might notice or not notice defects therein. So the defect in some "test we only need for a month" can slip into a proram we ship to customers. And a leak that "only accounted for 100 bytes per lifetime" now could account for 100 bytes 10 times per second in a server application intended to run for months. That's why I don't understand why excuses like that are offered. Is our compamy the only one having a source control? Or are we the only company that requires writing human-readable code? Could anyone shed a light on why people seriously offer such excuses?

    Read the article

  • Types in Lisp and Scheme

    - by user2054900
    I see now that Racket has types. At first glance it seems to be almost identical to Haskell typing. But is Lisp's CLOS covering some of the space Haskell types cover? Creating a very strict Haskell type and an object in any OO language seems vaguely similar. It's just that I've drunk some of the Haskell kool-aid and I'm totally paranoid that if I go down the Lisp road, I'll be screwed due to dynamic typing.

    Read the article

  • Edubuntu et kubuntu 13.04 disponibles en Alpha 1, Raring Ringtail adopte un nouveau cycle qui met fin aux versions Alpha pour Ubuntu

    Edubuntu et kubuntu 13.04 disponibles en Alpha 1 Raring Ringtail adopte un nouveau cycle qui met fin aux versions Alpha pour Ubuntu Canonical vient de publier la première Alpha de Raring Ringtail, qui marque le début du cycle des sorties des préversions d'Ubuntu 13.04, qui aboutira à la publication de la version finale l'année prochaine. Si Ubuntu 13.04 se distingue surtout par l'adoption d'une nouvelle méthode de développement à huis clos des nouvelles fonctionnalités, l'OS introduit également un nouveau cycle de sorties des préversions de l'OS. Ce nouveau cycle a essentiellement pour but de réduire le nombre d'é...

    Read the article

  • Que pensez-vous du projet de régulation internationale d'Internet ? 193 pays réunis à Dubaï, des acteurs du Web s'inquietent

    Qu'auriez-vous aimé ou pas voir sur le nouveau traité international pour réguler Internet? Les géants de la Toile s'inquiètent au moment où 193 pays réunis à Dubaï décident sur l'avenir d'Internet Ce lundi à Dubaï, Emirates Ababes Unis, des délégations de 193 pays se réunissent à huis clos pour discuter de la régulation et de la gouvernance d'Internet, lors du sommet international organisé par l'Union internationale des télécoms(UIT) -l'organe de l'ONU chargé de superviser les télécommunications internationales. Baptisée Conférence mondiale sur les télécommunications internationales (WCIT-12), tous les Etats membres de l'UIT vont débattre pendant 11 jours sur les règles internationales à applique...

    Read the article

  • How to make TWebBrower ignore accelerator chars of others controls?

    - by douglaslise
    I have a TWebBrowser placed on a form with the designMode enabled. Bellow the browser I have a close button with the Caption setted to 'Clos&e'. When I am editing the contents of a document inside the WebBrowser and I press the key E the button close is called. It appears that it is treating TWebBrowser like other controls that don't handle keys (e.g. TButton). How can I solve this? Thanks in advance.

    Read the article

  • How to make TWebBrowser ignore accelerator chars of others controls?

    - by douglaslise
    I have a TWebBrowser placed on a form with the designMode enabled. Bellow the browser I have a close button with the Caption set to 'Clos&e'. When I am editing the contents of a document inside the WebBrowser and I press the key E the button close is called. It appears that it is treating TWebBrowser like other controls that don't handle keys and/or don't accept chars (e.g. TButton). How can I solve this? Thanks in advance.

    Read the article

  • Is OOP hard because it is not natural?

    - by zvrba
    One can often hear that OOP naturally corresponds to the way people think about the world. But I would strongly disagree with this statement: We (or at least I) conceptualize the world in terms of relationships between things we encounter, but the focus of OOP is designing individual classes and their hierarchies. Note that, in everyday life, relationships and actions exist mostly between objects that would have been instances of unrelated classes in OOP. Examples of such relationships are: "my screen is on top of the table"; "I (a human being) am sitting on a chair"; "a car is on the road"; "I am typing on the keyboard"; "the coffee machine boils water", "the text is shown in the terminal window." We think in terms of bivalent (sometimes trivalent, as, for example in, "I gave you flowers") verbs where the verb is the action (relation) that operates on two objects to produce some result/action. The focus is on action, and the two (or three) [grammatical] objects have equal importance. Contrast that with OOP where you first have to find one object (noun) and tell it to perform some action on another object. The way of thinking is shifted from actions/verbs operating on nouns to nouns operating on nouns -- it is as if everything is being said in passive or reflexive voice, e.g., "the text is being shown by the terminal window". Or maybe "the text draws itself on the terminal window". Not only is the focus shifted to nouns, but one of the nouns (let's call it grammatical subject) is given higher "importance" than the other (grammatical object). Thus one must decide whether one will say terminalWindow.show(someText) or someText.show(terminalWindow). But why burden people with such trivial decisions with no operational consequences when one really means show(terminalWindow, someText)? [Consequences are operationally insignificant -- in both cases the text is shown on the terminal window -- but can be very serious in the design of class hierarchies and a "wrong" choice can lead to convoluted and hard to maintain code.] I would therefore argue that the mainstream way of doing OOP (class-based, single-dispatch) is hard because it IS UNNATURAL and does not correspond to how humans think about the world. Generic methods from CLOS are closer to my way of thinking, but, alas, this is not widespread approach. Given these problems, how/why did it happen that the currently mainstream way of doing OOP became so popular? And what, if anything, can be done to dethrone it?

    Read the article

  • Java - is this an idiom or pattern, behavior classes with no state

    - by Berlin Brown
    I am trying to incorporate more functional programming idioms into my java development. One pattern that I like the most and avoids side effects is building classes that have behavior but they don't necessarily have any state. The behavior is locked into the methods but they only act on the parameters passed in. The code below is code I am trying to avoid: public class BadObject { private Map<String, String> data = new HashMap<String, String>(); public BadObject() { data.put("data", "data"); } /** * Act on the data class. But this is bad because we can't * rely on the integrity of the object's state. */ public void execute() { data.get("data").toString(); } } The code below is nothing special but I am acting on the parameters and state is contained within that class. We still may run into issues with this class but that is an issue with the method and the state of the data, we can address issues in the routine as opposed to not trusting the entire object. Is this some form of idiom? Is this similar to any pattern that you use? public class SemiStatefulOOP { /** * Private class implies that I can access the members of the <code>Data</code> class * within the <code>SemiStatefulOOP</code> class and I can also access * the getData method from some other class. * * @see Test1 * */ class Data { protected int counter = 0; public int getData() { return counter; } public String toString() { return Integer.toString(counter); } } /** * Act on the data class. */ public void execute(final Data data) { data.counter++; } /** * Act on the data class. */ public void updateStateWithCallToService(final Data data) { data.counter++; } /** * Similar to CLOS (Common Lisp Object System) make instance. */ public Data makeInstance() { return new Data(); } } // End of Class // Issues with the code above: I wanted to declare the Data class private, but then I can't really reference it outside of the class: I can't override the SemiStateful class and access the private members. Usage: final SemiStatefulOOP someObject = new SemiStatefulOOP(); final SemiStatefulOOP.Data data = someObject.makeInstance(); someObject.execute(data); someObject.updateStateWithCallToService(data);

    Read the article

1