Go Programming Language
May 25, 2012 at 12:47 pm | Posted in community, Programming | Leave a commentTags: go programming language, google go, google go comparison with C, google go comparison with Haskell, haskell vs google go
I was reading draft of new C++ standard a.k.a C++11 (you too must check out N3337.pdf) and somehow I came across Go Programming Lanaguage and on that same page I found this quote of Bruce Eckel:
The complexity of C++ (even more complexity has been added in the new C++), and the resulting impact on productivity, is no longer justified. All the hoops that the C++ programmer had to jump through in order to use a C-compatible language make no sense anymore — they’re just a waste of time and effort. Now, Go makes much more sense for the class of problems that C++ was originally intended to solve.
Now thats a pretty solid and strong statement, I got shakes reading that and it reminded me of The Case for D by Andrei Alexandrescu. Go is designed by a team consiting of our good old friends Rob Pike and Ken Thompson. It has some very good positive reviews. I still have to read the criticizm of it. As per computer language shootout results, C (using GNU’s gcc) is far faster but the code-size of Go was much less (almost 1/3rd). Next on comparison was C++ (GNU’s g++) and results were almost same. Next on my list were Lisp and ATS. checkout the results yourself down here in graphs.
I discussed this performance issue on Go language IRC channel (#go-nuts, freenode) and they gave me very logical and accurate explanation that Go is not mature yet and performance comparison is with very mature C and C++ libraries which are around for a decade or more. So I cna conclude comparison is not exactly a fair comparison. I think Go will catch up with performance issues very fast as user base is growing at electric pace. Reminds me of the times and discussion when Python’s user base was growing and they were trying to resolve all the issues they could with full hard work.
Whenever a new language comes or whenever you want to learn an already established language, I think you must look into why that language was created in first place. Does that match your why of learning ? you must be using that language for some purpose, does the design goal suit your purpose ? In my case I think Go language suits, here is the excerpt from Does the world need another programming language ?
A couple of years ago, several of us at Google became a little frustrated with the software development process, and particularly using C++ to write large server software. We found that the binaries tended to be much too big. They took too long to compile. And the language itself, which is pretty much the main system software language in the world right now, is a very old language. A lot of the ideas and changes in hardware that have come about in the last couple of decades haven’t had a chance to influence C++. So we sat down with a clean sheet of paper and tried to design a language that would solve the problems that we have: we need to build software quickly, have it run well on modern multi-core hardware and in a network environment, and be a pleasure to use.
Go has the feel of a dynamic language like Python or Ruby or JavaScript, but it has the performance and safety of a language like Java or C or C++. So you get the lightweight feel of a modern scripting dynamic language but the robustness and performance of a more old-fashioned language.
Based solely on the above criteria I think I can start using Go right away and if I don’t have enough mature libraries or some specific functionality, then ATS is always there. When companies become big they become rigid, like a stubborn spoilt son of a businessman. They refuse to change to get edge over other software corporations because the change requires a lot of effort. I think the weight of word “Google” behind Go programming language will give it an edge over that rigidity. (same thinkg with Java and .NET).





Copyright © 2012 Arnuld Uttre, Village – Patti, P.O – Manakpur, Tehsil – Nangal, Distt. – Ropar, Punjab (INDIA)
Verbatim copying and distribution of this entire article are permitted worldwide, without royalty, in any medium, provided this notice, and the copyright notice, are preserved.
one year vs four days
May 12, 2012 at 1:47 pm | Posted in Programming | Leave a commentTags: Programming, project manager, software business
At my workplace I contributed to the creation of a software while working with systems programming team. It worked fine at that time. Last year new requirements were proposed, which, from my perspective, pressed the need for a fundamental change in design. Face the fact, Corporates are rigid, hence ideas of changes in design were postponed, postponed and the postponed more. Its same story everywhere in every corporation (except few ones). Company decided not to take the risk of making new changes and added new code to the current product at that time. And that spoke trouble many months later and screams were heard followed by pressures and tensions in few months after those “many months”.
During last week I was assigned the task of rewriting one part of that software, as managers got too much frustrated with the rigidity. I was given the freedom of doing whatever I wanted to do make problems disappear in 2 days (I told them I don’t know black magic and none of my friends know Voodo). I looked at old design and new requirements and hell I did not see any match. So I rewrote several (yeah, not one) parts of that softwares, almost 80% of the code was rewritten, tested and given back in 3 days flat.
Whats so important in this ? The software which took one year to write, I rewrote 80% of code in 3 days, edited makefile and compiled the source and ran it and it did not segfault. Holy Cow… it was really black magic. Everything gave correct results while I tested it for 4th day. There was only one problem of a mutex lock was not opening. Whats the lesson ?
Experience, listening to experts in field and using methods, tools and techniques advised by those experts. No one is master in this world (especially no one becomes a master in 4 years) you have to share and learn from programmers around, provided those programmers really work hard on writing correct code. If you can’t find such programmers around you, google for usenet newsgroups, IRC channels, check comp.lang.(your language). Earlier when I contributed I was a newbie and now after 4 years I see I have developed the skill to solve problems in a fast and efficient manner. If I knew algorithms and data structures better than what I know now then I could have done much better job than 4 days or produced much more requirements-matching code. When a function is wrong then you can rewrite it. When a data-structure is wrong then you have to rewrite the data-structure and all the functions associated with it, which means 100% rewrite, which is what I did and I removed the rigidity of that software. It was pretty hard and the result was astounding.
Other lesson is to make sure your requirements are specific, not general. Instead of saying “We want to add/remove/find elements as efficient as possible”, one needs to ask “We want to add/remove/find elements based on a unique keyword.” Ask questions: Removals are more or additions ? “You want to sort the input or not and why ?”. “What exactly the input is and what exactly the output is, which requirements can match which data structure.” “Which operations are important and which are not.” “you want it to eat less memory or cpu and why” etc. etc.
This experience makes me both sad and happy. Happy because I can see specialized methods, tools and techniques of programming can save huge amounts of time. Sad because I am still far behind those methods. No wonder companies like Google/Microsoft/Facebook are ruling the world. They hire programmers who have mastered the art of these techniques/tools/methods. I still don’t know how to write a Red-Black tree using pointers. I still don’t know how to make it cpu-efficient or memory-efficient. Do we sort a red-black tree ? Saddest part is none of the interviews ask any questions of these type. All of the friends I know have never been asked any questions on algorithms/data-structures. Without them you can and will put lots of rigidity, headache in shipped code and build your future-tensions as inherent property of the software. When will you learn timesort ? (Tim Peters created timesort for use in Python Programming Language. go google immediately).
NOTE: As a business-owner/manager you must be thinking what is the business use of all these specialized techniques/methods and tools of programming ? Whats it in for me, Need I not make money ? I need to produce results as manager. Well, I am telling you since you are asking (or will ask): these are invaluable and useless, depending on your attitude. If you want your problems to be solved faster and better then use them. If you want to be better than your competitors then use them. If you don’t want to handicap yourself by solving same kind of problems for next 10 years but will really be happy to solve differet kind of business problems and make more money each year then please use them. And if you don’t want to accept that algorithms/data structures can help you then please don’t. Earth was always moving around Sun even when whole world believed it did not. I can’t help if you don’t want to listen to Joel Spolsky (I am writing in bold that he is a businessman) and Guy Steele and loads of others. In fact no one can help you then. (By the way, everyone knows Guy Steele)
Copyright © 2012 Arnuld Uttre, Village – Patti, P.O – Manakpur, Tehsil – Nangal, Distt. – Ropar, Punjab (INDIA)
Verbatim copying and distribution of this entire article are permitted worldwide, without royalty, in any medium, provided this notice, and the copyright notice, are preserved.
A Modern Systems Programming language
March 28, 2012 at 10:50 am | Posted in Hacking, Programming | Leave a commentWith more effort in the direction of finding a modern systems programming language I had email communications with several people including Eli Gottlieb, creator of decac programming language, GNU Hurd community and ATS language community. It was Eli Gottlieb who gave me the idea that unless I am doing a hobby project I should talk to Hurd people about my ideas and I am glad I did and as you have seen my letter to Hurd community already in my previous post, to find the replies, check out march 2012 archives of bug-hurd mailing list or go here
Seems like Hurd guys either did not like my idea or are nto intersted in it at all, hence I decided to not do any further debate. ATS community has given some replies here, else you can chekc out March 2012 mailing list archives from their site http://www.ats-lang.org
Eli has advised me to go through osdev.org and learn something about OS programming before I venture into writing a microkernel myself. Hongwei from ATS advised to first write a microkernel and then later see how ATS ecnodes to those principles. Wise advice and I am gonna follow. I don’t think I wil start HurdNG development anytime soon, in fact its gonna be quite late. I also need to to how decac was designed and what does it offer, then check out ATS too. While in the meantime I am checking other high level langauges like Haskell and what they offer and comparing the design-ideas to decac, ATS, C and C++ in return. Going to be a lot of work. We have quite high-level and very good programming langauges available at our disposal e.g Common Lisp, Haskell Caml etc. and good modern scripting languages and are available too (Squirrel is one of them, angel-code scripting library is another major step) but not much of mature modern systems programming languages.
Copyright © 2012 Arnuld Uttre, Village – Patti, P.O – Manakpur, Tehsil – Nangal, Distt. – Ropar, Punjab (INDIA)
Verbatim copying and distribution of this entire article are permitted worldwide, without royalty, in any medium, provided this notice, and the copyright notice, are preserved.
Must Reads – 1
March 23, 2012 at 4:59 pm | Posted in Hacking, Programming | Leave a commentI started learning programming in year 2005. After I quit my sales job in February of 2005, I purchased Red Hat Linux Bible in end of April same year. It has been 5 years since then, I learned a lot about computers and it became my passion since then, all possible because of GNU, different Newsgroups, mailing lists, forums and all the helpful people in this virtually real world. I have read many articles and books and essays and history of UNIX, Linux, GNU, BSD, Debian, and many other organizations and groups. Based on my experience I am providing here a list of articles that every computer science student, every programmer must read if he wants to truly understand what he is doing. In fact, every person who buys softwares must read some fo them to open up his mind, same way he knows about his motorcycle like what is spark plug and where it is, what air to keep in tires, if you own a car then how to learn to safely drive a car, how much useful those air-bags are, how to overtake (never to overtake from left e.g.), when is its really essentially to honk, not to talk on mobile phone while driving etc. That way no one wil be able to fool him around while buying softwares. May be after reading them a general computer user will walk on a path and come to know that Truth is really far more stranger than fiction. Ideal process would be o just read these links and google for extra depending on if you want to do computer programming or if you are not a programmer and you need something specific or just out of curiosity:
- The GNU Project
- Open Sources: Voices from the Open Source Revolution
- How To Become A Hacker
- Beating the Averages
- Perils of Java Schools
- A brief history of the Underground scene
- Master Foo and the Script Kiddie
- Teach Yourself Programming in Ten Years
- Why Functional Programming Matters
- Why Lisp
- Roots of Lisp
- Arrays and Pointers are not same
- Literate Programming
- The Arch Way
- Debian Social Contract
- Masters of Deception
- Cult of the Dead Cow
- DEF CON
- Kevin Mitnick
- The Man Who Sold the Moon
- The Art of Computer Programming
- Homesteading the Noosphere
- The Cathedral and the Bazaar
- A Comment on “Warez D00dz” Culture
- School Education and Software
- United States vs. Microsoft
- Browser Wars
- European Union Microsoft competition case
- Pirate Bay Founders Jailed
- Lisp Prgramming Language
- 12 Steps to Better Code
I guess in 1996 I tried to learn English from a book which you can find on every corner of India and it boasts to teach you English in 30 days. I tried and failed several times. Then in my graducation I tried to learn programming from a 30 days book and I failed again. So it worked out. The problem was that these 30 days, 30 weeks, 10 days, 21 days books never teach fundamentals. Most of them have many unreasonable assumptions. By reading these you can only have superficial knowledge about these subjects and 0% knowledge of basics. This is so strange but I myself wanted to write an article like Teach Yourself “Martial-Arts/Car-Repair/Large-Scale-Electric-Systems/Nuclear-Physics/Fine-Arts/somethnig-here/fill-your-favorite-words-here” in 10 Years.. AT that time I never came across anything like blog, in 1996 there was not internet at my place, therefore I never wrote the article. Later I went into different kinds of jobs and forgotten about it. When I started learning programming and started my blog I wanted to write one but then suddenly one day I came across Peter Norvig’s Teach Yourself Programming in 10 Years and I got surprised. I concluded I will not write any blog post about my experience because people will think I am copying Peter Norving and trying to imitate him. So I dropped the idea but in the meantime before internet came I shared my experience of 30 days books with my friends.
I don’t remember all the articles I have read over years. I will keep on adding them as soon as I remember.
Copyright © 2010 Arnuld Uttre, #331/type-2/sector-1, Naya Nangal, Distt. – Ropar, Punjab (INDIA) – 140126
Verbatim copying and distribution of this entire article are permitted worldwide, without royalty, in any medium, provided this notice, and the copyright notice, are preserved.
Letter to Hurd Community
March 23, 2012 at 12:27 pm | Posted in Uncategorized | Leave a commentSometime back I wrote my ideas on the lack of a modern systems programming language. This thought keeps on coming back to my mind and I never think I can be the guy who can write a programming language because I lack the knack for it, I am not intelligent or gifted with any skills from God. Whatever I have earned in my life is pure hard work and I keep on trying although I lack intelligence. This is a letter I wrote (actually posted this on bug-hurd mailing list) to Hurd community. It wil be interesting to see what they reply.
I am very much intersted in writing a microkernel for HurdNG. Anyway, I see Debian is set to release GNU/Hurd by this year end or early 2013 and this is still on “old baby” Mach. I think many must have recognized my name already (may be the as the guys who talks and talks but does nothing *practically*). I don’t do anything because I don’t want to use C or C++ to write microkernel. I have my reasons for this:
After 40 years we are still using a language that was designed on some ancient piece of equipment to take benefit of the instruction set of that hardware. We have machines which are 1000 times powerful than those equipments but we still use the same language, earlier we didn’t have any higher level language that competes with the efficiency of C but today we have choices. Hardware has grown and technically blasted beyond the levels of imagination but system programming languages have remained there. I always keep on searching for options. I came across 3 choices: ATS, BitC and decac.
- ATS: ATS is a statically typed programming language that unifies implementation with formal specification. It is equipped with a highly expressive type system rooted in the framework Applied Type System, which gives the language its name. Performance comparable to C (but not equal) at language shootout.
- decac (ak.a Deca): Deca is a language designed to provide the advanced features of sophisticated, high-level programming languages while still programming as close as possible to the bare metal. It brings in the functional, object-oriented, and generic programming paradigms without requiring a garbage collector or a threading system, so programmers really only pay in performance for the features they use. Project hosted at code.google.com , still in development.
- BitC: Lanmguage written for Coyotos. Went through many changes, looked very promising to me till the idea of using Coyotos as microkernel for Hurd was dropped for some technical reasons. As of now development of BitC has stopped and soon Shapiro is gonna come out with the post-mortem report of why it is stopped.
I have these questions:
- What do you guys think of this ? agreement, disagreement, hate this crazy idea, ? or look at this guy named arnuld, he is completely insane, thinking of rewriting 20 years of work into some new language in next 2 years.
- Is there any other modern systems programming language out there that I missed ?
- Any other advice, ideas to make Hurd as general purpose usable OS ? (its not usable as of now and I don’t think it will comete with Windows/Linux/MacOSX even in 2013).
If I go crazy then I may even rewrite entired Hurd as HurdNG in new language.
NOT RELATED: I was surprised to see Intel Fortran was above gcc in performance everytime. I thought C is the fastest language on Earth: http://bit.ly/GHSFZO
Copyright © 2012 Arnuld Uttre, Village – Patti, P.O – Manakpur, Tehsil – Nangal, Distt. – Ropar, Punjab (INDIA)
Verbatim copying and distribution of this entire article are permitted worldwide, without royalty, in any medium, provided this notice, and the copyright notice, are preserved.
Blog at WordPress.com. | Theme: Pool by Borja Fernandez.
Entries and comments feeds.