Jump to page: 1 2
Thread overview
Why is stdio ... stdio?
Nov 09
Kagamin
Nov 10
Kagamin
6 days ago
Adam D. Ruppe
6 days ago
Adam D. Ruppe
5 days ago
bauss
5 days ago
Mike Parker
November 09
Simple curious question.

Why isn't :

import std.stdio;

instead:

import std.io;

(Also, while we're at it. Why doesn't this form have code highlighting? It would much improve readibility. Doesn't that seem almost essential for a programming forum?)


I mean, I get it. stdio is the c header from a thousand years ago. But this isn't C. So it's kind of odd to ask for the "Standard standard" io library.

November 08
On Fri, Nov 09, 2018 at 02:03:36AM +0000, Chris Katko via Digitalmars-d-learn wrote:
> Simple curious question.
> 
> Why isn't :
> 
> import std.stdio;
> 
> instead:
> 
> import std.io;

The reason is that std.stdio is basically just a nice D wrapper with syntactic sugar around the C library's stdio.h.  There has been a std.io in the works, but unfortunately it hasn't quite materialized yet.  So for now, we're stuck with std.stdio.


> (Also, while we're at it. Why doesn't this form have code highlighting? It would much improve readibility. Doesn't that seem almost essential for a programming forum?)
[...]

Because this "forum" isn't really a web forum, but just a web interface to an NNTP server that also has a mailing list interface (I (mostly) use the mailing list interface).  Haven't really felt a need for syntax highlighting myself, though most opinions differ. :-D


T

-- 
Latin's a dead language, as dead as can be; it killed off all the Romans, and now it's killing me! -- Schoolboy
November 09
On Fri, 09 Nov 2018 02:03:36 +0000, Chris Katko wrote:
> Simple curious question.
> 
> Why isn't :
> 
> import std.stdio;
> 
> instead:
> 
> import std.io;

IO includes things like memory mapping, sockets, listing files, named pipes, that sort of thing.

Standard IO includes only reading and writing to files and the console.

> (Also, while we're at it. Why doesn't this form have code highlighting? It would much improve readibility. Doesn't that seem almost essential for a programming forum?)

It's not a forum. It's a newsgroup that happens to have a web interface. Newsgroups are text-only. So bbcode is out, html is out, but interpreting markdown might be reasonable. But nobody's done that work.
November 08
On Thursday, November 8, 2018 7:25:45 PM MST Neia Neutuladh via Digitalmars- d-learn wrote:
> It's not a forum. It's a newsgroup that happens to have a web interface. Newsgroups are text-only. So bbcode is out, html is out, but interpreting markdown might be reasonable. But nobody's done that work.

Honestly, having markdown in messages being typical would be _really_ annoying for those of us not using the web interface, because we'd see all of those backticks and the like as backticks, not as syntax highlighting. It would be like seeing html, albeit far less intrusive. I for one would much rather that things just stay as pure text and that we not be adding any features to the web interface that encourages adding _any_ kind of markup to messages. The web interface makes it easier for folks who don't want to use a newsgroup or mailing list to interact with the newsgroup, but it's still a newsgroup, and _many_ of us use it as such.

- Jonathan M Davis



November 09
On Friday, 9 November 2018 at 06:42:37 UTC, Jonathan M Davis wrote:
> Honestly, having markdown in messages being typical would be _really_ annoying for those of us not using the web interface, because we'd see all of those backticks and the like as backticks, not as syntax highlighting. It would be like seeing html, albeit far less intrusive. I for one would much rather that things just stay as pure text and that we not be adding any features to the web interface that encourages adding _any_ kind of markup to messages. The web interface makes it easier for folks who don't want to use a newsgroup or mailing list to interact with the newsgroup, but it's still a newsgroup, and _many_ of us use it as such.

You used markdown three times in your message.
November 09
On Friday, November 9, 2018 1:27:44 AM MST Kagamin via Digitalmars-d-learn wrote:
> On Friday, 9 November 2018 at 06:42:37 UTC, Jonathan M Davis
>
> wrote:
> > Honestly, having markdown in messages being typical would be _really_ annoying for those of us not using the web interface, because we'd see all of those backticks and the like as backticks, not as syntax highlighting. It would be like seeing html, albeit far less intrusive. I for one would much rather that things just stay as pure text and that we not be adding any features to the web interface that encourages adding _any_ kind of markup to messages. The web interface makes it easier for folks who don't want to use a newsgroup or mailing list to interact with the newsgroup, but it's still a newsgroup, and _many_ of us use it as such.
>
> You used markdown three times in your message.

No, I didn't. I just used underscores, which has been used with plain text for emphasis for decades. Supporting markdown, would involve stuff like backticks for code highlighting, and special markup for urls - stuff that doesn't actually provide information to someone who's reading plain text but just gets in the way, whereas the underscores _do_ provide information to someone reading plain text.

- Jonathan M Davis



November 09
On Friday, 9 November 2018 at 09:11:37 UTC, Jonathan M Davis wrote:
> On Friday, November 9, 2018 1:27:44 AM MST Kagamin via Digitalmars-d-learn wrote:
>> On Friday, 9 November 2018 at 06:42:37 UTC, Jonathan M Davis
>>
>> wrote:
>> > [...]
>>
>> You used markdown three times in your message.
>
> No, I didn't. I just used underscores, which has been used with plain text for emphasis for decades. Supporting markdown, would involve stuff like backticks for code highlighting, and special markup for urls - stuff that doesn't actually provide information to someone who's reading plain text but just gets in the way, whereas the underscores _do_ provide information to someone reading plain text.
>
> - Jonathan M Davis

FYI, Allegro.CC just uses

<code>
int main()
 {
 return 0;
 }
</code>

as well as <pre> for pre-formatted "monospace" text.

Neither of those would pollute a mailing list in plain-text mode because they'd exist only at the start and end of code. I'm sure you had no problem reading my above code.
November 09
On Fri, Nov 09, 2018 at 05:36:54PM +0000, Chris Katko via Digitalmars-d-learn wrote: [...]
> FYI, Allegro.CC just uses
> 
> <code>
> int main()
>  {
>  return 0;
>  }
> </code>
> 
> as well as <pre> for pre-formatted "monospace" text.
> 
> Neither of those would pollute a mailing list in plain-text mode because they'd exist only at the start and end of code. I'm sure you had no problem reading my above code.

I find those HTML-like tags very distracting.  Markdown has a far less-intrusive syntax:

````
int main()
{
    return 0;
}
````

I wouldn't mind having the web interface interpret messages as markdown, actually.  Mainly because I won't be seeing it. :-D

But as someone has already pointed out, writing emphases like _this_ and bold like *this* is already established convention, and markdown was designed precisely to pick up on these kinds of conventions, so it could be added to the web forum without requiring anyone to change the way they type their messages, and it would be readable to everyone.


T

-- 
I am Ohm of Borg. Resistance is voltage over current.
November 10
On Friday, 9 November 2018 at 09:11:37 UTC, Jonathan M Davis wrote:
> No, I didn't. I just used underscores, which has been used with plain text for emphasis for decades. Supporting markdown, would involve stuff like backticks for code highlighting

Backticks are from ddoc. What's the other way to indicate a code fragment?

> markup for urls - stuff that doesn't actually provide information to someone who's reading plain text but just gets in the way

If the url is messy, it's already a mess. If it isn't, it's easier to leave url as is than bother to markup it.

> whereas the underscores _do_ provide information to someone reading plain text.

I think what's really missing is code highlighting. Emphasis isn't very useful, in your example the verb "do" is already emphasis, so markup doesn't provide any additional information, just gets in the way.
November 10
On Saturday, 10 November 2018 at 13:53:14 UTC, Kagamin wrote:
> On Friday, 9 November 2018 at 09:11:37 UTC, Jonathan M Davis wrote:
>> No, I didn't. I just used underscores, which has been used with plain text for emphasis for decades. Supporting markdown, would involve stuff like backticks for code highlighting
>
> Backticks are from ddoc. What's the other way to indicate a code fragment?
>
>> markup for urls - stuff that doesn't actually provide information to someone who's reading plain text but just gets in the way
>
> If the url is messy, it's already a mess. If it isn't, it's easier to leave url as is than bother to markup it.
>
>> whereas the underscores _do_ provide information to someone reading plain text.
>
> I think what's really missing is code highlighting. Emphasis isn't very useful, in your example the verb "do" is already emphasis, so markup doesn't provide any additional information, just gets in the way.

There is another possibility. Have the website run (fallible) heuristics to detect a snippet of code and automatically generate it. That would leave the mailing list people completely unchanged.

However, HOW fallible becomes a huge issue. It may be so well implemented that nobody ever complains. Or, it could be so bad that it often breaks up the author's post in ways the author never planned--almost taking away the poster as the controller of what they present.

That's a bit of an extreme, and unlikely, but I feel that examining extremes can be helpful to define the potential domain of the problem.

We can also easily have a checkmark next to each post that disables highlighting for that post (as well as disable them in your account settings), and even a button people could press that says "this post is highlighted wrong." and the developer would get a log with the code.

How many implementation "fixes" are needed depends on how fallible the detection code really is.

--------------------------------------------------------------------------------------

But, really, I don't personally see it being "that" bad for people to put code tags / code markers around code. It's not like they're going to be peppered everywhere. If you can ignore a comment in code, you can ignore two tags (start and end) in a single post.

It's an interesting argument to extend bold and italics... because people ARE already using them!

But I never suggested we should support "full markdown". There's no need to support an entire standard if your forum only needs part of it. It seems like a reasonable compromise favoring maximum utility, to support code tags, as well as tags people already use like italics and bold.

Automatic URL linking is a feature of 99% of forums and that would also have zero impact on the mailing list people.

There may be others. Even if the goal is "minimum changes for mailing list people" it can still be done.
« First   ‹ Prev
1 2