Skip to content
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

request for F# ligatures #217

Open
stweb opened this issue Jul 17, 2016 · 5 comments
Open

request for F# ligatures #217

stweb opened this issue Jul 17, 2016 · 5 comments

Comments

@stweb
Copy link

stweb commented Jul 17, 2016

Hi F# uses additional ligatures, would be cool if those could get added.
I tried to map them to TeX symbols on http://milde.users.sourceforge.net/LUCR/Math/mathpackages/stmaryrd-symbols.pdf

  • "Banana clip" (| ...|) = double round braces - Tex: \limg \rimg
  • Double square brackets [| ... |] - Tex: \llbracket \rrbracket
  • Annotations [< ... >] - Not sure how these could look
@krux02
Copy link

krux02 commented Jul 18, 2016

I would support your idea (I am not a contributor), but I am not an F# developer, neither do I think, the author of this font is an F# developer, so could you please give some code examples, where and how the symbols are used. Also what they mean would be nice.

I think these symbols are very suitable for ligatures.

@danieljsummers
Copy link

The (| ... |) "banana clips" are used to define an active pattern, where you can define a named condition, and reference it in a pattern match. (There are some examples at that link.) I don't fully understand that yet, though reading those examples, I think I'm close. :)

The [| ... |] denote the beginning and end of an array. F# uses the traditional array delimiters [ ... ] to define an immutable list instead. Given its immutability-first nature, this is usually what you want, but the array syntax is required when you need an array type, particularly for interop with the rest of the .NET framework.

Example:

let pieces = "break this  \n up|into little pieces"
               .Split([| ' '; '\n'; '|' |], StringSplitOptions.RemoveEmptyEntries)

(pieces would be a one-dimensional array with 6 elements, containing the words from the string)

[< and >] are used for attributes/annotations in code. As an example, in C# you'd explicitly mark that a class can be serialized by putting [Serializable] just above the class definition. In F#, you'd use [<Serializable>] instead.

Example:

[<Serializable>]
type ThisTypeCanBeSerialized() =
   ...properties, methods, and such...

[<AllowNullLiteral>]
type ThisTypeCanBeNull() =
  /// Auto-property that Newtonsoft.Json will ignore
  [<JsonIgnore>]
  member val IsNotSerializedByJsonDotNet = "" with get, set

+1 for these ligatures. I've got a separate issue (which I'm about to post), but I'm loving this font - it's like the noise disappears and the code emerges!

@stweb
Copy link
Author

stweb commented Jul 23, 2016

Thanks Daniel, there's also the double tick marks `` used to quote identifiers.

@baronfel
Copy link

For context, the double ticks are use to name identifiers with otherwise-invalid characters in them.

let````thing with spaces that I can now refer to as a single identifier````= 1

@davidtme
Copy link

Also empty arrays look odd:

let a = [||]

Losangelosgenetics pushed a commit to Losangelosgenetics/FiraCode that referenced this issue Mar 12, 2020
199: Update rack-test requirement from ~> 0.6 to ~> 1.1 r=bronzdoc a=dependabot[bot]

