Guild icon
DDraceNetwork
Development / developer
Development discussion. Logged to https://ddnet.tw/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 2021-05-09 00:00:00Z and 2021-05-10 00:00:00Z
Avatar
i have a question about bam (not ddnet related specifically)
00:21
sec
00:21
00:21
but clang is installed so im confused
00:22
configure.lua should be the exact same one tw uses
Avatar
i also didnt got clang to work back then
00:26
is there no cmake alternative?
Avatar
i dont know much about cmake but this repo isnt really mine so i dont know if i could write one for it
00:30
ill just try gcc
00:31
wat gcc is installed already
00:31
how do i tell bam to use gcc
Avatar
CC=gcc CCX=g++
00:31
as env flags
Avatar
or CXX
Avatar
still says global error
00:32
hrmm
00:32
can i dm you so i dont flood this channel
Avatar
u need to delete the configuration.lua probs first
Avatar
config.lua is it
Avatar
ahhh yes it says clang in there
00:33
ill change it
00:33
or i can remove it and it will generate for my env?
00:34
ill just change the value to 'gcc' and see if that works
00:34
oh hey that worked i think
00:35
hah, worked
00:36
thanks a bunch 💖 @Deleted User
Avatar
Avatar
Deleted User
I didn't really made it, but what's broken about it?
can't change the size on the fly in gl3
Avatar
Avatar
TsFreddie
can't change the size on the fly in gl3
strange works for me xd
Avatar
Don't know why these are there

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 if it works standalone, system.c especially
  • [ ] 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://github.com/ddnet/dd...
