!TobkTZMOkZJCvcSvwq:matrix.org

APL

456 Members
Discussion about the APL language18 Servers

Load older messages


SenderMessageTime
27 Jan 2023
@dzaima:matrix.orgdzaima you can 0⌈⌈/x 21:11:13
@_discord_211730023848083456:t2bot.ioPhantasm#9282 makes perfectly sense thank you 21:12:17
@_discord_506589628418097152:t2bot.iobear8642#6022 ]box on -t=tree if you're not on tryapl 21:23:52
@_discord_506589628418097152:t2bot.iobear8642#6022 feel Adám mentioned idea of ⍛ on f to match on j 21:30:33
@_discord_506589628418097152:t2bot.iobear8642#6022 although that means we'll have to (re)move _ 21:31:17
@_discord_506589628418097152:t2bot.iobear8642#6022 * although that means we'll have to (re)move _ - who uses that though? 21:31:30
@_discord_671689100331319316:t2bot.ioBrian E#0926 isn't that already filed by ⍤? 22:01:47
@_discord_671689100331319316:t2bot.ioBrian E#0926 or is that only on my keyboard ? 22:02:14
@_discord_506589628418097152:t2bot.iobear8642#6022 ah, meant ∘ is on j so put ⍛ on f 22:06:53
@_discord_506589628418097152:t2bot.iobear8642#6022 j has ∘ and ⍤ on standard keyboard 22:07:21
@_discord_862741749276606524:t2bot.ioOmar 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
@_discord_968170383259873331:t2bot.ioawagga I like April a lot 22:26:07
@_discord_506589628418097152:t2bot.iobear8642#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
@_discord_862741749276606524:t2bot.ioOmar 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
@_discord_862741749276606524:t2bot.ioOmar 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
@_discord_506589628418097152:t2bot.iobear8642#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
@_discord_506589628418097152:t2bot.iobear8642#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
@_discord_862741749276606524:t2bot.ioOmar 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:coven.palaiologos.rocksrazetime
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
@_discord_862741749276606524:t2bot.ioOmar 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:coven.palaiologos.rocksrazetimei'm not entirely sure. it worked fine enough for my little experiments03:17:23
@razetime:coven.palaiologos.rocksrazetimeit's been a long time since i've used april03:17:33
@_discord_862741749276606524:t2bot.ioOmar 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:coven.palaiologos.rocksrazetimeme neither. am a common lisp scrub03:20:27
@_discord_862741749276606524:t2bot.ioOmar 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:matrix.orgfcn.1000is 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 apl03:31:55
@_discord_968170383259873331:t2bot.ioawagga exporting it as json, and 0 ⎕JSON will convert it to an APL array. Some things will be represented as objects 03:46:42
@_discord_968170383259873331:t2bot.ioawagga * exporting it as json, and 0 ⎕JSON will convert it to an APL array. Some things will be represented with objects 03:46:51
@_discord_968170383259873331:t2bot.ioawagga * 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
@_discord_968170383259873331:t2bot.ioawagga https://help.dyalog.com/latest/#Language/System%20Functions/json.htm 03:47:14

There are no newer messages yet.


Back to Room List