Hello World/Web Server - Rosetta Code

Total Page:16

File Type:pdf, Size:1020Kb

Hello World/Web Server - Rosetta Code Hello world/Web server - Rosetta Code http://rosettacode.org/wiki/Hello_world/Web_server Hello world/Web server From Rosetta Code < Hello world The browser is the new GUI! Hello world/Web The task is to serve our standard text "Goodbye, World!" to server http://localhost:8080/ so that it can be viewed with a web browser. You are The provided solution must start or implement a server that accepts encouraged to multiple client connections and serves text as requested. solve this task according to the task description, Note that starting a web browser or opening a new window with using any language you this URL is not part of the task. Additionally, it is permissible to may know. serve the provided page as a plain text file (there is no requirement to serve properly formatted HTML here). The browser will generally do the right thing with simple text like this. Contents 1 Ada 2 AWK 3 BBC BASIC 4 C 5 C++ 6 C# 7 D 8 Delphi 9 Dylan.NET 10 Erlang 11 Fantom 12 Go 13 Haskell 14 Io 15 J 16 Java 17 JavaScript 18 Liberty BASIC 19 Modula-2 20 NetRexx 21 Objeck 22 OCaml 23 Opa 24 Perl 25 Perl 6 26 PicoLisp 27 Prolog 28 PureBasic 29 PHP 30 Python 1 sur 18 19/07/2013 19:57 Hello world/Web server - Rosetta Code http://rosettacode.org/wiki/Hello_world/Web_server 31 Racket 32 REALbasic 33 Ruby 34 Run BASIC 35 Salmon 36 Seed7 37 Smalltalk 38 Tcl Ada Library: AWS Uses many defaults, such as 5 max simultaneous connections. with AWS; use AWS; with AWS. Response ; with AWS. Server ; with AWS. Status ; with Ada. Text_IO ; use Ada. Text_IO ; procedure HelloHTTP is function CB (Request : Status. Data ) return Response. Data is pragma Unreferenced (Request ); begin return Response. Build ("text/html" , "Hello world!" ); end CB; TheServer : Server. HTTP ; ch : Character; begin Server. Start (TheServer, "Rosettacode" , Callback => CB'Unrestricted_Access, Port => 8080 ); Put_Line ("Press any key to quit." ); Get_Immediate (ch ); Server. Shutdown (TheServer ); end HelloHTTP; AWK With GNU AWK (gawk) a simple web server can be implemented. The example is taken from here [1] (http://www.gnu.org/software/gawk/manual/gawkinet/gawkinet.html#Primitive-Service) (Documentation is licensed under GNU Free Documentation License, Version 1.3) #!/usr/bin/gawk -f BEGIN { RS = ORS = "\r\n" HttpService = "/inet/tcp/8080/0/0" Hello = "<HTML><HEAD>" \ "<TITLE>A Famous Greeting</TITLE></HEAD>" \ "<BODY><H1>Hello, world</H1></BODY></HTML>" Len = length (Hello ) + length (ORS ) print "HTTP/1.0 200 OK" |& HttpService print "Content-Length: " Len ORS |& HttpService print Hello |& HttpService while ((HttpService |& getline ) > 0) continue ; close (HttpService ) } BBC BASIC 2 sur 18 19/07/2013 19:57 Hello world/Web server - Rosetta Code http://rosettacode.org/wiki/Hello_world/Web_server Works with : BBC BASIC for Windows This explicitly supports multiple concurrent connections. INSTALL @lib$+"SOCKLIB" PROC_initsockets maxSess% = 8 DIM sock%(maxSess%-1), rcvd$(maxSess%-1), Buffer% 255 ON ERROR PRINT REPORT$ : PROC_exitsockets : END ON CLOSE PROC_exitsockets : QUIT port$ = "8080" host$ = FN_gethostname PRINT "Host name is " host$ listen% = FN_tcplisten(host$, port$) PRINT "Listening on port ";port$ REPEAT socket% = FN_check_connection(listen%) IF socket% THEN FOR i% = 0 TO maxSess%-1 IF sock%(i%) = 0 THEN sock%(i%) = socket% rcvd$(i%) = "" PRINT "Connection on socket "; sock%(i%) " opened" EXIT FOR ENDIF NEXT i% listen% = FN_tcplisten(host$, port$) ENDIF FOR i% = 0 TO maxSess%-1 IF sock%(i%) THEN res% = FN_readsocket(sock%(i%), Buffer%, 256) IF res% >= 0 THEN Buffer%?res% = 0 rcvd$(i%) += $$Buffer% IF LEFT$(rcvd$(i%),4) = "GET " AND ( \ \ RIGHT$(rcvd$(i%),4) = CHR$13+CHR$10+CHR$13+CHR$10 OR \ \ RIGHT$(rcvd$(i%),4) = CHR$10+CHR$13+CHR$10+CHR$13 OR \ \ RIGHT$(rcvd$(i%),2) = CHR$10+CHR$10 ) THEN rcvd$(i%) = "" IF FN_writelinesocket(sock%(i%), "HTTP/1.0 200 OK") IF FN_writelinesocket(sock%(i%), "Content-type: text/html") IF FN_writelinesocket(sock%(i%), "") IF FN_writelinesocket(sock%(i%), "<html><head><title>Hello World!</title></head>") IF FN_writelinesocket(sock%(i%), "<body><h1>Hello World!</h1>") IF FN_writelinesocket(sock%(i%), "</body></html>") PROC_closesocket(sock%(i%)) PRINT "Connection on socket " ; sock%(i%) " closed (local)" sock%(i%) = 0 ENDIF ELSE PROC_closesocket(sock%(i%)) PRINT "Connection on socket " ; sock%(i%) " closed (remote)" sock%(i%) = 0 ENDIF ENDIF NEXT i% WAIT 0 UNTIL FALSE END C This is, um, slightly longer than what other languages would be. #include <stdio.h> #include <stdlib.h> #include <unistd.h> #include <sys/types.h> 3 sur 18 19/07/2013 19:57 Hello world/Web server - Rosetta Code http://rosettacode.org/wiki/Hello_world/Web_server #include <sys/socket.h> #include <netinet/in.h> #include <netdb.h> #include <arpa/inet.h> #include <err.h> char response [] = "HTTP/1.1 200 OK\r\n" "Content-Type: text/html; charset=UTF-8\r\n\r\n" "<doctype !html><html><head><title>Bye-bye baby bye-bye</title>" "<style>body { background-color: #111 }" "h1 { font-size:4cm; text-align: center; color: black;" " text-shadow: 0 0 2mm red}</style></head>" "<body><h1>Goodbye, world!</h1></body></html>\r\n"; int main () { int one = 1, client_fd; struct sockaddr_in svr_addr, cli_addr; socklen_t sin_len = sizeof (cli_addr ); int sock = socket (AF_INET, SOCK_STREAM, 0); if (sock < 0) err (1, "can't open socket" ); setsockopt (sock, SOL_SOCKET, SO_REUSEADDR, &one, sizeof (int )); int port = 8080 ; svr_addr. sin_family = AF_INET; svr_addr. sin_addr .s_addr = INADDR_ANY; svr_addr. sin_port = htons (port ); if (bind (sock, (struct sockaddr *) &svr_addr, sizeof (svr_addr )) == -1) { close (sock ); err (1, "Can't bind" ); } listen (sock, 5); while (1) { client_fd = accept (sock, (struct sockaddr *) &cli_addr, &sin_len ); printf ("got connection\n"); if (client_fd == -1) { perror ("Can't accept" ); continue ; } write (client_fd, response, sizeof (response ) - 1); /*-1:'\0'*/ close (client_fd ); } } C++ C version compiles as C++ (known for G++ on Linux) C# using System.Text; using System.Net.Sockets; using System.Net; namespace WebServer { class GoodByeWorld { static void Main (string [] args ) { const string msg = "<html>\n<body>\nGoodbye, world!\n</body>\n</html>\n"; const int port = 8080 ; bool serverRunning = true ; TcpListener tcpListener = new TcpListener (IPAddress.Any , port ); tcpListener.Start (); 4 sur 18 19/07/2013 19:57 Hello world/Web server - Rosetta Code http://rosettacode.org/wiki/Hello_world/Web_server while (serverRunning ) { Socket socketConnection = tcpListener.AcceptSocket (); byte [] bMsg = Encoding.ASCII .GetBytes (msg.ToCharArray (), 0, (int )msg.Length ); socketConnection.Send (bMsg ); socketConnection.Disconnect (true ); } } } } D Using sockets only, also shows use of heredoc syntax, std.array.replace, and casting to bool to satisfy the while conditional. import std. socket , std. array ; ushort port = 8080 ; void main () { Socket listener = new TcpSocket; listener. bind (new InternetAddress (port )); listener. listen (10 ); Socket currSock; while (cast (bool )(currSock = listener. accept ())) { currSock. sendTo (replace (q"EOF HTTP/1.1 200 OK Content-Type: text/html; charset=UTF-8 <html> <head><title>Hello, world!</title></head> <body>Hello, world!</body> </html> EOF" , "\n", "\r\n")); currSock. close (); } } Delphi program HelloWorldWebServer; {$APPTYPE CONSOLE} uses SysUtils, IdContext, IdCustomHTTPServer, IdHTTPServer; type TWebServer = class private FHTTPServer: TIdHTTPServer; public constructor Create; destructor Destroy; override ; procedure HTTPServerCommandGet (AContext: TIdContext; ARequestInfo: TIdHTTPRequestInfo; AResponseInfo: TIdHTTPResponseInfo ); end ; constructor TWebServer.Create ; begin FHTTPServer := TIdHTTPServer.Create (nil ); FHTTPServer.DefaultPort := 8080 ; FHTTPServer.OnCommandGet := HTTPServerCommandGet; FHTTPServer.Active := True ; end ; 5 sur 18 19/07/2013 19:57 Hello world/Web server - Rosetta Code http://rosettacode.org/wiki/Hello_world/Web_server destructor TWebServer.Destroy ; begin FHTTPServer.Active := False ; FHTTPServer.Free ; inherited Destroy; end ; procedure TWebServer.HTTPServerCommandGet (AContext: TIdContext; ARequestInfo: TIdHTTPRequestInfo; AResponseInfo: TIdHTTPResponseInfo ); begin AResponseInfo.ContentText := 'Goodbye, World!' ; end ; var lWebServer: TWebServer; begin lWebServer := TWebServer.Create ; try Writeln ('Delphi Hello world/Web server ' ); Writeln ('Press Enter to quit' ); Readln; finally lWebServer.Free ; end ; end . Dylan.NET //compile with dylan.NET 11.2.9.6 or later!! #refstdasm "mscorlib.dll" #refstdasm "System.dll" import System.Text import System.Net.Sockets import System.Net assembly helloweb exe ver 1.1.0.0 namespace WebServer class public auto ansi GoodByeWorld method public static void main(var args as string[]) var msg as string = c"<html>\n<body>\nGoodbye, world!\n</body>\n</html>\n" var port as integer = 8080 var serverRunning as boolean = true var tcpListener as TcpListener = new TcpListener(IPAddress::Any, port) tcpListener::Start() do while serverRunning var socketConnection as Socket = tcpListener::AcceptSocket() var bMsg as byte[] = Encoding::get_ASCII()::GetBytes(msg::ToCharArray (), 0, msg::get_Length()) socketConnection::Send(bMsg) socketConnection::Disconnect(true) end do end method end class end namespace Erlang Using builtin HTTP server with call back to do/1. It only lasts 30 seconds (30000 milliseconds), then it is stopped. I fail to see how a longer time will serve any purpose. 6 sur 18 19/07/2013 19:57 Hello world/Web server - Rosetta Code http://rosettacode.org/wiki/Hello_world/Web_server
Recommended publications
  • Analyzing Programming Languages' Energy Consumption: an Empirical Study
    Analyzing Programming Languages’ Energy Consumption: An Empirical Study Stefanos Georgiou Maria Kechagia Diomidis Spinellis Athens University of Economics and Delft University of Technology Athens University of Economics and Business Delft, The Netherlands Business Athens, Greece [email protected] Athens, Greece [email protected] [email protected] ABSTRACT increase of energy consumption.1 Recent research conducted by Motivation: Shifting from traditional local servers towards cloud Gelenbe and Caseau [7] and Van Heddeghem et al. [14] indicates a computing and data centers—where different applications are facil- rising trend of the it sector energy requirements. It is expected to itated, implemented, and communicate in different programming reach 15% of the world’s total energy consumption by 2020. languages—implies new challenges in terms of energy usage. Most of the studies, for energy efficiency, have considered energy Goal: In this preliminary study, we aim to identify energy implica- consumption at hardware level. However, there is much of evidence tions of small, independent tasks developed in different program- that software can also alter energy dissipation significantly [2, 5, 6]. 2 3 ming languages; compiled, semi-compiled, and interpreted ones. Therefore, many conference tracks (e.g. greens, eEnergy) have Method: To achieve our purpose, we collected, refined, compared, recognized the energy–efficiency at the software level as an emerg- and analyzed a number of implemented tasks from Rosetta Code, ing research challenge regarding the implementation of modern that is a publicly available Repository for programming chrestomathy. systems. Results: Our analysis shows that among compiled programming Nowadays, more companies are shifting from traditional local languages such as C, C++, Java, and Go offers the highest energy servers and mainframes towards the data centers.
    [Show full text]
  • Rosetta Code: Improv in Any Language
    Rosetta Code: Improv in Any Language Piotr Mirowski1, Kory Mathewson1, Boyd Branch1,2 Thomas Winters1,3, Ben Verhoeven1,4, Jenny Elfving1 1Improbotics (https://improbotics.org) 2University of Kent, United Kingdom 3KU Leuven, Dept. of Computer Science; Leuven.AI, Belgium 4ERLNMYR, Belgium Abstract Rosetta Code provides improv theatre performers with artificial intelligence (AI)-based technology to perform shows understandable across many different languages. We combine speech recognition, improv chatbots and language translation tools to enable improvisers to com- municate with each other while being understood—or comically misunderstood—by multilingual audiences. We describe the technology underlying Rosetta Code, detailing the speech recognition, machine translation, text generation and text-to-speech subsystems. We then describe scene structures that feature the system in performances in multilingual shows (9 languages). We provide evaluative feedback from performers, au- Figure 1: Example of a performed Telephone Game. Per- diences, and critics. From this feedback, we draw formers are aligned and one whispers to their partner on analogies between surrealism, absurdism, and multilin- the right a phrase in a foreign language (here, in Swedish), gual AI improv. Rosetta Code creates a new form of language-based absurdist improv. The performance re- which is then repeated to the following performer, until the mains ephemeral and performers of different languages last utterance is voiced into automated speech recognition can express themselves and their culture while accom- and translation to show how information is lost. modating the linguistic diversity of audiences. in which it is performed. Given that improv is based on the Introduction connection between the audience and the performers, watch- Theatre is one of the most important tools we have for shar- ing improv in a foreign language severely limits this link.
    [Show full text]
  • An Overview About Basic for Qt® from July 17, 2012
    An overview about Basic For Qt® from July 17, 2012 Contents An overview about Basic For Qt®..................................................................................................1 Object-Oriented...........................................................................................................................2 Event-Driven...............................................................................................................................2 Basic For Qt® Framework..........................................................................................................3 The Integrated Development Environment (IDE) - To simplify application development.............4 IDE Contents...............................................................................................................................4 Toolbox.......................................................................................................................................4 Project Window...........................................................................................................................4 Properties Windows....................................................................................................................4 Code / Design view.....................................................................................................................4 Review........................................................................................................................................4 Getting Started - Making
    [Show full text]
  • Snapshots of Open Source Project Management Software
    International Journal of Economics, Commerce and Management United Kingdom ISSN 2348 0386 Vol. VIII, Issue 10, Oct 2020 http://ijecm.co.uk/ SNAPSHOTS OF OPEN SOURCE PROJECT MANAGEMENT SOFTWARE Balaji Janamanchi Associate Professor of Management Division of International Business and Technology Studies A.R. Sanchez Jr. School of Business, Texas A & M International University Laredo, Texas, United States of America [email protected] Abstract This study attempts to present snapshots of the features and usefulness of Open Source Software (OSS) for Project Management (PM). The objectives include understanding the PM- specific features such as budgeting project planning, project tracking, time tracking, collaboration, task management, resource management or portfolio management, file sharing and reporting, as well as OSS features viz., license type, programming language, OS version available, review and rating in impacting the number of downloads, and other such usage metrics. This study seeks to understand the availability and accessibility of Open Source Project Management software on the well-known large repository of open source software resources, viz., SourceForge. Limiting the search to “Project Management” as the key words, data for the top fifty OS applications ranked by the downloads is obtained and analyzed. Useful classification is developed to assist all stakeholders to understand the state of open source project management (OSPM) software on the SourceForge forum. Some updates in the ranking and popularity of software since
    [Show full text]
  • Using Tcl to Curate Openstreetmap Kevin B
    Using Tcl to curate OpenStreetMap Kevin B. Kenny 5 November 2019 The massive OpenStreetMap project, which aims to crowd-source a detailed map of the entire Earth, occasionally benefits from the import of public-domain data, usually from one or another government. Tcl, used with only a handful of extensions to orchestrate a large suite of external tools, has proven to be a valuable framework in carrying out the complex tasks involved in such an import. This paper presents a sample workflow of several such imports and how Tcl enables it. mapped. In some cases, the only acceptable approach is to Introduction avoid importing the colliding object altogether. OpenStreetMap (https://www.openstreetmap.org/) is an This paper discusses some case studies in using Tcl scripts ambitious project to use crowdsourcing, or the open-source to manage the task of data import, including data format model of development, to map the entire world in detail. In conversion, managing of the relatively easy data integrity effect, OpenStreetMap aims to be to the atlas what issues such as topological inconsistency, identifying objects Wikipedia is to the encyclopaedia. for conflation, and applying the changes. In many ways, it Project contributors (who call themselves, “mappers,” in gets back to the roots of Tcl. There is no ‘programming in preference to any more formal term like “surveyors”) use the large’ to be done here. The scripts are no more than a tools that work with established programming interfaces to few hundred lines, and all the intensive calculation and data edit a database with a radically simple structure and map management is done in an existing ecosystem of tools.
    [Show full text]
  • Steps-In-Scala.Pdf
    This page intentionally left blank STEPS IN SCALA An Introduction to Object-Functional Programming Object-functional programming is already here. Scala is the most prominent rep- resentative of this exciting approach to programming, both in the small and in the large. In this book we show how Scala proves to be a highly expressive, concise, and scalable language, which grows with the needs of the programmer, whether professional or hobbyist. Read the book to see how to: • leverage the full power of the industry-proven JVM technology with a language that could have come from the future; • learn Scala step-by-step, following our complete introduction and then dive into spe- cially chosen design challenges and implementation problems, inspired by the real-world, software engineering battlefield; • embrace the power of static typing and automatic type inference; • use the dual object and functional oriented natures combined at Scala’s core, to see how to write code that is less “boilerplate” and to witness a real increase in productivity. Use Scala for fun, for professional projects, for research ideas. We guarantee the experience will be rewarding. Christos K. K. Loverdos is a research inclined computer software profes- sional. He holds a B.Sc. and an M.Sc. in Computer Science. He has been working in the software industry for more than ten years, designing and implementing flex- ible, enterprise-level systems and making strategic technical decisions. He has also published research papers on topics including digital typography, service-oriented architectures, and highly available distributed systems. Last but not least, he is an advocate of open source software.
    [Show full text]
  • Using Domain Specific Language for Modeling and Simulation: Scalation As a Case Study
    Proceedings of the 2010 Winter Simulation Conference B. Johansson, S. Jain, J. Montoya-Torres, J. Hugan, and E. Yucesan,¨ eds. USING DOMAIN SPECIFIC LANGUAGE FOR MODELING AND SIMULATION: SCALATION AS A CASE STUDY John A. Miller Jun Han Maria Hybinette Department of Computer Science University of Georgia Athens, GA, 30602, USA ABSTRACT Progress in programming paradigms and languages has over time influenced the way that simulation programs are written. Modern object-oriented, functional programming languages are expressive enough to define embedded Domain Specific Languages (DSLs). The Scala programming language is used to implement ScalaTion that supports several popular simulation modeling paradigms. As a case study, ScalaTion is used to consider how language features of object-oriented, functional programming languages and Scala in particular can be used to write simulation programs that are clear, concise and intuitive to simulation modelers. The dichotomy between “model specification” and “simulation program” is also considered both historically and in light of the potential narrowing of the gap afforded by embedded DSLs. 1 INTRODUCTION As one learns simulation the importance of the distinction between “model specification” and “simulation program” is made clear. In the initial period (Nance 1996), the distinction was indeed important as models were expressed in a combination of natural language (e.g., English) and mathematics, while the simulation programs implementing the models were written in Fortran. The gap was huge. Over time, the gap has narrowed through the use of more modern general-purpose programming languages (GPLs) with improved readability and conciseness. Besides advances in general-purpose languages, the developers of Simulation Programming Languages (SPLs) have made major contributions.
    [Show full text]
  • Addressing Problems with Replicability and Validity of Repository Mining Studies Through a Smart Data Platform
    Empirical Software Engineering manuscript No. (will be inserted by the editor) Addressing Problems with Replicability and Validity of Repository Mining Studies Through a Smart Data Platform Fabian Trautsch · Steffen Herbold · Philip Makedonski · Jens Grabowski The final publication is available at Springer via https://doi.org/10.1007/s10664-017-9537-x Received: date / Accepted: date Abstract The usage of empirical methods has grown common in software engineering. This trend spawned hundreds of publications, whose results are helping to understand and improve the software development process. Due to the data-driven nature of this venue of investigation, we identified several problems within the current state-of-the-art that pose a threat to the repli- cability and validity of approaches. The heavy re-use of data sets in many studies may invalidate the results in case problems with the data itself are identified. Moreover, for many studies data and/or the implementations are not available, which hinders a replication of the results and, thereby, decreases the comparability between studies. Furthermore, many studies use small data sets, which comprise of less than 10 projects. This poses a threat especially to the external validity of these studies. Even if all information about the studies is available, the diversity of the used tooling can make their replication even then very hard. Within this paper, we discuss a potential solution to these problems through a cloud-based platform that integrates data collection and analytics. We created SmartSHARK,
    [Show full text]
  • A Comparative Study of Programming Languages in Rosetta Code
    A Comparative Study of Programming Languages in Rosetta Code Sebastian Nanz · Carlo A. Furia Chair of Software Engineering, Department of Computer Science, ETH Zurich, Switzerland fi[email protected] Abstract—Sometimes debates on programming languages are and types of tasks solved, and by the use of novice program- more religious than scientific. Questions about which language is mers as subjects. Real-world programming also develops over more succinct or efficient, or makes developers more productive far more time than that allotted for short exam-like program- are discussed with fervor, and their answers are too often based ming assignments; and produces programs that change features on anecdotes and unsubstantiated beliefs. In this study, we use and improve quality over multiple development iterations. the largely untapped research potential of Rosetta Code, a code repository of solutions to common programming tasks in various At the opposite end of the spectrum, empirical studies languages, which offers a large data set for analysis. Our study based on analyzing programs in public repositories such as is based on 7’087 solution programs corresponding to 745 tasks GitHub [2], [22], [25] can count on large amounts of mature in 8 widely used languages representing the major programming paradigms (procedural: C and Go; object-oriented: C# and Java; code improved by experienced developers over substantial functional: F# and Haskell; scripting: Python and Ruby). Our time spans. Such set-ups are suitable for studies of defect statistical
    [Show full text]
  • Ranking Programming Languages by Energy Efficiency
    Ranking Programming Languages by Energy Efficiency Rui Pereiraa, Marco Coutoa, Francisco Ribeiroa, Rui Ruaa, J´acomeCunhab, Jo~aoPaulo Fernandesc, Jo~aoSaraivaa aHASLab/INESC TEC & Universidade do Minho, Portugal bUniversidade do Minho & NOVA LINCS, Portugal cCISUC & Universidade de Coimbra, Portugal Abstract This paper compares a large set of programming languages regarding their efficiency, including from an energetic point-of-view. Indeed, we seek to establish and analyze different rankings for programming languages based on their energy efficiency. The goal of being able to rank languages with energy in mind is a recent one, and certainly deserves further studies. We have taken 19 solutions to well defined programming problems, expressed in (up to) 27 programming languages, from well know repositories such as the Computer Language Benchmark Game and Rosetta Code. We have also built a framework to automatically, and systematically, run, measure and compare the efficiency of such solutions. Ultimately, it is based on such comparison that we propose a serious of efficiency rankings, based on multiple criteria. Our results show interesting findings, such as, slower/faster languages con- suming less/more energy, and how memory usage influences energy consump- tion. We also show how to use our results to provide software engineers support to decide which language to use when energy efficiency is a concern. Keywords: Energy Efficiency, Programming Languages, Language Benchmarking, Green Software 1. Introduction Software language engineering provides powerful techniques and tools to design, implement and evolve software languages. Such techniques aim at im- proving programmers productivity - by incorporating advanced features in the language design, like for instance powerful modular and type systems - and at efficiently execute such software - by developing, for example, aggressive com- piler optimizations.
    [Show full text]
  • Getting Started with Morfik
    Getting started with Morfik: Creating a GUI Michaël Van Canneyt June 6, 2007 Abstract Morfik is an exciting new environment for creating webapplications. It is unique in many ways and in this article, it will be shown how Morfik can be used to create webapplications that function (almost) like a regular desktop application. 1 Introduction Creating webpages is easy these days. Creating interactive webpages is also easy. Creating rich internet applications or webapplications is already more difficult: intimate knowledge of Javascript and AJAX is required in order to be able to create an application which looks and reacts like a regular desktop application. Morfik is a development environment which makes creating a web application as easy as creating a desktop application: Morfik and it’s unique architecture was introduced in 2 previous articles. In a couple of articles Morfik’s architecture will be explained in more detail. Various areas of Morfik will be explained: • GUI design: how to code the visual part of the application. This will cover basic events, and how to open other windows in the browser. • Database access: in this part, the possibilities for data access will be discussed, and how Morfik can tightly couple the GUI with a database. It also includes a banded reporting engine, which emits nice-looking PDF documents. • Webservices: no web-application tool would be complete without support for web- services. Morfik has support for consuming third-party webservices, but can also be used to create webservices. Indeed, webservices are used to let the GUI (which runs in the browser) communicate with the Morfik server application.
    [Show full text]
  • Copyrighted Material
    51_108543-bindex.qxp 4/30/08 8:35 PM Page 671 Index aligning text using in JavaScript, 493–494 Numerics HTML, 466 linked lists versus, 342 Alpha Five database multi-dimensional, 0 (zero) programming 321–323, 375–376 initializing arrays, 317 language, 79 one-based, 315, 316 zero-based arrays, alpha-beta pruning, overview, 314 315–316 420–421 in Pascal/Delphi, 586–587 1-based arrays, 315, 316 American Standard Code in Perl, 569–570 1-time pad algorithm, 446 for Information in PHP, 506 4th Dimension database Interchange (ASCII) requirements for programming codes, 423 defining, 314 language, 79 Analytical Engine, 10 resizable, 319–321, 326 anchor points (HTML), retrieving data from, A 470–471 318–319 And operator, 175–176. See searching and sorting, 326 Ada language, 10, 58, 130 also logical/Boolean speed and efficiency address space layout operators issues, 328 randomization AndAlso operator (Visual storing data in, 318 (ASLR), 642 Basic), 597 for string data types in Adobe AIR RIA tool, 664 Apple Xcode compiler, 25, C/C++, 526 adversarial search 84, 85 structures with, 314, alpha-beta pruning, AppleScript (Mac), 76, 91 323–325 420–421 applets (Java), 66 uses for, 327–328 depth versus time in, arrays in VB/RB, 603–604 419–420 associative, 352–353, zero-based, 315–316 horizon effect, 420 517–518 artificial intelligence (AI) library lookup, 421–422 in C#, 554–555 applications, 656 overview, 418–419 in C/C++, 537 Bayesian probability, 653 agile documentation, 287 data type limitations, 326 camps, strong versus agile (extreme) declaring, 318 weak, 644 programming, 112–114 default bounds, 315–316 declarative languages, AI.
    [Show full text]