DART on Googlen avoimen lähdekoodin ohjelmointikieli, joka toimii verkkosivuilla ja servereissä, ja jolla voi JavaScriptiä paremmin hoitaa suurten verkkosovellusten koodaamisen. DART kielen kehitys aloitettiin 9/2011 ja 1.0-versio kielestä julkistettiin loppuvuodesta -2013. Nyt jo on olemassa lähes valmiit työkalut Chrome selainta varten. Blogger-blogien pitäjiä varten saamme ehkä kiintoisia Gadgetteja sivupalkkeihin ja muuta toiminnallisuutta verkkosivuille.
TÄMÄ blogi sisältää pääosin omia pohdintojani ja muistiinpanoja, eikä se varmaankaan tuo kovinkaan paljon uutta DART-kielen opiskeluun. Materiaali on pääosin KOPIOITU :( Dartlang-sivustoilta, josta kannattaa KÄYDÄ TARKISTAMASSA kielen viimeiset syntaksit.
Näytetään tekstit, joissa on tunniste DartLang. Näytä kaikki tekstit
Näytetään tekstit, joissa on tunniste DartLang. Näytä kaikki tekstit

torstai 12. syyskuuta 2013

My Starred Items in Dartlang Issues


ID Type Status Priority Area Milestone Owner Summary AllLabels

88 Enhancement Accepted Medium Language Later gbra...google.com Enhancement: Enum Area-Language, Milestone-Later, Priority-Medium, Type-Enhancement

983 Enhancement Triaged Medium Language Add a Python-like slice operator for lists and strings Area-Language, Priority-Medium, Type-Enhancement

3755 Enhancement Accepted Medium Language Later gbra..google.com Feature request: support for nested classes. Area-Language, Milestone-Later, Priority-Medium, Type-Enhancement

3888 Enhancement Accepted Medium Language Later gbra..google.com Enhancement: Allow extending num, String etc. Area-Language, Milestone-Later, Priority-Medium, Type-Enhancement

4253 Enhancement Accepted Medium Language Later gbra.google.com Class private fields and methods Area-Language, Milestone-Later, Priority-Medium, Type-Enhancement

5381 Enhancement Accepted Medium Language Python-style function decorators Area-Language, Priority-Medium, Type-Enhancement

5675 Defect Triaged Medium Language gbra.google.com Loop variables cannot be const Area-Language, Priority-Medium, Type-Defect

5680 Enhancement Accepted Medium Language gbra..google.com Remove the 'new' keyword for invoking constructors Area-Language, Priority-Medium, Type-Enhancement

5741 Enhancement Accepted Medium Language gbra.google.com Expand do/while loops to allow bodies both before and after the test. Area-Language, Priority-Medium, Type-Enhancement

5750 Enhancement Accepted Medium Editor M7 pqui  google.com Plugin Dartium Provisioning to add Dartium to Eclipse plug-in. Area-Editor, Editor-Plugin, Milestone-M7, Plugin, Priority-Medium, Type-Enhancement

6943 Defect Accepted Medium Language gbra..google.com Support environment-specific libraries Area-Language, Priority-Medium, Type-Defect

7002 Defect Triaged Medium Language syntax support for Stream programming Area-Language, Priority-Medium, Type-Defect

7023 Enhancement Triaged Medium Language Add "Spread operator" Area-Language, Priority-Medium, Type-Enhancement

7780 Defect Accepted Medium Language Extending or implementing Function should be legal Area-Language, C1, Priority-Medium, Type-Defect

9448 Defect Triaged Medium Editor Later pqui   google.com No automatic update Area-Editor, Milestone-Later, Priority-Medium, Type-Defect

9991 Enhancement Accepted Medium Language gbra..google.com scoped object extensions Area-Language, C1, Priority-Medium, Type-Enhancement

10374 Defect Triaged Medium Language introduce struct (lightweight class) Area-Language, Priority-Medium, Type-Defect

10422 Defect Triaged Medium Language Add Option type to Dart Area-Language, Priority-Medium, Type-Defect

10667 Enhancement Triaged Medium Language Make classes first-class citizens Area-Language, Priority-Medium, Type-Enhancement

10715 Defect Accepted Medium Pub rny   google.com pub install not working on win 7 64 bit Area-Pub, Priority-Medium, Type-Defect

10751 Enhancement Triaged Medium Language Language Feature Request: extend cascade operator to declarations Area-Language, Priority-Medium, Type-Enhancement

10953 Defect Triaged Medium Editor M7 pquits...google.com [eclipse plugin] pub non executable after update Area-Editor, Milestone-M7, Priority-Medium, Type-Defect

11130 Defect Accepted Unassigned Language gbr   google.com Consider addig typecase Area-Language, Priority-Unassigned, Type-Defect

11715 Defect Triaged Unassigned Language Allow multidimensional arrays in Dart Area-Language, Priority-Unassigned, Type-Defect

11923 Defect Triaged Unassigned Language class literals should allow generics Area-Language, Priority-Unassigned, Type-Defect

11975 Enhancement Triaged Medium Language kaspe  google.com Part directive confusion Area-Language, Priority-Medium, Type-Enhancement

12460 Enhancement Accepted Unassigned Language gbra...google.com support private _main in Dart? Area-Language, Priority-Unassigned, Type-Enhancement

12606 Enhancement Accepted Unassigned Language gbra...google.com Support understands() method/construct on objects Area-Language, C1, Priority-Unassigned, Type-Enhancement

12697 Defect Triaged Unassigned Language Provide better, shorter syntax for simple loops Area-Language, Priority-Unassigned, Type-Defect

13261 Defect New Unassigned Add extendable map class Priority-Unassigned, Type-Defect  

OU!  Looks a little messy.. maybe I must try to improve this....




tiistai 2. huhtikuuta 2013

What do I hope Dartlang to catch before 1.0 release?

Googles new Web-programming language, Dart, will soon be in it's  1.0 state.. maybe at the end of year 2013.
When i think especially new programmers, what are the language & tools, that's still missing?
What do I hope, that there will be, in 1.0 release?

      Dart team is making great work, but still there is many things to wait for:

1.  Small, simple example-programs for beginners & newcomers. Plenty of them. Examples are now much too complicated for beginners.  Like: templates, in Eclipse.

2.  Smart wizard for helping in simple & elementary syntax proglems, for people, who are first time using Dart.  Or who are first time using any programmin language.

3.  Editor; keep it simple :)   .Maybe little task / note / planning system... & MyOwnCheatSheet.
     Plugin to Eclipse works fine, when someone wants more complicated system!

