Coder Social home page Coder Social logo

gnu-apl-mode's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

gnu-apl-mode's Issues

Adapting spanish keyboard

Hi, thanks for this great package for working with gnu-apl. I'm not sure if this is a bug or I do not understand the setup

I have a spanish keyboard (MAC OSX)

apple_spanish

So I tried to map that two variables:

(setf gnu-apl-keymap-template
"╔════╦════╦════╦════╦════╦════╦════╦════╦════╦════╦════╦════╦════╦══════════╗
║ ª∇ ║ !∇ ║ \"∇ ║ ·∇ ║ $∇ ║ %∇ ║ &∇ ║ /∇ ║ (∇ ║ )∇ ║ =∇ ║ ?∇ ║ ¿∇ ║          ║
║ º∇ ║ 1∇ ║ 2∇ ║ 3∇ ║ 4∇ ║ 5∇ ║ 6∇ ║ 7∇ ║ 8∇ ║ 9∇ ║ 0∇ ║ '∇ ║ ¡∇ ║ BACKSP   ║
╠════╩══╦═╩══╦═╩══╦═╩══╦═╩══╦═╩══╦═╩══╦═╩══╦═╩══╦═╩══╦═╩══╦═╩══╦═╩══╦═══════╣
║       ║ Q∇ ║ W∇ ║ E∇ ║ R∇ ║ T∇ ║ Y∇ ║ U∇ ║ I∇ ║ O∇ ║ P∇ ║ ^∇ ║ *∇ ║       ║
║  TAB  ║ q∇ ║ w∇ ║ e∇ ║ r∇ ║ t∇ ║ y∇ ║ u∇ ║ i∇ ║ o∇ ║ p∇ ║ `∇ ║ +∇ ║    R  ║
╠═══════╩═╦══╩═╦══╩═╦══╩═╦══╩═╦══╩═╦══╩═╦══╩═╦══╩═╦══╩═╦══╩═╦══╩═╦══╩═╗  E  ║
║ (CAPS   ║ A∇ ║ S∇ ║ D∇ ║ F∇ ║ G∇ ║ H∇ ║ J∇ ║ K∇ ║ L∇ ║ Ñ∇ ║ ¨∇ ║ Ç∇ ║  T  ║
║  LOCK)  ║ a∇ ║ s∇ ║ d∇ ║ f∇ ║ g∇ ║ h∇ ║ j∇ ║ k∇ ║ l∇ ║ ñ∇ ║ ´∇ ║ ç∇ ║     ║
╠═══════╦═╩═══╦╩═══╦╩═══╦╩═══╦╩═══╦╩═══╦╩═══╦╩═══╦╩═══╦╩═══╦╩═══╦╩════╩═════╣
║       ║ >∇  ║ Z∇ ║ X∇ ║ C∇ ║ V∇ ║ B∇ ║ N∇ ║ M∇ ║ ;∇ ║ :∇ ║ _∇ ║           ║
║ SHIFT ║ <∇  ║ z∇ ║ x∇ ║ c∇ ║ v∇ ║ b∇ ║ n∇ ║ m∇ ║ ,∇ ║ .∇ ║ -∇ ║  SHIFT    ║
╚═══════╩═════╩════╩════╩════╩════╩════╩════╩════╩════╩════╩════╩═══════════╝"
)

and

(setf gnu-apl--symbols
'(("diamond" "◊" "<")
 ("diaeresis" "¨" "1")
 ("i-beam" "⌶" "!")
 ("macron" "¯" "2")
 ("del-tilde" "⍫" "\"")
 ("less-than" "<" "3")
 ("del-stile" "⍒" "·")
 ("less-than-or-equal-to" "≤" "4")
 ("delta-stile" "⍋" "$")
 ("equals" "=" "5")
 ("circle-stile" "⌽" "%")
 ("greater-than-or-equal-to" "≥" "6")
 ("circle-backslash" "⍉" "&")
 ("greater-than" ">" "7")
 ("circled-minus" "⊖" "/")
 ("not-equal-to" "≠" "8")
 ("circle-star" "⍟" "(")
 ("logical-or" "∨" "9")
 ("down-caret-tilde" "⍱" ")")
 ("logical-and" "∧" "0")
 ("up-caret-tilde" "⍲" "=")
 ("multiplication-sign" "×" "'")
 ("exclamation-mark" "!" "?")
 ("division-sign" "÷" "¡")
 ("quad-divide" "⌹" "¿")
 ("question-mark" "?" "q")
 ("omega" "⍵" "w")
 ("omega-underbar" "⍹" "W")
 ("epsilon" "∊" "e")
 ("epsilon-underbar" "⍷" "E")
 ("rho" "⍴" "r")
 ("tilde" "∼" "t")
 ("tilde-diaeresis" "⍨" "T")
 ("uparrow" "↑" "y")
 ("yen-sign" "¥" "Y")
 ("downarrow" "↓" "u")
 ("iota" "⍳" "i")
 ("iota-underbar" "⍸" "I")
 ("circle" "○" "o")
 ("circle-diaeresis" "⍥" "O")
 ("star-operator" "⋆" "p")
 ("star-diaeresis" "⍣" "P")
 ("leftarrow" "←" "`")
 ("quote-quad" "⍞" "^")
 ("rightarrow" "→" "*")
 ("zilde" "⍬" "+")
 ("right-tack" "⊢" "ç")
 ("left-tack" "⊣" "Ç")
 ("alpha" "⍺" "a")
 ("alpha-underbar" "⍶" "A")
 ("left-ceiling" "⌈" "s")
 ("left-floor" "⌊" "d")
 ("underscore" "_" "f")
 ("del-tilde" "⍫" "F")
 ("nabla" "∇" "g")
 ("increment" "∆" "h")
 ("delta-underbar" "⍙" "H")
 ("ring-operator" "∘" "j")
 ("jot-diaeresis" "⍤" "J")
 ("apostrophe" "'" "k")
 ("quad-diamond" "⌺" "K")
 ("quad" "⎕" "l")
 ("squish-quad" "⌷" "L")
 ("down-tack-jot" "⍎" "ñ")
 ("identical-to" "≡" "Ñ")
 ("up-tack-jot" "⍕" "´")
 ("not-identical-to" "≢" "¨")
 ("subset-of" "⊂" "z")
 ("superset-of" "⊃" "x")
 ("greek-letter-chi" "χ" "X")
 ("intersection" "∩" "c")
 ("left-shoe-stile" "⍧" "C")
 ("union" "∪" "v")
 ("up-tack" "⊥" "b")
 ("pound-sign" "£" "B")
 ("down-tack" "⊤" "n")
 ("divides" "|" "m")
 ("shoe-jot" "⍝" ",")
 ("comma-bar" "⍪" ";")
 ("backslash-bar" "⍀" ":")
 ("slash-bar" "⌿" "-")
 ("quad-colon" "⍠" "_")
 ("pi" "π" )
 ("root" "√")
 ("inverted-exclamation-mark" "¡")
 ("quad-backslash" "⍂" )
 ("inverted-question-mark" "¿")))

