Re: Increasing D's visibility

2014-09-16 Thread Martin Drasar via Digitalmars-d
On 16.9.2014 20:07, Anonymous via Digitalmars-d wrote:
> Dlang on 4chan
> 
> http://boards.4chan.org/g/thread/44196390/dlang

Yeah, and the discussion is just in line with typical 4chan discussions :-)

A1) Andrei is fucking hot and he's not russian

A2) @A1: >Andrei will never be your husbando
Why bother living?


Re: Slightly OT - Survey

2014-08-31 Thread Martin Drasar via Digitalmars-d
On 1.9.2014 0:11, Rikki Cattermole via Digitalmars-d wrote:
> As part of my Degree in ICT at CPIT, I do a largish project at the end.
> Called Industry project.
> My own is in house, which I proposed. Essentially its a web service to
> aid learning.
> 
> It would really help me if anyone who falls under either, student,
> educator or corporate (admin) to fill in my survey[0] as part of
> requirement gathering.
> 
> For the industry project there is a panel at the end where by the
> project is essentially put on display and I do a presentation about it.
> There will also be a day where all the posters for them will be
> displayed publicly so that people in industry can see, and talk to me
> about it.
> I hope by that time I would have made something to show in terms of D
> and web services.
> 
> The survey's analytical tool is indeed in D.
> The survey will be open till 8th of September UTC+12 most likely 10am.
> 
> Also for any dmd commiters out there can you please look at PR[1] for
> feedback, its blocking me for Cmsed.
> 
> [0] http://goo.gl/kAPU5t
> [1] https://github.com/D-Programming-Language/dmd/pull/3921

Hi, Rikki,

I have filled the survey from the point of view of an educator and I
have a number of comments if you are interested. The survey is quite
unbalanced and does not cover all options (more specifically below). I
would suggest consulting next time with someone who knows metodology of
survey creation (e.g. somebody studying sociology) if you have the option.

Cheers,
Martin

Comments to particular questions:

- Do you feel you have the resources you need to teach with?

I don't see, how using a blackboard correlates with having resources to
teach with. If I have a blackboard and a projector then I have
everything I need, anything else is a distraction for me and for students.

- Operating systems questions

I have to chose one, but the options are quite orthogonal and there is
no obvious ordering so I can't choose the most inclusive one.

- What software do you use to make presentations in?

I use latex and Impress, which option should I choose?

- Do you give students the ability to see your presentations?

An obvious answer 'yes, afterwards' is for some reason ommited.

- Would you be willing to use a presentation software if it meant better
integration for students?

I don't understand the question.

- Do other educators at your institution feel the same way as you?

This one needs a 'I don't have any idea' option.

- Feedback

Our students have to give feedback to at least half of their lectures at
the end of each semester, so we get our feedback. However, such option
is not really possible in your survey.

- Would you feel better knowing students could ask questions during
lectures?

I don't think I understand what you mean by that. Students can ask
question. Heck, it's awsome when they do!

- If you could add feedback to future assignments and work for students
would you?

I'm not sure if I understand it correctly. I always give feedback to my
students' assignments.

- Are the current methods students use to take notes enough?

That really depends on a student. Some studies were conducted that
indicated that the pen and paper is probably the best. That or listening
carefully, engaging in debates and studying before/after.

- If your institution believes in BYOD do you do it?

I think it's a nice concept, but I have to cope with security
consequences for our university's network.

- How interested are you in trying [e-learning]?

How about if I already did it?

- What form of e-learning would you like to investigate?

What type of e-learning is the 'Lectures in person, without lab sessions'


Re: Simplified signatures in generated documentation

2014-08-20 Thread Martin Drasar via Digitalmars-d
On 20.8.2014 9:04, Jacob Carlborg via Digitalmars-d wrote:
> Looking at the documentation for std.algorithm and the std.logger
> (currently under review) [1] I think the function signatures look
> absolutely horrible. The functions std.algorithm in have complicated
> template constraints and in std.logger there are many functions with
> default arguments like "int line = __LINE__".
> 
> Using "ditto" to combine the documentation of multiple symbols with
> different template constraints spanning multiple lines doesn't make it
> easier to see what signature belongs to which symbol.
> 
> I was thinking if it would be a good idea to implement some form of
> automatically simplified signatures for Ddoc. Examples of simplifying
> the signatures could be:
> 
> * Remove parameters with default arguments where the values are special
> symbols like __LINE__ and __FILE__. Most of the time the user doesn't
> need to pass these and therefore doesn't need to know about them
> 
> * Remove template constraints. I think, at least with std.algorithm,
> it's mostly obvious what to pass and I rarely need to look at the
> constraints
> 
> The simplified signatures would be show for the main signatures, i.e.
> the ones with a light blue background, and the full signatures would be
> added at the end of the documentation for each symbol.
> 
> We could also have a special Ddoc macro, that is recognized by the
> compiler, which allows to manually specify the simplified signature.
> 
> What do you think?
> 
> [1] http://burner.github.io/phobos/phobos-prerelease/std_logger_core.html
> 

I think it is a good idea. I wanted to check on std.logger after that
torrent of changes and found that ddoc for memLogunctions template has
3633 characters and takes entire page for me. If you look carefully, it
gets quite clear, but for anyone coming from outside it would be a
massive deterrent.

Removing the parameters with default values and template constraints
made it about 1/3 in size, so a definite improvement.

If it was possible to somehow compress these lines:
.Logger.memLogFunctions!cast(LogLevel)cast(ubyte)32u.logImpl
that gets repeated for each alias that would be also great, because it
adds a lot to a line noise. However, I can't imagaine how...

Anyway +1 for both default params and template constraints.

Martin


Re: readln() blocks file operations on windows

2014-07-31 Thread Martin Drasar via Digitalmars-d
On 31.7.2014 20:37, FreeSlave via Digitalmars-d wrote:
> Note that output to stdout is not good choice to check event order,
> because it's buffered. Try to flush stdout or write to stderr. Maybe
> it's actual problem.

Hi,

this is just for illustration, although I think that writeln flushes
itself. I was checking it in a debugger after it suddenly hung my entire
program.

Martin


readln() blocks file operations on windows

2014-07-31 Thread Martin Drasar via Digitalmars-d
Hi,

consider this code:

import std.stdio;
import std.concurrency;
import core.thread;

void tryOpen()
{
  Thread.sleep(2.seconds);
  try {
auto f = File("nonexistent");
  }
  catch (Exception e) {
writeln("Could not open a file");
  }
}

void main()
{
  spawn(&tryOpen);
  readln();
}


On Linux, it works as expected, showing a "Could not open a file" after
two or so seconds. On windows, however, the file opening gets blocked
until a line is read from stdin.

Is this a feature or a bug? If it is a feature, it certainly is not
documented.

Cheers,
Martin