4.  DTM-Dart,  Easy, simple & short Dart Tips for Mobile phone readers.

5.  DartLang calendar for to mark events, broadcasts, hangouts..to collect people together.
     This is just for fun & decoration...  Helping newcomers in quick beginning.

6.  Solving (installation) problems for Windows users, Java-plugin (?!) firewalls & so.
      I wonder if other Windows user are experiencing difficulties to start DartEditor..

7.  How-To-Use extensions for Pub-packages.  so. cover round the libraries, desktop.
     I have the package, but what do I do with it?

8.  It's spring, & summer is coming, people are moving, want to listen DartLang!  
     Need podcasts to mobile phone...  I'm working in garden & want to learn.

9. Android-App to track DartLang growing, numbers in Stack, g+, git..  how many people are involved in learning dartlang...   Nice steady growing graphics.

10.  Android-app to follow dartlang discussion in mobile phone. Or is it just my old mobile, where I can not follow it?

11.  In Dart Api:s possiblility to mark, classify, keep unread classes / pages.  Possibility to Read-Next, Read-Previous...    Now reading exp.  dart:collection is quite hard. What there is important for me?

12.  DartLang for children.  Whit new language should be also new ways to learn.  There is no reason why children in 8 or 10 years old, should not be learning programming.  Exept their envious olders.

13.  Programming should be an other language for all of us.


And language itself...  i hope better connections to databases...

not ready... quick writing...     will continue editing..
.

perjantai 15. maaliskuuta 2013

About Dart functions and Closures, Dart funktiot ja sulkemiset

Understanding Closures.. hard..  and Functions. (spec: Functions abstract over executable actions)

This conversation is from:
https://groups.google.com/a/dartlang.org/forum/?fromgroups=#!topic/misc/NOuoGrxW2nE

https://groups.google.com/a/dartlang.org/d/msg/misc/NOuoGrxW2nE/DHTVT-_qq40J
Direct link to just this piece of conversation..  Great!!

Alex Tatumizer   Mar 14 (16 hours ago)

@Ladislav:
Somehow, I overlooked the fact that whatever is called Function in dart in fact doesn't correspond to javascript notion of Function - it's really a closure, e.g.
  Function f="abcd".substring;
  print(f(0,2));

