Romilly Cocking

 The APL Orchard

apl.chat ― Learn, teach, ask, code, golf, & discuss usage. See ...
Jan 7, 2023 06:48
Thanks. I think you're right about the shuffling but I am keen to stay as faithful as I can to the algorithm as originally described without loosing too much efficiency.
Odd numbers of agents are not allowed. I should make that clear in the text.
Jan 5, 2023 15:08
I've not had problems with Notebook to pdf, but maybe my notebooks are all small enough. I now have a workaround for my problem: export to markdown, then use pandoc with
--pdf-engine=xelatex --variable monofont="APL385 Unicode"`
Jan 5, 2023 15:02
Has anyone persuaded jupyter to render an APL notebook to pdf while preserving APL characters?
Jan 5, 2023 10:37
I've just published an APL implementation of the yard-sale model (a model that predicts that the rich will get richer while the poor get poorer).

https://github.com/romilly/yard-sale

I need to tidy up the notebooks but background and essential code are in the README.
I'd love some feedback.
2
Dec 31, 2022 18:14
@xpqz And Happy New Year to you!
Jun 17, 2022 10:29
Now all three of your suggestions are implemented.
Jun 17, 2022 10:28
Oops - yes. It started a s a private project, and I forgot to add one.
Jun 17, 2022 10:16
Thanks
Jun 17, 2022 10:11
The beginnings of an implementation of Relational Algebra in APL: github.com/romilly/raapl
May 14, 2022 17:14
I'll switch to ≠⍀t
May 14, 2022 17:14
@Adám I used a spell-checker after I posted. Sorry!
May 13, 2022 16:22
If it looks OK I'll update the blog post to reference it.
May 13, 2022 16:22
I've created a Jupyter notebook with a quick and dirty explanation of the APL version of my markdown converter rareschool.com/assets/html/convert-with-apl.html
May 13, 2022 15:42
An answer to every need :)
May 13, 2022 15:41
@Adám Thanks! happy bunny emoji
May 13, 2022 15:32
@Adám ISTR you had a bookmarklet for adding an APL char bar to Jupyter notebooks?
May 13, 2022 15:30
@doug I didn't know about the Array Cast mention. Thanks!
May 10, 2022 06:08
Has anyone got tips on how to use tryapl on an android phone? I am struggling because the conventional keyboard blocks the area where I am typing.
May 6, 2022 16:11
@Adám Thanks again.
May 6, 2022 16:10
So now conv2←{t←⊣/'```'⍷3↑⍤1⊢⍵ ⋄ n←2|+\t ⋄ (~t)⌿(¯4×t<n)⌽⍵,⍤1⊢4⍴' '}
May 6, 2022 16:08
Ouch. My version only works because the code lines already have enough trailing spaces.
May 6, 2022 16:05
@Adam and yet it works :)
May 6, 2022 16:02
Improvements welcome.
May 6, 2022 16:01
which works and is easy to explain.
May 6, 2022 16:01
@Adám I've ended up with this conv←{t←'```'≡⍤1⊢3↑⍤1⊢⍵ ⋄ n←2|+\t ⋄ (~t)⌿(¯4×t<n)⌽⍵,⍤1 4⍴' '}
May 6, 2022 15:19
Ty :)
May 6, 2022 15:18
@awagga I think you're solving a more complicated/general problem than mine.
May 6, 2022 15:17
@Adam discussion earlier took me back to the traditional 'count leading backticks' solution, which I like as a good example of array vs procedural thinking.
May 6, 2022 15:06
Ty, I'd forgotten
May 6, 2022 15:06
It's a character matrix not a vector of vectors
May 6, 2022 15:06
}
May 6, 2022 15:05
(~t)⌿(¯4×t<n)⌽⍵,⍤1 4⍴' '
May 6, 2022 15:05
 n←2|+\t
May 6, 2022 15:05
 t←3=+/∧\'`'=⍵
May 6, 2022 15:05
convert←{ ⍝ pandoc format to markdown format
May 6, 2022 15:04
I've come up with this solution for my conversion problem - written thus for exposition:
May 6, 2022 13:37
Iand I am nearly there now
May 6, 2022 13:37
All I want is to remove the backticks and add 4 spaces to the code lies between them. A simple problem, thank goodness.
May 6, 2022 13:28
I don't even have to do the ↑ in RickedyPs solution, as the data comes from a native file and I can just as easily get a matrix as a vector of vectors. And it's old skool - the way I'd have tackled it in the 80s.
May 6, 2022 13:15
Speed doesn't matter for this problem, but elegance does. blog.rareschool.com/2022/05/apl-and-python-go-head-to-head.html
May 6, 2022 13:13
That's what I started with, but a rank solution would be cleaner
May 6, 2022 13:09
I have a vector of character vectors, and I want a boolean to tell me which vectors start with three backticks. I can do it with each, but I can' t get rank to give me a simpler solution.
May 6, 2022 11:00
goodness, developing with ]link is a joy
May 6, 2022 09:30
@xpqz I have encountered the same problem in the past.
May 6, 2022 09:30
But today I have another problem. More details soon.
May 6, 2022 09:28
@Adám Thanks for offering to help with un-dinosauring the code in my APL book. I will take you up on that. I also mis-stated the target audience; I wrote it to help Raspberry Pi users to experiment with APL. Many will be school students but some will be hobbyists or teachers.
Apr 29, 2022 10:19
I'm not going to have time for ~6 mo. Since I am ~75, that might mean never. But I'll put it in the queue.
Apr 29, 2022 10:07
OK. I'll put it in the work queue. Sigh.
Apr 29, 2022 10:03
who have a Raspberry Pi
Apr 29, 2022 10:03
Beginners who are curious about the language, especially readers of school age