<< 05-02-2022 >>

00:11:11*vicfred quit (Quit: Leaving)
00:24:59NimEventerNew post on r/nim by timrichardson: new user question about sort, see https://reddit.com/r/nim/comments/skt1f5/new_user_question_about_sort/
00:25:07*jmdaemon quit (Ping timeout: 256 seconds)
00:26:23*jmdaemon joined #nim
00:38:40Nuc1eoN❤️
01:06:37*krux02 quit (Remote host closed the connection)
01:34:17*jmdaemon quit (Ping timeout: 240 seconds)
01:38:28*jmdaemon joined #nim
02:06:10NimEventerNew Nimble package! polymorph - An entity-component-system with a focus on compile time optimisation, see https://github.com/rlipsc/polymorph
02:06:10NimEventerNew Nimble package! polymers - A library of components and systems for use with the Polymorph ECS, see https://github.com/rlipsc/polymers
02:06:10NimEventerNew Nimble package! glbits - A light interface and selection of utilities for working with OpenGL and SDL2, see https://github.com/rlipsc/glbits
02:07:07FromDiscord<Elegantbeef> Oh shit @rlipsc now in nimble! 😀
02:07:42FromDiscord<rlipsc> Woo! 😁
02:08:09FromDiscord<Elegantbeef> I still have to learn how to use ECS properly
02:08:22FromDiscord<rlipsc> Now all I need to do is make forum announcements 😆
02:08:40FromDiscord<Elegantbeef> Maybe TMWN post aswell 😛
02:08:55FromDiscord<rlipsc> Well, you can always check out some examples in Polymers!
02:09:15FromDiscord<rlipsc> TMWN?
02:09:30FromDiscord<Elegantbeef> This month with Nim
02:09:30FromDiscord<rlipsc> Oh, this month in Nim. Yes!
02:09:42*PMunch quit (Quit: leaving)
02:10:04FromDiscord<Elegantbeef> Eh i've toyed with polymorph before, just dont follow the ECS style overly well presently
02:10:44FromDiscord<rlipsc> It is a different way of working, for sure. It can be pretty productive though!
02:11:11FromDiscord<Elegantbeef> Yea i'm just a dullard
02:11:29FromDiscord<Elegantbeef> Havent used it a lot so find it tedious so dont use it
02:11:37FromDiscord<rlipsc> Nah, it's just like, almost the opposite to many ways of programming. It's like working with sets, in a way
02:11:51FromDiscord<rlipsc> fair enough!
02:12:57FromDiscord<rlipsc> In my talk tomorrow I've got a bit about making a web server with ECS, which was quite interesting to hack out
02:14:09*neurocyte0917090 quit (Ping timeout: 256 seconds)
02:15:13FromDiscord<rlipsc> I've not seen many examples of that kind of thing, though I know flecs has a web server aspect, but not sure how it works in comparison. I tried to stick to 'pure' ECS and build components on top of each other. Very different way of doing things. I don't know that I'd recommend it for people vs the traditional approach, at least, for now!
02:16:30FromDiscord<rlipsc> I think though, ECS can be less tedious for a lot of stuff. Especially simulation type things.
02:16:38FromDiscord<Elegantbeef> Yea i just make pretend code, also known as working on a project then abandoning it shortly after starting. So I'm not the best to say anything
02:18:10FromDiscord<rlipsc> Ha, well, you should see the number of attempts at games I've made and remade! But you know, each time we get better, right? 😁
02:19:01FromDiscord<Elegantbeef> Hey i've got a lot of dead games so i know
02:19:27FromDiscord<Elegantbeef> Recently returned to my last game project and actually almost have a usable level editor 😀
02:20:00FromDiscord<rlipsc> I think I'm at the stage where my example game demo in Polymers is probably more fully featured than my sprawling codebase for "real" games!
02:20:01*TakinOver joined #nim
02:20:37FromDiscord<rlipsc> Nice, yeah I saw that over on gamedev, looks really good!
02:28:39*jmdaemon quit (Ping timeout: 256 seconds)
02:42:40*jmdaemon joined #nim
03:06:37*jmdaemon quit (Ping timeout: 256 seconds)
03:20:32*ldlework quit (Remote host closed the connection)
03:23:22*hexeme joined #nim
03:33:01nrds<Prestige99> Hmm https://play.nim-lang.org/#ix=3OHi this way of doing do while is actually pretty neat
03:33:11nrds<Prestige99> Can use continue at least
03:33:51nrds<Prestige99> Wonder if I'm missing some obvious logic flaw
03:34:54FromDiscord<Elegantbeef> Nothing i can see
03:36:52nrds<Prestige99> neat, the beef stamp of approval
03:37:03*jmdaemon joined #nim
03:43:22FromDiscord<Elegantbeef> Not that it means much
04:07:40*arkurious quit (Quit: Leaving)
05:40:41*rockcavera quit (Remote host closed the connection)
05:43:32*Gustavo6046 joined #nim
06:56:20*Gustavo6046 quit (Read error: Connection reset by peer)
06:58:39FromDiscord<Phil> If I start writing compileTime procs solely to do compile time checks I guess I should start writing concepts instead 😕
06:59:07FromDiscord<Rika> I’m not sure what you mean
06:59:38FromDiscord<Elegantbeef> Perhaps if you're doing `isThing(T: typedsec): bool`
06:59:56FromDiscord<Rika> Nice typo
07:00:13FromDiscord<Elegantbeef> Thanks rika]
07:00:24FromDiscord<Rika> Combo x2
07:00:33FromDiscord<Elegantbeef> Can always count on you
07:00:54FromDiscord<Rika> No problem 👌
07:00:55FromDiscord<Phil> I've run into a scenario where I want a proc that I can just give a type, then the name of one of its fields as a string and another string which is a pragma value. The proc then just checks: a) does that type have a field with that name, b) does that field have the pragma and c) is the value of that pragma equal to what you'd expect
07:01:22FromDiscord<Elegantbeef> You're describing a concept 😀
07:01:24FromDiscord<Rika> Then yes perhaps a concept works better
07:01:24FromDiscord<Phil> So far I throw a FieldDefect hidden behind a "when" statement whenever any of those 3 conditions is wrong
07:01:55FromDiscord<Phil> Somehow a compileTime-annotated proc apprears to absolutely have to have a return
07:02:19FromDiscord<Phil> Which makes the code all kinds of ugly
07:02:25FromDiscord<Elegantbeef> Nope
07:02:28FromDiscord<Rika> ??
07:02:34FromDiscord<Rika> That would be a strange limitation
07:02:40FromDiscord<Elegantbeef> sent a code paste, see https://play.nim-lang.org/#ix=3OHG
07:02:47FromDiscord<Rika> What error do you get without a return type
07:02:55FromDiscord<Phil> sent a long message, see http://ix.io/3OHH
07:02:58FromDiscord<Phil> (edit) "sent" => "I get↵> Error: expression 'checkFkField(M, "character_article_id", table(O))' has no type (or is ambiguous)↵When I try to not have" | "long message, see http://ix.io/3OHH" => "return on that pragma"
07:03:02FromDiscord<Phil> (edit) "pragma" => "proc"
07:03:05FromDiscord<Elegantbeef> "that pragma"
07:03:06FromDiscord<Phil> proc, not pragma
07:03:10FromDiscord<Phil> Early morning
07:03:13FromDiscord<Rika> Is it used like a pragma?
07:03:20FromDiscord<Rika> And how do you use the proc
07:03:21FromDiscord<Phil> Nope
07:03:25FromDiscord<Phil> https://codereview.stackexchange.com/questions/273747/compile-time-check-for-validity-of-given-field-name
07:03:34FromDiscord<Phil> > const _ = checkFkField(SecondModel, "fkToSomeModel", "SomeModel") #Will not throw a defect at compile time
07:03:49FromDiscord<Rika> Well you’re assigning it
07:03:56FromDiscord<Rika> Of course it needs a return type
07:04:02FromDiscord<Phil> Yeah but even if I don't I get this error
07:04:12FromDiscord<Rika> “Don’t”?
07:04:42FromDiscord<Phil> even if I only write "checkFkField" without an assignment and refactor the proc to not return a bool
07:05:11FromDiscord<Rika> sent a code paste, see https://play.nim-lang.org/#ix=3OHI
07:05:23FromDiscord<Elegantbeef> God that's an awful solution 😀
07:05:24FromDiscord<Rika> Where did you run off to beef smh
07:05:32FromDiscord<Elegantbeef> Water
07:05:47FromDiscord<Rika> Water you talking about aren’t you always free
07:06:05FromDiscord<Elegantbeef> Wildly not
07:06:05FromDiscord<Phil> In reply to @Elegantbeef "God that's an awful": I entirely agree
07:06:45FromDiscord<Rika> You mean “wholly agree” jeez come on don’t you get the message
07:07:16FromDiscord<Phil> Even with you writing that I don't
07:07:29FromDiscord<Rika> Word that starts with “w”
07:07:54FromDiscord<Phil> I blame early morning
07:08:07FromDiscord<Rika> What do you mean
07:08:21FromDiscord<Rika> Which continent or time zone do you live in
07:08:56FromDiscord<Phil> WCET
07:09:34FromDiscord<Rika> Well I didn’t intend to continue the word streak honestly
07:09:54FromDiscord<Phil> Wild claim
07:10:15FromDiscord<Rika> Wait, you can’t use that as beef already did smh
07:11:22FromDiscord<Phil> Was never intending of playing by the rules. Anyway, I wanted to avoid concepts in case they force me on arefactor on the next nim upgrade but
07:11:39FromDiscord<Phil> (edit) "but" => "but... I am in that scenario already with the parseEnum fix"
07:11:49FromDiscord<Phil> (edit) "arefactor" => "a refactor"
07:12:53FromDiscord<GreenFork> can I create `seq[T]` from `ptr UncheckedArray[T]` without `newSeq` to avoid additional memory allocations? I see that seq is just a pointer and a length, I'd like to manually create one <https://github.com/nim-lang/Nim/blob/devel/lib/system/seqs_v2.nim#L17-L28>
07:12:57FromDiscord<Rika> Concepts The Sequel I believe are partially implemented already
07:13:06FromDiscord<Rika> In reply to @GreenFork "can I create `seq[T]`": No
07:13:19FromDiscord<Rika> The pointer in the sequence is afaik GC managed
07:13:28FromDiscord<Elegantbeef> It is indeed
07:13:42FromDiscord<GreenFork> so I can't play nice with a GC?
07:13:44FromDiscord<Rika> And it’s not the same as the pointer of an unchecked array
07:13:45FromDiscord<Phil> I'll first need to find the concept docs again
07:13:45FromDiscord<Rika> No
07:14:19FromDiscord<Rika> There is extra data in that pointer I believe like capacity (unless ARC in which the capacity is with the length and the pointer is just data)
07:14:37FromDiscord<GreenFork> okay, thanks!
07:14:59FromDiscord<Elegantbeef> You can create an openarray though
07:15:01FromDiscord<Elegantbeef> But not hold onto it
07:15:26FromDiscord<Elegantbeef> So you can write procedures that take in `openArray[T]` and work with your unchecked array, seq, array
07:16:12FromDiscord<Rika> Don’t store it though 😛
07:16:18FromDiscord<Phil> ... I know I've been linked to documentation about concepts before
07:16:28FromDiscord<GreenFork> yeah, openarray should be good enough
07:16:29FromDiscord<Elegantbeef> Rika making jokes
07:16:31FromDiscord<Rika> In reply to @Isofruit "... I *know* I've": manual_experimental.html
07:16:47FromDiscord<Elegantbeef> then `toOpenArray` is your friend Spoon
07:16:52FromDiscord<Rika> Yes I memorise the fucking URL I’m fucking strange
07:17:06FromDiscord<GreenFork> `proc toOpenArray[T](x: ptr UncheckedArray[T]; first, last: int): openArray[T]` will do the trick
07:17:13FromDiscord<GreenFork> thanks
07:17:26FromDiscord<Elegantbeef> You cannot hold onto the return though
07:17:26FromDiscord<Elegantbeef> So take that into consideration
07:17:41FromDiscord<Phil> In reply to @Rika "manual_experimental.html": Ahhh that did it, thank!
07:19:37FromDiscord<GreenFork> > You cannot hold onto the return though↵you mean I can't return this type?
07:20:14FromDiscord<Rika> You can
07:20:22FromDiscord<Rika> You can’t use a variable to hold it I believe
07:20:37FromDiscord<Rika> How would to open array work if you couldn’t return the type…
07:20:50FromDiscord<Elegantbeef> You cannot return it
07:20:58FromDiscord<Rika> Really? Why?
07:21:28FromDiscord<Phil> While in a concept, is there a proc or something that I can say to a type "give me your field with the name of the string that is in `myFieldName`"
07:21:45FromDiscord<Phil> (edit) "`myFieldName`"" => "the variable`myFieldName`""
07:21:46FromDiscord<Elegantbeef> > Error\: invalid type\: 'openArray[int]' in this context\: 'proc (thing\: seq[int])\: openArray[int]' for proc
07:21:51FromDiscord<GreenFork> > You can’t use a variable to hold it I believe↵if I can't use a variable to hold the openarray value which I have returned from a function - that's not very useful then
07:22:13FromDiscord<Rika> In reply to @GreenFork "> You can’t use": Well apparently you can’t return it either now so I have no fucking clue
07:22:15FromDiscord<GreenFork> it looks more like a typecast
07:22:50FromDiscord<GreenFork> the toOpenArray looks like a typecast
07:23:06FromDiscord<Elegantbeef> It is
07:23:11FromDiscord<Elegantbeef> It's a `pointer, len` so is only allowed as an input parameter
07:23:17FromDiscord<Elegantbeef> As anything else could be unsafe
07:23:20FromDiscord<Elegantbeef> You can use a template though
07:23:40FromDiscord<GreenFork> it's all fine, I will stay with unchecked arrays for now. maybe provide helper functions which do a typecast or create custom container as recommended elsewhere
07:24:36FromDiscord<Elegantbeef> Templates are your friend here
07:26:47FromDiscord<Elegantbeef> https://play.nim-lang.org/#ix=3OHK here you go iso
07:26:47FromDiscord<Elegantbeef> Have fun with that
07:27:07FromDiscord<Elegantbeef> What're you presently trying to do green?
07:27:29FromDiscord<Elegantbeef> Like a code example
07:30:17FromDiscord<Rika> Beef what’s your opinion on exceptions versus result types
07:31:00*pro joined #nim
07:31:04FromDiscord<Elegantbeef> I'm pretty indifferent
07:31:24FromDiscord<creikey> beef how do I find love in life
07:31:37FromDiscord<Elegantbeef> You stick your finger in a light socket
07:32:05FromDiscord<Rika> Why not “you fork a socket”
07:32:14FromDiscord<Elegantbeef> If an light socket doesnt make you love life nothing will
07:32:33FromDiscord<GreenFork> sent a code paste, see https://play.nim-lang.org/#ix=3OHM
07:33:07FromDiscord<Rika> Avoid a copy -> make an abstraction over ptr UncheckedArray
07:33:14FromDiscord<Elegantbeef> Yea i knew it was for C interop did assume raylib 😀
07:33:37FromDiscord<GreenFork> > Avoid a copy -> make an abstraction over ptr UncheckedArray↵sure, I call it "a custom container"
07:33:43FromDiscord<Rika> Yeah pretty much
07:33:43FromDiscord<GreenFork> yep, raylib for life
07:34:10FromDiscord<Rika> I don’t see any other way other than that or open array
07:34:16FromDiscord<Elegantbeef> I really should use raylib given it sounds like my ideal setup, but i'm a daft and keep working with my collection
07:34:24FromDiscord<Elegantbeef> View types cant come soon enough
07:34:29nrds<Prestige99> beef did you say "an light socket"
07:34:31FromDiscord<Rika> True
07:34:38FromDiscord<Rika> In reply to @nrds "<Prestige> beef did you": The L is silent
07:34:46FromDiscord<Rika> An ‘ight socket
07:34:50FromDiscord<Elegantbeef> I typed too fast
07:34:52nrds<Prestige99> Lol
07:35:08FromDiscord<Elegantbeef> I love how that's the thing you question out of that entire conversation
07:35:34FromDiscord<Elegantbeef> "Did you accidently use the wrong conjunction(is it a conjunction?)"
07:36:31FromDiscord<Rika> Article
07:37:26FromDiscord<Rika> It’s an article is what I mean
07:37:27FromDiscord<Elegantbeef> Nah i dont read those they piss me off
07:37:41FromDiscord<Elegantbeef> Yes i knew what you meant
07:37:41FromDiscord<Elegantbeef> I'm only a partial drongo
07:39:03FromDiscord<Rika> What the fuck is a Drongo
07:39:17FromDiscord<huantian> A bongo with drm
07:39:27FromDiscord<Elegantbeef> It's a bird but aussie slang
07:39:48FromDiscord<Elegantbeef> Just means idiot
07:40:55FromDiscord<Rika> Why do y’all European American Australian dongs keep using the strangest of fuckin slang
07:41:31FromDiscord<Elegantbeef> I have a collection of words to mean idiot in a variety of idiioms, since I like calling shit dumb
07:42:14FromDiscord<Elegantbeef> The abillity to say precisely how dumb something/someone is an artform
07:43:47FromDiscord<Rika> An art form that makes it difficult for us dumbasses to understand half the time lmfao
07:44:03FromDiscord<Elegantbeef> Hey i called myself a drongo
07:49:46*al1ranger joined #nim
08:02:09FromDiscord<Phil> In reply to @Elegantbeef "https://play.nim-lang.org/#ix=3OHK here you go": Sweet! Now to figure out on why that concept breaks when I adjust it, hmmm
08:07:33FromDiscord<Elegantbeef> What're you adjusting?
08:13:12FromDiscord<Phil> I'm adding an additional input parameter (another static string) and adjusting the last line to be a comparison with that new input parameter. Norm has a `table` func that gives you back either the name of the type as a string or the value of the types `tableName` pragma (also from norm, for when the name of your table differs from the name of the type. E.g. "wikientries_character" the table with the type "Character").↵↵https://play.nim
08:13:39FromDiscord<Phil> (edit) "I'm adding an additional input parameter (another static string) and adjusting the last line to be a comparison with that new input parameter. Norm has a `table` func that gives you back either the name of the type as a string or the value of the types `tableName` pragma (also from norm, for when the name of your ... table" added "SQL"
08:15:10FromDiscord<Phil> Argh, that had a mistake in it
08:15:11FromDiscord<Phil> https://play.nim-lang.org/#ix=3OHZ
08:25:24FromDiscord<Elegantbeef> What's with the table?
08:28:58FromDiscord<Phil> sent a code paste, see https://play.nim-lang.org/#ix=3OI0
08:29:21FromDiscord<Phil> (edit) "https://play.nim-lang.org/#ix=3OI0" => "https://paste.rs/8AV"
08:30:29*Gustavo6046 joined #nim
08:30:54FromDiscord<Phil> sent a code paste, see https://paste.rs/nPk
08:40:37*al1ranger quit (Quit: Leaving)
08:55:55FromDiscord<Elegantbeef> Going to be issues here since that `getCustomPragma` returns a tuple
08:56:08FromDiscord<Elegantbeef> You'll need to return the type explicitly afaict
08:56:54FromDiscord<Phil> It does?
08:57:01FromDiscord<Phil> Huh.... is that macro specific behaviour?
08:57:15FromDiscord<Elegantbeef> No it's just that macro
08:57:24FromDiscord<Elegantbeef> It creates a tuple of types afaict
08:57:36FromDiscord<Elegantbeef> which means a `template doThing(T: typdesc){.pragma.}` doesnt work
08:59:35FromDiscord<Phil> Wait, different idea
09:03:29FromDiscord<Phil> Hmm the fk pragma is defined as this↵`template fk(val: typed) {.pragma.}`
09:04:35FromDiscord<Phil> I'm currently wrecking my brain why I can do that in a compile time proc but not the concept
09:05:09FromDiscord<Phil> "That" being `(toTableName == sourceFieldValue.getCustomPragmaVal(fk).table())`
09:05:35FromDiscord<Elegantbeef> That works in a compile time proc?
09:06:12FromDiscord<Phil> One sec, let me double check if the error message I receive is correct, but the proc explodes as I want it to
09:13:54FromDiscord<Elegantbeef> https://play.nim-lang.org/#ix=3OI8 well this concept works
09:13:58FromDiscord<Elegantbeef> Need to abuse macros for `==`
09:14:24FromDiscord<Elegantbeef> Down side of concepts is that it Nim seems to disregard type information
09:15:14FromDiscord<Elegantbeef> https://play.nim-lang.org/#ix=3OI9 fixed the type info going away
09:15:25*PMunch joined #nim
09:16:00FromDiscord<locriacyber> Hello everyone
09:16:04FromDiscord<Elegantbeef> Hello
09:16:11FromDiscord<Elegantbeef> Is that better than your procedure, that's yet to be seen 😀
09:16:13FromDiscord<Phil> sent a code paste, see https://play.nim-lang.org/#ix=3OIa
09:16:22FromDiscord<Phil> everything is better than that god damn procedure
09:16:32FromDiscord<Phil> I have it because it works, not because I like it
09:16:35FromDiscord<locriacyber> So, who knows about how Nim compiler works
09:16:56FromDiscord<Elegantbeef> I've done some contributions to the compiler, so i do somewhat
09:17:12FromDiscord<locriacyber> Can you help me with issue 19484
09:17:24FromDiscord<locriacyber> I found the issue
09:17:34FromDiscord<Elegantbeef> I'm guessing it's not going to be 'X doesnt work but should'
09:17:42FromDiscord<locriacyber> No
09:17:53FromDiscord<locriacyber> It's a compiler bug
09:18:15FromDiscord<Elegantbeef> Sure the other is also a compiler bug 😛
09:18:47FromDiscord<locriacyber> Ok
09:20:15FromDiscord<Elegantbeef> Well i'll look at it anyway
09:23:52FromDiscord<Elegantbeef> Wait what's the issue?
09:24:34FromDiscord<Phil> You can't attach custom "this concept doesn't apply because of {custom explanation}" messages for when a concept failed?↵Iso sad
09:25:37FromDiscord<vv_sophorose> Getting a really strange situation where the compiler hangs on this code: https://play.nim-lang.org/#ix=3OIb
09:26:10FromDiscord<vv_sophorose> Even running nimsuggest seems to hang on it, so maybe there's something going on with the AST.
09:26:12FromDiscord<Elegantbeef> Worth noting [locriacyber](https://matrix.to/#/@locriacyber:matrix.org) it only happens on `refc` with `arc/orc` it works fine
09:26:33FromDiscord<Elegantbeef> That's some complex code 😀
09:27:11FromDiscord<vv_sophorose> oh nevermind i think it was a faulty find-and-replace that I didn't catch
09:27:35FromDiscord<locriacyber> Is refc support deprecated?
09:27:37FromDiscord<vv_sophorose> at the same time, a circular type definition should probably be raised as a compiler error >_>
09:27:45FromDiscord<Elegantbeef> No refc isnt deprecated, i was just telling you something
09:28:04FromDiscord<Elegantbeef> It generally is but the compiler isnt overly intelligent
09:28:47FromDiscord<Elegantbeef> So whatever causes the issue is related to refc's runtime
09:29:01FromDiscord<locriacyber> I want to generate TNimNode for the C type. How do I modify and test the compiler? Is there a way to access Nim private proc by force?
09:29:16FromDiscord<Elegantbeef> you can do `import myModule {.all.}`
09:29:40FromDiscord<Elegantbeef> You clone the compiler then build it using the build script and then use `koch`
09:29:57FromDiscord<Elegantbeef> https://github.com/nim-lang/Nim#contributing
09:32:32NimEventerNew thread by Chibo: Benchmarking, see https://forum.nim-lang.org/t/8868
09:39:14*krux02 joined #nim
09:41:04FromDiscord<Phil> ... That table func is so incredibly strange
09:41:10FromDiscord<Phil> (edit) "is" => "in normis"
09:41:13FromDiscord<Phil> (edit) "normis" => "norm is"
09:41:27FromDiscord<Phil> Suddenly you have superfluous `"` around your table name string, wtf
09:43:12FromDiscord<noow> does an object having a reference to itself count as a cycle from the perspective of arc
09:43:37FromDiscord<Rika> Pretty sure it does yes
09:43:56FromDiscord<noow> but if I just set it to nil manually, should be fine, right
09:45:00FromDiscord<Rika> Actually I think it doesn’t matter if it’s a self referential cycle like that, maybe it will be fine
09:45:12FromDiscord<noow> example code
09:45:15FromDiscord<noow> sent a code paste, see https://play.nim-lang.org/#ix=3OIe
09:45:27FromDiscord<noow> oh?
09:45:40FromDiscord<noow> okay thanks
09:45:56FromDiscord<Rika> Check with valgrind if you want to ensure, I guess
09:45:58FromDiscord<noow> worst case scenario it will leak and most likely I will find it when I figure out how to use valgrind
09:46:03FromDiscord<Rika> Is this a long running program ?
09:46:08FromDiscord<noow> a language interpreter
09:46:08FromDiscord<Elegantbeef> If you want arc to watch it you'd mark it `acyclic`
09:46:19FromDiscord<Elegantbeef> But yea self referencing is an issue with arc
09:46:39FromDiscord<Rika> In reply to @Elegantbeef "But yea self referencing": I don’t see why
09:46:55FromDiscord<noow> to make it clear, there are no cycles, only self references
09:47:05FromDiscord<Rika> If it’s only holding itself (and not a larger loop like 1 -> 2 -> 1) it should be fine no?
09:47:31FromDiscord<Rika> Ah
09:47:35FromDiscord<Rika> Wait duh
09:47:47FromDiscord<Rika> It’s a problem because 1 holding 1 is count = 1
09:48:03FromDiscord<noow> i will set the field to nil for safety
09:48:04FromDiscord<Rika> It won’t collect
09:48:15FromDiscord<Rika> Or just use ORC I don’t know why you use ARC
09:48:16FromDiscord<noow> or I might as well switch to ptr, since the ownership model is clear
09:48:28FromDiscord<Elegantbeef> Just use orc is indeed the solution
09:48:48FromDiscord<noow> I don't like the idea of getting random stop the worlds
09:48:58FromDiscord<noow> although in practice most likely I wouldn't notice anything
09:49:11FromDiscord<noow> i'll just free it manually then
09:49:24FromDiscord<Elegantbeef> Orc isnt stop the world
09:49:31FromDiscord<Rika> ??
09:49:38FromDiscord<Elegantbeef> Is it stop the world?
09:49:39FromDiscord<noow> is it not a mark and sweep cycle?
09:49:42FromDiscord<Rika> No it’s not
09:49:57FromDiscord<Rika> It’s ARC with a cycle collector, not sure if generational
09:50:12FromDiscord<Rika> It should be just as fast as ARC
09:50:15FromDiscord<Elegantbeef> Orc has low latency than even refc
09:50:16FromDiscord<Rika> Or slightly slower
09:50:25FromDiscord<Rika> Latency but not throughput
09:50:44FromDiscord<Elegantbeef> Well be slower when you need to collect, but will be same where cycles arent
09:50:50FromDiscord<noow> also, orc is not deterministic
09:51:01FromDiscord<noow> although alloc isn't really deterministic either
09:51:01FromDiscord<Elegantbeef> The cycle collector isnt
09:51:03FromDiscord<Rika> Do you need determinism
09:51:11FromDiscord<Elegantbeef> The arc half is
09:51:15FromDiscord<Rika> Do you know what it means for a GC to be deterministic
09:51:27FromDiscord<noow> that every time I run the same code it collects at the same time
09:51:47FromDiscord<noow> or am I wrong?
09:51:50FromDiscord<Rika> Now is that important to you
09:51:59FromDiscord<noow> most likely not, but it sounds very cool
09:52:05FromDiscord<Rika> So what if it’s cool
09:52:12FromDiscord<Elegantbeef> > Both ARC and ORC offer deterministic performance for hard realtime systems
09:52:16FromDiscord<Rika> Water boarding at Guantanamo bay sounds cool
09:52:19FromDiscord<Elegantbeef> I dont know if that means it's deterministic
09:52:50FromDiscord<noow> but as I said, the ownership model is very clear
09:52:55FromDiscord<noow> in this one single object type
09:53:03FromDiscord<noow> so switching to orc is as much energy as making it ptr
09:53:10FromDiscord<Rika> ??
09:53:37FromDiscord<Rika> Replacing types and analysing manually if it is sound is just as hard as changing a single compiler flag?
09:53:46FromDiscord<noow> it's an object whose instances only exist in a single seq, and there is a single place in the codebase where they are popped and forgotten about
09:53:55FromDiscord<Rika> Do whichever then
09:54:01FromDiscord<Rika> Your code
09:54:04FromDiscord<Rika> You know what’s best
09:54:28FromDiscord<Elegantbeef> The fun part is you could always just use orc and if you dislike the performance you can then go and modify the code
09:54:30FromDiscord<noow> I don't, I have no idea what i'm doing, but i'm not giving up until it works so it will work eventually
09:54:44FromDiscord<noow> i guess you're right
09:55:14FromDiscord<noow> or i could just call `=destroy` manually too ?
09:55:21FromDiscord<noow> no need for ptr then if that's possible
09:56:09FromDiscord<Phil> sent a code paste, see https://play.nim-lang.org/#ix=3OIg
09:56:41FromDiscord<Elegantbeef> I dont follow?
09:56:45FromDiscord<Phil> (edit) "https://play.nim-lang.org/#ix=3OIg" => "https://play.nim-lang.org/#ix=3OIh"
09:56:46FromDiscord<Rika> Me neither
09:57:11FromDiscord<Elegantbeef> I'm fairly certain concepts cannot do `==` comparisons
09:57:17FromDiscord<Elegantbeef> So we use a macro to do it
09:57:31FromDiscord<Phil> ` model.toIdent(Field).field.getCustomPragmaVal(fk).table().sameTableName(ModelType.table())`↵If you use that instead of the variant that uses the `getTableName` template it doesn't work
09:57:39FromDiscord<Rika> == means something subtly different in a concept doesn’t it
09:58:12FromDiscord<Elegantbeef> Hey i just work around concept issues
09:58:14FromDiscord<Rika> There’s something wrong there
09:58:18FromDiscord<Elegantbeef> I dont work here
09:58:22FromDiscord<Rika> You have an extra “.field” at the start
09:58:24FromDiscord<Rika> Remove that
09:59:02FromDiscord<Elegantbeef> That still might not work i know I had a bunch of issues
09:59:02FromDiscord<Elegantbeef> Some self inflicted
09:59:16FromDiscord<Rika> Well I’m not saying it will work after that change
09:59:17FromDiscord<Phil> Yep, concept still returns false
09:59:20FromDiscord<Rika> I’m just saying that that’s one issue
09:59:26FromDiscord<Phil> ` model.toIdent(Field).getCustomPragmaVal(fk).table().sameTableName(ModelType.table())`
09:59:48FromDiscord<Elegantbeef> Concept evaluation is a bit off so yea
09:59:58FromDiscord<Rika> Haha experimental
10:00:43FromDiscord<Elegantbeef> I dont have the intelligence or effort to improve concepts 😀
10:00:53FromDiscord<Phil> I've also moved my order of what you should use:↵proc > template > compileTime proc > macro
10:01:09FromDiscord<Elegantbeef> who the fuck manually annotates procs compile time 😀
10:01:21FromDiscord<Phil> I do so that I can believe I'm in normal nim syntax land !
10:02:48FromDiscord<Phil> It gives me this warm fuzzy feeling of safety that the proc only works at compile time as I intended!
10:02:54FromDiscord<Elegantbeef> For concepts like this i just use macros/templates untill it works
10:03:37FromDiscord<Elegantbeef> Yea compile time is lovely
10:03:38FromDiscord<Elegantbeef> Though you could've used `static: assert` in your procs
10:03:54FromDiscord<Elegantbeef> Though the concept is more readable even though slightly obfuscated
10:04:03FromDiscord<Phil> You mean the monstrosity or the "sameTableName" that I moved from template to proc?
10:04:35FromDiscord<Elegantbeef> The thing made by Dr. Frankenstein
10:05:51FromDiscord<Phil> how does that one work ?↵`static assert sourceFieldValue.hasCustomPragma(fk)`?
10:06:07FromDiscord<Elegantbeef> Yes
10:06:14FromDiscord<Elegantbeef> Not in the concept
10:06:25FromDiscord<Elegantbeef> static runs code at compile time
10:06:44FromDiscord<Elegantbeef> so static assert is a compile time assurance
10:08:53FromDiscord<Phil> Okay, yeah that compiles
10:09:00FromDiscord<Phil> Let's see if that also explodes as it should
10:09:58FromDiscord<Elegantbeef> And also if you dont want the fugly syntax you could make a template `modelWith(field, table)` that emits the type
10:10:12FromDiscord<Elegantbeef> so in this case it'd be `modelWith(myField, RandomTableName)`
10:11:52FromDiscord<Phil> Okay it explodes as I want and I just saw I can pass it a message that I want, really nice.
10:12:03FromDiscord<Phil> I think first I need to write myself a macro ala "getField"
10:12:13FromDiscord<Phil> So that I don't iterate over all fields in a type to find the one whose name matches
10:12:17FromDiscord<Elegantbeef> I personally dont really like string literals in typedefs though there are purposes
10:12:29FromDiscord<Elegantbeef> Wait does this mean you're going back to the monster?
10:13:06FromDiscord<Phil> I'm keeping both at the moment to get them both to the best I can manage and then I'll decide
10:13:14FromDiscord<Phil> (edit) "I'm keeping both at the moment to get them both to the best ... I" added "level"
10:14:11FromDiscord<Phil> I might even manage some stuff in the compile time proc that I can also use in the concept via some template or sth
10:14:31FromDiscord<Phil> Chances are either way that long term I'll definitely move to concepts
10:14:34FromDiscord<Phil> They are the intended path
10:15:19FromDiscord<Phil> Question is just if I move to concepts now or later
10:15:37FromDiscord<Phil> So either way that concept code is going into my repo so that I can evolve on it
10:16:21FromDiscord<Elegantbeef> That concept code was licensed under give me all your money, so you best get on that 😛
10:17:48FromDiscord<Phil> You'll have to fight araq and flywind for it, they're currently getting it xP
10:18:05FromDiscord<Elegantbeef> They dont give me any money
10:18:09FromDiscord<Phil> Shame!
10:20:08FromDiscord<Phil> Okay holy crap the static asserts are a lot nicer than the fugly when eligs
10:20:10FromDiscord<Phil> (edit) "eligs" => "elifs"
10:20:17FromDiscord<Rika> Lol
10:20:39FromDiscord<Elegantbeef> Why would someone want to statically assure stuff
10:20:44FromDiscord<Elegantbeef> Down with the typesystem
10:20:51FromDiscord<Elegantbeef> Give me structural types and duck typing!
10:21:57FromDiscord<Rika> Quack
10:22:36FromDiscord<Phil> Use Rika for programming↵Noted down!
10:23:39FromDiscord<Elegantbeef> We'll only use tuples and do `proc doThing(a: tuple) = echo a.myField`
10:24:30FromDiscord<Rika> Oh nice idea
10:24:46FromDiscord<Rika> Time to use it
10:25:04FromDiscord<Phil> For my understanding:↵`macro toIdent(a: typed, s: static string): untyped = newDotExpr(a, ident(s))`↵This is essentially a "getField" it gives me the... NimNode? That is the actual field, which is something I can call `getCustomPragmaVal(fk)` on
10:25:16FromDiscord<Phil> (edit) "field," => "field on the given type,"
10:25:38NimEventerNew post on r/nim by jasfi: Back-end powered Flutter UI, see https://reddit.com/r/nim/comments/sl3vfh/backend_powered_flutter_ui/
10:26:16FromDiscord<Rika> Cool
10:26:51*jjido joined #nim
10:27:02FromDiscord<Elegantbeef> that generates a `a.s`
10:27:43FromDiscord<Phil> Check, perfect!
10:38:13FromDiscord<dom96> Our Nim devroom at FOSDEM starting in less than an hour! https://fosdem.org/2022/schedule/track/nim_programming_language/
11:01:22*jjido quit (Quit: My MacBook Air has gone to sleep. ZZZzzz…)
11:12:06FromDiscord<Phil> I do not comprehend how to join that fosdem room in element
11:12:47FromDiscord<Phil> Wait, this time the join link worked
11:13:09FromDiscord<SecureThisShit> sent a long message, see http://ix.io/3OIv
11:14:03FromDiscord<SecureThisShit> I thought about Hooking GetCommandLineA and other functions but there may be a simpler way to do so.
11:14:56FromDiscord<isofruitus> Sadness is, when I don't trust my machine to run element, discord, thunderbird, firefox and 2 vscode instances at the same time
11:15:38FromDiscord<konsumlamm> In reply to @SecureThisShit "I'm facing some strange": "unicode" is no encoding, UTF8 is a unicode encoding
11:17:17FromDiscord<SecureThisShit> But is is possible to change the type for input arguments in general?
11:30:09FromDiscord<dom96> @everyone FOSDEM 2022 starting soon. Join here: https://matrix.to/#/#nim-devroom:fosdem.org
11:30:43FromDiscord<forlorn> 😐
11:30:58FromDiscord<cryptocode> megaping
11:33:01FromDiscord<Dot32> wait
11:33:09FromDiscord<Dot32> everyone has @everyone perms?
11:33:31FromDiscord<Oreo> Koala
11:33:45FromDiscord<Waldecir Santos> what matrix client should I use on ios ?
11:35:39FromDiscord<Phil> I'm reasonably sure element is a PWA or sth
11:35:49FromDiscord<Phil> It should do the trick
11:36:55FromDiscord<Waldecir Santos> got it thank you
11:38:17FromDiscord<Tetralux> In reply to @SecureThisShit "I thought about Hooking": This might be the console, and not your program.↵If you run `chcp 65001` in your console and it fixes it, then that's indeed what it is.
11:38:34FromDiscord<Tetralux> (Assuming Windows)
11:38:57FromDiscord<Tetralux> If you do the system call `SetConsoleOutputCP(65001)`, that will avoid the need to run `chcp 65001` in the shell every time.
11:39:50FromDiscord<Tetralux> (The default encoding for Windows shell is not UTF-8.)
11:39:56FromDiscord<Tetralux> (edit) "not" => "_not_"
11:40:01FromDiscord<Tetralux> (edit) "_not_" => "_not_"
11:43:20*pro quit (Quit: pro)
11:43:41FromDiscord<demotomohiro> When you run console Nim program on windows, it automatically change code page to 65001.
11:44:34FromDiscord<Tetralux> In reply to @demotomohiro "When you run console": Do you know where the code is that does that?
11:45:56FromDiscord<bestman 8> In reply to @Dot32 "everyone has @everyone perms?": no it seems like that is an admin
11:46:29FromDiscord<Phil> sent a code paste, see https://play.nim-lang.org/#ix=3OIG
11:46:55Amun-RaTetralux: system/io
11:48:15*Gustavo6046 quit (Quit: Leaving)
11:48:30Amun-Rawhen defined(windows) and appType == "console" and not defined(nimDontSetUtf8CodePage) and not defined(nimscript): const Utf8codepage = 65001; discard setConsoleOutputCP(Utf8codepage); discard setConsoleCP(Utf8codepage)
11:50:51*xlebex joined #nim
11:51:13xlebexhi
11:51:21*xlebex left #nim (WeeChat 2.3)
11:56:41FromDiscord<SecureThisShit> sent a long message, see http://ix.io/3OIJ
12:03:17*xlebex joined #nim
12:03:34*xlebex left #nim (#nim)
12:04:14Amun-RaSecureThisShit: is your app type "console"?
12:04:31Amun-Rafor if you copy that verbatim it won't work
12:05:10FromDiscord<SecureThisShit> In reply to @Amun-Ra "<@605765004796362820>: is your app": Of course
12:07:15FromDiscord<Rika> Default app type is console afaik
12:08:54FromDiscord<SecureThisShit> In reply to @Tetralux "This might be the": The strange thing is, passing the parameters to the console app itself works fine, but passing them on runtime to the program results in trash values with the wrong encoding.
12:19:22Amun-Rawhat value these functions return in that case?
12:27:59FromDiscord<SecureThisShit> I think that I would need UTF-16LE, because the string "asdasd" resulted in the chinese latters 獡慤摳਍ https://media.discordapp.net/attachments/371759389889003532/939497581116026890/unknown.png
12:33:31FromDiscord<Tetralux> In reply to @SecureThisShit "The strange thing is,": I don't think there's a difference between those two. Did you mean something else? 😛
12:41:02FromDiscord<SecureThisShit> CyberChef converted the chinese letters back to asdasd via UTF-16LE 🧐
13:15:28FromDiscord<Zajt> Is there a list of builtin compile-time symbols somewhere?
13:18:26FromDiscord<Rika> What do you mean? List of templates and macros?
13:18:38FromDiscord<ee7> https://nim-lang.org/docs/system.html#10 ?
13:18:45FromDiscord<Rika> Just go to the documentation for system and go to the macros and templates sections
13:19:04FromDiscord<Rika> Don’t forget that some modules are re exported too
13:19:15FromDiscord<Rika> So look at those too, io and iterators and other modules
13:19:31FromDiscord<Phil> TIL when we talk of "bind" that is another word for "assignment"
13:19:38FromDiscord<Rika> Yes
13:19:43FromDiscord<Phil> I was so effing confused
13:19:46FromDiscord<Rika> ? Where
13:19:56FromDiscord<Phil> I just was not aware of that wording
13:20:24FromDiscord<Rika> Okay
13:20:52FromDiscord<Phil> Beef gave me some decent advice yesterday because I had problems with generic procs that somehow required the modules I used the generics in to also import modules with procs I used in the generics (like typetraits for "name")
13:21:14FromDiscord<Phil> His advice was "just bind it" and I had no idea what that meant until I started reading more through the general docs
13:21:26FromDiscord<Phil> And noticed how that word was used
13:21:28FromDiscord<Rika> Bind is usually just a “more generic” way of saying assign yeah
13:21:48FromDiscord<Rika> When you say assign most people think “oh with = or so?”
13:22:15FromDiscord<Rika> And no
13:22:17FromDiscord<Rika> There’s a bind keyword
13:22:45FromDiscord<Phil> I saw that and still have no idea how it's used
13:22:53FromDiscord<Rika> https://nim-lang.org/docs/manual.html#generics-bind-statement
13:22:53FromDiscord<Phil> I alleviated my issues with stuff like:↵`const name = typetraits.name`
13:22:58FromDiscord<Rika> Didn’t beef explain it to you
13:23:09FromDiscord<Phil> I didn't ask, thinking my google fu would save me
13:23:15FromDiscord<Phil> Which it didn't
13:23:19FromDiscord<Phil> My google fu was weak
13:23:24FromDiscord<Rika> Bind means “get this symbol from the same area as I was called”
13:23:52FromDiscord<Rika> Mixin means “we don’t have this symbol yet, get it at the place where someone else calls this template”
13:23:58FromDiscord<Rika> Place -> scope
13:24:04FromDiscord<Rika> Area too, should be scope
13:24:30FromDiscord<Rika> Bind is “symbol from template definition”↵Mixin is “symbol from template usage”
13:24:58FromDiscord<Phil> Hmmm
13:25:12FromDiscord<Rika> They’re inverses
13:25:17FromDiscord<Rika> One does the inverse of the other
13:25:19FromDiscord<Phil> Oh, I understood that
13:25:38FromDiscord<Rika> One delays symbol resolution the other expedites it
13:25:39FromDiscord<Rika> Okay
13:25:43FromDiscord<Phil> I'm trying to replace my `const name = typetraits.name` with `bind typetraits.name` or `bind name`
13:25:52FromDiscord<Phil> And trying to understand why my code breaks
13:25:57FromDiscord<Rika> I don’t know how to help you there, I don’t remember the context
13:26:51FromDiscord<Scarecrow> who pinged
13:26:57FromDiscord<Rika> Everyone ping above
13:26:58FromDiscord<Phil> I'll eventually make either a simplified example or decide to stick with const
13:27:07FromDiscord<Rika> Okay
13:27:24FromDiscord<Phil> and const looks hacky so the example will likely exist within an hour
13:31:19*jmdaemon quit (Ping timeout: 256 seconds)
13:31:29FromDiscord<Zajt> In reply to @Rika "What do you mean?": I mean like these for example↵`-d:strip -d:release`
13:31:53FromDiscord<Rika> In reply to @Zajt "I mean like these": Those are called defines, and afaik they’re in the manual?
13:32:51FromDiscord<Zajt> Do you have any link? I've been looking for the list of those builtin defines
13:37:39FromDiscord<Rika> Ah here
13:37:40FromDiscord<Rika> https://nim-lang.org/docs/nimc.html#compiler-usage-compileminustime-symbols
13:38:24FromDiscord<Rika> Hmm in the end it didn't list many
13:38:47FromDiscord<konsumlamm> i suspect there might not be an exhaustive list
13:38:55FromDiscord<Rika> There isn't
13:39:01FromDiscord<Rika> Because that's how defines are designed
13:39:30FromDiscord<Rika> But I was hoping for at least some more common ones
13:39:37FromDiscord<Rika> (edit) "But I was hoping for at least some more ... common" added "of the"
13:40:19FromDiscord<konsumlamm> at least the 1.6 changelog has a list of defines introduced there
13:43:03*Gustavo6046 joined #nim
13:43:12FromDiscord<Phil> Okay so I can't really demonstrate this in play nim lang since it needs to be in 2 separate files
13:45:39FromDiscord<Phil> sent a code paste, see https://play.nim-lang.org/#ix=3OJ6
13:45:46FromDiscord<Phil> (edit)
13:45:59FromDiscord<Phil> (edit) "https://paste.rs/nN2" => "https://play.nim-lang.org/#ix=3OJ7"
13:46:14FromDiscord<Zajt> In reply to @Rika "https://nim-lang.org/docs/nimc.html#compiler-usage-": alright thanks, a bit annoying there is no complete list
13:46:41FromDiscord<Phil> bind explodes in my face, a const assignment doesn't, not sure why
13:48:54NimEventerNew Nimble package! ratel - Zero-cost abstractions for microcontrollers, see https://github.com/PMunch/ratel
13:51:52FromDiscord<Rika> Cool
13:52:08FromDiscord<enthus1ast> are the talks recorded btw?
13:52:23FromDiscord<enthus1ast> missed much of the ecs talk unfortunately \:/
13:52:52PMunchThey are recorded, and should be made available via the FOSDEM YouTube channel and the FOSDEM archive
13:53:31PMunchhttps://fosdem.org/2022/archives/
13:53:42PMunchWon't be up until after the conference though
13:53:54PMunchAnd the YouTube videos can take months
13:56:05FromDiscord<enthus1ast> mh ok
14:21:11FromDiscord<xx_ns> the post-talk Q&A sessions aren't recorded though
14:21:23FromDiscord<xx_ns> at least that's what Pietro said for the Ratel one
14:21:42FromDiscord<xx_ns> or er actually maybe it was Peter who said that
14:21:53PMunchI think the official Q&A might be recorded, but not the "hallway" Q&A in the separate room
14:22:15FromDiscord<xx_ns> ah yes, meant to say that
14:29:03*Gustavo6046 quit (Quit: Leaving)
14:36:51FromDiscord<ee7> @Zajt Well, you can run something like this to get a dirty list of defines https://play.nim-lang.org/#ix=3OJs
14:43:56FromDiscord<ee7> Or slightly better, but still too naive (and now producing output that's too long for the playground)\: https://play.nim-lang.org/#ix=3OJw
14:45:49*arkurious joined #nim
14:49:39*TakinOver quit (Quit: https://quassel-irc.org - Chat comfortably. Anywhere.)
15:22:36FromDiscord<enthus1ast> puh i did not fully understand this pararules yet
15:22:48FromDiscord<enthus1ast> but seems interesting
15:38:39FromDiscord<retkid> I’ve been mentioned
15:39:12termerDoes nim have any list types made for concurrency? In Java there is CopyOnWriteArrayList and the ability to make lists backed by read/write locks
15:39:26termerI'm wondering if there is anything similar in the nim standard library
15:40:38termerIn my case, I'm going to be implementing a pool of worker threads which take in new tasks from some sort of list
15:50:28FromDiscord<01> is nim purely functional language?
15:50:49FromDiscord<Phil> Nim is not even remotely a functional language, it's mostly procedural
15:50:58FromDiscord<01> i c
15:51:32FromDiscord<Phil> It supports some functional things such as "map" etc., but even for those there are other solutions out there
15:51:46FromDiscord<BhamidipatiNikhil> In reply to @Isofruit "Nim is not even": Due to LISP like expressive features one can even do AI in nim right??
15:52:04FromDiscord<01> why would LISP be something related to AI lol
15:52:22FromDiscord<Phil> In reply to @BhamidipatiNikhil "Due to LISP like": That's beyond my paygrade, I have done neither stuff with LISP, nor with machine learning
15:52:36FromDiscord<01> python and R are the mainstream languages used in ML, and neither are lisp dialects
15:52:43FromDiscord<BhamidipatiNikhil> i read in AI related books that LISP and prolog are preferred for expressing AI concepts with ease...
15:52:55FromDiscord<01> nah
15:52:57FromDiscord<01> rarely
15:53:12FromDiscord<BhamidipatiNikhil> And all the examples in the book were given in LISP and Prolog....
15:53:22FromDiscord<01> lisp isn't even a programming language
15:53:24FromDiscord<01> it's dialect
15:53:34FromDiscord<BhamidipatiNikhil> Common LISP i mean
15:53:58FromDiscord<01> obviously you can do it in a lisp language, but Python and R are the main players
15:54:03FromDiscord<01> the rest is rounding error
15:54:40FromDiscord<BhamidipatiNikhil> In reply to @01 "obviously you can do": I think AI is beyond neural networks and machine learning... i accept python and r as dominant in both of those areas..
15:54:40FromDiscord<Phil> Haven't seen anything from R regarding ML yet, but yeah, Python has tons of ML libs
15:54:43FromDiscord<01> actually I think scala might have somewhat big part too?
15:54:59FromDiscord<01> In reply to @BhamidipatiNikhil "I think AI is": is it a subset of ML
15:55:03FromDiscord<BhamidipatiNikhil> but can you do automated theorem proving in python?? Prolog is the leader here!
15:55:05FromDiscord<01> (edit) "In reply to @BhamidipatiNikhil "I think AI is": ... is" added "AI" | removed "it"
15:56:09FromDiscord<Phil> AI is an incredibly overloaded word. Given that, specifying what precisely you mean there helps avoid confusion.↵Regardless, I'm out on that topic, AI is not my field
15:56:28FromDiscord<Phil> (edit) "AI is an incredibly overloaded word. Given that, specifying what precisely you mean there helps avoid confusion.↵Regardless, I'm out on that topic, AI ... is" added "in any of its variations"
15:56:51FromDiscord<01> nevermind, ML is subset of AI
15:57:02FromDiscord<unexploredtest> Someone pinged?
15:57:16FromDiscord<Phil> In reply to @unexploredtest "Someone pinged?": There's FOSS nim talks going
15:57:17FromDiscord<01> but yea, AI is so overloaded...
15:57:26FromDiscord<unexploredtest> In reply to @Isofruit "There's FOSS nim talks": Oh I see
15:57:26FromDiscord<Phil> That was a general ping
15:57:36FromDiscord<unexploredtest> gotcha
15:57:56FromDiscord<Phil> I'm not sure how to link you to the channel via discord, there's a link further up
15:58:07FromDiscord<Phil> That would work on a matrix client like element
15:58:27FromDiscord<unexploredtest> Yeah np, I don't really have an interest xD
15:58:36FromDiscord<unexploredtest> In reply to @Isofruit "That would work on": The meeting is held on Matrix?
15:58:59FromDiscord<BhamidipatiNikhil> In reply to @unexploredtest "The meeting is held": FOSDEM!!
15:59:03FromDiscord<01> how do i join on matrix
15:59:16FromDiscord<Phil> I barely can use matrix, let alone comprehend how it's set up. I know you can connect via matrix, so... I think it's on matrix servers and not some random other thing?
15:59:26FromDiscord<01> In reply to @Isofruit "I barely can use": Element client is simple
15:59:38FromDiscord<01> https://element.io/
15:59:53FromDiscord<01> https://github.com/vector-im/element-web open source
15:59:54FromDiscord<unexploredtest> In reply to @Isofruit "I barely can use": Ah gotcha, haven't seen many meetings held on Matrix xD
15:59:58FromDiscord<Phil> In reply to @01 "Element client is simple": Sorta kinda, but that doesn't change that it's not terribly easy to grasp when something is a discord server and if you're connecting through a bridge or whatever
16:00:41FromDiscord<unexploredtest> yeah it has its learning curve
16:02:34FromDiscord<Phil> One day I might bother putting in the brain cells to understand matrix/element, but I've got things that I care about more to write, like implementing some missing signals from my webapp
16:04:42FromDiscord<01> honestly I wish people would adopt better platforms
16:04:53FromDiscord<01> cause discord doesn't have open source servers or clients
16:05:12FromDiscord<01> and they even discourage modifying client for some reason >_>
16:06:38FromDiscord<unexploredtest> In reply to @01 "honestly I wish people": Same
16:06:45FromDiscord<Rika> They don't care
16:06:47FromDiscord<unexploredtest> But they just don't shift
16:06:52FromDiscord<unexploredtest> yeah
16:07:03FromDiscord<Rika> If it's easy to use and has their friends then that's what they use
16:07:09FromDiscord<01> tbh idk if matrix makes it any better
16:07:19FromDiscord<Rika> Lol
16:07:22FromDiscord<01> i don't assume groups are end to end encrypted
16:07:26FromDiscord<Rika> Nope
16:07:32FromDiscord<Rika> Not by default
16:07:33FromDiscord<01> then it kinda blows
16:07:36FromDiscord<01> 🤷‍♂️
16:07:47FromDiscord<01> signal forces everything to be e2e
16:07:47FromDiscord<unexploredtest> In reply to @01 "tbh idk if matrix": The ease of use?
16:07:58FromDiscord<01> i guess
16:07:59FromDiscord<unexploredtest> In reply to @01 "i don't assume groups": It asks u
16:08:05FromDiscord<unexploredtest> In Element.io
16:08:09FromDiscord<unexploredtest> (edit) "Element.io" => "Element"
16:08:12FromDiscord<Rika> Signal is not perfect forward secret
16:08:34FromDiscord<unexploredtest> In reply to @unexploredtest "In Element": If u want to create a room, the E2EE is toggled by default
16:09:53FromDiscord<01> okay so private rooms are e2ee, but public isn't
16:10:03FromDiscord<01> then again it has little sense to e2ee public room
16:10:09FromDiscord<Rika> Doesn't really make sense does it
16:10:09FromDiscord<01> as anyone can just join anyway
16:10:14FromDiscord<unexploredtest> In reply to @01 "okay so private rooms": I mean, there's no point ig?
16:10:20FromDiscord<unexploredtest> In reply to @01 "as anyone can just": yeah
16:10:24FromDiscord<01> yep
16:19:28FromDiscord<T-taku> I want channel for Japanese
16:19:35FromDiscord<T-taku> (edit) "I want channel for Japanese ... " added "in server"
16:19:42FromDiscord<T-taku> (edit) "I want channel for Japanese in ... server" added "this"
16:23:17FromDiscord<Ícar> In reply to @dom96 "@everyone FOSDEM 2022 starting": https://media.discordapp.net/attachments/371759389889003532/939556797151338576/ping.mp4
16:25:12FromDiscord<jos> nim needs braces!!!! :explodeblob:
16:27:29PMunch@jos, not really..
16:27:53FromDiscord<Professor Actual Factual> Nim has crooked teeth, it needs braces lol
16:28:42FromDiscord<Phil> I'll agree with pmunch here, indentation works fine
16:29:16FromDiscord<jos> i agree indentation works fine
16:29:18FromDiscord<jos> but i want nim to grow
16:29:57FromDiscord<jos> and you also may be willing to give up your beautiful, braceless, language to make it more popular
16:30:11FromDiscord<jos> the fact of the matter is, people love braces
16:30:20FromDiscord<Phil> I write java for a living
16:30:21FromDiscord<Phil> I disagree
16:30:33FromDiscord<konsumlamm> then Nim is not for people apparently
16:31:02FromDiscord<Professor Actual Factual> I think the answer depends. Python got very far without braces for a reason 🙂
16:31:22FromDiscord<Professor Actual Factual> I actually coded in python first because it had no braces
16:31:25FromDiscord<Phil> Not a single person I have worked with so far says they give a hoot about braces, they're annoying to write out with most of the time.
16:31:32FromDiscord<Rika> Lots of people love braces, lots of them hate braces
16:31:59FromDiscord<Professor Actual Factual> Why doesn't someone just write a VScode extension that generates braces for them
16:32:03FromDiscord<Professor Actual Factual> problem solved?
16:33:07FromDiscord<konsumlamm> why don't people just stop crying about braces?
16:33:41FromDiscord<konsumlamm> if you don't like indentation based syntax, Nim is not for you, simple as that
16:35:52termerNim's os.sleep proc applies to the current thread only, right?
16:35:57termerjust making sure before I use it
16:37:26FromDiscord<BhamidipatiNikhil> Here's nim... I am cheering for it! https://media.discordapp.net/attachments/371759389889003532/939560357993779210/unknown.png
16:55:57FromDiscord<retkid> In reply to @BhamidipatiNikhil "Here's nim... I am": The little weird kid in the room
16:56:47FromDiscord<retkid> One day it won’t be Nim programming language and just be Nim
16:57:46*PMunch quit (Quit: leaving)
17:16:54FromDiscord<Rika> huh rust doesnt have one 👀
17:24:12FromDiscord<Yepoleb> Because rust bad, nim good
17:49:24FromDiscord<huantian> I did not know theres enough of LibreOffice for 2 days of talks
17:49:47FromDiscord<Rika> h uh true
17:51:17FromDiscord<huantian> And apparently only one day of python
17:51:37FromDiscord<Rika> what is "Distributions"
17:51:41FromDiscord<huantian> Man I can’t imagine using python without type hints https://media.discordapp.net/attachments/371759389889003532/939579044519895070/IMG_2309.png
17:51:46FromDiscord<Rika> "friends of openjdk"???
17:51:54FromDiscord<Rika> In reply to @huantian "Man I can’t imagine": oh BOY
17:51:58FromDiscord<huantian> In reply to @Rika "what is "Distributions"": Seems to be linux or bsd distros
17:52:07FromDiscord<huantian> Might be some interesting stuff there
17:52:09FromDiscord<Rika> i started python when 3.6 basically just came out
17:52:22FromDiscord<Rika> so literally nothing was annotated unless they used comments to do so, which isnt common
17:52:37FromDiscord<huantian> 😔
17:52:56FromDiscord<Rika> it was amazing 🙂
17:54:13FromDiscord<huantian> Ooh there’s a talk on GNU Guix, ill probably watch that later
17:54:26FromDiscord<huantian> Wonder if there’s any NixOS talks
17:54:56FromDiscord<huantian> Talk vids haven’t been uploaded yet right
17:55:04FromDiscord<Rika> dont think so
18:00:33FromDiscord<enthus1ast> sent a long message, see http://ix.io/3OKs
18:01:00FromDiscord<enthus1ast> sent a code paste, see https://play.nim-lang.org/#ix=3OKt
18:02:17FromDiscord<enthus1ast> another thing you might want to add to your readme is how to actually compile the dll/so, i was assuming i must compile them by hand but maybe it would streamline the useage if you could mention this in the readme
18:04:23*hexeme is now known as ldlework
18:04:26FromDiscord<enthus1ast> sent a code paste, see https://play.nim-lang.org/#ix=3OKv
18:09:59FromDiscord<treeform> nim should create you a dll file, this is how we do it: https://github.com/treeform/pixie/blob/master/pixie.nimble#L18
18:10:45FromDiscord<treeform> windows and linux is easy, but with mac you need the x86+arm combined dll.
18:11:51FromDiscord<enthus1ast> yes this i just did manually by calling the nim compiler
18:12:02FromDiscord<enthus1ast> what i meant is that its not written in the readme \:)
18:12:59FromDiscord<treeform> yeah we should document that
18:13:10FromDiscord<treeform> and you right the `import bumpy, chroma, unicode, vmath` is a problem as well.
18:28:25*jsef5 joined #nim
18:28:38jsef5ooo
18:29:23jsef5@jsef5#7993: Its me! i never knew nim had a irc channel lol
18:55:02termerit does
19:06:06FromDiscord<Zajt> sent a code paste, see https://play.nim-lang.org/#ix=3OKK
19:06:31FromDiscord<Zajt> (edit) "https://paste.rs/fvr" => "https://play.nim-lang.org/#ix=3OKL"
19:06:32FromDiscord<Zajt> (edit) "https://play.nim-lang.org/#ix=3OKL" => "https://play.nim-lang.org/#ix=3OKM"
19:11:14*vicfred joined #nim
19:22:21*krux02 quit (Remote host closed the connection)
19:22:30*jjido joined #nim
19:22:58*krux02 joined #nim
19:28:37*pro joined #nim
19:30:00FromDiscord<nexeq> hello guys, I need ur help. I've installed nim binary from tar archive via install.sh↵nim command is OK but there is no nimble
19:30:05FromDiscord<nexeq> how to solve?
19:32:04FromDiscord<@chronomatopoeia:matrix.org> I am interested too
19:35:33FromDiscord<Phil> Which Linux distribution?
19:36:20FromDiscord<nexeq> trisq... uh... ubuntu↵(@Phil)
19:36:31FromDiscord<Phil> Why not use apt?
19:36:38FromDiscord<Phil> > apt-get install nim
19:36:43FromDiscord<nexeq> old version \:)↵(@Phil)
19:36:50FromDiscord<nexeq> I need actual
19:38:16FromDiscord<Arathanis> sent a code paste, see https://play.nim-lang.org/#ix=3OKT
19:38:19FromDiscord<Arathanis> choosenim located here: https://github.com/dom96/choosenim
19:38:24FromDiscord<Arathanis> if you want to read about it
19:38:31FromDiscord<Arathanis> its a lot like `pyenv` but for nim
19:49:36FromDiscord<nexeq> noice↵(@Arathanis)
19:49:39FromDiscord<nexeq> choosenim helped
19:51:50FromDiscord<Arathanis> sweet deal, glad it worked for you :]
19:56:18FromDiscord<Zajt> I'm trying to compile a Nim file into an exe on my Linux VM. When using `--opt:size` argument in the Nim compiler, the binary runs but no beacon. If I compile without that flag, it works and gives me beacon.↵If I use add this flag `-d:release` then I get `SIGSEGV: Illegal storage access. (Attempt to read from nil?)`↵Anyone understand why? Would be nice to use those flags to make
19:57:17FromDiscord<Zajt> I'm trying to compile a Nim file into an exe on my Linux VM. When using `--opt:size` argument in the Nim compiler, the binary runs but doesn't do what it should do. If I compile without that flag, my code does what it should do.↵If I use add this flag `-d:release` then I get `SIGSEGV: Illegal storage access. (Attempt to read from nil?)`↵Anyone understand why? Would be nice to use those flags
20:01:01FromDiscord<enthus1ast> @Zajt\: it could be that you load a release dll into a debug application
20:01:22FromDiscord<enthus1ast> if you load it from nim
20:01:56FromDiscord<enthus1ast> afaik that made such issues in the past
20:02:08FromDiscord<Zajt> how can I check if it's a debug application I am making?
20:02:25FromDiscord<enthus1ast> do you load the dll into a nim host?
20:03:27FromDiscord<enthus1ast> compile both with -d\:release
20:05:00FromDiscord<Zajt> I compile it on my Linux vm, then transfer to my windows vm and run the exe there
20:05:23FromDiscord<enthus1ast> so you cross compile?
20:05:52FromDiscord<enthus1ast> i mean nim hostapplication
20:06:14FromDiscord<Zajt> yeah I cross compile
20:06:30FromDiscord<enthus1ast> yeah should not make a difference
20:07:05FromDiscord<enthus1ast> both must share the same bitness (32/64) and afaik also release or debug
20:07:58FromDiscord<Zajt> yeah but I can't use release since I get that storage access if I use that flag
20:08:18FromDiscord<Zajt> and I'm compiling for 64 bit so I have this flag `--cpu=amd64` included
20:08:54FromDiscord<enthus1ast> i think you also must choose the correct mingw (if you use this)
20:09:35FromDiscord<Zajt> this is what flags I use when it works `nim c --cpu=amd64 -d:strip --hints:off -d:verbose -d:exportExe --os:windows --gcc.exe:x86_64-w64-mingw32-gcc --gcc.linkerexe:x86_64-w64-mingw32-gcc`
20:18:41FromDiscord<enthus1ast> looks good i think
20:18:49FromDiscord<enthus1ast> and the host application?
20:18:55FromDiscord<enthus1ast> ist this also 64 bit?
20:19:31FromDiscord<enthus1ast> maybe also add --gc\:arc and -d\:release
20:25:26FromDiscord<enthus1ast> sent a code paste, see https://play.nim-lang.org/#ix=3OL2
20:25:54FromDiscord<enthus1ast> sent a code paste, see https://play.nim-lang.org/#ix=3OL3
20:26:22FromDiscord<enthus1ast> am i supposed to do use seq like this?
20:43:49*jsef_5 joined #nim
20:43:56*jsef5 quit (Read error: Connection reset by peer)
20:44:05FromDiscord<enthus1ast> sent a code paste, see https://play.nim-lang.org/#ix=3OL6
20:44:37*jsef5 joined #nim
20:47:57*jsef_5 quit (Ping timeout: 240 seconds)
21:01:15*jmdaemon joined #nim
21:04:43FromDiscord<Tuatarian> anyone have any idea why mapIt is erroring out here?
21:04:51FromDiscord<Tuatarian> the usual template/generic instantiation thing
21:04:57FromDiscord<Tuatarian> ``nim
21:04:59FromDiscord<Tuatarian> oops
21:05:08FromDiscord<Tuatarian> sent a code paste, see https://play.nim-lang.org/#ix=3OL9
21:05:29FromDiscord<Tuatarian> musicArr is a seq[Music], IsMusicPlaying is a a (Music) -> bool
21:05:36FromDiscord<Tuatarian> musicArr is populated
21:05:49FromDiscord<Tuatarian> mapIt is giving the error here, not foldl
21:07:35FromDiscord<ynfle> What's the error?
21:07:50FromDiscord<enthus1ast> error message?
21:16:21FromDiscord<Tuatarian> template/generic instantiation of `mapIt` from here
21:16:45FromDiscord<Tuatarian> the template/generic instantiation thing, should have made that more clear
21:17:21FromDiscord<konsumlamm> that's not the full error message, is it?
21:17:25FromDiscord<Tuatarian> no it is
21:18:03FromDiscord<konsumlamm> then can you post a reproducible example?
21:18:12FromDiscord<konsumlamm> preferrably through the nim playground
21:18:30FromDiscord<Tuatarian> hard to reproduce
21:18:37FromDiscord<Tuatarian> it uses a lot of stuff from a library
21:18:51FromDiscord<Tuatarian> here's the full error log (which weirdly disagrees with the visual studio version)
21:18:59FromDiscord<Tuatarian> sent a code paste, see https://play.nim-lang.org/#ix=3OLg
21:19:05FromDiscord<Tuatarian> the above thing is from line 103
21:19:14FromDiscord<Tuatarian> vscode not visual studio
21:20:53FromDiscord<Rika> then something is malformed
21:21:08FromDiscord<Rika> have you checked line 129 as it says
21:22:23FromDiscord<Tuatarian> yeah
21:22:26FromDiscord<Tuatarian> thanks for the tip
21:22:36FromDiscord<Tuatarian> it was some weird issue with indentation elsewhere in the file
21:23:01FromDiscord<Tuatarian> I copied from somewhere else and somehow something got screwed (probably tab/space replacement) and it gave this error
21:23:03FromDiscord<xigoi> Have you tried map(IsMusicPlaying) instead of mapIt(IsMusicPlaying it)?
21:23:15FromDiscord<Tuatarian> it works now that I fixed the other issue
21:23:32FromDiscord<Tuatarian> oh that would have been a good idea actually
21:23:40FromDiscord<Tuatarian> then it would have pointed to the real error
21:23:43FromDiscord<Tuatarian> didn't occur to me
21:23:50FromDiscord<Tuatarian> thanks guys
21:30:01*dtomato joined #nim
21:47:19FromDiscord<Waldecir Santos> Is it possible to append sequences like in python oldList += ['1', '2']... ?
21:47:53FromDiscord<Waldecir Santos> Or I need to implement the operator for it [] and []= ?
21:48:01FromDiscord<enthus1ast> use &=
21:48:22FromDiscord<enthus1ast> also valid for strings etc
21:49:18FromDiscord<ynfle> Or `.add`
21:49:20FromDiscord<Waldecir Santos> Oh nice, thank you, let me test it
21:49:48FromDiscord<Waldecir Santos> But add only addes 1 element right @ynfle I want to "concatenate" 2 lists/tuples
21:50:14FromDiscord<enthus1ast> nope
21:50:20FromDiscord<enthus1ast> imho &= is an alias for add
21:50:23FromDiscord<enthus1ast> or the other way around
21:50:50FromDiscord<Waldecir Santos> Got it, so it's smart, thank you
21:51:12FromDiscord<enthus1ast> https://nim-lang.org/docs/system.html#%26%3D.t%2Ctyped%2Ctyped
21:51:27FromDiscord<enthus1ast> `For files an alias for write. If not specialized further, an alias for add.`
21:53:46FromDiscord<Waldecir Santos> Thank you, I still getting used to nim and its documentation
21:54:52FromDiscord<enthus1ast> the search in the doc and "theIndex" is your friend
21:55:10FromDiscord<enthus1ast> https://nim-lang.org/docs/theindex.html
21:55:38FromDiscord<enthus1ast> i often also use the "source" button to jump directly to the source
21:56:31FromDiscord<Waldecir Santos> Awesome ! instasave for me 😄
21:57:07FromDiscord<Phil> I've got my shortcuts for pragmas, the nimtut, nim by example, lib overview and the forum. Indispensable
21:58:57FromDiscord<enthus1ast> playing with genny the whole evening, i've build some (useless) tool that implements a webserver in nim, does stupid stuff, but drives the async loop from python and uses the computed stuff IN python
21:59:01FromDiscord<enthus1ast> kinda cool
21:59:11FromDiscord<enthus1ast> (not that i plan to use python)
22:00:37FromDiscord<Waldecir Santos> Are you planing to push to git and share ?
22:00:50FromDiscord<enthus1ast> nah
22:01:26FromDiscord<enthus1ast> just toying around with treeforms lib
22:01:52FromDiscord<Waldecir Santos> I've been playing with nim only, I'm trying to implement a full featured framework like Django in nim, It's been a ride lol
22:02:00FromDiscord<Waldecir Santos> But I'm learning a LOT about nim
22:02:10FromDiscord<enthus1ast> yeah
22:02:34FromDiscord<enthus1ast> also want to do this (or use it if one builds it )
22:02:43FromDiscord<Waldecir Santos> I love how Django does stuff, I hope I can get this sprit with nim in this attempt 😄
22:02:45FromDiscord<enthus1ast> just use it is prefered \:)
22:02:55FromDiscord<Waldecir Santos> Right ? 😄
22:03:12FromDiscord<enthus1ast> if you need a template engine have a look at my nimja template engine
22:03:27FromDiscord<enthus1ast> https://github.com/enthus1ast/nimja
22:04:41FromDiscord<Waldecir Santos> Yeah that is awesome, my first try is to do templates like django, but I want to leave the framework open so you can choose any framework including nimja, I love jinja
22:05:05FromDiscord<Waldecir Santos> I've a basic django template engine working, by basic I mean only string interpolation so far.
22:07:31FromDiscord<enthus1ast> i do not know the difference between django's and jinja2 templates, but if i just skim over django's templateing they quite look the same
22:08:46FromDiscord<Waldecir Santos> You cannot call function on django template, they are logic-less templates
22:08:59FromDiscord<Waldecir Santos> Kinda of "logic-less"
22:09:14FromDiscord<Waldecir Santos> You do have if and control flow, but you cannot do much there
22:12:25FromDiscord<Waldecir Santos> How do you guys normally handle logging ? Just add a lot of debug/info/warn and set the level or there is a macro to remove the debug logs when compiling the release version ?
22:12:40FromDiscord<xx_ns> Django templates are turing complete, so anything is possible 😉
22:13:01FromDiscord<Waldecir Santos> ahah
22:14:23FromDiscord<enthus1ast> either echo , treeform/print , enthus1ast/dbg or for real logging\: https://github.com/status-im/nim-chronicles
22:14:46FromDiscord<Phil> In reply to @Waldecir Santos "I love how Django": The only thing that's slightly wonky is the database interaction imo
22:18:03FromDiscord<Phil> So far I'm reasonably happy with it all. With nisane I got the interaction with views and fts5 tables, thanks to enthus1ast's code that he initially threw in for an event system I managed to replicate Django Signals (to some degree), tinypool gives me transactions and norm suffices for most of the basic bits of DB interaction
22:18:48FromDiscord<enthus1ast> is this a nimble pkg? Or tightly bound to storyfont?
22:19:32FromDiscord<Phil> Tightly bound to storyfont, Making a "django like" super package out of that is... possible I think, but I think it'd be hurt by the fact that you'd need to use 2 ORMs
22:21:01FromDiscord<enthus1ast> i mean, if the api is good, and hides the implementation well enough, it can later be changed
22:21:03FromDiscord<Phil> There's some bits and bobs that just don't mesh well enough to make a framework out of it. It's "good enough" to work with, but I wouldn't necessarily want to do more with it. Once norm or nisane are at a point where I'd say "use that for everything" I'd say make a framework
22:21:06FromDiscord<Waldecir Santos> In reply to @Isofruit "The only thing that's": Yeah but I've been doing for years now it seems "natural"
22:22:35FromDiscord<Phil> In reply to @Waldecir Santos "Yeah but I've been": What? Django's ORM?
22:23:05FromDiscord<Waldecir Santos> Yeah I've been using django for websites for years
22:23:06anddamI installed nimgl package and opengl from https://github.com/nimgl/opengl , then tried tests/test.nim from https://github.com/nimgl/imgui and got "/home/anddam/Development/GUI/nimgl-imgui-git/src/imgui/impl_opengl.nim(11, 23) Error: cannot open file: nimgl/opengl"
22:23:16anddamwhat am I doing wrong in the setup?
22:24:07FromDiscord<Phil> In reply to @Waldecir Santos "Yeah I've been using": Yeah that level of quality is pretty hard to achieve. We'd need some serious additional contributions to any of the currently existing ORMs to get them to that level
22:24:55FromDiscord<Waldecir Santos> Yeah totally agree
22:25:09FromDiscord<Waldecir Santos> Let's see how far I can go, lol
22:25:47FromDiscord<Phil> Basically if you want to see the heart of my applications database interaction: genericArticleRepository
22:25:50FromDiscord<Phil> (edit) "genericArticleRepository" => "genericArticleRepository.nim"
22:26:00FromDiscord<Waldecir Santos> In reply to @enthus1ast "either echo , treeform/print": You mean this one right https://github.com/enthus1ast/nimDbg ?
22:26:18FromDiscord<Waldecir Santos> In reply to @Isofruit "Basically if you want": I'm definitely going to check it, for sure.
22:28:27FromDiscord<Phil> In reply to @Waldecir Santos "I'm definitely going to": That's for the simple stuff (`src/applications/genericArticleRepository.nim`), for fts5 table interaction with nisane (`src/applications/search/searchRepository.nim`).↵View interaction I'll eventually implement under a not yet existant `src/applications/allArticles/allArticleRepository.nim`)
22:28:38FromDiscord<Phil> (edit) "In reply to @Waldecir Santos "I'm definitely going to": That's for the simple stuff (`src/applications/genericArticleRepository.nim`), for fts5 table interaction with nisane (`src/applications/search/searchRepository.nim`).↵View interaction ... I'll" added "through nisane"
22:29:13FromDiscord<ckennedy> Is there a way to provide a generic override of `=` for an object as is being done with the specifc `host=` attribute here: https://nim-lang.org/docs/tut2.html#object-oriented-programming-properties
22:29:18*vicfred quit (Quit: Leaving)
22:29:38FromDiscord<enthus1ast> @Waldecir Santos\: yes
22:29:54FromDiscord<enthus1ast> but dbg is dangerous, since it removes code
22:29:57FromDiscord<Waldecir Santos> In reply to @ckennedy "Is there a way": I don't see why not.
22:30:33FromDiscord<Elegantbeef> setters are just procedures
22:30:56FromDiscord<Waldecir Santos> In reply to @enthus1ast "but dbg is dangerous,": Why is it dangerous ?
22:31:22FromDiscord<enthus1ast> dbg aProcWithSideffects() ↵is removed on release
22:31:34FromDiscord<Waldecir Santos> OHHHH I see wow
22:31:47FromDiscord<enthus1ast> and if you rely on sideffects boom \:)
22:35:27FromDiscord<ckennedy> In reply to @Elegantbeef "setters are just procedures": But a proc needs to be provided for every setter, right? I can't generically say: proc `=`(s: var Socket, key: ??, value: ??) {.inline.} =
22:35:50FromDiscord<ckennedy> tried it as a macro but you get the `proc signature must be...` error message alluding to the property specific variation.
22:36:27FromDiscord<Elegantbeef> Oh you want dotoperators
22:36:37FromDiscord<Elegantbeef> https://nim-lang.org/docs/manual_experimental.html#special-operators-dot-operators
22:38:08FromDiscord<ynfle> In reply to @ckennedy "tried it as a": You can use a macro that iterates over every field of the type
22:38:09FromDiscord<Waldecir Santos> @ckennedy maybe this is what you mean https://play.nim-lang.org/#ix=3OLv ?
22:39:01*enyc quit (Ping timeout: 240 seconds)
22:39:42FromDiscord<Elegantbeef> you can define `.=` and `.` operators which allow you to do special things for fields
22:40:36FromDiscord<ckennedy> In reply to @Waldecir Santos "<@!296348328122384386> maybe this is": That's the attribute specific version. Was trying to figure out how to do that generically.
22:41:13*pro quit (Ping timeout: 256 seconds)
22:41:14FromDiscord<Waldecir Santos> so you what the property `host` to be dynamic ?
22:42:06FromDiscord<ckennedy> In reply to @Elegantbeef "you can define `.=`": Oh, I think `.=` may work.. I was hoping to do it with `=` though to avoid the "I have to remember to use this other form or it's broken problem"
22:42:45FromDiscord<Waldecir Santos> Can you give me one exemple of what you are trying to accomplish ?
22:44:14FromDiscord<chancy> In reply to @ynfle "You can use a": I think I found some documentation on this, thanks for the suggestion!
22:44:27FromDiscord<Elegantbeef> What do you mean generically?
22:46:22FromDiscord<Elegantbeef> I'm still a bit confused what you're after, would be interesting to understand
22:46:43FromDiscord<Waldecir Santos> Same
22:47:00FromDiscord<Elegantbeef> A code example of the behaviour speaks more than english
22:48:51FromDiscord<chancy> One moment. I'll write up a playground example.
22:51:28FromDiscord<chancy> https://play.nim-lang.org/#ix=3OLz
22:53:02FromDiscord<chancy> say something like that, where any assignment to an object field is replaced with a guard to track whether the object has actually changed from its previous values.
22:53:36FromDiscord<ynfle> In reply to @chancy "I think I found": Is changed a field of the object?
22:53:37FromDiscord<Waldecir Santos> I think @ElegantBeef was right, you need the dotnotation
22:53:59FromDiscord<Elegantbeef> Eh you can do it with a template
22:54:11FromDiscord<chancy> In reply to @ynfle "Is changed a field": `changed` is elsewhere, say just a global
22:54:54FromDiscord<Waldecir Santos> If `changed` is not part of the object, template is the way I agree with @ElegantBeef
22:56:02FromDiscord<Elegantbeef> https://play.nim-lang.org/#ix=3OLA
23:00:38FromDiscord<chancy> In reply to @Elegantbeef "https://play.nim-lang.org/#ix=3OLA": I think that's definitely more concise though it still suffers from the "remember to do it" problem. I could always do `m.color = "black"` if I forget to follow the convention.
23:04:53FromDiscord<enthus1ast> you could not export the members
23:08:14FromDiscord<ckennedy> In reply to @enthus1ast "you could not export": That might be the way to go. I'll experiment.
23:08:36FromDiscord<ckennedy> Thanks for help everyone!
23:08:39*jjido quit (Quit: My MacBook Air has gone to sleep. ZZZzzz…)
23:28:17FromDiscord<ckennedy> https://play.nim-lang.org/#ix=3OLH
23:28:56FromDiscord<Elegantbeef> This is to be expected
23:29:11FromDiscord<ckennedy> The `accessor` template doesn't work if the field isn't exported, but this seems to work. `template(t: Thing, key: untyped, val: typed)` instead