Giter VIP home page Giter VIP logo

assigns's Introduction

If you want to support my work please consider sponsoring (no fees) or donating via Buy Me a Coffee. Being a student in Turkey, any amount means a lot.

Links

  • Sponsor
  • Buy Me a Coffee - another way of donating alongside sponsoring
  • Codewars - ranked in many languages, highest ranked in order are Ruby, Julia, Python, Rust, Nim, Java, Groovy, C++, Crystal

Projects I'm currently working on/intend to maintain:

Projects
Nim personal contributions to the Nim programming language
margrave Markdown dialect
abyzou in development scripting language
Nim libraries see below
Nim libraries
Nim libraries installable with nimble (nimble install <url>)
applicates first-class templates/symbols
knot tie compile-time values to types under names
margrave portable and configurable parser for a markdown dialect
nuance runtime nim AST generation with line info for later compilation
lispnim lisp syntax for nim using nuance
grab inline package installs (like Groovy @Grab)
assigns overloadable pattern matching
sliceutils slice/range abstractions
skinsuit stackable utility macros for object variants
spread block syntax for calls/literals/constructors
dirtydeeds sugar for partially applied calls
shorteststring word-size string
etf erlang term format
niv/websocket.nim (co-maintainer)
funnycapitalism (inactive) barebones Discord library
nashorn (inactive) nim wrapper for Nashorn JS runtime on the JVM
nimedscript (inactive) nim wrapper for EdisonScript in FL Studio

* bold: on the nimble package registry, can be installed with nimble install <name>

Other past projects (archived or sporadically maintained):

other date
kismet first programming language, for embedding in the JVM 2016-
fup1 tetris for web and desktop using SDL2 in Nim 2021
wobby 2D platformer engine and level editor in Groovy/Swing 2017-2018
technocracy starter demo for a game idea I had in Groovy/Swing 2018
DiscordG early wrapper for the Discord bot API in Groovy 2016-
lolhr Discord bot account client to learn JavaFX 2018

assigns's People

Contributors

metagn avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

assigns's Issues

custom example not working for me (error on ?x)

Hi, nice work.
I was testing the examples in the readme and found an issue with last (custom type) example:

import definesugar

type Result[T] = object
  case success: bool
  of true:
    value: T
  else:
    error: ref Exception

import macros
macro define[T](lhs; rhs: Result[T]): untyped =
  if lhs.kind == nnkPrefix and lhs[0].eqIdent"?":
    let tmp = genSym(nskLet, "tmpResult")
    # openDefine means use any custom overload of define for the rest
    let asgn = openDefine(lhs[1], newDotExpr(tmp, ident"value"))
    result = quote do:
      let `tmp` = `rhs`
      if not `tmp`.success:
        raise `tmp`.error
      `asgn`
  else:
    # defaultDefine is a proc(NimNode, NimNode): NimNode and is what is applied by default if no overload is found
    result = defaultDefine(lhs, rhs)

let successful = Result[int](success: true, value: 5)
?x := successful
echo x # 5

I have error on compilation (Nim Compiler Version 1.4.0 [Windows: amd64]):

Error: identifier expected, but found '?x'

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.