<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:georss='http://www.georss.org/georss' xmlns:gd='http://schemas.google.com/g/2005' xmlns:thr='http://purl.org/syndication/thread/1.0'><id>tag:blogger.com,1999:blog-2135090633764580433</id><updated>2011-07-29T10:56:00.258-07:00</updated><title type='text'>Mewa IDE</title><subtitle type='html'>Mewa IDE is a software project that aims to provide a free alternative to expensive numerical software like Matlab and IDL.

Mewa IDE does not aim to copy or redo existing commercial solutions, Mewa IDE will be a free Integrated Development Environment, open for 3rd party developers to extend with plugins.</subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://mewaide.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2135090633764580433/posts/default?max-results=100'/><link rel='alternate' type='text/html' href='http://mewaide.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><author><name>Hugo Silva</name><uri>http://www.blogger.com/profile/14661862973876739261</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>2</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>100</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-2135090633764580433.post-5649684197249896603</id><published>2010-07-04T12:56:00.000-07:00</published><updated>2010-07-17T07:02:30.637-07:00</updated><title type='text'>Lets share ideas</title><content type='html'>I've started a google wave, to document the different ideas and the reasons to create Mewa.&lt;br /&gt;&lt;a href="https://wave.google.com/wave/waveref/googlewave.com/w+AyVbrlq4A"&gt;https://wave.google.com/wave/waveref/googlewave.com/w+AyVbrlq4A&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2135090633764580433-5649684197249896603?l=mewaide.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://mewaide.blogspot.com/feeds/5649684197249896603/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://mewaide.blogspot.com/2010/07/lets-talk.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2135090633764580433/posts/default/5649684197249896603'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2135090633764580433/posts/default/5649684197249896603'/><link rel='alternate' type='text/html' href='http://mewaide.blogspot.com/2010/07/lets-talk.html' title='Lets share ideas'/><author><name>Hugo Silva</name><uri>http://www.blogger.com/profile/14661862973876739261</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2135090633764580433.post-4950861915756989612</id><published>2010-03-30T15:02:00.000-07:00</published><updated>2010-11-07T01:27:36.211-08:00</updated><title type='text'>Mewa, another programming language?</title><content type='html'>C/C++ is one of the most common, and complex, programming languages in use today. For many needs, like ptototyping and data analysis, C/C++ is very expensive and time consuming.&lt;br /&gt;&lt;br /&gt;Mewa is a &lt;a href="http://en.wikipedia.org/wiki/Dynamic_programming_language"&gt;dynamic language&lt;/a&gt; that aims to offer the flexibility of developing with a high level programming language and the performance of C/C++, a compiled language. This aim could only be achieved by designing a completely new programming language that throughout its design would bridge very well with C/C++. Mewa bridges with C/C++ in 2 ways,&lt;br /&gt;&lt;ol&gt;&lt;li&gt; Easy porting of Mewa scripts to C/C++ code, and vice versa.&lt;/li&gt;&lt;li&gt;Easy integration of C/C++ code as a linked library.&lt;br /&gt;&lt;/li&gt;&lt;/ol&gt;Lets have a look at some Mewa examples:&lt;br /&gt;&lt;/p&gt;&lt;table border="0" cellpadding="2" cellspacing="4" style="margin-left: auto; margin-right: auto;"&gt;&lt;tbody&gt;&lt;tr&gt;  &lt;td&gt;&lt;table border="0" cellpadding="0" cellspacing="0"&gt;&lt;tbody&gt;&lt;tr&gt;  &lt;td&gt;&lt;br /&gt;&lt;div style="background: none repeat scroll 0% 0% white; border: 0.1em solid gray; color: black; overflow: auto; padding: 0.2em 0.6em; width: auto;"&gt;&lt;pre style="line-height: 125%; margin: 0pt;"&gt;&lt;span style="color: navy; font-weight: bold;"&gt;if&lt;/span&gt;( accel &amp;gt; &lt;span style="color: blue;"&gt;0&lt;/span&gt; )&lt;br /&gt;{&lt;br /&gt;  velocity *= accel;&lt;br /&gt;}&lt;br /&gt;&lt;span style="color: navy; font-weight: bold;"&gt;else&lt;/span&gt;&lt;br /&gt;{&lt;br /&gt;  velocity = &lt;span style="color: blue;"&gt;0&lt;/span&gt;;&lt;br /&gt;}&lt;br /&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/td&gt; &lt;/tr&gt;&lt;tr&gt;  &lt;td style="text-align: center;"&gt;Mewa conditional if&lt;/td&gt; &lt;/tr&gt;&lt;/tbody&gt; &lt;/table&gt;&lt;/td&gt;  &lt;td&gt;&lt;br /&gt;&lt;table border="0" cellpadding="0" cellspacing="0"&gt;&lt;tbody&gt;&lt;tr&gt;  &lt;td&gt;&lt;br /&gt;&lt;div style="background: none repeat scroll 0% 0% white; border: 0.1em solid gray; color: black; overflow: auto; padding: 0.2em 0.6em; width: auto;"&gt;&lt;pre style="line-height: 125%; margin: 0pt;"&gt;&lt;span style="color: navy; font-weight: bold;"&gt;for&lt;/span&gt;( i = &lt;span style="color: blue;"&gt;0&lt;/span&gt;; i&amp;lt;=&lt;span style="color: blue;"&gt;3&lt;/span&gt;; i++ )&lt;br /&gt;{&lt;br /&gt;  data(i) = &lt;span style="color: blue;"&gt;0&lt;/span&gt;;&lt;br /&gt;}&lt;br /&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/td&gt; &lt;/tr&gt;&lt;tr&gt; &lt;td style="text-align: center;"&gt;Mewa loop&lt;/td&gt;  &lt;/tr&gt;&lt;/tbody&gt;  &lt;/table&gt;&lt;/td&gt;  &lt;/tr&gt;&lt;/tbody&gt; &lt;/table&gt;&lt;/p&gt;From the snippets above we can see that Mewa has a very similar syntax to C/C++. Note that Mewa is not a C++ interpreter, Mewa is a dynamic programming language. The aim of Mewa programming language is to increase development speed by exploring the advantages offered by dynamic programming and, at the same time, achieve the performance offered by compiled languages.&lt;br /&gt;&lt;br /&gt;Lets compare side by side 2 examples, the first written in C++ and the second written in Mewa. Both examples implement a min function, that returns the minimum of 2 values and print the result.&lt;br /&gt;&lt;/p&gt;&lt;table border="0" cellpadding="0" cellspacing="4" style="margin-left: auto; margin-right: auto;"&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td&gt;&lt;table border="0" cellpadding="0" cellspacing="0"&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td&gt;&lt;div style="background: none repeat scroll 0% 0% white; border: 0.1em solid gray; color: black; overflow: auto; padding: 0.2em 0.6em; width: auto;"&gt;&lt;pre style="line-height: 125%; margin: 0pt;"&gt;&lt;span style="color: teal;"&gt;#include &amp;lt;iostream&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: navy; font-weight: bold;"&gt;using&lt;/span&gt; &lt;span style="color: navy; font-weight: bold;"&gt;namespace&lt;/span&gt; std;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: navy; font-weight: bold;"&gt;int&lt;/span&gt; min (&lt;span style="color: navy; font-weight: bold;"&gt;int&lt;/span&gt; a, &lt;span style="color: navy; font-weight: bold;"&gt;int&lt;/span&gt; b)&lt;br /&gt;{&lt;br /&gt;&lt;span style="color: navy; font-weight: bold;"&gt;  if&lt;/span&gt;( a &amp;lt; b )&lt;br /&gt;&lt;span style="color: navy; font-weight: bold;"&gt;    return&lt;/span&gt; a;&lt;br /&gt;&lt;span style="color: navy; font-weight: bold;"&gt;  else&lt;/span&gt;&lt;br /&gt;&lt;span style="color: navy; font-weight: bold;"&gt;    return&lt;/span&gt; b;&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;&lt;span style="color: navy; font-weight: bold;"&gt;int&lt;/span&gt; main ()&lt;br /&gt;{&lt;br /&gt;&lt;span style="color: navy; font-weight: bold;"&gt;  int&lt;/span&gt; z;&lt;br /&gt;  z = min(&lt;span style="color: blue;"&gt;5&lt;/span&gt;,&lt;span style="color: blue;"&gt;3&lt;/span&gt;);&lt;br /&gt;  cout &amp;lt;&amp;lt; &lt;span style="color: blue;"&gt;"min is "&lt;/span&gt; &amp;lt;&amp;lt; z;&lt;br /&gt;&lt;span style="color: navy; font-weight: bold;"&gt;  return&lt;/span&gt; &lt;span style="color: blue;"&gt;0&lt;/span&gt;;&lt;br /&gt;}&lt;br /&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td style="text-align: center;"&gt;C++ example&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/td&gt;&lt;td&gt;&lt;br /&gt;&lt;table border="0" cellpadding="0" cellspacing="0"&gt;&lt;tbody&gt;&lt;tr&gt;  &lt;td&gt;&lt;div style="background: none repeat scroll 0% 0% white; border: 0.1em solid gray; color: black; overflow: auto; padding: 0.2em 0.6em; width: auto;"&gt;&lt;pre style="line-height: 125%; margin: 0pt;"&gt;&lt;span style="color: navy; font-weight: bold;"&gt;function&lt;/span&gt; min( a, b )&lt;br /&gt;{&lt;br /&gt;  &lt;span style="color: navy; font-weight: bold;"&gt;if&lt;/span&gt;( a &amp;lt; b )&lt;br /&gt;    &lt;span style="color: navy; font-weight: bold;"&gt;return&lt;/span&gt; a;&lt;br /&gt;  &lt;span style="color: navy; font-weight: bold;"&gt;else&lt;/span&gt;&lt;br /&gt;    &lt;span style="color: navy; font-weight: bold;"&gt;return&lt;/span&gt; b;&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;z = min(&lt;span style="color: blue;"&gt;5&lt;/span&gt;,&lt;span style="color: blue;"&gt;3&lt;/span&gt;);&lt;br /&gt;cout &amp;lt;&amp;lt; &lt;span style="color: blue;"&gt;"min is "&lt;/span&gt; &amp;lt;&amp;lt; z;&lt;br /&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td style="text-align: center;"&gt;Mewa example&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/p&gt;Mewa functions start with the keyword &lt;span class="style3"&gt;function&lt;/span&gt; followed by the name of the function and its arguments, passed by copy. Note that the Mewa example of the min function accepts any data types (integers, floats, etc).&lt;br /&gt;&lt;br /&gt;Comparing the above snapshots we can observe that,&lt;br /&gt;&lt;ul&gt;&lt;li&gt; Mewa reduces the amount of typing when compared to C++;&lt;/li&gt;&lt;li&gt; There are no forward declarations and no header files; everything is declared exactly once;&lt;/li&gt;&lt;li&gt; Initialization is expressive, automatic, and easy to use, to initialize a string just type (str="my string";)&lt;/li&gt;&lt;li&gt; Syntax is clean and light on keywords;&lt;/li&gt;&lt;/ul&gt;These simplifications are not only beneficial for Mewa developers, a simpler syntax means that the script engine can run faster when compared to interpreting a low level programming language.&lt;br /&gt;&lt;br /&gt;Mewa is very versatil, although functions do not need to declare its input argument data types, Mewa offers the option to declare them. Below we have an example,&lt;br /&gt;&lt;/p&gt;&lt;table border="0" cellpadding="0" cellspacing="0" style="margin-left: auto; margin-right: auto;"&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td&gt;&lt;br /&gt;&lt;div style="background: none repeat scroll 0% 0% white; border: 0.1em solid gray; color: black; overflow: auto; padding: 0.2em 0.6em; width: auto;"&gt;&lt;pre style="line-height: 125%; margin: 0pt;"&gt;&lt;span style="color: navy; font-weight: bold;"&gt;function&lt;/span&gt; min(&lt;span style="background-color: #f9cb9c;"&gt; Int32 a, Int32 b &lt;/span&gt;)&lt;br /&gt;{&lt;br /&gt;  &lt;span style="color: navy; font-weight: bold;"&gt;if&lt;/span&gt;( a &amp;lt; b )&lt;br /&gt;    &lt;span style="color: navy; font-weight: bold;"&gt;return&lt;/span&gt; a;&lt;br /&gt;  &lt;span style="color: navy; font-weight: bold;"&gt;else&lt;/span&gt;&lt;br /&gt;    &lt;span style="color: navy; font-weight: bold;"&gt;return&lt;/span&gt; b;&lt;br /&gt;}&lt;br /&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td style="text-align: center;"&gt;Mewa function with declared input data types&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt; &lt;/table&gt;&lt;/p&gt;By allowing functions to declare the data type of its input arguments we are bringing a feature that is not commonly found in scripting languages but is widely used by C++ and Java, its called &lt;i&gt;function overloading&lt;/i&gt;.&lt;br /&gt;&lt;/p&gt;&lt;table border="0" cellpadding="0" cellspacing="0" style="margin-left: auto; margin-right: auto;"&gt;&lt;tbody&gt;&lt;tr&gt;  &lt;td&gt;&lt;br /&gt;&lt;div style="background: none repeat scroll 0% 0% white; border: 0.1em solid gray; color: black; overflow: auto; padding: 0.2em 0.6em; width: auto;"&gt;&lt;pre style="line-height: 125%; margin: 0pt;"&gt;&lt;span style="color: navy; font-weight: bold;"&gt;function&lt;/span&gt; print( Int32 i )&lt;br /&gt;{&lt;br /&gt;  cout &amp;lt;&amp;lt; &lt;span style="color: blue;"&gt;"Here is a Int "&lt;/span&gt; &amp;lt;&amp;lt; i ;&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;&lt;span style="color: navy; font-weight: bold;"&gt;function&lt;/span&gt; print( Char c )&lt;br /&gt;{&lt;br /&gt;  cout &amp;lt;&amp;lt; &lt;span style="color: blue;"&gt;"Here is a Char "&lt;/span&gt; &amp;lt;&amp;lt; c ;&lt;br /&gt;}&lt;br /&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/td&gt;  &lt;/tr&gt;&lt;tr&gt;  &lt;td style="text-align: center;"&gt;Example of function overloading&lt;br /&gt;&lt;br /&gt;&lt;/td&gt;  &lt;/tr&gt;&lt;/tbody&gt; &lt;/table&gt;&lt;/p&gt;Another feature borrowed from C++ and Java is default values in parameters.&lt;br /&gt;&lt;/p&gt;&lt;table border="0" cellpadding="0" cellspacing="0" style="margin-left: auto; margin-right: auto;"&gt;&lt;tbody&gt;&lt;tr&gt;  &lt;td&gt;&lt;br /&gt;&lt;div style="background: none repeat scroll 0% 0% white; border: 0.1em solid gray; color: black; overflow: auto; padding: 0.2em 0.6em; width: auto;"&gt;&lt;pre style="line-height: 125%; margin: 0pt;"&gt;&lt;span style="color: navy; font-weight: bold;"&gt;function&lt;/span&gt; divide( a, b = &lt;span style="color: blue;"&gt;2&lt;/span&gt; )&lt;br /&gt;{&lt;br /&gt;  r=a/b;&lt;br /&gt;  &lt;span style="color: navy; font-weight: bold;"&gt;return&lt;/span&gt; r;&lt;br /&gt;}&lt;br /&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/td&gt; &lt;/tr&gt;&lt;tr&gt;  &lt;td style="text-align: center;"&gt;Default values in parameters&lt;br /&gt;&lt;br /&gt;&lt;/td&gt;  &lt;/tr&gt;&lt;/tbody&gt; &lt;/table&gt;&lt;/p&gt;&lt;br /&gt;Till now we have seen functions passing argments  by copy, this means that the arguments a and b are copies and can be modified inside the function without affecting any variable outside the function. Like C++, Mewa also allows to pass arguments to functions by reference. This is a practical feature that allows, inside functions, to modify variables send as arguments.&lt;br /&gt;&lt;br /&gt;To pass an argument by reference we use an &amp;amp; (ampersand) before the input argument name, as shown below&lt;br /&gt;&lt;table border="0" cellpadding="0" cellspacing="0" style="margin-left: auto; margin-right: auto;"&gt;&lt;tbody&gt;&lt;tr&gt;  &lt;td&gt;&lt;br /&gt;&lt;div style="background: none repeat scroll 0% 0% white; border: 0.1em solid gray; color: black; overflow: auto; padding: 0.2em 0.6em; width: auto;"&gt;&lt;pre style="line-height: 125%; margin: 0pt;"&gt;&lt;span style="color: navy; font-weight: bold;"&gt;function&lt;/span&gt; swap( &amp;amp;a, &amp;amp;b )&lt;br /&gt;{&lt;br /&gt;  tmp = b;&lt;br /&gt;  b = a;&lt;br /&gt;  a = tmp;&lt;br /&gt;}&lt;br /&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/td&gt; &lt;/tr&gt;&lt;tr&gt;&lt;td style="text-align: center;"&gt;Mewa function passing arguments by reference&lt;/td&gt; &lt;/tr&gt;&lt;/tbody&gt; &lt;/table&gt;&lt;/p&gt;The uniqueness of Mewa is not only about being similar to C/C++, Mewa stem from the desire to create a modern programming language that embraces state of the art concepts and technologies like "prototypal inheritance", multi-threading and garbage collector.&lt;br /&gt;&lt;br /&gt;Mewa scripting was designed from ground up to take advantage of dynamic programming, and at the same time, provide a very similar syntax compared to C/C++/Java, to save developers from learning a new programming language and make Mewa script code easily portable to C/C++/Java. The diferences between compiled languages and Mewa start appearing when we create classes, and that's what I will talk about in a future post.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2135090633764580433-4950861915756989612?l=mewaide.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://mewaide.blogspot.com/feeds/4950861915756989612/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://mewaide.blogspot.com/2010/03/mewa-another-programming-language.html#comment-form' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2135090633764580433/posts/default/4950861915756989612'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2135090633764580433/posts/default/4950861915756989612'/><link rel='alternate' type='text/html' href='http://mewaide.blogspot.com/2010/03/mewa-another-programming-language.html' title='Mewa, another programming language?'/><author><name>Hugo Silva</name><uri>http://www.blogger.com/profile/14661862973876739261</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>2</thr:total></entry></feed>
