Search Results

Search found 10 results on 1 pages for 'dokkat'.

Page 1/1 | 1 

  • Is there a language where collections can be used as objects without altering the behavior?

    - by Dokkat
    Is there a language where collections can be used as objects without altering the behavior? As an example, first, imagine those functions work: function capitalize(str) //suppose this *modifies* a string object capitalizing it function greet(person): print("Hello, " + person) capitalize("pedro") >> "Pedro" greet("Pedro") >> "Hello, Pedro" Now, suppose we define a standard collection with some strings: people = ["ed","steve","john"] Then, this will call toUpper() on each object on that list people.toUpper() >> ["Ed","Steve","John"] And this will call greet once for EACH people on the list, instead of sending the list as argument greet(people) >> "Hello, Ed" >> "Hello, Steve" >> "Hello, John"

    Read the article

  • If Scheme is untyped, how can it have numbers and lists?

    - by Dokkat
    Scheme is said to be just an extension of the Untyped Lambda Calculus (correct me if I am wrong). If that is the case, how can it have Lists and Numbers? Those, to me, look like 2 base types. So I'd say Racket is actually an extension of the Simply Typed Lambda Calculus. No? Question: Is Scheme's type system actually based or more similar to Simply Typed or Untyped Lambda Calculus? In what ways does it differ from Untyped and or Simply Typed Lambda Calculus? (The same question is valid for "untyped" languages such as Python and JavaScript - all of which look like they have base types to me.)

    Read the article

  • Any language where every class instance is a class too?

    - by Dokkat
    Taking inspiration from Javascript prototypes, I had the idea of a language where every instance can be used as a class. Before I potentially reinvent the wheel, I would like to ask if there is a language already using this concept: //To declare a Class, extend the base class (in this case, Type) Type(Weapon,{price:0}); //Same syntax to inherit; simply extend the parent: Weapon(Sword,{price:3}); Weapon(Axe,{price:4}); Sword(Katana,{price:7}); Sword(Dagger,{price:3}); //And the same to create an instance: Katana(myKatana,{nickname:"Leon"}); myKatana.price; // 7 myKatana.nickname; // Leon // An operator to return children of a class; Sword_; // [Katana, Dagger] // An operator to return array of descendants; Sword__; // [Katana, Dagger, myKatana] // An operator to return array of parents; Sword^; // Weapon // Arrays can be used as elements Sword__.price += 1; //increases price of Sword's descendants by 1 mySword.price; //8 // And to access specific element (using its name instead of index) var name = "mySword" Katana_[name]; // [mySword] Katana_[name].nickname; // Leon Has this kind of approach been already studied/implemented?

    Read the article

  • How to balance this Pokémon simulator metagame by feedback?

    - by Dokkat
    This is a Pokémon simulator where you build a team of 6 pokémon and battle with someone. Unfortunately, some Pokémon are stronger than others and only a few of the hundredth species are practical. I'm trying to create a metagame where all of them are competitive. For this, I am tagging a Pokémon with a parameter (level) that changes it's strength and scales up/down depending on the it's performance. That is, if the system detects Mewtwo is overperforming, it should decrease it's level tag until Mewtwo is balanced. The question is: how can I identify if a Pokémon is causing an unbalance? The data I have is the historic of the battles (player 1, player 2, pokémon list, winner). The most basic solution I can think of is victory/loss counting.

    Read the article

  • How can you predict the time it will take for two processes in two different machines in a cluster to communicate?

    - by Dokkat
    I am trying to develop a computing application which needs a lot of memory (500gb). Buying a single machine for that is overly expensive. I can, though, buy ~100 small instances on Digital Ocean or similar, divide the memory in blocks and use TCP to emulate shared memory between the instances. Now, my question is: how can I measure/predict the time it will take for two processes in two different machines like that to share information, in comparison to IPC and shared memory? Are there rules of thumb? I don't want exact values, but knowing more or less how much faster one is would be very helpful in visualising the feasibility of this approach.

    Read the article

  • Can a 20 years old programmer who has been programming daily since 10 get a job that will pay for what he knows?

    - by Dokkat
    I'm a programmer who has been programming daily since I was 10-years-old. Is it possible to get a job with a salary that reflects my programming knowledge, or do I have to be in the same place as someone starting just now, as I've never had an actual job? I am not sure if this kind of question is allowed here and could not find out. If it is not, could you kindly suggest a place to ask this? Sorry for any inconveniences.

    Read the article

  • How to rewrite a TCP MMOG server designed to run in a single machine, in a distributed way?

    - by Dokkat
    I have a MMOG server running on C++, using winsockets. My server won't support more than 200 players. I had the idea of redesigning it so it will use multiple servers instead of one, so, maybe, for example, each server could take care of a number of players, and, if it was too laggy, it could transfer the responsability of that player to other server. I'm not sure of how to program a consistent game logic like that, though. Are there techniques for this?

    Read the article

  • Game 30% done on HTML5. Maybe it was a bad idea. Should I change to Unity3d? [on hold]

    - by Dokkat
    I'm creating a 3d game on HTML5. It's 30% complete and the hard part is already coded. The server is on node.js.Now I'm realizing that maybe it was not a wise choice. This is because I realized: Three.js still has many bugs. I don't see the same thing on every machine. Each browser, OS, can give different results. I'm afraid my clients will have a great stress installing my game properly. I have tons of sprites and models on my game. I wonder if my clients will have to load all them again everytime they want to play? I wonder if a Node.js server will be fast enough to handle it, and I'm afraid it won't be scalable. What would you advise me? Should I continue and finish the game on HTML5 or is it better to remake it on something else, like Unity3d for the client and (what?) for the server?

    Read the article

  • What are general guidelines and advices to estimate how much you should charge for a project, being a novice freelancer?

    - by Dokkat
    I am an experienced programmer but completely new to the market. Someone wants me to do a project for them, but I do not know how much it is worth. What are general guidelines/advices for finding what a project is worth on the market? If I can ask here about this particular one, it is a HTML5 site with a login/register form and a video player that has to play a lecture video and powerpoint slides synchronized. They'll give me the video, the audio the powerpoints. I should also do some editting on the video before.

    Read the article

  • VIM is great for text. Is there, too, an efficient, mouseless way to manipulate files on OS X?

    - by Dokkat
    I am having trouble navigating through files on OS X. That is, creating files, copying, moving, and so on. I am currently using the Finder, but the act of clicking with the mouse is not very efficient. Acessing a deep folder takes a considerable amount of time and you'll have to know it's entire path. When I try to use the command line it is even worse. Going to a folder requires at least typing it's entire path with the 'cd' command; and, when you are there, you don't have full control over it. For example, how would you move 3 specific files to another folder? Some text editors offer a 'fuzzy search' function that allows a very fast form of jumping through files. What is a fast, efficient way to navigate through files on OS X?

    Read the article

1