Re: [offtopic]2 cross-platform GUI library

2020-07-11 Thread oyster
on windows. I have tested the following: wNim, which is an alive one among what I have tested and is updated now and then. it supplies many common controls. it can produce tiny size application, but only for windows. I like its autolayout DSL very much, which lets us do the layout in a very bri

Re: [offtopic]2 cross-platform GUI library

2020-07-11 Thread oyster
thank you for pointing out sciter. although it looks nice, I found the document or tutorial is lack, at least for python/nim language.

[offtopic]2 cross-platform GUI library

2020-07-11 Thread oyster
1\. [https://github.com/lc-soft/LCUI](https://github.com/lc-soft/LCUI) LCUI is a C language UI lib which uses XML and CSS to describe interface structure and style. As a result, the UI can be more beautiful. 2\. [https://github.com/ying32/govcl](https://github.com/ying32/govcl)/ a Golang GUI wh

ways to comunicate between different application

2020-03-26 Thread oyster
I am using windows OS. For example, a GUI application is written in nim, in which I choose a lot of excel files to be processed, input the column name in excel files to be read, choose a destination output file name; then these parameters are passed to another application in Python. The Python

Re: Recommended GUI library?

2020-03-18 Thread oyster
the choice depends on your desire heavily. if you just need some button, dialogue box, most of the gui lib maybe work. but if you need grid/cell, web browser and math/latex, only maybe the famous wxdigets/qt, and not so famous iup can work.

Re: Recommended GUI library?

2020-03-18 Thread oyster
there is a C interface to fltk by D. J. Peters for freebasic language. But since dynamic library is supplied, we can use FLTK-C in other language. As a result, I translate the rich freebasic examples into nim. You can check it at [https://github.com/retsyo/FLTK_nim](https://github.com/retsyo/FLT

strformat, use a variant as format specifier?

2020-03-17 Thread oyster
as we all know, both of import strformat var i = 16 echo fmt"{16:x}" echo fmt"{i:x}" Run print 10 now, is it possible to use the format specifier in variant f? None of the following is corrected import strformat var

how to deal with C string with \0?

2020-03-01 Thread oyster
As [https://docs.microsoft.com/en-us/windows/win32/api/fileapi/nf-fileapi-getlogicaldrivestringsw](https://docs.microsoft.com/en-us/windows/win32/api/fileapi/nf-fileapi-getlogicaldrivestringsw) said, the sting in returned lpBuffer is C:\\\0D:\\\0 Run then we can spil

question on autolayout in wNim

2020-02-23 Thread oyster
in my simple code, there is a spacing of 50 between text control and frame border. However if I use H:|[label, groupText]| Run when run the EXE, I get E:\prg\nim\nim-1.0.6\lib\core\macros.nim(581) layout C:\Users\USER\.nimble\pkgs\wnim-0.10.1\wNim\p

2 questions on COM with khchen/winim

2019-11-27 Thread oyster
Here is a little program which record the text to a wave file. I have tested the similar Python code import winim/com #~ from comtypes.gen import SpeechLib var obj = CreateObject("SAPI.SpVoice") obj.speak "Nim is a statically typed, imperative programming language."

query pc specification?

2019-10-15 Thread oyster
is there any way or package to query pc specification on Ms Windows is? to be clear, foe example I need to know: CPU type(for example Intel Core i7-8700 @ 3.2Ghz), display card(e.g. Nvidia geforce 1080), 2 hardisk(st31000528as 1T, kbg30xxx Toshiba 256G), memeory(16G), just like what cpu-z does.

could not load: SDL2_gfx.dll

2019-07-30 Thread oyster
although it is 3 years ago, I think it is better to write down Now [https://github.com/nim-lang/sdl2/wiki/Windows-Binaries](https://github.com/nim-lang/sdl2/wiki/Windows-Binaries) supplies DLL for windows 32bits however, windows 64bits has been used for many years, so 1\. I can't open the link

https://nim-lang.github.io/Nim/hcr outdated

2019-07-29 Thread oyster
as the title says, [https://nim-lang.github.io/Nim/hcr](https://nim-lang.github.io/Nim/hcr) is outdated due to the update of sdl2. any plan to update? thanks

Re: wNim - Nim's Windows GUI Framework

2019-07-20 Thread oyster
offtopic, in the table, there are very long list like "a":a ("wAquamarine": wAquamarine). Is there an concise way to write it?

Re: Nim VS The World (CoffeeScript/Boo/PureBasic/C#/ES2018/Python)

2019-07-15 Thread oyster
@Libman [http://www.rapideuphoria.com](http://www.rapideuphoria.com)/ [http://hp.vector.co.jp/authors/VA008683/english/index.htm](http://hp.vector.co.jp/authors/VA008683/english/index.htm) [https://www.basic4gl.net/mobile](https://www.basic4gl.net/mobile) [https://www.spiderbasic.com](https://ww

Re: What prevents you from using Nim as your main programming language?

2019-06-27 Thread oyster
vlang.io seems to have a very easy way to use C library which will broaden its ecosystem more easily than other language(including nim) does ok, other parts of vlang are nearly jokes till now

Natural is not positive

2019-06-11 Thread oyster
here is the code on the [https://nim-lang.org](https://nim-lang.org)/ however, = range 0..9223372036854775807(int) Run how do I know? Just assign a float to age. then nim refuse to compile. so it is a very bad example 1. the comment is wrong. btw, is there any builtin

--opt:speed slow down nimpy code

2019-06-11 Thread oyster
Here is the code from a local discussion group # foo.nim import nimpy proc foo(): seq[array[3,int]]{.exportpy.}= var a:seq[array[3,int]] for i in 1..1000: a.add([i,i*2,0]) return a Run and # a.py import

Re: --opt:speed slow down nimpy code

2019-06-11 Thread oyster
here is the question two: I suspected that set a as a seq in foo.nim is not a good idea for speed( that is true to set a as a list in python version), so what is a better solution?

Re: --opt:speed slow down nimpy code

2019-06-11 Thread oyster
question three, as we can find that both python 2 and 3 can use the generated pyd files. So the pyd is not a normal python extension which depends on the python version. How does it come? Will this feature slow down the extension? Thanks

Re: Future of Nim ?

2019-06-03 Thread oyster
library talks. for me, a lot of excel files have to be treated, so I only find and have to rely on python and pandas

Re: wNim fork with ZeeGrid control

2019-05-31 Thread oyster
can we use it with 64 bits nim?

Re: Nim vs D

2019-04-25 Thread oyster
why "Projects like Nim and D can never be failures"? what is the common between them? open source? what do you think about redlang [https://www.red-lang.org](https://www.red-lang.org)/ which is said to promote new idea of rebol language, however I think red lang is doomed to fail since it focus

[some offtopic] 33 = (8866128975287528)^3+(-8778405442862239)^3+(-2736111468807040)^3

2019-03-13 Thread oyster
Recently, I read that it is the first time that human finds 3 integers x, y and z which make x^3+y^3+z^3=33, where the finding is (8866128975287528)^3+(-8778405442862239)^3+(-2736111468807040)^3 in this March 2019. Till March 2019, we still can't find x, y and z for some numbers, for example, 4

Re: ptr arithmetics?

2019-02-14 Thread oyster
there is no official/bundle-in function/operator for ptr type, so what is the purpose of ptr type in nimlang?

how to pass a C array to C function?

2019-02-10 Thread oyster
for example unsigned char imgdata[] = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...}; Ihandle* image = IupImageRGBA(32, 32, imgdata); Run I tried var imgdata = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0...} var image = iupImageRGBA(32, 32, imgdata)

tools to wrap C library for both static and dynamic linking?

2019-02-10 Thread oyster
I have checked c2nim which seems can do most work for using functions in dynamic library without any dynamic linking library file. I also checked wxNim source which seems to be translated by hand for static link, but of cause it can link dynamic library. But is there an aided tool can do most o

Re: no "--opt:size" leads EXE to "SIGSEGV: Illegal storage access. (Attempt to read from nil?)"

2019-01-30 Thread oyster
Maybe you have forgotten the binding, but I am using wxnim from [PMunch fork](https://github.com/PMunch/wxnim) from you, [Araq](https://github.com/Araq/wxnim), it is not my wrapping code. And the example2 is in the wxnim too. nim cpp -r -d:useSysAssert -d:useGcAssert example2.ni

no "--opt:size" leads EXE to "SIGSEGV: Illegal storage access. (Attempt to read from nil?)"

2019-01-30 Thread oyster
I use nim in MSYS2+Mingw64 on Windows 7 64 bits. The involved code can be download [here](https://forums.wxwidgets.org/viewtopic.php?f=27&t=45513) which uses [wxnim](https://github.com/PMunch/wxnim) . And I have stated the [details to compile wxWidgets](https://github.com/PMunch/wxnim/issues/12

Re: Internationalization of unmodified source code at compile time i18n

2019-01-29 Thread oyster
nice, suggest to use getAppDir in os to let nimterlingua load the trasnlation file from the app path defaultly

Re: Code substitution with templates

2019-01-29 Thread oyster
a simliar question. In my code, losts of XExNew, XXExDelete (in fact, more than these 2) proc will be created according to the same-name function in DLL file. For example const fltk = "fltk-c-1.3.3-64.dll" type long = int64 type Fl_ButtonEx* = object proc Fl_ButtonE

how to use PassC/PassL pragma?

2019-01-28 Thread oyster
on my machine( MSYS2 + MingW64, windows 64bits) $ wx-config --libs -LE:/msys64/mingw64/lib -pipe -Wl,--subsystem,windows -mwindows -lwx_mswu_xrc-3.0 -lwx_mswu_webview-3.0 -lwx_mswu_html-3.0 -lwx_mswu_qa-3.0 -lwx_mswu_adv-3.0 -lwx_mswu_core-3.0 -lwx_baseu_xml-3.0 -lwx_baseu_ne

Re: is it possible to write a converter which only convert 0 to nil

2019-01-25 Thread oyster
hi, Stefan_Salewski You find the lazy bone in me exactly, thank you for the explaination. Now the original Code( in [FreeBASIC](https://www.freebasic.net/) ) #include once "fltk-c. bi" sub QuitCB cdecl (byval self as Fl_Widget ptr,byval userdata as any ptr) flMessageT

Re: [release]binding for FLTK C dynamic library

2019-01-25 Thread oyster
The style is the last thing to consider. The first thing is to make a full and corrected binding with all examples written in nim without any problem, so I have to keep the original lower/upper case in code in order to refer to the original header files( there are both C and FreeBasic) and exam

Re: [release]binding for FLTK C dynamic library

2019-01-25 Thread oyster
updated. now most of the problem codes are: 1. OpenGl related 2. FreeBasic macro, or in other word, C's #define related. So that almost no function has EX in the name can run 3. Fl_Shared_ImageImages related

is it possible to write a converter which only convert 0 to nil

2019-01-25 Thread oyster
The C code int setCallback(Fl_Widget* wgt, Fl_Callback *cb, void *pdata=NULL, int num=1); Run can be translated into proc setCallback*(wgt: ptr Fl_Widget; cb: ptr Fl_Callback; pdata: pointer = nil; num: cint = 1): cint

Re: questions on binding C DLL

2019-01-19 Thread oyster
guys, I think it is far beyond my ability to create my own widget

Re: questions on binding C DLL

2019-01-18 Thread oyster
1. Yes, [FLTK]([http://www.fltk.org](http://www.fltk.org)) uses C++, but [D.J.Peters's FLTK **C** for FreeBasic]([https://www.freebasic.net/forum/viewtopic.php?f=14&t=24547&start=180](https://www.freebasic.net/forum/viewtopic.php?f=14&t=24547&start=180)) supplies a C interface() just like the

Re: Using Stack Overflow for help

2019-01-18 Thread oyster
I think most of the post you mentioned will be closed by stack overflow moderator very soon

Re: questions on binding C DLL

2019-01-17 Thread oyster
Thanks I don't mean to throw tons of code line, so I extract some typical ( at least I think) function declaration lines, even in C header files they looks the same. The other lines, which I did not enclose here, can be treated by c2nim or my newbie's brain. As for the C header files, actually

Re: yet another question on code substitution with templates

2019-01-17 Thread oyster
the code is not too long for me to replace all DOP_COLOR(sth) with HIWORD(sth), LOWORD(sth) by hand. But it is some long for concat thus the code will be a mess. But to speak generaly, there is no something like #define A B directive in C, which only replace A with B literally, in nim, isn't? Y

questions on binding C DLL

2019-01-17 Thread oyster
first, some questions about pointer **question 1** void Fl_Widget_TrackerDelete(Fl_Widget_Tracker* & wt); Run c2nim says Error: token expected: ) **question 2** void flFileChooserCallback(void(*cb)(const char* f)); Run c2nim say

Re: yet another question on code substitution with templates

2019-01-17 Thread oyster
sorry, I can't still grasp the idea if emit is used, then how to use DOP_COLOR in nim code obviously, {. emit: """ #define DOP_COLOR(col) HIWORD(col), LOWORD(col) """ .} var opcodes = [ FL_DOP_COLOR ,DOP_COLOR(FL_RED), FL_DOP_LINE, ]

yet another question on code substitution with templates

2019-01-17 Thread oyster
I have read [https://forum.nim-lang.org/t/3199](https://forum.nim-lang.org/t/3199) but I am still puzzled my situation is, I need the #define part works like that in C/FreeBasic, so if #define DOP_COLOR(col) HIWORD(col), LOWORD(col) Run then the code to create array

the ignoring of _ make some translation need more work

2019-01-16 Thread oyster
for example, in FLTK C for FreeBasic, there is (faked) enum FL_TEXT_DISPLAY_WRAP_MODE, i.e. type FL_TEXT_DISPLAY_WRAP_MODE as ulong Run which is used in funtions like declare sub Fl_Text_DisplayWrapMode(byval td as Fl_Text_Display ptr, byval wrap

[release]binding for FLTK C dynamic library

2019-01-15 Thread oyster
[https://github.com/retsyo/FLTK_nim](https://github.com/retsyo/FLTK_nim)/ As all my released projects, it needs more works to finish. I do hope someone, who knows nimlang well, can join or give suggestions import fltk_main proc ButtonClick (button: ptr FL_WIDGET, arg: point

template/macro to create function/variant?

2019-01-14 Thread oyster
In freebasic, for code #macro DeclareEx(_name_) declare function _name_##ExNew(byval x as long, byval y as long, byval w as long, byval h as long, byval title as const zstring ptr=0) as _name_##Ex ptr declare sub _name_##ExDelete (byref ex as _name_##Ex ptr)

template/macro to create function/variant

2019-01-14 Thread oyster
In freebasic, for code #macro DeclareEx(_name_) declare function _name_##ExNew(byval x as long, byval y as long, byval w as long, byval h as long, byval title as const zstring ptr=0) as _name_##Ex ptr declare sub _name_##ExDelete (byref ex as _name_##Ex ptr)

Re: still no success binding DLL's callback function

2019-01-07 Thread oyster
Let me ignore the data type first ;) I hope there is a VisualBasic-Freebasic-C-Nim data type comparasion sheet type Fl_Callback* = proc(widget: ptr Fl_Widget, pData: ptr any):cint {.cdecl.} proc ButtonClick (button: ptr FL_WIDGET, arg: ptr any):cint {.cdecl.} = F

Re: Introducing the nimgen family of Nim wrappers

2019-01-07 Thread oyster
on windows, nimgen will run something like cmd /c "c2nim ..." Run but I am using MSYS2+Mingw, thus "cmd /c" will make the command invalid. Is there a solution?

still no success binding DLL's callback function

2019-01-07 Thread oyster
I have posted days ago [https://forum.nim-lang.org/t/4522](https://forum.nim-lang.org/t/4522) in which I try to bind xcgui which is a free 32bits dll for windows Now I try to bind FLTK([http://www.fltk.org)](http://www.fltk.org\)). I can compile FLTK, test, examples and fluid with my MSYS2+Ming

Re: trouble during wrapping a windows DLL

2019-01-03 Thread oyster
do you mean proc OnClick*(bHandle: var bool): cint {.exportc, cdecl.} = setupForeignThreadGc() var sel = XC_MessageBox(nil, "炫彩界面库pText", "pCaption", 1) bHandle = true result = 0 tearDownForeignThreadGc() Run it still

Re: it is hard to load forum.nim-lang.org for months

2019-01-03 Thread oyster
I have tried to go here with and without Lantern.

Re: trouble during wrapping a windows DLL

2019-01-03 Thread oyster
I don't know Go-lang, and I don't have time to learn it. As I always state, I _do not_ make a living on programing, I only program in my spare time, sometimes I make some app to help me or co-worker in job. That is why I use Python mainly because Python is simple and has tons of libraries which

Re: trouble during wrapping a windows DLL

2019-01-03 Thread oyster
I have found that no mmatter the is cast[cstring] or not, the compiled app still crash after I click the button and the msgbox shows here is the line in C header XC_API BOOL WINAPI XEle_RegEventC(HELE hEle, int nEvent, void *pFun); Run here is what VB code does

trouble during wrapping a windows DLL

2019-01-03 Thread oyster
I am trying to write a binding for www.xcgui.com which is a GUI lib for windows. The initial code is on [https://github.com/retsyo/xcgui_nim](https://github.com/retsyo/xcgui_nim) but I met some questions. for example import ../../xcgui import winim/inc/[windef, wingdi] imp

it is hard to load forum.nim-lang.org for months

2019-01-01 Thread oyster
I have tried IE, Firefox and Chrome on my Win7 64bits with and without proxy, but in these months it is very hard for me to load [https://forum.nim-lang.org](https://forum.nim-lang.org)/ or any posts url. No error is displayed, all these web browsers just finished with a blank page but the titl

Porting MSWin to Linux

2019-01-01 Thread oyster
sorry to reply in this old posts. but I am still (I almost have spent one year) looking for GUI solution(s) which have already exposed many widgets/controls for windows OS. So I really want to know 1\. which is the latest sciter binding for nim? Google finds https://github.com/oskca/nsciter whi

seek for help on porting VB lib to nim

2019-01-01 Thread oyster
in the VB lib, which calls functions in 32bits DLL, there are something I am not very sure 1\. many arguments are declared as LONG in the VB files. I found that LONG is signed 64-bit integers on [https://docs.microsoft.com/en-us/dotnet/visual-basic/language-reference/data-types/long-data-type](

Re: wNim - Nim's Windows GUI Framework

2018-12-17 Thread oyster
thanks, but I will embed the grid in the GUI which has other controls, so I think ZeeGrid is not the solution. BTW, I think nim is still too young in its modules to fit my work. Maybe I made an impatient decision to learn and try to replace python yet.

Re: wNim - Nim's Windows GUI Framework

2018-12-15 Thread oyster
can we use something like wx.grid or wx.lib.mixins.listctrl now for a ms-Excel-like datasheet app?

Re: Is it possible to run Python code from Nim?

2018-12-06 Thread oyster
sorry, I mean what if we use python in nim for python's packages, for example matplotlib for plotting, sympy for symbolic calculation. It is hard for human to find and ship all dependence, so that is why pyInstaller/py2exe exists to bundle a python app for releasing.

Re: Is it possible to run Python code from Nim?

2018-12-06 Thread oyster
for kinds of solution, I have one question: how to compile the nim app who uses python inside, so that this app can be released to users without python on his computer

Re: release: a current-runable, error-in-the-future msgbox for wNim

2018-11-14 Thread oyster
BTW, the discussion here make me be afraid, perhaps one hours later, the license file for Nim will add one line: If you don't use Nim's conventions, please DO NOT use Nim Run

Re: release: a current-runable, error-in-the-future msgbox for wNim

2018-11-14 Thread oyster
I respect every contribution to Nim. But don't make conventions be a religion. ok maybe you can make it yourself's religion, but do not command all others do so. In fact, I use wxPython so I can learn wNim without too hard work. wNim is the first(and till now the only) library for me to make a

[OT]if we also know basic algorithms theory, how can we get the details?

2018-11-11 Thread oyster
if it is too off-topic, please delete it, thanks I have old applications from whose name I think they uses LZW compression. However I checked some LZW libs(C/python/nim) but none of them yields the same output files. I think the DOS app uses different code symbols during compression. So how can

release: a current-runable, error-in-the-future msgbox for wNim

2018-11-10 Thread oyster
I, a programming amateur and (always) newbie, released my msgbox control for [https://github.com/khchen/wNim](https://github.com/khchen/wNim), which can specify the font for message and buttons , at [https://github.com/retsyo/nim-myMsgBox](https://github.com/retsyo/nim-myMsgBox) I don't have mu

Re: maybe this dynamic try is not possible?

2018-11-09 Thread oyster
blush this is the 2nd time that I met and asked the same question these days. There is a long way for me to get familiar with Nim from a Python user view-of-point. thanks again

maybe this dynamic try is not possible?

2018-11-09 Thread oyster
In my function to make wFont for [https://khchen.github.io/wNim/](https://khchen.github.io/wNim/), the following 2 can work import wNim proc makeFont1(fontMessage: int): wFont {.discardable.}= var fontTmpMessage: wFont = Font(12, weight=wFontWeightBold)

Re: Error: implicit object field construction requires a .partial object, but got wMyFrame:ObjectType

2018-11-08 Thread oyster
Aha, thanks. I have just found [https://github.com/jyapayne/nim-extensions](https://github.com/jyapayne/nim-extensions) and rewrite the code. Now it seems that there is no much difference between nim-extensions version and your type version, but nim-extensions version can be understood easily f

Re: why var can not be declared this way?

2018-11-08 Thread oyster
thanks anyone. I am using python in which def f(size=1): if size == 1: widFrame = 320 hiFrame = 200 else: widFrame = 3200 hiFrame = 2000 print(widFrame, hiFrame) f() Run will says

Error: implicit object field construction requires a .partial object, but got wMyFrame:ObjectType

2018-11-07 Thread oyster
I try to make a control type in [https://khchen.github.io/wNim/](https://khchen.github.io/wNim/), so I modified the examples coming with wNim. The control will work like this: after click any of the 2 buttons on the frame, the frame will be closed, and a number will be returned to tell which bu

I don't know whether this problem lies in nim or wNim?

2018-11-06 Thread oyster
In my question, some buttons are created by amount given by parameter numOfButtons. When a button is clicked, its holder frame is closed and the index( begins from 0) is returned. But I found that no matter which button is clicked, only the last(in the case of numOfButtons==3, the last index is

why var can not be declared this way?

2018-11-05 Thread oyster
for proc f(size=1) = if size == 1: var widFrame = 320 hiFrame = 200 else: var widFrame = 3200 hiFrame = 2000 echo (widFrame, hiFrame) f() Ru

Re: how to make a resource file for nim on windows?

2018-11-04 Thread oyster
finally I found that wNim.res is actually obj file which can be read by ld of GCC, not res file we can make it by wnim.rc wnim.o cp wnim.o wnim.res Run

how to make a resource file for nim on windows?

2018-11-04 Thread oyster
In fact, I am using [https://khchen.github.io/wNim](https://khchen.github.io/wNim)/ with my nim 64 bits. All demos compile and run without problem In some of the demo files, there is a line {.passL: "wnim.res" .} Run which use a 32,468 bytes wnim.res But I found th

what makes the 0.18.1-compiled binary file larger than 0.18.0-compiled binary file

2018-09-10 Thread oyster
on my Msys2 + Mingw64 on Win7 64 bits, even echo 1 gives different filesize when the same -d:release are used. So what makes the difference and how to strip down besides strip/upx? source,0.18.0 0.18.1(git cloned) echo 1, 462,025

is there computer algebra system module?

2018-08-29 Thread oyster
is there a module just like what [https://www.sympy.org](https://www.sympy.org)/ does? sympy has a long list of feature here: [https://www.sympy.org/en/features.html](https://www.sympy.org/en/features.html) thanks

do regular expression on unicode string?

2018-08-17 Thread oyster
import re import unicode var txt = "自我 我们 我" # this is actually read from external file #~ txt = txt.toRunes() # type mismatch: got but expected 'string' var result = txt.findall(re".{0,1}我.{0,1}") for i in result: echo i # "自我", "我们", "我" are e

is space around "==" the part of syntax?

2018-08-15 Thread oyster
echo 1 == 0 # space in the beginning and end of == echo 1==0 # no space Run can be compiled and run without warning/error however echo 1== 0 Run can be compiled and run as expected, but there is a warning ` Warning: Number of spaces aroun

Re: how to declare global variant in one proc

2018-08-14 Thread oyster
thanks, I don't mean to export word from module which is the next step currently, what I met is that the following command line version cannot be compiled, R:\CheckIt.nim(709, 5) Error: undeclared identifier: 'word' Run because there is no global variant word so chec

how to declare global variant in one proc

2018-08-14 Thread oyster
In my situation, I translate a python code into nim # I am cli.py def checkHeading(): word.Selection.HomeKey(Unit=win32com.client.constants.wdStory, Extend=win32com.client.constants.wdMove) do some check on Heading, then display message

Re: Winim - Nim's Windows API and COM Library

2018-08-04 Thread oyster
Thanks for updating one question: how to read COM object's constants? In python, we can do import win32com.client word = win32com.client.gencache.EnsureDispatch("Word.Application") print(win32com.client.constants.wdLineSpaceExactly) word.Quit() Ru

strange copyFile

2017-09-11 Thread oyster
I am using Nim Compiler Version 0.17.2 (2017-09-10) [Windows: amd64] with MSYS2+MingW64 on Win7 64 bits. I know test:test.txt is not a valid DOS/Windows filename. So how to detect it in code? Thanks import os try: copyFile("test.txt", "test:test.txt") except:

Re: Nim image libraries

2017-07-19 Thread oyster
not an image one: [https://github.com/nim-lang/cairo](https://github.com/nim-lang/cairo)

Re: Nim image libraries

2017-07-19 Thread oyster
# [https://github.com/barcharcraz/nim-freeimage](https://github.com/barcharcraz/nim-freeimage) a nimrod wrapper for FreeImage Latest commit 695e4d4 on Apr 22 2014 # [https://github.com/barcharcraz/nimlibpng](https://github.com/barcharcraz/nimlibpng) nimrod wrapper for libpng Latest commit 79

Re: Nim vs D

2017-07-08 Thread oyster
I am using mingw64/clang64 in Msys2. But I found that the exe file build by clang runs very slower than exe by gcc. The nim is a fresh build from github source yesterday $ nim Nim Compiler Version 0.17.1 (2017-07-07) [Windows: amd64] Copyright (c) 2006-2017 by Andreas Rumpf

Re: Nim for Windows: MinGW vs TDM-GCC

2017-07-06 Thread oyster
2\. gpu/cuda program, because there is no(?) file.a for mingw under windows for example [https://github.com/unicredit/nimcuda](https://github.com/unicredit/nimcuda) $ cd /r/nimcuda-master/examples/ $ nim c -r fft.nim --cincludes:"/r/nimcuda-master/c2nim" CC: nimcuda_cuC

Re: Nim for Windows: MinGW vs TDM-GCC

2017-07-06 Thread oyster
I am using Msys2 + Mingw64 on win7 64 bits. Almost everything is ok, except: 1\. for blas, for exampe [https://forum.nim-lang.org/t/3029](https://forum.nim-lang.org/t/3029) $ cd /r/arraymancer/tests/ $ nim c -r test_operators_blas Hint: [Link] Hint: operation successful

Re: The Nim Language Manual

2017-06-29 Thread oyster
so what is the source file for [https://nim-lang.org/docs/manual.html](https://nim-lang.org/docs/manual.html)? I looked into the nim's source but only found pure txt file

Re: How to sort tuples?

2017-06-27 Thread oyster
can sortedbyit support optional "reversed" arguement? currently, if I only knew the 2-steps method: var people3 =people1.sortedByIt(it.name) var people4 = people3.reversed() echo people4 I don't konw whether the above implementation is high effiency. what if an i

Re: progress while binding libxl

2017-06-23 Thread oyster
Thanks, LeuGim. **`When`** does work. However [https://nim-lang.org/docs/manual.html#statements-and-expressions-when-statement](https://nim-lang.org/docs/manual.html#statements-and-expressions-when-statement) still be Greek for me. * * * more question I, a lazy none programmer practitioner, met

Re: echo proper string in different consoles?

2017-06-22 Thread oyster
thanks but set cp936 seems do not work in msys2 [https://github.com/zacharycarter/blt-nim](https://github.com/zacharycarter/blt-nim) may be a solution for simple console-like interactive

Re: progress while binding libxl

2017-06-21 Thread oyster
thanks, and I found echo type("text") is string

Re: progress while binding libxl

2017-06-21 Thread oyster
this is what I get currently. Most functions in libxl can be exposed in the same way But something still puzzled me, or I have not know yet in nim: 1. for xlBookAddSheetW, the last arg is SheetHandle initSheet actually. But I used int. How to cast a number to SheetHandle? 2. how to judge th

Re: progress while binding libxl

2017-06-21 Thread oyster
the first question, I translated typedef struct tagBookHandle * BookHandle; to type tagBookHandle* {.final, incompleteStruct, importc: "tagBookHandle".} = object BookHandle* {.importc: "BookHandle".} = ptr tagBookHandle Am I right? Bu

progress while binding libxl

2017-06-21 Thread oyster
This post is related to [https://forum.nim-lang.org/t/2977/2](https://forum.nim-lang.org/t/2977/2), in which I said "For commercial products to read/write XLS/XLSX, I found [http://libxl.com/](http://libxl.com/)" So I started this binding work on June 18th 2017. However I am totally newbee in

Re: echo proper string in different consoles?

2017-06-20 Thread oyster
actually I have tested getCurrentEncoding, which gives gb2312 in both msys and DOS as Araq says. So what is the solution?

echo proper string in different consoles?

2017-06-19 Thread oyster
I am a Chinese Windows user. I use Msys2+Mingw64 (export LANG="EN.UTF-8") to compile nim app. But I also use windows7 DOS console(the default codepage is cp936, which is almost gb2312). The following code performs different in msys2 and windows's console. So my question, how to let the EXE echo

Re: package like python's pandas?

2017-06-18 Thread oyster
As far as I know, there is no nim wrapper for libxlsxwriter. The "Interfacing C and Nim" and "Converting C code to Nim" part on [https://github.com/nim-lang/Nim/wiki/Nim-for-C-programmers](https://github.com/nim-lang/Nim/wiki/Nim-for-C-programmers) may be useful. As for reading XLS, I found [h

  1   2   >