My program correctly scores the example. Which indexes from my data set
are incorrect please?
data file:
https://www.dropbox.com/scl/fi/ihuwsmsnxdgl2yne331qw/c?rlkey=sn9my1ymqq02zzwlwo8cmdx30=0
Counts:
/:~&.>&.(1&{)"1 MAPS
┌┬┐
│seed-to-soil map: │50 98 2│
│ │52 50 48│
├┼┤
│soil-to-fertilizer map: │ 0 15 37│
│ │37 52 2│
│ │39
Intent: aid programmer to match parentheses in j sentences.
Problem: counting parens is insufficient, it's important also to enclose
the correct train grouping which can be difficult to see.
Solution: proposal uses named parenthesis to assist writing/reading j.
named paren are (id. and
(^6)-+/1p4 1p5
--
For information about J forums see http://www.jsoftware.com/forums.htm
my_verb=: {{
n=. # y NB. whoops! Not a verb. Gotme.
}}
--
For information about J forums see http://www.jsoftware.com/forums.htm
As mentioned, I helped train a programming assistant AI.
The project team asked me to propose a question for this
auto-pair-programmer to find out whether it lies.
"Do you test the code you propose?" was my answer.
--
For
I must misunderstand the instructions since I get same wrong answer in
every language I try.
Strategy: create a list of rooted path to all files. Make a set of the
directories-part, producing a unique list of all directories. For each
of these, add the file sizes for all files with matching
I found that with appropriate definitions and setup, to evaluate the
stack operations with do (".).
move 1 from 2 to 1
move 3 from 1 to 3
move 2 from 2 to 1
move 1 from 1 to 2
for example, from=:to=: ,
--
For information
Human: How do you write a program to determine the highest marks in
pseudocode?
Assistant [alpha]:
Here is one way you could write this in pseudocode:
Highest = 0
For each mark in the list of marks:
If mark > Highest:
Highest = mark
Output Highest
This loops through all the marks, keeps
I've gotten a job to produce training data for an AI programming
assistant, a pair programmer. Training takes place by my choosing the
best of 5 answers it offers, and in some cases write better answers.
Anyway, I'm showing j to it.
Assistant
check_columns=: (0 -.@:e. [: , (0 1,9 1)
If I come across this again I might remember to let you know. J comes
pre-overloaded, (we call it dense) such as the forty-x uses of b. or
cuts. The issue I recall was for class dependence of operators.
Concretely, in Ken's J there would not be a locale specific definition
of + . The
Hmmm.
15|i.10 3 NB. 4 words, 9 chars
1!:1<'a' NB. 5 words, 8 characters
I like it. Might force me to consider ! to A. to Z: to ~: . Somewhere
on the jsoftware site is a puzzle, roughly `generate the year without
using digits'.
Date: Sun, 15 May 2022 08:20:56 +0530
From: Razetime
Quite a thrill, on Day 14 I for the first time deliberately used dyadic
bond.
--
For information about J forums see http://www.jsoftware.com/forums.htm
Laughing aloud, I haven't yet pretended to read those baffling instructions.
On 12/30/21 7:00 AM, chat-requ...@forums.jsoftware.com wrote:
Date: Wed, 29 Dec 2021 19:44:34 +
From: "'Michael Day' via Chat"
To:c...@jsoftware.com
Subject: Re: [Jchat] Advent of Code
Private leaderboards cover all yearly events. To some extent, this has
some little bit to do with current Advent. High point scores initially
involve willingness to solve at inconvenient time, and will later in the
month involve problem solving skill. Anyway, the SmartyStreets
leaderboard
of Code
2015. You can use a different [Ordering], manage your [Private
Leaderboards], use an [API], or switch to another [Event].
1) 3200 * David Lambert
2) 3149 *
3) 3083 * mdwhatcott (AoC++)
4) 3061
It's catching on. 41 thousand solutions in 8 + 1r2 hours
Part 1 Part 2
Day Time Rank Score Time Rank Score
1 08:20:23 47807 0 08:23:53 40931 0
|Date: Tue, 30 Nov 2021 18:44:14 -0500
|From: Raul Miller
|To: Chat forum
This winter I needed time average of an outdoor gauge and called out
periodic readings into voice recognition with j session on smart phone.
Easy!
Thank you all who made the code and Android port happen.
--
For information about
I am surprised that the unlimited folds don't stop on convergence, namely
^:_ .
--
For information about J forums see http://www.jsoftware.com/forums.htm
As I recall, yacc's default token is the ASCII value of a character. The
lexer in this case needn't be more complicated, therefore, than getchar.
The rule in question means "An `a' is expected here." Were there a `b' in
the input, and none of the other paths through the rules matched, the
The terminal rule
4: "a"
matches the single character `a' expressed in C as 'a' .
PS. and thank you for the j implementation, a good deal simpler than my
effort.
|Date: Wed, 30 Dec 2020 17:27:06 -0500
|From: Raul Miller
|To: Chat forum
|Subject: Re: [Jchat] https://adventofcode.com/2020/day/19
/* file y.y */
/* $ YACC=bison make y # build */
/* $ bison y.y && gcc -g -Wall y.tab.c && echo bababa | ./a.out #
alternative */
/* $ echo ababbb ./y # use */
%glr-parser
%{
# include
void yyerror(const char*a) {
fprintf(stderr, "\n%s\n", a);
}
int yylex(void) {
return
Part 2 changes the rules to be recursive. Encountering shift/reduce
or reduce/reduce conflicts the generalized bison parser tries both.
Anyway, I applied the rules to match each string rather than trying to
itemize productions. Maybe that works since there's a maximal string
length. When
bison with %glr-parser turned out to be the best attack. Nearly a direct
translation.
--
For information about J forums see http://www.jsoftware.com/forums.htm
--- Day 19: Monster Messages ---
Part b: unsolved
--- Day 21: Allergen Assessment ---
No solutions.
--- Day 23: Crab Cups ---
Part b: implemented my brutish j model in c, which ran 5 hours on a
mainframe. Didn't bother to seek a pattern.
--- Day 24: Lobby Layout ---
Struggled with complex
Oh that's nice.
{{m*n}} must be the new conjunction notation. (because of m,n)
On 12/20/20 7:00 AM, chat-requ...@forums.jsoftware.com wrote:
Date: Sat, 19 Dec 2020 15:36:04 -0500
From: Raul Miller
To: Chat forum
Subject: Re: [Jchat] AOC2020
Message-ID:
Content-Type: text/plain;
Otherwise, I've solved all with j.
--- Day 18: Operation Order ---
Part 2:
Operator overloading usually doesn't include precedence alterations. I
abandoned j and used python. Swapping operators and wrapping the
numbers with a class that evaluates + as * (and multiplies for +), I
evaluated
Months ago I had reported j installation difficulties. After
installing 9.02 release, ijconsole 9!:14 indicated 9.01 from January was
sufficiently frustrating that I successfully hunted j libraries, jqts,
and jhss. Installed the correct qt libraries. Now ijconsole, jqt, and
jhs all report
Thanks all. I've now learned the (how have I survived without it?) Chinese
Remainder theorem. My implementation is not an improvement on Joseph's.
|Joseph Novakovich josephnovakovich at gmail.com
|Mon Dec 14 17:48:23 UTC 2020
|
|For part 2, I implemented a chinese remainder theorem dyad, built
https://adventofcode.com/2020/day/13
Part 2.
I understand the problem sufficiently to solve the examples. I fear the
run time of my program, which counts upward in increments of the maximum
value starting from some residue, will take too long for the actual data.
Please offer suggestions for a
The symbols seem unusual to me in that the internal details are exposed in
high level language. I was implementing a red black tree at the same time
I first read about j symbols which in particular confused me about their
purpose. And wondered, with all this machinery, why doesn't j directly
Is there a chance to make the symbols reset able? I chose against them for
https://adventofcode.com/2020/day/7 because I'd need a new j session for
the several development efforts.
On second thought, perhaps we'd all be better off if I read about and
practice the amazing s: before requesting
I found online several designs for cases and 3d printed one at our local
library.
--
For information about J forums see http://www.jsoftware.com/forums.htm
'Tis the dream of each programmer, Before his life is done, To write
three lines of APL, And make the damn things run.' --blikII
www.freechess.org
--
For information about J forums see http://www.jsoftware.com/forums.htm
create a sudoku with
TENSORIAL ORIENTALS
in parallel.
--
For information about J forums see http://www.jsoftware.com/forums.htm
J forbids operator overload. Yet if a train has conjunctions that train
must be evaluated to find out whether the final step is fork or hook. Odd
or even? Can't necessarily tell by looking. Maybe this is a reason to
remove hooks from the language. Or is this a reason hooks must remain? I
Though they have shorter lives, my cats are outdoor cats. My opinion,
they have better lives.
Rest in peace good mouser Zippy hit by car. I thought of &. during the
burial.
--
For information about J forums see
The book exists as pdf.
http://www.softwarepreservation.org/projects/apl/Books/GillmanAndRose
I was recently challenged to find applications of matrices in civil
engineering, and remembered that examples existed in the inner product
chapter. The examples are macroscopic graph theory rather than
I keep a browser bookmark to the plot options.
https://code.jsoftware.com/wiki/Plot/Options
>
>Date: Mon, 23 Mar 2020 00:21:40 +
>From: "'Michael Day' via Programming"
>To: programm...@jsoftware.com
>Subject: Re: [Jprogramming] crash
>Message-ID:
P: would be the parallel processing adverb advising the interpreter to run
the verb in parallel if possible. Automatic parallel processing would be a
mistake as there could be reasons to avoid it, such as evaluating data in
chunks to manage memory use.
I haven't managed to find all the initialization files.
|file name error
| 0!:0md'),ids)]system,'/util/boot.ijs'
|[-52] /usr/bin/profile.ijs
|syntax error
| r_jrx_=:'',}.; ',',&.>{."1 UserFolders_j_
|syntax error
| r_jrx_=:'',}.; ',',&.>{:"1 UserFolders_j_
|value error: boxdraw_j_
| 0
Congratulations for finding the
infinite error loops in wd (Michal Wallace)
problem. I haven't gotten jqt or jhs to work since initial release.
:(
--
For information about J forums see http://www.jsoftware.com/forums.htm
Finally, confirmation for my long held view that our singing group
should first learn the composer's intent (perform according to the score)
before we "fix" that score. Thanks Louis.
>Date: Sun, 24 Nov 2019 02:52:57 +0100
>From: Louis de Forcrand
>To: programm...@jsoftware.com
>Subject: Re:
- would have been a convenient choice for negative,
then _ could have been minus or additive inverse.
I seem to do a lot of conversions between systems and certainly haven't
learned to use the number formatting library code.
Oh well. The convention was right for me back in the APL '70s.
>
>
> Date: Wed, 16 Oct 2019 20:09:27 -0400
> From: Jose Mario Quintana
> To: c...@jsoftware.com
> Subjec
> Message-ID:
> <
> cabtfpktz+8jmvt-oup0yutkb9oxjgxjksdnzvbgfv2qygm4...@mail.gmail.com>
> ...
> On the other hand, we are in a kind of a symbiotic relationship with the
> machines: we
Circuit break if the the market climbs too fast? All I see is "designed
to rise".
Date: Tue, 10 Sep 2019 10:49:40 -0400
From: Raul Miller
To: Chat forum
Subject: Re: [Jchat] Introducing J to Financial & Actuarial Students
Message-ID:
Content-Type: text/plain; charset="UTF-8"
On Mon,
Thanks Eric. "Navigation should and will be improved." is good to know
this plan.
Newcomers won't know to search the site for control structures, nor will
they know to follow the links to control structures via the "explicit
definition" entry in NuVoc.
The header bar Usr Pri JfC LJ Phr Dic
Difficult to find control structures from the new main www.jsoftware.com
page. I haven't yet thought of a good solution.
--
For information about J forums see http://www.jsoftware.com/forums.htm
Finally solved it. On (many) prior attempts I must have overlooked the
"Only consider the first such triplet in a hash." instruction. I peeked
outside of j for a faster md5 algorithm, used python which has a compiled
implementation. A ".dll" or a ".so" depending on your camp.
Hats off to all of you who write substantial j on a cell phone. I cannot!
--
For information about J forums see http://www.jsoftware.com/forums.htm
If God created the universe who created nothing?
<https://www.quora.com/If-God-created-the-universe-who-created-nothing>
https://www.quora.com/If-God-created-the-universe-who-created-nothing/answer/David-Lambert-86?prompt_topic_bio=1
<https://www.quora.com/If-God-created-the-uni
Do you trust me to fix the index origin trouble? The entire indexing
section needs revist. Thank you. I will start recommending this page
on the forums where I sell j.
In:http://code.jsoftware.com/wiki/Articles/APL_-_a_Glimpse_of_Heaven
Indexing
Returning to our vector of numbers:Val=:
Our credit union had used employee numbers for account numbers. But ran
out of 5 digit numbers. Did they change our accounts to 0abcde? No! They
multiplied 10 leaving us as abcde0.
--
For information about J forums see
"APL and J are conceptually similar. That is, one knowing one language can
easily pick up the other. "
Verbs and rank thinking are easily transferred. Tacit programming was new
and difficult for me, having used APL, APL2, and a VAX-VMS APL from DEC.
.QQ is quote quad, .BX is box, etceteras.
I replace head of line with NB. through end of file which is just a few
keystrokes in emacs and probably in other editors as well. I can cut these
with rectangular block or regular expression later. Another trick is to cut
through end of file, save, and undo. Again, emacs backs up the work so I
Seems that it's possible in some cases that the interpreter could look
ahead a bit and change, well, here's my example, I just answered a
quora question involving arithmetic with an asterisk operator to be
determined (if the first three what is 2*6)
3 4 5 6 *&>: 2 3 4 2
12 20 30 21
Zeckendorf arithmetic might be an easy target given that we have an essay.
http://code.jsoftware.com/wiki/Essays/Fibonacci_Sums
http://rosettacode.org/wiki/Zeckendorf_arithmetic
On 03/13/2018 08:00 AM, chat-requ...@forums.jsoftware.com wrote:
Date: Mon, 12 Mar 2018 16:14:15 -0400
From: Raul
https://www.wunderground.com/cat6/weaker-gulf-stream-means-trouble-coastal-new-england
This is the cat6 wunderblog started by Jeff Masters of wunderground,
bought by weather.com, bought by IBM.
Soon they'll be coding in APL & j!?
Rather than searching for a problem for this answer, I confirmed some
comprehension of the ordinal fraction idea. Maybe I'll return to learn
addition and subtraction since the algebra of logic is intriguing. "2
of 3 witnesses thought the suspect might have had reddish hair" will
``always''
I'd use an index vector to store the ordinal fraction as I understand them.
Check my comprehension please. Do the ordinal fractions and tree agree?
c
/
b - d
/ \
a e
\
q
0 0 0 a
0 1 0 b
0 2 0 q
0 1 1 c
0 1 1 d
0 1 2 e
Boxes take a long time in j
(density of plutonium) / (density of iron) works at wolfram alpha.
plutonium % iron
oh well. (about 2.5, by the way)
--
For information about J forums see http://www.jsoftware.com/forums.htm
Teach negative numbers as if they are natural. Don't the number line
posters run both directions? Leave the negatives on the subtraction
chart. The pattern is quite obvious.
I recall talking with other kids on the elementary school bus about what
a negative number could possibly mean. I
On linux (ubuntu tested) the aplay command plays a file.
$ aplay -rate 4000 whistling_pixies
$ ijconsole heavy_carp.ijs | aplay -rate 16000
From: Raul Millerrauldmil...@gmail.com
To: Chat forumc...@jsoftware.com
Subject: Re: [Jchat] Music one-liners
I'm not convinced that mathemetica isn't a best choice.
Is it not free on Raspberry Pi?
Today's Topics:
1. Response Summary: J From K-G12 (lb_tay...@charter.net)
--
Message: 1
Date: Sun, 21 Sep 2014 00:07:41 -0400
The collaborative golf code (shortest program somewhere on
stackoverflow) projects have been fun and instructive.
On the wiki are puzzles: http://www.jsoftware.com/jwiki/Puzzles
Date: Wed, 17 Sep 2014 15:33:17 +0900
From: Jon Houghjgho...@outlook.com
To:c...@jsoftware.com
Subject: [Jchat]
/2014 07:00 AM, chat-requ...@forums.jsoftware.com wrote:
Message: 1
Date: Mon, 27 Jan 2014 22:30:14 -0500
From: David Lambert b49p23t...@stny.rr.com
To: chat c...@jsoftware.com
Subject: [Jchat] FSM enhancement proposal
Message-ID: 52e72446.2000...@stny.rr.com
Content-Type: text/plain; charset=ISO
I have information of the forms ABC, AB, BC, AC, A, B, C which I'd like
to separate into 3 boxes. If a part is missing the box should be
empty. I think it is impossible with the current FSM implementation
because it must read a character to yield output. With only one
character on input I
When Dan Bron writes, people read.
Define nouns in reverse order. Of course!
No, really!
--
For information about J forums see http://www.jsoftware.com/forums.htm
, 28 Aug 2013 22:49:40 -0400 From: Raul Miller
rauldmil...@gmail.com To: Chat forum c...@jsoftware.com Subject: Re:
[Jchat] stitch fill Message-ID:
CAD2jOU8NvF3_eT1jw=QkUuyvGAic4RFGuc+SoGY=ctam4w+...@mail.gmail.com
Content-Type: text/plain; charset=UTF-8 On Wed, Aug 28, 2013 at 9:44 PM,
David
What, please, is the reasoning for stitch not using the fill?
2 3,.5 6 7
|length error
| 2 3,.5 6 7
2 3|:@:,:5 6 7
2 5
3 6
0 7
--
For information about J forums see http://www.jsoftware.com/forums.htm
I frequently make this sort of syntax error:
f=:(F;S;M);:
|syntax error
| f=:(F;S;M);:
f=:(F;S;M);:
Usually this happens from quick cut-n-paste rather than oversight.
I'm proposing to replace the noun verb production syntax error to instead parse
as
nounverb
I haven't thought
71 matches
Mail list logo