lasttp
is good for practice, but is insufficient when synchronization of multiple tees is required in a certain part of a map. This PR adds this functionality and provides players with a more convenient practice experience.
typedef enum: uint8_t {
LITERAL,
} TokenType;
// Idea 1. Pass array of Token*
typedef struct {
TokenType kind;
} Token;
typedef struct {
Token token;
size_t value;
} TokenLiteral;
// And then pass an array of pointers so you can do something like dis
Token *token = ...;
switch(token->kind) {
case LITERAL: {
TokenLiteral *literal = (TokenLiteral *)token;
}
}
// Idea 2. Big struct xd
typedef struct {
TokenType kind;
union {
size_t value;
} content;
} Token;
typedef enum: uint8_t {
LITERAL,
} TokenType;
// Idea 1. Pass array of Token*
typedef struct {
TokenType kind;
} Token;
typedef struct {
Token token;
size_t value;
} TokenLiteral;
// And then pass an array of pointers so you can do something like dis
Token *token = ...;
switch(token->kind) {
case LITERAL: {
TokenLiteral *literal = (TokenLiteral *)token;
}
}
// Idea 2. Big struct xd
typedef struct {
TokenType kind;
union {
size_t value;
} content;
} Token;
&[T]
just a pointer and len? MariaDB [teeworlds]> SELECT COUNT(*) FROM record_race WHERE Map="Multeasymap";
+----------+
| COUNT(*) |
+----------+
| 1382275 |
+----------+
/times <name>
probably rarely20555169
unique Map, Name
combinations, of the 41571298
total rows20555169
unique Map, Name
combinations, of the 41571298
total rows struct Foo {
data: i32,
array: [i32],
}
for the example @MilkeeyCat gave, you'd use &[Macro]
instead, though#[repr(C)]
struct Macros {
size: usize,
_macros: [Macro; 0],
}
trait GimmeMacros {
fn macros(&self) -> &[Macro];
}
impl GimmeMacros for *const Macros {
fn macros(&self) -> &[Macro] {
unsafe {
let skip_size = self.byte_add(size_of_val(&self.read().size));
std::slice::from_raw_parts(skip_size as *const Macro, self.read().size)
}
}
}
(edited)struct Foo {
data: i32,
array: [i32],
}
for the example @MilkeeyCat gave, you'd use &[Macro]
instead, though libloading
create didn't work when i used [Type]
in a structunsafe
stuff, but yea, not really supported %18 = tail call dereferenceable_or_null(24) ptr @realloc(ptr nonnull %malloc, i64 24)
llvm can track the bytes deferenceable for a given ptrVAR1="ABC"
VAR2=ABC
VAR3=ABC"
VAR4='ABC'
VAR5="ABC""ABC"
VAR6="ABC"ABC
VAR3
and VAR6
, I'd really like consistent behavior, they seem like things that could actually happenVAR3
and VAR6
, I'd really like consistent behavior, they seem like things that could actually happen /dev/md1 468G 374G 71G 85% /
&[T]
to extern "C"
function it puts pointer in one register and length in another oneSELECT l.name, mintime, l.timestamp, playcount, mintimestamp, Substring(l.server, 1, 3)
FROM (SELECT *
FROM record_race
WHERE map = 'Multeasymap') AS l
JOIN (SELECT name,
Min(time) AS minTime,
Count(*) AS playCount,
Min(timestamp) AS minTimestamp
FROM record_race
WHERE map = 'Multeasymap'
GROUP BY name
ORDER BY mintime ASC
LIMIT 20) AS r
ON l.time = r.mintime
AND l.name = r.name
GROUP BY name
ORDER BY mintime,
l.name;
Here is the query thoughMariaDB [teeworlds]> select l.Name, minTime, l.Timestamp, playCount, minTimestamp, SUBSTRING(l.Server, 1, 3) from (select * from record_race where Map = 'Linear') as l JOIN (select Name, min(Time) as minTime, count(*) as playCount, min(Timestamp) as minTimestamp from record_race where Map = 'Linear' group by Name order by minTime ASC limit 20) as r on l.Time = r.minTime and l.Name = r.Name GROUP BY Name ORDER BY minTime, l.Name;
+---------------+---------+---------------------+-----------+---------------------+---------------------------+
| Name | minTime | Timestamp | playCount | minTimestamp | SUBSTRING(l.Server, 1, 3) |
+---------------+---------+---------------------+-----------+---------------------+---------------------------+
| president | 37.44 | 2024-09-29 03:00:16 | 2117 | 2024-09-29 01:45:02 | GER |
| Nephritis | 38.44 | 2024-09-08 20:04:48 | 2064 | 2024-01-17 13:32:48 | RUS |
| 63 turtles | 39.04 | 2024-08-31 00:24:28 | 212 | 2023-06-10 23:44:55 | RUS |
| EH OS GURI | 39.24 | 2023-01-08 21:11:16 | 1965 | 2023-01-04 00:01:21 | BRA |
| boss | 40.04 | 2024-09-14 19:59:14 | 76 | 2024-06-22 13:53:57 | GER |
| shadowchet | 40.28 | 2023-08-07 11:12:29 | 631 | 2022-06-09 03:00:52 | IRN |
| -SIKE | 40.34 | 2023-08-07 11:05:57 | 124 | 2022-04-14 10:48:29 | IRN |
| Fera | 40.42 | 2021-01-16 18:43:59 | 80 | 2020-10-23 16:53:17 | BRA |
| pv | 40.42 | 2021-01-16 19:01:03 | 1405 | 2020-10-20 22:50:25 | BRA |
| Ɗepғořce | 40.46 | 2024-09-16 21:02:57 | 104 | 2024-03-23 17:01:46 | RUS |
| Đespiᴛe | 40.62 | 2024-09-09 23:44:06 | 25 | 2024-08-13 12:01:30 | GER |
| Loonex | 40.74 | 2021-01-13 04:20:13 | 63 | 2020-10-17 23:49:59 | BRA |
| Bemowi | 40.76 | 2024-09-24 04:26:08 | 88 | 2024-06-03 22:20:14 | USA |
| coradax | 40.94 | 2020-10-18 11:32:23 | 71 | 2020-10-10 16:00:18 | GER |
| PapotaV | 41 | 2024-10-06 02:57:35 | 574 | 2021-03-16 04:55:27 | USA |
| Weryxs | 41.42 | 2024-09-14 00:37:13 | 335 | 2024-06-27 23:58:55 | GER |
| misstrip noob | 41.48 | 2024-07-11 00:38:55 | 5 | 2021-10-05 12:24:07 | USA |
| Cougar~ | 41.6 | 2021-01-08 17:13:37 | 4 | 2020-10-18 16:47:55 | BRA |
| FAIRUS | 41.66 | 2024-09-13 23:03:39 | 130 | 2021-09-05 10:35:33 | RUS |
| godly | 41.7 | 2024-06-08 13:58:35 | 1101 | 2023-10-08 16:31:31 | GER |
+---------------+---------+---------------------+-----------+---------------------+---------------------------+
20 rows in set (5 min 3.551 sec)
#include <stdio.h>
int main(void) {
void *x = &x;
// We need an explicit cast for &x here, since printf is a
// varargs function.
printf("x = %p, &x = %p\n", x, (void*)&x);
}
And with GCC 14.2.0, this does indeed work, with zero warnings with the flags -std=c23 -Wall -Wextra -pedantic! #include <stdio.h>
int main(void) {
void *x = &x;
// We need an explicit cast for &x here, since printf is a
// varargs function.
printf("x = %p, &x = %p\n", x, (void*)&x);
}
And with GCC 14.2.0, this does indeed work, with zero warnings with the flags -std=c23 -Wall -Wextra -pedantic! sendto(fs, buffer, final_size, 0, &this->sock_addr, 16)
❤️SELECT l.name, mintime, l.timestamp, playcount, mintimestamp, Substring(l.server, 1, 3)
FROM (SELECT *
FROM record_race
WHERE map = 'Multeasymap') AS l
JOIN (SELECT name,
Min(time) AS minTime,
Count(*) AS playCount,
Min(timestamp) AS minTimestamp
FROM record_race
WHERE map = 'Multeasymap'
GROUP BY name
ORDER BY mintime ASC
LIMIT 20) AS r
ON l.time = r.mintime
AND l.name = r.name
GROUP BY name
ORDER BY mintime,
l.name;
Here is the query though dyld[28513]: Library not loaded: /nix/store/9qcrq72n5qvfx1skajjnw4067bsv2d5c-ddnet-18.4/lib/libsteam_api.dylib
Referenced from: <8FFD8DC0-2313-3485-9855-CB77FB0F038F> /nix/store/9qcrq72n5qvfx1skajjnw4067bsv2d5c-ddnet-18.4/bin/DDNet
Reason: tried: '/nix/store/9qcrq72n5qvfx1skajjnw4067bsv2d5c-ddnet-18.4/lib/libsteam_api.dylib' (no such file), '/System/Volumes/Preboot/Cryptexes/OS/nix/store/9qcrq72n5qvfx1skajjnw4067bsv2d5c-ddnet-18.4/lib/libsteam_api.dylib' (no such file), '/nix/store/9qcrq72n5qvfx1skajjnw4067bsv2d5c-ddnet-18.4/lib/libsteam_api.dylib' (no such file), '/usr/local/lib/libsteam_api.dylib' (no such file), '/usr/lib/libsteam_api.dylib' (no such file, not in dyld cache)
I couldn't find anything in the codebase that would link against libsteam_api.dylib
on macOS (edited)<prefix>/lib/ddnet/
while the binary only looks in <prefix>/lib/
(edited)<prefix>/lib/ddnet
but I might try to fix it in CMake directlyclient_data7::g_pData->m_NumImages
times by calling RenderLoading
:
https://github.com/ddnet/ddnet/blob/8290db97b80082f10dcbece183bd5eda5ad1e8c2/src/game/client/gameclient.cpp#L388-L395
However, the total loading amount does not include the 0.7 images:
https://github.com/ddnet/ddnet/blob/8290db97b80082f10dcbece183bd5eda5ad1e8c2/src/game/client/components/menus.cpp#L899
This causes the loading bar to overflow, although this is only visible w...