<< 14-06-2017 >>

00:01:16*Neomex quit (Quit: Leaving)
00:25:44*yglukhov joined #nim
00:30:24*yglukhov quit (Ping timeout: 260 seconds)
00:46:05*rusua quit (Quit: Connection closed for inactivity)
01:08:34*yingjun_ joined #nim
01:12:44*yingjun_ quit (Ping timeout: 246 seconds)
01:14:29*vlad1777d quit (Remote host closed the connection)
01:29:59*chemist69 quit (Disconnected by services)
01:30:04*chemist69_ joined #nim
01:40:29*rauss quit (Quit: WeeChat 1.8)
01:42:15*yingjun_ joined #nim
02:08:00*pilne quit (Quit: Quitting!)
02:24:08FromGitter<ivanflorentin> is there an easy way to use nim as a scripting language? i mean, full nim.
02:24:57FromGitter<ivanflorentin> mostly to replace bash scripts
02:28:35*yglukhov joined #nim
02:32:48*yglukhov quit (Ping timeout: 240 seconds)
03:00:08*def-pri-pub quit (Quit: leaving)
03:06:39*Snircle quit (Quit: Textual IRC Client: www.textualapp.com)
03:30:43*yglukhov joined #nim
03:34:54*yglukhov quit (Ping timeout: 255 seconds)
03:48:33*skrylar joined #nim
03:48:49skrylarbleh
03:49:02skrylarstill working on a module to get nim working with elementaryos stuff
03:55:26*yingjun_ quit (Remote host closed the connection)
03:55:39*yingjun_ joined #nim
03:57:03*yingjun_ quit (Remote host closed the connection)
03:58:59*yingjun_ joined #nim
04:07:41*yingjun_ quit (Remote host closed the connection)
04:28:51*benoliver999 quit (Ping timeout: 260 seconds)
04:30:43*Xe quit (Ping timeout: 260 seconds)
04:36:19*benoliver999 joined #nim
04:36:57*Xe joined #nim
04:37:27*chemist69_ quit (Ping timeout: 255 seconds)
04:46:59*nightmared joined #nim
04:55:44*chemist69 joined #nim
05:08:34*yingjun_ joined #nim
05:12:50*yingjun_ quit (Ping timeout: 246 seconds)
05:21:52*bahtiyar_ joined #nim
05:28:01*bahtiyar_ quit (Remote host closed the connection)
05:28:32*bahtiyar joined #nim
05:32:53*yglukhov joined #nim
05:37:10*yglukhov quit (Ping timeout: 240 seconds)
06:02:36*nsf joined #nim
06:06:58*yingjun_ joined #nim
06:08:52Araqivanflorentin: that's what I do all the time, but what is there to "know" about it?
06:09:35Araqmaybe you want to use 'nake' for it
06:17:49*skrylar quit (Ping timeout: 246 seconds)
06:23:00*Vladar joined #nim
06:43:54*vlad1777d joined #nim
06:50:35*bahtiyar_ joined #nim
06:51:10*bahtiyar quit (Ping timeout: 240 seconds)
06:52:19*bahtiyar_ quit (Client Quit)
06:52:28*bahtiyar joined #nim
07:03:23*Arrrr joined #nim
07:03:23*Arrrr quit (Changing host)
07:03:23*Arrrr joined #nim
07:05:55*krux02 joined #nim
07:14:57*vlad1777d quit (Ping timeout: 255 seconds)
07:32:22*yglukhov joined #nim
07:39:57*yingjun_ quit (Remote host closed the connection)
07:40:12*yingjun_ joined #nim
07:41:38*yingjun_ quit (Remote host closed the connection)
08:21:02*vlad1777d joined #nim
08:29:47*gangstacat quit (Quit: Ĝis!)
08:32:04FromGitter<zacharycarter> is there anything like stat for files
08:36:22ftsfzacharycarter https://nim-lang.org/docs/posix.html#stat,cstring,Stat ?
08:36:43ftsfstat does a lot of stuff, what kind of info are you wanting?
08:37:35*ghs39ghsggf joined #nim
08:37:36*ghs39ghsggf left #nim (#nim)
08:41:22*gangstacat joined #nim
08:42:04*yingjun_ joined #nim
08:46:28*yingjun_ quit (Ping timeout: 260 seconds)
09:02:43krux02Araq: Do you know rlwrap on Linux? Using "rlwrap nim secret" provides a basic GNU readline integration that is already better than if it had linenoise integration.
09:06:37*bahtiyar quit (Ping timeout: 268 seconds)
09:14:59*yingjun_ joined #nim
09:21:15*skrylar joined #nim
09:22:57FromGitter<zacharycarter> thanks ftsf I'm just going to watch a file instead I think it' easier
09:30:59ftsfzachary are you testing when the file was last modified or something?
09:31:20FromGitter<zacharycarter> yeah
09:31:39ftsfhttps://nim-lang.org/docs/os.html#getLastModificationTime,string ?
09:32:41*yingjun_ quit (Remote host closed the connection)
09:37:12*yingjun_ joined #nim
09:42:31FromGitter<zacharycarter> meh I'm giving up on it anyway
09:42:46FromGitter<zacharycarter> Nim doesn't want me to have hot reloadable game code yet
09:42:54FromGitter<zacharycarter> not in an easy way anyway
09:45:02*bahtiyar joined #nim
09:47:07FromGitter<zacharycarter> I like def-pri-pub's article on hot reloading Nim code but it doesn't seem very workable outside the example he's constructed
09:47:36Araqkrux02: no I wasn't aware of this tool, much appreciated thanks
10:00:01*planhths joined #nim
10:14:44*gokr joined #nim
10:21:33*Snircle joined #nim
10:30:08*athie quit (Ping timeout: 240 seconds)
10:30:09*planhths quit (Quit: Konversation terminated!)
10:32:49ArrrrYou could try lua instead https://github.com/jangko/nimLUA
10:38:26*skrylar quit (Remote host closed the connection)
10:38:44*skrylar joined #nim
10:51:04*skrylar quit (Ping timeout: 260 seconds)
10:55:50ftsfzacharycarter, compile to dll/so and load/unload?
10:58:33FromGitter<zacharycarter> ftsf: I've tried that but watching the dll in another thread introduces all sorts of complexity
10:59:30ftsfhmm what kind of problems?
10:59:41ftsfcan't set some kind of flag from the other thread to tell it to reload in the main thread?
10:59:50AraqI'd give Nim's VM a try though you probably need to add all kinds of things
11:01:26FromGitter<zacharycarter> ftsf: I've done that but with calling updates at 60fps and trying to unload / reload the dll things don't work exactly as expected
11:01:42FromGitter<zacharycarter> also passing state between the libs apparently is more complex than I thought as well
11:01:50FromGitter<zacharycarter> Araq: any more info on Nim's VM?
11:02:16FromGitter<zacharycarter> like where it resides etc
11:02:22Araqcheck out nimedit's source code perhaps
11:02:33Araqit uses the VM to load configs and scripting stuff
11:02:39FromGitter<zacharycarter> thank you
11:09:28*yingjun_ quit (Remote host closed the connection)
11:11:52*yingjun joined #nim
11:21:48*yingjun quit (Remote host closed the connection)
11:21:59*yingjun joined #nim
11:23:01*yingjun quit (Remote host closed the connection)
11:39:05*yingjun joined #nim
11:41:31*yglukhov quit (Remote host closed the connection)
11:50:28*yingjun quit (Remote host closed the connection)
12:02:15*planhths joined #nim
12:07:14*xet7 joined #nim
12:15:37*yglukhov joined #nim
12:15:58dom96Just in case you want more examples, Nimble does the same.
12:19:57*yglukhov quit (Ping timeout: 240 seconds)
12:23:25FromGitter<zacharycarter> thanks dom96
12:24:29ftsfzacharycarter, have you had any luck with android builds?
12:24:56FromGitter<zacharycarter> mmhmm
12:25:01FromGitter<zacharycarter> they're a pain though with the ndk
12:25:30ftsfmmm i'm trying to get my android builds working now
12:25:42ftsfit "builds" but doesn't run so far
12:25:46FromGitter<zacharycarter> hrm
12:25:55ftsfand not really sure how to get much info out of it
12:26:07FromGitter<zacharycarter> I used Android Studio and checked the debugger in there
12:26:11ftsfahh
12:26:14ftsfmaybe i'll try that
12:26:14FromGitter<zacharycarter> not sure if you're using android studio or not
12:26:29FromGitter<zacharycarter> at first I ran into all sorts of problems loading shared libraries etc
12:26:43ftsfnah, was just doing cmdline ndk-build and ant debug
12:28:10FromGitter<zacharycarter> gotcha
12:28:20ftsfwill see if android studio gives me more info
12:31:06FromGitter<zacharycarter> if not I can try to help more later this evening
12:39:21captainkraftThis might be a good opportunity to show off what Nim can do https://itch.io/jam/utility-jam
12:45:19FromGitter<TiberiumN> Is there any tutorial on wrapping .dll library?
12:45:26FromGitter<TiberiumN> I have all .h includes
12:50:06*Arrrr quit (Read error: Connection reset by peer)
12:51:04*yingjun joined #nim
12:52:33FromGitter<TiberiumN> ah, I think I found it
12:57:27*yingjun quit (Ping timeout: 240 seconds)
12:58:55*xet7 quit (Ping timeout: 246 seconds)
13:14:25*xet7 joined #nim
13:15:20captainkraftI just realized that jam goes through to July, so not only for weekend projects \o/
13:16:47ftsf=( just installed android studio and it broke my android sdk... damn
13:17:32*PMunch joined #nim
13:17:42*Neomex joined #nim
13:21:30*bahtiyar quit (Remote host closed the connection)
13:23:46FromGitter<TiberiumN> How to properly use {.compile} pragma with multiple C files and headers?
13:26:26*Snircle quit (Quit: Textual IRC Client: www.textualapp.com)
13:32:06dom96https://github.com/dom96/untar/blob/master/src/untar/gzip.nim#L4
13:32:07dom96Like that
13:33:45FromGitter<TiberiumN> and what is "zlib_$#.obj"?
13:34:38*xet7 quit (Ping timeout: 240 seconds)
13:39:14*yglukhov joined #nim
13:39:17FromGitter<TiberiumN> For now ⏎ {.compile: "./src/*.c".} ⏎ gives me "Error: unhandled exception: cannot open: ./src/*.c [IOError]"
13:39:18dom96the .obj filename it will be compiled to
13:39:27FromGitter<TiberiumN> but there's src folder
13:39:37FromGitter<TiberiumN> Error: unhandled exception: cannot open: ./src/<asterisk>.c [IOError]
13:40:28FromGitter<TiberiumN> I'm on Windows
13:40:42ftsfis * supported?
13:40:53ftsffor {.compile.} ? it's not mentioned in the docs
13:41:07krux02ftsf the * is a shell expansion
13:41:12ftsfspecify all the files explicitly?
13:41:22ftsfkrux02, yes, but is that supported for compile?
13:41:44krux02no
13:41:49krux02because compile is not the shell
13:42:11krux02if you want to run compile on a lot of files you need to put them in all manually
13:42:18ftsfyeah, that's what i thought
13:42:25FromGitter<TiberiumN> but how this works then?
13:42:25FromGitter<TiberiumN> https://github.com/dom96/untar/blob/master/src/untar/gzip.nim
13:42:35krux02or you run something at compiletime and then emit the compile pragmas in your code
13:42:49ftsfTiberiumN does it work?
13:42:55dom96it is supported by the compiler.
13:42:56krux02you can generate that part of the code though
13:43:33dom96the shell has nothing to do with it
13:45:02captainkraftIs there an intro to metaprogramming in Nim somewhere? Most of what I've come across barely scratches the surface.
13:45:28krux02ls *.c | sed 's/.*/{. compile: "\0".}/'
13:46:00krux02captainkraft: well it is mostly learning by doing
13:46:17krux02I learned it by looking at the api and try things out
13:46:21FromGitter<TiberiumN> I can confirm
13:46:31dom96my book has a chapter on metaprogramming, but I'm afraid you'll need to buy it :)
13:47:44krux02I already though of writing something about metaprogramming and also introducing the very good use of the `quote do:' that has now been removed from the language
13:50:05*xet7 joined #nim
13:50:17*ftsf quit (Ping timeout: 268 seconds)
13:51:59captainkraftdom96: oh yeah! I forgot that I have it. I'm still waiting on the hard copy, dammit :-P
13:52:17Araqtiberium: give the .compile pragma a tuple ("src_pattern", "destpattern")
13:52:40dom96captainkraft: I emailed my publisher today asking for an update. It's all in their hands now and I don't have an ETA :(
13:54:17FromGitter<TiberiumN> and now I have "lnk2019 unresolved external symbol" ⏎ I'm trying to .importc things from these source files I've compiled with {.compile.} pragma
13:54:33*ftsf joined #nim
14:27:15*rauss joined #nim
14:28:28Araqwhat symbol is unresolved?
14:28:56Araqcheckout my ui/libui wrapper to see what might be required to get everything to link
14:49:31FromGitter<TiberiumN> I'm trying to compile all .c files into one executable
14:49:44FromGitter<TiberiumN> And use functions from them in Nim
14:53:40*xet7 quit (Quit: Leaving)
14:56:25*nsf quit (Quit: WeeChat 1.7.1)
14:58:12Araqthat was clear, yes.
15:12:15FromGitter<TiberiumN> I'm trying to compile this library - https://github.com/TransitApp/easylzma ⏎ I want to use only one function from it - https://github.com/TransitApp/easylzma/blob/master/src/easylzma/simple.h#L29
15:18:20FromGitter<TiberiumN> I was trying to find pure-python simple LZMA implementation to rewrite it in Nim, but I didn't found any
15:25:00*gokr quit (Ping timeout: 255 seconds)
15:25:14Araqand what's the linker error message exactly?
15:26:13FromGitter<TiberiumN> I'll try to clone a clear easylzma and try again
15:35:34FromGitter<TiberiumN> https://transfer.sh/teOh0/OsuReplay.zip ⏎ This is easylzma cloned repo and "testnim.nim" file which I'm trying to compile ⏎ ⏎ I've also changed include paths in easylzma/src/easylzma/compress.h and decompress.h from "easylzma/common.h" to "common.h" ⏎ And also in this folder in simple.h removed "easylzma/" from includes [https://gitter.im/nim-lang/Nim?at=594157c5e531dbc905e1fc18]
15:35:44FromGitter<TiberiumN> I'm trying to use functions from easylzma/src/easylzma/simple.h
15:36:52FromGitter<TiberiumN> lol, I compiled it using hacky solution: ⏎ copied all files from easylzma/src/easylzma/ to nimcache folder
15:37:05FromGitter<TiberiumN> and added header: "simple.h"
15:37:16FromGitter<TiberiumN> {.header: "simple.h"} pragma in testnim.nim
15:38:18FromGitter<TiberiumN> also I don't know how to call simpleDecompress in the right way
15:42:45*Arrrr joined #nim
15:44:38FromGitter<Varriount> @TiberiumN What do you mean?
15:45:35FromGitter<TiberiumN> I'm trying to use simpleComress with my hacky solution to compile this nim file, and it throws illegal storage error
15:46:02FromGitter<TiberiumN> I've added in testnim.nim: ⏎ ⏎ ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=59415a3a6549436c7d491a0f]
15:46:57FromGitter<TiberiumN> And the error: ⏎ ⏎ ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=59415a71f31c8ced0c362dc7]
15:47:00FromGitter<Varriount> @TiberiumN Do you need to allocate a block of data for outdata?
15:47:11FromGitter<TiberiumN> I don't know how honestly
15:47:15FromGitter<Varriount> Most APIs I've used require an output buffer to be pre-allocated.
15:47:29FromGitter<TiberiumN> comments in simple.h says "dynamically allocated buffer"
15:47:36FromGitter<TiberiumN> "## compress a chunk of memory and return a dynamically allocated buffer ⏎ ⏎ ---if successful. return value is an easylzma error code"---
15:50:26FromGitter<TiberiumN> now I'm starting to think it would be faster to rewrite LZMA implementation from another language like JS: ⏎ https://github.com/yurydelendik/lzmajs
15:50:27FromGitter<Varriount> @TiberiumN Set the calling convention to cdecl
15:51:22FromGitter<TiberiumN> like this? {.importc, cdecl, header: "simple.h".}
15:54:35*kunev quit (Ping timeout: 255 seconds)
15:55:37*kunev joined #nim
15:56:42FromGitter<Varriount> Yep. Although I think the 'header' file includes the header too
15:57:31FromGitter<TiberiumN> C compiler can't compile my code without header pragma
15:57:53FromGitter<TiberiumN> and even with cdecl program fails with the exact same error
16:00:21*yglukhov quit (Remote host closed the connection)
16:07:35*yglukhov joined #nim
16:10:46*ofelas joined #nim
16:11:50*yglukhov quit (Ping timeout: 240 seconds)
16:33:43*pilne joined #nim
16:42:56*nsf joined #nim
16:46:30Araqvar outData: ptr ptr cuchar # wrong
16:46:39Araqvar outData: ptr cuchar # ok
16:46:48Araqdiscard simpleCompress(format, inData, inLen, addr outData, outLen)
16:55:22*Trustable joined #nim
16:57:27*yingjun joined #nim
17:01:38*yingjun quit (Ping timeout: 240 seconds)
17:06:13*Trustable quit (Remote host closed the connection)
17:07:01FromGitter<TiberiumN> Araq: sadly didn't helped. ⏎ Maybe this cast to ptr cuchar is wrong? ⏎ ⏎ ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=59416d35d83c50560c0a798a]
17:07:24*yglukhov joined #nim
17:09:21AraqtiberiumN: I'm pretty sure it helped but similar errors might be involved in the other ptr types
17:10:16FromGitter<TiberiumN> yes
17:10:19FromGitter<TiberiumN> you're right
17:10:32FromGitter<TiberiumN> I changed outLen to "var outLen: csize" and passed it to function like "addr outLen"
17:10:36FromGitter<TiberiumN> and program ended without any errors
17:11:39*yglukhov quit (Ping timeout: 255 seconds)
17:18:13FromGitter<TiberiumN> yay, it seems to work
17:18:39FromGitter<TiberiumN> but now I need to figure out how to compile stuff without moving some .h and .c files to nimcache
17:23:58*yglukhov joined #nim
17:30:37FromGitter<TiberiumN> ah, I did it
17:30:43FromGitter<TiberiumN> header: "../easylzma/src/easylzma/simple.h"
17:38:15FromGitter<TiberiumN> Thanks everyone!
17:40:53ArrrrI really need a thing to get fields from object variants and make a stand alone tuple
17:51:47*nsf quit (Quit: WeeChat 1.7.1)
17:57:47*Matthias247 joined #nim
18:08:23*Neomex quit (Quit: Leaving)
18:13:34*yglukhov quit (Remote host closed the connection)
18:19:06*yglukhov joined #nim
18:45:20*skrylar joined #nim
18:48:01*yglukhov quit (Remote host closed the connection)
18:49:32*yglukhov joined #nim
18:50:26*skrylar quit (Ping timeout: 246 seconds)
18:53:39*skrylar joined #nim
19:08:28*PMunch quit (Quit: leaving)
19:09:15*PMunch joined #nim
19:27:36*gangstacat quit (Quit: Ĝis!)
19:30:23*yingjun joined #nim
19:34:43*yingjun quit (Ping timeout: 255 seconds)
19:36:31*yglukhov quit (Remote host closed the connection)
19:38:29FromGitter<Varriount> Arrrr: macros.getTypeImpl?
19:39:37ArrrrHow does that work?
19:41:31FromGitter<Varriount> Use a macro to generate code that extracts the fields of a type to a tuple
19:42:30*yglukhov joined #nim
19:43:12*nsf joined #nim
19:45:09ArrrrAh well, it is easier than i thought at first. I'll give it a try, thank you.
19:46:18*yglukhov quit (Remote host closed the connection)
19:47:20*skrylar quit (Ping timeout: 268 seconds)
19:48:00*yglukhov joined #nim
20:00:22*Neomex joined #nim
20:04:21*Vladar quit (Quit: Leaving)
20:05:47ArrrrIs it possible to make it retrieve the implementation if you pass a typedesc as a macro argument instead of directly typing the type into getTypeImpl?
20:06:21ArrrrI got `Sym "typeDesc"`
20:13:55*yglukhov quit (Remote host closed the connection)
20:17:04*yglukhov joined #nim
20:20:03ArrrrWell, it seems i can instantiate and get the body from there ...
20:32:51*Arrrr quit (Quit: Leaving.)
20:39:56*gangstacat joined #nim
20:49:37*gokr joined #nim
20:52:48*Snircle joined #nim
21:00:16*gokr quit (Quit: Leaving.)
21:06:26*Tiberium joined #nim
21:15:18*vivus joined #nim
21:38:03*Tiberium quit (Read error: Connection reset by peer)
21:45:53*rauss quit (Quit: WeeChat 1.8)
21:46:47*nsf quit (Quit: WeeChat 1.7.1)
21:53:19*PMunch quit (Quit: leaving)
21:58:51*Matthias247 quit (Read error: Connection reset by peer)
22:13:12*vivus quit (Quit: Leaving)
22:29:05*ofelas quit (Quit: shutdown -h now)
22:31:03*skrylar joined #nim
22:32:03*planhths quit (Quit: Konversation terminated!)
22:32:31*yingjun joined #nim
22:38:00*Jesin quit (Quit: Leaving)
22:38:38*yingjun quit (Ping timeout: 240 seconds)
22:51:48*vlad1777d quit (Remote host closed the connection)
22:53:41*vlad1777d joined #nim
23:00:25*rauss joined #nim
23:06:11*libman joined #nim
23:22:37*Nobabs27 joined #nim
23:38:36*Neomex quit (Read error: Connection reset by peer)
23:43:13*yglukhov quit (Remote host closed the connection)
23:54:32*vlad1777d quit (Remote host closed the connection)