-
Notifications
You must be signed in to change notification settings - Fork 3
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Highlight the name of a defined function/operator #10
Comments
... still. Any idea if/when it might come back up? |
I'm afraid not. There's an issue filled upstream where you can subscribe for updates: github-linguist/linguist#4168 Until then, a workaround might be to install Atom, It should be enough to tide you over. =) |
This seems to be working for niladic and dyadic functions, but not monadic functions. For example: ∇ onIdle
:Access Public Overridable
⍝ Idle time handler - called when the server has gone idle for a period of time
∇
∇ Error req
:Access Public Overridable
⍝ Handle trapped errors
req.Response.HTML←'<font face="APL385 Unicode" color="red">',(⊃,/⎕DM,¨⊂'<br/>'),'</font>'
req.Fail 500 ⍝ Internal Server Error
1 Log ⎕DM
∇
∇ level Log msg
:Access Public overridable
⍝ Logs server messages
⍝ levels implemented in MildServer are:
⍝ 1-error/important, 2-warning, 4-informational, 8-transaction (GET/POST)
:If Config.LogMessageLevel bit level ⍝ if set to display this level of message
⎕←msg ⍝ display it
:EndIf
∇ ... |
Tip: You can get syntax highlighted code-blocks by typing the name of the language after the first three backticks: ```apl
∇ onIdle
:Access Public Overridable
∇
``` But yeah, I see what you mean. 🤔 I'll look into it... |
One of my least favourite things about the TextMate system is when you screw up, it accepts it silently without even hinting at what you may have done wrong. It offers you no guidance, or clues, just a stopwatch to see how long an obvious mistake like this would take me to pick up on.... @@ apl @@@
12: {name: "keyword.operator.assignment.apl"}
-13: {name: "entity.function.name.apl", captures: {0: patterns: [include: "#embolden"]}}
+13: {name: "entity.function.name.apl", patterns: [include: "#embolden"]} It's fortunate that you caught me at the right time, BTW. I'm scabbing somebody else's MacBook from them so I can get shitloads of Atom-related stuff that's gathered up since my regular one died. :( |
Could you take a look at the highlighting of these 95 syntactically valid ways of defining a function or operator called ∇f
∇
∇f y
∇
∇f (y z)
∇
∇(p f) y
∇
∇(p f) (y z)
∇
∇(p f q) y
∇
∇(p f q) (y z)
∇
∇x f y
∇
∇x f (y z)
∇
∇x (p f) y
∇
∇x (p f) (y z)
∇
∇x (p f q) y
∇
∇x (p f q) (y z)
∇
∇{x} f y
∇
∇{x} f (y z)
∇
∇{x} (p f) y
∇
∇{x} (p f) (y z)
∇
∇{x} (p f q) y
∇
∇{x} (p f q) (y z)
∇
∇r←f
∇
∇r←f y
∇
∇r←f (y z)
∇
∇r←(p f) y
∇
∇r←(p f) (y z)
∇
∇r←(p f q) y
∇
∇r←(p f q) (y z)
∇
∇r←x f y
∇
∇r←x f (y z)
∇
∇r←x (p f) y
∇
∇r←x (p f) (y z)
∇
∇r←x (p f q) y
∇
∇r←x (p f q) (y z)
∇
∇r←{x} f y
∇
∇r←{x} f (y z)
∇
∇r←{x} (p f) y
∇
∇r←{x} (p f) (y z)
∇
∇r←{x} (p f q) y
∇
∇r←{x} (p f q) (y z)
∇
∇(r s)←f
∇
∇(r s)←f y
∇
∇(r s)←f (y z)
∇
∇(r s)←(p f) y
∇
∇(r s)←(p f) (y z)
∇
∇(r s)←(p f q) y
∇
∇(r s)←(p f q) (y z)
∇
∇(r s)←x f y
∇
∇(r s)←x f (y z)
∇
∇(r s)←x (p f) y
∇
∇(r s)←x (p f) (y z)
∇
∇(r s)←x (p f q) y
∇
∇(r s)←x (p f q) (y z)
∇
∇(r s)←{x} f y
∇
∇(r s)←{x} f (y z)
∇
∇(r s)←{x} (p f) y
∇
∇(r s)←{x} (p f) (y z)
∇
∇(r s)←{x} (p f q) y
∇
∇(r s)←{x} (p f q) (y z)
∇
∇{r}←f
∇
∇{r}←f y
∇
∇{r}←f (y z)
∇
∇{r}←(p f) y
∇
∇{r}←(p f) (y z)
∇
∇{r}←(p f q) y
∇
∇{r}←(p f q) (y z)
∇
∇{r}←x f y
∇
∇{r}←x f (y z)
∇
∇{r}←x (p f) y
∇
∇{r}←x (p f) (y z)
∇
∇{r}←x (p f q) y
∇
∇{r}←x (p f q) (y z)
∇
∇{r}←{x} f y
∇
∇{r}←{x} f (y z)
∇
∇{r}←{x} (p f) y
∇
∇{r}←{x} (p f) (y z)
∇
∇{r}←{x} (p f q) y
∇
∇{r}←{x} (p f q) (y z)
∇
∇{(r s)}←f
∇
∇{(r s)}←f y
∇
∇{(r s)}←f (y z)
∇
∇{(r s)}←(p f) y
∇
∇{(r s)}←(p f) (y z)
∇
∇{(r s)}←(p f q) y
∇
∇{(r s)}←(p f q) (y z)
∇
∇{(r s)}←x f y
∇
∇{(r s)}←x f (y z)
∇
∇{(r s)}←x (p f) y
∇
∇{(r s)}←x (p f) (y z)
∇
∇{(r s)}←x (p f q) y
∇
∇{(r s)}←x (p f q) (y z)
∇
∇{(r s)}←{x} f y
∇
∇{(r s)}←{x} f (y z)
∇
∇{(r s)}←{x} (p f) y
∇
∇{(r s)}←{x} (p f) (y z)
∇
∇{(r s)}←{x} (p f q) y
∇
∇{(r s)}←{x} (p f q) (y z)
∇ When I try this in Lightshow, forms like |
@jayfoad It might be easier if you download Atom and install this package for yourself. Atom and GitHub/Lightshow all use the same highlighting engine, and there's even an Atom package that replicates the same colours used on GitHub (which is what I used while Lightshow was offline). I know IME is a barrier, which is why I added support for typing APL using ASCII-fied mnemonics. For example, typing |
Now then... having inspected those expressions you've given me, I can conclude this could be a Lightshow bug, or some flaky handling of newlines on their end. 😥 Because what I'm seeing in Atom (which has until recently been exactly the same as what I've seen on GitHub) differs to what we're now seeing, well, on GitHub: GitHub: ∇(r s)←f
∇
∇(r s)←f y
∇ |
Is there an easy way to try out your latest commits before they've been released?
Not for me. X keyboard layouts for APL have been included in the Linux distros for many years now. |
Yes. Under your $ cd ~/.atom/packages;
$ rm -rf language-apl;
$ git clone [email protected]:Alhadis/language-apl.git That's really it. Atom loads every immediate folder under |
I guess someone has fixed something. It all looks good in Lightshow now. Thanks! |
You can thank @kivikakk for her hard work today getting it back online. 😉 And good to know! Let me know if you spot any more issues. |
When looking at the header line of a defined function or operator, it's really useful to the have the name of the function/operator highlighted. Currently it's the same colour as the result, arguments, operands and locals (example).
Currently we use scopes like entity.function.arguments.left.optional.apl and entity.function.local-variables.apl, which all end up coloured like entity.
Perhaps it would be better to use entity.function.name.apl only for the name of the function/operator, and for all other names on the header line use variable.other.apl just like we do when those names are mentioned in the body of the function.
The text was updated successfully, but these errors were encountered: