Mercurial Hosting > reactionary
comparison src/learn.html.luan @ 91:76baf48ea36b
add translation
author | Franklin Schmidt <fschmidt@gmail.com> |
---|---|
date | Fri, 02 May 2025 17:17:52 -0600 |
parents | 0dced626778b |
children |
comparison
equal
deleted
inserted
replaced
90:0dced626778b | 91:76baf48ea36b |
---|---|
1 local Luan = require "luan:Luan.luan" | 1 local Luan = require "luan:Luan.luan" |
2 local error = Luan.error | 2 local error = Luan.error |
3 local pairs = Luan.pairs or error() | 3 local pairs = Luan.pairs or error() |
4 local Io = require "luan:Io.luan" | 4 local Io = require "luan:Io.luan" |
5 local Http = require "luan:http/Http.luan" | 5 local Site_translator = require "luan:gpt/Site_translator.luan" |
6 local get_lang = Site_translator.get_lang or error() | |
7 local text_writer = Site_translator.text_writer or error() | |
6 local Shared = require "site:/lib/Shared.luan" | 8 local Shared = require "site:/lib/Shared.luan" |
7 local head = Shared.head or error() | 9 local head = Shared.head or error() |
8 local header = Shared.header or error() | 10 local header = Shared.header or error() |
11 local luan_url = Shared.luan_url or error() | |
9 | 12 |
10 | 13 |
11 local content = { | 14 local content = { |
12 intro = { | 15 intro = { |
13 title = [[Introduction]] | 16 title = [[Introduction]] |
187 } | 190 } |
188 java = { | 191 java = { |
189 title = [[Java 8]] | 192 title = [[Java 8]] |
190 content = function() | 193 content = function() |
191 %> | 194 %> |
192 <p><a href="/java.html">Java</a> is not an easy language to learn and if you later use Python or Luan then you won't use Java much. So why learn it first? Because it will give you a core understanding of programming. Also, ChatGPT understands Java very well, so this can help you learn it. And lastly because Java will help you understand Luan.</p> | 195 <p><a href="java.html">Java</a> is not an easy language to learn and if you later use Python or Luan then you won't use Java much. So why learn it first? Because it will give you a core understanding of programming. Also, ChatGPT understands Java very well, so this can help you learn it. And lastly because Java will help you understand Luan.</p> |
193 | 196 |
194 <p>To learn Java, you will need the following resources:</p> | 197 <p>To learn Java, you will need the following resources:</p> |
195 <ul> | 198 <ul> |
196 <li><a href="https://docs.oracle.com/javase/8/docs/api/overview-summary.html">Java 8 API Specification</a> - This is the reference for the different types of Java objects and what they do. I will refer to this a lot.</li> | 199 <li><a href="https://docs.oracle.com/javase/8/docs/api/overview-summary.html">Java 8 API Specification</a> - This is the reference for the different types of Java objects and what they do. I will refer to this a lot.</li> |
197 <li><a href="https://www.amazon.com/Java-Programming-Language-4th/dp/0321349806/">The Java Programming Language</a> - This is the core reference text for Java.</li> | 200 <li><a href="https://www.amazon.com/Java-Programming-Language-4th/dp/0321349806/">The Java Programming Language</a> - This is the core reference text for Java.</li> |
226 } | 229 } |
227 luan = { | 230 luan = { |
228 title = [[Luan]] | 231 title = [[Luan]] |
229 content = function() | 232 content = function() |
230 %> | 233 %> |
231 <p>See <a href="https://www.luan.software/learn.html">Learning Luan</a>.</p> | 234 <p>See <a href="<%=luan_url()%>/learn.html">Learning Luan</a>.</p> |
232 <% | 235 <% |
233 end | 236 end |
234 } | 237 } |
235 html = { | 238 html = { |
236 title = [[HTML and CSS]] | 239 title = [[HTML and CSS]] |
325 info.content() | 328 info.content() |
326 end | 329 end |
327 end | 330 end |
328 | 331 |
329 return function() | 332 return function() |
330 Io.stdout = Http.response.text_writer() | 333 Io.stdout = text_writer() |
331 %> | 334 %> |
332 <!doctype html> | 335 <!doctype html> |
333 <html> | 336 <html lang="<%=get_lang()%>"> |
334 <head> | 337 <head> |
335 <% head() %> | 338 <% head() %> |
336 <title>Learn Reactionary Programming</title> | 339 <title>Learn Reactionary Programming</title> |
337 </head> | 340 </head> |
338 <body> | 341 <body> |