GithubHelp home page GithubHelp logo

scinim / getting-started Goto Github PK

View Code? Open in Web Editor NEW
61.0 61.0 6.0 2.73 MB

Getting started with Nim for Scientific Computing

Home Page: https://scinim.github.io/getting-started/

License: Creative Commons Zero v1.0 Universal

Nim 100.00%

getting-started's Introduction

scinim

The core types and functions of the SciNim ecosystem

getting-started's People

Contributors

angelezquerra avatar clonkk avatar hugogranstrom avatar mratsim avatar pietroppeter avatar vindaar avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

getting-started's Issues

Preview builds of PRs

Something I think would be very useful when reviewing PRs is to have CI build it automatically and deploy it so one can just open a link and read it directly, instead of having to download it locally build it oneself.

I have tried to set up Netlify over at my fork and it seems to work: HugoGranstrom#1

I must admit it feels a bit hacky the way I had to do it, installing Nim and building in a single command. Here is the command I used btw:

curl https://nim-lang.org/choosenim/init.sh -sSf -o ./init.sh && sh ./init.sh -y && export PATH=/opt/buildhome/.nimble/bin:$PATH && nimble install -d -y && nim r -d:release getting_started.nim build

Is this something we would want? In that case, I could try and set it up here as well.

[Security] Workflow pr_preview.yml is using vulnerable action Sibz/github-status-action

The workflow pr_preview.yml is referencing action Sibz/github-status-action using references v1.1.5. However this reference is missing the commit 650dd1a882a76dbbbc4576fb5974b8d22f29847f which may contain fix to the some vulnerability.
The vulnerability fix that is missing by actions version could be related to:
(1) CVE fix
(2) upgrade of vulnerable dependency
(3) fix to secret leak and others.
Please consider to update the reference to the action.

Initial topic ideas

Let's brainstorm ideas for the articles we would want to see here eventually. And then when we have a decent amount of ideas we can start to get a sense of how best to structure the content topic-wise.

Here's some on top of my head (and a tad bit leaning toward Numericalnim...):

  • Numerical integration (1D, both scalar and cumulative)
  • Interpolation (1D, 2D, 3D)
  • ODEs (IVP)
  • Plotting
  • Matrices/Tensors

If you have any topic you think would need a specific article (a specific kind of plotting like bar plots for example) go ahead and add it to your list as well.

Let the brainstorming begin!

features need in nimibook to start using it?

given current progress in https://github.com/pietroppeter/nimibook I think we can start to ask ourselves when this project can migrate to use nimibook. Which feature do we still want from nimibook that we want to use here?

Later we will also need to manage how to update this repo when nimib and nimibook evolve, but I guess this is a separate issue and we will tackle it when we have it, but if we already start with a good set of feature this other problem is postponed.

As far as I can see I would at least add the markdown support in nimibook, which seems reasonably easy to do and possibly useful for pages without nim code.

[RFC] Contribution Guidelines

I think it might be good to write up some short contribution guidelines for the future when people (hopefully) will be contributing some articles. Things that might be worth discussing and writing some guidelines for:

  • Language/Spelling/Grammar:
    How strict should we be? Should we (the maintainers) proof-read every submission and note every single error or should we just say "Fix the grammatical errors please" and let them figure out themself?
  • Code style:
    I guess we will just have them format it using nimpretty (with longer lines than the default?). Or we add it as part of the deployment automatically / as a commit hook.
  • New Topics:
    How strict should we be about introducing new topics (out of the ordinary) that may be rather niched as to not pollute the top-level of the TOC?

Any thoughts on this?

Ci broken

after merging #47 the CI broke: https://github.com/SciNim/getting-started/actions/runs/3136348556/jobs/5093144122
It seems there was some error when running basics/data_wrangling.nim so a log should have been created but it is not found (maybe it failed too fast). this is a bit complicated due to async processing added to nimibook in pietroppeter/nimibook#53, not sure if @beef331 can help here. I am currently thinking we might want to have an option in nimibook to disable the async processing in nimibook for better troubleshooting these cases.

[RFC] What is the scope?

This is a repo that's meant to guide people new to scientific programming in Nim. The possible number of different guides that would satisfy that description are many. Therefore I see it as reasonable that we try to narrow it down a bit so potential readers aren't overwhelmed by content that is irrelevant to 99% of newcomers.
I propose that we start off with two section: Basics, Advanced. This way it's easy for newcomers to find what they are looking for and we can also have more niche tutorials and what not for users that want to see Nim in action (๐Ÿฅ).

Basics

Here we can have tutorials on the basics like reading from different files, basic plotting, and other common tasks many are looking for a quick guide on how to do. In my opinion, it should not go through basic Nim syntax. For that, we could have a Nim Crash Course or just point them to the Learn page on the Nim website. This way we can keep this section more concise and to the point.

Advanced

Here we can have nearly everything that involves coding in Nim + science. Everything from a tutorial on how to do more advanced plotting to a project-based tutorial explaining advanced deep learning to analyze an image.

This is just my thoughts, alas not any kind of truth. Think of it more as a template to either modify or discard complete.

Let's discuss!

Errors at building a book

Have several errors in my arch linux environment, including:

  1. could not import cblas_* , while modules exist in libcblas.so
  2. /home/username/getting-started/book/numerical_methods/interpolation.nim(108, 38) Error: undeclared identifier: 'Edge'
  3. /home/username/.choosenim/toolchains/nim-1.6.14/lib/pure/strutils.nim(1073, 5) Error: unhandled exception: invalid integer: 0-DEV [ValueError]

Output file is attached.

Please help,

Thanks

book_out.txt

Improve github-pages

To have a pretty tutorial we'd need the following features :

  • Generating the index.html file (it's the landing page of github pages, litterally the first thing we see)
  • Having a table of content on each page to quickly navigate between pages
  • CSS theme to make it look pretty

Images are not shown

Look here: https://scinim.github.io/getting-started/data_viz/basic_plotting.html The images are not loaded. This is because they are saved at nbHomeDir/images while the HTML file looks as nbHomeDir/data_viz/images. This is because the currentDir has been changed to nbHomeDir and the script just saves it at images/img.png. So we either change the saving (clutters the code the viewer sees) or we use nbHomeDir when we load the image with nbImage like this:

nbImage(nbHomeDir / "images/img.png")

But nimib/path isn't exported to us by default...
My naive try at a solution using absolute paths didn't work. Maybe we need the path to the image to be relative?

Linkable headers

Similarly to the cheatsheet example in Nimib I think making all the headers linkable is a good idea. That would make it easier to direct people asking questions to specific sections among other things. It would also allow us to have TOCs on every page like in the cheatsheet example if we wanted to. The current implementation needs some work though, optimally the headers themself (or a symbol in front/after of them) should be clickable so one easily can copy the link.

@pietroppeter Do you think this is functionality that (optionally) should be offered by Nimib/NimiBook itself or should we roll our own version here?

Contributing fmu.nim

Hi,
I created fmu.nim. I think it is usable in its current stage. I think the code could be cleaned and make it more like Nim. On the other hand:

  • it supports Model Exchange and Co-Simulation
  • it is capable of creating multiplatform FMU
  • it has better ergonomics than the original fmusdk

I am happy to contribute it to SciNim. Let me know if it is good enough and how I should contribute it (I am not very knowledgable about Github -and many other things-).

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.