Updates the requirements on [rack-test](https://github.com/rack-test/rack-test) to permit the latest version.
<details>
<summary>Release notes</summary>

*Sourced from [rack-test's releases](https://github.com/rack-test/rack-test/releases).*

> ## v1.1.0
> ## 1.1.0 / 2018-07-21
> 
> * Breaking changes:
>   * None
> 
> * Minor enhancements / new functionality:
>   * [GitHub] Added configuration for Stale (Per Lundberg [tonsky#232](https://github-redirect.dependabot.com/rack-test/rack-test/issues/232))
>   * `follow_direct`: Include `rack.session.options` (Mark Edmondson [tonsky#233](https://github-redirect.dependabot.com/rack-test/rack-test/issues/233))
>   * [CI] Add simplecov (fatkodima [tonsky#227](https://github-redirect.dependabot.com/rack-test/rack-test/issues/227))
> 
> Bug fixes:
>   * Follow relative locations correctly. (Samuel Williams [tonsky#230](https://github-redirect.dependabot.com/rack-test/rack-test/issues/230))
</details>
<details>
<summary>Changelog</summary>

*Sourced from [rack-test's changelog](https://github.com/rack-test/rack-test/blob/master/History.md).*

> ## 1.1.0 / 2018-07-21
> 
> * Breaking changes:
>   * None
> 
> * Minor enhancements / new functionality:
>   * [GitHub] Added configuration for Stale (Per Lundberg [tonsky#232](https://github-redirect.dependabot.com/rack-test/rack-test/issues/232))
>   * follow_direct: Include rack.session.options (Mark Edmondson [tonsky#233](https://github-redirect.dependabot.com/rack-test/rack-test/issues/233))
>   * [CI] Add simplecov (fatkodima [tonsky#227](https://github-redirect.dependabot.com/rack-test/rack-test/issues/227))
> 
> Bug fixes:
>   * Follow relative locations correctly. (Samuel Williams [tonsky#230](https://github-redirect.dependabot.com/rack-test/rack-test/issues/230))
> 
> ## 1.0.0 / 2018-03-27
> 
> * Breaking changes:
>   * Always set CONTENT_TYPE for non-GET requests
>     (Per Lundberg [tonsky#223](https://github-redirect.dependabot.com/rack-test/rack-test/issues/223))
> 
> * Minor enhancements / bug fixes:
>   * Create tempfile using the basename without extension
>     (Edouard Chin [tonsky#201](https://github-redirect.dependabot.com/rack-test/rack-test/issues/201))
>   * Save `session` during `follow_redirect!`
>     (Alexander Popov [tonsky#218](https://github-redirect.dependabot.com/rack-test/rack-test/issues/218))
>   * Document how to use URL params with DELETE method
>     (Timur Platonov [tonsky#220](https://github-redirect.dependabot.com/rack-test/rack-test/issues/220))
> 
> ## 0.8.3 / 2018-02-27
> 
> * Bug fixes:
>   * Do not set Content-Type if params are explicitly set to nil
>     (Bartek Bułat [tonsky#212](https://github-redirect.dependabot.com/rack-test/rack-test/issues/212)). Fixes [tonsky#200](https://github-redirect.dependabot.com/rack-test/rack-test/issues/200).
>   * Fix `UploadedFile#new` regression
>     (Per Lundberg [tonsky#215](https://github-redirect.dependabot.com/rack-test/rack-test/issues/215))
> 
> * Minor enhancements
>   * [CI] Test against Ruby 2.5 (Nicolas Leger [tonsky#217](https://github-redirect.dependabot.com/rack-test/rack-test/issues/217))
> 
> ## 0.8.2 / 2017-11-21
> 
> * Bug fixes:
>   * Bugfix for `UploadedFile.new` unintended API breakage.
>     (Per Lundberg [tonsky#210](https://github-redirect.dependabot.com/rack-test/rack-test/issues/210))
> 
> ## 0.8.0 / 2017-11-20
> 
> * Known Issue
>   * In `UploadedFile.new`, when passing e.g. a `Pathname` object,
>     errors can be raised (eg. `ArgumentError: Missing original_filename
>     for IO`, or `NoMethodError: undefined method 'size'`) See [tonsky#207](https://github-redirect.dependabot.com/rack-test/rack-test/issues/207), [tonsky#209](https://github-redirect.dependabot.com/rack-test/rack-test/issues/209).
></table> ... (truncated)
</details>
<details>
<summary>Commits</summary>

- See full diff in [compare view](https://github.com/rack-test/rack-test/commits/v1.1.0)
</details>
<br />

Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `@dependabot rebase`.

---

**Note:** This repo was added to Dependabot recently, so you'll receive a maximum of 5 PRs for your first few update runs. Once an update run creates fewer than 5 PRs we'll remove that limit.

You can always request more updates by clicking `Bump now` in your [Dependabot dashboard](https://app.dependabot.com).

<details>
<summary>Dependabot commands and options</summary>
<br />

You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it
- `@dependabot merge` will merge this PR after your CI passes on it
- `@dependabot cancel merge` will cancel a previously requested merge
- `@dependabot reopen` will reopen this PR if it is closed
- `@dependabot ignore this [patch|minor|major] version` will close this PR and stop Dependabot creating any more for this minor/major version (unless you reopen the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
- `@dependabot use these labels` will set the current labels as the default for future PRs for this repo and language
- `@dependabot use these reviewers` will set the current reviewers as the default for future PRs for this repo and language
- `@dependabot use these assignees` will set the current assignees as the default for future PRs for this repo and language
- `@dependabot use this milestone` will set the current milestone as the default for future PRs for this repo and language
- `@dependabot badge me` will comment on this PR with code to add a "Dependabot enabled" badge to your readme

Additionally, you can set the following in your Dependabot [dashboard](https://app.dependabot.com):
- Update frequency (including time of day and day of week)
- Automerge options (never/patch/minor, and dev/runtime dependencies)
- Pull request limits (per update run and/or open at any time)
- Out-of-range updates (receive only lockfile updates, if desired)
- Security updates (receive only security updates, if desired)

Finally, you can contact us by mentioning @dependabot.

</details>

Co-authored-by: dependabot[bot] <support@dependabot.com>
Losangelosgenetics pushed a commit to Losangelosgenetics/FiraCode that referenced this issue Mar 12, 2020
217: gemspec: Allow Bundler 2 r=greysteil a=olleolleolle

This PR allows Bundler 2.0+ in the gemspec.

Reason: CI fails.

With this change, the CI's green again.

Co-authored-by: Olle Jonsson <olle.jonsson@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants