Although programming domain-specific languages ( with tools like ANTLR ) is part of the standard toolkit (*) of an application programmer, programming compilers is still considered to be a different ballgame. ( Is it? ) I worked for a company once that developed a 4GL. A small group of experts worked on the kernel ( compilers and run-time ). They enjoyed an almost cult-like status, they were literally seen as guru's. The skill to write a compiler was considered God-like. Java was only just released and tools like ANTLR were years ahead of us. - The cruelty is, it always is, that developing compilers is not difficult, it is simple compared to developing satisfactory end-user applications.
More next post, in which I will explain how you can learn to write your own compiler fast and easy.
(*) If you expect a programmer to be carrying an actual physical "kit" on his gadget belt you are wrong. "Standard Toolkit" is programmers jargon for a minimal set of technical skills expected of any programmer. Every programmer knows how to query a database with SQL, creating and populating tables to optimize performance is however specialized knowledge expected only of a database administrator or DBA ( although many programmers have DBA skills ).
Please follow this blog
Search this blog
Showing posts with label Programming. Show all posts
Showing posts with label Programming. Show all posts
Saturday, November 19, 2011
Monday, October 31, 2011
Graphica - Scene Graph Language
Like everyone else, I suppose, I have a need to express my creativity. To facilitate this I am coding a small programming language to create graphical art. Although, for me, Mathematica is -the- language to do that I want to have a language that kids of age 8 to 88 ( TinTin or Donald Duck readers ) could learn. By using it geometric transformations like rotations and translations are learned in a natural way.
The graphic like the one below, including the rotation, is an example what the language could create with a few lines, a Mathematica Kernel is required but will run in the background only.
To be continued.
The graphic like the one below, including the rotation, is an example what the language could create with a few lines, a Mathematica Kernel is required but will run in the background only.
To be continued.
Saturday, October 1, 2011
The Limits of Mathematics ( or: a Lisp interpreter in Mathematica )
( ... ) mathematics because it is an extremely difficult road to traverse. The terrain is extremely demanding. The amount of work and concentration required to build the foundation necessary to continue extending the framework is immense. ( ... ) - David Andrews
Mathematics, as if you have never seen a skyscraper and are traversing the streets of Manhattan. With that mindset, you can only think that people -walk- to the 60th floor... Anyway, feeling overwhelmed by the sheer size and complexity of maths is not going to help. Only people willing to teach, without ulterior selfish motives, can help. One can write a book about mathematics to impress peers, as a way to meet publication quotas or to -teach-. Like the book The Limits of Mathematics does for example. It is a clear taste of the best mathematics has to offer, an invitation to go on to the next level.
The table of contents says it all:
- Randomness in arithmetic and the decline and fall of reductionism in pure mathematics
- Elegant LISP programs
- An invitation to algorithmic information theory
- The limits of mathematics
- Appendix. LISP interpreter in Mathematica
The appendix contains the source code of a Lisp interpreter coded in Mathematica. I love that. But the book starts with a clear description of the massive changes taking place in ( the thinking about ) mathematics during the first half of the twentieth century, from Hilbert to Turing.
Saturday, January 16, 2010
Side effects of an activity ( i.e. studying mathematics )
I want to document the (side-)effects studying ( mathematics ) at the Open University has on life ( as well ). This is therefore the first post in the category 'Personal'. What is to be expected on beforehand? The study can have a positive or negative influence on your personal and / or worklife. I haven't measured it but I have spent at least 20 hours / week on mathematics related activities. There must be some measurable effect. I suppose there is. It is of course impossible to put everything in a blog entry so I'll just make a note of certain things. - I have worked in IT for many years in various roles. So that is what I am, I suppose, an IT consultant. Although when asked about my profession I simply can't say that I -am- an IT consultant. I -do- ( for example ) programming, that's it. I suppose that a doctor will say, "I -am- a doctor". There is a difference. Now onto the first fact I want to document.
Last year approximately around this time I was spending more time on learning Adobe Flex ( which has been renamed to Flash Builder I just found out, which triggered this blog-entry in a way ) with various back-ends like PHP / MySQL and BlazeDS / Oracle than I was spending on learning MST121 stuff and technologies required for the project I was working on at that time ( Oracle ADF / Struts ). - I started in september 2008 with MST121. I seriously committed myself to a number of years of mathematics study next to my job. Becayse I studied a lot of math in the years prior to 2008 as an amateur student I felt that MST121 was rather easy. Back to last year. MST121 was not easy. And MS221 was coming on top of it. The project I was working on needed more time and dedication of me. Something had to be done. I discussed matters with a colleague on the project and decided to take a week off to finish TMA02 of MST121. I worked extremely hard and managed an 88 / 100 for TMA02. So only after four months I experienced some of the impact the study had. I implemented quite a few changes by then.
I started to make my TMA's using TeXnicCenter which costs more time but definitely leads to higher marks. I also started to work on the TMA's asap. I just started and figured things out while working on the TMA. That gives a feeling of progress all along. I had to learn, re-learn Latex which I don't regret btw. Anyway. From february until june I was very busy on MST121 and MS221. Producing TMA after TMA. - My work on Flex crashed which I regret very much. I deeply like the ActionScript language. - I no longer work on the project I was working on early 2009. ( More about that in another blog-entry ).
I have always been and always will be attracted to computer programming. I decided that this is one of my 'advantages' in math and that I should develop it further. Although I can work very well with Mathematica as a mathematics tool, and can even write small functions in it, I knew that the language had many secrets I hadn't discovered yet. I started to study the book Introduction to Programming with Mathematica which eventually led to cognition after cognition and somehow brought me back to early 2009. Mathematica is a functional language, much like Lisp which is extremely powerful. It is called the 'programmable programming language' where code is as easily changed as data. Since my main skills are in Java I was delighted to find Clojure which has everything Java has and is also basically a Lisp dialect.
Sofar.
As far as studying is concerned I am awaiting the payments to show up at my Student Fee Account and the subseqyent shipment of the M208 and MT364 materials. I can't wait actually, I am ready. Until then I'll spend some more time on Clojure. - I am somehow hoping to find a way / define a project so that I can use Clojure preferably with Flash Builder to the benefit of my study.
Last year approximately around this time I was spending more time on learning Adobe Flex ( which has been renamed to Flash Builder I just found out, which triggered this blog-entry in a way ) with various back-ends like PHP / MySQL and BlazeDS / Oracle than I was spending on learning MST121 stuff and technologies required for the project I was working on at that time ( Oracle ADF / Struts ). - I started in september 2008 with MST121. I seriously committed myself to a number of years of mathematics study next to my job. Becayse I studied a lot of math in the years prior to 2008 as an amateur student I felt that MST121 was rather easy. Back to last year. MST121 was not easy. And MS221 was coming on top of it. The project I was working on needed more time and dedication of me. Something had to be done. I discussed matters with a colleague on the project and decided to take a week off to finish TMA02 of MST121. I worked extremely hard and managed an 88 / 100 for TMA02. So only after four months I experienced some of the impact the study had. I implemented quite a few changes by then.
I started to make my TMA's using TeXnicCenter which costs more time but definitely leads to higher marks. I also started to work on the TMA's asap. I just started and figured things out while working on the TMA. That gives a feeling of progress all along. I had to learn, re-learn Latex which I don't regret btw. Anyway. From february until june I was very busy on MST121 and MS221. Producing TMA after TMA. - My work on Flex crashed which I regret very much. I deeply like the ActionScript language. - I no longer work on the project I was working on early 2009. ( More about that in another blog-entry ).
I have always been and always will be attracted to computer programming. I decided that this is one of my 'advantages' in math and that I should develop it further. Although I can work very well with Mathematica as a mathematics tool, and can even write small functions in it, I knew that the language had many secrets I hadn't discovered yet. I started to study the book Introduction to Programming with Mathematica which eventually led to cognition after cognition and somehow brought me back to early 2009. Mathematica is a functional language, much like Lisp which is extremely powerful. It is called the 'programmable programming language' where code is as easily changed as data. Since my main skills are in Java I was delighted to find Clojure which has everything Java has and is also basically a Lisp dialect.
Sofar.
As far as studying is concerned I am awaiting the payments to show up at my Student Fee Account and the subseqyent shipment of the M208 and MT364 materials. I can't wait actually, I am ready. Until then I'll spend some more time on Clojure. - I am somehow hoping to find a way / define a project so that I can use Clojure preferably with Flash Builder to the benefit of my study.
Tuesday, January 5, 2010
Mathematica is a functional language
Mathematica is a functional language. A program that calculates n!, n factorial looks like this:
f[n_] := Apply[Times, Range[n]]
The function f[5] yields 120 = 5!
Explanation of the code:
- Range[5] by itself yields {1, 2, 3, 4, 5}
- Times[a,b] yields a*b.
- Apply[Times, {1,2,3,4,5}] yields Times[Times[Times[Times[1, 2], 3], 4], 5]
Functional programming goes back to the 1950's when the programming language Lisp was developed. Since then Lisp has always been in use ( in some dialect ) for the development of highly complicated systems like Artificial Intelligence (AI) systems. But unexpectedly for the time the first Yahoo Store web application has been built in Lisp also.
f[n_] := Apply[Times, Range[n]]
The function f[5] yields 120 = 5!
Explanation of the code:
- Range[5] by itself yields {1, 2, 3, 4, 5}
- Times[a,b] yields a*b.
- Apply[Times, {1,2,3,4,5}] yields Times[Times[Times[Times[1, 2], 3], 4], 5]
Functional programming goes back to the 1950's when the programming language Lisp was developed. Since then Lisp has always been in use ( in some dialect ) for the development of highly complicated systems like Artificial Intelligence (AI) systems. But unexpectedly for the time the first Yahoo Store web application has been built in Lisp also.
Saturday, January 2, 2010
From Lisp to Mathematics
I was watching one of the video lectures from the course 6.001 Structure and Interpretation of Computer Programs from MIT OpenCourseWare. Although the course is even for Computer Science standards up-to-date the lectures were recorded in 1986 at an HP company course. It looks rather outdated, pre-historic even when he demos the Lisp editor / interpreter. But is it really?
I entered the same commands in Eclipse ( using the Cusp Lisp plugin ) and Lisp wise there hasn't changed a thing.
I suppose that there is a difference between old and 'still around'. I could name numerous so-called 4th generation languages invented in the 80's and 90's which are dead and forgotten. The fact that Lisp which dates back to the 50's(!) keeps popping up and is taught at MIT today must make it a very special language.
Single variable calculus dates back to the second half of the 17th century. And we all know what an extremely powerful toolset calculus in fact is. The 'advanced' topics in an undergraduate program date back to the 19th century or before that. Except for maybe graph theory which was developed in the 20th century. To become 'current', knowledgeable of the -state-of-the-art- developments in any topic is difficult but I believe that it is even harder for a science like mathematics. Simply because it has been around for so many years and the field becomes more advanced by the day.
I entered the same commands in Eclipse ( using the Cusp Lisp plugin ) and Lisp wise there hasn't changed a thing.
I suppose that there is a difference between old and 'still around'. I could name numerous so-called 4th generation languages invented in the 80's and 90's which are dead and forgotten. The fact that Lisp which dates back to the 50's(!) keeps popping up and is taught at MIT today must make it a very special language.
Single variable calculus dates back to the second half of the 17th century. And we all know what an extremely powerful toolset calculus in fact is. The 'advanced' topics in an undergraduate program date back to the 19th century or before that. Except for maybe graph theory which was developed in the 20th century. To become 'current', knowledgeable of the -state-of-the-art- developments in any topic is difficult but I believe that it is even harder for a science like mathematics. Simply because it has been around for so many years and the field becomes more advanced by the day.
Wednesday, December 9, 2009
Playing games with groups
Doing mathematics is a pleasurable activity. It can be very much like playing a game. With the help of GAP as a juror, teacher there are zillions of games you can do by yourself. Some ideas:
- finding all groups ( of a specific order );
- finding the presentation formulas;
- finding the automorphism group;
- finding the character table;
- drawing the Cayley graph;
Once you start on this you get a sort of natural need for the use of either the Mathematica Abstract Algebra package, or even GAP ( or similar ), that is a mindset which makes learning the language rather easy.
- finding all groups ( of a specific order );
- finding the presentation formulas;
- finding the automorphism group;
- finding the character table;
- drawing the Cayley graph;
Once you start on this you get a sort of natural need for the use of either the Mathematica Abstract Algebra package, or even GAP ( or similar ), that is a mindset which makes learning the language rather easy.
Sunday, May 25, 2008
Transforming ideas to results...
Subscribe to:
Posts (Atom)
Popular Posts
-
Among lectures on Calculus I,II and III, ( Introduction to ) Linear Algebra and ( Introduction to ) Differential Equations from the UCCS ( ...
-
Problem: We want to calculate the sum of the elements of a list of numbers. Suppose this list is named l and has been assigned the value {1,...
-
Today I started to read the Ramanujan biography ( The e-book version, of course. ) The book looks promising. What was it like to communicate...
-
I found a set of video lectures on Abstract Algebra. MATH E-222 Abstract Algebra - http://www.extension.harvard.edu/openlearning/math222/ E...
-
Ramanujan's genius (r) was discovered by Hardy (l) At a very young age Ramanujan designed the following formula for a 3 by 3 magic sq...
Welcome to The Bridge
Mathematics: is it the fabric of MEST?
This is my voyage
My continuous mission
To uncover hidden structures
To create new theorems and proofs
To boldly go where no man has gone before
(Raumpatrouille – Die phantastischen Abenteuer des Raumschiffes Orion, colloquially aka Raumpatrouille Orion was the first German science fiction television series. Its seven episodes were broadcast by ARD beginning September 17, 1966. The series has since acquired cult status in Germany. Broadcast six years before Star Trek first aired in West Germany (in 1972), it became a huge success.)





