profile
viewpoint
If you are wondering where the data of this site comes from, please visit https://api.github.com/users/alaviss/events. GitMemory does not store any data, but only uses NGINX to cache data for a period of time. The idea behind GitMemory is simply to give users a better reading experience.

alaviss/liblinux_sched 3

A simple library that wraps the sched_* syscalls for musl libc to make schedtool work again.

alaviss/dnsstamps 2

Nim implementation of DNS server stamps

alaviss/adminTools 0

Simple, stupid tools for system administration

alaviss/baseimage-docker 0

A minimal Ubuntu base image modified for Docker-friendliness

alaviss/benchmarks 0

Some benchmarks of different languages

alaviss/c2nim 0

c2nim is a tool to translate Ansi C code to Nim. The output is human-readable Nim code that is meant to be tweaked by hand before and after the translation process.

alaviss/completely-unscientific-benchmarks 0

Naive performance comparison of a few programming languages (JavaScript, Kotlin, Rust, Swift, Nim, Python, Go, Haskell, D, C++, Java, C#, Object Pascal)

alaviss/cps 0

Continuation-Passing Style for Nim 🔗

alaviss/darkreader 0

Dark Reader Chrome and Firefox extension

Pull request review commentnim-lang/Nim

Add armv8l support (Closes: #18898)

 endif ifeq ($(ucpu),armv7hl)   mycpu = arm endif+ifeq ($(ucpu),armv8l)+  mycpu = arm64

Are you sure that it should be treated like arm64? It's rather weird to see toolchain reporting armv8l, I'm not sure if this means its an armv8 cpu in 32-bit mode or 64-bit mode. From this issue https://github.com/randombit/botan/issues/1543#issuecomment-382186505 it looks like it should be 32-bit, but I'm not sure.

FedericoCeratto

comment created time in 2 hours

PullRequestReviewEvent
PullRequestReviewEvent

push eventalaviss/nim.nvim

Leorize

commit sha ef00ec9665f75bc9163edf0c5f8f591d4195eca3

suggest/manager: more precise project locating algorithm - Make sure that the exact name `config.nims` and/or `nim.cfg` is matched for boundary detection. - Also search the folder at boundary depth 0 since its still a part of the project, it's only when boundary depth > 0 that the folder is separated from the project.

view details

push time in a day

PR opened nim-works/cps

update performance test to produce same result for both tests

Main changes:

  • howLong now uses MonoTime to calculate the diff. This is simpler and has less overhead than cpuTime, at least.
  • Iterator gains a yielded marker to distinguish between regular jumps and jield, with a convienence next() proc to advance the iteration.
  • Changed closure iterator test to one where the parameters are saved. This puts it inline with what cps does.
  • Tweaked the termination condition so that it is checked after the iteration is run, this is because an iterator "finished" state changes after it is run, so using the numbers without checking if it's produced by the iterator or its the default due to the iterator ending is error prone.

Currently CPS is 3.5x slower than Nim, tested on an AMD Ryzen 5 3600.

Ref #243

+36 -22

0 comment

1 changed file

pr created time in 2 days

create barnchnim-works/cps

branch : leorize-perf

created branch time in 2 days

issue openedkeepassxreboot/keepassxc

Secret Service will not be able to return any entries if the exposed group has search disabled

Overview

If the exposed group has searching disabled, then apps will not be able to look for secrets.

Steps to Reproduce

  1. Create a new group called "Keyring", with "Search" set to "Disabled".
  2. Enable Secret Service and expose "Keyring".
  3. Run secret-tool store --label=test attr test and enter any password.
  4. Run secret-tool lookup attr test

Expected Behavior

The entered password is returned.

Actual Behavior

Nothing is returned, secret-tool exit with status code 1 (entry not found).

Context

KeePassXC - Version 2.6.6

Qt 5.15.2 Debugging mode is disabled.

Operating system: Gentoo/Linux CPU architecture: x86_64 Kernel: linux 5.14.6-zen1

Enabled extensions:

  • Auto-Type
  • Browser Integration
  • SSH Agent
  • Secret Service Integration

Cryptographic libraries:

  • libgcrypt 1.9.4-unknown

Operating System: Linux Desktop Env: Gnome Windowing System: Wayland

created time in 3 days

issue commentalaviss/nim.nvim

External Libs (BASS) are highlighted bg-red although it compiles error-free

How did you install Nim and what version are you running? Are you using local deps mode?

Smarcy

comment created time in 3 days

issue commentalaviss/nim.nvim

External Libs (BASS) are highlighted bg-red although it compiles error-free

Have you tried restarting the editor?

If that works, then it's likely that you've installed additional packages while nimsuggest is running, and currently nimsuggest cannot detect changes to the NimblePath, thus the only way to solve this is to restart the editor or nimsuggest via :call nim#suggest#ProjectStop() | call nim#suggest#ProjectStart(). This is unfortunately a nimsuggest limitation and there is not much that I can do here. As for nimterop-based wrappers, Nim has banned external code execution within nimsuggest via staticExec which mean nimterop won't work very well in this environment.

If restarting doesn't work, then can you provide additional details on how your Nim is setup? If you use localdeps mode of nimble, then unfortunately nimsuggest is not aware of this by default.

Smarcy

comment created time in 3 days

PR merged alaviss/union

fix usage of generic types with union

Main changes:

  • Construct OrTy from getTypeImpl output, as getType will skip through generics and render those into the base type...
  • getTypeInstSkip is now implemented separately due to getType skipping generics all the way to the base type. An (un?)fortunate side-effect is that ntyAlias can no longer be skipped.
  • Misc fixes to change wrong usage of getType to getTypeInst

These issues were caught rather late due to my reliance on seq[int] and not noticing that those have special treatments due to being built-ins.

+101 -12

0 comment

8 changed files

alaviss

pr closed time in 7 days

push eventalaviss/union

Leorize

commit sha 36b23d561d6af66c825f34c09d0c202d9c3239e2

fix usage of generic types with union Main changes: - Construct OrTy from getTypeImpl output, as getType will skip through generics and render those into the base type... - getTypeInstSkip is now implemented separately due to getType skipping generics all the way to the base type. An (un?)fortunate side-effect is that ntyAlias can no longer be skipped. - Misc fixes to change wrong usage of getType to getTypeInst

view details

Leorize

commit sha 2b67282ad31cf5b64fbe2513239b566608395d2a

add more generic union construction tests

view details

alaviss

commit sha c97de90f89f076b3cb7038955bbede0c4744246c

Merge pull request #8 from alaviss/fixes/generics This pull fixes issues with instantiation of union types containing instantiated generics: - `union(Generic[int] | int)` can now be constructed - Fixed compile-time type `contains()` check with instantiated generics - Fixed `as` conversion from instantiated generics to union

view details

push time in 7 days

delete branch alaviss/union

delete branch : fixes/generics

delete time in 7 days

push eventalaviss/union

Leorize

commit sha 2b67282ad31cf5b64fbe2513239b566608395d2a

add more generic union construction tests

view details

push time in 7 days

PR opened alaviss/union

fix usage of generic types with union

Main changes:

  • Construct OrTy from getTypeImpl output, as getType will skip through generics and render those into the base type...
  • getTypeInstSkip is now implemented separately due to getType skipping generics all the way to the base type. An (un?)fortunate side-effect is that ntyAlias can no longer be skipped.
  • Misc fixes to change wrong usage of getType to getTypeInst
+87 -11

0 comment

8 changed files

pr created time in 7 days

create barnchalaviss/union

branch : fixes/generics

created branch time in 7 days

issue openednim-lang/Nim

sameType is not commutative

Example

import std/macros

macro sameTyp(x: typed, y: typed): untyped =
  echo sameType(x, y)

type G[T] = T

sameTyp(float(1.0), G[float](1.0))
sameTyp(G[float](1.0), float(1.0))

Current Output

true
false

Expected Output

true
true

Additional Information

$ nim -v
Nim Compiler Version 1.5.1 [Linux: amd64]
Compiled at 2021-09-19
Copyright (c) 2006-2021 by Andreas Rumpf

git hash: 6cd219c3a38c5f1a0712b0b5d07a3ea4ab02ff74
active boot switches: -d:release -d:nimUseLinenoise

created time in 7 days

issue openednim-lang/Nim

Typed type section macro doesn't work

Example

import std/macros

macro test(n: typed): untyped =
  echo treeRepr n
  result = n

type
  X {.test.} = object

Current Output

test.nim(8, 14) Error: invalid expression: X {..} = object

Additional Information

$ nim -v
Nim Compiler Version 1.5.1 [Linux: amd64]
Compiled at 2021-09-19
Copyright (c) 2006-2021 by Andreas Rumpf

git hash: 6cd219c3a38c5f1a0712b0b5d07a3ea4ab02ff74
active boot switches: -d:release -d:nimUseLinenoise

created time in 8 days

issue commentalaviss/nim.nvim

Vim

I don't know if any of the vimscript in here is compatible with vim, so I can't recommend using this plugin in vim. Alternatively zah/nim.vim is a popular option for vim users.

With that said, feel free to give it a go and if you have fixes for any feature in vim, I'll be happy to merge it (as long as it doesn't complicate the code too much).

89z

comment created time in 8 days

push eventdisruptek/cps

alaviss

commit sha 4861d3c70a29e41511e9a58990b55cd33244d4d0

make sure that the build job is always run Github docs said that it will run as long as the if predicate is true, however if none of the status function is present in the predicate, github will silently turn it into `success() && <expr>`. Added `always()` to solve this. See: https://github.com/actions/runner/issues/491

view details

push time in 8 days

PR opened disruptek/cps

disable path-filter on scheduled runs

We always want CI to run on scheduled events, so disable the filter there.

Additionally, make sure that the workflow continue even if the filter job failed, since it doesn't affect the later steps.

+3 -0

0 comment

1 changed file

pr created time in 8 days

create barnchdisruptek/cps

branch : ci-filter

created branch time in 8 days

push eventalaviss/union

Leorize

commit sha 020597f198430f48500c722a2ca153c80c4b40da

implements support for generic unions Currently relying on a compiler fix: https://github.com/nim-lang/Nim/pull/18860 This commit implements two main changes: - `ortraits.add` now use getTypeInstSkip so that it could skip through typedesc[T], which is what Nim fed the macro on generic instantiation - Support generic unions in routine definition context by generating wrapper types to defer instantiation, for example: proc foo[T](x: T): union(T | string) `union(T | string)` will be turned into: type `union(T | string)`[T] = union(T | string) `union(T | string)`[T] Moving the union invocation into a generic type makes Nim defer instantiation until `T` is instantiated, allowing us to support generic unions in routine definition context.

view details

Leorize

commit sha 4a1cb0184ae43da7fcc9d7078be5a80a17654cda

replicate the origin line info to types from getType This should give us better data of where the problem is with types generated by union.

view details

Leorize

commit sha 0efd58acca9309caffc0ed6fb3df2c83f3c6b922

update examples to use explicit type This is possible now that better generics support is available.

view details

alaviss

commit sha 6166732b6d82310f46ac9e08b13c92e509dbaa2e

Merge pull request #7 from alaviss/features/generics This pull implements two main changes: - `ortraits.add` now use getTypeInstSkip so that it could skip through typedesc[T], which is what Nim fed the macro on generic instantiation. - Support generic unions in routine definition context by generating wrapper types to defer instantiation, for example: proc foo[T](x: T): union(T | string) `union(T | string)` will be turned into: type `union(T | string)`[T] = union(T | string) `union(T | string)`[T] Moving the union invocation into a generic type makes Nim defer instantiation until `T` is instantiated, allowing us to support generic unions in routine definition context.

view details

push time in 9 days

delete branch alaviss/union

delete branch : features/generics

delete time in 9 days

PR merged alaviss/union

implements support for generic unions enhancement

Requires nim-lang/Nim#18860

The main star of the show is the support for generic unions within routine definition context, which is done via deterring instantiation.

proc foo[T](x: T): union(T | string)

union(T | string) will be turned into:

type `union(T | string)`[T] = union(T | string)

`union(T | string)`[T]

Moving the union invocation into a generic type makes Nim defer instantiation until T is instantiated, allowing us to support generic unions in routine definition context.

+332 -116

0 comment

6 changed files

alaviss

pr closed time in 9 days

issue commentnim-lang/Nim

std/segfaults doesn't raise (reliably?) NilAccessDefect on ARM64 Linux nor windows

in this case, should we close this issue as duplicate of #16415 ? /cc @alaviss were you using --gc:arc as well?

Nope, this is just a standard ./koch docs from nightlies CI.

alaviss

comment created time in 9 days

delete branch alaviss/Nim

delete branch : fixes/expr-in-generics

delete time in 10 days

PR opened alaviss/union

implements support for generic unions enhancement

Requires nim-lang/Nim#18860

The main star of the show is the support for generic unions within routine definition context, which is done via deterring instantiation.

proc foo[T](x: T): union(T | string)

union(T | string) will be turned into:

type `union(T | string)`[T] = union(T | string)

`union(T | string)`[T]

Moving the union invocation into a generic type makes Nim defer instantiation until T is instantiated, allowing us to support generic unions in routine definition context.

+332 -116

0 comment

6 changed files

pr created time in 10 days

push eventalaviss/union

Leorize

commit sha 0efd58acca9309caffc0ed6fb3df2c83f3c6b922

update examples to use explicit type This is possible now that better generics support is available.

view details

push time in 10 days

create barnchalaviss/union

branch : features/generics

created branch time in 10 days

PR opened nim-lang/Nim

semtypinst: don't wrap type nodes from expressions in static[T]

Fixes #18859

+18 -1

0 comment

2 changed files

pr created time in 10 days