Giter Site home page Giter Site logo

nelson-lang / nelson-minimalist-core Goto Github PK

View Code? Open in Web Editor NEW
6.0 4.0 2.0 53.05 MB

Nelson's minimalist core

License: GNU Lesser General Public License v3.0

CMake 2.61% Shell 0.09% Batchfile 0.03% C++ 86.76% C 0.94% Python 0.13% MATLAB 9.12% JavaScript 0.32%
nelson core minimalist

nelson-minimalist-core's People

Contributors

aibaars avatar allancornet avatar codacy-badger avatar gitter-badger avatar hind-m avatar johanmabille avatar nelson-numerical-software avatar sj avatar weblate avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

nelson-minimalist-core's Issues

More builtin functions to be usable for a user

Expected list (no new dependency required) modules:

  • overload
  • console
  • function handle
  • interpreter
  • validators
  • types
  • string
  • data_analysis
  • single
  • double
  • debugger
  • logical
  • integer
  • error_manager
  • memory_manager
  • stream_manager
  • linear_algebra
  • elementary_functions
  • constructors
  • core
  • statistics
  • time could be also interesting but need to change code (boost -> c++17)

Add `text_completion` module to nelson-minimalist-core

As discussed a bit in this issue, and in order to implement a Jupyter kernel based on nelson, having a feature where the given code is to be completed and the matches are returned would be great. This seems to exist in nelson original version with the text_completion module missing here.
Thanks a lot!

Nelson modules and package management

Hi,

Thanks for this amazing project! We are considering packaging nelson for conda-forge, and I would like to know if the additional modules of Nelson (i.e. not in this core repo) can be packaged independently. My intuition is that it should be possible if installing a Nelson module consists in copying some files at the right place so that Nelson can find it, but I haven't diven into the details and I wanted to check there was no additional step required.

Install `nelson-minimalist-core` in local environment

Hello,
Thanks for this great work! I want to use nelson-minimalist-core as a package, and tried to install it but it seems that there are some missing files (some of them are available in the original nelson (gpl-3.0.md CHANGELOG-0.{1, 2, 3, 4, 5}.x.md modules/{module_name}/etc ) and some aren't (modules/modules.m)). I wanted to check if I missed something or if this is a mistake that needs fixing. I tried though to comment the corresponding lines in CMakeLists.txt files and managed to get an install but I don' find any files to include in the ROOT_OUTPUT apart from libs and executables...
Thanks!

Bug in `text_completion` ?

I realized when using FileCompleter and VariableCompleter available in the text_completion module that they are not considering if the retrieved files or variables start with the given prefix to complete. I just wanted to check if this wasn't done on purpose, and in that case, open a PR to fix it.
Note that BuiltinCompleter and MacroCompleter do consider that.

CodeQL warning

CodeQL reports more warning than in main repo.
Need to check and fix in main repo and report in this repository.

[Question] io support in wasm

in environment wasm, does it interesting/possible to have features as:

  • cd , pwd , mkdir , ls (using c++ standard library)
    playing with jupyter lite, it seems to be supported with python kernel ('/drive')
    Does it require somethings special ?

  • read/save files
    it is already possible to read .m , so i suppose that it is possible ?
    any limitation ?

  • is it possible to create tempory files in wasm too ?

(Thanks @JohanMabille)

Windows build with cmake

Hi,

I can see in the CmakeLists.txt that it is not possible to build nelson with cmake on Windows. Are you open to remove this constraint? If it was introduced because of a technical issue that you don't have the time to deal with, I'm happy to help to fix it.

[Help / Question] Use of `EvaluateCommand`

In the context of implementing a Jupyter kernel for Nelson (similar to this one for cling https://github.com/jupyter-xeus/xeus-cling), I figured using EvaluateCommand could be a good way to evaluate a given command. But then, I couldn't find the output of the evaluation. IIUC, an AbstractSyntaxTree is used for command storing but I was wondering how to get the output of the command after being executed?
Thanks!

Add a tag on `nelson-minimalist-core` to use for package availability on conda-forge

In order to integrate nelson in the xeus-nelson kernel and have a first version of it, we need to make nelson available as a package on conda-forge (conda-forge/staged-recipes#21841).
This requires to build from a tarball, and therefore to have an existing tag on nelson-minimalist-core, could be 0.1.0. Are you okay with that?
Regarding the PR on conda-forge mentioned above, I was thinking of adding you as a maintainer of the recipe since you are the creator/owner of nelson, but no obligation of commitment of your own (more of a rights granting) :)
Can you confirm that this is alright?

cmake packaging

I have started to look at the cmake packaging to make it easier for an external project to link with differnet parts of Nelson. I have some questions regarding which changes you would accept:

1] Install pattern

It is quite common on Linux and MacOS to install binaries directly under PREFIX/bin and PREFIX/lib, and to install public headers under PREFIX/include/PROJECT_NAME. The conda distribution provides a similar files tree on Windows, so that the install is quite similar on all the platforms. In the case of Nelson, adopting such a pattern means:

  • the install directory becomes ${CMAKE_INSTALL_PREFIX} instead of ${CMAKE_INSTALL_PREFIX}Nelson-${Nelson_VERSION_MAJOR}.${Nelson_VERSION_MINOR}.${Nelson_VERSION_MAINTENANCE}
  • the platform subfolder under bin is removed.

Notice that these changes are independent.

2] CMake targets and exports

