Scolring - Forum

Entraides et échanges autour de la technologie Scol - Informations and exchanges on the Scol technology

Vous pouvez changer la langue de l'interface une fois inscrit - You can change the language once registered

You are not logged in.

#27 Re: Openspace3D » Intégration dans un site web » 29-Sep-2016 18:11:45

iri

Certes, mais il y a de la réécriture à la clef avant de pouvoir espérer faire le portage.
Quant à JS, il est de plus en plus souvent bloqué par les utilisateurs (ou tout au moins forteùent limité)

#28 Re: Openspace3D » Intégration dans un site web » 29-Sep-2016 18:06:20

iri

Oui, malheureusement, de nombreuses applis sont devenues obsolètes. Les navigateurs demandent une certification et une gestion de type « bac à sable » (entre autres choses) et l'emploi d'API spécifiques que nous ne pouvons pas intégrer à Scol.
C'est dommage car cela coupe tout un pan de possibilités. Dans le même temps, c'est assez compréhensible de leur part ...

#29 Re: Openspace3D » Android AR_Program problem » 3-Sep-2016 11:22:42

iri

Hi,
email is under the pseudonym.

#30 Re: Pub - Café » Nice » 16-Jul-2016 21:17:32

iri

I'm in the same region than Nice and the whole world is more than crazy

#31 Re: Pub - Café » Nice » 16-Jul-2016 21:14:19

iri

i have a dream ....

#33 Re: Pub - Café » Source Code & Binaries » 14-Feb-2016 22:19:06

iri

There is always possible to do better. You can also tell us what you think is misconfigured. It would be constructive.

About the tutorials part (your second link), these are some examples to learn the Scol language. Openspace3d is written in Scol. Other applications can be written in Scol ...

#34 Re: Openspace3D » Mac OS X ? :D » 3-Jan-2016 17:26:30

iri

Bon, le topic est vieux mais ça peut donner des idées à certains de tester la chose smile
https://www.playonmac.com/

Installer Scol sur MacOSX.

#37 Scol » Scol under GNU / Linux and Wine » 3-Jan-2016 17:19:38

iri
Replies: 0

Scol under GNU / Linux via Wine.

Test OK :
- OS : Debian stretch (9)
- Arch : 64-bits
- Wine : 1.9.0
- Graphics card : nVidia GT430, driver : proprietary (test ok with "Nouveau" too)
- Free OpenGL API version : 11.0.8

Note : At this time, security.dll is always not loaded by Scol. So, OpenSpace3D can not work directly. In this case, apply this patch first : http://www.scolring.org/forum/viewtopic.php?id=1168
Note : SCS and other programs work perfectly.
Note : same result with PlayOnLinux ! (and maybe PlayOnMac ??)


1/ On Debian (and all based Debian Linux distros, like Ubuntu, Mint, ...), if you are in 64-bits, enable the 32-bits support.
As root, in Debian :

# dpkg --add-architecture i386

and update your packages list :

# apt-get update

Note : This operation may be required on other distros, i don't know. Adapt these commands, if any.


2/ Install the latest version of wine from the official web site or from your distro repository.


3/ Download and install Scol from the Scolring.


4/ Launch Scol (scol.exe) : by default from /home/YOUR_LOGIN/.wine/drive_c/Program Files/Scol


5/ Click right on the Scol icon and select "Settings".
Check the following tabs :
- SO3Engine : if present, check the configuration;
- 3D params (legacy 3d engine) : if present, check the configuration;
- Webcam : if present, check the configuration;


6/ If all is ok, that's all ! smile

=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=

"Hey ! I've a problem ! It doesn't work !"

A/ If you are a problem to install or use Wine, please consult the Wine website : http://www.winehq.org

B/ After install, Scol is not found in the system files.
By default, Wine creates an hidden folder in your HOME directory. You must activate "Show the hidden entry" in your files manager.

C/ After install, Scol seems not to start.
First, please wait : Wine should start before Scol.
If Scol seems not really start :
- check if a Scol process currently exists or not. If you have not a GUI interface for that, open a terminal and enter :

