00:11:22 | FromDiscord | <evoalg> In reply to @tk "http://ix.io/3Fci - this kind": tk sorry I'm just wondering what output are you wanting from that instead? |
00:23:01 | tk | FromDiscord: I would like the behaviour of collect: for x in y: {x} except that instead of what looks like a single-element set of x I want an actual set there |
00:23:08 | tk | so the end result is a union of all sets collected |
00:23:15 | tk | er, evoalg: sorry, muscle memory |
00:28:14 | tk | http://ix.io/3FcO - as an unrelated note - AOC 2019 day 3 in nim. Comments (except for regarding the use of 3 space indent and snake case) welcome |
00:31:42 | * | xet7 quit (Remote host closed the connection) |
00:32:28 | * | xet7 joined #nim |
00:35:39 | FromDiscord | <Elegantbeef> Hmmm collect doesnt seem like the right thing here, you're iterating over a collection then wanting to return a single one? |
00:35:54 | tk | well that's kind of what it does in the {x} case |
00:36:09 | tk | it returns a single HashSet |
00:37:07 | FromDiscord | <Elegantbeef> What's the expected output from the collect i guess is what i need to ask |
00:37:16 | FromDiscord | <Elegantbeef> is it `{1, 2, 3}`? |
00:38:13 | tk | so I would like collect: for i in 1..3: {i} and collect: for i in 1..3: let s = {i}; s to behave the same |
00:38:40 | tk | or some way of doing what the former does with the latter |
00:39:00 | * | Colt joined #nim |
00:40:25 | tk | http://ix.io/3FcN - a slightly improved version of the code before |
00:41:31 | FromDiscord | <Elegantbeef> Hmm i wonder if a new `collect` variant needs to exist so you can do `collectWith(call):` |
00:42:16 | FromDiscord | <Elegantbeef> though i guess that'd result to be the same as `collect(initHashSet, incl): for x in 1..3: let s = {i}; s` |
00:42:33 | * | krux02_ quit (Quit: Leaving) |
00:42:43 | FromDiscord | <Elegantbeef> Oddly the collect macro reasons the proc to call by expression's value |
00:43:44 | FromDiscord | <Elegantbeef> I know that really makes collect manually done, but presently i cannot reason anything that makes any sense here |
00:44:31 | FromDiscord | <Elegantbeef> alternatively instead of adding the call to `incl` you just make the expression value be `incl(s)` or `add(s)` |
00:45:54 | FromDiscord | <Elegantbeef> Ah fuck yea i like this idea more take a type as the first parameter and make it have to have a `init(_: typedesc[T]): T`, then you can just do `collect(HashSet[int]): for i in 1..3: let s = {i} incl(s)` |
00:46:17 | FromDiscord | <Elegantbeef> I'm sure someone will say "that's fucking dumb" |
00:47:43 | FromDiscord | <impbox [ftsf]> that'd be rude and dismissive and not a nice thing to say |
00:48:04 | FromDiscord | <impbox [ftsf]> Instead I'll say, what is `collect` anyway? |
00:48:32 | FromDiscord | <Elegantbeef> It's a macro to short form block statements |
00:49:17 | FromDiscord | <Elegantbeef> Both are the same |
00:49:18 | FromDiscord | <impbox [ftsf]> I'm looking at the examples and I don't get what they're trying to do |
00:49:21 | FromDiscord | <Elegantbeef> sent a code paste, see https://play.nim-lang.org/#ix=3FcS |
00:50:00 | FromDiscord | <impbox [ftsf]> hmm, so useful when you want to initialise a variable with a complex thingy? |
00:50:10 | FromDiscord | <Elegantbeef> It's like list comprehension in python |
01:37:13 | FromDiscord | <evoalg> sent a code paste, see https://play.nim-lang.org/#ix=3Fd0 |
01:37:48 | FromDiscord | <sharpcdf> I'm reading through the documentation on the `importJs` pragma(`importCpp`), but it isnt really specific, can anyone give an example of the pragma in action? |
01:44:25 | FromDiscord | <Elegantbeef> Here's a shitty binding ontop of some of the MRAPI https://github.com/beef331/mrapi/blob/master/src/mrapi.nim |
01:44:36 | FromDiscord | <Elegantbeef> This shows the JS and the Nim wrapping it all in one file so it's "nice" |
01:52:41 | FromDiscord | <sharpcdf> In reply to @Elegantbeef "Here's a shitty binding": if I may ask, why does it use `{.importC.}` instead of `{.importJs.}`? |
01:52:42 | FromDiscord | <Elegantbeef> sent a code paste, see https://play.nim-lang.org/#ix=3Fd3 |
01:52:59 | FromDiscord | <Elegantbeef> They do the same thing so only reason is i was using importc |
01:53:07 | FromDiscord | <sharpcdf> oh alright |
01:53:18 | FromDiscord | <sharpcdf> thanks |
01:55:30 | FromDiscord | <sharpcdf> In reply to @Elegantbeef "They do the same": how does the nim compiler find what file contains the given functions? does it just go through all `.js` files in the same directory? |
01:56:06 | FromDiscord | <Elegantbeef> Nope it doesnt know anything about the js files |
01:56:21 | FromDiscord | <Elegantbeef> It just says "yep this is a proc", it's a runtime error |
01:56:40 | FromDiscord | <sharpcdf> then how do you give the js files to it? |
01:56:57 | FromDiscord | <Elegantbeef> You dont need to |
01:57:05 | FromDiscord | <Elegantbeef> As long as you point it to the right name it doesnt matter |
01:57:15 | FromDiscord | <sharpcdf> oh ok |
01:57:20 | FromDiscord | <sharpcdf> nice |
01:57:34 | FromDiscord | <Elegantbeef> It's the same thing with C, the error doesnt happen in Nim's compilation it's in C's compilation |
01:57:47 | FromDiscord | <Elegantbeef> Cause Nim just says "Hey i'm calling X here which resides in C" |
01:57:52 | FromDiscord | <Elegantbeef> Or Js in this case |
01:58:20 | FromDiscord | <sharpcdf> In reply to @Elegantbeef "Cause Nim just says": i think i know what you're saying, but what if I want to import an external javascript/c library, like raylib or react native? |
01:58:39 | FromDiscord | <Elegantbeef> You import it? |
01:59:20 | FromDiscord | <sharpcdf> do you just do `{.importJs: "someFile.js".}`? |
01:59:25 | FromDiscord | <Elegantbeef> When you do `importC`/`importJs` what nim does in the generated code is write what you told it, so if you do `proc doThing{.importJs: "heh".}` when you do `doThing()` it'll write `heh` |
02:00:01 | FromDiscord | <Elegantbeef> You might be thinking of https://nim-lang.org/docs/jsffi.html#require%2Ccstring ? |
02:00:22 | FromDiscord | <Elegantbeef> But you do not import js files into Nim, you import js function/type names and then nim just emits what it should |
02:00:38 | FromDiscord | <Elegantbeef> So that mrapi example is the same regardless if that js is in the nim file or in another file |
02:00:48 | FromDiscord | <Elegantbeef> All you have to do if it's in another file is ensure it loads before the nim file does |
02:11:31 | FromDiscord | <evoalg> sent a code paste, see https://play.nim-lang.org/#ix=3Fd6 |
02:15:15 | FromDiscord | <ajusa> Anyone know which version of tcc Nim is compatible with? I get segfaults with the version that I seem to have |
02:15:54 | FromDiscord | <Elegantbeef> I've used tcc with devel/1.60 no problem |
02:16:05 | FromDiscord | <sharpcdf> In reply to @Elegantbeef "All you have to": not sure i understand, if you have a function that is defined in javascript(in either a local file or something like react), would you still just copy the function like normal with `{.importJs.}`? |
02:16:13 | FromDiscord | <Elegantbeef> Possibly the `asClosure` does some magic so there might be a chance they're missmatches↵(@evoalg) |
02:16:41 | FromDiscord | <Elegantbeef> You just need to annotate the procedure in nim |
02:17:26 | FromDiscord | <Elegantbeef> Actually yea seems fine evoalg, i actually tested that |
02:17:46 | FromDiscord | <Elegantbeef> The `resetableClosure` cannot be reassigned presently |
02:17:54 | FromDiscord | <Elegantbeef> It creates a anonymous object and uses it |
02:18:25 | FromDiscord | <Elegantbeef> Like for the example i gave previously `a` is a `AnonResetClos`gensym150\` |
02:18:51 | FromDiscord | <Elegantbeef> And no that doesnt mean "i cant write procs that use it", since i have a concept that matches with it |
02:19:28 | FromDiscord | <Elegantbeef> sent a code paste, see https://play.nim-lang.org/#ix=3Fd9 |
02:19:48 | FromDiscord | <Elegantbeef> But that's mostly an implementation detail no one needs to see |
02:25:44 | FromDiscord | <Elegantbeef> evoalg is presently going "Why did i ask anything" |
02:27:04 | FromDiscord | <ajusa> In reply to @Elegantbeef "I've used tcc with": I needed some additional tcc flags for math looks like (there's a github issue in the nim repository about it opened in the last month) |
02:27:19 | FromDiscord | <Elegantbeef> Ah |
02:27:28 | FromDiscord | <Elegantbeef> I know i had to disable simd for pixie with TCC |
02:29:06 | * | arkurious quit (Quit: Leaving) |
02:46:04 | FromDiscord | <evoalg> In reply to @Elegantbeef "Actually yea seems fine": Thank you Elegantbeef - I'm still trying to wrap my head around closures, and when I've studied them a lot more I'll be able to as some sensible questions |
02:49:59 | FromDiscord | <deech> How do I re-export a module I imported? |
02:50:09 | FromDiscord | <Elegantbeef> `export moduleName` |
02:53:10 | FromDiscord | <deech> thanks! Just looked that up in the manual. Can you specify the symbols to re-export? eg. `from A export a,b,c`? |
02:54:00 | FromDiscord | <Elegantbeef> no you just `export a, b, c` |
02:54:52 | FromDiscord | <deech> Ah nice, and I guess if I import the module qualified I can do `export module.a, module.b, module.c`? |
02:55:01 | FromDiscord | <Elegantbeef> Possibly |
02:55:03 | FromDiscord | <Elegantbeef> i do not know |
02:55:04 | FromDiscord | <impbox [ftsf]> or just export a |
02:55:21 | FromDiscord | <impbox [ftsf]> since you imported it it's not in your current module |
03:27:41 | * | rockcavera quit (Remote host closed the connection) |
03:52:54 | * | Colt quit (Quit: Leaving) |
03:53:20 | * | Colt joined #nim |
04:06:01 | * | supakeen quit (Quit: WeeChat 3.3) |
04:06:32 | * | supakeen joined #nim |
06:02:36 | * | sagax quit (Read error: Connection reset by peer) |
06:37:24 | * | sagax joined #nim |
06:49:27 | * | robertmeta quit (Ping timeout: 268 seconds) |
06:52:40 | * | robertmeta joined #nim |
07:39:39 | * | neurocyte0132889 joined #nim |
07:39:39 | * | neurocyte0132889 quit (Changing host) |
07:39:39 | * | neurocyte0132889 joined #nim |
07:43:03 | * | PMunch joined #nim |
08:13:49 | * | audiophile quit (Quit: Default Quit Message) |
08:13:50 | * | audiophile_ quit (Quit: Default Quit Message) |
08:32:20 | * | advesperacit joined #nim |
08:45:39 | * | advesperacit quit (Ping timeout: 265 seconds) |
08:48:03 | * | advesperacit joined #nim |
08:59:40 | NimEventer | New post on r/nim by SamLovesNotion: How to embed Nim expression inside a string? Like template strings in JS., see https://reddit.com/r/nim/comments/qvv4cs/how_to_embed_nim_expression_inside_a_string_like/ |
09:15:10 | * | Colt quit (Quit: Leaving) |
09:15:28 | * | Colt joined #nim |
09:41:11 | * | robertmeta quit (Ping timeout: 264 seconds) |
09:44:23 | * | robertmeta joined #nim |
11:25:34 | * | notchris quit (Ping timeout: 256 seconds) |
11:28:42 | * | notchris joined #nim |
12:06:02 | * | supakeen quit (Quit: WeeChat 3.3) |
12:06:32 | * | supakeen joined #nim |
12:54:21 | * | rockcavera joined #nim |
12:54:22 | * | rockcavera quit (Changing host) |
12:54:22 | * | rockcavera joined #nim |
13:12:41 | FromDiscord | <ynfle (ynfle)> How can I use `HashSet` for NimNodes |
13:14:10 | FromDiscord | <licenziato> hi |
13:29:51 | FromDiscord | <hmmm> yea boi I just became a grown up nimmer, I just defined a proc that doesn't end with return but has a big grownup result stuffed in there somewhere |
13:30:10 | FromDiscord | <hmmm> I think disruptek would be proud |
13:30:18 | FromDiscord | <hmmm> where is disruptek btw |
13:30:38 | FromDiscord | <Marisol> Hey everyone, I'm just starting to learn nim, looking for tips/directions to get started... I've read and tried some of the examples in docs, but other than that it's very hard to find tutorials. I'm thinking to make a simple REST JSON API (with CRUD ops) with sqlite database... Is there maybe a repo or example or something that I can study and tinker? |
13:35:08 | PMunch | ynfle_(ynfle), by implementing a `hash` proc for them I believe |
13:35:23 | PMunch | @hmmm, haha nice :P |
13:35:36 | PMunch | And I think disruptek is off in some other channel |
13:37:39 | PMunch | @Marisol, don't know of anything specific for that. You can use https://github.com/dom96/jester for the REST part, the built in `json` module for the JSON part, and the built in `db_sqlite` module for the database. |
13:42:17 | FromDiscord | <Marisol> In reply to @PMunch "<@800992449316126741>, don't know of": Thanks! I'll try it |
14:02:54 | FromDiscord | <enthus1ast> sent a code paste, see https://paste.rs/6A0 |
14:19:02 | FromDiscord | <dom96> In reply to @Marisol "Hey everyone, I'm just": Thanks PMunch for suggesting my library 🙂↵In addition I would also suggest using the `norm` package instead of db_sqlite (unless you're comfortable writing all your SQL from scratch), norm will take care of a lot of boilerplate |
14:19:26 | PMunch | Ooh, that's a good suggestion |
14:19:38 | FromDiscord | <dom96> Please feel free to ask if you run into any issues. For what we lack in tutorials we can hopefully make up in real-time help 🙂 |
14:19:43 | PMunch | And of course, Jester is still my go to choice when I just need a quick and dirty REST API |
14:22:48 | FromDiscord | <dom96> ❤️ |
14:33:43 | * | arkurious joined #nim |
14:33:46 | FromDiscord | <hmmm> In reply to @PMunch "<@800992449316126741>, don't know of": I'm a big fan of jsony library, I think any library that ends in y is bound to be superior to any competition 🧐 |
14:41:25 | FromDiscord | <dom96> brb, forking Nim to Nimmy |
14:43:21 | FromDiscord | <hmmm> I wouldnt overstep my buounds like that, araqy should be in charge of the fork |
14:57:18 | FromDiscord | <Mr Axilus> On the topic of Nim favouring structured programming (result over return), it's common to verify arguments with something like `if arg == nil: return nil`, or a more complicated check. Is that stylictically to be avoided? If so, what's the recommended alternative? |
14:57:45 | FromDiscord | <Zoom> sent a code paste, see https://play.nim-lang.org/#ix=3FfT |
14:58:21 | FromDiscord | <Zoom> In my book, expressions \> statements |
14:58:22 | FromDiscord | <Mr Axilus> Lol, it did its best |
14:59:14 | FromDiscord | <GalacticColourisation> hey, does nim by default compile down to C and then use a C compiler to compile to machine code? |
14:59:26 | FromDiscord | <dom96> yep |
15:00:00 | FromDiscord | <dom96> In reply to @mraxilus "On the topic of": that's fine, usually `result` is handy when you're building up a result, for example you're returning a string or seq and you want to add items to it |
15:01:18 | FromDiscord | <enthus1ast> [Zoom](https://matrix.to/#/@Zoom:matrix.org)\: yeah, i also avoid auto, but for returning procs and longer stuff i occasionally use it. |
15:02:01 | FromDiscord | <Zoom> Overloading `default` when? \:P Without it `results` aren't as attractive.↵(@dom96) |
15:02:58 | FromDiscord | <Mr Axilus> In reply to @dom96 "that's fine, usually `result`": I thought so, but it doesn't follow the "rule" of one entry and exit point; hence why I asked. |
15:03:42 | FromDiscord | <dom96> In reply to @Zoom "Overloading `default` when? \:P": Sounds to me like a fairly nicely scoped feature, could be fun way to get into compiler coding for someone... although then again I know there are those who are very against any new features being added to Nim 🙂 |
15:07:48 | FromDiscord | <Zoom> If I recall correctly, you can define default for a type, but it doesn't get invoked by default or something silly like that. Need to check.↵(@dom96) |
15:12:34 | FromDiscord | <Zoom> https://github.com/nim-lang/RFCs/issues/290↵(@dom96) |
15:12:43 | FromDiscord | <Marisol> In reply to @dom96 "Thanks PMunch for suggesting": Cool, and surprisingly it looks stable, thanks! |
15:13:18 | FromDiscord | <Rika> In reply to @dom96 "Sounds to me like": It’s an RFC right now |
15:13:34 | FromDiscord | <Zoom> And https://github.com/nim-lang/RFCs/issues/252 |
15:14:31 | PMunch | @GalacticColourisation, yup |
15:14:36 | FromDiscord | <dom96> A little off-topic but I have some possibly controversial opinions about the RFC repo. It makes writing proposals far too easy and brings no expectation for implementation. IMO we should get rid of all the issues and set up a formal RFC process. |
15:14:45 | FromDiscord | <GalacticColourisation> thank you! |
15:15:13 | PMunch | Well, by default is maybe a stretch |
15:15:16 | FromDiscord | <dom96> So we've got a couple RFCs about the same thing, where are the implementations? are they all waiting on their RFCs to be accepted? |
15:15:25 | PMunch | When you do `nim c <file>` that's what it does |
15:15:35 | FromDiscord | <haxscramper> well, maybe we first need to get a roadmap for the language |
15:16:01 | FromDiscord | <haxscramper> Without that any sort of RFC process is largely meaningless |
15:16:06 | PMunch | If you do `nim cpp <file>` it does the same thing, but with C++ compiler, and `nim js <file>` converts your file to JavaScript to embed on a website (or, with an extra flag, run in Node) |
15:16:11 | FromDiscord | <haxscramper> Ok, I wrote 252 more than a year ago, so what? |
15:16:27 | FromDiscord | <haxscramper> it got accepted, what now? |
15:16:29 | FromDiscord | <dom96> implement it |
15:16:32 | FromDiscord | <GalacticColourisation> ah, i see, is there not an option for direct compilation to machine code? |
15:16:51 | FromDiscord | <haxscramper> when I did 245 I put multiple spec revisions and tried to somehow coordinate my efforts everyone interested, haven't seen it anywhere |
15:17:03 | FromDiscord | <dom96> implementation is far more important than RFCs anyway |
15:17:04 | PMunch | @GalacticColourisation, nope, why would we do something that your C compiler is already great at? |
15:17:14 | FromDiscord | <GalacticColourisation> true |
15:17:39 | FromDiscord | <haxscramper> this does not work in general case, being able to write good RFC does not equate to being a compiler developer↵(@dom96) |
15:17:46 | FromDiscord | <dom96> @GalacticColourisation if you'd like to reimplement years of GCC/clang lessons then go right ahead 🙂 |
15:18:12 | FromDiscord | <dom96> In reply to @haxscramper "this does not work": so what? You expect Araq to implement all the RFCs? |
15:18:19 | FromDiscord | <dom96> That obviously cannot work |
15:18:22 | FromDiscord | <GalacticColourisation> oh, the PR will be accepted? i wrote something similar for my own language a while ago |
15:18:28 | FromDiscord | <dom96> You can learn to be a compiler developer |
15:18:46 | FromDiscord | <haxscramper> And just to remind you, 252 was accepted in form of `field: type = defaultValue`, not for `default()` hook |
15:18:51 | FromDiscord | <haxscramper> `default()/=init` |
15:18:55 | FromDiscord | <haxscramper> so those RFCs are different |
15:19:20 | FromDiscord | <haxscramper> [Edit](https://discord.com/channels/371759389889003530/371759389889003532/910549047683719238): when I did 245 I put multiple spec revisions and tried to somehow coordinate my efforts everyone interested, haven't seen it done anywhere else for any RFC |
15:19:24 | FromDiscord | <dom96> In reply to @GalacticColourisation "oh, the PR will": Doesn't need to be mainlined into Nim, you can easily build a compiler outside the main repo and move faster |
15:19:26 | PMunch | @GalacticColourisation, I'd be impressed if you managed to do it. But it probably wouldn't be merged as that would mean the core devs would have to maintain it |
15:19:38 | FromDiscord | <GalacticColourisation> ah, okay |
15:19:38 | PMunch | And there isn't really much point to having the feature |
15:19:46 | FromDiscord | <GalacticColourisation> yeah i see |
15:19:56 | FromDiscord | <haxscramper> https://github.com/arnetheduck/nlvm↵(@GalacticColourisation) |
15:20:12 | FromDiscord | <GalacticColourisation> oh, nevermind, someone did it already |
15:20:22 | FromDiscord | <Zoom> Not many like to do hard work if the chance of it being accepted is very low. Prior discussion should lead to correct implementations.↵(@dom96) |
15:20:43 | FromDiscord | <dom96> of course, but even accepted RFCs apparently don't get implementations |
15:21:04 | FromDiscord | <haxscramper> I expect core devs to at least have a roadmap where those efforts are coordinated |
15:21:14 | FromDiscord | <dom96> also rejecting an implementation is much harder than an RFC 😉 |
15:21:45 | FromDiscord | <haxscramper> And right now barrier to entry to the compiler development is pretty high |
15:21:56 | FromDiscord | <haxscramper> Yeah, |
15:22:00 | FromDiscord | <haxscramper> nimble PTSD |
15:22:08 | * | arkanoid joined #nim |
15:22:35 | arkanoid | hello! Which nim gui library/binding would you consider production ready for a windows desktop app? |
15:22:50 | FromDiscord | <haxscramper> I mean people can work on something provided there is at least an explanation on how to implement things, and you don't feel like you just have to pick a task at random |
15:22:59 | FromDiscord | <dom96> All we can do is push Araq to publish a roadmap more regularly |
15:23:09 | FromDiscord | <dom96> complaining here is preaching to the choir 🙂 |
15:23:25 | FromDiscord | <haxscramper> well, complaining to araq is basically meaningless as well |
15:23:40 | FromDiscord | <haxscramper> like, if we need to push community leader to just do something wrt. to managing community |
15:23:54 | FromDiscord | <haxscramper> what is the point if he does not want to do this? |
15:24:02 | FromDiscord | <Zoom> That's kinda bad.↵(@dom96) |
15:24:12 | FromDiscord | <haxscramper> does not understand utility of doing so\ |
15:24:24 | FromDiscord | <dom96> In reply to @haxscramper "like, if we need": huh, what do you mean? |
15:24:49 | FromDiscord | <dom96> In reply to @Zoom "That's kinda bad. (<@132595483838251008>)": yeah, but it's a fact of life and pretty universal everywhere |
15:25:05 | FromDiscord | <dom96> but especially in open source |
15:25:21 | FromDiscord | <dom96> we should definitely do more to avoid it though |
15:25:26 | FromDiscord | <haxscramper> In reply to @dom96 "huh, what do you": I mean if we have to constantly remind core development team to talk about their plans, goals, in a way that community can rely on for their expectations, |
15:25:35 | FromDiscord | <haxscramper> remind again and again |
15:25:56 | FromDiscord | <haxscramper> why bother even, not like we can push them to a state when they would be doing so willingly |
15:26:27 | FromDiscord | <dom96> I mean. You sound like you've given up already, so I feel like there isn't much I can say to convince you that reminding it is worth it |
15:26:45 | FromDiscord | <haxscramper> each time someone in chat asks for the roadmap, and all I can do is just say "well, there is no such thing, but last time I've heard we've been working on the XXX and YYY" |
15:27:16 | FromDiscord | <haxscramper> In reply to @dom96 "I mean. You sound": well, it moves us a little closer to having a real roadmap, yes |
15:27:24 | FromDiscord | <haxscramper> maybe it will be written at some point |
15:27:27 | FromDiscord | <haxscramper> then never updated |
15:27:37 | FromDiscord | <haxscramper> or completely forgotted like these "community meetings" |
15:28:00 | FromDiscord | <haxscramper> (edit) "forgotted" => "forgotten" |
15:28:26 | nrds | <Prestige99> What about something living (like I think godot uses github milestones, a kanban board, or whatever) that people can check out, at will |
15:28:44 | FromDiscord | <treeform> Can orc be used with async code yet? |
15:29:15 | FromDiscord | <dom96> yep, it can be and has been that way for a while afaik |
15:29:26 | FromDiscord | <treeform> oh cool |
15:29:47 | FromDiscord | <haxscramper> In reply to @nrds "<Prestige> What about something": it is not a question of tooling, it is a question of someone willing to maintain this |
15:29:57 | FromDiscord | <Zoom> Just an .md doc with points and links to RFCs/issues in the order of their priority/desirability which Araq could shuffle and tick would be nice. |
15:29:59 | FromDiscord | <dom96> In reply to @haxscramper "it is not a": idneed |
15:30:01 | FromDiscord | <dom96> (edit) "idneed" => "indeed" |
15:30:05 | FromDiscord | <haxscramper> and this can't be done by some random contributors |
15:30:11 | nrds | <Prestige99> I mean it'd be integrated into the workflow of the maintainers |
15:30:15 | FromDiscord | <dom96> It could be 🙂 |
15:30:17 | FromDiscord | <haxscramper> because random contributors can't define a central roadmap |
15:30:41 | FromDiscord | <haxscramper> In reply to @dom96 "It could be 🙂": well, let me throw together a project real quick, and see what araq thinks of my priorities |
15:30:55 | FromDiscord | <dom96> No, you ask Araq what his priorities are and then you put them in a doc |
15:31:00 | FromDiscord | <dom96> Ask him to verify and you're done |
15:31:40 | FromDiscord | <haxscramper> are you serious? we need to attach some special person to ask questions and the copy-paste responses |
15:32:28 | FromDiscord | <haxscramper> (edit) "the" => "then" |
15:32:57 | FromDiscord | <haxscramper> and then as the person who answered the question to verify if their response was understtood/copied correctly? |
15:35:24 | FromDiscord | <Zoom> 🤷 My boss phones me and drops a bunch of stuff to work on me verbally, even though all following communication goes through e-mail. I know he reads from his own damn paper notes, and we're playing in a remote typist... 🤦♂️↵(@haxscramper) |
15:35:38 | * | audiophile joined #nim |
15:35:39 | * | audiophile_ joined #nim |
15:37:16 | FromDiscord | <haxscramper> Yeah, except in this case I would need to call the boss, say something like "well, what are our plans", write down the explanation and then everyone else should use it as a reference roadmap |
15:38:09 | arkanoid | I guess it's "no one" then |
15:42:26 | FromDiscord | <Zoom> My post on the forums on the plans for work on documentation attracted so many comments speaking how the docs are fine, even though my point wasn't to criticize per se. In any state of the docs, the work is never done and there's no visible roadmap for it. Instead i got "keep your cs101 out of my docs". |
15:44:15 | FromDiscord | <haxscramper> haven't seen this one - which forum post was it exactly? |
15:45:13 | FromDiscord | <haxscramper> alright, found it - https://forum.nim-lang.org/t/8091 |
15:46:38 | * | PMunch quit (Quit: leaving) |
15:53:06 | * | Vladar joined #nim |
15:59:55 | * | audiophile__ joined #nim |
15:59:56 | * | audiophile___ joined #nim |
16:00:27 | FromDiscord | <Zoom> sent a long message, see https://paste.rs/Fsv |
16:02:19 | * | audiophile_ quit (Ping timeout: 250 seconds) |
16:02:21 | * | audiophile__ is now known as audiophile_ |
16:03:11 | * | audiophile quit (Ping timeout: 250 seconds) |
16:04:29 | FromDiscord | <haxscramper> Documentation improvement is an iterative process, and the only thing we can do is to streamline the process of detecting and addressing documentation issues. At this point I already remember most of the stuff I use, and so most of the people participated in the discussion on the forum (like araq/vindaar/stefan etc.) |
16:05:14 | FromDiscord | <haxscramper> So we can fix the docs but can't really see what is wrong, and new people can't fix but at least can see |
16:05:48 | FromDiscord | <haxscramper> `nim doc` result arrangement is not ideal as well, but that is a technical issue mostly |
16:07:47 | FromDiscord | <haxscramper> and in general, all talks I've seen about the documentation missed a very important part - attempt to formulate the definition of the problem, and instead devolved into "I like this, I like this, don't bring your CS here, no I find python docs unreadable, yes, rust docs are good etc. etc." |
16:11:09 | FromDiscord | <dom96> In reply to @haxscramper "are you serious? we": It's just an example of how some "random contributor" could make this happen |
16:12:26 | FromDiscord | <dom96> I don't think it should be expected, but I think in general there isn't anything that a "random contributor" can't do. |
16:13:27 | FromDiscord | <haxscramper> well, actually I think we have an example of sorts |
16:13:40 | FromDiscord | <haxscramper> https://forum.nim-lang.org/t/8627 |
16:14:24 | FromDiscord | <haxscramper> From what I've seen, the current roadmap can be aptly summarized as "IC" |
16:14:38 | * | audiophile___ quit (Quit: Default Quit Message) |
16:15:31 | FromDiscord | <haxscramper> so, we have a "random contributor" who also wants to know about nimble, and they get a reply "about Nimble, development has been outsourced, wasn't ready for 1.6.0 and I don't know the plan either" |
16:16:16 | FromDiscord | <dom96> is that a quote? I can't find it |
16:16:42 | FromDiscord | <haxscramper> ctrlf "about Nimble, development has been outsourced, wasn't ready for 1.6.0 and I don't know the plan either" in this chat |
16:16:53 | FromDiscord | <haxscramper> https://discord.com/channels/371759389889003530/371759389889003532/905422111747743805 |
16:17:13 | FromDiscord | <haxscramper> after that I closed my RFC btw |
16:17:40 | FromDiscord | <haxscramper> because I didn't want to deal with this |
16:17:51 | FromDiscord | <dom96> oh, in this chat |
16:18:37 | FromDiscord | <haxscramper> you would be really hard pressed to find "random contributor" who had at least the same level of meticulousness when digging up the responses, composing the RFC |
16:19:07 | FromDiscord | <haxscramper> so we had a "random contributor" try this game, it was fun while it lasted, in the end it resulted in "I don't care" |
16:21:33 | FromDiscord | <haxscramper> And just to remind you, araq is not exactly willing to go into great lengths talking about plans and subtasks, especially when it comes to random bystanders, so someone would have to sit through this, ask all the questions understand the responses, compose them into something that regular people can rely on. We're already looking at insanely high prerequisites that could be met by just a handful of people here |
16:22:23 | FromDiscord | <dom96> _sighs_ |
16:23:07 | FromDiscord | <haxscramper> I understand that everyone is sick of this circular discussion |
16:23:12 | * | src joined #nim |
16:23:28 | FromDiscord | <haxscramper> well, I probably need to just stop doing this, I'm certainly not making things better |
16:24:12 | FromDiscord | <haxscramper> (edit) "well, I probably" => "Probably " |
16:25:00 | FromDiscord | <dom96> Ugh, I'm not even sure it's worth discussing this further. But: asking Araq in chat or on the forum randomly about his plans is different to literally pinging him and saying "Let's sit down and come up with a roadmap that we can publish" |
16:25:04 | FromDiscord | <dom96> This stuff seriously isn't hard |
16:25:13 | FromDiscord | <dom96> Yes, it can be annoying |
16:25:19 | FromDiscord | <dom96> and yes it would be great if we didn't have to do it |
16:25:34 | FromDiscord | <dom96> but that's what we've got to work with, so let's make the best of it |
16:29:49 | * | weirdweirdhuh joined #nim |
16:29:53 | weirdweirdhuh | why is overloadableEnums experimental? |
16:31:35 | nrds | <Prestige99> Is anyone doing that yet @dom96? Would be great to see a roadmap |
16:32:18 | FromDiscord | <dom96> not as far as I'm aware |
16:32:35 | FromDiscord | <dom96> I'm certainly not, I've got more important things to bug Araq about 😛 |
16:32:36 | nrds | <Prestige99> just not a priority for the nim team I guess? |
16:33:41 | weirdweirdhuh | i guess it should be experimental since it's new, but no bugs will be found because no one will turn it on |
16:33:49 | nrds | <Prestige99> Without a roadmap, how are the devs deciding what to work on, just anything they feel like? Lol |
16:34:14 | weirdweirdhuh | does it make sense for some {.experimental.} features to be enabled by default |
16:34:48 | FromDiscord | <dom96> weirdweirdhuh: good point, indeed this is a trade off: we can kill it but we have less people actually finding problems with it |
16:35:08 | FromDiscord | <dom96> on the other hand, is it really that difficult to enable it? |
16:35:22 | FromDiscord | <dom96> it's not significantly more difficult after you find out about it and realise you need it 🙂 |
16:37:32 | nrds | <Prestige99> or @dom96 if you're not so much involved in the process anymore, who could we ask about it? I think it would be beneficial to nim's community to see this happening by leadership |
16:37:38 | weirdweirdhuh | it looks like a convenience feature so i don't know if anyone will think they need it |
16:37:55 | FromDiscord | <dom96> Prestige: did you miss what I wrote above? Get in touch with Araq |
16:38:13 | FromDiscord | <haxscramper> no, I mean we paid community manager for example |
16:38:17 | FromDiscord | <haxscramper> or some other core develoeprs |
16:38:23 | nrds | <Prestige99> To be his notary? |
16:38:32 | weirdweirdhuh | it's not even in the blog post for 1.6 |
16:38:42 | arkanoid | where can I read about "orc vs rust borrow checker"? |
16:38:44 | nrds | <Prestige99> I just want to see a roadmap, I don't want to be involved in the development of the language itself |
16:39:09 | FromDiscord | <dom96> weirdweirdhuh: feel free to make a PR to add it to the 1.6 release notes, or better yet: make a forum thread to raise awareness 🙂 |
16:40:56 | FromDiscord | <dom96> @haxscramper fwiw I am not sure that we have a community manager per say anymore, they are working on different things |
16:41:39 | FromDiscord | <dom96> but you know what might be an idea? Maybe ping them too? 😛 |
16:41:44 | FromDiscord | <haxscramper> well, I mean if we don't even know what each team member is doing, that is certainly not going anywhere |
16:42:45 | FromDiscord | <haxscramper> In reply to @dom96 "but you know what": yes dom, I know I can ping people, but what I also know is that we won't get anywhere if basic requests like having a concrete set of goals, requires pinging every single person involved |
16:43:11 | FromDiscord | <dom96> we got to 1.0 just fine |
16:43:11 | weirdweirdhuh | what would be a roadmap? a feature list for each version? |
16:43:13 | FromDiscord | <haxscramper> so I need to ping miran to ask them if they are willing to be a araq's notary? |
16:43:58 | FromDiscord | <haxscramper> In reply to @dom96 "we got to 1.0": yes, we also got to the 0.20 "just fine" and to 1.2.0 "just fine' and to 1.4.0 "just fine" and to 1.6.0 "just fine" |
16:44:14 | FromDiscord | <haxscramper> except not a single person understands what "just fine" really means |
16:44:25 | FromDiscord | <haxscramper> so yes, features were added and they work |
16:44:39 | weirdweirdhuh | i thought there were labels like 1.6, 2.0 etc for issues on github |
16:44:48 | FromDiscord | <haxscramper> this is the definition of "just fine"? Well, not a bad one, but it is hard to manage expectations with something like these |
16:45:11 | FromDiscord | <dom96> it's certainly not "we didn't get anywhere" |
16:45:25 | FromDiscord | <haxscramper> I never said that |
16:45:31 | FromDiscord | <dom96> ugh |
16:45:36 | FromDiscord | <dom96> you said we won't get anywhere |
16:45:57 | FromDiscord | <dom96> I meant "well, we got to where we are just fine" |
16:46:01 | FromDiscord | <haxscramper> we were talking about roadmap specifically |
16:46:14 | FromDiscord | <dom96> no, you were talking about pinging people |
16:46:34 | FromDiscord | <haxscramper> if we need to have a person tasked with pinging everyone in order to compose the understanding of where the project is heading |
16:47:45 | FromDiscord | <dom96> there really is no point in discussing the pedantic details of the merits of pinging people or not |
16:48:03 | FromDiscord | <haxscramper> no, it is a fundamental issue in this discussion |
16:48:14 | FromDiscord | <haxscramper> people doing things because they understand this is important |
16:48:15 | FromDiscord | <dom96> Fine. So I have no solution for you |
16:48:17 | FromDiscord | <haxscramper> vs someome forcing them to |
17:03:45 | FromDiscord | <hmmm> we need a roadmap for tutorials too 🧐 |
17:04:19 | FromDiscord | <hmmm> 1) Programming 101 2) GUI in nim 3) Godot with nim 4) Webstuff with nim |
17:04:32 | FromDiscord | <hmmm> people will flock to the cause and we will be rich 🧐 |
17:05:54 | FromDiscord | <haxscramper> we have a gui in nim at least https://github.com/StefanSalewski/GtkProgrammingBook/blob/master/gtkprogramming.adoc |
17:06:25 | FromDiscord | <haxscramper> and programming 101 http://ssalewski.de/nimprogramming.html |
17:07:22 | FromDiscord | <arnetheduck> In reply to @Marisol "Hey everyone, I'm just": A slightly more advanced example would be the server we're using: https://github.com/status-im/nimbus-eth2/blob/unstable/beacon_chain/rpc/rest_beacon_api.nim and its corresponding client: https://github.com/status-im/nimbus-eth2/blob/unstable/beacon_chain/spec/eth2_apis/rest_beacon_calls.nim - this is part of a larger application that also uses sqlite (https://github.com/status-im/nim-e |
17:15:02 | FromDiscord | <vindaar> this is an important point. In terms of Nim too many things are "just obvious" to me nowadays. It's hard to see the flaws in projects one is very involved in, which is why I appreciate input from outsiders↵(@haxscramper) |
17:17:55 | FromDiscord | <hmmm> Programming 101 is perfect, I would plaster that stuff all over the official site. The GUI one is a bit bookish detailing the library functions, it should be something like, let's build this cool app step by step using nim and library xyz in 30 fokkin minutes, with pictures, github repo and fancy narrative skills. I think wnim is polished enough to get a great result |
17:20:19 | FromDiscord | <hmmm> Godot-nim needs a tutorial just to be able to install the damn thing but I think a series on small game (not too basic) would be killer since godot is the stuff of the dreams |
17:26:36 | * | stkrdknmibalz joined #nim |
17:41:22 | weirdweirdhuh | if closure iterators can be implemented as a library, could AST iterators be implemented as a library as well? |
17:45:31 | FromDiscord | <brainproxy> when I run `nimble install` in my project, I end up with multiple versions of `foo` dep in `~/.nimble/pkgs`, e.g. `foo-1.2.3` and `foo-#bar`↵↵is there a way when invoking a nimble task and/or the nim compiler to tell it to "use `foo-#bar`, don't use `foo-123` ? |
17:45:54 | FromDiscord | <brainproxy> (edit) "`foo-123`" => "`foo-1.2.3`" |
17:46:26 | FromDiscord | <brainproxy> locally and in CI I can simply `rm -rf ~/.nimble/pkgs/foo-1.2.3` but that's kind of a pain |
17:55:49 | * | terminalpusher joined #nim |
17:57:21 | FromDiscord | <haxscramper> In reply to @weirdweirdhuh "if closure iterators can": what is an AST iterator? regular inline iterator? |
17:57:37 | weirdweirdhuh | @haxscramper yes sorry |
17:58:09 | FromDiscord | <haxscramper> inline iterator can theoretically be be implemented as a library, but this would require very nontrivial `typed` macro |
17:58:25 | FromDiscord | <haxscramper> Well, CPS etc. stuff, |
17:58:51 | FromDiscord | <haxscramper> https://github.com/nim-works/cps/tree/master/docs |
17:59:30 | FromDiscord | <haxscramper> In reply to @brainproxy "when I run `nimble": you can pass `--path` to the nim compiler explicitly or by setting `nim.cfg` for your project |
18:00:02 | FromDiscord | <haxscramper> but `nim c` and `nimble install` currently can't communicate dependency information between each other |
18:02:55 | FromDiscord | <haxscramper> regular inline iterator compies to a state machine basically |
18:03:14 | FromDiscord | <haxscramper> if you look at codegen it is a `while(1); goto` kind of thing most of the time |
18:03:46 | FromDiscord | <haxscramper> Because you have `continue/break/labeled-break/finally/yield`, all of these might affect control flow in unstructured way |
18:04:48 | weirdweirdhuh | makes sense thank you |
18:14:03 | * | audiophile_ quit (Ping timeout: 250 seconds) |
18:18:50 | * | weirdweirdhuh quit (Quit: Client closed) |
18:37:49 | FromDiscord | <dom96> In reply to @brainproxy "when I run `nimble": Nim compiler will always pick #head |
18:39:14 | * | src_ joined #nim |
18:39:39 | FromDiscord | <brainproxy> In reply to @dom96 "Nim compiler will always": in this case it's picking `foo-1.2.3` (which is a dep of one of my deps), but in my project's `.nimble` I depend on `https://github.com/blah/foo.git#bar`, which is the one I want the compiler to use |
18:42:13 | * | src quit (Ping timeout: 250 seconds) |
18:44:44 | * | src_ quit (Quit: Leaving) |
18:49:40 | * | src joined #nim |
18:52:14 | FromDiscord | <brainproxy> one solution, based on what I inferred from @haxscramper, is that if in my nimble task I pass `--path:/home/user/.nimble/pkgs/foo-#bar` to the compiler, then it takes higher precedence in the search path than `foo-1.2.3` |
18:52:22 | FromDiscord | <brainproxy> not sure if that's the best solution, but works for now |
19:16:31 | * | vsantana joined #nim |
19:19:27 | * | vsantana quit (Client Quit) |
19:34:50 | * | krux02 joined #nim |
19:42:45 | * | terminalpusher quit (Remote host closed the connection) |
19:43:15 | * | terminalpusher joined #nim |
19:52:37 | FromDiscord | <brainproxy> @dom96 just curious, when using choosenim on macOS, why isn't there a prebuilt compiler, etc. like there is when using choosnim on Linux? |
19:53:20 | FromDiscord | <brainproxy> (edit) "choosnim" => "choosenim" |
19:53:44 | * | FromDiscord quit (Remote host closed the connection) |
19:53:57 | * | FromDiscord joined #nim |
19:59:16 | FromDiscord | <dom96> we just don't have CI set up to build macOS nightlies |
20:14:50 | * | PMunch joined #nim |
20:25:38 | FromDiscord | <ynfle (ynfle)> Why are object fields in a `TypeDef` `Ident` not `Sym` |
20:25:53 | * | neurocyte0132889 quit (Read error: Connection reset by peer) |
20:26:58 | * | neurocyte0132889 joined #nim |
20:26:58 | * | neurocyte0132889 quit (Changing host) |
20:26:58 | * | neurocyte0132889 joined #nim |
20:34:06 | PMunch | Because you're looking at `untyped` data |
21:09:28 | * | PMunch quit (Quit: leaving) |
21:18:04 | * | advesperacit quit (Quit: advesperacit) |
21:24:54 | FromDiscord | <sOkam!> Does this mean nim can use "header" files?↵Is there a preffered filetype for them, if that's the case? https://media.discordapp.net/attachments/371759389889003532/910641670314401822/unknown.png |
21:27:35 | FromDiscord | <Recruit_main707> nope, forward declarations must happen within the same file as the definition afaik, sadly |
21:28:15 | FromDiscord | <Elegantbeef> You're right |
21:28:47 | FromDiscord | <Elegantbeef> Forward declarations in nim are about having cyclical procedure calls in a file |
21:29:18 | FromDiscord | <Elegantbeef> I originally didnt like it, but i've grown to like that i know code i'm calling is declared or forward declared above the code i'm currently at |
21:30:23 | FromDiscord | <Recruit_main707> im still originally disliking it xD |
21:33:53 | FromDiscord | <sOkam!> i mean, if you include a file, is that not immediately added to the top of the current one? 🤔↵thought that was the context of the `include` keyword |
21:34:10 | FromDiscord | <Elegantbeef> Eh you never really want to use include |
21:34:18 | FromDiscord | <Elegantbeef> include is more for splitting a file across multiple files |
21:34:38 | FromDiscord | <Recruit_main707> now that you mention it i guess it would work xd, but why tho |
21:34:39 | FromDiscord | <Elegantbeef> You can technically use it for forward declarations, but Nim is not C there is no benefit to that |
21:35:53 | FromDiscord | <z3nchada> hello. I am looking for a contact for a nim-lang dev for a potential bug disclosure. Would anyone happen to have a contact? |
21:36:23 | FromDiscord | <Elegantbeef> A security bug or a normal bug? |
21:37:03 | FromDiscord | <Elegantbeef> If security related https://github.com/nim-lang/security/security/policy#reporting-a-vulnerability |
21:37:14 | FromDiscord | <sOkam!> In reply to @Recruit_main707 "now that you mention": dunno if there's any benefit, just trying to understand the boundaries of the language 🤷♂️↵i'm guessing it could serve for sorting functions in a non-linear way, so you avoid making the mistake of calling something that hasn't been declared yet.↵also guessing it could potentially become useful if the app is very interconnected (as in oop) |
21:37:21 | FromDiscord | <z3nchada> In reply to @Elegantbeef "A security bug or": potential security. Exploitability is unknown potentially unlikely. It is a DOS vector and could be used maliciously depending on the project. |
21:37:45 | FromDiscord | <Elegantbeef> So then yea follow the link |
21:37:46 | FromDiscord | <z3nchada> In reply to @Elegantbeef "If security related https://github.com/nim-lang/sec": thanks. Sorry I didn't see this earlier. |
21:37:52 | * | terminalpusher quit (Remote host closed the connection) |
21:37:58 | FromDiscord | <Elegantbeef> It's fine |
21:38:47 | FromDiscord | <Elegantbeef> I dont know if i follow how it benefits, if something isnt declared yet it errors |
21:39:03 | FromDiscord | <Elegantbeef> You can forward declare all your procedures in the file you're working on, if you want that behaviour |
21:39:20 | FromDiscord | <Elegantbeef> Though you rarely need forward declarations, only in the rare case you have a cyclical proc call |
21:39:27 | FromDiscord | <sOkam!> In reply to @Elegantbeef "I dont know if": unless it has been declared in a header-like file |
21:40:08 | FromDiscord | <sOkam!> that's what i'm understanding at least atm, might be wrong ofc |
21:40:14 | FromDiscord | <Elegantbeef> It'd still lack a definition and error |
21:40:22 | FromDiscord | <sOkam!> why? |
21:40:25 | FromDiscord | <Elegantbeef> And nim's `include` only works on a single file, and not globally |
21:40:52 | FromDiscord | <ynfle (ynfle)> Is the bridge to gitter working? |
21:41:00 | FromDiscord | <Elegantbeef> sent a code paste, see https://play.nim-lang.org/#ix=3Fil |
21:41:00 | FromDiscord | <Elegantbeef> It's matrix so hopefully |
21:42:06 | FromDiscord | <sOkam!> sent a code paste, see https://play.nim-lang.org/#ix=3Fin |
21:42:19 | FromDiscord | <Elegantbeef> Exactly my point, if you only have the forward declaration it'll error |
21:42:57 | FromDiscord | <sOkam!> so that tutorial is wrong then? 🤔↵not reading from the manual yet, but got the link from the official website |
21:43:10 | FromDiscord | <sOkam!> if i understood, that last image will error? |
21:43:27 | FromDiscord | <Elegantbeef> sent a code paste, see https://play.nim-lang.org/#ix=3Fio |
21:43:33 | FromDiscord | <Elegantbeef> What you just linked will work |
21:44:01 | FromDiscord | <Elegantbeef> The thing is Nim doesnt make a single file like C so a forward declaration is only in a module's scope |
21:44:30 | FromDiscord | <Elegantbeef> So the point of making an "header" is pointless |
21:45:23 | FromDiscord | <sOkam!> In reply to @Elegantbeef "So the point of": sorting things in non-linear way is the point I was initially thinking about |
21:45:43 | FromDiscord | <Elegantbeef> I dont follow |
21:46:42 | FromDiscord | <sOkam!> if you define A, then B, then C... and they depend on the previous one to work, then you are forced to sort them in that order inside your file |
21:46:55 | FromDiscord | <Elegantbeef> Yes |
21:47:10 | FromDiscord | <sOkam!> with a "header"-like file I was mentioning, you could sort them C, B, A and they would work |
21:47:11 | FromDiscord | <Elegantbeef> Or you can forward declare all of them and then dont have a order issue |
21:47:28 | FromDiscord | <Elegantbeef> Sure, but you dont need a header for that, you just forward declare them |
21:48:22 | FromDiscord | <Elegantbeef> sent a code paste, see https://play.nim-lang.org/#ix=3Fit |
21:48:32 | FromDiscord | <sOkam!> In reply to @Elegantbeef "Sure, but you dont": its for organization. starting to read a file and having to scroll through tens of lines of declarations to reach the first block of not-boilerplate content is kinda annoying in terms of tidiness |
21:48:48 | FromDiscord | <Elegantbeef> Sure but you dont often need forward declarations |
21:48:58 | FromDiscord | <Elegantbeef> I rarely use them |
21:49:13 | FromDiscord | <sOkam!> ofc in terms of functionality its the same, but for organization in a non-linear way it could work. at least that thought is what started the Q |
21:49:34 | FromDiscord | <Elegantbeef> But i'd be lying if i said i didnt find it nicer to read since code you depend upon is written above where you're at unless it's forward declared |
21:50:14 | FromDiscord | <Elegantbeef> There is the experimental code reordering though that'll probably soon be deprecated soon and might not always work |
21:50:27 | FromDiscord | <Elegantbeef> https://nim-lang.org/docs/manual_experimental.html#code-reordering if you want to read about that |
21:50:35 | FromDiscord | <sOkam!> it takes mental energy to read that boilerplate, even if skimming. i noticed so far, in my personal case, that if I reduce that annoyance then I can code for much much longer |
21:51:12 | FromDiscord | <sOkam!> hence why i got interested in nim, since there is no damn curly bracers everywhere, and everyting can be so cleanly organized |
21:52:16 | FromDiscord | <sOkam!> (edit) "everyting" => "everything" |
21:54:03 | FromDiscord | <Elegantbeef> I'm curious, what code are you talking about? |
21:54:43 | FromDiscord | <sOkam!> In reply to @Elegantbeef "I'm curious, what code": wdym? |
21:55:05 | FromDiscord | <Elegantbeef> > ↵> takes mental energy to read that boilerplate, even if skimming. i noticed so far↵> |
21:55:32 | FromDiscord | <sOkam!> In reply to @Elegantbeef "> > takes": Everything verbose c# style is the perfect example |
21:55:42 | FromDiscord | <sOkam!> Reading that style exhausts me real fast |
21:55:54 | FromDiscord | <Elegantbeef> Ok so this is a hypothetical |
21:56:09 | FromDiscord | <Elegantbeef> I thought you were reading a nim module with a lot of forward declares |
21:57:08 | FromDiscord | <sOkam!> In reply to @Elegantbeef "I thought you were": ah nope. im going through the introductory tutorials, and trying to make a mental model of whats possible in nim |
21:58:03 | FromDiscord | <Elegantbeef> Ah, then yea forward declare is a relatively uncommon tool, unless you need it. So i wouldnt be overly concerned about it |
21:59:06 | FromDiscord | <Elegantbeef> it does require linearity so i guess there is the issue anyway |
21:59:08 | FromDiscord | <K.io.S> hey guys I was reading this article:↵https://users.rust-lang.org/t/nim-multithreading-faster-than-rust/36239↵They claim that since Nim version 0.19.4, there are "random thread contention problems" in Nim. Can anybody confirm that threading is randomly broken? I haven't used it, but I haven't heard that to be the case. |
21:59:19 | FromDiscord | <Elegantbeef> But i'll shush since i'm just repeating myself |
22:00:01 | FromDiscord | <sOkam!> In reply to @Elegantbeef "Ah, then yea forward": i found myself naturally sorting in a nonlinear way. thankfully the language that im using supports it, otherwise I would have had a lot of trouble resorting things in my mental model 🤷♂️ |
22:01:56 | FromDiscord | <Elegantbeef> I dont know if there are any thread problems with Nim, i've used them a bit in a variety of projects and no issues |
22:03:10 | FromDiscord | <Elegantbeef> https://streamable.com/5antvr is 1024x1024 multi threaded particles, never had random issues with it, so guess might depend on what they're doing? |
22:05:43 | FromDiscord | <K.io.S> In reply to @Elegantbeef "https://streamable.com/5antvr is 1024x1024 multi": My thoughts were that they might be using things that became obsolete after the GC changes. Who knows. |
22:06:04 | FromDiscord | <Elegantbeef> I mean 0.19 and 1.0 are still 2+ years old now |
22:06:23 | FromDiscord | <Elegantbeef> are 2+ years old now\ |
22:06:41 | FromDiscord | <Elegantbeef> So between new GCs and just general progression, might not be an issue anymore |
22:42:01 | FromDiscord | <evoalg> I read here sometimes of people meantioning nim.cfg ... what is nim.cfg used for? |
22:43:30 | FromDiscord | <Elegantbeef> there are multiple ways to pass flags to the compiler on a project basis, `nim.cfg` is one way of doing such, say you have a program which requires threads and you want that on you make a config file with `--threads:on` then you never have to pass that option |
22:44:10 | FromDiscord | <Elegantbeef> `nim.cfg` is more meant for locally, you can do `yourFile.nims` or `config.nims` aswell |
22:44:25 | FromDiscord | <Elegantbeef> the `nims` are running nimscript which means you have a subset of Nim at your disposal |
22:44:44 | FromDiscord | <Elegantbeef> https://nim-lang.org/docs/nimc.html#compiler-usage-configuration-files |
22:45:46 | FromDiscord | <evoalg> Thank you for your answer that explains everything! (and that I can understand) |
22:46:03 | FromDiscord | <Elegantbeef> Eh they dont explain everything, everything is a lot |
22:46:39 | FromDiscord | <Elegantbeef> To answer that email here, i dont have anything setup for that |
22:47:06 | FromDiscord | <evoalg> no worries I'd though I'd ask 😉 |
22:50:16 | * | Vladar quit (Quit: Leaving) |
23:00:28 | FromDiscord | <evoalg> "flatty" was mentioned some time ago ... "Flatty - serializer and tools for flat binary blobs" .. what does this module do? What is a binary blob and why would I want to flatten one? Or should I just not worry about it since it's probably to do with some C stuff that I'm not interesting in right now? |
23:00:50 | FromDiscord | <evoalg> The module description didn't really tell me |
23:00:51 | FromDiscord | <Elegantbeef> If you want to convert an object to a binary format and store it or share it |
23:02:17 | FromDiscord | <evoalg> ahh instead of using some json to store it or share it, ok |
23:09:56 | FromDiscord | <IsaacPaul> I had to look up what it means to be flat lol↵> Access to serialized data without parsing/unpacking |
23:11:45 | FromDiscord | <IsaacPaul> I suppose you get through-put at the cost of increased bandwidth compared to protocol buffers |
23:13:07 | FromDiscord | <Elegantbeef> Well you can always apply compression to reduce the bandwidth a bit |
23:14:09 | FromDiscord | <IsaacPaul> That's true.. I wonder if that makes up for the difference 🤔 it would be interesting to compare |
23:14:58 | FromDiscord | <treeform> In reply to @evoalg "ahh instead of using": Flatty is like 10x faster then jsony. I made flatty for binary files and network packets. |
23:15:43 | FromDiscord | <treeform> I recommend using supersnappy to compress the whole thing after. |
23:17:02 | FromDiscord | <treeform> I use flatty when I controll both ends. I use JSON when I don't. |
23:19:30 | FromDiscord | <evoalg> makes sense thank you! |
23:20:19 | FromDiscord | <IsaacPaul> I've written a serializer before (in c#).. it was a pretty fun project. (https://github.com/izackp/AutoBuffer) |
23:21:40 | FromDiscord | <Elegantbeef> I've written multiple serializers for Nim, it's quite fun |
23:21:56 | FromDiscord | <Elegantbeef> This reminds me i should replace my RPC's backing with disruptek's frosty |
23:27:44 | * | src quit (Quit: Leaving) |
23:39:15 | * | mahlon quit (Ping timeout: 250 seconds) |
23:47:18 | * | vicfred joined #nim |
23:47:22 | FromDiscord | <hmmm> In reply to @treeform "Flatty is like 10x": hey tformy last time I tried flatty I remember it didn't eat seq[seq[float]] or something, while jsony gobbled it just fine. Was I drunk or it's true and there is some reason for it? |
23:48:59 | * | mahlon joined #nim |