Înapoi la articole →

Cel mai recent articol

Ultima verificare

Urmăritori 0 urmăritori
Articole: 84
  1. One can improve on arcsine's performance with Horner's method and then bittwiddling.

  2. Allison (1989) gives an example of tying the knot to build an immutable, doubly-linked list from a list.

  3. Robert Harper points out that dynamically typed languages are a subset of statically typed languages.

  4. J's #: (base) can be used to compute the offset of an array element as it would appear in memory.

  5. Variable types (à la System F) are not templates, though one can think of them as type schemata.

  6. After paraphrasing a computation I had found in a paper, I realized I had ruined its performance.

  7. Apple outperforms R in important cases.

  8. Writing an assembler turns out to be an interesting example: one needs to calculate distances between jumps and their target labels, and the target may appear after the label.

  9. For an array with dimensions \(n_1,n_2,\ldots n_r\) stored in column-major order, an element with indices \(a_1,a_2,\ldots a_n\) is located at offset

  10. One motivation for Apple was demonstrating typed array programming.

  11. Consider a softmax layer from Aditya Srinivas Menon's tutorial:

  12. Apple, being a JIT compiler with shape types, is able to do a number of optimizations based on inferred dimension (and rank).

  13. I just finished adding another mid-end to my Apple JIT compiler, motivated to get rank facilities right.

  14. Compilers and linkers put their own version information in ELF binaries; we can inspect with readelf on the .comment section, to wit:

  15. One PL nihilism is "all languages are the same."

  16. Universal ctags points the cursor to line numbers rather than the actual definition (as language servers do).

  17. An established problem in functional programming is the question of evaluation order (see Hudak, §2.2).

  18. nm shows symbols defined in an executable.

  19. GHC embeds linker flags into the final ELF binary:

  20. I turned to my own Jacinda to view the output of otool and was pleasantly surprised.

  21. The GNU sed manual offers the following to join backslash-continued lines:

  22. One can define a Num instance in Haskell for ASTs of expressions, viz.

  23. If we wish to preserve global uniqueness of names during \(\beta\)-reduction, we have to \(\alpha\)-rename before each substitution.

  24. Haskell puts all side effects in the IO monad, which passes around the RealWorld.

  25. C has a reputation for being a "hacker" language, in contrast to say Haskell, which is abstract with ties to logic and category theory.

  26. Logic programming fails for many reasons; interestingly it fails to integrate with imperative programming or export its constructs.

  27. Egison advocates a pattern-match oriented style of programming and offers poker hands as an example:

  28. My Apple compiler started as an experiment in what I would implement as compiler for an array system.

  29. Functions are compiled to machine by a convention of jumps and registers; one calls a function by jumping to its location in memory.

  30. Building a respectable compiler requires basic blocks in order for liveness analysis to be performant.

  31. I previously wrote about typing elliptic fourier series; my Apple compiler is now capable of computing the offsets and also the relevant coefficients.

  32. Rosetta

    To compute a 7-day moving average:

  33. As I wrote about previously I am working on a typed array language with the case of elliptic Fourier series as an example.

  34. Compilers are written as a pipeline: in particular, instruction selection and register allocation are different phases.

  35. Writing a practical JIT is somewhat complicated and in fact depends on the assembler; here I present a full example in Haskell.

  36. "Typing Haskell in Haskell" makes the implementation of type systems concrete for programmers; recent developments in type theory have much to offer but are not developed to this depth even in theory.

  37. Elliptic Fourier series are a good example to kick the tires on array programming systems; J and Python, however, are both dynamically typed.

  38. APL is truly different from other languages; nearly every language uses lexical scoping to express composition.

  39. Jacinda can imitate cloc by combining it with other command-line tools on the Unix command-line, viz.

  40. One common oversight in Haskell compilers is failing to intern identifiers using Ints and failing to prefer IntMaps and IntSets.

  41. Suppose we want to clean up all TODOs in a branch before merging.

  42. One would like to be able to find all language extensions in a given Haskell project in order to populate the other-extensions field of the .cabal file (cabal-install uses this for dependency resolution).

  43. J and APL support (and encourage) a certain form of programming without error handling or library code reuse.

  44. Suppose one would like to process compiler output to include span; vim uses awk (mve.awk) to do this.

  45. I am in the process of adding a deduplication builtin to my [Jacinda](https: //hackage.haskell.org/package/jacinda) language.

  46. One can use Jacinda to generate tags files for vim.

  47. Suppose we wish to inspect our PATH.

  48. GHC includes span information in compiler errors, but not in a format suitable for vim:

  49. The !

  50. Concatenative languages lend themselves to rewriting because they do not bind variables and thus do not incur any confusion with renaming/scope (compositional rather than applicative).