00:10:48 | * | om3ga quit (Ping timeout: 264 seconds) |
00:43:01 | * | om3ga joined #nim |
01:12:48 | * | jmdaemon joined #nim |
01:23:05 | * | lucasta joined #nim |
02:07:01 | FromDiscord | <girvo> sent a long message, see <!doctype html> |
02:08:40 | FromDiscord | <Elegantbeef> Disruptek's frosty would work |
02:08:49 | FromDiscord | <Elegantbeef> Though you'd have to implement all the write logic |
02:10:15 | FromDiscord | <Elegantbeef> Though I imagine std/streams would also work |
02:15:06 | * | lucasta quit (Remote host closed the connection) |
02:29:03 | FromDiscord | <Elegantbeef> @girvo where, what, and what format do you want to serialise to? 😄 |
03:16:55 | * | azimut quit (Ping timeout: 240 seconds) |
03:20:23 | FromDiscord | <girvo> okay i'll back up haha |
03:22:00 | FromDiscord | <girvo> sent a code paste, see https://play.nim-lang.org/#ix=html> |
03:22:32 | FromDiscord | <girvo> Theres a channel that this thread receives all the log lines from `logi` or `loge` proc calls throughout the rest of the code |
03:23:07 | FromDiscord | <girvo> I wanna collect them up, and send them over the network over a TCP socket (encrypted, dw about that) |
03:24:03 | FromDiscord | <girvo> This was done with `seq[string]` initially, but was causing heap fragmentation issues for 3 reasons. the seq[string] itself, msgpack4nim then serialising/packing that seq[string] allocating, then finally nim-libsodium encrypting it also allocating |
03:26:59 | FromDiscord | <girvo> First reason, no worries. second reason, thats what I want to work out. Almost tempted to just byte for byte blat it over the network (`addr buffer[0][0], whatever_the_length_is`?) but I've no idea how robust reconstructing that would be on the server side |
03:29:13 | FromDiscord | <Elegantbeef> `addr buffer[0][0]` is horrendous |
03:29:18 | FromDiscord | <girvo> Oh absolutely lol |
03:29:27 | FromDiscord | <girvo> For a few reasons 😄 |
03:29:54 | FromDiscord | <Elegantbeef> Use termer's stack string |
03:29:59 | FromDiscord | <Elegantbeef> 😄 |
03:30:33 | FromDiscord | <girvo> haha thats somewhat orthogonal 😛 (though I have it in a branch already!) |
03:32:18 | FromDiscord | <Elegantbeef> Can you use std/streams/net? |
03:32:44 | FromDiscord | <girvo> Only reason I haven't is because I don't understand the memory model with respect to streams and heap allocaion |
03:32:46 | FromDiscord | <girvo> allocation |
03:33:25 | FromDiscord | <Elegantbeef> socket streams should allocate once |
03:34:47 | FromDiscord | <girvo> It doesn't realloc? |
03:35:08 | FromDiscord | <girvo> I would've expected it to, otherwise how does it grow if I was `write` some large amount of data? |
03:35:25 | FromDiscord | <Elegantbeef> Sends to the socket and let the OS handle it |
03:35:30 | FromDiscord | <girvo> Yeah about that |
03:35:53 | FromDiscord | <girvo> Actually I wonder what LwIP's buffer sizes are |
03:41:04 | FromDiscord | <girvo> Default send buffer size is 5744 bytes, it seems. At least thats how ESP-IDF configures it |
03:43:59 | FromDiscord | <Elegantbeef> Can always reduce it to a series of `len, str` 😄 |
03:45:23 | FromDiscord | <girvo> I honestly am pretty close to that lol |
03:46:11 | FromDiscord | <girvo> the actual "message" that gets `socket.send()`-d is `| uint8 tag | uint16 length | bytes data .... |` |
03:48:59 | FromDiscord | <girvo> There's some unneeded copies and allocations in there currently that haven't caused a problem coz the bulk of the data we send is small. But when we're sending of KB of log data, that starts to matter, and heap fragmentation rears its head.↵↵I'm tempted to just special case this, jam it all in a single flat array and do the len, str within it. Then I can keep extra copies and allocations down... it still ends up being `socket.send(addr |
03:51:50 | FromDiscord | <Elegantbeef> The reciving side loses lines though |
03:53:49 | FromDiscord | <girvo> In what way? |
03:53:56 | FromDiscord | <girvo> It'll truncate yeah, if that's what you mean |
03:55:50 | FromDiscord | <girvo> always going to be a trade off on this, and minimizing heap fragmentation on the sender side takes precedence |
03:58:18 | FromDiscord | <Elegantbeef> use an `(int, array[x, stackstring])` ;D |
04:05:10 | FromDiscord | <girvo> stackstring should... well, free once the stack is gone right lol. it shouldn't leak/fragment like the heap/rc-ed string can? |
04:05:30 | FromDiscord | <girvo> I'll have a play with it properly |
04:06:03 | FromDiscord | <Elegantbeef> It's a value type so it's stored contiguously |
04:16:52 | FromDiscord | <4zv4l> stackstring sounds very bad xD |
04:17:01 | FromDiscord | <4zv4l> x is constant tho right ? |
04:17:09 | FromDiscord | <4zv4l> (edit) removed "tho" |
04:17:10 | FromDiscord | <Elegantbeef> It is |
04:17:12 | FromDiscord | <Elegantbeef> Stack strings are grand |
04:17:23 | FromDiscord | <Elegantbeef> Static sized slightly growable strings |
04:28:51 | * | rockcavera quit (Remote host closed the connection) |
04:33:21 | FromDiscord | <zectbumo> sent a code paste, see https://play.nim-lang.org/#ix=html> |
04:33:38 | FromDiscord | <Elegantbeef> `T: static file` |
04:37:33 | FromDiscord | <zectbumo> I'm getting things like Error: cannot instantiate: 'print[stdout]' |
04:38:00 | FromDiscord | <zectbumo> or Error: cannot evaluate at compile time: stdout |
04:39:07 | FromDiscord | <Elegantbeef> Right file is a runtime value |
04:39:10 | FromDiscord | <Elegantbeef> use an enum to wrap them |
04:58:18 | * | flouer quit (Ping timeout: 256 seconds) |
05:01:45 | * | flouer joined #nim |
05:03:16 | FromDiscord | <girvo> In reply to @4zv4l "stackstring sounds very bad": Come work without a memory management unit and say that 😉 |
05:04:14 | FromDiscord | <4zv4l> oh embedded ? |
05:08:27 | FromDiscord | <zectbumo> In reply to @Elegantbeef "use an enum to": too advanced. I failed. can you give me a hint? |
05:09:59 | FromDiscord | <zectbumo> (edit) "In reply to @Elegantbeef "use an enum to": too advanced. I failed. can you give me a hint? ... " added "I'm getting stuff like: `Error: type mismatch: got 'MyFile' for 'sout' but expected 'File = ptr CFile'`" |
05:20:10 | FromDiscord | <demotomohiro> sent a code paste, see https://play.nim-lang.org/#ix=html> |
05:21:45 | FromDiscord | <Elegantbeef> sent a code paste, see https://play.nim-lang.org/#ix=html> |
05:21:52 | FromDiscord | <Elegantbeef> You cannot have a `[T: ... = ...]` |
05:23:00 | FromDiscord | <Elegantbeef> sent a code paste, see https://play.nim-lang.org/#ix=html> |
05:28:29 | termer | girvo, If you end up using the stack_strings library, let me know if you have any questions |
05:28:45 | termer | The memory is continuous and has a capacity known at compile time |
05:28:53 | termer | it's stored on the stack so you don't have to worry about heap at all |
05:28:54 | FromDiscord | <Elegantbeef> Yea send all your hate mail to termer |
05:28:59 | termer | that's right |
05:29:08 | FromDiscord | <Elegantbeef> Stop saying "stored on the stack" |
05:29:14 | FromDiscord | <Elegantbeef> Let's start saying "it's a value type" more! 😄 |
05:29:25 | termer | well that's not as marketable, now is it? |
05:29:33 | termer | but yeah I agree with you |
05:29:38 | FromDiscord | <Elegantbeef> Saying "it's stored on the stack" causes people to think "All things are on the stack" |
05:29:53 | termer | heap isn't on the stack |
05:30:03 | termer | pointers to the heap are though |
05:30:05 | FromDiscord | <Elegantbeef> I've seen people scared about using `seq[T]` with value objects |
05:30:05 | termer | usually |
05:30:12 | termer | oh I see what you're saying |
05:30:42 | termer | Yeah, "value type" is better terminology |
05:30:49 | termer | aka a type you don't have to dereference to use |
05:31:33 | FromDiscord | <Elegantbeef> Saying "always on the stack" creates a situation where some people think it always there, meaning they do silly things to attempt to avoid an impossible stack overflow |
05:31:41 | FromDiscord | <odexine> whats the antonym again was it reference type or smth |
05:31:50 | termer | yes |
05:32:33 | termer | value types and reference types, but you can also technically have references to value types |
05:32:55 | termer | and the type that encompass the reference to the value type would be considered a reference type |
05:33:04 | termer | at the end of the day, you have values and pointers to values |
05:34:10 | FromDiscord | <odexine> ~~i know i just forget the terminology, fun because it fits your name you termer~~ |
05:34:42 | FromDiscord | <zectbumo> sent a code paste, see https://play.nim-lang.org/#ix=html> |
05:35:16 | FromDiscord | <zectbumo> sent a code paste, see https://play.nim-lang.org/#ix=html> |
05:35:31 | FromDiscord | <Elegantbeef> https://forum.nim-lang.org/t/10858 |
05:35:50 | termer | odexine My name means nothing but that does fit it if you retroactively add meaning to it lol |
05:35:51 | FromDiscord | <zectbumo> # just do it |
05:35:52 | FromDiscord | <Elegantbeef> Let's see how hard it is |
05:36:38 | termer | Elegantbeef, `So implement it. ;-)` |
05:36:51 | termer | a reply even more annoying than the post title |
05:37:32 | FromDiscord | <zectbumo> annoying begets annoying |
05:38:37 | termer | I wonder how the Status tooling work is going |
05:38:40 | termer | and IC |
05:38:48 | FromDiscord | <zectbumo> wait, that post was just 1d ago |
05:38:50 | FromDiscord | <Elegantbeef> Seems like it's quite simple |
05:38:52 | FromDiscord | <Elegantbeef> Like 1 or 2 lines of code |
05:39:40 | FromDiscord | <zectbumo> In reply to @Elegantbeef "https://forum.nim-lang.org/t/10858": btw, how did you find this with this horrible title? |
05:39:54 | FromDiscord | <Elegantbeef> It was 1 day ago |
05:40:05 | FromDiscord | <Elegantbeef> I might be an idiot but I can remember 1 day |
05:40:13 | FromDiscord | <zectbumo> do you read everything? |
05:40:32 | FromDiscord | <odexine> oh its this post lol |
05:40:51 | FromDiscord | <odexine> In reply to @zectbumo "do you read everything?": not that hard, there arent many forum posts every day |
05:41:00 | FromDiscord | <Elegantbeef> I avoid anything that is uninteresting |
05:41:54 | termer | I view them when I'm waiting for something and only have my phone |
05:42:20 | FromDiscord | <zectbumo> I should get into that habit |
05:42:22 | termer | Did you guys see that "Ode to my goddess Nim" post |
05:42:30 | FromDiscord | <Elegantbeef> Damn it's quite literally 2 lines of code |
05:42:32 | termer | That shit was the funniest thing I ever read on that forum |
05:43:11 | FromDiscord | <zectbumo> ^done^ |
05:44:06 | FromDiscord | <zectbumo> ###### let's see it |
05:46:04 | FromDiscord | <Elegantbeef> sent a code paste, see https://play.nim-lang.org/#ix=html> |
05:46:07 | FromDiscord | <Elegantbeef> We did it |
05:46:32 | FromDiscord | <Elegantbeef> Whoops bad diff |
05:46:40 | FromDiscord | <Elegantbeef> sent a code paste, see https://play.nim-lang.org/#ix=html> |
05:46:44 | FromDiscord | <Elegantbeef> God damn it |
05:46:48 | FromDiscord | <Elegantbeef> Ok take the keyboard away |
05:47:01 | FromDiscord | <Elegantbeef> sent a code paste, see https://play.nim-lang.org/#ix=html> |
05:48:10 | FromDiscord | <Elegantbeef> Apply that diff on your own branch and then add tests then PR... mmmk |
05:48:19 | FromDiscord | <zectbumo> on it |
05:49:34 | FromDiscord | <Elegantbeef> sent a code paste, see https://play.nim-lang.org/#ix=html> |
05:49:39 | FromDiscord | <Elegantbeef> It presently errors something horrendous |
05:49:46 | FromDiscord | <Elegantbeef> `Error: type mismatch: got 'string' for 'string' but expected 'GenericParam'` |
05:51:12 | FromDiscord | <Elegantbeef> But it does work |
05:51:12 | FromDiscord | <Elegantbeef> image.png https://media.discordapp.net/attachments/371759389889003532/1194156399408726016/image.png?ex=65af53cf&is=659cdecf&hm=430d5cbf70a7e5d133f319ba129325a4acaf02c488a67cecb96f4d097000094f& |
05:52:28 | FromDiscord | <odexine> In reply to @termer "Did you guys see": god |
05:52:30 | FromDiscord | <odexine> please no |
05:52:52 | FromDiscord | <Elegantbeef> I was too busy spooning the sand to read |
05:55:47 | termer | odexine, Did you see the poster's reply on an unrelated thread about his thread being locked? |
05:55:54 | FromDiscord | <odexine> what no i didnt |
05:55:56 | FromDiscord | <odexine> whihc one |
05:56:01 | termer | He was claiming that nobody seems to appreciate beauty in programming |
05:56:13 | termer | and saying that "golden shower" was a poor choice of words, "golden rain" would have been better |
05:57:06 | termer | The kind of thing you might expect someone to say who just wrote a post about euphemistically impregnating a programming language |
05:57:50 | * | Jjp137 quit (Ping timeout: 245 seconds) |
06:00:27 | FromDiscord | <odexine> words i thought i would never read |
06:00:34 | FromDiscord | <odexine> in the same sentence |
06:01:17 | FromDiscord | <Elegantbeef> I'd say "leave my alt account out of this" but that whole thing was too outlandish for me to even jokingly claim |
06:02:03 | * | Jjp137 joined #nim |
06:06:10 | FromDiscord | <odexine> jokingly? |
06:06:30 | FromDiscord | <Elegantbeef> Indeed |
06:08:14 | FromDiscord | <sOkam! 🫐> how does one debug macro code?↵have a macro that is incorrectly generating the same code twice, but don't know how to inspect where the problem could be↵are there any specific tools or workflow for that? |
06:09:08 | FromDiscord | <Elegantbeef> @zectbumo I do have to ask was that "on it" a joke or what? |
06:09:47 | FromDiscord | <zectbumo> no, or is the task bigger than I think? |
06:10:02 | FromDiscord | <Elegantbeef> I do not think it's much bigger |
06:10:22 | FromDiscord | <Elegantbeef> With the `T: int or float = string` you will want to make that make sense |
06:11:00 | FromDiscord | <Elegantbeef> How to do that is a good intro to the compiler 😄 |
06:11:12 | FromDiscord | <zectbumo> so you are telling me I need a new diff |
06:11:44 | FromDiscord | <Elegantbeef> I mean if you're wanting to make the PR I'd rather you learn a bit than me do all the work |
06:12:04 | FromDiscord | <zectbumo> I probably can look up another place where they check for or |
06:12:25 | FromDiscord | <Elegantbeef> I mean just run the code with `koch temp c yourtest.nim` |
06:12:39 | FromDiscord | <Elegantbeef> It'll print out a stack you go to the last place and see if you can improve this specific case |
06:12:57 | FromDiscord | <zectbumo> k |
06:13:23 | FromDiscord | <Elegantbeef> It'd probably be like `if theType.kind == tyGenericParam: theType = theType.n.typ` or thereabouts |
06:14:19 | FromDiscord | <Elegantbeef> This is a relatively good first issue since it's a relatively simple feature addition |
06:20:44 | FromDiscord | <Elegantbeef> In fact it's another one line fix |
06:20:56 | FromDiscord | <Elegantbeef> `Error: type mismatch: got 'string' for 'string' but expected 'int or float'` 😄 |
06:44:57 | FromDiscord | <zectbumo> I'm still compiling |
06:54:53 | FromDiscord | <Elegantbeef> I take my cpu for granted I guess 😄 |
06:55:31 | * | antranigv quit (Ping timeout: 276 seconds) |
06:56:48 | FromDiscord | <Robyn [She/Her]> What are you compiling?↵(@zectbumo) |
06:57:03 | FromDiscord | <zectbumo> nim |
06:57:09 | FromDiscord | <Elegantbeef> Take your finger out and re read the entire conversation |
06:57:15 | FromDiscord | <Robyn [She/Her]> Ah that makes sense |
06:57:20 | FromDiscord | <Elegantbeef> This was as straight forward as a runway |
06:57:30 | FromDiscord | <Robyn [She/Her]> I just woke up and I'm too tired so nah |
06:58:37 | FromDiscord | <Elegantbeef> It's like a 20s compile from scratch on my 5600x was like 30s on my old xeon1231v3, so I do not pitty you 😄 |
06:59:00 | FromDiscord | <Elegantbeef> pity\ |
06:59:09 | FromDiscord | <Robyn [She/Her]> Pitty |
06:59:27 | FromDiscord | <Elegantbeef> Piddy |
07:02:42 | FromDiscord | <zectbumo> I did build_all.sh |
07:03:02 | FromDiscord | <Elegantbeef> You now have all the tooling |
07:03:10 | FromDiscord | <zectbumo> maybe I should have just done koch? |
07:03:15 | FromDiscord | <Elegantbeef> In reality you only really needed to build `koch` 😄 |
07:03:20 | FromDiscord | <Elegantbeef> Yep |
07:03:35 | FromDiscord | <Elegantbeef> Anyway now that you have koch you can get to compiler dev |
07:03:46 | FromDiscord | <Elegantbeef> It's very simple you just do `./koch temp ...` and pretend that is `nim` |
07:04:10 | FromDiscord | <zectbumo> I've used koch once. I forget why |
07:04:21 | FromDiscord | <Elegantbeef> Then when you want to make sure tests pass you can do `./koch boot -d:release` and `./koch test cat categoryname` |
07:04:41 | * | antranigv joined #nim |
07:05:02 | FromDiscord | <Elegantbeef> Technically `-d:danger` would make tests faster, but you do not want unchecked behaviour to get through |
07:05:48 | FromDiscord | <zectbumo> and we are assuming that all tests currently pass? |
07:06:13 | FromDiscord | <Elegantbeef> the CI will double check your work, but for when working on subsections of code do you really want to run the entire test suite locally? |
07:06:48 | FromDiscord | <Elegantbeef> The test suite takes like 20-40 minutes on the CIs |
07:24:31 | * | advesperacit joined #nim |
07:27:12 | * | zgasma quit (Quit: Lost terminal) |
07:32:14 | FromDiscord | <nnsee> In reply to @termer "Did you guys see": seen, screenshotted, shared in the group DM |
07:32:27 | FromDiscord | <nnsee> someone said "least deranged Nim programmer" |
07:34:08 | FromDiscord | <zectbumo> okay bed time. I feel that I could have ctrl+c this build and did koch only in 20s. which I keep saying every 20s that pass |
07:42:57 | FromDiscord | <zectbumo> lol, compile just finished. zzz |
08:27:18 | * | antranigv_ joined #nim |
08:29:11 | * | antranigv quit (Ping timeout: 256 seconds) |
08:41:45 | FromDiscord | <odexine> In reply to @nnsee "someone said "least deranged": are they wrong |
08:45:36 | * | azimut joined #nim |
08:55:19 | FromDiscord | <4zv4l> is this project dead https://ratel.peterme.net/↵I dont see much update on the github repo |
08:56:39 | FromDiscord | <4zv4l> also the description is a bit vage↵> The secret to generate such tiny code is simple, let the computer compiling do the work. Ratel leverages the Nim programming language and its powerful meta-programming and compile-time execution powers. |
08:56:52 | FromDiscord | <4zv4l> (edit) "vage↵>" => "↵>" |
08:57:54 | FromDiscord | <Elegantbeef> Yea pmunch your project is dead |
08:58:09 | FromDiscord | <Elegantbeef> Fuck do I hate people |
08:58:46 | FromDiscord | <Phil (he/him)> Chiiiiilllll |
08:59:13 | FromDiscord | <Elegantbeef> I'm chill, it's just every time I see someone say "X is dead" it drives a nail in my skull |
09:00:16 | FromDiscord | <Phil (he/him)> You don't see me updating nimword. Doesn't mean the project is dead, just that it does what it needed to do for me. I'll keep updating it if it breaks to make sure it works.↵If somebody wants to extend it I'm happy to advise, but my life's purpose does not revolve around ever expanding the same package.↵(@4zv4l) |
09:00:39 | FromDiscord | <4zv4l> I mean↵I would love to see this page with the help 🥹 ↵https://ratel.peterme.net/implementboard.html |
09:00:50 | FromDiscord | <Phil (he/him)> I'm pretty sure the same counts for PMunch who is literally active here. |
09:01:36 | FromDiscord | <4zv4l> In reply to @Elegantbeef "I'm chill, it's just": thats a simple question, it isnt negative, I dont know the author mind behind the project↵if he says its mature and doesnt need update for now then I understand |
09:02:52 | FromDiscord | <Elegantbeef> Given that pmunch shills ratel, it's probably still 'alive' |
09:04:52 | FromDiscord | <4zv4l> In reply to @4zv4l "I mean I would": is there any draft of this page then that I could read to get to know how to do it without diving into the code ? |
09:07:23 | FromDiscord | <Phil> That is very much a question for the secret super hero I summon whenever somebody brings up either futhark or ratel |
09:07:29 | FromDiscord | <graveflo> sent a code paste, see https://play.nim-lang.org/#ix=html> |
09:07:29 | FromDiscord | <Phil> @pmunch , I choose you! |
09:07:47 | FromDiscord | <Elegantbeef> `let` |
09:07:54 | FromDiscord | <graveflo> let bad? |
09:08:01 | FromDiscord | <Elegantbeef> `let` not `const` |
09:08:10 | FromDiscord | <Elegantbeef> `let` no worky at CT |
09:08:13 | FromDiscord | <graveflo> 😦 so simple |
09:12:17 | FromDiscord | <Phil> the irony is that if that were a runtime exception you'd be fine |
09:12:27 | FromDiscord | <Phil> But error pragma is compiletime so your text got to be compiletime too |
09:13:57 | FromDiscord | <Elegantbeef> PS you can use `%` inside templates |
09:14:02 | FromDiscord | <graveflo> it all has to happen at compile time anyway. I just have to stop thinking about templates like they are macros |
09:14:20 | FromDiscord | <graveflo> I don't even know that `%` does anyway |
09:14:21 | FromDiscord | <Phil> Templates are kinda like weaksauce quote-do or genast |
09:14:30 | FromDiscord | <Elegantbeef> `"""Hello $#, is $# easier $#""" % ["world", "soooo", "easier"]` |
09:14:30 | FromDiscord | <Phil> If you squint |
09:15:19 | FromDiscord | <Phil> I'll be honest, not a fan of % based format strings |
09:15:29 | FromDiscord | <graveflo> yea I don't like that at all |
09:15:38 | FromDiscord | <Phil> Just don't like the pattern of first define string pattern, then define values that go into the placeholders |
09:15:39 | FromDiscord | <Elegantbeef> I mean inside templates it's much better than string concatenation |
09:15:49 | FromDiscord | <Elegantbeef> But why arent you just using a proc here |
09:15:54 | FromDiscord | <Elegantbeef> The real question |
09:16:16 | FromDiscord | <graveflo> like `static: callMe()` ? |
09:16:18 | FromDiscord | <graveflo> idk |
09:16:22 | FromDiscord | <Elegantbeef> Nope |
09:16:24 | FromDiscord | <Phil> The real question is why the entire thing isn't called `validateFeature()` |
09:16:36 | FromDiscord | <Phil> Since this is compiletime validation |
09:16:43 | FromDiscord | <Elegantbeef> `proc name(....) = when(...) {.error: ....}` |
09:16:59 | FromDiscord | <graveflo> In reply to @isofruit "The real question is": the feature is valid though. It's checking if the target device supports it |
09:17:11 | FromDiscord | <Phil> In reply to @graveflo "the feature is valid": `validateFeatureSupport` |
09:17:27 | FromDiscord | <Phil> for this kind of stuff validate will always be my key word |
09:17:27 | FromDiscord | <graveflo> In reply to @Elegantbeef "`proc name(....) = when(...)": it's not checked on a per proc basis. This happens at module import |
09:17:43 | FromDiscord | <Elegantbeef> Grave something has to invoke the template |
09:17:53 | FromDiscord | <Elegantbeef> Instead of invoking the template invoke the proc |
09:17:53 | FromDiscord | <graveflo> yea it's at module level |
09:18:06 | FromDiscord | <Phil> But then do the proc call on the module-level |
09:18:15 | FromDiscord | <graveflo> I would have to run the proc statically for it to happen at compile time right? |
09:18:23 | FromDiscord | <Elegantbeef> No it's a `when` |
09:18:34 | FromDiscord | <Elegantbeef> If the `when` passes the `error` is emitted |
09:18:39 | FromDiscord | <Elegantbeef> Which means the program crashes |
09:18:46 | FromDiscord | <Elegantbeef> At compile time |
09:18:54 | FromDiscord | <Phil> Basically "error" crashes your program if the compiler ever sees it past the when-evaluation stage |
09:19:05 | FromDiscord | <Phil> well, crashes your compilation of your program |
09:19:17 | FromDiscord | <Elegantbeef> sent a code paste, see https://play.nim-lang.org/#ix=html> |
09:19:18 | FromDiscord | <graveflo> oh I guess that's true then. It's really ugly though because I would think of a proc running at run time |
09:19:25 | FromDiscord | <Phil> It does not matter the flow of execution or what not. If It's there, compiler die |
09:19:26 | FromDiscord | <Elegantbeef> It would run at runtime |
09:19:37 | FromDiscord | <Elegantbeef> But there is no body so it's a no op and will be optimised out |
09:19:41 | FromDiscord | <graveflo> well it won't but thats how it works |
09:20:06 | FromDiscord | <graveflo> again just jumping through multiple hoops for no reason. Template has the mechanics that fit this type of thing better |
09:20:24 | FromDiscord | <Phil> ... but it's the same... oh well |
09:20:29 | FromDiscord | <Elegantbeef> Not really jumping through any hoops 😄 |
09:20:39 | FromDiscord | <Elegantbeef> Getting strformatting to work! |
09:21:11 | FromDiscord | <odexine> technically youre jumping through more hoops by using templates for no good reason when a proc would work no? |
09:21:16 | FromDiscord | <Elegantbeef> Infact the `template` and `proc` have the exact same error message |
09:21:19 | FromDiscord | <Elegantbeef> Rika is right |
09:21:28 | FromDiscord | <Elegantbeef> You've dropped down in abstraction for no reason |
09:22:10 | FromDiscord | <Phil> The reason we're currently advocating is because of the creed to use the simplest possible mechanism for your needs, because ever step you take deeper into the abyss comes with more pitfalls.↵Procs > Generics >> Templates >>> Macros |
09:22:21 | FromDiscord | <Phil> every steep |
09:22:32 | FromDiscord | <graveflo> you guys are weird |
09:22:43 | FromDiscord | <Phil> This is mostly argumenting on principle imo, I'll admit |
09:22:49 | FromDiscord | <odexine> yeah |
09:22:58 | FromDiscord | <Phil> Promoting good habits and all that |
09:23:03 | FromDiscord | <odexine> it doesnt really matter that much, you do you, just sayin tho |
09:23:24 | FromDiscord | <graveflo> that's the kind of habit that you use to avoid doing dumb stuff not stuff that makes sense |
09:23:29 | FromDiscord | <pmunch> In reply to @isofruit "<@392962235737047041> , I choose": PMunch PMunch! |
09:23:53 | FromDiscord | <Elegantbeef> sent a code paste, see https://play.nim-lang.org/#ix=html> |
09:24:12 | FromDiscord | <Elegantbeef> whoops `: fmt"""` |
09:24:20 | FromDiscord | <Phil> In reply to @4zv4l "is there any draft": Ratel was brought up PMunch, see here |
09:24:39 | FromDiscord | <graveflo> yea `fmt` is better |
09:24:53 | FromDiscord | <Elegantbeef> all those `\"` are also useless |
09:24:54 | FromDiscord | <Phil> No need for the backslashing of " anymore though 😄 |
09:25:01 | FromDiscord | <Elegantbeef> too slow phil |
09:25:12 | FromDiscord | <Phil> Curse you Sonic! |
09:25:29 | FromDiscord | <Elegantbeef> SOOOOOONIIIIIIC HEEEEEEERRROOOOES |
09:26:11 | FromDiscord | <pmunch> Yeah I saw, @4zv4l there currently isn't a draft or anything. Closest you get is looking at this PR where I implemented the Digispark board: https://github.com/PMunch/ratel/pull/16 |
09:28:07 | FromDiscord | <Elegantbeef> I'm still absolutely baffled about the sonic heroes OST 😄 |
09:29:51 | FromDiscord | <4zv4l> In reply to @pmunch "Yeah I saw, <@329196212282458112>": I will check this, thanks ! |
09:36:01 | * | eery quit (Ping timeout: 255 seconds) |
09:37:41 | * | eery joined #nim |
09:43:21 | FromDiscord | <khazakar> In reply to @pmunch "Yeah I saw, <@329196212282458112>": Will take a look too, since I'd want to play with Risc-v board I have around |
09:51:06 | FromDiscord | <khazakar> But also having web hosted docs explaining what to do + encouragement to send PRs with new boards would be best 😛 |
09:52:30 | FromDiscord | <Phil> I encourage everyone that writes a lib to write introductory and reference docs, but it is a decent chunk of work |
09:53:05 | FromDiscord | <Phil> (edit) "docs," => "docs (there's a reason I have docs for writing and hosting docs on github)," |
09:54:35 | FromDiscord | <Elegantbeef> Writing docs is for nerds |
09:54:39 | FromDiscord | <Elegantbeef> Just intuit the code |
09:54:45 | FromDiscord | <Phil> You write code, you are a nerd |
09:55:27 | FromDiscord | <Elegantbeef> A who? |
09:56:40 | * | wheatengineer joined #nim |
10:27:31 | FromDiscord | <khazakar> In reply to @isofruit "I encourage everyone that": Yes, it is a chunk.of work, but let's be real - without docs most people will be bouncing off the project |
10:27:59 | FromDiscord | <Phil> Sure but that entirely depends on the mentality with which you make a project public |
10:28:01 | FromDiscord | <khazakar> Just like without any commit, even simple readme update, for half month+ |
10:28:05 | FromDiscord | <Phil> Could be that you're just doing it as a courtesy |
10:29:02 | FromDiscord | <Phil> In reply to @khazakar "Just like without any": If no commit for half a month scares you away from a project then we have a fundamental disagreement on what matters to a project |
10:30:25 | FromDiscord | <khazakar> In reply to @isofruit "If no commit for": I know, I just point out what usually people think about language and project when looking for new things to learn and stay on |
10:32:16 | FromDiscord | <khazakar> It's a habit from more popular languages like python, JavaScript or rust that people took, because they assign it to broken code |
10:33:05 | FromDiscord | <khazakar> When using Nim, I'm unlearning such behavior 🙂 |
10:33:10 | FromDiscord | <Phil> Sure, but that is an impossible ask for anyone that's not a massive language |
10:33:26 | FromDiscord | <khazakar> Somehow those languages took off, right? 😃 |
10:33:31 | FromDiscord | <Phil> So it's not that useful to bring up, outside of my writing a workflow to produce dummy commits |
10:33:43 | FromDiscord | <Phil> But not because people made biweekly dummy commits |
10:33:58 | FromDiscord | <khazakar> Even once in few months is fine to be fair |
10:34:23 | FromDiscord | <Phil> If it works, it is worthwhile. |
10:34:48 | FromDiscord | <khazakar> Current OSS space is weird in this regard, attention span is short like tiktok clips |
10:38:58 | FromDiscord | <khazakar> And like I said, I'm trying to unlearn such behavior and in the future contribute my ideas as libs and apps |
11:09:18 | * | adigitoleo quit (Read error: Connection reset by peer) |
11:09:27 | * | adigitoleo joined #nim |
11:12:25 | FromDiscord | <nnsee> writing the paste service for the nim playground and i'm kind of disappointed there isn't a good async postgres connector library for nim |
11:13:12 | FromDiscord | <nnsee> db_connector/db_postgres is blocking, which is unacceptable for an async web service |
11:13:27 | FromDiscord | <khazakar> Pg / asyncpg? |
11:14:02 | FromDiscord | <nnsee> asyncpg doesn't seem to compile, pg is... very barebones and somewhat dubious. |
11:15:02 | FromDiscord | <nnsee> asyncpg doesn't even compile for nim 0.19.0, lol https://github.com/cheatfate/asyncpg/pull/8 |
11:20:18 | FromDiscord | <khazakar> Kek |
11:20:41 | FromDiscord | <nnsee> I guess I'll just use db_postgres for the time being... |
11:21:16 | FromDiscord | <Phil (he/him)> There was a suggestion to add async pg support to postgres |
11:21:28 | FromDiscord | <Phil (he/him)> Ah , wait now |
11:21:32 | FromDiscord | <Phil (he/him)> To lowdb, not postgres, argh |
11:21:49 | FromDiscord | <Phil (he/him)> But the amount of work involved made it very much a "not me" thing |
11:22:47 | FromDiscord | <Phil (he/him)> (For reference, norm was built on ndb, which did no longer receive maintenance so I forked it) |
11:28:55 | FromDiscord | <khazakar> Eventually try https://github.com/itsumura-h/nim-allographer |
11:31:28 | FromDiscord | <Phil> Right, I remember this one. Might be a good option!↵I personally didn't choose it since I used sqlite and norm provided a nicer abstraction imo, but if async is mandatory that is the better option imo |
11:32:02 | FromDiscord | <nnsee> In reply to @khazakar "Eventually try https://github.com/itsumura-h/nim-al": neat |
11:35:09 | FromDiscord | <nnsee> oh another gripe i have with db_postgres is that it's insecure https://github.com/nim-lang/db_connector/issues/19 - of course that's not really an issue for me since I know to avoid `standard_conforming_strings` but it's still annoying that it does fucking string interpolation (and some custom homebrew implementation of "parametarized queries" that's done incorrectly and double-escapes things, etc) instead of using parametarized queries pro |
12:17:54 | * | flouer_ joined #nim |
12:19:12 | * | flouer quit (Read error: Connection reset by peer) |
12:29:33 | FromDiscord | <nnsee> i ended up vendoring the treeform/pg and making some modifications to fit my needs (shorter sleep, support for specifying explicit connections for `BEGIN ... COMMIT` transactions, etc) |
12:43:13 | * | jmdaemon quit (Ping timeout: 260 seconds) |
13:35:14 | FromDiscord | <Phil> In reply to @nnsee "i ended up vendoring": Ras, you know about tsan, right? |
13:36:06 | FromDiscord | <khazakar> In reply to @nnsee "i ended up vendoring": Why bot making PRs out of some of the changes? 😃 |
13:38:06 | FromDiscord | <nnsee> In reply to @isofruit "Ras, you know about": a little bit, sure |
13:38:17 | FromDiscord | <Phil> Ever used no_sanitize? |
13:38:17 | FromDiscord | <nnsee> In reply to @khazakar "Why bot making PRs": maybe, if I get the time |
13:38:26 | FromDiscord | <nnsee> In reply to @isofruit "Ever used no_sanitize?": yup |
13:38:47 | FromDiscord | <Phil> Any idea how it might work in nim?↵It's a special way to write a doc-comment in C I think, at least from the examples I saw |
13:39:45 | FromDiscord | <Phil> Wait, do you put no_Sanitize in a bash script ? |
13:39:53 | FromDiscord | <Phil> (edit) "no_Sanitize" => "no_sanitize" |
13:40:16 | FromDiscord | <nnsee> i've generally used it in `attribute` for specific funcs |
13:40:24 | FromDiscord | <nnsee> in nim I assume you can just `emit` it |
13:40:52 | * | antranigv_ is now known as antranigv |
13:41:01 | FromDiscord | <nnsee> see https://clang.llvm.org/docs/AttributeReference.html#no-sanitize |
13:41:03 | FromDiscord | <Phil> In reply to @nnsee "i've generally used it": So that is definitely something you write inside of C code? |
13:41:32 | FromDiscord | <Phil> I'm struggling to see where you're supposed to write the attribute stuff |
13:41:44 | FromDiscord | <Phil> I'm really only guessing when I say "doc comment in C code (?)" |
13:42:56 | FromDiscord | <nnsee> you can also apply it as a compile time flag, `-fno-sanitize=whatever` iirc but that applies it for the whole project obviously, which may not be what you want |
13:43:17 | FromDiscord | <nnsee> sent a code paste, see https://play.nim-lang.org/#ix=html> |
13:43:22 | FromDiscord | <odexine> attributes are like pragmas |
13:43:25 | FromDiscord | <Phil> Yeah I only want to apply it to 2 very specific function calls |
13:43:31 | FromDiscord | <odexine> for C, i mean, ofc |
13:43:54 | FromDiscord | <odexine> sent a code paste, see https://play.nim-lang.org/#ix=html> |
13:43:56 | FromDiscord | <Phil> sent a code paste, see https://play.nim-lang.org/#ix=html> |
13:44:03 | FromDiscord | <odexine> it depends per compiler so watch out ig |
13:45:19 | FromDiscord | <nnsee> In reply to @isofruit "So this will just": the attribute applies to that specific function (and any nested calls iirc) - functions after that still sanitize integers |
13:45:36 | FromDiscord | <khazakar> In reply to @nnsee "maybe, if I get": Would be dope |
13:45:54 | FromDiscord | <Phil> Ohhh so it needs to be directly above the function.... wait how the heck would you even do this with nim |
13:46:01 | FromDiscord | <Phil> The function names get so garbled after compilation |
13:48:19 | FromDiscord | <nnsee> if you `emit` just before the proc does it not work? |
13:48:32 | FromDiscord | <Phil> Hmmmmm I'll see |
13:51:23 | FromDiscord | <Phil> You always emit that kind of stuff at global scope, not inside a proc, right? |
13:51:52 | FromDiscord | <nnsee> yes |
13:52:30 | FromDiscord | <Phil> sent a code paste, see https://play.nim-lang.org/#ix=html> |
13:52:39 | FromDiscord | <Phil> Hmmmm |
13:52:52 | FromDiscord | <Phil> (edit) |
13:53:24 | FromDiscord | <nnsee> yeah, i would assume something like that works. but maybe not. i don't really know how the nim c codegen works |
13:53:43 | FromDiscord | <nnsee> or maybe you need to use the emit pragma in the proc signature itself? |
13:53:54 | FromDiscord | <nnsee> at this point i'm just guessing |
14:00:24 | FromDiscord | <Phil> sent a code paste, see https://play.nim-lang.org/#ix=html> |
14:00:53 | FromDiscord | <Phil> My procs nowhere in sight, attribute just randomly thrown in there |
14:01:54 | FromDiscord | <nnsee> i'd ask in #internals, araq probably knows |
14:09:44 | FromDiscord | <nnsee> sent a code paste, see https://play.nim-lang.org/#ix=html> |
14:10:12 | FromDiscord | <nnsee> i think |
14:10:58 | FromDiscord | <Phil> ~~Not in nim though+~ |
14:11:03 | FromDiscord | <Phil> (edit) "though+~" => "though~~" |
14:24:22 | FromDiscord | <odinshat> Apparently Rust is better than Nim. Is that true? |
14:25:14 | FromDiscord | <Phil> Both have the same level of access to low-level operations, so eh |
14:25:16 | FromDiscord | <odexine> better in what sense? and what metric? |
14:26:14 | FromDiscord | <odinshat> But doesn't Nim require a garbage collector whereas Rust doesn't. |
14:29:58 | FromDiscord | <Phil> In reply to @odinshat "But doesn't Nim require": Would you define Rust automatically freeing memory according to specific rules a garbage collector?↵Because nim has ARC/ORC which just inserts destructor hooks when a variable falls out of scope, freeing it when ref-counts go below 0. That's code inserted at compile time with no "GC" with ARC and a minor cycle collector cost for ORC.↵↵See https://nim-lang.org/docs/destructors.html#life |
14:30:26 | FromDiscord | <Phil> That is not even going into that you can also just straight up disable GC in the first place |
14:30:36 | FromDiscord | <Phil> (edit) "GC" => ""GC"" |
14:31:52 | FromDiscord | <odinshat> If Nim is so good why wasn't Lemmy built in it? |
14:32:13 | FromDiscord | <odinshat> That's not a valid program. It's just a memory leak waiting to die,↵(@Phil) |
14:32:20 | FromDiscord | <Phil> In reply to @odinshat "If Nim is so": Because the creator decided not to? |
14:32:53 | FromDiscord | <MDuardo> Actually yes an no↵You can customize if you want a gc, reference counting, manual managemen, etc |
14:32:59 | FromDiscord | <MDuardo> https://nim-lang.org/docs/mm.html |
14:33:11 | FromDiscord | <odinshat> Rust is being used in Mozilla, Linux kernel and drivers, web, etc. Wheres Nim being used?↵(@Phil) |
14:33:14 | FromDiscord | <Phil> In reply to @odinshat "That's not a valid": Whatever you wish to believe. |
14:33:34 | FromDiscord | <Phil> In reply to @odinshat "Rust is being used": Are we about to play the "My backers are cooler than yours" game? |
14:33:46 | FromDiscord | <Phil> Because that is such a waste of my time that I'll leave the conversation |
14:35:12 | FromDiscord | <Phil> You can use nim for web, appdev, gamedev, cryptography, embedded etc.↵And it has already been used there.↵I wrote a medium-sized backend in it using prologue and sqlite.↵I've seen PMunch write a fair amount of embedded stuff and the folks in the embedded channel are pretty active as well. |
14:35:29 | FromDiscord | <MDuardo> I don't know a big popula project made but there's plenty of software made with ithttps://github.com/ringabout/awesome-nim |
14:36:16 | FromDiscord | <Phil> I've seen folks do gamdev, there's appdev happening with e.g. a decent GTK wrapper with a declarative DSL in owlkettle, there's QT bindings afaik though I haven't used them yet and it's neither like you can't write driver either |
14:37:57 | FromDiscord | <MDuardo> Godot bindings too |
14:38:32 | FromDiscord | <Phil> Right, afaik it was jmgomez that is on the UE bindings, though given I don't do gamedev myself I'm just generally only barely informed on the secto |
14:38:33 | FromDiscord | <Phil> (edit) "secto" => "sector" |
14:39:54 | FromDiscord | <khazakar> In reply to @MDuardo "Godot bindings too": And Unreal Engine bindings. NimforUE or something like this |
14:40:19 | FromDiscord | <khazakar> And enu in case of more native way of approaching gamedev in nim 🙂 |
14:41:56 | FromDiscord | <MDuardo> sent a long message, see <!doctype html> |
14:44:30 | FromDiscord | <odinshat> Does Nim support concurrency like Rust? |
14:45:05 | FromDiscord | <odinshat> I don't use either. Tbh I'm just saying controversial things to get a sense of which is better - you're very helpful so far. \:) |
14:45:24 | FromDiscord | <odinshat> I've developed in Python so I'm leaning towards Nim due to it's similar syntax. \:) |
14:45:26 | FromDiscord | <Phil> sent a long message, see <!doctype html> |
14:46:12 | FromDiscord | <Phil> So basically if you have heavy compute at once, you can start the program, spawn a taskpool, wait for all tasks to be finished and continue there. |
14:46:25 | FromDiscord | <odinshat> OK thanks. I'll get started on Nim. 👍 |
14:46:53 | FromDiscord | <ringabout> And a promising one for ARC/ORC => https://github.com/mratsim/weave-io |
14:46:59 | FromDiscord | <Phil> There's also other kinds of parallelism, basically where you don't want a taskpool and more want to have a solid second thread that like a microservice you send messages to.↵For that there are channels, which exist |
14:47:20 | FromDiscord | <Phil> (edit) "There's also other kinds of parallelism, basically where you don't want a taskpool and more want to have a solid second thread that like a microservice you send messages to.↵For that there are channels, which exist ... " added "to send messages through them and can be used as one-way communication channels" |
14:47:28 | FromDiscord | <MDuardo> Yeshttps://nim-by-example.github.io/concurrency/ |
14:47:30 | FromDiscord | <Phil> Kinda like a websocket connection if you used those before |
14:48:31 | FromDiscord | <MDuardo> I tried some stuff with Rust, is really cool tooBut I'm not a fan of Cargo |
14:48:47 | FromDiscord | <Phil> For the most part I tried rust back when I was mostly a pythonista |
14:49:16 | FromDiscord | <MDuardo> Some projects have way too many Cargo depeniencies and gets kinda annoying to install all for a single program |
14:49:32 | FromDiscord | <MDuardo> How was it?↵(@Phil) |
14:49:42 | FromDiscord | <Phil> The harsh syntax compared with the lack of low-level concepts just made it for a hard ride, particularly since docs back then weren't forthcoming.↵The combination of hard-to-use and not-that-much-introduction-for-newbs made me give up back then.↵Might try again one of these days since I know now a lot more |
14:49:57 | FromDiscord | <Phil> But then there's the compiletimes and the fact that rust projects have a tendency to absolutely balloon |
14:50:06 | FromDiscord | <Phil> Like we're talking half a gig when starting a web project |
14:50:34 | FromDiscord | <Phil> I to this day do not understand where those 500+MB worth of data came from (tried building a webapp with Rocket, Diesel and something else that I forgot about) |
14:51:31 | FromDiscord | <Phil> And the vscode extension also used to bug out for me occasionally, similarly to how I have nimsuggest disabled nowadays because of how annoying it can be around macros+ |
14:52:27 | FromDiscord | <Phil> Basically, it was just to steep a curve (for me) back then combined with absolutely flooded discord servers and not enough people to help figure things out or elaborate |
14:52:57 | FromDiscord | <Phil> And the syntax is still not pleasant to look at, even with the gain in experience I've had since then. |
14:53:06 | Amun-Ra | not to mention average rust project dependency list looks pretty close to npm one |
14:53:09 | FromDiscord | <MDuardo> I'd rather use Go for Web development↵It's slim and simple↵(@Phil) |
14:53:48 | FromDiscord | <MDuardo> But is that really Rust fault or it's just people bloating their projects?↵(<@709044657232936960_=41mun-=52a=5b=49=52=43=5d>) |
14:53:59 | Amun-Ra | both |
14:55:04 | Amun-Ra | I finally finished part of JS target of my retro image viewer \o/ |
14:55:41 | FromDiscord | <MDuardo> You have a repo? |
14:55:43 | Amun-Ra | nim 2.0 bigint support was major step to success |
14:55:53 | Amun-Ra | not yet |
14:56:37 | Amun-Ra | MDuardo: beta tests for image identification (a'la fileutils): https://retro.rocks/work/ridentify/ |
14:56:54 | FromDiscord | <MDuardo> Well, please share it with us when you do it |
14:56:57 | Amun-Ra | MDuardo: and the browser looks like this: https://retro.rocks/ronin/ |
14:57:32 | Amun-Ra | sure, I'll release it this year (I need to clean the code - it's my first nim project) |
15:01:00 | FromDiscord | <kiloneie> Im lost, can you put into a config.nims file what file to compile and how ? How does one do that, been looking at the compiler usage page but... |
15:03:12 | FromDiscord | <Phil> My cold is claiming me, I'm going to sleep. If I am needed... expect me not for the next 4h |
15:03:12 | FromDiscord | <MDuardo> See you Phil |
15:03:12 | FromDiscord | <MDuardo> Kiloneie (Kiloneie) I don't know, sorry \:( |
15:04:44 | Amun-Ra | kiloneie: you can put any switch/define you like |
15:07:35 | * | FromDiscord quit (Ping timeout: 252 seconds) |
15:07:59 | * | FromDiscord joined #nim |
15:21:27 | FromDiscord | <leorize> you can just put them as is in nim.cfg |
15:21:52 | * | wheatengineer quit (Quit: Leaving) |
15:31:10 | FromDiscord | <kiloneie> is there a page with differences on nim.cfg vs config.nims ? i found extremely little. |
15:38:34 | FromDiscord | <leorize> config nims is nimscript |
15:38:36 | FromDiscord | <leorize> nim cfg is just an ini derivative |
15:38:36 | FromDiscord | <leorize> the latter is faster |
15:42:17 | FromDiscord | <kiloneie> okay |
16:04:47 | Amun-Ra | you can find both of these files (iirc) in nim directory |
16:10:26 | FromDiscord | <nasuray> In reply to @kiloneie "is there a page": https://nim-lang.org/docs/nimc.html#compiler-usage-configuration-files↵https://nim-lang.org/docs/nims.html |
16:28:15 | FromDiscord | <lasxxxx> #main |
16:28:54 | FromDiscord | <tsoj> Is there a way to get the available RAM of the system a nim program is running on? |
16:32:17 | * | zgasma joined #nim |
16:34:31 | * | zgasma quit (Client Quit) |
16:36:33 | Amun-Ra | nothing in standard library |
16:37:10 | Amun-Ra | this is very OS dependent, too |
16:40:24 | FromDiscord | <djazz> In reply to @Elegantbeef "I'm still absolutely baffled": Sonic R OST is my jam. |
17:06:37 | * | rockcavera joined #nim |
17:31:46 | * | jmdaemon joined #nim |
17:36:14 | FromDiscord | <odinshat> I have it on good authority that Nim devs don't like Python devs. Discuss... |
17:36:19 | * | jmdaemon quit (Ping timeout: 268 seconds) |
17:39:55 | FromDiscord | <MDuardo> Nah. I'm good with them↵Python is just a bit slow for some purposes |
17:42:05 | * | rockcavera quit (Ping timeout: 240 seconds) |
17:43:23 | FromDiscord | <odinshat> > Nim forum don't like people mentioning python , where nim had a lot of features from Python . Araq himself say that several time to python refugees.↵> https://www.reddit.com/r/ProgrammingLanguages/comments/10hu5md/comment/j7qzf0h/?context=3 |
17:44:00 | FromDiscord | <odinshat> Not sure who Araq is but sounds like he's been shooting Python devs with a crossbow from the parapet of Nim forums. |
17:44:56 | Amun-Ra | I can't say I'm a python refugee, I haven't had performance issues with python |
17:45:12 | Amun-Ra | …but I don't write hello world benchmarks |
17:45:25 | FromDiscord | <inventormatt> Araw is the creator of nim. and I don't think he hates python devs more that python devs oftentimes need to unlearn bad habits of python |
17:49:44 | * | rockcavera joined #nim |
17:49:44 | * | rockcavera quit (Changing host) |
17:49:44 | * | rockcavera joined #nim |
17:50:45 | FromDiscord | <MDuardo> Andreas is a chill guy, he was inspired by Python and even the Nim website says so. And that's not a bad thingPython devs don't deserve the hate |
17:51:35 | * | xet7 quit (Remote host closed the connection) |
17:52:01 | FromDiscord | <odinshat> Who would win in a fight between Araq and Guido no weapons. Just barehand grappling & striking. |
17:54:21 | FromDiscord | <michaelb.eth> sent a long message, see <!doctype html> |
17:54:58 | FromDiscord | <MDuardo> German vs. Dutch... A tough fight |
17:55:34 | FromDiscord | <MDuardo> The joke is Python = bad↵(@michaelb.eth) |
17:55:47 | ehmry | the joke is python is named after a joke |
17:57:16 | ehmry | it's a joke all the way down |
17:57:21 | * | attah quit (Remote host closed the connection) |
17:58:17 | ehmry | python devs deserve hate, think of how much electricity gets wasted because python code monkeys were the cheap way to get something done |
17:59:12 | * | attah joined #nim |
17:59:58 | Amun-Ra | dev time vs exec time |
18:01:47 | * | via quit (Ping timeout: 264 seconds) |
18:01:53 | * | via joined #nim |
18:02:28 | Amun-Ra | almost all my utils are written in python, I prefer to save a few weeks of my dev time for a few ms of longer run time |
18:03:34 | FromDiscord | <Phil> That's a statement based on an impossible premise and thus I'll refute that wholeheartedly |
18:03:53 | Amun-Ra | which one? |
18:04:01 | FromDiscord | <Phil> ehmrys |
18:04:13 | Amun-Ra | I started learning nim to fill the gap I was missing with python |
18:04:31 | * | jmdaemon joined #nim |
18:04:59 | Amun-Ra | nim is an extremely flexible language, not bound to any libc like zig if one wants to |
18:05:41 | Amun-Ra | nim also allowes to write any bindings in a matter of minutes |
18:05:46 | FromDiscord | <expert> Hi chat |
18:05:47 | ehmry | Phil: you don't think an obscene amount of electrity is spent on trash code run by startups that are waiting to get acquired? |
18:05:57 | FromDiscord | <Phil> Sure in an ideal world, every code would be perfect and only take as much memory as they need.↵That is practically impossible. It is resource wise not in the cards that everybody is smart enough and proficient enough to do that and understand things well enough.↵Python is perfect there because it fills a nieche. It enables automation to happen in places where it would otherwise have not. It makes no sense to compare python vs. perfect C |
18:06:12 | FromDiscord | <MDuardo> Hi🤚 |
18:06:17 | Amun-Ra | Phil: and we should all write assembly to save the planet |
18:06:21 | FromDiscord | <Phil> In reply to @ehmry "<@180601887916163073>: you don't think": That was not the assertion. The assertion was that python bad and that is nonsense |
18:06:47 | Amun-Ra | I agree |
18:07:24 | ehmry | Phil: python is bad. the design is bad. it has a bunch of dumbass features that bolted on that don't make sense |
18:07:54 | Amun-Ra | #based |
18:07:55 | ehmry | if you look at the python design docs there are incoherent now because of all stuff slopped on top |
18:08:24 | FromDiscord | <expert> Does lang server work for anyone in nvim for nim? |
18:08:24 | FromDiscord | <expert> cant install it through mason in my case |
18:08:24 | FromDiscord | <MDuardo> Nope, there's a problem↵TreeSitter doesn't work either (at least on AstroNvim) |
18:08:26 | FromDiscord | <expert> doesn't work on lazyvim either |
18:08:37 | Amun-Ra | which python design you find the most bad, ehmry? |
18:08:46 | FromDiscord | <odinshat> Proof!↵(<@709044657232936960_ehmry=5b=49=52=43=5d>) |
18:08:53 | FromDiscord | <Phil> In reply to @ehmry "<@180601887916163073>: python is bad.": That is incorrect simply based on the fact that there's a ton of devs that could not have learned anything but python. |
18:08:57 | FromDiscord | <odinshat> Nim devs hate Python devs |
18:08:58 | FromDiscord | <Phil> In reply to @odinshat "Proof! (<@709044657232936960_ehmry=5b=49=52=43=5d>)": That guy is a new dude himself |
18:08:59 | ehmry | i've seen python docs saying python is object oriented like smalltalk, that's absolutely wrong, but it may have been right at some point |
18:09:11 | FromDiscord | <Phil> He's been here like what, a week or two IIRC |
18:09:28 | Amun-Ra | "object oriented" is a very loose term |
18:09:28 | FromDiscord | <Phil> If I go into the GO server and shout a bunch of nonsense does Go now represent that? |
18:09:44 | ehmry | lots of devs didn't have the option to learn anything else, because the people teaching them didn't know any better |
18:10:20 | ehmry | "object oriented" is a loose term because of drivel like python |
18:10:33 | FromDiscord | <MDuardo> See if there's an open issue |
18:10:34 | Amun-Ra | there are a few OO paradigms and I'm not aware of any langauge that has all of those |
18:10:48 | FromDiscord | <expert> I did post it on reddit |
18:10:49 | FromDiscord | <MDuardo> I would reply but I don't use Reddit |
18:10:50 | FromDiscord | <odinshat> Good lad. Cancerous website for only the diseased and debauced of society. |
18:10:52 | FromDiscord | <Phil> In reply to @ehmry "i've seen python docs": So? That has nothing to do with the assertion of python bad because wasteful.↵The alternative to much of python code is no code.↵That is literally worse. |
18:11:03 | ehmry | Phil: no code is not worse |
18:11:16 | Amun-Ra | I started programming at the uni writing pascal, I take python any day any time |
18:11:47 | FromDiscord | <nervecenter> I'm a former Python dev (academic) and write my Nim stylistically in a very Pythonic manner. However, semantically I write it in a very Lisp-ish manner. It works incredibly well and I don't think my Python experience hurt me in any way. Then again, I also avoided OO like the plague when using Python, so... |
18:12:02 | Amun-Ra | ehmry: not because of the python, it was that way way before py |
18:12:07 | FromDiscord | <Phil> In reply to @ehmry "<@180601887916163073>: no code is": Sure, not 100% of the time, but papertrails etc. are absolutely worse. They waste time and in the worst case a lot more resources, with often physical thing needing to be sent around which is definitely not a good idea |
18:12:33 | FromDiscord | <Phil> Either way, this is offtopic for #main .↵This goes into #offtopic . There are people actually wanting help with nim issues and this is none of them. |
18:12:49 | ehmry | fine |
18:12:57 | Amun-Ra | nervecenter: I come from C/py world, I tend to write nim more C-way than py-way |
18:13:10 | Amun-Ra | (but I target "weird" archs and platforms) |
18:13:16 | FromDiscord | <odinshat> This 🐍 vs 👑 battle is heating up |
18:13:31 | Amun-Ra | a duck? ;) |
18:13:49 | FromDiscord | <Phil> In reply to @odinshat "This 🐍 vs 👑": ... I know you like posting inflammatory things but this is starting to border on trolling. |
18:14:41 | Amun-Ra | Phil: speaking of #offtopic, is that discord exclusive? |
18:15:04 | FromDiscord | <MDuardo> Yeah. Is there an off-topic Nim room on Matrix? |
18:15:14 | FromDiscord | <mengu> IRC has #nim-offtopic iiirc |
18:15:21 | Amun-Ra | oh |
18:15:44 | FromDiscord | <Phil> It does, so no |
18:15:52 | FromDiscord | <Phil> Not discord exclusive |
18:16:13 | Amun-Ra | ack |
18:16:17 | FromDiscord | <expert> Depends on how you use it XD |
18:16:33 | FromDiscord | <MDuardo> I saw it but I don't use IRC that much, I still don't know how to make IRRSI connect automatically |
18:16:53 | FromDiscord | <nervecenter> In reply to @Amun-Ra "<@143177514385145856>: I come from": That's kind of how my procedural code is. But like I said, semantically I lean Lisp-like, so my code tends to be very expression-oriented and functional. The Python stuff is mainly stylistic, like 4-space tabs, snake_case, etc. |
18:16:56 | Amun-Ra | MDuardo: irssi → weechat |
18:17:30 | FromDiscord | <odinshat> Don't know how anyone can use Discord. Horrible. Enshittified and centralised IRC. |
18:17:32 | Amun-Ra | nervecenter: I'm a fan of whitespace indented syntax |
18:17:33 | FromDiscord | <nervecenter> (edit) "In reply to @Amun-Ra "<@143177514385145856>: I come from": That's kind of how my procedural code is. But like I said, semantically I lean Lisp-like, so my code tends to be very expression-oriented and functional. The Python stuff is mainly stylistic, like 4-space tabs, snake_case, etc. ... " added "I think it maximizes readability over any other style. Easy to do in C as well." |
18:18:00 | FromDiscord | <nervecenter> Same |
18:18:15 | FromDiscord | <mengu> In reply to @nervecenter "That's kind of how": I'm not the only one that feels Nim is actually kind of a Lisp rather than Python, right? |
18:18:17 | FromDiscord | <MDuardo> Leaving the Crown vs. Snake argument asideAny of you know to automatically set a custom title for the HTML generated by the Nim Markdown compiler? |
18:18:40 | Amun-Ra | nervecenter: I'm one of a few snake case nim programmers ;) I started using 2 space indents and it's already to late to switch to 4 space ones |
18:18:40 | FromDiscord | <zectbumo> In reply to @mengu "I'm not the only": waaay too few ))))))))))))) |
18:18:49 | FromDiscord | <nervecenter> In reply to @mengu "I'm not the only": You're not wrong, I was able to build the majority of my Nim program in the same way I'd build a Clojure program. |
18:19:05 | FromDiscord | <Phil (he/him)> TBF you gave it an hour 😅️↵↵Anyway, in regards to getting nimlangserver to work, the tooling channel (has the same icon/thumbnail as this one) might be slightly better.Either way, I can tell you I personally don't use either nimlangserver nor nimsuggest more generally. |
18:19:19 | * | azimut quit (Ping timeout: 240 seconds) |
18:19:46 | FromDiscord | <mengu> In reply to @zectbumo "waaay too few )))))))))))))": lisp is an idea, an exploration, an abstract 😄 |
18:19:52 | FromDiscord | <MDuardo> I like to name my files with snake\_case but I don't want the titles to be generatedlike\_this |
18:19:53 | FromDiscord | <mengu> (edit) "In reply to @zectbumo "waaay too few )))))))))))))": lisp is an idea, an exploration, an abstract ... 😄" added "not parens" |
18:20:03 | FromDiscord | <expert> alright XD |
18:20:24 | FromDiscord | <Phil (he/him)> You mean for docs? |
18:20:37 | FromDiscord | <MDuardo> Correct |
18:22:10 | FromDiscord | <Phil (he/him)> I don't think there's a flag for that, the doc compilation spits out what it spits out. The heading is always based on the file name (Since I assume you want to customize the heading of the entire doc file) |
18:22:47 | FromDiscord | <Phil (he/him)> I don't think the section names (imports, types, vars, procs etc.) can be customized either |
18:23:08 | FromDiscord | <MDuardo> Exactly |
18:23:49 | FromDiscord | <Phil (he/him)> You can add your own heading. I mean, using markdown or html it should show up accordingly |
18:24:08 | FromDiscord | <Phil (he/him)> But that's in addition to whats there, so more your own section heading in the module docs |
18:24:10 | FromDiscord | <MDuardo> sent a code paste, see https://play.nim-lang.org/#ix=html> |
18:24:31 | FromDiscord | <MDuardo> The only way is to change the HTML after being generated |
18:24:41 | FromDiscord | <MDuardo> Apparently |
18:25:46 | FromDiscord | <Phil (he/him)> Personally I never had a need, because I was fine with just writing a bunch of module docsthat have their own headings and for the sections describing code you have the same headings always.↵Keeps it consistent and all that jazz |
18:29:55 | FromDiscord | <MDuardo> Is all on? https://nim-lang.org/docs/docgen.html |
18:31:54 | FromDiscord | <Phil> That is all I know of |
18:33:24 | * | xet7 joined #nim |
18:40:18 | FromDiscord | <Phil (he/him)> Alrighty, time to see if I can't slap some atomics into the channel implementation |
18:51:38 | FromDiscord | <kiloneie> Why does:↵`discard execShellCmd(command)` with command being for example "nim c -r filename" compile the targeted program, but not run it ? |
18:51:49 | FromDiscord | <kiloneie> wait |
18:52:09 | FromDiscord | <kiloneie> nevermind |
18:52:29 | FromDiscord | <kiloneie> the program actually has to output something lol |
18:52:57 | Amun-Ra | ;) |
19:12:29 | * | azimut joined #nim |
19:16:19 | * | Batzy_ quit (Ping timeout: 256 seconds) |
19:26:44 | * | tiorock joined #nim |
19:26:44 | * | tiorock quit (Changing host) |
19:26:44 | * | tiorock joined #nim |
19:26:45 | * | rockcavera quit (Killed (tantalum.libera.chat (Nickname regained by services))) |
19:26:45 | * | tiorock is now known as rockcavera |
19:35:01 | * | rockcavera quit (Remote host closed the connection) |
19:35:14 | FromDiscord | <kiloneie> sent a long message, see <!doctype html> |
19:39:38 | FromDiscord | <Phil> You do all flags before the file |
19:39:41 | FromDiscord | <Phil> Always |
19:39:55 | FromDiscord | <Phil> so `nim c -r --hints:off nimFile` |
19:40:09 | FromDiscord | <Phil> its nim <command> <flags> <nimFile> |
19:42:07 | FromDiscord | <kiloneie> i literally just closed a tab and my first one was on this page: https://nim-by-example.github.io/hello_world/ |
19:42:13 | FromDiscord | <kiloneie> with the same answer D: |
19:42:34 | FromDiscord | <kiloneie> yeh, don't work on an empty stomach... |
19:54:35 | * | jmdaemon quit (Ping timeout: 264 seconds) |
19:56:37 | * | jmdaemon joined #nim |
20:02:01 | * | jmdaemon quit (Ping timeout: 246 seconds) |
20:10:57 | * | khazakar quit (Quit: Connection closed for inactivity) |
20:17:48 | * | azimut quit (Remote host closed the connection) |
20:18:55 | * | azimut joined #nim |
20:23:16 | * | azimut quit (Remote host closed the connection) |
20:23:37 | * | azimut joined #nim |
20:43:09 | * | rockcavera joined #nim |
20:44:05 | entikan | how do I reverse a seq in place? |
20:44:58 | FromDiscord | <fosster> hi guys, is everyone using (or has used) nimterop to create c++ bindings in nim? |
20:45:06 | Amun-Ra | entikan: reverse from std/algorithm |
20:45:26 | Amun-Ra | fosster: yes |
20:45:42 | FromDiscord | <odinshat> https://nim-lang.org/docs/algorithm.html#reverse%2CopenArray%5BT%5D%2CNatural%2CNatural↵(<@709044657232936960_entikan=5b=49=52=43=5d>) |
20:45:56 | FromDiscord | <fosster> basically i can't add it to my project bc it fails to build |
20:46:07 | Amun-Ra | entikan: https://nim-lang.org/docs/algorithm.html#reverse%2CopenArray%5BT%5D |
20:46:31 | FromDiscord | <fosster> `rror: unhandled exception: shell.nim(90, 7) 'not die' Command failed: 128 cmd: cd /home/puebla/.cache/nim/nimterop/nimterop/treesitter && git log --decorate --no-color -n 1 --format=oneline result: fatal: your current branch 'master' does not have any commits yet [AssertionDefect]` |
20:46:51 | Amun-Ra | that doesn't look like interop related error |
20:46:51 | FromDiscord | <fosster> `error: unhandled exception: shell.nim(90, 7) 'not die' Command failed: 128 cmd: cd !/.cache/nim/nimterop/nimterop/treesitter && git log --decorate --no-color -n 1 --format=oneline result: fatal: your current branch 'master' does not have any commits yet [AssertionDefect]` |
20:47:34 | Amun-Ra | (I haven't used nimterop) |
20:48:03 | FromDiscord | <fosster> `error: unhandled exception: shell.nim(90, 7) 'not die' Command failed: 128 cmd: cd ~/.cache/nim/nimterop/nimterop/treesitter && git log --decorate --no-color -n 1 --format=oneline result: fatal: your current branch 'master' does not have any commits yet [AssertionDefect]` |
21:23:39 | entikan | thanks Amun-Ra |
22:42:08 | * | xet7 quit (Remote host closed the connection) |
22:47:24 | * | xet7 joined #nim |
23:09:06 | FromDiscord | <␀ Array 🇵🇸 🍉> sent a code paste, see https://play.nim-lang.org/#ix=html> |
23:17:24 | * | advesperacit quit () |
23:20:12 | FromDiscord | <␀ Array 🇵🇸 🍉> sent a code paste, see https://play.nim-lang.org/#ix=html> |
23:20:12 | FromDiscord | <Elegantbeef> Walkdir yields a tuple |
23:20:13 | FromDiscord | <Elegantbeef> You just attempt to iterate a tuple and there is no `items` iterator defined for a tuple value |
23:20:13 | FromDiscord | <Elegantbeef> You can use `fields` or `fieldPairs` to iterator a tuple value |
23:20:13 | FromDiscord | <␀ Array 🇵🇸 🍉> sent a code paste, see https://play.nim-lang.org/#ix=html> |
23:20:13 | FromDiscord | <Elegantbeef> But that'd yield `2` then `4` then `6` |
23:20:16 | FromDiscord | <␀ Array 🇵🇸 🍉> i understand now, thank you |
23:24:48 | NimEventer | New Nimble package! waku - Implementation of the Waku protocol, see https://github.com/waku-org/nwaku |
23:42:23 | * | xet7 quit (Quit: Leaving) |
23:56:17 | FromDiscord | <odinshat> Everyone back up and prepare yourselves... |
23:56:24 | FromDiscord | <odinshat> I've done Hello World from the tutorial and a Codewars kata on string reversal. I'm now an expert. ↵↵Any questions? |
23:56:47 | FromDiscord | <Phil (he/him)> Sure, how good are you at spotting data races with multithreading \:-P ? |
23:57:50 | FromDiscord | <Elegantbeef> I cannot look at your name but say "Yea it's not that good" |
23:57:52 | * | Jjp137 quit (Quit: Leaving) |