Showing posts with label Programming. Show all posts
Showing posts with label Programming. Show all posts

Sunday, August 10, 2008

Robo Bobo and the Complaint

Well, people, such as myself and Mathimoto, have been insanely busy of late. Yet, occasionally time and space conspire that posting might be made.

So let me share with you one of the reasons I've been with the busy-ness, the web and its various technologies. Now while this sounds like a simple matter, it's actually insanely complicated. But I can give you a preview:

Now the essence of the web is run on servers, most notably Apache. There are other servers with various specialties, like Jaxer's Javascript-specialized server, and Microsoft, in its fierce insistence not to be compatible with anything else has its own server, Microsoft Server. However, all of these servers in the end run on your standard compiled languages, such as Java, C++, C, or Microsoft's C# (I mean there are other possibilities like Delphi (a variant of Object-Oriented Pascal) or something along those lines, but why would you do such a thing?)).

However, not everyone actually has a server, due to expense, complexity of set-up (the #1 limiting factor on web serving in my mind), and so there are alternatives, such as serving by the domain name company that gave you the domain name, or using a web app service such as Google App Engine. The upside is usually this is less money (usually), the downside is usually this is more complex (usually), and your choice of technologies is often limited, for example Google App Engine relies on Python.

Taking a step up from the server, you got the pages. This is what comes back after a request by a user. There's a variety of technologies out there, which fall into a couple categories. Mainly, the big two are CGI, where a http request (ie, a page URL) runs a script, in theory written in anything, but usually written in a scripting language, like Javascript, VBScript, Actionscript, Perl, or Python, XML/HTML pages, with possibly embedded scripts (like the first three of the CGI languages, PHP (although that can also be run for CGI)) (in a variety of forms like ASP (Active Server Pages), ASP.Net (a variant with more Microsoft-specialty tech), JSP (Java Server Pages), or JSF (Java Server Faces)). There's also a variety of media that could come back with the page, but that's a bit more than I care to get into, although I should note that Media and such is often best caught up with Actionscript in a whole Adobe Flash mesh-up, but that tech is proprietary and may cost the money.

And once you get the pages, sometimes there's more stuff going on, like client-side scripting languages, such as Javascript and Actionscript, sometimes there's Flash Players and stuff playing the media or something, and more there's also Java applet tech, Java web start up, and the like.

I'm sure there's more and more with more combinations. I mean some people like throwing in Groovy and Common Lisp into there, because they're insane. But the web's a complicated place, with complicated people and no one understands him but his woman...

A summary of a brief overview of web tech:

Sever-program: Apache, Jaxer, Microsoft Server, etc.
Written-in: C, C++, Java, C#, etc.

Returned Page: HTML, XML, media, image, PDF, txt, etc.
Produced-by: Javascript, Actionscript, VBScript, PHP, Python, etc.

Client-side: Browser-processing, Client-side script, Media
Produced-by:
Browsers written in C, C++, Java, C#, etc., primarily with the Geko (Mozilla) engine, Internet Explorer engine, or Opera engine
Client-side scripts in Javascript, Actionscript, etc. (based on DOM events, DOM model, SAX events, ah, my mind hurts too many techs!)

And the web keeps on trucking.

Friday, February 8, 2008

Why plan when you can scheme?

Let me make a pitch for programming in scheme for math purposes.

Why is Scheme good for programming numerical methods and other math brick and brack?

Because it is so gloriously insane!

Scheme is a language without local variables, without control structures, without global constants, it uses reverse-Polish notation (those crazy Poles!) run usually by an interpreter... basically to the layman, let me say that it makes no sense.

But the advantage to Scheme is it fits very well with the idea of constructing logical algorithms and basing your math around that. Scheme strips algorithms down to their basic components, the procedures, and doesn't allow you to go any further than that. There's a ruthlessness to this restriction and enough power in this limited space that you end up being able to do a lot of math stuff simply and in a manner which illuminates the heart of the algorithm.

But it remains insane.

That said here's a good Scheme implementation:

Dr. Scheme

And here's a good guide to the language (note the implementation and this guide are not related, so some aspects of the guide may not work with this implementation):

The Scheme Programming Language by Kent Dybvig

Now I don't want this math blog to go all computer sciency, but it must be admitted that comp. sci. has some math overlap, especially when it comes to doing programming to make math easier. So look out in the future for some bursts of code for math-based functions, most likely in Scheme.

Keep on Scheming!