<< 27-07-2021 >>

00:13:16FromDiscord<sclee15 (Sung-Chul Lee)> is there null/void safety feature in Nim?
00:14:50FromDiscord<Elegantbeef> There is `std/wrapnils` and also experimental not nil annotation/strict not nil annotation
00:29:22*rockcavera quit (Read error: Connection reset by peer)
00:30:07*rockcavera joined #nim
00:30:07*rockcavera quit (Changing host)
00:30:07*rockcavera joined #nim
00:39:04FromDiscord<sclee15 (Sung-Chul Lee)> @elegantbeef\:matrix.org thank you
01:07:06*aeverr quit (Ping timeout: 240 seconds)
01:54:53FromDiscord<reilly> I cannot figure out for the life of me how to access the children of a node in pragmagic/godot-nim.
02:09:58*arkurious quit (Quit: Leaving)
03:27:53*rockcavera quit (Remote host closed the connection)
04:06:02*supakeen quit (Quit: WeeChat 3.2)
04:06:35*supakeen joined #nim
05:30:08fn<ForumUpdaterBot99> New thread by KerryC: String formatting a number with Javascript backend, see https://forum.nim-lang.org/t/8272
06:07:16fn<ForumUpdaterBot99> New Nimble package! gnu - Godot-Nim Utility - Godot gamedev with Nim, see https://github.com/Knaque/gnu
06:07:17fn<R2D299> itHub: 7"GNU (Godot-Nim Utility) is a CLI for creating games in the Godot engine using the Nim programming language."
06:44:37FromDiscord<generic linux user> who said my talk:sunglassess:
06:44:41FromDiscord<generic linux user> (edit) "talk:sunglassess:" => "talk😎"
06:44:48FromDiscord<generic linux user> (edit) "talk😎" => "name😎"
06:50:12FromDiscord<arnetheduck> sent a long message, see http://ix.io/3ubs
06:52:27FromDiscord<arnetheduck> In reply to @haxscramper "And it is not": half of it is probably because although the manual explicitly says you should not rely on catching defects, people end up catching them by accident when using a naked `except:` making the "default" / easiest code work contrary to the intent of defects
06:55:20fn<ForumUpdaterBot99> New Nimble package! cpython - Alternative StdLib for Nim for Python targets, see https://github.com/juancarlospaco/cpython
06:55:20fn<R2D299> itHub: 7"Alternative StdLib for Nim for Python targets, hijacks Python StdLib for Nim"
06:55:48*max22- joined #nim
06:57:16*neceve joined #nim
06:57:35FromDiscord<saem> Defects are almost never the answer. A library author is deceiving themselves into thinking they know enough information about all systems within which their library will be used and somehow they can make and end-to-end system design choice.
06:58:22FromDiscord<saem> That's putting it more kindly than it should perhaps.
07:01:59*aeverr joined #nim
07:16:41*max22- quit (Ping timeout: 252 seconds)
07:48:02FromDiscord<System64 ~ Flandre Scarlet> In reply to @fn "<ForumUpdaterBot> New Nimble package!": Is it an implementation of Pythin in Nim?
07:53:43FromDiscord<generic linux user> !!!
07:55:17FromDiscord<Clonkk> What would be the point ?↵(@System64 ~ Flandre Scarlet)
08:05:23*SebastianM joined #nim
08:11:17FromDiscord<System64 ~ Flandre Scarlet> ah isn't it for compilling to Python?↵Didn't understood
08:11:25FromDiscord<Rika> no
08:11:38FromDiscord<Rika> its a simulation of the python stdlib i believe
08:12:49FromDiscord<Clonkk> https://github.com/juancarlospaco/cpython is a Nim API of Python stdlib through Nimpy
08:12:52fn<R2D299> itHub: 7"Alternative StdLib for Nim for Python targets, hijacks Python StdLib for Nim"
08:13:00FromDiscord<Rika> oh i see
08:13:03FromDiscord<Rika> thats strange but cool
08:13:10FromDiscord<Rika> oh i get it
08:13:18FromDiscord<Rika> its like the node library he also made
08:13:38FromDiscord<Clonkk> Exactly
08:14:58FromDiscord<Clonkk> You don't compile for Python in Nim. You run Python code in C with CPython and doing this hasb een made easy by Nimpy. Implementing Pythin in Nim would probably have little to no practical use↵(@System64 ~ Flandre Scarlet)
08:16:47FromDiscord<PsychoClay> `var s = "d"↵var i = 20↵let sp: array[2, pointer] = [s.addr, i.addr]`↵why doesnt this work?
08:18:44FromDiscord<Clonkk> Because i.addr is not a pointer it's `ptr int` and `s.addr` is a `ptr string`
08:19:24FromDiscord<Clonkk> You can cast `ptr X` to `pointer` if you really want to
08:19:28FromDiscord<PsychoClay> does cast[pointer](s.addr) work?
08:19:30FromDiscord<PsychoClay> ah yea
08:19:51FromDiscord<Clonkk> Can't tell you if it's a good idea or bad design though. Casting to raw pointer is usually not needed unless you interaéct with C
08:20:01FromDiscord<Rika> please note that you've arrived at "good luck have fun" territory
08:20:02FromDiscord<PsychoClay> well i ave some threading issues
08:20:02FromDiscord<Clonkk> WHat are yo utrying to do ?
08:20:17FromDiscord<Rika> what issues are you having
08:20:30FromDiscord<PsychoClay> not being able to access globals in threads
08:20:40FromDiscord<Rika> you generally shouldnt
08:20:46FromDiscord<Clonkk> That's normal
08:20:57FromDiscord<Clonkk> in NIm, thread have their own heap (that will change with arc/orc)
08:21:10FromDiscord<Clonkk> If you want to pass pointer to heap memory
08:21:13FromDiscord<Clonkk> You need to allocate a shared heap
08:21:43FromDiscord<Clonkk> `allocShared`, `deallocShared`, `freeShared`, `reallocShared` will be what you're looking for
08:21:54FromDiscord<PsychoClay> well up until now pointers have worked in combination with multiple channels
08:22:16FromDiscord<Clonkk> Do you compile with --gc\:arc ?
08:22:20FromDiscord<Rika> "worked" might just be a coincidence
08:22:28FromDiscord<PsychoClay> In reply to @Clonkk "Do you compile with": no
08:22:32FromDiscord<PsychoClay> should i?
08:23:20*xet7 quit (Read error: Connection reset by peer)
08:24:05FromDiscord<PsychoClay> but global vars dont get gc'd right so passing a pointer to a thread should be fine right?
08:24:10*xet7 joined #nim
08:24:45FromDiscord<Rika> that's not the root issue of using globals (atomicity/race conditions is usually)
08:24:55FromDiscord<Clonkk> If you want to pass global pointers to object between threads use https://nim-lang.org/docs/system.html#createSharedU%2Ctypedesc
08:24:56FromDiscord<Clonkk> And you'll have to free it with https://nim-lang.org/docs/system.html#freeShared%2Cptr.T
08:25:17FromDiscord<Rika> if you want to pass things between threads maybe channels would be better?
08:25:26FromDiscord<PsychoClay> im also using channels
08:25:48FromDiscord<PsychoClay> In reply to @Clonkk "And you'll have to": can i instead of doing this, use a gc that has a shared heap?
08:25:56FromDiscord<PsychoClay> or is that somethin non related
08:25:59FromDiscord<Clonkk> Channel can't send reference for now (unless you're using devel with new chnanel implementation and --gc\:arc then it might be)↵(@PsychoClay)
08:26:30FromDiscord<PsychoClay> well i dont use the channels for sending pointers
08:27:17FromDiscord<Clonkk> Currently, in Nim vanilla, sharing heap memory between thread is not valid unless using specific allocated shared heap. It may work because you work on the memory address that may still exists
08:29:42FromDiscord<PsychoClay> what do you mean by "not valid" ?
08:30:04FromDiscord<Clonkk> Right so basically, each thread has its own heap okay ?
08:30:08FromDiscord<PsychoClay> yea
08:30:20FromDiscord<Clonkk> So you can't share a pointer to a thread's heap memory to another thread
08:30:22FromDiscord<Rika> it's not gonna work as intended
08:30:27FromDiscord<Rika> it "works" until it doesnt
08:30:49FromDiscord<Rika> like those bugs that you wonder why it happens only when this happens and not when this happens
08:31:48FromDiscord<Clonkk> Only way to get a shared heap is changing you gc strategey so either --gc\:boehm, --gc\:arc, --gc\:orc (and maybe --gc\:go)
08:32:02FromDiscord<PsychoClay> so if i do that it should be fine?
08:32:18FromDiscord<Clonkk> What exactly are yo utrying to accomplish
08:32:18FromDiscord<PsychoClay> to use pointers to global vars?
08:32:54FromDiscord<PsychoClay> well i have a global registry of procs
08:33:09*max22- joined #nim
08:33:15FromDiscord<PsychoClay> and the registry need to be accesed from a thread
08:34:25FromDiscord<PsychoClay> i just need to access a table basically
08:36:02FromDiscord<Clonkk> You can share global between threads though that's valid
08:36:10FromDiscord<Clonkk> No need to use pointers
08:36:11FromDiscord<Clonkk> What you can't do is share pointer to local heap memory
08:36:36FromDiscord<PsychoClay> yea its just globals im trying to access
08:37:01FromDiscord<Clonkk> If it's global you don't need pointer
08:37:05FromDiscord<PsychoClay> but i keeg getting gcunsafe errors if i try to directly access it?
08:37:45FromDiscord<Clonkk> Because it is
08:37:46FromDiscord<Clonkk> But oyu can access it
08:37:46FromDiscord<Clonkk> Using pointer will not change it
08:38:00FromDiscord<PsychoClay> but it doesnt compile
08:38:23FromDiscord<Clonkk> https://nim-lang.org/docs/manual.html#threads
08:38:35FromDiscord<Clonkk> So either you're sure of what you're doing and you can the gc safe away
08:39:03FromDiscord<PsychoClay> so i should use ` {.cast(gcsafe).}:` ?
08:39:16FromDiscord<Rika> personally i would advise against it
08:39:21FromDiscord<Rika> and change the pattern you are using
08:39:42FromDiscord<Rika> aka: drop the sharing heap idea and think of a different solution
08:39:53FromDiscord<Elegantbeef> the gc safe away trick is here https://nim-lang.org/docs/manual.html#threads-gc-safety
08:39:53FromDiscord<Elegantbeef> Overrides thread analysis cause you're the programmer and supposedly can be trusted, but i've yet to be given reason to agree 😛
08:41:18FromDiscord<PsychoClay> you mean the --threadAnalysis:off switch?
08:41:31FromDiscord<Clonkk> Whenever I can I try to use a threadpool with spawn instead of explicit thread
08:41:32FromDiscord<Clonkk> I found it easier to work with
08:41:47FromDiscord<ElegantBeef> Nah talking about the cast gcsafe
08:42:05FromDiscord<ElegantBeef> The matrix bridge is awful at times with the delay
08:42:37FromDiscord<PsychoClay> oh i see it felt like they wernt reading my messages
08:43:47FromDiscord<PsychoClay> In reply to @Clonkk "Whenever I can I": in my case the thread is supposed to run for the entire lifetime of the process so i dont think threadpool is very usefull in that case
08:43:49FromDiscord<ElegantBeef> Is this a table generated at runtime ro compiile time?
08:43:54FromDiscord<ElegantBeef> (edit) "ro" => "or"
08:43:56FromDiscord<PsychoClay> runtime
08:44:15FromDiscord<ElegantBeef> Does it change when threads run?
08:44:27FromDiscord<PsychoClay> no
08:44:50FromDiscord<PsychoClay> all the values get put into it at the start of runtime
08:45:08FromDiscord<ElegantBeef> So then you could just copy them into threadvars so you wouldnt have to run gcsafe on any interaction with the global var
08:45:45FromDiscord<Clonkk> Ah true I'm on Matrix↵(@ElegantBeef)
08:45:48FromDiscord<Clonkk> Sometimes there's a delay
08:46:20FromDiscord<Clonkk> Basically with threads it's sharedHeap manually allocated or copy
08:46:29FromDiscord<Clonkk> Or it's global with heap memory
08:46:44FromDiscord<ElegantBeef> Should preface that with "I'm no threading expert, just a schmuck that is somehow allowed to both own a multi threaded cpu and write code to run on it"
08:47:37FromDiscord<ElegantBeef> And the global with heap memory can have you doing the manual casting a lot assuming you like thread analysis
08:49:00FromDiscord<PsychoClay> so is there any benefit with using the cast(gcsafe) thing over useing a pointer?
08:49:11FromDiscord<ElegantBeef> you dont pass a pointer around pointlessly
08:49:31FromDiscord<PsychoClay> well its not pointless because im trying to access the table
08:50:19FromDiscord<ElegantBeef> Well like i said i'm not a thread expert, but if you're practically doing shared heap, why not you know just use shared heap and ensure you do it safely
08:50:34*SebastianM quit (Quit: Bye)
08:51:31FromDiscord<PsychoClay> could i use the boehm gc instead of manually allocating shared heap?
08:51:56FromDiscord<ElegantBeef> Well i'd suggest orc over boehm but yea
08:52:16FromDiscord<PsychoClay> hmm ok
08:52:34FromDiscord<PsychoClay> whats the benefit of using orc over boehm
08:52:46FromDiscord<ElegantBeef> It's apart of the nim compiler
08:53:14fn<ForumUpdaterBot99> New post on r/nim by monyarm: Does nim have an equivalent to python's max function?, see https://reddit.com/r/nim/comments/osj37g/does_nim_have_an_equivalent_to_pythons_max/
08:53:16FromDiscord<ElegantBeef> It offers compile time inserted destructors where possible
08:55:07FromDiscord<PsychoClay> ok so if i use orc pointers to globals should be fine?
08:55:33FromDiscord<ElegantBeef> Well it still has thread analysis so that doesnt magically disappear
08:55:52FromDiscord<ElegantBeef> but you can use the cast gcsafe to access global variables without any issues
08:56:33FromDiscord<ElegantBeef> So if you know for certain there will be no modifications to that table you can access it freely without any race conditions afaik
08:57:27FromDiscord<PsychoClay> ok got it, thanks for your explanation :))
08:58:54FromDiscord<Clonkk> I would wrap your registry in object, maybe a Lock to avoid race condition / concurrent access and use getter / setter to access your objects though
08:59:06FromDiscord<Clonkk> (yeah the bridge wasn't displaying edit to message)
09:00:11FromDiscord<PsychoClay> but if the table never gets modified, concurrent access doesnt matter right?
09:00:36FromDiscord<ElegantBeef> It should not, think clonkk was thinking about your sanity 😄
09:00:43FromDiscord<PsychoClay> oh ok
09:01:04FromDiscord<Clonkk> If your table never gets modified then you will simply never call the setter 😄
09:01:33FromDiscord<Clonkk> But if you don't create the API from the start, you'll use the object directly, and then one day you may actually need to modify something and you'll modify it directly
09:01:45FromDiscord<PsychoClay> true
09:01:46FromDiscord<ElegantBeef> Yea using a condition only on setting seems to be the smartest
09:01:48FromDiscord<Clonkk> And then you'll join madness
09:01:52FromDiscord<Clonkk> THat is multithreading
09:02:30FromDiscord<PsychoClay> i think ive already joined madness with my templates
09:02:33FromDiscord<ElegantBeef> Lol
09:02:33FromDiscord<Clonkk> Usually, you use a double lock. The WriteLock disable all reading and writing. The ReadLock enable reading but not writing ( can't modify while being accessed)
09:03:05FromDiscord<ElegantBeef> Well if you want code reviews there are occasionally eyes here 😄
09:04:17FromDiscord<PsychoClay> well if u want to take a look https://github.com/PsychoClay/aberrant/blob/master/src/screep/scraper.nim heres a template that i made
09:04:48FromDiscord<ElegantBeef> Oh boy nested templates
09:04:53FromDiscord<PsychoClay> yea
09:06:56FromDiscord<ElegantBeef> Well inside the template i did find a lovely bug awaiting to appear 😄
09:07:43FromDiscord<ElegantBeef> Ah nvm you arent using `os./`
09:08:01FromDiscord<ElegantBeef> Atleast hopefully not 😄
09:08:20FromDiscord<PsychoClay> well i do
09:08:27FromDiscord<PsychoClay> idk what line ur referring to
09:08:49FromDiscord<ElegantBeef> the url joining, but as i see you define your own operator seems fine
09:08:56FromDiscord<PsychoClay> ah yea
09:10:59FromDiscord<ElegantBeef> That is quite a horrific template but hard to suggest something more reasonable presently
09:12:15FromDiscord<PsychoClay> i could just use regular procs but i really like having to write less code
09:25:27FromDiscord<Clonkk> Writing less code that is un readable isn't necessarily all the fuss
09:26:03FromDiscord<PsychoClay> well the template itself is unreadable but the code that uses the template is more readable for me
10:10:49FromDiscord<planetis> @saem I am in similar situation where I believe panicing is the right choice https://github.com/planetis-m/sync/issues/20 What's your opinion? Can a user of my library recover somehow from a deadlock? of course lock-free sync primitives like a phaser and timeouts are better choices, I am just not knowledgeable enough to make them.
10:41:03*max22- quit (Quit: Leaving)
10:57:25FromDiscord<zidsal> I'm not sure what the right answer is, but as an example if someone was to write a database with sync, I wouldn't want the program to panic, if someones query deadlocked I'd want the database to kill the query
10:57:53FromDiscord<zidsal> (edit) "I'm not sure what the right answer is, but as an example ... if" added "of recovery:↵↵"
10:58:25*max22- joined #nim
11:05:51FromDiscord<planetis> so a wait with a timeout
11:06:00FromDiscord<planetis> how can you handle an error in the calling thread from the waiting one
11:08:54FromDiscord<planetis> actually rust has that poison bool in its locks (but from what I gather it's there bc they dont support finally? could be wrong), but it also panics in this case
11:31:38arkanoidI've been studying haskell recently, and I'm realising how many haskell concepts inspired nim
11:33:00arkanoidactually I don't see haskell in the list of languaged that inspired nim, so probably I'm just catching second-level traits
11:33:06FromDiscord<Rika> idt its haskell that inspired nim
11:33:12FromDiscord<Rika> i believe its more coincidence
11:33:16FromDiscord<Rika> or a shared ancestor
11:33:30FromDiscord<Rika> nim is mainly inspired by pascal i believe?
11:33:41FromDiscord<Rika> so if haskell and pascal are related then yes
11:35:11arkanoiddo you know any other imperative programming language that is capable of tracking effects and purity in particular?
11:35:52*arkurious joined #nim
11:36:00FromDiscord<Rika> no
11:36:10FromDiscord<Rika> i think that was an "original" idea
11:36:55arkanoidI fear FP programmers don't know about this. It's a "massive" quality
11:45:35FromDiscord<Rika> well its not a priority of nim
11:52:51FromDiscord<konsumlamm> Haskell isn't tracking effects like Nim either
11:53:36FromDiscord<konsumlamm> In reply to @arkanoid "I fear FP programmers": trust me, they do know about effect systems
11:54:07FromDiscord<Rika> i think they mean about nim having an effect system
11:54:50FromDiscord<konsumlamm> in that case, i'd have to use it before judging
11:55:00FromDiscord<konsumlamm> but i doubt it's particularly stable...
11:55:26FromDiscord<Rika> it isnt
11:55:31FromDiscord<Rika> it needs more love imo
11:55:34FromDiscord<Rika> its a promising feature
11:55:47FromDiscord<konsumlamm> is there any feature of Nim that doesn't need more love?
11:56:07FromDiscord<Rika> true
11:57:40mstwonder if I could build koka-style effects using macros and the existing code
11:57:46mstcould be good for a laugh
11:58:01FromDiscord<konsumlamm> tbh, FP programmers won't suddenly like Nim, because they realize that it has a half-working effect system that barely anyone uses
11:58:27mstwell, no, but that's really not the point
11:59:24arkanoidI use it quite everywhere
11:59:47FromDiscord<konsumlamm> In reply to @mst "well, no, but that's": ye, i was talking to arkanoid
11:59:47mstarkanoid: exception tracking or custom tags?
12:00:02FromDiscord<konsumlamm> In reply to @arkanoid "I use it quite": well, then you're part of "barely anyone"
12:01:30*max22- quit (Ping timeout: 272 seconds)
12:02:13arkanoidmst: both. I use {.noSideEffect, raises: [].} for intended "pure" code, then I have the "grey area" with noSideEffects but may raise specific exceptions, then there's the "lawless" part (hopefully just the main) where everything is possible
12:03:17mstah, right, which 'func' adds implicitly
12:03:25mstcourse the main 'Effects' doc section doesn't mention it
12:03:30arkanoidI'm practicing to move the "grey areas" somewhere else by leveraging on Monads (Option, Either)
12:03:32mst*lolsigh*
12:06:01*supakeen quit (Quit: WeeChat 3.2)
12:06:34*supakeen joined #nim
12:08:47arkanoidthere are not so many issues tagged Effect System https://github.com/nim-lang/Nim/issues?q=is%3Aissue+is%3Aopen+label%3A%22Effect+system%22+
12:09:24FromDiscord<konsumlamm> you call that many?
12:10:10arkanoid?
12:10:19FromDiscord<Rika> read again
12:10:21FromDiscord<Rika> he said "not many"
12:10:33FromDiscord<konsumlamm> oh nvm
12:12:24FromDiscord<konsumlamm> it's not hard to guess why there are so few issues though
12:13:25fn<ForumUpdaterBot99> New thread by Ingo: Build long strings, speed., see https://forum.nim-lang.org/t/8273
12:14:09FromDiscord<haxscramper> I think right now tag system is only used for eradicating some of the built-in language features from the code, such as exceptions
12:14:10FromDiscord<haxscramper> With `{.raises: [].}`
12:15:38mstright, but you can define your own tags
12:15:39arkanoidit's very useful to keep your code in shape. By moving all code into pure functions it's much easier to move the problems on the edge of the design
12:15:44FromDiscord<haxscramper> Used by users
12:16:12FromDiscord<haxscramper> And documentation hides effects and raises behind `{...}` so they are not explicitly visible
12:16:13arkanoidand tagging helps you group the edge
12:17:15FromDiscord<haxscramper> mst\: nobody does that
12:18:17FromDiscord<haxscramper> And by "nobody" I mean - there are 11 occurencies of things derived from `of RootEffect` in all nimble packages
12:18:36FromDiscord<haxscramper> And eight of them repeat the same pair TimeEffect/IoEffect
12:18:40FromDiscord<haxscramper> Because they had stdlib cloned
12:19:54arkanoidthe manual doesn't say to extend RootEffect, but just just "type MyTag = object"
12:20:55FromDiscord<haxscramper> well, good luck trying figure that out. I can check for `{.tags: []` in that case
12:23:01mst-!- mst is now known as nobody
12:23:19mst(in practice I don't have anything that -needs- that currently but it's very tempting for certain stuff)
12:23:33FromDiscord<haxscramper> yeah, it looks nice
12:23:37FromDiscord<haxscramper> I have `ShellExecEffect`
12:26:00FromDiscord<haxscramper> well, anyway, for haxdoc I will implement `@effect{ShellExecEffect} :: Docstring related to particular effect` and `@raises{ArgumentError} :: Explanation why this exception might be raised`
12:26:01FromDiscord<haxscramper> So this stuff could be documented at least
12:26:40FromDiscord<haxscramper> So end users would be aware of the effects and reasons, and not just get random "unlisted effect/exception" errors
12:28:30FromDiscord<haxscramper> in commit message
12:28:31FromDiscord<haxscramper> I actually wrote about this (why effect tracking should have better documentation support) here https://github.com/haxscramper/haxdoc/commit/9e09f7a2dc2c56fdce66102a172f1d9104270145
12:30:30arkanoidit's very easy to check for tags (please execute this in editor as is compile time) https://play.nim-lang.org/#ix=3ud2
12:32:01arkanoidI really appreciate yout effort for pushing effect tracking into nim. It's really something that programmer lands to soon or later once they struggle handling complexity
12:33:38FromDiscord<haxscramper> Yes, but do you expect user to run this fr every possible procedure they want to use?
12:34:10FromDiscord<haxscramper> Main issue is visibility and documentation
12:34:22FromDiscord<haxscramper> And if haxdoc can give you a warning like "undocumented direct raise if " it is a good thing
12:38:21arkanoidactually I'm not an haxdoc user (I'm very bad in documenting my projects, while I tend to push design to useless levels) please excuse me if I take some time to understand what's the usage, while having a quick lunch
12:39:43FromDiscord<haxscramper> Yes. Even though I personally don't want to push for purity as much as you do, but lots of the inconveniences from exceptions are based on tooling, and not on the concept of tracking itself. Like bad error messages, no way to actually track changes (https://github.com/nim-lang/Nim/pull/18541/files#diff-13795c17121ec235cc0d7a1f5df177f3a5af2e32d2cbd2d95c8b020ad8c76516R703 ) in the code (and here we see Defect again)
12:40:07FromDiscord<haxscramper> `> not an haxdoc user` considering it is not even done yet that is understandable
12:48:31*jfinkhaeuser left #nim (#nim)
13:00:26arkanoidhaxscramper, as a non nimdoc user, what's the new features offered by your haxdoc?
13:02:38FromDiscord<haxscramper> Works for whole project, has an API for custom tooling, export to XML/SQLite/html, supports documentation annotations like `@arg{}` that actually allow writing documentation comments with some semantic meaning, instead of just random text. Tracking of tags, effects, raises.
13:02:58FromDiscord<haxscramper> All of that is implemented in the proof-of-concept stage, but I need to finally finish hcparse
13:02:59FromDiscord<haxscramper> And then work on haxdoc
13:03:15FromDiscord<haxscramper> Also tracking changes between library versions
13:03:35FromDiscord<haxscramper> image.png https://media.discordapp.net/attachments/371759389889003532/869565686404493332/image.png
13:05:55FromDiscord<haxscramper> But most importantly, haxdoc should understand the code
13:06:47FromDiscord<haxscramper> and it also has sourcetrail integration
13:06:57FromDiscord<haxscramper> probably the only thing that is like 99%+ done
13:07:38FromDiscord<haxscramper> I'm missing IC to get information about template expansion, but aside from that
13:08:30arkanoidsci-fi question. Does it build some sort of dependency graph of function calls? I want to colorize functions
13:09:10*max22- joined #nim
13:11:07FromDiscord<haxscramper> yes
13:11:38FromDiscord<haxscramper> or if it doesn't it would be a 10-line change
13:11:38FromDiscord<haxscramper> https://github.com/haxscramper/haxdoc/blob/master/src/haxdoc/docentry_types.nim#L484
13:11:45FromDiscord<haxscramper> I just tend to instantly forget details like this if I don't touch the project for over a week
13:14:51arkanoidwell, this is wow
13:15:44arkanoidI mean, I'd use it. A doc tool that can let me graph my design and colorize it according to effects is what I exactly do in my mind
13:16:25FromDiscord<deech> Why is an underscore a valid identifier ,eg `let _ = "hello world"; echo _` but if you add some characters it isn't? eg. `let abc_ = ...` Is this due to to `_` unsensitivity?
13:18:30FromDiscord<haxscramper> `_` is a special case of an identifer
13:18:32FromDiscord<haxscramper> I'm surprised you can `echo` it actually
13:19:51mstit's commonly used for implicitish arguments
13:24:25*rockcavera joined #nim
13:24:25*rockcavera quit (Changing host)
13:24:25*rockcavera joined #nim
13:38:01*Vladar joined #nim
13:40:52FromDiscord<arnetheduck> In reply to @haxscramper "Also tracking changes between": should turn this into an abi-compatibility tool ;l)
14:39:45fn<ForumUpdaterBot99> New thread by Xhevahir: Nim earns mention in the news (unfortunately?), see https://forum.nim-lang.org/t/8274
14:46:55FromDiscord<generic linux user> really?
14:47:06FromDiscord<generic linux user> is that a good mews or a bad one?
14:47:22FromDiscord<generic linux user> :|
14:47:24fn<Prestige99> I think publicity is good
14:47:39FromDiscord<generic linux user> atleast some ppl get to know it
14:49:21FromDiscord<generic linux user> there is go and rust there so i think we are equal
14:49:41FromDiscord<haxscramper> 0.000001 IQ antivirus vendor joins the chat
14:49:51FromDiscord<generic linux user> 🗿.
14:49:55FromDiscord<haxscramper> nImIsMalWaRe
14:50:00FromDiscord<generic linux user> naww
14:50:28FromDiscord<haxscramper> Other than regular issues with AV vendors I think more publicity is a good thing
14:51:35FromDiscord<generic linux user> they only mention nim once or twice
15:52:04FromDiscord<saem> I don't know the library well enough, but I do know nim stdlib doesn't have a kill for threads from the outside. But could the user conceivably have a sentinel?
15:58:28*stkrdknmibalz quit (Quit: WeeChat 3.0.1)
16:13:26*stkrdknmibalz joined #nim
16:18:29mstoh, right, that's not really "exotic", what that is, is that -one- person wrote -one- blog post showing some basic windows process injection stuff using nim because it made for an easier and more elegant example than C
16:59:59FromDiscord<@bracketmaster-5a708063d73408ce4> @haxscramper\:matrix.org - what's an AV vendor?
17:06:47FromDiscord<krisppurg> Has anyone got this error? I appear to have gotten this error when I connect to gateway on `ws`. I have updated `ws` to `0.4.4`, but regardless I still get the error.↵↵(see file) https://media.discordapp.net/attachments/371759389889003532/869626888526639104/message.txt
17:16:08FromDiscord<krisppurg> nvm https://forum.nim-lang.org/t/7551#47896 solves the problem
17:40:13fn<ForumUpdaterBot99> New thread by Chaemon: Static generics with concept, see https://forum.nim-lang.org/t/8275
18:27:12*max22- quit (Ping timeout: 245 seconds)
18:50:33FromDiscord<TurtleP> so something I'm wondering: is it better to raise and exception with a message or `return echo("my message")`? I rarely use exceptions and apologize if this is a stupid question
19:04:57FromDiscord<SolitudeSF> the latter is not a valid nim
19:06:49FromDiscord<TurtleP> well, that's kind of beside the point
19:10:25*max22- joined #nim
19:18:38FromDiscord<reilly> Is it possible to mark an import as used, similarly how you can do `var x {.used.}: string`?
19:22:12fn<Prestige99> Don't know, but why would you need that?
19:22:51FromDiscord<haxscramper> Or use `Result` if you want to have return-based value handling
19:22:58FromDiscord<haxscramper> But by default nim is geared towards exceptions
19:22:59FromDiscord<haxscramper> raise exceptions with readable messages
19:23:36FromDiscord<haxscramper> `{.push warning[Unused]:off.}`
19:23:36FromDiscord<haxscramper> `{.pop.}`
19:24:37FromDiscord<reilly> I'm working with godot-nim (see knaque/gnu), and as a part of that, I need to import scripts into stub.nim. No actual code is executed in the stub, only imports, but they have to be imported. Because there's no actual code, though, I get warned for each import. It just bugs me is all.
19:25:06FromDiscord<reilly> (Also see knaque/godot-nim-stub to see what the file system looks like)
19:26:34FromDiscord<haxscramper> push warning off
19:28:16FromDiscord<planetis> indeed a sentinel could be a solution
19:40:08*Vladar quit (Quit: Leaving)
19:41:00FromDiscord<ynfle (ynfle)> @\_discord\_237452759975067650\:t2bot.io I'm pretty sure it's a known issue
19:54:47FromDiscord<ynfle (ynfle)> To people on the other side of the bridges see the mention properly?
20:06:55FromDiscord<haxscramper> No, they are seen as `@_discord_237452759975067650:t2bot.io`
20:08:21FromDiscord<ynfle (ynfle)> @reilly I'm pretty sure it's a known issue
20:08:28FromDiscord<ynfle (ynfle)> Did that come through properly?
20:09:59FromDiscord<haxscramper> No, this one does not work
20:10:05FromDiscord<haxscramper> @haxscramper\:
20:10:26FromDiscord<haxscramper> You need to do it via autocomplete from the matrix side I think
20:13:44FromDiscord<ynfle (ynfle)> @reilly#1078 I'm pretty sure it's a known issue
20:13:49FromDiscord<ynfle (ynfle)> Did that work?
20:15:45FromDiscord<haxscramper> No. There is a "nim bridge testing" room on the matrix
20:16:03FromDiscord<haxscramper> That is bridged to discord, so you can figure out things there
20:16:41FromDiscord<reilly> I just got back from grabbing lunch, so I wouldn't have seen it until now anyway.
20:17:00FromDiscord<reilly> `{.push warnings: off.}` did the job.
20:17:04FromDiscord<ynfle (ynfle)> Lol just testing
20:32:54fn<ForumUpdaterBot99> New thread by Akito: String related Segmentation Faults, see https://forum.nim-lang.org/t/8276
20:42:26*neceve quit (Ping timeout: 252 seconds)
20:59:31FromDiscord<Generational Me!> nim jobs? Can't find?
20:59:54FromDiscord<leorize> there's a jobs channel in this server
21:47:40*thunder joined #nim
21:50:15*max22- quit (Quit: Leaving)
22:14:55FromDiscord<bOrEd> Pls use wish
22:57:47*stkrdknmibalz quit (Quit: WeeChat 3.0.1)