-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
misc feature requests #86
Comments
=> #127 |
toMsgFilename: |
thispkgavoid ambiguities by allowing to refer to current nimble package import thispkg/foo # restrict search to current package (don't resolve using other nimble packages nor stdlib)
const dir = getCurrentNimblePath() # resolves to path of enclosing nimble file in a parent dir links
|
|
instead of introducing all those if feature is later removed, we can just do |
localize define pragma |
dispatchStringsgoal: case mystr
of "foo1": fun1
of "foo2": fun2 (commonly used pattern, and has a lot of drawbacks) with something easier to use, more efficient: dispatchStrings(a: seq[string], b: string): benefits:
notecompiler could also optimize case of for strings, it right now generates suboptimal code eg:
|
|
caseStmtMacros should be like everything else, w a function call eg: case mymatch(key) # instead of case key
of ok1: bar1
of ok2: bar2
else: discard D20200405T033816 |
|
astGetanalog to template fun(a): untyped =
let astGet(a,0): astGet(a, 1) = astGet(a, 2) same as: macro fun(a): untyped =
let a0 = astGet(a,0)
let a1 = astGet(a,1)
let a2 = astGet(a,2)
quote do:
let `a0`: `a1` = `a2` |
can any of this be done w a shared library dlopened' by nim to defer it to custom logic? |
|
should user defined pragmas or builtin pragmas require special syntax to avoid clashes (eg when new pragmas are added)? |
eg use case: the exe is in a path w spaces, and a symlink hides the spaces => i want the symlink, not resoved path |
=> #182 |
option to show how to process output file, eg: other options include: running dsymutil etc |
runtime localized checks |
this should be supported in some way |
Error: unhandled exception: /Users/timothee/git_clone/nim/Nim_devel/lib/pure/json.nim(764, 10) EDIT: |
this really should be specified in https://nim-lang.org/docs/nep1.html. Here are sane conventions:
rationale:
|
EDIT: see tsizeof.c_sizeof => expose it |
we need to be able to macro c_sizeof(a: typed): int32 =
## Bullet proof implementation that works using the sizeof operator
## in the c backend. Assuming of course this implementation is
## correct.
result = quote do:
var res: int32
{.emit: [res, " = sizeof(", `a`, ");"] .}
res appears correct but in fact compiling wo -w gives:
edit: works inside proc but not at module block scope; is that a bug? EDIT: proc determineSection(n: PNode): TCFileSection =
result = cfsEmits # WAS: cfsProcHeaders
if n.len >= 1 and n[0].kind in {nkStrLit..nkTripleStrLit}:
let sec = n[0].strVal
if sec.startsWith("/*TYPESECTION*/"): result = cfsTypes
elif sec.startsWith("/*VARSECTION*/"): result = cfsVars
elif sec.startsWith("/*INCLUDESECTION*/"): result = cfsHeaders
proc genEmit(p: BProc, t: PNode) =
var s = genAsmOrEmitStmt(p, t[1])
if p.prc == nil:
# top level emit pragma?
let section = determineSection(t[1])
genCLineDir(p.module.s[section], t.info, p.config)
p.module.s[section].add(s)
else:
genLineDir(p, t)
line(p, cpsStmts, s) note: other name could be INLINE but that's overloaded |
var a: {.noinit.}: int
proc fun(): int {.async, inline.} = discard
{.push experimental: foo.}
=>
var a @noinit: int
proc fun(): int @async, inline = discard
@(push experimental: foo) |
we need a way to distinguish user defined pragmas and builtin pragmas otherwise introduction of new builtins (or user defined) could clash proc fun(): int {.!newbuiltin.} alternative: with 1st class pragma (eg nim-lang#13016) maybe all builtins can be exported from system (and therefore, still be technically overridable, which is sane) |
linksD20200416T133904 |
allow passing a path for cc eg: |
nim should have a way to show and update progress on same line without creating large terminal output, like zig (eg: |
links |
resumable iterator (eg if throws) |
|
|
the way to do it is via extending should we use distinct string or tuple? |
utility to make it easier to deal w compiler version, eg ctVersion or NimVer: see also: nim-lang#14648 |
|
|
|
KEY panic exceptions
links |
|
|
=> #479 |
int128_t
__int128
orint128_t
for compilers that support it (most compilers nowadays; TODO: what about MSVC?); should be fasterint128_t
(to be run on platforms that support it)The text was updated successfully, but these errors were encountered: