idea : reuse libraries from other languages

2023-10-09 Thread kcvinu
`cpython` looks nice. I just installed it, but I couldn't find any examples in github page.

GUI program is not working when using app:console in version 2.0

2023-10-09 Thread kcvinu
Update: It is working, but only with `--mm:boehm` and `--mm:arc`. Not with orc & arc. And another strange thing, It is not running when we double click the exe file in explorer. But it will run if open a cmd window in that directory and run the program from cmd.

GUI program is not working when using app:console in version 2.0

2023-10-09 Thread kcvinu
Oh sorry, it was just a typo. I used `--app` in my cmd.

GUI program is not working when using app:console in version 2.0

2023-10-09 Thread kcvinu
Hi all, I just faced a strange problem. I was used version 1.6. Now I decided to update my Nim version to 2.0. But after updating, my GUI program is not running. It is compiled successfully, but it is not running. The compiler command I was used at that time was `nim c -r app:console filename.ni

Nimforms - A simple GUI library for Windows

2023-04-16 Thread kcvinu
> doesn't work for me Any error messages ? Or any images ? It will be easy to understand what the problem is. What you said about GUI libraries is quite amateurish. I had similar thoughts in the beginning. I sent a mail to the creator of Python in 2010. Asking if a language without a visual GU

Nimforms - A simple GUI library for Windows

2023-04-16 Thread kcvinu
@mx1990, manifest file added to the repo. Just download it and place on your exe location. But remember one thing. The name of the manifest fie and exe file must match. For example, if your exe file's name is `app.exe`, then your manifest file must be `app.exe.manifest`. Otherwise it won't work.

Nimforms - A simple GUI library for Windows

2023-04-16 Thread kcvinu
Now i found the issue. You need the manifest file in your exe's location. I will upload the manifest file in my repo. You just need to place it near your exe file.

Nimforms - A simple GUI library for Windows

2023-04-14 Thread kcvinu
After finishing this project, I am planning to take a look on SDL library.

Nimforms - A simple GUI library for Windows

2023-04-14 Thread kcvinu
Sorry, but that link is not opening. It says "This site can’t be reached. ibb.co took too long to respond"

Nimforms - A simple GUI library for Windows

2023-04-13 Thread kcvinu
Let me try to find out what is happening there. Please show me a screenshot.

Nimforms - A simple GUI library for Windows

2023-04-13 Thread kcvinu
Thank you. I love to create compact and simple stuff.

Nimforms - A simple GUI library for Windows

2023-04-13 Thread kcvinu
@mx1990, What is your OS. I wrote and tested this lib only in x64 WIndows 11 & 10.

Nimforms - A simple GUI library for Windows

2023-04-12 Thread kcvinu
@pp, You're welcome.

Nimforms - A simple GUI library for Windows

2023-04-12 Thread kcvinu
@treeform, createHandle is the function where the actual call to CreateWindowEx is happening. Users can change the default values of any control right before it is created. But yeah, if you think calling createHandle too much time is annoying, I can add a boolean parameter to the constructor. If

Nimforms - A simple GUI library for Windows

2023-04-11 Thread kcvinu
Hi all, I am happy to introduce my first Nim project. Nimforms - A simple gui library for Windows, based on win api functions. Here is the github link -

Nimforms - A simple GUI library for Windows

2023-04-11 Thread kcvinu
Thank you @PMunch for your good words.

Original source of Mingw64

2021-12-24 Thread kcvinu
Hi Nim team, At the Nim download page, there is a link to mingw64. Which is the original source to that mingw64 ? I need to make sure I am downloading the same.

Nim interact with Windows .NET Frameworks

2021-12-13 Thread kcvinu
> I am DocX user. But I did it in completely VB .Net. Anyhow, I am interested > in knowing how to work with .net dlls in Nim and vice versa.

What is 'block' in this code

2021-12-10 Thread kcvinu
I got same result from the page you mentioned.

What is 'block' in this code

2021-12-10 Thread kcvinu
Thanks for the reply.

What is 'block' in this code

2021-12-10 Thread kcvinu
Thanks for the reply. When I search with "block" I got this result search results NimNodeKind.nnkPragmaBlock RstNodeKind.rnCodeBlock RstNodeKind.rnLineBlock RstNodeKind.rnLiteralBlock RstNodeKind.rnQuotedLiteralBlock htmlgen: blockquote(e: varargs[untyped]): untyped htmlparser: BlockTags thread

What is 'block' in this code

2021-12-08 Thread kcvinu
Hi all, I saw this code in Nim manual. template t(body: untyped) = proc p = echo "hey" block: body t: p() # compiles Run I did some search in manual with the keyword "block" but didn't find any useful hint. What is this block keywor

This Month with Nim: November

2021-12-01 Thread kcvinu
Is it possible to play with xidoc without Nimble ?

Macros: why and/or when to use them?

2021-11-30 Thread kcvinu
Actually, my project was a GUI library based on win32 API. I have stopped it when I knew the limitations in modularity. Then after a few months, I've started it again with making benefit from "include" statement. In this method, All I need is to plan my code as a single file and properly order m

Macros: why and/or when to use them?

2021-11-29 Thread kcvinu
I know that the people behind Nim doesn't like when I said, "Hey there is a problem in modularity". So I stated it in good words. If I say, it's my problem, they will say, "Okay then learn how to solve it." But I know that I don't have any problem in modularity in other languages. I know they ar

Macros: why and/or when to use them?

2021-11-27 Thread kcvinu
This is the rule which works for me because I don't know anything about macro and template. If a proc works, use a proc. Elif, make a problem-specific solution. Else drop the project and start with another language.

Preview of coming attractions?

2021-11-17 Thread kcvinu
// I don't personally mind forward declarations and the lack of cyclic imports but we'll get a solution for this too. // Eagerly waiting for this. I request your attention to D's "package" scope. It will be a good idea. If we declare a type with package level scope, the entire project can see th

New here

2021-11-03 Thread kcvinu
I think he is implicitly stating that Nim needs a nice introductory book like Python Crash Course 2nd Edition.

wNim - Nim's Windows GUI Framework

2021-08-10 Thread kcvinu
It's quite easy to work with win32 API in Nim. You can use CreateWindowEx function for creating a window. But you need to use few other win api functions for that. Like GetModuleHandle, RegisterWindowEx, LoadIcon, LoadCursor, CreateSolidBrush, ShowWindow, UpdateWindow, GetMessage, TranslateMessa

Mac GUI

2021-08-02 Thread kcvinu
Hi, Thank you for your expressions of sympathy. Well, Coca is different from Win32 API. Your current implementation seems very good. It took lot of boilerplate code from a Nim user. Thanks for your effort.

Mac GUI

2021-08-01 Thread kcvinu
@AIR, Assume that I have a button. I want to add a click event handler and a mouse enter event handler for the same button. In my Windows GUI lib (Not completed though), every control has different events. And you can set like this. var win = newWindow() win.create() # Will

How to rewrite nim programming langauge to be pythonic as possible?

2021-07-31 Thread kcvinu
Wow ! Sounds good. I wish I can write a class in pure python style. I know that Nim can do that with the help of some macros but I don't prefer macros. It is good for a language to have the ability to do the most basic things without any macros. What will be the name ? Nimthon ? ha ha :)

Mac GUI

2021-07-30 Thread kcvinu
I apologize for not writing clearly what I meant. I meant how to connect a MouseEnter event handler or a MouseLeave event handler along with a Click event. To be frank, how to connect two different event handlers to a single control (widget)

Mac GUI

2021-07-29 Thread kcvinu
Wonderful !! Now, one can easily create a mac gui with this library. The code is straight forward and neat. I wish Windows had a gui lib like this too. I know there are plenty of gui libs for Windows. But none of them are expressive like this. This is a a simple aproach. I have a question. How d

Performance comparison of various compilers

2021-05-23 Thread kcvinu
Try D with DMD compiler. It is the fastest I think. I have same project in Nim & D. When I hit run button, D project compiles and run first.

How to solve type mismatch error ?

2021-05-17 Thread kcvinu
@kaushalmodi, Thanks for the reply. It worked well. All calculation in uint except the subtraction.

How to solve type mismatch error ?

2021-05-17 Thread kcvinu
@exelotl, Thanks for the reply. Problem solved. This is the code. r = (c1.red.int + ((i * (c2.red - c1.red).int / loopEnd)).int).uint g = (c1.green.int + ((i * (c2.green - c1.green).int / loopEnd)).int).uint b = (c1.blue.int + ((i * (c2.blue - c1.blue).int / loopEnd)).int).u

How to solve type mismatch error ?

2021-05-17 Thread kcvinu
Hi all, I need to do some arithmetic ops like this. var loopEnd : int = 300 for i in 0 ..< loopEnd var r,g,b : uint r = cast[uint](c1.red + (i * (c2.red - c1.red) / loopEnd )) Run But I am facing type mismatch errors. Which is the correct data type for

How to check a function pointer type with if statement ?

2021-05-07 Thread kcvinu
@Araq, Thanks a lot. I don't know why this idea didn't came to my mind. I am so stupid. I was trying with something like "is" and "repr". :)

How to check a function pointer type with if statement ?

2021-05-07 Thread kcvinu
Hi all I have a function pointer type like this. type FuncPtr = proc(x : int) type Sample = ref object of RootObj fPtr : FuncPtr # other members var smp = newSample() # Now, i need to check fptr contains any valid function pointe

What is happening under the hood of "cast" function ?

2021-04-07 Thread kcvinu
@shirleyquirk Thanks for reply. I've never used "packed" pargma since i read in Nim manual that it should not be used with GC'ed memory (ref's).

What is happening under the hood of "cast" function ?

2021-04-07 Thread kcvinu
@Stefan_Salewski > Have you managed it? No, That was just my thought. Actually, i tried this. type RgbColor* = tuple[red: int, green : int, blue : int] Run This is my Color type. But, after reading your reply, i think it's good to change it to int8. And this

What is happening under the hood of "cast" function ?

2021-04-07 Thread kcvinu
Oh, I missed it. It's very clear. No doubts. When asking this question, converting a tuple with 3 int elements to COLORREF was in my mind. Have read about the "Mantissa" in a YT video few month ago, but I felt that's a tough subject.

What is happening under the hood of "cast" function ?

2021-04-05 Thread kcvinu
Hi all, Almost all programming languages i met are using "cast" function to convert data types. I wonder what is happening under the hood of this so called "cast" function. I am sorry if i misuse the word function here. can anyone could explain it ? Thanks in advance.

object variants and field names

2021-04-04 Thread kcvinu
So, what is the final decision of that discussion ? Whose proposal won ?

This Month with Nim: March 2021

2021-04-02 Thread kcvinu
Nimib is superb !!.

AutoNim [AutoIt X3 wrapper]

2021-04-01 Thread kcvinu
Thanks a lot for this effort. I am huge fan of AutoIt and i am using the AutoItX3 lib in my vb.net projects. Now, i can use them in Nim too. :)

How can I use SendMessage?

2021-03-31 Thread kcvinu
Try this var cds: COPYDATASTRUCT cds.dwData = 0 cds.lpData = "Hello World" cds.cbData = len(cds.lpData) + 1 Run

Some suggestions about Nim play gorund and Nim forum.

2021-03-18 Thread kcvinu
There are few silly things i want to draw your attention. 1\. Nim play ground. > If we increase font size in Nim play ground, the cursor starts behaving weird. 2\. Nim forum. > a) When we want to type a reply to someone, we will click the "reply" button > on forum. This will pop up the reply t

There are a Nim Linter for SublimeText?

2021-03-11 Thread kcvinu
Welcome to Nim forum. I am also using ST3. And as JohnAD said, i too feel the intellisense sucks. I don't know why. Why i am using ST3 instead of VSC, is the starting speed and performance. Happy to know that you are also a fan of D. High five, a D fan here.

How to embed objects in another objects

2021-03-07 Thread kcvinu
Sorry for introducing a D feature in Nim forum. I am always a fan of simple programming. If you can do the magic in one line of code, i will call it simplicity. There are lot of simple things in Nim. Great language with ease of use. But unfortunately, i am not a fan of macros in Nim. May be beca

How to embed objects in another objects

2021-03-07 Thread kcvinu
There is a feature in D. struct ElectricCar { int batterySize ; alias batterySize this ; // This is the magic line } // usage auto ec = ElectricCar() ; ec = 25 ;// now ec.batterySize will be 25. Run

Question about using "include"

2021-02-20 Thread kcvinu
Yes. Its like write all your code in a single file and split it into multiple files. Well, i was searching for an option to get rid of circular module dependency problem.

Question about using "include"

2021-02-20 Thread kcvinu
Wow ! Thats strange but interesting. Thanks for the answer.

Question about using "include"

2021-02-20 Thread kcvinu
Hi all, Lets assume that i have a 3 nim source files like this. #file1.nim var v1 : int = 1500 #--file1 ends here--- #file2.nim var v2 : int = 2500 #--file2 ends here--- #file3.nim include f

How to declare function pointer type ?

2021-02-19 Thread kcvinu
Hi shirleyquirk Thanks for the answer. :)

How to declare function pointer type ?

2021-02-19 Thread kcvinu
@SolitudeSF Yes, that's what i wanted. type fnPtr = (int, int) Run I want something like this. A function with 2 int params and no return value.

How to declare function pointer type ?

2021-02-19 Thread kcvinu
@Clonk, Thanks.

How to declare function pointer type ?

2021-02-19 Thread kcvinu
Hi all, I saw this code in SO to declare a function pointer. (int -> int) Run But how do i declare a function pointer of a function with no return type and more than one parameter ? Thanks in advance.

Objects for "classes" with ref or without?

2021-02-04 Thread kcvinu
That seems a complete reference of language. I like it. All info in one page. Thanks for the effort.

Exploring namespaces support in Nim

2021-02-03 Thread kcvinu
I think this will fix one of my haunting problems.

Nim interact with Windows .NET Frameworks

2020-12-18 Thread kcvinu
Wow !!! That's great. I would love to work with Nim with CLR because VB .Net is my favorite.