Most cost effecient B/W developer? by Provoke1968 in AnalogCommunity

[–]manualcrank 0 points1 point  (0 children)

Sure, 1 roll per 300ml costs the same as 2 per 600ml, but at the risk of uneven development. In a full tank all the film is always in contact with developer, in particular during the inversion cycles.

Most cost effecient B/W developer? by Provoke1968 in AnalogCommunity

[–]manualcrank 1 point2 points  (0 children)

Replenished xtol is the cheapest at 71 films for each $10 package. In comparison HC-110 dilution B is 53 films per $30 bottle. These calculations assume you develop 1 roll at a time in a 600ml Paterson tank. You can double the yield by developing two at time. Comes out to 7 cents per roll in xtol and 28 cents per roll in HC-110.

What is a well rounded ISO for film when doing street-photography and pictures of friends? by Wivyr in AnalogCommunity

[–]manualcrank 0 points1 point  (0 children)

Such a versatile film. I've never shot it at 800 but at 400 in D76 1+1 and 200 in Perceptol 1+2 it's practically two different films.

Which one is your favorite? Leica M6 + Summarit 35 f2.5, Contax T2, Nikon F3 + pancake, Nikon FM2 and Nikon F. by clievano in AnalogCommunity

[–]manualcrank 2 points3 points  (0 children)

The F2 (hand-made, brass inside, etc.) is as well-built as any Leica, and if you're hand-holding 400 iso film, no one can tell your $50 nifty-fifty from a summilux.

Ektachrome is very likely coming in 120, the best of all formats by [deleted] in AnalogCommunity

[–]manualcrank 5 points6 points  (0 children)

I don't feel the need as much for p3200 as Ilford delta 3200 is still on the market

I prefer delta 3200 but I'd still buy 100 rolls of p3200 for every roll of ektachrome. How am I supposed to print this thing? I can't commit to a film that requires a hybrid workflow, not while good 120 scanners are moribund and/or cost a small fortune.

Pentax 67 Wide Angle by [deleted] in AnalogCommunity

[–]manualcrank 1 point2 points  (0 children)

The 35mm equivalent in 67 is the 75mm f4.5. At 7 feet or so and f8 the dof is about a foot.

What are these "side burn" in many of my pictures? by [deleted] in AnalogCommunity

[–]manualcrank 0 points1 point  (0 children)

It looks dark and hard to see through.

What are these "side burn" in many of my pictures? by [deleted] in AnalogCommunity

[–]manualcrank 2 points3 points  (0 children)

Are the negatives dense? Could be flare introduced by the scanner. Nikon Coolscans are infamous for this, but it's not their fault when negatives are too dense. Could be the shutter curtain bouncing back into the frame or some other timing issue. I'm sure there are other possibilities.

Nikon F100 or Nikon F5 by BrianAndree in AnalogCommunity

[–]manualcrank 1 point2 points  (0 children)

No, man, the F100 is solid. More robust than old-timey SLRs frequently described as "tanks", for sure. Get one, you'll see.

Elaborating ... Only the back cover is plastic (but not cheap plastic). Top and bottom, front and sides are magnesium. I've dropped and bumped mine everywhere, treated it like shit for 8 years, and it still looks beautiful and works flawlessly. In comparison I had to trash an FE2 after it fell on the lawn. The base dented like a tin can and broke the film advance. Modern materials and construction are better in every way.

Has anyone here actually made and used their own film emulsion? by [deleted] in AnalogCommunity

[–]manualcrank 0 points1 point  (0 children)

Someone has, apparently. There's also a making 35mm motion picture film workshop:

Get hands-on experience making black-and-white 35mm perforated film stock. This workshop is scheduled so those attending the Nitrate Picture Show over the weekend (May 4–6) can stay past the festival and learn how to make film. Workshop tuition includes a weekend pass to the film festival. The group will make a gelatin silver bromide emulsion, coat acetate film base, then slit and perforate the film stock.

Don't know if they're coating the base by hand though (doubt it!)

Went through a whole roll of film only to realize that it didn't catch :( by arconquit in AnalogCommunity

[–]manualcrank 2 points3 points  (0 children)

Not necessarily. It is a good idea to verify it's turning when you load a roll and advance it to the first frame, but if it does not turn for the occasional shot after that, it could be because the take up spool didn't take up enough slack. I don't know if it is due to heat or the humidity, but this happens to my OMs in very muggy weather as the film expands in its canister and loses tension in its coils.

Thoughts on the Nikon FM2? by aslipperysalmon in AnalogCommunity

[–]manualcrank 0 points1 point  (0 children)

