<< 22-06-2018 >>

00:07:36*jhorwitz_ joined #nim
00:07:36*jhorwitz_ quit (Client Quit)
00:12:55tsaka__no, define:"blas=openblas"'
00:13:17tsaka__excluding last '
00:13:36tsaka__how to print the type of something
00:16:18tsaka__let e = newTensor[bool]([2, 3])
00:16:19tsaka__echo type e
00:16:28tsaka__not working
00:23:34FromGitter<rayman22201> @treeform have you seen either of these articles? IDK if they are useful. Code formatting is a fun/hard problem :-) ⏎ http://xxyxyz.org/line-breaking/http://journal.stuffwithstuff.com/2015/09/08/the-hardest-program-ive-ever-written/
00:23:43*lainon quit (Remote host closed the connection)
00:43:48*dddddd quit (Remote host closed the connection)
00:44:52FromGitter<Quelklef> @rayman22201 interesting articles
00:48:51*cspar quit (Ping timeout: 260 seconds)
00:53:50*yglukhov[i] joined #nim
00:58:08*yglukhov[i] quit (Ping timeout: 256 seconds)
00:59:03FromGitter<rayman22201> Thanks. I like to read and share interesting articles when I'm procrastinating. Sometimes they are appropriate 😄
01:01:20*data-man quit (Quit: Konversation terminated!)
01:17:20*cspar joined #nim
01:17:23FromGitter<Quelklef> Hello all
01:17:29FromGitter<Quelklef> Is the following a bug:
01:18:14FromGitter<Quelklef> ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=5b2c4e550168e70c08e24914]
01:18:41FromGitter<Quelklef> complains that in `a: A[X]`, "Error: type expected", referring to `X`.
01:21:48*kinkinkijkin joined #nim
01:22:18FromGitter<Quelklef> ```proc g[X: static[int]](a: A[X]) = echo "_" ⏎ g[2](a)``` ⏎ ⏎ also has an error [https://gitter.im/nim-lang/Nim?at=5b2c4f490168e70c08e24a15]
01:24:10FromGitter<Quelklef> Wait, no it doesn't. What's the issue with the first example, though?
01:29:28FromGitter<Quelklef> wait, something's fucky. possible bug incoming
01:33:37*yglukhov[i] joined #nim
01:38:22*yglukhov[i] quit (Ping timeout: 268 seconds)
01:45:58*kinkinkijkin quit (Quit: Leaving)
01:51:31*lainon joined #nim
01:57:35*find0x90 joined #nim
02:15:22*find0x90 quit (Quit: find0x90)
02:45:42*NimBot joined #nim
02:50:51*endragor joined #nim
03:19:35*kinkinkijkin joined #nim
03:28:26*rauss quit (Read error: Connection reset by peer)
03:28:43*rauss joined #nim
03:38:06FromGitter<codenoid> hi araq
03:41:54*lainon left #nim ("Leaving")
04:03:56*kinkinkijkin quit (Remote host closed the connection)
04:08:55*lompik joined #nim
04:18:31FromGitter<7sDream> do you mean cut 123456789 to [123, 45, 6789]
04:18:55FromGitter<7sDream> and result is random, can be [1, 2345, 6789] or other
04:19:31*Entropic quit (Changing host)
04:19:31*Entropic joined #nim
04:19:58*xkapastel quit (Quit: Connection closed for inactivity)
04:38:50*yglukhov[i] joined #nim
04:43:33*yglukhov[i] quit (Ping timeout: 264 seconds)
05:26:53*nsf joined #nim
05:39:55*Vladar joined #nim
06:05:27bozaloshtshtsaka__: echo repr(type(e))
06:49:51*Ven`` joined #nim
07:10:15FromGitter<7sDream> @codenoid https://glot.io/snippets/f27s4vcq6u, may meet your needs
07:25:54*yglukhov[i] joined #nim
07:27:55*zahary joined #nim
07:35:36*Ven`` quit (Read error: Connection reset by peer)
07:35:42*Ven` joined #nim
07:41:06*PMunch joined #nim
07:45:37*Ven` quit (Read error: Connection reset by peer)
07:45:44*Ven`` joined #nim
08:01:44*floppydh joined #nim
08:05:21*natrys joined #nim
08:12:36FromGitter<mratsim> @tsaka__, import typetraits echo foo.type.name
08:17:19*Ven` joined #nim
08:17:19*Ven`` quit (Read error: Connection reset by peer)
08:39:33*Zevv joined #nim
08:47:13*dddddd joined #nim
08:52:24*Ven` quit (Quit: My MacBook has gone to sleep. ZZZzzz…)
08:54:56FromGitter<mratsim> I really think name should be in system
08:56:20*yglukhov[i] quit (Remote host closed the connection)
09:03:38*Ven`` joined #nim
09:05:05Araqyeah yeah yeah, told dom I'll accept this PR
09:17:45*arecaceae quit (Remote host closed the connection)
09:18:10*arecaceae joined #nim
09:21:07*yglukhov[i] joined #nim
10:05:35dom96Last chance to give feedback: https://forum.nim-lang.org/t/3930
10:10:09*Ven`` quit (Quit: My MacBook has gone to sleep. ZZZzzz…)
10:19:11FromGitter<alehander42> the ready made answers is a good idea
10:23:21dom96We do have ready made answers already though, not sure what this person means
10:32:04*noonien joined #nim
10:36:23*zahary quit (Quit: Leaving.)
10:43:33FromGitter<mratsim> I don’t agree with ready-made answers for opinion-based questions
10:48:52*zahary joined #nim
10:52:48euantorAlso Nim version 0.18.0 is missing from the question about which Nim version you use
11:10:30*elrood joined #nim
11:12:06dom96Well, yes, I just made a copy of the last year's survey
11:12:09dom96I didn't make any changes yet
11:12:47dom96yeah, mratsim, they are often leading
11:12:55dom96Last year's survey had a mix of both
11:19:03FromGitter<kaushalmodi> Araq: You mean foo.type.name will work without having to import typetraits? Awesome!
11:19:19FromGitter<mratsim> or maybe even echo foo.type ;)
11:20:40FromGitter<kaushalmodi> 👍
11:21:21FromGitter<kaushalmodi> Araq: Talking about foo.type.name, can you please look at this: https://github.com/nim-lang/Nim/issues/7975
11:21:46FromGitter<kaushalmodi> foo.type.name doesn't work if foo is a type with a field called "name"
11:22:03FromGitter<kaushalmodi> *foo is a tuple
11:22:11FromGitter<kaushalmodi> Yes, that works
11:22:16FromGitter<kaushalmodi> I have that in that issue
11:22:37FromGitter<mratsim> well, that’s true for method call syntax with any proc / feld collision unfortunately
11:22:45FromGitter<mratsim> field*
11:23:01FromGitter<mratsim> the compiler should put a warning though
11:23:12FromGitter<codenoid> thankyou
11:23:17FromGitter<codenoid> @7sDream
11:23:53FromGitter<kaushalmodi> Another strange typetraits issue: https://github.com/nim-lang/Nim/issues/7976
11:24:49FromGitter<kaushalmodi> Btw it was great to finally get the Nim/Emacs Module integration working yesterday!
11:25:10FromGitter<mratsim> btw, I only use typetraits for debugging, what do you use it for?
11:25:31FromGitter<kaushalmodi> Debugging and writing notes
11:25:50FromGitter<kaushalmodi> It's in the process of notes writing that I end up with such issues
11:26:03FromGitter<mratsim> ah I see
11:28:20FromGitter<kaushalmodi> @mratsim see this for example: https://scripter.co/notes/nim/#issue-7976
11:29:53FromGitter<kaushalmodi> Those are very trivial examples that I took from Nim Tutorial 1 and I'm just echoing them.
11:31:16FromGitter<mratsim> yeah, awesome notes :)
11:36:51*craigger_ joined #nim
11:37:17*Zevv left #nim (#nim)
11:37:35*craigger quit (Ping timeout: 256 seconds)
11:38:09*Maui joined #nim
11:39:59*Ven`` joined #nim
11:41:17*Maui quit (Client Quit)
11:48:00*Ven`` quit (Read error: Connection reset by peer)
11:48:34*Ven`` joined #nim
12:09:33*Zevv joined #nim
12:11:57ZevvHi; it seems that using 'import' implicitly defines a variable with the name of the module; what is the reason for this, and is there a way to avoid this?
12:19:45FromGitter<mratsim> it’s for namespacing, if you want to call foo.`$` vs system.`$` for example
12:20:43Zevvah of course
12:20:44FromGitter<mratsim> don’t name things with the same name
12:21:02ZevvI've never seemed to need that until now
12:21:48ZevvThe problem is that I have no control over this name - importing a module defines a global variable, if I like it or not
12:22:00Zevvbut that's fine, thanks
12:22:01YardanicoZevv, well, you can import a module under a different name
12:22:10Yardanico"import tables as tbls"
12:22:40Yardanicohmm, but that's strange
12:22:44Zevvah look, that's what I was looking for
12:23:05Yardanicoah, so you can define the proc with the name of a module you've imported
12:23:10Yardanicobut not a variable
12:23:51Zevvyeah, I ran into that
12:23:53Zevvthat confused me
12:24:34Zevvis the 'import ... as ...' in the manual?
12:24:49Yardanicoofc
12:24:59Yardanicohttps://nim-lang.org/docs/manual.html#modules-module-names-in-imports
12:26:37FromGitter<mratsim> if you define a proc with the same name, you will get weird errors
12:26:51FromGitter<mratsim> “Something cannot be called” iirc
12:29:28Yardanicoit works for me
12:32:08*Ven` joined #nim
12:34:32*Ven`` quit (Ping timeout: 276 seconds)
13:05:33*floppydh quit (Remote host closed the connection)
13:06:21*floppydh joined #nim
13:10:59*natrys quit (Quit: natrys)
13:18:11*endragor quit (Remote host closed the connection)
13:18:32*vegax87 quit (Ping timeout: 245 seconds)
13:19:50*pigmej quit (Ping timeout: 245 seconds)
13:20:21Araqkaushalmodi, I'm aware of this issue and I'm sure it's easy to fix but can't fix it right now
13:30:47*pigmej joined #nim
13:35:30*pigmej quit (Ping timeout: 260 seconds)
13:36:57*Ven` quit (Quit: My MacBook has gone to sleep. ZZZzzz…)
13:37:43*pigmej joined #nim
13:58:21*natrys joined #nim
14:01:50*vegax87 joined #nim
14:20:11*Ven`` joined #nim
14:22:47*vegax87 quit (Ping timeout: 255 seconds)
14:35:26tsaka__I'm getting type errors on array assignments, can anyone point me in the right direction?
14:35:27tsaka__https://paste.fedoraproject.org/paste/wGWmC2asrHHrYvu9HNhIrg
14:37:11Yardanicocc @mratsim
14:37:49FromGitter<mratsim> looking
14:37:58*zahary quit (Quit: Leaving.)
14:38:06*PMunch quit (Quit: Leaving)
14:39:01tsaka__I had to use var instead of let when declaring the array. How to combine the two array assignments, something along the lines of "neighs1[r1, c1, 0] = [r1, c1]" ?
14:39:42FromGitter<mratsim> you should directly use result instead of neighs1 by the way
14:40:19FromGitter<mratsim> neighs1\[r1, c1, 0, 0..1\] = [r1, c1]
14:41:32tsaka__If using result instead of neighs1, how to declase array dims? can't use "var result = newTensor .."
14:42:10FromGitter<mratsim> you can use result = newTensor
14:42:31FromGitter<mratsim> don’t use var before result otherwise you will create a a shadow variable
14:42:51FromGitter<mratsim> the syntax supported is this for slicing: https://github.com/mratsim/Arraymancer/blob/master/src/tensor/accessors_macros_syntax.nim#L30-L56
14:43:21*vegax87 joined #nim
14:46:28tsaka__@mratsim you sure about that assignment? https://paste.fedoraproject.org/paste/SjIxWg9qRq5fCTJEeh~O1g
14:46:43FromGitter<mratsim> it seems like the proper way at the moment is this: ⏎ ⏎ ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=5b2d0bd30168e70c08e40b59]
14:47:24FromGitter<mratsim> there is no assignment broadcasting, strange, I’m pretty sure there was.
14:48:12FromGitter<tsoernes> *shudders*
14:48:39FromGitter<tsoernes> numpy would be `result[r1, c1, 0] = [r1, c1]`
14:51:02*yglukhov[i] quit (Ping timeout: 276 seconds)
14:52:29FromGitter<mratsim> Not too sure about sub slicing.
14:53:33FromGitter<mratsim> you can already do \[r1, c1, 0, _\] = [r1, c1] or use `…` as ellipsis (though I might change it to triple underscore
14:54:46FromGitter<tsoernes> ` result[r1, c1, 0, _] = [r1, c1]` ⏎ gives ⏎ `Error: unhandled exception: Your tensors or openarrays do not have the same shape: [1, 1, 1, 2] and [2] [IndexError]`
14:56:49FromGitter<mratsim> yes, that’s the assignment broadcasting part
14:59:46FromGitter<ephja> of course blas.dll doesn't load. a lot of dll's can't be loaded for some reason
15:01:06FromGitter<ephja> defining nimDebugDlOpen gives me no additional information
15:02:41*themagician quit ()
15:08:34*Ven`` quit (Quit: My MacBook has gone to sleep. ZZZzzz…)
15:09:09FromGitter<tsoernes> @ephja try to set blas library when you compile eg `--define:blas=openblas` or w/e
15:11:33*yglukhov[i] joined #nim
15:12:46FromGitter<tsoernes> @mratsim how to do this assignment: ⏎ `var n_neighs = newTensorint ([4, rows, cols])` ⏎ `n_neighs[_, r1, c1] += 1`
15:13:03FromGitter<tsoernes> gives type error, tried `+= [1,1,1,1]` but no luck
15:14:25FromGitter<ephja> I'm not sure where the openblas binaries are supposed to be located on sourceforge
15:16:37FromGitter<mratsim> @ephja, there are on github
15:17:39FromGitter<mratsim> apply_inline(n_neighs[_, r1, c1]): x += 1
15:18:08FromGitter<mratsim> @tsoernes ^
15:20:35FromGitter<tsoernes> @mratsim not quite. ⏎ `gridfuncs.nim(28, 19) Error: type mismatch: got <AnyTensor[system.int], void> ⏎ but expected one of: ⏎ template apply_inline(t: var Tensor; op: untyped): untyped ⏎ for a 'var' type a variable needs to be passed, but 'slicer(n_neighs, [Span, r1 .. r1 | 1, c1 .. c1 | 1])' is immutable` [https://gitter.im/nim-lang/Nim?at=5b2d13c3467bd7268c2a8489]
15:24:37FromGitter<ephja> @mratsim that takes me to the same zip file. what binary format exactly?
15:24:56FromGitter<ephja> All I can seem to find is sources
15:28:07*Trustable joined #nim
15:31:27FromGitter<mratsim> ah, mmm I don’t know about the binaries, I use the one packaged in homebrew on Mac, in the repo for linux, and in NuGet for Windows
15:33:10FromGitter<kayabaNerve> What do y'all think about how friendly Rust's compiler is?
15:33:29FromGitter<mratsim> @tsoernes, I have to revamp the apply/map/for loop, the most efficient at the moment would be this ⏎ ⏎ ```var n_neighs = newTensor[int]([4, rows, cols]) ⏎ n_neighs[_, r1, c1] .+= 1``` [https://gitter.im/nim-lang/Nim?at=5b2d16c9479ca26689760002]
15:34:00FromGitter<mratsim> broadcasted operations are prefixed with a dot
15:34:10FromGitter<mratsim> sorry forgot about it
15:34:51FromGitter<ephja> Oh I thought I was just being dumb. I've installed it with nuget
15:35:28FromGitter<mratsim> @kayabaNerve I think it’s too friendly with the remainders ;), but I blame Rust paradigm, not the emulator.
15:35:54FromGitter<kayabaNerve> That's probably my most wanted feature of Nim right now. Better error messages. I feel that even g++ is friendlier. That might be my higher experience with C++/C though.
15:36:11FromGitter<kayabaNerve> I admire it's high friendliness but wouldn't use it just for that.
15:36:26FromGitter<tsoernes> @mratsim That still yields a type error for me
15:36:42FromGitter<kayabaNerve> I'm just saying if Nim is a 10, g++ is a 5, and Brainfuck was a 1, Nim is a 3.
15:36:51FromGitter<kayabaNerve> Especially with all the templated types.
15:37:16FromGitter<kayabaNerve> *Brainfuck is 1 because it doesn't have compiler errors. At all.
15:37:24FromGitter<kayabaNerve> Really should be a -2 lol
15:37:52*yglukhov[i] quit (Remote host closed the connection)
15:38:33FromGitter<kayabaNerve> That's kinda nice now that I think of it. You always have a valid program. Gives me a warm feeling to my heart...
15:38:52FromGitter<tsoernes> ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=5b2d180c8a0a354b38a0394a]
15:39:18FromGitter<kayabaNerve> For anyone who doesn't follow, BF has 8 valid commands. They're 1 character each. Any character not one of those 8 commands is ignored. Anyways. I do think Nim is subpar with it's error messages and that's my current most wanted feature.
15:39:31FromGitter<ephja> it works now, but I need to solve the mingw dll loading *beep* once and for all some time :p
15:39:44FromGitter<kayabaNerve> That said, I won't complain too much until I get my own language up with better error messages.
15:42:04FromGitter<mratsim> @tsoernes , ah yes, slicing doesn’t return a var tensor because as of now var return values are too fragile. You can go around like this: ⏎ ⏎ ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=5b2d18cc59799e701738a420]
15:50:39*PMunch joined #nim
16:09:33*xkapastel joined #nim
16:17:37*floppydh quit (Quit: WeeChat 2.1)
16:26:08FromGitter<krux02> did someone mess with repr is Nim?
16:27:45*Ven`` joined #nim
16:28:47*Ven`` quit (Client Quit)
16:29:10*lompik quit (Ping timeout: 260 seconds)
16:51:05*nsf quit (Quit: WeeChat 2.1)
16:58:37*cryptocat1094 joined #nim
16:59:01*yglukhov[i] joined #nim
17:08:01*data-man joined #nim
17:09:41*data-man quit (Client Quit)
17:09:50shashlickneed some help with imports - do all module imports happen prior to any code execution? like if you do `echo "hello"` and then `import package`, does the import happen before in the generated C code?
17:13:34*Vladar quit (Quit: Leaving)
17:19:28dom96import isn't actually a thing that happens as far as I know
17:19:43dom96It happens in the compiler
17:19:57dom96and the compiler output C code that includes both modules code and their dependencies
17:35:42FromGitter<kayabaNerve> So then it depends on if you're C compiler requires pre declarations?
17:35:48FromGitter<kayabaNerve> C++ does; C doesn't.
17:35:49cryptocat1094So basically it's done during pre-processing.
17:36:07FromGitter<kayabaNerve> Well. That might be practice. not an actual standard....
17:36:29FromGitter<kayabaNerve> int main(){myFunc()} void myFunc(){} <- That's valid C, but not valid C++
17:37:01FromGitter<kayabaNerve> As most of the time Nim compiles with a C compiler, that means it shouldn't matter where you import
17:39:26FromGitter<kayabaNerve> Nim says undeclared identifier
17:39:45FromGitter<kayabaNerve> *when I try to call a function from a latter import module
17:40:06FromGitter<kayabaNerve> So Nim has C++ style checks for this, even if C might not care and allow
17:42:42*natrys quit (Ping timeout: 245 seconds)
17:45:28shashlickdom96: reason I ask is that i'm working on nimdeps which allows bundling app dependencies like DLLs into the binary at compile time and then extracts it at run time
17:45:59shashlicki have the code such that the deps are managed before importing re which dynamically loads pcre32.dll
17:46:20shashlickbut even though that's the code order, they dynamic load happens before my code gets called
17:47:15shashlickeven if I simplified it - extract libsodium before importc of a proc from it also doesn't work
17:47:31shashlickso i'm wondering if dynlib gets done at the top before any code runs
17:56:43*natrys joined #nim
17:56:43*sz0 joined #nim
17:59:00*rockcavera quit (Remote host closed the connection)
18:02:34*jjido joined #nim
18:05:47shashlickfrom the generated code, it looks the dynlib imports are done much earlier then actual code execution - PreMainInner() / xxxDatInit()
18:05:49*Bevo quit (Ping timeout: 260 seconds)
18:06:53shashlickso unless i can get my code to run in the DatInit() phase somehow, this isn't going to work
18:08:08FromGitter<kayabaNerve> So you're trying to control how a dll is loaded?
18:08:16FromGitter<kayabaNerve> Could you use emit and do it in C?
18:08:36FromGitter<ephja> I created a naive patch for using a compile time variable at runtime, but it needs to be improved
18:08:44FromGitter<ephja> what is your end goal?
18:09:18*fvs left #nim ("ERC (IRC client for Emacs 25.3.1)")
18:09:29shashlickso an example - I am bundling libsodium.dll into the app executable at compile time and have code to extract it out at runtime
18:10:23shashlickand I also importc some procs from libsodium
18:10:39shashlickbut the loadLibrary() happens before my code has a chance to extract the dll
18:11:20shashlickeven though in the nim code, I have it in the right order, the compiler runs the loadLibrary steps before my code runs since that's treated as module data which should be initialized before any code runs
18:11:56shashlickif i could run the extraction as part of my module's DatInit() step somehow, i could pull it off
18:17:16shashlickaraq ^^ if you have any tips on how to do this
18:19:02*xkapastel quit (Quit: Connection closed for inactivity)
18:19:38shashlickhttps://github.com/genotrance/nimdeps <= initial version
18:19:52shashlickworks fine with any type of files except DLLs at this point
18:20:16shashlickephja - I am using compile time variables in nimdeps, do let me know your feedback
18:22:24FromGitter<ephja> using those variables at runtime too is a problem right now. sometimes that can be solved by writing to a file at compile time and then reading it at runtime
18:23:23shashlickephja: I got it to work in nimdeps for any files except DLLs
18:23:41shashlicki save the file contents as a const during compile time and extract it out at runtime if file doesn't exists already
18:25:43shashlickbeen working on this for over a year in increments
18:59:41*jjido quit (Quit: My MacBook has gone to sleep. ZZZzzz…)
19:10:58*yglukhov[i] quit (Remote host closed the connection)
19:12:40*jjido joined #nim
19:14:07*rockcavera joined #nim
19:15:28Araqshashlick: what do you need?
19:21:45*zahary joined #nim
19:21:52*xkapastel joined #nim
19:38:51*yglukhov[i] joined #nim
19:39:13*yglukhov[i] quit (Remote host closed the connection)
19:39:25*yglukhov[i] joined #nim
19:39:34*jjido quit (Ping timeout: 256 seconds)
19:43:11shashlickwhoops
19:43:41shashlickso I want to run some code during the DatInit() phase so that I can extract a DLL before it gets loadLibrary()'d
19:44:15shashlickthat's specific, I want to be able to run some code before a module attempts to loadLibrary() a DLL
19:44:43shashlickI understand the loadLibrary() calls are all performed in the DatInit() phase during PreMainInner()
19:48:58shashlickhere's a simple snippet: http://ix.io/1eoJ <= during compile time, nimdeps:setupDepFile() bundles pcre32.dll into the generated executable
19:49:03shashlicknimdeps.nim = https://github.com/genotrance/nimdeps/blob/master/nimdeps.nim
19:49:41shashlickat runtime, it needs to write out pcre32.dll before nre loadLibrary() call
19:51:43shashlickbut the way Nim generates the C, the loadLibrary happens before the call to writeDepFile() since DLL loads happen during DatInit()
19:56:31*ipjk joined #nim
19:57:05ipjkdom96: Are you planning on supporting something similar to cargo, like build --release/debug?
19:57:16ipjkdom96: in nimble, that is.
19:57:57*cryptocat1094 quit (Quit: WeeChat 1.6)
20:00:35dom96sure, we can support that
20:00:47dom96as a workaround you can use `nimble c -d:release <file.nim>` btw
20:00:51FromGitter<tim-st> is there any nim k:v db store that supports custom cmp functions without investing more than 5 hours wrapping?
20:01:10dom96ipjk: feel free to make an issue for this (or better yet, a PR :))
20:07:08Araqtim-st: redis? not sure
20:07:29*sz0 quit (Quit: Connection closed for inactivity)
20:08:04shashlickaraq: replied to you above, hope there's some way to do the dll extraction before loadLibrary()
20:08:14FromGitter<tim-st> Araq: hm, could work, thanks, will have a look at it
20:08:18federico3tim-st: local or remote? LMDB?
20:08:46Araqshashlick: yeah, well this is fragile. maybe we should have some nimscript codegen hook for that...
20:09:15AraqI remember supporting .dynlib: procCallHere() but it's not tested and never worked well
20:09:18Araqbbl
20:09:53FromGitter<tim-st> No, redis has no cmp proc implemented. I don't understand why so many rely on ascii comparison...
20:10:10FromGitter<tim-st> (at least the nim package has not)
20:11:16FromGitter<tim-st> federico: I would prefer lmdb at first place. I looked at your package but it seems to rely on a c cmp proc. I have a pure nim like: `proc cmp(a, b: string): int`
20:11:43shashlickaraq: okay i've put in a disclaimer that DLLs are not supported yet in nimdeps, I agree it is fragile and I don't want to hack it in. Also, dynlib: xyz won't work since nimdeps cannot require changes in modules that do the dynlib, e.g. stdlib pcre
20:12:12FromGitter<tim-st> I'm not skilled enough to wrap pure nim with c and at the same time know that no memory leaks appear
20:13:10federico3tim-st: perhaps there's a way to set a cmp implemented in Nim
20:13:48FromGitter<tim-st> yes, I thought so, too. but this would take hours for me to find out :\
20:16:40*adeohluwa joined #nim
20:17:29*gb00s quit (Quit: The Lounge - https://thelounge.github.io)
20:18:44FromGitter<tim-st> btw @federico3 it would be easier if your lmdb package would compile the c code instead of wrapping the dll like here: https://github.com/NimCompression/nimsnappyc/blob/master/nimsnappyc/snappyc.nim
20:18:51federico3do you specifically need a custom cmp?
20:18:52adeohluwaI wonder what Machine Learning looks like in Nim right now
20:19:20FromGitter<tim-st> yes, I implemented the fastest unicode collation algorithm that exists and I need it for German
20:19:58Yardanicoadeohluwa, check arraymancer :)
20:21:28adeohluwa Yardanico bless you man!
20:22:07federico3tim-st: oh interesting
20:22:07ipjkdom96: I can try, otherwise I make an issue.
20:22:13shashlick@ephja: https://github.com/nim-lang/packages/pull/733
20:25:57FromGitter<kaushalmodi> I have an extra module for a pkg foo which I have in the foo/ dir. But if I try to do `export foo/extra`, I get the error "cannot export foo / bar"
20:26:12FromGitter<kaushalmodi> I meant "cannot export foo / extra"
20:26:34FromGitter<kaushalmodi> If I move extra.nim in the same dir as foo.nim, and do "export extra", that works
20:26:46FromGitter<kaushalmodi> But then nimble install will complain
20:29:14FromGitter<kaushalmodi> Taking this as example: https://github.com/nim-lang/nimble#private-modules, `export foobar/utils` will not work.
20:30:03FromGitter<kaushalmodi> .. neither does `export "foobar/utils"`
20:30:30Araqpaths are for imports, export just takes the module name
20:32:37*rauss quit (Read error: Connection reset by peer)
20:32:59Araqgood night
20:33:12FromGitter<kaushalmodi> thanks, I'll try that. Good night
20:34:12FromGitter<kaushalmodi> thanks, that worked: ⏎ ⏎ ```import foobar/helpers ⏎ export helpers``` [https://gitter.im/nim-lang/Nim?at=5b2d5d440168e70c08e4e9a1]
20:34:55*rauss joined #nim
20:38:16*rauss quit (Read error: Connection reset by peer)
20:39:56*rauss joined #nim
20:51:36*noonien quit (Quit: Connection closed for inactivity)
20:59:55*thomasross quit (Quit: Leaving)
21:02:10*cspar quit (Ping timeout: 260 seconds)
21:04:37bozaloshtshis the only way to get code coverage numbers to use the coverage package and modify literally all of my proc definitions?
21:05:16Yardanicoyou can use "push" to apply a pragma to all procs in the module
21:05:35bozaloshtshI'll try that, thanks
21:06:52bozaloshtshis push's effect local to the current module or does it affect imported modules?
21:10:03dom96I believe it's the former
21:11:59FromGitter<rayman22201> Trying to build the website locally and some example asserts are failing. Is this a known issue? ⏎ ⏎ ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=5b2d661e479ca2668976d14f]
21:13:27*rockcavera quit (Remote host closed the connection)
21:13:32dom96Yes, it's known
21:13:39dom96There is an issue in the Nim repo about it somewhere
21:13:41FromGitter<kaushalmodi> @rayman22201 That's a known bug, see the workaround here: https://github.com/nim-lang/Nim/issues/8032#issuecomment-397086115
21:14:22FromGitter<kaushalmodi> .. or you need to move to the east of Greenwich to bypass that bug :P
21:19:28FromGitter<rayman22201> lol. a good excuse for a vacation. Thanks guys
21:19:59*tsaka__ left #nim ("Konversation terminated!")
21:25:34FromGitter<kaushalmodi> How can I parse the doc-string to a template in that template? Or can I?
21:25:51FromGitter<kaushalmodi> This is the template: ⏎ ⏎ ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=5b2d695f7d3bca737a0238f1]
21:26:10FromGitter<kaushalmodi> and here is an example use of that: ⏎ ⏎ ```emacs.defun(return_t, 1): ⏎ ## Returns ``t``, always. ⏎ env.intern(env, "t")``` [https://gitter.im/nim-lang/Nim?at=5b2d6972479ca2668976d975]
21:27:32FromGitter<kaushalmodi> I'd like to capture "Returns ``t``, always." and save it to a var inside that `template defun`. I plan to pass that as a new argument to that `pushFunction` proc.
21:28:03FromGitter<ephja> shashlick: thanks for reminding me
21:28:11FromGitter<ephja> apathetic coder at your service
21:30:28shashlick👍
21:42:13*nsf joined #nim
21:47:19*Trustable quit (Remote host closed the connection)
21:51:28*cspar joined #nim
21:56:13*natrys quit (Quit: natrys)
21:57:11FromGitter<ephja> done. man, that was intense
22:00:03*elrood quit (Quit: Leaving)
22:02:47*xet7 joined #nim
22:21:57*cspar quit (Ping timeout: 240 seconds)
22:36:11*adeohluwa quit (Quit: Connection closed for inactivity)
22:40:46*cspar joined #nim
23:00:15*find0x90 joined #nim
23:03:27*find0x90 quit (Client Quit)
23:21:07*nsf quit (Quit: WeeChat 2.1)
23:24:00*yglukhov[i] quit (Remote host closed the connection)
23:36:16*xet7 quit (Quit: Leaving)
23:36:33*yglukhov[i] joined #nim
23:40:57*yglukhov[i] quit (Ping timeout: 240 seconds)