CLASSICISTRANIERI HOME PAGE - YOUTUBE CHANNEL
SITEMAP
Audiobooks by Valerio Di Stefano: Single Download - Complete Download [TAR] [WIM] [ZIP] [RAR] - Alphabetical Download  [TAR] [WIM] [ZIP] [RAR] - Download Instructions

Make a donation: IBAN: IT36M0708677020000000008016 - BIC/SWIFT:  ICRAITRRU60 - VALERIO DI STEFANO or
Privacy Policy Cookie Policy Terms and Conditions
Discussion Utilisateur:Stefp - Wikipédia

Discussion Utilisateur:Stefp

Un article de Wikipédia, l'encyclopédie libre.

Vous avez de nouveaux messages (diff ?).

Sommaire

[modifier] Syntaxe abstraite

Je réfléchis depuis plusieurs années au fait qu'utiliser comme représentation de référence des programmes, leur expression dans une syntaxe concrète est un obstacle à l'évolution des programmes et des langages. Mais utiliser la syntaxe abstraite implique de repenser entièrement les environnements de développement.

Connais-tu Mentor (de Gilles Kahn) et le Cornell Synthetizer qui sont des outils de la fin des années 70 pour le premier et du début des années 80 pour le second qui prônaient déjà exactement cela?
On pourrait faire une entrée pour ces concepts.
Pierre de Lyon 28 septembre 2006 à 09:50 (CEST)

Je traduis l'article sur les matroïdes et ne sait pas traduire l'expression "ground set". Note du 13/12/2006 j'ai perdu l'ébauche de l'article matroïde à cause d'un crash disque. Je prèfêre maintenant me consacrer aux articles de la "fermeture transitive" des liens sortants de Perl 6. De plus, je me consacre à la traduction des synopsis de Perl 6, donc mon activité est pour le moment hors wikipédia même si à terme, l'article Perl 6 contiendra des liens vers cette documentation.

J'ai demandé à un collègue qui travaille dans un domaine proche des matroïdes et qui me dit ceci:
  • Je n'ai pas vraiment la bonne traduction, à part "ensemble de base" ou "ensemble" tout court :-) J'ai un peu cherché mais je ne ne sais pas s'il existe un terme technique approprié dans le contexte des matroides.
Si même les spécialistes ne savent pas, il faut improviser! En ce qui me concerne, «ensemble de base» me paraît approprié.
Pierre de Lyon 6 octobre 2006 à 12:33 (CEST)

[modifier] Nested procedures in perl?

Hello!

I'm incapable of writing in French, so please excuse me for using English.

I can't write swedish either.

As I noticed you are "interested in" nested functions and also a user of Perl, maybe you are the right person to inform me whether Perl really does have nested functions? And, if so, does it really have lexical scope (in any number of levels) for functions, variables, etc. nested within other functions, in the way that Algol/Pascal/Ada does? I you know the answer, please help me out, I would really appreciate it!

Best regards /HenkeB (from the English/Swedish WP)