Exporting and installing the targets used to build the Nelson libraires would simplify a lot the link with them in downstream projects. One would simply write find_package(Nelson) followed by target_link_libraries(myLib PRIVATE Nelson::interpreter) for instance, and would get the include_directories and dependencies of Nelson::interpreter for free.

This requires two kinds of changes:

  • The addition of a new nelsonTargets.cmake file, that would embed all the targets, as long as NelsonConfig.cmake and NelsonVersionConfig.cmake.
  • rewriting the different CMakeLists.txt to use target properties instead of global properties

[Question] WASM build support

steps:

micromamba env create -f environment-wasm-build.yml
with ubuntu 22.04

name: nelson-wasm-build
channels:
  - conda-forge
dependencies:
  # Build dependencies
  - cmake
  - cxx-compiler
  - emsdk >=3.1.11
  - empack >=2.0.1  
  # Host dependencies
  - eigen
  - pkg-config

micromamba activate nelson-wasm-build
emsdk install 3.1.20
emsdk activate 3.1.20

mkdir build

export EMPACK_PREFIX=$MAMBA_ROOT_PREFIX/envs/nelson-wasm-build
export PREFIX=$MAMBA_ROOT_PREFIX/envs/nelson-wasm-host
export CMAKE_PREFIX_PATH=$PREFIX
export CMAKE_SYSTEM_PREFIX_PATH=$PREFIX

emcmake cmake
-DCMAKE_BUILD_TYPE=Release
-DBUILD_SHARED_LIBS=OFF
-DCMAKE_FIND_ROOT_PATH_MODE_PACKAGE=ON
..
make -j5

Build fails tested v0.1.0, v0.2.0, master and more_things branches

wasm-ld: error: unknown argument: --sort-common
wasm-ld: error: unknown argument: --as-needed
wasm-ld: error: unknown argument: --disable-new-dtags
wasm-ld: warning: unknown -z value: relro
wasm-ld: warning: unknown -z value: now
em++: error: '/home/mcallan/micromamba/envs/nelson-wasm-build/lib/python3.11/site-packages/emsdk/upstream/bin/wasm-ld -o nelson-cli-exec.wasm -O2 --sort-common --as-needed -z relro -z now --disable-new-dtags --gc-sections -L/home/mcallan/micromamba/envs/nelson-wasm-build/lib CMakeFiles/nelson-cli-exec.dir/nelson_cli/main-cli.cpp.o ../engine/libnlsEngine.a ../terminal/libnlsTerminal.a ../core/libnlsCore.a ../memory_manager/libnlsMemory_manager.a ../localization/libnlsLocalization.a ../functions_manager/libnlsFunctions_manager_builtin.a ../files_folders_functions/libnlsFiles_folders_functions.a ../interpreter/libnlsInterpreter.a ../display_format/libnlsDisplay_format.a ../operators/libnlsOperators.a ../os_functions/libnlsOs_functions.a ../nelson_manager/libnlsNelson_manager.a ../profiler/libnlsProfiler.a ../stream_manager/libnlsStream_manager.a ../api_nelson/libnlsApi_nelson.a ../types/libnlsTypes.a ../error_manager/libnlsError_manager.a ../commons/libnlsCommons.a ../i18n/libnlsI18n.a ../characters_encoding/libnlsCharacters_encoding.a ../elementary_mathematics/libnlsElementary_mathematics.a -L/home/mcallan/micromamba/envs/nelson-wasm-build/lib/python3.11/site-packages/emsdk/upstream/emscripten/cache/sysroot/lib/wasm32-emscripten -lGL -lal -lhtml5 -lstubs -lnoexit -lc -ldlmalloc -lcompiler_rt -lc++-noexcept -lc++abi-noexcept -lsockets -mllvm -combiner-global-alias-analysis=false -mllvm -enable-emscripten-sjlj -mllvm -disable-lsr --allow-undefined-file=/tmp/tmpq_9espcq.undefined --strip-debug --export-if-defined=main --export-if-defined=__start_em_asm --export-if-defined=__stop_em_asm --export-if-defined=__start_em_lib_deps --export-if-defined=__stop_em_lib_deps --export-if-defined=__start_em_js --export-if-defined=__stop_em_js --export-if-defined=__main_argc_argv --export=stackSave --export=stackRestore --export=stackAlloc --export=__errno_location --export=__get_temp_ret --export=__set_temp_ret --export=__wasm_call_ctors --export=__cxa_is_pointer_type --export=malloc --export=free --export=saveSetjmp --export=setThrew --export=__dl_seterr --export-table -z stack-size=65536 --initial-memory=16777216 --no-entry --max-memory=16777216 --global-base=1024' failed (returned 1)
make[2]: *** [modules/main/CMakeFiles/nelson-cli-exec.dir/build.make:121 : modules/main/nelson-cli-exec.js] Erreur 1
make[1]: *** [CMakeFiles/Makefile2:1342 : modules/main/CMakeFiles/nelson-cli-exec.dir/all] Erreur 2

What did I miss ?

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.