This is a great feature, so I withdraw my sarcasm. I thought dart makes distinction between Function (as pointer to function "codes") and Closure, but it probably doesn't.
Won't it be better to call it Closure, not Function then, to avoid confusion?



Ladislav Thon asvered:  

Function is just something that can be called. Even this, I believe:

class Answer {
  call() => 42;
}

main() {
  var a = new Answer();
  print(a());
  print(a is Function);
}

Some Functions are in fact closures, meaning that they carry their lexical environment, but not all of them. I'm not sure about renaming Function to Closure, I think it would make some situations more clear and some less.

Tatumizer ansvered:

Probably you are right, but then things get a bit confusing indeed for anyone coming from javascript (huge army of potential dart users).
Look at "Tour of the dart language" - they are talking about functions AND closures, without elaborating on subtleties - but this are very important subtleties, deserved to be featured much more prominently.
 Needs to be better documented maybe?  

Check link for more conversation...



And next theme:         Orthogonal  Wikipedia:  

Computer science

Orthogonality in programming language design is the ability to use various language features in arbitrary combinations with consistent results.[9] This usage was introduced by von Wijngaarten in the design of Algol 68:


The number of independent primitive concepts has been minimized in order that the language be easy to describe, to learn, and to implement. On the other hand, these concepts have been applied “orthogonally” in order to maximize the expressive power of the language while trying to avoid deleterious superfluities.[10]

Orthogonality is a system design property which guarantees that modifying the technical effect produced by a component of a system neither creates nor propagates side effects to other components of the system. Typically this is achieved through the separation of concerns and encapsulation, and it is essential for feasible and compact designs of complex systems. The emergent behavior of a system consisting of components should be controlled strictly by formal definitions of its logic and not by side effects resulting from poor integration, i.e. nonorthogonal design of modules and interfaces. Orthogonality reduces testing and development time because it is easier to verify designs that neither cause side effects nor depend on them.

An instruction set is said to be orthogonal if it lacks redundancy (i.e. there is only a single instruction that can be used to accomplish a given task)[11] and is designed such that instructions can use any register in any addressing mode. This terminology results from considering an instruction as a vector whose components are the instruction fields. One field identifies the registers to be operated upon, and another specifies the addressing mode. An orthogonal instruction setuniquely encodes all combinations of registers and addressing modes.[citatio

torstai 29. marraskuuta 2012

Dart suomeksi. Dart:in suomentaminen. DartLang Tour suomeksi.


DartLang Tour käännettynä suomeksi.

Chapter 2. A Tour of the Dart Language:    Suomeksi, suomennettuna..      


Olen kääntämässä (vastoin parempaa tietoani) DartLang Tour-tiedostoa suomeksi. 
Alkuperäinen engl. tiedosto on tässä:  


Keskeneräinen käännöstyöni, joka alkaa olla valmis, löytyy tästä linkistä: 



Ohjelmoijat eivät tarvitse käännöstä suomeksi.  Ne, jotka aikovat ohjelmoijiksi, kyllä opettelevat englantia. Tämä on siis vain satunnaisia ohikulkijoita varten. Ja heille, jotka ovat vasta alkamassa opiskelua.


Programmers don’t need translation from english, they can read, and think on it.
Those who want to be programmers should quickly learn english and use it.
So this is for casual bywalkers..


keskiviikko 20. kesäkuuta 2012

Kuinka seuraan Googlen uuden, verkossa toimivan DART-ohjelmointikielen syntyä ja kehitystä.

Uuden ohjelmointikielen synty on harvinainen tapahtuma.  Vielä harvinaisempaa on, että osuu paikalle kielen syntyhetkellä, ja saa tilaisuuden seurata kielen kehittymistä alusta alkaen.

Sattumalta ajoitin paluuni ohjelmoinnin pariin juuri DART-kielen ensimmäisen julkistamisen hetkelle,  syksyllä 2011.  Päätin oitis, että seuraan tiiviisti sen kehitysprosessin kaikkia vaiheita, jotta näen, että kuinka tämä homma oikein tehdään, miten eri työkalut kehittyvät ja muutenkin vahvistan omaa osaamistani ohjelmoinnin alueella. 
     Urakka taitaa olla suurempi, kuin ensin ajattelin, ja se häiritsee ehkä varsinaista DART-kielen opiskeluani.  Tähän liittyvien sivujen lukeminen ei ole välttämätöntä varsinaiselle DART-kielen opiskelulle.

Mutta jos olet Ihan Oikea Nörtti, niin tässä aiheeseen liittyvät linkit:

Näistä voi tilata RSS syötteet, jos TODELLA haluaa seurata aihetta  :)
Bugilistat / Issues.    http://code.google.com/p/dart/issues/list
Bugit, joita haluaa seurata, voi tähdittää, jolloin muutoksista voi ilmoittaa.

