Coder Social home page Coder Social logo

nim-ncurses's People

Contributors

alxf avatar archsyril avatar dgellow avatar hack3dq avatar matsu911 avatar rnowley-gh avatar walkre-niboshi 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

Watchers

 avatar  avatar  avatar  avatar  avatar

nim-ncurses's Issues

Change chtype = cint to chtype = uint32

The line
u1: cint = 1
A_NORMAL* = (u1 - u1)
A_ATTRIBUTES* = NCURSES_BITS(not (u1 - u1), 0)

crashes nim since not (u1 - u1) is a 64 bit value (on my amd64 machine) which cannot be converted to chtype

Replacing the first line by
u1:uint32= 1
fixes the issue
This is with
Nim Compiler Version 1.5.1 [Linux: amd64]
Compiled at 2020-11-20
Copyright (c) 2006-2020 by Andreas Rumpf

git hash: fcb2ec4ed69fe924e7e3899e0084f534124255d4
active boot switches: -d:release

UTF-8 support

Whats about unicode?

printw("Привет")

Looks like: ~_ ~@ ~B

helloworld will not compile. Problem with ncurses.nim

$:~/nimfiles$ nim c hellocurses.nim
Hint: used config file '/etc/nim.cfg' [Conf]
Hint: system [Processing]
Hint: hellocurses [Processing]
Hint: ncurses [Processing]
nim-ncurses/ncurses.nim(60, 25) Error: list of key:value pairs expected

My import line is: import /home/myhome/nimfiles/nim-ncurses/ncurses.nim

Problem with using 'libncursesw.so' (Linux)

Hi!

You should not use 'libncursesw.so' directly as a 'dynlib' under Linux, because there is a high probability that this file is a linker script containing the line

INPUT(libncursesw.so.5 -ltinfo)

(or)

INPUT(libncursesw.so.6 -ltinfo)

Instead, you should use there 'libncursesw.so.(5|6)'. I checked this, and it works. The original 'libncursesw.so' leads to the following error message when invoking a program which was linked with your 'ncurses'-module:

could not load: libncursesw.so
compile with -d:nimDebugDlOpen for more information

With the mentioned flag set, the following error message is printed when this program is invoked:

/usr/lib/x86_64-linux-gnu/libncursesw.so: file too short
could not load: libncursesw.so

The reason for this behaviour is that 'dlopen()' is unable to handle linker scripts. Linker scripts are meant to be used solely with the linker 'ld'. I doubt that 'dlopen()' will ever be able to handle such files, because they may contain anything ld's scripting language supports, even dependencies on static libraries ('XXX.a').

Nim seems currently unable to generate modules containing dynamically loadable object files, but, until (if ever) this is the case, workarounds as described above must be used.

If you wish, i could create a pull-request with the fix, but currently this is bothersome for me, as i have little time for such things, and i have made no good experiences with these things (yet).

Greetings
    runkharr

Error: undeclared identifier: 'name' while installing with Nimble

I don't know if this issue is known, but when I try to install this package via nimble, it gives me the following error:

$ nimble install ncurses
Downloading https://github.com/rnowley/nim-ncurses using git
       Tip: 11 messages have been suppressed, use --verbose to show them.
     Error: Could not read package info file in /tmp/nimble_14345/githubcom_rnowleynimncurses/ncurses.nimble;
        ...   Reading as ini file failed with: 
        ...     Invalid section: .
        ...   Evaluating as NimScript file failed with: 
        ...     tmp/nimble_14345/githubcom_rnowleynimncurses/ncurses.nimble(2, 1) Error: undeclared identifier: 'name'.

Nim version: 0.18.0
Nimble version: 0.8.10

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.