That can be usefull for spanish keyboards too.

But when I tried to work with gnu-apl insert mode it doesn't work well for spanish only keys
Ñ,Ç<>, and ºª

I should change the gnua apl insert

it works well for other similar keys betwween spanish and english keyboads but for this different letters I do not get anything.
Also when I tap . the spanish suymbols do not appair,

Captura de pantalla 2020-03-09 a las 12 26 58

I'm using this


GNU Emacs 28.0.50 (build 2, x86_64-apple-darwin19.3.0, NS appkit-1894.30 Version 10.15.3 (Build 19D76))
 of 2020-02-17

I'm not sure where to continue. the reason seems to use quail UTF-8, maybe is this:

https://emacs.stackexchange.com/questions/38907/quail-rules-utf8-behaviour

Linux Mint Issues

Hello,
I recently downloaded gnu-apl-mode to emacs. When I try to do s-l a Cinnamon Debugger screen pops up, when I do s-e I get my file manager.
It would be nice if you included a way to change the APL key.
Thanks

Can't change/edit functions after having saved them about 2-4 times

hi Elias, hi APL-folks,

first let me thank for this sexy piece of software! I am new to the
APL-world, but really enjoy wraping my mind around these wonderful
symbols! :)

I am running current gnu-apl (svn1242) with current gnu-apl-mode
(20200108.1633) under current GNU/Linux Emacs (from git) and MacOSX
Emacs (26.3 from brew). Tried also with emacs -Q, having only
loaded gnu-apl-mode. Both versions/platform show the same error:

  • having defined a function (f.e. with C-c C-f) I leave successfully
    the function editor. Function works as expected. All fine.
  • reopening the function 2 or 4 times, doing some editing, f.e. adding
    comments, etc.
  • BUT regularly, after 2 to 3 or 4 edits, I get (for the unchanged
    function, saved successfully before) "Error on line 1: Error parsing
    expression", being unable to proceed. Any editing, changing the
    function, no effect, still the same error.
  • I have to close (C-x C-k) the editing buffer.
  • Having a look at the function with []CR 'functionname' shows me,
    that nothing as been saved.
  • Trying to )erase the function results in 'NOT ERASED: functionname'.

