- 1
Здесь будут опубликованы пароли от учётных записей
Нашли или выдавили из себя код, который нельзя назвать нормальным, на который без улыбки не взглянешь? Не торопитесь его удалять или рефакторить, — запостите его на говнокод.ру, посмеёмся вместе!
−1
Здесь будут опубликованы пароли от учётных записей
+1
Ой, девачьки, я 5 лет не заходило. Почему нет говнокодов на Дульфи? Я десять страниц промотал! Неужели все дульфисты впали
в старческий маразм и не могут больше срать на этом недоязыке? Почему? Он же изначально создавался для даунов.
Что стало с Тарасом? Что стало с поняшей-ассемблеристом?
Только одфаги меня вспомнят.
+1
alex@ASD-PC:~/TypeScriptCompiler/3rdParty/llvm-wasm/debug/bin$ node mlir-translate.js --help
OVERVIEW: MLIR Translation Testing Tool
USAGE: mlir-translate.js [options] <input file>
OPTIONS:
Color Options:
--color - Use colors in output (default=autodetect)
General options:
--dot-cfg-mssa=<file name for generated dot file> - file name for generated dot file
--mlir-disable-threading - Disabling multi-threading within MLIR
--mlir-elide-elementsattrs-if-larger=<uint> - Elide ElementsAttrs with "..." that have more elements than the given upper limit
--mlir-pretty-debuginfo - Print pretty debug info in MLIR output
--mlir-print-debuginfo - Print debug info in MLIR output
--mlir-print-elementsattrs-with-hex-if-larger=<long> - Print DenseElementsAttrs with a hex string that have more elements than the given upper limit (use -1 to disable)
--mlir-print-op-on-diagnostic - When a diagnostic is emitted on an operation, also print the operation as an attached note
--mlir-print-stacktrace-on-diagnostic - When a diagnostic is emitted, also print the stack trace as an attached note
-o=<filename> - Output filename
--split-input-file - Split the input file into pieces and process each chunk independently
Translation to perform
--deserialize-spirv - deserialize-spirv
--import-llvm - import-llvm
--mlir-to-llvmir - mlir-to-llvmir
--serialize-spirv - serialize-spirv
--test-spirv-roundtrip - test-spirv-roundtrip
--test-spirv-roundtrip-debug - test-spirv-roundtrip-debug
--verify-diagnostics - Check that emitted diagnostics match expected-* lines on the corresponding line
Generic Options:
--help - Display available options (--help-hidden for more)
--help-list - Display list of available options (--help-list-hidden for more)
--version - Display the version of this program
program exited (with status: 0), but EXIT_RUNTIME is not set, so halting execution but not exiting the runtime or preventing further async execution (build with EXIT_RUNTIME=1, if you want a true shutdown)
alex@ASD-PC:~/TypeScriptCompiler/3rdParty/llvm-wasm/debug/bin$
сказ о том как я LLVM на WASM компилял :)
−2
function throw_artefact(obj)
if obj==nil then
return
end
math.randomseed(time_global())
local rnd=math.random(10)
local sect = obj:section()
local lv = obj:level_vertex_id()
local gv = obj:game_vertex_id()
local pos = obj:position()
local off_x = 2
local off_y = 1.5
local off_z = 2
pos.x = pos.x + off_x
pos.y = pos.y + off_y
pos.z = pos.z + off_z
if lv and gv and pos then
math.randomseed(time_global())
if string.find(sect, "witches") then
if string.find(sect, "weak") then
math.randomseed(time_global())
if math.random(4) == 1 then alife():create("af_electra_sparkler", pos, lv, gv) end
elseif string.find(sect, "average") then
math.randomseed(time_global())
if math.random(6) == 1 then alife():create("af_electra_sparkler", pos, lv, gv) end
if math.random(4) == 1 then alife():create("af_electra_flash", pos, lv, gv) end
else
math.randomseed(time_global())
if math.random(4) == 1 then alife():create("af_electra_moonlight", pos, lv, gv) end
if math.random(5) == 1 then alife():create("af_electra_flash", pos, lv, gv) end
if math.random(5) == 1 then alife():create("af_electra_sparkler", pos, lv, gv) end
end
elseif string.find(sect, "mosquito") then
math.randomseed(time_global())
if string.find(sect, "weak") then
if math.random(6) == 1 then alife():create("af_cristall_flower", pos, lv, gv) end
elseif string.find(sect, "average") then
if math.random(4) == 1 then alife():create("af_cristall_flower", pos, lv, gv) end
if math.random(5) == 1 then alife():create("af_medusa", pos, lv, gv) end
else
if math.random(6) == 1 then alife():create("af_night_star", pos, lv, gv) end
if math.random(4) == 1 then alife():create("af_medusa", pos, lv, gv) end
if math.random(5) == 1 then alife():create("af_cristall_flower", pos, lv, gv) end
end
elseif string.find(sect, "mincer") then
math.randomseed(time_global())
if string.find(sect, "weak") then
if math.random(6)==1 then alife():create("af_blood", pos, lv, gv) end
elseif string.find(sect, "average") then
if math.random(5) == 1 then alife():create("af_blood", pos, lv, gv) end
if math.random(4) <= 1 then alife():create("af_mincer_meat", pos, lv, gv) end
else
if math.random(6) == 1 then alife():create("af_soul", pos, lv, gv) end
if math.random(4) == 1 then alife():create("af_mincer_meat", pos, lv, gv) end
if math.random(5) == 1 then alife():create("af_blood", pos, lv, gv) end
end
elseif string.find(sect, "gravi") then
math.randomseed(time_global())
if string.find(sect, "weak") then
if math.random(6)==1 then alife():create("af_vyvert", pos, lv, gv) end
elseif string.find(sect, "average") then
if math.random(4) == 1 then alife():create("af_vyvert", pos, lv, gv) end
if math.random(5) <= 1 then alife():create("af_gravi", pos, lv, gv) end
else
if math.random(6) == 1 then alife():create("af_gold_fish", pos, lv, gv) end
if math.random(4) == 1 then alife():create("af_gravi", pos, lv, gv) end
if math.random(5) == 1 then alife():create("af_vyvert", pos, lv, gv) end
end
elseif string.find(sect, "ameba") or string.find(sect, "burning_fuzz") or string.find(sect, "rusty") then
math.randomseed(time_global())
if math.random(2) == 1 then alife():create("af_rusty_sea-urchin", pos, lv, gv) end
if math.random(2) == 1 then alife():create("af_rusty_kristall", pos, lv, gv) end
if math.random(2) == 1 then alife():create("af_rusty_thorn", pos, lv, gv) end
elseif string.find(sect, "buzz") then
if string.find(sect, "weak") then
if math.random(6)==1 then alife():create("af_ameba_slug", pos, lv, gv) end
elseif string.find(sect, "average") then
if math.random(5) == 1 then alife():create("af_ameba_slime", pos, lv, gv) end
if math.random(4) <= 1 then alife():create("af_ameba_slug", pos, lv, gv) end
else
if math.random(5) == 1 then alife():create("af_ameba_mica", pos, lv, gv) end
if math.random(5) == 1 then alife():create("af_ameba_slug", pos, lv, gv) end
if math.random(4) == 1 then alife():create("af_ameba_slime", pos, lv, gv) end
end
elseif string.find(sect, "doggy") then
local n=0
math.randomseed(time_global())
for n=1, math.random(3) do
alife():create("dog_weak", pos, lv, gv)
end
Свиток перебирает аномалии на локации и по рандому спавнит в них артефакты.
Да, блять - мне пришлось изучить луа. Теперь я тоже "золотой хуй".
Нижние строки отвечают за функционирование самодельной аномалии, которая после полуночи (по ИВ) плодит гипнособак и прочую нечисть. Стаи собак вырезают целые поселения; таким образом, я стал поистине сталкером. Так как я давно фриплею, надо разнообразить ко-ко-корутину.
0
IT Оффтоп #118
#88: https://govnokod.ru/27432 https://govnokod.xyz/_27432
#89: https://govnokod.ru/27435 https://govnokod.xyz/_27435
#90: https://govnokod.ru/27439 https://govnokod.xyz/_27439
#91: https://govnokod.ru/27449 https://govnokod.xyz/_27449
#92: https://govnokod.ru/27460 https://govnokod.xyz/_27460
#93: https://govnokod.ru/27463 https://govnokod.xyz/_27463
#94: https://govnokod.ru/27466 https://govnokod.xyz/_27466
#95: https://govnokod.ru/27473 https://govnokod.xyz/_27473
#96: https://govnokod.ru/27478 https://govnokod.xyz/_27478
#97: https://govnokod.ru/27484 https://govnokod.xyz/_27484
#98: https://govnokod.ru/27495 https://govnokod.xyz/_27495
#99: https://govnokod.ru/27504 https://govnokod.xyz/_27504
#100: https://govnokod.ru/27508 https://govnokod.xyz/_27508
#101: https://govnokod.ru/27511 https://govnokod.xyz/_27511
#102: https://govnokod.ru/27518 https://govnokod.xyz/_27518
#103: https://govnokod.ru/27526 https://govnokod.xyz/_27526
#104: https://govnokod.ru/27534 https://govnokod.xyz/_27534
#105: https://govnokod.ru/27544 https://govnokod.xyz/_27544
#106: https://govnokod.ru/27552 https://govnokod.xyz/_27552
#107: https://govnokod.ru/27554 https://govnokod.xyz/_27554
#108: https://govnokod.ru/27557 https://govnokod.xyz/_27557
#109: https://govnokod.ru/27581 https://govnokod.xyz/_27581
#110: https://govnokod.ru/27610 https://govnokod.xyz/_27610
#111: https://govnokod.ru/27644 https://govnokod.xyz/_27644
#112: https://govnokod.ru/27648 https://govnokod.xyz/_27648
#113: https://govnokod.ru/27652 https://govnokod.xyz/_27652
#114: https://govnokod.ru/27659 https://govnokod.xyz/_27659
#115: https://govnokod.ru/27665 https://govnokod.xyz/_27665
#116: https://govnokod.ru/27671 https://govnokod.xyz/_27671
#117: https://govnokod.ru/27675 https://govnokod.xyz/_27675
+1
Давайте займёмся анальным сексом.
.
0
const range = (count) => Array.from(Array(count).keys());
class Matrix {
static Dot(A, B) {
// Dot production
const wA = A[0].length;
const hA = A.length;
const wB = B[0].length;
const hB = B.length;
if (wA != hB)
{
throw "A width != B height";
}
const C = range(hA).map((_, i) => range(wB).map((_, j) => 0));
for (let i = 0; i < hA; ++i)
for (let j = 0; j < wB; ++j) {
let sum = 0;
for (let k = 0; k < wA; ++k) {
const a = A[i][k];
const b = B[k][j];
sum += a * b;
}
C[i][j] = sum;
}
return C;
}
static Mul(A, B) {
// Dot production
const wA = A[0].length;
const hA = A.length;
const wB = B[0].length;
const hB = B.length;
if (wA != wB || hA != hB)
{
throw "A width != B width, A height != B height";
}
const C = range(hA).map((_, i) => range(wA).map((_, j) => A[i][j] * B[i][j]));
return C;
}
static Add(A, B) {
const wA = A[0].length;
const hA = A.length;
const wB = B[0].length;
const hB = B.length;
if (wA != wB || hA != hB)
{
throw "A width != B width, A height != B height";
}
const C = range(hA).map((_, i) => range(wA).map((_, j) => A[i][j] + B[i][j]));
return C;
}
static Sub(A, B) {
const wA = A[0].length;
const hA = A.length;
const wB = B[0].length;
const hB = B.length;
if (wA != wB || hA != hB)
{
throw "A width != B width, A height != B height";
}
const C = range(hA).map((_, i) => range(wA).map((_, j) => A[i][j] - B[i][j]));
return C;
}
static Translate(A, shift) {
const wA = A[0].length;
const hA = A.length;
const R = range(hA).map((_, i) => range(wA).map((_, j) => A[i][j] + shift));
return R;
}
static Sigmoid(A) {
const wA = A[0].length;
const hA = A.length;
const R = range(hA).map((_, i) => range(wA).map((_, j) => 1 / (1 + Math.exp(-A[i][j]))));
return R;
}
//...
}
лаба по математике матрици :)
+3
Тред в котором я после обновления rt ядра на обычное нереалтаймовое чиню связку jack2, jack2-dbus и pulseaudio-jack
Задача в том, чтобы корректно стартовал jack_control start, показывался pulseaudio-jack-sink и можно было прокинуть звук из па приложений в джек.
На данный момент утрачена возможность старта, какая-то хуйня с правами или чем-то таким. Юзер у меня задобавлен в группы audio и realtime, для него
написаны какие-то повышенные привилегии. С rt-ядром это работало. Сейчас хуй знает почему, но запущенный от юзера QJackCtl не имеет доступа к
сокетам джек-сервера в /dev/shm, которые все root root.
+3
Как же я ненавижу безвузных дебилов
Учеников ВУЗА, которые НИХУЯ не могут.
Нахуя в ВУЗ поступать, если ты ДЕБИЛ и не сможешь ни одной лабы выполнить?
+1
for (double x = xn, p = 1, n = 0, y = 0; x > xk ? cout<<p<<' '<<n, false : true; x += dx, y = cos(x) + x*5. / 2, y > 0 ? p *= y : y < 0 ? n++ : n );
Попросили помочь с задачей:
> Определить произведение негативных и количество позитивных значений функции y=cos(x)+x*5./2, если значение x изменяется от xn до xk с шагом dx.
Я постарался, как мог, всё-таки язык мне не очень близок (немного помогли). Возможно, ещё есть, куда "улучшить".