Creează un cont pentru a te abona la acest blog și a-i urmări articolele pe pagina Lectură.
-
One can improve on arcsine's performance with Horner's method and then bittwiddling.
-
Allison (1989) gives an example of tying the knot to build an immutable, doubly-linked list from a list.
-
Robert Harper points out that dynamically typed languages are a subset of statically typed languages.
-
J's #: (base) can be used to compute the offset of an array element as it would appear in memory.
-
Variable types (à la System F) are not templates, though one can think of them as type schemata.
-
After paraphrasing a computation I had found in a paper, I realized I had ruined its performance.
-
Apple outperforms R in important cases.
-
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.
-
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
-
One motivation for Apple was demonstrating typed array programming.
-
Consider a softmax layer from Aditya Srinivas Menon's tutorial:
-
Apple, being a JIT compiler with shape types, is able to do a number of optimizations based on inferred dimension (and rank).
-
I just finished adding another mid-end to my Apple JIT compiler, motivated to get rank facilities right.
-
Compilers and linkers put their own version information in ELF binaries; we can inspect with readelf on the .comment section, to wit:
-
One PL nihilism is "all languages are the same."
-
Universal ctags points the cursor to line numbers rather than the actual definition (as language servers do).
-
An established problem in functional programming is the question of evaluation order (see Hudak, §2.2).
-
nm shows symbols defined in an executable.
-
GHC embeds linker flags into the final ELF binary:
-
I turned to my own Jacinda to view the output of otool and was pleasantly surprised.
-
The GNU sed manual offers the following to join backslash-continued lines:
-
One can define a Num instance in Haskell for ASTs of expressions, viz.
-
If we wish to preserve global uniqueness of names during \(\beta\)-reduction, we have to \(\alpha\)-rename before each substitution.
-
Haskell puts all side effects in the IO monad, which passes around the RealWorld.
-
C has a reputation for being a "hacker" language, in contrast to say Haskell, which is abstract with ties to logic and category theory.
-
Logic programming fails for many reasons; interestingly it fails to integrate with imperative programming or export its constructs.
-
Egison advocates a pattern-match oriented style of programming and offers poker hands as an example:
-
My Apple compiler started as an experiment in what I would implement as compiler for an array system.
-
Functions are compiled to machine by a convention of jumps and registers; one calls a function by jumping to its location in memory.
-
Building a respectable compiler requires basic blocks in order for liveness analysis to be performant.
-
I previously wrote about typing elliptic fourier series; my Apple compiler is now capable of computing the offsets and also the relevant coefficients.
-
To compute a 7-day moving average:
-
As I wrote about previously I am working on a typed array language with the case of elliptic Fourier series as an example.
-
Compilers are written as a pipeline: in particular, instruction selection and register allocation are different phases.
-
Writing a practical JIT is somewhat complicated and in fact depends on the assembler; here I present a full example in Haskell.
-
"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.
-
Elliptic Fourier series are a good example to kick the tires on array programming systems; J and Python, however, are both dynamically typed.
-
APL is truly different from other languages; nearly every language uses lexical scoping to express composition.
-
Jacinda can imitate cloc by combining it with other command-line tools on the Unix command-line, viz.
-
One common oversight in Haskell compilers is failing to intern identifiers using Ints and failing to prefer IntMaps and IntSets.
-
Suppose we want to clean up all TODOs in a branch before merging.
-
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).
-
J and APL support (and encourage) a certain form of programming without error handling or library code reuse.
-
Suppose one would like to process compiler output to include span; vim uses awk (mve.awk) to do this.
-
I am in the process of adding a deduplication builtin to my [Jacinda](https: //hackage.haskell.org/package/jacinda) language.
-
One can use Jacinda to generate tags files for vim.
-
Suppose we wish to inspect our PATH.
-
GHC includes span information in compiler errors, but not in a format suitable for vim:
-
The !
-
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).