asyncdispatch debugging

2023-07-08 Thread takekikuchi
Sorry for the late reply. It seems that asyncdispatch does not have the ability to track status. I will take a look at the internal implementation of chronos you mentioned. However, I'm currently using nmqtt etc. and cannot switch to chronos right away.

W3C Compliant HTML Parser to replace current std/htmlparser

2023-07-08 Thread nrk
To some degree; but not extensively. I heavily use it for interpreting HTML content in some private projects (using DOMParser.parseFromString from cha -r), so I have probably caught the most obvious errors by now. But it has no proper testing yet. An integration of [html5lib-tests](https://gith

W3C Compliant HTML Parser to replace current std/htmlparser

2023-07-08 Thread Niminem
This is great. Please do! Has this parser been stress tested?

Ferus -- a tiny web engine written in Nim

2023-07-08 Thread xTrayambak
Hello again! I've actually started work on integrating cssgrid with Ferus' current layout engine. You can find the progress here (branch cssgrid-layout), I also removed a ton of dead code in the process.

W3C Compliant HTML Parser to replace current std/htmlparser

2023-07-08 Thread xTrayambak
Chawan's HTML parser is really nice, it'd be nice if a few maintainers could be allocated to work on it in the stdlib itself, this could even be a really good selling point for Nim, but alas, HTML parsers are not all that easy to maintain on par with the standards and the quirks of the past.

Ferus -- a tiny web engine written in Nim

2023-07-08 Thread xTrayambak
I've also started overhauling ferushtml with WHATWG in mind, using your parser as a base to look at whenever I'm confused. Again, thanks for telling me about your project!

Wishlist: Ideal UI library for Nim

2023-07-08 Thread xTrayambak
GLFW isn't a graphics library, it's job is to handle windowing, not render to the screen. You use OpenGL for that, and something like pixie, cairo or skia to handle stuff like fonts and layers for you.

Wishlist: Ideal UI library for Nim

2023-07-08 Thread xTrayambak
Woops, meant to mention @Nerve, not Araq.

Raspberry Pi 1B - nmqtt - exit code 137

2023-07-08 Thread mantielero
I managed to make it work with the following line: nim c --cpu:arm --os:linux --cc:clang --os:linux --clang.exe="zigcc" --clang.linkerexe="zigcc" --passC:"-target arm-linux-musleabi -mcpu=arm1176jzf_s -fno-sanitize=undefined" --passL:"-target arm-linux-musleabi -mcpu=arm1176jzf_s"

Why iterator doesn't work?

2023-07-08 Thread alexeypetrushin
Thanks, templates are enough for my use case.

Why iterator doesn't work?

2023-07-08 Thread nrk
How about a template? import std/tables type Record = object tags: seq[string] Db = object records: seq[Record] template stats*(records: iterable[Record]): CountTable[string] = var res: CountTable[string] for record in r

Suggestion to improve proc type infer, and some complains

2023-07-08 Thread alexeypetrushin
Thanks for suggestion, I was going to explore other templates a bit later, in v2.

Suggestion to improve proc type infer, and some complains

2023-07-08 Thread Araq
But to be fair, if a recompile takes 17 seconds, you really do have a problem. You copy Karax's DSL which keeps compile-times low and catches typos in the HTML tags at compile-time too. Your `el "foobar"` is not good enough, sorry.

Suggestion to improve proc type infer, and some complains

2023-07-08 Thread Araq
> but it contributes a lot if you look at it from the point of App Development Nah, you're just obsessed with syntactic details and you try to justify it retrospectively. It's a very human thing to do but it's completely unconvincing to me.

Suggestion to improve proc type infer, and some complains

2023-07-08 Thread alexeypetrushin
Different projects require different tools. Approaches used for 1) Low-Level and System Programming are different from 2) High-Level and Application Development. Nim community is heavily biased towards 1 kind of projects. And topics like Zero-Overhead, GC, Soft-Realtime, etc. cause lots of disc

Why iterator doesn't work?

2023-07-08 Thread alexeypetrushin
How to make code below to work? import std/tables type Record = object tags: seq[string] Db = object records: seq[Record] proc stats*(records: iterator(): Record): CountTable[string] = for record in records(): for tag

W3C Compliant HTML Parser to replace current std/htmlparser

2023-07-08 Thread nrk
I am indeed planning to isolate Chawan's html5 parser into a separate library. Right now I'm evaluating the best way to write an API that doesn't involve bringing in half of Chawan as a dependency; preferably it would work similarly to [html5ever](https://github.com/servo/html5ever), so you coul

Raspberry Pi 1B - nmqtt - exit code 137

2023-07-08 Thread Araq
> is this assertion valid in cross-compilation situation? I think so, yes.