Committed Changes
http://code.google.com/p/dart/source/list


General Dart Discussion  DART keskustelu kielen syntaksista, ongelmista ja käytöstä: 
https://groups.google.com/a/dartlang.org/group/misc/topics

Tähän ryhmään kannattaa liittyä, jolloin saa keskustelut sähköpostiin n. 25 ryhmissä.
Kiintoisat keskustelunaiheet voi tähdittää.  Ryhmää voi lukea liittymättä siihen.



Tavalliselle kielen opiskelijalla sopii paremmin:

DartLang    http://www.dartlang.org/
ja uutiset:   http://news.dartlang.org/

Aloittelijalle sopivin sivu opiskeltavaksi on luultavasti:
http://www.dartlang.org/docs/language-tour/

Ja Blogi http://c.dart-examples.com/home   on hyvin havainnollinen, ja sen kautta on myös mahdollisuus suorittaa kielen koodi klikkaamalla TRY-Dartlang-sivustolla.
http://try.dartlang.org/
= Käynnistyskuvake Try-Dartlang-sivuston vasemmassa yläkulmassa.

Oma artikkelini aiheesta tässä blogissa...
http://etdart.blogspot.fi/2012/06/kuinka-opiskelen-googlen-uutta-verkossa.html

Päivitän tätä artikkelia vielä tarpeen mukaan. 
.

lauantai 5. toukokuuta 2012

SQL tietokantojen käyttö DART ohjelmointi kielessä

Koska on mahdollista käyttää SQL tietokantoja DART ohjelmoinnissa?
Jokaisen ohjelmointikielen ei tarvitse ohjelmoida KAIKKEA.  Lienee luontevaa, että käytetään ulkoisia palikoita, esim. SQL-tietokantoja, HTML-kielen lomakkeita yms.  Tällöin käyttäjien ei tarvitse opetella uutta syntaxia.  DART-kielessä, joka on vasta syntymässä, nämä rakenteet eivät tietenkään vielä nyt, toukokuun alussa 2012, ole valmiina.

https://groups.google.com/a/dartlang.org/group/misc/browse_thread/thread/8dbfee57129de3ac/3c456d5f3b93141e?lnk=raot
"When will be possible for using sql databases from Dart. Is there any 
work (or plan) related to this subject in dart team. " 




https://bitbucket.org/vadimtsushko/mongo-dart    Mongolib.  
" I just wanted to hack together something just to see if I 
could even log into a mysql server from dart.  "

http://api.dartlang.org/html/SQLTransaction.html   And here they are, some API:s...  

MySQL Connector for Dart   


And who have done some nice blog text in this subject....   lets look it next....  
Some programmes surely have written somethin about this...
 For me this so important a question, that I must put this to my blog right away.  

To be continued.... 

perjantai 20. huhtikuuta 2012

Pohtimassa <> merkkien käyttöä, T, E , DART:issa

Lisäksi DART kielessä on näitä <T>   <E>  ilmaisuja.  Muiden sulkumerkkien jälkeen ne pysähdyttävät hieman miettimään...    Miksi juuri  T   ja  E  ?
(K,V)  Tarkoittaa siis Key ja Value,  sehän on selvää.
Kokoan leikkeitä ohjeista:

http://www.dartlang.org/language-tour/#generics

Generics

If you look at the API documentation for the basic array type, List, you'll see that the type is actuallyList<E>. The <...> notation marks List as a generic (or parameterized) type—a type that can declare formal type parameters.
For example, if you intend for a list to contain only strings, you can declare it as List<String> (read that as "List of String"). 
....
Generic types can save you the trouble of creating all these interfaces. Instead, you can create a single interface that takes a type parameter:
interface Cache<T> {
  T getByKey(String key);
  setByKey(String key, T value);
}
In this code, T is the stand-in type. It's a placeholder that you can think of as a type that a developer will define later.

Using collection literals

