For example:
addr.sin_family = AF_INET;
addr.sin_port = htons(1965);
Could become: addr.sin_family = AF_INET, addr.sin_port = htons(1965);11–20 of 47 posts
For example:
addr.sin_family = AF_INET;
addr.sin_port = htons(1965);
Could become: addr.sin_family = AF_INET, addr.sin_port = htons(1965);Earlier quoted context omitted.
Web refers to Gemini here, it being a command-line client for the Gemini web. These line-based browsers used to be more common, there were a few ones for the www but also ‘ftp’ has such a mode. As does my little ‘nostt’ Teletext reader.
> Web refers to Gopher here, it being a command-line client for the Gopher web. Gemini, not Gopher.
https://github.com/ir33k/gmi100/blob/master/gmi100.c#L27 definitely threw me for a loop until I realized it was a line saving trick. It would be more readable to save lines elsewhere by exploiting the comma operator instead of essentially cramming irrelevant statements into a conditional. For example: addr.sin_family = AF_INET; addr.sin_port = htons(1965); Could become: addr.sin_family = AF_INET, addr.sin_port = hton…
Thanks for suggestion. I will go through code again to see if I can save more space with normal code.
Actually that was my workflow. Each time I managed to write something in simpler way I reverted few tricks.
What do you mean by web client? From the github it looks more like a command line program.
If you're going to nitpick you could nitpick on the use of "web" (though, as others note, that's not wholly inaccurate), but there are plenty of command-line web clients. For example, wget and curl.
What do you mean by web client? From the github it looks more like a command line program.
Web refers to Gemini here, it being a command-line client for the Gemini web. These line-based browsers used to be more common, there were a few ones for the www but also ‘ftp’ has such a mode. As does my little ‘nostt’ Teletext reader.
"Gemini web" is a bad name because Gemini's not being part of the web was the main motive in Gemini's creation.
"Geminisphere" or "Geminiverse" would be fine with me as a name for the totality of Gemini servers considered collectively.
Earlier quoted context omitted.
Yea, you are right. Poor choose of words on my side. One can argue the definition of "web" but it would be much more precise to write "CLI client".
There’s nothing to argue. The "World Wide Web" or "Web" is defined as servers and clients communicating using the HTTP protocol. (Usually, it means that content is using HTML but this is not mandatory). "Gemini" is defined as servers and client communicating using the "Gemini" protocol (and content is usually in the gemtext format). Both are part of the Internet, which is defined as an INTERconnection of NETworks, th…
It could also be a Gemini client running on the web, which is what I initially thought it would be from reading the title.
Earlier quoted context omitted.
There’s nothing to argue. The "World Wide Web" or "Web" is defined as servers and clients communicating using the HTTP protocol. (Usually, it means that content is using HTML but this is not mandatory). "Gemini" is defined as servers and client communicating using the "Gemini" protocol (and content is usually in the gemtext format). Both are part of the Internet, which is defined as an INTERconnection of NETworks, th…
> A "Web Gemini client" means a browser capable of accessing both Gemini and the Web It could also be a Gemini client running on the web, which is what I initially thought it would be from reading the title.
Also
addr.sin_addr.s_addr = *((unsigned long*)he->h_addr_list[i]);
is a potential buffer overflow where `long` is 64 bits since only the first four bytes of `h_addr_list[i]` can be accessed, and also potentially misaligned for `unsigned long`; and it will also not work correctly on big endian platforms where `long` is 64 bits. Using `memcpy()` would have avoided all these problems. I am really confused as to how you arrived at the conclusion that "yes, this is the way to copy 4 bytes from A to B".This sounds rude, I know, and I apologize; I don't want to single you/this project out personally. I am just frustrated that even today there are people who work on C/C++ projects seemingly without having made GCC's -fanalyzer/asan/ubsan/valgrind/etc. an important part of their development workflow.