Search Results

Search found 5075 results on 203 pages for 'languages'.

Page 10/203 | < Previous Page | 6 7 8 9 10 11 12 13 14 15 16 17  | Next Page >

  • Is Python Interpreted or Compiled?

    - by crodjer
    This is just a wondering I had while reading about interpreted and compiled languages. Ruby is no doubt an interpreted language, since source code is compiled by an interpreter at the point of execution. On the contrary C is a compiled language, as one have to compile the source code first according to the machine and then execute. This results is much faster execution. Now coming to Python: A python code (somefile.py) when imported creates a file (somefile.pyc) in the same directory. Let us say the import is done in a python shell or django module. After the import I change the code a bit and execute the imported functions again to find that it is still running the old code. This suggests that *.pyc files are compiled python files similar to executable created after compilation of a C file, though I can't execute *.pyc file directly. When the python file (somefile.py) is executed directly ( ./somefile.py or python somefile.py ) no .pyc file is created and the code is executed as is indicating interpreted behavior. These suggest that a python code is compiled every time it is imported in a new process to crate a .pyc while it is interpreted when directly executed. So which type of language should I consider it as? Interpreted or Compiled? And how does its efficiency compare to interpreted and compiled languages? According to wiki's Interpreted Languages page it is listed as a language compiled to Virtual Machine Code, what is meant by that? Update Looking at the answers it seems that there cannot be a perfect answer to my questions. Languages are not only interpreted or only compiled, but there is a spectrum of possibilities between interpreting and compiling. From the answers by aufather, mipadi, Lenny222, ykombinator, comments and wiki I found out that in python's major implementations it is compiled to bytecode, which is a highly compressed and optimized representation and is machine code for a virtual machine, which is implemented not in hardware, but in the bytecode interpreter. Also the the languages are not interpreted or compiled, but rather language implementations either interpret or compile code. I also found out about Just in time compilation As far as execution speed is concerned the various benchmarks cannot be perfect and depend on context and the task which is being performed. Please tell if I am wrong in my interpretations.

    Read the article

  • New functional languages

    - by AnnaR
    Functional programming has been around since at least 1958 (creation of Lisp), but is experiencing a renaissance now with old functional languages being dusted off and new functional languages being created. Which functional languages are there that are newly developed or are in the making? I realize that you can write purely functional programs in most high level languages, so with functional languages I imply languages that are specifically designed for functional programming such as F#. If you have links to tutorials, wikis or code examples I encourage you to add them to your answer!

    Read the article

  • Purely technical reasons for PHP as a first choice?

    - by JoelFan
    I know this may come off as a flame-y / troll-y, but I hope you will take my word for it that it's not my intention. I am just trying to understand the PHP phenomenon. After looking at the many technical issues with the language design of PHP, I am hard pressed to find any redeeming technical advantages where PHP surpasses all other languages. Before coming to the conclusion that there would simply be no reason to choose PHP as a development language on purely technical grounds, I would like to ask, if all non-technical factors were equal (such as what language the developers already know, what languages the hosting provider offers, language of existing code, cost, license, corporate fiat, etc.), would there be any type of new software system that would indicate making PHP a first choice for development? If so, what technical advantage does PHP have over all other languages that would cause you to choose it? EDIT: I am not interested in comparing PHP "out of the box" with other languages "out of the box". If PHP has a certain feature "out of the box" that another language has only after installing some readily available add-on, that is not considered an advantage for PHP for the purposes of this question.

    Read the article

  • Purpose of "new" keyword

    - by Channel72
    The new keyword in languages like Java, Javascript, and C# creates a new instance of a class. This syntax seems to have been inherited from C++, where new is used specifically to allocate a new instance of a class on the heap, and return a pointer to the new instance. In C++, this is not the only way to construct an object. You can also construct an object on the stack, without using new - and in fact, this way of constructing objects is much more common in C++. So, coming from a C++ background, the new keyword in languages like Java, Javascript, and C# seemed natural and obvious to me. Then I started to learn Python, which doesn't have the new keyword. In Python, an instance is constructed simply by calling the constructor, like: f = Foo() At first, this seemed a bit off to me, until it occurred to me that there's no reason for Python to have new, because everything is an object so there's no need to disambiguate between various constructor syntaxes. But then I thought - what's really the point of new in Java? Why should we say Object o = new Object();? Why not just Object o = Object();? In C++ there's definitely a need for new, since we need to distinguish between allocating on the heap and allocating on the stack, but in Java all objects are constructed on the heap, so why even have the new keyword? The same question could be asked for Javascript. In C#, which I'm much less familiar with, I think new may have some purpose in terms of distinguishing between object types and value types, but I'm not sure. Regardless, it seems to me that many languages which came after C++ simply "inherited" the new keyword - without really needing it. It's almost like a vestigial keyword. We don't seem to need it for any reason, and yet it's there. Question: Am I correct about this? Or is there some compelling reason that new needs to be in C++-inspired memory-managed languages like Java, Javascript and C#?

    Read the article

  • Formal Languages, Inductive Proofs &amp; Regular Expressions

    - by MarkPearl
    So I am slogging away at my UNISA stuff. I have just finished doing the initial once non stop read through the first 11 chapters of my COS 201 Textbook - “Introduction to Computer Theory 2nd Edition” by Daniel Cohen. It has been an interesting couple of days, with familiar concepts coming up as well as some new territory. In this posting I am going to cover the first couple of chapters of the book. Let start with Formal Languages… What exactly is a formal language? Pretty much a no duh question for me but still a good one to ask – a formal language is a language that is defined in a precise mathematical way. Does that mean that the English language is a formal language? I would say no – and my main motivation for this is that one can have an English sentence that is correct grammatically that is also ambiguous. For example the ambiguous sentence: "I once shot an elephant in my pyjamas.” For this and possibly many other reasons that I am unaware of, English is termed a “Natural Language”. So why the importance of formal languages in computer science? Again a no duh question in my mind… If we want computers to be effective and useful tools then we need them to be able to evaluate a series of commands in some form of language that when interpreted by the device no confusion will exist as to what we were requesting. Imagine the mayhem that would exist if a computer misinterpreted a command to print a document and instead decided to delete it. So what is a Formal Language made up of… For my study purposes a language is made up of a finite alphabet. For a formal language to exist there needs to be a specification on the language that will describe whether a string of characters has membership in the language or not. There are two basic ways to do this: By a “machine” that will recognize strings of the language (e.g. Finite Automata). By a rule that describes how strings of a language can be formed (e.g. Regular Expressions). When we use the phrase “string of characters”, we can also be referring to a “word”. What is an Inductive Proof? So I am not to far into my textbook and of course it starts referring to proofs and different types. I have had to go through several different approaches of proofs in the past, but I can never remember their formal names , so when I saw “inductive proof” I thought to myself – what the heck is that? Google to the rescue… An inductive proof is like a normal proof but it employs a neat trick which allows you to prove a statement about an arbitrary number n by first proving it is true when n is 1 and then assuming it is true for n=k and showing it is true for n=k+1. The idea is that if you want to show that someone can climb to the nth floor of a fire escape, you need only show that you can climb the ladder up to the fire escape (n=1) and then show that you know how to climb the stairs from any level of the fire escape (n=k) to the next level (n=k+1). Does this sound like a form of recursion? No surprise then that in the same chapter they deal with recursive definitions. An example of a recursive definition for the language EVEN would the 3 rules below: 2 is in EVEN If x is in EVEN then so is x+2 The only elements in the set EVEN are those that be produced by the rules above. Nothing to exciting… So if a definition for a language is done recursively, then it makes sense that the language can be proved using induction. Regular Expressions So I am wondering to myself what use is this all – in fact – I find this the biggest challenge to any university material is that it is quite hard to find the immediate practical applications of some theory in real life stuff. How great was my joy when I suddenly saw the word regular expression being introduced. I had been introduced to regular expressions on Stack Overflow where I was trying to recognize if some text measurement put in by a user was in a valid form or not. For instance, the imperial system of measurement where you have feet and inches can be represented in so many different ways. I had eventually turned to regular expressions as an easy way to check if my parser could correctly parse the text or not and convert it to a normalize measurement. So some rules about languages and regular expressions… Any finite language can be represented by at least one if not more regular expressions A regular expressions is almost a rule syntax for expressing how regular languages can be formed regular expressions are cool For a regular expression to be valid for a language it must be able to generate all the words in the language and no other words. This is important. It doesn’t help me if my regular expression parses 100% of my measurement texts but also lets one or two invalid texts to pass as well. Okay, so this posting jumps around a bit – but introduces some very basic fundamentals for the subject which will be built on in later postings… Time to go and do some practical examples now…

    Read the article

  • What programming languages have you taught your children?

    - by Dubmun
    I'm a C# developer by trade but have had exposure to many languages (including Java, C++, and multiple scripting languages) over the course of my education and career. Since I code in the MS world for work I am most familiar with their stack and so I was excited when Small Basic was announced. I immediately started teaching my oldest to program in it but felt that something was missing from the experience. Being able to look up every command with the IDE's intellisense seemed to take something from the experience. Sure, it was easy to grasp but I found myself thinking that a little more challenge might be in order. I'm looking for something better and I would like to hear your experiences with teaching your children to program in whatever language you have chosen to do so in. What did you like and dislike? How fast did they pick it up? Were they challenged? Frustrated? Thank you very much!

    Read the article

  • Switching Programming Languages

    - by no spoon
    Hi I'm a senior level Delphi developer looking for move into either C# or possibly Java roles. I have around 8 years of development experience of which pretty much all of it is in Delphi, I have very little commercial experience in C# and no commercial experience in Java. I have about 6 months worth of academic experience in both Java and C# from some University papers I took a 4 years ago and use these languages for hobby projects, so I know the languages I just don't have the commercial experience to back it up. Given that I'm too over qualified for a junior role but do not have the commercial experience for even an intermediate role how does one go about changing jobs?

    Read the article

  • Are programming languages perfect?

    - by mohabitar
    I'm not sure if I'm being naive, as I'm still a student, but a curious question came to my mind. In another thread here, a user stated that in order to protect against piracy of your software, you must have perfect software. So is it possible to have perfect software? This is an extremely silly hypothetical situation, but if you were to gather the most talented and gifted programmers in the world and have them spend years trying to create 'perfect' software, could they be successful? Could it be that not a single exploitable bug could be created? Or are there flaws in programming languages that can still, no matter how hard you try, cause bugs that allow your program to be hijacked? As you can tell, I know nothing about security, but essentially what I'm asking is: is the reason why software is easily exploitable the fact that imperfect human beings create it, or that imperfect programming languages are being used?

    Read the article

  • General solution to solve different sports results in different languages

    - by sq2
    I currently have some code that checks if squash and tennis scores are valid, both in javascript and PHP. This results in 4 blocks of code existing, 2 languages * 2 sports, which does not scale well should any extra sports come around, or extra languages... How can one describe the valid scores of games via a settings/text file, so that each language can parse them and apply these rules. I'm stumped with the strange tie break situations in tennis should it reach 6-6 in a set, and also infinite play off in the final set should it reach 2 sets all. ie: tennis = { "format": [ { "name": "sets" "min": 3, "max": 5, "winby": 1 }, { "name": "games" "min": 6, "max": 7, "winby": 2 } ] } squash = { "format": [ { "name": "games" "min": 3, "max": 5, "winby": 1 }, { "name": "points" "min": 15, "max": 0, "winby": 2 } ] }

    Read the article

  • Synonyms for different languages in LibreOffice Writer? [closed]

    - by cipricus
    Possible Duplicate: How do I add English-UK thesaurus in LibreOffice? When setting a text for English US the context menu contains 'Synonyms' This is not the case for the other languages for which I have the spelling installed (English UK, French etc) Can I have the Synonyms option for UK English too, for example? Even that is a problem although there seems to be solutions around for it. Here, for example, (which is a link to here) but after testing it cannot see synonyms for uk. Also this which was reported as a solution is not working anymore it seems. What about other languages? (Please notice that this question is not just about English-UK. I have initially noticed that 'synonyms' where missing in relation to British, but I am asking about how to solve the issue in general or, when there is no general solution, how to solve it on a case-by-case basis. For the meta consequence of all this, involving the issue of it being a duplicate, see comments under here and this question.)

    Read the article

  • Catching typos or other errors in web-based scripting languages

    - by foreyez
    Hi, My background is mainly strongly typed languages (java, c++, c#). Having recently gotten back to a bit of javascript, I found it a bit annoying that if I misspell something by accident (for example I'll type 'myvar' instead of 'myVar') my entire script crashes. The browser itself most of the time doesn't even tell me I have an error, my program will just be blank, etc. Then I have to hunt down my code line by line and find the error which is very time consuming. In the languages I am used to the compiler lets me know if I made a typo. My question to you is, how do you overcome this issue in scripting (javascript)? Can you give me some tips? (this question is mainly aimed at people that have also come from a strongly typed language). Note: I mainly use the terminal/VIM ... this is mainly b/c I like terminal and I SSH alot too

    Read the article

  • What languages do you support when localizing?

    - by Javoid
    I recently converted an iphone app to support different languages, and was wondering which ones I should include, and which ones aren't worth the trouble. What I mean by that is best illustrated by an example. In Ireland, the Irish language is spoken by very few of the people there. It could be considered a dying language. Almost everybody speaks English (if not everybody). So in this example, I don't think it's worth the trouble to support. In addition, the number of people using modern technology may be limited as well. For example, most people in Cambodia would not be likely to purchase software, and therefore the benefits of localization are reduced. What languages do you support when localizing?

    Read the article

  • Useful programming languages for hardware programming

    - by Sebastian Griotberg
    I am thinking to take the next semester a course called "Digital systems architecture", and I know that we need to program micro-controllers with several programming languages such as C, C++, verilog, and VHDL. I want to be prepared to take that course, but I need to know if I need to study deeper these languages. At this moment, I have taken one course in basic Java dealing with basic methods, data types, loop structures, vectors, matrices, and GUI programing. Must I study deeper Java and then go with C, and C++? Besides, I know basic verilog and VHDL.

    Read the article

  • A question on choosing the next programming language between C/C++ and other languages

    - by SidCool
    I am a java developer (web app and standalone applications) who knows JavaScript, HTML, CSS and has mostly worked on Web applications. I have no knowledge of C/C++ or any other lower level languages. I feel like I should strengthen my CS basics by learning a fundamental language. Should it be C or C++? I am also inclined to learn Objective-C. Does it need basics of C or C++? Or should I go for new languages like Python, Google's Go etc. I know this is a cliche question asked very frequently, but I can use some help here.

    Read the article

  • Programming languages with extensible syntax

    - by Giorgio
    I have only a limited knowledge of Lisp (trying to learn a bit in my free time) but as far as I understand Lisp macros allow to introduce new language constructs and syntax by describing them in Lisp itself. This means that a new construct can be added as a library, without changing the Lisp compiler / interpreter. This approach is very different from that of other programming languages. E.g., if I wanted to extend Pascal with a new kind of loop or some particular idiom I would have to extend the syntax and semantics of the language and then implement that new feature in the compiler. Are there other programming languages outside the Lisp family (i.e. apart from Common Lisp, Scheme, Clojure (?), Racket (?), etc) that offer a similar possibility to extend the language within the language itself?

    Read the article

  • Are there still completely new programming languages and -paradigms to be born?

    - by llasa
    Are there still completely new programming languages and -paradigms (which will actually go mainstream and still be used decades after their appearance) to be born? What I'm talking about are groundbreaking things like the rise of object oriented programming, C++, or PHP. With new programming languages I mean that they actually are completely different from what you know, as different as when you set a guy who used assembler for a decade, and even programmed some kind of 3D game in it, in front of something as high-level as PHP, Ruby or Python? Which new paradigms and programming languages are there to come? What could be different about them? Who will possibly create them and how fast will they rise?

    Read the article

  • Is there a “P” programming language? [closed]

    - by Synetech
    I’m wondering if anybody has made a programming language based on BCPL, named P. There was a language named B that was based on BCPL, followed of course by C, also based on BCPL. I’ve seen plenty of whimsically named programming languages, so I can’t help but be surprised if nobody made one called P. I checked the Wikipedia’s—not exactly comprehensive—list of programming languages, and while there are three languages named L (none of which are related to BCPL), there are none called P—in fact, it is one of the only letters not used as a name. (Google is useless for one-letter query terms.) Does anybody know if a P has been made, even as a lark. (Yes, I know about P#, but that is based on Prolog, not BCPL; there is one called P, but it is also not related to BCPL.)

    Read the article

  • Design patterns and multiple programming language

    - by Eduard Florinescu
    I am referring here to the design patterns found in the GOF book. First how I see it, there are a few peculiarities to design pattern and knowing multiple language knowledge, for example in Java you really need a singleton but in Python you can do without it you write a module, I saw somewhere a wiki trying to write all GOF patterns for JavaScript and the entries where empty, I guess because it might be a daunting task. If there is someone who is using design patterns and is programming in multiple programming languages supporting the OOP paradigm and can give me a hint on how should I approach design patterns that might help me in all languages I use(Java, JavaScript, Python, Ruby): Can I write good application without knowing exactly the GOF design patterns or I might need some of them which might be crucial and if yes which one, are they alternatives to GOF for specific languages, and should a programmer or a team make its own design patterns set?

    Read the article

  • What language, or language feature, do you wish made it to the mainstream?

    - by Macneil
    Some languages in the past have been influential without ever reaching wide adoption. For example, many languages owe much to the design of Algol 68, even though few compilers were ever written for it. The Dylan language was killed by Apple but had a clean and interesting design. What other programming languages had cool ideas but-- for whatever reasons-- didn't make it to the mainstream? Is there an interesting language feature that you wish your main language had? Is there a feature ahead of its time that we'll soon see used?

    Read the article

  • Why aren't there automated translators from one programming language to another?

    - by serg
    Most programming languages are Turing complete, which means that any task that can be solved in one language can be solved in another one, or even on Turing machine. Then why aren't there automatic translators that can convert programs from any given language to any other language? I've seen couple attempts for two languages, but they always work only on a limited subset of a language and can hardly be used for converting real projects. Is it possible, at least in theory, to write 100% correct translator between all languages? What are the challenges in practice? Are there any existing translators that work?

    Read the article

  • How can you become a real programming polyglot?

    - by Yob
    I work as a Java programmer, but C and C++ were always my favourite languages during studies. Unfortunatelly I don't have an opportunity to work with them as often as I would like to. As a result I sometimes get realized that I don't remember something quite important (today example: inherited protected members cannot be accessed in derived class constructors). The other example could be Python and Haskell which I enjoy using but don't use everyday. I got an idea to write my own wiki with easy to forget things (e.g. bash tricks & tips) but I find no sense in writing there everything I can forget about coolest programming languages. I know that the best way would be having a side projects (I want to start working on some C/C++ open source project after graduation), but currently I have to write my graduation thesis and work so I merely don't have time to do this. How do you stay sharp in languages that you don't use everyday?

    Read the article

  • Should a new programmer nowadays start with C/C++ or OOP language? [closed]

    - by deviDave
    I've been a programmer for 15+ years. In my time, we all started with C or C++ and then moved to C# or Java. At that time it was a usual practice. Now, my brother wants to follow my steps and I am not sure what advice to give him. So, I am asking the community for an opinion. Should nowadays new programmer with zero programming knowledge start with functional languages (C, C++, etc.) or he should start directly with OOP languages (Java, C#, etc.)? The reply should be considered in the context of my brother's future assignments. He will mainly work on Java mobile applications as well as ASP.NET web apps. He will have to touch with desktop apps, low level programming, drivers, etc. This is the reason I am not sure if he should ever need to learn functional languages.

    Read the article

  • What was the first programming language written for computers?

    - by ThePlan
    Looking at so many programming languages we have today, each one being unique in it's own way, I've tried to figure out what the first programming language written for computers is. Looking at the release date for the popular ones I got somewhat close but I didn't look at less obvious ones, programming languages which are either dead or very little use nowadays. Fortran is the closest thing I got but I don't know if it's real. In a nutshell: What was the first programming language written for computers? Are there any languages that derived from that language?

    Read the article

  • Does language endorsement by different platforms (Android, iOS) hurt app development?

    - by MSe
    Developing iOS or OSX based applications typically requires knowledge of Objective C, since XCode is highly tailored to this language. Android, on the other hand, has chosen Java as it's preferred language for app development. Now, I know other programming languages can be used to develop applications on either platform, but lets be honest, it's a lot easier (and encouraged) to develop apps using these "native languages." As a new app developer, it seems like it would be much easier if there was a common language and development environment for developing applications on all the major platforms. This thought is probably too idealistic for a programming discussion, and I wouldn't be surprised if the SE vultures flew in to close this topic. But, here's my question. Do you think that language endorsement creates unreasonable barriers to entry for new programmers, or do you think it's beneficial in some way (if so, why) for these platforms to use completely different development environments and languages for app development?

    Read the article

  • Surviving MATLAB and R as a Hardcore Programmer

    - by dsimcha
    I love programming in languages that seem geared towards hardcore programmers. (My favorites are Python and D.) MATLAB is geared towards engineers and R is geared towards statisticians, and it seems like these languages were designed by people who aren't hardcore programmers and don't think like hardcore programmers. I always find them somewhat awkward to use, and to some extent I can't put my finger on why. Here are some issues I have managed to identify: (Both): The extreme emphasis on vectors and matrices to the extent that there are no true primitives. (Both): The difficulty of basic string manipulation. (Both): Lack of or awkwardness in support for basic data structures like hash tables and "real", i.e. type-parametric and nestable, arrays. (Both): They're really, really slow even by interpreted language standards, unless you bend over backwards to vectorize your code. (Both): They seem to not be designed to interact with the outside world. For example, both are fairly bulky programs that take a while to launch and seem to not be designed to make simple text filter programs easy to write. Furthermore, the lack of good string processing makes file I/O in anything but very standard forms near impossible. (Both): Object orientation seems to have a very bolted-on feel. Yes, you can do it, but it doesn't feel much more idiomatic than OO in C. (Both): No obvious, simple way to get a reference type. No pointers or class references. For example, I have no idea how you roll your own linked list in either of these languages. (MATLAB): You can't put multiple top level functions in a single file, encouraging very long functions and cut-and-paste coding. (MATLAB): Integers apparently don't exist as a first class type. (R): The basic builtin data structures seem way too high level and poorly documented, and never seem to do quite what I expect given my experience with similar but lower level data structures. (R): The documentation is spread all over the place and virtually impossible to browse or search. Even D, which is often knocked for bad documentation and is still fairly alpha-ish, is substantially better as far as I can tell. (R): At least as far as I'm aware, there's no good IDE for it. Again, even D, a fairly alpha-ish language with a small community, does better. In general, I also feel like MATLAB and R could be easily replaced by plain old libraries in more general-purpose langauges, if sufficiently comprehensive libraries existed. This is especially true in newer general purpose languages that include lots of features for library writers. Why do R and MATLAB seem so weird to me? Are there any other major issues that you've noticed that may make these languages come off as strange to hardcore programmers? When their use is necessary, what are some good survival tips? Edit: I'm seeing one issue from some of the answers I've gotten. I have a strong personal preference, when I analyze data, to have one script that incorporates the whole pipeline. This implies that a general purpose language needs to be used. I hate having to write a script to "clean up" the data and spit it out, then another to read it back in a completely different environment, etc. I find the friction of using MATLAB/R for some of my work and a completely different language with a completely different address space and way of thinking for the rest to be a huge source of friction. Furthermore, I know there are glue layers that exist, but they always seem to be horribly complicated and a source of friction.

    Read the article

< Previous Page | 6 7 8 9 10 11 12 13 14 15 16 17  | Next Page >