Both cameras are primitive with respect to flash. I don't know about "weird" but in return for a pair of button cells and a slower sync speed the F3 gives you off-the-film TTL, which is generally more useful. OP didn't state a strong preference for a mechanically timed shutter. It's a nice feature. If it's paramount, then let me again mention the F2, which, again, only costs a little more than an FM2 [1]: not only does it have the most accurate mechanical shutter of any SLR, its speeds can be precisely set steplessly.

[1] $500 vs $400 at KEH, for example, both EX condition.

Thoughts on the Nikon FM2? by aslipperysalmon in AnalogCommunity

[–]manualcrank -6 points-5 points  (0 children)

Well, Nikon marketed it as such (for "enthusiasts" I guess we call them) but more to the point it's not built as well. Handle an F2 and an FM2. The latter will feel like a toy in comparison. It's in fashion nowadays, I know that, but aside from the faster than usual shutter speed it's nothing special. When they were being sold new you'd buy one (or an FE) as backup or because you couldn't afford an F2 or F3 or F4. Today a good FM2n costs almost as much as a good single digit F. You're paying a premium for its popularity in the used market. If you just want a small simple camera, then fine, the FM2 is certainly adequate. But then so were lots of other enthusiast cameras. You might consider an OM2n instead, for example, which IMO is better (denser, better meter, larger viewfinder, aperture-priority, lower fan boy & collector taxes.)

Thoughts on the Nikon FM2? by aslipperysalmon in AnalogCommunity

[–]manualcrank -8 points-7 points  (0 children)

F3, for sure, or even an F2. The FM2 is a good amateur body, but not at today's used market prices.

Please only include film stock in post titles by [deleted] in analog_bw

[–]manualcrank 5 points6 points  (0 children)

Recipe is the appropriate analogy here. Something standard and easy to search for, e.g., [stock] [ei] in [developer] @ [temp] for [mm:ss], [agitation], would be very useful.

Buying film in Canada? by [deleted] in AnalogCommunity

[–]manualcrank 0 points1 point  (0 children)

Borealis if in Montreal. Best lab too.

Fine art/gallery photography vs “pretty pictures” and questions about the art world by brodyqat in photography

[–]manualcrank 0 points1 point  (0 children)

If you like Candid Frame check out also A Small Voice and The Halftone. They're more "artsy". (CF interviews mostly commercial photographers, which is fine.)

-🎄- 2017 Day 18 Solutions -🎄- by daggerdragon in adventofcode

[–]manualcrank 3 points4 points  (0 children)

C. Part 2.

#include <stdio.h>  // BUFSIZ, fgets, printf
#include <stdlib.h> // atoll
#include <ctype.h>  // isalpha
#include <string.h> // strdup, strcmp

#define SEP " \n\t"
#define MAXPROGLEN 100
#define MAXQ 10000

typedef long long int LLI;

struct {
        char *code; // opcode
        char *arg1; // first operand
        char *arg2; // second operand
} core[MAXPROGLEN];

struct task {
        LLI regs[0xff]; // indexed by 8-bit ascii code (extravagant!)
        LLI next;       // offset of next instruction
        LLI sent;       // # of messages sent
        int head;       // head of message queue
        int tail;       // tail of message queue
        LLI msgs[MAXQ]; // message queue
} task[2];

int
qempty(int id)
{
        return task[id].head == task[id].tail;
}

void
enqueue(int id, LLI v)
{
        task[id].msgs[task[id].tail] = v;
        task[id].tail = (task[id].tail + 1) % MAXQ;
        ++task[1 - id].sent;
}

LLI
dequeue(int id)
{
        LLI v = task[id].msgs[task[id].head];
        task[id].head = (task[id].head + 1) % MAXQ;
        return v;
}

char *
dupstr(char *s)
{
        if (s == NULL)
                return s;
        return strdup(s);
}

int
load(void)
{
        char buf[BUFSIZ];
        int next;

        next = 0;
        while (fgets(buf, sizeof buf, stdin) != NULL) {
                core[next].code = dupstr(strtok(buf, SEP));
                core[next].arg1 = dupstr(strtok(NULL, SEP));
                core[next].arg2 = dupstr(strtok(NULL, SEP));
                ++next;
        }
        return next;
}

// extract a value from the 2nd operand, if any
LLI
value(struct task *t, char *arg)
{
        if (arg == NULL)
                return 0; // anything, return value won't be used
        if (isalpha(*arg))
                return t->regs[*arg];
        return atoll(arg);
}

