HackerTrans
TopNewTrendsCommentsPastAskShowJobs

wjbr

no profile record

comments

wjbr
·6 tháng trước·discuss
I've been reminded of this while playing Metroid Prime 4.

I wonder what kinds of modern games we could make with these same ideas.
wjbr
·2 năm trước·discuss
static int pretty_float_equal (float a, float b) { return fabsf(a - b) < FLT_EPSILON; }
wjbr
·3 năm trước·discuss
I've been enjoying `cody` for exploring old open source code bases.

https://docs.sourcegraph.com/cody/overview

I've not used the copilot like features, but asking questions has been very useful.
wjbr
·3 năm trước·discuss
If the lisp has read macros you can add it yourself.

There's: sweet-expression

https://srfi.schemers.org/srfi-110/srfi-110.html

https://sourceforge.net/p/readable/wiki/Examples/

    define fibfast(n)  ; Typical function notation
      if {n < 2}       ; Indentation, infix {...}
        n              ; Single expr = no new list
        fibup(n 2 1 0) ; Simple function calls

    define fibup(maxnum count n-1 n-2)
      if {maxnum = count}
        {n-1 + n-2}
        fibup maxnum {count + 1} {n-1 + n-2} n-1

    define factorial(n)
      if {n <= 1}
        1
        {n * factorial{n - 1}} ; f{...} => f({...})
wjbr
·4 năm trước·discuss
How would it work with more than two arguments?

  (+ 1 2 3)
wjbr
·4 năm trước·discuss
How would you do it?