Avatar
d89fcef Add 10 € donation by PlantKnight - def-
Avatar
796035a Remove dangling declaration - TsFreddie ba6759f Merge #3818 - bors[bot]
10:26
one day ill parse the map format using parser combinators like this
Avatar
Someone, please fix the parsing of /times "number name". The behavior is incorrect if we want to query a number ID. For example, /times "950" will give the finish history of last 950 fin(which is the same to /times 950) but we want to query the finish history of player "950"(which is a chn guy now named "rhino"). Now pure number ID is unable to query finish history but names with a blank can.
21:40
/times "ano :3" behaves correctly.
21:45
Also need to check if other commands work correctly with quotes
Avatar
@Night_L the parsing is "correct" in its own way
21:52
quoting doesn't change the way parameters are treated
Avatar
@Night_L /times 950 1
21:53
will show you the last finishes by player named 950
Avatar
In general you can use /help times to find out stuff like that
Avatar
I see. But default behavior is inconsistent between /times "name with a blank" and /times "pure-number". If this is designed to be, it is somekind confusing. (edited)
Avatar
indeed
Avatar
I would agree this is not a designed calling of the command (but it just, doesn't fit)
22:15
This might be a out-of-consider case in the pipeline of parsing. IDK
Avatar
it's the weird choice the first person to implement it made
Avatar
In essence the command is both times ?s[name] ?i[numbertoskip] and times ?i[numbertoskip] when name is. When name is just numeric it's a parser conflict
Avatar
to treat numbers differently from names
22:16
when numbers can obviously also be names
Avatar
I don't like it either but I doubt we can change it without someones mothers cousins uncles brothers bind breaking
Avatar
Avatar
Learath2
In essence the command is both times ?s[name] ?i[numbertoskip] and times ?i[numbertoskip] when name is. When name is just numeric it's a parser conflict
There is quotes when querying ID
22:17
or quotes doesn't work as I expect??
Avatar
Quotes don't imply string. Maybe they should? I'm not completely sure of the implications if we do that
Avatar
I know now.
22:18
But, /times "12 3" doesn't make sense unless "12 3" refers to a ID instead of [numbertoskip]
Avatar
"12 3" should work as expected
Avatar
I wouldn't be so sure of that 😄
Avatar
I mean, numbers won't contain blanks inside themself.
Avatar
"12 3" will make it evaluate as one string argument
22:21
unless the person who made the command considers ' ' numeric I can't see it doing times ?i
Avatar
so /times "123" is not that useful since /times 123 will work ofcuz..
Avatar
nah, 12 3 is going to be an offset
22:22
as is 123abc
22:22
if I read the code correctly
22:22
pResult->GetInteger(0) != 0
22:23
and that's straight up atoi
22:23
praise C's shitty integer parsing functions and that we use them
Avatar
Avatar
Learath2
Quotes don't imply string. Maybe they should? I'm not completely sure of the implications if we do that
Now I am rly confused by parsing haha. I suppose "abcd" implies abcd is treated as an ID no matter what abcd is. The reason is quite simple: quoting a number doesn't make sense, we only quotes ID since there are names with blanks
22:27
Do we have anything else in commands other than "s t r i n g" and number?
Avatar
are you interested in why things are the way they are?
22:29
I agree that the current syntax is bad
22:29
I think that problem appeared because the /times function tried to stuff two possible parameters into one
Avatar
what happens if a name contains quotes
Avatar
quotes are used to separate parameters
22:31
you can do "\""
22:32
that is used for the name that is a single doublequote
Avatar
im pretty sure there was a name u couldnt check /times of
Avatar
Avatar
heinrich5991
I think that problem appeared because the /times function tried to stuff two possible parameters into one
Probably yes. But things can be fixed if we suppose quoting a number directly refers to a string, a name. So things will become quite simple :< (edited)
Avatar
Avatar
Night_L
Now I am rly confused by parsing haha. I suppose "abcd" implies abcd is treated as an ID no matter what abcd is. The reason is quite simple: quoting a number doesn't make sense, we only quotes ID since there are names with blanks
The callback function knows nothing of quotes. The console parses that. So quotes only enforce that no matter what, the things within the quotes will be treated as one parameter
Avatar
Avatar
Learath2
The callback function knows nothing of quotes. The console parses that. So quotes only enforce that no matter what, the things within the quotes will be treated as one parameter
k. So not able to fix it directly, we should seperate /times into two commands i guess
22:42
Or just make it legacy and nevermind
22:42
Anyway, I now know the problems behind. NVM
Avatar
Also, the part that does this parsing knows nothing of the concept of names
22:42
I wanted to teach it but just haven't had the time to hash out a plan
Avatar
I guess one could stop accepting offsets in there
22:43
I feel like that would be the cleanest fix
Avatar
@heinrich5991 but how do we replace times ?i[numskip] then?
22:44
a new command?
Avatar
/times heinrich5991 5
Avatar
/times 5 is what I was concerned about
Avatar
oh right, it returned recent finishes
22:44
new command?
22:45
/recent
Avatar
Yeah I think that's the cleanest
22:45
or maybe /finishes
Avatar
ah didn't know it supported escape sequences
22:47
though I could have expected that based on the fact that motd does (edited)
Avatar
the motd has its own treatment of escape sequences
22:49
in the weirdest way possible
22:49
the character sequence \n is translated into a newline by the client(!)
Avatar
ohh interesting
Avatar
Avatar
Learath2
The callback function knows nothing of quotes. The console parses that. So quotes only enforce that no matter what, the things within the quotes will be treated as one parameter
em, I think the console parser could parse /cmd "some thing" 123 into cmd ; "some thing"; 123. So the pipeline gets information of quotes. Just do not break quotes without escapes and split by blanks. (Well, this might need an automata to realize..)
Avatar
any recommendations for simple web servers
22:55
I might give cobalt.rs a try
Avatar
what do you want to build?
Avatar
Avatar
lynn
any recommendations for simple web servers
cobalt.rs seems to be a static site generator not a web server
Avatar
well it also serves the files
Avatar
Well it seems to have a live preview thing like most new frontend frameworks have provided by tiny_http. I wouldn't host anything like that in production no matter how small 😛
Avatar
Avatar
Night_L
em, I think the console parser could parse /cmd "some thing" 123 into cmd ; "some thing"; 123. So the pipeline gets information of quotes. Just do not break quotes without escapes and split by blanks. (Well, this might need an automata to realize..)
I might be able to deal with it with some lexer. After my thesis defence :<
Avatar
Avatar
Learath2
Well it seems to have a live preview thing like most new frontend frameworks have provided by tiny_http. I wouldn't host anything like that in production no matter how small 😛
nginx is not that difficult to set up and is small, especially trivial if you are hosting a static website
Avatar
Avatar
Night_L
I might be able to deal with it with some lexer. After my thesis defence :<
The problem isn't that it's unsolvable. The problem is whether we want it solved. This seems to be more of an issue on the person implementing the command trying to pack too much into one command
23:05
Quotes imply string would also fix this without messing with the parser possibly breaking dozens of things
Avatar
nginx gives me heartburn
23:09
it's really going to be a single page with links / IP addresses. https://teehou.se
23:09
unreachable for now
Avatar
just bite the bullet and learn it, it's a skill useful for a lifetime
23:12
for a static website it's absolutely trivial as I said
Exported 122 message(s)