e466ef5
Version 18.0 - def-
d093c31
Update translations for upcoming DDNet 18.0 - def-
55e82e2
Update German translations - def-
8a5d164
Fix multiple editor undo/redo issues - archimede67
ed7b013
Update Swedish translations for 18.0 - furo321
f612688
Update russian.txt - gerdoe-jr
49ffdfe
Update brazilian_portuguese.txt - rffontenelle
e633bdb
Update traditional_chinese.txt - By622
68a1bbb
Update simplified_chinese.txt - By622
bda0855
Fix warning title being uninitialized in some cases - Robyt3
c3835dc
Divide /tp
into /tpxy
and /tpto
- gerdoe-jr
c6537e7
/tpto
-> /tp
and /teleport
- gerdoe-jr
ce7060e
Fix style - def-
6888f75
Update config_variables.h - k-i-o
0aa2e9f
Update spanish.txt - n0Ketchp
0cba5c5
Fix countries/types filters excluding all servers - Robyt3
a5c8941
Version 18.0.1 - def-
3594eb4
Fix updater issue. Close #7867 - Learath2
5b83405
Version 18.0.2 - def-
c750351
Scale angles using MousePos with zoom - furo321
90178f5
Fix client/server updates - Learath2
75934e1
Version 18.0.3 - def-int CSkyb::HSLAToInt(std::uint8_t H, std::uint8_t S, std::uint8_t L, std::uint8_t A)//convert hsla color to int
{
std::uint32_t color = 0;
color += H;
color += S * 0Xff;
color += L * 0Xffff;
color += A * 0Xffffff;
return static_cast<int>(color);
}
it's giving me rainbow kinda effect when i call it this way.
pPlayer->m_TeeInfos.m_ColorFeet = skyb.HSLAToInt(0,255, snum++, 0);
note: sum goes 0 to 255 in loop.ColorHSLA
and the Pack
functionint CSkyb::HSLAToInt(std::uint8_t H, std::uint8_t S, std::uint8_t L, std::uint8_t A)//convert hsla color to int
{
std::uint32_t color = 0;
color += H;
color += S * 0Xff;
color += L * 0Xffff;
color += A * 0Xffffff;
return static_cast<int>(color);
}
it's giving me rainbow kinda effect when i call it this way.
pPlayer->m_TeeInfos.m_ColorFeet = skyb.HSLAToInt(0,255, snum++, 0);
note: sum goes 0 to 255 in loop. A * 0Xffffff
is promoted to signed int, which can overflow. It should be A * 0Xffffffu
to avoid any signed types in the calculationColorHSLA
and the Pack
function Pack
functionColorHSLA
with 0-255 values, which are out of rangeA * 0Xffffff
is promoted to signed int, which can overflow. It should be A * 0Xffffffu
to avoid any signed types in the calculation u
literal to hex on ddnet discord, i never seen it mentioned on any resource i read (edited)mod Main {
fn main(argc: i32) -> i32 {
let mut x: i32 = 2;
x = 4;
let y: i32 = other(2);
return x;
}
fn other(a: i32) -> i32 {
return a;
}
}
mod Main {
fn main(argc: i32) -> i32 {
let mut x: i32 = 2;
x = 4;
let y: i32 = other(2);
return x;
}
fn other(a: i32) -> i32 {
return a;
}
}
// check-pass
// Bastion of the Turbofish
// ------------------------
// Beware travellers, lest you venture into waters callous and unforgiving,
// where hope must be abandoned, ere it is cruelly torn from you. For here
// stands the bastion of the Turbofish: an impenetrable fortress holding
// unshaking against those who would dare suggest the supererogation of the
// Turbofish.
//
// Once I was young and foolish and had the impudence to imagine that I could
// shake free from the coils by which that creature had us tightly bound. I
// dared to suggest that there was a better way: a brighter future, in which
// Rustaceans both new and old could be rid of that vile beast. But alas! In
// my foolhardiness my ignorance was unveiled and my dreams were dashed
// unforgivingly against the rock of syntactic ambiguity.
//
// This humble program, small and insignificant though it might seem,
// demonstrates that to which we had previously cast a blind eye: an ambiguity
// in permitting generic arguments to be provided without the consent of the
// Great Turbofish. Should you be so naïve as to try to revolt against its
// mighty clutches, here shall its wrath be indomitably displayed. This
// program must pass for all eternity: forever watched by the guardian angel
// which gave this beast its name, and stands fundamentally at odds with the
// impetuous rebellion against the Turbofish.
//
// My heart aches in sorrow, for I know I am defeated. Let this be a warning
// to all those who come after: for they too must overcome the impassible
// hurdle of defeating the great beast, championed by a resolute winged
// guardian.
//
// Here stands the Bastion of the Turbofish, a memorial to Anna Harren,
// Guardian Angel of these Hallowed Grounds. <3
// See https://github.com/rust-lang/rust/pull/53562
// and https://github.com/rust-lang/rfcs/pull/2527
// and https://web.archive.org/web/20211010063452/https://twitter.com/garblefart/status/1393236602856611843
// for context.
fn main() {
let (the, guardian, stands, resolute) = ("the", "Turbofish", "remains", "undefeated");
let _: (bool, bool) = (the<guardian, stands>(resolute));
}
gen_steps
function?gen_steps
function? std::generator
the first stl template that wraps coroutines, with that you'll just have to do
std::generator<int> gen_steps(int start, int end, int stride = 1) {
for(int i = start; i < end; i += stride) co_yield i;
}
std::generator<int>
std::function
is also dynamic dispatchstd::generator<T>::iterator
so you can use range based for loopsstd::generator<int>
mentions nothing about this particular functionint
std::function
, even if it's a constantstd::coroutine_handle<>
erasing the promise typebool Init
like I would in CResult
g.dcu = d.dIBuilderCreateCompileUnit(
DWARFSourceLanguageC99, df, "nlvm", 4, isOptimized, flags, flags.len.csize_t,
runtimeVer, "", 0, DWARFEmissionFull, 0, False, False, nil, 0, nil, 0)
(edited)print
etc commands?cl_skin_download_url
to https://skins.ddnet.org/skin ? there are proxy's that either include more custom skins by default, or query skins from multiple db's (taking Scrumplex's proxy as an example: https://skins.Scrumplex.net/skin (edited)cl_skin_download_url
to https://skins.ddnet.org/skin ? there are proxy's that either include more custom skins by default, or query skins from multiple db's (taking Scrumplex's proxy as an example: https://skins.Scrumplex.net/skin (edited)cl_skin_download_url
to https://skins.ddnet.org/skin ? there are proxy's that either include more custom skins by default, or query skins from multiple db's (taking Scrumplex's proxy as an example: https://skins.Scrumplex.net/skin (edited)move_iterator
out of istream_iterator
; ModuleID = 'Main'
source_filename = "simple.ed"
target triple = "x86_64-unknown-linux-gnu"
define private i32 @main(i32 %0) {
entry:
%"0" = alloca i32, align 4
%"1" = alloca i32, align 4
store i32 %0, ptr %"1", align 4
%"2" = alloca i32, align 4
br label %block_0
block_0: ; preds = %entry
store i32 2, ptr %"2", align 4
store i32 4, ptr %"2", align 4
%1 = load i32, ptr %"2", align 4
store i32 %1, ptr %"0", align 4
%2 = load i32, ptr %"0", align 4
ret i32 %2
}
!llvm.dbg.cu = !{!0}
!0 = distinct !DICompileUnit(language: DW_LANG_Rust, file: !1, producer: "edlang", isOptimized: true, runtimeVersion: 1, emissionKind: FullDebug, splitDebugInlining: false, sdk: "edlang-sdk")
!1 = !DIFile(filename: "simple.ed", directory: "programs")
mod Main {
fn main(argc: i32) -> i32 {
let mut x: i32 = 2;
x = 4;
return x;
}
}
.text
.file "simple.ed"
.p2align 4, 0x90
.type .Lmain,@function
.Lmain:
.Lfunc_begin0:
.cfi_startproc
movl $4, %eax
movl %edi, -8(%rsp)
movl $4, -12(%rsp)
movl $4, -4(%rsp)
retq
.Lfunc_end0:
.size .Lmain, .Lfunc_end0-.Lmain
.cfi_endproc
.section ".note.GNU-stack","",@progbits
git clone git@github.com:edg-l/edlang.git
cd edlang
cargo r -- programs/simple.ed
./target_ed/simple
m_aLocalIDs[!g_Config.m_ClDummy]
, remember to also check if you're dummy connected before doing this otherwise you will get a segfault I think.m_aLocalIDs[!g_Config.m_ClDummy]
, remember to also check if you're dummy connected before doing this otherwise you will get a segfault I think. add_favorite_community
and remove_favorite_community
are added to change the favorite communities via the console and for saving the favorite communities to the config file. For the favorite communities, additional tabs using the communities' icons are shown in the server browser n...std::vector<char>
without the stl forcing you to zero initialize the entire vectorstd::vector<char>
without the stl forcing you to zero initialize the entire vector use std::mem::MaybeUninit;
// Create an uninitialized array of `MaybeUninit`. The `assume_init` is
// safe because the type we are claiming to have initialized here is a
// bunch of `MaybeUninit`s, which do not require initialization.
let mut data: [MaybeUninit<String>; 1000] = unsafe { MaybeUninit::uninit().assume_init() };
// Count the number of elements we have assigned.
let mut data_len: usize = 0;
for elem in &mut data[0..500] {
elem.write(String::from("hello"));
data_len += 1;
}
// For each item in the array, drop if we allocated it.
for elem in &mut data[0..data_len] {
unsafe { elem.assume_init_drop(); }
}
with rust ucan have partially initialized arraysCursor
wraps an in-memory buffer and provides it with a Seek
implementation.Write is implemented for Vec<u8> by appending to the vector. The vector will grow as needed.
oh this is cuteWrite is implemented for Vec<u8> by appending to the vector. The vector will grow as needed.
oh this is cute Vec
, short for ‘vector’.Vec
, short for ‘vector’. #[inline]
fn write(&mut self, buf: &[u8]) -> io::Result<usize> {
self.extend_from_slice(buf);
Ok(buf.len())
}
library/alloc/src/vec/spec_extend.rs
.