$ ps -le

If no Scol enter is present, ok, else kill it (them) with the killall command.
- edit the usmuser.ini file in a basic text editor (avoid an office suite !) : typically, usmuser.ini is in /home/YOUR_LOGIN/Documents/Scol
- replace (or add) "log no" by "log yes"
- replace (or add) "echo 0" by "echo 1f"
- save it (you could perform before a backup).
- Relaunch Scol. If any, kill the process.
- In your system files, go to /home/YOUR_LOGIN/.wine/drive_c/users/YOUR_LOGIN/Local Settings/Application Data/Scol/Logs
- If no log file is present, it seems that you launch the program badly. See the Wine web site for informations to use Wine correctly.
- Otherwise, in a text editor, open the latest log file.
- If you don't understand, paste the content in an appropriate Scolring section.

D/ In the "Settings" interface, the "Webcam" tab is empty.
Are you connect the webcam in your host ?
Are you install the MS windows driver under Wine ?
If yes, visit the WineHQ web site and check if your webcam driver is supported.

E/ In the "Settings" interface, the "SO3Engine" tab is not present.
The DirectX support is not loaded in Wine.
- Exit Scol.
- Go to http://wiki.winehq.org/WineD3DOnWindows
- In the most cases, choose http://wined3d.adolfintel.com/ link
- Download the archive and extract it.
- Copy "d3d11.dll", "dxgi.dll" "libwine.dll" and "wined3d.dll" in your Scol directory. Typically in /home/YOUR_LOGIN/.wine/drive_c/Program Files/Scol
/!\ Be careful, don't copy these files in the windows/system32 Wine directory !
- In Debian (and based Debian distros) and on 64-bits architecture, you could install also the 32-bits OpenGL API :

# apt-get install libgl1-mesa-dri:i386 libgl1-mesa-glx:i386

- If your graphics card driver is proprietary, you may install too the OpenGL API device. By example, for nVidia on Debian :

# apt-get install libgl1-nvidia-glx
# apt-get install libgl1-nvidia-glx:i386	// on 64-bits architecture only

- Restart Scol.
- If the problem persists, see the C section above (to activate and read the log file).

Note : if you ignore the current driver, you may use this command in a terminal :

$ grep /drivers/ /var/log/Xorg.0.log

F/ In the "Settings" interface, the "Legacy 3D engine" tab is not present.
Same thing than the E section above.

G/ Scol starts correctly but a Scol application crashes.
Activate the log. For that, please see the C section above.

H/ Scol applications run normally but the 3D is empty (or "disabled", "grey", etc).
Clic right on the Scol icon and choose "Settings". Check the 3D configuration.

I/ I've another Scol problem under Wine.
Open a new topic in an appropriate section in the Scolring forum.

#38 Re: SCS » [Resolu] Module Tetris et plugin Tag » 2-Jan-2016 14:37:40

iri

Ok.
J'ai déplacé cette discussion dans la section dédiée au SCS.

#39 Re: SCS » [Resolu] Module Tetris et plugin Tag » 2-Jan-2016 01:16:40

iri

C'est assez similaire aux autres plugins du C3D3.

- Sélectionner le matériau sur l'objet 3D surlequel le plugin sera appliqué;
- Assigner une ancre à ce matériau;
- Dans le menu déroulant du C3D3, choisir l'option des instances;
- Définir une nouvelle instance :
- - son nom
- - sa classe (Tag)
- - l'ancre définit précédemment.
- Cocher ou non les options;
- Valider.

image.jpg

Où vois-tu une zone de texte ?
Comment l'as-tu intégré ?

#40 Re: SCS » [Resolu] Module Tetris et plugin Tag » 31-Dec-2015 00:42:26

iri

Salut,

C'est une archive, elle est en lecture seule, pour consultation le cas échéant.

Non, ces modules ne sont pas sur l'ancien forum.

