drbig / snb Goto Github PK
View Code? Open in Web Editor NEWSimple hierarchical notebook that's locale aware
License: BSD 2-Clause "Simplified" License
Simple hierarchical notebook that's locale aware
License: BSD 2-Clause "Simplified" License
After patching the Makefile to use ncursesw6-config
, I get the following output from make debug
(building using the snb-git AUR package):
cc -march=x86-64 -mtune=generic -O2 -pipe -fstack-protector-strong --param=ssp-buffer-size=4 -std=c99 -Wall -Werror -Wno-implicit-function-declaration -fstack-protector-all -fPIC -fPIE -DDEBUG -g -D_GNU_SOURCE -c src/data.c -o src/data.o
cc -march=x86-64 -mtune=generic -O2 -pipe -fstack-protector-strong --param=ssp-buffer-size=4 -std=c99 -Wall -Werror -Wno-implicit-function-declaration -fstack-protector-all -fPIC -fPIE -DDEBUG -g -D_GNU_SOURCE -c src/ui.c -o src/ui.o
cc -march=x86-64 -mtune=generic -O2 -pipe -fstack-protector-strong --param=ssp-buffer-size=4 -std=c99 -Wall -Werror -Wno-implicit-function-declaration -fstack-protector-all -fPIC -fPIE -DDEBUG -g -D_GNU_SOURCE -c src/colors.c -o src/colors.o
src/data.c:10:0: error: "_GNU_SOURCE" redefined [-Werror]
#define _GNU_SOURCE
^
<command-line>:0:0: note: this is the location of the previous definition
src/colors.c:5:0: error: "_GNU_SOURCE" redefined [-Werror]
#define _GNU_SOURCE
^
src/ui.c:5:0: error: "_GNU_SOURCE" redefined [-Werror]
#define _GNU_SOURCE
^
<command-line>:0:0: note: this is the location of the previous definition
<command-line>:0:0: note: this is the location of the previous definition
cc1: all warnings being treated as errors
Makefile:68: recipe for target 'src/colors.o' failed
make: *** [src/colors.o] Error 1
make: *** Waiting for unfinished jobs....
cc1: all warnings being treated as errors
Makefile:68: recipe for target 'src/data.o' failed
make: *** [src/data.o] Error 1
cc1: all warnings being treated as errors
Makefile:68: recipe for target 'src/ui.o' failed
make: *** [src/ui.o] Error 1
snb doesnotexist.md
says Can't open your file: No such file or directory
. I think it'd be better if it created that file, i.e. treats it like it'd contain a single, empty entry.
When pressing the j and k (up and down scroll) keys the sceen flickers, due to beeing redrawn.
This is quite annoying, maybe there is a way to fix it.
Apparently it's completely borked. From building to actually not working at all.
(OpenBSD 5.8 amd64)
Hi,
Interesting project! :)
It would be nice if readline bindings such as Ctrl-H (backspace), Ctrl-W (delete word), Ctrl-U (kill line), Ctrl-B and Ctrl-F (cursor movement) were supported when editing entries. Ideally the best would be to use readline proper (to have all bindings, including the ones from ~/.inputrc). I'm not sure if that's possible, but if it's not it would be nice to reimplement at least the most common ones.
Thanks!
When running snb emptyfile.md
I get a segfault here:
#0 vitree_rebuild (s=s@entry=0x555555843350, e=e@entry=0x0) at src/ui.c:1046
#1 0x0000555555559c7c in ui_set_root (e=0x0) at src/ui.c:1752
#2 0x0000555555555a13 in main (argc=<optimized out>, argv=<optimized out>) at src/snb.c:136
The big question:
Is there a sane way to make a Makefile
smart-enough to figure out whether it should call ncursesw5-config
or ncursesw6-config
, or to report a human-readable error when it doesn't know how to deal with that, without resorting to contraptions like autotools
.
Second question:
Is it possible to do a single, portable Makefile
- i.e. one that will work on Linuxes and BSD/OS X (perhaps only when invoked with gmake
, but that would be acceptable).
Third question:
My opinion right now is that the compiler and linker flags should at the same time be: as strict on errors as possible; and as non-assuming as possible. This is not currently the case, as there are some optimisation/hardening flags on and -Wno-implicit-function-declaration
(presumably to deal with ncurses
weirdness).
I'm tempted to remove the additional flags because:
makepkg
, BSD ports
(if snb ever gets there)) - in a way that's actually appropriate for the particular platformThe above approach is debatable, so I'm leaving the flags as-is.
I get the following errors when I make debug
.
gcc -Wall -Werror -DDEBUG -g -I/usr/include/ncursesw -c src/ui.c -o src/ui.o
src/ui.c: In function ‘dlg_newwin’:
src/ui.c:238:5: error: implicit declaration of function ‘waddwstr’ [-Werror=implicit-function-declaration]
src/ui.c: In function ‘dlg_simple’:
src/ui.c:271:3: error: implicit declaration of function ‘waddnwstr’ [-Werror=implicit-function-declaration]
src/ui.c:273:5: error: implicit declaration of function ‘mvwaddwstr’ [-Werror=implicit-function-declaration]
src/ui.c: In function ‘dlg_bool’:
src/ui.c:314:5: error: implicit declaration of function ‘get_wch’ [-Werror=implicit-function-declaration]
src/ui.c: In function ‘dlg_file_path’:
src/ui.c:429:7: error: implicit declaration of function ‘mvwaddnwstr’ [-Werror=implicit-function-declaration]
cc1: all warnings being treated as errors
make: *** [src/ui.o] Error 1
Also, running ncursesw5-config
works properly.
When doing snb file.md
where the file contains foo
:
ERROR: Malformed input at line 1.
Unix error: Success
The first error makes sense, I don't think the second one does 😉
It appears that any line not starting with a -
spits out
ERROR: Malformed input at line <line_without_dash>.
Unix error: Illegal seek
As is the case than the accompanying file help.md
works fine but not README.md
or similar markdown. This is a show stopper currently but overall great program.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.