Roadmap to calibre PY3
- Make syntax correct for py3
- build C extensions
- ICU
- speedups
- winutils
- everything else
- Fix failing tests
Python 2.7.15 (default, Jun 27 2018, 13:05:28) [GCC 8.1.1 20180531] on linux2 | |
>>> import sysconfig; from pprint import pprint; pprint(sysconfig.get_config_vars()) | |
{'AC_APPLE_UNIVERSAL_BUILD': 0, | |
'AIX_GENUINE_CPLUSPLUS': 0, | |
'AR': 'ar', | |
'ARFLAGS': 'rc', | |
'ATHEOS_THREADS': 0, | |
'BASECFLAGS': '-fno-strict-aliasing', | |
'BASEMODLIBS': '', | |
'BEOS_THREADS': 0, |
Roadmap to calibre PY3
from lib2to3 import fixer_base | |
from lib2to3.pytree import Node | |
from lib2to3.pygram import python_symbols as syms | |
from lib2to3.fixer_util import Name, ArgList | |
import libmodernize | |
class FixGetcwd(fixer_base.ConditionalFix): | |
BM_compatible = True |
0 info it worked if it ends with ok | |
1 verbose cli [ '/usr/bin/node', '/usr/bin/npm', 'start' ] | |
2 info using npm@6.1.0 | |
3 info using node@v10.5.0 | |
4 verbose run-script [ 'prestart', 'start', 'poststart' ] | |
5 info lifecycle foo@0.1.0~prestart: foo@0.1.0 | |
6 info lifecycle foo@0.1.0~start: foo@0.1.0 | |
7 verbose lifecycle foo@0.1.0~start: unsafe-perm in lifecycle true | |
8 verbose lifecycle foo@0.1.0~start: PATH: /usr/lib/node_modules/npm/node_modules/npm-lifecycle/node-gyp-bin:/home/user/dev/foo/node_modules/.bin:/home/user/dev/foo/node_modules/.bin:/usr/bin:/home/user/etc/.local/bin:/home/user/etc/.local/bin:/usr/local/bin:/usr/local/sbin:/usr/bin:/opt/android-sdk/platform-tools:/usr/lib/jvm/default/bin:/usr/bin/site_perl:/usr/bin/vendor_perl:/usr/bin/core_perl:/home/user/bin/:/home/user/etc/.nimble/bin/:/home/user/bin/:/home/user/etc/.nimble/bin/ | |
9 verbose lifecycle foo@0.1.0~start: CWD: /home/user/dev/foo |
/** | |
* Joins the collection with string 'delimiter'. Somehow this function | |
* was overlooked in the stdlib until Java 8. | |
* <p> | |
* delimiter and collection must not be null. | |
*/ | |
private static <T> String join(String delimiter, Collection<T> collection) { | |
// PRECONDITION delimiter and collection must not be null | |
StringBuilder result = new StringBuilder(); | |
Iterator<T> iter = collection.iterator(); |
/** | |
* A generic interface for an one-element lambda | |
*/ | |
private interface Predicate<P1, R> { | |
R apply(P1 p1); | |
} | |
private static <T, C> List<List<T>> groupBy(Collection<T> collection, | |
Predicate<? super T, C> byValue) { | |
// PRECONDITION collection and byValue must not be null |
type | |
yaml_version_directive_t* = object | |
major*: cint | |
minor*: cint | |
type | |
yaml_tag_directive_t* = object | |
handle*: cstring | |
prefix*: cstring | |
type | |
yaml_encoding_t* {.size: sizeof(cint).} = enum |
I use GDB to debug my Nim code, but by default Nim doesn't output enough
information to be usable. I pass --debuginfo --linedir:on
to the nim command
to fix that.
There is some name mangling, but in most cases things are still understandable.
proc
s have an integer appended to the name, so when setting a breakpoint is
done like this: b foo_431313
. It's also possible to just line number for
breakpoints, which is exactly as you might expect: b mymodule.nim:321
.
To install, download the script on your path, rename it to git-up
and chmod +x git-up
.
Usage is git up <remote> [params]
. It iterates through all the the
branches that exist on both local and the remote, and does git rebase $params $remote/$branch $branch
. Really simple.
Dependencies are GNU Coreutils and git. Running linux? You'll have them both installed.