Guild icon
DDraceNetwork
Development / developer
Development discussion. Logged to https://ddnet.org/irclogs/ Connected with DDNet's IRC channel, Matrix room and GitHub repositories — IRC: #ddnet on Quakenet | Matrix: #ddnet-developer:matrix.org GitHub: https://github.com/ddnet
Between 2024-08-08 00:00 and 2024-08-09 00:00
Avatar
Avatar
Tater
this doesn't work because then the server cant verify that your password is the same as the one saved in the database
heinrich5991 2024-08-08 00:08
that actually works with zero knowledge proofs ^^ (edited)
00:08
crypto magic
00:08
but I know nothing that implements that
00:09
you're correct that everyone is just sending the encrypted password via TLS
Avatar
GitHub BOT 2024-08-08 00:11
I think this will good on the client for verify ger10 servers.

Checklist

  • [ ] Tested the change ingame
  • [ ] Provided screenshots if it is a visual change
  • [ ] Tested in combination with possibly related configuration options
  • [ ] Written a unit test (especially base/) or added coverage to integration test
  • [ ] Considered possible null pointers and out of bounds array indexing
  • [ ] Changed no physics that affect existing maps
  • [ ] Tested the change with [ASan+UBSan or val...
Avatar
Avatar
GitHub
Click to see attachment 🖼️
It's easier on discord so i'll tell you here. First of all since , all static variables should be prefixed with s_ not m_. m_ is reserved for member variables of a class or struct. The two variables m_Verified and m_VerifyTries should be member variables of the class CMenus in this case. the output ofpGet->Result(cChar, cSize); is never used anywhere and you don't actually need the result so just remove that. (You can also look at CHttpRequest::Results intended usage if you want to since how you use it is not correct, you can find an example here: https://github.com/ddnet/ddnet/blob/9be9a902e7f3e9cd5418823ef88b70e32dd797af/src/engine/shared/http.cpp#L427-L433.). A return statement is not necessary at the end a void type function. Also move auto Time = std::chrono::duration_cast<std::chrono::milliseconds>(time_get_nanoseconds() - StartTime); into the else block and mark it const since it is never modified and is not used outside of the else block. Don't forget to format your code with something like clang-tidy and squash your commits. maybe i missed some things or said smth wrong, correct me if so (edited)
00:51
@Mazty
Avatar
discord code review
01:01
i fear this small window would delete all my text and randomly close. i don't trust it
01:02
is there a way to maximize it? xd
Avatar
no but it wont
Avatar
heinrich5991 2024-08-08 01:02
it doesn't lose your text even if you navigate away
01:03
you can also annotate individual lines. if you don't like the review form, you could also leave a normal comment
Avatar
i will sleep gn
Avatar
heinrich5991 2024-08-08 01:04
nighty night
Avatar
Avatar
Teero
It's easier on discord so i'll tell you here. First of all since , all static variables should be prefixed with s_ not m_. m_ is reserved for member variables of a class or struct. The two variables m_Verified and m_VerifyTries should be member variables of the class CMenus in this case. the output ofpGet->Result(cChar, cSize); is never used anywhere and you don't actually need the result so just remove that. (You can also look at CHttpRequest::Results intended usage if you want to since how you use it is not correct, you can find an example here: https://github.com/ddnet/ddnet/blob/9be9a902e7f3e9cd5418823ef88b70e32dd797af/src/engine/shared/http.cpp#L427-L433.). A return statement is not necessary at the end a void type function. Also move auto Time = std::chrono::duration_cast<std::chrono::milliseconds>(time_get_nanoseconds() - StartTime); into the else block and mark it const since it is never modified and is not used outside of the else block. Don't forget to format your code with something like clang-tidy and squash your commits. maybe i missed some things or said smth wrong, correct me if so (edited)
lol
Avatar
ok that's hella disrespectful lol
03:22
he's taking the time to review ur code and u just say lol
03:22
w/e you'll hear the same shit from heinrich and u know it won't get merged unless u fix it
Avatar
morning fellas howdy (edited)
Avatar
Avatar
Ryozuki
morning fellas howdy (edited)
Gm
Avatar
Morning nix enjoyers and others
👋 2
Avatar
Avatar
Ewan
he's taking the time to review ur code and u just say lol
Perhaps the lol was because discord code review is unusual? 🙃
Avatar
catxplosion on my way to becoming godot contributors vibe
😍 1
06:31
their editor seriously needs some UX works
f3 1
Avatar
Avatar
meloƞ
Morning nix enjoyers and others
Gm
Avatar
Avatar
TsFreddie
their editor seriously needs some UX works
Gm
Avatar
norming
Avatar
Avatar
Learath2
Perhaps the lol was because discord code review is unusual? 🙃
Maybe had he followed up addressing any of the issues lol
Avatar
Avatar
Ryozuki
morning fellas howdy (edited)
american bait
Avatar
is howdy reserved for merica
Avatar
ye i sent this some time ago xdd
06:38
TRACTOR
Avatar
Ah, must’ve missed it
Avatar
im doing something unusual
Avatar
Us best country 🦅
Avatar
Avatar
Learath2
Ah, must’ve missed it
it's new to me. (it's not actualy)
Avatar
Avatar
Ryozuki
im doing something unusual
MilkeeyCat 2024-08-08 06:39
is it written in rust?
Avatar
Avatar
MilkeeyCat
is it written in rust?
Avatar
Avatar
Ryozuki
im doing something unusual
awesome
06:41
Note: Valence is currently undergoing a major rewrite. See #620 for details.
Avatar
Avatar
Ewan
Note: Valence is currently undergoing a major rewrite. See #620 for details.
red flag
06:43
whitespace-only diff with word wrap... justatest
Avatar
Avatar
Ewan
whitespace-only diff with word wrap... justatest
I was the original chillerdragon
Avatar
GitHub BOT 2024-08-08 07:05
On latest nightly when holding down binds, the bind only activates once. This is quite annoying when trying to zoom out.
Avatar
MilkeeyCat 2024-08-08 07:15
pub trait ArchitectureClone { fn clone_box(&self) -> Arch; } pub trait Architecture: ArchitectureClone { ... } pub type Arch = Box<dyn Architecture>; impl<T> ArchitectureClone for T where T: 'static + Architecture + Clone, { fn clone_box(&self) -> Arch { Box::new(self.clone()) } } impl Clone for Arch { fn clone(&self) -> Self { self.clone_box() } } the most "advanced" rust code I've written so far just to be able to clone trait object justatest (edited)
Avatar
ws-client BOT 2024-08-08 07:48
<ChillerDragon> i just tried writing into the r7 register justatest
Avatar
Ирисочка 2024-08-08 08:05
is there any way to make a script for ddnet that will use commands in the console? for example, I want to make it so that when the time changes, my nickname changes for that time
08:06
or not allowed?
Avatar
ws-client BOT 2024-08-08 08:12
<ChillerDragon> @Ирисочка I am not a lawyer. And this is not legal advice. But ddnet generally bans automating inputs. While usually allowing everything that is possible with the official client.
Avatar
Ирисочка 2024-08-08 08:13
ah ok
Avatar
ws-client BOT 2024-08-08 08:13
<ChillerDragon> One thing that is possible with the official client is using a external scripting language to check the time and then send a console command to the client via fifo
08:13
<ChillerDragon> i would not consider changing the nickname "automating inputs" but not sure if that will hold up in court
Avatar
Ирисочка 2024-08-08 08:13
that is, other clients such as cactus are also banned?
Avatar
ws-client BOT 2024-08-08 08:13
<ChillerDragon> i do not know cactus client
08:13
<ChillerDragon> wat it do
Avatar
Ирисочка 2024-08-08 08:14
change visual effects
Avatar
ws-client BOT 2024-08-08 08:14
<ChillerDragon> thats fine
Avatar
MilkeeyCat 2024-08-08 08:14
chillerdragon: how's the asmr client doing?
Avatar
Anything Not altering gameplay to your Advantage in any way is tolerated for noe, you changing your Name every Minute might be Seen as Spam and If reported could get you muted i guess
Avatar
MilkeeyCat 2024-08-08 08:16
can I report tees who change colors when they press a/d
Avatar
Ирисочка 2024-08-08 08:16
lol no
08:16
this is console command
08:16
f1
08:16
binds (edited)
Avatar
ws-client BOT 2024-08-08 08:17
<ChillerDragon> @MilkeeyCat im stuck on huffman since a few days
08:17
<ChillerDragon> i now am in the print driven debugging stage but the only bugs i find are in my printers
Avatar
Avatar
ws-client
<ChillerDragon> @MilkeeyCat im stuck on huffman since a few days
You have 39272 languages to choose from where someone implemented huffmann justatest
Avatar
Avatar
ws-client
<ChillerDragon> i now am in the print driven debugging stage but the only bugs i find are in my printers
MilkeeyCat 2024-08-08 08:17
understandable
Avatar
ws-client BOT 2024-08-08 08:18
<ChillerDragon> Yes I mostly look at the official C++ implementation because its closest to assembly @meloƞ
Avatar
Fair enough
Avatar
ws-client BOT 2024-08-08 08:18
<ChillerDragon> I slowly get the feeling tho that my asm skills progressed
Avatar
MilkeeyCat 2024-08-08 08:19
tries to write into r7
Avatar
ws-client BOT 2024-08-08 08:19
<ChillerDragon> -.-
08:19
<ChillerDragon> i was looking for some register i did not use yet in that function xd
08:19
<ChillerDragon> r7 seemed like a good option
Avatar
MilkeeyCat 2024-08-08 08:19
use stack xd
Avatar
ws-client BOT 2024-08-08 08:19
<ChillerDragon> yeye
Avatar
MilkeeyCat 2024-08-08 08:19
or call malloc xd
Avatar
ws-client BOT 2024-08-08 08:20
<ChillerDragon> I actually became more comfortable with using the stack
08:20
<ChillerDragon> no i dont depend on libc
08:20
<ChillerDragon> cuz bloat
Avatar
milkeey hmu when your language is good enough that i'm able to write huffmann in it
Avatar
MilkeeyCat 2024-08-08 08:20
i don't feel comfortable with raw dawging stack
Avatar
ws-client BOT 2024-08-08 08:20
<ChillerDragon> wait or is malloc a system call?
Avatar
MilkeeyCat 2024-08-08 08:20
i always confute top and bottom of the stack xddd
Avatar
ws-client BOT 2024-08-08 08:21
<ChillerDragon> ye directions are a bit wonkey
Avatar
ws-client BOT 2024-08-08 08:21
<ChillerDragon> my bigger problem is the maffs
Avatar
MilkeeyCat 2024-08-08 08:21
ooooh ye
Avatar
ws-client BOT 2024-08-08 08:21
<ChillerDragon> + and - of numbers from 1-8 are crazy complicated
Avatar
chillerdragon BOT 2024-08-08 08:22
@MilkeeyCat: looks like libc
Avatar
ws-client BOT 2024-08-08 08:24
<ChillerDragon> @Ирисочка https://zillyhuhn.com/cs/.1723105363.png
Avatar
Ирисочка 2024-08-08 08:24
wow
08:24
what it this
Avatar
Avatar
ws-client
MilkeeyCat 2024-08-08 08:25
cool names justatest
Avatar
ws-client BOT 2024-08-08 08:25
<ChillerDragon> me changing my name to "pidor" then changing it 3 seconds later to the current date using a script
Avatar
Ирисочка 2024-08-08 08:25
wow
Avatar
ws-client BOT 2024-08-08 08:25
<ChillerDragon> i chose bash as my scripting language but you can also use python or whatever works for you
Avatar
Ирисочка 2024-08-08 08:25
and how to connect to ddnet?
Avatar
Its fifo, (File Input File Output) it basically executes what you Send the Client through it, ddnet automatically opens a fifo Server with which you can communicate with it, (Open your Client, Press F1 and Search for fifo
Avatar
ws-client BOT 2024-08-08 08:26
<ChillerDragon> via fifp
08:26
<ChillerDragon> FIFO
Avatar
FIIIFO
Avatar
ws-client BOT 2024-08-08 08:26
<ChillerDragon> put cl_input_fifo fifofile.fifo in your config and write to that file from your script
Avatar
MilkeeyCat 2024-08-08 08:26
will the tee jump if you use +jump?
Avatar
Ирисочка 2024-08-08 08:27
hard im dont know how
Avatar
Can batch files be executed from the f1 console?
08:28
kinda like cfg files
Avatar
Ирисочка 2024-08-08 08:30
where im can download visual studio lol?
Avatar
ws-client BOT 2024-08-08 08:30
<ChillerDragon> @MilkeeyCat no the + stuff is cursed
08:30
<ChillerDragon> so there is no botting possible with the console. Which is a feature.
Avatar
MilkeeyCat 2024-08-08 08:30
feelsbadman
Avatar
ws-client BOT 2024-08-08 08:31
<ChillerDragon> @Sans yes
08:31
<ChillerDragon> wait what
08:31
<ChillerDragon> not batch files
08:31
<ChillerDragon> i red "ban files" xd
Avatar
Avatar
ws-client
<ChillerDragon> not batch files
think_bot
Avatar
ws-client BOT 2024-08-08 08:32
<ChillerDragon> the ddnet console can not launch anything other than config files and your browser
Avatar
Avatar
Ирисочка
where im can download visual studio lol?
You dont need to Code it
08:32
(in c++)
Avatar
MilkeeyCat 2024-08-08 08:33
true, all you need is neovim greenthing
Avatar
Ирисочка 2024-08-08 08:33
not if I want to learn how to write Python scripts.
08:33
and more languages
Avatar
Avatar
Ирисочка
not if I want to learn how to write Python scripts.
A Text Editor is all you need, visual Studio is Specialized for the C lang family (edited)
08:34
Get one with LSP Support (vsc, sublime Text)
Avatar
Ирисочка 2024-08-08 08:35
lol
08:36
im silly
Avatar
Ирисочка 2024-08-08 08:36
what
08:36
im activated idk
08:36
how to disable it
Avatar
Ctrl+shift+D
Avatar
Ирисочка 2024-08-08 08:36
ty
08:43
I wrote the cl_input_fifo test.fifo in the console and how to turn it off?
08:44
ah
08:44
im founded
Avatar
Avatar
MilkeeyCat
pub trait ArchitectureClone { fn clone_box(&self) -> Arch; } pub trait Architecture: ArchitectureClone { ... } pub type Arch = Box<dyn Architecture>; impl<T> ArchitectureClone for T where T: 'static + Architecture + Clone, { fn clone_box(&self) -> Arch { Box::new(self.clone()) } } impl Clone for Arch { fn clone(&self) -> Self { self.clone_box() } } the most "advanced" rust code I've written so far just to be able to clone trait object justatest (edited)
heinrich5991 2024-08-08 08:49
sounds like you want an Arc<dyn Architecture> instead
Avatar
Avatar
heinrich5991
sounds like you want an Arc<dyn Architecture> instead
MilkeeyCat 2024-08-08 08:52
I guess i can use Rc, my program is not multi threaded
Avatar
heinrich5991 2024-08-08 08:52
that also works
Avatar
MilkeeyCat 2024-08-08 08:54
There're just moments when borrow chekers yaps that I can't call a function because value is borrowed from previous call. I just slap .clone()
Avatar
Ирисочка 2024-08-08 08:57
youtube dont work in russia now:(
Avatar
Avatar
MilkeeyCat
There're just moments when borrow chekers yaps that I can't call a function because value is borrowed from previous call. I just slap .clone()
heinrich5991 2024-08-08 08:57
but the architecture is a thing that shouldn't change over the runtime of the program, right? then Rc<> is usually preferable
Avatar
Ирисочка 2024-08-08 08:59
where to find the scripting manual in ddnet
Avatar
Avatar
ws-client
<ChillerDragon> the ddnet console can not launch anything other than config files and your browser
sadness
09:10
lua support when
09:10
:))
Avatar
Jupstar ✪ 2024-08-08 09:10
someone called the lua police
Avatar
perhaps
Avatar
isn't adding lua basically adding native botting support lol (edited)
Avatar
Jupstar ✪ 2024-08-08 09:11
as long as lua scripts cannot send network packages and alter input
Avatar
heinrich5991 2024-08-08 09:11
depends on whether you give lua access to input
Avatar
Jupstar ✪ 2024-08-08 09:11
it can work
09:12
but lua suggs
Avatar
Biggest thing I want for binds is some sort of logic, basic if statements at least
Avatar
Jupstar ✪ 2024-08-08 09:12
lmao
Avatar
Avatar
Jupstar ✪
but lua suggs
what's your preferred embedded scipting lang
Avatar
Jupstar ✪ 2024-08-08 09:12
u want cheating
Avatar
Avatar
TsFreddie
what's your preferred embedded scipting lang
Jupstar ✪ 2024-08-08 09:12
best is ofc native, but after that wasm
Avatar
dummy bind gonna be wild after lua
Avatar
Avatar
Jupstar ✪
u want cheating
how would that result into cheating? Thonk I just wanna make a fancy ahh bind menu
Avatar
Avatar
Jupstar ✪
best is ofc native, but after that wasm
can you even embed native code? well i guess as dyn lib
Avatar
heinrich5991 2024-08-08 09:13
you can probably do that with config files today
Avatar
Avatar
Sans
how would that result into cheating? Thonk I just wanna make a fancy ahh bind menu
Jupstar ✪ 2024-08-08 09:13
well what can the if check. ifs allow jumping
09:13
that is already a huge tool
09:14
with exec you can probably even do loops
Avatar
heinrich5991 2024-08-08 09:14
yup
Avatar
Jupstar ✪ 2024-08-08 09:14
conditional*
Avatar
is teeworlds console turing complete
Avatar
Avatar
TsFreddie
can you even embed native code? well i guess as dyn lib
Jupstar ✪ 2024-08-08 09:15
yeah theoretically that ofc works. i think it might even make sense to allow that for server side mods, bcs it won't loose as much performance to vms, but yeah native is always risky ^^
Avatar
Avatar
Jupstar ✪
but lua suggs
Lua is hot tho
Avatar
Avatar
Learath2
Lua is hot tho
Jupstar ✪ 2024-08-08 09:16
you come to lua jail
Avatar
Avatar
TsFreddie
is teeworlds console turing complete
I do not think so
Avatar
Avatar
Jupstar ✪
yeah theoretically that ofc works. i think it might even make sense to allow that for server side mods, bcs it won't loose as much performance to vms, but yeah native is always risky ^^
server issued native infinite loop
Avatar
Avatar
Learath2
Lua is hot tho
Jupstar ✪ 2024-08-08 09:16
your pc is hot running lua, that i agree with
Avatar
Avatar
Jupstar ✪
your pc is hot running lua, that i agree with
I paid for every transistor. I'll use every transistor
Avatar
Avatar
Jupstar ✪
your pc is hot running lua, that i agree with
factorio mods plsnomore
Avatar
Jupstar ✪ 2024-08-08 09:17
ah the factario gang
Avatar
Avatar
Jupstar ✪
yeah theoretically that ofc works. i think it might even make sense to allow that for server side mods, bcs it won't loose as much performance to vms, but yeah native is always risky ^^
honestly if native is perferred for mod, might as well just start with source code anyway
Avatar
Jupstar ✪ 2024-08-08 09:17
that game is like 200 years old
09:17
they didnt even have wasm back then
09:17
xddd
Avatar
is wasm that much faster?
Avatar
Avatar
TsFreddie
honestly if native is perferred for mod, might as well just start with source code anyway
Jupstar ✪ 2024-08-08 09:17
sure, but it's maybe nice to have hot reloading and shit
Avatar
Avatar
TsFreddie
is wasm that much faster?
Jupstar ✪ 2024-08-08 09:17
wasm is fastest in the west
09:18
faster than his shadow
Avatar
heinrich5991 2024-08-08 09:18
a problem of wasm is that you kinda need a toolchain installed to code with it. with lua, you can start with a text editor
Avatar
Avatar
Jupstar ✪
wasm is fastest in the west
i imagine it still depends on whether you jit it?
Avatar
Avatar
heinrich5991
a problem of wasm is that you kinda need a toolchain installed to code with it. with lua, you can start with a text editor
Jupstar ✪ 2024-08-08 09:18
i mean u need a lua interpreter 😄
Avatar
Avatar
TsFreddie
i imagine it still depends on whether you jit it?
Jupstar ✪ 2024-08-08 09:19
no, lua looses, wasm is king
09:19
there was a benchmark site
09:19
maybe i find it
Avatar
Avatar
Jupstar ✪
i mean u need a lua interpreter 😄
heinrich5991 2024-08-08 09:19
but that ships with the game. we should have a similar good story for end users should we add wasm, IMO
Avatar
Avatar
TsFreddie
i imagine it still depends on whether you jit it?
Jupstar ✪ 2024-08-08 09:19
benchmarks,benchmark,performance,binarytrees,coro-prime-sieve,edigits,fannkuch-redux,fasta,helloworld,lru,mandelbrot,merkletrees,nbody,nsieve,pidigits,secp256k1,spectral-norm,Wasm,Wasm lang,Lua,Lua lang
09:20
here it even looses against wasmtime, that isnt even the fastest wasm runtime
Avatar
vercel
Avatar
Avatar
heinrich5991
but that ships with the game. we should have a similar good story for end users should we add wasm, IMO
Jupstar ✪ 2024-08-08 09:20
what do you mean? the wasm compiler ofc ships too
Avatar
oof our company blocked all vercel apps apparently
Avatar
Jupstar ✪ 2024-08-08 09:21
benchmarks,benchmark,performance,binarytrees,coro-prime-sieve,edigits,fannkuch-redux,fasta,helloworld,lru,mandelbrot,merkletrees,nbody,nsieve,pidigits,secp256k1,spectral-norm,Wasm,Wasm lang,Lua,Lua lang
09:21
there was a time where that worked lol
Avatar
Avatar
Jupstar ✪
what do you mean? the wasm compiler ofc ships too
heinrich5991 2024-08-08 09:21
the end user can just edit a lua script. I'd like a similarly good story for a wasm backend
Avatar
Avatar
heinrich5991
the end user can just edit a lua script. I'd like a similarly good story for a wasm backend
Jupstar ✪ 2024-08-08 09:22
they can just code wasm
Avatar
heinrich5991 2024-08-08 09:22
how? edit a binary?
Avatar
Jupstar ✪ 2024-08-08 09:22
yeah
Avatar
heinrich5991 2024-08-08 09:22
well, no
Avatar
Jupstar ✪ 2024-08-08 09:22
yeah but you are just lua fanboy and do your arguments again.. installing rust compiler is ez af and as said, the wasm runtime can also host a lua runtime
09:22
if u want lua, do it in wasm
Avatar
is wat runnable or it still needs to be compiled.
09:23
wat is text right?
Avatar
Avatar
TsFreddie
is wat runnable or it still needs to be compiled.
Jupstar ✪ 2024-08-08 09:23
there is a wat feature u can enable
Avatar
heinrich5991 2024-08-08 09:23
I'm showing that wasm might not be obviously better than lua in every way (edited)
Avatar
Jupstar ✪ 2024-08-08 09:23
A TypeScript-like language for WebAssembly
Avatar
wasm better than wasm
Avatar
Avatar
Jupstar ✪
i was just about to ask whether assemblyscript would be losing the point for using wasm since it needs a GC runtime in wasm
Avatar
Avatar
heinrich5991
I'm showing that wasm might not be obviously better than lua in every way (edited)
Jupstar ✪ 2024-08-08 09:24
you can always find some argument against smth.. i can also ship a full rust compiler with the client.. i just dont do it
09:24
bcs installing rust is ez enough
Avatar
Ирисочка 2024-08-08 09:24
I don't really understand how to write scripts for ddnet in python and what is echo
Avatar
Avatar
TsFreddie
i was just about to ask whether assemblyscript would be losing the point for using wasm since it needs a GC runtime in wasm
Jupstar ✪ 2024-08-08 09:24
do you use assemblyscript? I mean you do lot of typescript dont u?
09:24
maybe u tested it already
Avatar
heinrich5991 2024-08-08 09:24
I'm not sure what to do with "you can always find some argument against something". seems pretty much discussion ending
Avatar
Avatar
Jupstar ✪
do you use assemblyscript? I mean you do lot of typescript dont u?
i used it like twice
09:25
ever
Avatar
Avatar
heinrich5991
I'm not sure what to do with "you can always find some argument against something". seems pretty much discussion ending
Jupstar ✪ 2024-08-08 09:25
yes, that is the goal
09:25
never start discussions with heinrich. you admitted yourself that you purposely do counter arguments
09:25
even if u are not behind them
Avatar
i think that's how discussion works?
Avatar
Avatar
TsFreddie
i think that's how discussion works?
Jupstar ✪ 2024-08-08 09:26
yes, but that is not how getting further works
Avatar
Hmm in lua you just need the source code and the lua interperter/compiler. what do you need in wasm?
Avatar
Avatar
Jupstar ✪
yes, but that is not how getting further works
it's not like we are seriously considering adding scripting to ddnet
09:26
right? (edited)
Avatar
Avatar
Mr.Gh0s7
Hmm in lua you just need the source code and the lua interperter/compiler. what do you need in wasm?
Jupstar ✪ 2024-08-08 09:26
well depends on what your goal is. if u want to code in cpp or rust, you need a cpp or rust compiler
Avatar
Avatar
TsFreddie
right? (edited)
Jupstar ✪ 2024-08-08 09:27
😓
Avatar
i love that people always think heinrich opposes everything.
09:27
justatest
monkaS 1
Avatar
in this case where do lua and wasm differ?
Avatar
heinrich5991 2024-08-08 09:28
for the end user: probably lua is easier to handle
Avatar
Avatar
Mr.Gh0s7
in this case where do lua and wasm differ?
Jupstar ✪ 2024-08-08 09:28
wasm is kinda binary. so the goal is to allow many languages
Avatar
Avatar
Mr.Gh0s7
in this case where do lua and wasm differ?
you need a toolchain to compile something to wasm which is additional work for the user.
Avatar
heinrich5991 2024-08-08 09:28
unless you are a programmer
Avatar
Jupstar ✪ 2024-08-08 09:28
but you can still compile a lua interpreter to wasm and use that inside your wasm module 😄
09:29
so e.g. if we want physics lua intergreation, you can simply do it in rust as you'd do it, and give that wasm module the lua scripts
Avatar
heinrich5991 2024-08-08 09:29
(not luajit though)
Avatar
:O
Avatar
MilkeeyCat 2024-08-08 09:29
can anyone explain why second way doens't work fn main() { let val = Rc::new(0x45u8); foo(val.clone()); } fn foo(mut r: Rc<u8>) { Rc::get_mut(&mut r); // can r.get_mut(); // cant }
Avatar
also lua kinda acts as a twofer since ts2lua exists
09:29
it's quite popular for dota modding
Avatar
Jupstar ✪ 2024-08-08 09:30
but with wasm i can code my shit in rust
Avatar
kinda being the keyword
Avatar
Jupstar ✪ 2024-08-08 09:30
and dont need to learn this ugly language
09:30
biased
Avatar
you can just do server mod in rust as a dyn lib yourself tho
Avatar
Avatar
MilkeeyCat
can anyone explain why second way doens't work fn main() { let val = Rc::new(0x45u8); foo(val.clone()); } fn foo(mut r: Rc<u8>) { Rc::get_mut(&mut r); // can r.get_mut(); // cant }
heinrich5991 2024-08-08 09:30
A single-threaded reference-counting pointer. ‘Rc’ stands for ‘Reference Counted’.
Avatar
if you know rust and native i think you would just do that
Avatar
heinrich5991 2024-08-08 09:30
it takes &mut Rc<T> as an argument, not &mut self
Avatar
Jupstar ✪ 2024-08-08 09:30
i mean i see wasm2lua
09:30
shit
09:31
purge github
09:31
ae05ab2 Add QQ channel to VPN ban page - heinrich5991 8bacb5f Merge pull request #299 from heinrich5991/pr_vpn_qq - edg-l
Avatar
Jupstar ✪ 2024-08-08 09:31
but in any way, now completely unrelated
09:31
the hardest part isnt even lua or wasm
09:31
it's what kind of modding you want
Avatar
heinrich5991 2024-08-08 09:31
true
09:32
languages are just easier for bikeshedding 😦
Avatar
chatgpt explain bikeshedding
Avatar
Jupstar ✪ 2024-08-08 09:32
you can do your modding to have many entry points for modding. like in every function. Or do it module wise (like a whole physics module), that is kinda what i choose
Avatar
hmm I think a good/proper? use case for lua is for scripted/programmable configuration files. how would that in wasm? (the only thing I have that uses lua is my window manager awesomewm which is powerful exacltly because it uses lua and you can pretty much update/code/prorgramm the wm on the fly)
Avatar
Avatar
TsFreddie
chatgpt explain bikeshedding
heinrich5991 2024-08-08 09:32
Avatar
Jupstar ✪ 2024-08-08 09:32
you can probably go even further and only export some generic components like graphics
Avatar
Avatar
Mr.Gh0s7
hmm I think a good/proper? use case for lua is for scripted/programmable configuration files. how would that in wasm? (the only thing I have that uses lua is my window manager awesomewm which is powerful exacltly because it uses lua and you can pretty much update/code/prorgramm the wm on the fly)
scripting config/command kinda sounds like it'll create the most insane dummy binds
Avatar
Avatar
Mr.Gh0s7
hmm I think a good/proper? use case for lua is for scripted/programmable configuration files. how would that in wasm? (the only thing I have that uses lua is my window manager awesomewm which is powerful exacltly because it uses lua and you can pretty much update/code/prorgramm the wm on the fly)
Jupstar ✪ 2024-08-08 09:33
i mean in the end, whatever calls the lua stuff must export/import/share memory with the lua scripts
09:34
and that is also what you do in wasm
Avatar
you know, dota modding requires you to use both js and lua. justatest
Avatar
Jupstar ✪ 2024-08-08 09:34
just that you cannot directly share it. at least the wasm runtime cannot read host memory
Avatar
and valve's own css/xml but those are not programming langauges so i won't mention them ah shoot i did didn't it
Avatar
Avatar
TsFreddie
and valve's own css/xml but those are not programming langauges so i won't mention them ah shoot i did didn't it
Jupstar ✪ 2024-08-08 09:35
what do they need css for
Avatar
UI
Avatar
Jupstar ✪ 2024-08-08 09:36
and that is what they allow to mod?
Avatar
source 2's panorama UI framework is html-like
Avatar
Avatar
Jupstar ✪
and that is what they allow to mod?
you do server side lua script and if you need UI interactions stuff you code client-side panorama user interface
Avatar
Jupstar ✪ 2024-08-08 09:36
ah now i get it
09:36
nice
09:37
i always wonder how secure these self made solutions are
Avatar
and dota modding community made both typings in typescripts, one for ts2lua, one for regular old js
Avatar
Jupstar ✪ 2024-08-08 09:38
Security vulnerabilities related to LUA : List of vulnerabilities affecting any product of this vendor
09:38
no rust no trust that is what ryo would say
Avatar
i think valve is pretty ok on handling securities?
09:38
i would hope so
Avatar
Avatar
TsFreddie
i think valve is pretty ok on handling securities?
heinrich5991 2024-08-08 09:38
no, not at all
Avatar
heinrich5991 2024-08-08 09:39
a friend of mine reported a 1-click RCE in CS:GO, and valve ignored him for years
Avatar
you got some serious friends there
Avatar
heinrich5991 2024-08-08 09:39
or valve is just really shit at security
Avatar
any detail on that RCE
09:40
would be interesting to know
Avatar
heinrich5991 2024-08-08 09:40
not sure if that's fixed already, so no
09:41
still kinda wanna to know valve people
09:41
they seem
09:41
valve
Avatar
Jupstar ✪ 2024-08-08 09:41
they are leaking some steam
Avatar
Ирисочка 2024-08-08 09:43
well, for example, I wrote a python script and how do I import it to ddnet
09:43
I'm sorry I'm silly
Avatar
Avatar
Ирисочка
well, for example, I wrote a python script and how do I import it to ddnet
you can't, there isn't such thing (edited)
09:43
ddnet does not support python
Avatar
Ирисочка 2024-08-08 09:43
what support?
09:44
and what does it support?
Avatar
Avatar
TsFreddie
any detail on that RCE
heinrich5991 2024-08-08 09:44
ah, found a writeup for the thing I thought about: https://secret.club/2021/04/20/source-engine-rce-invite.html
Steam is the most popular PC game launcher in the world. It gives millions of people the chance to play their favorite video games with their friends using the built in friend and party system, so it’s safe to assume most users have accepted an invite at one point or another. There’s no real danger in that, is there? In this blog post, we will l...
09:44
basically, you had to accept an invite to play CS:GO
09:45
then the inviter had RCE on your computer
Avatar
thanks
Avatar
heinrich5991 2024-08-08 09:45
it seems to be patched. I still wouldn't trust valve's security after this
Avatar
i was about to say at least steam seems secure, then you dropped the RCE that exploit source using steam
09:46
think_bot
Avatar
Avatar
heinrich5991
then the inviter had RCE on your computer
huh
Avatar
Avatar
Ирисочка
and what does it support?
Jupstar ✪ 2024-08-08 09:49
are you some kind of AI?
09:49
we talk about modding and you suddenly come with a shitty python script
Avatar
Avatar
Ирисочка
well, for example, I wrote a python script and how do I import it to ddnet
what exactly do you want
Avatar
Avatar
Ирисочка
and what does it support?
heinrich5991 2024-08-08 09:50
you can code ddnet in C++, mostly
09:50
not python
Avatar
jupeey it was so good writing rust after cpp
09:51
explicit copies && implicit moves >>>>> implicit copies
Avatar
heinrich5991 2024-08-08 09:51
yea, I also like that about rust 🙂
Avatar
Avatar
zhn
explicit copies && implicit moves >>>>> implicit copies
Jupstar ✪ 2024-08-08 09:51
that is defs top tier
09:51
as well as using stuff like rayon easily
Avatar
catbite for the love of god someone teach me rust already. my brain is not working just reading the book.
Avatar
feel you
Avatar
Avatar
zhn
huh
heinrich5991 2024-08-08 09:52
not sure what the "huh" says. RCE means that the attacker can do anything on your computer
Avatar
Avatar
TsFreddie
catbite for the love of god someone teach me rust already. my brain is not working just reading the book.
heinrich5991 2024-08-08 09:52
just code something small in rust
Avatar
Avatar
TsFreddie
catbite for the love of god someone teach me rust already. my brain is not working just reading the book.
Jupstar ✪ 2024-08-08 09:52
take some cpp loops convert them to idiomatic rust then add par_iter to it. then u learned rust
Avatar
Avatar
heinrich5991
not sure what the "huh" says. RCE means that the attacker can do anything on your computer
no it was like "huh, they really could let it happen with just one invite, smh"
Avatar
heinrich5991 2024-08-08 09:53
ah ^^
Avatar
Avatar
TsFreddie
catbite for the love of god someone teach me rust already. my brain is not working just reading the book.
in general what works for me is the need to use programming languages and in this case rust else I just don't see the need/use of the things I read and in turn don't learn them
Avatar
too much for 3 symbols i know xd
Avatar
vibe if nintendo games has ACE in it does that means they are bad at security too
09:54
not that NES and SNES have internet connection or anything
Avatar
heinrich5991 2024-08-08 09:54
for non-internet connected stuff, security is usually not important for the end user
09:54
it often even only works against the end user
Avatar
ACE stuff is cool tho
Avatar
heinrich5991 2024-08-08 09:54
yup 🙂
Avatar
Avatar
heinrich5991
it takes &mut Rc<T> as an argument, not &mut self
MilkeeyCat 2024-08-08 09:57
oh, im blind 😬
Avatar
✨千丨乂卂ㄥ乇🍀 2024-08-08 09:57
Тут есть русские?
Avatar
heinrich5991 2024-08-08 09:58
@MilkeeyCat why do you need Rc::get_mut
Avatar
i forgot whether i said it already, but i think wasm and all the metering thing crypto bros made for wasm, it would be pretty good to make a "fantasy console" that runs wasm
09:58
although wasm doesn't really have interrupt so it might be hard to simulate a retro feel with all that timing jank (edited)
Avatar
heinrich5991 2024-08-08 09:58
perhaps Rc was the wrong suggestion to you. I thought dyn Architecture doesn't change after it was created?
Avatar
Avatar
TsFreddie
although wasm doesn't really have interrupt so it might be hard to simulate a retro feel with all that timing jank (edited)
heinrich5991 2024-08-08 09:59
the WASM stack is also not writable with arbitrary memory writes. so in some sense, it's more protected than usual architectures
Avatar
✨千丨乂卂ㄥ乇🍀 2024-08-08 09:59
Help me I was banned by mistake what should I do?
Avatar
heinrich5991 2024-08-08 09:59
#✉-create-a-ticket → ban appeal
Avatar
Avatar
heinrich5991
@MilkeeyCat why do you need Rc::get_mut
MilkeeyCat 2024-08-08 09:59
The inherent methods of Rc are all associated functions, which means that you have to call them as e.g., Rc::get_mut(&mut value) instead of value.get_mut(). This avoids conflicts with methods of the inner type T.
09:59
oops
Avatar
Avatar
heinrich5991
#✉-create-a-ticket → ban appeal
✨千丨乂卂ㄥ乇🍀 2024-08-08 09:59
🫶🏽
Avatar
MilkeeyCat 2024-08-08 10:00
whatver, I just saw this line and thought it's possible to call it like foo.get_mut()
10:00
and was trying to make it work xd
Avatar
Avatar
heinrich5991
the WASM stack is also not writable with arbitrary memory writes. so in some sense, it's more protected than usual architectures
it does allow you to allocate a linear memory buffer for it to act like it's RAM tho? i think that's the part that feels like a console to me, a encloused memory buffer where you can just backup and restore like a emulator so easily.
Avatar
Jupstar ✪ 2024-08-08 10:00
u can also mutably modify your stuff and then move it into Rc
10:01
but once it is inside the reference counter u must be careful
10:01
count of 2 means u cannot get it mutable anymore
Avatar
Avatar
TsFreddie
it does allow you to allocate a linear memory buffer for it to act like it's RAM tho? i think that's the part that feels like a console to me, a encloused memory buffer where you can just backup and restore like a emulator so easily.
heinrich5991 2024-08-08 10:02
not sure if it allows dynamic allocation these days. it used to only allow you to declare hwo much linear memory you want to have for the entire lifetime of your program
Avatar
Avatar
heinrich5991
not sure if it allows dynamic allocation these days. it used to only allow you to declare hwo much linear memory you want to have for the entire lifetime of your program
but that's literally a retro console?
Avatar
heinrich5991 2024-08-08 10:03
ah, well then 🙂
Avatar
Jupstar ✪ 2024-08-08 10:04
they think about multi memory instances. but 1. llvm has no support for it, 2. it defs increases complexity. But that could give some performance speedups
Avatar
like put random jank in a linear memory buffer. write some code that treats first few kb as PPU VRAM, next few kb as sound chip data. pull from that every frame to display and produce sound. then run a wasm in that memory space, then wasm is just the ROM. (edited)
10:06
catxplosion
Avatar
Avatar
TsFreddie
it does allow you to allocate a linear memory buffer for it to act like it's RAM tho? i think that's the part that feels like a console to me, a encloused memory buffer where you can just backup and restore like a emulator so easily.
Jupstar ✪ 2024-08-08 10:07
i mean in the end that is what real ram kinda does too xd so everything is a console? Xd
Avatar
Avatar
heinrich5991
perhaps Rc was the wrong suggestion to you. I thought dyn Architecture doesn't change after it was created?
MilkeeyCat 2024-08-08 10:07
also, Architecture has methods which take &mut self, because it has buffer which it writes generated code to (edited)
Avatar
heinrich5991 2024-08-08 10:08
ah, then Rc was probably the wrong suggestion to you, unless you want ot make that buffer a parameter
Avatar
Avatar
Jupstar ✪
i mean in the end that is what real ram kinda does too xd so everything is a console? Xd
i mean making a fantasy console is probably just how you layout the memory and what limitation do you intentionally impose i guess. like PICO-8
10:09
but PICO-8 runs lua which basically mean it is a retro console that has infinite heap memory which is meh (edited)
Avatar
Jupstar ✪ 2024-08-08 10:10
mh i can only tell you that modern wasm allows normal allocations.. it's the VMs task to deal with it
10:10
there is a max RAM parameter, but other than that you dont notice it
10:10
or llvm task
Avatar
heinrich5991 2024-08-08 10:10
ah. there's dynamic allocation nowadays?
Avatar
✨千丨乂卂ㄥ乇🍀 2024-08-08 10:10
@Fussel thank you very much ❤️
😳 1
Avatar
weird
Avatar
Avatar
heinrich5991
ah. there's dynamic allocation nowadays?
Jupstar ✪ 2024-08-08 10:11
you just compile your rust code and it works xdd so yes
Avatar
i thought wasm reads/writes on a fixed byte buffer
Avatar
Jupstar ✪ 2024-08-08 10:11
it's not like u have to use no_std or smth
Avatar
Avatar
TsFreddie
i thought wasm reads/writes on a fixed byte buffer
Jupstar ✪ 2024-08-08 10:11
it's linear memory
10:11
but it can increase
10:11
grow
Avatar
just don't let it grow then
10:11
justatest
10:12
you can probably do anything in the runtime. which is what i imagine what you need to do to impose limitations.
10:13
it would probably just means you need to make sure compiler does not treat "important" part of the linear memory as heap
Avatar
Jupstar ✪ 2024-08-08 10:13
if it can't grow and you use data structures like Vec. it will simply panic i guess
10:14
if you want it to be like embedded, then no_std
Avatar
Avatar
Jupstar ✪
if it can't grow and you use data structures like Vec. it will simply panic i guess
i imagine rust would make itself a heap in the linear memory, the memory is limited but rust can make the heap grow in that limited space until it crashes?
Avatar
Jupstar ✪ 2024-08-08 10:14
good luck xd
Avatar
Avatar
TsFreddie
i imagine rust would make itself a heap in the linear memory, the memory is limited but rust can make the heap grow in that limited space until it crashes?
Jupstar ✪ 2024-08-08 10:15
sure, it's just like a normal program
Avatar
it is a normal program
Avatar
Jupstar ✪ 2024-08-08 10:15
if you out of ram, you're doomed
Avatar
that's literally what ROMs are?
Avatar
heinrich5991 2024-08-08 10:15
the linux kernel improves rust's ability to handle OOM
10:15
it's quite cool 🙂
Avatar
Avatar
heinrich5991
the linux kernel improves rust's ability to handle OOM
how exactly?
Avatar
Jupstar ✪ 2024-08-08 10:16
download ram
Avatar
assemblyscript has compile options to make sure it's runtime does not touch anything in a specific memory region (edited)
10:16
i think rust might have that too?
Avatar
Avatar
TsFreddie
assemblyscript has compile options to make sure it's runtime does not touch anything in a specific memory region (edited)
Jupstar ✪ 2024-08-08 10:16
ah but that is only for "security", i guess?
Avatar
Avatar
TsFreddie
i think rust might have that too?
Jupstar ✪ 2024-08-08 10:16
i dont think so
10:16
using unsafe you can read anything u want
Avatar
Avatar
Jupstar ✪
ah but that is only for "security", i guess?
is it? i thought it was for sharing existing buffer data
Avatar
Jupstar ✪ 2024-08-08 10:16
ofc only from the guest memory (edited)
Avatar
Avatar
zhn
how exactly?
heinrich5991 2024-08-08 10:17
the linux kernel wants to be able to handle OOM situations, since it wants to use rust in the kernel, rust gets new facilities for handling OOM 🙂 win-win
Avatar
and of course assemblyscript and just create unsafe pointer willynilly
Avatar
Avatar
TsFreddie
is it? i thought it was for sharing existing buffer data
Jupstar ✪ 2024-08-08 10:17
the host can always read the guest memory, other way around never. Or what do you mean?
10:17
maybe i dont understand you
Avatar
Avatar
heinrich5991
the linux kernel wants to be able to handle OOM situations, since it wants to use rust in the kernel, rust gets new facilities for handling OOM 🙂 win-win
ah, that way
10:17
ye sounds reasonable
Avatar
Avatar
Jupstar ✪
the host can always read the guest memory, other way around never. Or what do you mean?
you can put data when you create that memory buffer
10:18
"sharing", like you put them there.
Avatar
Avatar
TsFreddie
you can put data when you create that memory buffer
Jupstar ✪ 2024-08-08 10:18
so it's kinda a read-only buffer?
Avatar
Avatar
Jupstar ✪
so it's kinda a read-only buffer?
wasm can still overwrite them i believe
10:19
it's just a initial state
Avatar
Jupstar ✪ 2024-08-08 10:19
so it's simply to pre-allocate memory?
Avatar
isn't it always like that
10:19
at least in browser
Avatar
Jupstar ✪ 2024-08-08 10:19
i dunno why assemblyscript has such concept, but i don't think it's related to wasm directly
10:20
maybe they just want to act like some javascript runtime
10:20
allocate 2gb ram
10:20
and never use it
Avatar
justatest so you can just create unsafe pointer for specific purposes?
10:21
it's just raw memory, do whatever you want kinda thing
Avatar
Jupstar ✪ 2024-08-08 10:21
well unsafe inside a wasm module means, u can destroy the module itself
10:21
but not the host
10:21
it's raw wasm memory
Avatar
not limited to assemblyscript obviously
Avatar
Jupstar ✪ 2024-08-08 10:21
it's fake memory xD
Avatar
i know (edited)
10:21
but isn't that perfect for simulating a console's memory
10:21
justatest
10:21
wait why am I the one talking about wasm. i should be the one that knows nothing about it
Avatar
Jupstar ✪ 2024-08-08 10:23
well maybe i never understood your initial idea of a console. but yeah, just see wasm as, do whatever you want. You can also exec a vulkan driver inside it. but that doesnt mean it can communicate with real hardware lmao
10:23
so you can also simulate a console or whatever
Avatar
catxplosion what i'm thinking is there are some virutal chips that read/writes a set region of memory for specific purposes, like a controller writing state in a region, a PPU/GPU that reads in another region. Then run a wasm in that fixed memory space along with those two piece of real-time code ("virtual chip lmao"), and you have a game console
10:25
not like writing a emulator in wasm
10:26
the wasm binary itself is the game rom. but there are other things interacting with the same memory space. could be some separate wasm program or javascript.
Avatar
Jupstar ✪ 2024-08-08 10:27
if you mean that the controler writes to a memory region on the host, then no if you mean it writes to a memory region of the wasm runtime, then yes. and yes then the rom could directly read from that address
Avatar
if we want everything in wasm. then we have a wasm that reads the VRAM and spits out image, another wasm that reads the audio region and spits out PCM, another wasm that writes user input into another region. then the application user "insert" a wasm binary as the game rom.
Avatar
Jupstar ✪ 2024-08-08 10:29
lmao wtf are you trying to invent xD
10:29
an emulator that isnt an emulator
Avatar
justatest well i guess for performace it would be better if the first three is the same wasm, but again, i think a wasm binary could just be a game rom.
Avatar
Jupstar ✪ 2024-08-08 10:30
but emulates all hardware
Avatar
it's like an emulator but not the emulator itself compiled into wasm. it's a emulator that "runs" wasm.
10:30
HUH
Avatar
Jupstar ✪ 2024-08-08 10:31
i can tell you what: wasm allows to import host c functions
Avatar
the VRAM reader could as well be implemented in javascript. but the game rom, like the game cartridge, is just a wasm binary.
Avatar
Jupstar ✪ 2024-08-08 10:31
so you can directly communicate with the real hardware
Avatar
i don't care about that
10:32
of course i know you can just do everything in wasm
10:32
but that's not what i'm saying
10:32
lol
Avatar
Тайно Дёрнул 2024-08-08 10:32
Hello, is the full version of ddnet mobile released?
Avatar
Avatar
Тайно Дёрнул
Hello, is the full version of ddnet mobile released?
Jupstar ✪ 2024-08-08 10:32
sub to #announcements
10:33
@TsFreddie i honestly don't understand what you try to say, sry. maybe someone else gets your genius idea. Maybe you should write a blog: "wasm is just a game console"
Avatar
MilkeeyCat 2024-08-08 10:34
i would read
Avatar
Avatar
Jupstar ✪
@TsFreddie i honestly don't understand what you try to say, sry. maybe someone else gets your genius idea. Maybe you should write a blog: "wasm is just a game console"
i don't even think it is a genius idea
10:34
justatest
10:34
i just think it would a cool toy
Avatar
-- Me wanting to vent/say something -- Me just thinking about it and never saying it
Avatar
Jupstar ✪ 2024-08-08 10:39
I read your invisible messages (edited)
10:39
were good read
Avatar
;) ty
10:39
I think for games in general to be more interesting/immersive there should be proper feedback
Avatar
Jupstar ✪ 2024-08-08 10:41
When i dream about modding of teeworlds. I want to see infection class by kaffeine without any client side limitations. Not bcs i love infection soo much. Just too see how much better it would be, and how much it would differ from standard teeworlds.
Avatar
Imagine as an example (not for game per se but the concept is the same) that you control your mouse cursor with gloves (there would be the control/input and haptic feedback)
Avatar
Avatar
Mr.Gh0s7
Imagine as an example (not for game per se but the concept is the same) that you control your mouse cursor with gloves (there would be the control/input and haptic feedback)
Jupstar ✪ 2024-08-08 10:41
just invent nerve gear
Avatar
You can do that with a mouse right? up/down + left/right easy enough
Avatar
Jupstar ✪ 2024-08-08 10:41
i buy
Avatar
ye I buy too
Avatar
nerve gear vr mmo waifus
10:42
justatest
Avatar
now image you would want to control 2 mouse cursors
10:42
you could add a mouse cursor to your screen and another mouse
10:43
but now you have to keep track of 2 cursors with your eyes
Avatar
Jupstar ✪ 2024-08-08 10:43
have u ever played star wars with xbox kinnect? xd
Avatar
and it keeps getting harder/impossible the higher you go
10:43
nope
10:43
i'll search it up once i finish ;)
10:44
now lets say that with each finger you would control a cursor (up/down is big bend and right/left is small bend)
Avatar
Jupstar ✪ 2024-08-08 10:45
but most muscle memory works by doing smth you already done. So maybe the amount of cursors doesnt really matter. just the complexity of the task or smth like that
Avatar
the feedback would pull/push on the bigbend/smallbend
Avatar
u know meta quest supports hand gestures
Avatar
so if you have your cursor on center it would push/pull 0,0
Avatar
u can use finger as cursor
10:45
and pinch to click
Avatar
Jupstar ✪ 2024-08-08 10:46
but he wants some kind of feedback
Avatar
;)
Avatar
Jupstar ✪ 2024-08-08 10:46
but what is your end goal
10:46
doesnt the feedback depend on what you play for example
Avatar
now if you go on up,right it would pull 1,1 for eg
Avatar
Some conversations are difficult to have with members of older generations who grew up with different social norms. In particular, when you’re talking to people who grew up with PDP-11s with their completely flat memory, or Lisp machines or Burroughs Large Systems with their deeply opinionated and language-integrated hardware memory safety, you ...
Avatar
if you go down,left it would push -1,-1
10:48
now you have feed back which isn't exact but that's not the main point. The main point is to easily perceive your enviroment/cursors
10:48
now let's extend that example to something else for eg a piano trainer or smt
10:49
you have 10 fingers so you could say 10 cursors
10:49
it would pull/push each finger to a position and to play/train you would just need to "relax" your fingers to go to 0,0
Avatar
Jupstar ✪ 2024-08-08 10:49
so you want an exoskelett to help you?
Avatar
hmm I don't want it for piano so I don't think it as helping
10:50
but yeah
10:50
it's basically exoskelleton to provide feedback
Avatar
Jupstar ✪ 2024-08-08 10:50
ok invent that, i buy
Avatar
:) I am buying too
Avatar
Jupstar ✪ 2024-08-08 10:50
nice
Avatar
Avatar
Jupstar ✪
@TsFreddie i honestly don't understand what you try to say, sry. maybe someone else gets your genius idea. Maybe you should write a blog: "wasm is just a game console"
imma write a minimum proof of concept this weekend. i feel motivated.
Avatar
Avatar
TsFreddie
imma write a minimum proof of concept this weekend. i feel motivated.
Jupstar ✪ 2024-08-08 10:51
😂
Avatar
only because i want to show you what i mean. the only motivation
Avatar
also the games that you could make if you had such "easily understood" feedback are vast
Avatar
Avatar
TsFreddie
only because i want to show you what i mean. the only motivation
Jupstar ✪ 2024-08-08 10:51
perfect reason
Avatar
Avatar
Mr.Gh0s7
also the games that you could make if you had such "easily understood" feedback are vast
Jupstar ✪ 2024-08-08 10:52
the problem is probably that the hardware is not accessible enough. Like i dont want to spend 2k for guitar hero
10:52
xd
Avatar
like I was discussing with zogtib how you would a 3d game inspired by teeworlds work
Avatar
Jupstar ✪ 2024-08-08 10:52
3d hook game with exoskelett, epyc
10:53
spiderman 3d
Avatar
3d teeworlds again?
Avatar
and I was thinking you could have the center of mass of the dee (dee = 3d tee) move when you want to walk/jump
Avatar
Avatar
Mr.Gh0s7
and I was thinking you could have the center of mass of the dee (dee = 3d tee) move when you want to walk/jump
might as well call it deen already
Avatar
Avatar
TsFreddie
3d teeworlds again?
my brain can't think in 2d and I like teeworlds xD
10:54
so basically to do a jump maybe you could tap a button move your center of mass forwards and tap jump
10:54
but that way you only have 1 foot which is represented by 2 visually
10:55
to actually control 2 feet you'd have to have another axis input (like mouse and not keybaord wich is key/button input)
Avatar
Avatar
Jupstar ✪
3d hook game with exoskelett, epyc
weird question, is there bitarray in rust.
Avatar
Avatar
TsFreddie
weird question, is there bitarray in rust.
Jupstar ✪ 2024-08-08 10:57
i bet you can find 2000 crates that do that
Avatar
thanks my dude
Avatar
Jupstar ✪ 2024-08-08 10:57
i dunno if that exist in the std tho
10:57
never used that
Avatar
idk why i only have motivation when i don't sleep for two days
Avatar
Avatar
Mr.Gh0s7
but that way you only have 1 foot which is represented by 2 visually
the problem with having only one foot is; what happens when you are between 2 walls? as you can only control one foot you couldn't rest one feet on one wall and the other on the other and then jump upwards
Avatar
weird
Avatar
Avatar
TsFreddie
weird question, is there bitarray in rust.
Description
10:58
FixedBitSet is a simple fixed size set of bits.
Avatar
alright alright i get it
Avatar
I'm writing an integration for a platform, I just got the api docs, the endpoint to GET a listing of products is a POST endpoint
11:28
The endpoint that changes the state of an order is a GET endpoint
Avatar
chillerdragon BOT 2024-08-08 11:28
REST moment
11:28
GET fucked haha
Avatar
chillerdragon BOT 2024-08-08 11:30
That’s impressive! Which friend?
Replying to @heinrich5991 a friend of mine reported a 1-click RCE in CS:GO, and valve ignored him …
Avatar
Avatar
Learath2
I'm writing an integration for a platform, I just got the api docs, the endpoint to GET a listing of products is a POST endpoint
might make sense for complex filter queries.
11:35
in the payload
Avatar
chillerdragon BOT 2024-08-08 11:35
lmao
Avatar
graphql apis > anything else
11:35
¯\_(ツ)_/¯
Avatar
Avatar
jxsl13
might make sense for complex filter queries.
Well we have query params for that, but this api doesn't take a payload anyway
Avatar
then lol
Avatar
It's just a POST request because idk their api architect was doing crack
Avatar
chillerdragon BOT 2024-08-08 11:36
I have seen and done GET for everything. I also saw apis that consistently used POST for EVERY endpoint. But swapping GET and POST is just trol
this 1
Avatar
vmware apis are great, can recommend 100%
Avatar
Avatar
Learath2
xDe
lmfao
11:40
ZCZC WEPA40 PHEB 080908 TSUPAC TSUNAMI MESSAGE NUMBER 2 NWS PACIFIC TSUNAMI WARNING CENTER HONOLULU HI 0906 UTC THU AUG 8 2024 ...PTWC TSUNAMI INOFRMATION STATEMENT SUPPLEMENT **** NOTICE **** NOTICE **** NOTICE **** NOTICE **** NOTICE ***** THIS MESSAGE IS ISSUED FOR INFORMATION ONLY IN SUPPORT OF THE UNESCO/IOC PACIFIC TSUNAMI WARNING AND MITIGATION SYSTEM AND IS MEANT FOR NATIONAL AUTHORITIES IN EACH COUNTRY OF THAT SYSTEM. NATIONAL AUTHORITIES WILL DETERMINE THE APPROPRIATE LEVEL OF ALERT FOR EACH COUNTRY AND MAY ISSUE ADDITIONAL OR MORE REFINED INFORMATION. **** NOTICE **** NOTICE **** NOTICE **** NOTICE **** NOTICE ***** NOTE UPDATED MAGNITUDE. PRELIMINARY EARTHQUAKE PARAMETERS --------------------------------- * MAGNITUDE 7.1 * ORIGIN TIME 0742 UTC AUG 8 2024 * COORDINATES 31.8 NORTH 131.7 EAST * DEPTH 33 KM / 20 MILES * LOCATION KYUSHU JAPAN EVALUATION ---------- * AN EARTHQUAKE WITH A PRELIMINARY MAGNITUDE OF 7.1 OCCURRED IN KYUSHU, JAPAN AT 0742 UTC ON THURSDAY AUGUST 8 2024. * BASED ON THE PRELIMINARY EARTHQUAKE PARAMETERS... HAZARDOUS TSUNAMI WAVES ARE POSSIBLE FOR COASTS LOCATED WITHIN 300 KM OF THE EARTHQUAKE EPICENTER.
11:40
lmao
11:40
this type of text reminds me of games
11:42
The Japanese Meteorological Agency has issued a megaquake advisory after Thursday's quake, as part of the Nankai Trough Earthquake Extra Information protocol.
11:42
justatest
Avatar
pray for Japan
Avatar
Also they have all parameters passed in the path or in payloads, except a single parameter that is passed in a header for no reason
Avatar
sounds awesome
Avatar
Avatar
Learath2
The endpoint that changes the state of an order is a GET endpoint
get rekt
Avatar
"imei_number": false YES
11:58
My favourite type Product struct { IMEINumber bool `json:"imei_number"` }
11:58
I wonder what happens if there is an actual imei number, will it send a string?
11:59
It also sends null sometimes, idk when
Avatar
MilkeeyCat 2024-08-08 11:59
I asked a guy on work to review my pr, he said that 100 loc change too much and he doesn't know what a pr is pepeW (edited)
Avatar
Avatar
Learath2
It also sends null sometimes, idk when
when no imei_number troll
Avatar
Avatar
MilkeeyCat
I asked a guy on work to review my pr, he said that 100 loc change too much and he doesn't know what a pr is pepeW (edited)
justatest
12:07
im about to get my first real job
12:07
on a factory justatest
Avatar
Avatar
Learath2
Also they have all parameters passed in the path or in payloads, except a single parameter that is passed in a header for no reason
heinrich5991 2024-08-08 12:11
is it auth-related? you'd usually not pass auth-related stuff via the path AFAIK
Avatar
Avatar
heinrich5991
is it auth-related? you'd usually not pass auth-related stuff via the path AFAIK
nope, it's just a filter
12:13
I'm guessing they are intercepting it early for load balancing 🙃
Avatar
HR called me to ask if I can adjust my mental and physical state to be more normal
12:14
like if I WANT to have insomnia and I WANT to be sad.
12:14
justatest
Avatar
Avatar
TsFreddie
HR called me to ask if I can adjust my mental and physical state to be more normal
MilkeeyCat 2024-08-08 12:14
If you are sad, don't be sad
Avatar
Jupstar ✪ 2024-08-08 12:14
if you are poor, just be rich
12:15
fake it till you make it
Avatar
Avatar
TsFreddie
HR called me to ask if I can adjust my mental and physical state to be more normal
just be normal and quit
Avatar
they said if i want to leave early then we can schedule a meeting to figure out when.
12:16
HUH
Avatar
LOL
Avatar
i don't think figure out when and leave early can coexists
Avatar
This blog post takes a look at the years where eBPF was one of the kernel subsystems that grabbed the attention of a lot of security researchers. We will tell the story of how we discovered CVE-2023-2163, what our root-cause analysis process looked like, and what we did to ultimately fix the issue.
Avatar
I'll read it at home cuz very interesting. I've heard they've made a fuzzer for eBPF. Fuzzing with ebpf is way harder as the verifier always kick your ass if you do shit
Avatar
a cas from a i64 to a i32 can lose the sign info?
12:42
cast*
Avatar
in C it'd be implementation defined
Avatar
chillerdragon BOT 2024-08-08 12:43
U got tsunami alerts? Xd
Replying to @Ryozuki lmfao
12:43
Wrong reply omg
Avatar
Avatar
Ryozuki
a cas from a i64 to a i32 can lose the sign info?
heinrich5991 2024-08-08 12:43
no
Avatar
ok so in llvm ir it probs loses it
12:44
im not refering to rust
Avatar
heinrich5991 2024-08-08 12:44
ah
12:44
no idea then
Avatar
Avatar
heinrich5991
no
how does rust ensure it?
Avatar
heinrich5991 2024-08-08 12:45
ah nvm
12:45
downcasts with as are bitcasts in rust
Avatar
no special semantics seem to be written, so I'd guess you do lose the sign bit
Avatar
heinrich5991 2024-08-08 13:01
one should probably almost never use as and instead use try_into/try_from or into/from as appropriate
13:01
unfortunately, usize::from(u32) does not work in rust (I don't like it, IMO, they should add it)
Avatar
are there platforms where usize is 16 bit?
Avatar
heinrich5991 2024-08-08 13:02
yes
13:03
but IMO, the impl simply not exist on these platforms, but exist everywhere else
13:03
(I'm fine with not having usize::from(u64) on 64-bit platforms)
Avatar
#[cfg(target_pointer_width = "16")] impl usize { uint_impl! { Self = usize, ActualT = u16, SignedT = isize, NonZeroT = NonZero<usize>, BITS = 16, MAX = 65535, rot = 4, rot_op = "0xa003", rot_result = "0x3a", swap_op = "0x1234", swapped = "0x3412", reversed = "0x2c48", le_bytes = "[0x34, 0x12]", be_bytes = "[0x12, 0x34]", to_xe_bytes_doc = usize_isize_to_xe_bytes_doc!(), from_xe_bytes_doc = usize_isize_from_xe_bytes_doc!(), bound_condition = " on 16-bit targets", } widening_impl! { usize, u32, 16, unsigned } midpoint_impl! { usize, u32, unsigned } }
Avatar
Avatar
heinrich5991
one should probably almost never use as and instead use try_into/try_from or into/from as appropriate
Jupstar ✪ 2024-08-08 13:04
in a perfect word yes. but as is simply easier to type xd
13:05
e.g. i tried a bit with fixed point numbers in rust. but always converting with to_num from_num really gets annoying 😄
Avatar
Avatar
Jupstar ✪
in a perfect word yes. but as is simply easier to type xd
heinrich5991 2024-08-08 13:05
I guess the only solution to that is deprecating as eventually. I hope rust does that
13:05
at least they're adding all the necessary functionality for that to happen (edited)
Avatar
is there a libtw1 (edited)
Avatar
heinrich5991 2024-08-08 13:07
it allows me to do .i64() on a 32-bit integer
13:07
to cast it losslessly to i64
Avatar
Avatar
heinrich5991
I guess the only solution to that is deprecating as eventually. I hope rust does that
just to annoy jupstar into more typing? 😄
Avatar
Jupstar ✪ 2024-08-08 13:07
rip
Avatar
heinrich5991 2024-08-08 13:07
or .assert_u16() on an i32 to u16, crashing if it doesn't fit
Avatar
Jupstar ✪ 2024-08-08 13:08
i often upcast 32bit to usize and i often convert enums to usize apparently
Avatar
Avatar
Learath2
just to annoy jupstar into more typing? 😄
heinrich5991 2024-08-08 13:08
to make the correct solution the shortest, yes
😬 1
Avatar
old build target other data that's a whole ass sentence
Avatar
heinrich5991 2024-08-08 13:08
rust tries to do that, a lot
13:08
it's one of the failings of C++, honestly
13:09
make the safe method longer to type than the UB-inducing
13:09
.at() vs []
Avatar
both are solving it wrong, break backcompat, implement the good behaviour with the good syntax
Avatar
hello i want a bump arena allocator, the bump arena allocator at home: std::pmr::monotonic_buffer_resource
Avatar
Avatar
Learath2
both are solving it wrong, break backcompat, implement the good behaviour with the good syntax
heinrich5991 2024-08-08 13:09
rust does?
13:10
[] for the non-UB variant
13:10
.get_unchecked() for the UB variant
13:10
in rust
Avatar
How hard would it be to add pre-processing to chat messages?
Avatar
Avatar
heinrich5991
.at() vs []
Jupstar ✪ 2024-08-08 13:10
but then as could also just panic if type doesnt match bcs index out of bounds does that too
Avatar
chillerdragon BOT 2024-08-08 13:10
Easy
Replying to @Sans How hard would it be to add pre-processing to chat messages?
Avatar
Avatar
heinrich5991
[] for the non-UB variant
but iirc it was correct from the start. My comment was about how mistakes in the original language are rectified
Avatar
Avatar
Jupstar ✪
but then as could also just panic if type doesnt match bcs index out of bounds does that too
heinrich5991 2024-08-08 13:11
yes, but changing semantics of this is probably a bad idea. people have been trained to understand what as does, so it should probably not change semantics
Avatar
Then could something be added so you don't have to struggle to type names with russian characters and instead use their id
Avatar
with editions they can a bit
Avatar
something like {id} which gets processed into their name
Avatar
chillerdragon BOT 2024-08-08 13:11
You mean in the official client? Probably not
Replying to @Sans Then could something be added so you don't have to struggle to type name…
Avatar
Avatar
Learath2
but iirc it was correct from the start. My comment was about how mistakes in the original language are rectified
heinrich5991 2024-08-08 13:11
C++ doubles down on this in new standards. they actively create new stuff where the UB path is a lot easier than the non-UB path
Avatar
Avatar
chillerdragon
You mean in the official client? Probably not
why's that?
Avatar
chillerdragon BOT 2024-08-08 13:11
Complexity
13:12
Politics
Avatar
you just said it'd be easy xd
Avatar
That's a very C++ thing to do
Avatar
Avatar
Ryozuki
with editions they can a bit
heinrich5991 2024-08-08 13:12
not really here though. that's a subtle shift of semantics. they could deprecate the thing across an edition, but making it change semantics sounds bad
Avatar
Avatar
heinrich5991
yes, but changing semantics of this is probably a bad idea. people have been trained to understand what as does, so it should probably not change semantics
Jupstar ✪ 2024-08-08 13:12
sure, but tbh most ppl use it in good faith.. like if they do i32 to f32. they also expect the f32 to hold your number. so the cases where it's not the case is at least not that often
Avatar
chillerdragon BOT 2024-08-08 13:12
Easy to code. And by that I mean whatever interpreted into what preprocessing chat means xd which could mean anything
Replying to @Sans you just said it'd be easy xd
Avatar
Avatar
heinrich5991
C++ doubles down on this in new standards. they actively create new stuff where the UB path is a lot easier than the non-UB path
what new thing are you talking about btw?
Avatar
chillerdragon BOT 2024-08-08 13:12
Not everything that is easy to code ends up being released
Avatar
Avatar
Learath2
what new thing are you talking about btw?
heinrich5991 2024-08-08 13:13
e.g. parallel modification to the file system is UB
13:13
like WTF
Avatar
Jupstar ✪ 2024-08-08 13:13
i hate filesystems
Avatar
ill probably figure it out myself... in a few years
Avatar
Jupstar ✪ 2024-08-08 13:13
why is it still so hard to work with them
Avatar
heinrich5991 2024-08-08 13:13
but that's just the very first thing that came to mind. I didn't actually have any exampels when I said that
Avatar
cant wait to have a brain fart and figure out how to make my own client so i can add qol things like that
Avatar
Avatar
heinrich5991
e.g. parallel modification to the file system is UB
parallel as in race?
Avatar
chillerdragon BOT 2024-08-08 13:15
@Sans: why not use tab completion for Russian names? Worked well for me so far
13:15
The behavior is undefined if the calls to functions in this library introduce a file system race, that is, when multiple threads, processes, or computers interleave access and modification to the same object in a file system.
Avatar
heinrich5991 2024-08-08 13:15
this is just ridiculous
Avatar
Avatar
chillerdragon
@Sans: why not use tab completion for Russian names? Worked well for me so far
scrolling thru 60-ish russian names isn't fun and i cant/dont know how to go back if i missed the name i want
Avatar
Jupstar ✪ 2024-08-08 13:15
they should add wrappers for filesystem: Mutex, RwLock
13:15
xd
Avatar
heinrich5991 2024-08-08 13:16
it relies on the good will of compiler writers to not abuse the UB
13:16
but compiler writers have not shown good will in the past
Avatar
chillerdragon BOT 2024-08-08 13:16
You can and you can also start from the last name using shift+tab
Replying to @Sans scrolling thru 60-ish russian names isn't fun and i cant/dont know how t…
Avatar
Avatar
heinrich5991
this is just ridiculous
hm, is it actually? I can't imagine two threads racing to rename a file ending in sane behaviour
Avatar
Avatar
Learath2
hm, is it actually? I can't imagine two threads racing to rename a file ending in sane behaviour
heinrich5991 2024-08-08 13:16
UB means the compiler is allowed to erase your hard disk
Avatar
chillerdragon BOT 2024-08-08 13:16
Russian names are usually last
13:16
So it’s not a lot of tabbing
13:17
Especially if they include one Latin character you can type
Avatar
heinrich5991 2024-08-08 13:17
to optimize out a program entirely that calls filesystem functions from two threads simultaneously
13:17
like C++ learned exactly nothing
13:17
you can't write multi-threaded, filesystem accessing, standards-conforming programs like this
Avatar
Avatar
chillerdragon
Especially if they include one Latin character you can type
they usually dont
Avatar
heinrich5991 2024-08-08 13:18
unspecified file system result, okay. permission to shred your computer? no
Avatar
chillerdragon BOT 2024-08-08 13:18
Give shift+tab a try if you never used it it will have a big impact @Sans
Avatar
Avatar
heinrich5991
you can't write multi-threaded, filesystem accessing, standards-conforming programs like this
Is it not fine when you are properly synchronizing?
Avatar
Avatar
chillerdragon
Give shift+tab a try if you never used it it will have a big impact @Sans
steam overlay?
13:18
am i missing something
Avatar
chillerdragon BOT 2024-08-08 13:18
Oh no steam user detected
Avatar
heinrich5991 2024-08-08 13:19
you want to synchronize all file system access across your whole progrma? show me one program that achieves this
13:19
that's just ridiculous and so anti-C++
13:19
C++ wants to go fast
Avatar
Avatar
chillerdragon
Oh no steam user detected
sue me kekw
Avatar
heinrich5991 2024-08-08 13:19
they don't want to lock their entire process when doing FS operations
Avatar
Avatar
heinrich5991
you want to synchronize all file system access across your whole progrma? show me one program that achieves this
Not all, with how I read it I need to synchronize accesses to a given file system object
Avatar
chillerdragon BOT 2024-08-08 13:19
Well I can’t help you then sorry @Sans gotta ask other steam users how they cope with that
Avatar
Avatar
Learath2
Not all, with how I read it I need to synchronize accesses to a given file system object
heinrich5991 2024-08-08 13:19
how would you make sure that no library of yours touches the same file as you do? that's simply impossible
13:20
it's like the shit with having exit thread-unsafe. but at least it seems they're willing to fix that…
Avatar
Avatar
Learath2
Not all, with how I read it I need to synchronize accesses to a given file system object
heinrich5991 2024-08-08 13:20
why not specify that this can lead to bad results for this file object?
13:20
and not delete your hard disk?
Avatar
wg21 does some insane things but I can't imagine them doing something this stupid, that's why I'm a bit uncertain
Avatar
heinrich5991 2024-08-08 13:21
something what stupid?
Avatar
Avatar
chillerdragon
Well I can’t help you then sorry @Sans gotta ask other steam users how they cope with that
im guessing there's no f1 command i can bind to another button which does whatever shift+tab does for non-steam clients? (edited)
Avatar
Avatar
Sans
im guessing there's no f1 command i can bind to another button which does whatever shift+tab does for non-steam clients? (edited)
heinrich5991 2024-08-08 13:21
can you try ctrl-shift-tab?
13:21
without f1 binds
Avatar
Avatar
heinrich5991
something what stupid?
All multi-threaded programs using std::filesystem being UB
Avatar
heinrich5991 2024-08-08 13:22
I can write a trivial program using multi-threading and std::filesystem that is not UB
13:23
what I'm claiming is that writing large programs with this API is not possible, because you can't guarantee what the API wants you to guarantee
Avatar
Actually as written it kinda implies just using std::filesystem at all even in single threaded contexts might be UB. It says nothing about an external program introducing a file system race
Avatar
heinrich5991 2024-08-08 13:23
at all even in single threaded contexts might be UB
correct
13:23
if other programs interfere
13:23
it's just completely bonkers
Avatar
Avatar
heinrich5991
can you try ctrl-shift-tab?
13:24
it just adds another name (edited)
Avatar
Jupstar ✪ 2024-08-08 13:24
but filesystem operations are always racy, even if not UB. isnt that already shitty enough
13:25
i dont feel like rust offers me anything to feel safe
Avatar
This is so insane that I'm starting to wonder if maybe I've known a wrong definition for UB all along 😄
Avatar
Avatar
Jupstar ✪
i dont feel like rust offers me anything to feel safe
"safe"-ish fs operations are possible, but I don't think any language offers them, you'll need to use OS functionality for it
Avatar
Avatar
Learath2
"safe"-ish fs operations are possible, but I don't think any language offers them, you'll need to use OS functionality for it
heinrich5991 2024-08-08 13:26
rust offers most of them. which do you want?
13:26
the most trivial one, exclusive file creation is definitely covered, e.g.
Avatar
Avatar
heinrich5991
rust offers most of them. which do you want?
Is there some wrapper that allows me to avoid a TOCTOU between checking a file exists and opening?
Avatar
Jupstar ✪ 2024-08-08 13:27
is there even smth like a file lock?
Avatar
Avatar
Learath2
Is there some wrapper that allows me to avoid a TOCTOU between checking a file exists and opening?
heinrich5991 2024-08-08 13:27
no wrapper, but you can just open the file (which is also what you'd do with syscalls AFAIK)
Avatar
Is O_CREAT exposed? (edited)
13:28
Like can I not pass O_CREAT to open(2)?
13:29
I guess those are the only things I need commonly
Avatar
heinrich5991 2024-08-08 13:29
you want to open a file read-write, but not create it?
Avatar
Yes
Avatar
heinrich5991 2024-08-08 13:29
that exists, yet
Avatar
If exists, open for rw, if not I want to do sth else (edited)
Avatar
heinrich5991 2024-08-08 13:30
OpenOptions::new().read(true).write(true).open("filename") (edited)
Avatar
Nice
13:31
openat2(2) also has some cool functionality with regards to symlinks
Avatar
heinrich5991 2024-08-08 13:34
yup. I don't think it's exposed to rust yet
13:34
also not sure if all the OSs support it tbh. rust also exposes some OS-specific APIs, but I like using the OS-agnostic ones better
Avatar
Serialize and deserialize JSON with jiter and declarative macros - bearcove/merde_json
Avatar
Avatar
Ryozuki
Click to see attachment 🖼️
nowadays we do have generics Celebrate
Avatar
Avatar
Learath2
nowadays we do have generics Celebrate
Jupstar ✪ 2024-08-08 14:05
using canadian aboriginal syllabics?
Avatar
Na
14:05
[]
Avatar
GitHub BOT 2024-08-08 14:57
c2a3444 Faster /rank, fixes test result - def- 647abbd Merge pull request #8693 from def-/pr-optimize-query - def-
14:59
In computing, jump threading is a compiler optimization of one jump directly to a second jump. If the second condition is a subset or inverse of the first, it can be eliminated, or threaded through the first jump. This is easily done in a single pass through the program, following acyclic chained jumps until the compiler arrives at a fixed point.
Avatar
Avatar
Ryozuki
Click to see attachment 🖼️
ryo does rust have variadic generics, except variadics crate
Avatar
iirc no
Avatar
rust huge L
15:23
no proper proposals though
Avatar
Avatar
zhn
rust huge L
its because its unsafe
15:24
iirc
15:24
for every "why doesn't Rust have..." question, the answer is either this or "the feature you want is dangerous and here's why". Personally, I'd call varargs a little bit of both. The C version is ridiculously unsafe. A safe implementation of it would probably not be usable in no_std context, which would be pretty out of character for the language, I'd say.
(edited)
15:26
Issue by eddyb Monday Oct 28, 2013 at 17:39 GMT For earlier discussion, see rust-lang/rust#10124 This issue was labelled with: B-RFC in the Rust repository The Problem fn types need a reform, and b...
15:27
thinking about makign a chip-8 emulator in rust http://devernay.free.fr/hacks/chip8/C8TECH10.HTM
Avatar
Avatar
Ryozuki
its because its unsafe
I don’t see any inherent reason as to why variadics would be unsafe
Avatar
Avatar
Ryozuki
its because its unsafe
not varargs but variadic generics
Avatar
Avatar
Learath2
I don’t see any inherent reason as to why variadics would be unsafe
it seems they just couldn't come up with rusty design
Avatar
Jupstar ✪ 2024-08-08 15:47
@zhn u can do anything with macros
Avatar
yeah
15:48
System76 computers empower the world's curious and capable makers of tomorrow
15:49
i think this was made in rust
15:49
just got released
Avatar
MilkeeyCat 2024-08-08 15:53
is there a name for char in type char***?
Avatar
Jupstar ✪ 2024-08-08 15:54
data type
Avatar
GitHub BOT 2024-08-08 16:16
Closes #8699. Regression from #8685.

Checklist

  • [X] Tested the change ingame
  • [ ] Provided screenshots if it is a visual change
  • [ ] Tested in combination with possibly related configuration options
  • [ ] Written a unit test (especially base/) or added coverage to integration test
  • [ ] Considered possible null pointers and out of bounds array indexing
  • [ ] Changed no physics that affect existing maps
  • [ ] Tested the change with [ASan+UBSan or valgrind's memcheck](https://...
Avatar
Avatar
Jupstar ✪
@zhn u can do anything with macros
ye but i don't really want (A, (B, (C, (D, (E, (F, (G, (H, (I, )))))))))
Avatar
Avatar
zhn
ye but i don't really want (A, (B, (C, (D, (E, (F, (G, (H, (I, )))))))))
Jupstar ✪ 2024-08-08 16:27
i dont understand (edited)
16:27
with macros you can create a completely new type
Avatar
i wanted to shorten interface of my helper struct that is just collection of different configuration structs
16:29
and so i wondered if i can just add , ... and use variadic generics
Avatar
Jupstar ✪ 2024-08-08 16:29
i could imagine you could write a macro that can do that 😄
16:30
but yeah dunno. maybe you can better create multiple helper structs. It doesnt seem that your helper struct is working with the config structs anyway, or does it?
Avatar
Jupstar ✪ 2024-08-08 16:40
@zhn dunno what u doing, but maybe the problem is already that u need a collection of configurations as generic... like can you not build whatever is configured by your structs directly. Or if your configuration structs use a trait, maybe you can simply use non-generics, dyn trait, for now and think about that problem later
Avatar
GitHub BOT 2024-08-08 16:55
645a005 Fix binds not being repeated when key held down - Robyt3 7added6 Merge pull request #8700 from Robyt3/Binds-Repeat-Fix - def-
16:59
e3dd289 Revert "Fix /rank" - def- 00586a0 Revert "Faster /rank, fixes test result" - def-
Avatar
MilkeeyCat 2024-08-08 17:10
@Learath2 happy
Avatar
Avatar
MilkeeyCat
@Learath2 happy
Did you try with larger than u8? Very common thing to mess up
Avatar
Avatar
Learath2
Did you try with larger than u8? Very common thing to mess up
MilkeeyCat 2024-08-08 18:08
it returns 255, so it seems to work :DDDD
Avatar
Try heterogenously, with different types of different widths
Avatar
Avatar
Learath2
Try heterogenously, with different types of different widths
MilkeeyCat 2024-08-08 18:47
I.. don't understand xd
Avatar
Pick different sized variables
Avatar
MilkeeyCat 2024-08-08 18:48
u8 & u16?
Avatar
Yes
18:49
Throw in a 32 too
Avatar
MilkeeyCat 2024-08-08 18:49
i don't have 32bit integer lol
18:49
and wat do I do with the values?
19:24
can i ask
19:24
or dm a dev
Avatar
dont ask to ask, just ask
19:25
bro so much ppl curse in this game
19:25
and i have proofs 😎
Avatar
Avatar
meloƞ
dont ask to ask, just ask
HEY
Avatar
Avatar
氷月
bro so much ppl curse in this game
for that, please use #✉-create-a-ticket. If it's a feature proposal, use #town-hall or the github issue page: https://github.com/ddnet/ddnet/issues (edited)
DDraceNetwork, a free cooperative platformer game. Contribute to ddnet/ddnet development by creating an account on GitHub.
Avatar
what
Avatar
your message indicates you want to either: report someone, discuss a way to handle this, or you have a way to handle this better and wan't to propose that (edited)
Avatar
where can i report then?
Avatar
#✉-create-a-ticket <- click here, and press "report"
Avatar
MilkeeyCat 2024-08-08 19:31
does rust run example code? -.- (in ///)
Avatar
but what if he left the serv
Avatar
Avatar
MilkeeyCat
i don't have 32bit integer lol
How do you even store pointers if you don't have types up to 64b?
Avatar
Avatar
MilkeeyCat
does rust run example code? -.- (in ///)
as tests ye
Avatar
Avatar
Learath2
How do you even store pointers if you don't have types up to 64b?
MilkeeyCat 2024-08-08 19:42
it can store a pointer but there's no type i/u 32/64 xd
Avatar
add no_run
Avatar
MilkeeyCat 2024-08-08 19:42
i just remove examples
19:42
examples for noobs
Avatar
no u can add ```no_run
Avatar
MilkeeyCat 2024-08-08 19:46
Does C have any limitation for casting pointer types?
19:47
I mean, is there cases when C compiler will be like "nop, you can't cast this pointer type to that pointer type"
Avatar
strict aliasing
19:49
but
19:50
it's just UB
19:50
it will usually compile
Avatar
the compiler will compile
Avatar
MilkeeyCat 2024-08-08 19:50
ill just allow any casts
19:50
ez clap
Avatar
MilkeeyCat 2024-08-08 19:51
if you shoot yourself in the foot, your problem, we no rusting here
Avatar
ig i need a little more context
19:52
thats a major footgun
Avatar
MilkeeyCat 2024-08-08 19:52
just don't cast wat makes no sense
Avatar
i guess there are some obvious scenarios where it's expressly disallowed
19:55
The conversions not listed here are not allowed. In particular, there are no conversions between pointers and floating types there are no conversions between pointers to functions and pointers to objects (including void*) (edited)
Avatar
MilkeeyCat 2024-08-08 20:01
i meant any casts between pointers
20:03
it actually feels so nice when it works as expected and doesn't spit out 3 pages long panic backtrace justatest
Avatar
i mean
20:09
there are no conversions between pointers to functions and pointers to objects (including void*)
Avatar
MilkeeyCat 2024-08-08 20:11
i don't even know what is an object is in this context xd
Avatar
anything that isn't a function
20:44
maybe primitives are excluded from that terminology actually
Avatar
2003... if we had mod support completly written in lua that would be cool af ngl
Avatar
it'd be cool as long as it's nothing like bam
21:05
i remember it being weird and obtuse
21:05
but maybe that's just down to age
Avatar
bam was decent, chillerdragon still simps for it
21:05
but i never really used it so i can't give any statements on it really, i just had to use it to compile and build the old blockworlds source a few times :D
Avatar
Avatar
Ewan
it'd be cool as long as it's nothing like bam
bam is very easy to use though
Avatar
i remember it caring about where the bam executable is
Avatar
Avatar
meloƞ
2003... if we had mod support completly written in lua that would be cool af ngl
but yeah lua rocks
Avatar
GitHub BOT 2024-08-08 21:11
Also show client IDs in the spectator menu when cl_show_ids is enabled. Previously, this setting applied to scoreboard and chat, although the setting and config variable descriptions were only mentioning the scoreboard. Extract client ID formatting in CGameClient::FormatClientId function to reduce duplicate code and ensure it is consistent. Correctly indent client IDs also when largest client ID is 100 or larger. Fix scoreboard spectator client ID buffer not being large enough for I...
Avatar
there's a reason it's used by gmod and roblox and whatnot
21:11
and factorio justatest
Avatar
It's kinda slow tho
Avatar
Hello I'm stupid and can't figure out where https://master1.ddnet.tw/ddnet/15/servers.json went justatest (edited)
21:16
or is it just down ?
21:17
ah i got it
21:17
ddnet.tw doesn't work anymore it seems
Avatar
it does, website was down for a few seconds :P
Avatar
I still can't load any .tw page
21:17
but can load every .org
Avatar
odd - works for me
21:18
on my server .tw doesn't work neither (edited)
Avatar
maybe it's dns cache
Avatar
Avatar
Tater
It's kinda slow tho
rly depends
Avatar
Avatar
meloƞ
maybe it's dns cache
nerd
Avatar
i'm scared to clear it, i always type ddnet.tw
Avatar
me too feelsbadman
21:24
end of an era..
Avatar
as long as the integral game logic/exgensive parts are not written in lua then there shouldnt be perf issues
21:26
luajit is also several times faster even when using the interpreter
21:27
though most of those gains are for when you arent interfacing with a C api or w/e
21:28
but iirc it has its own FFI interface which is faster
21:28
u got options
21:30
but i'd imagine lua itself is faster than even most scripting languages OOTB
Avatar
I'm a fan of java/C# modding paradigms (edited)
Avatar
those presumably both have high runtime overhead
21:32
but idk
21:32
depends on the game
Avatar
Idk why you would really care about runtime overhead
Avatar
why wouldn't you
Avatar
Idk, you can spare 200mb of ram to run a single game on your pc
21:33
If it means the game is faster
Avatar
the game probably wouldnt be faster
Avatar
The overhead is there to increase speed at the cost of space
Avatar
but is it actually faster
Avatar
Faster than Lua? Yes
21:35
Also you get an entire language (edited)
Avatar
i can see c# being faster in certain situations
Avatar
If you're running tons of processes on a server where the overhead matters then sure you can care about it (edited)
Avatar
the only way i would be ok with either of those languages in a modding scenario is if they were pre-compiled
21:37
sux cus both java and c# do have the means to generate native code but they are p nonstandard
Avatar
That's usually how it works
Avatar
c# and java don't generate native code
Avatar
They are compiled to bytecode
Avatar
java uses bytecode which is interpreted by the jvm, c# uses IL which is interpreted by the runtime
21:38
but thats not native
21:39
see .net AOT and graalvm native image
Avatar
Yeah but you can just use the runtime
21:39
It's still fast
Avatar
need benchmarks
21:39
i dont know if it would be faster than luajit
Avatar
Dude there's like a billion of those on the internet
Avatar
lua is already very fast
Avatar
Avatar
Tater
Dude there's like a billion of those on the internet
not afaik
21:41
java vs lua vs c#? sure bytecode java vs compiled java vs IL C# vs compiled C# vs lua vs luajit in a modding scenario?
21:42
if u can find smth similar i'd be stoked but i generally dont think those two would be any faster than lua. esp considering this (often) means the game itself it made in java or c#
Avatar
people almost exclusively use bytecode java and C# IL
Avatar
right (edited)
Avatar
factorio does not even use luaJIT last I checked
21:43
it uses lua lua
21:44
fwiw lua itself is compiled to bytecode in a similar manner to c# and java
21:45
but it simply has fewer requirements & burdens
21:45
lots of C# and java speed increases are due to higher level optimizations but if you used them as a supplement to a c/cpp engine i believe it would suck hard
21:46
like im p sure there's a reason ppl mostly just use the JNI on android
Avatar
Avatar
Ewan
lots of C# and java speed increases are due to higher level optimizations but if you used them as a supplement to a c/cpp engine i believe it would suck hard
if the game is made in C# or java you hardly even need to think about modding when making the game. Even a first party mod loader is optional. but if you make your made in a natively compiled language and don't include a ton of modding apis then it will never get a significant amount of mods.
21:51
All the games with the biggest modding communities are because the game itself was made in a language that makes modding easy
21:51
It's way more fun to mod those games
21:52
are we talking strictly about modding or just any user content playable within the game?
Avatar
strictly modding yes
21:53
like i said gmod and roblox both use lua for all of their user created content but that's not technically modding
21:53
but generally game mods dont use APIs which are exposed by the game first hand
21:53
then it's not really a mod
Avatar
roblox is not really a fair example, it's basically a game engine that uses lua
Avatar
i mean minecraft modding didnt get near good or performant until the past like 5 years
Avatar
according to who?
Avatar
ppl had to go thru 5 different mod loaders until it was good
Avatar
come on now
21:55
u have played modded mc right (edited)
Avatar
yeah?
21:55
show me the other games where you can load 300 mods at once that have good performance
Avatar
thats not what i mean
21:55
1.12/forge packs run like dog shit. newer fabric/paper stuff sucks way less
21:56
but it took years to get there
Avatar
it was perfectly playable idk what you mean
Avatar
mc is not inherently easier to mod just bcs it uses java
21:56
is my point
Avatar
Lua is flexible in Terms of dynamic loading and unloading, which makes it Generally great to Mod big Games Like GTA V or Red dead Redemotion 2
Avatar
Avatar
Ewan
mc is not inherently easier to mod just bcs it uses java
MC is literally the perfect example of how java makes it inherently easier to mod because the bedrock edition has 5% as much modding activity.
Avatar
bedrock edition probably has 5% as much modding activity because they were 10 years late to the party and their addon implementation covers little of what you may actually want to do in the game
22:01
not to mention it's probably a completely different playing field. the addons are distributed by MS and you can charge for them
22:02
it's now about how they can con kids out of $5 of their christmas money
WideYep 1
Avatar
Also bedrock sells shaders for ,5€...
Avatar
java edition has zero first party support or distribution for modding and yet has 100x more mods. Mojang actively makes it harder by removing symbol names from their .jars and people still create modding support for every version within weeks
22:04
bedrock is 8 years old
Avatar
it's sorta apples/oranges but 1.12 was released about 8 years after minecraft's inception
22:06
which is the most popular version to mod
22:06
maybe java decompilation is easier than native binaries but that's not really the big hangup imo
Avatar
it's basically the only hangup imo
Avatar
that's very little of the actual work going on in the modding scene
22:07
it's about the APIs the mod loaders have built
Avatar
that's not really true at all, the mods use direct byte code editing in java via mixins and in C# IL with harmony.
22:08
you can directly change the source code of the game in a very readable way
22:08
all the major mods do this
22:09
if you write any code expecting that nobody will touch it. it will inevitably be difficult for someone to manipulate it in binary form
22:10
in regards to data, ownership, pipelines, etc.
22:10
the language or mechanism you use to mod is something of an implementation detail
22:11
the issue is re-writing or patching the existing code to safely allow the mods to work
22:12
you've surely seen c/c++ decompilation projects around the internet.it's not like it's something ppl don't do cuz there's no supported language feature to do it
Avatar
I've done modding with c++ decomplication
22:12
it is not fun
22:13
it takes without exaggeration about 30 times longer to do the exact same thing in a C# IL game
Avatar
u mean than in the C# game?
22:13
it really depends on your workflow
Avatar
you have a secret workflow that competes with ILSpy?
Avatar
it's not a secret
Avatar
IDA64 paid edition?
22:14
what is it lol
Avatar
hex-rays provides amazing c and c++ decompilers
22:14
yes
Avatar
have you used ILSpy?
Avatar
what about DNSpy
Avatar
Avatar
Ewan
hex-rays provides amazing c and c++ decompilers
these have gotten much better at representing the code at a high level
22:16
it's not really just super simple c anymore
Avatar
DNSpy literally gives you the original code
Avatar
right (edited)
Avatar
go try it
22:16
for real
22:16
do you have terraria?
22:16
open terraria in dnspy
22:16
it's free
Avatar
yeah but im not touching that shit lol
Avatar
ive seen the decomps
22:17
terraria code is mortifying
Avatar
it's not that bad except for the 1 class that people talk about
22:17
if it was that bad it would not have like 10000 mods
Avatar
i mean, yea
22:18
idk what we are rly talking about any more
Avatar
but really you should open it in dnspy
22:18
takes like 2 minutes
22:18
from the time you search in google
Avatar
im not on win rn
22:18
i dont have dotnet sdk or anything
Avatar
alr nvm
Avatar
i believe you
22:19
it and java are very easy
22:19
to decomp
22:20
but i just think that the c/c++ way isn't really any less viable as long as you know what you are doing (edited)
22:21
it's well documented, it's generally easy to inject your own code where required, i guess it just requires more know how in the first place
Avatar
I think it's easier to decomp a C# game than it is to edit a C++ with the source code lol
Avatar
interesting
Avatar
@Tater where did u go
Avatar
ok fine
22:25
I'm confused
Avatar
Avatar
GitHub
Click to see attachment 🖼️
does this pr conflict with spectator clans
22:46
ye seems like little changes
Avatar
Avatar
zhn
does this pr conflict with spectator clans
i wonder why its still not merged xd
Avatar
Avatar
MilkeeyCat
is there a name for char in type char***?
heinrich5991 2024-08-08 23:20
char is the pointee type of char * maybe
Exported 1 021 message(s)
Timezone: UTC+0