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 2017-12-06 00:00:00Z and 2017-12-07 00:00:00Z
Avatar
RUS down, GER ddos in full swing
Avatar
we can't do much
Avatar
no doubt
Avatar
We are doomed to ddoses
14:35
:/
15:10
ger under ddos
Avatar
[ddnet/ddnet] New branch created: staging.tmp
15:30
f50260b Fail gracefully when trying to automatically do... - heinrich5991 efdb313 [ci skip] -bors-staging-tmp-959 - bors[bot]
15:30
f50260b Fail gracefully when trying to automatically do... - heinrich5991 99dfe9d Merge #959 - bors[bot]
Avatar
@deen our of interest, how far did you get with your hookrace idea back then?
Avatar
ChillerDragon 2017-12-06 15:38:08Z
what idea?
Avatar
@cineara not far at all, just brainstorming, some random code, learning a new programming language, reporting dozens of bugs, writing blog articles about the language, forgetting that I wanted to write a game initially
15:40
thanks
Avatar
ChillerDragon 2017-12-06 15:42:53Z
lol
15:42
but sounds kewl
15:43
yo mates
15:43
i ripped the randomness ._.
15:43
15:43
rand() % 3 - 1 dropped 0 20 times in a row (edited)
Avatar
are you seeding it?
15:51
srand (time(NULL));
15:51
@ChillerDragon
Avatar
ChillerDragon 2017-12-06 15:56:52Z
hm
15:57
but in other test program it works without srand
15:57
sec ill try
15:59
its weird. ._. i have to call srand everytime before i call rand to change the value
Avatar
where can i buy teeworlds tee-shirt?
Avatar
ChillerDragon 2017-12-06 16:00:34Z
ddnet.tw
16:00
T-Shirts for DDracenetwork: http:ddnet.tw
Avatar
DDNet doesn't get any money from them, but you can buy DDNet T-Shirts.
16:01
wtf
16:01
not good
Avatar
@ChillerDragon no you dont
16:22
you seed the randomness with srand one time
16:22
all following calls to rand() will get you a new random number
16:23
if the seed is the same the sequence of numbers returned by rand() will be the same
Avatar
@ChillerDragon you should only call srand once per program, early in your main function
Avatar
teeworlds on linux feels so off
Avatar
What's off about it 🤔
Avatar
it doesn't feel smooth :/
Avatar
@gdin didnt u say u play tw on windows too?
Avatar
No, I hate windows xd
17:15
@Learath2 If you're running it through X11, I find that fullscreen actually makes a big difference
Avatar
but then I have to endure the blackscreen while switching windows 😛
Avatar
I just made a bind to unfullscreen whenever I want to change windows xD
17:16
worth the trouble
Avatar
and my resolution getting messed up everytime I switch screens :/
Avatar
i havent got a single distro supporting 144hz nicely
17:16
so i play on windows
17:16
feelsbadman
Avatar
My monitor is 60Hz rip
Avatar
it feels lot lot more smooth at 144 (edited)
Avatar
Ye i'd imagine
Avatar
and since i can get perfectly more than 144fps it is even more smooth on teeworlds :D
17:17
(i get 2000fps on average hehe) (edited)
Avatar
Aha I got 6000 before on my desktop, but current machine gets like 200
Avatar
well fps depends, playing with entities or not
Avatar
Haven't played with graphics in years
17:18
😂
Avatar
I consistently get 1000fps, doesnt stop it from stuttering both on windows and on linux
Avatar
windows is masterrace for gaming
17:19
pls gdin
Avatar
I don't disagree
17:19
but I hate windows more than I would reap benefits
17:20
not worth
Avatar
it is, cause the strong push from microsoft to the gpu manufacturers and their drivers
Avatar
I only restart to windows to play games nowadays
17:20
it's called wintendo
Avatar
I had a win7 partition for a while but only booted it like 3 times a year xd
17:21
so eventually nuked it for more storage
Avatar
A Windows-based system that is used only for gaming, whose user prefers a REAL Unix-based operating system (often some distribution of Linux or, more often, Mac OS X) for their serious work.
Avatar
@Ryozuki liez, you program in C#
Avatar
visual studio is such a good tool
17:21
butu can use mono
17:21
and program in linux too
Avatar
mono is 😦
Avatar
with monodevelop
Avatar
VS Code is p nice when configured right
Avatar
vs code != visual studio
17:22
visual studio knows basically everything of c#
17:22
its like the perfect ide for it
17:22
xD
17:22
it sucks on other languages tho
Avatar
aha for c# makes sense I guess
17:22
I use vscode for cpp mostly
17:23
@Learath2 why mono is sad face?
17:23
i find it a nice thing
17:23
also .NET core is crossplatform now
Avatar
although I'm tempted to learn emacs 🤔 🤔
Avatar
it brings the windows ecosystem that i hate to linux
Avatar
quite the rabbit hole tho
Avatar
emacs is like an entire OS 😄
17:24
17:24
"The best editor is neither Emacs nor Vim, it's Emacs and Vim!"
Avatar
I'm really stuck between biting the bullet and buying sublime text or configuring vim and learning a thousand keybinds
17:25
it's so worth it thinking_smirk
Avatar
and by the time i'm done with vim it'll be so slow because of all the "unnecessary" plugins I want 😛
Avatar
if u know lot of keybindings u will be more profitable on vim
Avatar
it just becomes muscle memory after using it for a while
Avatar
I know all the basics but to be an efficient user you need a lot more
Avatar
dont really need to make much concious effort imo
Avatar
also my hjkl-fu is off since I stopped playing nethack
17:28
@gdin do you use vim?
Avatar
i do when im on linux and editing scripts
17:28
neovim
17:29
i still love that vim has a joke on its main page
Avatar
I need a more regular user to ask plugin performance
Avatar
@Learath2 I use vscode with vim keybinds for heavier projects, and vim for small edits usually
17:29
Tempted to go to vim fully at some point
Avatar
really don't want to get into vscode
Avatar
Yeah its kinda fucky
Avatar
scared I'll get too connected and micro$$$oft will pull a 180
Avatar
I just like it for the gdb frontend xD
17:30
yeah also worried about m $
Avatar
got so used to gdb the frontends disturb me now 😛
Avatar
Once I get used to it normally, thats when I can switch to just vim xD
Avatar
did you try gdb -tui?
17:32
Didn't know that was a thing
Avatar
will have to check that out feelsgoodman
Avatar
who heard about the timeless debugger
Avatar
atom was such a let down for me 😦
17:37
I really wanted to love it, I start it up it takes 30 seconds :(((
Avatar
<nemo2> composability is a big deal. even though I probably only use a tiny fraction of vim's power
Avatar
file gets too big it starts lagging :/
17:37
with sublime I can lazy load huge files
Avatar
<nemo2> Learath2: I don't really use hjkl much. too used to arrow keys. Use their visual mode tons
17:42
<nemo2> Learath2: I like ctrl-v block select/replace in code
Avatar
I need to get used to it b/c my next keyboard doesnt have arrow keys 😛
Avatar
<nemo2> Also use their regex a lot. love the fact you can call formulas on the matches. more convenient to do it in-editor than to fire up a code tool
17:43
<nemo2> O_o
17:43
<nemo2> whaaat? kbd w/o arrow keys? heresy.
17:43
<nemo2> even my tiny compact kbd I use to make coding on my phone less painful has arrow keys
17:44
<nemo2> I did use vim with vs last time I actually had to use visual studio - but, that was like 12 years ago.
Avatar
thats a nice article nemo2
Avatar
Just rebind all arrow key functions to hjkl toptri
Avatar
VIM Adventures is an online game based on VIM's keyboard shortcuts. It's the "Zelda meets text editing" game. So come have some fun and learn some VIM!
17:45
<nemo2> heh
Avatar
<nemo2> I really don't see the advantage of hjkl frankly. vim is everywhere. arrow keys are everywhere. if I was going to use non-←↑↓→ I'd use wasd I think
17:46
<nemo2> more intuitive arrangement
Avatar
hjkl much better positioned on the keyboard tho
Avatar
<nemo2> ehhh
Avatar
I have to bend my wrist to get to arrow keys and I end up away from all other keys at the end
Avatar
<nemo2> so wasd then 😉
17:47
<nemo2> familiar w/ it from games
17:47
<nemo2> nothing to relearn
17:47
<nemo2> fingers are even in same position as arrows
Avatar
It's nearly as efficient for me as arrow keys, and your hand already rests there
17:47
feels just as natural after getting used to it (edited)
Avatar
<nemo2> shrugs.
17:48
<nemo2> like a ton of vim stuff, the only reason I haven't gotten to using it is there's no reason to do so
Avatar
wasd could actually be nice
17:48
I might try that out
Avatar
<nemo2> like. I don't use marks and copy buffers nearly enough
17:48
<nemo2> I should, and I bet I'd get an extra like 5% in speed if I did so
17:48
<nemo2> but just can't be bothered
17:49
<nemo2> /pattern and % work well enough
17:49
<nemo2> hell. sometimes I undo/redo to get back to a prior action point just 'cause I can't be bothered to use the `. history ☺
17:50
<nemo2> or g,
17:50
<nemo2> well g,/g;
17:50
<nemo2> g, and g; are good if doing a lot of changes all over a file tho. and that's also when I start doing mark points
17:50
<nemo2> 'course by then I've probably said eff it and broken out global replace/regex ☺
17:51
<nemo2> " why am I copying and pasting this change from 30 lines back, then fixing it for this context when I could just be doing :↑ s///
Avatar
oh this vim adventures thing looks awesome tyty
19:05
f50260b Fail gracefully when trying to automatically do... - heinrich5991 4e0be68 Merge pull request #959 from heinrich5991/pr_dd... - Learath2
Avatar
ChillerDragon 2017-12-06 19:24:52Z
@heinrich5991 @Learath2 (sorry for answering ur super old statement about the call the srand() one time in main but here it is:) ye i thought that too. But i tested it. If i call it once it doesnt help i have to call it every time before i want to use rand(). I tested it in a plain test.c with only a loop which prints random numbers it works great. But in this special code i send earlyer i have to call it every loop tick to get new values. Idk it is a sub process fork or something i dont really understand
Avatar
show code
19:31
>Each time rand() is seeded with the same seed, it must produce the same sequence of values. >srand() is not guaranteed to be thread-safe.
Avatar
<nemo2> heinrich5991: you guys only seed once?
19:33
<heinrich5991> yes, we don't actually (want to) use randomness
19:33
<nemo2> why?
19:34
<heinrich5991> why would you want to use randomness? ^^
19:34
<nemo2> heinrich5991: so people using same seed don't get same game...
19:34
<nemo2> heinrich5991: before we added more randomness we had players doing play prediction and seed abuse
19:34
<nemo2> heinrich5991: much like why nethack changed to adding randomness during play
19:35
<heinrich5991> well, teeworlds is pretty much deterministic, except for a few things that we (I) want to change
19:35
<nemo2> sure. hedgewars is deterministic too...
19:35
<nemo2> deterministic lockstep even
19:36
<nemo2> nethack is pretty deterministic as well
19:36
<heinrich5991> not really, is it?
19:36
<heinrich5991> you even have random damage
19:36
<nemo2> hm?
19:36
<heinrich5991> miss chance, etc.
19:36
<nemo2> ah
19:36
<nemo2> heinrich5991: guess mean different things
19:37
<nemo2> heinrich5991: skill vs chance
19:37
<nemo2> heinrich5991: I personally prefer playing modes w/ less chance
19:37
<nemo2> but oddly our most popular one is a mix. I think 'cause it lets sucky players win from time to time
19:37
<nemo2> heinrich5991: in case of nethack the RNG used to be very abusable
19:37
<heinrich5991> yes, I remember the blog posts :)
19:37
<nemo2> it was exploited on the online servers to generate arbitrary items and guarantee an easy speedrun
19:38
<nemo2> so they mixed in human input. which is 'sact same thing we did.
19:38
<nemo2> still predictable in theory, just a lot harder
19:38
<nemo2> most people can't be bothered ☺
19:38
<nemo2> I had my home server attacked shortly after ruining some item predictor/selector's fun on our server
19:39
<nemo2> all he had to do was run the simulation ahead and he could have done same thing, but I don't think he even knew how to build the game
Avatar
This will hopefully allow the macOS system on Travis CI to finish.
Avatar
Idk it is a sub process fork or something i dont really understand
@ChillerDragon Well rand() is pseudorandom, with the same seed for each process it also will produce the same output, therefore having the same number on each fork is expected.
Avatar
ChillerDragon 2017-12-06 21:28:15Z
ye i guess that makes sense i thought of the same but i didnt know i was forking at all in the beginning
Avatar
where do you fork? 😃
Avatar
forking?
21:58
Can you explain that word to me :D?
Avatar
In computing, particularly in the context of the Unix operating system and its workalikes, fork is an operation whereby a process creates a copy of itself. It is usually a system call, implemented in the kernel. Fork is the primary (and historica...
Avatar
that's how you create new processes on non-windows
22:06
it creates an exact* duplicate of your current process
22:12
now i understand
22:13
partially
Avatar
<nemo2> heinrich5991: heh. yeh. the "*" is important ☺\
22:24
<heinrich5991> yea :)
22:24
by Colm MacCarthaigh In 2015, AWS introduced s2n, a new open source implementation of the TLS/SSL protocols that protect the privacy and integrity of data moving over a network. s2n was designed to be secure, simple, small, and fast. The project is thriving, and we use it extensively. In February, our CISO Stephen Schmidt shared […]
22:24
<nemo2> WIPEONFORK
22:24
<heinrich5991> nemo2: most importantly, the function returns 0 in the child, and nonzero in the parent
22:24
<heinrich5991> ;)
22:25
<heinrich5991> seen it :P
22:25
<nemo2> heinrich5991: 'k. I linked to it mostly 'cause this comment was interesting to me https://news.ycombinator.com/item?id=15761326
colmmacc
bmm6o's reply captures the approach; you WIPEONFORK a guard variable, and use the state of that variable to re-initialize.When we're writing a crypto library, like s2n, or OpenSSL, we don't get a choice to avoid fork() ... the application can for...
22:26
<nemo2> yeh, must be annoying for the lib which is trying hard to be secure
22:27
<nemo2> well. that comment and the "reliably detecting forks" link in the reply
Avatar
@Learath2
23:53
Exported 240 message(s)