I use the Perl terminology. Routine denotes what WP calls functions. Perl reserves the function name to predefined (WP) functions.
Is there inner function in Perl 5?
Yes and No.
As far as routine names go, no.
As far as variable visibility yes, keeping in mind that variables are reference counted. This leads to strange behavior besides the inner routine topic.
This is a wart. There is a work around though but the dynamic nature of the language adds to the complexity. Routines are first class entities, so one can store routine reference in variables and gets the equivalent of inner functions hiding thru variable scope.
More precisely:
The routine namespace (within the hierarchical module namespace) is flat.
Defining a routine within another results in having the second routine being compiled at the same time as the first, with the second name being in the same namespace as the first.
If the "inner" routine use a lexical variable of the "outer" one, it keeps a internally a reference to it.
Below, an example executed in the debugger. This is not really an inner call because the &two routine is not called from the &one routine and that they belong to the same namespace even if &two appears withing the &one routine source code.
DB<1> sub one { my $var = "toto"; print "one\n"; sub two { print "two $var\n" } }
DB<2> two() # first call of two
two
DB<3> one()
one
DB<4> two() # second call of two
two toto
DB<5>
In the first call of the routine &two, the variable $var has not been initialized. An undefined var prints as a empty string. In the second call the var has the value left by the call of the &one routine so it is printed.
Below is inner call emulation. The inner sub is compiled at compile time but affected to the $two variable at call time.
DB<2> sub one { my $var = "toto"; my $two = sub { print "two $var\n" }; $two->() } one()
two toto
Perl6 will have true inner routines
Thanks for your elaborated answer!
I've had more difficulty than usual trying to grasp Perl as "yet another important language to learn". I suppose perl is simply "too different" to be learned without hands-on experience, at least for people with my background, so I'll probably have to download it for educational purposes.
Perl was a very modest but syncretist language that has grown beyond reason. By keeping compatibility it has accumulated way too many warts. It makes it hard too learn. This does not mean that things unique to Perl like sigils and use of context are bad. Perl 6 keeps the Perl spirit, borrows from modern languages while keeping integrity. There is a lack of tutorial material though. But the English WP Perl 6 entry is getting better by the day even if it still suppose too much knowledge of Perl 5. You should tell the author about that shortcoming. I know about that because I am translating that article in French. To be honest, I must tell I did not do the original translation but I had to go over it because it was litteral and incomplete.
It is a little hard to accept that things may be defined within {}, but still be visible outside, as sub two appears to be!
It is top ugly. I guess it happened by accident, was used and has to be kept for compatibility.
I suppose "affected to the $two variable at call time" is the same as "bound to $two at call time" (by the expression $two->() ?)
sub {...} # is a anonymous routine which value is defined at compile time
my $two = sub {...}; # when executing &one, this value (technically a CODE reference) is bound to $two
$two->(); # call the CODE reference
Aha, I see, $two->() is a call (to a variable address). But what about parameters?
If I understand you correcly, by "inner routine" you mean nested and statically (lexically) scoped routines, as in Algol and its descendants?
I don't know Algol
Its like Pascal, Modula2, Ada, and most other Algol derived languages (except the C family) in that respect.
In that case, I believe Perl should not be on the list of "well known languages supporting nested functions" as the "nested function" article clearly defines a "nested function" as a function with its scope limited by an enclosing function, etc.
I suppose you mean the scope of the enclosed function name is limited by the enclosing function.
Yes.
It is not true of Perl.
The trick I expose is to bind the function value of a variable. So we got some kind of encapsulation thru the name of the variable even if the name of the should-be-inner function "leaks".
Where is the leak? Isn't my $two a true local (non leaking) variable pointing (refering) to an anonymous function (with no name to leak)?
Also, to qualify as a nested function in the traditional sense (and in the article), $two = sub {...} should certainly be able to see $var (as it does) but, equally important, a variable (or constant, type, or function) defined within $two = sub {...} should be invisible to sub one, and to all other routines except the ones that may be defined within sub {...}). This is the main purpose of nested routines.
Instead, Perl6 should be put on the list when it is available and stable. Do you agree?
I think this functionnality is already available and stable.
I will write (or find) the example but I agree there is no hurry.
I'm going to change "Perl" to "Perl6 (under development)" in the mentioned list, hope you don't mind.
To be honest, I suspect that not even Perl6 has nested routines in the sense of the article, but what the heck ;)
Thanks again /HenkeB
You are welcome.
BTW I don't think that C support inner functions. I don't know C99 though.
True, neither has -- please read my remark on that topic on the discussion page for nested (inner) functions in french (which I suppose you translated).
BTW, I hope "fonction englobante" does not mean "global function" as this would be a mistake: The nesting should be possible to any depth (i.e. nested routines may have their own nested routines (which in turn should be able to contain their own routines (which also could have their own routines...))).
Stefp 5 octobre 2006 à 06:12 (CEST)
Nice talking to you! /HenkeB

[modifier] Analyse automatique de vos créations (V1)

Des articles à venir corrigerons l'état d'orphelin. Les articles orphelins sont accessibles via la catégorie à laquelle ils appartiennent.

[modifier] Analyse du 3 octobre 2006


[modifier] Analyse du 13 octobre 2006

[modifier] Analyse du 15 octobre 2006

[modifier] Analyse du 21 octobre 2006

[modifier] Encyclopédier en apprenant ?

Attention, vous dites apprendre des sujets en traduisant des articles qui en parlent, et cela me semble un brin dangereux. Il est déjà critiquable de parler en détail, dans une encyclopédie, d'un sujet qu'on ne maîtrise pas vraiment, mais traduire est un travail encore plus délicat... Ne vaut-il mieux pas se contenter de sujets que l'on connait bien ? (N.B.: je pense corriger votre article Fermeture, qui me semble être erroné)

Comment savez vous que cette article est en dehors de mon domaine de compétence? Remplacer sans se logger un article existant par une ébauche non catégorisée sans lien interwiki ne constitue pas pour moi un progrès. L'article originel en anglais ayant progressé, j'ai l'intention de le (re)traduire pour remplacer cette ébauche. Plus généralement, certaines de mes traductions ont été reprises de manière constructive. Connaissant ainsi mes erreurs, je peux les éviter dorénavant.
Tout ce que je fais, c'est constater que votre article Fermeture était, sembe-t-il, erroné. Jamais je n'ai vu la portée d'un identifiant (scope, en anglais) être décrit par le terme fermeture (closure en anglais). Celui-ci désigne de façon extrêmement claire une fonction qui capture son environnement (toujours lexical, il me semble). Me trompe-je ? Quant à mon édition, c'est un oubli de ma part de l'avoir écrit non loggé. Vous remarquerez que ce n'est pas par volonté de me cacher : mon adresse IP est une adresse fixe qui m'identifie (le reverse DNS de 213.41.245.51 est pthierry.pck.nerim.net).
Tu confonds scope et closure. Ma traduction originelle était celle de closure et non de scope. L'intérët d'une traduction pour des termes techniques est qu'il est plus facile de faire progresser une traduction au vu de l'original que de créer un article â partir de rien. Le suivi du lien interwiki (lien supprimé par toi) aurait permis d'èviter l'erreur commise. Stefp 13 décembre 2006 à 15:39 (CET)
Je ne crois pas confondre, et donc je te cite (on va tirer ça au clair...) : « la fermeture d'un identificateur désigne où et quand, dans le code source d'un programme, cet identificateur peut être référencé ». Tu m'expliques le rapport avec une fermeture, et où tu as trouvé ce passage dans l'article anglais ?
Static Wikipedia 2008 (no images)

aa - ab - af - ak - als - am - an - ang - ar - arc - as - ast - av - ay - az - ba - bar - bat_smg - bcl - be - be_x_old - bg - bh - bi - bm - bn - bo - bpy - br - bs - bug - bxr - ca - cbk_zam - cdo - ce - ceb - ch - cho - chr - chy - co - cr - crh - cs - csb - cu - cv - cy - da - de - diq - dsb - dv - dz - ee - el - eml - en - eo - es - et - eu - ext - fa - ff - fi - fiu_vro - fj - fo - fr - frp - fur - fy - ga - gan - gd - gl - glk - gn - got - gu - gv - ha - hak - haw - he - hi - hif - ho - hr - hsb - ht - hu - hy - hz - ia - id - ie - ig - ii - ik - ilo - io - is - it - iu - ja - jbo - jv - ka - kaa - kab - kg - ki - kj - kk - kl - km - kn - ko - kr - ks - ksh - ku - kv - kw - ky - la - lad - lb - lbe - lg - li - lij - lmo - ln - lo - lt - lv - map_bms - mdf - mg - mh - mi - mk - ml - mn - mo - mr - mt - mus - my - myv - mzn - na - nah - nap - nds - nds_nl - ne - new - ng - nl - nn - no - nov - nrm - nv - ny - oc - om - or - os - pa - pag - pam - pap - pdc - pi - pih - pl - pms - ps - pt - qu - quality - rm - rmy - rn - ro - roa_rup - roa_tara - ru - rw - sa - sah - sc - scn - sco - sd - se - sg - sh - si - simple - sk - sl - sm - sn - so - sr - srn - ss - st - stq - su - sv - sw - szl - ta - te - tet - tg - th - ti - tk - tl - tlh - tn - to - tpi - tr - ts - tt - tum - tw - ty - udm - ug - uk - ur - uz - ve - vec - vi - vls - vo - wa - war - wo - wuu - xal - xh - yi - yo - za - zea - zh - zh_classical - zh_min_nan - zh_yue - zu -

Static Wikipedia 2007 (no images)

