Anyone written an Android app using Nim-generated Native code lately?

2022-01-05 Thread GordonBGood
@cmc: > Do let me know if that repo works again... I does work again, and you are welcome to try it, as it is a minimum way of generating a mostly-native-Nim-code based Android app. In my list of Android repos, there is also another sample version supporting call backs, and a reasonably major

Anyone written an Android app using Nim-generated Native code lately?

2022-01-05 Thread GordonBGood
@Hlaaftana, indeed, that was the major problem, although with that file replaced, there were also some other problems to do with compatibility with the latest Gradle build system (it is now required that activities have export be set to "true", and with a warning to do with compatibility with a

Made in Nim 2021 - your favorites?

2022-01-05 Thread xigoi
Since everyone is mentioning their own projects, I might as well: /

Made in Nim 2021 - your favorites?

2022-01-05 Thread gcao
Shameless plug for my project * [Gene](https://github.com/gcao/gene-new) a Lisp-like language with OOP support Here is [some sample code](https://github.com/gcao/gene-new/blob/master/examples/http_server.gene) that demonstrates its functionality. I was working on a more complete MySQL-bac

real type of openArray?

2022-01-05 Thread ElegantBeef
`openarray`'s type is `openarray`, sequences/array's can implicitly convert to a non typeclassed openarray parameter, internally an openarray is a `ptr T, len` which is important for allowing iteration over any array. Without openarray applying logic over `array[-10..0, int]`, `array[bool, int]`

real type of openArray?

2022-01-05 Thread doofenstein
openArray is not a type class, a proc which accepts an openArray (and doesn't have anything else which could make it generic) is not generic. Instead it's a type to which seq and array implicitly convert, the original type is lost, the same way after converting a float to an int you can't recove

real type of openArray?

2022-01-05 Thread oyster
the following code says x.type = seq[string] x.type is seq = true y.type = array[0..3, string] y.type is array = true in fn x.type = openArray[string] x.type is seq = false y.type = openArray[string] y.type is array = false

a thought about faster iteration

2022-01-05 Thread ElegantBeef
This almost matches what the "lazy sem" idea that was proposed does. The idea being it gathers all exported symbols and only sems the body on call, which means instead of semantically checking an entire file, you only semantically check what's used speeding up compile time of large libraries whe

Am I allowed to add this feature to stdlib module?

2022-01-05 Thread Niminem
Part of my work involves documenting and fixing 30X redirect chains for websites. For the longest time I've just been using Python, it allows me to get the "history" of a request as it makes its jump from URL to URL. Inspired by Python's capability, I've modified the `Response` type within the

a thought about faster iteration

2022-01-05 Thread cantanima
I'm not familiar with Nim's compiler internals, so someone correct me if I'm wrong (and I'm sorry if so), but: Nim's `import` isn't like C, which has loads every file you `#include`. When Nim `import`'s a module, it reads a symbol file. This is relatively quick. Nim can also `include` a file, m

Made in Nim 2021 - your favorites?

2022-01-05 Thread giaco
I liked and

tesseract in nim?

2022-01-05 Thread EyeCon
In case you speak German (or use English subtitles), take a look at this video for the mayhem this might cause:

Made in Nim 2021 - your favorites?

2022-01-05 Thread planetis
During 2021 I worked on: * [sync](https://github.com/planetis-m/sync) Useful synchronization primitives * [libfuzzer](https://github.com/planetis-m/libfuzzer) Thin interface for libFuzzer * [cowstrings](https://github.com/planetis-m/cowstrings) Copy-On-Write string type * [goodluck](http

Made in Nim 2021 - your favorites?

2022-01-05 Thread sekao
[puppy](https://github.com/treeform/puppy), [flatty](https://github.com/treeform/flatty), [chrono](https://github.com/treeform/chrono)...actually i think it would be easier to list which of @treeform's libraries i _don 't_ use :D

Made in Nim 2021 - your favorites?

2022-01-05 Thread kobi
I have been using Nim to create command line programs, as well as library functionality exposed with nimpy. Some of those programs participate in the lofty goal of helping to stop and raise awareness about Human rights issues in China, especially the persecution of Falun Gong. So Nim is already

a thought about faster iteration

2022-01-05 Thread kobi
I realize those things that sound simple are usually much more complex. But isn't it possible there are some easy gains, low hanging fruits by tweaking the order of code validation?

Made in Nim 2021 - your favorites?

2022-01-05 Thread tsojtsoj
Nalwald, a chess engine.

tesseract in nim?

2022-01-05 Thread cblake
Thanks for the link! I looked at a few examples and all I can say is that the defaults (or common settings) for whatever SW produces djvu from scans is very aggressive at "preserving uniqueness" as opposed to increasing resolution by averaging "quasi-same" glyphs together. E.g., the two 't's in

Made in Nim 2021 - your favorites?

2022-01-05 Thread moigagoo
Oh, there's also fidget! It's a shame we haven't heard about fidget 2 in a while, the project is awesome.

Made in Nim 2021 - your favorites?

2022-01-05 Thread moigagoo
* Enu * Nimib * Ansiwave * Turing Complete * cps (although I still don't really understand how it works and how to use it) I probably forgot something though. There have been many cool projects on my radar last year.

diff lib?

2022-01-05 Thread oyster
thanks. but how to take `space` into account. For a = "the quick brown fox jumped over the lazy dogs" b = "quic k brown fox jumped over the very busy dogs" Run please note that there are 2 `spaces` between `fox` and `jumped` in `b`. what I expected is that `space

diff lib?

2022-01-05 Thread oyster
yes, I have raise an issue

a thought about error messages

2022-01-05 Thread jasonfi
I agree the error messages are easy to search already. I think the error code approach dates back to when search wasn't that good and you needed to enter an ID into a help system, or find it on a single page.

Made in Nim 2021 - your favorites?

2022-01-05 Thread pietroppeter
What is your favorite 🪁 cool stuff made with Nim / ✨ nice articles about Nim / 🍰 great Nim libraries that came out in 2021? My personal top 7 (in no particular order): * [Turing complete](https://store.steampowered.com/app/180/Turing_Complete/) (game made with Nim, closed source, see [No

is computer online?

2022-01-05 Thread cblake
Opening a connection may be the most OS/deployment portable thing you can do to check for Wide Area Network access, but it is probably harder to optimize for network latency and the timeout for establishing connections can be pretty long - seconds even. Here is a faster idea that might only req

a thought about error messages

2022-01-05 Thread pietroppeter
👇💯 > In order to increase adoption, talk about Nim, produce videos, blog posts, articles.

a thought about error messages

2022-01-05 Thread Araq
In order to increase adoption, talk about Nim, produce videos, blog posts, articles. The error messages are already easy to search for as they are always in English and there is no i18n. (For this reason btw.)

is computer online?

2022-01-05 Thread xigoi
Just attempt the connection. There might be other reasons why it would fail (such as a firewall), so checking if there's an internet connection wouldn't work in some cases anyway.

nimsuggest Issue processing ``runnableExamples``

2022-01-05 Thread Araq
A proper bug report on nim-lang/nim would be preferred. Bugfixes can take months.

a thought about faster iteration

2022-01-05 Thread SolitudeSF
> a nice hack no such thing > first gather all imports what if some imports come from constant strings declared in other modules? or even generated from macros?

Strange problem when using Futhark

2022-01-05 Thread TKD
Thanks @PMunch. I'll try this now.

Strange problem when using Futhark

2022-01-05 Thread TKD
Thanks @ pietroppeter. I was just using gsl to test Futharks' C ffi. Once @PMunch gets it to be 100% fully operational, I believe it would be more sustainable and better for maintenance than just wrapping a library (if one has the choice).

a thought about error messages

2022-01-05 Thread kobi
Some languages, such as C#, assign an ID to the error messages the compiler produces. then the user can search for that ID and figure out exactly what it means. it has the added benefit, that in the case Nim reports an error message but that error is wrong for that use case, you can find that sp

a thought about faster iteration

2022-01-05 Thread kobi
I have noticed (basically seeing all the dots when nim compiles) that the compiler currently enters (compiles) all imports before checking the current file for even syntax mistakes. In addition, why enter the first import, if the second one possibly doesn't exist. I think a few such heuristics c

is computer online?

2022-01-05 Thread kobi
How to properly check in Nim, if my computer is online, before attempting to access the network. Is there a recommended way, or should I just attempt a connection and catch the exception if it fails?

Strange problem when using Futhark

2022-01-05 Thread pietroppeter
Note that there is already a wrapper for gsl available:

Strange problem when using Futhark

2022-01-05 Thread PMunch
That is because Futhark only imports the symbols found directly within the specified files. I plan to add a feature where it will import all symbols from files in a folder but until that lands you need to import the files manually. This means you need to figure out which header file actually def

nimsuggest Issue processing ``runnableExamples``

2022-01-05 Thread Clavismax
Will such contributions automatically lead to a bugfix or is there more to be done from my side? And if the fix comes. Is this usually a matter of days, weeks or months?

Strange problem when using Futhark

2022-01-05 Thread TKD
Thanks. That got rid of that problem but now it produces the error: : undeclared identifier: 'gsl_matrix_view_array' Run If it can find `gslSfBesselJ0` in the first example above, I see no reason why it cannot fined `gsl_matrix_view_array`. I have also tried specifying the

Strange problem when using Futhark

2022-01-05 Thread PMunch
Ah yes, this is a known limitation. Essentially the JSON generated to describe your C file is so big that the VM thinks it's encountered an infinite loop while parsing it. You can increase the limit as it says by passing something like `--maxLoopIterationsVM:1` to the compiler.

column value extraction

2022-01-05 Thread Clonk
First, I would not use `array[N, T]` for C interop but `ptr UncheckedArray[T]` instead. Usually database query returns a `string` or a `seq[string]` (when multiple values); a `string` in Nim a `string` can be used as a buffer and then it's up to the user to convert the result. See [db_sqlite g