Git Product home page Git Product logo

bqn-mode's Introduction

bqn-mode

Synopsis

Emacs major mode for BQN programming language.

Extracted from the original BQN repository and independently maintained since approx. 2021.

Before that, bqn-mode was derived and heavily based on the venerable gnu-apl-mode.

Installing bqn-mode

From sources

After git clone this repository, you can just add the following snippet to you init.el file:

(add-to-list 'load-path "~/path/to/bqn-mode")
(require 'bqn-mode)

From MELPA

bqn-mode is available on MELPA.

  1. Configure your package-archives to include MELPA.
    • The EmacsWiki has a clean and comprehensive tutorial.
  2. You can now use the typical M-x list-packages interface to find and install bqn-mode.

Fonts

BQN uses a peculiar set of symbols, not always available on the default fonts of major operating systems. Nonetheless there are many fonts available around the Web. Here are some links:

Contact

This page itself :) Feel free to open issues and send pull requests via GitHub interface.

bqn-mode's People

Contributors

andersontorres avatar dlozeve avatar doyougnu avatar geoffhill avatar ilohmar avatar larstvei avatar leahneukirchen avatar ljos avatar mlochbaum avatar phikal avatar ska80 avatar sternenseemann avatar svmhdvn avatar

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

Watchers

 avatar

bqn-mode's Issues

Documentation, contribution and code style guidelines

We need some form of code style and contribution guidelines in general.

Edit 2022-11-07:

Some useful links

https://github.com/alphapapa/emacs-package-dev-handbook

https://github.com/bbatsov/emacs-lisp-style-guide

https://gnu.org/software/emacs/manual/html_node/elisp/Tips.html

Another good thing to do is study and reuse the code of GNU APL Mode

Edit 2022-11-20:

Take notes on guidelines for MELPA compliance

Edit 2023-02-14

I am interested in using conventional commits, but with my own twist: I don't like abbreviations as "feat", "chore" etc.

https://www.conventionalcommits.org/en/v1.0.0/

Include development tools

As explained in Cask Intro, it is a good addition to any professional Emacs project, being also useful for the issues #1 and #16.

There are also other options that I want to evaluate.

Pull Request for QoL changes

Hello All,

I've just submitted a PR for a line of commits I'd applied to my local branch recently. I believe they improve the usability of bqn-mode greatly, and would be happy to discuss any required changes to get them merged.

Here is the Pull Request: #7

Include some sort of testing framework

Sometimes bugs are reported and (hopefully) fixed. However there is no warranty that they will not be back again in the future.

One of the hurdles to be investigated is how to handle with mostly visual things, like font lock.

Implement calver

This is the best versioning system for bqn-mode, given that it has no clear notion of breaking vs non-breaking change.

Not all insert function are assigned if bqn-mode-map-prefix start with C-

I had to change from the default S- because it was conflicting with gnome on Ubuntu. I've tried a few different prefixes but noticed that every time it start with C- some insert function would exist but have no keybinding:
list of keybinds

I have no idea why it would do something like that

Like i said i'm on ubuntu, With emacs version 28.2. I cloned this repo yesterday on the main branch

[Bug] bqn-mode interprets '#' as a comment

It seems that the font face/s used in bqn-mode interprets '#' as a comment instead of a character. Tested on 0a51e09.

Code examples:

  • '#'= (⊢|·1‿3⊸ר↕)∘(¯1⊸⊑∘≢)⊸⊑
  • '#' = '.'
  • '#' = '#'

image

Syntax table entries for · and @ are causing incorrect highlighting

Right now, · and @ are marked as symbols (using "_") in syntax table. That feels strange and also causes misleading highlighting in cases like ·Foo or Foo@ (they are valid syntactically but highlighted with error face). It also causes some functions (e.g. isearch-forward-symbol-at-point) to treat these characters as parts of the identifier.

I think that they should be marked as punctuations (using ".").

Error: Can’t activate input method ‘BQN-Z’

If your first interaction with bqn-mode in a given Emacs session is to open a REPL via bqn-comint-run-process, you get the error message in the title. A simple fix is to require bqn-key-prefix in bqn-comint.el.

(The fact that bqn-comint-run-process has autoload suggests one should be able to run it first thing.)

How to get live process running and evaluate code?

I'm trying to get Emacs set up with BQN. I've installed bqn-mode, and the color syntax and backslash prefixes used to input BQN unicode notation are working fine. But how to evaluate code? After creating a file example1.bqn with some simple expressions in it and making sure we're in bqn-mode, I try bqn-comint-send-buffer, bqn-comint-send-region, bqn-comint-send-buffer etc. only to get:

Buffer ’*BQN*’ exists but has no live process

How to I get a "live process" running? Browsing through the functions in bqn-mode.el, it's not clear to me.

New repository up and running

Copy-paste https://github.com/AndersonTorres/bqn-mode/issues/9

https://github.com/AndersonTorres is my "personal badge" on Github.
Usually I employ it to host personal projects and clones of other projects I am working on.

In this sense, bqn-mode is not a personal project of mine, but a collaborative one. It is better to put it on an impersonal umbrella.

A short time ago I created Museoa, a Github organization dedicated to save some lost source code around the internet, so that anyone can use it to mirror and contribute.

That being said, I will mirror bqn-mode to Museoa and treat https://github.com/AndersonTorres/bqn-mode as a fork, on an equal footing of all the other (currently 4) forks.


PING

@dlozeve
@doyougnu
@leahneukirchen
@sternenseemann

Please update your upstream remotes to https://github.com/museoa/bqn-mode

@richardwesthaver
@fishbacon
@doamatto
@Roya1jr
@luksamuk
@razetime

Please update your stars and bookmarks!

Include useful github actions

bqn-mode is a somewhat simple package, in the sense it is just a set of files to be read by Emacs. In this sense it works very well.

However, in order to include it in MELPA database, there are many rules to follow. We need some way to automatize this.

Implementing code evaluation

It's nice to be able to evaluate code within a source file while seeing the results appear without visiting the comint buffer. I've implemented this, and could push it as a feature with some further tidying up.

If there's interest for it, I could also try to add evaluation results via an overlay in the buffer itself, so that the evaluation results would appear next to the code. It's a slight UI improvement to moving your eyes to the echo area at the bottom of the buffer.

required font?

Hey guys, looks cool but some symbols don't seem to be recognized on my machine:

image
Those are my current fonts:

(font-spec :family "Fira Code"   :size 16) ;;regular
(font-spec :family "Victor Mono" :size 12) ;; unicode

Should I use some other font?

org-babel support

Should we add org-babel support within this repository? I suppose eventually you'd want to add it to org-mode itself, but it might be a good idea to include it here as a first go?

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.