lambdaway
::
sandbox
8
|
list
|
login
|
load
|
|
{center {@ style="background:#fff;"} [[straightaway|http://www.grcao.umontreal.ca/data/pdf/marrf000.pdf]] and [[knots|https://observablehq.com/@renatoppl/torus-knot]]} ;; https://chatgpt.com/share/67e43f5a-d814-8011-8be8-f06e9ec9a6af _img data/IMG_0386.jpeg {prewrap _h1 [[Leibniz|https://fr.wikipedia.org/wiki/Gottfried_Wilhelm_Leibniz]] et le [[Yi Jing|https://fr.wikipedia.org/wiki/Yi_Jing]] En 1701, le célèbre mathématicien Gottfried Wilhelm Leibniz reçoit ce diagramme des hexagrammes I Ching envoyé par son correspondant français, Joachim Bouvet. À cette époque, Leibniz travaillait sur un système d'arithmétique binaire -- un système de 1s et 0s qui représente aujourd'hui la logique sous-jacente des ordinateurs. Mais à sa surprise, il a découvert que le système binaire contenu dans l'I Ching reflète en fait son propre travail ! Voici ce que Leibniz a écrit à Bouvet en réponse : "Mais venons-en à l'un des sujets principaux de votre lettre, c'est-à-dire la relation de mon arithmétique binaire avec le modèle de Fu Xi, qui est considéré comme l'un des rois et philosophes les plus anciens connus du monde et qui est vu comme le fondateur de l'empire des chinois et de leurs sciences. Ce modèle étant donc l'un des plus anciens monuments de la science que l'on trouve aujourd'hui dans l'univers, un qui a plus de 4000 ans, semble-t-il, et un qui n'a peut-être pas été compris du tout depuis plusieurs milliers d'années, c'est une chose très surpren correspond parfaitement à ma nouvelle façon d'arithmétique et que j'aurais dû vous écrire à propos de mon arithmétique juste au moment approprié, c'est-à-dire juste quand vous vous appliquiez au déchiffrage de ces lignes" } _img data/20241208_190804.jpg ;; _img data/IMG_0367.png ;; _img data/IMG_0368.png {pre _img https://wikimedia.org/api/rest_v1/media/math/render/svg/5d5c83899d2cc41c6be4bbeb13fa5e8590ce55f1 _img https://wikimedia.org/api/rest_v1/media/math/render/svg/22c938f5b07be7381483b958b3c66ed6ec130095 energy at v=0 : E=m{sub 0}c{sup 2} at rest energy at v>0 : E=m{sub 0}c{sup 2}/√(1-(v/c){sup 2}) = m{sub 0}c{sup 2} + 1/2m{sub 0}v{sup 2}[1 + 3/4(1-(v/c){sup 2}) ...] momentum at v>0 : p=m{sub 0}v/√(1-(v/c){sup 2}) E{sup 2}=(m{sub 0}c{sup 2}){sup 2}/(1-(v/c){sup 2}) = (m{sub 0}c{sup 2}){sup 2}[1+1/1(v/c)+1/2(v/c){sup 2}+1/6(v/c){sup 3}+...] = (m{sub 0}c{sup 2}){sup 2} + (m{sub 0}c{sup 2}){sup 2}(v/c){sup 2} + 1/2(m{sub 0}c{sup 2})(v/c){sup 2} +... = (m{sub 0}c{sup 2}){sup 2} + (m{sub 0}c{sup 2} p{sup 2}=(m{sub 0}v){sup 2} /(1-(v/c){sup 2}) = (m{sub 0}v){sup 2}[1+1/1(v/c)+1/2(v/c){sup 2}+1/6(v/c){sup 3}+...] (pc){sup 2} = (m{sub 0}vc){sup 2}/(1-(v/c){sup 2}) E{sup 2} = (pc){sup 2} + (m{sub 0}c{sup 2}){sup 2} leads to the Klein Gordon equation: {b E=√[(pc){sup 2} + (m{sub 0}c{sup 2}){sup 2}]} Substituting operators: E -> i{del h}∂{sub t} , p{sub x} -> -i{del h}∂{sub x} p{sub y} -> -i{del h}∂{sub y} p{sub z} -> -i{del h}∂{sub z} with ∇{sup 2} = ∂{sup 2}{sub x} + ∂{sup 2}{sub y} + ∂{sup 2}{sub z} we can rewrite E=√[(pc){sup 2} + (m{sub 0}c{sup 2}){sup 2}] as i{del h}∂{sub t}ψ = [√[-({del h}c){sup 2}∇{sup 2} + (m{sub 0}c{sup 2}){sup 2}]]ψ squaring both sides we can rewrite E{sup 2} = (pc){sup 2} + (m{sub 0}c{sup 2}){sup 2} as the relativistic wave equation: {b -{del h}{sup 2}∂{sub t}{sup 2}ψ = -{del h}{sup 2}c{sup 2}∇{sup 2}ψ + m{sub 0}{sup 2}c{sup 4}ψ} } {hr} '{iframe {@ width="580" height="1060" src="data/politiques-dansants.mp4"}} ;; _img data/-7169957258608330451.jpeg ;; {iframe {@ width="580" height="315" src="https://www.youtube.com/embed/2SsaflvWh1Y?si=n0fCe3TAFb2t5S_f" title="YouTube video player" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share" referrerpolicy="strict-origin-when-cross-origin" allowfullscreen}} ;; https://youtu.be/xQ_cCLQv7CE?si=11s3YKvx5bKmrEob blanche gardin ;; https://www.youtube.com/watch?v=M2_tmKz3gBI blanche gardin ;; {iframe {@ width="580" height="315" src="https://www.youtube.com/embed/M2_tmKz3gBI?si=fDZvdGPV5vqfYtJJ" title="YouTube video player" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share" referrerpolicy="strict-origin-when-cross-origin" allowfullscreen}} _h1 sandbox | [[agora]] _ul Utile : {a {@ href="https://www.resizepixel.com/" target="_blank"}https://www.resizepixel.com/ } _ul [[HN 2024/11/23|https://news.ycombinator.com/item?id=42170740]] _ul [[reddit.com/lisp|https://www.reddit.com/r/lisp/comments/1d3d2z5/this_is_my_lisp_experience_and_i_dont_regret_it/]] _ul [[reddit.com/lambdacalculus|https://www.reddit.com/r/lambdacalculus/comments/1bqlgw0/how_to_write_recursive_programs_if_there_are_no/]] _ul [[HN|https://news.ycombinator.com/item?id=40484007]] _img data/IMG_0210.jpg _img data/IMG_0228.jpg http://sboisse.free.fr/science/physique/physique-quantique-pour-les-nuls-1.php _img data/Z3M-07-1.jpg _img data/IMG_20231220_215511.jpg ;; _img data/patrick_rumi.jpg _p Une même terre gavée de sang depuis que Dieu est Dieu et que le monde est monde, sur laquelle vivent (et s’opposent souvent) deux peuples différents culturellement, économiquement, religieusement, et qui plus est s’en sont remis, volontairement ou pas, aux plus extrêmes d’entre-eux pour les représenter et les défendre. Le Hamas, d’un côté, pour les palestiniens, manipulé par l’Iran, qui revendique clairement la mort d’Israël et de l’autre, Netanyahou et ses ultra orthodoxes, revendiquant par la colonisation l’annexion de la Cisjordanie et, désormais par les bombes, celle de la bande de Gaza... _p La solution ? Bien malin qui pourra la proposer tant que les deux peuples, premières et seules victimes de cette guerre atroce, ne prendront enfin profondément conscience qui sont ces tristes sires qui les ont amenés à baigner ensemble dans un même sang. _img data/548B66D4-8671-42BB-A122-41FF8377FDD4.jpeg _ul [[Entscheidungsproblem|http://www.users.waitrose.com/~hindley/SomePapers_PDFs/2006CarHin,HistlamRp.pdf]] _ul [[https://picresize.com/|https://picresize.com/]] _ul [[an architecture for mostly functional languages|https://dl.acm.org/doi/pdf/10.1145/319838.319854]] _ul [[https://users.monash.edu/~lloyd/tildeFP/Lambda/Examples/|https://users.monash.edu/~lloyd/tildeFP/Lambda/Examples/]] _ul [[convertisseur d'images en ligne|https://www.img2go.com/fr/]] {blockquote {pre editor : [67.21.186.156] 2022/05/21 07:35:41 '{def mj {lambda {:p :d} {if {W.equal? :p nil} {finished :d} {Y} }}} '{mj {{X} { { d b } f b c a b c { d a } c f c } d a} {}} } {blockquote _p Hello [67.21.186.156] from Clemson, South Carolina, could you elaborate ?} } {require lib_beta lib_BN} _img data/maison_verre.jpg _h1 sandbox _h3 multiplication par 9 à l'africaine -> mémoire {pre romarin acineol huile essentielle '{S.map {lambda {:i} {br}9x{+ :i 1} = :i{- 9 :i}} {S.serie 0 9}} -> {S.map {lambda {:i} {br}9x{+ :i 1} = :i{- 9 :i}} {S.serie 0 9}} } _p à comparer avec {pre '{S.map {lambda {:i} {br}9x:i = {* 9 :i}} {S.serie 0 10}} -> {S.map {lambda {:i} {br}9x:i = {* 9 :i}} {S.serie 0 10}} } _h1 [[deep javascript|https://exploringjs.com/deep-js/index.html]] [[pascalian forms in ustawi|http://alain.lambda.ustawi.wiki/found.ward.bay.wiki.org/pascalian-forms]] {uncover data/amelie_poulain.jpg 100 500 Amélie Poulain loves the lambada!} _h1 the '{lambda way} project _p You are welcome again in the '{lambda way} project: _ul a light framework built on a wiki, '{lambda tank}, _ul and a functional programming language, '{lambda talk}. _p [[quadrivitesse|https://fr.wikipedia.org/wiki/Quadrivitesse#Norme]], the magnitude of the four-velocity for any object is always a fixed constant: c _p Let's compute now: {pre '{+ 1 2} -> {+ 1 2} } _p Isn't it wonderful? _p {i alain marty 2020/12/12} ;; coder's corner {{hide} {def uncover {lambda {:im :h1 :h2 :txt} {img {@ src=":im" style="width: 100%; height: :h1px; object-fit: cover; transition: all 1s; box-shadow:0 0 8px #000;" onclick="this.style.height=(this.style.height===':h1px')? ':h2px' : ':h1px'; this.nextSibling.style.fontSize=(this.nextSibling.style.fontSize==='0px')? '2.0em' : '0px';" }}{div {@ style="text-align:center; font-size:0px;"} :txt }}} } {style #page_content { background:#ff0; } } {input {@ type="button" value="english" onclick=' var fr = document.getElementsByClassName("fr"), en = document.getElementsByClassName("en"), state = (this.value==="english"); if (state) for (var i=0; i< fr.length; i++) fr[i].style.display="none"; if (state) for (var i=0; i< en.length; i++) en[i].style.display="block"; if (state) this.value = "français"; if (!state) for (var i=0; i< fr.length; i++) fr[i].style.display="block"; if (!state) for (var i=0; i< en.length; i++) en[i].style.display="none"; if (!state) this.value = "english"; '}} {prewrap 5{sup 4 {sup 3 {sup 2}}} {BN.+ 2 8} } {pre . 0 1 1 1 + 0 0 1 = 0 1 1 1 1 + 0 0 1 = 0 0 1 1 1 1 + 0 0 1 = 0 0 0 1 1 1 1 + 0 0 1 = 1 0 0 0 '{def add {def add.r {lambda {:a :b :s :c :i} {if {< :i 0} then {if {= :c 0} then :s else {A.addfirst! 1 :s}} else {let { {:a :a} {:b :b} {:s :s} {:i :i} {:d {+ {A.get :i :a} {A.get :i :b} :c}} } {add.r :a :b {A.addfirst! {if {> :d 1} then {- :d 2} else :d} :s} {if {> :d 1} then 1 else 0} {- :i 1}}}}}} {lambda {:a :b} {A.join {add.r {A.split :a} {A.split :b} {A.new} 0 {- {W.length :a} 1}}}}} -> {def add {def add.r {lambda {:a :b :s :c :i} {if {< :i 0} then {if {= :c 1} then 1 else}:s else {let { {:a :a} {:b :b} {:s :s} {:i :i} {:d {+ {W.get :i :a} {W.get :i :b} :c}} } {add.r :a :b {if {> :d 1} then {- :d 2} else :d}:s {if {> :d 1} then 1 else 0} {- :i 1}}}}}} {lambda {:a :b} {S.replace # by in {add.r :a :b # 0 {- {W.length :a} 1}}}}} '{add 1 1} -> {add 1 1} '{add 1111111111111111 0000000000000001} -> {add 1111111111111111 0000000000000001} {def bin2dec {def bin2dec.r {lambda {:p :r} {if {A.empty? :p} then :r else {bin2dec.r {A.rest :p} {+ {A.first :p} {* 2 :r}}}}}} {lambda {:p} {bin2dec.r {A.split :p} 0}}} {def dec2bin {lambda {:dec} {if {= :dec 0} then 0 else {if {< :dec 2} then 1 else {dec2bin {floor {/ :dec 2}}}{% :dec 2} }}}} '{bin2dec {add {dec2bin {pow 2 128}} {dec2bin {pow 2 128}}}} {+ {pow 2 128} {pow 2 128}} } {hr} {prewrap calcul de l'inverse d'un nombre en convergence quadratique Soit g l'estimation pour 1/d : g(n+1) = g(n)*(2-d*g(n)) '{def inv {def inv.r {lambda {:d :g :n} {if {< :n 0} then :g else {inv.r :d {* :g {- 2 {* :g :d}}} {- :n 1}}}}} {lambda {:d} {inv.r :d 0.1 10}}} -> {def inv {def inv.r {lambda {:d :g :n} {if {< :n 0} then :g else {inv.r :d {* :g {- 2 {* :g :d}}} {- :n 1}}}}} {lambda {:d} {inv.r :d 0.1 10}}} {inv 3.5} {inv 2} {inv 10} } {pre '{def move {lambda {:a :n} {+ // add a sequence of numbers {A.toS // array to the sequence of its elements {A.addlast! :n :a} // add n at the end of a }}}} -> {def move {lambda {:a :n} {+ {A.toS {A.addlast! :n :a}}}}} 0: '{def bank_account {A.new 1000}} -> {def bank_account {A.new 1000}} 1: '{move {bank_account} 100} -> {move {bank_account} 100} 2: '{move {bank_account} -300} -> {move {bank_account} -300} 3: '{move {bank_account} -900} -> {move {bank_account} -900} 4: '{move {bank_account} 100} -> {move {bank_account} 100} second move = '{A.get 2 {bank_account}} = {A.get 2 {bank_account}} } _ul https://leoncvlt.github.io/imml/ ;; {uncover http://lambdaway.free.fr/lambdawalks/data/2001.jpeg 70 1000 En respectant les gestes barrières, of course.} {uncover http://lambdaway.free.fr/lambdawalks/data/2016.jpeg 100 350 ...} {center Ce bâtiment R+2 des années 80 à la conception duquel j'avais un contribué de loin, a été vendu un peu plus de 3000€. Devinez combien il en coûterait de le construire aujourd'hui, le marché de l'immobilier est vraiment mal en point ces temps-ci à Perpignan. } {script LAMBDATALK.DICT['S.reduce'] = function () { var args = LAMBDATALK.supertrim(arguments[0]).split(' '); var func = args.shift(); var r = args[0]; for (var i=1; i< args.length; i++) { r = LAMBDATALK.eval_forms( "{" + func + " " + r + " " + args[i] + "}"); } return r }; } {prewrap {S.reduce long_mult {S.serie 1 100}} {/ 355 113} 355/113 {PI} π '{def remplacement_opérant {S.replace \s by ♠ in Bonjour la France}} -> {def remplacement_opérant {S.replace \s by ♠ in Bonjour la France}} '{remplacement_opérant} -> {remplacement_opérant} '{def remplacement_inopérant {S.replace \s by _ in Bonjour la France}} -> {def remplacement_inopérant {S.replace \s by _ in Bonjour la France}} '{remplacement_inopérant} -> {remplacement_inopérant} } {pre {@ style="word-wrap: break-word; white-space:pre-wrap;"} Supposons définie une fonction, {b randcol}, générant une couleur aléatoire {def randcol {def rgb {lambda {} {round {* 255 {random}}}}} {lambda {:i} {span {@ style="color:rgb({rgb},{rgb},{rgb})"}:i}}} 1) on peut afficher en couleurs aléatoires les nombres de 1 à 100 : '{S.map randcol {S.serie 1 100}} -> {S.map randcol {S.serie 1 100}} 2) on peut afficher en couleur aléatoires cette phrase "{b {{def phrase L’expérience doit être telle qu’elle produise des résultats avantageux pour le bien de la société, impossibles à obtenir par d’autres méthodes ou moyens d’étude, et pas aléatoires ou superflus par nature.}}}" '{S.map randcol {phrase}} -> {S.map randcol {phrase}} 3) on peut extraire un mot de la phrase, par exemple le premier et le quinzième, '{S.get 0 {phrase}} -> {S.get 0 {phrase}} '{S.get 14 {phrase}} -> {S.get 14 {phrase}} sachant qu'en computerland on commence à zéro. } {{container} {{cell 1}1} {{cell 2}2} {{cell 3}3} {{cell 4}4} {{cell 5}5} {{cell 6}6} } {center {div {@ id="mem"}...} } {script var tomem = function(obj) { document.getElementById('mem').innerHTML = document.getElementById(obj.id).innerHTML; }; } {{hide} {def container div {@ class="grid-container"}} {def cell {lambda {:id} div {@ class="grid-item" id=":id" contenteditable onkeyup="tomem(this)"}}} } {style .grid-container { display: grid; grid-template-columns: auto auto auto; background-color: #888; padding: 5px; } .grid-item { background-color: #eee; border: 1px solid #888; padding: 10px; font-size: 1.0em; text-align: center; } } _img data/gandhi_adami.jpg _img data/grand_singe.jpg {uncover data/5A170758-4CAA-4C01-8BC0-369D137D6376.jpeg 100 2000 Colette à Barcelone.} {center [[free books|https://csgordon.github.io/books.html]] | [[bilingue]]} _h1 sandbox {blockquote _p Un texte appelé/référencé depuis le post de {a {@ name="lm" href="http://epsilonwiki.free.fr/epsilonwiki/?view=start#lm"}Louis} ... et renvoyant au même post. } {pre '{S.replace _ by space in {S.toW {S.map W.code2char {S.map W.char2code {W.toS {S.replace \s by _ in ATTACK AT DAWN}}}}}} } _img https://www.agoravox.fr/local/cache-vignettes/L480xH636/la_marseillaise-23ce0.jpg {pre '{def zoom {lambda {:n} {if {< :n 1} then {img {@ src="data/coco_1965.jpg" style="width:100%; vertical-align:middle;"}} else {div {@ style="margin:10px; box-shadow:0 0 18px #000; background:#fff; transform:rotate(3deg)"} {zoom {- :n 1}}}}}} -> {def zoom {lambda {:n} {if {< :n 1} then {img {@ src="http://lambdaway.free.fr/lambdawalks/data/coco_1965.jpg" style="width:100%; vertical-align:middle;" }} else {div {@ style="margin:10px; box-shadow:0 0 18px #000; background:#fff; transform:rotate(3deg)"} {zoom {- :n 1}}}}}} '{div {@ style="transform:rotate(-60deg)"} {zoom 20} } } {div {@ style="transform:rotate(-60deg)"} {zoom 20}} {prewrap '{+ .1 .2} = {+ .1 .2} _img data/coco_macpaint.jpg {center Painting with MacPaint by Colette, 1984} _img http://www.echolalie.org/echolisp/images/ludwig-limits.jpg _img data/FB_IMG_16171325836021.jpg _img data/FB_IMG_16167536219181.jpg [[http://bbs.jp.net/prog/25|http://bbs.jp.net/prog/25]] [[poli-house-pezo-von-ellrichshausen|https://www.archdaily.com/476/poli-house-pezo-von-ellrichshausen/500ebd7628ba0d0cc7000135-poli-house-pezo-von-ellrichshausen-image]] [[Maybe you don't need to be reachable|https://levels.io/contact-me/]] [[why_oo_sucks|http://harmful.cat-v.org/software/OO_programming/why_oo_sucks]] https://news.ycombinator.com/item?id=26671204 https://en.globes.co.il/en/article-covid19-vanishing-in-israel-as-vaccinations-kick-in-1001365803 '{def woot {def woo {lambda {:n :acc} {if {= :n 0} then :acc else {woo {- :n 1} :acc!} }}} {lambda {:n} {woo :n !}}} -> {def woot {def woo {lambda {:n :acc} {if {= :n 0} then :acc else {woo {- :n 1} :acc!} }}} {lambda {:n} {woo :n !}}} '{woot 100} -> {woot 100} } {pre '{def S_map {lambda {:f :m :n} {S.map {{lambda {:f :m :n :i} {br} {S.map {{lambda {:f :m :n :i :j} {:f :i/:m :j/:n} } :f :m :n :i} {S.serie 1 :n}}} :f :m :n} {S.serie 1 :m}} }} -> {def S_map {lambda {:f :m :n} {S.map {{lambda {:f :m :n :i} {br} {S.map {{lambda {:f :m :n :i :j} {:f :i/:m :j/:n} } :f :m :n :i} {S.serie 1 :n}}} :f :m :n} {S.serie 1 :m}} }} '{S_map {lambda {:x :y} {cons :x :y}} 3 5} -> {S_map {lambda {:x :y} {cons :x :y}} 3 5} } _p ... {pre '{def ifib {def ifib.map {lambda {:a :b :n} {S.map {{lambda {:a :b :i} {A.set! 0 {A.first :b} :a} {A.set! 0 {+ {A.first :a} {A.first :b}} :b} } :a :b} {S.serie 2 :n}} :b}} {lambda {:n} {A.first {S.last {ifib.map {A.new 0} {A.new 1} :n}}}}} -> {def ifib {def ifib.map {lambda {:a :b :n} {S.map {{lambda {:a :b :i} {A.set! 0 {A.first :b} :a} {A.set! 0 {+ {A.first :a} {A.first :b}} :b} } :a :b} {S.serie 2 :n}} :b}} {lambda {:n} {A.first {S.last {ifib.map {A.new 0} {A.new 1} :n}}}}} {ifib 10} '{A.first {S.last {S.map {{lambda {:a :b :i} {A.set! 0 {A.first :b} :a} {A.set! 0 {+ {A.first :a} {A.first :b}} :b} } {A.new 0} {A.new 1}} {S.serie 2 10}}}} -> {A.first {S.last {S.map {{lambda {:a :b :i} {A.set! 0 {A.first :b} :a} {A.set! 0 {+ {A.first :a} {A.first :b}} :b} } {A.new 0} {A.new 1}} {S.serie 2 10}}}} } _ul [[https://browser.engineering/intro.html|https://browser.engineering/intro.html]] _ul [[https://www.manning.com/books/classic-computer-science-problems-in-python|https://www.manning.com/books/classic-computer-science-problems-in-python]] _ul Jean-Paul.Roy@unice.fr _ul [[https://josh.works/shell-script-basics-change-mac-address|https://josh.works/shell-script-basics-change-mac-address]] _ul [[https://www.hackchefs.com/web-browser-as-text-editor/|https://www.hackchefs.com/web-browser-as-text-editor/]] _ul20 -> {a {@ href="data:text/html,%3Chtml%20contenteditable%3E"}blocknote} Ce lien est fonctionnel : clic par bouton droit de la souris et "open link in new tab". Pas chez moi (am) _ul20 {input {@ type="button" value="blocknote" onclick="link()"}} <-- ni celui-ci {script var link = function() { window.location.replace('data:text/html,%3Chtml%20contenteditable%3E') }; } _ul [[wikiarquitectura|https://fr.wikiarquitectura.com/bâtiment/maison-robie/]] _ul [[casa de la cascada|https://es.wikiarquitectura.com/edificio/casa-de-la-cascada/#casa-cascada-segundopiso]] _img https://es.wikiarquitectura.com/wp-content/uploads/2017/01/Casa_Cascada_Segundopiso.jpg _p my answer {pre {def put {lambda {:v :m} {A.set! 0 :v :m} }} {def loop {def loop.i {lambda {:m :a :b} {S.map {{lambda {:m :i} {put {* :i {A.first :m} :m}} } :m} {S.serie :a :b}} }} {lambda {:a :b} {loop.i {A.new :a} :a :b}}} {loop 1 6} '{S.map {lambda {:i} {br} {S.map {lambda {:i} *} {S.serie 1 :i}}} {S.serie 1 5}} -> {S.map {lambda {:i} {br} {S.map {lambda {:i} *} {S.serie 1 :i}}} {S.serie 1 5}} '{S.map {lambda {:i} :i} {S.serie 0 9 2}} -> {S.map {lambda {:i} :i} {S.serie 0 9 2}} } {input {@ id="input" type="text" value="0"}} + {input {@ type="button" value="increment" + onclick="document.getElementById('input').value = + parseInt( document.getElementById('input').value ) + 1;"}} + {input {@ type="button" value="decrement" + onclick="document.getElementById('input').value = + parseInt( document.getElementById('input').value ) - 1;"}} + {input {@ type="button" value="reset" + onclick="document.getElementById('input').value = 0"}} {pre '{eval {S.replace x by 3 in {S.replace y by 4 in (sqrt (+ (* x x) (* y y)))}}} -> {eval {S.replace x by 3 in {S.replace y by 4 in (sqrt (+ (* x x) (* y y)))}}} '{S.replace x by 3 in {S.replace y by 4 in {sqrt {+ {* x x} {* y y}}}}} -> {S.replace x by 3 in {S.replace y by 4 in {sqrt {+ {* x x} {* y y}}}}} '{{lambda {x y} {sqrt {+ {* x x} {* y y}}} } 3 4} -> {{lambda {x y} {sqrt {+ {* x x} {* y y}}} } 3 4} '{let { {x 3} {y 4} } {sqrt {+ {* x x} {* y y}}} } -> {let { {x 3} {y 4} } {sqrt {+ {* x x} {* y y}}} } } {script LAMBDATALK.DICT['eval'] = function() { var args = arguments[0].replace( /\(/g, "{" ).replace( /\)/g, "}" ) return LAMBDATALK.eval_forms( args ) }; } {script var ladd = function(a,b) { a = a.split(""); b = b.split(""); for (var c=0, i=0; i < a.length; i++) for (var j=0; j
9) { c[i] -= 10; d = 1; } else { d = 0; } } if (d === 1) c.push(1); return c.reverse().join('') }; var lmul = function(a,b) { a = a.split(""); b = b.split(""); for (var c=0, i=0; i < a.length; i++) for (var j=0; j < b.length; j++) c = ladd(c, a[i]*b[j] * Math.pow(10,(i+j)) ) return c }; //alert( 112233445566*9999999999 + "=" + lmul("112233445566","9999999999") ) //alert( 12345*54321 + "=" + lmul("12345","54321") ) //alert( (1+9999999999) + "=" + ladd("1","9999999999") ) //alert( (12345+54321) + "=" + ladd("12345","54321") ) } {hr} _p As per lambdatalk – I'm afraid it will never become popular enough to see any widespread usage. The reason is simple – the common programmer's aversion towards functional programming, and even more towards lambda calculus. People like programming languages which mimick natural language. As a side note, this is precisely the reason why object-oriented programming is so popular, and will be for a long time. --Dick de Bill (talk) 13:35, 29 May 2020 (UTC) _p I understand the aversion one can have to functional programming when reading some codes in Haskell or even Javascript. I understand that one can run away from "academic and/or obscure" presentations of lambda-calculus. I understand that some Lisp codes cluttered with parentheses may look like a dish of spaghetti. _p I thought I escaped that with lambdatalk. I guess not, or at least the first impression repulses the reader who fears to find an nth Lispian avatar with a functional and lambda-calculus sauce. This is probably the case. _p I remember the Hypertalk language as a rather successful - and rather cumbersome - attempt at syntax close to natural language. I thought that lambdatalk was pretty close, with the brackets in the background. One can understand that writing such a sentence "replace :x and :y in hello :x :y world by brave new" displays "hello brave new world". One can understand that "'{{lambda {:x :y} hello :x :y world} brave new} will display the same sentence and that this strange syntax will help composing much more convoluted expressions. It's lambda-calculus at level zero. I'm probably wrong. _p Thank you for your attention. -- AlainMarty {pre '{def proust Longtemps je me suis couché de bonne heure ...} -> {def proust Longtemps je me suis couché de bonne heure ...} '{def T {lambda {:type :text} {span {@ style="text-transform: {if {W.equal? :type m} then lowercase else {if {W.equal? :type M} then uppercase else {if {W.equal? :type C} then capitalize else none}}}"} :text}}} -> {def T {lambda {:type :text} {span {@ style="text-transform: {if {W.equal? :type m} then lowercase else {if {W.equal? :type M} then uppercase else {if {W.equal? :type C} then capitalize else none}}}"} :text}}} '{T m {proust}} -> {T m {proust}} '{T M {proust}} -> {T M {proust}} '{T C {proust}} -> {T C {proust}} '{S.replace \s by ♠ in {proust}} -> {S.replace \s by ♠ in {proust}} } _img data/FB_IMG_16080666429941.jpg _img data/FullSizeR.jpg _img data/FB_IMG_16066773105411.jpg {pre {def mat*mat {lambda {:a :b} {A.new {S.map {{lambda {:a :b :i} {A.new {S.map {{lambda {:a :b :i :j} {+ {S.map {{lambda {:a :b :i :j :k} {* {A.get :k {A.get :i :a}} {A.get :j {A.get :k :b}}} } :a :b :i :j} {S.serie 0 {- {A.length :b} 1}} }} } :a :b :i} {S.serie 0 {- {A.length {A.get 0 :b}} 1}} }} } :a :b} {S.serie 0 {- {A.length :a} 1}} }} }} {def A {A.new {A.new 1 2} {A.new 3 4} {A.new 5 6} {A.new 7 8}}} {def B {A.new {A.new 1 2 3} {A.new 4 5 6}}} {mat*mat {A} {B}} } {hr} {pre Dans tes yeux, Magali, brillent l’or et le ciel, Où dans deux lacs profonds se noie l’âme éternelle. Et ton sourire éclaire le monde de douceur, Comme un rayon de lune qui apaise la peur. Ta bouche si gourmande, douce promesse de fête, Nous invite à la vie, sans aucune défaite. Et tes cheveux d’argent, aux reflets de lumière, Dansent au vent, secrets d’une beauté millénaire. Dans l’espace-temps complexe, Magali s’élance, Traçant une hélice, fusion de l’ombre et de la lumière. Ses yeux, miroirs de galaxies, reflètent l’infini, Son sourire éclaire les dimensions entrelacées. Sa bouche gourmande goûte les saveurs de l’éternité, Ses cheveux d’argent flottent, tissés de fils d’étoiles. Chaque mouvement dessine des courbes dans le continuum, Son être vibre au rythme des cordes de l’univers. Elle danse sur la spirale du temps et de l’espace, Son corps, une onde gravitationnelle en harmonie. Ainsi, Magali voyage, âme libre et lumineuse, Dans ce quadridimensionnel ballet cosmique. }
lambdaway v.20211111