News for hackers. Stuff that matters.
Re:Arrays of Arrays (2009) by thesz on Sunday December 20, 2020 @06:08AM (#25485432)
Take a look at yalsat: http://fmv.jku.at/yalsat/

Unpack the "v" version, look at yals.c. You will see there the following:

  #define PUSH(S,E) \
  do { \
    if (FULL(S)) ENLARGE (S); \
    *(S).top++ = (E); \
  } while (0)
  
  #define POP(S) \
    (assert (!EMPTY (S)), *--(S).top)
  
  #define TOP(S) \
    (assert (!EMPTY (S)), (S).top[-1])
  
  #define PEEK(S,P) \
    (assert ((P) < COUNT(S)), (S).start[(P)])
  
  #define POKE(S,P,E) \
    do { assert ((P) < COUNT(S)); (S).start[(P)] = (E); } while (0)
These are definitions for typed dynamic arrays using C macros. Very useful.

As you can see, there's a couple of assert()'s before actual computation of the address to fetch.

I hope I proved you wrong.

Re:Arrays of Arrays (2009) by dmurray on Sunday December 20, 2020 @08:34AM (#25486102)
> I hope I proved you wrong.

I don't see where you did - Animats said he couldn't find examples of the comma operator inside square brackets, not that he couldn't see it being used at all.

Re:Arrays of Arrays (2009) by thesz on Sunday December 27, 2020 @05:10PM (#25554710)
I think he has failed precisely because he wanted not to succeed.