Am I being too perfectionist?
-
I can't use the STL in my IoT projects because it's not really all there and/or properly implemented on a lot of platforms, particularly those covered by the Arduino framework. To that end, I've developed some basic data structures because I needed them. Just simple stuff, like a linked list and a hash table/dictionary. Everything works except for the dictionary's enumerator/iterator. For the life of me I can't track down why I'm getting fed a bad (non-null) pointer and I'm about ready to give up on it to the point where I want to rewrite the whole thing. There is another option. I can simply not have an enumerator/iterator. That would be reasonable considering I probably won't need one for the project I built this for in mind. But I can't bring myself to do it. It just seems intolerably incomplete to me. What kind of container can't be enumerated/iterated (aside from some multithreaded containers which have good reasons not to), so I'm still hammering away at it. Is this ridiculous? Enumeration/iteration is a core part of any container, and I'd feel really shady releasing this upon the world without one, but maybe that's just me. What do you think?
Real programmers use butterflies
-
I can't use the STL in my IoT projects because it's not really all there and/or properly implemented on a lot of platforms, particularly those covered by the Arduino framework. To that end, I've developed some basic data structures because I needed them. Just simple stuff, like a linked list and a hash table/dictionary. Everything works except for the dictionary's enumerator/iterator. For the life of me I can't track down why I'm getting fed a bad (non-null) pointer and I'm about ready to give up on it to the point where I want to rewrite the whole thing. There is another option. I can simply not have an enumerator/iterator. That would be reasonable considering I probably won't need one for the project I built this for in mind. But I can't bring myself to do it. It just seems intolerably incomplete to me. What kind of container can't be enumerated/iterated (aside from some multithreaded containers which have good reasons not to), so I'm still hammering away at it. Is this ridiculous? Enumeration/iteration is a core part of any container, and I'd feel really shady releasing this upon the world without one, but maybe that's just me. What do you think?
Real programmers use butterflies
Leave it out. > Enumeration/iteration is a core part of any container Is it actually? It's a core part of linear containers at least. You're not enumerating dictionaries in this project and that is not entirely a coincidence: dictionaries are often not enumerated. That's a useful thing to be able to do, don't get me wrong, it's just not the primary thing they're used for.
-
I can't use the STL in my IoT projects because it's not really all there and/or properly implemented on a lot of platforms, particularly those covered by the Arduino framework. To that end, I've developed some basic data structures because I needed them. Just simple stuff, like a linked list and a hash table/dictionary. Everything works except for the dictionary's enumerator/iterator. For the life of me I can't track down why I'm getting fed a bad (non-null) pointer and I'm about ready to give up on it to the point where I want to rewrite the whole thing. There is another option. I can simply not have an enumerator/iterator. That would be reasonable considering I probably won't need one for the project I built this for in mind. But I can't bring myself to do it. It just seems intolerably incomplete to me. What kind of container can't be enumerated/iterated (aside from some multithreaded containers which have good reasons not to), so I'm still hammering away at it. Is this ridiculous? Enumeration/iteration is a core part of any container, and I'd feel really shady releasing this upon the world without one, but maybe that's just me. What do you think?
Real programmers use butterflies
Without even reading your message... I would say yes. You can be too perfectionist and a bit obsessive. As Enigma said:
Quote:
...Turn off the lights, take a deep breath and relax...
M.D.V. ;) If something has a solution... Why do we have to worry about?. If it has no solution... For what reason do we have to worry about? Help me to understand what I'm saying, and I'll explain it better to you Rating helpful answers is nice, but saying thanks can be even nicer.
-
Leave it out. > Enumeration/iteration is a core part of any container Is it actually? It's a core part of linear containers at least. You're not enumerating dictionaries in this project and that is not entirely a coincidence: dictionaries are often not enumerated. That's a useful thing to be able to do, don't get me wrong, it's just not the primary thing they're used for.
You made me think, and I guess you're right. I removed the enumeration code. Thanks.
Real programmers use butterflies
-
I can't use the STL in my IoT projects because it's not really all there and/or properly implemented on a lot of platforms, particularly those covered by the Arduino framework. To that end, I've developed some basic data structures because I needed them. Just simple stuff, like a linked list and a hash table/dictionary. Everything works except for the dictionary's enumerator/iterator. For the life of me I can't track down why I'm getting fed a bad (non-null) pointer and I'm about ready to give up on it to the point where I want to rewrite the whole thing. There is another option. I can simply not have an enumerator/iterator. That would be reasonable considering I probably won't need one for the project I built this for in mind. But I can't bring myself to do it. It just seems intolerably incomplete to me. What kind of container can't be enumerated/iterated (aside from some multithreaded containers which have good reasons not to), so I'm still hammering away at it. Is this ridiculous? Enumeration/iteration is a core part of any container, and I'd feel really shady releasing this upon the world without one, but maybe that's just me. What do you think?
Real programmers use butterflies
honey the codewitch wrote:
I can't use the STL in my IoT projects because it's not really all there and/or properly implemented on a lot of platforms
Just curious, have you considered using a public domain STL, e.g. [STLport: SGI STL Overview](http://www.stlport.org/doc/sgi\_stl.html) ? I have not used it myself, don't know how complete it is, or even if it provides any C++11 or later features. In any case, the effort of compiling for an IOT device, or its tool chain might be prohibitive. I'm just wondering if such a beast might go some distance to assisting you with your project. At least, if that route is viable for you, you'd have a consistent STL implementation across all platforms.
Keep Calm and Carry On
-
honey the codewitch wrote:
I can't use the STL in my IoT projects because it's not really all there and/or properly implemented on a lot of platforms
Just curious, have you considered using a public domain STL, e.g. [STLport: SGI STL Overview](http://www.stlport.org/doc/sgi\_stl.html) ? I have not used it myself, don't know how complete it is, or even if it provides any C++11 or later features. In any case, the effort of compiling for an IOT device, or its tool chain might be prohibitive. I'm just wondering if such a beast might go some distance to assisting you with your project. At least, if that route is viable for you, you'd have a consistent STL implementation across all platforms.
Keep Calm and Carry On
I can't do it, because there's a *reason* it's not implemented properly, and or incomplete on many IoT devices. One reason is RAM in the single digit kilobytes. The other is 8-bit CPUs. That's not true of the platform I typically target, but it is true of platforms I also wish to target.
Real programmers use butterflies
-
I can't do it, because there's a *reason* it's not implemented properly, and or incomplete on many IoT devices. One reason is RAM in the single digit kilobytes. The other is 8-bit CPUs. That's not true of the platform I typically target, but it is true of platforms I also wish to target.
Real programmers use butterflies
-
I can't use the STL in my IoT projects because it's not really all there and/or properly implemented on a lot of platforms, particularly those covered by the Arduino framework. To that end, I've developed some basic data structures because I needed them. Just simple stuff, like a linked list and a hash table/dictionary. Everything works except for the dictionary's enumerator/iterator. For the life of me I can't track down why I'm getting fed a bad (non-null) pointer and I'm about ready to give up on it to the point where I want to rewrite the whole thing. There is another option. I can simply not have an enumerator/iterator. That would be reasonable considering I probably won't need one for the project I built this for in mind. But I can't bring myself to do it. It just seems intolerably incomplete to me. What kind of container can't be enumerated/iterated (aside from some multithreaded containers which have good reasons not to), so I'm still hammering away at it. Is this ridiculous? Enumeration/iteration is a core part of any container, and I'd feel really shady releasing this upon the world without one, but maybe that's just me. What do you think?
Real programmers use butterflies
What I like with my home pet project at home I can be as demanding, or as little, as I want. I learned when to throw the towel or not on my own term. That said this bug looks suspicious, and there might be more that is not working!
A new .NET Serializer All in one Menu-Ribbon Bar Taking over the world since 1371!
-
What I like with my home pet project at home I can be as demanding, or as little, as I want. I learned when to throw the towel or not on my own term. That said this bug looks suspicious, and there might be more that is not working!
A new .NET Serializer All in one Menu-Ribbon Bar Taking over the world since 1371!
Yeah it is suspicious, but it passed all my other checks, and the enumeration code kind of had to do its own thing anyway, since hashtables aren't intrinsically enumerable.
Real programmers use butterflies