Cross compilation on windows x64 bit machine for windows x86 bit machine nim

2018-07-19 Thread frogEye
How can I compile for windows x86 bit machine on windows x64 bit machine?


Re: Compiling nim/ui in linux

2018-03-22 Thread frogEye
Araq I checked again to see if that issue exist but now I am not able to 
replicate it. It happend when I was setting up my workspace in a new linux 
machine. Cant say for sure wt happened but it does work now.


nim/ui

2018-03-15 Thread frogEye
Hi have been working with nim/ui for a month or so now. I can see a peice of 
code in which I dnt understand in the wrapper.


proc `margined=`*(t: Tab; page: int; x: bool) =
  tabSetMargined(t.impl, page.cint, cint(x))


and how to use it. The signature resembles to operator overloading but I have 
across this for first time. @dom96 can you please help.


Compiling nim/ui in linux

2018-03-15 Thread frogEye
I have developed a Tool for managing my driver using nim/ui. There two options 
below which i used to compile my tool on linux.

1\. nim c --cc:gcc --threads:on driver.nim

2\. nim c --threads:on driver.nim

option 2 works but option 1 doesnt compile the libui library.

Its strange anyways gcc will be chossen as default compiler. Where does 
specifying it explicitly goes wrong? 


Re: Concatenate string and int

2018-01-29 Thread frogEye
@Stefan_Salewski, I was trying to read a num value from jsonNode using


proc getNum(n: JsonNode; default: BiggestInt = 0): BiggestInt {..}


which is a part of json module. Hence when you concatenate without converting 
it to string it doesn't work. As I am new to nim I thought I could do such 
concatenation. But now I know I need to stringify the int first.


Re: Concatenate string and int

2018-01-29 Thread frogEye
It will never work fine. As & operator doesn't work with integers. Integer need 
to be stringified.


echo "abc" & $2


the above one works. Just figured that out.


Concatenate string and int

2018-01-29 Thread frogEye
I want to concatenate a string and int.

I tried doing


echo "abc" & 2


But it doesn't seem to work. One possible solution is to convert int to string 
and then do the concatenation. But the value which I have is BigInt not int. So 
conversion is not possible.


Re: Json key names encoding

2018-01-29 Thread frogEye
Thanks @dom96


Re: Json key names encoding

2018-01-25 Thread frogEye
Thanks yglukhov for the reply. It just an observation as I have just started 
with nim-lang. So may be I was looking at things which I could do really fast 
in go to be in nim. I will take some time to get used to nim 


Re: Json key names encoding

2018-01-25 Thread frogEye
Thanks, dom96 . But still, the ease with which we can unmarshal and marshal 
json into a data structure in Go-lang is uncomparable.


Json key names encoding

2018-01-24 Thread frogEye
I have looking for a way to encode the json keys, but has not been able to find 
anything on that.

For example Go lets us do this

type Response2 struct {
Page int json:"page" Fruits []string json:"fruits"

}

I want to unmarshal a json object but not able to encode the json keys. As my 
key name start with number I am not able to have the same variable in json.


Re: Thread vs Async for long running task

2017-12-02 Thread frogEye
No I am using this. But I have a driver written in nim which uses thread 
extensively. I making a tool to give a UI interface to the driver. So when 
click many UI widgets the UI frezzes as the firmware takes time to get the 
status of the device. So I am not able to decide what is write way to do this.


Thread vs Async for long running task

2017-11-29 Thread frogEye
I working with libui-nim wrapper. On some event in UI, I need to perform a 
long-running task let say it takes 5s and then update UI accordingly. What is 
the recommended way to do that nim?


Re: nim-lang ui not working with vcc on windows

2017-11-20 Thread frogEye
I have the solution. It was a silly mistake. I had placed libui library at the 
wrong place. Thanks for the response.


Re: nim-lang ui not working with vcc on windows

2017-11-20 Thread frogEye
To which folder did u copy the libui.h file? I have cloned the libui from git 
completely into my repository and it exists in the UI folder.


nim-lang ui not working with vcc on windows

