[Question]
  [
Write the shortest possible program that draws a Bresenham line in ASCII art. Your program should take two integers `x` and `y` (command line or stdin, your choice) and draw an ASCII line which starts in the upper left and goes right `x` units and down `y` units. You must use `_` and `\` characters and place them in the correct location according to [Bresenham's](http://en.wikipedia.org/wiki/Bresenham%27s_line_algorithm) algorithm.
You may assume `x >= y`, so no vertical segments are required.
Note that because you're using the `_` character, for a line with `y=3` you will likely need to output 4 lines of text (and you may emit a leading blank line when it isn't necessary).
examples:
```
11 3
_
 \___
     \___
         \_
11 1
_____
     \_____
5 4
\
 \_
   \
    \
```
For points which are exactly halfway you may choose either rounding:
```
10 1
____
    \_____
or
_____
     \____
```
  
[Answer]
# Perl, 74
```
/ /;print int(.5+$_*$'/$`)>int(.5+--$_*$'/$`)?$/.$"x$_.'\\':'_'for 1..$`
```
Run with `-n` option (counted in code size).
```
$ perl -n bresenham.pl <<<'11 3'
_
 \___
     \___
         \_
$ perl -n bresenham.pl <<<'11 1'
_____
     \_____
$ perl -n bresenham.pl <<<'5 4'
\
 \_
   \
    \
$ perl -n bresenham.pl <<<'10 1'
____
    \_____
```
[Answer]
# C ~~136~~ 123 Characters
```
z,x,y,i,f;main(){for(scanf("%d%d",&x,&y);i<=x;i++){f=f?printf("_"):1;z+=y;if(2*z>=x&&i<x)f=0,z-=x,printf("\n%*c",i+1,92);}}
```
[Answer]
# Delphi, 109 bytes
Quite small if you ask me :
```
var x,y,i:Word;begin Read(x,y);for i:=1to(x)do if(i*y+x div 2)mod x<y then Write(^J,'\':i)else Write('_')end.
```
The 2 integers are read from the command line.
The newline is written by the seldomly used `^J` syntax (meaning LineFeed), the following '`\`' character is indented using the little-known syntax :`Write(string:width)`.
It's a pitty Delphi `div` for integer-divide (instead of just `\`). Ah well...
[Answer]
# [APL (Dyalog Classic)](https://www.dyalog.com/), 39 bytes
```
{⍉↑(-1++\a)↑¨'_\'[a←-2-/⌊.5+⍵×⍺÷⍨⍳1+⍺]}
```
[Try it online!](https://tio.run/##bU29CsIwEN59im5RSqzxZ/FVjIRQqRQCldZFpJNSqBqxg7g7uYsIHe2b3IvUq7VWwQuE776/kzNFJwupvCm1lQwC185hf3Q9iA6d3MF/CTqGKGlSZppcthA@LkRwMpIo0i61YLdpD0zQt@wEOs3uoC@grwyZdBzm@bzsuEF89hHCZuVYKA2JI11FEKHmw3aNV1H2wwZjRg9DCRHGZwg@LoSot2JKptpKhhR5VubF34RAz8DoGy8PCrw@UBl5FeBY1/mq@2l7lz0B "APL (Dyalog Classic) – Try It Online")
[Answer]
# [Charcoal](https://github.com/somebody1234/Charcoal), 22 bytes
```
Ｆ…·¹θ⎇‹﹪⁺×ιη⌊∕θ²θη¶\¦_
```
It took a while to figure out the right formula, but it now works! Credit to the Delphi answer.
Link is to verbose version of code.
[Try it online!](https://tio.run/##JctBCsIwEEDRq0hWMzBdKHoAQQqCbqQ7IxKT0Q6kCU1ooKePEXcPPt@OJtlofK19THAO1i9ZCt9M@DBsaUbcDJyCSStcOGe4Rrf4CEfnYJCJMwiNSL2P7T5JEccw0w4R2/orSgetFamnwlrvB9o/atcVTq@Yucnx3/Jevw "Charcoal – Try It Online")
]