|
no
|
# ? Aug 24, 2016 01:26 |
|
|
# ? May 11, 2024 08:14 |
|
Bloody posted:c has string functions? c has strings?
|
# ? Aug 24, 2016 01:58 |
|
jony neuemonic posted:c has strings? what is a string but an array of characters? and what is a cat but a furry bag full of meat and knives?
|
# ? Aug 24, 2016 02:05 |
Terrible programmers: what is a string but an array of characters?
|
|
# ? Aug 24, 2016 02:11 |
|
Luigi Thirty posted:I too am ending up basically implementing all of C's string functions but in 68000 asm the c stdlib string functions are so bad you should do this anyway no shame
|
# ? Aug 24, 2016 02:15 |
|
420 time to strtok it up
|
# ? Aug 24, 2016 02:23 |
|
Skim Milk posted:Haskell prelude: what is a string but a list of characters?
|
# ? Aug 24, 2016 02:25 |
|
what is a string but a contiguous block of memory that runs until a zero
|
# ? Aug 24, 2016 02:26 |
|
What is a string? A miserable little array of characters. But enough talk... Have at you!
|
# ? Aug 24, 2016 02:26 |
|
Skim Milk posted:Terrible programmers: what is a string but an array of characters?
|
# ? Aug 24, 2016 02:27 |
|
if you think about it, everything is an array of chars!
|
# ? Aug 24, 2016 02:50 |
|
actually everything is a miserable pile of bits
|
# ? Aug 24, 2016 02:54 |
|
you mean vector<bool>
|
# ? Aug 24, 2016 02:55 |
|
hobbesmaster posted:you mean vector<bool>
|
# ? Aug 24, 2016 03:17 |
quiggy posted:Terrible Programmers: What is a string? A miserable little array of characters
|
|
# ? Aug 24, 2016 03:25 |
|
It's all just bits in the wind.
|
# ? Aug 24, 2016 03:26 |
|
Notorious b.s.d. posted:the c stdlib string functions are so bad you should do this anyway well okay i've only really had to write memset, memcmp, strlen, and strcmp so far
|
# ? Aug 24, 2016 03:42 |
|
Luigi Thirty posted:well okay i've only really had to write memset, memcmp, strlen, and strcmp so far now do strtok, but make it not suck
|
# ? Aug 24, 2016 04:06 |
|
dont do c style strings
|
# ? Aug 24, 2016 04:07 |
|
Bloody posted:dont do c style strings that's how they come in from the simulator
|
# ? Aug 24, 2016 04:08 |
|
i believe in your ability to modify the simulator
|
# ? Aug 24, 2016 04:13 |
|
Bloody posted:i believe in your ability to modify the simulator well the source is available but it requires Borland C++ 6 to build which I didn't even know existed
|
# ? Aug 24, 2016 04:17 |
|
Luigi Thirty posted:well the source is available but it requires Borland C++ 6 to build which I didn't even know existed lol. havent heard borlands name since i did turbo pascal in high school.
|
# ? Aug 24, 2016 04:47 |
|
what are the alternatives to C-strings that are applicable here anyway? Pascal strings?
|
# ? Aug 24, 2016 04:54 |
|
hell yes
|
# ? Aug 24, 2016 05:02 |
|
in a twist of irony, c-strings are some p-lang bullshit with p-strings are the one true string
|
# ? Aug 24, 2016 05:03 |
|
string is only a label you choose to give to a bunch of bytes; forget about any deeper meaning and you shall know true peace
|
# ? Aug 24, 2016 05:58 |
|
YeOldeButchere posted:string is only a label you choose to give to a bunch of bytes; forget about any deeper meaning and you shall know true peace let me just index into this bunch of bytes, no problem
|
# ? Aug 24, 2016 07:28 |
|
OH NO YOU FOOL YOU HAVE GONE PAST THE END OF THE ALLOWABLE RANGE OF BYTES! NOW YOU ARE DOOMED TO UNDEFINED BEHAVIOR UNTIL THE END OF TIMES! FOREVER!
|
# ? Aug 24, 2016 07:34 |
|
actually you're allowed to go one past the allowable range of bytes, you're just not allowed to look down at what you're standing on the wile e coyote rule of pointers
|
# ? Aug 24, 2016 07:46 |
|
Luigi Thirty posted:what are the alternatives to C-strings that are applicable here anyway? Pascal strings? Strings are just a way to smash text into a data structure. It sounds like a trivial thing, but it stops being trivial the second you start needing to represent more than a few hundred characters. Things like Boost or ICU are often used instead of C/C++ strings. Friends don't let friends reinvent strings in projects that matter. Use a library. Strings are harder than you know, and you WILL gently caress it up and introduce tons of sec fuckups and then when it comes time to do i18n later you're gonna wanna say ErIog fucked around with this message at 07:53 on Aug 24, 2016 |
# ? Aug 24, 2016 07:50 |
|
ErIog posted:Strings are just a way to smash text into a data structure. It sounds like a trivial thing, but it stops being trivial the second you start needing to represent more than a few hundred characters. normally I would agree with all this but luigi30 is creating basic libraries for ancient architectures for fun in which case: do some stuff with the cstring functions since you're doing it for the hell of it. then look at what you'd need to do for a proper Unicode library like Qt's qstring and run screaming back to your dos renderer
|
# ? Aug 24, 2016 07:57 |
|
I'm familiar with what Luigi Thirty is doing. That's why I said "in projects that matter." I'm pretty sure he doesn't care much about i18n for his toy project, but he could probably use ICU to get Unicode support. It would be a good exercise, and the Japanese support would make it good for a e s t h e t i c. ErIog fucked around with this message at 08:04 on Aug 24, 2016 |
# ? Aug 24, 2016 07:59 |
|
Jabor posted:actually you're allowed to go one past the allowable range of bytes, you're just not allowed to look down at what you're standing on this extends to iterators in general, too it reminds me of that time i decided i'd try implementing some stl containers on my own and tried to stick to "strict" c++ as much as possible. one of the issues i had was with the value of the end() iterator for sets/maps. the iterator was just a pointer to the correct node in the underlying tree, so my first thought was making it null for the end() iterator. but then decrementing that iterator wouldn't be possible unless it also kept a pointer to the root of the tree as well. every option i considered had its own drawbacks, so eventually i looked at the actual implementation on my machine and it turns out it just has a base_node class and a derived actual_node<T> class, with a node of type base_node to mark the end of the tree. it just static_casts everything to actual_node<T> when you try to dereference an iterator, which is exactly the sort of stuff i was trying to avoid in the first place the lesson here is that even the stl doesn't care much about casting things all over and neither should you
|
# ? Aug 24, 2016 08:07 |
|
my god it's full of chars
|
# ? Aug 24, 2016 11:19 |
|
Soricidus posted:Terrible programmers: my god it's full of chars
|
# ? Aug 24, 2016 11:36 |
|
Soricidus posted:Terrible programmers: my god it's full of charsÒopv¨Æ®}ùÇVÆs£·O"\Oz¯¿kêHÉ~êçW$Rß»mÖÞ¯b
|
# ? Aug 24, 2016 12:39 |
|
|
# ? Aug 24, 2016 12:45 |
|
HoboMan posted:so the api i am now lead dev on is secretly just a wrapper for a another api that no one even knew about oh yeah, we do this. right down to the api making request to other api running on the same machine. the reason that we did such an awful, awful thing was due to time constraints and legacy code
|
# ? Aug 24, 2016 13:00 |
|
|
# ? May 11, 2024 08:14 |
|
i felt bad for the guy who had to go and write integration tests for that i heard that he needed to use an awful lot of Thread.Sleeps
|
# ? Aug 24, 2016 13:03 |