<< 05-02-2017 >>

00:08:56PMunchcarterza, I think def-pri-pub tried to highlight you
00:14:25*yglukhov joined #nim
00:18:37*yglukhov quit (Ping timeout: 240 seconds)
00:19:55*bjz joined #nim
00:35:13*kier quit (Ping timeout: 248 seconds)
01:04:25*PMunch quit (Quit: leaving)
01:10:39*Snircle joined #nim
01:16:30*Matthias247 quit (Read error: Connection reset by peer)
01:28:28carterzadef-pri-pub : sorry I had to run out and I replied in gitter but I think the bridge is out again :/
01:28:34carterzaPMunch : thanks
01:28:43carterzaoh you’re not here PMunch whoops
01:42:09*devted quit (Quit: Sleeping.)
01:55:59*bjz_ joined #nim
01:56:20*bjz quit (Ping timeout: 255 seconds)
01:56:25*krux02 quit (Quit: Leaving)
02:06:32*chemist69 quit (Ping timeout: 255 seconds)
02:06:55*chemist69 joined #nim
02:11:53*chemist69 quit (Ping timeout: 258 seconds)
02:16:21*yglukhov joined #nim
02:20:29*yglukhov quit (Ping timeout: 240 seconds)
02:24:56*chemist69 joined #nim
02:46:12*vlad1777d quit (Remote host closed the connection)
03:13:13*Kingsquee joined #nim
03:19:59*carterza quit (Read error: Connection reset by peer)
03:20:17*carterza joined #nim
03:23:04*bjz joined #nim
03:25:11*bjz_ quit (Ping timeout: 240 seconds)
03:36:30*EastByte quit (Ping timeout: 240 seconds)
03:39:00*EastByte joined #nim
03:40:17*Kingsquee quit (Ping timeout: 255 seconds)
03:44:58*Kingsquee joined #nim
04:09:11*MyMind quit (Read error: Connection reset by peer)
04:10:18*MyMind joined #nim
04:18:08*yglukhov joined #nim
04:23:31*yglukhov quit (Ping timeout: 256 seconds)
04:36:20*Snircle quit (Quit: Textual IRC Client: www.textualapp.com)
05:41:36*def-pri-pub quit (Quit: leaving)
06:20:40*yglukhov joined #nim
06:24:41*yglukhov quit (Ping timeout: 240 seconds)
06:31:05*bungoman joined #nim
06:31:32*nsf joined #nim
06:42:12carterzahttp://imgur.com/a/wWogM
07:41:02*Vladar joined #nim
07:50:50*bjz quit (Ping timeout: 240 seconds)
07:52:32*bjz joined #nim
08:03:23*bjz quit (Ping timeout: 256 seconds)
08:04:18*bjz_ joined #nim
08:22:20*yglukhov joined #nim
08:26:56*yglukhov quit (Ping timeout: 255 seconds)
08:27:18*carterza quit (Read error: Connection reset by peer)
08:27:40*carterza joined #nim
08:29:55*Varriount|Mobile joined #nim
08:30:07Varriount|MobileGo carterza!
08:32:22Varriount|Mobilecarterza: How complex was that to implement?
09:00:26Jipok[m] Is there a normal editor with debugging under the window?
09:00:47Jipok[m] not Visual studio pls
09:03:03Jipok[m]i looked here
09:03:03Jipok[m]https://github.com/nim-lang/Nim/wiki/Editor-Support
09:03:04Jipok[m]but there just is highlighting additions
09:03:51Jipok[m] and many have not been updated for over a year
09:03:55Araquse Visual Studio :-) with --debugger:native
09:04:32*unlaudable joined #nim
09:05:15Jipok[m] There is nothing other than VS?
09:06:50Jipok[m] What about nimedit? It will develop?
09:07:12ftsfcan I specify the size of a range? eg range[0..15] but size 1 byte?
09:07:37Araqftsf: range[0'u8..15'u8]
09:07:48ftsfahh thanks
09:07:52ftsfnever would have guessed that
09:08:24AraqJipok[m]: you can also use GDB with --debugger:native, nimedit won't be ready anytime soon
09:08:46Araqbut what's wrong with VS's debugger? it's still the best around
09:09:30*unlaudable quit (Max SendQ exceeded)
09:10:00*unlaudable joined #nim
09:10:26Jipok[m]VS works with nimsuggest?
09:11:40Jipok[m] can I get help about the functions in the vs?
09:13:36Araqthere is a plugin for that
09:13:47Araqiirc
09:14:09Araqbut you can just start it for the debugger, I often do that
09:17:27Jipok[m] Which version of vs is needed? Express, Community or Code?
09:19:56AraqExpress
09:22:16Jipok[m]ok
09:23:23Jipok[m]Why said here " First, you will need to install Visual Studio Code 0.10. "?
09:23:23Jipok[m]https://marketplace.visualstudio.com/items?itemName=kosz78.nim
09:28:09*rokups joined #nim
09:31:06Jipok[m]Thank you, Araq. We'll have to use the studio. there are no other good options
09:33:23*unlaudable quit (Ping timeout: 264 seconds)
09:48:30*bjz_ quit (Quit: My MacBook Pro has gone to sleep. ZZZzzz…)
09:53:28AraqJipok[m]: https://www.visualstudio.com/de/downloads/ select "Community"
09:55:14*bjz joined #nim
09:57:15*carterza quit (Quit: carterza)
09:57:40stisa[m]There's also QtCreator which has some support for Nim as of 4.1, never tried it though
09:59:44Varriount|MobileAraq: The problem might be the 10+ GB download and 15+ GB space requirements attached to visual studio
10:01:01AraqVarriount|Mobile: yeah it's pretty bad but GDB tends to come with a complete Python distribution
10:01:19Araqthis GNU stuff grew fat too
10:02:35Varriount|MobileYes, but not 10+ GB fat
10:08:37Araqyou need to get rid of a few kitty pictures and movies to make space for it :P
10:08:43*byte512 joined #nim
10:11:35cheatfatepython distribution is 60Mb
10:11:37cheatfateon windows
10:13:32Araqbloat.
10:14:54cheatfatebut to run python scripts on windows you don't need whole distro
10:15:00cheatfateyou need just python.dll
10:15:05cheatfateand modules
10:22:22*carterza joined #nim
10:22:26*arnetheduck joined #nim
10:23:43*yglukhov joined #nim
10:27:51*Jipok[m] sent a long message: Jipok[m]_2017-02-05_10:27:50.txt - https://matrix.org/_matrix/media/v1/download/matrix.org/uqJajmIsdFdcbeQIYdTquaAi
10:28:03*yglukhov quit (Ping timeout: 252 seconds)
10:28:38*Jipok[m] sent a long message: Jipok[m]_2017-02-05_10:28:36.txt - https://matrix.org/_matrix/media/v1/download/matrix.org/ndItpgIqiIlHoKPYeFipgmVL
10:31:47AraqJipok[m]: what do you think I now need to know too?
10:33:24Jipok[m]?
10:35:50Araqdoes g:\temp\NimProject\nimcache\stdlib_system.o exist?
10:38:46Jipok[m]no
10:43:43stisa[m]Does `nim c test.nim` work if you run it inside `NimProject`
10:44:26Jipok[m]sry. I just removed the nim.
10:44:32Jipok[m] I tried another option: NIM-0.16.0_x64.exe.
10:44:32Jipok[m]It gives "Error: Timeout on connection" When the "Download mingw.zip".
10:46:31Araqwe moved to https, that's why
10:47:34Jipok[m] What do I need to do?
10:47:35Jipok[m]Perhaps somebody can give a direct link to this file?
10:48:56Varriount|MobileJipok[m]: It's a generated file, part of the Nim to C translation process
10:49:33Varriount|MobileSo it's odd that the C compiler isn't picking it up.
10:49:34Araqnah
10:49:45Araqhttps://nim-lang.org/download/mingw64.zip
10:49:55Araqhttps://nim-lang.org/download/mingw32.zip
10:50:08stisa[m]I think the first way you installed it was the easiest. Try that again, and try to resolve the path issue after `nim -v` works
10:50:08Jipok[m]thx
10:50:12Varriount|MobileOh, I was looking at something else
10:52:26Jipok[m] I need nim_dlls.zip?
10:57:06Jipok[m] it works. Thanks to all
10:58:56*bjz_ joined #nim
11:00:06*Arrrr joined #nim
11:00:06*Arrrr quit (Changing host)
11:00:06*Arrrr joined #nim
11:01:49*bjz quit (Ping timeout: 240 seconds)
11:07:31*unlaudable joined #nim
11:11:37dom96BlaXpirit: Gitter bridge broken again :(
11:12:10dom96Araq: https://pumpula.net/foolproof-html time to create that nicer HTML DSL
11:12:11cheatfatedom96, could you please update travis ticket, because it still fails on both versions
11:12:25cheatfatehttps://travis-ci.org/nim-lang/Nim/builds/198526859 - this is non-beta log
11:12:30BlaXpiritdom96, yep https://stream.gitter.im/v1/rooms/56642bd616b6c7089cbd9c95/chatMessages
11:12:40BlaXpiritgitter broken again
11:14:44dom96cheatfate: somebody else already reported this https://github.com/travis-ci/travis-ci/issues/7264#issuecomment-277506640
11:15:59cheatfatedom96, yeah i know but looks like this guys need bunch of posts
11:16:08cheatfateto understand that nothing works for 2 days
11:16:46cheatfatethey moved from version 2.6.2 to version 2.5.0 of travis-worker but this doesn't helps
11:16:54dom96cheatfate: then why can't you post that?
11:17:17cheatfatemaybe because i'm not official person of any serious projects?
11:18:44dom96we're open source for a reason
11:20:20*unlaudable quit (Remote host closed the connection)
11:20:20cheatfateis it so complex for you?
11:20:29*bjz_ quit (Ping timeout: 255 seconds)
11:26:31*bjz joined #nim
11:29:47*vlad1777d joined #nim
11:33:17*Matthias247 joined #nim
11:37:26*Jipok[m] sent a long message: Jipok[m]_2017-02-05_11:37:24.txt - https://matrix.org/_matrix/media/v1/download/matrix.org/IaKXNZlIrRAlUQBlIwiXodGk
11:43:29*couven92 joined #nim
11:44:06TheManiacyou using 32bit on 64bit or vice versa?
11:50:51*couven92 quit (Quit: Client disconnecting)
11:51:13*couven92 joined #nim
11:51:33Jipok[m]64bit system, 64 nim, mingw64
11:51:56cheatfateJipok[m], i think nim's mingw64 distribution has 32bit gdb inside
11:52:03cheatfateits pretty old bug
11:52:18cheatfatecould you check is your gdb is 32bit?
11:52:49Jipok[m]how?
11:53:14Jipok[m]ah. it's 32
11:53:43Jipok[m]in task manager "gdb.exe *32"
11:53:54cheatfatehttps://sourceforge.net/projects/mingw-w64/files/Toolchains%20targetting%20Win64/Personal%20Builds/mingw-builds/4.9.2/threads-win32/seh/x86_64-4.9.2-release-win32-seh-rt_v4-rev4.7z/download
11:54:07*couven92 quit (Client Quit)
11:54:19cheatfatethis mingw64 distro has 64bit gdb
11:54:32*couven92 joined #nim
11:57:21Jipok[m]why 4.9.2? latest - 6.3.0
11:57:21Jipok[m] I do not use it?
12:01:11cheatfateJipok[m], ok then use 6.3.0
12:01:26cheatfatenobody forces you to use this one distro
12:02:27Jipok[m] what is the difference? I receive any benefit from the choice in favor of 6.3.0 or 4.9.2?
12:03:13*Snircle joined #nim
12:04:09cheatfateJipok[m], http://mingw-w64.org/doku.php/start
12:11:30*PMunch joined #nim
12:12:26*Kingsquee quit (Quit: https://i.imgur.com/qicT3GK.gif)
12:15:27*carterza quit (Quit: carterza)
12:18:39*Arrrr quit (Disconnected by services)
12:18:41*Arrrr1 joined #nim
12:18:58*Arrrr1 quit (Client Quit)
12:19:09*bjz quit (Quit: My MacBook Pro has gone to sleep. ZZZzzz…)
12:22:17*couven92 left #nim ("Leaving channel")
12:25:43*yglukhov joined #nim
12:28:44*couven92 joined #nim
12:31:17*yglukhov quit (Ping timeout: 255 seconds)
12:34:44Jipok[m]it works. thanks all
13:11:12enthus1astis httpclient capable of saveing chunks of data so that i can savely download larger files?
13:11:21enthus1astsafely
13:12:16Araqno, there is this a PR in the works though
13:13:34enthus1astdo you know, is it on github already?
13:14:52Jipok[m] Please help choose the GUI library. nimx or ui(libui)?
13:15:04enthus1astmhh does not seem so, ty araw
13:15:09enthus1astq -.-
13:15:23Jipok[m] It seems both are actively developing
13:16:31dom96for what purpose?
13:17:16*GustavoLapasta joined #nim
13:17:48Jipok[m]There is some form editor?
13:19:57Jipok[m]The simpler the better. I would not want to spend the time to learn a scripting language for the GUI or something like that.
13:20:40dom96Jipok[m]: what do you want to use a GUI library for?
13:21:39Araqenthus1ast: https://github.com/nim-lang/Nim/issues/5020
13:22:51*handlex joined #nim
13:23:45Jipok[m]dom96: I do not know. But I'm going to study nim and use it in the future. I wanted to choose a GUI library just to get used to it
13:24:46Jipok[m]Recently, I asked about the client for the matrix. Maybe this will be my first project on nim
13:25:04dom96Jipok[m]: It depends a lot on your use case unfortunately.
13:28:29dom96Best thing to do is probably to play around with both of them.
13:29:13Jipok[m]As far as I understand, libui uses native platform technology.
13:29:14Jipok[m]What about nimx?
13:29:41*handlex quit (Quit: handlex)
13:29:54dom96it draws the UI manually
13:31:28Jipok[m]opengl?
13:31:54Vladarsdl
13:34:39Jipok[m]I saw somewhere that nim can compile in js. Is it true? Is this GUI libraries are supported?
13:35:37Vladarnimx supports js IIRC
13:41:03Jipok[m]it is broken (
13:44:00*Jipok[m] sent a long message: Jipok[m]_2017-02-05_13:43:59.txt - https://matrix.org/_matrix/media/v1/download/matrix.org/trfZQVicAsjCFKibfbhdfPLC
13:45:20stisa[m]what does `git --version` output?
13:45:53Jipok[m]git version 2.11.1.windows.1
13:46:28Jipok[m]This is the second attempt. First doing something. There's a lot of text. I could not copy
13:49:36stisa[m]That's strange, why can't nimble find git then? can you try installing any other package with nimble?
13:50:51Jipok[m]http://pastebin.com/2Th3TQ6G
13:51:30Jipok[m]full log. It was after the first use "nimble install nimx"
13:53:31Jipok[m] How to properly copy the text from VS Code terminal?
13:55:40stisa[m]you can write to a file: `nimble install nimx > nimxlog,txt` will copy the output to a file named nimxlog.txt
13:56:50Jipok[m]thx
14:00:19*kier joined #nim
14:01:09Jipok[m]http://pastebin.com/3rrwaEVa
14:01:16Jipok[m] hmm. it is strange, it continues with the installation of other packages. A feeling that I balk at the some git limit.
14:03:00stisa[m]Those are packages required for nimx, it should work once it finishes installing them
14:05:39*carterza joined #nim
14:06:43Jipok[m] After the 6 th repetition command is established.
14:10:32*carterza quit (Client Quit)
14:11:22dom96Jipok[m]: have you got the latest Nimble version?
14:11:43dom960.8.4 is latest
14:14:56Jipok[m]nimble v0.8.2 compiled at 2017-01-08 21:31:31
14:16:03*carterza joined #nim
14:16:28*carterza quit (Client Quit)
14:20:39Jipok[m]OMG. Why nimble installs the packages into a kind of left folder? Can i set it to the packages were placed near the nim folder?
14:23:31AraqJipok[m]: yes and it's documented how to do that
14:23:40stisa[m]https://github.com/nim-lang/nimble/blob/master/readme.markdown#configuration
14:26:57Jipok[m] those. I can move the folder, but "AppData\Roaming\nimble\nimble.ini" file will still be there?
14:28:24*yglukhov joined #nim
14:29:32stisa[m]Yes, but why do you want to move it?
14:30:08Jipok[m]I do not like when the program scatter files on the system.
14:31:27Jipok[m]I'm much more comfortable when nim and all that concerns nim is in C:\nim and only there.
14:31:58*yglukhov quit (Remote host closed the connection)
14:32:11*yglukhov joined #nim
14:32:49dom96Jipok[m]: you might want to try upgrading to 0.8.4
14:33:11AraqAppData\Roaming is a Windows standard though, C:\ can require admin rights
14:33:16dom96Araq: Can koch upgrade Nimble?
14:33:34Araqdom96: yes. if he installed via github
14:33:44*carterza joined #nim
14:34:57carterzaVarriount|Mobile : sorry I passed out, it was actually pretty easy once I got nanovg integration working
14:35:33carterzaI have a feeling the layout engine I’m going to start working on next is going to be a pain
14:35:40Jipok[m]I moved the folder. How am I going to fix this?
14:35:41Jipok[m]test.nim(2, 12) Error: cannot open 'nimx/window'
14:35:59dom96Araq: I dislike these various conditions. Upgrading Nimble should be as easy as "You just run this command" for every sort of installation :\
14:36:58*yglukhov quit (Remote host closed the connection)
14:37:26stisa[m]Jipok: well I guess you could hack nimble to check if there's a config file in the directory it is run and use it, but I have no idea how hard it would be.
14:37:33*yglukhov joined #nim
14:38:53dom96Jipok[m]: you can also specify the --nimbleDir on the command line
14:39:21dom96But I'm a bit lost about what you're trying to accomplish
14:42:09*yglukhov quit (Ping timeout: 248 seconds)
14:42:37Jipok[m]dom96: Nimble simply indicate that he downloaded packages in C:\nim\nimble
14:43:51Jipok[m]I created "c:\Users\user\AppData\Roaming\nimble\nimble.ini" and wrote: nimbleDir = r"C:\nim\Nimble"
14:44:16Jipok[m]then do "nimble refresh"
14:44:48Jipok[m] It seems Nimble has survived the transfer directory. But the compiler gives an error
14:44:57Jipok[m]test.nim(2, 12) Error: cannot open 'nimx/window'
14:45:48dom96Huh? How could `nimble refresh` result in that?
14:46:02dom96Nimble won't transfer things you've installed automatically
14:46:59*Jipok[m] sent a long message: Jipok[m]_2017-02-05_14:46:57.txt - https://matrix.org/_matrix/media/v1/download/matrix.org/toWXJzmbZlGsTemymxrsNHVZ
14:47:20*Jipok[m] sent a long message: Jipok[m]_2017-02-05_14:47:18.txt - https://matrix.org/_matrix/media/v1/download/matrix.org/KAbLMrLeHuuLmAQxYqyafRAB
14:47:27Jipok[m]ох
14:47:41*Jipok[m] sent a long message: Jipok[m]_2017-02-05_14:47:39.txt - https://matrix.org/_matrix/media/v1/download/matrix.org/owHrnIJfFQaLgAYvnqGyvPhp
14:48:06dom96Matrix sends long messages strangely to IRC
14:48:36Jipok[m]but if something else does not break? Perhaps I should have been back?
14:49:02dom96Yes, you need to change the nimble path in the compiler config too
14:49:19Jipok[m] You mean hit by a tab?
14:50:19Jipok[m]google translate(
14:52:09Jipok[m]it's works
14:52:37*nsf quit (Quit: WeeChat 1.7)
14:54:22Jipok[m]Jipok[m]: you might want to try upgrading to 0.8.4
14:54:24Jipok[m] In 0.8.4 I will no longer be needed "AppData \ Roaming \ nimble \ nimble.ini"?
14:58:11dom96it will be
14:58:15dom96but it fixes some bugs
14:59:05Jipok[m] and how do I upgrade? The current version was with the compiler.
15:00:53*yglukhov joined #nim
15:01:49Jipok[m]try " koch nimble"
15:07:23Jipok[m]nimble v0.8.2 compiled at 2017-02-05 20:01:26
15:08:06Jipok[m] it just rebuild?
15:14:14Jipok[m]I downloaded his manually and repeated the "koch nimble".
15:14:15Jipok[m]nimble v0.8.4 compiled at 2017-02-05 20:12:28
15:15:00Jipok[m]There are something like "nimble upgrade"? Usually there is a package managers.
15:24:31*yglukhov quit (Remote host closed the connection)
15:25:06*yglukhov joined #nim
15:29:36*yglukhov quit (Ping timeout: 258 seconds)
15:32:28*arnetheduck quit (Ping timeout: 260 seconds)
15:34:33Jipok[m]I have been unable to find the libui.dll. Maybe I'm too stupid?
15:35:03*yglukhov joined #nim
15:35:09*Trustable joined #nim
15:37:28AraqJipok[m]: I build it with Visual Studio and don't need a DLL then
15:39:09Jipok[m]I build it with VS too
15:39:15*Jipok[m] sent a long message: Jipok[m]_2017-02-05_15:39:13.txt - https://matrix.org/_matrix/media/v1/download/matrix.org/tvMPhMGjHhAplyZYiVtYVncH
15:48:21Araqthat log doesn't show how you build it
15:49:00Jipok[m]G:\Temp\NimProject>nim c -r g:\Temp\NimProject\test.nim
15:49:23Jipok[m]just clicked F6
15:51:08Araqnim c -r --cc:vcc
15:51:13Araqwould use vcc
15:53:01*Jipok[m] sent a long message: Jipok[m]_2017-02-05_15:52:59.txt - https://matrix.org/_matrix/media/v1/download/matrix.org/pUKQACRzWUGDreFCIUYEYpiI
15:53:30Araqoh yeah it requires Nim 0.16.1
15:53:57Jipok[m]-_-
15:54:19Araqhey, release is just around the corner :-)
15:54:33*djellemah joined #nim
15:54:39Araqor you do the 'git clone' dance to get 0.16.1
15:55:15Jipok[m] Can I take an older version of ui?
15:55:59Jipok[m]For it seems to me that the transition will be more difficult for a new version of the compiler.
15:57:44Araqyou already went through the trouble to install git and mingw
15:57:55Araqbuilding a Nim v 0.16.1 is a piece of cake in comparison
15:58:02Jipok[m]Tried nimx
15:58:03Jipok[m]nimble\pkgs\nimx-0.1\nimx\view_event_handling.nim(8, 8) Error: method is not a base
15:58:04Jipok[m](
15:59:12Jipok[m] it also requires a 16.1?
15:59:22Araqno idea, sorry, ping yglukhov
16:00:59Araqgit clone https://github.com/nim-lang/Nim nim-devel
16:01:02Araqcd nim-devel
16:01:11Araqkoch boot -d:release
16:01:32Araquse nim-devel\bin instead of nim\bin
16:01:36Araqthat's it.
16:19:57*Arrrr joined #nim
16:19:57*Arrrr quit (Changing host)
16:19:57*Arrrr joined #nim
16:21:29carterzahttp://imgur.com/a/BqF12
16:27:47carterzaJipok[m] I’ve gotten nimx to work before - it does require devel
16:28:10Jipok[m]so
16:28:12*Jipok[m] sent a long message: Jipok[m]_2017-02-05_16:28:10.txt - https://matrix.org/_matrix/media/v1/download/matrix.org/qHtMKVZJyaodcFAagsvTaHnB
16:28:35Jipok[m]Nimble\pkgs\nimx-0.1\nimx\view_event_handling.nim(8, 8) Error: method is not a base
16:29:02carterzamake sure you compiled the depenent packages with devel as well
16:29:08carterzaand installed them with the latest version
16:29:11carterzalike nimsl
16:29:12carterzaetc
16:29:26Jipok[m]ah
16:30:02carterzabest thing to do Jipok[m] is clone a fresh copy of nimx
16:30:04carterzaand then do
16:30:45carterzanimble install -y
16:33:07Jipok[m]nim c -r c:\nim\Nimble\pkgs\nimx-0.1\test\sample01_welcome.nim
16:33:10Jipok[m]Nimble\pkgs\nimx-0.1\nimx\view_event_handling.nim(8, 8) Error: method is not a base
16:37:08carterzaI’m out of ideas - best to hit up yglukhov if you can get a hold of him at this point
16:37:35yglukhovhey guys, let me check it
16:41:02Jipok[m]That's my fault
16:41:23yglukhovJipok[m]: what? resolved already? =)
16:42:30Jipok[m] nim c -r c:\nim\Nimble\pkgs\nimx-0.1\test\sample01_welcome.nim
16:42:47Jipok[m] I chose the wrong file
16:43:26yglukhovJipok[m]: just run nake, it should setup everything properly. especially if you're on macos, it will make the bundle for you.
16:44:06Jipok[m] it was necessary to compile main.nim
16:44:18Jipok[m] then it runs
16:44:31yglukhovok cool.
16:45:33Jipok[m]nake?
16:49:30Jipok[m]ah ok. i see nakefile.nim
16:50:23carterzanake is like rake for ruby for for nim :D
16:52:56*nsf joined #nim
16:53:10Jipok[m]i tried "nim c -r c:\nim\Nimble\pkgs\nimx-0.1\editor\nakefile.nim". This does not work
16:53:42*Jipok[m] sent a long message: Jipok[m]_2017-02-05_16:53:41.txt - https://matrix.org/_matrix/media/v1/download/matrix.org/ADqAzeLaBDYaVcmQQCdsmcpN
16:54:01carterzaah you don’t run nakefiles with nim
16:54:04carterzac
16:54:07carterzayou run them with nake
16:54:18carterzahttps://github.com/fowlmouth/nake
16:55:20demi-can you bootstrap with nake?
16:57:08demi-is there a way to convert a `char` to anything useful, like a `string` or `int` representation? so far i've only found `strutils.repeat(char, 1)` to make it a string, and this seems like it should be a solved problem.
17:02:08*rokups quit (Quit: Connection closed for inactivity)
17:02:16carterzademi- no idea on either account
17:03:15*yglukhov quit (Remote host closed the connection)
17:03:48*yglukhov joined #nim
17:04:45*yglukhov quit (Remote host closed the connection)
17:05:01*yglukhov joined #nim
17:05:36Araqdemi-: $c to turn into a string
17:05:47Araqlike $ is used for everything.
17:06:10Jipok[m]yglukhov: "C:\nim\Nimble\pkgs\nimx-0.1\editor>nake build" true?
17:06:12Araqord(c) turns it into an int
17:06:52yglukhovJipok[m]: just nake
17:07:02yglukhovnot sure about the editor though
17:07:09yglukhovhavent compiled it in a while
17:07:26Jipok[m]Error: unhandled exception: ╨Э╨╡ ╤Г╨┤╨░╨╡╤В╤Б╤П ╨╜╨░╨╣╤В╨╕ ╤Г╨║╨░╨╖╨░╨╜╨╜╤Л╨╣ ╤Д╨░╨╣╨╗.
17:07:26Jipok[m]Additional info: Requested command not found: 'nimble.cmd path nimx'. OS error: [OSError]
17:07:27Jipok[m]Warning: icon was not found: build\windows\res\MyGame.ico
17:07:55yglukhovyeah, just found out about this problem. this is something new...
17:08:01yglukhovplease report it
17:08:21*PMunch quit (Quit: leaving)
17:09:39*Jipok[m] sent a long message: Jipok[m]_2017-02-05_17:09:37.txt - https://matrix.org/_matrix/media/v1/download/matrix.org/xmqnVcBhPotoBPIyNWmWUgpS
17:11:56demi-Araq: is there an example of this? i don't remember this in the nim language manual
17:13:20*yglukhov quit (Remote host closed the connection)
17:13:50*yglukhov joined #nim
17:14:13Araqthe manual doesn't document the stdlib
17:16:18demi-oh, you mean like `"$c" % my_char`
17:17:52*yglukhov quit (Remote host closed the connection)
17:18:26*yglukhov joined #nim
17:22:29*yglukhov quit (Ping timeout: 240 seconds)
17:36:33*yglukhov joined #nim
17:38:07*yglukhov quit (Remote host closed the connection)
17:38:40*yglukhov joined #nim
17:42:49*yglukhov quit (Ping timeout: 240 seconds)
17:57:30*yglukhov joined #nim
18:04:58*sz0 joined #nim
18:20:20*yglukhov quit (Remote host closed the connection)
18:20:55*yglukhov joined #nim
18:26:13Araqdemi-: no, I mean the rather obvious $my_char
18:26:23demi-oh
18:47:18*smt joined #nim
19:22:36*couven92 quit (Ping timeout: 240 seconds)
19:25:18*Jesin quit (Quit: Leaving)
19:27:48*Jesin joined #nim
19:32:33*devted joined #nim
19:32:33*devted quit (Client Quit)
19:32:41*yglukhov quit (Remote host closed the connection)
19:33:17*yglukhov joined #nim
19:33:19*devted joined #nim
19:33:44*yglukhov quit (Remote host closed the connection)
19:33:59*yglukhov joined #nim
19:38:03*adeohluwa joined #nim
19:38:19*yglukhov quit (Remote host closed the connection)
19:38:55*yglukhov joined #nim
19:39:17*elrood joined #nim
19:41:57*irrequietus quit (Read error: Connection reset by peer)
19:43:13*yglukhov quit (Ping timeout: 256 seconds)
19:48:21euantorDoes anybody here happen to have much experience working with serial ports in C? I've been working on a Nim library to interface with serial ports, but I can't get it to read anything using the USB serial adapters I have. `read` is always returning 0 bytes, and when I use `select` with a 5 second timeout I always get a timeout. The code I'm using is
19:48:21euantoravailable here: https://github.com/euantorano/serialport.nim/blob/master/examples/read_write.nim
19:49:38euantorI have a feeling I'm missing something obvious, but reading the `Serial Programming Guide for POSIX Operating Systems` hasn't helped me work out where I'm going wrong
19:52:25*Jesin quit (Quit: Leaving)
19:53:22Araq var data: cstring = newString(100).cstring
19:53:22Araq let numRead = writer.read(data[0].addr, len(data))
19:53:29Araqeuantor: is horrible code
19:53:39euantor:(
19:53:42Araqinstead leave 'data' as a 'string'
19:53:53euantorOk, point noted
19:53:56Araqotherwise the Gc can destroy it under your feet
19:54:10*carterza quit (Quit: carterza)
19:54:18euantorThat would be pretty bad I guess ;)
19:54:44*Jesin joined #nim
19:54:44Araqyeah, but that's not why your code fails
19:55:19euantorYeah, changed that now
19:56:11euantorI've also looked at Apple's guide to working with serial ports (since I'm writing and testing on a mac and wondered if there was a possibility that there's something odd on this platform) and it looks like it does the same as I do
19:56:39euantorI've tested the two USB adapters using a program called `CoolTerm` and can read and write between the two, so it's not hardware
19:56:57euantorI've never written in C before, so was wondering if maybe I'd made some daft mistake translating code
19:58:04Araqmaybe "sudo" your program?
19:58:28euantorSurely if that were the case the write would fail too?
19:58:36euantorThe write call works, it's just the read that fails
19:59:12euantor(with the exception that the write seems to be asynchronous, hence the call to sleep)
19:59:22Araqwell you never know
19:59:33euantorI'll give it a go now, thanks
19:59:46Araqalso: maybe you need to clear some error after the write
20:00:03Araqjust waiting for 5secs is a hack.
20:00:36Araqmaybe the read only fails because you already messed up the 'write' call
20:00:41euantorBefore I had the read in there, it would write, then close the port immediately
20:01:00euantorAnd I'm checking the returns for calls to write and everything and raising exceptions. No exceptions are raised
20:07:56Araqwho wrote serialport.nim?
20:08:26euantorI did
20:09:31euantorJust tested running as Sudo, made no difference
20:11:52*bjz joined #nim
20:16:25*carterza joined #nim
20:17:06*vlad1777d quit (Remote host closed the connection)
20:20:27*GustavoLapasta quit (Quit: Leaving)
20:32:53*adeohluwa quit (Ping timeout: 260 seconds)
20:33:31stisa[m]Any idea what I'm doing wrong? The ast looks the same to me https://glot.io/snippets/emuwznvm6w
20:35:15cheatfateeuantor, looks like you forget to setup port parameters
20:35:19cheatfatelike speed
20:35:24euantorcheatfate
20:35:27cheatfateerror corrects
20:35:30cheatfateand other shit
20:35:42euantor*cheatfate that's done in openSerialPort
20:36:02euantorhttps://github.com/euantorano/serialport.nim/blob/master/src/serialport/private/serial_posix.nim#L91
20:36:16euantorAnd if I didn't do that, surely the write would fail too?
20:38:08cheatfatewhereis termios.nim?
20:38:48euantorIn the stdlib
20:39:05euantorhttps://github.com/nim-lang/Nim/blob/devel/lib/posix/termios.nim
20:41:22*elrood quit (Quit: Leaving)
20:41:36cheatfateyou connected 2 pc with 2 usb dongles and make read/write test of it?
20:42:35euantoryep, and it works
20:42:55*krux02 joined #nim
20:49:53*xet7 quit (Ping timeout: 255 seconds)
21:03:11*Trustable quit (Remote host closed the connection)
21:06:25cheatfateeuantor, there many reasons why it fail and many ways how to check it
21:06:36cheatfateeuantor, what port uses CoolTerm?
21:06:52euantorIt uses another USB serial adapter
21:06:58cheatfateeuantor, i mean what `/dev/xxx`
21:08:51euantorIt uses /dev/cu.usbserial-FTZ9FZJB
21:16:13*amphigory joined #nim
21:17:50*amphigory left #nim (#nim)
21:18:09*bjz quit (Quit: My MacBook Pro has gone to sleep. ZZZzzz…)
21:19:50*sz0 quit (Quit: Connection closed for inactivity)
21:22:26*krux02 quit (Remote host closed the connection)
21:25:50*amphigory joined #nim
21:26:37*Arrrr quit (Quit: Leaving.)
21:27:34amphigoryQuestion: I am working on a project where I would like to generate skeleton code from some API definitions in JSON format. Obviously, I can write a nim program to parse the JSON and generate the code. Is there a better way using macros or something like that? Brand new to nim and this is a project to give me an excuse to learn the language, so any tips or pointers
21:27:40amphigorywould be appreciated.
21:31:28*vitalyx joined #nim
21:31:48*krux02 joined #nim
21:32:40*amphigory quit (Quit: amphigory)
21:33:04*amphigory joined #nim
21:33:08*vitalyx quit (Client Quit)
21:33:27*yay joined #nim
21:36:32yayHi guys, I'm new to Nim, I quite like the language so far, is looks familiar (I used to work with Delphi years ago) and it's super flexible without loosing in clarity.
21:37:34yayI've been looking at the generated code for simple array operations and comparing the performance with an equivalent C code and in my crude benchmarks Nim is about 35% slower.
21:37:42*libmanCloud quit ()
21:38:11*libman joined #nim
21:38:14*krux02 quit (Quit: Leaving)
21:39:48*amphigory quit (Quit: amphigory)
21:39:55yayHere is the C and Nim code I used: https://gist.github.com/yay/538c87f27f5d6c6a92e7c9387c3af711
21:40:34*yay And the Nim compiler flags are:--rangeChecks:off
21:40:56yayand --boundChecks:off, --deadCodeElim:on, --opt:speed
21:41:18Vladarwith -d:release ?
21:41:22yayyep
21:41:52yayand the C code was built with a debug target
21:42:24yaybecause if it's built with the release target, it basically optimizes the whole loop away and the app runs instantly
21:43:21yayhowever, if I put `printf("%d\n", a[70000][7000]);` before `free(a)` in C code and compile with the release target, the C version is even faster
21:44:09Vladarwhy `for xi, xv in a:` and not `for xi in 0..x:` ?
21:45:19stisa[m]I think I remember something about int in nim defaulting to 64, and 32 in C, is sizeof(int) the same in both your programs?
21:45:49yayah, good question and no good reason :) except that code was initially used to print the rows of a much smaller matrix
21:46:06VladarI believe nim defaults int to architecture standard
21:46:41Araqyay: wrap the Nim code in a 'main' proc
21:49:02*bjz joined #nim
21:55:08demi-how would i get a string to be split by every two characters?
21:55:22cheatfatedemi-, try to search in strutils.nim
21:55:45demi-yeah i'm going through that and i see ways to split by substring, but not by interval?
21:57:14Varriount|Mobiledemi-: Isn't it a simple matter of using a for loop?
21:57:30*bjz quit (Quit: My MacBook Pro has gone to sleep. ZZZzzz…)
21:57:46demi-i guess it could be, i was hoping there was a more refined way to iterate
21:57:48yay@Araq It runs instantly now, but if I echo a random cell, it quits with illegal instruction. I updated the gist: https://gist.github.com/yay/538c87f27f5d6c6a92e7c9387c3af711
21:57:57yayAm I missing something?
21:58:22Vladarit looks like itout of bounds
21:58:40Vladaroh no
21:58:43Araqyay: you provoke a stack overflow
21:58:59yayoh, right
21:59:15yaybut without the main proc it allocates on the heap
21:59:27yay?
21:59:29Araqand your OS performs memory overcommitment so that it fails in a stupid inconsistent manner
21:59:52Araqyou can praise Unix's fork() call for that.
22:00:22Araqkeeping operating systems from operating since 1970.
22:00:35yay:)
22:01:03Araqbut *shrug* some people who should really be dead by now like it and so it cannot be removed.
22:01:59yaysome of them already are
22:03:44Araqanyway, you C version calls malloc, your Nim version can call newSeq
22:04:04*amphigory joined #nim
22:04:41yayoh, I tried the newSeq too, and it was 10% slower than the array version, didn't use the main proc, though, will try now
22:05:03Varriount|MobileAraq: Your criticisms of *nux are so refreshing. Most expert programmers I know will adamantly defend the *nix way of doing things.
22:05:24*amphigory quit (Read error: No route to host)
22:05:59AraqVarriount|Mobile: thanks but I really feel like a broken record
22:06:12*Vladar quit (Remote host closed the connection)
22:10:38cheatfateVarriount|Mobile, yeah graphical UI through tcp/ip network is like the best thing mankind deserve...
22:11:37Varriount|Mobilecheatfate: I never said that, nor did I say that Windows/OSX was perfect
22:12:35Varriount|MobileAnd I believe RDP is done through UDP
22:13:46cheatfateVarriount|Mobile, i'm not talking about RDP, i'm talking about local graphical UI which uses local tcp/ip stack to show UI at my local monitor...
22:14:37cheatfateosx is modified *nix
22:15:08cheatfateand modified only with UI part
22:15:26cheatfateeverything other is just forked bsd
22:19:13yayWell, the seq version is about as fast as the array one: https://gist.github.com/yay/538c87f27f5d6c6a92e7c9387c3af711
22:19:18cheatfateUnix is suitcase without a handle, hard to carry, and throw a pity
22:20:32Varriount|Mobileyay: Which makes sense. Sequences are just dynamically (re)allocated arrays
22:22:08Varriount|MobileThe only penalties you occur are the ones associated
22:22:29Varriount|Mobilewith heap memory in general, and reallocation
22:23:55euantorJust want to say a big public thanks to cheatfate for helping me debug my issues with the serial port code from earlier. Looks like the problem was caused by not setting the flags for CTS/RTS
22:25:06yayWhat made me wonder is I saw memcpy inside the loop in the generated C code... the array version without the main proc. Now with seqs and main proc they are gone, it's two straighforward nested while loops now that simply write to a->data.
22:25:54Varriount|Mobileyay: One thing to keep in mind is that sequences are like arrays with regards to assignment behavior
22:26:18Varriount|MobileA new sequence is copied/created on assignment.
22:27:27yayah, yeah, I remember reading that pretty much everything is copied on assignment, except if you pass an array to a proc, it is not
22:30:15Varriount|MobileWell, references aren't copied
22:30:44Varriount|MobileCopies don't normally occur when paying parameters either
22:37:52yayHmm... I get user + sys time: 1.896s for the C version (release target) and 5.106s for Nim version. Updated the gist again: https://gist.github.com/yay/538c87f27f5d6c6a92e7c9387c3af711
22:39:13yayDon't know if I'm doing something wrong or if this is to be expected.
22:39:35cheatfateyay, 32bit os or 64bit?
22:40:01yay64bit, macos
22:40:33cheatfateC's integer size is 32bit on 64bit os, but nim's int size is 64bit on 64bit os
22:40:41*derlafff quit (Quit: No Ping reply in 180 seconds.)
22:41:11cheatfatealso you need to run at least 10 times and get average to be completely sure
22:41:12*zielmicha_ quit (Ping timeout: 252 seconds)
22:41:24demi-this is why you always should use fixed width types in C
22:41:25*Matthias247 quit (Read error: Connection reset by peer)
22:41:58*derlafff joined #nim
22:42:51*FromGitter quit (Ping timeout: 256 seconds)
22:43:04*zielmicha_ joined #nim
22:43:32cheatfateyay, from my experience, nim is like 95-97% in speed of C in most cases, if you get another result, then you are not made equal tests...
22:43:35*smt_ joined #nim
22:44:02yaythanks for the tip, I'm no C expert and it's been years since I last (seriously) worked with native code. It's all JS for me these days :p A job is a job...
22:44:39*FromGitter joined #nim
22:47:38*smt quit (Ping timeout: 260 seconds)
22:54:05yayOK, updated the gist with new data/code.
22:54:15yayThe C version has become a lot slower :)
22:54:21yaywith long ints
22:54:42yayThe Nim version is about 24.5% slower now.
22:55:14yayWhich isn't bad.
23:00:20*derlafff quit (Quit: No Ping reply in 180 seconds.)
23:01:36*derlafff joined #nim
23:04:49*smt_ is now known as smt
23:05:48cheatfateyay, your test allocates 1Gb of memory, its very hard allocation for every OS until your mac has at least 32GB
23:06:01*PMunch joined #nim
23:06:49cheatfateso running tests one by one is not very fair because of Os memory manager
23:07:51yaywhat would be the right way to do it?
23:09:06yayIt's actually 8GB of memory )
23:09:43yayand yeah, now that I think about it, I don't have this much free (I have 16GB total and a bunch of stuff open).
23:10:03cheatfateyeah you are right its 8gb of memory
23:40:13*nsf quit (Quit: WeeChat 1.7)
23:41:08*ftsf_ joined #nim
23:45:14Varriount|MobileYay: I would try to allocate and then release 1Gb of memory in the test, before starting the timer
23:55:08cheatfateVarriount|Mobile, this is can't help, because you need to be sure that this 1gb of memory is totally in RAM
23:55:31Varriount|MobileHm.
23:56:56Varriount|MobileWhat about running the test twice, and using the second result?
23:58:19Varriount|MobileAll in the same process
23:59:37cheatfateto benchmark such memory allocations without os interaction you need like 5x size of RAM
23:59:58cheatfateotherwise os can optimize your requests