cito-users Mailing List for Ć Translator
Status: Alpha
Brought to you by:
pfusik
You can subscribe to this list here.
| 2011 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
(1) |
Sep
|
Oct
|
Nov
|
Dec
|
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 2012 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
(2) |
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
| 2013 |
Jan
|
Feb
(1) |
Mar
|
Apr
(1) |
May
(1) |
Jun
(6) |
Jul
(2) |
Aug
(3) |
Sep
(4) |
Oct
|
Nov
|
Dec
|
| 2014 |
Jan
|
Feb
(6) |
Mar
|
Apr
|
May
(3) |
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
| 2015 |
Jan
(8) |
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
| 2016 |
Jan
|
Feb
|
Mar
(1) |
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
| 2019 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
(1) |
Dec
|
|
From: Piotr F. <pi...@fu...> - 2019-11-19 16:20:17
|
Hi, cito is now available at https://github.com/pfusik/cito It is a complete rewrite of cito version 0, which was just a prototype. There are many changes in the language, so please take a look at the language reference on GitHub. The language is not finished yet, but I expect many more additions than incompatible changes. It's much easier now to add a target language because of the test suite (currently 200+ tests). Let me know which language you are interested in. Would you like to contribute this backend? Do you have questions? Suggestions? --Piotr |
|
From: Raoul D. <ra...@gm...> - 2016-03-08 22:17:54
|
hi, To what degree is CI alive? E.g. last release was in 2013. thank you. |
|
From: P. F. <pi...@fu...> - 2015-01-20 15:34:41
|
Dnia 2015-01-19 13:46 Valen napisał(a): >Im thinking about to use C pre processor (with cito source files), to >define a macro for replacing a string >'FIXED' with sting 'int'. > >Maybe there are some better options ? Another option is sed. Worth trying unless you have string literals that contain "FIXED". :) Piotr |
|
From: Valen <val...@gm...> - 2015-01-19 12:45:59
|
On Mon, 12 Jan 2015 12:48:14 +0100 "Piotr Fusik" <pi...@fu...> wrote: > >In C: > >typedef int fixed; > > It's not supported. Hi, Im thinking about to use C pre processor (with cito source files), to define a macro for replacing a string 'FIXED' with sting 'int'. Maybe there are some better options ? --- Valen |
|
From: Valen <val...@gm...> - 2015-01-12 13:23:13
|
On Mon, 12 Jan 2015 12:48:14 +0100 "Piotr Fusik" <pi...@fu...> wrote: > You can only use a macro to define local variables: Thanks! --- Valen |
|
From: P. F. <pi...@fu...> - 2015-01-12 11:48:25
|
Hello,
>Im want to write 'fixed' instead of 'int', for some class fields.
>Is there a away to do so ?
>
>In C:
>typedef int fixed;
It's not supported.
You can only use a macro to define local variables:
public class Test
{
macro fixed(x) { int x; }
public static int Foo()
{
fixed(x);
fixed(y);
x = 1;
y = 2;
return x + y;
}
}
Piotr |
|
From: Valen <val...@gm...> - 2015-01-10 12:41:17
|
Hi, Im want to write 'fixed' instead of 'int', for some class fields. Is there a away to do so ? In C: typedef int fixed; Thanks, Valen |
|
From: Valen <val...@gm...> - 2015-01-10 11:26:59
|
On Fri, 9 Jan 2015 20:21:40 +0100 "Piotr Fusik" <pi...@fu...> wrote: I see. Thanks! > There are several problems with singletons. "Modern C++ Design" has a > whole chapter about singletons and yet it doesn't cover new > approaches such as Dependency Injection. > > If you really need a singleton, you can implement it in native code, > e.g. --- Valen |
|
From: Piotr F. <pi...@fu...> - 2015-01-09 19:21:47
|
Hello,
There are several problems with singletons. "Modern C++ Design" has a whole
chapter about singletons and yet it doesn't cover new approaches such as
Dependency Injection.
If you really need a singleton, you can implement it in native code, e.g.
static Foo GetInstance()
{
#if C
native {
...
}
#elif JAVA
native {
...
}
...
#endif
}
Hope that helps,
Piotr
-----Oryginalna wiadomość-----
From: Valen
Sent: Friday, January 09, 2015 1:46 PM
To: cit...@li...
Subject: [CI] Only one instance of class
Hi,
I want to create only one instance of my class
and i want methods of this instance, will be accessible from any line of
my code (without need to pass 'this' pointer).
So, the static methods are just fine for this.
But i cant share vars (fields) between this methods, because i cannot
declare 'static' for vars (fields).
How can i share vars, between some static methods ?
Thanks,
Valen
------------------------------------------------------------------------------
Dive into the World of Parallel Programming! The Go Parallel Website,
sponsored by Intel and developed in partnership with Slashdot Media, is your
hub for all things parallel software development, from weekly thought
leadership blogs to news, videos, case studies, tutorials and more. Take a
look and join the conversation now. http://goparallel.sourceforge.net
_______________________________________________
cito-users mailing list
cit...@li...
https://lists.sourceforge.net/lists/listinfo/cito-users
|
|
From: Valen <val...@gm...> - 2015-01-09 12:46:30
|
Hi, I want to create only one instance of my class and i want methods of this instance, will be accessible from any line of my code (without need to pass 'this' pointer). So, the static methods are just fine for this. But i cant share vars (fields) between this methods, because i cannot declare 'static' for vars (fields). How can i share vars, between some static methods ? Thanks, Valen |
|
From: Mihai D. <mih...@gm...> - 2014-05-18 23:07:32
|
How would one go about using floats? How about int16? virtual methods? On Sun, May 18, 2014 at 7:44 PM, Piotr Fusik <pi...@fu...> wrote: > Hello, > > You mean the release? > > It doesn't mean that this project is dead. > The current version works very well within its limits. Some minor bugs have > been fixed in Git. > > And there's too early for the next, more powerful version. > > Piotr > > ------------------------------------------------------------------------------ > "Accelerate Dev Cycles with Automated Cross-Browser Testing - For FREE > Instantly run your Selenium tests across 300+ browser/OS combos. > Get unparalleled scalability from the best Selenium testing platform > available > Simple to use. Nothing to install. Get started now for free." > http://p.sf.net/sfu/SauceLabs > _______________________________________________ > cito-users mailing list > cit...@li... > https://lists.sourceforge.net/lists/listinfo/cito-users > |
|
From: P. F. <pi...@fu...> - 2014-05-18 17:10:59
|
Hello, You mean the release? It doesn't mean that this project is dead. The current version works very well within its limits. Some minor bugs have been fixed in Git. And there's too early for the next, more powerful version. Piotr |
|
From: Mihai D. <mih...@gm...> - 2014-05-18 15:26:50
|
Happy anniversary? |
|
From: Valen <val...@gm...> - 2014-02-07 09:44:27
|
On Thu, 06 Feb 2014 16:06:57 +0100 "Piotr Fusik" <pi...@fu...> wrote: > Temporary workaround: The workaround seems reasonable, thanks ! --- Valen |
|
From: P. F. <pi...@fu...> - 2014-02-06 15:07:06
|
Hello,
Unfortunately not yet, but it's on my todo-list. The syntax will be C#-ish
(base.foo()).
Temporary workaround:
public class A
{
void fooA()
{
// do stuff
}
public virtual void foo()
{
fooA();
}
}
public class B : A
{
public override void foo()
{
fooA();
// do stuff
}
}
Piotr
Dnia 2014-02-06 15:12 Valen napisał(a):
>Hi!
>
>Another question...
>
>Is there a way to call a virtual func of base calss,
>from the overrided virtual func of a derived class ?
>
>
>public class A
>{
> public virtual void foo()
> {
>
> }
>}
>
>
>public class B : A
>{
> public override void foo()
> {
> // how to call A::foo() ?
> // from here
> }
>}
>
>
>
>
>Thanks,
>Valen
>
>---------------------------------------------------------------------------
---
>Managing the Performance of Cloud-Based Applications
>Take advantage of what the Cloud has to offer - Avoid Common Pitfalls.
>Read the Whitepaper.
>http://pubads.g.doubleclick.net/gampad/clk?id=121051231&iu=/4140/ostg.clktrk
>_______________________________________________
>cito-users mailing list
>cit...@li...
>https://lists.sourceforge.net/lists/listinfo/cito-users
>
|
|
From: Valen <val...@gm...> - 2014-02-06 14:17:55
|
On Thu, 06 Feb 2014 15:03:26 +0100 "Piotr Fusik" <pi...@fu...> wrote: Hi, Piotr! > The base class constructor is called automatically during derived > class construction. A-ha ! I see. Thanks for quick reply. --- Valen |
|
From: Valen <val...@gm...> - 2014-02-06 14:12:44
|
Hi!
Another question...
Is there a way to call a virtual func of base calss,
from the overrided virtual func of a derived class ?
public class A
{
public virtual void foo()
{
}
}
public class B : A
{
public override void foo()
{
// how to call A::foo() ?
// from here
}
}
Thanks,
Valen
|
|
From: P. F. <pi...@fu...> - 2014-02-06 14:03:34
|
Hello,
The base class constructor is called automatically during derived class
construction.
It is not possible to call it again.
Piotr
Dnia 2014-02-06 14:47 Valen napisał(a):
>Hi!
>
>Is there a way to call a constructor of base class,
>from the constructor of a derived class ?
>
>
>public class A
>{
> /// Constructor
> A()
> {
> // vars init for class A
> }
>}
>
>
>public class B : A
>{
>
> /// Constructor
> B()
> {
> // how to call A::A() ?
> // here
> }
>}
>
>
>Thanks,
>Valen
>
>---------------------------------------------------------------------------
---
>Managing the Performance of Cloud-Based Applications
>Take advantage of what the Cloud has to offer - Avoid Common Pitfalls.
>Read the Whitepaper.
>http://pubads.g.doubleclick.net/gampad/clk?id=121051231&iu=/4140/ostg.clktrk
>_______________________________________________
>cito-users mailing list
>cit...@li...
>https://lists.sourceforge.net/lists/listinfo/cito-users
>
|
|
From: Valen <val...@gm...> - 2014-02-06 13:47:12
|
Hi!
Is there a way to call a constructor of base class,
from the constructor of a derived class ?
public class A
{
/// Constructor
A()
{
// vars init for class A
}
}
public class B : A
{
/// Constructor
B()
{
// how to call A::A() ?
// here
}
}
Thanks,
Valen
|
|
From: Valen <val...@gm...> - 2013-09-19 11:14:34
|
On Thu, 12 Sep 2013 23:48:20 +0200 Piotr Fusik <pi...@fu...> wrote: > Yes, short type will be added at some point, Good news :) > However, I don't understand how it is going to help your Z80 project. I just want to use both 32-bit and 16-bit math in my cito project. > I suppose your C compiler has 16-bit ints, and if that's the case, > just use int, keeping in mind its limits. This is an option, but this will limit all my math to 16-bit. > If your C compiler uses > 32-bit int on Z80, it's going to be slow even if you use short > variables all over the place. If cito will translate a new 16-bit "short" type to "C short", then i can use _both_ types in cito files. (32-bit and/or 16-bit.) --- Valen |
|
From: Jakob E. <ja...@au...> - 2013-09-13 06:21:04
|
Yes, this is the way to go. However, the cito specification should maybe say that its int can be between 16 - 32 bits?
Piotr Fusik <pi...@fu...> skrev:
>Hello,
>
>Yes, short type will be added at some point, as well as float, double and maybe long (with limited support for JavaScript, as it has no standard 64-bit integers).
>
>However, I don't understand how it is going to help your Z80 project. I suppose your C compiler has 16-bit ints, and if that's the case, just use int, keeping in mind its limits. If your C compiler uses 32-bit int on Z80, it's going to be slow even if you use short variables all over the place. That's because standard C performs integer arithmetic after promoting operands to int.
>
>Piotr
>
>Użytkownik Valen <val...@gm...> napisał:
>
>>Hi,
>>I'm use cito to generate C code for z80 (small 8-bit CPU).
>>
>>Is it possible to add 16 bit math ("short" C type) to cito ?
>>For this CPU, the 16 bit math is much faster, than 32 bit math.
>>
>>---
>>Thanks,
>>Valen
>>
>>------------------------------------------------------------------------------
>>How ServiceNow helps IT people transform IT departments:
>>1. Consolidate legacy IT systems to a single system of record for IT
>>2. Standardize and globalize service processes across IT
>>3. Implement zero-touch automation to replace manual, redundant tasks
>>http://pubads.g.doubleclick.net/gampad/clk?id=51271111&iu=/4140/ostg.clktrk
>>_______________________________________________
>>cito-users mailing list
>>cit...@li...
>>https://lists.sourceforge.net/lists/listinfo/cito-users
>------------------------------------------------------------------------------
>How ServiceNow helps IT people transform IT departments:
>1. Consolidate legacy IT systems to a single system of record for IT
>2. Standardize and globalize service processes across IT
>3. Implement zero-touch automation to replace manual, redundant tasks
>http://pubads.g.doubleclick.net/gampad/clk?id=51271111&iu=/4140/ostg.clktrk
>_______________________________________________
>cito-users mailing list
>cit...@li...
>https://lists.sourceforge.net/lists/listinfo/cito-users
|
|
From: Piotr F. <pi...@fu...> - 2013-09-12 21:48:33
|
Hello,
Yes, short type will be added at some point, as well as float, double and maybe long (with limited support for JavaScript, as it has no standard 64-bit integers).
However, I don't understand how it is going to help your Z80 project. I suppose your C compiler has 16-bit ints, and if that's the case, just use int, keeping in mind its limits. If your C compiler uses 32-bit int on Z80, it's going to be slow even if you use short variables all over the place. That's because standard C performs integer arithmetic after promoting operands to int.
Piotr
Użytkownik Valen <val...@gm...> napisał:
>Hi,
>I'm use cito to generate C code for z80 (small 8-bit CPU).
>
>Is it possible to add 16 bit math ("short" C type) to cito ?
>For this CPU, the 16 bit math is much faster, than 32 bit math.
>
>---
>Thanks,
>Valen
>
>------------------------------------------------------------------------------
>How ServiceNow helps IT people transform IT departments:
>1. Consolidate legacy IT systems to a single system of record for IT
>2. Standardize and globalize service processes across IT
>3. Implement zero-touch automation to replace manual, redundant tasks
>http://pubads.g.doubleclick.net/gampad/clk?id=51271111&iu=/4140/ostg.clktrk
>_______________________________________________
>cito-users mailing list
>cit...@li...
>https://lists.sourceforge.net/lists/listinfo/cito-users
|
|
From: Valen <val...@gm...> - 2013-09-11 11:53:26
|
Hi,
I'm use cito to generate C code for z80 (small 8-bit CPU).
Is it possible to add 16 bit math ("short" C type) to cito ?
For this CPU, the 16 bit math is much faster, than 32 bit math.
---
Thanks,
Valen
|
|
From: Enrico <eir...@gm...> - 2013-08-05 07:55:07
|
Dear, > How does your Pascal target relate to Delphi? Pascal back-end generates object pascal code with the intention to be compatible with Delphi and FreePascal/Lazarus. Delphi is a little more restrictive respect to FreePascal and I've trouble to run the test as I have only licence of some versions (the latest that I've is XE2 where the newest is XE4). > I will gladly apply patches that provide PHP and Pascal targets. The code that I write up to now is here: http://sourceforge.net/p/eirocasoftware/code/230/tree/trunk/CSharp/Vario/Cito/ The integration is very easy, just make virtual all the methods in SourceGenerator.cs needed to compile. I'm still testing them, as: > You can also try this small project: https://github.com/pfusik/datamatrix-ci As evidenced two "know" problems, the for(;;) and the ternary operator ?: are a nightmare if are not supported by target language (and in pascal aren't). I'm working on patching, but a stable long term solution must involve some changes in Cito architecture (support a sort of two pass generation in order to be able to make some operation currently unfeasible - e.g. adding a new variable or a temporary function -). Let me know how to proceed to keep synced the changes (maybe a git fork is still a valid option). >> in order to avoid changes in AST data structures; >Do you mean a layer that implements OOP in non-OOP languages? As mentioned also some operators have the need to add some emulated logic, declaring a priori the variable needs logic too, ... my idea is to keep CiXXXXX classes related to AST clean form attribute valid only for some language and move them in the back-end generator. > Variables that only differ by case should be probably disallowed. I think is preferred to rename them on target language that does not support case sensitive (like was done with global constants), the question is that is "easy" to do in the parsing (where you have the variable scope) but tricky to do a posteriori. Ciao, Enrico 2013/8/3 Piotr Fusik <pi...@fu...> > Hello, > > I am interested in new Cito backends. I was planning to code myself > backends > for Perl 6, Python and Ruby. > > I will gladly apply patches that provide PHP and Pascal targets. Someone > asked me for the Delphi backend. How does your Pascal target relate to > Delphi? > > > all the Cito source that I was able to find (hello.ci, FAIL, ASAP) > > You can also try this small project: > https://github.com/pfusik/datamatrix-ci > > > - Multi step conversion in order to support declarative languages (C, > Pascal) > > in order to avoid changes in AST data structures; > > Do you mean a layer that implements OOP in non-OOP languages? > > > - support case insensitivity/reserved words; > > Renaming identifiers that are reserved in some languages should be done > generally. We already had this problem with "module" used in the ASAP > project while being a keyword in D. > Variables that only differ by case should be probably disallowed. > > > - introduce helpers like variable scope tracking, statement stack, ... > > (e.g. useful to guess the meaning of a break); > > Sounds good. > > > I have also a question about the roadmap, in particular there is a plan > to > support matrix and double? > > First I want to simplify extending the library. Then I'll work on floating > point types. > > Piotr > > ------------------------------------------------------------------------------ > Get your SQL database under version control now! > Version control is standard for application code, but databases havent > caught up. So what steps can you take to put your SQL databases under > version control? Why should you start doing it? Read more to find out. > http://pubads.g.doubleclick.net/gampad/clk?id=49501711&iu=/4140/ostg.clktrk > _______________________________________________ > cito-users mailing list > cit...@li... > https://lists.sourceforge.net/lists/listinfo/cito-users > |
|
From: P. F. <pi...@fu...> - 2013-08-03 10:11:18
|
Hello, I am interested in new Cito backends. I was planning to code myself backends for Perl 6, Python and Ruby. I will gladly apply patches that provide PHP and Pascal targets. Someone asked me for the Delphi backend. How does your Pascal target relate to Delphi? > all the Cito source that I was able to find (hello.ci, FAIL, ASAP) You can also try this small project: https://github.com/pfusik/datamatrix-ci > - Multi step conversion in order to support declarative languages (C, Pascal) > in order to avoid changes in AST data structures; Do you mean a layer that implements OOP in non-OOP languages? > - support case insensitivity/reserved words; Renaming identifiers that are reserved in some languages should be done generally. We already had this problem with "module" used in the ASAP project while being a keyword in D. Variables that only differ by case should be probably disallowed. > - introduce helpers like variable scope tracking, statement stack, ... > (e.g. useful to guess the meaning of a break); Sounds good. > I have also a question about the roadmap, in particular there is a plan to support matrix and double? First I want to simplify extending the library. Then I'll work on floating point types. Piotr |