<<13-02-2018>>

00:12:20*yglukhov joined #nim
00:16:38*yglukhov quit (Ping timeout: 255 seconds)
00:30:50*j_rod_s quit (Quit: j_rod_s)
00:36:31*endragor joined #nim
00:37:20*gokr quit (Ping timeout: 276 seconds)
00:38:42Demos[m]yeah vscode is where it's at
00:39:16Demos[m]which is kinda unfortunate since I don't consider vscode to be that free
00:39:57Demos[m]well, I guess my main problem is that the C/C++ plugin is totally non-free
00:57:53*j_rod_s joined #nim
01:03:27*j_rod_s quit (Ping timeout: 248 seconds)
01:15:36FromGitter<Varriount> My problem is that vscode is memory-hungry
01:29:15FromGitter<honewatson> Yup I'm not a fan of vscode but its the best option at the moment
01:29:29*steve joined #nim
01:30:00FromGitter<honewatson> YouCompleteMe has good support for c family languages https://github.com/Valloric/YouCompleteMe
01:30:14FromGitter<honewatson> And setting up a completer for nim shouldn't be difficult
01:30:26FromGitter<honewatson> lack of time is my major issue
01:30:44FromGitter<honewatson> Rename in nvim-nim is decent
01:30:47girvo`brew install nim`, `brew cask install vscode`, then done lol
01:31:34*Jinai joined #nim
01:34:58*endragor quit (Ping timeout: 256 seconds)
01:35:22*steve quit (Quit: Page closed)
01:43:06*francisl joined #nim
01:58:22*Jinai quit (Quit: Page closed)
02:04:30*francisl quit (Ping timeout: 260 seconds)
02:05:36*j_rod_s joined #nim
02:19:07*francisl joined #nim
02:36:44*chemist69 quit (Ping timeout: 256 seconds)
02:42:22*endragor joined #nim
02:42:48*endragor quit (Remote host closed the connection)
02:43:24*endragor joined #nim
02:45:10*endragor quit (Remote host closed the connection)
02:45:48*vlad1777d quit (Ping timeout: 256 seconds)
02:50:27*chemist69 joined #nim
03:03:40*endragor joined #nim
03:04:54*endragor_ joined #nim
03:05:55*endragor_ quit (Remote host closed the connection)
03:08:00*vivus quit (Quit: Leaving)
03:08:13*endragor quit (Ping timeout: 256 seconds)
03:08:25*endragor joined #nim
03:09:53Demos[m]yeah so I don't like vim because it doesn't support variable pitch text or scrolling by less than one line
03:14:15*rinzai quit (Ping timeout: 265 seconds)
03:21:35*rauss quit (Read error: Connection reset by peer)
03:22:11*rauss joined #nim
03:24:03*rinzai joined #nim
03:27:29*j_rod_s quit (Ping timeout: 248 seconds)
03:28:45*rinzai quit (Ping timeout: 265 seconds)
03:38:07*MyMind joined #nim
03:38:41*Sembei quit (Ping timeout: 276 seconds)
03:42:03FromGitter<honewatson> Ok what do you prefer @Demos[m]?
03:43:27shashlickI was quite thrilled with vscode until I realized I was using 75% of my VM's RAM on two windows
03:43:50shashlickback to vim
03:47:09*dddddd quit (Remote host closed the connection)
03:59:29*d10n-work quit (Quit: Connection closed for inactivity)
04:03:08*Pisuke joined #nim
04:03:29*MyMind quit (Ping timeout: 260 seconds)
04:17:55*rinzai joined #nim
04:18:09*Snircle quit (Quit: Textual IRC Client: www.textualapp.com)
04:21:48*endragor quit (Remote host closed the connection)
04:22:20*endragor joined #nim
04:22:24*rinzai quit (Ping timeout: 265 seconds)
04:27:02*francisl quit (Quit: francisl)
04:54:46FromGitter<Varriount> Subliiiime Teeeext
04:55:04FromGitter<Quelklef> ayyy ST crew
05:11:43*rinzai joined #nim
05:16:19*rinzai quit (Ping timeout: 268 seconds)
05:29:45girvoRam is for usage ;)
05:29:51girvo(I kid I kid, its my annoyance too)
05:41:25*endragor quit (Remote host closed the connection)
05:50:47*girvo quit (Quit: Catch you later! - https://jgirvin.com)
06:05:30*rinzai joined #nim
06:09:35*rinzai quit (Ping timeout: 240 seconds)
06:11:25*sz0 joined #nim
06:11:35*endragor joined #nim
06:13:28*yglukhov joined #nim
06:18:08*yglukhov quit (Ping timeout: 255 seconds)
06:24:48*nsf joined #nim
06:35:29*SenasOzys joined #nim
06:59:43*rinzai joined #nim
07:03:48*rinzai quit (Ping timeout: 240 seconds)
07:16:30*PMunch joined #nim
07:20:52*gokr joined #nim
07:31:13*skrylar joined #nim
07:43:42*BitPuffin joined #nim
07:52:49*yglukhov joined #nim
07:53:29*dd__ joined #nim
07:53:37*rinzai joined #nim
07:54:35*dd__ quit (Client Quit)
07:56:42*solitudesf joined #nim
07:57:53*rinzai quit (Ping timeout: 248 seconds)
08:16:07*sz0 quit (Quit: Connection closed for inactivity)
08:16:33*yglukhov quit (Remote host closed the connection)
08:20:07*yglukhov joined #nim
08:25:03*yglukhov quit (Remote host closed the connection)
08:34:17*endragor quit (Remote host closed the connection)
08:34:35*endragor joined #nim
08:45:14*floppydh joined #nim
08:47:29*rinzai joined #nim
08:50:27PMunchHmm, question about the type system
08:51:01PMunchWhen using combparser I often want to check if I have thing A or B
08:51:26Araqok
08:51:33PMunchBut since Nim is type-safe the or operator can only return one type, so both have to be the same kind
08:52:06Araqyeah, typically you use an object variant
08:52:09*rinzai quit (Ping timeout: 268 seconds)
08:52:16PMunchI solved this with protobuf by creating a rather huge type with case kind: ProtoKind
08:52:32PMunchExactly
08:52:50PMunchSo now I have this: https://github.com/PMunch/protobuf-nim/blob/master/protobuf.nim#L125
08:53:15PMunchA 27 line type with 7 different variants (and a subvariant)
08:53:39FromGitter<tim-st> @Araq Is it really not possible to set the start position of a `var string` like I can set the end position using `setLen`?
08:53:54FromGitter<alehander42> that sounds as a pretty standard variant type to me
08:54:12FromGitter<tim-st> (I mean without calling delete())
08:54:15FromGitter<alehander42> I think just the current variant syntax might make it seem a bit bigger
08:54:24PMunchWhich is fine, a bit inconvenient, but fine. Problem is that now type checking is out the window for anything that wants to use this. My verification stuff for example is littered with assert statements: https://github.com/PMunch/protobuf-nim/blob/master/protobuf.nim#L359
08:54:32FromGitter<alehander42> e.g. with something like patty's dsl it should look good
08:55:32FromGitter<alehander42> yeah, I wondered about that, can we have something like overload on kind? e.g. for two different kinds you generate the same function with the bodies in a case branch ?
08:56:54*Arrrr joined #nim
08:56:54*Arrrr quit (Changing host)
08:56:54*Arrrr joined #nim
08:57:08Araqtim-st: no, there isn't.
08:57:16PMunchI tried to split them into separate types: https://github.com/PMunch/protobuf-nim/blob/newtype/protobuf.nim#L121
08:57:25FromGitter<tim-st> @Araq ok, thanks
08:58:00PMunchWell you could always do myString = myString[10..^1]
08:58:08AraqPMunch: seems ok with me. it's a complex data model.
08:58:09PMunchBut that would probably copy it
08:58:30Araqyou can cheat and use JsonNode instead :-)
08:58:31PMunchAnd then use `or` types to get the parser to handle different types, but that didn't work either
08:58:48Araqsince there is not much static checking going on, as you noticed.
08:59:29PMunchWell, protobuf is meant to work on compile-time. So all this parsing would be done it a macro and output the code to interface with the protobuf objects directly
08:59:45FromGitter<tim-st> @ PMunch that returns a slice, calling substr which calls `CopyStr`
09:01:24AraqPMunch: yeah, so do that instead :-)
09:01:43PMunchHuh, do what instead?
09:02:33PMunchWait a sec, doesn't regexes work on compile-time either?
09:03:09PMunchlib/impure/re.nim(84, 28) Error: VM is not allowed to 'cast'
09:06:42Araqno why would they.
09:07:53FromGitter<data-man> @PMunch: Try https://github.com/nitely/nim-regex :)
09:08:34PMunchAraq, I just vaguely remember using regexes instead of pegs for something compile-time as pegs didn't work on compile-time
09:10:54*vlad1777d joined #nim
09:13:38PMunchdata-man, interesting! Does it have something like findBounds from the re module?
09:14:13PMunchI need to match as much as possible from the front of a string
09:14:25Araqregexes for parsing is usually not a good idea
09:14:27PMunchAnd just get the match and the rest as strings
09:14:46PMunchAraq, I know. This is just for parsing things like "number", "string", etc.
09:15:03Araqok
09:15:11PMunchThe actual grammar parsing is not using regexes
09:15:21Araqgood
09:16:18PMunchhttps://github.com/PMunch/protobuf-nim/blob/newtype/protobuf.nim#L84
09:16:34PMunchDown to about #L120 uses regexes
09:23:34FromGitter<tim-st> imo the `removeSuffix` behaves strange: https://gist.github.com/anonymous/3f75d1ff9a7c147cc7c87604b7eb05aa
09:24:12FromGitter<tim-st> I think most users would assume, if it strips for char and charset than it will strip (while loop) for string, too
09:24:45FromGitter<tim-st> the same of course for `removePrefix`
09:24:57Araqso read their docs.
09:25:12Araqthere is no intuitive meaning of suffix/prefix
09:25:42FromGitter<tim-st> exactly, because of this I would make it clean like Python: just call ist `strip`, `rstrip`, `lstrip`
09:25:57Araqyour meaning is as strange as mine, it is not a regex, it removes the substring. not a repeated substring
09:27:05FromGitter<data-man> @PMunch: Maybe find & boundaries? https://nitely.github.io/nim-regex/#find,string,Regex,int
09:27:17FromGitter<tim-st> hm, I just want `rstrip` and `lstrip` in place, and I never wanted something like remove a suffix only once
09:28:53PMunchdata-man, definitely looks promising
09:38:06PMunchtim-st, I think couven92 was doing something with rstrig lstrip
09:41:19*rinzai joined #nim
09:42:45FromGitter<tim-st> Ok, the main problem I was showing here, is that the first example in fact removes all `b`s the second one (overloaded same proc) does not. I think two proc should exist: `removePrefix` for *only* removing a prefix and than all overloaded procs should behave the same (now they dont!). The second one would be `strip` (with `lstrip`, `rstrip` overloaded as insitu and returning new string) that remove all sequences of
09:42:45FromGitter... prefixes/suffixes in a row.
09:45:47*rinzai quit (Ping timeout: 260 seconds)
09:47:19Araqpretty sure it's consistent with the rest of strutils though
09:48:49FromGitter<andreaferretti> what is random deprecated in favour of?
09:49:30Araqrand
09:49:34PMunchAraq, did you plan on fixing the same name for different variation types by the way?
09:49:50PMunchIt would be nice to have things like "name" for more than one of the variations
09:50:07*Vladar joined #nim
09:54:18FromGitter<andreaferretti> ok thanks
09:54:52FromGitter<andreaferretti> > **<PMunch>** It would be nice to have things like "name" for more than one of the variations 👍
10:07:21FromGitter<tim-st> Is it possible in nim that two functions call each other?
10:07:28*Vladar quit (Quit: Leaving)
10:07:32FromGitter<tim-st> (procs)
10:08:36FromGitter<data-man> https://github.com/tree-sitter How did I miss this project? Lacks tree-sitter-nim :-D
10:20:27FromGitter<tim-st> it seems it is possible in c: https://en.wikipedia.org/wiki/Recursive_descent_parser#C_implementation
10:23:52Araqtim-st: how do you think Nim's parser works?
10:24:05FromGitter<alehander42> yeah I watched their talk on FOSDEM (tree sitter), I think they said they plan to support all langs that are in use in atom/github
10:25:06*surma quit ()
10:25:23*surma joined #nim
10:28:12FromGitter<data-man> @alehander42: FOSDEM-2018?
10:28:25FromGitter<tim-st> Ok, I found out how it works: one has to write the signature at top level... I thought the compiler can do it itself
10:29:06FromGitter<andreaferretti> It should do that, but I think it has to be enabled explicitly
10:29:23FromGitter<tim-st> So my question wasnt that dumb...
10:30:08FromGitter<alehander42> yeah, the last fosdem
10:31:06Araqtim-st not dumb, but covered by tut1 iirc
10:32:09FromGitter<tim-st> Ok, now I see: https://nim-lang.org/docs/tut1.html#procedures-forward-declarations
10:32:44FromGitter<alehander42> araq can I use currentSourceDir in compileTime ?
10:33:59FromGitter<andreaferretti> @tim-st what I mean is that devel version of the compiler does allow mutually recursive functions without forward declarations
10:34:23FromGitter<tim-st> I have a devel version (7 days old) and it doesnt allow it
10:34:23FromGitter<andreaferretti> but I cannot recall whether an explicit pragma has to be used to enable the feature
10:34:42FromGitter<tim-st> ok
10:35:09*rinzai joined #nim
10:35:47Araqit's {.reorder: on.} but I doubt it introduces forward decls
10:36:36FromGitter<andreaferretti> ah ok that was it
10:36:58FromGitter<andreaferretti> I thought that was its aim
10:37:08FromGitter<tim-st> I think it works with `{.reorder: on.} ` at top level
10:37:12FromGitter<andreaferretti> otherwise one can just put the procs in the right order to begin with
10:37:18FromGitter<tim-st> will try now
10:39:31FromGitter<tim-st> at least I know that this works, thanks!
10:39:35*rinzai quit (Ping timeout: 255 seconds)
10:56:20*gokr left #nim (#nim)
11:03:25*rinzai joined #nim
11:10:32*SenasOzys quit (Ping timeout: 252 seconds)
11:24:40*SenasOzys joined #nim
11:25:45*Yardanico_ joined #nim
11:26:16PMunchmratsim, do you have any example code for the stuff you told me about performance in Julia without type hints?
11:26:39PMunchI remember you told me to get good performance you needed to use type hints
11:34:36PMunchHmm, a guy on Telegram: "btw, is it normal that the Matrix example shown here (the manual, section on static[T]) does not compile (saying that Number is undeclared)? Do I have to import it somehow?"
11:34:47PMunchSeems like a "bug" in the manual
11:39:39FromGitter<sclee15> Hello i am a nim beginner. I wonder how is your overall experiences when you using nim js backend
11:40:28PMunchsclee15, Hi! Haven't used the JS backend much but what I have tried have been very good
11:40:44PMunchs/have/has
11:43:46Arrrr"`newNativeSocket`` is now named ``createNativeSocket``" why nit ``initNativeSocket``? is far more popular https://nim-lang.org/docs/apis.html
11:43:51*tyrion-mx joined #nim
11:43:54Arrrr*not
11:44:51*Yardanico_ quit (Read error: Connection reset by peer)
11:45:30FromGitter<mratsim> @Pmunch will look in my bookmarks
11:48:14tyrion-mxHello, does anybody know if it is possible to extend the Matrix example given here ( https://nim-lang.org/docs/manual.html#special-types-static-t ) to work with an arbitrary number of dimensions? i.e. varargs of ints instead of M,N
11:48:16*euantor quit ()
11:48:32FromGitter<mratsim> Probably this: http://www.stochasticlifestyle.com/7-julia-gotchas-handle/ @Pmunch
11:48:34*euantor joined #nim
11:49:09FromGitter<mratsim> @tyrion-mx, you can but the max number must still be set at compile-time
11:49:17tyrion-mxThe example is this: `type Matrix[M,N: static[int]; T: Number] = array[0..(M*N - 1), T]`
11:50:05FromGitter<mratsim> otherwise use a Matrix[T] with the shape stored in a seq
11:50:32tyrion-mxmratsim: ok, cool! Could you please show me an example?
11:50:34FromGitter<mratsim> depending on your use case you probably should use my library Arraymancer: https://github.com/mratsim/Arraymancer
11:51:01tyrion-mxI think I read all your blog ahah
11:51:25FromGitter<mratsim> Here is the “Matrix” type: https://github.com/mratsim/Arraymancer/blob/master/src/tensor/data_structure.nim#L32-L48
11:52:05FromGitter<tyrion> (I am switching to gitter, since apparently you're using it)
11:52:11FromGitter<mratsim> And dimensions are stored at compile time there: https://github.com/mratsim/Arraymancer/blob/10b3c898746ff7652b7f581e2b17b5455dd6dc02/src/tensor/backend/metadataArray.nim#L17-L22
11:52:27PMunchtyrion-mx, Hi :)
11:52:33PMunchI'm Peter from Telegram
11:52:39FromGitter<mratsim> MAXRANK = 7 for Arraymancer
11:53:07*rokups joined #nim
11:53:15tyrion-mxhey PMunch :)
11:54:52FromGitter<mratsim> You might also want to look into the v0.1.0 which is much easier to grasp as I was also discovering Nim: https://github.com/mratsim/Arraymancer/blob/30c8a2ff9ac3771db63a2a4e94cfe009dce83a45/src/arraymancer/data_structure.nim#L25-L35
11:56:43FromGitter<tyrion> @mratsim since I am super new to the language (I started reading the tutorial yesterday) and I am already digging in some complex parts of the language, could you help understand this better? ⏎ Is it possible to specify the shape and dtype in the type itself? Are you doing it with Arraymancer and why? (apparently not if I understand correctly)
11:57:34FromGitter<mratsim> It is possible to have the shape and dtype part of the type. For me dtype is part of the type but the shape is not.
11:58:37FromGitter<mratsim> shape is not because it makes it much harder for concatenation, stuff like “squeeze” and “unsequeeze” (remove and add all singleton dimensions)
11:59:04*yglukhov joined #nim
11:59:19*yglukhov quit (Remote host closed the connection)
11:59:24FromGitter<mratsim> dtype is part of it because it’s essential for optimization purposes. Numpy also works like that.
11:59:55FromGitter<mratsim> If you’re thinking of pandas, each column is actually a different numpy array hence why they can have a different dtype
12:00:06FromGitter<tyrion> you mean at the C level? because at the python level, every array is ndarray I guess
12:00:39FromGitter<mratsim> For the shape to be part of the type you can look into final: https://github.com/unicredit/linear-algebra/blob/master/linalg/private/types.nim#L21-L23
12:01:31FromGitter<mratsim> or alternative the PR I did for linalg which is even more generic: https://github.com/mratsim/linear-algebra/blob/float-parametric/linalg/private/types.nim#L15-L24
12:02:04FromGitter<mratsim> ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=5a82d3bb51915d962aff364f]
12:02:11*odc quit ()
12:02:32*odc joined #nim
12:02:51FromGitter<mratsim> In the end Andrea also choose not to continue with the shape (N, M) being part of the type and created neo instead
12:04:16FromGitter<tyrion> Ok, thanks for the explanation. I guess the safety that you gain is not worth the effort
12:04:59FromGitter<mratsim> In summary, if we take the examples of arrays array[10, int] both 10 (number of elements) and int (types of the elements) are part of the type and must be known at compile-time
12:05:34PMunchfor field in (if field.kind == Field: @[field] else: field.oneof):
12:05:40PMunchGotta love Nim one-liners :P
12:09:26FromGitter<mratsim> @tyrion, yes. But the biggest issue I think is that you cannot infer the dimension after `np.squeeze` at compile-time
12:10:18FromGitter<mratsim> (bumpy uses squeeze implicitly after lots of function like sum, product, max along axis …)
12:10:27FromGitter<mratsim> numpy*
12:11:22*radagast_04 joined #nim
12:11:30FromGitter<sclee15> @PMunch thanks
12:12:32radagast_04What's the Nim idom for a pointer of a pointer? for example: `void fn(int** arr, size_t n);
12:12:39FromGitter<tyrion> @mratsim so, I understood that the shape can be part of the type as well but both you and @andreaferretti chose not to include it into the type for a valid reason. However I am still curious about how would go on implementing an ndimensional array with shape in the type. Something like `Array[float, 3, 4, 5, 1]` or `Array[float, [3,4,5,1]]`
12:13:25radagast_04proc fn(arr: var arrref; n: uint)
12:13:32*SenasOzys quit (Read error: Connection reset by peer)
12:13:41*SenasOzys joined #nim
12:15:08FromGitter<mratsim> for example: ⏎ ⏎ ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=5a82d6cc97cedeb0482f2a1a]
12:15:39*Snircle joined #nim
12:16:12FromGitter<tyrion> umh, ok, so it isn't possible to have a single declaration for every N-dimensional array
12:16:16FromGitter<mratsim> M, N, P, Q are the dimensions, static means they are required and known at compile-time. T: SomeNumber —> our type is only valid for int32, int64, float32, uint32, float64, etc
12:16:34PMunchradagast_04, it depends. What are you trying to do?
12:16:49FromGitter<tyrion> like `Array[T: SomeNumber, S: varargs[static[int]]]`
12:17:06FromGitter<mratsim> ref —> because the stack is limited and such an array would take much more than the few MB that we have on the stack
12:17:44*Vladar joined #nim
12:18:27*couven92 joined #nim
12:18:28radagast_04PMunch: for example implementing a prepend function of a linked list. The head node needs to be changed. Of course, I passed a var ref of the head object
12:19:14Araqarray[5, array[6, int]]
12:19:50Araqhard to create an alias for it but so what. you don't need to re-implement what a little type recursion gives you
12:20:35PMunchradagast_04, just a var should work with that
12:21:00PMunchOr, hmm
12:23:48FromGitter<mratsim> Untested ⏎ ⏎ ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=5a82d8d497cedeb0482f2a38]
12:25:05PMunchradagast_04, like this? https://play.nim-lang.org/?gist=8798aa3477a42a51666bfbe4c3ca44ef
12:25:27FromGitter<mratsim> Might even need: ⏎ ⏎ ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=5a82d93781cd9a5d7ea3f4be]
12:25:56FromGitter<mratsim> not sure if we can use static on the right hand side to enforce dimensions at compile-time
12:26:25PMunchradagast_04, of course if you only want a linked list you can use the linked list module :)
12:30:14FromGitter<mratsim> but @tyrion to be honest, Andrea and me tried to push the static part of Nim quite far but it’s one of the rougher edge of Nim with 43 bugs still open
12:30:53FromGitter<tyrion> The first example does not compile. It says `] expected` on line 3 https://play.nim-lang.org/?gist=a94127a232dfff95cdadc431931d8ead ⏎ (also I am not sure if on the second line `ndims` and `Ndim` should be written the same?)
12:31:10Araqreport this properly please.
12:31:18FromGitter<mratsim> oh yeah, I wrote that directly in Gitter ;)
12:31:43Araqwe now have a testing infrastructure for the examples in the manual
12:31:46FromGitter<mratsim> it shouldd be ndims everywhere
12:31:53AraqI only patched the tutorials for now though :-)
12:32:20Araqstatic[T] well... I still think it's a bit misdesigned.
12:32:45Araqis '4' of type 'int' or 'static[int]'?
12:33:34Araqstatic[static[T]] is the same as static[T] which smells like "not a type" to me
12:33:38*vlad1777d quit (Ping timeout: 276 seconds)
12:33:52FromGitter<mratsim> could that be a Concept? ⏎ ⏎ `static[x] = concept x when x.knownAtCompileTime`
12:34:13Araqbut *shrug* I had to repeat this mistake with 'sink T'
12:34:20FromGitter<tyrion> Like that it compiles: ⏎ ⏎ ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=5a82db4ce217167e2c7aeae4]
12:34:23Araqtype systems suck :-)
12:35:08FromGitter<mratsim> heh you’re better than me @tyrion, congrats :P
12:36:11Araqis seq[static[T]] the same as static[seq[T]]?
12:36:46Araqwhat is an object with static[T] fields? fields that have no runtime representation?
12:36:56FromGitter<tyrion> @mratsim :°D
12:39:22FromGitter<tyrion> Now, if there is a way to multiply the elements of `Shape[N]` together I could use `ref array[prod(S), T]` instead of seq
12:42:02*Pisuke quit (Read error: Connection reset by peer)
12:42:17FromGitter<mratsim> you can use a compile-time proc
12:43:08*Pisuke joined #nim
12:44:15FromGitter<mratsim> @Araq did you consider the “PhantomType” as an alternative to Static to store data with no runtime representation?
12:45:38FromGitter<tyrion> ok, still using the seq ... I made it compile, but I have no idea how to create a variable of type `NdArray` 😄 . Any hint?
12:50:31FromGitter<andreaferretti> @Araq I don't think static is misdesigned
12:50:56FromGitter<andreaferretti> one just needs to enforce the rule that static can only be used as a global qualifier of a type
12:51:22FromGitter<andreaferretti> cannot be put into seq, object fields, tuples and so on
12:51:53FromGitter<andreaferretti> and it is very useful to store data that can be precomputed at compile time, with the compiler helping propagating this information
12:52:19FromGitter<andreaferretti> unfortunately, it is also the buggiest part of Nim :-(
12:54:24Araqmratsim: I forgot what PhantomType means
12:54:49Araqandreaferretti: IMO the bugs are a symptom of an unclear design
12:55:35*couven92 quit (Ping timeout: 240 seconds)
12:55:53FromGitter<mratsim> https://doc.rust-lang.org/std/marker/struct.PhantomData.html
12:56:21FromGitter<mratsim> seems like I'm confusing rust PhantomType and PhantomData
12:56:21FromGitter<andreaferretti> a phantom type is just a generic parameter that has no runtime effect
12:56:35FromGitter<andreaferretti> used just to distinguish types
12:58:48Araqso ... static[T] is a phantom type?
12:58:54FromGitter<andreaferretti> for instance `type ButtonState = enum Clicked, NotClicked; type Button[ButtonState] = object width, height: int`
12:59:21FromGitter<andreaferretti> `static[T]` is more powerful than a phantom type as usually intended
12:59:40FromGitter<andreaferretti> in that it can also carry arbitrary data (`T`)
13:00:11FromGitter<andreaferretti> other languages just use generics and can usually carry only a finite amount of information in the type in this way
13:01:11FromGitter<andreaferretti> a typical example of phantom types is tagging strings
13:01:42FromGitter<andreaferretti> `type Tag = Id, Password, Url; type TaggedString[Tag] = string`
13:02:01FromGitter<andreaferretti> this way different kinds of strings do not get mixed up
13:03:13FromGitter<andreaferretti> sorry I am writing things that do not make sense: here I am using enums, which are runtime stuff
13:03:44FromGitter<andreaferretti> but still, one can use inheritance to model this at the type level
13:04:53FromGitter<andreaferretti> `type Id = object; type Password = object; type Url = object; type Tag = Id or Password or Url; type TaggedString[Tag] = string`
13:05:13FromGitter<andreaferretti> this should be correct, no runtime info or static[T] needed
13:05:42*francisl joined #nim
13:07:02*rinzai quit (Ping timeout: 260 seconds)
13:16:31*rinzai joined #nim
13:20:54*rinzai quit (Ping timeout: 256 seconds)
13:22:48FromGitter<mratsim> I’m trying to get term-rewriting macro to apply to thes but I don’t understand why it doesn’t match: https://play.nim-lang.org/?gist=584b47fbf7095f5e34a6023adb78b223 and https://gist.github.com/584b47fbf7095f5e34a6023adb78b223. Bug?
13:27:11FromGitter<alehander42> @sclee15 if you have nim js questions, ask, I have some prolonged xp with it
13:32:50*tyrion-mx quit (Quit: Leaving)
13:36:15FromGitter<mratsim> mmmh I think it’s a bug, getting the TRM out of the template makes it work
13:40:40*rinzai joined #nim
13:40:41FromGitter<mratsim> https://github.com/nim-lang/Nim/issues/7214
13:48:11*francisl quit (Quit: francisl)
13:49:54*Arrrr quit (Quit: Leaving.)
13:50:26*rinzai quit (Ping timeout: 276 seconds)
13:51:03*rinzai joined #nim
13:52:04FromGitter<sclee15> @alehander42 is nim js backed good for making ajax centered javascript app? (i mean wonder that i can use async await and json serialization from nimobject to jsobject)
13:55:21*rinzai quit (Ping timeout: 256 seconds)
13:55:42FromGitter<alehander42> you can now use async/await with the js backend too , we implemented this just several months ago
13:56:05FromGitter<sclee15> without babel?
13:56:23FromGitter<alehander42> the json module also works well, my only problems have been serializing variant objects, but that's a niche case
13:57:27FromGitter<sclee15> so using json module is idiomatic way of using js backend not importc JSON
13:57:32FromGitter<alehander42> we generate directly async/await js code,
13:57:50FromGitter<alehander42> it depends, for modern browsers & electron, this syntax is already supported
13:57:59FromGitter<alehander42> otherwise you can add babel in your build process, yeah
13:58:24FromGitter<alehander42> I am not sure what you mean with `importc`
13:58:27FromGitter<alehander42> in this case
13:59:15dom96You can just use the json module directly for the js backend
13:59:28dom96I would say the async stuff is a little more experimental right now
14:00:20FromGitter<sclee15> @alehander42 i saw some code like in the forum. ⏎ ⏎ ```var console {. importc, nodecl .}: JsObject``` [https://gitter.im/nim-lang/Nim?at=5a82ef748c71e5e01d8d3a63]
14:01:17FromGitter<sclee15> thanks @dom96
14:02:30dom96If you want to use the JS backend then you will have to get comfortable with {.importc.}, but it's easy. Take a look at chapter 8 of my book: https://book.picheta.me/ (It's free)
14:03:57FromGitter<sclee15> @dom96 I've already a copy of your book.
14:04:14dom96Awesome :)
14:04:21dom96Then take a look at the JS section of Chapter 8
14:05:07FromGitter<sclee15> I thought the async await might be a killer feature for nim js backend.
14:07:04FromGitter<sclee15> For now, I should be satisfied with good syntax of Nim.
14:14:51PMunchOkay, now I think I have the parsing and validation of Protobuf down. Just need to figure out how to represent these things as Nim types and procedures..
14:17:23PMunchEspecially the nested types..
14:17:24PMunchhttp://ix.io/GOM/
14:20:12FromGitter<alehander42> @sclee15 you should be able to use async/await anyway, I don't know of any major problems with it currently
14:20:24*francisl joined #nim
14:20:46*SenasOzys quit (Ping timeout: 265 seconds)
14:21:09PMunchHmm, C++ seems to use SearchRequest_SubType
14:22:49PMunchWowzer, C++ generates almost 2k lines of code for that snippet
14:27:20PMunchHmm, can macros return docstrings? With something of this size it would be nice to have the macro capable of creating documentation as well
14:28:10*SenasOzys joined #nim
14:43:49Araqmratsim: I doubt scoped TR macros are supported :-)
14:44:02Araqprobably the compiler should simply forbid them
14:44:56*rinzai joined #nim
14:46:03Araqoh I see, you figured it out already
14:46:17PMunchhttps://github.com/PMunch/protobuf-nim/blob/master/proto3.prot -> https://github.com/PMunch/protobuf-nim/blob/master/proto3.nim input?
14:46:28PMunchLeaving work now but will be back on-line in not too long
14:49:49*rinzai quit (Ping timeout: 268 seconds)
14:49:56*Pisuke quit (Read error: Connection reset by peer)
14:51:05*Pisuke joined #nim
14:51:07*ieatnerds quit (Remote host closed the connection)
14:51:24*ieatnerds joined #nim
14:52:00FromGitter<mratsim> @Araq Yeah through macros, except that I’m having some trouble to interpolate with the argument: ⏎ ⏎ ```code paste, see link``` ⏎ ⏎ I get got (int, int, NimNode) and I can’t find a way to do that cleanly [https://gitter.im/nim-lang/Nim?at=5a82fb9051915d962aff3866]
14:55:46*yglukhov joined #nim
14:58:00*PMunch quit (Quit: Leaving)
15:04:23FromGitter<zetashift> @dom86 or anybody else with a lobster account mind informing this young fellow about the wonders of Nim: https://lobste.rs/s/hhmlfh/spry_language_inspired_by_rebol_lisp#c_ggqtbc
15:05:06FromGitter<mratsim> Spry is writtne in Nim
15:05:09*j_rod_s joined #nim
15:07:45FromGitter<Quelklef> Why does ⏎ ⏎ ```when defined(test): ⏎ echo("a") ⏎ else: ⏎ echo("b")``` ⏎ ⏎ Result in `b` when run with `-d:test`? Am I misunderstanding `-d:`/`defined()`? [https://gitter.im/nim-lang/Nim?at=5a82ff418c71e5e01d8da898]
15:16:52*d10n-work joined #nim
15:17:11FromGitter<mratsim> I get a
15:17:27*endragor quit (Remote host closed the connection)
15:17:40*rinzai joined #nim
15:18:37FromGitter<Quelklef> Turns out `-d` needs to come before `-r` I think
15:19:02FromGitter<Quelklef> Was trying `nim c -r file -d:test`
15:19:18FromGitter<mratsim> no, it’s the file
15:19:21FromGitter<mratsim> after file everything else is ignored
15:19:50FromGitter<Quelklef> Oh, because they're passed as arguments. Dug
15:22:08*rinzai quit (Ping timeout: 248 seconds)
15:22:20*endragor joined #nim
15:24:53*j_rod_s quit (Ping timeout: 256 seconds)
15:27:26*endragor quit (Ping timeout: 268 seconds)
15:35:08*endragor joined #nim
15:39:45*endragor quit (Ping timeout: 248 seconds)
15:41:01radagast_04What does it mean to have a thread-unsafe GC? What implications and restrictions does it come with?
15:46:25FromGitter<mratsim> race condition, where data needed by one thread might have been collected because it wasn’t needed in another I suppose.
15:50:08*yglukhov quit (Remote host closed the connection)
16:02:52*Arrrr joined #nim
16:03:11*rinzai joined #nim
16:07:38*rinzai quit (Ping timeout: 255 seconds)
16:13:28*yglukhov joined #nim
16:14:38*rinzai joined #nim
16:15:56*yglukhov quit (Remote host closed the connection)
16:15:56*miran_ joined #nim
16:19:14*rinzai quit (Ping timeout: 268 seconds)
16:19:34*rinzai joined #nim
16:21:15*j_rod_s joined #nim
16:27:07*endragor joined #nim
16:28:02*yglukhov joined #nim
16:29:02*rinzai quit (Ping timeout: 276 seconds)
16:30:13*natrys joined #nim
16:30:53*rinzai joined #nim
16:34:57*rinzai quit (Ping timeout: 240 seconds)
16:35:06*TakeYourFreedom joined #nim
16:35:31*miran_ quit (Remote host closed the connection)
16:35:44*gokr joined #nim
16:35:50*stisa quit (Remote host closed the connection)
16:38:37*rinzai joined #nim
16:40:42*tefter quit (Remote host closed the connection)
16:41:34*miran_ joined #nim
16:42:46miran_@andreaferretti - are you here maybe?
16:43:19FromGitter<andreaferretti> yup
16:43:27*rinzai quit (Ping timeout: 256 seconds)
16:44:46miran_i have just installed neo, and before that `blas` and `lapack` from my package manager (on manjaro linux) and now i got `could not import: cblas_sscal` when i try to run a simple example
16:44:54*j_rod_s quit (Ping timeout: 256 seconds)
16:45:09miran_i'm reading https://github.com/unicredit/neo#linking-external-libraries but i'm not sure what i need to do
16:45:30FromGitter<andreaferretti> it may have to be with the way manjaro linux mangles these names
16:45:43FromGitter<andreaferretti> do you have cblas installed?
16:46:31miran_nope. installing it now
16:47:24FromGitter<andreaferretti> apparently user @konqoro was able to make it work on manjaro https://github.com/unicredit/nimblas/issues/1
16:50:03miran_ok, now i have both blas and cblas, but still the same error
16:50:11*gokr quit (Read error: No route to host)
16:50:39miran_blas is installed in /usr/lib/*
16:52:59miran_ok, i have just run `nim c --define:blas filename.nim` and it seems it works
16:54:16miran_the default way of compile+run in vscode gives the error mentioned aboce
16:54:19miran_*above
16:55:32miran_update: it compiles, but when i try to run it: `could not load: libtrue.so(||.3|.2|.1|.0)`
17:02:48*fvs joined #nim
17:03:12fvsbug? echo 2^6
17:03:27fvson 17.2
17:04:51fvsmy bad, forgot to import math
17:09:18*Trustable joined #nim
17:10:06*rinzai joined #nim
17:10:37FromGitter<andreaferretti> libtrue?
17:11:34miran_i have no idea :)
17:11:49FromGitter<andreaferretti> I see, it is `--define:blas`
17:11:55FromGitter<andreaferretti> it should b
17:12:04FromGitter<andreaferretti> `--define:blas=something`
17:12:15FromGitter<andreaferretti> where something is the blas library you want to link to
17:12:51FromGitter<andreaferretti> `--define:blas=cblas` or `--define:blas=openblas` or `--define:blas=atlas`
17:12:54FromGitter<andreaferretti> you get the idea
17:13:26miran_`-d:blas=cblas` worked!
17:13:36FromGitter<andreaferretti> great!
17:13:51*Arrrr quit (Read error: Connection reset by peer)
17:13:57miran_thank you very much!!
17:14:04FromGitter<andreaferretti> If you want to make a small PR to clarify this
17:14:15FromGitter<andreaferretti> and add a suggestion for manjaro here https://github.com/unicredit/neo/blob/master/neo.nimble#L16-L24
17:14:23miran_looking forward to converting some numpy code to see if there are any speed improvements
17:14:24FromGitter<andreaferretti> it would be useful!
17:14:32*rinzai quit (Ping timeout: 255 seconds)
17:14:46FromGitter<andreaferretti> numpy also uses blas and lapack under the hood
17:15:08FromGitter<andreaferretti> unless python is our bottleneck, you won't see speedups
17:15:10FromGitter<andreaferretti> but
17:15:32FromGitter<andreaferretti> if you have a GPU and can run this on CUDA - you may get a speedup as well
17:15:45miran_there are lots of loops (numerical integration), so i hope to see some improvement there
17:16:20*BitPuffin quit (Remote host closed the connection)
17:16:22miran_re PR: i'm not sure what should be added/modified for manjaro in the code you have linked
17:16:32FromGitter<andreaferretti> please, ask here if something is hard to do or slower than you expect!
17:16:56miran_will do, thank you once again!
17:17:17FromGitter<andreaferretti> well, there is this detectOs function in nimscript which is useful to give suggestions
17:17:24shashlickwow a nim native regex - thanks for sharing
17:17:32shashlicki wish there were more examples of using pegs in nim
17:17:44FromGitter<andreaferretti> but I am not sure what dependencies are need on manjaro
17:18:02FromGitter<andreaferretti> elif detectOs(Manjaro):
17:18:13FromGitter<andreaferretti> foreignDep something
17:18:26FromGitter<andreaferretti> where something are the libraries you needed to install
17:18:58miran_well, i have installed blas, lapack and cblas. but i guess only blas and cblas would be enough?
17:19:18FromGitter<andreaferretti> no lapack is needed for some operations
17:19:20FromGitter<andreaferretti> btw, for speed use openblas, it is much faster (it could be you default blas implementation or not)
17:20:19miran_i don't see openblas in the manjaro repo :/
17:21:01miran_but there are `openblas` and `openblas-lapack` packages on AUR
17:21:44miran_for the latter, it says "Optimized BLAS library based on GotoBLAS2 1.13 BSD (providing blas, lapack, and cblas)" - i guess this is the one to use
17:22:35FromGitter<andreaferretti> great
17:23:31*j_rod_s joined #nim
17:32:05*miran_ quit (Remote host closed the connection)
17:39:00*miran_ joined #nim
17:39:29miran_some of these installations have broken my system....
17:39:38miran_`/usr/lib/gcc/x86_64-pc-linux-gnu/7.2.1/cc1: error while loading shared libraries: libmpfr.so.6: cannot open shared object file: No such file or directory`
17:39:52FromGitter<andreaferretti> :-(
17:40:05FromGitter<andreaferretti> I don't see why they would
17:40:19FromGitter<andreaferretti> they are just numerical libraries after all
17:40:43FromGitter<andreaferretti> I have zero experience with Manjaro, though, sorry I cannot help you
17:40:43miran_i have no idea what happenend, but now even regular nim won't compile
17:41:11Araqwow that's actually quite unheard of :-)
17:41:22Araqyou have unique trouble here, congrats
17:42:33miran_Araq: thank you, i'm quite proud of myself and have no idea how to fix it
17:43:01Araquninstall the broken packages?
17:43:16Araqreinstall Linux?
17:43:17*floppydh quit (Quit: WeeChat 2.0.1)
17:43:25Araqbuy a new computer?
17:43:29Araqpull the plug?
17:43:54miran_set the whole flat on fire and run
17:44:15Araqhttps://www.youtube.com/watch?v=q8SWMAQYQf0
17:44:57miran_sorry, no time for laughs currently. i'm busy banging my head on the wall
17:46:27radagast_04Install base-devel package
17:46:40Araqhttps://youtu.be/vtn2fAe_kZI?t=636
17:48:22Araqok, enough of this
17:49:21miran_radagast_04: `base-devel-multilib` from AUR?
17:50:58radagast_04why multilib? I was hoping reinstalling base-devel would help
17:51:31miran_radagast_04: because thats the only thing showing up? :)
18:03:56*rinzai joined #nim
18:05:51*Take_Your_Freedo joined #nim
18:07:27*TakeYourFreedom quit (Ping timeout: 260 seconds)
18:07:56*Take_Your_Freedo quit (Client Quit)
18:08:03*Take_Your_Freedo joined #nim
18:09:00*rinzai quit (Ping timeout: 268 seconds)
18:13:11*miran_ quit (Quit: Konversation terminated!)
18:15:30*miran_ joined #nim
18:16:40miran_fixed!
18:17:26Araqhow?
18:17:29miran_remember kids - don't install libraries if your system isn't updated because this is how you get partially updated system and bad things can happen!
18:17:59miran_note to self - try to be less stupid in the future
18:20:55*endragor quit (Remote host closed the connection)
18:21:11*endragor joined #nim
18:21:57*endragor quit (Remote host closed the connection)
18:22:37*chemist69 quit (Ping timeout: 260 seconds)
18:25:41*chemist69 joined #nim
18:26:58miran_@andreaferretti - now i was able to install the mentioned `openblas-lapack` from AUR - it replaces (removes) the manjaro versions of blas and lapack. and now everything seems to work
18:27:13miran_even the regular compile+run in vscode
18:27:18Araqmiran_, shouldn't the package manager prevent this thing from happening?
18:28:14miran_Araq: well, there was a red icon warning me that i'm not updated, but i have decided to ignore it.
18:31:35Araqreport it on manjaro's issue tracker anyway
18:33:14planetis[m]this stuff happens when you haven't pdated your system in a while and try to install a package
18:33:42*yglukhov quit (Remote host closed the connection)
18:36:16FromGitter<dandevelo> Can you use .importc with types?
18:42:34Araqcertainly but it's usually better to not do this
18:42:58*yglukhov joined #nim
18:43:02Araqso that the Nim only depends on the DLL and not C header files
18:48:10miran_planetis[m]: that is *exactly* the thing that happened. i was 2 system updates behind, i think
18:49:11*gokr joined #nim
18:50:29*Take_Your_Freedo quit (Remote host closed the connection)
18:54:35*PMunch joined #nim
18:57:37*bl4rk joined #nim
18:57:47*rinzai joined #nim
18:58:29PMunchOkay, not too long turned into a while :P
18:58:34miran_Araq: you know when you have a tuple with x and y fields, you can define it as (x:2.0, y:3.0), but you can't as (x:-2.0, y:3.0)?
18:58:51miran_but putting space between : and - makes it ok
18:59:05PMunchProbably it maches something on :-
18:59:06miran_bug or a feature?
18:59:12PMunchNot sure what that would be :P
18:59:18Araqdo you really think I don't know? :-)
18:59:28Araq:- is an operator in its own right
18:59:33Araqit's a feature.
18:59:44bl4rkHi folks, I have a question about using winim and VirtualAlloc, I am just trying to figure out the correct syntax.
18:59:45PMunchWhat does :- do?
19:00:02miran_starts a smiley? :D
19:00:14PMunchOr is it just a possible operator and those match first regardless of if they are implemented
19:00:23PMunchmiran_, partially applied smileys :P
19:00:32bl4rkanyone got a sec for my noob questions? :)
19:00:32Araqbl4rk, look at lib/system/osalloc.nim for an example
19:00:41bl4rkThanks Araq~
19:01:54AraqPMunch, it is an operator you can define
19:02:01PMunchRight
19:02:45*rinzai quit (Ping timeout: 264 seconds)
19:04:29Araq:- in Prolog is "implies"
19:05:58bl4rkAraq: ok I was just a dummy I was trying to echo the result of VirtualAlloc and getting an error but it was still working lol
19:06:09bl4rkthanks
19:06:22*couven92 joined #nim
19:17:27miran_@andreaferretti - is it posible to assign a matrix to a slice of a bigger matrix? e.g. A[0 .. 2, 0 .. 2] = B
19:26:21*Sargun quit (Quit: leaving)
19:28:40FromGitter<tyrion> Hello, I am playing a bit with the type system and static. Here I get `got: (N) but expected: (N)` which seems a bit weird. https://play.nim-lang.org/?gist=5498907a2604ffa88b01e214cb4fded8 ⏎ The first implementation using `array` works, the one using `IntArray` does not
19:29:37FromGitter<tyrion> (not sure if it's better to paste the code directly or to send a link)
19:30:03bl4rkThis might be a dumb question but I've allocated 4 bytes of memory using tmp = VirtualAlloc(nil, DWORD(4), allocType, flProtect) now I want to write the var someCode (array[0x10, uint8]) to it. What's the best way? I am having trouble figuring out he sytax between win and nim
19:30:14def-@tyrion: line 14: IntArray[N: static[int]]
19:30:29bl4rksorry that should read 16 bytes
19:30:39bl4rk0x10 not 4
19:31:20def-bl4rk: copyMem?
19:31:38FromGitter<tyrion> def-: I will try, but shouldn't it work anyway? I just wanted IntArray[N] to be an alias for Array[N, int]
19:32:06def-@tyrion well, it's necessary for int types, not sure why
19:34:32bl4rkdef-: here's the question i had, copyMem is a nim function and VirtualAlloc returns a LPVOID - can I pass that right to copyMem or do I need to convert it?
19:34:43bl4rki am a noob thanks for your patience
19:39:03FromGitter<dom96> Hah https://twitter.com/steveklabnik/status/963494075830857730
19:40:27PMunchHaha!
19:40:59*fvs left #nim ("ERC (IRC client for Emacs 25.3.1)")
19:41:06PMunchWe should create a "programming Nim" boyband or something
19:41:10*gokr quit (Ping timeout: 240 seconds)
19:41:15PMunchTo tweak the scales
19:41:55planetis[m]evil laugh!
19:43:28def-bl4rk: dunno about windows api, copyMem takes pointers
19:43:35bl4rklooks like it works
19:49:06bl4rki did copyMem using the LPVOID and then equalMem(tmp, someCode, 0x10) and got true so i guess the LPVOID is seen as a ptr by nim, but I couldn't do repr(tmp) so I wasn't sure
19:49:36*francisl quit (Quit: francisl)
19:51:36*rinzai joined #nim
19:55:37FromGitter<mratsim> libtool is an exercise in insanity ...
19:56:09*rinzai quit (Ping timeout: 264 seconds)
20:08:52*natrys quit (Quit: natrys)
20:09:22*dddddd joined #nim
20:14:05*francisl joined #nim
20:14:23*yglukhov quit (Read error: Connection reset by peer)
20:15:03*yglukhov joined #nim
20:17:29*Trustable quit (Remote host closed the connection)
20:21:40bl4rkquestion: is there any difference between p: pointer = a.addr and p = a.addr
20:21:50bl4rkother than explicitly setting the type?
20:23:40*rinzai joined #nim
20:26:48PMunchWell a.addr probably is of type ptr <a's type>
20:26:55PMunchSo there is an implicit type cast there
20:32:08*rinzai quit (Ping timeout: 256 seconds)
20:36:13*gokr joined #nim
20:37:10*icebattle joined #nim
20:38:14*mrshu joined #nim
20:47:46*Vladar quit (Remote host closed the connection)
20:56:30*rokups quit (Quit: Connection closed for inactivity)
20:58:46*francisl quit (Ping timeout: 256 seconds)
21:00:19*yglukhov quit (Read error: Connection reset by peer)
21:01:00*yglukhov joined #nim
21:02:36FromGitter<tyrion> def-: I tried a bit more, but I cannot make it work. I am not sure if it is a bug of the compiler. The following code, in my opinion produces the wrong return type `IntArray[N+1]` instead of `IntArray[4]` (it works as expected for normal arrays). And also, uncommenting the last line makes the compiler hang forever (apparently): https://play.nim-lang.org/?gist=b29328a457b6e3d95ad3af129dff86ec
21:17:54*rinzai joined #nim
21:21:43*xkapastel joined #nim
21:24:49*rinzai quit (Ping timeout: 248 seconds)
21:31:01*miran_ quit (Quit: Konversation terminated!)
21:31:17*superbia joined #nim
21:31:29*PMunch quit (Quit: leaving)
21:31:37superbiais this the light side
21:39:46superbiais it ok to install nim first from my distro repo, and after that install choosenim (if i decide i like nim)
21:45:32*vlad1777d joined #nim
21:51:47def-@tyrion well, the type name sounds unfortunate. hanging compiler is a bug, make an issue on github pleae
21:56:04*nsf quit (Quit: WeeChat 2.0.1)
21:56:29FromGitter<tyrion> def-: Ok, but what about the fact that I get an `IntArray[N+1]` instead of `IntArray[4]`, is that correct? If I annotate v4 at line 22 as `v4: IntArray[4] = ...` I get a type mismatch
21:59:02*Pisuke quit (Quit: WeeChat 2.1-dev)
21:59:55*Sembei joined #nim
22:06:10bl4rkHey folks. So I am plodding through trying to execute some extremely simple shellcode with VirtualAlloc and CreateThread using Nim. I have got to the point where I'm allocating memory, copying code to it and then attempting to execute CreateThread but nim gives me a type error.
22:06:14bl4rkhttps://pastebin.com/TkR5LFmK
22:06:32bl4rkI am not sure why, I've looked around but there isn't much in terms of examples that are helping
22:06:42bl4rkThe full code and error is in that paste
22:07:13bl4rkIf anyone cares to help, I'd certainly appreciate it!
22:12:04*rinzai joined #nim
22:16:39*rinzai quit (Ping timeout: 260 seconds)
22:21:46Araqbl4rk, use Nim devel to get much more helpful error messages from the compiler
22:23:31bl4rkty Araq
22:24:27*rinzai joined #nim
22:28:05*huonw quit (Ping timeout: 240 seconds)
22:29:12*huonw joined #nim
22:33:51Araqbtw you should use Nim's thread support
22:39:29bl4rkyep, i have been thanks.
22:40:01*solitudesf quit (Ping timeout: 248 seconds)
22:40:08bl4rki've been pouring over examples in other languages and can't make sense of why this isn't working. compiling dev now. I know it's just something dumb
22:58:12*couven92 quit (Read error: Connection reset by peer)
23:04:32*onionhammer quit (Quit: WeeChat 1.9.1)
23:06:21*onionhammer joined #nim
23:24:27*gokr left #nim (#nim)
23:44:07*superbia quit (Quit: WeeChat 2.0.1)
23:59:59*yglukhov quit (Remote host closed the connection)