27 Jan 2023 |
dzaima | you can 0⌈⌈/x | 21:11:13 |
Phantasm#9282 | makes perfectly sense thank you | 21:12:17 |
bear8642#6022 | ]box on -t=tree if you're not on tryapl | 21:23:52 |
bear8642#6022 | feel Adám mentioned idea of ⍛ on f to match ∘ on j | 21:30:33 |
bear8642#6022 | although that means we'll have to (re)move _ | 21:31:17 |
bear8642#6022 | * although that means we'll have to (re)move _ - who uses that though? | 21:31:30 |
Brian E#0926 | isn't that already filed by ⍤? | 22:01:47 |
Brian E#0926 | or is that only on my keyboard ? | 22:02:14 |
bear8642#6022 | ah, meant ∘ is on j so put ⍛ on f | 22:06:53 |
bear8642#6022 | j has ∘ and ⍤ on standard keyboard | 22:07:21 |
Omar Antolín | I'm a little embarrased to ask this with Adám and other people from Dyalog reading, but what open source APLs do people like? I'd be interested in "modern" APLs, say, at least having dfns. I've been using april and liking it so far but am curious to hear about other options. | 22:21:04 |
awagga | I like April a lot | 22:26:07 |
bear8642#6022 | did instructions on april github just work installing it? Trying to have a go, but having trouble - sbcl says it's loaded yet (april (demo)) reports ("undefined function") | 23:31:52 |
Omar Antolín | I don't think I read the installation instructions, just saw it was in quicklisp, so I went (ql:quickload "april") , which did install it succesfully. Then I poked inside the april package and saw there was a macro april:april-f to which you can pass a string of APL code and it will compile it, execute it and print the result. | 23:39:32 |
Omar Antolín | I then made myself a a little standalone April REPL like so:
(ql:quickload "april")
(defun april-repl ()
(loop for line = (progn (princ " ") (finish-output) (read-line nil nil))
while line do
(lparallel:task-handler-bind
((error #'lparallel:invoke-transfer-error))
(handler-case (april:april-f line)
(error (c) (format t "~a" c))))
(terpri)))
(sb-ext:save-lisp-and-die #P"~/bin/april"
:toplevel #'april-repl
:executable t
:compression 9) | 23:40:05 |
bear8642#6022 | oh - probably missed the april: bit. I'm new to common lisp and it's systems, mainly sat in scheme as I've explored SICP and other lisp-y things | 23:51:27 |
bear8642#6022 | * oh - seems I'd missed the april: bit. I'm new to common lisp and it's systems, mainly sat in scheme as I've explored SICP and other lisp-y things | 23:52:10 |
Omar Antolín | You can also say (use-package :april) (after loading it) to bring the packages contexts into scope so you don't need the april: prefix anymore. | 23:58:30 |
28 Jan 2023 |
razetime | In reply to @_discord_862741749276606524:t2bot.io I then made myself a a little standalone April REPL like so:
(ql:quickload "april")
(defun april-repl ()
(loop for line = (progn (princ " ") (finish-output) (read-line nil nil))
while line do
(lparallel:task-handler-bind
((error #'lparallel:invoke-transfer-error))
(handler-case (april:april-f line)
(error (c) (format t "~a" c))))
(terpri)))
(sb-ext:save-lisp-and-die #P"~/bin/april"
:toplevel #'april-repl
:executable t
:compression 9)
here's something you might like: https://github.com/razetime/april-repl/blob/main/repl.lisp | 02:29:05 |
Omar Antolín | 😮 How did you get that to work without lparallel:invoke-transfer-error ? April is multithreaded and user code can cause an error that's not on the main thread. | 03:16:12 |
razetime | i'm not entirely sure. it worked fine enough for my little experiments | 03:17:23 |
razetime | it's been a long time since i've used april | 03:17:33 |
Omar Antolín | Maybe that error-on-another-thread business is actually fine if you run in a normal sbcl toplevel, maybe I only had trouble with it because I made a standalone executable. I don't actually know much about threading. | 03:19:32 |
razetime | me neither. am a common lisp scrub | 03:20:27 |
Omar Antolín | Your REPL definitely is much fancier than mine, thanks for sharing! I'll give it a go ---and possibly add the lparallel stuff if I run into the same problem again. | 03:20:55 |
fcn.1000 | is there a tool/lib in python that exports dataframes in an APL format? i guess i could export it to json and play around with the json in apl | 03:31:55 |
awagga | exporting it as json, and 0 ⎕JSON will convert it to an APL array. Some things will be represented as objects | 03:46:42 |
awagga | * exporting it as json, and 0 ⎕JSON will convert it to an APL array. Some things will be represented with objects | 03:46:51 |
awagga | * exporting it as json, and using 0 ⎕JSON will convert it to an APL array. Some things will be represented with objects | 03:46:57 |
awagga | https://help.dyalog.com/latest/#Language/System%20Functions/json.htm | 03:47:14 |