Skip to content

Commit

Permalink
[lua/*] remove HTML tags
Browse files Browse the repository at this point in the history
  • Loading branch information
verhovsky committed Jun 3, 2024
1 parent 3ea2b0b commit f18b36c
Show file tree
Hide file tree
Showing 8 changed files with 373 additions and 378 deletions.
25 changes: 12 additions & 13 deletions de-de/lua-de.html.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ lang: de-de

num = 42 -- Alle Nummern sind vom Typ: Double.
-- Werd nicht nervös, 64-Bit Double haben 52 Bits zum Speichern von exakten
-- Ganzzahlen; Maschinen-Genauigkeit ist kein Problem für Ganzzahlen kleiner als
-- Ganzzahlen; Maschinen-Genauigkeit ist kein Problem für Ganzzahlen kleiner als
-- 52 Bit.

s = 'walternate' -- Zeichenketten sind unveränderlich, wie bei Python.
Expand Down Expand Up @@ -404,23 +404,22 @@ g() -- Ausgabe 343; Vorher kam keine Ausgabe.

## Referenzen

Ich war so begeistert Lua zu lernen, damit ich Spiele mit <a href="http://love2d.org/">Love 2D game engine</a> programmieren konnte.
Ich war so begeistert Lua zu lernen, damit ich Spiele mit [LÖVE game engine](http://love2d.org/) programmieren konnte.

Ich habe angefangen mit <a href="http://nova-fusion.com/2012/08/27/lua-for-programmers-part-1/">BlackBulletIV's Lua for programmers</a>.
Danach habe ich das offizielle Lua Buch gelesen: <a href="http://www.lua.org/pil/contents.html">Programming in Lua</a>
Ich habe angefangen mit [BlackBulletIV's Lua for programmers](http://nova-fusion.com/2012/08/27/lua-for-programmers-part-1/).
Danach habe ich das offizielle Lua Buch gelesen: [Programming in Lua](http://www.lua.org/pil/contents.html)

Es kann auch hilfreich sein hier vorbeizuschauen: <a href="http://lua-users.org/files/wiki_insecure/users/thomasl/luarefv51.pdf">Lua short
reference</a>
Es kann auch hilfreich sein hier vorbeizuschauen: [Lua short reference](http://lua-users.org/files/wiki_insecure/users/thomasl/luarefv51.pdf)

Wichtige Themen die hier nicht angesprochen wurden; die Standard-Bibliotheken:

* <a href="http://lua-users.org/wiki/StringLibraryTutorial">string library</a>
* <a href="http://lua-users.org/wiki/TableLibraryTutorial">table library</a>
* <a href="http://lua-users.org/wiki/MathLibraryTutorial">math library</a>
* <a href="http://lua-users.org/wiki/IoLibraryTutorial">io library</a>
* <a href="http://lua-users.org/wiki/OsLibraryTutorial">os library</a>
* [`string` library](http://lua-users.org/wiki/StringLibraryTutorial)
* [`table` library](http://lua-users.org/wiki/TableLibraryTutorial)
* [`math` library](http://lua-users.org/wiki/MathLibraryTutorial)
* [`io` library](http://lua-users.org/wiki/IoLibraryTutorial)
* [`os` library](http://lua-users.org/wiki/OsLibraryTutorial)

Übrigends, die gesamte Datei ist gültiges Lua. Speichere sie als learn.lua und
starte sie als "lua learn.lua" !
starte sie als "`lua learn.lua`" !

Die Erstfassung ist von tylerneylon.com, und ist auch hier verfügbar: <a href="https://gist.github.com/tylerneylon/5853042">GitHub gist</a>. Viel Spaß mit Lua!
Die Erstfassung ist von tylerneylon.com, und ist auch hier verfügbar: [GitHub gist](https://gist.github.com/tylerneylon/5853042). Viel Spaß mit Lua!
8 changes: 4 additions & 4 deletions es-es/lua.html.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -419,7 +419,7 @@ g() -- Imprime '343', nada es impreso antes de esto.
## Referencias

Estaba emocionado por aprender lua para poder crear juegos
con el motor de juegos [Love 2D](http://love2d.org/). Ese es el por qué.
con el motor de juegos [LÖVE](http://love2d.org/). Ese es el por qué.

Empecé con [BlackBulletIV para programadores Lua](https://ebens.me/posts/lua-for-programmers-part-1/).
Luego, leí el libro oficial de [Programación en Lua](http://www.lua.org/pil/contents.html).
Expand All @@ -433,10 +433,10 @@ Los principales temas no cubiertos son las librerías estándar:
* [Librería de strings](http://lua-users.org/wiki/StringLibraryTutorial)
* [Librería de tablas](http://lua-users.org/wiki/TableLibraryTutorial)
* [Librería de matemáticas](http://lua-users.org/wiki/MathLibraryTutorial)
* [Librería de Entrada/Salida (io)](http://lua-users.org/wiki/IoLibraryTutorial)
* [Libreria de Sistema Operativo (os)](http://lua-users.org/wiki/OsLibraryTutorial)
* [Librería de Entrada/Salida (`io`)](http://lua-users.org/wiki/IoLibraryTutorial)
* [Libreria de Sistema Operativo (`os`)](http://lua-users.org/wiki/OsLibraryTutorial)

Por cierto, el archivo entero es código Lua válido. ¡Guárdelo como
aprendiendo.lua y ejecútelo con el comando "lua aprendiendo.lua" !
aprendiendo.lua y ejecútelo con el comando "`lua aprendiendo.lua`" !

¡Que se divierta con lua!
44 changes: 22 additions & 22 deletions fr-fr/lua-fr.html.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ lang: fr-fr
-- Les commentaires unilignes commencent par un double tiret.

--[[
Les doubles crochets à la suite du double tiret
Les doubles crochets à la suite du double tiret
permettent d'insérer des commentaires multilignes.
--]]

Expand Down Expand Up @@ -123,7 +123,7 @@ end
x, y = bar('zaphod') --> affiche "zaphod nil nil"
-- x = 4, y = 8, les valeurs 15 à 42 sont ignorées.

-- Les fonctions sont des valeurs de première classe
-- Les fonctions sont des valeurs de première classe
-- et peuvent être locales/globales.
-- Les déclarations suivantes sont identiques:
function f(x) return x * x end
Expand All @@ -139,7 +139,7 @@ local g = function(x) return math.sin(x) end
-- À moins de déclarer la fonction auparavant:
local g; g = function (x) return math.sin(x) end

-- À propos, les fonctions trigonométriques interprètent
-- À propos, les fonctions trigonométriques interprètent
-- leurs arguments en radians.
print(math.cos(math.pi)) -- affiche "-1"
print(math.sin(math.pi)) -- affiche "0"
Expand Down Expand Up @@ -250,7 +250,7 @@ myFavs = {food = 'pizza'}
setmetatable(myFavs, {__index = defaultFavs})
eatenBy = myFavs.animal -- Affiche "gru"! merci à la métatable!

-- Ainsi donc, un accès direct à une valeur dans une table via une clé
-- Ainsi donc, un accès direct à une valeur dans une table via une clé
-- inexistante (ce qui normalement retourne "nil") conduira à exploiter
-- le champ __index de la métatable. Cela peut être récursif.

Expand Down Expand Up @@ -281,7 +281,7 @@ eatenBy = myFavs.animal -- Affiche "gru"! merci à la métatable!
----------------------------------------------------

-- Lua n'implémente pas d'orienté objet par défaut.
-- Mais il reste possible d'imiter de plusieurs manières
-- Mais il reste possible d'imiter de plusieurs manières
-- le concept de "classe" grâce aux tables et aux métatables.

-- L'explication pour l'exemple qui suit vient juste après.
Expand All @@ -302,9 +302,9 @@ mrDog = Dog:new() -- 7.
mrDog:makeSound() -- 'Je dis: woof! -- 8.

-- 1. Dog agit comme une classe; c'est une simple table.
-- 2. L'expression tbl:fn(...) est identique à
-- 2. L'expression tbl:fn(...) est identique à
-- tbl.fn(self, ...)
-- La notation : permet de passer par défaut un premier
-- La notation : permet de passer par défaut un premier
-- argument appelé "self" à la fonction tbl.fn
-- Voir 7 & 8 ci-après pour comprendre comment self prend
-- sa valeur.
Expand Down Expand Up @@ -388,7 +388,7 @@ local mod = (function ()
<contenu de mod.lua>
end)()
-- Comme si le contenu de mod.lua était enveloppé dans le corps d'une fonction,
-- si bien que les variables locales contenues dans mod.lua sont
-- si bien que les variables locales contenues dans mod.lua sont
-- inaccessibles en dehors de ce module.
-- Le code suivant fonctionne car mod = M (dans mod.lua):
Expand Down Expand Up @@ -423,27 +423,27 @@ g() -- Affiche 343; Rien n'est affiché avant cet appel.

*Les références qui suivent sont en Anglais.*

Les sujets non abordés dans ce tutoriel sont couverts en intégralité par
Les sujets non abordés dans ce tutoriel sont couverts en intégralité par
les librairies standard:

* La librairie <a href="http://lua-users.org/wiki/StringLibraryTutorial">string</a>
* La librairie <a href="http://lua-users.org/wiki/TableLibraryTutorial">table</a>
* La librairie <a href="http://lua-users.org/wiki/MathLibraryTutorial">math</a>
* La librairie <a href="http://lua-users.org/wiki/IoLibraryTutorial">io</a>
* La librairie <a href="http://lua-users.org/wiki/OsLibraryTutorial">os</a>
* La librairie [`string`](http://lua-users.org/wiki/StringLibraryTutorial)
* La librairie [`table`](http://lua-users.org/wiki/TableLibraryTutorial)
* La librairie [`math`](http://lua-users.org/wiki/MathLibraryTutorial)
* La librairie [`io`](http://lua-users.org/wiki/IoLibraryTutorial)
* La librairie [`os`](http://lua-users.org/wiki/OsLibraryTutorial)

Autres références complémentaires:

* <a href="http://nova-fusion.com/2012/08/27/lua-for-programmers-part-1/">Lua pour programmeurs</a>
* <a href="lua-users.org/files/wiki_insecure/users/thomasl/luarefv51.pdf">Référence condensée de Lua</a>
* <a href="http://www.lua.org/pil/contents.html">Programmer en Lua</a>
* <a href="http://www.lua.org/manual/">Les manuels de référence Lua</a>
* [Lua pour programmeurs](http://nova-fusion.com/2012/08/27/lua-for-programmers-part-1/)
* [Référence condensée de Lua](lua-users.org/files/wiki_insecure/users/thomasl/luarefv51.pdf)
* [Programmer en Lua](http://www.lua.org/pil/contents.html)
* [Les manuels de référence Lua](http://www.lua.org/manual/)

A propos, ce fichier est exécutable. Sauvegardez-le sous le nom *learn.lua* et
exécutez-le avec la commande `lua learn.lua` !
exécutez-le avec la commande "`lua learn.lua`" !

Ce tutoriel a été originalement écrit pour <a href="tylerneylon.com">tylerneylon.com</a> et est aussi
disponible en tant que <a href="https://gist.github.com/tylerneylon/5853042">gist</a>.
Il a été traduit en français par Roland Yonaba (voir son <a href="http://github.com/Yonaba">GitHub</a>).
Ce tutoriel a été originalement écrit pour [tylerneylon.com](tylerneylon.com) et est aussi
disponible en tant que [gist](https://gist.github.com/tylerneylon/5853042).
Il a été traduit en français par Roland Yonaba (voir son [GitHub](http://github.com/Yonaba)).

Amusez-vous bien avec Lua!
46 changes: 23 additions & 23 deletions ko-kr/lua-kr.html.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,9 @@ filename: learnlua-kr.lua
----------------------------------------------------

num = 42 -- 모든 숫자는 double입니다.
-- 놀랄 필요는 없습니다. 64비트 double은
-- 정확한 int 값을 저장하기 위해 52비트로 구성돼
-- 있습니다. 52비트 이하의 int 값에 대해서는
-- 놀랄 필요는 없습니다. 64비트 double은
-- 정확한 int 값을 저장하기 위해 52비트로 구성돼
-- 있습니다. 52비트 이하의 int 값에 대해서는
-- 장비 정밀도와 관련된 문제가 생기지 않습니다.

s = 'walternate' -- 파이썬과 같은 불변 문자열
Expand All @@ -42,7 +42,7 @@ end
if num > 40 then
print('40 이상')
elseif s ~= 'walternate' then -- ~=은 '같지 않다'입니다.
-- 동일성 검사는 파이썬과 마찬가지로 ==입니다.
-- 동일성 검사는 파이썬과 마찬가지로 ==입니다.
-- 문자열에도 쓸 수 있습니다.
io.write('not over 40\n') -- 기본적으로 stdout에 씁니다.
else
Expand Down Expand Up @@ -198,7 +198,7 @@ end
----------------------------------------------------

-- 테이블은 테이블에 연산자 오버로딩을 가능하게 하는 메타테이블을
-- 가질 수 있습니다. 나중에 메타테이블이 어떻게 자바스크립트
-- 가질 수 있습니다. 나중에 메타테이블이 어떻게 자바스크립트
-- 프로토타입과 같은 행위를 지원하는지 살펴보겠습니다.

f1 = {a = 1, b = 2} -- 분수 a/b를 표현
Expand All @@ -220,7 +220,7 @@ setmetatable(f2, metafraction)

s = f1 + f2 -- f1의 메타테이블을 대상으로 __add(f1, f2)를 호출

-- f1과 f2는 자바스크립트의 프로토타입과 달리 각 메타테이블에 대한
-- f1과 f2는 자바스크립트의 프로토타입과 달리 각 메타테이블에 대한
-- 키가 없어서 getmetatable(f1)과 같이 받아와야 합니다.
-- 메타테이블은 __add 같은 루아가 알고 있는 키가 지정된 일반 테이블입니다.

Expand Down Expand Up @@ -290,11 +290,11 @@ mrDog:makeSound() -- 'I say woof' -- 8.
-- self가 값을 어떻게 얻는지 궁금하다면 아래의 7과 8을 읽어보세요.
-- 3. newObj는 Dog 클래스의 인스턴스가 됩니다.
-- 4. self = 인스턴스화되는 클래스.
-- 주로 self = Dog이지만 상속을 이용하면 이것을 바꿀 수 있습니다.
-- 주로 self = Dog이지만 상속을 이용하면 이것을 바꿀 수 있습니다.
-- newObj의 메타테이블과 self의 __index를 모두 self에 설정하면
-- newObj가 self의 함수를 갖게 됩니다.
-- 5. 참고: setmetatable은 첫 번째 인자를 반환합니다.
-- 6. :는 2에서 설명한 것과 같이 동작하지만 이번에는 self가
-- 6. :는 2에서 설명한 것과 같이 동작하지만 이번에는 self가
-- 클래스가 아닌 인스턴스라고 예상할 수 있습니다.
-- 7. Dog.new(Dog)과 같으므로 new()에서는 self = Dog입니다.
-- 8. mrDog.makeSound(mrDog)과 같으므로 self = mrDog입니다.
Expand All @@ -319,10 +319,10 @@ seymour:makeSound() -- 'woof woof woof' -- 4.
-- 메타테이블에서 __index = Dog이기 때문에 Dog.new(LoudDog)으로
-- 변환됩니다.
-- 결과: seymour의 메타테이블은 LoudDog이고 LoudDog.__index는
-- LoudDog입니다. 따라서 seymour.key는 seymour.key,
-- LoudDog입니다. 따라서 seymour.key는 seymour.key,
-- LoudDog.key, Dog.key와 같을 것이며, 지정한 키에 어떤 테이블이
-- 오든 상관없을 것입니다.
-- 4. 'makeSound' 키는 LoudDog에서 발견할 수 있습니다.
-- 4. 'makeSound' 키는 LoudDog에서 발견할 수 있습니다.
-- 이것은 LoudDog.makeSound(seymour)와 같습니다.

-- 필요할 경우, 하위 클래스의 new()는 기반 클래스의 new()와 유사합니다.
Expand All @@ -338,7 +338,7 @@ end
----------------------------------------------------


--[[ 여기서 주석을 제거하면 이 스크립트의 나머지 부분은
--[[ 여기서 주석을 제거하면 이 스크립트의 나머지 부분은
-- 실행 가능한 상태가 됩니다.
```
Expand Down Expand Up @@ -395,27 +395,27 @@ g() -- 343이 출력됩니다. 그전까지는 아무것도 출력되지 않습

## 참고자료

루아를 배우는 일이 흥미진진했던 이유는 <a href="http://love2d.org/">Love 2D 게임 엔진</a>을 이용해
루아를 배우는 일이 흥미진진했던 이유는 [LÖVE 게임 엔진](http://love2d.org/)을 이용해
게임을 만들 수 있었기 때문입니다. 이것이 제가 루아를 배운 이유입니다.

저는 <a href="http://nova-fusion.com/2012/08/27/lua-for-programmers-part-1/">BlackBulletIV의 "프로그래머를 위한 루아"</a>
시작했습니다. 그다음으로 공식 <a href="http://www.lua.org/pil/contents.html">"프로그래밍 루아"</a> 책을 읽었습니다.
저는 [BlackBulletIV의 "프로그래머를 위한 루아"](http://nova-fusion.com/2012/08/27/lua-for-programmers-part-1/)
시작했습니다. 그다음으로 공식 ["프로그래밍 루아"](http://www.lua.org/pil/contents.html) 책을 읽었습니다.
그렇게 루아를 배웠습니다.

lua-users.org에 있는 <a href="http://lua-users.org/files/wiki_insecure/users/thomasl/luarefv51.pdf">짧은 루아 레퍼런스</a>
lua-users.org에 있는 [짧은 루아 레퍼런스](http://lua-users.org/files/wiki_insecure/users/thomasl/luarefv51.pdf)
읽어두면 도움될지도 모르겠습니다.

여기서는 표준 라이브러리에 관해서는 다루지 않았습니다.

* <a href="http://lua-users.org/wiki/StringLibraryTutorial">string 라이브러리</a>
* <a href="http://lua-users.org/wiki/TableLibraryTutorial">table 라이브러리</a>
* <a href="http://lua-users.org/wiki/MathLibraryTutorial">math 라이브러리</a>
* <a href="http://lua-users.org/wiki/IoLibraryTutorial">io 라이브러리</a>
* <a href="http://lua-users.org/wiki/OsLibraryTutorial">os 라이브러리</a>
* [`string` 라이브러리](http://lua-users.org/wiki/StringLibraryTutorial)
* [`table` 라이브러리](http://lua-users.org/wiki/TableLibraryTutorial)
* [`math` 라이브러리](http://lua-users.org/wiki/MathLibraryTutorial)
* [`io` 라이브러리](http://lua-users.org/wiki/IoLibraryTutorial)
* [`os` 라이브러리](http://lua-users.org/wiki/OsLibraryTutorial)

그나저나 이 파일 전체는 유효한 루아 프로그램입니다. 이 파일을
learn.lua로 저장한 후 "lua learn.lua"를 실행해 보세요!
learn.lua로 저장한 후 "`lua learn.lua`"를 실행해 보세요!

이 글은 tylerneylon.com에 처음으로 써본 글이며,
<a href="https://gist.github.com/tylerneylon/5853042">GitHub의 Gist</a>에서도 확인할 수 있습니다.
이 글은 tylerneylon.com에 처음으로 써본 글이며,
[GitHub의 Gist](https://gist.github.com/tylerneylon/5853042)에서도 확인할 수 있습니다.
루아로 즐거운 시간을 보내세요!
26 changes: 12 additions & 14 deletions lua.html.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -390,31 +390,29 @@ g() -- Prints out 343; nothing printed before now.

## Community

If you need support join the official Lua [mailing list](https://www.lua.org/lua-l.html), [irc channel](http://lua-users.org/wiki/IrcChannel), or [forum](https://luaforum.com).

If you need support join the official Lua [mailing list](https://www.lua.org/lua-l.html), [IRC channel](http://lua-users.org/wiki/IrcChannel), or [forum](https://luaforum.com).

## References

I was excited to learn Lua so I could make games
with the <a href="http://love2d.org/">Love 2D game engine</a>. That's the why.
with the [LÖVE game engine](http://love2d.org/). That's the why.

I started with <a href="https://ebens.me/posts/lua-for-programmers-part-1/">BlackBulletIV's Lua for programmers</a>.
Next I read the official <a href="http://www.lua.org/pil/contents.html">Programming in Lua</a> book.
I started with [BlackBulletIV's Lua for programmers](https://ebens.me/posts/lua-for-programmers-part-1/).
Next I read the official [Programming in Lua](http://www.lua.org/pil/contents.html) book.
That's the how.

It might be helpful to check out the <a href="http://lua-users.org/wiki/LuaShortReference">Lua short
reference</a> on lua-users.org.
It might be helpful to check out the [Lua short reference](http://lua-users.org/wiki/LuaShortReference) on lua-users.org.

The main topics not covered are standard libraries:

* <a href="http://lua-users.org/wiki/StringLibraryTutorial">string library</a>
* <a href="http://lua-users.org/wiki/TableLibraryTutorial">table library</a>
* <a href="http://lua-users.org/wiki/MathLibraryTutorial">math library</a>
* <a href="http://lua-users.org/wiki/IoLibraryTutorial">io library</a>
* <a href="http://lua-users.org/wiki/OsLibraryTutorial">os library</a>
* [`string` library](http://lua-users.org/wiki/StringLibraryTutorial)
* [`table` library](http://lua-users.org/wiki/TableLibraryTutorial)
* [`math` library](http://lua-users.org/wiki/MathLibraryTutorial)
* [`io` library](http://lua-users.org/wiki/IoLibraryTutorial)
* [`os` library](http://lua-users.org/wiki/OsLibraryTutorial)

By the way, the entire file is valid Lua; save it
as learn.lua and run it with "lua learn.lua" !
as learn.lua and run it with "`lua learn.lua`" !

This was first written for tylerneylon.com, and is
also available as a <a href="https://gist.github.com/tylerneylon/5853042">GitHub gist</a>. Have fun with Lua!
also available as a [GitHub gist](https://gist.github.com/tylerneylon/5853042). Have fun with Lua!
Loading

0 comments on commit f18b36c

Please sign in to comment.