- Graffiti : il s'agit en fait du plugin pour le C3D3 nommé "Tag". Il est inclus en standard dans le SCS.
- Tetris et autres jeux : tu devrais trouver ton bonheur ici : http://iri3d.free.fr/Editeurs/SCS/, à la section "Autres modules".

Tu crées encore avec le SCS ? Cool smile

#42 Re: Pub - Café » Paris » 19-Dec-2015 00:43:52

iri

La peur et l'ignorance ...

#43 Re: Programing » Persistence of objects or(?) freeing memory » 5-Dec-2015 16:37:20

iri

To complete what we have already said, a Scol developer should NOT have to take care of the memory. It is dangerous and this goes against to the language spirit.
When a developer creates an object, Scol allocates the needed memory itself. When an object is destroyed, Scol frees the memory itself. If the memory is incorrectly freed, then this is a bug.

On the other hand, the developer can (must ?!) design his application to use the less memory.
smile

#44 Re: Pub - Café » Questions about SCOL » 5-Dec-2015 16:14:39

iri
Avatar-Z wrote:

5. The SCOL much in common with OCaml?

I'm late but, about this question, Sylvain Huet (who created Scol in 1996) tells :
« Influenced by my studies at MIT and Inria, the Scol programming language presents some similarities with functional languages such as Id or Caml, with a simplified syntax so that it is more familiar to traditional developpers. »

#45 Re: Programing » a cylinder soap opera/ mon feuilleton de cylrindres » 1-Dec-2015 21:33:57

iri
hebdemnobad wrote:

If the vm had something like a built in frame by frame callback, I could build some sort of 'kill' function depending on the lifespan left in each cylinder. But os3d does, and that's where I want to apply this knowledge.

Other methods exist : advantages and disadvantages ...

#46 Re: Programing » a cylinder soap opera/ mon feuilleton de cylrindres » 1-Dec-2015 19:31:26

iri

Well, few remarks in vrac.

//fun [] I
//get an id from lDeleted_cylinder_ids....if there are no ids available, return 0, once an index is encountered, return the index
fun get_deleted_cylinder_ID ()=

Are you sure that an index will never be equal at 0 ? If no, you should return nil instead if the deleted list is empty.


You should rename explicitely your variables. By example, in lDeleted_cylinder_ids, the first l for a list is ok. But lindex is an integer, not a list. Why this first l ? An i (iIndex by example) is more comprehensive for the reader. And if the second character is upper, keep this convention.


To optimize easily the memory, you should avoid to define uselessly some locale variables. By example :

