Print why assert failed?

2021-08-13 Thread xigoi
Because the default `assert` has a different purpose than `check`.

How to respond to a key event in Jester?

2021-08-13 Thread jasonfi
Thanks, but how do I integrate this with Jester's event loop?

How to respond to a key event in Jester?

2021-08-13 Thread jasonfi
I like this idea at first, but if I have to change multiple files before a change works it could be a problem.

goalkicker.com and httpclient

2021-08-13 Thread AIR
That's very cool, @xigoi! Thanks for sharing, I didn't know about nimquery...

Print why assert failed?

2021-08-13 Thread alexeypetrushin
Thanks, yes it's possible to use other libraries, or even write my own `my_assert`. But wouldn't it be better if the default `assert` would be better?

Print why assert failed?

2021-08-13 Thread ElegantBeef
You can use `unittest.check` for a more descriptive message. import std/unittest let a = 1 b = 2 check a == b Run Outputs: /usercode/in.nim(5, 8): Check failed: a == b a was 1 b was 2 Run

Print why assert failed?

2021-08-13 Thread alexeypetrushin
The `assert` is very handy statement, but when it fails there's **no info why it failed**. let a = 1 let b = 2 assert a == b Run Error: Error: unhandled exception: /usercode/in.nim(4, 8) `a == b` [AssertionDefect] Run And whe

notification show

2021-08-13 Thread Kalbhairab
can there be support to show notifications of comment in our post.

what is positive number in nim called

2021-08-13 Thread Kalbhairab
for my case 0 is also fine but not negative number

goalkicker.com and httpclient

2021-08-13 Thread xigoi
Something like for b in html.querySelectorAll("div[class^='bookContainer'] > a"): let bookPage = client.getContent(site & b.attr("href")) let book = bookPage.parseHtml let header = book.querySelector("div#header"): fileName = header.innerText.replace("

goalkicker.com and httpclient

2021-08-13 Thread AIR
Would you be able to show an example of how you would achieve the same result using nimquery?

How to respond to a key event in Jester?

2021-08-13 Thread demotomohiro
Does [asyncfile](https://nim-lang.org/docs/asyncfile.html) work with `stdin`?

More Nim on more Microcontrollers!? (Arm CMSIS / Zephyr RTOS)

2021-08-13 Thread elcritch
@federico3 sounds like we're thinking along the same lines! It looks like it's mostly a place holder? In the discussions above, I created an [EmbeddedNim](https://github.com/EmbeddedNim) GH organization as we had multiple people interested in the topic. We have a handful of people who joined b

More Nim on more Microcontrollers!? (Arm CMSIS / Zephyr RTOS)

2021-08-13 Thread shirleyquirk
The `_IOM` etc expand to `volatile` or `volatile const` This can either be done with `codegendecl` or with `volatileLoad` and `volatileStore` from [volatile](https://nim-lang.org/docs/volatile.html)

More Nim on more Microcontrollers!? (Arm CMSIS / Zephyr RTOS)

2021-08-13 Thread Araq
> Would we ever be able to reproduce exactly this kind of struct in nim? > Why wouldn't we? It seems to use standard alignment, an ordinary object that has the same fields o

More Nim on more Microcontrollers!? (Arm CMSIS / Zephyr RTOS)

2021-08-13 Thread federico3
Months ago I created for embedded systems but also drivers for sensors, devices etc - perhaps we should have an official repository under instead?

More Nim on more Microcontrollers!? (Arm CMSIS / Zephyr RTOS)

2021-08-13 Thread elcritch
@auxym, thats cool! It'd be awesome to use a pure Nim layer for that. Unfortunately my tasks are mostly "get devices working" currently so it's not an area I'm able to play with much. I've run into issues with the whole {.bycopy.} before. Mainly just from not being sure how it works. Something

How to respond to a key event in Jester?

2021-08-13 Thread dom96
Better yet, port fsmonitor () to async/await and use it to detect when files change :)

How to respond to a key event in Jester?

2021-08-13 Thread Niminem
You can try `illwill`. It's a nice 3rd party lib that provides a non-blocking keyboard input, that might set you on the right path. example for usage illwillInit(false,false) # inits non-blocking keyboard input (params are for fullscreen, mo

How to respond to a key event in Jester?

2021-08-13 Thread ynfle
Try `stdin.realine` or something like that. Docs are at . It's automatically imported with the system module

How to respond to a key event in Jester?

2021-08-13 Thread jasonfi
I meant from the command line where the Jester server is running.

More Nim on more Microcontrollers!? (Arm CMSIS / Zephyr RTOS)

2021-08-13 Thread auxym
Cool! Following the CMSIS-SVD thing, I dug around on github and found this: Unfortunately, I ran it on the SVD for a SAMD21 (which is what I have on hand at work these days) and it did not produce compileable code (and I suspect incorrect too). I thought

How to respond to a key event in Jester?

2021-08-13 Thread jasonfi
Is it possibly to respond to a key pressed event in Jester? I want to write code to recompile/reload a web-service when the 'r' key is pressed.

How to respond to a key event in Jester?

2021-08-13 Thread juancarlospaco
https://github.com/karaxnim/karax#event-model

Weird import issue

2021-08-13 Thread alexeypetrushin
> Since you already called to_json with a string argument your later invocation > of it uses the previously created proc. Thanks, I see now, thanks. I couldn't imagine it could work this way :) > if you change proc to template your example will work as expected. Indeed, it works. Although I thi