<< 30-05-2022 >>

01:05:04*vicfred quit (Quit: Leaving)
01:09:26*vicfred joined #nim
01:14:27*noeontheend quit (Ping timeout: 240 seconds)
01:24:09FromDiscord<!Patitotective> what do you guys think about a _development dependencies_ for a nimble package? to specify dependencies that might be useful for dev but actually not needed in the _release_ package
01:24:31FromDiscord<!Patitotective> (edit) removed "a" | "dev" => "development"
01:28:14*resumin quit (Ping timeout: 252 seconds)
01:29:29*noeontheend joined #nim
01:36:26*rockcavera joined #nim
01:36:26*rockcavera quit (Changing host)
01:36:26*rockcavera joined #nim
02:44:23FromDiscord<Prestige> I believe it's been brought up many times, but is not supported
02:44:56*vicecea quit (Remote host closed the connection)
02:45:20FromDiscord<!Patitotective> In reply to @Avahe "I believe it's been": i mean, a feature to add
02:45:38FromDiscord<Prestige> Yeah it's been requested, I'd appreciate the feature
02:45:54*vicecea joined #nim
02:47:29FromDiscord<!Patitotective> In reply to @Avahe "Yeah it's been requested,": do you have the issue or PR where it has been requested? 👀
02:57:13*arkurious quit (Quit: Leaving)
03:00:43FromDiscord<Prestige> Can't find it atm
03:02:23FromDiscord<!Patitotective> as a workaround i could create a nimble task to do that
03:04:10FromDiscord<Prestige> https://github.com/nim-lang/nimble/issues/506
03:53:27FromDiscord<proton> Anyone knows this issue: Nim\lib\pure\httpclient.nim(335, 12) Error: cannot evaluate at compile time: defaultSslContext
03:53:50FromDiscord<Elegantbeef> You're attempting to use something at compile time that cannot be due to C interop
04:10:43*rockcavera quit (Remote host closed the connection)
04:19:58*pch joined #nim
04:21:17*pch_ quit (Ping timeout: 244 seconds)
05:51:50*noeontheend quit (Ping timeout: 246 seconds)
05:52:01FromDiscord<Bung> sent a code paste, see https://play.nim-lang.org/#ix=3YW4
05:52:27FromDiscord<Bung> wached: TableRef[string, WatchCallback]
05:53:04FromDiscord<Elegantbeef> You're calling it with the wrong call
05:53:21FromDiscord<Elegantbeef> `<tuple[action: WatchEventKind]>` `WatchEvent`
05:54:17*noeontheend joined #nim
05:54:37FromDiscord<Bung> oh ,it complain about argument
05:56:50FromDiscord<,.,.,.,.,.> hey
05:56:58FromDiscord<huantian> hey
05:57:08FromDiscord<,.,.,.,.,.> is it possible to write web interfaces in nim using wasm?
05:57:44FromDiscord<Elegantbeef> It supports emscripten and nlvm exists so yes
05:57:47FromDiscord<huantian> I’d think so yeah
05:57:57FromDiscord<Elegantbeef> If you can do it with C you can do it with Nim
05:58:10FromDiscord<,.,.,.,.,.> i'll find something to make frontends with it
06:00:41FromDiscord<Elegantbeef> What do you mean make frontends with it?
06:04:18FromDiscord<,.,.,.,.,.> In reply to @Elegantbeef "What do you mean": because i'm too stupid to use karax i'm trying for alternatives
06:05:02FromDiscord<Elegantbeef> Why do you think you're too stupid to use karax
06:05:06FromDiscord<Elegantbeef> Perhaps you just need to leanr more
06:05:13FromDiscord<,.,.,.,.,.> i've been trying for like 4 months
06:05:26FromDiscord<Elegantbeef> Have you asked in here?
06:06:15FromDiscord<,.,.,.,.,.> i asked in the telegram group
06:06:45FromDiscord<Elegantbeef> That doesnt have me! 😛
06:06:52FromDiscord<huantian> They have stickers tho!!!
06:06:55FromDiscord<Elegantbeef> I kid, but no clue how active it is
06:07:01*PMunch joined #nim
06:13:53FromDiscord<retkid> https://media.discordapp.net/attachments/371759389889003532/980715652778180688/unknown.png
06:14:14FromDiscord<Elegantbeef> Why are you threading downloads
06:14:24FromDiscord<Elegantbeef> Nim has async...
06:14:24FromDiscord<retkid> I always do this
06:14:24FromDiscord<Phil> Out of curiosity, are docker containers actually used for anything other containers of servers?
06:14:26FromDiscord<retkid> because
06:14:34FromDiscord<retkid> i know threading and dont know much asnyc
06:14:36FromDiscord<retkid> (edit) "asnyc" => "async"
06:14:41FromDiscord<retkid> this was faster for a simple thing
06:14:42FromDiscord<Elegantbeef> Well time to learn
06:14:56FromDiscord<Elegantbeef> Docker is useful for repeatable protable builds
06:15:15FromDiscord<retkid> also is the ref threads a good way of instantiating an empty thread?
06:15:16FromDiscord<Elegantbeef> Not that i've used it for such
06:16:11FromDiscord<Elegantbeef> What?
06:16:12FromDiscord<Elegantbeef> Also there is `joinThreads`
06:16:34FromDiscord<Phil> In reply to @Elegantbeef "Docker is useful for": I have no idea on the performance overhead it adds but I sort of just assume that where people want performance they wouldn't use it
06:16:56PMunchPerformance will be pretty good
06:17:04FromDiscord<Rika> In reply to @Isofruit "I have no idea": Performance is not impacted bad
06:17:09FromDiscord<Rika> Storage is though 😉
06:19:19FromDiscord<Phil> In reply to @Rika "Storage is though 😉": People use electron apps, i have given up on believing that matters when your app size is measured in megabytes
06:19:56FromDiscord<retkid> In reply to @Elegantbeef "Also there is `joinThreads`": Won’t worry on an array of references
06:20:05FromDiscord<Phil> But either way good to know that there are non webdev usecases! Thanks everyone!
06:20:10FromDiscord<retkid> (edit) "worry" => "work"
06:54:40*noeontheend quit (Ping timeout: 258 seconds)
07:00:10*ltriant quit (Ping timeout: 240 seconds)
07:01:18*noeontheend joined #nim
07:13:09*gsalazar joined #nim
07:31:22FromDiscord<vegai> Docker's performance hit on Linux is \~1% though
07:37:43FromDiscord<Rika> ? Yes we said it isn’t a big impact
07:40:38FromDiscord<Turgut> sent a long message, see https://paste.rs/cs5
07:41:12FromDiscord<Turgut> @Rika You helped me out yesterday, so maybe you know a little something about the above 🙂 Thanks if so
07:41:39FromDiscord<Rika> Types do not exist on runtime
07:41:57FromDiscord<Elegantbeef> Macros provide you with more than enough flexibility to not need runtime reflection
07:42:04FromDiscord<Rika> Runtime type information is only made for OOP objects
07:42:11FromDiscord<Elegantbeef> Since you care about runtime reflection are you from C# by any chance?
07:42:25FromDiscord<Turgut> No, I'm from languages like Pharo and Lisp
07:42:35FromDiscord<Turgut> Scala too
07:42:51FromDiscord<Rika> Why come here from Lisp lmao
07:42:57FromDiscord<Elegantbeef> There isnt much need for runtime reflection when you can introspect your code statically
07:43:09FromDiscord<Elegantbeef> Like what have you used runtime reflection for before?
07:43:23FromDiscord<Turgut> For example, I might want to access the runtime stack of Nim
07:43:32FromDiscord<Rika> ?
07:43:46FromDiscord<Turgut> I might want to redefine a function at run-time
07:43:56FromDiscord<Rika> You cannot?
07:44:02FromDiscord<Rika> I mean, you can’t from what I know
07:44:26FromDiscord<Rika> Unless you explicitly use functions as values and put them in a variable
07:45:14FromDiscord<Turgut> Does Nim have anything comperable to a metaclass?
07:45:46FromDiscord<Rika> We don’t know what that is, mind describing
07:46:01FromDiscord<Turgut> Sure
07:46:23FromDiscord<Rika> Or link a description whichever is easier
07:46:29FromDiscord<Turgut> Okay 🙂
07:47:49FromDiscord<huantian> You can probably do the same stuff as metaclasses with macros as type pragmas, if you mean like the python definition of metaclass
07:48:12FromDiscord<Turgut> In short, its a reification of language internals that base level programmers do not care about. It allows one to look at, and modify, methods that you usually do not need. An example could be the method `new` or `didNotUnderstand` in OO languages, that are accessible through metaclasses
07:48:55FromDiscord<Turgut> In reply to @huantian "You can probably do": I explored macros, but I'm not sure what type pragmas are
07:49:04FromDiscord<Rika> They’re just macros applied to a type
07:49:26FromDiscord<Rika> Macros can be applied two ways, by normal calls or by pragma
07:50:46FromDiscord<Rika> I’m still not very sure what a meta type does exactly. It allows you to modify constructors and other stuff?
07:51:12FromDiscord<huantian> How I’ve understood metaclasses is they allow you to define how classes are made
07:51:24FromDiscord<Turgut> In reply to @huantian "How I’ve understood metaclasses": this is closer to it I would say
07:51:33FromDiscord<huantian> In the same way that a class defines how an object is made
07:51:40FromDiscord<Turgut> yes
07:51:44FromDiscord<Turgut> so for example you might defined
07:51:54FromDiscord<Turgut> `class Banana ↔ def m() = ...`
07:52:01FromDiscord<huantian> (edit) "In the same way that a class defines how an object is ... madeand" added "made↔So if it’s both" | "made↔So if it’s bothmade ... " added "and how it works"
07:52:03FromDiscord<Turgut> now you invoke m on a Banana
07:52:12FromDiscord<huantian> (edit) "In the same way that a class defines how an object is made↔So if it’s both ... made" added "how it’s"
07:52:12FromDiscord<Turgut> however, where is new Banana implemented?
07:52:30FromDiscord<Turgut> thats probably in the metaclass of Banana
07:52:56FromDiscord<Turgut> assuming that such a metaclass is provided to us, through a reification
07:53:07FromDiscord<Rika> Nim doesn’t have strong OOP so it’s hard to translate the idea
07:53:33FromDiscord<Rika> You can’t override the “default” procedure (the procedure that provides the default value of all types)
07:53:34FromDiscord<Turgut> Where is function application defined? Can I instrument it?
07:53:55FromDiscord<Turgut> Can I access the compiler as a first-class value?
07:54:11FromDiscord<Rika> No I don’t think so?
07:54:25FromDiscord<Turgut> From my look at the documentation, I don't think so either
07:54:40FromDiscord<Turgut> It seems metaprogramming & reflection, especially reflection, is not very present in Nim
07:54:41FromDiscord<Elegantbeef> No the compiler cannot be accessed as an object, you can use macros as a high level compiler API
07:54:49FromDiscord<Turgut> In reply to @Elegantbeef "No the compiler cannot": thanks!
07:54:54FromDiscord<Elegantbeef> You cant really reflect a natively compiled program that easily
07:55:26FromDiscord<Elegantbeef> Nor do i think it's overly beneficial but i'm biased
07:55:29FromDiscord<Turgut> In Scheme or Racket, I can redefined function application, as it is simply a macro
07:55:50FromDiscord<Turgut> so the default `(function arg1 arg2 ...)` can be overwritten
07:55:59FromDiscord<Elegantbeef> Are they natively compiled statically typed languages?
07:56:10FromDiscord<huantian> In reply to @Turgut "It seems metaprogramming &": Metaprogramming is a program that writes or modifies program language. Which is exactly what macros are in Nim
07:56:10FromDiscord<Turgut> no, they are dynamically typed languages
07:56:19FromDiscord<Elegantbeef> Yea there's the difference
07:57:07FromDiscord<Elegantbeef> Nim is much more like C/C++/Rust than racket/scheme
07:57:18FromDiscord<Turgut> I think this is great stuff for my essay. Thanks very much.
07:57:20FromDiscord<Turgut> I'll get back to work 🙂
07:57:35FromDiscord<Elegantbeef> You can of course do a lot of magic with macros
07:57:44FromDiscord<Elegantbeef> But it's reasoned statically
07:58:04FromDiscord<Elegantbeef> The Nim way of changing how a procedure works would be to take a procedure as an argument
07:58:26FromDiscord<Elegantbeef> This way you can provide a procedure which can be a closure and invoke it where it needs to be
07:58:35FromDiscord<Turgut> Yes, higher-order programming
07:58:46FromDiscord<Elegantbeef> I dont use big words so sure
07:58:58FromDiscord<Turgut> what you are describing is called higher-order programming
07:59:04FromDiscord<Turgut> it follows from the fact that closures are first-class values
07:59:04FromDiscord<Elegantbeef> Ok sure
07:59:32FromDiscord<Elegantbeef> I'll skip the proper name, if i wanted to know it i'd have attended a CS class 😛
07:59:42FromDiscord<Turgut> haha 🙂 sure
08:00:53FromDiscord<Elias> How can I read the windows Path variable in Nim? Is it just a environment var or a registry thing? (come from linux)
08:01:16FromDiscord<Rika> Environment variable
08:01:26FromDiscord<Rika> I don’t know how those are read though
08:01:38FromDiscord<Elegantbeef> `std/os` `getEnv` and `putEnv`
08:01:50FromDiscord<Elias> Nice, thanks
08:02:17FromDiscord<Elegantbeef> Think it might be `Path`
08:02:19FromDiscord<Rika> I’ve seen a distinction between system and user env vars in windows though
08:02:32FromDiscord<Rika> Not sure how that is handled
08:04:10FromDiscord<huantian> In reply to @Elegantbeef "But it's reasoned statically": Honestly this is the main thing, instead of overriding a method that the lang uses internally, you rewrite the code that the programmer writes directly
08:06:14FromDiscord<Elias> In reply to @Rika "Not sure how that": Ill experiment a bit and see how it works. I am trying to automatically retreive a path to the clang dynamic library (wherever it is installed on windows) and think the only robust way on windows is to require clang to be added to path and then misuse the path variable to find the lib folder.
08:16:30FromDiscord<Elegantbeef> Yea i've never personally went "Shucks i dont have runtime reflection"
08:16:32FromDiscord<Elegantbeef> I used it a bit in C# and it's fucking god awful and full of hacks ime
08:18:48FromDiscord<Rika> Prolly a very different story in Pharo
08:32:25*PMunch quit (Quit: leaving)
08:32:34FromDiscord<exelotl> In reply to @Elegantbeef "Yea i've never personally": personally I've had the opposite lol - "goddamnit why is this RTTI being generated, every time I introduce a new subclass it eats up more of my 32KiB of RAM"
08:40:34NimEventerNew thread by Dxb: Are user defined pragmas permitted in a let section with Nim 1.6?, see https://forum.nim-lang.org/t/9185
09:04:01*ltriant joined #nim
09:17:27*dtomato quit (Ping timeout: 260 seconds)
09:41:33*jjido joined #nim
10:03:47FromDiscord<luteva> is there a "minimal runtime" for executing nimscripts? Or do i have to install "the whole stuff"?
10:04:22*jjido quit (Quit: My MacBook Air has gone to sleep. ZZZzzz
)
10:04:53FromDiscord<luteva> so, what is needed to execute nimscripts? i mean the debugger etc. (coming with the default installation) shouldn't be needed, right?
10:05:34FromDiscord<luteva> or do i just have to have the nim excutable?
10:42:53FromDiscord<Yepoleb> I'm trying to install nimlsp and i have nim installed through the package manager, so i need to specify `-d:explicitSourcePath=PATH`. I can get the package to build using `nimble build -d:explicitSourcePath=~/.local/lib/nim-1.6.6 --path:~/.local/lib/nim-1.6.6` but those parameters do not get passed correctly when using the install or run command, the paths are undefined again. How do i fix that?
10:55:00NimEventerNew thread by Arnetheduck: Nim-snappy, faster and simpler, see https://forum.nim-lang.org/t/9186
10:55:03*PMunch joined #nim
10:55:36*noeontheend quit (Ping timeout: 276 seconds)
11:09:27FromDiscord<untoreh> sent a code paste, see https://paste.rs/JMp
11:11:03PMunch@untoreh, maybe try with Futhark instead?
11:35:00FromDiscord<Turgut> what is the difference between templates and macros in Nim?
11:36:02PMunch@Turgut, templates are simple AST-replacement things. Macros are complex AST modifiers
11:43:42*jmdaemon quit (Ping timeout: 276 seconds)
11:51:38FromDiscord<planetis> in macros you work with AST you traverse the input tree and generate a new one.
11:55:30FromDiscord<Turgut> And does Nim have splicing in its macros?
12:01:09FromDiscord<Rika> technically? you can get the implementation of a procedure and modify the insides, but you cannot set it back into the proc you took it from
12:01:18FromDiscord<Rika> not that i know
12:02:01FromDiscord<Rika> there are also term rewriting macros which can, but theyre not well tested and you'll still have the issue of choosing an appropriate term to "hook" into that would only catch the specific proc you want
12:02:48FromDiscord<Rika> im assuming splicing is similar to what aspect-based programming uses
12:28:33FromDiscord<ynfle> In reply to @Rika "*technically?* you can get": You can have a macro as a pragma on the proc definition and can modify it contents and output a different proc body definition for the same signature
12:30:30FromDiscord<ynfle> In reply to @Turgut "what you are describing": No, that's different. Macros don't work off of closures, closures are at runtime. Macros can take a function definition and modify actual code (well not really modify)
12:31:46*jjido joined #nim
12:33:21FromDiscord<rishav> If I want to use orc, do I need to make any changes in my code or will just any nim cod work with the command line switch? The blog post on orc doesnt says
12:35:58*rockcavera joined #nim
12:35:58*rockcavera quit (Changing host)
12:35:58*rockcavera joined #nim
12:36:16FromDiscord<ynfle> Should just work
12:36:38FromDiscord<Rika> In reply to @ynfle "You can have a": Yes, but I assume splicing means you don’t have access to that
12:37:11FromDiscord<Rika> In reply to @rishav "If I want to": There may be a case where it doesn’t work but for 99% of the cases it should just work no code change
12:38:54*om3ga quit (Ping timeout: 258 seconds)
12:39:20*ltriant quit (Ping timeout: 255 seconds)
13:10:24*jjido quit (Quit: My MacBook Air has gone to sleep. ZZZzzz
)
13:14:44*arkurious joined #nim
13:25:44FromDiscord<Gennadiy> sent a long message, see https://paste.rs/Mkv
13:26:17FromDiscord<Gennadiy> (edit) "http://ix.io/3YWV" => "http://ix.io/3YWW"
13:35:07FromDiscord<Turgut> Are macros hygenic in Nim? If so, where is the documentation that points this out? I cannot seem to find it :/
13:35:42PMunch@Turgut, yes
13:36:12PMunchWell, templates are hygienic, macros can do pretty much what they want
13:36:58PMunchBut if you use `quote` and/or `genSym` it's hygienic
13:37:48FromDiscord<Turgut> could you give an example of a macro not being hygenic by default?
13:38:36PMunchWell you're able to bind to existing identifiers and such mith macros
13:41:37*om3ga joined #nim
13:42:43FromDiscord<Turgut> Does the dirty pragma also work for macros? or just for templates?
13:44:49PMunchJust for templates
13:45:02PMunchHere is a macro which isn't hygienic: https://play.nim-lang.org/#ix=3YX3
13:45:06*ltriant joined #nim
13:45:46PMunchNote that if you hadn't created that specific identifier first and just put `hello = "world"` in the quote block it wouldn't have worked, because that would've created a new symbol
13:49:52FromDiscord<Gennadiy> I do not mean to hijack this discussion but could you guys please help me have a look at my problem above. Thanks.
13:50:11*ltriant quit (Ping timeout: 258 seconds)
13:50:36PMunch@Gennadiy, my advice would be to use Futhark
13:52:54FromDiscord<Gennadiy> Yes, I really like Futhark (and please keep up the excellent work!) and that was going to be my next port of call. ↔I am just frustrated with the problem above and wanted to understand why it was failing doing it this way.
13:55:29PMunchBecause you're creating a different type from what it expects
13:55:54PMunchI believe you could add an `{.importc.}` pragma to your object definition and it would work
13:55:57PMunchNot 100% sure though
13:59:54FromDiscord<Gennadiy> Yay, it works. Thanks @PMunch ↔I will try to create a Nim-native interface with Futhark.
14:02:59FromDiscord<Turgut> sent a code paste, see https://play.nim-lang.org/#ix=3YX9
14:03:05FromDiscord<Turgut> This still is not hygenic. So, macros are not hygenic in Nim?
14:04:07FromDiscord<Generic> it depends
14:04:39PMunchHuh, I was sure that would fail. Did `quote` change recently?
14:04:42FromDiscord<Generic> if you create a new symbol in a macro it won't leak out
14:05:14FromDiscord<Generic> sent a code paste, see https://play.nim-lang.org/#ix=3YXa
14:05:32FromDiscord<Generic> newVariable will be gensymed and not accessible from the outside
14:06:05FromDiscord<Turgut> alright great
14:06:20FromDiscord<Turgut> And how could you create an unhygenic macro in Nim, @Generic ?
14:07:11FromDiscord<Generic> sent a code paste, see https://play.nim-lang.org/#ix=3YXd
14:07:19FromDiscord<Generic> this is what I've been doing, idk maybe there's a better way
14:08:04FromDiscord<Generic> (edit) "https://play.nim-lang.org/#ix=3YXd" => "https://play.nim-lang.org/#ix=3YXe"
14:09:19FromDiscord<Generic> if you want to be hygenic and share symbols between two quote do, use genSym(https://nim-lang.org/docs/macros.html#genSym%2CNimSymKind%2Cstring)
14:09:30*PMunch quit (Quit: Leaving)
14:15:52FromDiscord<Andreas> sent a code paste, see https://play.nim-lang.org/#ix=3YXi
14:16:11FromDiscord<Andreas> (edit) "https://play.nim-lang.org/#ix=3YXi" => "https://play.nim-lang.org/#ix=3YXk"
14:16:53FromDiscord<Andreas> (edit) "https://play.nim-lang.org/#ix=3YXk" => "https://play.nim-lang.org/#ix=3IV8"
14:17:24FromDiscord<Andreas> (edit) "https://play.nim-lang.org/#ix=3YXm" => "https://play.nim-lang.org/#ix=3YXl"
15:05:23FromDiscord<!Patitotective> @PMunchï»ż i'm trying to wrap the nuklear glfw opengl3 demo using this code https://github.com/Patitotective/niklear↔but https://media.discordapp.net/attachments/371759389889003532/980849409959022592/error.txt
15:36:22FromDiscord<planetis> in macros you usually do genSym("temp", ntVar) to create new symbols
15:36:33FromDiscord<planetis> (edit) "ntVar)" => "kind)"
15:39:07FromDiscord<planetis> except quote do, there is getAst(mytemplate()) and newTree
15:47:46*ltriant joined #nim
15:52:28*ltriant quit (Ping timeout: 258 seconds)
15:53:43*xet7 quit (Remote host closed the connection)
16:06:56FromDiscord<jmgomez> hey guys, Is there any built in method that allows you to traverse the AST recursively?
16:13:39FromDiscord<gibson> @jmgomez I've seen folks use both a while loop or traditional recursive function call to do that.
16:15:38FromDiscord<jmgomez> I was asking because it's such a common pattern that I supposed there must be something built in. Closest thing is @PMunch's macro utils I think
16:16:42FromDiscord<gibson> Oh you mean pattern matching with recursion. Yep, probably those macros are the way to go for now.
16:19:57FromDiscord<gibson> How can we make procs like `joinPath` obey the host OS? `hostOS` is incorrect, because it is being set by `--os:xxx` and I'm cross compiling from linux to windows. All I have to go on is `when defined(mingw)` and I want `joinPath` to behave NOT like it's on windows, but it's using backslashes everywhere and breaking the dependencies that rely on compile-time path generation.
16:20:51FromDiscord<gibson> I tried `{.push windows: off.}` but this is wrong/does not work.
16:21:16FromDiscord<gibson> (edit) "wrong/does not work." => "a compiler error."
16:28:34FromDiscord<gibson> Seems like `joinPath` and friends should include a check for `defined(mingw)` . But I suspect I'm just going about this incorrectly.
16:35:17FromDiscord<Yepoleb> In reply to @gibson "How can we make": do you want to use posix separators in the build script and windows separators in the compiled files?
16:37:54FromDiscord<gibson> @Yepoleb Unfortunately no, some of my dependencies (zstd) use joinPath when incorporating the right c files for the libs they wrap. So at compile time they use `joinPath` and get the wrong path. The only define I have is `-d:mingw` but that is enough to make a difference I guess.
16:38:13*Lord_Nightmare quit (Quit: ZNC - http://znc.in)
16:40:15*Lord_Nightmare joined #nim
16:40:51FromDiscord<Yepoleb> that's a shitty situation 😄
16:41:37FromDiscord<Yepoleb> there is no way for the compiler to detect when to use which version
16:43:07FromDiscord<gibson> I think the fix is to upstream patches for doing the right thing.
16:43:20FromDiscord<gibson> to the dependencies
16:43:28FromDiscord<Yepoleb> something like PureWindowsPath from python would be needed
16:43:41*xet7 joined #nim
16:44:13FromDiscord<Yepoleb> and code for handling the specifics
16:44:22FromDiscord<Yepoleb> (edit) "and code for handling the specifics ... " added "in each module"
16:45:19FromDiscord<Gennadiy> @PMunch :Re: Futhark - Because the header file(s) is imported directly, vscode has problems with syntax highlighting and it puts squiggles on everything. Is there a workaround for this?
16:46:10FromDiscord<gibson> but couldn't the compiler detect `defined(mingw) and nimvm` and do the right thing? Say, a rewrite of `joinPath` for example.
16:47:44FromDiscord<Yepoleb> you could still be generating target os paths at compile time
16:52:24FromDiscord<gibson> @Yepoleb true, we're missing a specific proc as you said. An overload of these that takes a specific DirSep would be nice.
16:54:02FromDiscord<Yepoleb> you can probably work around it for now by patching dependencies to use / and string concatenation
16:54:50FromDiscord<gibson> 👍 that's what I'm doing
16:57:00*gsalazar quit (Ping timeout: 276 seconds)
17:06:38FromDiscord<br4n_d0n> Without using something like homebrew or compiling from source, is there a way to get Nim on macOS?
17:08:36FromDiscord<willyboar> choosenim
17:09:02FromDiscord<willyboar> https://github.com/dom96/choosenim#choosenim
17:16:30*om3ga quit (Quit: Bye)
17:19:09FromDiscord<br4n_d0n> Hmm, seems like it will most likely build from source anyways, unless I missed something when skimming the source
17:19:24FromDiscord<br4n_d0n> (edit) "source" => "files"
17:21:58*xet7 quit (Remote host closed the connection)
17:32:04FromDiscord<dom96> it should download nightlies
17:39:19FromDiscord<br4n_d0n> Thanks
17:39:33FromDiscord<br4n_d0n> I just downloaded the nightly directly then
17:43:17FromDiscord<br4n_d0n> BTW, does the Nim compiler store any files locally like something similar to Zig ~/.cache?
17:44:50FromDiscord<Yardanico> ~/.cache/nim on Linux (not sure about macOS)
17:45:16FromDiscord<Yardanico> you can override it with `--nimcache` for your project or globally (if you put it in the nim config or your main config)
17:45:31FromDiscord<br4n_d0n> Thanks
17:58:48*jjido joined #nim
18:12:34*gsalazar joined #nim
18:15:00FromDiscord<PMunch> In reply to @Gennadiy "<@392962235737047041> :Re: Futhark -": Sure, don't use VSCode 😋
18:15:21FromDiscord<Yardanico> In reply to @Gennadiy "<@392962235737047041> :Re: Futhark -": can you show the behaviour?
18:15:24FromDiscord<Yardanico> vscode works for me with futhark
18:16:59*gsalazar quit (Ping timeout: 258 seconds)
18:17:42FromDiscord<PMunch> On a more serious note, Nim tooling isn't perfect an Futhark certainly strains that tooling. I don't really have a workaround for this ATM
18:23:39*wallabra quit (Ping timeout: 246 seconds)
18:24:18*wallabra joined #nim
18:35:30*vicfred quit (Quit: Leaving)
18:45:12FromDiscord<gibson> Just curious if @dom96 or anyone else knows why the nim domain does not host prebuilt binaries for osx? I always found it to have this air of exclusivity that osx isn't invited to the party. Choosenim is great, and that's what I tell folks to use, but I always wonder why...
18:51:44*adium quit (Quit: Stable ZNC by #bnc4you)
18:52:15FromDiscord<br4n_d0n> In reply to @gibson "Just curious if <@132595483838251008>": Good question; even if all it states is to use a nightly build would help and avoid my earlier questions
19:01:42FromDiscord<gibson> Another tough question: for a nimble package definition what do we do about package conflicts? For instance, I have `requires https://...#fix-awaiting-merge` for the time being. But the user might already have that package's previous stable release installed. Nimble happily installs both. Now I have no idea which one gets loaded for the user when my code does an import.
19:01:58FromDiscord<Yardanico> nimble handles all that
19:02:07FromDiscord<Yardanico> if they compile with nimble, nimble will use the correct version of the package
19:02:21FromDiscord<gibson> oh wow, fantastic.
19:02:26FromDiscord<Yardanico> since nimble only adds those packages to the import path that are explicitly listed in requires
19:02:40FromDiscord<gibson> Well, color me impressed.
19:04:43*adium joined #nim
19:40:20*jmdaemon joined #nim
19:49:01*ltriant joined #nim
19:53:57*ltriant quit (Ping timeout: 246 seconds)
20:02:32*arkanoid quit (Ping timeout: 248 seconds)
20:09:19*jjido quit (Quit: My MacBook Air has gone to sleep. ZZZzzz
)
20:25:40*jjido joined #nim
20:56:04*jmdaemon quit (Ping timeout: 258 seconds)
21:27:33FromDiscord<gibson> sent a code paste, see https://play.nim-lang.org/#ix=3YYP
21:28:33FromDiscord<gibson> (edit) "https://play.nim-lang.org/#ix=3YYP" => "https://play.nim-lang.org/#ix=3YYQ"
21:40:13FromDiscord<gibson> `selfExec... quit(0)` fixes the issue
21:42:29FromDiscord<br4n_d0n> Anyone use https://github.com/zah/nim.vim and if so, how do you get ``in`` used with for loops to properly highlight?
21:43:18FromDiscord<gibson> @br4n_d0n what highlighting are you expecting?
21:43:20FromDiscord<br4n_d0n> If there is a better vim syntax file for nim please share
21:43:38FromDiscord<br4n_d0n> The same as if like it's defined in the vim file
21:43:46FromDiscord<br4n_d0n> It's not highlighted at all
21:44:06FromDiscord<gibson> I just installed that and it highlights `for` and `in` keywords.
21:44:24FromDiscord<br4n_d0n> Give me a second, I'll show you how it comes up for me
21:46:25FromDiscord<br4n_d0n> https://media.discordapp.net/attachments/371759389889003532/980950334534987797/Screen_Shot_2022-05-30_at_17.45.29.png
21:48:07FromDiscord<gibson> @br4n_d0n type vim command `:set ft=nim` see if that changes anything
21:48:49FromDiscord<br4n_d0n> nope
21:49:23FromDiscord<gibson> And it highlights errors for you?
21:51:02FromDiscord<br4n_d0n> I only grabbed this file and didn't want the other junk... maybe it's needed, but seems strange↔https://github.com/zah/nim.vim/blob/master/syntax/nim.vim
21:52:57FromDiscord<br4n_d0n> I mean, if you look at line 43 of that file ``in`` is listed as a keyword for highlighting
21:55:49FromDiscord<gibson> sent a code paste, see https://play.nim-lang.org/#ix=3YYW
22:08:07FromDiscord<br4n_d0n> sent a code paste, see https://play.nim-lang.org/#ix=3YYZ
22:14:57FromDiscord<Zectbumo> I was compiling nim from scratch and it looks like it does 3 iterations recompiling itself before it becomes stable. is this a constant or can it vary system to system?
22:15:49FromDiscord<Elegantbeef> Bootstrap -\> Compile -\> Valdiation
22:16:43FromDiscord<Zectbumo> I'm not sure, but it looked like Bootstrap -> Compile -> validate -> compile -> validate -> Compile -> validate -> success
22:17:16FromDiscord<Zectbumo> and it showed a counter, something like : iterations: 3
22:17:44FromDiscord<Elegantbeef> Yea like i said it compiles with boot strap it then compiles the compiler then compiles the compiler with that compiler to validate
22:18:03FromDiscord<Zectbumo> I see, that's the validation step
22:30:53FromDiscord<gibson> @br4n_d0n I'd say try installing the whole nim.vim repo, then pair back once it's working. You can always delete files.
22:31:21FromDiscord<gibson> Worst case scenario is you have configs fighting each other and have to resolve that.
22:36:14FromDiscord<br4n_d0n> I think I'll look into making a custom one as I don't like how this syntax is having the same highlight for numbers etc.
22:36:35FromDiscord<br4n_d0n> It's like I get 3 colors max
22:38:00*jjido quit (Quit: My MacBook Air has gone to sleep. ZZZzzz
)
22:40:57FromDiscord<luteva> Hi! Until now i saw the type for object, ref object, enum and even distinct types.↔But now i saw a type MyType = proc(....) : ...↔what is this?? Never seen it before! what is a "type x = proc" used for? any documentation for that?
22:41:06FromDiscord<Elegantbeef> It's an alias
22:41:20FromDiscord<Elegantbeef> Nim's type system allows aliasing which just allows you to give less redundant names
22:41:41FromDiscord<Elegantbeef> For instance you also can do `type MyInventory = array[20, Item]`
22:45:16*ltriant joined #nim
22:45:53FromDiscord<luteva> but array is not a proc, right? it is "allocating memory", right?↔how can i use the proc alias then? any example?
22:46:04FromDiscord<Elegantbeef> It's just a type
22:46:44FromDiscord<Elegantbeef> sent a code paste, see https://play.nim-lang.org/#ix=3YZ3
22:58:16FromDiscord<luteva> sent a long message, see http://ix.io/3YZ8
22:58:39FromDiscord<Elegantbeef> Correct `proc(): int` is just a type
22:59:00FromDiscord<Elegantbeef> `proc: int = 100` is a anonymous procedure
22:59:26FromDiscord<luteva> ok! that's it! i got it!↔thx!
22:59:55FromDiscord<br4n_d0n> How is Elegantbeef a bot?
23:04:01FromDiscord<Elegantbeef> My mother and my father raised a smart cookie
23:04:02FromDiscord<Elegantbeef> Alternatively i'm on matrix and using a bridge to talk to you lowly peasants
23:04:02FromDiscord<huantian> no way beef is a bot and a cookie
23:04:02FromDiscord<Elegantbeef> Thats racist, dont expect any less from a yank though
23:04:12FromDiscord<huantian> also seems like bridge is dead again
23:04:13FromDiscord<Elegantbeef> Comtrya!
23:04:24FromDiscord<Elegantbeef> Seems we're back in business
23:07:14FromDiscord<demotomohiro> In reply to @br4n_d0n "How is Elegantbeef a": https://internet-of-tomohiro.netlify.app/nim/faq.en.html#community-are-bots-in-nim-discord-channel-aiqmark
23:14:04FromDiscord<!Patitotective> In reply to @br4n_d0n "How is Elegantbeef a": because đŸ€–â€ïž đŸ€– âžĄïž đŸ€–
23:14:32FromDiscord<br4n_d0n> đŸ€”
23:30:49*noeontheend joined #nim
23:33:56*vicfred joined #nim
23:51:29FromDiscord<Yepoleb> I am confused about how to use a shared heap memory model. the documentation for the threads module repeatedly mentions deep copies and or refs being forbidden. but the memory management page lists orc as supporting a shared heap. how are we supposed to make use of that?
23:51:39FromDiscord<Yepoleb> (edit) removed "or"
23:52:13FromDiscord<Elegantbeef> If you're using orc/arc any heap allocations can be accessed from the other threads safely with locking
23:53:27FromDiscord<Yepoleb> can i also pass references directly to threads? or do i need to use some ugly hacks
23:55:43FromDiscord<Yepoleb> like creating a pointer to an object containing a ref which i then copy from the thread
23:59:08FromDiscord<Elegantbeef> sent a code paste, see https://paste.rs/Jr3