Giter VIP home page Giter VIP logo

jewl-go's Introduction

jewl-go

Jewl is a go friendly application analysis library which can be used with languages like python or julia to create data science graphs and charts

jewl-go's People

Contributors

alexcouch avatar

Stargazers

Angelo Fallaria avatar

Watchers

 avatar  avatar Angelo Fallaria avatar

Forkers

angelofallars

jewl-go's Issues

Recorder does not work with goroutines

Issue

In commit 6715e3a, there is a new test which runs the bubble sort as a set of goroutines instead of a sequence of function calls. It results in errors that does not occur in non-concurrent code. They seem to vary seemingly randomly meaning it may be a race condition in more than one area.

Solution

The solution may be to add a lock to the cache file and project file.

err := syscall.Flock(int(file.Fd()), syscall.LOCK_EX)

Generate the data files in `.jewl` instead of the cwd

To reduce clutter in a user's workspace, and to reduce the amount of boilerplate, being able to produce the data file in the .jewl directory would be a nice streamline of passing the data from jewl-go to Jewl.jl

Jewl.jl could also update it's API to use GetProject instead of Load so that it checks for a .jewl directory, and gets whatever project is in there. This would require some more changes on Jewl.jl's end but this could help reduce clutter and boilerplate for users.

Clean up project structure

A lot of stuff that should be in their own files are crammed into recorder.go such as

  • RecorderConfig
  • RecorderCache

Also, there is some housekeeping to do within functions of recorder.go such as simplifying and homogenizing the header and frame creation operations such that

  • All header operations are in their own functions
  • Operations related to Frames are given their own functions

Note: this is not to follow clean code this is just so that maintenance is easier

Remove `.jewl` delete call

We need to stop deleting .jewl for issue #7 to work. It can also be used by configs to generate other stuff there if needed (such as log files).

Add Usage Documentation

Note: This should be done just before 1.0-rewrite is merged to main

Issue

Nobody knows how to use my library; but that is intentional as I am still developing it, however, the overall structure is pretty much worked out. It's all just tweaks and improvements from here on out.

Conclusion

A separate wiki shall be created to explain how to use the library with Jewl.jl

Decouple `RecorderCache` from `MsgPack`

Just like in Issue #2, we need to decouple the RecorderCache from Msgpack such that user/config schema can customize how the cache is marshalled/demarshalled.

A point of contention I have about this is how useful it would be to customize the RecordeCache since that is an internal function, and not something that users would likely need to customize. However, I expect that the cache may be expanded upon in the future, so I will keep this here in the event that it is need.

This may be closed by the time the 1.0-rewrite branch is finished without this being implemented. If it turns out that this is not really needed, we can close it. If we end up reversing that decision, we can always reopen this issue.

Decouple `Recorder` and MessagePack

Recorder should be independent of the storage method/protocol used to store results, with the data format being decided only by the concrete implementation of the RecorderConfig.

Multiple calls to the same function not supported!

When calling a function multiple times, it will just override the current index in the header.

Solution
Change the header from map[string]int to map[string][]int and append the frame index to the function's header entry.

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.