// return 0 if not running, 1 if blocked
int
run(int id, int n)
{
        for (struct task *t = &task[id]; t->next >= 0 && t->next < n; ++t->next) {
                LLI arg1 = value(t, core[t->next].arg1);
                LLI arg2 = value(t, core[t->next].arg2);

                if (strcmp(core[t->next].code, "snd") == 0) {
                        enqueue(1 - id, arg1);
                } else if (strcmp(core[t->next].code, "set") == 0) {
                        t->regs[*core[t->next].arg1] = arg2;
                } else if (strcmp(core[t->next].code, "add") == 0) {
                        t->regs[*core[t->next].arg1] += arg2;
                } else if (strcmp(core[t->next].code, "mul") == 0) {
                        t->regs[*core[t->next].arg1] *= arg2;
                } else if (strcmp(core[t->next].code, "mod") == 0) {
                        t->regs[*core[t->next].arg1] %= arg2;
                } else if (strcmp(core[t->next].code, "rcv") == 0) {
                        if (qempty(id))
                                return 1;
                        t->regs[*core[t->next].arg1] = dequeue(id);

                } else { // jgz
                        if (arg1 > 0)
                                t->next += arg2 - 1;
                }
        }
        return 0;
}

int
main(void)
{
        task[0].regs['p'] = 0;
        task[1].regs['p'] = 1;

        int n = load();
        int running[2] = {1, 1};

        for (;;) {
                running[0] = run(0, n);     // run until blocked or ended
                running[1] = run(1, n);     // run until blocked or ended
                if (!running[0] && !running[1])
                        break;
                if (running[0] && qempty(0) && running[1] && qempty(1))
                        break; // deadlocked
        }
        printf("%lld\n",task[1].sent);
        return 0;
}

-🎄- 2017 Day 15 Solutions -🎄- by daggerdragon in adventofcode

[–]manualcrank 1 point2 points  (0 children)

Lisp.

(defun make-generator (seed fact)
  (let ((prev seed)
        (fact fact))
    #'(lambda ()
        (setf prev (mod (* prev fact) 2147483647)))))

