www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.learn - Is https://tour.dlang.org under maintenance?

reply ChrisPiker <fake noplace.org> writes:
I'm trying to learn D, but many of my site searches take me to 
https://tour.dlang.org, which cannot be displayed.  Of course it 
may be a local problem (or it might not.)  In case this is 
affecting anyone else, the error I'm getting from firefox is

-----------------------------------------------------------------------
Your connection is not secure

The website tried to negotiate an inadequate level of security.

tour.dlang.org uses security technology that is outdated and 
vulnerable to attack. An attacker could easily reveal information 
which you thought to be safe. The website administrator will need 
to fix the server first before you can visit the site.

Error code: NS_ERROR_NET_INADEQUATE_SECURITY
-----------------------------------------------------------------------

Have tried going to the http version but your server (or my 
browser) seems to be setup to auto-redrect to the https version.  
Please excuse this post if this is a known issue.

Now if I could just find a diagram of the exception tree in 
phobos.  I'm trying to throw an exception when all possible 
environment variables my program could use to find the current 
account's home directory are not present but can't figure out 
which one would be appropriate.

Thanks,
Jan 26
parent reply Seb <seb wilzba.ch> writes:
On Friday, 26 January 2018 at 22:56:00 UTC, ChrisPiker wrote:
 I'm trying to learn D, but many of my site searches take me to 
 https://tour.dlang.org, which cannot be displayed.  Of course 
 it may be a local problem (or it might not.)  In case this is 
 affecting anyone else, the error I'm getting from firefox is
No it's not on maintenance. I am not getting this error on neither Chrome or Firefox. See: https://imgur.com/a/wRhrw What Firefox version are you using? Anything specific about your setup?
 -----------------------------------------------------------------------
 Your connection is not secure

 The website tried to negotiate an inadequate level of security.

 tour.dlang.org uses security technology that is outdated and 
 vulnerable to attack. An attacker could easily reveal 
 information which you thought to be safe. The website 
 administrator will need to fix the server first before you can 
 visit the site.

 Error code: NS_ERROR_NET_INADEQUATE_SECURITY
 -----------------------------------------------------------------------

 Have tried going to the http version but your server (or my 
 browser) seems to be setup to auto-redrect to the https version.
Yes, Google downranks websites which don't redirect by default to HTTPS.
 Please excuse this post if this is a known issue.
FYI for the future: you can report issues here: https://github.com/dlang-tour/core
 Now if I could just find a diagram of the exception tree in 
 phobos.  I'm trying to throw an exception when all possible 
 environment variables my program could use to find the current 
 account's home directory are not present but can't figure out 
 which one would be appropriate.
There's no complex exception hierarchy. You can easily get a list of all exceptions in Phobos, e.g.
 grep -r ": Exception" *
Why don't you create your own exception? ``` import std.exception; class InputException : Exception { /// mixin basicExceptionCtors; } ... throw new InputException("Environment variable " ~ s ~ " isn't set."); ```
Jan 26
parent reply ChrisPiker <fake noplace.org> writes:
On Friday, 26 January 2018 at 23:55:06 UTC, Seb wrote:
 No it's not on maintenance.
 I am not getting this error on neither Chrome or Firefox.

 See: https://imgur.com/a/wRhrw
Oh good. Was a bit worried that it might be affecting everyone.
 What Firefox version are you using?
 Anything specific about your setup?
I'm running version 52.5.1 on RedHat 6, turned off all add-ons to make sure none were affecting page load but still received the same result. I'll try again from a computer running a different OS and/or browser and see what happens.
 Why don't you create your own exception?
I'm new to D and just trying to use the tools already provide in the standard library before making my own or looking for alternatives. Coming from Java and Python it seems to be re-inventing the wheel a bit to generate purpose build exceptions to report environment problems. These must occur all the time in may different programs. If the common D way is make your own exceptions I could do that, no problem.
Jan 26
parent reply Seb <seb wilzba.ch> writes:
On Saturday, 27 January 2018 at 01:15:03 UTC, ChrisPiker wrote:
 On Friday, 26 January 2018 at 23:55:06 UTC, Seb wrote:
 No it's not on maintenance.
 I am not getting this error on neither Chrome or Firefox.

 See: https://imgur.com/a/wRhrw
Oh good. Was a bit worried that it might be affecting everyone.
 What Firefox version are you using?
 Anything specific about your setup?
I'm running version 52.5.1 on RedHat 6, turned off all add-ons to make sure none were affecting page load but still received the same result. I'll try again from a computer running a different OS and/or browser and see what happens.
It's still strange. Mind to open an issue and share screenshots here? https://github.com/dlang-tour/core/issues/new tour.dlang.{org,io} uses LetsEncrypt which is used by a lot of websites. BTW you can run the tour offline too: ``` git clone https://github.com/dlang-tour/core cd core git submodule foreach git pull origin master dub ```
 Why don't you create your own exception?
