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 2020-04-28 00:00:00Z and 2020-04-29 00:00:00Z
Avatar
SP | Someone (aka Zombietoad) found this bug. Given a player with the name "nameless" (including quotes!): /w "nameless" test doesn't work. it gives some error about player not found, I forget
Avatar
wtf i found that bug
Avatar
how can this actually be fixed tho
01:36
i guess making it understand escape characters? but then people can just add those to their names too
Avatar
add whisper id command
Avatar
ig thatd work
Avatar
or u can escape the escape character
Avatar
then they can put 2 escape characters in a row
01:37
escape characters arent designed to prevent intentional trolling
Avatar
does anyone actually play with quotes b4 name
01:40
just implement whisperid and itll fix for the 1 case in all of ddnet
Avatar
then you put 4 escape characters
Avatar
who came up with zsh?
09:25
it should be illegal to write such shitty documentation
Avatar
use fish, the friendly interactive shell 🙂
Avatar
why, do people even come up with new shells?
09:29
bash works completely fine
Avatar
@Learath2 fish has automatic r-search 🙂
09:36
when you type a command you have typed before, it's a simple ctrl-f away (it's nice for interactive use)
09:36
(and it has the paradigm that you don't need to configure anything for it to work well)
Avatar
I'm fine with ^R
Avatar
this is kinda "how can you say this?" when you have never seen or experienced the other thing ^^
Avatar
it's more don't fix what's not broken
Avatar
that attitude would help a java developer to never discover that functional programming also has benefits
Avatar
modern java has a lot of the useful parts of functional programming
Avatar
because some java programmers did research functional programming and figured that it would be useful to add to java
09:42
wait, you're on mac, right? I think mac has an ancient version of bash, too
Avatar
yes, they deprecated it...
09:43
so now I'm setting up zsh, one painful 50 minute google search at a time
Avatar
use fish? ^^ no setup needed
Avatar
"Web Based configuration" and "Try in browser" scares me very much
Avatar
that you can try it in the browser scares you? ^^
09:45
you can completely configure it from the command line, I never configured anything from a browser
09:45
I don't even know how to open that settings browser
Avatar
yes, I'm very much hoping they compiled it to js with emscripten and it's not coded in asm.js or something
Avatar
C++
Avatar
Okay, I guess it deserves a try
09:49
If I have to google for 50 minutes to customise my ps1 again, I'll download powershell instead
Avatar
to spare you the surprise: it's not POSIX-compliant. (command) instead of "$(command)" (and the quoting rules are a bit more sane)
09:50
@Learath2 what do you need in your PS1? 🙂
09:50
it has user, host, cwd, git branch, return value != 0 by default
Avatar
I need my own PS1
09:51
I want my own colors
09:51
[user@host] cwd [return] prompt
Avatar
hm. okay. I don't know how configurable the PS1 is, it probably is
Avatar
I don't mind some git status at the very start
09:52
well we'll see in a couple minutes
Avatar
okay, the configuration looks saner then zsh atleast
Avatar
apparently fish can't use the old style of 256 colors
10:08
I guess I'll have to convert colours, but this makes me wonder, why do people keep breaking things that aren't broken?
Avatar
can you elaborate what you mean by "old style of 256 colors"? @Learath2
Avatar
like the actual set of 256 colors supported by most of the terminals, that were defined since at least 1999
Avatar
this is quite a fluid experience I must admit
10:37
@heinrich5991 you ever use funced?
Avatar
@Learath2 no, I used funcsave in the past
10:40
used to export a function from the local environment into the global
10:40
@Learath2 have a question about funced?
Avatar
yes, it won't work
10:41
If i use it with EDITOR=vim or with -e vim, it doesn't even open anything
Avatar
let me check
Avatar
well it seems to open a vim but it's dead, somehow?
10:41
if I :q enter it quits the vim it didn't open
Avatar
meh, it works for me, that makes it a bit harder to debug
10:42
have you tried a different editor yet?
Avatar
yes, it won't work with any
10:43
nor does it work with other terminal emulators
Avatar
eh
10:44
does it work with funced -e fish
10:44
?
10:45
well atleast it displays the function
10:46
it's pretty broken though, it is scrolled all the way down, if you try to scroll up it breaks the entire display
Avatar
can you open vim in that shell at all?
10:47
(without funced)
10:48
@Learath2
Avatar
yep, works perfectly fine
Avatar
type funced gives you the source code of funced
10:54
but it also only opens the editor in a non-fancy way
Avatar
I don't even know what to look at
Avatar
me neither
Avatar
hm, eval vim .bashrc doesn't work for me
10:57
what is that supposed to mean?
10:59
eval vim doesn't work either
Avatar
hmmmm
10:59
eval vim should work
10:59
eval should just allow a variable to be used as a command IIRC
Avatar
eval nano also is broken
Avatar
compare eval env with env plz (edited)
Avatar
no difference at all
11:03
eval vim works perfectly fine in bash, so it's a fish thing
11:06
I'll compile fish from source, maybe that'll help
Avatar
I'm sorry, I see why you would abandon fish at this point ^^
Avatar
I bet it's some macOS quirk anyway
11:11
I guess if I can't modify fish_git_prompt I'll just trim the whitespace afterwards 😛
11:13
you can put the function there ~/.config/fish/functions/fish_prompt.fish
Avatar
that's an adventure for tomorrow, already spent 2 hours on setting up my shell
11:14
I just did a | string trim
Avatar
@heinrich5991 any interesting plugins for fish?
Avatar
the reason I picked fish is because I didn't want to add any plugins
11:23
it's supposed to work out of the box. I didn't research plugins
11:23
if you have a suggestion, you can use ctrl+f to complete it, or ctrl-rightarrow to complete the next word
Avatar
my parsing fails on some old maps, where the speedup layer data block doesnt have the expected size as far as i know speeups require 6 bytes for each tile, in those maps however, there are only 4 bytes for each tile (if you want an example map: ze_Gold Rush_8ab831ee.map from heinrich5991s collection
11:31
can anyone tell me whats up there?
11:31
it happens on quite a lot of maps
Avatar
why u use fish?
11:32
i never had problems with bash, and i tried zsh but its just overkill
Avatar
because I like the completions @Ryozuki
Avatar
i also have completions
11:33
# enable programmable completion features (you don't need to enable # this, if it's already enabled in /etc/bash.bashrc and /etc/profile # sources /etc/bash.bashrc). if ! shopt -oq posix; then if [ -f /usr/share/bash-completion/bash_completion ]; then . /usr/share/bash-completion/bash_completion elif [ -f /etc/bash_completion ]; then . /etc/bash_completion fi fi
Avatar
fish has completions as you type
11:33
without pressing tab
Avatar
i dont like that
Avatar
fine, but you asked me why I use fish
11:33
that's why
Avatar
well i also wanted to know learath
11:33
xd
Avatar
@Patiga ze_* doesn't sound like a ddnet map
Avatar
why fish and not zsh tho
Avatar
because zsh was a configuration nightmare apparently (scroll up)
Avatar
i could dig up many more map names if that helps
Avatar
are there any that sound like ddrace maps?
Avatar
koule3_fac7db22.map
Avatar
@Ryozuki bash is deprecated on macOS, might aswell try something new
Avatar
deprecated???
11:35
bash is getting updates
Avatar
@Patiga yea, sounds ddrace-ish
11:35
@Ryozuki system bash isn't, I think
Avatar
macOS isn't getting any of them
Avatar
@Patiga I'll bisect
11:36
@Patiga still in a lecture though
Avatar
because they moved to zsh, but zsh is a PITA
Avatar
looks like a bold move by macos
11:36
trying to deprecate the most famous shell
11:36
xd
Avatar
@Patiga hm, does it work in modern ddnet clients?
Avatar
koule3 is included in ddnet btw
11:37
lemme check
Avatar
but is it that exact version?
Avatar
is loading in the editor and for a server smth different?
11:38
or is that exchangable?
Avatar
not same
Avatar
different code paths
Avatar
@Ryozuki it's the apple way, break compatibility at every single step, leave programmers and developers baffled, call it an improvement and your fanboys won't even complain
Avatar
wtf that koule map is actually a skynet map o.o
Avatar
well it shouldn't even load well in editor if it's broken?
Avatar
@heinrich5991 wdym by system bash
Avatar
@Ryozuki well, you can still install any software you like on a mac
11:40
including a modern bash
Avatar
but they deprecate it cuz they want not cuz its a outdated software
Avatar
yes you can, it'll probably break at every step of the way because of conflicts with the system one
Avatar
the map gets succesfully loaded by the server as well as the editor
Avatar
they are probably planning to make the system bash interactive in a couple major versions
11:41
non-interactive*
Avatar
ah well
11:42
but the speedup layer is empty
Avatar
@Patiga interesting, so it's the wrong amount of bytes per tile but it works?
Avatar
ah, the speedup layer is indeed broken though 😄
11:42
I guess it is another artifact remaining from ddrace -> ddnet
11:43
I'm not sure if it still compiles but you could compile ddrace and try loading it there 🙂
Avatar
oh ye, i could also check out that repository
Avatar
I found the commit
11:44
4 bytes you say?
Avatar
i always somehow thought that ddnet just build upon ddrace and ddrace just sorta vanished so i just need to check out ddnet's repo^^
11:44
ye
Avatar
ye, that's true I think
11:45
re ddnet vs ddrace
Avatar
maybe some aligning going on with a short
Avatar
yes yes
Avatar
could you share the commit?
Avatar
yes, bit slow
11:46
just had to do something in the uni exercise class
11:46
20930ce68bc8b7648307d149caaf8ba73de12d80
Avatar
all good
Avatar
@heinrich5991 do you happen to know how fish enables ls colors?
Avatar
[quakenet] Learath2 BOT 2020-04-28 11:53:52Z
ah it's a function
Avatar
type ls
11:54
yes
11:55
man <fish-builtin> also works btw
11:55
a feature I sorely miss in bash
11:56
man cd e.g.
Avatar
well man ls wouldn't work would it?
Avatar
no
Avatar
class CSpeedupTile { public: unsigned char m_Force; unsigned char m_MaxSpeed; unsigned char m_Type; short m_Angle; }; the m_type is probably for extendability, so you could add similar tiles?
Avatar
Probably, I don't think we use m_Type yet
Avatar
so it's uninitialized? or is it 0?
Avatar
ah no it's not
12:00
we do use it
Avatar
i can check in maps, though i guess it should be 28
Avatar
it's always supposed to be TILE_BOOST for now
Avatar
uh whats tile_boost?
12:02
there already is m_Force, those sounds pretty similar
12:02
ye ok, that matches up with its index in the speedup layer png
Avatar
nice layer 😄
Avatar
I actually don't understand this code at all
12:04
Why don't the tiles inherit from CTile?
Avatar
the tiles are separate for speedup etc. layer
12:05
they don't have rotation etc.
Avatar
why isn't the tile part just generic though, these are all tile layers
Avatar
@Learath2 I don't quite follow
Avatar
the speedup layer data is in a different position than the normal tileset data
Avatar
@heinrich5991 as in the final datafile?
Avatar
its the index pointing to the data block has a different position in the item_data
Avatar
[quakenet] Konsti BOT 2020-04-28 13:26:38Z
DDNet RUS on 83% RAM and big laggy? Is it an attack?
Avatar
Konsti: doesn't look like an attack to me
Avatar
@heinrich5991 is it possible to get teehistorian2demo to output to stdout?
Avatar
USAGE: teehistorian2demo <TEEHISTORIAN> [DEMO]
15:10
./teehistorian2demo <TEEHISTORIAN> /dev/stdout
Avatar
really? I don't think that'd work
Avatar
that works for all the unix commands
15:11
unless I did something wrong, it should work for my program, too
Avatar
ddnet bin/teehistorian2demo 9ed38e1c-3005-40b2-9c0f-8eb5ac6c0c73.teehistorian /dev/stdout 9ed38e1c-3005-40b2-9c0f-8eb5ac6c0c73.teehistorian: Io(Os { code: 13, kind: PermissionDenied, message: "Permission denied" })
Avatar
so I did something wrong, nice
Avatar
which makes sense to me, tbh, root owns that device
Avatar
echo abc | tee /dev/stdout
Avatar
tee: /dev/stdout: Permission denied
Avatar
what
15:12
linux distro?
15:12
ah, macos
Avatar
Debian
15:13
it's on ddnet.tw
Avatar
hm, maybe I wrongly assumed that this is available on all systems
15:14
try echo abc | tee /proc/self/fd/1
15:15
Linux kernel source tree. Contribute to torvalds/linux development by creating an account on GitHub.
Avatar
You need to be in the tty group to handle input like this
15:15
tee: /proc/self/fd/1: Permission denied
15:16
because lrwx------ 1 teeworlds teeworlds 64 Apr 28 17:15 /proc/self/fd/1 -> /dev/pts/0 => crw--w---- 1 root tty 136, 0 Apr 28 17:15 /dev/pts/0
Avatar
ah
15:17
but if you redirect stdout, then it's no longer that tty
15:17
echo abc | tee /dev/stderr 2> /tmp/rrrrr works
15:18
so does
15:18
echo abc | tee /dev/stdout | cat
Avatar
I guess it'd work with php's passthru aswell, but I guess you might want to change that in the future to use a - for stdout like other unix programs?
Avatar
yes
15:19
sounds good
15:19
although
Avatar
that gives a special case for files called -
Avatar
99baf21 Revert "Remove the dummy prediction" - trml a4a0b6e Add config flag for dummy prediction and fix compilation - trml cae7fad Use freeze end tick in prediction - trml fe1a7fb Predict directinput order for dummy and main - trml f5c2146 Merge pull request #2150 from trml/pr_predict_dummy - def-
Avatar
well you could also try to detect whether you are being piped
15:20
that's even less portable though
Avatar
would a --stdout flag satisfy you? or is it too non-standard?
Avatar
I don't quite mind either way
15:21
maybe just output to stdout if there is no [FILE] passed?
Avatar
oh yea, that would work
Avatar
binary data into stdout is a less then pleasant experience but it's what everyone except xz does
Avatar
ah, but it has bad UX when you just type the command
Avatar
I'm really trying hard to keep this all in php, but I so want to use ajax 😛
Avatar
I know you're strong, you'll do it!
15:39
meh, it works, it looks sorta ugly but I guess this is the best we can do without js
Avatar
sorta works?
lol 1
Avatar
do you have the header Content-Type: application/octet-stream?
Avatar
yay it works
15:52
Do you think maybe I should send a chunk early on to trigger the download start?
Avatar
how would you do this?
15:53
ah
Avatar
I'd send the header, I'd send TWDEMO, i'd flush
Avatar
ah
15:53
yes, sure 🙂
15:54
can you maybe tell php to flush the headers?
15:54
would be less hacky
Avatar
I can, but I'm not completely sure that alone would trigger a download
15:54
let me check
15:55
hm, wait if I start it early, idk how I'd fail it if we can't manage to get the file from the backend
Avatar
ah
15:57
well, how fast do you know whether it's a success or not?
Avatar
the download and the decompression take a while
15:58
both can fail
15:58
tbh teehistorian2demo can also fail, but I can't signify that either
15:58
hm, maybe if I kill the connection it'd fail the download?
16:02
ah, I'll have to handle the chunking by hand then
16:03
I think it's good enough for now
Avatar
new osx update, new xcode breakage \o/
Avatar
@heinrich5991 what about players-cache python3
Avatar
I guess I'll have to take another 3 month break as macOS compilation is broken again
Avatar
!Screen 5258 Would be cool to be able to lock it with for example F1 like anything else.
Avatar
bug: tabbing into ddnet fullscreened while watching a video crashes game, freezes computer
21:36
also i get tons of random visual bugs, not sure why. would be open to debug w someone
Exported 292 message(s)