Coder Social home page Coder Social logo

copperhead's Introduction

Lnk2past

Hello! I am Nick, and I am a software engineer and educator. I primarily teach courses in scientific computing and data visualization.

Recently I have been focused largely on writing and improving tools I use for my classes. I also don't maintain my blog over at NESWare.io, so check it out if you want. Or don't, I have maybe half a dozen unfinished articles because I am undecisive.

I am interested in collaborating on anything dealing with simulations, dataviz, or education tools.

Thanks for stopping by!

copperhead's People

Contributors

lnk2past avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

Forkers

carlosal1015

copperhead's Issues

2021 Release Checklist

Checklist for things to be done for a 2021.m.x release

  • Incorporate new design for templating generated modules
  • Incorporate std::complex support
  • Incorporate NumPy support
  • Update documentation
  • Hash function inputs for caching/determining rebuild
  • Fix Xcode support #12
  • Change master to main (not needed for a release, but something to be done)

Most of this work is complete, but scattered across branches both local and remote. Need to consolidate, cleanup, and integrate into main code base.

Hello World fails

pip install copperhead followed by copy-pasting the HelloWorld example into a .ipynb notebook cell in VSCode (macOS) explodes:

import copperhead as cpp

hello_world_cpp = '''
#include <iostream>
void hello_world()
{
   std::cout << "Hello World!" << std::endl;
}'''

hello_world = cpp.generate('hello_world', 'void()', hello_world_cpp)

hello_world()
running install
running bdist_egg
running egg_info
writing hello_world.egg-info/PKG-INFO
writing dependency_links to hello_world.egg-info/dependency_links.txt
writing top-level names to hello_world.egg-info/top_level.txt
reading manifest file 'hello_world.egg-info/SOURCES.txt'
writing manifest file 'hello_world.egg-info/SOURCES.txt'
installing library code to build/bdist.macosx-11-x86_64/egg
running install_lib
running build_ext
building 'hello_world' extension
clang -Wno-unused-result -Wsign-compare -Wunreachable-code -fno-common -dynamic -DNDEBUG -g -fwrapv -O3 -Wall -isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk -I/usr/local/include -I/usr/local/opt/[email protected]/include -I/usr/local/opt/sqlite/include -I/Users/pi/gold/.venv/include -I/usr/local/opt/[email protected]/Frameworks/Python.framework/Versions/3.9/include/python3.9 -c /Users/pi/gold/src/deploy/145/.copperhead_cache/hello_world/hello_world_block.cpp -o build/temp.macosx-11-x86_64-3.9/Users/pi/gold/src/deploy/145/.copperhead_cache/hello_world/hello_world_block.o
/Users/pi/gold/src/deploy/145/.copperhead_cache/hello_world/hello_world_block.cpp:36:9: warning: code will never be executed [-Wunreachable-code]
    if (PyErr_Occurred())
        ^~~~~~~~~~~~~~
/Users/pi/gold/src/deploy/145/.copperhead_cache/hello_world/hello_world_block.cpp:43:20: error: definition of variable with array type needs an explicit size or an initializer
static PyMethodDef hello_worldMethods[]
                   ^
/Users/pi/gold/src/deploy/145/.copperhead_cache/hello_world/hello_world_block.cpp:43:40: error: expected ';' after top level declarator
static PyMethodDef hello_worldMethods[]
                                       ^
                                       ;
/Users/pi/gold/src/deploy/145/.copperhead_cache/hello_world/hello_world_block.cpp:50:37: error: expected ';' after top level declarator
static PyModuleDef hello_worldmodule
                                    ^
                                    ;
1 warning and 3 errors generated.
ERROR:root:Internal Python error in the inspect module.
Below is the traceback from this internal error.

Traceback (most recent call last):
  File "/usr/local/Cellar/[email protected]/3.9.6/Frameworks/Python.framework/Versions/3.9/lib/python3.9/distutils/unixccompiler.py", line 117, in _compile
    self.spawn(compiler_so + cc_args + [src, '-o', obj] +
  File "/usr/local/Cellar/[email protected]/3.9.6/Frameworks/Python.framework/Versions/3.9/lib/python3.9/distutils/ccompiler.py", line 910, in spawn
    spawn(cmd, dry_run=self.dry_run)
  File "/usr/local/Cellar/[email protected]/3.9.6/Frameworks/Python.framework/Versions/3.9/lib/python3.9/distutils/spawn.py", line 91, in spawn
    raise DistutilsExecError(
distutils.errors.DistutilsExecError: command '/usr/bin/clang' failed with exit code 1

During handling of the above exception, another exception occurred:
:
(etc)

Please fix/doc.
This a great potential alternative to numba, but you really need the HelloWorld to work!

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.