2017-11-16 Thread frogEye
I am trying to run nim-lang ui wrapper for libui on windows. I am using vcc 
compiler as suggested by araq on git [nim-lang ui 
!](https://github.com/nim-lang/ui)

But I am getting issues while trying to run it.


"C:\Windows\system32\cmd.exe" /C ""C:\Program Files (x86)\Microsoft Visual 
Studio 14.0\VC\vcvarsall" amd64 && SET"
cl.exe /nologo /DEBUG /Zi /F33554432 
/FeC:\Projects\nim\ui\examples\controllgallery2.exe 
C:\Projects\nim\ui\ui\..\res\resources.res Usp10.lib UxTheme.lib dwrite.lib 
d2d1.lib comctl32.lib uuid.lib oleaut32.lib ole32.lib shell32.lib advapi32.lib 
comdlg32.lib winspool.lib gdi32.lib user32.lib kernel32.lib 
C:\Projects\nim\ui\examples\nimcache\ui_controllgallery2.obj 
C:\Projects\nim\ui\examples\nimcache\stdlib_system.obj 
C:\Projects\nim\ui\examples\nimcache\ui_ui.obj 
C:\Projects\nim\ui\examples\nimcache\ui_rawui.obj
ui_ui.obj : error LNK2019: unresolved external symbol uiInit referenced in 
function init_tlt2bs7bH8plubMOoOijpQ
ui_ui.obj : error LNK2019: unresolved external symbol uiFreeInitError 
referenced in function init_tlt2bs7bH8plubMOoOijpQ
ui_ui.obj : error LNK2019: unresolved external symbol uiQuit referenced in 
function quit_tlt2bs7bH8plubMOoOijpQ_2
ui_ui.obj : error LNK2019: unresolved external symbol uiMain referenced in 
function mainLoop_tlt2bs7bH8plubMOoOijpQ_3
ui_ui.obj : error LNK2019: unresolved external symbol uiUninit referenced 
in function mainLoop_tlt2bs7bH8plubMOoOijpQ_3
ui_ui.obj : error LNK2019: unresolved external symbol uiMainSteps 
referenced in function pollingMainLoop_ZL69atCe0uHFE09aJqPP9a3tg
ui_ui.obj : error LNK2019: unresolved external symbol uiMainStep referenced 
in function pollingMainLoop_ZL69atCe0uHFE09aJqPP9a3tg
ui_ui.obj : error LNK2019: unresolved external symbol uiButtonText 
referenced in function text_eyjZxKvbEyBTGEiYHqmR8A
ui_ui.obj : error LNK2019: unresolved external symbol uiButtonSetText 
referenced in function texteq__RpfkuWV6ImppEo25sHR74Q
ui_ui.obj : error LNK2019: unresolved external symbol uiNewButton 
referenced in function newButton_U0l3re8S9aw39cZRR9bU9actaQ
ui_ui.obj : error LNK2019: unresolved external symbol uiButtonOnClicked 
referenced in function newButton_U0l3re8S9aw39cZRR9bU9actaQ
ui_ui.obj : error LNK2019: unresolved external symbol uiWindowTitle 
referenced in function title_9a5SzM39cJGCZLgVCdGQ9cLsA
ui_ui.obj : error LNK2019: unresolved external symbol uiWindowSetTitle 
referenced in function titleeq__dE4tdl2pHxx7i4AutGwJGA
ui_ui.obj : error LNK2019: unresolved external symbol uiControlDestroy 
referenced in function destroy_afaoaEIZ8zbiWjbHA9cszXg
ui_ui.obj : error LNK2019: unresolved external symbol uiNewWindow 
referenced in function newWindow_xYgCIfHLmkr6oBxM9bMLoDg
ui_ui.obj : error LNK2019: unresolved external symbol uiWindowOnClosing 
referenced in function newWindow_xYgCIfHLmkr6oBxM9bMLoDg
ui_ui.obj : error LNK2019: unresolved external symbol uiWindowMargined 
referenced in function margined_ufZt4isGAlyBIN9bn1lxC8A
ui_ui.obj : error LNK2019: unresolved external symbol uiWindowSetMargined 
referenced in function marginedeq__MZP1cKjbzw6o0t2YW0xFvg
ui_ui.obj : error LNK2019: unresolved external symbol uiOpenFile referenced 
in function openFile_vNu6SVPuGvjpxZTg6Ip5xw
ui_ui.obj : error LNK2019: unresolved external symbol uiFreeText referenced 
in function openFile_vNu6SVPuGvjpxZTg6Ip5xw
ui_ui.obj : error LNK2019: unresolved external symbol uiSaveFile referenced 
in function saveFile_vNu6SVPuGvjpxZTg6Ip5xw_2
ui_ui.obj : error LNK2019: unresolved external symbol uiMsgBox referenced 
in function msgBox_d0kdkR0RIn7mbm5A8GUFAw
ui_ui.obj : error LNK2019: unresolved external symbol uiMsgBoxError 
referenced in function msgBoxError_d0kdkR0RIn7mbm5A8GUFAw_2
ui_ui.obj : error LNK2019: unresolved external symbol uiBoxDelete 
referenced in function delete_7SM1m9cZOvC0d9bpvR7RBHqw
ui_ui.obj : error LNK2019: unresolved external symbol uiBoxPadded 
referenced in function padded_Wnyxu4EfUuiCLJ0EBiZyfw
ui_ui.obj : error LNK2019: unresolved external symbol uiBoxSetPadded 
referenced in function paddedeq__swjeWcLU0TtMtZWfLEK4Jw
ui_ui.obj : error LNK2019: unresolved external symbol uiNewHorizontalBox 
referenced in function newHorizontalBox_Z2UMSzB4XzkJG69cZtucxLw
ui_ui.obj : error LNK2019: unresolved external symbol uiNewVerticalBox 
referenced in function newVerticalBox_Z2UMSzB4XzkJG69cZtucxLw_2
ui_ui.obj : error LNK2019: unresolved external symbol uiCheckboxText 
referenced in function text_r4h1eLcv2LX71MP7qkGvpw
ui_ui.obj : error LNK2019: unresolved external symbol uiCheckboxSetText 
referenced in function texteq__j9bZusAk1vc5CGW0td3njRA
ui_ui.obj : error LNK2019: unresolved external symbol uiCheckboxChecked 
referenced in function checked_MpJ8Lb9bvOXznyadht39cpFw
ui_ui.obj : error LNK2019: unresolved external symbol uiCheckboxSetChecked 
referenced in function checkedeq__Wkos02vDj

cannot import windows

2017-11-13 Thread frogEye
I have installed oldwinapi and it exists in .nimblepkgs folder. But when I am 
trying to import windows its giving me an error as 


Error: cannot open 'windows'


Run Any help will be highly appreciated.


Re: ANSI vs ASCII in Windows Shells?

2017-11-08 Thread frogEye
I have installed oldwinapi and it exists in .nimblepkgs folder. But when I am 
trying to import windows its giving me an error as


Error: cannot open 'windows'


Any help will be highly appreciated. 


Re: Nimble: Refresh failed

2017-11-08 Thread frogEye
Thanks. I figured out that yesterday and nimble got installed. But still nimble 
refresh wont work. Do we have any fix for it?


Re: Nimble: Refresh failed

2017-11-07 Thread frogEye
I have placed packages.json in .nimble folder but I am still getting the same 
problem.


Nimble: Refresh failed

2017-11-06 Thread frogEye
I am trying to use nimble and it gives a error:


C:\Projects\nim>nimble install winold --verbose
Reading official package list
Prompt: No local packages.json found, download it from internet? [y/N]
Answer: y
Downloading Official package list
 Trying https://github.com/nim-lang/packages/raw/master/packages.json
 Connecting to proxy at (scheme: http, username: , password: , hostname: 
xyz.com, port: 80, path: , query: , anchor: , opaque: false)
   Warning: Could not download: invalid http version, 
00309058"You are being https://raw.githubusercontent.com/nim-lang/packages/master/packages.json\";>redirected.HTTP/1.1
 301 Moved Permane
ntly"
 Trying http://irclogs.nim-lang.org/packages.json
 Connecting to proxy at (scheme: http, username: , password: , hostname: 
xyz.com, port: 80, path: , query: , anchor: , opaque: false)
   Warning: Could not download: invalid http version, 002EFE90"0"
 Trying http://nim-lang.org/nimble/packages.json
 Connecting to proxy at (scheme: http, username: , password: , hostname: 
xyz.com, port: 80, path: , query: , anchor: , opaque: false)
   Warning: Could not download: invalid http version, 00311F80"0"
 Error: Refresh failed
... Could not download: invalid http version, 00311F80"0"


Thanks