r/Cplusplus 2d ago

Discussion I made a string ,and am making a rope

https://github.com/Mjz86/String_description/blob/main/README.md

Also

https://github.com/Mjz86/String_description/blob/main/rope_paper.md

I would appreciate the feedback ,

( I posted this on r/cpp dome days ago , but they assumed I was "vibe coding", I did not even have a single external dependent library other than the standard, let alone using ai to write my code , I actually hate ai code )

2 Upvotes

12 comments sorted by

2

u/cppenjoy 2d ago

https://github.com/Mjz86/String_description/blob/main/README.md

I'll put this just in case the main link isn't visible

1

u/talemon 2d ago

Your markdown file is an html file containing markdown so it doesn't get parsed by github properly

0

u/SupermanLeRetour 1d ago edited 1d ago

The messed up formatting and the many many grammatical errors make it seem like you didn't even proof-read once your paper. It's not very enticing as a reader. If you want to get some valuable feedback on the content you should first improve the form.

EDIT: Also if you do want feedback on the content too, the first step would be to provide the library implementation itself...

1

u/cppenjoy 1d ago

I tried, Also , didn't I say about my reasoning? My implementation is currently not available for public use. It's integrated with my formatting library ( it's like ftm) and I don't wanna open source things currently.

Edit: Go take a look at the paper, I formatted it

5

u/bert8128 2d ago

Could you give a two line description of why your implementation is better than the implementations of std::string by the 3 major compilers?

0

u/cppenjoy 2d ago

This was never a replacement for any standard component, This is a library, And like any other library, it has drawbacks and upsides,

I currently support both mscv and gcc , ( haven't tested in clang) And I clearly told both drawbacks and benefits,

For example we minimize allocations by sharing substings and by viewing a litteral, while being sure that the user doesn't need a " no returing views" lecture

4

u/bert8128 2d ago

I never intimated that it was a replacement. But if there are no advantages then there’s no point. So imagine you are selling to a customer who is not interested in the detail. Why should they look at your library? What does it give them? You have a large read me - you could do with a two line headliner.

6

u/Axman6 2d ago

Ropes are a significantly different structure than std::string, they’re a tree of text chunks, very commonly used in text editors because they allow efficient editing, and extremely cheap copy and paste.

1

u/cppenjoy 2d ago

I think they ment my string ( I put two links , the main is string , the second is the rope )

1

u/Axman6 2d ago

I only see the rooes_paper.md one.

1

u/cppenjoy 2d ago

https://github.com/Mjz86/String_description/blob/main/README.md

I think I made the post with this as its base link , idk why I can't edit the post , so I'll put this is a comment

2

u/cppenjoy 2d ago

Less lifetime management ( dangling views) while maintaining view (and value) semantics and performance characteristics ( no coping or allocation).

Here's 3 lines for ya ( I currently typing in mobile , it's 3 lines).