00:28:50 | * | _________ joined #nim |
00:34:19 | * | Jjp137 quit (Ping timeout: 264 seconds) |
00:34:40 | * | Jjp137 joined #nim |
01:04:45 | * | beholders_eye joined #nim |
01:18:06 | FromDiscord | <ichigo7799> I mean, I work in games, and a lot of games have custom scripting languages I'd like to write parsers for to↵a) make them easier to edit↵b) compile to more modern platforms. |
01:23:25 | * | beholders_eye quit (Ping timeout: 252 seconds) |
02:28:27 | * | SchweinDeBurg quit (Quit: WeeChat 4.5.0-dev) |
02:32:18 | * | SchweinDeBurg joined #nim |
02:48:52 | * | lucasta quit (Quit: Leaving) |
03:19:23 | * | rockcavera quit (Remote host closed the connection) |
03:56:17 | * | krux02 quit (Remote host closed the connection) |
04:07:28 | * | Jjp137 quit (Quit: Leaving) |
04:07:39 | * | Jjp137 joined #nim |
04:39:39 | FromDiscord | <empathy.monster> Anyone know what theme the code on the main page uses by chance? |
04:45:12 | FromDiscord | <michaelb.eth> looks a bit like dracula, but that’s probably not it exactly |
04:46:50 | FromDiscord | <empathy.monster> I could whip up something custom i guess with a color picker |
05:12:20 | FromDiscord | <ichigo7799> the page pulls `darcula.css` so maybe |
05:12:45 | FromDiscord | <ichigo7799> (edit) "`darcula.css`" => "`dracula.css`" |
05:12:55 | FromDiscord | <ichigo7799> (edit) "the page pulls `dracula.css` so maybe ... " added "(copyright contains https://github.com/zenorocha/dracula-theme)" |
05:13:49 | FromDiscord | <ichigo7799> (edit) "the page pulls `dracula.css` so maybe (copyright ... contains" added "note in the file" |
06:05:36 | * | coldfeet joined #nim |
06:22:20 | * | coldfeet quit (Remote host closed the connection) |
06:53:27 | FromDiscord | <spotlightkid> Ugh, that looks hideous in Zed. |
07:07:31 | FromDiscord | <amarevite> quick question (i hope)↵right now i can `echo item.type` and it will print something like `uint32` or `float32` to the terminal↵is there an easy way to print the shorthand version like `u32` or `f32`? |
07:08:00 | FromDiscord | <Elegantbeef> No you need to map it yourself cause Nim does not have "short hand" |
07:09:35 | FromDiscord | <amarevite> im not sure what you mean by that↵i would consider`1000'u32` the shorthand notation for `uint32(1000)`↵i just dont know if theres an easy way to print that shorthand notation instead of the full type name |
07:09:54 | FromDiscord | <Elegantbeef> But `u32` is not a type it's a literal |
07:11:34 | FromDiscord | <amarevite> is `1000.uint32 ` not also a literal? |
07:11:54 | FromDiscord | <Elegantbeef> Nope it converts `1000` to `uint32` |
07:12:29 | FromDiscord | <amarevite> is 1000 always an int by default? |
07:12:32 | FromDiscord | <empathy.monster> In reply to @ichigo7799 "the page pulls `dracula.css`": Cool, thanks! I didn't think to inspect it in my browser |
07:12:34 | FromDiscord | <Elegantbeef> Yes |
07:12:38 | FromDiscord | <amarevite> i see |
07:13:42 | FromDiscord | <amarevite> alright well ill just deal with the few extra characters of terminal space and tackle it in the future if i care enough, thank you! |
07:23:06 | * | ntat joined #nim |
07:26:23 | * | PMunch joined #nim |
07:49:54 | * | kenran joined #nim |
08:01:10 | * | ntat quit (Quit: Leaving) |
08:27:01 | * | SchweinDeBurg quit (Ping timeout: 248 seconds) |
08:35:34 | * | SchweinDeBurg joined #nim |
09:01:00 | * | SchweinDeBurg quit (Ping timeout: 246 seconds) |
09:22:06 | * | PMunch_ joined #nim |
09:24:33 | * | PMunch quit (Ping timeout: 248 seconds) |
09:46:18 | * | SchweinDeBurg joined #nim |
09:56:18 | * | SchweinDeBurg quit (Ping timeout: 246 seconds) |
09:59:06 | * | PMunch_ quit (Ping timeout: 272 seconds) |
10:19:11 | * | SchweinDeBurg joined #nim |
10:25:54 | * | SchweinDeBurg quit (Ping timeout: 265 seconds) |
10:27:29 | * | SchweinDeBurg joined #nim |
10:32:51 | * | PMunch_ joined #nim |
10:42:53 | * | PMunch__ joined #nim |
10:45:24 | * | PMunch_ quit (Ping timeout: 245 seconds) |
10:47:21 | * | tdc joined #nim |
11:09:46 | * | kenran quit (Ping timeout: 244 seconds) |
11:10:05 | * | SchweinDeBurg quit (Ping timeout: 260 seconds) |
11:11:43 | * | SchweinDeBurg joined #nim |
12:06:02 | * | coldfeet joined #nim |
12:29:32 | * | coldfeet quit (Remote host closed the connection) |
12:51:24 | * | SchweinDeBurg quit (Ping timeout: 260 seconds) |
12:53:00 | * | SchweinDeBurg joined #nim |
13:55:14 | FromDiscord | <whorf> sent a code paste, see https://play.nim-lang.org/#pasty=jrFOvDgv |
13:55:42 | * | coldfeet joined #nim |
13:56:14 | * | coldfeet quit (Remote host closed the connection) |
13:58:12 | * | coldfeet joined #nim |
14:05:21 | * | ntat joined #nim |
14:20:16 | FromDiscord | <demotomohiro> In reply to @whorf "Is there a way": How about to use: https://nim-lang.org/docs/manual.html#statements-and-expressions-statement-list-expression |
14:27:14 | FromDiscord | <whorf> I do but I was interested to see how easy it was to implement the walrus operator, so was curious if you could do any shenanigans to improve it. |
14:27:43 | * | alexdaguy joined #nim |
14:34:57 | FromDiscord | <demotomohiro> `dirty` pragma is explained here: https://nim-lang.org/docs/manual.html#templates-hygiene-in-templates |
14:37:02 | FromDiscord | <demotomohiro> I don't think `window(var w:=800, var h:=600)` is possible as using `var` directly under procedure arguments is not Nim's syntax. |
14:52:33 | * | SchweinDeBurg quit (Ping timeout: 248 seconds) |
15:16:43 | * | SchweinDeBurg joined #nim |
15:27:52 | * | SchweinDeBurg quit (Ping timeout: 252 seconds) |
15:56:10 | * | PMunch__ quit (Quit: Leaving) |
16:07:01 | * | SchweinDeBurg joined #nim |
16:28:54 | * | SchweinDeBurg quit (Ping timeout: 276 seconds) |
17:15:13 | FromDiscord | <axlefublr> hi everyone! just decided today on learning nim |
17:15:33 | FromDiscord | <axlefublr> indentation-based block creation is a bit unfortunate, but aside from that nim seems like a really nice to use language |
17:16:45 | FromDiscord | <axlefublr> I initially jumped to learn crystal |
17:16:49 | FromDiscord | <axlefublr> but no treesitter parser... |
17:16:52 | FromDiscord | <axlefublr> so I'm switching to nim lol |
17:21:21 | FromDiscord | <suvan0522> hey when will we have help forums here? |
17:26:10 | FromDiscord | <nervecenter> In reply to @axlefublr "indentation-based block creation is": Enjoy! Nim prefers value semantics, referential transparency, expressions, hidden unique pointers, and has a very simple and easy type system. But it's still nicely procedural when you want it to be. I use it in production and make use of minimal low-level magic, so if you have any questions about architecting higher-level software, feel free to ask. Nim makes that sort o |
17:26:45 | FromDiscord | <nervecenter> (edit) "In reply to @axlefublr "indentation-based block creation is": Enjoy! Nim prefers value semantics, referential transparency, expressions, hidden unique pointers, and has a very simple and easy type system. But it's still nicely procedural ... when" added "or low-level" |
17:27:12 | FromDiscord | <nervecenter> (edit) "In reply to @axlefublr "indentation-based block creation is": Enjoy! Nim prefers value semantics, referential transparency, expressions, hidden unique pointers, and has" => "sent" | "very simple and easy type system. But it's still nicely procedural or low-level when you want it to be. I use it in production and make use of minimal low-level magic, so if you have any questions about architecting higher-level software, feel |
17:27:24 | FromDiscord | <axlefublr> In reply to @nervecenter "Enjoy! Nim prefers value": marvelous! my usecase is actually scripting, believe it or not |
17:27:35 | FromDiscord | <axlefublr> my favorite language is fish shell, and second favorite is rust |
17:27:45 | FromDiscord | <axlefublr> big gap between them in terms of ability and cumbersomeness |
17:27:55 | FromDiscord | <axlefublr> fish feels very easy and enjoyable to code in |
17:28:08 | FromDiscord | <axlefublr> rust is... well it has its tradeoffs that make sense for what it's made for |
17:28:18 | FromDiscord | <axlefublr> but I don't really have a language for the everything in between |
17:28:25 | FromDiscord | <axlefublr> so I've been looking for one the last couple of days |
17:28:41 | FromDiscord | <axlefublr> and in terms of my preferennces, there are surprisingly not many choices! |
17:28:46 | FromDiscord | <axlefublr> so I eventually arrived here |
17:29:14 | FromDiscord | <nervecenter> Nim works well as a Python substitute, though if there's any changes to your scripts, there will always be a compile step with `nim r`. Alternatively, most of the language is available to the NimScript interpreter at compile time, which gives Nim arguably the best compile-time evaluation outside of Lisp. But NimScript isn't exactly a performer next to other scripted interpreters. |
17:30:49 | FromDiscord | <axlefublr> In reply to @nervecenter "Nim works well as": oh wait `nim r` automatically caches the binary? |
17:31:05 | FromDiscord | <axlefublr> in some other languages (like crystal), the "run" equivalent practically recompiles every time |
17:31:31 | FromDiscord | <axlefublr> and more commonly, it just puts the binary into the same directory and checks against that |
17:31:41 | FromDiscord | <fabric.input_output> In reply to @nervecenter "Nim works well as": not really the best outside of lisp ;) |
17:31:42 | FromDiscord | <axlefublr> which, now that I think about it, is probably what you're talking about! |
17:32:20 | FromDiscord | <axlefublr> In reply to @nervecenter "Nim works well as": > the best compile-time evaluation↵yooooooo omg I love compile-time evaluation |
17:32:23 | FromDiscord | <axlefublr> it is super duper cool |
17:32:38 | FromDiscord | <axlefublr> also zig should be mentioned when talking about compile-time evaluation |
17:32:42 | FromDiscord | <axlefublr> I heard it's amazing at it |
17:34:17 | FromDiscord | <axlefublr> I use [scriptisto](https://github.com/igor-petruk/scriptisto) to make my nim programs act as scripts |
17:34:42 | FromDiscord | <axlefublr> very convenient |
17:45:09 | * | lucasta joined #nim |
17:51:12 | * | lucasta left #nim (Leaving) |
17:53:01 | * | GnuYawk quit (Quit: The Lounge - https://thelounge.chat) |
17:53:20 | * | GnuYawk joined #nim |
18:37:24 | FromDiscord | <nervecenter> In reply to @axlefublr "oh wait `nim r`": Yes, compiles, caches, and runs. For clarity, in full it's `nim run`. Versus `nim compile` which creates the binary and puts it in the working directory. |
18:39:22 | FromDiscord | <nervecenter> In reply to @axlefublr "also zig should be": Like I said, almost the entire language is available at compile time. Between `const` and `static:`, you've got almost every feature, not just prescribed subsets of feature. For example, you can do a `const myfile = readFile("something.txt")` and have an entire file slurped into a constant in the binary. |
18:39:36 | FromDiscord | <nervecenter> (edit) "feature." => "features." |
18:40:11 | FromDiscord | <nervecenter> (edit) "In reply to @axlefublr "also zig should be": Like I said, almost the entire language is available at compile time. Between `const` and `static:`, you've got almost every feature, not just prescribed subsets of features. For example, you can do a `const myfile = readFile("something.txt")` and have an entire file slurped into a constant in the binary. ... " added "Or you can call procs that are part of your course and prec |
18:40:18 | FromDiscord | <nervecenter> (edit) "course" => "source" |
18:41:06 | FromDiscord | <axlefublr> In reply to @nervecenter "Yes, compiles, caches, and": yep, makes sense! |
18:41:09 | FromDiscord | <axlefublr> quite standard |
18:42:03 | FromDiscord | <axlefublr> In reply to @nervecenter "Like I said, almost": > you can do a const myfile = readFile("something.txt")↵omg this is so nice!! in rust you do this with a macro (i.e. special magic lol) |
18:42:11 | FromDiscord | <axlefublr> in nim it's just normal code! that's very cool |
18:42:37 | FromDiscord | <axlefublr> In reply to @nervecenter "Like I said, almost": > precompile a lookup table for common inputs↵whoa that's a cool concept |
18:43:13 | FromDiscord | <axlefublr> if you're interested to talk about it more, would love to hear more examples of how you find this flexible compile-time code useful in your day-to-day! |
18:48:28 | FromDiscord | <nervecenter> sent a long message, see https://pasty.ee/DhHlPYBm |
18:48:54 | FromDiscord | <nervecenter> (edit) "https://pasty.ee/stpqSbRJ" => "https://pasty.ee/PKsncnxs" |
18:49:45 | FromDiscord | <nervecenter> The best parallel I can give is Python's `if name == "main":` |
19:04:47 | * | Guest24 joined #nim |
19:06:01 | * | SchweinDeBurg joined #nim |
19:08:26 | * | Guest24 quit (Client Quit) |
19:14:39 | * | SchweinDeBurg quit (Ping timeout: 276 seconds) |
19:16:05 | * | SchweinDeBurg joined #nim |
19:57:33 | FromDiscord | <dedraiaken> What's the idiomatic way to interact with a C API that returns a void to an array of floats, and convert that to an UncheckedArray you can iterate over in Nim? |
20:00:56 | FromDiscord | <dedraiaken> This seems to work for me actually ` cast[ptr UncheckedArray[float32]](column_ptr)` |
20:02:37 | FromDiscord | <bostonboston> `proc foo(): UncheckedArray[float32] {.importc.}` |
20:02:39 | FromDiscord | <axlefublr> In reply to @nervecenter "Honestly the file slurping": > I slurp .svg images and font files↵woah! didn't think about being able to do so! |
20:03:05 | FromDiscord | <axlefublr> In reply to @nervecenter "Honestly the file slurping": > to encode the fonts when I slurp them↵fascinatingly cool |
20:04:10 | FromDiscord | <axlefublr> In reply to @nervecenter "Honestly the file slurping": huh! that's a very neat trick with `when isMainModule` |
20:04:37 | FromDiscord | <axlefublr> even cooler how it's not something that will have to be dealt with at runtime in one way or another, and is compile-time |
20:48:08 | * | _________ quit (Ping timeout: 264 seconds) |
20:55:02 | * | _________ joined #nim |
21:12:29 | * | SchweinDeBurg quit (Ping timeout: 260 seconds) |
21:14:22 | * | SchweinDeBurg joined #nim |
21:20:49 | * | SchweinDeBurg quit (Ping timeout: 265 seconds) |
21:22:36 | * | SchweinDeBurg joined #nim |
21:32:46 | * | ntat quit (Quit: Leaving) |
21:56:19 | * | beholders_eye joined #nim |
22:00:46 | * | SchweinDeBurg quit (Ping timeout: 244 seconds) |
22:02:38 | * | SchweinDeBurg joined #nim |
22:08:24 | * | coldfeet quit (Remote host closed the connection) |
22:23:18 | * | beholders_eye quit (Ping timeout: 252 seconds) |
22:23:39 | * | alexdaguy quit (Ping timeout: 260 seconds) |
22:24:02 | * | alexdaguy joined #nim |
22:25:07 | * | SchweinDeBurg quit (Ping timeout: 252 seconds) |
22:31:15 | * | tdc quit (Ping timeout: 246 seconds) |
23:23:24 | * | alexdaguy quit (Ping timeout: 246 seconds) |
23:24:47 | * | alexdaguy joined #nim |
23:36:09 | * | alexdaguy quit (Ping timeout: 265 seconds) |
23:38:05 | * | alexdaguy joined #nim |
23:53:23 | * | alexdaguy quit (Ping timeout: 255 seconds) |
23:55:24 | * | alexdaguy joined #nim |