How can nimqml being used with docker?

2022-11-26 Thread filcuc
again what do you mean? 1. do you mean compile an app through docker? this is done by the CI so look at the code in the github actions 2. DOtherSide doesn't take long to compileit could take long if you have pre i5/i7 cpu otherwise it may take a minute or two. But againif you compil

Where to start with creating direct Qt bindings?

2022-10-23 Thread filcuc
Disclaimer: i'm the author of `NimQml <https://github.com/filcuc/nimqml>` Did anyone give it a try? why wrapping all Qt when you have the Nim standard library? Qt is full blown framework because there wasn't one for C++ at the time and the C++ standard library lacked of a lot s

GUI: Nim + QML unable to compile

2022-06-03 Thread filcuc
Sorry for the delay but i'm not alway following the forum topics. Better to ask this kind of questions directly on github. That said you have 3 options: 1. Modify your /etc/ld.conf for adding /usr/local/lib to dynamic search path (see

strange behavior of generic `=destroy`

2022-04-10 Thread filcuc
Keep in mind che imho the ARC/ORC are basically broken at the moment and probably that's why refc it's still the default GC. I experienced compiler crashes (internal error) Finalizers not called with forward declarations:

Destructors doc confusing

2022-01-24 Thread filcuc
Sorry it's my fault but i still don't quite understood it...maybe i can grasp it more with a C++ example. I don't get what do you mean with half a move and also the pair of sink/wasMoved. Regarding the fact that overriding a hook implies being on your own: is there a reason why C++ destructors

Destructors doc confusing

2022-01-24 Thread filcuc
Another question: 1) Should a type `=destroy` hook call its fields `=destroy` hooks? type A = object field1: string proc `=destroy`(dest: var A; source: A) = // // here call to field1 `=destroy` // . Run

Destructors doc confusing

2022-01-24 Thread filcuc
Further questions are: 1) What happen in case of two types A and B where B extends A and both define a `=destroy` hook. Something like type A = object proc `=sink`(dest: var A; source: A) = ... type B = object of A ... proc `=destroy`(d

Destructors doc confusing

2022-01-24 Thread filcuc
Every now and then i tried to re read the destructors documentation at but i always find it confusing. The most confusing part is the =sink documentation where basically it's explained that resources are stealed from the source and injected in the destination. That makes perfect sense. However t

Setting finalizer on object hierarchy won't compile with --gc:arc

2022-01-20 Thread filcuc
There're several options. Yes as you say we could add a v1/v2 compile time switch to use the "old" v1 finalizers way and then add a v2 version with destructors. That said i think we just need to wait for an answer from someone like @araq. If i'm not wrong (and recall correctly) finalizers should

Setting finalizer on object hierarchy won't compile with --gc:arc

2022-01-19 Thread filcuc
The problem original problem is with finalizers and arc. Not destructors and refc. Usually refc seems to work fine with both destructors/finalizers

Setting finalizer on object hierarchy won't compile with --gc:arc

2022-01-19 Thread filcuc
Honestly i don't get why it should not work conceptually. Child and Parent are two diffrent types each one with its own finalizer/destructor.

How to dynamically link LGPL nim library to closed-source nim application?

2022-01-16 Thread filcuc
@giaco if you are referring to NimQml, since i'm the author, i'm fine in adding an exception to allowing static linking. The usage of LPGL was for forcing publications of the library not preventing closed source usages. Write and issue in the NimQml github.

NimQml v0.9.0

2021-05-01 Thread filcuc
thank you

NimQml v0.9.0

2021-05-01 Thread filcuc
Just a quick update that we released a new version of the [NimQml](https://github.com/filcuc/nimqml) library updated to [DOtherSide](https://github.com/filcuc/dotherside) This release brings QObject signals and slot connections. See the examples [here](https://github.com/filcuc/nimqml/blob

Multi-threaded features needed for Server

2021-04-21 Thread filcuc
Injecting in this thread for giving my 2 cents on the threading issues with NimQml. Right now i'm still not haved properly found a way to properly allow a user to give a reference to a QObject in another thread (i would like in some sort of weak_ptr) and allow the execution on a lambda in a diff

Channel / Actors based parallelism? Are there such Web Servers?

2021-03-12 Thread filcuc
imho i would never use async (probably i'm too old ) but i prefer the actor model with message passing. This for a couple o reasons: * When you start using async it creeps everywhere * The use of actor + message passing clearly state the boundaries * Async IMHO makes you forget that after y

Status Desktop - private messenger and more using Nim + QT

2021-02-10 Thread filcuc
Thanks for the credits for NimQml and i'm very happy that it helped you. Btw i'm very close to push QObject::connect in NimQml for connecting signals between QObject in Nim or C++/Qml and Nim lambdas.

Traits or macros for inspecting proc/lambda/functor type

2021-02-04 Thread filcuc
Are there macros/traits for inspecting a proc function pointer type? Examples: 1) Being able to iterate on each argument type template foo(f: proc(int)) = for typ in f.argsTypes: // do something with the type Run 1. Having the number of arguments

Objects for "classes" with ref or without?

2021-02-03 Thread filcuc
i didn't read your guide (but i'll). I was just pointing out methods for easy reference for the original author

Objects for "classes" with ref or without?

2021-02-03 Thread filcuc
If i'm not wrong you need to use ref if you use methods (aka runtime dispatching) istead of procs

nimqml's abstractitemmodel example is unclear to me

2020-10-08 Thread filcuc
I answered in the GitHub issue. That said setup and delete function are basically constructor and destructors. Nim doesnt have the classic OOP features and automatic calls to base class constructors. Thus when subclassing you must make a direct call to the base class constructor (setup in nimqml

How to implement a single table that all threads can access?

2020-08-06 Thread filcuc
Possible solutions: * manual GC ref / unref * use deepcopy with mutex * use ARC and latest nim

How to implement a single table that all threads can access?

2020-08-06 Thread filcuc
Use a mutex

Is it necessary to extract the content of a Table into a sequence for ordering

2020-07-23 Thread filcuc
Or use a sorted Seq and binary search

ARC: Calling default destructor of embedded field from a destructor

2020-07-22 Thread filcuc
Is there a document with ARC rules? I mean this comes as a surprise for a user that knows c++ destructors