Skip to content
This repository has been archived by the owner on Sep 20, 2022. It is now read-only.

Making libgeneration available to folang programmers #22

Open
go-li opened this issue Jul 31, 2018 · 1 comment
Open

Making libgeneration available to folang programmers #22

go-li opened this issue Jul 31, 2018 · 1 comment
Assignees
Labels
discussion This issue serves as a forum for discussion

Comments

@go-li
Copy link

go-li commented Jul 31, 2018

libgeneration contains several generic algorithms and datastructures

  • sorted map (dict/avl)
  • binary tree (dict/binary)
  • graph (graphs and algorithms)
  • binary heap (a queue)
  • efficient tree based heap for huge queues
  • linked list (circular doubly linked)
  • quick sort (for generic slices []T)
  • fenwick tree

It is developed in a single parametric language named go-li (suffix .go). Because folang is very similiar i did a transpiler and translated libgeneration to folang. Now every folder contains both .go and .fo files. Can your importer import such packages? Detect it's a fo package and use only fo files? Alternative solution is to put each go-li package and fo package into a separate folder. It's easy to fix this. Or I can change go-li suffix.

Come join us on gophers.slack.com channel #generics

@albrow
Copy link
Owner

albrow commented Aug 3, 2018

@go-li this looks really cool and thank you for letting me know about it :)

See #2 for some background. Basically, my long-term plan for the importer is that it will look at .go and .fo files and you will be able to import other Fo packages as well as vanilla Go packages. If the .go files in your package are not actually valid Go it could cause some problems. But I will be able to tell you a lot more once #2 is implemented.

By the way, it's extremely useful to see a sizeable codebase like this transpiled to Fo. Any problems you find can probably be converted into test cases and as a result we will have a much more robust compiler. If you do find more bugs, please continue to open issues. I can't overstate how helpful it is right now at this stage of the project. Thank you!

@albrow albrow self-assigned this Aug 3, 2018
@albrow albrow added the discussion This issue serves as a forum for discussion label Aug 3, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
discussion This issue serves as a forum for discussion
Projects
None yet
Development

No branches or pull requests

2 participants