Products > Test Equipment

Open source lxi-tools and liblxi v1.0 released for GNU/Linux

<< < (9/67) > >>

borjam:

--- Quote from: rhb on November 06, 2017, 05:10:30 pm ---Anger is not the correct word.  Annoyed is more accurate.  I hate seeing unportable code that could trivially have been written to be portable to any Unix system.   I've had to fix far too much of it.

--- End quote ---

(Warning, @Ludmar, not criticizing you although I really hope this can help instill a bit more love for portability!) ;)

I bear your pain, dude.

And some Linux militant attitude certainly doesn't help. This week I sent a pull request to the OpenVSwitch project. A really stupidest, trivialest portability issue that certainly won't make me win an ACM Turing award.

What really annoyed me was the comment by the developer who accepted the pull request: "Ugh, another place that FreeBSD makes builds gratuitously fail."

A source file included <netinet/icmp6.h>, which, as usual, needs definitions from <sys/types.h>.

The original source looked like this:


--- Code: ---#include <config.h>
#include <ctype.h>
#include <errno.h>
#include <netinet/in.h>
#include <netinet/icmp6.h>
#include <string.h>
#include <sys/types.h>

--- End code ---

And it barfed on FreeBSD because <sys/types.h> is not included from <netinet/icmp6.h>. On Linux it is, it seems. What I
find really curious is that useless <sys/types.h> after <string.h> given that it's been included from <netinet/icmp6.h>.
<netinet/icmp6.h> actually includes <string.h>, <sys/types.h> and so on.

The fix for FreeBSD, OS X and presumably other *BSD derived networking code (anything but Linux, despite being *BSD
derived but sometimes seemingly butchered for the sake of it) was trivial, hence my shiny ACM Turing award. Just moving the <sys/types.h> to a position before <netinet/icmp6.h>. It always makes sense to put the #include lines more or less in a generalistic
to specialized order, so I moved it after <errno.h> (should have been ctypes.h but I was in "let's make this just work" mode and
I didn't give it a second thought).

Now, in the Linux world it seems to be customary to have system include files include themselves everything they need. I know
that lots of #include lines are annoying, but even if you are careful with #ifdef barriers and such I find it much better to have the programmer add the proper includes in the right order, so that you won't find portability surprises. But the Linux folks decided to somewhat hide all this...

Anyway what I found really annoying was the "Hey, FreeBSD breaking stuff" attitude. Linux manierism zealots don't help open source software at all, which is a pity.

lundmar:

--- Quote from: borjam on November 09, 2017, 11:12:53 am ---(Warning, @Ludmar, not criticizing you although I really hope this can help instill a bit more love for portability!) ;)

--- End quote ---

I don't want to :horse: but let me make it clear anyway since this topic keeps popping up. I'm fully aware what it takes to make portable programs and I'm all for it. However, one has to start somewhere and in my case it means starting out making it work on the most popular platform and the one that I'm using - thats why I put the GNU/Linux stipulations on the projects. Since this is a project I'm doing in my sparse spare time I wanted to focus on features rather than portability to begin with. That being said, I welcome anyone who would like to contribute to the project by improving the code, and that includes fixing any portability issues also. I expect eventually we will remove the GNU/Linux stipulations once the portability issues have been addressed (the few that there are).

It's always easier to criticize than actually do ;)

HoracioDos:
I think you shouldn't give away your work, code it your own way and sell it.
Microsoft, Oracle, IBM have a proven business model. (We do what we want and not what you need and we charge for it)
PD: You should include a "Call Home" feature and sell usage stats. By the way I would donate a good red wine for Tio!

lundmar:

--- Quote from: HoracioDos on November 09, 2017, 12:51:51 pm ---By the way I would donate a good red wine for Tio!

--- End quote ---

Ha ha, well - I'm glad you like tio ;) It's just a small no-nonsense serial tty tool with a simplified interface and a few useful features. Less is more.

borjam:

--- Quote from: lundmar on November 09, 2017, 01:13:49 pm ---Ha ha, well - I'm glad you like tio ;) It's just a small no-nonsense serial tty tool with a simplified interface and a few useful features. Less is more.

--- End quote ---
Speaking of what I might feel inclined to send a bottle of Spanish red wine northwards ;)

Navigation

[0] Message Index

[#] Next page

[*] Previous page

There was an error while thanking
Thanking...
Go to full version
Powered by SMFPacks Advanced Attachments Uploader Mod