<< 24-05-2020 >>

00:00:01*junland quit (Quit: %ZNC Disconnected%)
00:00:41*junland joined #nim
00:00:42Yardanico@Synth can you show a code sample?
00:01:05FromDiscord<Synth> sent a code paste, see http://ix.io/2naO
00:01:26FromDiscord<Synth> sent a code paste, see http://ix.io/2naP
00:02:41Yardanicowhat's the error?
00:02:50Yardanicoand what type is "pass_length" ?
00:05:15FromDiscord<Synth> ```nim↵let pass_length = sizeof(password)↵```
00:05:27FromDiscord<Synth> Error is: `Error: unhandled exception: index 4 not in 0 .. 3 [IndexError]`
00:05:43Yardanicowhat is sizeof password
00:05:47Yardanicothat's now the way to get the length of the string
00:05:48FromDiscord<Synth> So the index is out of range due to this: https://discordapp.com/channels/371759389889003530/371759389889003532/713904445787996271not resetting `pass_index` back to 0
00:05:57FromDiscord<Synth> (edit) 'https://discordapp.com/channels/371759389889003530/371759389889003532/713904445787996271not' => 'https://discordapp.com/channels/371759389889003530/371759389889003532/713904445787996271 not'
00:06:03Yardanicolength of the string is len(password)
00:06:25FromDiscord<Synth> Oh thank you
00:06:28Yardanicoand to be able to index it you need something like
00:06:32FromDiscord<Synth> Wow, that fixed it
00:06:35Yardanico"let maxIdx = len(password) - 1"
00:06:37Yardanicoyeah
00:06:43FromDiscord<Synth> I'm sorry, I'm used to C haha
00:06:45Yardanicosizeof gives you the size of the structure in bytes
00:06:51FromDiscord<Synth> I see
00:16:25*Guest8810 quit (Ping timeout: 264 seconds)
00:18:52shashlickDo many of you use Conan? https://conan.io/
00:22:32*dadada joined #nim
00:22:55*dadada is now known as Guest64291
00:32:44FromGitter<bung87> seem large code base nimlsp will not work
00:33:33FromGitter<bung87> also in some case nimsuggest code will throw error
00:45:52*Guest64291 quit (Ping timeout: 246 seconds)
00:51:03*konvertex quit (Quit: quit)
00:52:33*dadada__ joined #nim
01:00:14*lritter quit (Ping timeout: 240 seconds)
01:01:08*lritter joined #nim
01:14:08*krux02_ quit (Remote host closed the connection)
01:16:25*dadada__ quit (Ping timeout: 265 seconds)
01:22:36*dadada joined #nim
01:23:00*dadada is now known as Guest83630
01:25:22*chemist69 quit (Ping timeout: 260 seconds)
01:27:01*chemist69 joined #nim
01:30:34*zacharycarter quit (Ping timeout: 256 seconds)
01:39:02leorize[m]bung87 it depends
01:39:31leorize[m]though if you work with the stdlib I can assure that it will crash 40% of the time
01:42:47*zacharycarter joined #nim
01:43:03*nphg joined #nim
01:45:22*nphg1 quit (Ping timeout: 256 seconds)
01:46:25*Guest83630 quit (Ping timeout: 264 seconds)
01:48:40FromGitter<bung87> yeah , I debug on nimslp, which contains submodule whole nim source.
01:48:48*lritter quit (Ping timeout: 265 seconds)
01:49:43FromGitter<bung87> I even create a new thread in nimlsp for stdin, thought may not helpful.
01:52:19FromGitter<bung87> other small project just works fine
01:52:37*dadada__ joined #nim
02:01:28*zacharycarter quit (Ping timeout: 246 seconds)
02:15:40*gxt__ quit (Remote host closed the connection)
02:16:25*dadada__ quit (Ping timeout: 264 seconds)
02:22:29*gxt__ joined #nim
02:22:35*dadada joined #nim
02:23:00*dadada is now known as Guest88049
02:29:50*zacharycarter joined #nim
02:33:22*muffindrake quit (Ping timeout: 260 seconds)
02:35:31*muffindrake joined #nim
02:37:39*zacharycarter quit (Ping timeout: 256 seconds)
02:46:25*Guest88049 quit (Ping timeout: 264 seconds)
02:52:39*dadada__ joined #nim
03:16:22*dadada__ quit (Ping timeout: 258 seconds)
03:17:44*fredrikhr quit (Ping timeout: 256 seconds)
03:22:36*dadada joined #nim
03:23:00*dadada is now known as Guest41507
03:25:52*chemist69 quit (Ping timeout: 260 seconds)
03:26:25*thomasross quit (Remote host closed the connection)
03:26:37*chemist69 joined #nim
03:26:47*thomasross joined #nim
03:27:57*Senketsu quit (Ping timeout: 272 seconds)
03:40:02FromDiscord<Technisha Circuit> Would it be a good idea to implement a transpiler instead of an ast?
03:40:14FromDiscord<Technisha Circuit> Because I'm replicating Python
03:40:24FromDiscord<Technisha Circuit> And I can't use `__` in names
03:40:30FromDiscord<Technisha Circuit> Which is required for the builtins
03:40:36Yardanicouse backticks
03:40:53FromDiscord<Technisha Circuit> I thought i tried that, but lemme try again
03:40:57Yardanicoah nvm yeah
03:41:04Yardanicobut it's better if you do something like py2nim, yeah
03:46:32*Guest41507 quit (Ping timeout: 260 seconds)
03:52:38*dadada__ joined #nim
04:04:17*silvernode joined #nim
04:05:29silvernodeGood morning
04:06:02*supakeen quit (Quit: WeeChat 1.9.1)
04:06:43*supakeen joined #nim
04:16:13*dadada__ quit (Ping timeout: 265 seconds)
04:17:50*thomasross quit (Remote host closed the connection)
04:18:14*thomasross joined #nim
04:19:17silvernodeSo in python, it is encouraged to put a header at the top of a function definition that describes what the function purpose is. Is there a a way to do this with procs in Nim?
04:19:44leorizeyes
04:22:36*dadada joined #nim
04:22:43silvernodeleorize, I have not noticed any examples in Nim documentation so I am wondering if I overlooked it.
04:23:00*dadada is now known as Guest2584
04:23:26silvernodeMy guess is that it is the same in Nim as in python
04:23:48leorizesee documentation comments in the manual
04:24:33leorizeoh wait we have literally zero example on the manual for this
04:25:04leorizehttps://github.com/nim-lang/Nim/blob/devel/lib/pure/collections/sequtils.nim
04:25:06silvernodeinteresting
04:25:23leorizesee that module, it's one of the heavily documented one
04:26:08silvernodeit looks like all I have to do is: ## my proc description here
04:28:47*waleee-cl quit (Quit: Connection closed for inactivity)
04:39:25*thomasross quit (Remote host closed the connection)
04:39:47*thomasross joined #nim
04:46:42*Guest2584 quit (Ping timeout: 256 seconds)
04:51:55*silvernode quit (Ping timeout: 246 seconds)
04:52:40*dadada__ joined #nim
04:53:48*dddddd quit (Ping timeout: 272 seconds)
05:16:19*dadada__ quit (Ping timeout: 256 seconds)
05:22:38*dadada joined #nim
05:23:02*dadada is now known as Guest62569
05:46:02FromDiscord<Rika> yes
05:46:14*Guest62569 quit (Ping timeout: 240 seconds)
05:46:27FromDiscord<Rika> theyre also technically better since theyre not just "strings put at the start of a function"
05:46:36*thomasross quit (Ping timeout: 265 seconds)
05:52:36*dadada__ joined #nim
05:54:55*audiofile quit (Quit: Going offline, see ya! (www.adiirc.com))
05:54:58Araqhttps://github.com/nim-lang/RFCs/issues/230
05:57:54Araqdon't downvote if you don't understand it, it's a detail
06:02:31*solitudesf joined #nim
06:16:16*dadada__ quit (Ping timeout: 246 seconds)
06:18:22*solitudesf quit (Quit: Leaving)
06:22:37*dadada joined #nim
06:23:00*dadada is now known as Guest92797
06:41:36*xet7 joined #nim
06:46:25*solitudesf joined #nim
06:47:10*Guest92797 quit (Ping timeout: 272 seconds)
06:52:40*dadada__ joined #nim
07:05:35FromDiscord<Yardanico> Oh wow I'm actually impressed https://play.nim-lang.org/#ix=2nc2 works, that might help me in doing a proper tdlib wrapper in nim
07:07:32*opal quit (Remote host closed the connection)
07:07:48*opal joined #nim
07:16:43FromDiscord<Yardanico> Ah nvm, not really because case object branches can't share same names so I'll have to rename them and then do some json parsing without .to
07:16:52*dadada__ quit (Ping timeout: 256 seconds)
07:16:55FromDiscord<Yardanico> *.to
07:22:36*dadada joined #nim
07:22:59*dadada is now known as Guest46640
07:30:39*letto quit (Read error: Connection reset by peer)
07:32:32*letto joined #nim
07:33:18PrestigeWhat's the typical way to treat something as a particular type of it is type checked? just wrap with CheckedType(myObj).doSomething()?
07:33:37Prestigetype if it*
07:37:03*konvertex joined #nim
07:40:17Araqyes
07:43:38*neceve joined #nim
07:43:51*tdc joined #nim
07:44:57PrestigeThanks
07:46:42*Guest46640 quit (Ping timeout: 272 seconds)
07:52:34*dadada__ joined #nim
07:56:56PrestigeHow can I check if an object is a "subclass" of another? Where I have type B = ref object of A, I was trying to see if foo: A is really of type B
07:57:13PrestigeLooks like foo.type comes back as A even though it was initialized as B
08:02:43PrestigeShort example: https://play.nim-lang.org/#ix=2nce
08:06:20FromDiscord<Elegant Beef> https://play.nim-lang.org/#ix=2ncf
08:06:36FromDiscord<Elegant Beef> https://nim-lang.org/docs/tut2.html#object-oriented-programming
08:07:16PrestigeAh Beef I love you, thanks
08:07:23FromDiscord<Elegant Beef> Lol no problem
08:07:56disrupteksee the `is` keyword
08:08:26FromDiscord<Elegant Beef> is returns false in that case
08:08:45FromDiscord<Elegant Beef> Since it's stored as the root type
08:08:47PrestigeYeah, I tried is but didn't think about of
08:11:20disruptekuse `typeof` versus `type`.
08:16:19*dadada__ quit (Ping timeout: 246 seconds)
08:22:36*dadada joined #nim
08:23:00*dadada is now known as Guest81669
08:46:53*Guest81669 quit (Ping timeout: 265 seconds)
08:52:41*dadada__ joined #nim
09:10:11Zevvmoin folks
09:13:13FromDiscord<Rika> moin moin
09:14:49Prestigeo/
09:16:14*dadada__ quit (Ping timeout: 240 seconds)
09:17:04ZevvAraq: I do understand the RFC but I feel the warning might raise a lot of questions for the average user. "to avoid what?"
09:18:10ZevvIts pretty cryptic as it is now.
09:19:48FromDiscord<dom96> Anyone interested in testing my new Nim game: https://discord.gg/vBhuZj 🙂
09:20:29Zevvlike, what is an *observable*? its not someting that is defined in the manual
09:22:38*dadada__ joined #nim
09:46:24*dadada__ quit (Ping timeout: 256 seconds)
09:52:38*dadada joined #nim
09:53:01*dadada is now known as Guest13333
10:23:57FromGitter<matrixbot> `Asbjørn Olling` Hi friends - newbie question: ⏎ if I want to implement the `in` operator for my custom type, how should I do that? ⏎ Basically I want to be able to do ⏎ ⏎ ```let b: bool = node in graph``` [https://gitter.im/nim-lang/Nim?at=5eca4b3db101510b201362aa]
10:24:30FromGitter<matrixbot> `Asbjørn Olling` my google-ing comes up short, I guess "in" is a pretty seo-unfriendly word ;)
10:27:12alehander92iirc contains
10:27:25alehander92is equivalent to it: i might be wrong
10:27:56*dddddd joined #nim
10:30:55*Guest13333 is now known as dadada
10:56:05FromGitter<bung87> I found on windows bin dir contains shell scripts not exe..
10:57:46FromGitter<matrixbot> `Asbjørn Olling` > <@gitter_fromirc:matrix.org> *<alehander92>* iirc contains ⏎ ⏎ thanks!
10:58:13*liblq-dev joined #nim
11:12:48FromDiscord<Synth> Hello, I'm trying to convert a `seq[char]` into a string... is anyone able to help me?
11:13:03FromDiscord<Synth> I know it's a noobish question and I apologize
11:14:58FromDiscord<Rika> there's always the `import sequtils; let theString = theSeq.foldl(a & b, "")` or something
11:15:44FromGitter<matrixbot> `Asbjørn Olling` you can use `join` from strutils
11:15:46FromDiscord<Synth> Hmm alright, thank you!
11:16:14FromGitter<matrixbot> `Asbjørn Olling` `let mystr = mycharseq.join("")`
11:17:02FromDiscord<Synth> > `Asbjørn Olling` `let mystr = mycharseq.join("")`↵@matrixbot[Gitter]#0000 This worked, thank you!
11:17:02FromGitter<matrixbot> `Asbjørn Olling` actually it works even without the empty string to join on- then it just defaults to empty string
11:17:05FromGitter<matrixbot> `Asbjørn Olling` so `mycharseq.join()` should be enough
11:17:11FromDiscord<Synth> Thanks!
11:17:37FromGitter<matrixbot> `Asbjørn Olling` nw :3
11:20:06FromDiscord<Rika> oh that makes sense, i forgot join existed
11:21:56*Hideki joined #nim
11:22:19*Hideki is now known as Guest28271
11:39:36FromDiscord<Synth> I'm sorry for asking again, but how can I convert a string into an int?
11:40:11FromDiscord<Synth> for example:↵```nim↵const variable: int = toInt("1")↵```
11:40:21FromDiscord<Synth> I know the above code is wrong, but something as such
11:40:29FromDiscord<Recruit_main707> parseInt iirc
11:40:36FromDiscord<Synth> Ohh right
11:40:36FromDiscord<Recruit_main707> its from the strutils module
11:40:37FromDiscord<Synth> Thank you!
11:54:06FromDiscord<Synth> I'm sorry, but one more question ;-;
11:54:20FromDiscord<Synth> Is there a way I can measure the time it took to execute part of a code?
11:54:35FromDiscord<Synth> For example, I want to measure how long it took for this for loop to end
11:54:39FromDiscord<Recruit_main707> std/monotimes
11:54:58FromDiscord<Recruit_main707> https://nim-lang.github.io/Nim/monotimes.html
11:55:06FromDiscord<Rika> let start = getMonoTime(); do stuff; echo getMonoTime() - start
11:55:37FromDiscord<Synth> Ohh thank you
12:00:53FromDiscord<Zed> what's the matrix bot connected to?
12:01:06FromDiscord<Rika> uh
12:01:06*hsh quit (Quit: Connection closed for inactivity)
12:01:07FromDiscord<Rika> matrix
12:01:21FromDiscord<Zed> ?
12:01:45FromDiscord<Recruit_main707> irc i think
12:02:03FromDiscord<Recruit_main707> wasnt matrix irc in fact?
12:02:56FromDiscord<Rika> matrix bot is bridging irc and matrix is it not
12:03:05FromDiscord<Rika> ah no
12:03:08FromDiscord<Rika> matrix and gitter
12:03:17FromDiscord<Zed> what is matrix?
12:03:31FromDiscord<Rika> another protocol
12:04:33FromDiscord<Zed> Well TIL
12:06:02*supakeen quit (Quit: WeeChat 1.9.1)
12:06:44*supakeen joined #nim
12:17:28*fredrikhr joined #nim
12:18:06*krux02 joined #nim
12:18:53FromGitter<gogolxdong> Anyone got interested in working with QUIC/AI/Web frontend in Nim? We are employing, based in Shenzhen China. I know it's limited because of covd19, anyone who can help all over the world is appreciated and rewarded.
12:49:25*dadada quit (Ping timeout: 264 seconds)
12:50:21FromGitter<gogolxdong> I'm helping a company which got its big datacenter infrastructure venture capital ,because it's one of the new infrastructure seven domain presents in nation whitepaper to boost economy in the next decade, to get back on the top list of FileCoin mining first, then to develop its own distributed storage, any practical help will be appreciated and rewarded. You name it and price it.
12:50:49*dadada joined #nim
12:51:12*dadada is now known as Guest51080
13:08:47FromDiscord<gour> hello, if i'd do a gui desktop project in nim (using wxnim/nigui/nimx...) and have to include 3rd party C lib, generating nim bindings with c2nim, have doc-toolchain (building epub/html/pdf manuals) using rst/asciidoc markup...can Nim's build packager handle all these or it's recommended to use some specialized build system (which one?) ?
13:09:11*Guest28271 quit ()
13:16:35*hvn joined #nim
13:16:44shashlick@gour checkout nimterop
13:16:49*hvn left #nim (#nim)
13:19:07*nuxdie quit (Ping timeout: 260 seconds)
13:21:05*msmorgan quit (Ping timeout: 246 seconds)
13:24:53*nuxdie joined #nim
13:25:47*nuxdie quit (Max SendQ exceeded)
13:26:41FromDiscord<Recruit_main707> whats the difference between pointer and void?
13:27:10FromDiscord<Rika> ???
13:27:34FromDiscord<Rika> arent the differences pretty obvious or something or am i an idiot
13:28:07FromDiscord<Recruit_main707> ive heard pointer was just like c's void, but we also have void
13:28:16liblq-devno
13:28:17FromDiscord<gour> shashlick: thanks
13:28:30liblq-dev@Recruit_main707 Nim `pointer` == C `void *`
13:28:35liblq-devnot C `void`
13:28:40FromDiscord<Recruit_main707> ok
13:28:44FromDiscord<Recruit_main707> thanks
13:30:49*msmorgan joined #nim
13:31:04*nuxdie joined #nim
13:31:57FromGitter<matrixbot> `Asbjørn Olling` Question regarding the `tables` module: ⏎ does anyone know how to best merge two tables? it looks like `CountTable` has a `merge` function, but I don't see one for regular tables. ⏎ Seems a bit silly to do manually
13:33:43FromDiscord<Rika> it kinda makes sense for count tables
13:33:59FromDiscord<Rika> for regular tables, what would happen if a duplicate key exists?
13:35:46Zevvnim tabls allow duplicate keys
13:35:52FromGitter<matrixbot> `Asbjørn Olling` I guess regular tables support multiple entries with the same key, so the logical result would be just having both?
13:35:57Zevvbut its confusing if you dont expect that
13:37:24FromGitter<matrixbot> `Asbjørn Olling` so it's not that I'm missing anything obvious here - there just isn't a function for merging regular tables?
13:37:36FromGitter<matrixbot> `Asbjørn Olling` maybe I can do it with `collect` from the `sugar` module
13:38:34FromGitter<matrixbot> `Asbjørn Olling` (imo I think the `&` concatentation operator should be implemented for tables)
13:41:03FromDiscord<Rika> afaik it's an RFC to make duplicate keys not allowable or something not sure anymore
13:43:55*hvn joined #nim
13:51:31hvnhi all, I just discovered Nim yesterday, come from Python, I tried to replace our current python script with nim, the result is surprising that my naive nim version is slower, the script does scan about more than 20.000 text files under a directory using walkDirRec, on Python version, I was able to skip multiples dirs base on their name (e.g: .terraform in root), is it possile to do that with Nim or walkDirRec
13:51:37hvniterate over all the files? Thanks
13:52:19FromDiscord<Recruit_main707> have you compiled the code with -d:danger?
13:54:10FromDiscord<Rika> use -d:release, not danger
13:55:51FromDiscord<Recruit_main707> danger is faster, if you are still testing things release might be better
13:56:29FromDiscord<Rika> well its called danger for a reason
13:56:46FromDiscord<Rika> debug and release have much more of a difference than release and danger
13:57:19FromDiscord<Rika> anyone know if there's a compile-time `existsFile`?
13:57:27FromDiscord<Rika> `existsFile` by itself doesnt work on CT
14:00:26FromDiscord<Rika> nvm, changed my structure and i dont need `existsFile` anymore
14:01:28FromDiscord<Recruit_main707> https://media.discordapp.net/attachments/371759389889003532/714115852282101861/fetchimage.png
14:01:54*sz0 joined #nim
14:02:31*hvn left #nim (#nim)
14:02:47FromDiscord<Rika> lmao
14:03:08FromDiscord<Rika> hmm, interesting that you cannot nest "shortcut imports", the one with the ident/[ident, ident]
14:03:22FromDiscord<Rika> this isnt possible: ident/[ident, ident/[ident, ident]]
14:03:25FromDiscord<Rika> interesting
14:05:47liblq-devthere was a discussion on the forum about that, iirc
14:06:05liblq-devI wonder why this was never implemented
14:06:24FromDiscord<Rika> it's a syntax that's perfectly capable of being implemented isnt it
14:07:56liblq-devpretty much https://play.nim-lang.org/#ix=2ndV
14:13:27*waleee-cl joined #nim
14:25:35*silvernode joined #nim
14:26:33*abm joined #nim
14:34:19*zacharycarter joined #nim
14:34:38*Guest51080 is now known as dadada
14:35:15dadadaas I don't want to repeat work of others, I've to ask this, do we have any shorthand notation for result = someProc(); if someProc() != nil: return ???
14:35:36dadadasorry, I forgot something important
14:35:55dadadaresult = someProc(); if someProc() != nil; return result
14:36:02dadadas/;/:
14:36:43dadadareturnValueOfExpressionDependingOnValueOfExpression
14:37:36dadadaI couldn't come up with any really good name for a macro/template that does this, it's easy to confuse with this:
14:38:13dadadaif someOtherThingIsTrue(): return someProc()
14:38:48*zacharycarter quit (Ping timeout: 256 seconds)
14:43:38FromDiscord<exelotl> dadada: surely you don't want to execute someProc() twice?
14:44:02*filcuc joined #nim
14:44:07dadadaexelotl: of course, not, this was pseudo code, and in my actual code there's result trice
14:44:18*silvernode quit (Quit: Leaving)
14:45:49dadadatestedReturn is what I've come up with
14:46:27FromDiscord<exelotl> returnIfNotNil
14:46:34FromDiscord<exelotl> or something like that?
14:46:36dadadaexelotl: that was my first idea too
14:47:06dadadaexelotl: but then I would have to write returnIfNil and returnIfWhatever ... So I wanted a variant that works for all cases
14:48:32FromDiscord<exelotl> I don't think you really need a template/macro for this
14:48:40FromDiscord<exelotl> var x = foo()
14:48:42FromDiscord<exelotl> if x != nil: return
14:48:59FromDiscord<exelotl> it's pretty short and clear already
14:49:19dadadareturn x , I almost agree with you
14:49:26FromDiscord<exelotl> (oops yeah that should be return x)
14:49:52dadadabut imagine you have a proc with 4 if-returns like this closely together
14:50:10dadadawouldn't that look repetitive to you to see x there 3x4 = 12 times
14:50:14*filcuc quit (Ping timeout: 240 seconds)
14:50:30*filcuc joined #nim
14:50:37dadadait's not a real issue, it's debatable if such syntax sugar creates more confusion than it helps
14:58:16disruptekwhy do you resist block/break? it's great.
14:59:08dadadawell, I don't, who do you mean
14:59:21FromDiscord<exelotl> dadada: something like this? https://play.nim-lang.org/#ix=2ne9
14:59:26disruptekanyone that uses return.
15:00:38FromGitter<bung87> hi there
15:01:53dadadaexelotl: yes, only that the != nil check there is not dynamic
15:01:57FromGitter<bung87> https://github.com/PMunch/nimlsp/pull/49 when this merged, my vscode nim extension will work, I'v tested on my Mac And PC
15:01:59disbotfix debug echo hover suggestions index out of bound, initSuggest need unencoded path not encoded.
15:04:32FromGitter<bung87> @Generic pls wait and check
15:07:54Zevvdo it in color, people love color
15:12:00*endragor joined #nim
15:14:00*filcuc quit (Quit: Konversation terminated!)
15:15:02FromGitter<gour> niminst's manual (https://nim-lang.org/docs/niminst.html) says: "Later versions will support Linux' package management systems." does it mean creating rpm/deb/etc. packages? just wonder about binaries for Mac OS since "niminst is a tool to generate an installer for a Nim program...it can create an installer for Windows via Inno Setup " ?
15:16:09*theelous3 joined #nim
15:17:37FromGitter<gour> what would be required to have `nimlsp` working with SublimeText (https://github.com/sublimelsp/LSP) ?
15:19:54FromGitter<bung87> the extension using LSP protocol ,so it needs nimlsp as LSP server
15:20:09*solitudesf- joined #nim
15:20:13*solitudesf quit (Remote host closed the connection)
15:20:34*dddddd quit (Ping timeout: 240 seconds)
15:22:29FromGitter<gour> hmm...not 100% clear (yet)...Sublime's implementation of LSP does support several languages already, does it one another one is required to be written for Nim?
15:23:53FromGitter<bung87> usually LSP server write in their native language
15:24:56FromGitter<bung87> if someone implemented a vm in other language should work too
15:26:27FromGitter<bung87> basically LSP just a protocol. MS provide a node server and node client.
15:44:48*Trustable joined #nim
15:46:47*NimBot joined #nim
15:49:16FromDiscord<Generic> @bung87 thanks for the fix, I couldn't wait so I build it myself and it mostly works now
15:49:49FromGitter<bung87> yeah , that's the quick way, sounds good!
15:49:57*dadada quit (Ping timeout: 272 seconds)
15:49:58FromDiscord<Generic> except for goto definition which seems to suffer from a similar problem
15:50:04FromDiscord<Generic> with path encoding
15:50:29FromGitter<bung87> oh that could be, I just fix one case.
15:52:46*dadada joined #nim
15:53:09*dadada is now known as Guest92779
15:53:35Zevvhey disruptek
15:53:44disrupteksup dawg
15:53:51Zevvi fixed the nim parser: http://ix.io/2n99
15:54:02Zevvshould I put up a PR for that?
15:54:24disruptekyou're a bad person.
15:54:36FromGitter<deech> i like it
15:54:46Zevvme gusta
15:54:58disruptekdo you have an npeg for it?
15:55:01Zevvit still parses old 2020 nim
15:55:12Zevvno it's just the nim parser, but no longer broken
15:55:38disruptekwe had a curly skin in the past.
15:56:00disruptekwhat have you been up to, zevv?
15:56:23Zevvnot much, nim-wise
15:56:57Zevvmy day job kind of pulled me in over the last months, and I'm totally passive and bored when not working
15:57:00ZevvIt'll pass, I'm sure
15:57:17FromGitter<deech> hard same
15:57:49ZevvI totally dropped #nim for some weeks as well, but trying to keep up a bit now
15:57:57disrupteki got a weird bug that only exists in !-d:danger.
15:58:14disruptekalso, my arc code is ~5x faster than the same code in refc.
15:58:31Zevvit must be bad code, then
15:59:23Zevv(https://github.com/zevv/Nim/commit/a957a882ed055eb7b7ecb2a4f5d643b9a7271cab)
15:59:39Zevvwhere's your bug at
16:00:13disruptek~stream
16:00:14disbotstream: 11https://twitch.tv/disruptek (live video/audio) and mumble://uberalles.mumbl.io/ (live voice chat) -- disruptek
16:00:29Zevvlater maybe, time to put the soup on the table first
16:00:39disruptekwhat kinda soup?
16:00:57Zevvtomato mostly, and whatever-was-left-at-the-bottom-of-the-fridge
16:01:02Zevvcleanupsoup
16:01:42Zevvsome weird shaped foreign potatoes and other nameless tubers
16:02:20disruptekactually, it's about 6x faster in arc. and about 6x less variance in latency, too.
16:02:23Zevva chilli I took for a small pepper, with regrettable colateral damage to the eyes and genitals
16:02:37disruptekyou go for the balls first and then the eyes?
16:02:45disruptekjust like a woman.
16:02:48Zevvhurting balls make me cry
16:03:05disruptekwhat do you do with those peppers you pervert?
16:03:07Zevvanyway, diner time - <cursive>I'll be back</cursive>
16:03:44disrupteknamless tubers had some good albums, but their first is still their best work, imo.
16:09:36*shadwick joined #nim
16:18:27*Tlanger quit (Ping timeout: 260 seconds)
16:19:17*thomasross joined #nim
16:31:07liblq-devdoes `nim doc` include types/procs generated by macros?
16:31:36Yardanicoi think it does, although their field names might not be so pretty
16:31:40YardanicoI mean argument names
16:31:53liblq-devwell maybe it depends on whether you use genSym or not?
16:31:57liblq-devidk, I haven't tried
16:32:20liblq-devthe fields I'm generating are normally usable from other parts of my code
16:35:29*endragor quit (Remote host closed the connection)
16:37:03*konvertex quit (Quit: quit)
16:41:45*konvertex joined #nim
16:50:11*bung joined #nim
16:51:23*natrys joined #nim
16:51:31bunghi
16:54:27Yardanicohello bung
16:54:31Yardanicoare you bung87
16:54:56bunghi,am bung87, I just installed irssi
16:55:14Yardaniconice
16:56:51bungI finally know why people choose using irc ,feels fine.
16:57:14*abm quit (Remote host closed the connection)
16:57:42*abm joined #nim
17:07:18*shadwick quit (Remote host closed the connection)
17:21:25*abm quit (Remote host closed the connection)
17:21:51*abm joined #nim
17:22:50krux02bung: I still use hexchat. It works. Don't necessarily like it though.
17:23:05*lritter joined #nim
17:30:48*audiofile joined #nim
17:32:31*audiofile quit (Remote host closed the connection)
17:32:48bungfirst time heard hexchat,I tried colloguy today which also has gui, never make it work, so I found irssi on apple developer forum.
17:37:43*gangstacat quit (Quit: Ĝis!)
17:37:58exelotlI used hexchat for years, but IRC is not very nice on the days when you have bad internet
17:39:32exelotleventually I just stopped opening it because I could find all the interesting discussions I needed on discord. and not have to worry about missing parts of the conversaion, or having to be near a PC, etc.
17:40:13exelotlonly recently started running a Quassel instance on my VPS and now IRC is actually a decent experience
17:43:56bungoh ,I miss the mobile part, I'll try when I outside, theses days I always at my home.
17:51:04*gangstacat joined #nim
17:53:03*bung quit (Quit: Lost terminal)
18:03:16FromGitter<bung87> @Yardanico I guess when nimlsp fix the path encode decode things it should be more stable
18:04:34liblq-devwhy is :: a reserved token?
18:06:55FromGitter<bung87> guess for namespace ,module name
18:12:58*zacharycarter joined #nim
18:17:33*zacharycarter quit (Ping timeout: 256 seconds)
18:28:14*Vladar joined #nim
18:34:59YardanicoDoes anyone know if there's a way to get custom pragma annotations if I get passed a "typed" argument (a variable) in a macro? for example how to get check if there's a pragma for "arr" field here - https://play.nim-lang.org/#ix=2nf6
18:35:16YardanicoI tried with hasCustomPragma, but it's always false and I don't see pragma nodes in treeRepr
18:38:23planetis[m]yeah I know and its very cumbersome, you need to call hasCustomPragma macro from your macro
18:38:28Yardanicowell I tried
18:38:31Yardanicoit always returns false
18:38:42Yardanicoand with treeRepr I don't see jsonName pragma on arr field anyway
18:38:58Yardanicowhen I do treeRepr x.getTypeImpl()
18:39:19planetis[m]when https://github.com/nim-lang/Nim/pull/11526 is merge it will be better
18:39:20disbotgetCustomPragma is split up in more usable chunks
18:39:27Yardanicohow do I do it now though? :P
18:41:11Yardanicohmm I'll try looking at the src of that pr
18:44:38planetis[m]i got you: https://play.nim-lang.org/#ix=2nfe
18:46:05planetis[m]the last one, all the others output false for some reason...
18:46:06*Guest92779 quit (Ping timeout: 256 seconds)
18:47:11Yardanicoplanetis[m]: lol, thank you :P
18:48:11*Firegem joined #nim
18:52:38*dadada joined #nim
18:53:01*dadada is now known as Guest52665
19:01:02*abm quit (Remote host closed the connection)
19:01:07Yardanicoplanetis[m]: in the end I copied findPragmaExprForFieldSym from that PR
19:01:14Yardanicoand then just let pragma = findPragmaExprForFieldSym(fieldSym.owner.getImpl()[2][2], fieldSym)
19:01:22Yardanicoand check if it's nnkPragma or not, etc
19:01:29*abm joined #nim
19:03:50*brainbomb joined #nim
19:08:35planetis[m]sounds better than this
19:09:03Yardanicoplanetis[m]: yeah, I needed it to add custom field support for json.to (I need it to have json.to do all deserialization work with tdlib json objects for me)
19:09:08*brainbomb quit (Quit: Leaving.)
19:09:15Yardanicoso I can use case objects with different field names in nim side
19:09:20Yardanicobut they have same field name in json side
19:10:15Yardanicoonce that PR gets merged it'll be a relatively small change to json.to to make it understand custom pragma like {.jsonName: "nameOnJsonSide".}
19:10:31planetis[m]that could be very useful
19:10:51Yardanicothere is https://github.com/LemonBoy/jstin but it doesn't work for object variants since it's done with generics and fieldPairs and not a macro
19:34:10*dddddd joined #nim
19:46:22*Tlongir joined #nim
19:55:46*Guest52665 is now known as dadada
19:55:55dadadahi people
19:56:17Yardanicohi
19:56:28dadadais there a generalized term for proc/macro/template/func and anything like it, maybe even iterators
19:56:35Yardanicoroutine?
19:56:44Yardanicohttps://nim-lang.org/docs/macros.html#RoutineNodes
19:57:23dadadaoh kay
20:01:37*Firegem quit (Ping timeout: 260 seconds)
20:02:11*leorize is now known as leorize_m
20:02:18*leorize_m is now known as leorize
20:02:31*leorize is now known as leorize`mtx
20:02:36*leorize`mtx is now known as leorize
20:09:25*konvertex quit (Quit: quit)
20:11:57federico3are there examples of reading/writing nested, packed data structures using mmap?
20:23:41*Vladar quit (Quit: Leaving)
20:26:05*natrys quit (Quit: natrys)
20:34:03*tdc quit (Ping timeout: 258 seconds)
20:45:25*abm quit (Quit: Leaving)
20:51:56*Trustable quit (Remote host closed the connection)
21:11:39shashlickdom96: got time for a short review?
21:14:59Yardanicoshashlick: use @ to ping on discord, dom is usually in there nowadays :)
21:15:00Yardanico@dom96
21:16:14leorizeYardanico: try parsing the irc-style pings too? :)
21:16:22Yardanicoleorize: that's too ambiguous :)
21:16:29leorizeour gitter bridge currently do this
21:16:32Yardanicoor if you mean only on the start, then ok
21:16:45Yardanicolike if a message starts like "nick:msg"
21:16:53leorizeyea, seems fair
21:17:14Yardanicook ill try
21:17:19leorizeand when can I expect colors for the (edited) messages? :p
21:17:58shashlickhttps://binarybuilder.org/ and http://conan.io/
21:18:07Yardanicoit's not that useful since this channel has colors disabled anyway leorize
21:18:26leorizereally? disbot still show me colors
21:18:38Yardanicoah, colors maybe work
21:18:40Yardaniconot italics/bold
21:18:40leorizeexcept on offtopic
21:18:48leorize!repo ircord
21:18:50disbothttps://github.com/Yardanico/ircord -- 9ircord: 11Discord <-> IRC bridge in Nim 15 6⭐ 0🍴
21:18:50disruptekofftopic has no color but irc does.
21:18:52leorize^ bold too
21:18:54disrupteker, #nim
21:18:59FromDiscord<dom96> shashlick: just send me PR links
21:19:07Yardanicoleorize: ah right I confused this channel with offtopic
21:20:48shashlick@dom96 - https://github.com/dom96/choosenim/pull/201
21:20:50disbotFix #199 - missing dlls
21:23:29*solitudesf- quit (Ping timeout: 256 seconds)
21:24:54FromDiscord<dom96> Commented
21:26:22shashlick@dom96 - I replied to that comment in the original issu
21:26:29shashlickwhich is why I implemented it this way
21:26:31shashlickit is much simpler
21:27:37FromDiscord<dom96> meh, I need to think about it
21:27:43shashlickhttps://github.com/dom96/choosenim/issues/199#issuecomment-632762684
21:27:45disbotNimarchive cannot overwrite existing extraction? ; snippet at 12https://play.nim-lang.org/#ix=2mZw
21:49:24*bung joined #nim
21:57:38FromDiscord<Technisha Circuit> How do i make an sequence with multiple data types?
21:57:45FromDiscord<Technisha Circuit> Is it `T`?
21:58:19Yardanicoyou can't
21:58:29Yardanicosequence is a sequence of one data type
22:02:23*Yardanico quit (Quit: https://quassel-irc.org - Chat comfortably. Anywhere.)
22:03:21*Yardanico joined #nim
22:05:38FromDiscord<Technisha Circuit> Oh okay
22:10:39FromDiscord<exelotl> @Technisha Circuit what are you trying to do?
22:11:35FromDiscord<Technisha Circuit> I am just testing some random stuff
22:13:29FromDiscord<Elegant Beef> You can use object variance to get close to that
22:13:49FromDiscord<Elegant Beef> But you're stuck with 1 type per sequence
22:23:54*liblq-dev quit (Quit: WeeChat 2.8)
22:43:59FromDiscord<Varriount> @Technisha Circuit You can do what the JSON module does
22:47:33bung@Yardanico provide hover range fixed, I make it as middleware modified the word range
22:47:43Yardanicoah okay nice
22:47:49Yardanicodid you see the bug I showed?
22:48:06bungwhich one?
22:48:39bungyesterday talked ?
22:49:28Yardanicobung: nah, today, lemme show
22:49:59Yardanicobung: https://play.nim-lang.org/#ix=2nfS
22:50:12Yardanicoin your extension all code after line 3 in this example will be highlighted as a string
22:51:48bunglemme try
22:57:32bunghere's what I see https://transfer.sh/tX3pK/Screenshot-2020-05-25-at-6.55.59-AM.png
22:57:47Yardanicowell, it's still wrong :P
22:58:24Yardanicobung: here's what I see - https://transfer.sh/135op6/2020-05-25-01-58-04_grim.png
22:58:32Yardanicosee how it becomes yellow after that line
22:58:34Yardanicoall identifiers and stuff
22:58:37bungyeah, that's complicated. I developed a rails extension
22:58:56bungalso has syntax issue, hard to fix
23:00:02bunghhh, your version more funny.
23:02:25bunghow you check the file in irc? open in browser?
23:03:51Yardanicobung: yes? of course
23:04:14bungokay, thought there's more geek way :p
23:20:20*oprypin quit (Remote host closed the connection)
23:23:14*oprypin joined #nim
23:25:15*FromGitter quit (Remote host closed the connection)
23:26:30*oprypin quit (Client Quit)
23:32:15*krux02 quit (Remote host closed the connection)
23:38:31*FromGitter joined #nim
23:40:14*oprypin joined #nim
23:51:34*fredrikhr quit (Ping timeout: 240 seconds)
23:57:26*ftsf joined #nim