Working out of the plain terminal with gnu-apl, editing functions in
line-editing, multiple redefining functions, etc - works fine.

Thanks for any help or hint!

br okflo

Cannot load workspaces.

Hangs when trying to )load a workspace saved via )save. Works in raw GNU APL, and for scripts saved via )dump.

Following head, libemacs.so rebuilt after update, GNU APL r251, Emacs 24.3.50, Kubuntu 12.04 LTS.

Other backends?

Is where a possibility to add other backend, for example Dyalog APL?

Symbol's definition is void: parse-integer

In Emacs 24.3.50, following head (SHA: 6b49f2d at the time of writing, but probably introduced quite a bit earlier), after invoking gnu-apl:

Debugger entered--Lisp error: (void-function parse-integer)
  (parse-integer addr)
  (open-network-stream "*gnu-apl-connection*" nil "localhost" (parse-integer addr) :type (quote plain) :return-list nil :end-of-command "\n")
  (cond ((string= connect-mode "tcp") (open-network-stream "*gnu-apl-connection*" nil "localhost" (parse-integer addr) :type (quote plain) :return-list nil :end-of-command "\n")) (t (error "Unexpected connect mode: %s" connect-mode)))
  gnu-apl--connect-to-remote("tcp" "7293")
[…]

Fix:

Use string-to-number:

