HackerTrans
TopNewTrendsCommentsPastAskShowJobs

wjbr

no profile record

comments

wjbr
·il y a 6 mois·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
·il y a 2 ans·discuss
static int pretty_float_equal (float a, float b) { return fabsf(a - b) < FLT_EPSILON; }
wjbr
·il y a 3 ans·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
·il y a 3 ans·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
·il y a 4 ans·discuss
How would it work with more than two arguments?

  (+ 1 2 3)
wjbr
·il y a 4 ans·discuss
How would you do it?