Search Results

Search found 5199 results on 208 pages for 'imperative languages'.

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

  • 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

  • Learn Many Languages

    - by Phil Factor
    Around twenty-five years ago, I was trying to solve the problem of recruiting suitable developers for a large business. I visited the local University (it was a Technical College then). My mission was to remind them that we were a large, local employer of technical people and to suggest that, as they were in the business of educating young people for a career in IT, we should work together. I anticipated a harmonious chat where we could suggest to them the idea of mentioning our name to some of their graduates. It didn’t go well. The academic staff displayed a degree of revulsion towards the whole topic of IT in the world of commerce that surprised me; tweed met charcoal-grey, trainers met black shoes. However, their antipathy to commerce was something we could have worked around, since few of their graduates were destined for a career as university lecturers. They asked me what sort of language skills we needed. I tried ducking the invidious task of naming computer languages, since I wanted recruits who were quick to adapt and learn, with a broad understanding of IT, including development methodologies, technologies, and data. However, they pressed the point and I ended up saying that we needed good working knowledge of C and BASIC, though FORTRAN and COBOL were, at the time, still useful. There was a ghastly silence. It was as if I’d recommended the beliefs and practices of the Bogomils of Bulgaria to a gathering of Cardinals. They stared at me severely, like owls, until the head of department broke the silence, informing me in clipped tones that they taught only Modula 2. Now, I wouldn’t blame you if at this point you hurriedly had to look up ‘Modula 2′ on Wikipedia. Based largely on Pascal, it was a specialist language for embedded systems, but I’ve never ever come across it in a commercial business application. Nevertheless, it was an excellent teaching language since it taught modules, scope control, multiprogramming and the advantages of encapsulating a set of related subprograms and data structures. As long as the course also taught how to transfer these skills to other, more useful languages, it was not necessarily a problem. I said as much, but they gleefully retorted that the biggest local employer, a defense contractor specializing in Radar and military technology, used nothing but Modula 2. “Why teach any other programming language when they will be using Modula 2 for all their working lives?” said a complacent lecturer. On hearing this, I made my excuses and left. There could be no meeting of minds. They were providing training in a specific computer language, not an education in IT. Twenty years later, I once more worked nearby and regularly passed the long-deserted ‘brownfield’ site of the erstwhile largest local employer; the end of the cold war had led to lean times for defense contractors. A digger was about to clear the rubble of the long demolished factory along with the accompanying growth of buddleia and thistles, in order to lay the infrastructure for ‘affordable housing’. Modula 2 was a distant memory. Either those employees had short working lives or they’d retrained in other languages. The University, by contrast, was thriving, but I wondered if their erstwhile graduates had ever cursed the narrow specialization of their training in IT, as they struggled with the unexpected variety of their subsequent careers.

    Read the article

  • Why do some languages not use semicolons and braces?

    - by Incognito
    It is interesting that some languages do not use semicolons and braces, even though their predecessors had them. Personally, it makes me nervous to write code in Python because of this. Semicolons are also missing from Google's GO language, although the lexer uses a rule to insert semicolons automatically as it scans. Why do some languages not use semicolons and braces?

    Read the article

  • Would javascript and similar scripting languages benefit from being strongly typed?

    - by cwap
    Just had my mind going today. I spent some time in IE debug mode, browsing the web as usual, and oh boy do I see many errors :) Most of these errors are because some value are of a different type than expected (at least as far as I interpret the error messages). What are the reasons JavaScript and similar scripting languages aren't strongly typed? Is it just to make the languages "easier" to understand and more accessable, or is the lack of a "compile-time" the real problem?

    Read the article

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