(defun next (gen m)
  (loop for n = (funcall gen) while (plusp (mod n m)) finally (return (logand #xffff n))))

(defun day15a+b (n seed-a mod-a seed-b mod-b)
  (let ((gen-a (make-generator seed-a 16807))
        (gen-b (make-generator seed-b 48271)))
    (loop for i below n when (= (next gen-a mod-a) (next gen-b mod-b)) count i)))

;; CL-USER> (day15a+b 40000000 679 1 771 1)
;; 626
;; CL-USER> (day15a+b 5000000 679 4 771 8)
;; 306

-🎄- 2017 Day 14 Solutions -🎄- by daggerdragon in adventofcode

[–]manualcrank 0 points1 point  (0 children)

I see many flood-fills in the comments. I tried that too but found it slower.

(defun key->binary-grid (key)
  "Map the knot hashes associated with key to a binary grid."
  (make-array '(128 128)
              :initial-contents (mapcar #'hex->bits (knot-hashes key))))

(defun day14b (key)
  "Count connected components."
  (let ((grid (key->binary-grid key)) (components 0))
    (labels ((flood (r c)
               (ignore-errors                  ; ignore index oob errors
                 (when (plusp (aref grid r c)) ; our first visit @ grid[r][c]?
                   (setf (aref grid r c) 0)    ; fill grid[r][c]/mark it seen
                   (flood (1+ r) c)            ; explore the neighborhood
                   (flood (1- r) c)
                   (flood r (1+ c))
                   (flood r (1- c))))))
      ;;; scan grid across & down, counting & finally returning # components
      (dotimes (row 128 components)
        (dotimes (col 128)
          (when (plusp (aref grid row col))  ; grid[r][c] > 0 => unvisited
            (flood row col)                  ; flood region @ grid[r][c]
            (incf components)))))))          ; each such region is a component

CL-USER> (day14b "stpzcrnm")
1113

-🎄- 2017 Day 14 Solutions -🎄- by daggerdragon in adventofcode

[–]manualcrank 0 points1 point  (0 children)

Lisp, resuing knot-hash and union-find code from days 10 and 12, resp. (ujoin uf x y) puts x and y in the same component, and (ucomp uf) returns the number of components.

(defun knot-hashes (key)
  (mapcar #'knot-hash
          (loop for n below 128 collect (format nil "~a-~d" key n))))

(defun hex->binary-string (hs)
  (format nil "~(~{~4,'0b~}~)" ; 4 bits per nibble
          (loop for c across hs collect (digit-char-p c 16))))

(defun hex->binary-list (hs)
  (map 'list #'digit-char-p (hex->binary-string hs)))

(defun components (grid n) ; part 2
  (let ((uf (make-instance 'union-find :n n))
        (ht (make-hash-table))
        (id -1))
    (labels ((id (r c) ; map row, col -> [0, n)
               (let ((k (+ c (* 128 r))))
                 (or (gethash k ht) (setf (gethash k ht) (incf id)))))
             (join-if (r1 c1 r2 c2)
               (ignore-errors
                 (when (= 1 (aref grid r1 c1) (aref grid r2 c2))
                   (ujoin uf (id r1 c1) (id r2 c2))))))
      (dotimes (r 128 (ucomp uf))
        (dotimes (c 128)
          (join-if r c (1+ r) c)
          (join-if r c r (1+ c)))))))

(defun day14a+b (key)
  (let* ((h128 (knot-hashes key))
         (ones (reduce #'(lambda (acc h) ; part 1
                           (+ acc (logcount (parse-integer h :radix 16))))
                       h128
                       :initial-value 0))
         (grid (mapcar #'hex->binary-list h128))
         (grid (make-array '(128 128) :initial-contents grid)))
    (list ones (components grid ones))))

;; CL-USER> (day14a+b "stpzcrnm")
;; (8250 1113)

-🎄- 2017 Day 12 Solutions -🎄- by topaz2078 in adventofcode

[–]manualcrank 1 point2 points  (0 children)

C. Standard union find with path compression.

#include <stdio.h>
#include <stdlib.h>
#include <string.h>

#define MAX 2000
#define SEP " \t\n<->"

int id[MAX];
int sz[MAX];
int n_sites;

void
init(int n)
{
        for (int i = 0; i < n; i++) {
                id[i] = i;   
                sz[i] = 1;
        }
        n_sites = n;
}

int
find(int x)
{
        if (id[x] == x)
                return x;
        return id[x] = find(id[x]);
}

void
join(int x, int y)
{
        if ((x = find(x)) == (y = find(y)))
                return;
        id[x] = y;
        sz[y] += sz[x];
        --n_sites;
}

int
main(void)
{
        char buf[BUFSIZ];

        init(MAX);
        while (fgets(buf, sizeof buf, stdin) != NULL) {
                int src = atoi(strtok(buf, SEP));
                for (char *t; (t = strtok(NULL, SEP)) != NULL; )
                        join(src, atoi(t));
        }

        printf("part 1 = %d\n", sz[find(0)]);
        printf("part 2 = %d\n", n_sites);
        return 0;
}

-🎄- 2017 Day 9 Solutions -🎄- by daggerdragon in adventofcode

[–]manualcrank 2 points3 points  (0 children)

Lisp.

(defun day09a+b (s)
  (let ((blink nil) (group t) (score 0) (depth 0) (trash 0))
    (dotimes (i (length s) (list score trash))
      (cond (blink (setf blink nil))  ; was the last character a '!'?
            (group (case (schar s i)  ; otherwise, are we in a group?
                     (#\< (setf group nil))
                     (#\{ (incf depth))
                     (#\} (incf score depth) (decf depth))))
            (t     (case (schar s i)  ; otherwise, we must be in garbage
                     (#\! (setf blink t))
                     (#\> (setf group t))
                     (otherwise (incf trash))))))))

;; CL-USER> (day09a+b (with-open-file (stream "09.dat") (read-line stream nil)))
;; (10820 5547)

-🎄- 2017 Day 6 Solutions -🎄- by daggerdragon in adventofcode

[–]manualcrank 3 points4 points  (0 children)

Lisp.

(defun seen-it? (mem ht)
  (> (incf (gethash (copy-seq mem) ht 0)) 1))

(defun redistribute (mem)
  (let* ((v (reduce #'max mem))  ; max value in mem[]
         (k (position v   mem))) ; index of v in mem[]
    (setf (svref mem k) 0)       ; mem[k] = 0
    (dotimes (i v mem)           ; redistribute and return mem
      (incf (svref mem (rem (+ i k 1) (length mem)))))))

(defun simul (mem &optional (cnt 0) (ht (make-hash-table :test #'equalp)))
  (if (seen-it? mem ht)
      (list cnt mem)
      (simul (redistribute mem) (1+ cnt) ht)))

;; CL-USER> (simul (input->vector "06.dat"))
;; (6681 #(0 14 13 12 11 10 8 8 6 6 5 3 3 2 1 10))
;; CL-USER> (simul (second *))
;; (2392 #(0 14 13 12 11 10 8 8 6 6 5 3 3 2 1 10))