<< 23-03-2016 >>

00:02:56*bamorim joined #nim
00:13:55*gokr quit (Quit: Leaving.)
00:52:10*chrisheller quit (Ping timeout: 252 seconds)
00:53:29*wuehlmaus quit (Quit: Lost terminal)
01:05:39*sarlalian quit (Ping timeout: 276 seconds)
01:11:02VarriountAraq: I have the joy of working with mmap today.
01:11:32*sarlalian joined #nim
01:18:42*desophos quit (Remote host closed the connection)
01:20:06*yuta joined #nim
01:24:50yutaVarriount: I realized that nimsuggest users might need to change --verbosity
01:24:55yutaoption to --nim.verbosity in major restructure branch because IDEs or editors
01:25:04yutaset that option to prevent hint message for auto completion feature.
01:25:46yutaIn that case, oldProcessCmdLine function might be meaningless?
01:25:50*vendethiel joined #nim
01:26:22Varriountyuta: oldProcessCmdLine handles all the cases in which a proper mode isn't detected.
01:26:38Varriounte.g. "nimsuggest nimsuggest.nim"
01:27:55yutaok
01:28:11Varriountyuta: Since the old invokation style doesn't have the concept of a mode argument, this also happily works out.
01:30:49yutaSorry, I was misunderstanding it from the help message.
01:32:33yutaI could use `nimsuggest --stdin --verbosity:0 xxx.nim` old style
01:33:05VarriountYes. At least, you should be able to - if you can't, that's a bug.
01:36:35*desophos joined #nim
01:46:47*vendethiel quit (Ping timeout: 260 seconds)
01:55:05*francisl joined #nim
01:55:52*chrisheller joined #nim
02:09:13*bamorim quit (Ping timeout: 240 seconds)
02:09:54*toaoMgeorge quit (Read error: Connection reset by peer)
02:16:41*krux02 joined #nim
02:22:55*Demon_Fox quit (Quit: Leaving)
02:35:45*mwbrown joined #nim
02:59:17*kulelu88 joined #nim
02:59:17*kulelu88 quit (Changing host)
02:59:17*kulelu88 joined #nim
03:00:30*perturbation left #nim ("Leaving")
03:00:39*perturbation joined #nim
03:00:47*perturbation quit (Quit: Leaving)
03:11:44*brson quit (Quit: leaving)
03:17:52*brson joined #nim
03:29:23*endragor joined #nim
03:29:26*endragor quit (Remote host closed the connection)
03:29:55*endragor joined #nim
03:30:35*desophos_ joined #nim
03:35:48*desophos_ quit (Ping timeout: 276 seconds)
03:40:29*endragor_ joined #nim
03:41:49*endragor_ quit (Remote host closed the connection)
03:43:27*endragor quit (Ping timeout: 260 seconds)
03:45:42*endragor joined #nim
04:05:10*vendethiel joined #nim
04:12:42*brson quit (Quit: leaving)
04:13:53*kulelu88 quit (Quit: Leaving)
04:20:18*krux02 quit (Remote host closed the connection)
04:25:01*francisl quit (Ping timeout: 248 seconds)
04:30:52*yuta quit (Remote host closed the connection)
05:09:33*vendethiel quit (Ping timeout: 240 seconds)
05:14:27*vendethiel joined #nim
05:25:23*desophos quit (Read error: Connection reset by peer)
05:35:37*vendethiel quit (Ping timeout: 240 seconds)
05:42:35*mwbrown quit (Quit: Leaving)
06:03:02*yglukhov joined #nim
06:09:57*yglukhov quit (Remote host closed the connection)
06:20:11*endragor_ joined #nim
06:24:00*endragor quit (Ping timeout: 246 seconds)
06:31:24*endragor_ quit (Remote host closed the connection)
06:31:53*endragor joined #nim
06:32:08*vendethiel joined #nim
06:46:24*desophos joined #nim
06:50:33*desophos quit (Ping timeout: 240 seconds)
06:54:51*vendethiel quit (Ping timeout: 244 seconds)
06:59:35*wuehlmaus joined #nim
08:08:43*gokr joined #nim
08:08:55*gokr quit (Client Quit)
08:08:59*gokr1 joined #nim
08:15:29*yglukhov joined #nim
08:32:30*rkeene quit (Ping timeout: 244 seconds)
08:33:54cheatfateis there any reason that tables(tables.nim) has "hasKey()" and sharedtables(sharedtables.nim) dont have "hasKey()"?
08:34:15*rkeene joined #nim
08:55:41*dorei joined #nim
08:59:40cheatfateAraq, how can i detect "--threads:on" at compile time? and what is "useStdlibThreading" in selectors.nim?
09:00:22Araqcheatfate: sharedtables 'hasKey' encourages races
09:00:45Araqif hasKey(...): ... assume it has the key ... ooops, race condition
09:01:14Araqcheatfate: when compileOption("threads") iirc
09:02:41cheatfateso useStdlibThreading is not the same as compileOption("threads")
09:06:10cheatfateabout sharedtables yeah i agree with you, but without hasKey you can't get information about key presence without exception
09:07:11Araqcheatfate: it needs a tryGetValue or something then
09:09:32*toaoMgeorge joined #nim
09:09:45cheatfateAraq, ok, what about "useStdlibThreading"? do you know what it mean?
09:10:11Araqyeah, I wrote it lol
09:10:51Araq-d:useStdlibThreading # use the multicore ready stdlib
09:11:19Araqthat means asynchttpserver etc use threading under the hood for you
09:11:24*toaoMgeorge quit (Read error: Connection reset by peer)
09:12:22veganskAraq, does it work in devel or only in crazy_concurrency branch?
09:13:05Araqcrazy_concurrency
09:13:22*vendethiel joined #nim
09:15:21cheatfateAraq, but asynchttpserver.nim -> asyncdispatch.nim -> selectors.nim (which has hasKey()) so it seems thats "useStdlibThreading" defined for future?
09:16:07cheatfatebecause you can't compile selectors.nim with -d:useStdlibThreading...
09:19:34Araqcheatfate: yeah further development of this feature can be found in the crazy_concurrency branch
09:46:38*enthus1ast quit (Ping timeout: 250 seconds)
09:48:37cheatfateAraq, but is it possible to implement at least "proc len*[A, B](t: Table[A, B]): int ="?
09:51:45Araqsure it's possible, but it encourages races
09:55:03*vendethiel quit (Ping timeout: 240 seconds)
10:05:00*vendethiel joined #nim
10:24:34*miko__ joined #nim
10:27:11*vendethiel quit (Ping timeout: 268 seconds)
10:27:33miko__Can anybody help me with indentation here? This is invalid, I don't know why. http://pastebin.ca/3409235
10:35:10flyxmiko__: no ":" at end of "case key", and don't indent "of" lines further
10:37:46miko__Both is done here: https://nim-by-example.github.io/case/ This this wrong?
10:41:28miko__Thanks, btw.
10:41:42Araqeither use the colon and indentation
10:41:48Araqor none
10:42:25Araqand the colon plus indentation is misguided IMHO since 'case x:' isn't followed by a list of statements at all
10:44:00miko__ok
10:55:12*Trustable joined #nim
10:58:30*rok joined #nim
10:58:32*rok is now known as rok_
10:59:42*endragor quit (Read error: Connection reset by peer)
10:59:48*endragor_ joined #nim
11:16:34veganskAraq, is it hard to fix? https://github.com/nim-lang/Nim/issues/3995
11:22:02Araqvegansk: yes.
11:23:42*irrequietus joined #nim
11:23:46*Demon_Fox joined #nim
11:30:58*krux02 joined #nim
11:43:12*darkf quit (Quit: Leaving)
11:43:35endragor_Given I have a name of declared type in a macro, is it possible to retrieve mangled name of the type? (including ref types and, ideally, instantiated generics, too)
11:51:43*Trustable quit (Remote host closed the connection)
11:52:14*rok joined #nim
11:52:57*fredrik92 joined #nim
11:54:21*rok_ quit (Ping timeout: 276 seconds)
12:05:21*Trustable joined #nim
12:06:55Araqcodegen which does the name mangling comes afterwards, so no.
12:23:25*vonh quit (Ping timeout: 248 seconds)
12:23:49*vonh joined #nim
12:27:41*boopsiesisaway is now known as boopsies
12:38:06*vegansk is now known as veganskaway
12:40:46*rok quit (Quit: rok)
12:42:37*BitPuffin joined #nim
12:54:43*Arrrr joined #nim
12:54:43*Arrrr quit (Changing host)
12:54:43*Arrrr joined #nim
13:02:48*irrequietus quit ()
13:12:03*vonh quit (Ping timeout: 244 seconds)
13:12:25*vonh joined #nim
13:17:01*gokr1 quit (Quit: Leaving.)
13:18:42*vendethiel joined #nim
13:29:15*zama quit (Ping timeout: 276 seconds)
13:31:38*zama joined #nim
13:32:27*rok joined #nim
13:34:36krux02does anyone here use the emacs nim-mode? I try to get it running, but since I am new to emacs I am not sure if I did everything right
13:41:20reactormonkkrux02, it's been a while.
13:42:04krux02what are you using then?
13:42:16reactormonkIt's been a while since I've used nim-mode :-)
13:42:23reactormonkbut got ahead, shoot.
13:43:33*vendethiel quit (Ping timeout: 244 seconds)
13:44:01krux02I get an error with internal--listify to be void
13:45:11reactormonkemacs version?
13:45:20krux02nim-smie.el:114:1:Error: Symbol's value as variable is void: internal--listify
13:45:47krux02GNU Emacs 24.5.1
13:46:06krux02on arch linux
13:46:23*vendethiel joined #nim
13:48:41endragor_https://github.com/pragmagic/vscode-nim :-P
13:52:00*Trustable quit (Quit: Leaving)
13:56:20krux02not sure if I am a fan of visual studio code
14:01:29*Trustable joined #nim
14:01:31*Trustable quit (Remote host closed the connection)
14:07:52*couven92 joined #nim
14:08:34*vendethiel quit (Ping timeout: 268 seconds)
14:08:35*Xe quit (Ping timeout: 250 seconds)
14:09:01*Riviera- quit (Ping timeout: 250 seconds)
14:09:27*JStoker quit (Ping timeout: 250 seconds)
14:09:27*pigmej quit (Ping timeout: 250 seconds)
14:09:27*flyx quit (Ping timeout: 250 seconds)
14:10:45*Gonzih quit (Ping timeout: 250 seconds)
14:10:46*apotheon quit (Ping timeout: 252 seconds)
14:10:54*fredrik92 quit (Ping timeout: 246 seconds)
14:11:37*lyro quit (Ping timeout: 250 seconds)
14:12:55*devn quit (Ping timeout: 250 seconds)
14:13:21*SirCmpwn quit (Ping timeout: 250 seconds)
14:13:28*sora joined #nim
14:13:44*devn joined #nim
14:13:47*thotypous quit (Ping timeout: 250 seconds)
14:14:13*oceanpollen quit (Ping timeout: 250 seconds)
14:14:52*JStoker joined #nim
14:15:29reactormonkgot the newest nim-mode?
14:15:41*thotypous joined #nim
14:15:53*SirCmpwn joined #nim
14:16:00*couven92 quit (Quit: Leaving)
14:16:34*couven92 joined #nim
14:16:45*Gonzih joined #nim
14:17:13*Xe joined #nim
14:18:35*flyx|znc joined #nim
14:18:35*flyx|znc is now known as flyx
14:18:40*pigmej joined #nim
14:21:00*oceanpollen joined #nim
14:21:32*lyro joined #nim
14:25:10*gokr joined #nim
14:32:12*nmcp04 joined #nim
14:37:43*nmcp04 quit (Quit: Page closed)
14:50:19cheatfatehttps://gist.github.com/cheatfate/e1d3e929089db2811393 how i must define commented functions to avoid code duplication for every platform?
14:57:17gokryglukhov: You are the main js hacker, right? I am curious how to make calls into js libraries, dynamically?
14:58:15gokryglukhov: Reason I ask is because... my Ni interpreter (written in Nim) runs just fine as compiled to js (although slow, but doesn't matter).
15:01:13yglukhovgokr: dynamically? what do you mean by that?
15:01:47gokrI mean... my Ni interpreter wants to make calls into js - but unknown of course when I compile the interpreter.
15:04:10yglukhovah... ok.. document["getElementById"]("MyId") ?
15:04:37yglukhovor... eval? =)
15:04:50gokrYeah, I realize that eval() is probably what I am babbling about.
15:05:25yglukhovdocument["getElementById"]("MyId") seems like a cleaner solution to me.
15:06:05yglukhovbut anyway you wont get away without some {.emits.} i guess...
15:06:28yglukhoveval is hostile to jit, afaik
15:06:39gokrI will try to experiment a bit.
15:07:30gokrPerhaps I can use eval to redefine some functions somehow etc. So that I don't do eval on "every call" of course.
15:19:01*mwbrown joined #nim
15:28:42*mwbrown quit (Quit: Leaving)
15:32:08*rok quit (Quit: rok)
15:39:14*gokr quit (Quit: Leaving.)
15:56:37*rok joined #nim
15:56:48*arnetheduck quit (Ping timeout: 276 seconds)
15:59:33*mwbrown joined #nim
16:02:08*sora quit (Read error: Connection reset by peer)
16:06:51*7GHAALF9H joined #nim
16:07:12*yglukhov quit (Ping timeout: 276 seconds)
16:13:05*dorei quit (Quit: Page closed)
16:19:52*couven92 quit (Quit: shutting down . . .)
16:27:21*7GHAALF9H quit (Remote host closed the connection)
16:59:46*desophos joined #nim
17:04:31*yglukhov joined #nim
17:05:14*vendethiel joined #nim
17:08:45*yglukhov quit (Ping timeout: 248 seconds)
17:13:05*Riviera- joined #nim
17:13:22*brson joined #nim
17:16:03*yglukhov joined #nim
17:18:42*endragor_ quit (Ping timeout: 276 seconds)
17:22:25*yglukhov quit (Remote host closed the connection)
17:23:00*gokr joined #nim
17:26:16*endragor joined #nim
17:38:12*desophos quit (Remote host closed the connection)
17:46:17*yglukhov joined #nim
17:50:21federico3I'm happy to announce that Nim 0.13 is in Debian Unstable
17:52:23*desophos joined #nim
17:54:59dom96federico3: yay
17:55:48Arrrrway to go
17:56:12*def- quit (Ping timeout: 244 seconds)
17:57:33federico3I'd be happy to include nimble and nimsuggests if they were to be included in the release tarball
17:58:16*kori joined #nim
17:59:48*yglukhov quit (Remote host closed the connection)
18:02:35*def- joined #nim
18:05:02*desophos quit (Remote host closed the connection)
18:07:54*nchambers is now known as DeerGod
18:12:23*desophos joined #nim
18:16:16*irrequietus joined #nim
18:21:53*yglukhov joined #nim
18:23:13*brson quit (Ping timeout: 240 seconds)
18:26:45*brson joined #nim
18:32:32*jazzyy joined #nim
18:32:44*jazzyy left #nim (#nim)
18:48:24*mog quit (Ping timeout: 276 seconds)
18:53:28*mog joined #nim
18:54:41*desophos_ joined #nim
18:55:27*nsf quit (Ping timeout: 250 seconds)
18:55:53*desophos quit (Ping timeout: 250 seconds)
18:55:53*Learath2 quit (Ping timeout: 250 seconds)
19:02:44*Learath2 joined #nim
19:09:07*desophos_ quit (Remote host closed the connection)
19:10:15*DeerGod is now known as nchambers
19:12:00*nsf joined #nim
19:12:41*NhanH_ joined #nim
19:15:04*irrequietus quit ()
19:15:16*desophos joined #nim
19:15:54cheatfatedom96, why you want this code https://github.com/nim-lang/Nim/pull/3994 in smtp.nim?
19:17:19*desophos quit (Remote host closed the connection)
19:17:57*desophos joined #nim
19:19:43*Arrrr_ joined #nim
19:19:51*StarBrilliant quit (Ping timeout: 250 seconds)
19:19:52*NhanH quit (Ping timeout: 250 seconds)
19:21:13*lyro quit (Ping timeout: 268 seconds)
19:21:24*StarBrilliant joined #nim
19:21:27*Arrrr_ quit (Client Quit)
19:21:37*pigmej quit (Ping timeout: 240 seconds)
19:21:37*alexsystemf_ quit (Ping timeout: 240 seconds)
19:21:50*Arrrr quit (Ping timeout: 268 seconds)
19:22:16*pigmej joined #nim
19:22:16*NhanH_ is now known as NhanH
19:23:07cncloh, interesting. i can't go like foo.bar.baz = 5 in nim, apparently?
19:23:10*alexsystemf_ joined #nim
19:26:46Araqcncl: sure you can. but it depends on what foo and bar is.
19:27:39cnclhmm
19:28:11*brson quit (Ping timeout: 244 seconds)
19:28:39cnclhttps://gist.github.com/anonymous/dbb0b78e7535a4701944
19:28:55*lyro joined #nim
19:29:16cncloops one sec
19:29:47cncli wasn't signed in and i copied the wrong error message
19:30:14cheatfatecncl, it looks like we dont see line 170
19:30:21cnclyeah
19:30:28cnclhttps://gist.github.com/randrew/f7ed3b22136c69f3d1b4
19:30:30cnclsorry
19:30:43cnclthat one has the correct error message
19:31:25cncli'm surprised mutating a type within another type hasn't come up in my code before
19:31:38cncli looked back through the stuff i've already written and i never do it
19:35:21cheatfatebut CardStats doesnt have healthMax
19:36:23cnclegads!
19:36:33cncli have two different buffers of the same file open
19:36:38cnclyou're right
19:36:45cncli was building with the wrong file
19:37:02cnclthanks :)
19:37:26cnclit was not in a subobject in the other one
19:38:04cncloh another question
19:38:08cnclwhen i'm using quote inside of a macro
19:38:09*yglukhov quit (Remote host closed the connection)
19:38:22cncli can't seem to figure out how the symbol binding works
19:38:47cnclis there a description of how it works somewhere?
19:39:03cheatfatecncl, i cant figure macro too, so i cant help :(
19:40:37*endragor quit (Remote host closed the connection)
19:42:21cnclwell i'm able to write macros just fine
19:43:07cnclbut usually quote seems to resolve symbols in the lexical scope of the macro
19:43:10cnclwhich is not what i want
19:47:14Araqdon't use quote
19:47:25Araquse a helper template that's dirty and getAst
19:47:41Araqquote doesn't have dirty vs clean. templates do.
19:47:53AraqI never use quote because of that.
19:48:20cnclah ok
19:48:26Araq(plus of course, I didn't invent quote, so how good can it be? ;-) )
19:48:30cnclhaha
19:49:00*def- quit (Ping timeout: 246 seconds)
19:49:06cncli didn't think of using a helper template, i'll try that next time
19:50:48*def- joined #nim
19:51:16*yglukhov joined #nim
19:56:42*filcuc joined #nim
19:58:00filcucAraq: after the talk of yestarday evening i tried to give c2nim a try. However it seems like it cannot handle macros before a function
19:58:33Araq*shrug* I'm tired of this discussion.
19:58:36filcucAraq: like MY_EXPORT void foo();
19:58:37Araqread its manual.
19:58:56filcucRTFM
19:59:02AraqI used it to translate ~500_000 lines of code.
19:59:35Araq#def MY_EXPORT
20:00:43cnclit works fine for macros before a function
20:00:46cnclit even has a feature for it
20:00:53cncli used it the other day on 2 libraries just fine
20:01:44cnclyou can try mangle, pp and def, depending on what ou want it to do
20:02:06filcucAraq: read it, fine :D but really maybe it should be added somewhere or maybe as an option from the commandline
20:02:18filcucAraq: if you complain that too many people bother you about it
20:03:04filcucAraq: (and really i can understand your reason, we should read the manual)
20:05:08cnclif you are doing nontrivial stuff with c2nim, i find that it's better to do it with the statements in the .h file, that way you can more easily edit it and keep a record of what you did to get the output
20:05:52cnclit's also difficult to do stuff like use mangle on the command line because of the weird characters you need to use that command lines don't like without escaping
20:06:03Araqwhat cncl said.
20:06:19Araqalso you can have all that directives in its own .c2nim file
20:06:32Araqand thus apply the rules for multiple headers easily
20:07:03Araqcan you can also directly embed Nim code
20:07:22Araqso you can keep the original headers, some diffs and run c2nim again should the header files change
20:07:25filcuccool, but again maybe mentioning in the help message can save people asking about it
20:07:56filcuci'm not saying anything about the tool (and i do really think that it's awesome)
20:08:20AraqI used Swig and FPC's header conversion tool in the past.
20:08:38AraqIn my opinion c2nim is superior.
20:09:20*irrequietus joined #nim
20:09:49*brson joined #nim
20:10:05Araqand it's telling that nothing ever came from the "Omg, just use clang as a library already" crowd :P
20:10:27filcuclol
20:11:47ldleworkcncl: you should write a c2nim guide
20:11:51ldleworkfor realsies.
20:11:54ldleworktransfer that knowledge.
20:12:31filcucAraq: i don't know to who are you talking to :D i mean if you're saying it to me, well i didn't say anything about its potential
20:13:24Araqnah, I'm talking about nobody in particular.
20:14:39cnclldlework: it's not that hard. probably half of the guide would be spent on setting up mingw or msvc correctly and how linking works and stuff :P
20:14:46filcucAraq: so just pouring out ;)
20:14:46cncland calling conventions
20:15:03ldleworkcncl 'its not that hard' is precisely why you should
20:15:04*ldlework shrugs.
20:15:23cnclyeah maybe
20:16:11cheatfateVarriount, is it possible with nimlime's nim check define symbols for nim? like -d:something
20:25:24*gokr quit (Ping timeout: 246 seconds)
20:26:28*gokr joined #nim
20:27:52*darkf joined #nim
20:28:32filcucjust for asking but...given that nim can import symbols from a cpp library does it mean that it knows the mengling of all cpp compilers?
20:29:50cnclno
20:30:02cnclyou have to export the cpp symbols with extern c, like using cpp with c compilers
20:30:20cnclunless i am gravely mistaken
20:31:34Araqha, you're both wrong.
20:31:46Araqimportcpp means you compile to C++
20:32:00Araqand so we leave the mangling to the C++ compiler.
20:32:06cncloh, yes, if you're building with c++
20:32:56filcuc[21:27] <cncl> you have to export the cpp symbols with extern c, like using cpp with c compilers
20:33:10filcuci don't understand this one..should i use importc
20:33:21cnclit depends
20:33:25filcucsince the symbol is exported with c mangling?
20:33:27cnclis it a c++ library?
20:33:49cnclwas the c++ library given an interface that works for c?
20:33:49filcucif you mean that it has been compiled by a c++ compiler, yes
20:34:09cnclit's possible for c++ compilers to build objects that can be used by c compilers via extern c
20:34:34cnclif that's the case you can use importc and not have to build your nim code as c++
20:34:51cnclif not, you will either need to make that interface yourself, or use importcpp and build your nim code as c++
20:34:51filcucAraq: so basically you're saying that nim should use the cpp compiler..correct?
20:35:30cncldoes the .h file you are looking to make a nim file out of have 'extern c' anywhere in it? can you upload it and i'll look at it?
20:35:56filcuccncl: what do you mean with interface? yes my cpp library has a .h with only extern c symbols
20:36:01filcucdeclarations
20:36:22cnclthen you don't need to build your nim as c++
20:36:24Araqactually Nim supports partial C++ code generation
20:36:31cnclyou can just use regular importc
20:36:38Araqso only the modules that importcpp end up in a .cpp file
20:36:46Araqthe rest is compiled as C code.
20:36:48cnclah i didn't know that
20:37:13Araqbut it's rather fragile ... I don't really recommend it.
20:37:46cnclif you have a plain c interface you should definitely use that, though
20:37:51filcucAraq: but do they get compiles separately (.c files with the c compiler and .cpp with the c++ compiler) or everything by the cpp compiler (in the case of mixed importc and importcpp)
20:38:01cnclhe just said separately
20:38:07filcuccncl: my header file is this one https://github.com/filcuc/DOtherSide/blob/ObjectFactories/lib/include/DOtherSide/DOtherSide.h
20:38:08cnclso i think that's what it does
20:38:59cnclyes you should use importc here
20:39:19filcuccncl: plus types https://github.com/filcuc/DOtherSide/blob/ObjectFactories/lib/include/DOtherSide/DOtherSideTypes.h
20:39:43cnclyou will also want to set it up to use a dylib/dll
20:40:05cnclso that your nim program will load the object file at runtime instead of trying to statically link something
20:40:12filcuccncl: to be honest i experienced crashes with dynlib
20:40:28filcucdunno way..but they didn't happen with static linking
20:40:46filcucso right now i removed the dynlib functionality
20:40:50filcucand used explicit linking
20:40:55cnclthat's odd
20:40:59filcucbut that could be caused my Qt libraries
20:41:25filcucor maybe by mixing C compiler for the nim program and cpp compiler (used for compiling the Qt libraries)
20:41:32cnclno that is fine
20:41:34cncli do it all the time
20:42:06cncla lot of software is written in c++, build as a shared library, and then exposed with a c interface
20:42:13filcucyep i know...and i didn't mixed different compilers (clang and gcc) everything built from gcc
20:42:26cnclmixing compilers is also ok
20:42:54filcucright now i'm finishing version 0.5.0 of my library..but i'm going to give dynlib a second try
20:43:20cnclwell if you can only get it to work with static, that's fine, but it probably means something else is wrong
20:43:37cncldynlib/dll is nice because you can rebuild and iterate faster, the linker doesn't run for as long
20:43:55cnclthen if you want to build static for releasing to other people, you can do it
20:46:49filcucwait with static i mean by linking to the actual library (static or dynamic)
20:47:13filcucnot by using LoadLibrary or such
20:47:17cnclyes
20:47:28cncloh
20:47:41cnclwait, i don't understand what you mean
20:48:09cnclstatic linking means taking a .a (full of .o) or .o file and linking it directly into your program binary
20:48:38cncldynamic linking means using a shared object file (.so, dynlib, .dll) and loading it at runtime, either explicitly in your application code or as handled by your language/compiler/runtime
20:49:55filcuccncl: yep but in the second case if you use LoadLibrary your application doesn't explictly declare that it links the target .dll/so
20:50:33filcucinstead if you "gcc ... -lmyLib" (where libMyLib.so) it's dynamic linking but "explicit"
20:51:29Araqthat's never a concern for any software written in Perl, Python, Ruby, Lua, ... though.
20:51:34*aziz joined #nim
20:51:46filcucand i think that dynlib use the latter way
20:51:53filcucso LoadLibrary or such
20:52:13cnclsorry i meant to type dylib
20:52:15cnclas in for mac
20:52:17Araqif you use --dynlibOverride you can do like for C.
20:52:37Araqand mess with -lfoo stuff, enjoy.
20:52:46filcucwhat i've experienced are crashes when using LoadLibrary and not when expliclty linking (by using -lmyLib in gcc)
20:52:54cnclnim lets you use explicit or implicit dynamic linking
20:53:08filcucyep i know that
20:53:18cncli believe the opengl library for nim uses explicit dynamic linking to load extensions
20:53:23Araqbut as I said, the LoadLibrary approach is not a problem for any scripting language out there
20:53:28cnclmaybe you can see what that does?
20:53:41filcucit's that i really loved the dynlib features but i still didn't get the crashes...but as i said it could not be caused by anthing nim does
20:54:57*BitPuffin quit (Ping timeout: 244 seconds)
21:08:55*vonh quit (Ping timeout: 244 seconds)
21:10:35*vonh joined #nim
21:24:25*brson quit (Ping timeout: 240 seconds)
21:32:20*Jesin quit (Remote host closed the connection)
21:33:05*brson joined #nim
21:56:04*brson quit (Ping timeout: 252 seconds)
21:57:43cnclis there a way to turn off XDeclaredButNotUsed, but only at the top level?
22:01:09*yglukhov quit (Remote host closed the connection)
22:03:09*brson joined #nim
22:11:45*rok quit (Quit: rok)
22:20:41*BitPuffin joined #nim
22:22:41*miko__ quit (Quit: Verlassend)
22:23:31*[CBR]Unspoken quit (Ping timeout: 248 seconds)
22:27:31*Jesin joined #nim
22:28:03*Jesin quit (Remote host closed the connection)
22:30:25*irrequietus quit (Ping timeout: 240 seconds)
22:30:57*irrequietus joined #nim
22:31:55*Jesin joined #nim
22:34:12cheatfatecncl, {.hint[XDeclaredButNotUsed]: off.} ?
22:36:39*mwbrown quit (Ping timeout: 260 seconds)
22:40:23*vendethiel quit (Ping timeout: 244 seconds)
22:43:42*vendethiel joined #nim
23:02:48*exebook joined #nim
23:02:51*gunn quit (Read error: Connection reset by peer)
23:03:27*gunn joined #nim
23:04:49*mnemonikk quit (Ping timeout: 240 seconds)
23:05:55*vendethiel quit (Ping timeout: 252 seconds)
23:06:13*BitPuffin|osx joined #nim
23:06:51*bamorim joined #nim
23:08:13*BitPuffin|osx quit (Remote host closed the connection)
23:08:31*BitPuffin|osx joined #nim
23:08:33*itPuffin|osxB joined #nim
23:08:42*itPuffin|osxB quit (Remote host closed the connection)
23:08:42*BitPuffin|osx quit (Remote host closed the connection)
23:09:31*BitPuffin|osx joined #nim
23:11:08*mnemonikk joined #nim
23:11:08*mnemonikk quit (Changing host)
23:11:08*mnemonikk joined #nim
23:11:14*BitPuffin quit (Ping timeout: 268 seconds)
23:17:28*irrequietus quit ()
23:18:39*boopsies is now known as boopsiesisaway
23:18:51*brson quit (Quit: leaving)
23:20:36*filcuc quit (Quit: Konversation terminated!)
23:20:56cncli'd have to do it for each entry. but that also doesn't seem to work at all unless i apply it to the whole file
23:21:13cncland it's actually a very useful hint/warning in procedure bodies
23:21:17cnclsince it's usually some mistake
23:22:27*brson joined #nim
23:24:17cnclhmm
23:24:27cnclwhere is `mod` for unsigned integers? i can't find it
23:32:41cncli see that there's %%, which works on signed integers, but i have 2 uint64 that i need to use mod on (for a C API)
23:34:36krux02how can I import osproc in a nimble file? I would like to create a task that executes some stuff for me
23:37:12cnclyou probably want a .nims file, right?
23:38:33cncli'm not sure if you can use osproc in nimscript, though
23:39:17cnclif i was doing something complicated enough to require async os processes, i probably would just do my own little build system for it instead of using only nimble
23:42:39Araqkrux02: you can only use ospaths with nimscript
23:42:54*aziz quit (Remote host closed the connection)
23:46:05krux02Araq: the thing is, I would like to write a nim wrapper for a c api, and I would like to download the dependency in the build process
23:47:06Araqthat's not a good idea.
23:47:40Araqthat's Nimble's business. and internet connections are fragile beasts.
23:49:52krux02ok then I will look for examples of c wrappers
23:50:24krux02if you can give me a one sentence guidance I would be happy
23:50:28Araqbtw you can exec curl or something via nimscript
23:51:17Araqusually C wrappers don't have deps to C code, but to DLLs
23:51:34Araqand you need to distribute the DLLs somehow.
23:52:33*gokr quit (Ping timeout: 240 seconds)
23:52:44Araqbut you MUST NOT put binary files in github repositories so instead you should put the generated assembler code in there. this way 'git diff' continues to work ... nah, just kidding.
23:58:48*brson quit (Quit: leaving)
23:59:13*brson joined #nim