Questions tagged [tacit-programming]

Tacit programming is a programming paradigm in which a function definition does not include information regarding its arguments, using combinators and function composition (but not λ-abstraction) instead of variables. The simplicity behind this idea allows its use on several programming languages, such as APL and J.

Wiki

Tacit programming is one of the styles possible in the J and APL programming languages, and means coding by combining functions, without reference to argument names. This idea may have been first brought up in functional programming; it's simpler than lambda calculus.

Tacit programming is also known as point-free style, or pointless programming, because of the lack of explicit arguments, or points.

Example

In J, the same sort of point-free code occurs in a function made to compute the average of a list (array) of numbers:

 avg=: +/ % #

Details: # counts the number of items in the array. +/ sums the items of the array. % divides the sum by the number of items.

Tag usage

The tag can be used for programming related questions in implementation of J and APL programming languages, Question with the tags or can also use tag . Please avoid theoretical questions on Stack Overflow.

Read more

74 questions
52
votes
2 answers

What does (f .) . g mean in Haskell?

I have seen a lot of functions being defined according to the pattern (f .) . g. For example: countWhere = (length .) . filter duplicate = (concat .) . replicate concatMap = (concat .) . map What does this mean?
25
votes
2 answers

Have J style adverbs, forks etc been emulated via libraries in mainstream functional languages?

Has an emulation of J style of super condensed tacit programming via verbs, adverbs, forks, etc., ever been attempted via libraries for mainstream functional languages? If so, how successful was the result? If not, is there a technical issue that…
RD1
  • 3,305
  • 19
  • 28
23
votes
4 answers

How to filter a list in J?

I'm currently learning the fascinating J programming language, but one thing I have not been able to figure out is how to filter a list. Suppose I have the arbitrary list 3 2 2 7 7 2 9 and I want to remove the 2s but leave everything else unchanged,…
Gregory Higley
  • 15,923
  • 9
  • 67
  • 96
19
votes
4 answers

Tacit programming in Lisp

Is it possible to use/implement tacit programming (also known as point-free programming) in Lisp? And in case the answer is yes, has it been done?
paldepind
  • 4,680
  • 3
  • 31
  • 36
15
votes
2 answers

Role of combinators in concatenative/tacit programming languages

What exact role do higher-order combinators (or function producers) hold in concatenative and tacit programming? Is there another way to implement a concatenative programming language rather than directly manipulating the stack? How tight is the…
Bubba88
  • 1,910
  • 20
  • 44
14
votes
5 answers

Best strategies for reading J code

I've been using J for a few months now, and I find that reading unfamiliar code (e.g. that I didn't write myself) is one of the most challenging aspects of the language, particularly when it's in tacit. After a while, I came up with this…
estanford
  • 1,302
  • 1
  • 13
  • 23
13
votes
2 answers

Tacit function composition in Haskell

Say I have a mean function defined like so: mean xs = sum xs / (fromIntegral $ length xs) but I want it in some tacit form, like this: mean = sum / (fromIntegral . length) Is there a built-in Haskell way to do something along these lines without…
Benjamin Kovach
  • 3,190
  • 1
  • 24
  • 38
8
votes
6 answers

Learning J/K/APL

I know all 3 are related, and I've seen quite a few answers for problems in Project Euler written in J, and a few written K. What I'm wondering is, which would you suggest learning, and where would you suggest going about getting the materials to…
Ashton K
  • 875
  • 1
  • 8
  • 18
7
votes
2 answers

Fiddling with point-free code?

I have been learning the Factor and J languages to experiment with point-free programming. The basic mechanics of the languages seem clear, but getting a feeling for how to approach algorithm design is a challenge. A particular source of confusion…
7
votes
2 answers

J: Tacit adverb of Newton's method

I've found in 'addons/math/misc/brent.ijs' implementation of Brent's method as an adverb. I would like to build a Newton's method as an adverb too but it's much harder than building tacit verbs. Here is a explicit version of Newton's iteration: …
Dan Oak
  • 704
  • 1
  • 7
  • 26
6
votes
2 answers

Tacit programming style using F#

It's not a practically important issue, but I'd like to see an example of tacit programming in F# where my point-free functions can have multiple arguments (not in form of a list or tuple). And secondly, how such functions can manipulate a complex…
Bubba88
  • 1,910
  • 20
  • 44
6
votes
2 answers

Creating a recursive tacit function in J

I'm a newcomer to J and I've been trying to create a Fibonacci function as an exercise (always the second function I create when learning a language). I just can't figure out what exactly is wrong in my way of doing it. I have tried to define it as…
seequ
  • 456
  • 2
  • 13
5
votes
0 answers

Why GHC avoids tacit programming?

I was looking at GHC.Unicode library source and realized that almost all the Haskell internal libraries avoid tacit programming (aka point-free style) most of the time. Simple functions can be easily converted, such as: isLatin1 :: Char ->…
Marcelo Camargo
  • 2,240
  • 2
  • 22
  • 51
5
votes
2 answers

Pros / Cons of Tacit Programming in J

As a beginner in J I am often confronted with tacit programs which seem quite byzantine compared to the more familiar explicit form. Now just because I find interpretation hard does not mean that the tacit form is incorrect or wrong. Very often…
user1202733
  • 623
  • 4
  • 10
1
2 3 4 5