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