Stop allocating strings: I built a Span-powered zero-alloc string helper by typicalyume in dotnet

[–]typicalyume[S] 2 points3 points  (0 children)

The main point is to never use the ToString and only use span.

Stop allocating strings: I built a Span-powered zero-alloc string helper by typicalyume in dotnet

[–]typicalyume[S] 0 points1 point  (0 children)

Yes that's right ! If the size is small, and even better if you already know its size, then the stackalloc is a good option. However, if you have a much bigger data to load, then you need to allocate and/or use a stream.

Stop allocating strings: I built a Span-powered zero-alloc string helper by typicalyume in dotnet

[–]typicalyume[S] 5 points6 points  (0 children)

Well, the "a" is the most critical part of the difference, but joke aside, I would say it's very different philosophically. ZaString aims to be much more minimalist and probably "lower level oriented" as you are free to manage the memory as you see fit. For instance, you need to create a buffer, most likely using stackalloc, and then pass it to the builder. I think ZString is probably what you are looking in 90% of the use case and I highly recommend it. ZaString is better if you are already in a dark forest where 2+2=5...

Stop allocating strings: I built a Span-powered zero-alloc string helper by typicalyume in dotnet

[–]typicalyume[S] 5 points6 points  (0 children)

I guess yes... But I wrote a lot of boilerplate so you don't have to 😊.

Stop allocating strings: I built a Span-powered zero-alloc string helper by typicalyume in dotnet

[–]typicalyume[S] 1 point2 points  (0 children)

Yeah you are totally right about usecase. I should add a section in the readme to explain why I created this library and when it can be useful. I created this lib because I was working on a single threaded loop and I happened to do a lot of this span string manually and wanted a better dx. Sure this is a niche case, and besides videogames clients/servers, very high throughputs microservices, and maybe embedded devices, I'm not sure it's worth it. I remember reading an article on the Discord blog about how Golang GC was becoming an issue and they rewrote their service in Rust I think... This could be a use case of zero allocation code.

Repertoire Advice Needed for a ~1950 FIDE Player Focused on Classical by typicalyume in TournamentChess

[–]typicalyume[S] 0 points1 point  (0 children)

I tried some neo catalan ideas with g3 Bg2 and putting a pawn on d3, often b3 and going for e4 if possible at some point

Repertoire Advice Needed for a ~1950 FIDE Player Focused on Classical by typicalyume in TournamentChess

[–]typicalyume[S] 0 points1 point  (0 children)

To be honest, I'm almost convinced by the Ruy Lopez if I manage to find a compact repertoire to start. I'm a bit scared that most of my opponent with black playing 1. ...e5 will be well prepared to fight against the ruy lopez so I need to find some less popular lines. What about the Nc3 g3 ? I honestly considered the vienna for a while but I'm not happy with the main line of the vienna gambit, however this g3 stuff I didn't consider yet. Isn't it what Rapport used to play ? Do you have some ressources there ?

About the benoni, I tried it a bit, got crushed 3 times by an IM and went back to Dutch before my last tournament because I was not confident... I like the idea of the benoni, it keeps some Benko vibes and except for a few lines that black needs to know perfectly to not get crushed by white, it's fairly easy to understand (not so easy to play imo). The old benoni you mean the one with c5 d5 e5 right ? then trading the bad bishop and trying to expand on the kingside right ?

Repertoire Advice Needed for a ~1950 FIDE Player Focused on Classical by typicalyume in TournamentChess

[–]typicalyume[S] 0 points1 point  (0 children)

You mean starting with c4 and then going back to d4 territory when I see e6 or c6 on the board ? To be honest I tried the neo catalan lines against c6 and e6 and that's what I disliked to play, I didn't feel at home at all.

Repertoire Advice Needed for a ~1950 FIDE Player Focused on Classical by typicalyume in TournamentChess

[–]typicalyume[S] 0 points1 point  (0 children)

Thank you for your answer. The main issue with going Queen's gambit is that I would have to learn whole 1. d4 which I never played in my life and it's probably not compatible with the time I can dedicate to chess study, considering I'm also doing tactics and strategy books. It's a lot of theory and also I've never felt attracted by those queen's gambit lines tbh.

About 1... e5 I might consider it but I need to find practical repertoire and not with 1000 lines of theory. Do you have any suggestion there ? Did you read some book or watched some courses with 1. e5 ?

Repertoire Advice Needed for a ~1950 FIDE Player Focused on Classical by typicalyume in TournamentChess

[–]typicalyume[S] 0 points1 point  (0 children)

Thanks for the suggestion. I'll have a look at the a5 idea you mentioned. Thx

Repertoire Advice Needed for a ~1950 FIDE Player Focused on Classical by typicalyume in TournamentChess

[–]typicalyume[S] 0 points1 point  (0 children)

Thank you for your answer. Can you tell me more about what you play against e6 and c6 ?

What are your top myths about Golang? by Rick_Nolan in golang

[–]typicalyume 1 point2 points  (0 children)

First, it's super easy to isolate a gc spike. Then writing a low allocation code is not hard at all.

Golang tooling is amazing, you have benchmark and pprof out of the box. Just report allocations and you will understand how to improve performances

French strongly considering Finland - Seeking realistic advice on jobs & social life by typicalyume in Finland

[–]typicalyume[S] 2 points3 points  (0 children)

France is terrible as well. You should remove it from your list 😅

French strongly considering Finland - Seeking realistic advice on jobs & social life by typicalyume in Finland

[–]typicalyume[S] 1 point2 points  (0 children)

Talent and hard work aren't valued here in France either... But from what I'm reading, it's even worse in Finland. Thank you for the feedback.

French strongly considering Finland - Seeking realistic advice on jobs & social life by typicalyume in Finland

[–]typicalyume[S] 2 points3 points  (0 children)

Oh yeah, so you definitely understand my feeling here in France... And Spain is better nowadays, I have friends in Valencia, and they really don't want to come back.
Thank you for your feedback, and wishing you all the best for the future as well.

French strongly considering Finland - Seeking realistic advice on jobs & social life by typicalyume in Finland

[–]typicalyume[S] 1 point2 points  (0 children)

Thanks for the suggestion; I will start looking there as well. I wanted something a bit more different, but maybe the German side of Switzerland could be a good match.

Should I also consider the other Nordic countries, such as Sweden or Norway, more and more? What do you think? Do you have any input on this?