<< 05-11-2018 >>

00:05:20FromGitter<zetashift> ah yes nkNone indicates an error
00:15:29*kapil____ joined #nim
00:21:43*elrood quit (Remote host closed the connection)
00:24:44*seni_ quit (Quit: Leaving)
00:26:06FromGitter<zacharycarter> genotrance: are you around by any chance?
00:26:26FromGitter<zacharycarter> wait
00:26:31FromGitter<zacharycarter> nevermind
00:26:48FromGitter<zacharycarter> don't want to bug you about this - I think I can figure it out via other example repos you've put up
00:31:37FromGitter<zacharycarter> maybe not :/
00:33:37FromGitter<zacharycarter> or if anyone else is good with nimgen and cpp
00:39:46FromGitter<zacharycarter> shashlick: just in case you're on this irc (which is probably more likely :P)
01:01:54*leorize quit (Quit: "")
01:02:03*jose122 joined #nim
01:02:12*jose122 quit (Quit: Page closed)
01:08:54FromGitter<zacharycarter> ooph - yeah - going to give up on this for now I think so it doesn't block me
01:09:11FromGitter<zetashift> whatchu up to?
01:09:37FromGitter<zacharycarter> trying to use nimgen to create bindings to - https://github.com/Auburns/FastNoiseSIMD
01:09:42FromGitter<zacharycarter> having troubles though
01:15:19FromGitter<zacharycarter> keep running into errors like -
01:15:23*Snircle quit (Quit: Textual IRC Client: www.textualapp.com)
01:15:32FromGitter<zacharycarter> ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=5bdf99b4b9c9191954a1606b]
01:17:37FromGitter<zacharycarter> https://gist.github.com/zacharycarter/9c61ce86123ab597ec0e43f493323862
01:17:40FromGitter<zacharycarter> is what my cfg looks like
01:19:31FromGitter<zacharycarter> ah - I fixed one issue that was pretty obvious, and now i have a whole new slew of errors :D
01:27:31*Snircle joined #nim
01:29:46shashlickSorry buddy on the road
01:29:54shashlickWill check back in 3 hours I think
01:30:51FromGitter<zacharycarter> cool! no rush and safe travels!
01:34:33shashlickWhat does your generated Nim look like
01:34:54shashlickSeems like the cpp files are not compiled on
01:34:55shashlickIn
01:38:56FromGitter<zacharycarter> yeah - not quite sure what I'm doing - I'll wait till your free and keep playing around till then
01:42:26*Aareon_ quit (Ping timeout: 260 seconds)
01:43:22shashlickAre there any compile entries in the generated Nim
01:43:29shashlickCan you gist that
01:56:04FromGitter<zacharycarter> yes
01:56:06FromGitter<zacharycarter> one sec
01:56:14FromGitter<zacharycarter> I will gist everything I have
01:59:14FromGitter<zacharycarter> shashlick: https://gist.github.com/zacharycarter/9c61ce86123ab597ec0e43f493323862
02:02:18*Aareon_ joined #nim
02:16:02shashlickThe init000 symbols come from the Nim main proc
02:16:13shashlickDon't see why those aren't found
02:17:13shashlickHow come foo.o is not in the final link command
02:17:21FromGitter<gogolxdong> @PMunch Is your protobuf library production-ready?
02:17:27FromGitter<zacharycarter> okay I think I am making progress
02:21:21*endragor joined #nim
02:22:38FromGitter<zacharycarter> I think it has to do with me missing -mavx2
02:23:44shashlickCool
02:24:03shashlickWell nice to see another nimgen wrapper
02:25:16*theelous3_ quit (Ping timeout: 268 seconds)
02:27:44FromGitter<zacharycarter> ugh nm
02:27:55FromGitter<timotheecour> anyone familiar with nimsuggest?
02:27:57FromGitter<zacharycarter> back and forth b/w the error in the gist and this new onw
02:32:36FromGitter<zacharycarter> lol shashlick: it was because the nim file was named the same as the header / cpp file
02:32:47FromGitter<zacharycarter> renamed the nim file - it compiles now
02:37:28shashlickGot overwritten
02:37:57shashlickI had to add some code to nimgen to handle files it processed
02:38:24shashlickBut can't do much with consumers 🙂
02:41:03shashlickInteresting nonetheless
02:41:36shashlickShould open an issue with Nim to notify that object files got over written
02:41:44shashlickOr avoid it by renaming
02:42:08*endragor quit (Remote host closed the connection)
02:42:34*endragor joined #nim
02:45:40*endragor quit (Remote host closed the connection)
02:50:15FromGitter<kdheepak> @shashlick you can try ssh-ing into travis for more information, and interactively debug.
03:05:18*banc quit (Quit: ZNC - http://znc.in)
03:09:47FromGitter<zacharycarter> it seems to be working?
03:10:20FromGitter<zacharycarter> ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=5bdfb49c995818347ba4a7a1]
03:16:21FromGitter<gogolxdong> Got could not load: libpq.dll , I have placed it into the working directory.
03:20:35*banc joined #nim
03:26:22FromGitter<zacharycarter> wewt! got it working
03:26:37FromGitter<zacharycarter> SIMD fast noise woot! going to be awesome for terrain gen
03:35:17shashlick@kdeepak: I just ran it locally with docker
03:35:31shashlickBut ssh is a good idea
04:02:11xacedoes the example in https://github.com/yglukhov/nimpy # work for anyone? the calling python from nim example, i get this error: nimpy-0.1.0/nimpy/py_utils.nim(75, 46) Error: type mismatch: got <NimNode>
04:02:13*Snircle quit (Quit: Textual IRC Client: www.textualapp.com)
04:07:27*chemist69 quit (Ping timeout: 252 seconds)
04:09:14*chemist69 joined #nim
04:23:25xaceHmm, this machine was running nim 0.18.0, turns out that was the problem
05:23:35*nsf joined #nim
06:54:52*krux02 joined #nim
06:59:29*mech422_ joined #nim
07:01:52*leorize joined #nim
07:02:46*mech422__ quit (Ping timeout: 268 seconds)
07:14:36*kapil____ quit (Quit: Connection closed for inactivity)
07:15:49*itschin joined #nim
07:32:58livcdwhat cross platform http server would you recommend as of now ?
07:43:37Araqhttpbeast?
07:43:55Araqalways use a proxy for security though :-)
07:50:14*vlad1777d joined #nim
07:51:40*Vladar joined #nim
08:10:15*PMunch joined #nim
08:13:29*vlad1777d quit (Remote host closed the connection)
08:27:45FromGitter<admin0day> do we have the pkg about sendgrid?
08:29:47FromGitter<admin0day> cause i want to use the api of sendgrid to send the email avoid the Mail service provider's filter
08:34:53krux02admin0day never heared about sendgrid, just reading about it. Is that a spam filter circumvention service?
08:36:11krux02"45 billion emails every month" sounds like a huge spam factory
08:41:14FromGitter<admin0day> yeah,google and tencent's mail service only allow the same provider to send the email to themself,so if my platform using the difference provider to send the email,it will return back or send it to them trash
08:43:25PMunchHmm, that's annoying Sublimes LSP client sends a completion request before sending a didChange notification..
08:43:50PMunchSo when I return my completion it has already changed the document..
09:00:40FromGitter<admin0day> do we have any pkg of the starttls,unfortunately we use the outlook email,their smtp service using the starttls
09:01:38FromGitter<admin0day> by the way do we have another protocol to send the email?
09:08:25*floppydh joined #nim
09:11:56*yonson joined #nim
09:12:43*vlad1777d joined #nim
09:15:44FromGitter<Varriount> @timotheecour I've updated several NimLime issues.
09:21:56yonsonWhen unmarshalling a json, is there a way to have an object model with fields that are not present on the json data?
09:22:14yonsonThis is an example of what I'm talking about https://pastebin.com/nmRJi0LU
09:22:40yonsonI'd like to have some fields of the object to be used after the unmarshalling
09:24:42PMunchNot as far as I know
09:25:06PMunchI use my jsonschema module in nimlsp to work with typed json objects
09:25:16PMunchAnd it supports optional fields
09:27:43yonsonI see, I'll look into your module, thanks
09:32:32*stevenfx joined #nim
09:44:21*stevenfx quit (Quit: stevenfx)
09:47:07*Vladar quit (Ping timeout: 240 seconds)
09:47:14*fredrik92 is now known as couven92
09:48:51*stevenfx joined #nim
09:51:03*stevenfx quit (Client Quit)
09:56:34couven92PMunch, in .NET we have the NonSerializable, IgnoreDataMember and JSonIgnore annotations (depending on what serializer you use). These are really useful, I use them all the time! If we don't have, we should add them, as pragmas for example!
09:57:51couven92Optional fields do not do the trick, because they will serialize the field if able, which is not what you want
09:58:56FromGitter<gogolxdong> where is the RSA implementation?
09:59:49*stevenfx joined #nim
10:02:00PMunchcouven92, I'm pretty sure yonson wanted optional fields. But a way to ignore fields would also be a good idea
10:02:45PMunchMy jsonschema module doesn't actually deserialize anything, it just checks if a JsonNode conforms to a certain schema
10:03:06PMunchAnd it implements compile-time field access on the distinct types, which is neat
10:03:18FromGitter<gogolxdong> Do we have an implementation of RSA?
10:31:40yonsonI just realised that if I wrap the type of my desired optional field in an Option[type] then parseJson doesn't complain and just returns `None[type]`
10:31:45yonsonSo that works too I guess
11:06:03*stevenfx quit (Quit: stevenfx)
11:11:11*stevenfx joined #nim
11:24:02FromGitter<zacharycarter> @gogolxdong - https://github.com/joppiesaus/nimchat/blob/master/rsa.nim ?
11:27:28FromGitter<zacharycarter> seems like it'd be rather trivial to come up with a Nim implementation - https://www.geeksforgeeks.org/rsa-algorithm-cryptography/
11:28:22*martin1_ joined #nim
11:36:23FromGitter<gogolxdong> yes,crypto is always trivial.Thanks anyway.
11:38:16FromGitter<gogolxdong> we choose Vulkan however.
11:40:53FromGitter<zacharycarter> not following haha but okay
11:45:33*Vladar joined #nim
11:45:52FromGitter<gogolxdong> sorry,jumping thinking.
11:47:29FromGitter<gogolxdong> regarding the context, using secp256k1 is easier.
11:53:16FromGitter<zacharycarter> np
12:06:03*theelous3 joined #nim
12:16:05*Snircle joined #nim
12:34:53federico3trivial to get wrong
12:35:16*stevenfx quit (Quit: stevenfx)
12:35:56*hwallann joined #nim
12:38:26*dorelix_ joined #nim
12:39:24*dorelix quit (Read error: Connection reset by peer)
12:45:43*dddddd joined #nim
13:27:50*elrood joined #nim
13:33:43*abm joined #nim
13:43:14FromGitter<zacharycarter> well - yeah
13:43:42FromGitter<zacharycarter> I don't know what he needs exactly
13:43:56FromGitter<zacharycarter> or what his goals are - but I guess it's a non issue now
13:46:54shashlickReminds me to wrap more portions of openssl in nimssl
13:51:52FromGitter<alehander42> @zacharycarter people are very into "don't implement your own crypto". I've read opinions(I think it was @mratsim) that this should mean "don't invent your own crypto algorithm/math", not "don't implement this existing algo", but even in the second case one still needs a lot of additional verification indeed
13:56:16*Aareon_ quit (Ping timeout: 260 seconds)
14:00:33*Aareon_ joined #nim
14:04:15FromGitter<zacharycarter> yeah - I can understand that
14:12:05PMunchWell it's a dual edged sword. On hand you don't want to make your own implementation of an algorithm in case you mess it up and leave it with a security hole in it. On the other hand we are starting to become very dependent on a few crypto implementations, so if they are ever found to be fundamentally wrong we're screwed until they are properly re-implemented.
14:15:28*nsf quit (Quit: WeeChat 2.3)
14:23:51federico3PMunch: "your own crypto" refers to small projects/orgs and random developers. Having well maintained alternatives to OpenSSL is obviously good
14:28:37*kapil____ joined #nim
14:46:41*NimBot joined #nim
15:06:18*hwallann quit (Remote host closed the connection)
15:26:12*Trustable joined #nim
15:34:28*dom96_w joined #nim
15:35:39*krux02 quit (Remote host closed the connection)
15:35:43*krux02_ joined #nim
15:36:31FromDiscord_<Epictek> NaCl seems like a nice crypto libary
15:37:58FromGitter<mratsim> To implement algo, you need good test vectors and master level dumpHex-fu with gdb superpower. When you’re off by one your hashes are completely different and this is super annoying
15:38:26Araqwell at least you notice it quickly
15:39:06FromGitter<mratsim> the fact that everyone is using it’s own int15 or int31 or other clever schemes to save extra metadata in the last bit + avoiding carries is also a pain.
15:41:56FromGitter<zacharycarter> going to use that fastnoise simd port I authored last night to start creating procedural maps in godot tonight
15:42:43FromGitter<kdheepak> Does anyone have an example of nim using sdl to run on ios?
15:43:02FromGitter<kdheepak> I see that nimx supports ios but I'm unable to get it up and going.
15:43:30FromGitter<kdheepak> and the only other example is statically calling a function in Nim that returns a string.
15:44:15FromGitter<kdheepak> If there are some ios / mac developers in the chat, I have a few questions about this.
15:44:38*citycide quit (Ping timeout: 244 seconds)
15:48:05*citycide joined #nim
15:49:36Araqkdheepak, what's the problem with nimx?
15:51:22*tiorock joined #nim
15:51:22*rockcavera is now known as Guest41678
15:51:22*tiorock is now known as rockcavera
15:51:22*rockcavera quit (Changing host)
15:51:22*rockcavera joined #nim
15:51:52yonsonhas anyone inserted multiple rows at once with the default nim postgresql drivers? I can't get it to work with `INSERT`
15:52:31yonsonalso related question, does the driver support `COPY` operations? I don't see it mentioned in the docs
15:53:34itschinAraq: is js nimcache being in current folder intended
15:53:47Araqitschin, yes
15:54:51*Guest41678 quit (Ping timeout: 252 seconds)
15:56:14*PMunch quit (Quit: Leaving)
16:00:14FromGitter<kdheepak> @Araq It looks like it has all the features I want but I'm just having issues running it on ios.
16:00:20FromGitter<kdheepak> Works great on my mac.
16:03:10FromGitter<kdheepak> I'll paste a screenshot here in a moment.
16:06:36FromGitter<kdheepak> (https://files.gitter.im/nim-lang/Nim/fnNN/Screen-Shot-2018-11-05-at-9.06.04-AM.png)
16:07:03FromGitter<kdheepak> This is what I get when I run `nim c --threads:on -d:release -r main.nim` on my mac.
16:08:11FromGitter<kdheepak> (https://files.gitter.im/nim-lang/Nim/9nGm/Screen-Shot-2018-11-05-at-9.07.31-AM.png)
16:09:09*vlad1777d quit (Ping timeout: 252 seconds)
16:09:29FromGitter<kdheepak> When I run the following in XCode ⏎ ⏎ ```code paste, see link``` ⏎ ⏎ I get a linker error in XCode shown in the screenshot above. [https://gitter.im/nim-lang/Nim?at=5be06b39076992347abded76]
16:09:49FromGitter<kdheepak> I added all the build/nimcache64 files to XCode
16:10:29FromGitter<kdheepak> I'm able to run a pure C example this way.
16:11:16FromGitter<kdheepak> If I don't use nimx and just use nim sdl, I'm able to compile successfully, but when I open the app in an ios simulator it just hangs on the splash screen.
16:11:27FromGitter<kdheepak> I'm missing something simple, but don't know what it is.
16:11:49FromGitter<kdheepak> I'm able to run the default C example in SDL and that works fine in this XCode project.
16:18:58*darithorn joined #nim
16:30:01*narimiran joined #nim
16:35:23FromGitter<zacharycarter> are you linking all the correct iOS Frameworks?
16:35:44FromGitter<zacharycarter> I don't think you are
16:35:59FromGitter<zacharycarter> I think that's why you're getting undefined symbols from the linker
16:36:18FromGitter<zacharycarter> make sure you're linking the AppKit framework
16:41:35FromGitter<kdheepak> Thanks for the reply @zacharycarter. Appkit is macos, I'm trying to build for ios.
16:48:13FromGitter<zacharycarter> hmm
16:48:33FromGitter<zacharycarter> well those linker errors are related to AppKit
16:48:37FromGitter<zacharycarter> or whatever the iOS equivalent is
16:49:28FromGitter<zacharycarter> at least I think they are
16:51:18FromGitter<zacharycarter> https://stackoverflow.com/questions/1159227/symbols-not-found-in-xcode-cocoa-application - IOKit I guess @kdheepak
16:51:23FromGitter<mratsim> @zacharycarter I’m surprised @jackmott didn’t implement one in Nim already: https://github.com/jackmott?utf8=✓&tab=repositories&q=noise&type=&language=
16:51:50FromGitter<zacharycarter> @mratsim - I didn't use jackmott's project
16:52:09FromGitter<zacharycarter> I used - https://github.com/Auburns/FastNoiseSIMD - who I think expanded on JackMott's work
16:52:14FromGitter<mratsim> I mean he has fast noise in C# C++ and Rust, he has a NIM SIMD library
16:52:34FromGitter<zacharycarter> yeah but his fast noise lib is limited in the types of noise it supports
16:52:50FromGitter<kdheepak> @zacharycarter thanks for looking into this. There's no IOKit.
16:52:59FromGitter<kdheepak> That link is from 2009, maybe things have changed?
16:53:00FromGitter<zacharycarter> @kdheepak dunno then - np
16:53:03FromGitter<zacharycarter> possibly
16:53:46FromGitter<kdheepak> I think nimx (or the darwin nim package) is not using the right functions depending on whether it is being compiled for ios / mac
16:54:15FromGitter<mratsim> and what do you use for runtime CPU features detection?
16:55:06FromGitter<mratsim> ah, you are just wrapping, you’re not reimplementing from scratch
16:55:09FromGitter<zacharycarter> yeah
16:55:54FromGitter<zacharycarter> would be awesome to be able to port these to Nim
16:55:58FromGitter<zacharycarter> but for now I think this is the best I can do
16:56:18FromGitter<kdheepak> @PMunch did you implement a nim sdl library that essentially reflected the functions in the SDL library?
16:56:35FromGitter<kdheepak> I remember seeing something like this a while ago but I'm not able to find it again.
16:58:46*wildlander joined #nim
16:59:34krux02_I have simplex noise implemented with the types of nim-glm that can be cross compiled to GLSL as well
17:00:31FromGitter<zacharycarter> @kdheepak - Vladar wrote it - https://github.com/Vladar4/sdl2_nim
17:01:16FromGitter<mratsim> for runtime CPU detection on x86 and ARM I use this: https://github.com/numforge/laser/blob/master/laser/cpuinfo.nim
17:01:43FromGitter<mratsim> Example: https://github.com/numforge/laser/blob/master/laser/hpc_kernels/reduction_sum_min_max.nim#L47
17:01:59FromGitter<zacharycarter> might have to look at porting this lib to Nim then when I have more time
17:02:12FromGitter<zacharycarter> thanks for sharing that
17:03:14FromGitter<kdheepak> Thanks for that @zacharycarter even that is not working. It hangs on starting the app.
17:03:40FromGitter<kdheepak> I need to start with simpler examples.
17:04:18FromGitter<kdheepak> I think I may have to wrap SDL myself to see why I'm able to use the C example but not able to use an example in Nim.
17:05:13FromGitter<mratsim> I’m only adding cpu features and SIMD on a as needed basis though. often deep learning workflows are memory bound so SSE get max perf and there is no need for AVX2 or AVX512. Basically the only exceptions are matrix multiplications and convolutions and I didn’t implement those yet.
17:12:42*a_b_m joined #nim
17:13:58*a__b__m joined #nim
17:15:54*abm quit (Ping timeout: 252 seconds)
17:17:21*a_b_m quit (Ping timeout: 252 seconds)
17:20:22*PMunch joined #nim
17:25:47narimiran@kdheepak https://github.com/nim-lang/sdl2 ?
17:26:24*floppydh quit (Quit: WeeChat 2.3)
17:27:14itschinanyone using vscode know how to skipfiles when using debugger
17:27:24*leorize quit (Ping timeout: 250 seconds)
17:49:34*nsf joined #nim
17:50:14PMunchhttps://github.com/nim-lang/Nim/issues/9627
17:54:47FromGitter<tim-st> PMunch: Do you need a proc `proc convert*(kind: TNodeKind): SymbolKind =` ?
17:55:32PMunchtim-st, I've created one based on https://github.com/pragmagic/vscode-nim/blob/master/src/nimSuggest.ts#L44
17:55:45PMunchBut if you can do better I'm happy to accept it :)
17:56:06FromGitter<tim-st> where is your version?
17:56:37PMunchI forgot to upload it, just a sec
17:56:57FromGitter<tim-st> ok, thanks :)
18:00:01PMunchThere
18:00:13PMunchsrc/nimlsppkg/mappings.nim in the repo
18:01:27FromGitter<tim-st> Thanks
18:07:00*druonysus quit (Quit: http://quassel-irc.org - Chat comfortably. Anywhere.)
18:07:18*druonysus joined #nim
18:07:18*druonysus quit (Changing host)
18:07:18*druonysus joined #nim
18:08:27*theelous3 quit (Ping timeout: 240 seconds)
18:09:46FromGitter<kdheepak> Okay after much trial and error I got it working!
18:10:19FromGitter<kdheepak> I can now compile a nim file and run it on a ios simulator!
18:10:31FromGitter<kdheepak> Next to try an ios device itself.
18:11:30PMunchkdheepak, oh cool! Make sure to document how you do it ;)
18:20:21*Sembei joined #nim
18:20:40*Pisuke quit (Ping timeout: 244 seconds)
18:22:24*stevenfx joined #nim
18:25:06FromGitter<kdheepak> Yes. Will do!
18:25:16*yonson quit (Quit: WeeChat 2.3)
18:25:27FromGitter<kdheepak> I am planning to start a brand new project and try to make everything work again.
18:25:47FromGitter<kdheepak> That'll allow me to write down the minimum steps required.
18:37:36*dom96_w quit (Ping timeout: 250 seconds)
18:38:12Araqkdheepak: yeah, please.
18:39:04FromGitter<kdheepak> I'll do that. Although I will say that @yglukhov has already done everything.
18:39:41FromGitter<kdheepak> From the looks of it, I think getting nimx to work on ios is the only missing piece.
18:40:21FromGitter<kdheepak> Whatever I write up will be nim + SDL as opposed to using nimx.
18:41:21FromGitter<kdheepak> And will likely not be required once nimx works with ios.
18:45:36*stevenfx quit (Quit: stevenfx)
18:58:33*natrys joined #nim
18:58:42martin1_o/ all! new to the whole nim world, pretty exciting.. quick question, is there some sort of `ast` lib to parse code into an ast ?
18:59:13shashlickcheck out the macros module and dumpAst I guess
19:02:52FromGitter<kdheepak> ( followup: works on the ipad as well! )
19:04:51*Aareon_ quit (Ping timeout: 260 seconds)
19:05:17*Aareon_ joined #nim
19:07:58*gmpreussner quit (Ping timeout: 245 seconds)
19:10:27*gmpreussner joined #nim
19:26:26*Vladar quit (Remote host closed the connection)
19:57:36*platoff joined #nim
19:58:14FromGitter<zacharycarter> for those of you who use emacs - do you recommend any starter kits? like spacemacs or prelude or anything like that?
20:00:19FromGitter<zacharycarter> I'll just start with vanilla to play around with
20:00:36PMunchDon't use Emacs myself, but I've heard good things about Spacemacs
20:05:33FromGitter<rayman22201> @kaushalmodi is the person to ask about emacs, when he is online.
20:06:40PMunchHow is Nim support in Emacs at the moment by the way?
20:06:49PMunchI know it's one of the four semi-officially supported ones
20:09:02FromGitter<rayman22201> I'm a Vim guy, but there are several active Nim users who use Emacs very successfully.
20:09:17FromGitter<rayman22201> I can't give a more specific answer than that. sorry lol
20:09:40FromGitter<zacharycarter> I like Vim / Kak - but I plan on moving to windows
20:10:23PMunchI like the idea of Kak, but I've spent so much time configuring Vim that it's hard to move on
20:11:06benjikunI still use vim on windows, sometimes vscode
20:11:13FromGitter<rayman22201> You don't want VSCode @zacharycarter?
20:11:29benjikuntextadept/joe/vim/vscode, they all work for me
20:11:37FromGitter<rayman22201> since Araq uses VSCode, it's probably the best supported editor for Windows.
20:12:09*theelous3_ joined #nim
20:13:32martin1_speaking of editors.. what are you guys using for vim? I found zah/nim.vim, is that the best option currently?
20:13:47FromGitter<zacharycarter> @rayman22201 - not really
20:14:14FromGitter<zacharycarter> I hate VS Code to be honest
20:14:18martin1_and also.. is there some attempt of lsp implementation?
20:14:44FromGitter<zacharycarter> you start installing plugins - pretty soon it's leaking everywhere and your plugins are breaking one another
20:14:48FromGitter<rayman22201> yes. lsp is being actively worked on atm. It's not quite ready for prime time though
20:14:50FromGitter<zacharycarter> it's a mess
20:15:16FromGitter<zacharycarter> not to mention, ootb, it has a large memory footprint
20:15:32FromGitter<rayman22201> @zacharycarter I empathize.... VSCode is a giant bloat monster
20:15:42PMunchmartin1_, literally working on LSP as we speak
20:15:47PMunchIt's coming along pretty nicely
20:15:55PMunchHave suggestions and hover support already
20:16:14FromGitter<rayman22201> @PMunch yay! *cheers you on*
20:16:21martin1_PMunch: is that open to contributions yet? it feels like a nice way to get to know the language while contributing to the community
20:16:54PMunchmartin1_, yes all contributions welcome: https://github.com/PMunch/nimlsp/issues
20:17:02martin1_awesome!
20:18:55benjikunwhat is LSP?
20:19:12PMunchAnd rayman22201, it's actually surprisingly useable at the moment
20:19:20PMunchbenjikun, Language Server Protocol
20:19:38PMunchBasically a common protocol for editors <-> language understanding
20:19:45benjikunoh I see
20:19:50FromGitter<rayman22201> oh good. I knew it was being worked on, but I wasn't sure how far along it was. This is good news
20:20:12PMunchSo instead of implementing a plugin for each editor/language combination you develop one LSP client for each editor, and an LSP server for each language
20:20:46benjikunsounds cool
20:20:52PMunchSo with the LSP server for Nim you will be able to use any editor with a LSP client plugin and get pretty much the same experience
20:21:17benjikundam that's nice
20:21:35PMunchrayman22201, I got the first parts of suggestions working over the weekend, so you're excused for not knowing about it yet :P
20:21:54PMunchbenjikun, yea it's a pretty neat idea
20:22:01PMunchThe protocol is pretty messy though..
20:22:26PMunchLike all data is transferred as UTF-8, but the offsets are given in UTF-16 code-units..
20:22:44FromGitter<arnetheduck> +1 - nice, @PMunch
20:28:56dom96Nice indeed :)
20:30:39dom96Should really give your template arguments types: https://github.com/PMunch/nimlsp/blob/master/src/nimlsp.nim#L39
20:31:06PMunchI was wondering about that
20:31:11PMunchI've seen it both with and without
20:31:18PMunchI thought without was preferred
20:31:34dom96:'(
20:31:44dom96Why do we even allow it without? :(
20:31:57dom96Actually, I wonder why you need this template
20:32:04dom96Where is `isValid` defined?
20:34:05PMunchIn jsonschema
20:34:24PMunchIt validates the schema of the JSON objects
20:35:04PMunchAnd whenValid casts them to the distinct type, which has [] implemented with static[string] for compile time checking of field access
20:35:30PMunchSo if I mistype something it will complain as I compile it
20:35:48PMunchAnd it will return an option type if it's optional
20:36:13PMunchCurrently it only returns JsonNodes though, so second-level access is still unsafe
20:37:34dom96oh, ugh
20:37:37dom96You're including files
20:39:37PMunchHaha, yes
20:40:25PMunchI'm including messages2 (I'm renaming this soon), which creates all the procedures. And I include mappings as it needs to know of some of those types
20:40:54dom96You shouldn't need `include`
20:42:44dom96Sorry, I'm too picky :P
20:43:27PMunchWell I wanted jsonschema to be able to be used within the same file without exporting it's fields
20:43:55PMunchLike here: https://github.com/PMunch/jsonschema/blob/master/tests/test1.nim
20:45:02PMunchIf you imported that module the different procedures generated by jsonschema would be hidden
20:45:28PMunchBut I didn't want to start nimlsp with the 700 line LSP specification
20:45:38PMunchSo I moved it into another file and included it
20:46:02PMunchAnd because it needs to be included I had to include mappings as well, otherwise they would be declared twice
20:47:35PMunchCould definitely be done without include (by eg. having a field for the jsonschema macro that can add or remove the export marker) but this was just easier..
20:47:55*nsf quit (Quit: WeeChat 2.3)
20:54:09PMunchOf course since packedjson didn't work I guess marshalling is on the table..
20:54:24PMunchNot sure how much performance I gain by doing it this way
20:57:53*Trustable quit (Remote host closed the connection)
21:06:06Araqwhat do you mean "packedjson didn't work" ?
21:06:35PMunchAraq, I get a segfault
21:06:43PMunchJust a sec
21:09:38PMunchhttps://github.com/PMunch/jsonschema/tree/packedjson
21:10:04PMunchThe tests/test1.nim fails with SIGSEGV: Illegal storage access. (Attempt to read from nil?)
21:14:53shashlick@zacharycarter: i tried spacemacs but its dog slow once you start using it
21:17:38*krux02_ is now known as krux02
21:29:20krux02shashlick: I use vanilla emacs, using it for Nim was dog slow as well, until I fixed the horrible syntax highlighting.
21:29:34krux02and nimsuggest I disabled as well, ferformance eater
21:30:02krux02and I disabled anything based on smie, that was not just slow but also broke automatically my code
21:30:55shashlickya i really liked helm
21:31:10shashlickanyway, seems like there's no decent nim support anywhere
21:31:24shashlickam now used to using the CLI for git so even vscode seems pointless
21:31:39*itschin quit (Ping timeout: 268 seconds)
21:31:41shashlickif it is just syntax highlighting and lint, vim works sufficiently
21:32:20PMunchshashlick, soon Vim will get better support via LSP :)
21:32:50PMunchWell, many editors will get better support
21:33:27shashlickvscode pissed me off when i dragged a folder of nim projects as a workspace
21:33:50shashlickran hundreds of git processes, nim check, suggest and what not
21:34:59dom96I always use git through CLI
21:35:12dom96Don't see why that would make VS Code pointless
21:36:56shashlickwell, there's just highlight and lint, no suggest, and i don't use git there anymore
21:37:05shashlickplus it cannot handle complex workspaces
21:37:10shashlickthat's basically vim
21:37:42*kapil____ quit (Quit: Connection closed for inactivity)
21:41:31dom96Except it's better than Vim :P
21:41:46benjikunWhy exactly?
21:41:48dom96i.e. I don't have to re-learn how copy and paste works
21:41:57shashlickthat I agree 😄
21:42:01shashlicki still don't get it
21:42:15PMunchHaha, but Vims copy and paste is sooo much better once you get used to it :)
21:42:19benjikunye
21:42:22benjikunit's not that complicated
21:42:52PMunchI remember I found that annoying as well when I started out, but now I'm just annoyed whenever I don't have it
21:45:06dom96I gave Vim a chance for 1 month
21:45:11dom96Printed a cheat sheet
21:45:18dom96And gave it a proper chance
21:45:22dom96Couldn't handle it
21:45:26benjikunfair enough
21:45:27enthus1astmulticursor is so much more convenient than vim macros, and withouth cryptic syntax
21:45:42dom96I hated it so much that I wrote my own IDE
21:45:51PMunchenthus1ast, yeah I have a multi-cursor plugin for Vim
21:45:52shashlicki keep going back to vim, minimal memory usage, available everywhere
21:46:01PMunchOnce I got used to that I couldn't live without it
21:46:11PMunchshashlick, and that battery performance :)
21:46:13shashlickbut hate the useless out of the box deal
21:46:29PMunchdom96, Aporia?
21:46:33*d10n-work joined #nim
21:46:52enthus1asti know there is one PMunch but the one i tried was too stupid
21:47:21dom96PMunch: What else?
21:47:25PMunchI use terryma/vim-multiple-cursors
21:47:36PMunchdom96, I was just wondering if you had written another editor
21:47:38shashlickan editor should just work and be ready - not have to spend hours getting it to work
21:48:24shashlickfelt spacemacs was cool but unusable once loaded - i'm using a 1 year old high end laptop that too
21:48:40shashlickso am using spacevim for now
21:48:53PMunchWell, I see an editor as a toolbox. I need to see which tools I like and what fits for me, and add those to my toolbox. Having a toolbox full of tools I never use just means I'll be lugging it around for no reason.
21:50:10PMunchSo I spend some time setting up my editor with the plugins and mappings that works for me, and I've got a sorta sleek experience that's tailored to me. Without a bunch of extra stuff I never use taking up a lot of "weight" in my "toolbox".
21:50:29PMunchHmm, that analogy turned out to be much more apt than I had expected :P
21:51:28shashlickyep and that's why i came up with vire - https://github.com/genotrance/vire
21:52:22enthus1astand that is one problem of vim, that i have to read pages of text to just install a plugin mananger
21:53:02benjikunyou don't
21:53:11PMunchOh yeah, I'm not saying that Vim is perfect. It's definitely showing it's age
21:53:37PMunchI really wanted to get into kakoune, but last I tried it I was just missing some features
21:53:58benjikunyeah kakoune seems nice
21:54:10PMunchMight have to try it out again
21:54:45benjikunhave you seen textadept?
21:55:56PMunchHmm, nope
21:56:37shashlickkakoune doesn't work on windows
21:56:48shashlicktextadept didn't work for me for nim
21:57:09benjikunyeah I kinda doubt nim highlighting is supported
21:57:14benjikuntoo small of an editor and language
21:57:38benjikunhttps://github.com/xomachine/textadept-nim
21:57:39benjikunthere's this
21:57:50benjikun>development suspended though
21:58:01PMunchtextadept seems to have a LSP plugin :)
21:58:13benjikunaha
21:58:51shashlickhttps://github.com/xomachine/textadept-nim/issues/5
21:58:55*narimiran quit (Remote host closed the connection)
21:59:16benjikundang
21:59:24benjikunLSP would be the solution then
21:59:25benjikunig
22:00:05FromGitter<zacharycarter> shashlick: can I ask you a couple of nimgen related questions?
22:00:11shashlicksure
22:00:20shashlickand also interested in your experience, feedback
22:00:54FromGitter<zacharycarter> I think expanded documentation / tutorials would be extremely useful - but other than that it was easy to use
22:01:42FromGitter<zacharycarter> let me create a gist of the project's config and what I had to change to get it working
22:04:33enthus1asti'm fighting with an async in a thread example, does one have a tip where my big mistake is? It works for a few http request then crashes, it crashes faster in release, but not crashes withouth gc :/ https://gist.github.com/enthus1ast/c3b3b0af48144d0a198d6bd0907c9640
22:06:15FromGitter<zacharycarter> shashlick: https://gist.github.com/zacharycarter/20c34bdecca24ecab2da20402b88168e
22:06:42FromGitter<zacharycarter> actually the docs are probably good enough
22:07:23FromGitter<zacharycarter> but some textual tutorials explaining walking through some of the examples you've already done I think would help a lot of new users
22:07:43FromGitter<zacharycarter> overall though - I think you've done an awesome job
22:07:56FromGitter<zacharycarter> and I think even without that, it's great and works very well
22:09:15shashlickThanks - ya I've been thinking about a tutorial or video or something
22:09:53FromGitter<zacharycarter> I think a nice markdown document would be wonderful
22:09:59FromGitter<zacharycarter> but I'm a sucker for text tutorials
22:10:17shashlickCool so what's the question
22:10:32shashlickYou could merge all those pragma into one
22:11:03FromGitter<zacharycarter> I added two small files to that gist titled problem1.nim and problem2.nim
22:11:51FromGitter<zacharycarter> problem 1 is - there's a weird forward declaration thing - `discard "forward decl of FastNoiseVectorSet"` and then where the type is defined
22:12:13FromGitter<zacharycarter> it has all this initialization code ⏎ ⏎ ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=5be0c03c7c6c9e5df2120126]
22:12:58FromGitter<zacharycarter> problem two is - there are some proc parameters with the name `_size` - I'm guessing I can just use the search and replace functionality you've added to name them something like `sz` or whatever
22:30:27shashlickBrb
22:32:49FromGitter<mratsim> please not `sz`
22:34:56FromGitter<zacharycarter> haha
22:35:45*vlad1777d joined #nim
22:36:16FromGitter<zacharycarter> if I can use the word size I will if not I'll figure out something else - I wasn't trying to take a lot of time to think about it in the moment
22:36:23FromGitter<zacharycarter> I was just using what I had plugged in to get it to compile
22:36:55FromGitter<zacharycarter> here's the project btw - https://github.com/zacharycarter/cacophony - in case you want to run nimgen on it
22:44:54PMunchUpdate the docs to show how to use nimlsp with Sublime: https://github.com/PMunch/nimlsp, and updated the table to show the progress
22:45:28FromGitter<zacharycarter> schweeet
22:46:25*zachk joined #nim
22:48:03PMunchIf anyone wants to try it out I'd be happy to see some feedback :)
22:48:16*zachk quit (Changing host)
22:48:16*zachk joined #nim
22:49:56PMunchIt seems to work pretty well in the small tests I've tried. It's able to show the location and signature of procedures and types when you hover over them. It will show auto-completions while typing, and it can go to definition or list all occurrences from the hover meny
22:55:25shashlick@zacharycarter: the forward declaration is what c2nim puts when you have a struct XYZ; and implementation elsewhere or later
22:55:37shashlicki usually have to replace them with an object in generated nim
22:55:55*PMunch quit (Remote host closed the connection)
22:55:57shashlickin other cases (nimgraphql for example), need to collect all types together at the top so that forward declarations are not required
22:56:35shashlickfor _size, you can do a search/replace with the correct data type
22:57:33shashlickactually, _size is the var name, just replace with size
22:57:57shashlickhttps://github.com/Auburns/FastNoiseSIMD/blob/master/FastNoiseSIMD/FastNoiseSIMD.h#L99 <= this is the forward declaration
22:58:27shashlickit is used before declaration on line 332
22:58:44shashlickwhat you can do is use the regex/move operation to move the declaration at the top
22:58:49shashlicknimgraphql is a good example
22:58:55shashlickhope that helps
23:09:32*natrys quit (Quit: natrys)
23:10:06FromGitter<zacharycarter> thank you shashlick! it does! going to work on those now
23:11:56*krux02 quit (Remote host closed the connection)
23:11:56*theelous3_ quit (Ping timeout: 272 seconds)
23:18:52shashlick👍
23:41:08FromGitter<kaushalmodi> @PMunch I code Nim in Emacs. You had a question?
23:55:29*elrood quit (Remote host closed the connection)