aa - ab - af - ak - als - am - an - ang - ar - arc - as - ast - av - ay - az - ba - bar - bat_smg - bcl - be - be_x_old - bg - bh - bi - bm - bn - bo - bpy - br - bs - bug - bxr - ca - cbk_zam - cdo - ce - ceb - ch - cho - chr - chy - co - cr - crh - cs - csb - cu - cv - cy - da - de - diq - dsb - dv - dz - ee - el - eml - en - eo - es - et - eu - ext - fa - ff - fi - fiu_vro - fj - fo - fr - frp - fur - fy - ga - gan - gd - gl - glk - gn - got - gu - gv - ha - hak - haw - he - hi - hif - ho - hr - hsb - ht - hu - hy - hz - ia - id - ie - ig - ii - ik - ilo - io - is - it - iu - ja - jbo - jv - ka - kaa - kab - kg - ki - kj - kk - kl - km - kn - ko - kr - ks - ksh - ku - kv - kw - ky - la - lad - lb - lbe - lg - li - lij - lmo - ln - lo - lt - lv - map_bms - mdf - mg - mh - mi - mk - ml - mn - mo - mr - mt - mus - my - myv - mzn - na - nah - nap - nds - nds_nl - ne - new - ng - nl - nn - no - nov - nrm - nv - ny - oc - om - or - os - pa - pag - pam - pap - pdc - pi - pih - pl - pms - ps - pt - qu - quality - rm - rmy - rn - ro - roa_rup - roa_tara - ru - rw - sa - sah - sc - scn - sco - sd - se - sg - sh - si - simple - sk - sl - sm - sn - so - sr - srn - ss - st - stq - su - sv - sw - szl - ta - te - tet - tg - th - ti - tk - tl - tlh - tn - to - tpi - tr - ts - tt - tum - tw - ty - udm - ug - uk - ur - uz - ve - vec - vi - vls - vo - wa - war - wo - wuu - xal - xh - yi - yo - za - zea - zh - zh_classical - zh_min_nan - zh_yue - zu -

Static Wikipedia 2006 (no images)

aa - ab - af - ak - als - am - an - ang - ar - arc - as - ast - av - ay - az - ba - bar - bat_smg - bcl - be - be_x_old - bg - bh - bi - bm - bn - bo - bpy - br - bs - bug - bxr - ca - cbk_zam - cdo - ce - ceb - ch - cho - chr - chy - co - cr - crh - cs - csb - cu - cv - cy - da - de - diq - dsb - dv - dz - ee - el - eml - eo - es - et - eu - ext - fa - ff - fi - fiu_vro - fj - fo - fr - frp - fur - fy - ga - gan - gd - gl - glk - gn - got - gu - gv - ha - hak - haw - he - hi - hif - ho - hr - hsb - ht - hu - hy - hz - ia - id - ie - ig - ii - ik - ilo - io - is - it - iu - ja - jbo - jv - ka - kaa - kab - kg - ki - kj - kk - kl - km - kn - ko - kr - ks - ksh - ku - kv - kw - ky - la - lad - lb - lbe - lg - li - lij - lmo - ln - lo - lt - lv - map_bms - mdf - mg - mh - mi - mk - ml - mn - mo - mr - mt - mus - my - myv - mzn - na - nah - nap - nds - nds_nl - ne - new - ng - nl - nn - no - nov - nrm - nv - ny - oc - om - or - os - pa - pag - pam - pap - pdc - pi - pih - pl - pms - ps - pt - qu - quality - rm - rmy - rn - ro - roa_rup - roa_tara - ru - rw - sa - sah - sc - scn - sco - sd - se - sg - sh - si - simple - sk - sl - sm - sn - so - sr - srn - ss - st - stq - su - sv - sw - szl - ta - te - tet - tg - th - ti - tk - tl - tlh - tn - to - tpi - tr - ts - tt - tum - tw - ty - udm - ug - uk - ur - uz - ve - vec - vi - vls - vo - wa - war - wo - wuu - xal - xh - yi - yo - za - zea - zh - zh_classical - zh_min_nan - zh_yue - zu -

Sub-domains

CDRoms - Magnatune - Librivox - Liber Liber - Encyclopaedia Britannica - Project Gutenberg - Wikipedia 2008 - Wikipedia 2007 - Wikipedia 2006 -

Other Domains

https://www.classicistranieri.it - https://www.ebooksgratis.com - https://www.gutenbergaustralia.com - https://www.englishwikipedia.com - https://www.wikipediazim.com - https://www.wikisourcezim.com - https://www.projectgutenberg.net - https://www.projectgutenberg.es - https://www.radioascolto.com - https://www.debitoformtivo.it - https://www.wikipediaforschools.org - https://www.projectgutenbergzim.com