fun add_cylinder()=
   (...)
   let @birthphase -> birth_function in
   let @deathphase -> death_function in
   let @returnvolume-> volume_function in
   let @returnarea -> area_function in 
   (
       //assign birth and death functions
      set lcylinder.fbirthfunction = birth_function;
      set lcylinder.fdeathfunction = death_function;
      set lcylinder.funreturnarea = area_function;
      set lcylinder.funreturnvolume = volume_function;
(...)

Write instead :

fun add_cylinder()=
   (...)
   (
       //assign birth and death functions
      set lcylinder.fbirthfunction = @birthphase ;
      set lcylinder.fdeathfunction = @deathphase;
      set lcylinder.funreturnarea = @returnvolume;
      set lcylinder.funreturnvolume = @returnarea;

If i understand correctly, you want keep the index value when a cylinder is deleted ? Right ?


If several life span exist, set several lists may be another method, instead of a big list. One list by life span. It is an idea ...
Or, if you know, you could use an hash table (otherwise, forget that !).


A timer object (not only in Scol) is always a greedy object. Some timers are ok. A large number can be problematic, especially as they are destroyed to the first "top". Perhaps, one timer by life span and all cylinders (for a given life span) are created and destroyed in the same "top" ? Depending on your project, of course.


This is a good start !

#47 Re: Programing » remove_from_list and removeItemInList don't seem to be working » 30-Nov-2015 17:21:03

iri

This is normal. The returned list is your result.

set list1 = remove_from_list list1 561;

and you are happy smile

#48 Re: Programing » how to get the highest index from a list of struct objects » 29-Nov-2015 23:36:08

iri

Your function is incorrect.

Try with this main function (i added a 4th cylinder with a shorter index) :

fun main()=
	_showconsole;
	let mkCylinder [1 879 nil nil nil nil nil nil nil nil]-> cylinder1 in
	let mkCylinder [2 1056 nil nil nil nil nil nil nil nil]-> cylinder2 in
	let mkCylinder [3 3456 nil nil nil nil nil nil nil nil]-> cylinder3 in
	let mkCylinder [4 2010 nil nil nil nil nil nil nil nil]-> cylinder4 in     // <- added !
	set lCylinderlist = cylinder1:: cylinder2::cylinder3::cylinder4::lCylinderlist; 
	let nth_list lCylinderlist 0-> dcylinder in
	let dcylinder.Icylinderindex -> index in
	_fooS strcatn "the result of the index search through the list is:  ":: (itoa  (get_highest_id_from_cylinderlist lCylinderlist nil))::nil;;

The output is :

there are items in the list and we are not at the end yet
the highest id found so far is: 879
there are items in the list and we are not at the end yet
the highest id found so far is: 1056
there are items in the list and we are not at the end yet
the highest id found so far is: 3456
there are items in the list and we are not at the end yet
the result of the index search through the list is:  0

0 ? Really ?

Try with this easier function :

fun get_highest_id_from_cylinderlist (cylinderlist, id)=
	if cylinderlist == nil then
	(
		_fooS "there are no items in the list at all";
		id
	)
	else
		let hd cylinderlist -> cylinder in
		if cylinder.Icylinderindex > id then
		(
			_fooS strcat "the highest id found so far is: " itoa cylinder.Icylinderindex;
			get_highest_id_from_cylinderlist tl cylinderlist cylinder.Icylinderindex
		)
		else
		(
			_fooS strcat "the current id is not greater than : " itoa id;
			get_highest_id_from_cylinderlist tl cylinderlist id
		);;

The output should be :

the highest id found so far is: 879
the highest id found so far is: 1056
the highest id found so far is: 3456
the current id is not greater than : 3456
there are no items in the list at all
the result of the index search through the list is:  3456

3456 seems correct.

As Arkeon suggests, you may use the max function.

You may also define a global variable to store the max value. When a new cylinder is created, you compare its index with this variable. If it is bigger, you replace it.

Something like that :

typeof maxCylinderId;;
...
fun cylinderNew (arg, id, ....)=
  let mkCylinder [... id ...] -> cylinder in
  (
  if id > maxCylinderId then
    set maxCylinderId = id;
  cylinder
  );;

to avoid to read the entire list each time.

PS : please, indent your code !!

#49 Re: Programing » Persistence of objects or(?) freeing memory » 26-Nov-2015 20:07:28

iri
hebdemnobad wrote:

my goal is dynamically creating and destroying objects in a global list while minimizing the amount of memory taken up by them. so if the list is full, no more objects can be created, the objects are periodically 'dying' which means emptying the of value, and when time comes to create a new object, if there is an object with empty values in the list (or array, perhaps an table as you made it is a better solution), then that object is filled with new values


With an array, the isze is initially fixed and it is entirely allocated when it is created. But the access time is faster and constant (first cases or last cases).
With a list, the size changes dynamically and the allocated memory is dynamic too. But the access time is slower and depends on the position in the list.

#50 Re: Programing » Persistence of objects or(?) freeing memory » 26-Nov-2015 19:54:14

iri

Scol manages itself the memory. The developer should not manage himself the memory.

_freememory is dangerous because :
- it disturbs the internal working;
- it depends on the heap state at this moment;
- it depends on the how / when the processor performs this (see  scheduling for more informations about that).
Mainly if you call frequently _freememory !

Finally, there is a risk to corrupt the memory and then to induce a crash.

Board footer

Powered by FluxBB