nim c --cc:clang --mm:orc --panics:on --threads:on --tlsEmulation:off -l:"-fuse-ld=mold" %f
# Compile with: nim c --gc:orc --panics:on --fieldChecks:on casevariants | |
# Compare with -d:emiDuplicateKey -d:emiLenient | |
import eminim, std/[parsejson, streams] | |
type | |
Fruit = enum | |
Banana, Apple | |
Bar = object | |
shared: int |
from typetraits import supportsCopyMem | |
const | |
maxEntities* = 10_000 | |
type | |
Array*[T] = object | |
data: ptr array[maxEntities, T] | |
proc `=destroy`*[T](x: var Array[T]) = |
#cc = clang | |
--experimental:strictEffects | |
--experimental:strictFuncs | |
--experimental:strictDefs | |
--experimental:unicodeOperators | |
--experimental:overloadableEnums | |
--define:nimPreviewCstringConversion | |
--define:nimPreviewFloatRoundtrip | |
--define:nimStrictDelete | |
--define:nimUseLinenoise |
import os, enum, shutil, subprocess | |
class CpuPlatform(enum.Enum): | |
arm = 1 | |
arm64 = 2 | |
i386 = 3 | |
amd64 = 4 | |
class DeviceOrientation(enum.Enum): | |
portrait = 1 |
<div id="ROOT"> | |
<header> | |
<h2 class="font-light text-2xl md:text-4xl text-gray-600">Ancient Wisdom</h2> | |
</header> | |
<div class="mt-8"> | |
<img src="blurred.jpg" alt="" class="absolute" width=1464> | |
<div class="bg-white rounded-md overflow-hidden shadow-xl relative"> | |
<img src="portrait.jpg" alt="" width="512" height="512" class=""> | |
<div class=""> |
type | |
EmbeddedImage* = distinct Image | |
EmbeddedWave* = distinct Wave | |
EmbeddedFont* = distinct Font | |
ShaderLocsPtr* = distinct typeof(Shader.locs) | |
proc `=destroy`*(x: var EmbeddedImage) = discard | |
proc `=dup`*(source: EmbeddedImage): EmbeddedImage {.nodestroy.} = source | |
proc `=copy`*(dest: var EmbeddedImage; source: EmbeddedImage) {.nodestroy.} = |
proc sortObject(tree: var JsonTree, n: NodePos) = | |
var pairs: seq[(string, NodePos)] | |
for ch0 in sonsReadonly(tree, n): | |
let key = firstSon(NodePos ch0.pos).str | |
let value = NodePos(ch0.pos + 2) | |
pairs.add((key, value)) | |
pairs.sort do (a, b: (string, NodePos)) -> int: | |
cmp(a[0], b[0]) |
type | |
StableChunk[T] = object | |
next: ptr StableChunk[T] | |
len, cap: int | |
data: UncheckedArray[T] | |
StableSeq*[T] = object | |
head, tail: ptr StableChunk[T] | |
current: ptr StableChunk[T] | |
currentIndex: int |
Project Title: Using LLMs to Automate KDE Translations
Translating FOSS software projects is often a thankless job, with fewer and fewer active contributors. Currently, the KDE-el translation team is dissolved. The steady decline in approved translations, as evident from the statistics, will likely lead to the Greek translation being excluded from the KDE release in the near future. Since this decision will be based on the percentage of translated messages according to the guidelines outlined here: https://l10n.kde.org/docs/translation-howto/translation-howto.docbook, there is a pressing need for action to prevent this decline.
Fortunately, with the advent of numerous open LLMs that excel at translation tasks, we may be able to reverse this trend.