Code Monkey home page Code Monkey logo

satysfi-base's Issues

Release version 1.0 on 15 Dec

the date when I am assigned to the SATySFi advent calendar 2019.

  • rename satysfi-lib to satysfi-base
  • update README
  • add a package file for satyrographos
  • add LICENSE
  • publish on satyrographos-repo

Get rid of JS dependency

Currently, this repo has two dependencies on JS(node/yarn)

  • unit tests (being replaced with #142)
  • scripts

Considering their verboseness, we want to get rid of JS dependency and find an alternative that is more concise.

TODO

  • Kill dependabot -> #300
  • migrate unit tests -> #142
  • migrate scripts

How to become a contributor

Please send a message saying "let me join!" in this thread if you wish to become a contributor of this project. Note that, however, being a contributor of this repository does not mean you are fully able to push arbitrary changes to master. Usually we follow the following workflow to make changes in the code in master:

  • create a pull request
  • get it reviewed from a contributor who knows well the code base you are changing
  • once your reviewer approved your pull request, merge it to master

That is, even a non contributor can send us pull requests and even a contributor has to create a pull request whenever, so becoming a contributor is not very important if you just want to send us changes. Instead contributors are assigned reviewing tasks and responsible for checking the given patch works fine.

Create LaTeXiT-sh class file

It would be useful to have a class file such that

  • it takes a single block-boxes
  • and creates a document with single page where page size fits the given block-boxes

We want to use such a class file when we create a figure with SATySFi which will be embedded in another document ofLaTeX or Word.

Block doesn't export `frame-breakable`

I found the Block module in block.satyh has the following definition

  let frame-breakable pads deco f ctx =
    block-frame-breakable ctx pads deco f

while it doesn't have frame-breakable in its signature.

Change the default value of `fill-tail` in `Block.of-inline` to `true`

According to the document,

%% If [fill-tail] is true, [Inline.fil] is added at the end of the return value.

If fill-tail is false, there may be no Inline.fil in the inline text and sometimes line-break fails to break it into lines. It seems more user-friendly to set fill-tail as true by default because that's what we expect in most of the cases.

Release strategy

Aside from #55 and #96, I would appreciate if you could release a new minor version instantly when every new feature has been added unless it's considered conflicting with existing part. How do you think @nyuichi ?

Try migrating unit tests to satysfi-test

Background

At present, we have unit tests and regression tests to keep quality. We write unit tests by writing all test results to output and compare them with snapshots because we don't have unit testing frameworks for SATySFi.

I published the very first version of satysfi-test. I consider we can try it out, and replace all unit tests to ones with satysfi-test if it works well.

Goal

We should have better unit tests using satysfi-test.

Add dependency on fonts-dejavu

typeset/code2.satyh uses DejaVuSansMono. The trouble is that the vanilla SATySFi doesn't provide the font and users need to install it manually. We can avoid this by adding SATySFi-fonts-dejavu as satyrographos dependency.

RegExp.exec is very slow for some inputs

RegExp.exec is very slow for the following example.

@require: stdja
@require: base/regexp

let longString = ` I do not know why but it seems code2 is slow if it contains a long line.
wakegawakaranaiyo wakegawakaranaiyo wakegawakaranaiyo wakegawakaranaiyo
wakegawakaranaiyo wakegawakaranaiyo wakegawakaranaiyo wakegawakaranaiyo
wakegawakaranaiyo wakegawakaranaiyo wakegawakaranaiyo wakegawakaranaiyo
wakegawakaranaiyo wakegawakaranaiyo wakegawakaranaiyo wakegawakaranaiyo
wakegawakaranaiyo wakegawakaranaiyo wakegawakaranaiyo wakegawakaranaiyo
wakegawakaranaiyo wakegawakaranaiyo wakegawakaranaiyo wakegawakaranaiyo
wakegawakaranaiyo wakegawakaranaiyo wakegawakaranaiyo wakegawakaranaiyo
wakegawakaranaiyo wakegawakaranaiyo wakegawakaranaiyo wakegawakaranaiyo
wakegawakaranaiyo wakegawakaranaiyo wakegawakaranaiyo wakegawakaranaiyo
wakegawakaranaiyo wakegawakaranaiyo wakegawakaranaiyo wakegawakaranaiyo
wakegawakaranaiyo wakegawakaranaiyo wakegawakaranaiyo wakegawakaranaiyo
wakegawakaranaiyo wakegawakaranaiyo wakegawakaranaiyo wakegawakaranaiyo
wakegawakaranaiyo wakegawakaranaiyo wakegawakaranaiyo wakegawakaranaiyo
wakegawakaranaiyo wakegawakaranaiyo wakegawakaranaiyo wakegawakaranaiyo` in 
%% This is slow
let slowRegex = RegExp.seq RegExp.bof RegExp.space in
%% These are not slow
let notSlowRegexList = [
    RegExp.bof;
    RegExp.space;
    RegExp.seq RegExp.bof RegExp.alpha;
    ] in
let _ = RegExp.exec slowRegex longString in
let _ = List.map (fun notSlowRegex -> RegExp.exec notSlowRegex longString) notSlowRegexList in
document (|
  title = {slow regexp};
  author = {MasWag};
  show-title = false;
  show-toc = false;
|) '<>

In my environment, a single call of RegExp.exec + (almost minimal typesetting) took about 30 seconds.

real	0m33.527s
user	0m33.334s
sys	0m0.040s

Separate out Derive module into independent repo/package

Derive provides typesetting commands for displaying proof trees. We included Drive in satysfi-base for convenience when we didn't have a package management system.

Now that Satyrographos is widely used in the SATySFi community, it's better to have it as an independent package from satysfi-base. Derive provides a different feature from the core concern of satysfi-base.

Support satysfi v0.0.7

The current version of SATySFi is 0.0.7 (NOTE: 0.0.8 is not available at opam?), while the current release of satysfi-base supports 0.0.6. satysfi-base should support the latest SATySFi.

Refer to:

To be clarified:

  • Which version to support?
    • likely 0.0.5-0.0.7
    • How do we ensure that it works as expected for each version?

TODO

  • update dependency in opam
  • refine CI to run tests against different versions of satysfi

`Color.of-css` accepts invalid hex format

Current behavior

Color.of-css `invalid#000000` successfully returns a color value

Expected behavior

Should fail with panic

Note

This behavior is because the regex to extract rgb value is #(\h\h)(\h\h)(\h\h), which should be ^#(\h\h)(\h\h)(\h\h)$.

Stop using zrbase

We want more precise implementations of Float.ceil, Float.floor, etc than ZP0.ceil, ZP0.floor, etc.

Implement `Array.eq`

Background

Eq module expects each (data-type) module to provide eq: 'a Eq.t, which is essentially an equality function on 'a.

Goal

The current Array module lacks eq: ('a Array.t) Eq.t. We want to implement it.

Todos

  • Confirm if it is by design
  • Implement

Use jest-pdf-snapshot for regression tests

Background

Currently, we use jest-image-snapshot for regression. Tests compile test SATySFi files to pdf files and then convert to images, and finally compare them with snapshots. This was kind of a compromise plan, give that we don't have very good tooling for comparing pdf snapshot directly.

That's why I developed jest-pdf-snapshot. Although it is still unstable, I believe this will helps us have better regression tests.

Goal

Replace the current regressions tests with jest-image-snapshot with those with jest-pdf-snapshot.

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.