Compare commits

...

8 Commits

Author SHA1 Message Date
Aaron
c767d6b967
Merge 8350b334be into b03f9e0257 2024-12-03 04:44:40 +01:00
Boris Verkhovskiy
b03f9e0257 [jsonnet] syntax highlighting
All checks were successful
Trigger site build / deploy (push) Has been skipped
CI / lint (push) Successful in 18s
2024-12-02 00:04:24 -07:00
Boris Verkhovskiy
6872d7206a
Delete pogoscript (#5199)
All checks were successful
Trigger site build / deploy (push) Has been skipped
CI / lint (push) Successful in 19s
2024-12-01 16:56:35 -07:00
Boris Verkhovskiy
00e817db85 [brainfuck/*] syntax highlight
All checks were successful
Trigger site build / deploy (push) Has been skipped
CI / lint (push) Successful in 16s
2024-11-30 13:48:28 -07:00
Boris Verkhovskiy
1e27cd2fd1 Fix link 2024-11-30 13:33:16 -07:00
Gustavo Adolfo Mejía Sánchez
0b375fe86c
[hcl/en] fix syntax error (#5187)
All checks were successful
Trigger site build / deploy (push) Has been skipped
CI / lint (push) Successful in 18s
2024-11-23 12:46:21 -07:00
Gustavo Adolfo Mejía Sánchez
c975a23edc
[javascript/es] grammar (#5188)
Update javascript-es.html.markdown
2024-11-23 12:45:19 -07:00
aaron
8350b334be [git/tr] Fixes a confusion between regex and glob 2024-11-03 10:11:40 +01:00
21 changed files with 26 additions and 228 deletions

View File

@ -14,7 +14,7 @@ Turingovsky kompletní (ekvivalentní) programovací jazyk a má pouze 8 příka
Můžete si ho vyzkoušet přímo v prohlížeči s [brainfuck-visualizer](http://fatiherikli.github.io/brainfuck-visualizer/).
```
```bf
Jakýkoliv znak mimo "><+-.,[]" (bez uvozovek) je ignorován.
Brainfuck je reprezentován jako pole, které má 30.000 buněk s počátkem v nule

View File

@ -16,7 +16,7 @@ mit lediglich 8 Befehlen.
Mit dem [brainfuck-visualizer](http://fatiherikli.github.io/brainfuck-visualizer/) kann
Brainfuck im Browser ausprobiert werden.
```
```bf
Alle Zeichen außer "><+-.,[]" (ohne die Klammern) werden ignoriert.
Brainfuck besteht aus einem Array mit unendlich vielen Elementen, die alle mit Null initialisiert

View File

@ -15,7 +15,7 @@ lenguaje de programación extremadamente pequeño, Turing completo con sólo 8 c
Puedes probar brainfuck en tu navegador con [brainfuck-visualizer](http://fatiherikli.github.io/brainfuck-visualizer/).
```
```bf
Cualquier caracter que no sea "><+-.,[]" (sin incluir las comillas)
será ignorado.

View File

@ -277,7 +277,7 @@ miFuncion(); // = undefined al mandar a llamar la función
// Las funciones en JavaScript son de primera clase, así que pueden ser asignadas
// a variables y pasadas a otras funciones como argumentos - por ejemplo:
function miFuncion(){
// este código será llamado cada cinco segundos
// este código será llamado después de cinco segundos
}
setTimeout(miFuncion, 5000);
// Note: setTimeout no es parte de JS, pero lo puedes obtener de los browsers
@ -286,7 +286,7 @@ setTimeout(miFuncion, 5000);
// Es posible declarar funciones sin nombre - se llaman funciones anónimas
// y se definen como argumentos de otras funciones.
setTimeout(function(){
// este código se ejecuta cada cinco segundos
// este código se ejecuta después de cinco segundos
}, 5000);
// JavaScript tiene ámbitos de funciones; las funciones tienen su propio ámbito pero

View File

@ -33,7 +33,7 @@ lang: fa-ir
<p dir='rtl'>در اینجا یک برنامه ی ساره برین فاک را مشاهده میکنید.</p>
```
```bf
++++++ [ > ++++++++++ < - ] > +++++ .
```
@ -44,7 +44,7 @@ lang: fa-ir
<p dir='rtl'>-- و در انتهای حلقه به خانه ی اول برگشته تا حلقه کنترل شود</p>
<p dir='rtl'>بعد از اتمام حلقه به خانه ی دوم میرود و پنج بار به این خانه اضافه کرده و سپس آنرا چاپ میکند.</p>
```
```bf
, [ > + < - ] > .
```
@ -55,13 +55,13 @@ lang: fa-ir
<p dir='rtl'>توجه داشته باشید که ردر بالا فواصل بین دستور ها فقط برای خوانایی بیشتر گذاشته شده اند.</p>
<p dir='rtl'>در واقع برنامه بالا به شکل زیر صحیح می باشد.</p>
```
```bf
,[>+<-]>.
```
<p dir='rtl'>حال سعی کنید ببینید که برنامه ی زیر چه کاری انجام می دهد؟</p>
```
```bf
,>,< [ > [ >+ >+ << -] >> [- << + >>] <<< -] >>
```

View File

@ -12,7 +12,7 @@ lang: fr-fr
Brainfuck (sans majuscule à part au début dune phrase) est un langage
Turing-complet extrêmement simple avec seulement 8 commandes.
```
```bf
Tout caractère en dehors de "><+-.,[]" (en dehors des guillemets) est ignoré.
Brainfuck est représenté par un tableau de 30 000 cellules initialisées à 0 et

View File

@ -281,9 +281,9 @@ locals {
map = {for x in local.list : x => upper(x) } // "one":"ONE", "two":"TWO", "three":"THREE"
filtered_list = [for k, v in local.map : substr(v, 0, 2) if k != "two" } // "ON", "TH"
filtered_list = [for k, v in local.map : substr(v, 0, 2) if k != "two" ] // "ON", "TH"
prefixed_list = [for v in local.filtered_list : "pre-${k}" } // "pre-ON", "pre-TH"
prefixed_list = [for v in local.filtered_list : "pre-${v}" ] // "pre-ON", "pre-TH"
joined_list = join(local.upper_list,local. filtered_list) // "ONE", "TWO", "THREE", "pre-ON", "pre-TH"

View File

@ -1,4 +1,4 @@
---
--
language: BF
filename: learnbf-it.bf
contributors:
@ -17,7 +17,7 @@ estremamente minimale, composto da solo 8 comandi.
Puoi provarlo nel tuo browser utilizzando
[brainfuck-visualizer](http://fatiherikli.github.io/brainfuck-visualizer/).
```
```bf
Qualsiasi carattere diverso da "><+-.,[]" (escludendo gli apici)
viene ignorato.
Branfuck è caratterizzato da un array di 30,000 celle inizializzate a zero

View File

@ -9,7 +9,7 @@ Jsonnet is a powerful templating language for JSON. Any valid JSON
document is a valid Jsonnet object. For an interactive demo/tutorial,
click [here](https://jsonnet.org/learning/tutorial.html)
```python
```jsonnet
// single line comment
/*

View File

@ -13,7 +13,7 @@ lang: ko-kr
Brainfuck(문장을 시작하는 단어가 아닌이상 첫글자는 대문자를 사용하지 않습니다)은
여덟가지 명령어만으로 튜링-완전한 최소주의 프로그래밍 언어입니다.
```
```bf
"><+-.,[]" 이외의 문자들은 무시됩니다. (쌍따옴표는 제외)
브레인퍽은 30,000 칸 짜리의 0으로 초기화된 배열과,

View File

@ -13,7 +13,7 @@ Brainfuck (schrijf je niet met een hoofdletter behalve aan het begin van een
zin) is een extreem
minimalistische Turing-complete programmeertaal met maar acht commando's.
```
```bf
Elk karakter behalve "><+-.,[]" (en de quotes) wordt genegeerd.
Brainfuck wordt gerepresenteerd door een array met 30.000 cellen die initieel

View File

@ -19,7 +19,7 @@ Zawiera zaledwie 8 poleceń.
Możesz przetesotwać brainfucka w swojej przeglądarce, korzystając z narzędzia
[brainfuck-visualizer](http://fatiherikli.github.io/brainfuck-visualizer/).
```
```bf
Wszystkie znaki oprócz "><+-.,[]" (wyłączając znaki zapytania) są ignorowane.
Pamięć w brainfucku jest reprezentowana przez tablicę 30.000 komórek

View File

@ -1,202 +0,0 @@
---
language: PogoScript
contributors:
- ["Tim Macfarlane", "http://github.com/refractalize"]
filename: learnPogo.pogo
---
Pogoscript is a little language that emphasises readability, DSLs and provides excellent asynchronous primitives for writing connected JavaScript applications for the browser or server.
``` javascript
// defining a variable
water temperature = 24
// re-assigning a variable after its definition
water temperature := 26
// functions allow their parameters to be placed anywhere
temperature at (a) altitude = 32 - a / 100
// longer functions are just indented
temperature at (a) altitude :=
if (a < 0)
water temperature
else
32 - a / 100
// calling a function
current temperature = temperature at 3200 altitude
// this function constructs a new object with methods
position (x, y) = {
x = x
y = y
distance from position (p) =
dx = self.x - p.x
dy = self.y - p.y
Math.sqrt (dx * dx + dy * dy)
}
// `self` is similar to `this` in JavaScript with the
// exception that `self` isn't redefined in each new
// function definition
// `self` just does what you expect
// calling methods
position (7, 2).distance from position (position (5, 1))
// as in JavaScript, objects are hashes too
position.'x' == position.x == position.('x')
// arrays
positions = [
position (1, 1)
position (1, 2)
position (1, 3)
]
// indexing an array
positions.0.y
n = 2
positions.(n).y
// strings
poem = 'Tail turned to red sunset on a juniper crown a lone magpie cawks.
Mad at Oryoki in the shrine-room -- Thistles blossomed late afternoon.
Put on my shirt and took it off in the sun walking the path to lunch.
A dandelion seed floats above the marsh grass with the mosquitos.
At 4 A.M. the two middleaged men sleeping together holding hands.
In the half-light of dawn a few birds warble under the Pleiades.
Sky reddens behind fir trees, larks twitter, sparrows cheep cheep cheep
cheep cheep.'
// that's Allen Ginsburg
// interpolation
outlook = 'amazing!'
console.log "the weather tomorrow is going to be #(outlook)"
// regular expressions
r/(\d+)m/i
r/(\d+) degrees/mg
// operators
true @and true
false @or true
@not false
2 < 4
2 >= 2
2 > 1
// plus all the javascript ones
// to define your own
(p1) plus (p2) =
position (p1.x + p2.x, p1.y + p2.y)
// `plus` can be called as an operator
position (1, 1) @plus position (0, 2)
// or as a function
(position (1, 1)) plus (position (0, 2))
// explicit return
(x) times (y) = return (x * y)
// new
now = @new Date ()
// functions can take named optional arguments
spark (position, color: 'black', velocity: {x = 0, y = 0}) = {
color = color
position = position
velocity = velocity
}
red = spark (position 1 1, color: 'red')
fast black = spark (position 1 1, velocity: {x = 10, y = 0})
// functions can unsplat arguments too
log (messages, ...) =
console.log (messages, ...)
// blocks are functions passed to other functions.
// This block takes two parameters, `spark` and `c`,
// the body of the block is the indented code after the
// function call
render each @(spark) into canvas context @(c)
ctx.begin path ()
ctx.stroke style = spark.color
ctx.arc (
spark.position.x + canvas.width / 2
spark.position.y
3
0
Math.PI * 2
)
ctx.stroke ()
// asynchronous calls
// JavaScript both in the browser and on the server (with Node.js)
// makes heavy use of asynchronous IO with callbacks. Async IO is
// amazing for performance and making concurrency simple but it
// quickly gets complicated.
// Pogoscript has a few things to make async IO much much easier
// Node.js includes the `fs` module for accessing the file system.
// Let's list the contents of a directory
fs = require 'fs'
directory listing = fs.readdir! '.'
// `fs.readdir()` is an asynchronous function, so we can call it
// using the `!` operator. The `!` operator allows you to call
// async functions with the same syntax and largely the same
// semantics as normal synchronous functions. Pogoscript rewrites
// it so that all subsequent code is placed in the callback function
// to `fs.readdir()`.
// to catch asynchronous errors while calling asynchronous functions
try
another directory listing = fs.readdir! 'a-missing-dir'
catch (ex)
console.log (ex)
// in fact, if you don't use `try catch`, it will raise the error up the
// stack to the outer-most `try catch` or to the event loop, as you'd expect
// with non-async exceptions
// all the other control structures work with asynchronous calls too
// here's `if else`
config =
if (fs.stat! 'config.json'.is file ())
JSON.parse (fs.read file! 'config.json' 'utf-8')
else
{
color: 'red'
}
// to run two asynchronous calls concurrently, use the `?` operator.
// The `?` operator returns a *future* which can be executed to
// wait for and obtain the result, again using the `!` operator
// we don't wait for either of these calls to finish
a = fs.stat? 'a.txt'
b = fs.stat? 'b.txt'
// now we wait for the calls to finish and print the results
console.log "size of a.txt is #(a!.size)"
console.log "size of b.txt is #(b!.size)"
// futures in Pogoscript are analogous to Promises
```
That's it.
Download [Node.js](http://nodejs.org/) and `npm install pogo`.
There is plenty of documentation on [http://pogoscript.org/](http://pogoscript.org/), including a [cheat sheet](http://pogoscript.org/cheatsheet.html), a [guide](http://pogoscript.org/guide/), and how [Pogoscript translates to Javascript](http://featurist.github.io/pogo-examples/). Get in touch on the [google group](http://groups.google.com/group/pogoscript) if you have questions!

View File

@ -12,7 +12,7 @@ lang: pt-pt
Brainfuck (não capitalizado excepto no início de uma frase) é uma linguagem de
programação Turing-completa extremamente simples com apenas 8 comandos.
```
```bf
Qualquer caractere excepto "><+-.,[]" (não contar com as aspas) é ignorado.
Brainfuck é representado por um vector com 30 000 células inicializadas a zero

View File

@ -14,7 +14,7 @@ Brainfuck (пишется маленькими буквами, кроме нач
Вы можете испытать brainfuck в вашем браузере с помощью [brainfuck-визуализатора](http://fatiherikli.github.io/brainfuck-visualizer/).
```
```bf
Любой символ, кроме "><+-.,[]", игнорируется, за исключением кавычек.
Brainfuck представлен массивом из 30000 ячеек, инициализированных нулями,

View File

@ -14,7 +14,7 @@ minimalistiskt Turing-komplett programmeringsspråk med endast 8 kommandon.
Du kan testa brainfuck i din webbläsare via [brainfuck-visualizer](http://fatiherikli.github.io/brainfuck-visualizer/).
```
```bf
Alla karaktärer förutom "><+-.,[]" (inte inkluderat citattecken) ignoreras.
Brainfuck är representerat av ett fält med 30 000 celler initialiserade till

View File

@ -12,7 +12,7 @@ Brainfuck (normalde brainfuck olarak bütün harfleri küçük olarak yazılır.
son derece minimal bir programlama dilidir. (Sadece 8 komut) ve tamamen
Turing'dir.
```
```bf
"><+-.,[]" (tırnak işaretleri hariç) karakterleri dışındaki her karakter
gözardı edilir.

View File

@ -3,7 +3,7 @@ language: F#
contributors:
- ["Scott Wlaschin", "http://fsharpforfunandprofit.com/"]
translators:
- ["Mustafa Zengin", "http://zengin.github.com/"]
- ["Mustafa Zengin", "http://zengin.github.io/"]
filename: learnfsharp-tr.fs
lang: tr-tr
---

View File

@ -176,7 +176,7 @@ $ git add HelloWorld.java
# add a file in a nested dir
$ git add /path/to/file/HelloWorld.c
# Regular Expression support!
# Shell glob patterns make it easy to specify multiple files:
$ git add ./*.java
# You can also add everything in your working directory to the staging area.

View File

@ -3,7 +3,7 @@ language: TypeScript
contributors:
- ["Philippe Vlérick", "https://github.com/pvlerick"]
translators:
- ["Mustafa Zengin", "http://zengin.github.com"]
- ["Mustafa Zengin", "http://zengin.github.io"]
filename: learntypescript-tr.ts
lang: tr-tr
---

View File

@ -12,7 +12,7 @@ lang: zh-cn
Brainfuck 是一个极小的只有8个指令的图灵完全的编程语言。
```
```bf
除"><+-.,[]"之外的的任何字符都会被忽略 (不包含双引号)。
Brainfuck 包含一个有30,000个单元为0的数组