<< 04-02-2022 >>

00:04:00*jmdaemon joined #nim
00:05:37NimEventerNew thread by Womble: Flutter and Nim, see https://forum.nim-lang.org/t/8865
00:14:18nrds<gurul/freenode99> <rasengan> Consequences are real. Treat things you care about with respect. Appreciate it. Help it. Cultivate it. And don't try to destroy it - because if you wish for its destruction, you're going to get it.
00:14:22nrds<gurul/freenode99> <rasengan> Classic Freenode had a special part in my heart and everyone else's. It's the saddest and hardest thing I've done, in a long time - but I
00:14:25nrds<gurul/freenode99> <rasengan> am giving the directive to shut it down.
00:14:27nrds<gurul/freenode99> <rasengan> Goodbye freenode classic.
00:14:30nrds<gurul/freenode99> <rasengan> This is your queue to go to libera and oftc if you dont like waht we're doing.
00:14:33nrds<gurul/freenode99> <rasengan> Do it. If you don't like what we're doing - go do it better.
00:14:35nrds<gurul/freenode99> <rasengan> They need help.
00:33:02rockcaveraElegantbeef, mkDir it's nimscript
00:34:08FromDiscord<Elegantbeef> Guess there is no wrapping for the interpreter for `mkDir`
00:34:08FromDiscord<Elegantbeef> Or `createDir`
00:35:43*noeontheend joined #nim
00:36:42*jmdaemon quit (Quit: ZNC 1.8.2 - https://znc.in)
00:38:00*jmdaemon joined #nim
01:01:37*noeontheend quit (Ping timeout: 240 seconds)
01:16:21*noeontheend joined #nim
01:16:24*vicfred quit (Quit: Leaving)
01:22:41FromDiscord<Ayy Lmao> How do you get a function to be called when a ref is destroyed? `=destroy` seems to only be for objects.
01:26:25*jmdaemon quit (Ping timeout: 256 seconds)
01:31:37*noeontheend quit (Ping timeout: 240 seconds)
01:33:32*audiophile_ joined #nim
01:36:57*jmdaemon joined #nim
01:37:01FromDiscord<geekrelief> In reply to @ajusa "yup, I *think* genit": @Phil genit will almost do what you want, but there's an issue with how types are ↵ transformed.
01:39:46FromDiscord<geekrelief> In reply to @Ayy Lmao "How do you get": try this? https://discord.com/channels/371759389889003530/371759389889003532/937079923691122749
01:43:46FromDiscord<Ayy Lmao> In reply to @geekrelief "try this? https://discord.com/channels/371759389889": Cool, thanks!
01:50:36FromDiscord<ajusa> In reply to @geekrelief "<@!394315290592411648> genit will almost": cool, thanks for clarifying. Is there any reason genit is devel only? can it be made to work on 1.6, or is that buggy?
01:51:14FromDiscord<geekrelief> In reply to @ajusa "cool, thanks for clarifying.": genit probably works on 1.6. I'm just working off devel, so when I created the nimble package I didn't bother changing it. 🙂
01:52:21FromDiscord<geekrelief> You can try it with 1.6, and I'll change the requirement if it works.
01:52:40FromDiscord<geekrelief> I'm working on Phil's test case with iterating on types.
01:54:07FromDiscord<geekrelief> sent a code paste, see https://play.nim-lang.org/#ix=3OA9
01:54:30FromDiscord<geekrelief> (edit) "https://play.nim-lang.org/#ix=3OA9" => "https://play.nim-lang.org/#ix=3OAa"
01:55:03FromDiscord<geekrelief> I have two issues to fix before that works.
02:13:02*TakinOver joined #nim
02:16:21*krux02 quit (Remote host closed the connection)
02:16:37FromDiscord<ajusa> In reply to @geekrelief "You can try it": I can confirm that the tests work on 1.6.2!
02:18:01FromDiscord<geekrelief> cool thx! Next time I push I'll have it updated.
02:30:55*jmdaemon quit (Ping timeout: 256 seconds)
02:48:18*arkurious quit (Quit: Leaving)
02:56:14*Gustavo6046 quit (Quit: Leaving)
03:02:50FromDiscord<creikey> what's the difference between a tuple and an object?
03:03:48FromDiscord<creikey> it seems like objects are only needed for inheritane
03:03:51FromDiscord<creikey> (edit) "inheritane" => "inheritance"
03:04:59FromDiscord<Rika> tuples dont have access control for fields
03:05:13FromDiscord<Rika> not sure about this but afaik they also dont have case fields
03:05:15FromDiscord<creikey> In reply to @Rika "tuples dont have access": so on a tuple type will expose all its fields?
03:05:18FromDiscord<Rika> yes
03:05:21FromDiscord<creikey> interesting
03:05:26FromDiscord<Rika> and you cannot do anything about it
03:05:27FromDiscord<Rika> also
03:05:37FromDiscord<Rika> if the tuple definitions of two types are the same
03:05:42FromDiscord<Rika> they are treated as not distinct
03:05:43FromDiscord<Rika> afaik
03:05:54FromDiscord<Rika> and distinct tuples afaik dont work well
03:06:05FromDiscord<creikey> sent a code paste, see https://play.nim-lang.org/#ix=3OAp
03:06:10FromDiscord<creikey> how can you get something of MyObject and interact with it if the type ins't exposed
03:06:13FromDiscord<creikey> (edit) "ins't" => "isn't"
03:06:21FromDiscord<Rika> exported proc returning
03:06:26FromDiscord<Rika> exported global
03:06:31FromDiscord<creikey> makes sense makes sense
03:06:33FromDiscord<creikey> you just can't make new of it
03:06:41FromDiscord<Rika> technically you can as well
03:07:04FromDiscord<Rika> let a = exportedProc()↵let b = (typeof a)()
03:07:07FromDiscord<Rika> probably would work
03:07:35FromDiscord<creikey> I can't imagine how complicated this compiler is that looks so messy to parse
03:07:38FromDiscord<creikey> (edit) "I can't imagine how complicated this compiler is that looks so messy to parse ... " added "and reason about"
03:07:43FromDiscord<Rika> its not messy
03:07:46FromDiscord<Rika> its just confusing
03:15:38*noeontheend joined #nim
03:18:43FromDiscord<Elegantbeef> To add tuple type definitions are just aliases
03:20:54FromDiscord<Elegantbeef> Which part looks messy to parse?↵(@creikey)
03:28:10FromDiscord<noow> In reply to @creikey "it seems like objects": afaik most people prefer objects in most cases
03:28:29FromDiscord<noow> don't really know why
03:28:36FromDiscord<Elegantbeef> Indeed most cases objects are better
03:28:42FromDiscord<Elegantbeef> Well cause they're distinct
03:29:03FromDiscord<Elegantbeef> Tuples are just type aliases so you do not get type safety
03:29:56FromDiscord<Elegantbeef> sent a code paste, see https://play.nim-lang.org/#ix=3OAu
03:32:34FromDiscord<Elegantbeef> When you have types that come from anywhere you dont have any assurances
03:33:31FromDiscord<huantian> So what you’re saying is we should have distinct tuples :P
03:35:47FromDiscord<huantian> I usually mostly just used tuples when returning multiple values from a func
03:36:25*noeontheend quit (Ping timeout: 256 seconds)
03:41:10*jmdaemon joined #nim
03:44:35FromDiscord<Elegantbeef> If only there was a easy thing that replicates distinct tuples.... hmmm↵(@huantian)
03:44:47FromDiscord<Elegantbeef> Too bad no one made it, we could call it like a `record` or `struct`
03:45:48FromDiscord<huantian> That would be interesting
03:46:56FromDiscord<Elegantbeef> Maybe we call them `awbject`
03:47:57FromDiscord<Elegantbeef> If it's unclear to anyone reading, objects people objects!
03:49:08FromDiscord<Elegantbeef> Yea this is where it's fine, i often see people using tuples like objects↵(@huantian)
03:49:37FromDiscord<Elegantbeef> You can always mke unpack procedures that convert the object to tuple
03:54:24FromDiscord<Rika> i also mentioned that there are issues with distinct tuples
03:54:33FromDiscord<Rika> like... not being able to access fields by field name
03:54:33FromDiscord<Elegantbeef> I mean they dont make sense
03:54:47FromDiscord<Rika> so you have to borrow `.`
03:55:01FromDiscord<Rika> and at that fuckin point just use an object damn it
03:55:03FromDiscord<Elegantbeef> Not really an issue it's by design of how it works
03:55:26FromDiscord<Rika> i mean sure it is but its "not an issue" when you distinct an object
03:55:32FromDiscord<Rika> you can still access its fields
03:55:38FromDiscord<Elegantbeef> No you cannot
03:56:18FromDiscord<Elegantbeef> sent a code paste, see https://play.nim-lang.org/#ix=3OAx
03:56:41FromDiscord<Elegantbeef> Oh wait even borrowing dot fails 😀
03:57:10FromDiscord<Elegantbeef> sent a code paste, see https://play.nim-lang.org/#ix=3OAy
04:01:13FromDiscord<huantian> The distinct is too powerful for your puny period
04:01:29FromDiscord<Elegantbeef> I mean you just need to borrow the dot exprs
04:19:30*audiophile_ quit (Quit: Default Quit Message)
04:20:23FromDiscord<Rika> maybe i forgot then
04:40:39FromDiscord<creikey> In reply to @Elegantbeef "Which part looks messy": getting typeof of an external compilation unit when you try to multithread the compilation seems nontrivial
04:40:46FromDiscord<creikey> but I don't have much practical experience writing compilers so that's probably wrong
04:41:25FromDiscord<Elegantbeef> Well it's not multithreaded
04:42:01FromDiscord<Elegantbeef> `typeof` is a relatively simple operation which reasons the body and returns the type it is
04:42:38FromDiscord<Elegantbeef> It's mostly a type operation that doesnt require anything overly fancy
04:44:37FromDiscord<Elegantbeef> You can easily analyse an expression for it's type when you have a type system, since that most of what it's doing anyway 😛
04:44:42*rockcavera quit (Remote host closed the connection)
04:50:46FromDiscord<creikey> cool
04:51:25FromDiscord<creikey> In reply to @Elegantbeef "Well it's not multithreaded": I looked at the nimsuggest docs yesterday to see if this is true but they seem a little under filled out, is it possible to get some kind of parse tree of the nim program for some advanced editor manipulation stuff?
04:51:50FromDiscord<creikey> stuff like keyboard shortcuts to copy and paste the currently selected scope
04:51:54FromDiscord<Elegantbeef> I dont speak french
04:52:05FromDiscord<creikey> I think vim has that stuff but just looks for the {}
04:53:04FromDiscord<Elegantbeef> I dont know if it's possible
04:55:10FromDiscord<Elegantbeef> It might be possible to capture the scope of where your cursor is and get the AST but i dont know about the before the AST
04:56:46FromDiscord<Elegantbeef> Might be helpful to ask this in the internals chat, would probably get a more insightful answer↵(@creikey)
05:46:46FromDiscord<evoalg> I think you're telling me to use objects because they are safer than tuples, because objects are distinct and therefore they lead to less errors ... I'm just struggling to drive this home. For a tuple I can do `doThing (10, 20)` or even `doThing (a:10, b:20)` ... for an object I figured out I can do `doThing(MyObject(a: 1, b: 2))` ... but it's not clear to me where the safety is?
05:47:50FromDiscord<Elegantbeef> The safety is that you cannot have a `(int, int)` from module A be used in module B
05:48:51FromDiscord<Elegantbeef> Not all objects that have only two int fields are considered the same type, all tuples with only two ints are
05:50:34FromDiscord<evoalg> ok so I think you're saying it's all about the beauty of distinct
05:52:11FromDiscord<Elegantbeef> sent a code paste, see https://play.nim-lang.org/#ix=3OB4
05:52:34FromDiscord<Elegantbeef> sent a code paste, see https://play.nim-lang.org/#ix=3OB5
05:53:48FromDiscord<Elegantbeef> sent a code paste, see https://paste.rs/f7u
05:55:03FromDiscord<Elegantbeef> With the latter example the way to send data to `doThing` you cannot provide bad values
05:55:19FromDiscord<Elegantbeef> This is a constructed example but eitherway, shows the point
05:56:10FromDiscord<evoalg> thank you ... lemme digest all this
05:57:06FromDiscord<Elegantbeef> sent a code paste, see https://play.nim-lang.org/#ix=3OB7
05:58:45FromDiscord<Elegantbeef> Unrelated but it's just in north america where "Consider the following" evokes memories of Bill Nye right? 😀
06:04:28FromDiscord<evoalg> hehe it didn't evoke that in me, but only a kiwi
06:08:52FromDiscord<evoalg> we didn't have Bill Nye, but we did have Cosmos (the original one with Sagan)
06:09:21FromDiscord<geekrelief> sent a code paste, see https://play.nim-lang.org/#ix=3OBa
06:10:37FromDiscord<geekrelief> (edit) "https://play.nim-lang.org/#ix=3OBa" => "https://play.nim-lang.org/#ix=3OBb"
06:14:56FromDiscord<Elegantbeef> [evoalg](https://matrix.to/#/@evoalg:matrix.org)\: i will say that it's atleast my view in a statically typed language to use types as much as possible to ensure program safety, some people vastly disagree
06:15:55FromDiscord<evoalg> gotcha ... I guess I'm still so used to python that anything else seems restrictive
06:16:31FromDiscord<evoalg> but I can see how I can (and do) get myself into trouble with python when it's over X number of lines
06:16:53FromDiscord<Elegantbeef> That's kinda the benefit of static though, you make the code as safe as possible 😀
06:18:36FromDiscord<Elegantbeef> Subrange types are one of my favourite things to talk about in this regard, in most languages if you want to say "X cannot be outside of this range" you document it and manually check it. In Nim you just do `var a: 0..10`
06:19:18FromDiscord<evoalg> and that doesn't even change the type right?
06:19:27FromDiscord<Elegantbeef> Well it's a checked range but it's an int
06:19:46FromDiscord<evoalg> yea that's what I meant \:) ... very nice and easy
06:21:01FromDiscord<Elegantbeef> I should shush before i start a rant about tuples 😀
06:21:37FromDiscord<evoalg> you already talked about tuples though?
06:21:57FromDiscord<Elegantbeef> Sure but i was starting to write a message ranting about them
06:22:16FromDiscord<evoalg> please rant away
06:24:12FromDiscord<Elegantbeef> I generally only see tuples useful as anonymous return groups, for quick grouped types for collections, and unpacking. As soon as you start adding field names i feel like you should just use an object. Then use a macro or user written procedures to unpack
06:25:47FromDiscord<evoalg> I've heard rantier rants ;-)
06:27:05FromDiscord<Elegantbeef> Oh yay it's succinct rant or a succy rant
06:27:18FromDiscord<evoalg> I can't find the right nim offtopic channel in matrix ... what do I do to find it?
06:27:29FromDiscord<Elegantbeef> #offtopic
06:28:43FromDiscord<evoalg> Sorry, when I go to Rooms \> Explore public rooms, it says nothing is found
06:28:59FromDiscord<Elegantbeef> Are you on matrix?
06:29:03FromDiscord<Elegantbeef> I mean element
06:29:06FromDiscord<Elegantbeef> Gosh i'm daft
06:29:08FromDiscord<evoalg> yes
06:29:27FromDiscord<Elegantbeef> Did you join the nim space?
06:30:38FromDiscord<evoalg> I didn't join the nim space ... found offtopic but just searching for #nim-offtopic\:envs.net and when it said nothing was found I clicked join and it worked
06:42:14FromDiscord<Rika> As soon as you use the tuple for more than, like, one proc then maybe change it for a type
06:43:03FromDiscord<Elegantbeef> Exactly
06:43:27FromDiscord<Elegantbeef> I feel a lot of people use tuples as objects and that's just not their point
06:44:12FromDiscord<Elegantbeef> Though could be the use of `object` making people think it's an OOP thing
06:53:43FromDiscord<speq> What's the point of tuples then? Not objecting, just trying to understand the perspective here
06:54:19FromDiscord<Elegantbeef> Easy pairs/unpacking
06:54:55FromDiscord<Elegantbeef> `proc doThing(args): (T1, T2)` is a common usage of them
06:55:21FromDiscord<Elegantbeef> I say pairs but i mean any grouping of types
06:55:47FromDiscord<speq> OK, but how is this different from an object with no `proc`s defined specifically for it?
06:56:02FromDiscord<Elegantbeef> What do you mean?
06:56:32FromDiscord<Elegantbeef> An object with no procs is still a unique type
06:56:35FromDiscord<Elegantbeef> A tuple with no procs is not
06:56:42FromDiscord<speq> I mean, why/when would I switch to an object that encapsulates T1 and T2
06:56:57FromDiscord<speq> If I don't need a specific name for it
06:57:22FromDiscord<Elegantbeef> Imo if you're doing named fields like `tuple[field1: int, field2: float]`, just use an object
06:58:05FromDiscord<Elegantbeef> If someone gets your returned tuple and then uses it later they have 0 type safety assurances it can go anywhere that matches the tuple signature
06:58:27FromDiscord<Elegantbeef> I dont mind using anonymous tuples is mostly what i'm saying
06:58:34FromDiscord<evoalg> so tuples are great if you want anonymous fields?
06:58:48FromDiscord<Elegantbeef> When you're attempting to give names to tuple fields i really feel like you're using the wrong thing
06:59:06FromDiscord<speq> OK, so you are arguing for objects for their type safety, gotcha
06:59:28FromDiscord<speq> That's clear
07:37:14*jjido joined #nim
07:39:51*PMunch joined #nim
07:53:55FromDiscord<axtens> if I declare a proc as `proc foo(bar: string | seq[string]) : int =` how do I tell in the body of the proc whether I've got a string or a sequence of string?
07:54:06*Guest16 joined #nim
07:54:24FromDiscord<enthus1ast> when bar is string\:
07:54:57FromDiscord<enthus1ast> when bar is seq[string]\:
07:55:27*Guest16 quit (Client Quit)
07:56:20FromDiscord<Elegantbeef> depending what you're doing you could also just use `varargs[string]`
07:58:27FromDiscord<axtens> wow. ok
07:59:27FromDiscord<enthus1ast> https://play.nim-lang.org/#ix=3OBv
08:00:22FromDiscord<enthus1ast> also\: when / elif / else
08:00:30FromDiscord<enthus1ast> the second when could be elif
08:04:33FromDiscord<axtens> that is a thorough answer
08:05:34Amun-Raand, depending on what's in the function body, the 3rd option would be foo(s: string)… foo(s: seq[string])…
08:08:38FromDiscord<Elegantbeef> Us Nim users for some reason give very detailed explanations with examples 😛
08:09:03FromDiscord<enthus1ast> guess we procrastinate work
08:09:07FromDiscord<enthus1ast> i do \:/
08:10:28FromDiscord<Elegantbeef> Ha me work!
08:10:35FromDiscord<enthus1ast> must do php if i don't ;\_;
08:10:46Amun-Raouch
08:16:02FromDiscord<--HA--> In that `proc foo(bar: string | seq[string]) : int =` example and then writing code to handle different types with `when` is there a way to make sure all cases are covered?↵So that I can later add another type in the function signature and my "when block" does not compile, something like that.
08:17:12FromDiscord<Elegantbeef> There is not without macros
08:17:13FromDiscord<enthus1ast> then i would use the overloading option
08:17:22FromDiscord<Elegantbeef> Overloading makes more sense indeed
08:19:49FromDiscord<--HA--> Overloading means I'd have `proc foo(bar: string): int` and `proc foo(bar: float): int` and so on? And maybe they call a private proc to share some code?
08:20:03FromDiscord<Elegantbeef> Yea
08:20:18FromDiscord<enthus1ast> yes, see my link to the tutorial above
08:20:20FromDiscord<Elegantbeef> Generalizing what's generalizable
08:20:24FromDiscord<Phil> In reply to @geekrelief "<@!102899813149855744> genit v0.13.0 supports": Thanks! I'll keep it in mind for the future!↵For now, I managed to get rid of the need for both the enum and the variant so I'll keep an eye out for other scenarios where this might be useful for generating a lot of similar stuff on the fly
08:22:50Amun-Rahow about proc foo(bar: varargs[typed, `$`])
08:23:28FromDiscord<--HA--> In reply to @enthus1ast "yes, see my link": Sorry I'm not finding the link
08:23:46FromDiscord<enthus1ast> this
08:23:50FromDiscord<Elegantbeef> https://play.nim-lang.org/#ix=3OBv
08:23:53FromDiscord<Elegantbeef> Oh whoops
08:23:54FromDiscord<Elegantbeef> 😀
08:24:11FromDiscord<Phil> In reply to @enthus1ast "must do php if": My condolences, may you rest in piece
08:24:23FromDiscord<Rika> In reply to @enthus1ast "this": Reply with unknown content
08:24:51FromDiscord<enthus1ast> https://nim-lang.github.io/Nim/tut1.html#procedures-overloaded-procedures
08:25:13FromDiscord<Elegantbeef> Oh didnt get through from matrix
08:25:30FromDiscord<Phil> And yeah if you want a proc to accept multiple types as arguments, unless the proc can't do the exact same code on each type, use overloading
08:25:52FromDiscord<enthus1ast> mh yeah, maybe i should switch to discord for nim, but then i get this "whatsapp, meta" feeling
08:26:16FromDiscord<Elegantbeef> Lol i swapped to matrix for it cause i'd rather use matrix than discord
08:26:18FromDiscord<Phil> What I like to do, though I'm not sure if that's sensible, is have a core proc with the functionality but maybe not a proc signature that is as simple as it could be, and have a lot of helper procs around it and then only export the helper procs.
08:26:43FromDiscord<Phil> (edit) "What I like to do, though I'm not sure if that's sensible, is have a core proc with the functionality but maybe not a proc signature that is as simple as it could be, and have a lot of helper procs ... around" added "as ovreloads"
08:27:44FromDiscord<enthus1ast> yeah the matrix idea is much better (and its foss) but the ux of discord is much better (insert 3 pages long matrix rant here)
08:28:14FromDiscord<enthus1ast> especially when you connect via federation, like i doo
08:28:25FromDiscord<Phil> federation?
08:28:44FromDiscord<enthus1ast> i have my own matrix server and it connects to other matrix servers
08:29:06FromDiscord<Elegantbeef> Matrix is a decentralised federated protocol, which means matrix servers communicate between eachother
08:29:27FromDiscord<Elegantbeef> So you can have your own server like enthus does but connect to other servers that allow you to join
08:31:43FromDiscord<Elegantbeef> image.png https://media.discordapp.net/attachments/371759389889003532/939075738085232680/image.png
08:31:46FromDiscord<Elegantbeef> Diagram of the layout
08:32:00FromDiscord<Rika> Why do people say Enthus but not ast smh
08:32:05FromDiscord<Rika> I’m joking
08:32:18FromDiscord<Elegantbeef> Cause no one likes AST
08:33:35FromDiscord<enthus1ast> [Elegantbeef](https://matrix.to/#/@elegantbeef:matrix.org)\: eeehm you mean this one right?\:
08:33:47FromDiscord<enthus1ast> xkcd1810-matrixified-v2-1024x842.png https://media.discordapp.net/attachments/371759389889003532/939076260116697098/xkcd1810-matrixified-v2-1024x842.png
08:34:06FromDiscord<Elegantbeef> Sure
08:37:53FromDiscord<Phil> No bridge to Wall(Unix)?! Heresy!
08:38:16FromDiscord<Elegantbeef> Literally unusable
08:38:41Amun-Raapache request log users, unite!
08:38:48FromDiscord<Phil> I'm legit fascinated there's an ICQ bridge
08:38:51FromDiscord<Phil> There's two of us !
08:38:56FromDiscord<Phil> (edit) "There's two of us ! ... " added "Amun-Ra!"
08:38:59Amun-Ra:>
08:39:20FromDiscord<xx_ns> In reply to @Amun-Ra "apache request log users,": nginx access log is the superior communication method
08:39:29Amun-RaPhil: sorry to tell you but I'm more of nginx request log user nowadays… :/
08:39:40Amun-Raxx_ns: ^ ;)
08:39:52FromDiscord<eyecon> How tf do people communicate via web server logs 😄
08:40:19FromDiscord<Elegantbeef> Very carefully
08:40:35FromDiscord<enthus1ast> i've done a small tool a few years ago, that could print ascii art into the server logs \: )
08:40:41FromDiscord<eyecon> Do I make a request HOWDY with the header `X-Intended-Recipient: Sandy`
08:40:46FromDiscord<enthus1ast> never got an answer though \:(
08:41:00FromDiscord<Phil> In reply to @Amun-Ra "<@180601887916163073>: sorry to tell": darth vader nooooooooo
08:42:11FromDiscord<Phil> About the IRC gateway accounts, why does Prestige's one do the <> thing and Amun-Ra's doesn't?
08:42:56FromDiscord<Phil> I think Prestige used "nrds[IRC]"
08:43:07FromDiscord<Elegantbeef> One connects from freenode the other libera
08:43:24FromDiscord<Elegantbeef> Prestige likes being wrong
08:43:28FromDiscord<xx_ns> hmmmm https://media.discordapp.net/attachments/371759389889003532/939078693463130152/IMG_1189.png
08:43:31FromDiscord<enthus1ast> oh its bridged to both?
08:43:53nrds<Prestige99> This bridge is from irc-nerds
08:44:37FromDiscord<Elegantbeef> The other is libera right?
08:45:16nrds<Prestige99> Yeah
08:55:29PMunch@eyecon, you normally don't log the request content. So I guess you'd set the referrer to your message :P
09:03:18*cyraxjoe quit (Quit: No Ping reply in 180 seconds.)
09:04:33*cyraxjoe joined #nim
09:05:14FromDiscord<eyecon> In reply to @PMunch "<@191304757195833344>, you normally don't": Right, makes sense
09:26:27FromDiscord<xx_ns> yep, either referer or user agent
09:26:42*jjido quit (Quit: My MacBook Air has gone to sleep. ZZZzzz…)
09:27:00FromDiscord<xx_ns> or literally just the path
09:57:56FromDiscord<Rika> Prestige genuine question why do you still use Freenode
09:59:49nrds<Prestige99> I don't
10:00:38FromDiscord<Rika> I'm confused then
10:00:46FromDiscord<Rika> Which is freenode which is libera
10:01:00PMunchI'm on Libera
10:01:02nrds<Prestige99> I'm on the irc nerds network, and I have it bridged to libera
10:01:05PMunchHe's onIRC-nERDS
10:01:09FromDiscord<Rika> I see
10:01:15FromDiscord<Rika> What's the difference
10:02:53nrds<Prestige99> Just different networks, different goals and different management
10:03:50FromDiscord<Rika> Okay
10:08:26FromDiscord<xx_ns> i thought freenode died?
10:08:45nrds<Prestige99> Nope it's still up and running
10:11:25FromDiscord<xx_ns> _a_ server on that address is up and running
10:11:33FromDiscord<xx_ns> but it's not freenode is it
10:11:37FromDiscord<Elegantbeef> They had a odd message today
10:11:45nrds<Prestige99> Yes it's still freenode
10:11:48FromDiscord<Elegantbeef> Or atleast some message was sent here that was odd
10:12:09nrds<Prestige99> Yeah there are people still mad that freenode is alive, so they go around spamming crap
10:12:58FromDiscord<xx_ns> In reply to @nrds "<Prestige> Yes it's still": it doesn't have any of the old chan/nickserv registration, any of the staff, uses an entirely different server software / implementation, and most importantly none of the users (who have pretty much all moved to libera)
10:13:00FromDiscord<xx_ns> i'd say it's pretty dead
10:13:40FromDiscord<Rika> What, are we gonna start talking abiut Theseus' ship now
10:13:45nrds<Prestige99> That's not what dead means, and not all the staff left
10:13:52nrds<Prestige99> 🤷
10:14:10nrds<Prestige99> I don't really care, don't know why people still mad about freenode being around
10:14:13FromDiscord<Elegantbeef> Whose ship? It's mine now
10:14:31FromDiscord<Phil> Why does anyone care whether freenode is up or not? It's a mystery
10:14:47FromDiscord<Phil> Trolls be trolls I guess
10:15:06FromDiscord<xx_ns> i really don't think anyone's mad at freenode "still" being around, more the fact that it was a hostile takeover of an entire community
10:15:10FromDiscord<Phil> In reply to @Elegantbeef "Whose ship? It's mine": Write a macro to gain ownership of it
10:15:13FromDiscord<xx_ns> the community has spoken and has left
10:15:27FromDiscord<Rika> I don't care either
10:15:35FromDiscord<Elegantbeef> Nah in Nim to get ownership we just `sink` it↵(@Phil)
10:15:42nrds<Prestige99> It wasn't and they haven't.. but I'm done talking about this lol you're the only one that cares xx
10:15:56FromDiscord<xx_ns> okay?
10:16:01FromDiscord<Rika> If no one I care about uses it why should I care if it's still up or not; if it's not doing anything to me directly or indirectly what's there to give a fuck about
10:16:03FromDiscord<Rika> Anyway
10:16:04FromDiscord<Phil> In reply to @Elegantbeef "Nah in Nim to": And that's how you make sure there's no ship for anyone to have anymore
10:16:09FromDiscord<xx_ns> not sure why you're getting so defensive over this i was just trying to have a conversation about freenode
10:16:24FromDiscord<Rika> In reply to @Isofruit "And that's how you": LMFAO
10:16:28FromDiscord<Elegantbeef> I'm not getting defensive the wall is!
10:16:36FromDiscord<Rika> Fucker sunk the ship I can't believe it
10:16:51FromDiscord<Elegantbeef> But we do have the nameplate that says "thesus'"
10:17:00FromDiscord<Rika> The sus
10:17:00FromDiscord<Elegantbeef> So how about thesus' train?
10:17:05FromDiscord<Rika> :AMOGUS:
10:17:18FromDiscord<Elegantbeef> !ban @Rika
10:17:30FromDiscord<Phil> In reply to @Elegantbeef "So how about thesus'": Why would theseus want to put on even more muscles?
10:19:43*Zevv quit (Ping timeout: 250 seconds)
10:20:04FromDiscord<Phil> In reply to @Rika "<:AMOGUS:811451017521790978>": Ya know, germany has a pretty proud tradition of finding humour in the nonsensical. But even I never managed to really find the entire Among Us meme stuff funny
10:20:19FromDiscord<Rika> In reply to @Isofruit "Ya know, germany has": Thats because it isn't
10:20:24FromDiscord<Elegantbeef> You know what they say german humour is no laughing matter
10:20:46FromDiscord<Phil> God damn I hate how I have heard that joke dozens of times yet it still makes me snort a bit
10:20:51FromDiscord<Rika> How
10:21:13FromDiscord<Elegantbeef> It's a well written joke it cannot die
10:32:50FromDiscord<Rika> It’s barely a joke
10:33:04FromDiscord<Elegantbeef> The german humour joke?
10:36:57*jjido joined #nim
10:37:17FromDiscord<Phil> In reply to @Rika "How": I don't have an incredibly high bar for finding even dumb jokes funny. That's why it is somewhat impressive that the amongus stuff fits below even that
10:50:37FromDiscord<exelotl> What are you talking about, amogus is hilarious
11:16:28FromDiscord<Goel> `proc map[T, S](s: openArray[T]; op: proc (x: T): S {.closure.}): seq[S]`↵> Instead of using map and filter, consider using the collect macro from the sugar module↵Why this, for performance or just because its more handy?
11:19:37*jmdaemon quit (Ping timeout: 256 seconds)
11:23:28*jjido quit (Quit: My MacBook Air has gone to sleep. ZZZzzz…)
11:27:02FromDiscord<Phil> macro smells like offloading computation to compile time
11:27:15FromDiscord<Phil> Though I don't get what you would offload to compile time there
11:31:58FromDiscord<Rika> It’s “nicer and more explicit to look at”
11:32:07FromDiscord<Rika> For non functional programmers
11:32:08FromDiscord<konsumlamm> `collect` is more general (it allows more than just map and filter) and it's more efficient (because it doesn't allocate intermediate `seq`s) when you do multiple operations
11:43:43FromDiscord<Goel> sent a long message, see http://ix.io/3OCl
11:46:51*jjido joined #nim
11:50:58FromDiscord<Rika> Template it and call it “asSlice” or toSlice
11:51:14FromDiscord<exelotl> you could do `myArr[0..^1]`
11:55:40FromDiscord<Phil> Is there a way, in logging, to include somehow from which file the logging call is coming from?
11:56:02FromDiscord<Phil> I'm starting at the format string options and I'm sort of missing anything related to "log the origin of the log call"
11:56:15FromDiscord<Phil> (edit) "starting" => "staring"
11:56:31FromDiscord<Phil> I'm using std/logging
11:56:50FromDiscord<Flo> I'm currently building a parser, and I having difficulty deciding how to handle the original input / buffer.↵When "taking" characters, do I modify the input buffer by always taking away the currently parsed items, or would It be ok to move just the index like a cursor, and always doing substring on the original?
11:57:57FromDiscord<Flo> So the main question would be, what is more performant, cutting a large string into parts until there's nothing left anymore.↵Or always doing lookups in the original string
11:58:02FromDiscord<Rika> In reply to @Isofruit "Is there a way,": Yes but I don’t remember the template name
11:58:18FromDiscord<dom96> In reply to @Flo "So the main question": the latter
11:58:43FromDiscord<Phil> In reply to @Rika "Yes but I don’t": So it's not achieved by manipulating the formatstring but by calling aspecific template?
11:58:50FromDiscord<Phil> (edit) "In reply to @Rika "Yes but I don’t": So it's not achieved by manipulating the formatstring ... but" added "of a given logger"
11:59:01FromDiscord<Rika> https://nim-lang.org/docs/system.html#currentSourcePath.t
11:59:03FromDiscord<dom96> @Flo example of how to do parsing from my book https://github.com/dom96/nim-in-action-code/blob/master/Chapter6/WikipediaStats/naive.nim
11:59:49FromDiscord<Phil> In reply to @Rika "https://nim-lang.org/docs/system.html#currentSource": Ohhh I can include that in the formatstr? Actually.. why wouldn't it... thanks for the find !
12:05:49FromDiscord<Flo> In reply to @dom96 "<@!274627218368626699> example of how": Cool, that helps me, thanks!
12:28:42*jjido quit (Quit: My MacBook Air has gone to sleep. ZZZzzz…)
12:46:20*jjido joined #nim
12:58:43*jjido quit (Quit: My MacBook Air has gone to sleep. ZZZzzz…)
13:05:21FromDiscord<Zajt> sent a code paste, see https://paste.rs/uI1
13:05:41PMunch`choosenim update stable`
13:05:56PMunch@Zajt ^
13:08:52FromDiscord<Zajt> thanks
13:12:19FromDiscord<Phil> In reply to @Rika "https://nim-lang.org/docs/system.html#currentSource": Hmmm I might not be doing this correctly. I can get a source path, but I can't add it to the default format of the logger. I'd have to add this manually to every time I call log. Hmmm
13:12:39FromDiscord<Phil> (edit) "Hmmm" => "Hmmm↵`addHandler(newConsoleLogger(fmtstr = fmt "$levelname : currentSourcePath(): "))`"
13:12:48FromDiscord<Phil> (edit) "currentSourcePath():" => "{currentSourcePath()}:"
13:21:57FromDiscord<JohnDoe> sip nimrods
13:22:04FromDiscord<JohnDoe> (edit) "sip" => "sup"
13:23:25FromDiscord<Rika> In reply to @Isofruit "Hmmm I might not": well thats because the template call has to be in the source file you want the name of
13:26:40FromDiscord<Phil> Dang. the fmtstr has these nice placeholders with $ that it replaces, just wish it also had one for filename
13:29:47FromDiscord<Rika> well you cant really get filename since the .log .info etc are procs
13:30:18FromDiscord<Goel> > This module implements a simple logger.↵> It has been designed to be as simple as possible to avoid bloat. If this library does not fulfill your needs, write your own.↵Well thanks i suppose! Not need to be so grumpy...
13:42:42PMunch@Goel, haha is that the official logger module?
13:43:22FromDiscord<Goel> Yes
13:43:23PMunchhttps://nim-lang.org/blog/2022/02/04/nim-devroom-fosdem-2022.html
13:44:56FromDiscord<Phil> In reply to @Goel "> This module implements": I think that's alright. Logging can range from mildly difficult to insanely complicated and I can't imagine it's the most exciting thing to implement, no matter how much anyone asks for it. I guess the entire lib has been implemented against Araqs will or sth. in order to provide something at least
13:45:58NimEventerNew thread by PMunch: Nim devroom at FOSDEM this weekend, see https://forum.nim-lang.org/t/8866
13:47:05PMunch@Phil, I don't think it's implemented against his will. But as you say logging can get quite complex so I guess the decision was made to not go down that rabbit hole in the official module
13:47:40PMunchIf you need more than the official logger module though I can recommend Chronicles by Status, that is some black-magic level stuff
13:48:06FromDiscord<Phil> In reply to @PMunch "<@180601887916163073>, I don't think": Fair, I think the wording might've been bad. More like "implemented to have something, not because one is excited about it"
13:48:54FromDiscord<Phil> (edit) "the" => "my"
13:58:36*rockcavera joined #nim
13:58:36*rockcavera quit (Changing host)
13:58:36*rockcavera joined #nim
14:11:17*TakinOver quit (Quit: https://quassel-irc.org - Chat comfortably. Anywhere.)
14:12:09*jjido joined #nim
14:22:28*audiophile_ joined #nim
14:27:48*arkurious joined #nim
14:32:50*xaltsc joined #nim
14:33:46xaltscHey, is there a cookbook for Nim somewhere ? I'm a few hours old newb and kind of lost with nim's idiosyncrasies and package/module system
14:34:57FromDiscord<Phil> The stuff under documentation on the official webpage isn't helping you any?
14:38:41xaltscPhil: I went through it enough to grasp the essential stuff, but I'm stuck with concrete problems. For instance, I want to filter a TypeRef, but filterIt raises a type error since the arguments are untyped.
14:38:55xaltscTableRef*
14:39:23FromDiscord<enthus1ast> can you show code?
14:40:59FromDiscord<enthus1ast> you can put it here if you like\: https://play.nim-lang.org/
14:41:48xaltschttps://paste.debian.net/1229583/
14:43:26xaltscAlso, I couldn't find the complexity of access for the different list/map-like types
14:45:58*jjido quit (Quit: My MacBook Air has gone to sleep. ZZZzzz…)
14:53:09FromDiscord<enthus1ast> like this? https://play.nim-lang.org/#ix=3ODm
14:55:40xaltscenthus1ast: It's a bit... verbose :D I wanted to precisely use filterIt and learn how to solve this kind of type issue, especially since the procedure doesn't seem to be generic and is not actually a procedure
15:02:00FromDiscord<demotomohiro> https://nim-lang.org/docs/sequtils.html#filterIt.t,untyped,untyped
15:02:32FromDiscord<demotomohiro> Document says "Returns a new sequence" but your code expecting it returns TableRef type.
15:03:29FromDiscord<enthus1ast> ok then this?\: https://play.nim-lang.org/#ix=3ODJ
15:03:45FromDiscord<enthus1ast> to make this a little bit more ergonomic you could define some helpers
15:05:23FromDiscord<enthus1ast> i think i've never used a ref tuple before \:)
15:06:12NimEventerNew thread by Nycto: Exclude from generated docs, see https://forum.nim-lang.org/t/8867
15:08:42*PMunch quit (Quit: Leaving)
15:14:01xaltscenthus1ast: Yeah, I did the same thing in the end (except it's more convenient to get a seq in fact). I would have though filterIt would preserve the container type.
15:15:22xaltscRegarding my use of ref tuple, I'm not quite sure I master the difference between tuples and objects, but tuple seem more well behaved mathematically, and since I expect them to be large, I'd rather use pointers than hard copies.
15:17:40FromDiscord<enthus1ast> ok maybe something like this\: https://play.nim-lang.org/#ix=3ODN
15:17:45FromDiscord<enthus1ast> could be improved i guess
15:18:02FromDiscord<enthus1ast> this is filter it from sequtils, patched for tables
15:20:58xaltscBut this copies the elements of the table, doesn't it ? (But probably, so does the library's filterIt)
15:21:47FromDiscord<enthus1ast> yes it creates a new table
15:22:31FromDiscord<enthus1ast> https://github.com/nim-lang/Nim/blob/35c812fda1ae7f1d183d3021793438fb2099c329/lib/pure/collections/sequtils.nim#L615
15:34:43*audiophile_ quit (Ping timeout: 256 seconds)
15:41:00*jjido joined #nim
15:47:20xaltscIn the end, this is what I ended up with: https://play.nim-lang.org/#ix=3ODW However, I can't find how to create a new reference
15:50:29xaltscMy problem lies likely with the combined use of a let and a ref, as I can manage to do it with a var + new
15:52:58xaltscManaged to do it https://play.nim-lang.org/#ix=3ODY. However, in this particular case, does it matter that AdjacencyMatrix is a ref ? Given that the possibly heavy field matrix is already a ref ?
16:47:19*noeontheend joined #nim
16:49:17FromDiscord<Ayy Lmao> Does anyone know what to do when getting `error:1408F10B:SSL routines:ssl3_get_record:wrong version number [SslError]` while using `httpclient`? I'm on Windows and installed the latest version of openssl and added it to my path but still get the error message.
16:51:47*noeontheend quit (Ping timeout: 256 seconds)
17:12:57FromDiscord<lantos> is there an easy way to do math ops (+, -, /, %, ) on big numbers stored in arrays of bytes? not bigint lib
17:20:37FromDiscord<Waldecir Santos> Is it possible to get all keys in a Table ?
17:20:54FromDiscord<Waldecir Santos> like a seq[string] of keys
17:24:13FromDiscord<Waldecir Santos> Hmm there is the keys proc it wasn't showing before /shrug.
17:26:27FromDiscord<Waldecir Santos> But I'm getting this error `Error: undeclared field: 'keys' for type tables.Table [type declared in /opt/homebrew/Cellar/nim/1.6.2/nim/lib/pure/collections/tables.nim(206, 3)]`
17:26:50FromDiscord<lantos> @Waldecir Santos ↵https://play.nim-lang.org/#ix=3OEG
17:27:47FromDiscord<Waldecir Santos> @lantos why it fails if I try `echo a.keys()` ?
17:27:47FromDiscord<lantos> https://nim-lang.org/docs/tables.html
17:27:57FromDiscord<Waldecir Santos> https://play.nim-lang.org/#ix=3OEI
17:29:06FromDiscord<auxym> In reply to @lantos "is there an easy": Sounds like a bigint lib? Why not use a bigint lib?
17:29:07FromDiscord<lantos> because the keys() returns a iterator which needs to be enumerated over. Using the toSeq() from the sequtils library turns it into a sequence kind of like rusts .collect()
17:29:17FromDiscord<lantos> In reply to @Waldecir Santos "https://play.nim-lang.org/#ix=3OEI": because the keys() returns a iterator which needs to be enumerated over. Using the toSeq() from the sequtils library turns it into a sequence kind of like rusts .collect()
17:29:49FromDiscord<Waldecir Santos> But why undeclared erro ? because there isn't a proc that returns string ?
17:31:27*jjido quit (Quit: My MacBook Air has gone to sleep. ZZZzzz…)
17:31:34FromDiscord<Waldecir Santos> Dismiss this 👆
17:31:41FromDiscord<Waldecir Santos> You guys are right.
17:32:52FromDiscord<demotomohiro> You cannot use method call syntax if 1st parameter is untyped
17:34:16FromDiscord<lantos> In reply to @auxym "Sounds like a bigint": want to use arrays instead of seq's because I want to avoid the copys (unless its a non issue)
17:34:23FromDiscord<lantos> (edit) removed "because I want"
17:35:36FromDiscord<Waldecir Santos> Another think that I always miss is that I need to import `std/sequtils` if I want to use `.toSeq` but I get used to it 😄
17:36:09FromDiscord<Waldecir Santos> (edit) "I" => "I'll" | "😄" => "😄e"
17:36:18FromDiscord<konsumlamm> In reply to @lantos "want to use arrays": avoid the copies? if anything, arrays do more copies
17:36:58FromDiscord<Waldecir Santos> I mean if I set the variable in 1 file/module and want to use that in another module and check keys/seq I need to import tables/sequtils
17:37:05FromDiscord<auxym> In reply to @lantos "want to use arrays": https://github.com/status-im/nim-stint "No heap/dynamic allocation"
17:38:38FromDiscord<auxym> megalo and bigint are seq-based, you could benchmark either and see which is faster between stack-based or seq-based
17:43:39FromDiscord<lantos> sent a code paste, see https://play.nim-lang.org/#ix=3OEP
17:43:52FromDiscord<lantos> In reply to @auxym "https://github.com/status-im/nim-stint "No heap/dyn": yeah this looks more like it will try this
17:46:03FromDiscord<auxym> do you really have to use ptrs? Nim tries to be smart when passing non-var arguments by using either a copy of ref, depending on which is faster. (refs avoid a copy but add an indirection step)
17:48:21FromDiscord<auxym> and var arguments are always passed by reference, if you want to modify in place.
18:02:48FromDiscord<Rainbow Asteroids> Does this code compile for anyone else? I'm getting a weird compiler error on stable and devel. It seems like GCC is reporting type errors. https://pastebin.com/FmwrEbv3
18:04:38FromDiscord<lantos> In reply to @auxym "and var arguments are": hmm, having some difficulty could you please show a small example?
18:07:39FromDiscord<Phil> This is likely a really dumb nimble gotcha
18:08:08FromDiscord<auxym> In reply to @Rainbow Asteroids "Does this code compile": it's failing in playground too. I have a vague recall of a compiler bug involving options and ref types. Did you try the 1.6.4 RC maybe?
18:09:14FromDiscord<auxym> maybe this? https://github.com/nim-lang/Nim/issues/16754
18:10:02FromDiscord<Phil> I, out of sheer frustration, changed permission of all files in a project to 777. Recursively! So every file in that dir↵So everyone and their mother should have access to read anything↵Yet when I run `nimble test` in that project, I get:↵> /home/isofruit/dev/norm/src/norm/postgres.nim(3, 11) Error: cannot open file: ndb/postgres
18:10:16FromDiscord<Phil> (edit) "dir↵So" => "dir has read write execute permission for everyone↵So"
18:11:25NimEventerNew post on r/nim by pietroppeter: Nim devroom at Fosdem tomorrow (Feb 24) 12:30-17:40, see https://reddit.com/r/nim/comments/skk2nc/nim_devroom_at_fosdem_tomorrow_feb_24_12301740/
18:12:28*PMunch joined #nim
18:12:46FromDiscord<Phil> sent a long message, see http://ix.io/3OF5
18:20:36*jjido joined #nim
18:21:52FromDiscord<tandy> my nimble looks like this
18:21:57FromDiscord<tandy> `requires "https://gitlab.com/tandy1000/listenbrainz-nim#head"`
18:21:58FromDiscord<tandy> sent a code paste, see https://paste.rs/yQ8
18:22:26FromDiscord<demotomohiro> Do you have the file your Nim says cannot open?
18:28:23FromDiscord<tandy> no
18:28:32FromDiscord<tandy> i just deleted nimble folder
18:31:28FromDiscord<tandy> i dont understnad why its requesting specific versions.. `Error: unhandled exception: cannot open: /home/tandy/.nimble/pkgs/prologue-0.5.0/prologue.nim [IOError]`
18:31:49*jjido quit (Quit: My MacBook Air has gone to sleep. ZZZzzz…)
18:32:26FromDiscord<lantos> ls -lah /home/tandy/.nimble/pkgs/prologue-0.5.0/
18:32:57FromDiscord<lantos> (edit) "ls -lah /home/tandy/.nimble/pkgs/prologue-0.5.0/" => "sent a code paste, see https://play.nim-lang.org/#ix=3OFe"
18:35:11FromDiscord<tandy> no file
18:37:14FromDiscord<tandy> ive got this in nimble anyway `requires "prologue"`↵(@lantos)
18:41:27FromDiscord<auxym> In reply to @lantos "hmm, having some difficulty": https://play.nim-lang.org/#ix=3OFi
18:41:51FromDiscord<auxym> you could check the generated C and see that it uses pointers under the hood
18:42:09FromDiscord<tandy> just needed to update nimble lol
18:44:30FromDiscord<Phil> Sidenote, does anyone know off the cuff to check if a type has a given field?
18:44:42FromDiscord<Phil> In a way that returns a boolean
18:44:50*jjido joined #nim
18:47:22FromDiscord<auxym> only possible at compile time with a macro
18:48:17FromDiscord<Phil> hmmm not a compile time proc?
18:49:52FromDiscord<auxym> possibly. not super familiar with that stuff but maybe have a look at the implementation for this: https://github.com/beef331/constructor
18:51:29FromDiscord<lantos> In reply to @auxym "https://play.nim-lang.org/#ix=3OFi": oh haha, I actually way trying to use openArray[byte] before but I was getting an error like var openArray can not be known at compile time (iirc)
18:51:54FromDiscord<lantos> (edit) "(iirc)" => "(iirc),↵don't know what I did it must of been something weird but thanks"
18:51:58FromDiscord<lantos> (edit) "weird but" => "weird,"
18:56:57*szahid quit (Read error: Connection reset by peer)
18:59:14FromDiscord<Phil> ... did I just crash play nim lang?
18:59:35PMunch@Phil, no, I took it down for maintenance
18:59:43FromDiscord<Phil> Phewwwwww
18:59:46PMunchSorry about that
19:00:09FromDiscord<Phil> No worries, I was just playing around with some compile time stuff and suddenly nothing
19:00:19FromDiscord<Phil> Thought I found something crashable
19:00:32FromDiscord<Phil> Instapanic that I ruined it for everybody else xD
19:02:12FromDiscord<Phil> sent a code paste, see https://play.nim-lang.org/#ix=3OFz
19:02:19FromDiscord<Phil> Outputs:↵> true↵> false
19:02:58FromDiscord<Phil> (edit) "https://play.nim-lang.org/#ix=3OFz" => "https://play.nim-lang.org/#ix=3OFA"
19:03:18FromDiscord<tandy> nvm, still happening
19:05:21*jjido quit (Quit: My MacBook Air has gone to sleep. ZZZzzz…)
19:12:16FromDiscord<ajusa> In reply to @tandy "nvm, still happening": you probably need to clear nim cache
19:14:20FromDiscord<tandy> nmm
19:14:24FromDiscord<tandy> how
19:30:16*vicfred joined #nim
19:31:14FromDiscord<lantos> sent a code paste, see https://play.nim-lang.org/#ix=
19:41:16FromDiscord<tandy> it keeps asking for this
19:41:16FromDiscord<tandy> \:(
19:48:14FromDiscord<ajusa> sent a code paste, see https://play.nim-lang.org/#ix=3OFM
19:48:34FromDiscord<ajusa> (edit) "https://play.nim-lang.org/#ix=3OFM" => "https://play.nim-lang.org/#ix=3OFN"
19:48:39FromDiscord<lantos> 😮 is that a bad thing though? all /pkgs should be dl'd?
19:49:04FromDiscord<ajusa> Yeah it should be fine but it won't fix the issue, and it may be annoying to reinstall all the nimble packages
19:50:35FromDiscord<ajusa> Like if you've installed pixie, chronicles, and fidget you've probably got 100 packages installed. Reinstalling all of those (and the correct versions for your code if you don't have a .nimble) could take hours
19:56:46NimEventerNew question by nonimportant: Out of Memory Error When Calling DLL function, see https://stackoverflow.com/questions/70992147/out-of-memory-error-when-calling-dll-function
19:59:15FromDiscord<Zajt> I don't quite understand the `-d` param to the nim compiler after checking the manpage, anyone wanna try to explian how you should use this one?
19:59:19FromDiscord<Phil> sent a code paste, see https://play.nim-lang.org/#ix=3OFP
19:59:24FromDiscord<Waldecir Santos> I'd like to create an "portuguese" channel in the language-specific group, who owns it ?
19:59:37FromDiscord<Phil> (edit) "https://play.nim-lang.org/#ix=3OFP" => "https://play.nim-lang.org/#ix=3OFR"
20:00:56*neurocyte0917090 joined #nim
20:09:35FromDiscord<tandy> well that helped↵(@ajusa)
20:12:39FromDiscord<ajusa> In reply to @tandy "well that helped (<@102899813149855744>)": Awesome! I've had to do that a couple times, not sure if there is a better way
20:29:08FromDiscord<Zajt> Is there a list of builtin compile-time symbols somewhere?
20:30:02*pro joined #nim
20:32:45FromDiscord<Phil> You can make any proc compile time with the compile time pragma, similarly for any variable with that pragma.↵Any variable assignment with a `const` also automatically happens at compile time
20:33:28FromDiscord<Phil> (edit) "pragma," => "pragma `{.compileTime.}`,"
20:33:56FromDiscord<Phil> Or did you mean something else?
20:35:38FromDiscord<Phil> On an unrelated note, if anyone wants to take a look at this monster of a compile time proc, I'm very open to refactor suggestions.↵I just found that the proc in there works, I can't get any other version to work somehow: https://codereview.stackexchange.com/questions/273747/compile-time-check-for-validity-of-given-field-name
20:36:32FromDiscord<Phil> (edit) "somehow:" => "somehow. It's the proc from above, I just now posted it also to codereview SO because that is a large enough topic that I want to document whatever I learn from it"
21:04:54*krux02 joined #nim
21:27:55*jmdaemon joined #nim
21:38:26*vicecea quit (Remote host closed the connection)
21:38:56*vicecea joined #nim
21:59:09*jmdaemon quit (Ping timeout: 256 seconds)
22:20:01*jjido joined #nim
22:20:41*pro quit (Ping timeout: 256 seconds)
22:49:08FromDiscord<evoalg> [Elegantbeef](https://matrix.to/#/@elegantbeef:matrix.org)\: I am reading in a file from https://github.com/fchollet/ARC/blob/master/data/training/a61f2674.json and doing https://play.nim-lang.org/#ix=3OGt like you taught me and it seems to work ... since it's a more complex json I dunno if using types is better or cleaner? ... but I'm happy it works as is 😀
22:52:35FromDiscord<Elegantbeef> Types would probably be cleaner
22:52:35FromDiscord<evoalg> ok thank you!
22:55:13PMunchHmm... /home/peter/.choosenim/toolchains/nim-1.6.2/lib/pure/times.nim(289, 29) Error: type mismatch: got 'int32' for '0 .. 999999999' but expected 'int'
22:55:42PMunchThis is an annoying thing compiling for AVR..
22:57:52*jmdaemon joined #nim
23:01:05FromDiscord<Elegantbeef> [evoalg](https://matrix.to/#/@evoalg:matrix.org)\: here's the type version
23:01:05FromDiscord<Elegantbeef> https://play.nim-lang.org/#ix=3OGy
23:02:24FromDiscord<evoalg> You're the best beefy! ❤️
23:33:32*jjido quit (Quit: My MacBook Air has gone to sleep. ZZZzzz…)
23:35:57*jmdaemon quit (Ping timeout: 240 seconds)
23:37:36*jmdaemon joined #nim