# ETL replacement

**URL:** <https://forums.synfig.org/t/etl-replacement/3200>\
**Category:** Coding synfig\
**Created:** [December 8, 2014, 9:05pm UTC](https://forums.synfig.org/t/etl-replacement/3200 "2014-12-08T21:05:44Z")\
**Posts on this page:** 13\
**Page:** 1

<div class="post-metadata">

**Author:** ![eldruin](https://forums.synfig.org/user_avatar/forums.synfig.org/eldruin/32/58_2.png) [@eldruin](https://forums.synfig.org/u/eldruin)\
**Post date:** [December 8, 2014, 9:05pm UTC](https://forums.synfig.org/t/etl-replacement/3200/1 "2014-12-08T21:05:44Z")

</div>

Hi!  
I have some more free time nowadays after finishing my degree (yay).  
The ETL doesn’t look very nice to me. I think the implementation is very partial and looks to me more like a bunch of shared utilities, which don’t live up to the name “Extended Template Library”.  
At least the majority of the functionality is already implemented in the boost libraries, which have a very high quality, are broadly used, peer-reviewed and well tested.  
We are already dependent on the boost libraries so why not use them to a bigger extent and get rid of the ETL as much as possible and simplify the code of synfig.

I will start replacing the ETL with boost libraries first in the command-line interface, then in synfig library and synfig modules and then in synfig-studio in this order.  
Along the way I can most probably simplify/improve some stuff and make synfig’s code cleaner.

Follow the progress of the implementation in this branch of my repository: [https://github.com/eldruin/synfig/tree/eldruin\_etl\_replacement](https://github.com/eldruin/synfig/tree/eldruin_etl_replacement)  
I also opened an issue in the bug tracker: [http://www.synfig.org/issues/thebuggenie/synfig/issues/723](http://www.synfig.org/issues/thebuggenie/synfig/issues/723)

---

<div class="post-metadata">

**Author:** ![Genete](https://forums.synfig.org/user_avatar/forums.synfig.org/genete/32/8_2.png) [@Genete](https://forums.synfig.org/u/Genete)\
**Post date:** [December 9, 2014, 7:12am UTC](https://forums.synfig.org/t/etl-replacement/3200/2 "2014-12-09T07:12:32Z")

</div>

Excellent news!  
Please consider to read the coding commenting guidelines outlined in the following thread, for this and rest of your contributions.

> [@Proposed: Commenting Standard](https://forums.synfig.org/t/proposed-commenting-standard/3195/1):
>
> I brought this up on the mailing list, but based on the initial response, I wanted to repost it here for reach and lifespan, as stuff on mailing lists tends to get buried. (You can read the thread at [sourceforge.net/p/synfig/mailman … /33087616/](http://sourceforge.net/p/synfig/mailman/message/33087616/), though it would seem my message didn’t get properly saved, so see it inline on the reply.) In a nutshell, I’m implementing a commenting standard at my company to help improve code readability, and speed up coding overall. I think Synfig Studio could be…

Also, please think on provide some sort of batch of tests for those kind of global changes. It is easy break things when the deep core of the application is refurbished.  
Cheers!

---

<div class="post-metadata">

**Author:** ![d.j.a.y](https://forums.synfig.org/user_avatar/forums.synfig.org/d.j.a.y/32/113_2.png) [@d.j.a.y](https://forums.synfig.org/u/d.j.a.y)\
**Post date:** [December 9, 2014, 8:10am UTC](https://forums.synfig.org/t/etl-replacement/3200/3 "2014-12-09T08:10:23Z")

</div>

Congrat’s for your degrees and welcome on code again…

---

<div class="post-metadata">

**Author:** ![eldruin](https://forums.synfig.org/user_avatar/forums.synfig.org/eldruin/32/58_2.png) [@eldruin](https://forums.synfig.org/u/eldruin)\
**Post date:** [December 22, 2014, 10:35am UTC](https://forums.synfig.org/t/etl-replacement/3200/4 "2014-12-22T10:35:02Z")

</div>

Hi,  
The ETL replacement is going well.  
However, I need a fat sif file to test several things (right now, the ETA calculation). I need one single file that takes a couple of minutes to render in a couple-year-old computer (I can also use cpulimit but I don’t have any that takes more than a few seconds).  
Could anyone please give me one?

I created a wiki page where the replacement functions will be posted: [http://wiki.synfig.org/wiki/Dev:ETL\_replacement](http://wiki.synfig.org/wiki/Dev:ETL_replacement)

Regards.

---

<div class="post-metadata">

**Author:** ![d.j.a.y](https://forums.synfig.org/user_avatar/forums.synfig.org/d.j.a.y/32/113_2.png) [@d.j.a.y](https://forums.synfig.org/u/d.j.a.y)\
**Post date:** [December 22, 2014, 3:55pm UTC](https://forums.synfig.org/t/etl-replacement/3200/5 "2014-12-22T15:55:09Z")

</div>

> [@eldruin](#):
>
> Could anyone please give me one?

[logolaboite-002-bulles.sifz](https://forums.synfig.org/uploads/default/original/2X/c/c94934d217df856c27ce0b672392ff42dc4adde7.sifz) (133 KB) synfig will complains of missing images … but anyway … isn’t it ?

Also from [this thread](https://forums.synfig.org/t/synfig-0-64-0-splash-screen-contest/2378/1)

ETL : I finish a build, and will test you branch … any advice ? dependencies ?

---

<div class="post-metadata">

**Author:** ![eldruin](https://forums.synfig.org/user_avatar/forums.synfig.org/eldruin/32/58_2.png) [@eldruin](https://forums.synfig.org/u/eldruin)\
**Post date:** [December 23, 2014, 10:01am UTC](https://forums.synfig.org/t/etl-replacement/3200/6 "2014-12-23T10:01:47Z")

</div>

Great, thank you!

To test my branch you just need to install the boost libraries. New dependencies are boost-chrono, boost-system, boost-filesystem and boost-format (on ubuntu I would just install libboost-all-dev).

Thanks for checking out my branch, let me know any comments.

---

<div class="post-metadata">

**Author:** ![d.j.a.y](https://forums.synfig.org/user_avatar/forums.synfig.org/d.j.a.y/32/113_2.png) [@d.j.a.y](https://forums.synfig.org/u/d.j.a.y)\
**Post date:** [December 23, 2014, 12:12pm UTC](https://forums.synfig.org/t/etl-replacement/3200/7 "2014-12-23T12:12:52Z")

</div>

boost format : you would say libboost-locale i guess ?

---

<div class="post-metadata">

**Author:** ![eldruin](https://forums.synfig.org/user_avatar/forums.synfig.org/eldruin/32/58_2.png) [@eldruin](https://forums.synfig.org/u/eldruin)\
**Post date:** [December 24, 2014, 3:51pm UTC](https://forums.synfig.org/t/etl-replacement/3200/8 "2014-12-24T15:51:14Z")

</div>

No, boost::format is safe replacement to the C-style etl::strprintf. I guess it is packed together with libboost-dev in ubuntu.

---

<div class="post-metadata">

**Author:** ![eldruin](https://forums.synfig.org/user_avatar/forums.synfig.org/eldruin/32/58_2.png) [@eldruin](https://forums.synfig.org/u/eldruin)\
**Post date:** [December 25, 2014, 11:22am UTC](https://forums.synfig.org/t/etl-replacement/3200/9 "2014-12-25T11:22:50Z")

</div>

I am doing a refactor in the remaining rendering time calculation of synfig-tool.  
The synfig-tool reports its progress with a class inherited from synfig::ProgressCallback, which reimplements amount\_complete().  
The code looks like the initial intention was to call this function while rendering a frame in scanline mode up to once per line.  
Since then the code has changed and this looks like it is not supported any more, and that this is called per frame instead of per rendering line.  
Is this the case for the synfig::ProgressCallback::amount\_complete() function? If so, I can rename the variables and messages to be consistent. Right now it works correctly with several example sifs.

Here is the major refactor commit: [github.com/eldruin/synfig/commi … 8f22ec6f42](https://github.com/eldruin/synfig/commit/9ef74039fb634f6f5b18c216e738d58f22ec6f42)

---

<div class="post-metadata">

**Author:** ![eldruin](https://forums.synfig.org/user_avatar/forums.synfig.org/eldruin/32/58_2.png) [@eldruin](https://forums.synfig.org/u/eldruin)\
**Post date:** [February 6, 2015, 6:06pm UTC](https://forums.synfig.org/t/etl-replacement/3200/10 "2015-02-06T18:06:47Z")

</div>

Hi, sorry for the insistence but does anyone know about the question I asked in the post above?

---

<div class="post-metadata">

**Author:** ![Genete](https://forums.synfig.org/user_avatar/forums.synfig.org/genete/32/8_2.png) [@Genete](https://forums.synfig.org/u/Genete)\
**Post date:** [February 6, 2015, 10:56pm UTC](https://forums.synfig.org/t/etl-replacement/3200/11 "2015-02-06T22:56:22Z")

</div>

Hi, if it is just a rename thing, do it and keep in code comments the reason for the name change. I never looked in deep that part of code.  
Keep it up!  
-G

---

<div class="post-metadata">

**Author:** ![eshikafe](https://forums.synfig.org/user_avatar/forums.synfig.org/eshikafe/32/3808_2.png) [@eshikafe](https://forums.synfig.org/u/eshikafe)\
**Post date:** [January 2, 2016, 10:23pm UTC](https://forums.synfig.org/t/etl-replacement/3200/12 "2016-01-02T22:23:56Z")

</div>

Hello,

What’s the latest update on the Boost replacement of ETL?

I have the following questions about etl::dirname and synfig::get\_binary\_path:

Reference code gui\main.cpp:

```auto
	String binary_path = synfig::get_binary_path(String(argv[0]));
	
#ifdef ENABLE_NLS
	String locale_dir;
	locale_dir = etl::dirname(etl::dirname(binary_path))+ETL_DIRECTORY_SEPARATOR+"share"+ETL_DIRECTORY_SEPARATOR+"locale";

```

What is the difference between synfig::get\_binary\_path and etl::dirname?  
In Python, is etl::dirname the same as os.path.dirname and is synfig::get\_binary\_path equivalent to os.path.abspath or os.path.dirname(os.path.abspath(filename))?

The interpretation I am getting does not look correct:

```auto
binary_path = os.path.dirname(os.path.abspath(sys.argv[0])) #C:\Program Files\Synfig\bin

# C:\Program Files\Synfig \\ share \\ locale
locale_dir = os.path.dirname(os.path.dirname(binary_path)) + os.path.sep + "share" + os.path.sep + "locale"
```

Does it mean that locale\_dir = “C:\Program Files\Synfig\share”? This is not correct.

I am engaging on an ambitious project to port synfig-studio to wxPython then use Boost to call the C++ synfig-core part from Python.

---

<div class="post-metadata">

**Author:** ![d.j.a.y](https://forums.synfig.org/user_avatar/forums.synfig.org/d.j.a.y/32/113_2.png) [@d.j.a.y](https://forums.synfig.org/u/d.j.a.y)\
**Post date:** [January 21, 2016, 11:20am UTC](https://forums.synfig.org/t/etl-replacement/3200/13 "2016-01-21T11:20:19Z")

</div>

Hello, eshikafe,

> [@eshikafe](#):
>
> What’s the latest update on the Boost replacement of ETL?

you can get an eye on [eldruin repo](https://github.com/eldruin/synfig) … but, actually nothings new since 15’ october … and the work on core unit test he has done is not upstream : [github.com/eldruin/synfig/tree/core\_unittests](https://github.com/eldruin/synfig/tree/core_unittests)

> [@eshikafe](#):
>
> I am engaging on an ambitious project to port synfig-studio to wxPython then use Boost to call the C++ synfig-core part from Python.

!!!

has you say … what an ambitious project! … but…

I don’t want to be pedantic or trying to frustrate your motivation, but(bis), if you want to both help the synfig community and work around Python, a very terrible and useful work could be to look at a real plugin system for synfig aka “synfig python api” (in the way of blender / gimp / natron / …) … even drafting some [wiki doc](http://wiki.synfig.org/Developer_Documentation) could be extremely useful!

Anyway … it’s just my feeling!

see’u!