I'm new to D and just trying to use the tools already provide in the standard library before making my own or looking for alternatives. Coming from Java and Python it seems to be re-inventing the wheel a bit to generate purpose build exceptions to report environment problems. These must occur all the time in may different programs. If the common D way is make your own exceptions I could do that, no problem.
In D typically you just use `enforce`: https://dlang.org/phobos/std_exception.html#enforce (except for bigger projects / libraries, of course) Example: ``` enforce("The environment variable FOOBAR isn't defined", "FOOBAR" !in environment); ``` The mantra here is that in the majority of all cases you don't care as long as the uncaught exception kills the program and prints a nice message to the user or your log. And more complex projects want to define and use their own Exception hierarchies anyways. The standard library only defines Exceptions it can/will throw itself.
Jan 26
parent reply ChrisPiker <fake noplace.org> writes:
On Saturday, 27 January 2018 at 01:53:12 UTC, Seb wrote:
 It's still strange. Mind to open an issue and share screenshots 
 here?

 https://github.com/dlang-tour/core/issues/new
I just tried going there on a Mint 18 system running firefox 57.0.1 and everything loaded just fine. I'm hesitant to create more issue noise when the problem is only present (so far) on a very specific old Linux distribution. I appreciate that D is mostly maintained by volunteers and don't want to create useless work for them.
 BTW you can run the tour offline too:

 ```
 git clone https://github.com/dlang-tour/core
 cd core
 git submodule foreach git pull origin master
 dub
 ```
Not that it's worth debugging since wget should get the job done, but there seems to be a dependency library missing on our systems. The error message when running dub was: ``` ... Compiling Diet HTML template tour.dt... Compiling Diet HTML template editor.dt... Linking... /usr/bin/ld: cannot find -levent collect2: ld returned 1 exit status Error: linker exited with status 1 dmd failed with exit code 1. ```
 In D typically you just use `enforce`:

 https://dlang.org/phobos/std_exception.html#enforce

 (except for bigger projects / libraries, of course)

 Example:

 ```
 enforce("The environment variable FOOBAR isn't defined", 
 "FOOBAR" !in environment);
 ```
Well that looks handy. Thanks!
Jan 26
parent reply Seb <seb wilzba.ch> writes:
On Saturday, 27 January 2018 at 02:59:24 UTC, ChrisPiker wrote:
 BTW you can run the tour offline too:

 ```
 git clone https://github.com/dlang-tour/core
 cd core
 git submodule foreach git pull origin master
 dub
 ```
Not that it's worth debugging since wget should get the job done
The (offline) tour allows you to run the code directly in your browser - though of course that's really an absolute necessity.
 but there seems to be a dependency library missing on our 
 systems.  The error message when running dub was:

 ```
 ...
 Compiling Diet HTML template tour.dt...
 Compiling Diet HTML template editor.dt...
 Linking...
 /usr/bin/ld: cannot find -levent
 collect2: ld returned 1 exit status
 Error: linker exited with status 1
 dmd failed with exit code 1.
 ```
The Dlang-Tour uses the web framework vibe.d (https://github.com/vibe-d/vibe.d). vibe.d currently uses libevent as underlying event library by default. Though with the upcoming 0.8.3 release that's about to change soon - it will then use the native D vibe-core scheduler by default. You can already use vibe-core today if you want to: dub --override-config="vibe-d:core/vibe-core" (BTW libevent is typically available as libevent-dev or libevent-devel.) In any case you can also always read the "pure" Markdown content directly on GitHub: https://github.com/dlang-tour/english
Jan 26
parent reply ChrisPiker <fake noplace.org> writes:
On Saturday, 27 January 2018 at 03:08:29 UTC, Seb wrote:
 The Dlang-Tour uses the web framework vibe.d 
 (https://github.com/vibe-d/vibe.d). vibe.d currently uses 
 libevent as underlying event library by default. Though with
Well now libevent_pthreads is missing. Anyway, don't worry about it we're (finally) switching over to RedHat 7 soon anyway, deployment is underway, that should bring a browser that's not an old extended support release.
 the upcoming 0.8.3 release that's about to change soon - it 
 will then use the native D vibe-core scheduler by default.
 You can already use vibe-core today if you want to:

 dub --override-config="vibe-d:core/vibe-core"

 (BTW libevent is typically available as libevent-dev or 
 libevent-devel.)
I'll build against the native scheduler in the future if I get a chance to write any vibe.d code. Might as well try it out.
 In any case you can also always read the "pure" Markdown 
 content directly on GitHub:

 https://github.com/dlang-tour/english
Cool, I'll just use that if needed. Anyway, you've been so helpful that I've setup a small monthly recurring D Foundation donation. Have a good evening,
Jan 26
parent Seb <seb wilzba.ch> writes:
On Saturday, 27 January 2018 at 05:49:00 UTC, ChrisPiker wrote:
 On Saturday, 27 January 2018 at 03:08:29 UTC, Seb wrote:
 [...]
Well now libevent_pthreads is missing. Anyway, don't worry about it we're (finally) switching over to RedHat 7 soon anyway, deployment is underway, that should bring a browser that's not an old extended support release.
 [...]
I'll build against the native scheduler in the future if I get a chance to write any vibe.d code. Might as well try it out.
 [...]
Cool, I'll just use that if needed. Anyway, you've been so helpful that I've setup a small monthly recurring D Foundation donation. Have a good evening,
Wow thanks a lot! I hope you don't run into further problems, but if that does happen, please feel more than free to post here again!
Jan 27