question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

A valid use case for flow style

See original GitHub issue

Maybe I shouldn’t use strictyaml for linear algebra heavy stuff.

matrix: [
  [ 2., 5., 1.],
  [ 3., 2., 3.],
  [ 4., 1., 2.],
  ]
matrix_strict:
  -
    - 2.
    - 5.
    - 1.
  -
    - 3.
    - 2.
    - 3.
  -
    - 4.
    - 1.
    - 2.

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Reactions:2
  • Comments:7 (2 by maintainers)

github_iconTop GitHub Comments

5reactions
leni536commented, Jul 5, 2017

Flow version: 65 characters long, string version: 34 characters long.

Two can play at that game.

matrix:
- [2, 5, 1]
- [3, 2, 3]
- [4, 1, 2]

It’s only 44 characters, 10 characters longer, Those 10 characters add enough semantics that all yaml parsers can parse these into native data structures without a specialized parser. And I think it is fairly easy to parse for humans too.

I don’t have any more arguments, I think we can agree to disagree.

4reactions
crdoconnorcommented, Jul 4, 2017

I can make it do something like this, which is terser than both, if you like:

matrix: |
  2 5 1
  3 2 3
  4 1 2

Python::

load(matrix_yaml, Map({"matrix": Matrix(Int(), 3, 3)}) == {"matrix": [[2, 5, 1], [3, 2, 3], [4, 1, 2]]}

How does that sound?

Read more comments on GitHub >

github_iconTop Results From Across the Web

Guidelines: Use Case
You can describe use cases in many styles. As an example we show the basic flow of events of the use case Administer...
Read more >
Use Case Narrative - Useful Use Case Description Tips
Basic Flow Of Events (aka Happy Path or Basic path). This is the 'guts' of the use case and describes the sequence of...
Read more >
What is Use Case Specification? - Visual Paradigm
The use case specification is typically created in analysis and design phase in an iterative manner. At first, only a brief description of...
Read more >
Use Cases | Usability.gov
A use case is a written description of how users will perform tasks on your website. It outlines, from a user's point of...
Read more >
Use Cases
UML use cases diagrams are “secondary-value” ... Another is concrete style that embeds user interface decisions ... Which of these are valid use...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found