<< 27-12-2022 >>

00:03:49FromDiscord<ambient> sent a code paste, see https://paste.rs/72V
00:04:04FromDiscord<sOkam!> sent a code paste, see https://play.nim-lang.org/#ix=4jEh
00:04:29FromDiscord<Phil> In reply to @ambient "This seems marginally faster": Whats your benchy results?
00:06:04FromDiscord<ambient> I really should write those tests, the difference does seem very miniscule
00:06:30FromDiscord<Phil> In reply to @ambient "I really should write": its really not difficult, benchy makes it trivial!
00:11:27FromDiscord<System64 ~ Flandre Scarlet> Do you know how I can display the Open File window with Nim please?
00:11:31FromDiscord<ambient> I think the hash Table uses is already int and the hashing function for ints is just returning an int, so...
00:11:51FromDiscord<ambient> I guess there's not much improvement to be gained there
00:19:04FromDiscord<Phil> In reply to @System64 "Do you know how": I haven't really written any guis in nim so I wouldn't know, you'll have to wait for others to come online with more knowledge in that area
00:20:17FromDiscord<Elegantbeef> https://github.com/Patitotective/tinydialogs
00:22:09*ltriant quit (Ping timeout: 256 seconds)
00:22:30*ltriant joined #nim
00:22:51FromDiscord<System64 ~ Flandre Scarlet> Thanks, gotta try it
00:25:50FromDiscord<System64 ~ Flandre Scarlet> Seems I have problems https://media.discordapp.net/attachments/371759389889003532/1057091904589807696/message.txt
00:27:42*ltriant quit (Ping timeout: 265 seconds)
00:29:05FromDiscord<<She>Horizon</Her>> In reply to @Isofruit "*shrugs*, either way I": Fair enough, i never used Windows even as a kid and was convinced it was crap lmao, win 7 was the best
00:29:51FromDiscord<System64 ~ Flandre Scarlet> The worst is it's C compiler errors
00:31:59NimEventerNew thread by archnim: Try-catch misbehavior, see https://forum.nim-lang.org/t/9765
00:33:11FromDiscord<albassort> @dom96 🥺 merge the 2 prs for packages
00:34:02FromDiscord<albassort> (edit) "@dom96 🥺 ... mergepackages?" added "can you please" | "packages" => "packages? thanks ily <3"
00:35:40*genpaku quit (Read error: Connection reset by peer)
00:36:41*genpaku joined #nim
00:44:08NimEventerNew post on r/nim by His_son: Nim pgp library, see https://reddit.com/r/nim/comments/zw1wei/nim_pgp_library/
00:50:22FromDiscord<Elegantbeef> Actually it might not hash int keys but it still is a compressed format
00:50:25FromDiscord<Elegantbeef> https://github.com/nim-lang/Nim/blob/version-1-6/lib/pure/hashes.nim#L209-L211 ah it does!
00:50:28FromDiscord<Elegantbeef> It should be a `Table` still should hash int keys afaik↵(@ambient)
00:50:49FromDiscord<albassort> In reply to @System64 "The worst is it's": what did you even do
00:52:23FromDiscord<Elegantbeef> @Patitotective\: did you make sure your bindings worked on windows?
00:53:26FromDiscord<System64 ~ Flandre Scarlet> In reply to @albassort "what did you even": I just installed tinydialogs on nimble and imported it
00:53:51FromDiscord<albassort> 🤔
00:53:55FromDiscord<albassort> file a bug report
00:53:59FromDiscord<albassort> or read the docs
00:54:04FromDiscord<albassort> make sure you read the docs
01:00:36FromDiscord<System64 ~ Flandre Scarlet> I find nothing about that in the docss
01:07:20*ltriant joined #nim
01:12:17*ltriant quit (Ping timeout: 246 seconds)
01:15:22*nick2 quit (Quit: WeeChat 3.7.1)
01:21:22FromDiscord<jvsg> hello room! Just got into learning nim. I've got 2 questions\:↵1. Can someone give me the to native build system of nim? (I think I saw that somewhere)↵2. What's .cfg file for?
01:23:21FromDiscord<jvsg> I think it is meant for being parsed by std/parsecfg. Not sure though.
01:28:28FromDiscord<Elegantbeef> config files are for configurating the program
01:28:46FromDiscord<Elegantbeef> Rather compilation
01:29:21FromDiscord<Elegantbeef> Nim doesnt really have a build system, Nimble is a package manager that has build tasks, but you generally just use configuration files ime
01:32:22FromDiscord<Elegantbeef> I guess there is nake?
01:38:12FromDiscord<albassort> https://media.discordapp.net/attachments/371759389889003532/1057110118296199188/image.png
01:38:21FromDiscord<albassort> this error is a certified hood classic
01:38:36FromDiscord<Elegantbeef> What version of Nim?
01:39:14FromDiscord<albassort> 1.9.1
01:39:27FromDiscord<albassort> updating arch
01:39:50FromDiscord<Elegantbeef> Odd that you're missing libssl
01:40:07FromDiscord<sOkam!> sent a long message, see http://ix.io/4jEH
01:41:56FromDiscord<sOkam!> That said, if you have a huge project, with tons of build options, nimble can do the job but it takes some getting used to the differences↵I tried nake, and i liked the concept, but its super old and it feels awkward to work around the issues. And nimble does the same, just with a different mindset
01:42:43FromDiscord<sOkam!> (edit) "That said, if you have a huge project, with tons of build options, ... nimble" added "edge cases, multiple output files, etc,"
01:43:36*ltriant joined #nim
01:45:35FromDiscord<jtv> Nim have any access to builtin_clz (available both in gcc and llvm, usually compiling down to just a clz instruction?). Not finding it in google searches
01:45:56FromDiscord<Elegantbeef> Probably not in the stdlib but you can import it
01:46:42FromDiscord<jtv> Makes sense, thanks
01:53:35*ltriant quit (Ping timeout: 246 seconds)
01:54:27NimEventerNew Nimble package! bitables - bidirectional {maps, tables, dictionaries} in nim, see https://github.com/Retkid/bitables
02:04:54*ltriant joined #nim
02:18:23*ltriant quit (Ping timeout: 265 seconds)
02:25:39FromDiscord<albassort> nice
02:41:23*byanka quit (Ping timeout: 260 seconds)
02:51:43*ltriant joined #nim
02:57:03*ltriant quit (Ping timeout: 268 seconds)
03:08:19*ltriant joined #nim
03:13:42*ltriant quit (Ping timeout: 268 seconds)
03:46:18*ltriant joined #nim
03:51:30*ltriant quit (Ping timeout: 272 seconds)
04:44:08*nick3 joined #nim
04:48:16*arkurious quit (Quit: Leaving)
04:59:58FromDiscord<PunchCake> can someone whos running linux help me with testing a javafx jar app i made?
05:35:36*ltriant joined #nim
05:46:18*ltriant quit (Ping timeout: 260 seconds)
06:04:16*nick3 quit (Quit: WeeChat 3.7.1)
06:18:36*tiorock joined #nim
06:18:36*tiorock quit (Changing host)
06:18:36*tiorock joined #nim
06:18:37*rockcavera is now known as Guest8400
06:18:37*tiorock is now known as rockcavera
06:18:40NimEventerNew Nimble package! libpcap - A wrapper for the libpcap library, see https://github.com/praetoriannero/nim_libpcap
06:21:20*Guest8400 quit (Ping timeout: 246 seconds)
07:05:29FromDiscord<demotomohiro> @jtv builtin_clz is used in bitops module: https://github.com/nim-lang/Nim/search?q=builtin_clz&type=
07:05:35FromDiscord<sOkam!> sent a code paste, see https://play.nim-lang.org/#ix=4jFp
07:06:13FromDiscord<sOkam!> (edit) "https://play.nim-lang.org/#ix=4jFp" => "https://play.nim-lang.org/#ix=4jFq"
07:17:21FromDiscord<Elegantbeef> A bitset
07:24:17FromDiscord<sOkam!> can you give a very minimalistic example, so i can look for the idea on the manual?
07:24:46FromDiscord<sOkam!> trying to search them, but as usual I'm failing at navigating the docs 😔
07:25:22FromDiscord<Elegantbeef> sent a code paste, see https://play.nim-lang.org/#ix=4jFs
07:27:17FromDiscord<sOkam!> ty
07:30:02FromDiscord<Elegantbeef> In Nim whenever you'd use an integer bitflag you're always better to use a bitset
07:30:20FromDiscord<Elegantbeef> It's just more readable and easier
07:31:27FromDiscord<sOkam!> sent a code paste, see https://play.nim-lang.org/#ix=4jFt
07:31:33FromDiscord<Elegantbeef> Yes
07:31:51FromDiscord<sOkam!> much more readable, definitely, yep
07:42:24FromDiscord<sOkam!> sent a code paste, see https://play.nim-lang.org/#ix=4jFv
07:43:37FromDiscord<Elegantbeef> Not really
07:50:45FromDiscord<sOkam!> sent a code paste, see https://play.nim-lang.org/#ix=4jFx
07:51:12FromDiscord<Elegantbeef> I have 0 context here
07:51:27FromDiscord<sOkam!> (edit) "https://play.nim-lang.org/#ix=4jFx" => "https://play.nim-lang.org/#ix=4jFy"
07:51:34FromDiscord<sOkam!> In reply to @Elegantbeef "I have 0 context": its what you wrote, exact
07:51:37FromDiscord<Elegantbeef> Yes that's going to fail
07:51:41FromDiscord<Elegantbeef> No it's not
07:51:49FromDiscord<sOkam!> whats the diff?
07:51:50FromDiscord<Elegantbeef> I imported `std/setutils` and used `[]=`
07:52:34FromDiscord<sOkam!> oh! `signbits[it]` 🤦‍♂️
07:55:24*ltriant joined #nim
08:02:19*ltriant quit (Ping timeout: 252 seconds)
08:16:11*ltriant joined #nim
08:42:14*ltriant quit (Ping timeout: 252 seconds)
09:13:57*kenran joined #nim
09:15:11*kenran quit (Remote host closed the connection)
09:15:29*kenran joined #nim
09:16:01*kenran quit (Remote host closed the connection)
09:27:12*ltriant joined #nim
09:35:07*ltriant quit (Ping timeout: 248 seconds)
09:55:29*ltriant joined #nim
10:00:24*ltriant quit (Ping timeout: 260 seconds)
10:18:47FromDiscord<Phil> I have awakened!
10:25:07FromDiscord<Phil> sent a code paste, see https://play.nim-lang.org/#ix=4jG8
10:25:19FromDiscord<Phil> The only thing that changed is I'm not in a loop
10:25:26FromDiscord<Phil> (edit) "not" => "now"
10:26:57FromDiscord<Phil> This issue is semi-fixable by making the filePath parameter `static string`, but then I need to figure out how to generate a `seq[static string]` to loop over via unrolling the-forloop as without that the strings become non-static and that's just way too much of a pain
10:27:43FromDiscord<Phil> I guess my main issue here is that sometimes filePath gets implicitly treated like a NimNode (when I call the macro directly) and sometimes like an actual string and that's just weird
10:40:47FromDiscord<Phil> sent a code paste, see https://play.nim-lang.org/#ix=4jGd
10:41:26FromDiscord<Phil> (edit) "https://play.nim-lang.org/#ix=4jGd" => "https://paste.rs/3yD"
10:42:35FromDiscord<leorize> because macros are not procs
10:43:43FromDiscord<Vindaar> In reply to @Isofruit "Beef or anyone here": `node laks field: strVal` means that the node you hand (in this case `fieldPath` is not a `nnkIdent` or `nnkSym` or literal string. Therefore it has no string field. It's because when handing stuff to a macro (e.g. argument is a string, it's not really a string). Print the node with `treeRepr` to see what it is
10:43:53FromDiscord<leorize> so, uh, all inputs to macros are the NimNode of the expression
10:45:14FromDiscord<Phil> But shouldn't that be fixed if I hand it `newLit(path)` ? That is a NimNode (should be string-literal NimNode afaiu) and playing around with it in inim, that also works with strval
10:46:08FromDiscord<leorize> you are actually handing it the actual AST of the call
10:46:24FromDiscord<Phil> Ohhhhhhh god damnit
10:47:02FromDiscord<leorize> now, a cheap trick to get it work the way you want is via abusing generics
10:47:17FromDiscord<leorize> aka `static[T]` parameters
10:48:51FromDiscord<leorize> btw, compile time procs are perfect for the case of helper macros if you need them
10:49:26FromDiscord<leorize> in your case you probably just want static string for the second parameter
10:49:36FromDiscord<Phil> sent a code paste, see https://play.nim-lang.org/#ix=4jGf
10:50:17FromDiscord<Phil> In reply to @leorize "in your case you": That one runs into the problem that I have no idea how to properly instantiate a seq[static string], nor how to iterate over it in a way that keeps the strings as static strings without unrolling the sequence via macro
10:50:29FromDiscord<Phil> (edit) "In reply to @leorize "in your case you": That one runs into the problem that I have no idea how to properly instantiate a seq[static string], nor how to iterate over it in a way that keeps the strings as static strings without unrolling ... the" added " the loop over"
10:51:00FromDiscord<Phil> The "standard" ways have failed me: `let x: seq[static string] = @["lala", "lulu"]
10:51:05FromDiscord<Phil> (edit) ""lulu"]" => ""lulu"]`"
10:51:16FromDiscord<Phil> And I can't really throw the individual strings into static blocks
10:51:21FromDiscord<Phil> Making it a const doesn't change anything either
10:52:25FromDiscord<leorize> move the static out \:p
10:52:26FromDiscord<leorize> not a real type but rather a modifier
10:52:26FromDiscord<leorize> and... here's the unintuitive thing about `static[T]`
10:52:27FromDiscord<leorize> the only thing it meant is that the parameter must be computable at compile time
10:52:27FromDiscord<leorize> think var parameters
10:52:47FromDiscord<leorize> (except when it's not 🙃)
10:54:41FromDiscord<Phil> sent a code paste, see https://paste.rs/WCV
10:54:42FromDiscord<leorize> alternatively, generate the AST that do the thing you want instead of reading the string within the macro
10:55:23FromDiscord<Phil> With this macro definition:↵`macro addMockPragma(projectPath: static string, filePath: string): untyped =`
10:55:35FromDiscord<leorize> filePath must be static
10:56:26FromDiscord<leorize> actually, what are you trying to do?
10:56:57FromDiscord<leorize> I have a hunch that your implementation might back you into a corner
10:57:01FromDiscord<Phil> I have a macro that reads in a module file (for the provided path), parses it into an AST, modifies the AST and writes the output back into the module-file, overwriting what was previously there.
10:57:37FromDiscord<Phil> I want to apply this to macro to a sequence of module-paths, basically expanding from "do this to 1 specific module" to "do this to all modules"
10:57:43FromDiscord<Phil> (edit) removed "to"
10:57:47FromDiscord<leorize> are you sure you don't want to write a compiler pass? \:p
10:58:26FromDiscord<Phil> I have baby macro knowledge and am trying to stay in the vague bizarro land that I've only barely started to become familiar with
10:58:41FromDiscord<vindaar> you can just write a helper proc `getStr` that takes the input and depending on the kind (ident, sym, hidden deref etc) return the correct string literal. That way at least you don't have to change much↵(@Phil)
10:59:40FromDiscord<leorize> the best way to get this done is to make that other macro of yours expose the API as a proc
10:59:48FromDiscord<Phil> In reply to @vindaar "you can just write": How do you actually extract the string value of... is that a SymNode in a HiddenDeref node?
11:00:15FromDiscord<Phil> slap a `$` before it and do `$filePath` if it's this construct of HiddenDeref Sym"path" ?
11:00:33FromDiscord<leorize> then you can work on it using a static block, and you can use a macro as a usermode wrapper
11:01:30FromDiscord<vindaar> no, by doing `n[0].strVal` because (as you can see from the `treeRepr` printing) the first child of `n` is an `nnkSym`↵(@Phil)
11:01:32FromDiscord<Phil> In reply to @leorize "the best way to": Other macro? There only is 1 macro:↵`macro addMockPragma(projectPath: static string, filePath: static string): untyped =`, everything else is a compile-time proc
11:02:17FromDiscord<vindaar> (no referring to your slapping a `$` before it)
11:04:39FromDiscord<leorize> have a version of that macro that's a regular proc is what I meant↵(@Phil)
11:05:24FromDiscord<leorize> a proc is infinitely easier to program with
11:07:29FromDiscord<leorize> so you want a macro when you want to emit NimNode that replaces the macro call
11:07:34FromDiscord<Phil> In reply to @vindaar "no, by doing `n[0].strVal`": Turns out that strVal on a symNode gets you the symbol-name as a string, not the value attached, hmmmmm
11:08:21FromDiscord<leorize> in your case you are just using the compiler facilities to do whole-file modifications, so you don't need macros here
11:09:22FromDiscord<vindaar> Ah, certainly. Sorry, I was under the wrong impression of what you actually want / need \:(↵(@Phil)
11:10:01FromDiscord<Phil> In reply to @leorize "in your case you": I'll....errr try and see how far I can get before no longer understanding how to solve my problems, one minute
11:11:15FromDiscord<Phil> Okay, so the proc version works!
11:11:23FromDiscord<Phil> For a single module
11:11:31FromDiscord<Phil> Now I still need to figure out the entire static seq string thing
11:11:50FromDiscord<leorize> it's a proc now
11:11:58FromDiscord<leorize> so just use it like a proc
11:12:07FromDiscord<Phil> sent a code paste, see https://play.nim-lang.org/#ix=4jGq
11:12:37FromDiscord<leorize> just get rid of the statics
11:12:50FromDiscord<vindaar> sent a code paste, see https://play.nim-lang.org/#ix=4jGr
11:13:03FromDiscord<leorize> static is only required when it's a macro
11:13:54FromDiscord<leorize> static on macros is actually a hack using generics to give you the feel of passing actual data around instead of nodes
11:14:33FromDiscord<leorize> I'd avoid it unless you need it, it limits the flexibility of the API
11:14:43FromDiscord<Phil> sent a code paste, see https://paste.rs/lfh
11:14:53FromDiscord<vindaar> sent a code paste, see https://play.nim-lang.org/#ix=4jGt
11:15:00FromDiscord<vindaar> ah, I was too slow 😁
11:15:04FromDiscord<Phil> (edit) "https://play.nim-lang.org/#ix=4jGv" => "https://play.nim-lang.org/#ix=4jGu"
11:15:17FromDiscord<vindaar> might be a hack, but is very convenient sometimes 🤭
11:15:32FromDiscord<Phil> Thanks you guys!
11:15:54FromDiscord<Phil> What's slightly funny is that the entire "read in module, modify ast, write module" completely destroys formatting
11:16:20FromDiscord<leorize> yea, the AST doesn't really care about the input
11:16:26FromDiscord<Phil> sent a code paste, see https://play.nim-lang.org/#ix=4jGw
11:36:16NimEventerNew thread by fzqdoo: Is there a traditional rounding function?, see https://forum.nim-lang.org/t/9766
11:38:08*jmdaemon quit (Ping timeout: 268 seconds)
11:41:09FromDiscord<Prestige> I'm surprised to see out params being added
11:56:11FromDiscord<Prestige> Don't really understand why that's necessary
12:16:39FromDiscord<Phil> Out Params?
12:19:23FromDiscord<Phil> Ohhh parameters that explicitly mark that they're the place where the output will be written to
12:19:51FromDiscord<Phil> I think I like it just for the syntactic clarity of it
12:45:16*ltriant joined #nim
12:50:11*ltriant quit (Ping timeout: 252 seconds)
12:55:05FromDiscord<exelotl> It's for definite assignment analysis↵With a var param you tell the compiler this variable may be modified↵With an out param you tell the compiler this variable _will_ be fully initialized
13:11:29*PMunch joined #nim
13:12:20*ltriant joined #nim
13:17:19*ltriant quit (Ping timeout: 260 seconds)
13:43:01*rockcavera quit (Remote host closed the connection)
14:11:17*rockcavera joined #nim
14:35:21PMunchIs there a way to update all Nimble packages?
14:36:49*ltriant joined #nim
14:39:45*arkurious joined #nim
14:41:56*ltriant quit (Ping timeout: 252 seconds)
15:06:07FromDiscord<Phil> sent a long message, see http://ix.io/4jHv
15:06:41FromDiscord<Phil> (edit) "http://ix.io/4jHv" => "http://ix.io/4jHw"
15:11:29PMunchI haven't followed the discussion, so disregard what I'm saying if it's stupid or has already been discussed. But couldn't you in your test instead of importing modules do a `mockableImport mymodule` which reads the file for the module, transforms it into something you can mock, e.g. with the variable trick, stores the result in some temporary folder, and then imports that?
15:12:36FromDiscord<Phil> In reply to @PMunch "I haven't followed the": But that would just give me mock-symbols in my test, right?↵It wouldn't affect the place where `a()` calls `otherProc()` from OtherModule, because that import happens in `ModuleUnderTest.nim`, right?
15:13:40PMunchWell as long as the mock variable is changed before the invocation of the procedure it should work I believe
15:15:50FromDiscord<Phil> sent a long message, see https://paste.rs/C9m
15:16:08PMunchSomething a bit like this: https://play.nim-lang.org/#ix=4jHy
15:17:39PMunchThere the uncommented `mockImport` call would find `somemodule` and rewrite it to what's above the line in some temporary directory and then import that.
15:19:33PMunchI guess you might have to also replace relevant imports with mockImport in the imported module though if you want to mock deeper than one level
15:19:39FromDiscord<Phil> sent a long message, see http://ix.io/4jHA
15:19:55FromDiscord<Phil> (edit) "http://ix.io/4jHA" => "http://ix.io/4jHB"
15:21:33FromDiscord<Phil> What I'd need to do is have 2 special kinds of import:↵`ModuleUnderTestImport` and `MockImport`.↵`ModuleUnderTestImport` would read in said module, rewrite the import-statements to point to all things in `MockImport` and that'd be it
15:22:02FromDiscord<Phil> And then in your test you no longer test your actual source-code, but the modified version where you rewrote the import statements
15:23:11FromDiscord<Phil> That's a version I could see working, though it involves a bit more effort because `ModuleUnderTestImport`would need to be aware of all `MockImports` in order to rewrite the imports properly
15:23:35FromDiscord<Phil> (edit) "rewrite the imports properly" => "know which import statements in `ModuleUnderTest` need to be rewritten"
16:19:34NimEventerNew thread by DougT: Parallel Fibonacci, see https://forum.nim-lang.org/t/9768
16:19:36FromDiscord<Phil> sent a long message, see https://paste.rs/Sah
16:20:32FromDiscord<Phil> SOmetimes I just take ages to properly understand what people suggest when the field is just strange to me in general ^^'
16:23:11FromDiscord<tyrion> Hello, if I have a `ref` to an array, can I obtain a `ref` to the array containing its last 3 elements?
16:24:32FromDiscord<Phil> In reply to @tyrion "Hello, if I have": You mean a ref to a slice of an array?
16:26:04FromDiscord<tyrion> I guess ... can that be assigned to `ref array[T, float]` though?↵(@Phil)
16:27:16FromDiscord<Phil> Was that also your idea btw jmgomez? Make copies of the modules, modify the imports of the module under test to point to the copied mockable modules and work from there?
16:27:57FromDiscord<Phil> (edit) "modules," => "modules used by module-under-test so that their procs are mockable," | "module under test" => "module-under-test"
16:28:28FromDiscord<jmgomez> sent a long message, see https://paste.rs/E3u
16:29:30FromDiscord<jmgomez> In reply to @Isofruit "Was that also your": Nope, but that could work too
16:31:11FromDiscord<Phil> sent a code paste, see https://play.nim-lang.org/#ix=4jHP
16:31:47FromDiscord<Phil> (edit) "https://play.nim-lang.org/#ix=4jHP" => "https://play.nim-lang.org/#ix=4jHQ"
16:32:02FromDiscord<tyrion> That's why I am using a ref to an array instead of the array directly. So the copying is not a problem but I still need to find a way to shift that pointer as needed eheh↵(@Phil)
16:33:30FromDiscord<Phil> In that case my bad, I work with arrays so rarely, I couldn't even name you the syntax on how to get a ref for an array
16:34:19FromDiscord<Phil> In reply to @jmgomez "Hey Phil, what I": I think this may just go significantly beyond my current macro skill ceiling
16:35:03FromDiscord<Phil> What I'm getting is "read in the procs, modify them before usage to point to other procs, then execute" and that I definitely have not the faintest idea on how to do
16:44:50PMunch@Phil, if you limit the scope to only modules in the current package it would be feasible to simply copy the entire package tree and rewrite all the modules I guess. Then the relative paths would all be the same
16:52:25FromDiscord<BiffBaff64> Could I ask what IDEs or editors people are using for Nim? I want to get started asap.
16:53:12PMunchMany people use VSCode
16:53:16PMunchPersonally I use Vim
16:53:37PMunchI think for VSCode you'd use saems extension and possibly also an LSP client
16:54:11PMunchIn Vim I use zah/nim and LSP with NimLSP
16:55:20FromDiscord<Phil> In reply to @BiffBaff64 "Could I ask what": Intellij, imo it has better autocomplete, though intellij is a smidge slower and in other regards a chonkier IDE than vscode
16:55:48FromDiscord<Phil> Though it really doesn't matter which jetbrains IDE, nim-compatibility comes through a plugin and IIRC they work on all jetbrains IDEs
16:57:18FromDiscord<BiffBaff64> In reply to @Isofruit "Intellij, imo it has": I'm very glad you've said Intellij. Jetbrains IDEs are my favourite ones to use. Is there just one plugin, or can you recommend one?
16:57:34FromDiscord<Phil> just the one
16:58:44FromDiscord<Phil> In reply to @BiffBaff64 "I'm very glad you've": Just so you're aware of the scope:↵It's mostly autocomplete, following symbols to their place of definition by clicking on them (which doesn't always work) and syntax highlighting
16:59:04FromDiscord<Phil> For actual build-task stuff you'll still want to look into how nimble works and likely nimble tasks etc.
16:59:26FromDiscord<Phil> And you also won't be able to set stuff like the version of your nim compiler from within intellij like you can with java
16:59:29FromDiscord<BiffBaff64> In reply to @Isofruit "For actual build-task stuff": Right, thanks 👍
17:03:29FromDiscord<Phil> In reply to @BiffBaff64 "Right, thanks 👍": That's the one you're looking for https://media.discordapp.net/attachments/371759389889003532/1057342968715022406/image.png
17:09:14FromDiscord<BiffBaff64> That's fantastic, many thanks for the help ! Much appreciated 👍
17:24:27FromDiscord<albassort> sent a long message, see https://paste.rs/wtF
17:25:49FromDiscord<Phil> In reply to @albassort "Two things I want": See, I'm more modest, all I want is perfect proc mockability and maybe I'll get there in the next few weeks
17:26:44FromDiscord<tyrion> No worries! thanks anyway \:)↵(@Phil)
17:27:02FromDiscord<Phil> In reply to @tyrion "No worries! thanks anyway": PMunch may though, he does also do array stuff I think!
17:27:13FromDiscord<Phil> And that should've pinged him, the perfect setup
17:27:15FromDiscord<albassort> These are stretch goals, I doubt they'll be easy
17:27:22FromDiscord<tyrion> @Phil\: to obtain a reference to an array you have to create it with new, so what I do is `array[10, float].new()`
17:27:30FromDiscord<albassort> I want to get them done by the end the of year
17:29:28*arkanoid quit (Ping timeout: 265 seconds)
17:31:20FromDiscord<Phil> In reply to @tyrion "<@180601887916163073>\: to obtain a": With that ref I still get the same copy behaviour, so my assumption of "doesn't work" remains my current opinion
17:31:36FromDiscord<EchoPouet> In reply to @Isofruit "That's the one you're": The debugging support is good ?
17:31:56FromDiscord<Phil> Not using the debugging support, couldn't tell you.↵I debug by virtue of the compiler
17:32:17FromDiscord<EchoPouet> Ok
17:32:20FromDiscord<Phil> sent a code paste, see https://play.nim-lang.org/#ix=4jI9
17:32:49FromDiscord<tyrion> the thing is that now `y` is not a ref to an array
17:33:07FromDiscord<tyrion> not sure what is, but it's something else
17:33:19FromDiscord<Phil> Likely it is an actual array instead of a ref to one
17:33:43FromDiscord<Phil> In reply to @PotAuFeu "Ok": Also it's part of the professional versions aka you need to pay money, which I don't, I'm a cheap fuck
17:34:08*ltriant joined #nim
17:34:32FromDiscord<tyrion> @Phil\: `typeof y` shows `seq[int]`
17:34:58FromDiscord<EchoPouet> In reply to @Isofruit "Also it's part of": Arf 😞
17:35:17FromDiscord<tyrion> so, I don't think slices are the correct way to do it
17:35:25FromDiscord<tyrion> probably I need some form of unsafe pointer
17:35:49*wallabra quit (Ping timeout: 252 seconds)
17:35:50FromDiscord<tyrion> let me see if chatgpt knows ahah
17:37:15*wallabra joined #nim
17:37:24*pro joined #nim
17:38:28FromDiscord<tyrion> umh, it just lies, too bad \:'(
17:39:02*ltriant quit (Ping timeout: 252 seconds)
17:47:15FromDiscord<System64 ~ Flandre Scarlet> Is it normal I have this error while compiling to 64 bits? https://media.discordapp.net/attachments/371759389889003532/1057353983183835196/message.txt
17:50:15FromDiscord<auxym> @Phil @tyrion this works, but probably not the prettiest way to achieve whatever you are trying to achieve https://play.nim-lang.org/#ix=4jIe
17:51:20FromDiscord<Phil> In reply to @System64 "Is it normal I": @hotdog I have summoned you, somebody is running into jester compile problems
17:51:34FromDiscord<tyrion> @auxym\: thanks, this is what i am currently doing, now I would like `c` to be a ref to just a subset of the array though
17:52:10FromDiscord<tyrion> My understanding is that I have to resort to `unsafeAddr` and casts ... I will see if I manage to get something working
17:52:13FromDiscord<Phil> That looks like a recursive import issue based on just staring at `In file included from In file included from In file included from`
17:52:38FromDiscord<Phil> But I could be wrong. Are you doing a recursive import (module A imports module B which imports module A) ?
17:53:34FromDiscord<System64 ~ Flandre Scarlet> In reply to @Isofruit "But I could be": I only have one module
17:54:28FromDiscord<System64 ~ Flandre Scarlet> Even more sus : it works on 32-bits
17:54:29FromDiscord<Phil> In that case posting that source-code may help
17:54:32FromDiscord<hotdog> In reply to @Isofruit "<@472459996068839424> I have": I'm unfamiliar with both Jester and compiling on Windows I'm afraid
17:54:52FromDiscord<System64 ~ Flandre Scarlet> sent a code paste, see https://play.nim-lang.org/#ix=4jIg
17:55:33FromDiscord<Phil> This.... works? Isn't that some code being used for a server while other code is used to be JS for a page?
17:55:54FromDiscord<hotdog> @System64 ~ Flandre Scarlet what compiler flags are set in your `compile.sh`?
17:56:11FromDiscord<System64 ~ Flandre Scarlet> In reply to @hotdog "<@380360389377916939> what compiler flags": ``nim compile -r --cpu:i386 --threads:on -d:nimDontSetUtf8CodePage --app:gui main.nim``
17:56:43FromDiscord<System64 ~ Flandre Scarlet> wait a minute
17:56:54FromDiscord<Phil> Wait, this is an issue because neel uses jester, ahhh
17:57:22FromDiscord<System64 ~ Flandre Scarlet> No, the issue was CPU flag
17:58:13FromDiscord<Phil> Nah as in, I was wondering whether he hell the jester bits of the stacktrace came from
17:59:00FromDiscord<auxym> sent a code paste, see https://play.nim-lang.org/#ix=4jIj
17:59:02FromDiscord<auxym> or something like that
17:59:36FromDiscord<auxym> and create your own `[]`. `[]=`, toOpenArray, etc procs for the desired behavior
18:00:10FromDiscord<auxym> (edit) "https://paste.rs/ApI" => "https://paste.rs/r3x"
18:03:50FromDiscord<System64 ~ Flandre Scarlet> Okay I fixed all problems
18:08:19FromDiscord<@thatrandomperson5-6310e3b26da03> Im getting `Invalid Type: openArray[Glob]`. What does this mean?
18:12:25FromDiscord<tyrion> I assume not..?
18:12:27FromDiscord<tyrion> @auxym\: the only thing that seems bad about using unsafe pointers is that, if I understood correctly they are not tracked by the garbage collector... so I could end up with a pointer pointing to nothing. Is there no way to start from a `ref array`, increment the pointer and cast it back to a `ref`?
18:27:03FromDiscord<tyrion> umh, I am digging a hole that is going deep very fast, https://nim-lang.org/docs/destructors.html
18:28:42Amun-Ramhm
18:28:53Amun-Rathat's gc dependent
18:29:19Amun-Rasometimes Nim destructors act just like Python ones
18:30:54FromDiscord<@thatrandomperson5-6310e3b26da03> sent a code paste, see https://play.nim-lang.org/#ix=4jIq
18:31:27FromDiscord<@thatrandomperson5-6310e3b26da03> sent a code paste, see https://play.nim-lang.org/#ix=4jIr
18:32:26FromDiscord<System64 ~ Flandre Scarlet> ``C:\Users\USER\Downloads\palette.pal64`` Do you know how I can get the ".pal64" string from this string please?
18:37:30Amun-Ratoo vague for me
18:42:43termerhttps://nim-lang.org/docs/os.html#splitFile%2Cstring
18:42:45termerUse this
18:49:42FromDiscord<System64 ~ Flandre Scarlet> Ah yeah, I used that, it works fine↵Thanks
18:51:20FromDiscord<auxym> In reply to @tyrion "<@882793909246369864>\: the only thing": No, refs in nim can only be created by creating a new allocation with (`new`) or assigning from an existing ref, you can't modify the underlying pointer. And yes, the main risk with raw pointers, in your case, is use-after-free (trying to use the pointer after the GC has destroyed the reference)
18:53:31FromDiscord<auxym> In reply to @@thatrandomperson5-6310e3b26da03 "> Im getting `Invalid": it sounds like maybe the Glob type isn't accessible in the scope that function is defined in?
18:57:36FromDiscord<@thatrandomperson5-6310e3b26da03> Glob from here\: https://github.com/haltcase/glob/blob/64f71af2fa4572c2bdf8987a56a427c1d88fc34f/src/glob.nim#L152↵(@auxym)
18:57:41FromDiscord<@thatrandomperson5-6310e3b26da03> should be public
18:58:51FromDiscord<@thatrandomperson5-6310e3b26da03> And wouldn’t that be undeclared identifier not invalid type?
19:01:32FromDiscord<Phil> Do we have a convenience function that writes a file to a path come what may, essentially creating the directories if they aren't there?
19:01:46FromDiscord<Phil> Because `writeFile` isn't it
19:02:30FromDiscord<demotomohiro> I have never seen such a procedure in stdlib.
19:02:53FromDiscord<Phil> Basically if only `/tmp` exists and I want to write to `/tmp/potato/yehaw/bla.txt` then it just creates the necessary directories
19:03:16FromDiscord<Phil> Some bash commands do it, so I had faint hopes that nim maybe does as well
19:04:05FromDiscord<demotomohiro> iirc, os.mkdir creates all necessary directories.
19:11:14FromDiscord<demotomohiro> sent a long message, see https://paste.rs/VfJ
19:12:56FromDiscord<auxym> In reply to @@thatrandomperson5-6310e3b26da03 "should be public": yes, if you import it 🙂
19:13:50FromDiscord<auxym> but you're right it might have been undeclared identifier,
19:14:04FromDiscord<auxym> no idea what it could be otherwise
19:17:37FromDiscord<@thatrandomperson5-6310e3b26da03> > but you're right it might have been undeclared identifier,↵I found the issue, there was an openarray in a type def on a completely different line. So i guess the compiler was confused
19:18:37FromDiscord<Phil> In reply to @demotomohiro "I think you can": Sadly you can't use mkdir at compile time
19:18:40FromDiscord<Phil> Which is highly annyoing
19:18:43FromDiscord<Phil> (edit) "annyoing" => "annoying"
19:19:02FromDiscord<Phil> You can write files at compile time though, which is confusing
19:22:12FromDiscord<Phil> Okay, so I have to read in and parse code and that has to happen because parsing code into nodes must happen at compile time
19:22:30FromDiscord<Phil> But I also need to create directories in order to move files from one directory to another and that may not have set up subdirectories
19:22:44FromDiscord<Phil> (edit) "Okay, so I have to read in and parse code and that has to happen ... because" added "at compileTime"
19:24:01FromDiscord<Phil> sent a long message, see http://ix.io/4jII
19:24:26FromDiscord<Phil> (edit) "http://ix.io/4jII" => "https://paste.rs/AGB"
19:25:07FromDiscord<demotomohiro> https://nim-lang.org/docs/nimscript.html#mkDir%2Cstring↵Did you try `mkdir` in nimscript module to create directory at compile time.
19:25:08*xet7 quit (Remote host closed the connection)
19:25:56FromDiscord<Phil> Actually fair point, I likely should be doing this in nimscript... Can you import procs defined in nimscript into normal nim files?
19:27:09FromDiscord<Phil> Actually nevermind, I think it makes more sense that if you have a nimble task for testing, that that task first triggers that nimscript, then triggers the test-suite
19:31:41FromDiscord<Phil> Can I make it so that a nimscript file my package defines can be executed by people importing my package?
19:32:25FromDiscord<Phil> The entire thing I defined above with copying files around and modifying them etc., I want to be able to write that for my users and they just need to execute the script
19:38:49*pro quit (Quit: pro)
19:38:52FromDiscord<@thatrandomperson5-6310e3b26da03> What lib should i use for async and can anyone recommend a tutorial
19:43:53FromDiscord<demotomohiro> Here is ayncnet tutorial↵https://xmonader.github.io/nimdays/day15_tcprouter.html
19:51:44FromDiscord<@thatrandomperson5-6310e3b26da03> > Here is ayncnet tutorial↵> https://xmonader.github.io/nimdays/day15_tcprouter.html↵It seems to be a tcprouter tutorial, not an asyncdispatch one
20:16:37*xet7 joined #nim
20:25:03FromDiscord<@thatrandomperson5-6310e3b26da03> What is the default config for the test task
20:36:05*wallabra_ joined #nim
20:37:58*wallabra quit (Ping timeout: 265 seconds)
20:37:59*wallabra_ is now known as wallabra
20:40:35FromDiscord<JeysonFlores> What's the difference between "echo" and "stdout.write/writeLine"?
20:41:29Amun-Raecho always ends with end-of-line
20:42:09FromDiscord<JeysonFlores> But stdout.writeLine does the same thing isn't it?
20:42:24Amun-RaI guess, I've never used it
20:43:06Amun-RaI treat stdout.write as echo without \n and flush
20:43:39FromDiscord<geekrelief> In reply to @Isofruit "Sadly you can't use": I pushed a PR for createDir at compile time
20:44:11Amun-RacreateDir @ ct sounds weird at least
20:44:27FromDiscord<vindaar> `echo` is your generic "print to stdout" proc. `stdout.writeLine` explicitly takes a FD (in this case `stdout`, predefined for your convenience) and writes the argument with a `\n` at the end. `echo` further takes a variable number of arguments, which are all autoconverted to strings for you using their respective `$`. `writeLine` just accepts a string.
20:47:09FromDiscord<JeysonFlores> In reply to @vindaar "`echo` is your generic": Oh so basically echo is a convenience function around stout
20:47:47FromDiscord<JeysonFlores> (edit) "stout" => "stdut"
20:47:50Amun-Rayes, echo accepts varags, write one arg - strin
20:47:52Amun-Rag
20:47:53FromDiscord<JeysonFlores> (edit) "stdut" => "stdout"
20:49:05FromDiscord<guttural666> any way to print out or concat a regex to a string? https://media.discordapp.net/attachments/371759389889003532/1057399744919523388/image.png
20:54:41FromDiscord<Elegantbeef> @JeysonFlores\: also worth noting `echo` is threadsafe
20:59:03FromDiscord<Elegantbeef> Regex expressions are compiled dynamically, they're not compile time only
20:59:21FromDiscord<Elegantbeef> `std/re` and `std/nre` cannot be used at compile time as they're actually using PCRE
20:59:43FromDiscord<Elegantbeef> Afaik there is no way to get the pattern back from a regex
21:00:16*ltriant joined #nim
21:02:07FromDiscord<Phil> In reply to @geekrelief "I pushed a PR": Nice! Thanks! Looking forward to when its merged
21:02:11FromDiscord<Phil> Now, next question into the round
21:03:27NimEventerNew post on r/nim by inv2004: ttop - System monitoring tool with TUI and historical data service, see https://reddit.com/r/nim/comments/zwq329/ttop_system_monitoring_tool_with_tui_and/
21:04:24FromDiscord<Phil> sent a code paste, see https://play.nim-lang.org/#ix=4jJa
21:04:44FromDiscord<Elegantbeef> Welcome to the hell that is vmops defined inside `std/os`
21:04:53FromDiscord<Phil> Which is confusing to me, since std/os should be working in nimscript according to official docs:↵https://nim-lang.org/docs/nims.html https://media.discordapp.net/attachments/371759389889003532/1057403724584198266/image.png
21:05:56FromDiscord<Phil> But.... gosh darnit do I have to resort to a flipping python script to copy these flipping src files from one folder to another at compiletime?
21:06:12FromDiscord<Elegantbeef> Ugh python
21:06:36FromDiscord<Phil> I'd prefer nimscript too but apparently nothing is working
21:06:36FromDiscord<Elegantbeef> See there are multiple dialects of nimscript
21:06:40FromDiscord<Elegantbeef> There is the compile time nimscript, there is the standalone nimscript
21:07:03FromDiscord<Elegantbeef> standalone nimscript is supposed to use procedures inside the `nimscript` module
21:07:15FromDiscord<Phil> I need, within the same nimscript file, to read in a module-file, parse it into a nimnode, manipulate that nimnode and write that manipulated nimnode into a new module file into a different folder
21:07:50FromDiscord<Phil> And I want to preserve the subdirectory hierarchy and since I can't write to a file into a subdir when that subdir doesn't exist I first need to create all the subdirs if they aren't there
21:08:52FromDiscord<Phil> In reply to @Elegantbeef "There is the compile": I'll try out standalone nimscript then.↵I've seen the docs for the nimscript module, I assume I can just "import nimscript" there?
21:09:21FromDiscord<guttural666> In reply to @Elegantbeef "Afaik there is no": thanks for the info
21:09:56FromDiscord<Elegantbeef> You dont need to import nimscript module for standalone nimscript
21:10:44FromDiscord<Elegantbeef> guttural what are you searching for anywho?
21:10:57FromDiscord<Elegantbeef> I'm a bit daft when it comes to regex and always avoid it unless i actually need it
21:34:56FromDiscord<Phil> In reply to @Elegantbeef "You dont need to": Through the power of mkdir in the nimscript module it was made possible
21:35:27FromDiscord<auxym> In reply to @Isofruit "I'll try out standalone": it's automatically imported when running in the vm, like system
21:35:59FromDiscord<Phil> I still had to use some of std/os for recursive traversal of the src directory, but I could circumvent some of my issues at least
21:36:02FromDiscord<Elegantbeef> There you go
21:36:45FromDiscord<Elegantbeef> This is were i say "Well technically it's not, it's just the in the shipped VM" 😛↵(@auxym)
21:37:01*ltriant quit (Quit: leaving)
21:37:12FromDiscord<Elegantbeef> If you use the VM directly you do not get the nice imports automatically 😄
21:42:21FromDiscord<JeysonFlores> Is it wise to buy the book of "Mastering Nim" right now? It seems that Nim 2 is gonna be available soon.
21:43:31FromDiscord<Elegantbeef> Nim 1 and 2 are very similar
21:44:07FromDiscord<Elegantbeef> They're actually not that different, there's pretty much just new features in 2
21:44:09FromDiscord<Elegantbeef> I dont have the book so cannot say whether it's worth it
21:47:42FromDiscord<Phil> In reply to @JeysonFlores "Is it wise to": The changes aren't really on the syntactical front.↵Any important information in that book will carry over.↵The main difference is that any chapters talking about details around refc (if there are any) are unlikely to be that relevant to you anymore.↵You can still use refc for memory management, it's just no longer the default
21:56:55FromDiscord<@thatrandomperson5-6310e3b26da03> How do i set the return value of an async function
22:00:46FromDiscord<Phil> In reply to @Elegantbeef "There you go": So basically to use nimscript:↵Use whatever, and when you brush up on one of the evil procs in os just use whatever equivalent the nimscript module provides
22:03:02FromDiscord<@thatrandomperson5-6310e3b26da03> `return` and `result =` don’t seem to work
22:03:13FromDiscord<Elegantbeef> Correct phil
22:03:31FromDiscord<Elegantbeef> Sadly the VMops override `os` module instead of a `vmops` module
22:03:53FromDiscord<Elegantbeef> Which means you cannot use `os` when the target doesnt support it even if the host does
22:05:45FromDiscord<Elegantbeef> sent a code paste, see https://play.nim-lang.org/#ix=4jJl
22:08:58*ltriant joined #nim
22:09:50*nick2 joined #nim
22:11:50FromDiscord<@thatrandomperson5-6310e3b26da03> Thanks
22:22:10PMunch@Elegantbeef, that's such an annoying limitation..
22:26:12FromDiscord<System64 ~ Flandre Scarlet> Is it normal I have this compiling error? https://media.discordapp.net/attachments/371759389889003532/1057424185095372830/message.txt
22:26:48FromDiscord<Elegantbeef> I dont see any errors
22:26:52FromDiscord<Elegantbeef> Those are warnings so yes
22:27:19FromDiscord<System64 ~ Flandre Scarlet> In reply to @Elegantbeef "I dont see any": The very latest line
22:27:29FromDiscord<System64 ~ Flandre Scarlet> > C:\nim-1.6.4\lib\pure\asyncmacro.nim(200, 31) Error: 'handleFrontEndDataIter' is not GC-safe as it calls 'callProc'
22:28:08FromDiscord<Elegantbeef> Yes a procedure is supposed to be `gcSafe`
22:29:04PMunchHow can I make a path relative to the current file?
22:29:13FromDiscord<System64 ~ Flandre Scarlet> In reply to @Elegantbeef "Yes a procedure is": and how can I fix it?
22:29:32PMunchWhen I run `nimble test` it tries to look for a path used with readFile in the root directory and not the test directory
22:29:42FromDiscord<System64 ~ Flandre Scarlet> sent a code paste, see https://paste.rs/lNr
22:29:50FromDiscord<Phil> In reply to @PMunch "How can I make": I'm not 100% what exactly you mean, but when it comes to relative paths you could use std/os ` relativePath`?
22:30:16FromDiscord<Phil> Which would still require you to figure out the current files filepath
22:30:17FromDiscord<Phil> hmmm
22:30:59PMunchI have a macro which reads a file, I call this macro in a test and give it the name of the file I want to read. But readFile tries to read that file relative from the current directory, which when run with `nimble test` is the root directory of the nimble project
22:32:18Amun-Raand you know the diff
22:37:05*wallabra_ joined #nim
22:38:19*wallabra quit (Ping timeout: 265 seconds)
22:38:20*wallabra_ is now known as wallabra
22:38:57FromDiscord<guttural666> std/re standard expression manual says I should use raw strings (r"pls") instead of strings, but what is that type, how do I pass that to my function here https://media.discordapp.net/attachments/371759389889003532/1057427392307679382/image.png
22:39:21FromDiscord<guttural666> (edit) "here" => "here; or how do I convert a string to a raw string"
22:39:29Amun-Rathe type is string
22:39:47Amun-Rait only differs in how it escapes
22:40:06FromDiscord<guttural666> having problems with providing a search term like "$search"
22:40:29*ltriant quit (Ping timeout: 260 seconds)
22:41:33Amun-Rar"\$search"?
22:41:55Amun-Ra== "\\$search"
22:42:02FromDiscord<guttural666> yes, literally an item named $item1
22:42:34Amun-Ra"[$]search" should also match
22:43:01*ltriant joined #nim
22:43:06FromDiscord<guttural666> I'm trying to replace all $ with \$
22:43:18FromDiscord<guttural666> $ with backslash $
22:44:03FromDiscord<guttural666> the user is only allowed wildcards with , everything else should be escaped, that's my issue
22:45:05FromDiscord<guttural666> what I'm working with rn https://media.discordapp.net/attachments/371759389889003532/1057428940232339597/image.png
22:47:43FromDiscord<System64 ~ Flandre Scarlet> ``C:\nim-1.6.4\lib\pure\asyncmacro.nim(200, 31) Error: 'handleFrontEndDataIter' is not GC-safe as it calls 'callProc'`` Wgy do I still have this while I disabled GC???
22:48:08PMunchDamn it.. I tried creating a wrapper template that called `currentSourcePath`, but that still just gives me the imported module..
22:48:40FromDiscord<guttural666> this does not work (invalid character constant?) https://media.discordapp.net/attachments/371759389889003532/1057429836177604658/image.png
22:50:14*ltriant quit (Ping timeout: 272 seconds)
22:50:42FromDiscord<Phil> In reply to @PMunch "Damn it.. I tried": Actually, should you find a solution, please ping enthus1ast, IIRC he's running into a slightly similar issue with nimja where a path needs to be adjusted based on whether it is part of the main package that is currently being compiled or whether nimja template stuff is being compiled as part of a library package
22:50:49*wallabra_ joined #nim
22:51:48*wallabra quit (Ping timeout: 252 seconds)
22:51:49*wallabra_ is now known as wallabra
22:53:04PMunchHe should probably be made aware of the new `setLineInfo` anyways
22:53:18PMunchUseful for templates
22:53:23FromDiscord<Elegantbeef> `\$` is not a valid character
22:53:25FromDiscord<Elegantbeef> you likely want `\\$`
22:57:51FromDiscord<JeysonFlores> sent a long message, see https://paste.rs/gsg
22:58:35FromDiscord<Elegantbeef> sent a code paste, see https://paste.rs/Z3J
22:58:45FromDiscord<JeysonFlores> (edit) "http://ix.io/4jJy" => "https://paste.rs/uH1"
22:59:09FromDiscord<JeysonFlores> Seems legit. Thanks
23:01:26FromDiscord<Phil> In reply to @JeysonFlores "If I want to": Personally I rather like `return` as explicit statement of "I'm returning early"
23:01:49FromDiscord<guttural666> In reply to @Elegantbeef "you likely want `\\$`": interesting thanks, can you explain that?
23:06:31*jmdaemon joined #nim
23:07:27*ltriant joined #nim
23:07:44FromDiscord<JeysonFlores> sent a long message, see http://ix.io/4jJC
23:08:06FromDiscord<JeysonFlores> In reply to @JeysonFlores "Actually I think this": Producing unnecessary nesting
23:13:14PMunchThis seems like something which should be easy..
23:13:27PMunchI just want to get a file relative to the file I'm currently in..
23:13:47*wallabra quit (Quit: ZNC 1.8.2 - https://znc.in)
23:14:18*ltriant quit (Ping timeout: 272 seconds)
23:16:30*wallabra joined #nim
23:16:49FromDiscord<Elegantbeef> https://nim-lang.org/docs/os.html#relativePath%2Cstring%2Cstring
23:18:40FromDiscord<Elegantbeef> Oh wait you mean at compile time?
23:18:42*jkl quit (Quit: Gone.)
23:19:34*jkl joined #nim
23:19:47FromDiscord<enthus1ast> Will have a look↵(<@709044657232936960_=50=4dunch=5b=49=52=43=5d>)
23:26:27*ltriant joined #nim
23:34:22PMunch@Elegantbeef, well the problem is I have no way of getting the currently compiling unit from within a macro defined in another module..
23:38:24*ltriant quit (Ping timeout: 268 seconds)
23:50:54NimEventerNew thread by yister: Creating const in a macro fails in 1.9.1, see https://forum.nim-lang.org/t/9769
23:53:15PMunchHmm, apparently lineinfo is sometimes able to get me what I need
23:55:34PMunchAh never mind, I was doing it wrong..