Both built-in collection types are parameterized: lists and maps. Parameterized literals are just like the literals you've already seen, except that you add <type> before the opening bracket. For example:
List<String> names = <String>['Seth', 'Kathy', 'Lars'];
Map<String, String> pages = <String>{ // specify value type: String
    'index.html':'Homepage',  // (the key type is implicitly String)
    'robots.txt':'Hints for web robots',
    'humans.txt':'We are people, not machines' };


NO?  Näyttää siltä siis, että <> merkinnän sisällä on "tyyppi"...
..
To specify one or more types when using a constructor, put the types in angle brackets (<...>
..

Generic collections and the types they contain

Dart generic types are reified, which is a fancy way of saying that they carry their type information around at runtime. 
= = = = = = = = = = = = = = = = = = = = = = = = = 



SIIS:  E   T   K   V 
What is this T  in <T>  ?

Interface Future<T>

Future is used to obtain a value sometime in the future. Receivers of a Future obtain the value by passing a callback to then

========================================================

What is this   E   in <E>  ?  

===========================================

Typedefs can be parameterized.
typedef int Compare<T>(T a, T b);

class SortedCollection<T> {
  Compare<T> compare;
  SortedCollection(this.compare);
}

main() {
  SortedCollection<int> s = new SortedCollection<int>((a,b) => a - b);
  print(s.compare is Compare<int>);  // true
  print(s.compare('a','b'));  // checked mode throws exception
}
dartlang  0.08

typeParameter:
identifier (extends type)?
;
typeParameters:
`<' typeParameter (`,' typeParameter)* `>'
;
A type parameter T may be suffixed with an extends clause that specifies
the upper bound for T.

A type parameter T may be suffixed with an extends clause that specifies
the upper bound for T.   ....

Tässäpä hieman sulattelemista...    Täydennän tekstiä vielä...  


http://c.dart-examples.com/learn/variables/collections
Tämä kirjoitus tuo hieman lisävalaistusta asiaan...

.

tiistai 27. maaliskuuta 2012

Overloading, mitä se tarkoittaa, DART ym. kielet

Like most dynamically-typed languages, Dart doesn't support overloading....

http://japhr.blogspot.com/2012/02/overloading-dart-operators-for-great.html
Overloading Dart Operators for Great Evil

http://en.wikipedia.org/wiki/Overloading

Constructor and function/method overloading, in computer science, a type of polymorphism where different functions with the same name are invoked based on the data types of the parameters passed
Operator overloading, a form of functional or method overloading where the action being overloaded is an operator, such as + or -

http://www.parashift.com/c++-faq-lite/operator-overloading.html

It allows you to provide an intuitive interface to users of your class, plus makes it possible for templates to work equally well with classes and built-in/intrinsic types.
Operator overloading allows C/C++ operators to have user-defined meanings on user-defined types (classes). Overloaded operators are syntactic sugar for function calls...



Ja tähän Dart-kielestä esimerkkejä...



Oct 30, 2011 ... I'm progamming complex object and I am a little dissapointed with some aspect like it haven't got Methods Overloading. I think here could be ...
https://groups.google.com/a/dartlang.org/.../c282bd61297ef727
LabeledDiscussions
Feb 12, 2012 ... Subject: Constructor overloading ... Why Dart doesn't allow to overloadconstructors. I have to define ... Subject: Re: Constructor overloading ...
https://groups.google.com/a/dartlang.org/.../2d74393610ed7fef
LabeledDiscussions
Feb 13, 2012 ... I have seen this in other languages as an overloading of the "Convert" operator. Is this possible in Dart? For example: class Material{ ... } ...
https://groups.google.com/a/dartlang.org/.../822fee56f2077512
LabeledDiscussions

http://www.dartlang.org/articles/idiomatic-dart/ 

Named constructors

Like most dynamically-typed languages, Dart doesn't support overloading. With methods, this isn't much of a limitation because you can always use a different name, but constructors aren't so lucky. To alleviate that, Dart lets you define named constructors:
class Point {
  num x, y;
  Point(this.x, this.y);
  Point.zero() : x = 0, y = 0;
  Point.polar(num theta, num radius) {
    x = Math.cos(theta) * radius;
    y = Math.sin(theta) * radius;
  }
}
Here our Point class has three constructors, a normal one and two named ones. You can use them like so:
var a = new Point(1, 2);
var b = new Point.zero();
var c = new Point.polar(Math.PI, 4.0);
Note that we're still using new here when we invoke the named constructor. It isn't just a static method.
.