Nim v2: what would you change?

2023-02-06 Thread cmc
Small one- in the times lib, scrap old initDatetime and rename inconsistently named datetime proc to initDatetime.

Quill - A nim js library for making text editors

2023-02-06 Thread Nlits
This is just a fun project I made while being frustrated at codemirror because of it's complexity. It is very open in how you use it, in-fact, the `draw` proc lets you insert DOM nodes directly, so you have all the freedom! [Quill](https://github.com/thatrandomperson5/Quill) is meant to be easy

nimqt - bindings to Qt

2023-02-06 Thread jerous
I don't know of any such libraries. I doubt they exist, as I have published nimqt only recently :) The first example in the README.me was indeed outdated. The examples in the `examples` directory, however, should all work. I forgot exactly why, but the `inheritable` pragma had to be after the o

Possible way for easy android app creation without JAVA!

2023-02-06 Thread curioussav
Yeah, I'm aware of other languages that run on the JVM. But I don't really have a problem with Java the language. It's not Java the language that makes Android a pain.

Possible way for easy android app creation without JAVA!

2023-02-06 Thread curioussav
Cool. Yeah that nimscript file is pretty much it!

Getting started with Nim on attiny85

2023-02-06 Thread PMunch
"small" is the keyword here. Both of those chips are super capable with tons of features. If all you need to do is read some sensors and handle some outputs the Attiny85 is a great little chip.

Getting started with Nim on attiny85

2023-02-06 Thread cmc
It has a nice web site and a pleasing demo on the first page! That counts for something. Don't worry, I expect plenty of swearing and hair-pulling later.

Getting started with Nim on attiny85

2023-02-06 Thread cmc
The application requirement is 'just slightly more functional than soldering logic transistors'. At my current stage of learning, things like radio and encryption are still Alien technogy.

Possible way for easy android app creation without JAVA!

2023-02-06 Thread grd
Are you also aware of the programming language Clojure?

大家好,有没有类似foldlIt的功能

2023-02-06 Thread fzqdoo
perfect, thanks

Getting started with Nim on attiny85

2023-02-06 Thread nasl
Is it really Attiny85? Probably depends on a project. At least for IoT the choice seems to be NordicSemi, Espressif ($3ea) as well as Pi Pico ($1ea).

Getting started with Nim on attiny85

2023-02-06 Thread PMunch
Polished might be a bit optimistic. Ratel is neat, but it should definitely improve. The idea behind it was simply to make a common interface for dealing with microcontrollers so that Nim could progress away from the "ugly shell script and lots of boilerplate" stage and into something a bit more

Getting started with Nim on attiny85

2023-02-06 Thread cmc
Oh wow I was expecting an ugly shell script and lots of boilerplate, not a polished project for writing idiomatic Nim code. I'm stoked.

Getting started with Nim on attiny85

2023-02-06 Thread PMunch
Hello! It's true that I've programmed the Attiny85 in Nim, but better yet I've written a library which helps with the process. [Ratel](https://ratel.peterme.net) runs on the Attiny85 (in the shape of a Digispark, but if you home-brew it the solution would be pretty much exactly the same). Simpl

Getting started with Nim on attiny85

2023-02-06 Thread cmc
Hello, everyone! I've been toying with some electronics lately, trying to reach more physical areas with my programming. I ruined a good few pieces of perfboard and some hapless parts in the process- it's funny how in hardware each of your learning experiences come with a size and weight attach

大家好,有没有类似foldlIt的功能

2023-02-06 Thread fzqdoo
The zero-functional package should have such a function, but I think it should be better to have a built-in

大家好,有没有类似foldlIt的功能

2023-02-06 Thread Hlaaftana
You need to do this: import sequtils type TWPT* = object x*: int y*: int var pts = @[TWPT(x: 0, y: 0), TWPT(x: 1, y: 1)] echo foldl(pts, a + b.x, 0) Run

大家好,有没有类似foldlIt的功能

2023-02-06 Thread fzqdoo
type TWPT* = object x*: int y*: int var pts = @[TWPT(x: 0, y: 0), TWPT(x: 1, y: 1)] echo foldl(pts, a.x + b.x) Run But this compilation fails, and an error is reported

大家好,有没有类似foldlIt的功能

2023-02-06 Thread scroot
你终于现身了

大家好,有没有类似foldlIt的功能

2023-02-06 Thread PMunch
`foldl` is already a template similar to the other `*It` templates. It's simply named this way because it doesn't have an `it` symbol and there is no non-template `foldl`.

大家好,有没有类似foldlIt的功能

2023-02-06 Thread fzqdoo
Hello everyone, is there a function similar to foldlIt var numbers = @[1, 2, 3] echo foldl(numbers, a+b) This works fine and is equal to 6 Run But the following compiles and reports an error type TWPT* = object x*: int y*:

Possible way for easy android app creation without JAVA!

2023-02-06 Thread PMunch
Some other interesting Nim on Android projects include: and the former looks at interfacing with the JNI and the latter looks at building apps without the Java SDK at all. The `hellomello` sample has some JNI co

Possible way for easy android app creation without JAVA!

2023-02-06 Thread planetis
Also worth mentioning but I don't know what's the status of this, would love to know if someone tried it.

Interface C++ objects with `wasMoved`?

2023-02-06 Thread planetis
No this is about threading/channels. Did you tried the example and it doesn't crash on devel? I tried to explain my reasoning here But basically somehow the implementation got changed from the original code in weave (can't find any commit messag

Possible way for easy android app creation without JAVA!

2023-02-06 Thread planetis
I have seen this repo/video before, and the build system [here](https://github.com/planetis-m/raylib-game-template/blob/master/build_android.nims) does exactly that using the latest Android NDK/SDK. There is also a [config.nims](https://github.com/planetis-m/raylib-game-template/blob/master/src/