« first day (957 days earlier)      last day (578 days later) » 

3:28 AM
can i still force them to be `I ? [`/ force a cast `](https://ngn.codeberg.page/k#eJzTV0jLL0pOVUhUSE4sLuHKsKo2UtaoUDY009QHUYaatQr6ChUKibn5pXklCvlpChmpFQpJCiXlmcmpXFwJDgpAkBFtGAtkJmSqqEOZUFGDWAAccBpm)
i am reading the array from c and don't want to deal with different types so i force everything into `I ? should it still work ? ( i haven't check my c code yet , just wondering )
 
 
2 hours later…
ngn
5:33 AM
@meyt4r it's not guaranteed anymore that `i$x will make an array of 32bit ints, but there's still a c function you can call to force it: cI(x) - "cast to (32bit) int"
 
6:32 AM
@ngn got ya, thanks
@ngn just cloned the repo , and ... its segfaults. ( just ran make )
 
7:10 AM
seems to be caused on 06767f82422b1f5b692d80f6ada4b5ddb6d91da5 commit
 
ngn
@meyt4r what os and compiler do you use?
 
debian gcc 8
look into makefile line 16 , the $(L); you added seems to caus the breakage.
i have no idea what it all means and how it works, but when i remove it, it doesn't segfault anymore
 
ngn
unfortunately i can't test on linux right now, but on freebsd it works fine with gcc8
@meyt4r thanks! i'll comment it out until i have the ability to test
 
but now i am curious. what the meaning of $^ $(L) in the makefile ?
 
ngn
@meyt4r L contains linker options that make the binary smaller. @coltim knows more than me
@meyt4r $^ expands to the target for the current rule in the makefile
 
7:22 AM
@ngn nice
 
7:33 AM
i read up on the flags, the -Wl,option is passed to the linker
-N passed to the linker is what seg faults on my end
from the ld docs : (https://ftp.gnu.org/old-gnu/Manuals/ld-2.9.1/html_node/ld_3.html)
Set the text and data sections to be readable and writable. Also, do not page-align the data segment. If the output format supports Unix style magic numbers, mark the output as OMAGIC.
 
ngn
7:45 AM
@meyt4r hm, why would it segfault though..
 
 
2 hours later…
9:47 AM
hmm, does it segfault on its own or are you using it with other c code you've written?
 
 
4 hours later…
1:45 PM
clean ./k segfaults
not my code
@ngn maybe something to do with the page-align data segment ( at least thats what seems odd to me )
 
ngn
2:43 PM
anyway, i reverted to the old makefile state
i'm trying to put down in writing the reasons why k trains (projection+composition) work better than j trains (fork+hook). thoughts? ngn.codeberg.page/txt/tacitjk.pdf
 
3:01 PM
you kind of touch on this, but K's approach means you can both parse and understand K expressions by reading in a linear order with only fixed lookahead, wheras J syntax requires arbitrary lookahead
 
ngn
@JohnE yes, i put it as criticism of j trains. maybe framing it as praise of k would be better received :)
"It’s hard to keep track of that in a longer train, as the factors affecting it
lack locality—in order to determine how a carriage is applied, the reader
must understand and count all carriages to its right."
 
I definitely view it as a serious problem in J's syntax; human beings do not have an unlimited capacity for intermediate parsing
J syntax "readability" often gets flak for the use of digraphs and unmatched [({ symbols but trains and forks are a much bigger problem
 
ngn
@JohnE right, but i'd like to focus on criticising this one thing (forky trains) and avoid counterarguments like "use dyalog instead"
dyalog's trains are identical to j's except for replacing hooks with atops
and of course dyalog doesn't use digraphs or unbalanced brackets
@JohnE there's an interesting counterargument for j's "read everything to the right" problem - if you encounter a noun, you don't have to read further to the right because nouns can only occur at even (0indexed) positions in the train
 
@ngn (on *: forced monadic) in k9 it's not "unnecessary" but illegal to add a colon. maybe you could point out some consequences: these trains have ambivalent arity, but usually only one makes sense and that makes it harder to understand them, if they are assigned only (and not applied)
 
3:19 PM
what do trains/atops/forks/etc. get you (besides ways to avoid parenthesis or expanding what you can do tacitly)?
 
ngn
@ktye who knows if k9 will change tomorrow.. i think i'd better limit it to k6 or even just ngn/k, for simplicity.
i just want to get one point across - j trains are harder to work with than k trains
@coltim idk. many people seem to like forks
and many of those same people aren't aware of the alternatives, they just equate tacit programming with forky trains
 
hmm, I guess I'm too caught up in what the audiences are. if you invested the time and energy to learn the full J-way, it may even be a badge of honor that they're not the most straightforward thing to parse. if you're a newbie there are probably a dozen other aspects of the language that are confusing too, but adding more such things is bad
like if the "problem" with array programming languages is that sometimes you need to refer to a variable twice, or use parenthesis, or shuffle things around to work more cleanly, sure
but if the problem is "anyone not already familiar with it thinks its unreadable/unmaintainable line noise"...
 
3:38 PM
@ngn same with tacks - those are pretty much always at the even positions too. And if you don't encounter either tacks or nouns for a while, the corresponding temporary variable/function version would be ugly anyways
 
ngn
@dzaima tacks don't make sense in as the middle verb of a fork, but who knows, it may have been put there for the side effects of one of the fork's prongs, or it could be just noob code, or a mistake
 
right, tacks in odd positions are valid, but for practical purposes you can just assume they won't be, and the worst is backtracking/being confused in those rare weird cases
to note is that parenthesized expressions always being nouns means that normal expressions are parseable without info in parens, whereas in APL/J/BQN, parens "cost" more readability, thus making avoiding them more important
 
ngn
@dzaima good point
@dzaima in apl you even have to look inside { } for ⍺⍺-s and ⍵⍵-s to figure out what syntactic role it has
 
3:54 PM
yeah, but for that you can usually assume it won't, and ⍺⍺/⍵⍵ are easily noticeable due to being repeated digraphs anyways
@dzaima so you have to decide what even to ask. "do APL/J trains belong in k" is most likely a no, due to many decisions for making normal syntax better. "do k trains belong in J" is pretty much a no, given that J is like built for being all tacit. "do k trains belong in APL" is a more reasonable question, but you won't arrive at it by just comparing k and APL trains without considering the rest of the corresponding language.
 
ngn
@dzaima but apl's and j's trains are almost identical
 
but the rest of APL and J are pretty different
 
ngn
i don't expect either of them to change anyway
 
4:11 PM
imo, without succinct combinators, forks are pretty useless. k doesn't have combinators, so, imo, forks don't belong in k either
 
ngn
@dzaima aren't projections and compositions combinators?
 
@ngn not succinct ones at least
 
ngn
(+*) applies + after *
(1+) applies + to the constant function 1 and the argument
"fork" is also a combinator (or a pair of combinators - monadic and dyadic), but a complicated one, so in k it's not given succinct syntax
 
both 1 char longer than the APL equivalent, as they need parens if not immediately assigned (as in a subexpression of a longer train)
 
ngn
j's and apl's need parens too
 
4:17 PM
f∘g 1∘+ don't
 
ngn
i don't understand what point you're trying to make
 
combinators are very useful in fork tines. So if you can't have succinct combinator tines in forks, the fork will be ugly
 
ngn
@dzaima you mean not combinators, but conjunctions like ∘ ?
 
and I like it when my forky trains don't have any parentheses within them
@ngn combinator is the general name for APL ∘⍤⍥⍨ / BQN ⊸∘○⟜˜
and imo it's either both those and forks, or neither
 
ngn
@dzaima no. a combinator is a higher order function used for tacit programming. there are many famous combinators, such as Y, S, K, I, W..
a conjunction can be used as a combinator but the two concepts don't overlap entirely
 
4:24 PM
@ngn and those combinators map to the APL/BQN ones
I mean specifically the conjunctions/adverbs that are also combinators
 
ngn
@dzaima they "map"..
there are conjunctions in j/apl that do not correspond to combinators and vice versa - combinators that couldn't possibly be implemented
 
afaik combinators are just things that take some functions and arguments and give a result from just calling those functions on just those args
of course APL/BQN/J don't define have a builtin for each of the infinite number of combinators
@ngn what do you mean by that? Do you want BQNs to instead be named Q or something?
 
ngn
@dzaima i mean there's no bijection between conjunctions(and/or adverbs) and combinators
 
sure?
 
ngn
11 mins ago, by dzaima
@ngn combinator is the general name for APL ∘⍤⍥⍨ / BQN ⊸∘○⟜˜
so, ^that's wrong
 
4:34 PM
s/for/for things like/
 
ngn
"combinator" is something much more general than apl
 
but APL ∘⍤⍥⍨ / BQN ⊸∘○⟜˜ still are combinators
 
ngn
some conjunctions are can be used as combinators, yes
 
@dzaima and for that message, I do mean specifically combinator conjunctions/adverbs
 
ngn
not all conjunctions are combinators. and not all combinators can be implemented as conjunctions.
what a waste of time this is..
 
4:39 PM
right, but I never mentioned conjunctions. Just any syntactical succinct form of a useful set of combinators
@ngn +1
 
ngn
@dzaima do you still think "k doesn't have combinators"?
 
ah, i had forgotten i even wrote that part of that message :)
what I meant is a big enough set of combinators to handle most cases of things you write. (and k only has 2 succinct combinators - (f g) and (x g) - and even those need parens in most cases)
combinators alone need parentheses quite often though, besides being kind of ugly when you go nested. Forks make it possible to write a lot of things without parentheses
BQN example of my solution for unrepeated chars yesterday
 
 
1 hour later…
6:21 PM
@ngn are you aware that j has also modifier trains? they had been removed long ago but were added back recently. chapter two or your paper is their k equivalent (but beware: there are many combinations)
Henry Rich mentions these in the interview at 25:40 "only 5 people in the world that really understood it"
 
ngn
@ktye interesting. let me try to understand this..
 
ngn
6:51 PM
@ktye ok, so if i understand correctly, this is like a 2nd-order fork pattern, where "forks" are make of adverbs and conjunctions
@ktye in what sense are they equivalent to tacit k?
 
@ngn i didn't mean they are equivalent. i meant, if you want to find equivalent versions, that would be the next level of your paper. that's quite a table
 
ngn
j is a huge mess
this is a consequence of iverson choosing to have 1st, 2nd, 3rd order functions (verbs, adverbs, conjunctions) instead of functions as first-class values
@ktye so many weird cases, yet no N0 V1 in that table..
the nice and short N0 V1 goes to waste
why are T0 C1 T2 (where T is either N or V) "executed to produce any part of speech"? i thought those should be verbs
 
7:21 PM
@ngn maybe conjunctions are able to immediately execute something on derivation
(BQN)
 
 
3 hours later…
ngn
9:54 PM
@dzaima apparently yes: "A conjunction modifies the words or phrases to its left and right to produce a derived entity which is usually a verb, though it can be any of the four primary parts of speech."
 
@ngn how does the dyadic "fork" work in ngn/k ?
 
ngn
@Traws i made triadic @ work like @[f;x;y] <=> f[x;y] and triadic eachleft like f\:[x;y;z] <=> f[;y;z]'x
 
@ngn can you give an example?
 
10:12 PM
would this work ? (+;-)@\:[3;3]
 
ngn
@Traws no, not like that. but with parentheses it should.
 
ah ok, nice
nice write up by the way. my view is similar to John's, the "nonlinear" flow in J is the problem for me. K lifts the burden of keeping track of how arguments are jumping around by making things more explicit and sequential.
 
ngn
thanks. i'm glad we agree :)
 

« first day (957 days earlier)      last day (578 days later) »