diff --git a/gnu-apl-network.el b/gnu-apl-network.el
index a20bb64..f366232 100644
--- a/gnu-apl-network.el
+++ b/gnu-apl-network.el
@@ -4,7 +4,7 @@

 (defun gnu-apl--connect-to-remote (connect-mode addr)
   (cond ((string= connect-mode "tcp")
-         (open-network-stream "*gnu-apl-connection*" nil "localhost" (parse-integer addr)
+         (open-network-stream "*gnu-apl-connection*" nil "localhost" (string-to-number addr)
                               :type 'plain
                               :return-list nil
                               :end-of-command "\n"))

Bug/inconsistency: M-. to edit function not tracked to the source files

Right now M-. allows to jump/edit the function which is defined in some source file.
However if the function just has been created in the interpreter session it is impossible to edit it using M-.from the interpreter session.
One can type C-c C-f and type a function name to edit it.
It could be great to point to the function and type M-. as well in the interpreter session to edit functions instead of manually type their name with C-c C-f.

Ignores keybinding conventions

By binding C-c f, C-c k, C-c s, and C-c v, the keybinding conventions are ignored.

Cf. M-: (info "(elisp) Key Binding Conventions") RET:

* Don't define `C-c LETTER' as a key in Lisp programs.  Sequences
  consisting of `C-c' and a letter (either upper or lower case) are
  reserved for users; they are the *only* sequences reserved for
  users, so do not block them.

Please consider using different keybindings.

Also, thanks for your work, and keep it up! GNU APL without a nice Emacs mode would be much less fun.

cl-defun undefined

Changing cl-defun to defun* in gnu-apl-util.el seems to fix this. Probably worth investigating.

No "apl-z" by C-\

M-x gnu-apl
C-h v default-input-method

default-input-method is a variable defined in ‘mule-cmds.el’.

Its value is "german-postfix"
Original value was nil

Default input method for multilingual text (a string).
This is the input method activated automatically by the command
‘toggle-input-method’ (C-).

You can customize this variable.
Probably introduced at or before Emacs version 21.1.

[back]

M-x cu-var default-input-method

Hide Default Input Method: Choice: Value Menu String: german-postfix
State : CHANGED outside Customize.
Default input method for multilingual text (a string). Hide
This is the input method activated automatically by the command
‘toggle-input-method’ (C-).
Groups: Mule
See also Manual.

Shouldn’t we expect "apl-z"? I’m not setting default-input-method anywhere in my startup files. Perhaps what is said in chapter 23.2 of the Emacs manual applies. I’m running Emacs on Ubuntu 22.04.

GNU Emacs 29.0.50 (build 1, x86_64-pc-linux-gnu, GTK+ Version 3.24.33, cairo version 1.16.0) of 2022-10-26
gnu-apl-mode-20220404.341

Any help is much appreciated!

Question : multiple inferior APL buffers ?

More a question than an issue : is there currently a way to open multiple APL sessions in the same emacs instance ?

  • if so, how ?
  • if not, what needs to be changed to be able to create this possibility ?

Background : I'd like to implement an ob-gnu-apl package , ideally using gnu-apl-mode, which is excellent, and supporting multiple sessions (useful for, e. g., pedagogical reasons).

Advice ?

Will not run any hooks on startup

In an attempt to disable smartparens in GNUAPL

(defun smartparens-off ()
  (interactive)
  (smartparens-mode 0))
(add-hook 'gnu-apl-mode-hook 'smartparens-off)

But still it is enabled! I can turn it off by evaluating it outside of a hook (smartparens-off).
Also try (add-hook 'gnu-apl-mode-hook 'fundamental-mode) and watch it not work on GNU Emacs 27.0.50

Error using )-commands in edit function

When editing interactive function, it is not possible to close/save function buffer with Ctrl-c Ctrl-c when the function contains build-in function calls like

)HOST 'ls'

The error is
Error on line 41: Error parsing expression

Check for buffer ending with prompt

For whatever reason there is an extra newline on input to the interpreter:

With this example

⎕ ← ⊂data ← (1 2 3 4) (2 5 8 6) (8 6 2 3) (8 7 6 1)
data
2 4⍴⍳8 

calling gnu-apl-interactive-send-line or gnu-apl-interactive-send-region produces this:

      ╔═══════════════════════════════════════╗
║┏→━━━━━━┓ ┏→━━━━━━┓ ┏→━━━━━━┓ ┏→━━━━━━┓║
║┃1 2 3 4┃ ┃2 5 8 6┃ ┃8 6 2 3┃ ┃8 7 6 1┃║
║┗━━━━━━━┛ ┗━━━━━━━┛ ┗━━━━━━━┛ ┗━━━━━━━┛║
╚═══════════════════════════════════════╝
      ╔═══════╗
║1 2 3 4║
║5 6 7 8║
╚═══════╝

I believe the output should not have a tab character on the first line, like so:

╔═══════════════════════════════════════╗
║┏→━━━━━━┓ ┏→━━━━━━┓ ┏→━━━━━━┓ ┏→━━━━━━┓║
║┃1 2 3 4┃ ┃2 5 8 6┃ ┃8 6 2 3┃ ┃8 7 6 1┃║
║┗━━━━━━━┛ ┗━━━━━━━┛ ┗━━━━━━━┛ ┗━━━━━━━┛║
╚═══════════════════════════════════════╝
╔═══════╗
║1 2 3 4║
║5 6 7 8║
╚═══════╝

Originally posted by @doyougnu in #40 (comment)

See: #40 (comment)

Current buffer has no process

I'm in the gnu-apl-mode interactive buffer. Typing anything and pressing RET displays "Current buffer has no process".

What does it mean and how do i fix it?

Could not find library libemacs/possible mistake linking shared library

With emacs 26.1 on startup of gnu-apl I get the startup tips:

Could not find shared library 'libemacs'
The following directories and file names were tried:
file /usr/local/lib/apl/libemacs.so (No such file or directory)
file /usr/local/lib/apl/libemacs.dylib (No such file or directory)
file /usr/local/lib/apl/libemacs (No such file or directory)
directory /usr/lib/apl
file ./libemacs.so (No such file or directory)
file ./libemacs.dylib (No such file or directory)
file ./libemacs (No such file or directory)
file ./native/libemacs.so (No such file or directory)
file ./native/libemacs.dylib (No such file or directory)
file ./native/libemacs (No such file or directory)
directory ./emacs_mode

I can still execute APL in the window, but can't run any emacs keybindings for gnu-apl without "Symbol's value as variable is void: gnu-apl--connection," coming up in the minibuffer, and nothing happening.

I suspect I installed the shared modules wrong.

Error message on startup: "Illegal : in immediate execution+"

From .emacs-custom:

'(gnu-apl-flash-on-send t)
'(gnu-apl-show-apl-welcome t)
'(gnu-apl-show-keymap-on-startup t)

Config:

GNU Emacs 29.0.50 (build 1, x86_64-pc-linux-gnu, GTK+ Version 3.24.33, cairo version 1.16.0) of 2022-10-26
gnu-apl-mode-20220404.341

Thanks!

Clobbering of user-reserved keybindings

GNU APL Mode adds a keybinding for C-c r:

(define-key map (kbd "C-c r") 'gnu-apl-interactive-send-region)

This is contrary to Emacs conventions:

Don’t define C-c letter as a key in Lisp programs. Sequences consisting of C-c and a letter (either upper or lower case) are reserved for users; they are the only sequences reserved for users, so do not block them.

https://www.gnu.org/software/emacs/manual/html_node/elisp/Key-Binding-Conventions.html

concat problem

I get the following error message trying to run gnu-apl-mode:

Wrong type argument: integer-or-marker-p, (concat prefix s)

FR: Make modifier key configurable

First of all, thanks for creating this. I'm new to APL and this is so much better then typing in unicode hex codes into urxvt... :)

I use a tiling window manager and Super is dedicated to it. That fact is stored more deeply in my muscle memory than most generic human motor skills. I switched gnu-apl-mode
to employ the unused Hyper key but this required editing the code and recompiling and will get clobbered next time you push an update to MELPA.

Would you please make the hotkey configurable via a customization option?

Split `gnu-apl-input-mode.el` for use with other interpreters ?

Dear Elias,

The APL-Z input method is exceedingly useful to APL users whose keyboard des not have (and cannot have) a Super key (case in point : my laptop ;-)). But it is currently wed to gnu-apl-mode, hence the Gnu APL interpreter.

I just tested that, in a fresh emacs session, (load "~/.emacs.d/elpa/gnu-apl-mode-20220404.341/gnu-apl-input.el") is enough to be able to successfully start the APL-Z input mode in a fresh emacs-jupyter REPL running a Dyalog APL kernel.

This suggests that gnu-apl-input.el (with its companion file gnu-apl-symbols.el and possibly the relevant part of gnu-apl-documentation providing gnu-apl-show-keyboard) could be split off in a package (say, gnu-apl-input-mode) that gnu-apl-mode could require, but that could be used by the users of ofther interpreters. (Case in point : emacs-jupyter allows org-mode users to instert "live" source blocks ; which was my point actually...).

What do you think ?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.