<< 09-01-2024 >>

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:01FromDiscord<girvo> sent a long message, see <!doctype html>
02:08:40FromDiscord<Elegantbeef> Disruptek's frosty would work
02:08:49FromDiscord<Elegantbeef> Though you'd have to implement all the write logic
02:10:15FromDiscord<Elegantbeef> Though I imagine std/streams would also work
02:15:06*lucasta quit (Remote host closed the connection)
02:29:03FromDiscord<Elegantbeef> @girvo where, what, and what format do you want to serialise to? 😄
03:16:55*azimut quit (Ping timeout: 240 seconds)
03:20:23FromDiscord<girvo> okay i'll back up haha
03:22:00FromDiscord<girvo> sent a code paste, see https://play.nim-lang.org/#ix=html>
03:22:32FromDiscord<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:07FromDiscord<girvo> I wanna collect them up, and send them over the network over a TCP socket (encrypted, dw about that)
03:24:03FromDiscord<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:59FromDiscord<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:13FromDiscord<Elegantbeef> `addr buffer[0][0]` is horrendous
03:29:18FromDiscord<girvo> Oh absolutely lol
03:29:27FromDiscord<girvo> For a few reasons 😄
03:29:54FromDiscord<Elegantbeef> Use termer's stack string
03:29:59FromDiscord<Elegantbeef> 😄
03:30:33FromDiscord<girvo> haha thats somewhat orthogonal 😛 (though I have it in a branch already!)
03:32:18FromDiscord<Elegantbeef> Can you use std/streams/net?
03:32:44FromDiscord<girvo> Only reason I haven't is because I don't understand the memory model with respect to streams and heap allocaion
03:32:46FromDiscord<girvo> allocation
03:33:25FromDiscord<Elegantbeef> socket streams should allocate once
03:34:47FromDiscord<girvo> It doesn't realloc?
03:35:08FromDiscord<girvo> I would've expected it to, otherwise how does it grow if I was `write` some large amount of data?
03:35:25FromDiscord<Elegantbeef> Sends to the socket and let the OS handle it
03:35:30FromDiscord<girvo> Yeah about that
03:35:53FromDiscord<girvo> Actually I wonder what LwIP's buffer sizes are
03:41:04FromDiscord<girvo> Default send buffer size is 5744 bytes, it seems. At least thats how ESP-IDF configures it
03:43:59FromDiscord<Elegantbeef> Can always reduce it to a series of `len, str` 😄
03:45:23FromDiscord<girvo> I honestly am pretty close to that lol
03:46:11FromDiscord<girvo> the actual "message" that gets `socket.send()`-d is `| uint8 tag | uint16 length | bytes data .... |`
03:48:59FromDiscord<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:50FromDiscord<Elegantbeef> The reciving side loses lines though
03:53:49FromDiscord<girvo> In what way?
03:53:56FromDiscord<girvo> It'll truncate yeah, if that's what you mean
03:55:50FromDiscord<girvo> always going to be a trade off on this, and minimizing heap fragmentation on the sender side takes precedence
03:58:18FromDiscord<Elegantbeef> use an `(int, array[x, stackstring])` ;D
04:05:10FromDiscord<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:30FromDiscord<girvo> I'll have a play with it properly
04:06:03FromDiscord<Elegantbeef> It's a value type so it's stored contiguously
04:16:52FromDiscord<4zv4l> stackstring sounds very bad xD
04:17:01FromDiscord<4zv4l> x is constant tho right ?
04:17:09FromDiscord<4zv4l> (edit) removed "tho"
04:17:10FromDiscord<Elegantbeef> It is
04:17:12FromDiscord<Elegantbeef> Stack strings are grand
04:17:23FromDiscord<Elegantbeef> Static sized slightly growable strings
04:28:51*rockcavera quit (Remote host closed the connection)
04:33:21FromDiscord<zectbumo> sent a code paste, see https://play.nim-lang.org/#ix=html>
04:33:38FromDiscord<Elegantbeef> `T: static file`
04:37:33FromDiscord<zectbumo> I'm getting things like Error: cannot instantiate: 'print[stdout]'
04:38:00FromDiscord<zectbumo> or Error: cannot evaluate at compile time: stdout
04:39:07FromDiscord<Elegantbeef> Right file is a runtime value
04:39:10FromDiscord<Elegantbeef> use an enum to wrap them
04:58:18*flouer quit (Ping timeout: 256 seconds)
05:01:45*flouer joined #nim
05:03:16FromDiscord<girvo> In reply to @4zv4l "stackstring sounds very bad": Come work without a memory management unit and say that 😉
05:04:14FromDiscord<4zv4l> oh embedded ?
05:08:27FromDiscord<zectbumo> In reply to @Elegantbeef "use an enum to": too advanced. I failed. can you give me a hint?
05:09:59FromDiscord<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:10FromDiscord<demotomohiro> sent a code paste, see https://play.nim-lang.org/#ix=html>
05:21:45FromDiscord<Elegantbeef> sent a code paste, see https://play.nim-lang.org/#ix=html>
05:21:52FromDiscord<Elegantbeef> You cannot have a `[T: ... = ...]`
05:23:00FromDiscord<Elegantbeef> sent a code paste, see https://play.nim-lang.org/#ix=html>
05:28:29termergirvo, If you end up using the stack_strings library, let me know if you have any questions
05:28:45termerThe memory is continuous and has a capacity known at compile time
05:28:53termerit's stored on the stack so you don't have to worry about heap at all
05:28:54FromDiscord<Elegantbeef> Yea send all your hate mail to termer
05:28:59termerthat's right
05:29:08FromDiscord<Elegantbeef> Stop saying "stored on the stack"
05:29:14FromDiscord<Elegantbeef> Let's start saying "it's a value type" more! 😄
05:29:25termerwell that's not as marketable, now is it?
05:29:33termerbut yeah I agree with you
05:29:38FromDiscord<Elegantbeef> Saying "it's stored on the stack" causes people to think "All things are on the stack"
05:29:53termerheap isn't on the stack
05:30:03termerpointers to the heap are though
05:30:05FromDiscord<Elegantbeef> I've seen people scared about using `seq[T]` with value objects
05:30:05termerusually
05:30:12termeroh I see what you're saying
05:30:42termerYeah, "value type" is better terminology
05:30:49termeraka a type you don't have to dereference to use
05:31:33FromDiscord<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:41FromDiscord<odexine> whats the antonym again was it reference type or smth
05:31:50termeryes
05:32:33termervalue types and reference types, but you can also technically have references to value types
05:32:55termerand the type that encompass the reference to the value type would be considered a reference type
05:33:04termerat the end of the day, you have values and pointers to values
05:34:10FromDiscord<odexine> ~~i know i just forget the terminology, fun because it fits your name you termer~~
05:34:42FromDiscord<zectbumo> sent a code paste, see https://play.nim-lang.org/#ix=html>
05:35:16FromDiscord<zectbumo> sent a code paste, see https://play.nim-lang.org/#ix=html>
05:35:31FromDiscord<Elegantbeef> https://forum.nim-lang.org/t/10858
05:35:50termerodexine My name means nothing but that does fit it if you retroactively add meaning to it lol
05:35:51FromDiscord<zectbumo> # just do it
05:35:52FromDiscord<Elegantbeef> Let's see how hard it is
05:36:38termerElegantbeef, `So implement it. ;-)`
05:36:51termera reply even more annoying than the post title
05:37:32FromDiscord<zectbumo> annoying begets annoying
05:38:37termerI wonder how the Status tooling work is going
05:38:40termerand IC
05:38:48FromDiscord<zectbumo> wait, that post was just 1d ago
05:38:50FromDiscord<Elegantbeef> Seems like it's quite simple
05:38:52FromDiscord<Elegantbeef> Like 1 or 2 lines of code
05:39:40FromDiscord<zectbumo> In reply to @Elegantbeef "https://forum.nim-lang.org/t/10858": btw, how did you find this with this horrible title?
05:39:54FromDiscord<Elegantbeef> It was 1 day ago
05:40:05FromDiscord<Elegantbeef> I might be an idiot but I can remember 1 day
05:40:13FromDiscord<zectbumo> do you read everything?
05:40:32FromDiscord<odexine> oh its this post lol
05:40:51FromDiscord<odexine> In reply to @zectbumo "do you read everything?": not that hard, there arent many forum posts every day
05:41:00FromDiscord<Elegantbeef> I avoid anything that is uninteresting
05:41:54termerI view them when I'm waiting for something and only have my phone
05:42:20FromDiscord<zectbumo> I should get into that habit
05:42:22termerDid you guys see that "Ode to my goddess Nim" post
05:42:30FromDiscord<Elegantbeef> Damn it's quite literally 2 lines of code
05:42:32termerThat shit was the funniest thing I ever read on that forum
05:43:11FromDiscord<zectbumo> ^done^
05:44:06FromDiscord<zectbumo> ###### let's see it
05:46:04FromDiscord<Elegantbeef> sent a code paste, see https://play.nim-lang.org/#ix=html>
05:46:07FromDiscord<Elegantbeef> We did it
05:46:32FromDiscord<Elegantbeef> Whoops bad diff
05:46:40FromDiscord<Elegantbeef> sent a code paste, see https://play.nim-lang.org/#ix=html>
05:46:44FromDiscord<Elegantbeef> God damn it
05:46:48FromDiscord<Elegantbeef> Ok take the keyboard away
05:47:01FromDiscord<Elegantbeef> sent a code paste, see https://play.nim-lang.org/#ix=html>
05:48:10FromDiscord<Elegantbeef> Apply that diff on your own branch and then add tests then PR... mmmk
05:48:19FromDiscord<zectbumo> on it
05:49:34FromDiscord<Elegantbeef> sent a code paste, see https://play.nim-lang.org/#ix=html>
05:49:39FromDiscord<Elegantbeef> It presently errors something horrendous
05:49:46FromDiscord<Elegantbeef> `Error: type mismatch: got 'string' for 'string' but expected 'GenericParam'`
05:51:12FromDiscord<Elegantbeef> But it does work
05:51:12FromDiscord<Elegantbeef> image.png https://media.discordapp.net/attachments/371759389889003532/1194156399408726016/image.png?ex=65af53cf&is=659cdecf&hm=430d5cbf70a7e5d133f319ba129325a4acaf02c488a67cecb96f4d097000094f&
05:52:28FromDiscord<odexine> In reply to @termer "Did you guys see": god
05:52:30FromDiscord<odexine> please no
05:52:52FromDiscord<Elegantbeef> I was too busy spooning the sand to read
05:55:47termerodexine, Did you see the poster's reply on an unrelated thread about his thread being locked?
05:55:54FromDiscord<odexine> what no i didnt
05:55:56FromDiscord<odexine> whihc one
05:56:01termerHe was claiming that nobody seems to appreciate beauty in programming
05:56:13termerand saying that "golden shower" was a poor choice of words, "golden rain" would have been better
05:57:06termerThe 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:27FromDiscord<odexine> words i thought i would never read
06:00:34FromDiscord<odexine> in the same sentence
06:01:17FromDiscord<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:10FromDiscord<odexine> jokingly?
06:06:30FromDiscord<Elegantbeef> Indeed
06:08:14FromDiscord<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:08FromDiscord<Elegantbeef> @zectbumo I do have to ask was that "on it" a joke or what?
06:09:47FromDiscord<zectbumo> no, or is the task bigger than I think?
06:10:02FromDiscord<Elegantbeef> I do not think it's much bigger
06:10:22FromDiscord<Elegantbeef> With the `T: int or float = string` you will want to make that make sense
06:11:00FromDiscord<Elegantbeef> How to do that is a good intro to the compiler 😄
06:11:12FromDiscord<zectbumo> so you are telling me I need a new diff
06:11:44FromDiscord<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:04FromDiscord<zectbumo> I probably can look up another place where they check for or
06:12:25FromDiscord<Elegantbeef> I mean just run the code with `koch temp c yourtest.nim`
06:12:39FromDiscord<Elegantbeef> It'll print out a stack you go to the last place and see if you can improve this specific case
06:12:57FromDiscord<zectbumo> k
06:13:23FromDiscord<Elegantbeef> It'd probably be like `if theType.kind == tyGenericParam: theType = theType.n.typ` or thereabouts
06:14:19FromDiscord<Elegantbeef> This is a relatively good first issue since it's a relatively simple feature addition
06:20:44FromDiscord<Elegantbeef> In fact it's another one line fix
06:20:56FromDiscord<Elegantbeef> `Error: type mismatch: got 'string' for 'string' but expected 'int or float'` 😄
06:44:57FromDiscord<zectbumo> I'm still compiling
06:54:53FromDiscord<Elegantbeef> I take my cpu for granted I guess 😄
06:55:31*antranigv quit (Ping timeout: 276 seconds)
06:56:48FromDiscord<Robyn [She/Her]> What are you compiling?↵(@zectbumo)
06:57:03FromDiscord<zectbumo> nim
06:57:09FromDiscord<Elegantbeef> Take your finger out and re read the entire conversation
06:57:15FromDiscord<Robyn [She/Her]> Ah that makes sense
06:57:20FromDiscord<Elegantbeef> This was as straight forward as a runway
06:57:30FromDiscord<Robyn [She/Her]> I just woke up and I'm too tired so nah
06:58:37FromDiscord<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:00FromDiscord<Elegantbeef> pity\
06:59:09FromDiscord<Robyn [She/Her]> Pitty
06:59:27FromDiscord<Elegantbeef> Piddy
07:02:42FromDiscord<zectbumo> I did build_all.sh
07:03:02FromDiscord<Elegantbeef> You now have all the tooling
07:03:10FromDiscord<zectbumo> maybe I should have just done koch?
07:03:15FromDiscord<Elegantbeef> In reality you only really needed to build `koch` 😄
07:03:20FromDiscord<Elegantbeef> Yep
07:03:35FromDiscord<Elegantbeef> Anyway now that you have koch you can get to compiler dev
07:03:46FromDiscord<Elegantbeef> It's very simple you just do `./koch temp ...` and pretend that is `nim`
07:04:10FromDiscord<zectbumo> I've used koch once. I forget why
07:04:21FromDiscord<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:02FromDiscord<Elegantbeef> Technically `-d:danger` would make tests faster, but you do not want unchecked behaviour to get through
07:05:48FromDiscord<zectbumo> and we are assuming that all tests currently pass?
07:06:13FromDiscord<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:48FromDiscord<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:14FromDiscord<nnsee> In reply to @termer "Did you guys see": seen, screenshotted, shared in the group DM
07:32:27FromDiscord<nnsee> someone said "least deranged Nim programmer"
07:34:08FromDiscord<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:57FromDiscord<zectbumo> lol, compile just finished. zzz
08:27:18*antranigv_ joined #nim
08:29:11*antranigv quit (Ping timeout: 256 seconds)
08:41:45FromDiscord<odexine> In reply to @nnsee "someone said "least deranged": are they wrong
08:45:36*azimut joined #nim
08:55:19FromDiscord<4zv4l> is this project dead https://ratel.peterme.net/↵I dont see much update on the github repo
08:56:39FromDiscord<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:52FromDiscord<4zv4l> (edit) "vage↵>" => "↵>"
08:57:54FromDiscord<Elegantbeef> Yea pmunch your project is dead
08:58:09FromDiscord<Elegantbeef> Fuck do I hate people
08:58:46FromDiscord<Phil (he/him)> Chiiiiilllll
08:59:13FromDiscord<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:16FromDiscord<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:39FromDiscord<4zv4l> I mean↵I would love to see this page with the help 🥹 ↵https://ratel.peterme.net/implementboard.html
09:00:50FromDiscord<Phil (he/him)> I'm pretty sure the same counts for PMunch who is literally active here.
09:01:36FromDiscord<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:52FromDiscord<Elegantbeef> Given that pmunch shills ratel, it's probably still 'alive'
09:04:52FromDiscord<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:23FromDiscord<Phil> That is very much a question for the secret super hero I summon whenever somebody brings up either futhark or ratel
09:07:29FromDiscord<graveflo> sent a code paste, see https://play.nim-lang.org/#ix=html>
09:07:29FromDiscord<Phil> @pmunch , I choose you!
09:07:47FromDiscord<Elegantbeef> `let`
09:07:54FromDiscord<graveflo> let bad?
09:08:01FromDiscord<Elegantbeef> `let` not `const`
09:08:10FromDiscord<Elegantbeef> `let` no worky at CT
09:08:13FromDiscord<graveflo> 😦 so simple
09:12:17FromDiscord<Phil> the irony is that if that were a runtime exception you'd be fine
09:12:27FromDiscord<Phil> But error pragma is compiletime so your text got to be compiletime too
09:13:57FromDiscord<Elegantbeef> PS you can use `%` inside templates
09:14:02FromDiscord<graveflo> it all has to happen at compile time anyway. I just have to stop thinking about templates like they are macros
09:14:20FromDiscord<graveflo> I don't even know that `%` does anyway
09:14:21FromDiscord<Phil> Templates are kinda like weaksauce quote-do or genast
09:14:30FromDiscord<Elegantbeef> `"""Hello $#, is $# easier $#""" % ["world", "soooo", "easier"]`
09:14:30FromDiscord<Phil> If you squint
09:15:19FromDiscord<Phil> I'll be honest, not a fan of % based format strings
09:15:29FromDiscord<graveflo> yea I don't like that at all
09:15:38FromDiscord<Phil> Just don't like the pattern of first define string pattern, then define values that go into the placeholders
09:15:39FromDiscord<Elegantbeef> I mean inside templates it's much better than string concatenation
09:15:49FromDiscord<Elegantbeef> But why arent you just using a proc here
09:15:54FromDiscord<Elegantbeef> The real question
09:16:16FromDiscord<graveflo> like `static: callMe()` ?
09:16:18FromDiscord<graveflo> idk
09:16:22FromDiscord<Elegantbeef> Nope
09:16:24FromDiscord<Phil> The real question is why the entire thing isn't called `validateFeature()`
09:16:36FromDiscord<Phil> Since this is compiletime validation
09:16:43FromDiscord<Elegantbeef> `proc name(....) = when(...) {.error: ....}`
09:16:59FromDiscord<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:11FromDiscord<Phil> In reply to @graveflo "the feature is valid": `validateFeatureSupport`
09:17:27FromDiscord<Phil> for this kind of stuff validate will always be my key word
09:17:27FromDiscord<graveflo> In reply to @Elegantbeef "`proc name(....) = when(...)": it's not checked on a per proc basis. This happens at module import
09:17:43FromDiscord<Elegantbeef> Grave something has to invoke the template
09:17:53FromDiscord<Elegantbeef> Instead of invoking the template invoke the proc
09:17:53FromDiscord<graveflo> yea it's at module level
09:18:06FromDiscord<Phil> But then do the proc call on the module-level
09:18:15FromDiscord<graveflo> I would have to run the proc statically for it to happen at compile time right?
09:18:23FromDiscord<Elegantbeef> No it's a `when`
09:18:34FromDiscord<Elegantbeef> If the `when` passes the `error` is emitted
09:18:39FromDiscord<Elegantbeef> Which means the program crashes
09:18:46FromDiscord<Elegantbeef> At compile time
09:18:54FromDiscord<Phil> Basically "error" crashes your program if the compiler ever sees it past the when-evaluation stage
09:19:05FromDiscord<Phil> well, crashes your compilation of your program
09:19:17FromDiscord<Elegantbeef> sent a code paste, see https://play.nim-lang.org/#ix=html>
09:19:18FromDiscord<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:25FromDiscord<Phil> It does not matter the flow of execution or what not. If It's there, compiler die
09:19:26FromDiscord<Elegantbeef> It would run at runtime
09:19:37FromDiscord<Elegantbeef> But there is no body so it's a no op and will be optimised out
09:19:41FromDiscord<graveflo> well it won't but thats how it works
09:20:06FromDiscord<graveflo> again just jumping through multiple hoops for no reason. Template has the mechanics that fit this type of thing better
09:20:24FromDiscord<Phil> ... but it's the same... oh well
09:20:29FromDiscord<Elegantbeef> Not really jumping through any hoops 😄
09:20:39FromDiscord<Elegantbeef> Getting strformatting to work!
09:21:11FromDiscord<odexine> technically youre jumping through more hoops by using templates for no good reason when a proc would work no?
09:21:16FromDiscord<Elegantbeef> Infact the `template` and `proc` have the exact same error message
09:21:19FromDiscord<Elegantbeef> Rika is right
09:21:28FromDiscord<Elegantbeef> You've dropped down in abstraction for no reason
09:22:10FromDiscord<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:21FromDiscord<Phil> every steep
09:22:32FromDiscord<graveflo> you guys are weird
09:22:43FromDiscord<Phil> This is mostly argumenting on principle imo, I'll admit
09:22:49FromDiscord<odexine> yeah
09:22:58FromDiscord<Phil> Promoting good habits and all that
09:23:03FromDiscord<odexine> it doesnt really matter that much, you do you, just sayin tho
09:23:24FromDiscord<graveflo> that's the kind of habit that you use to avoid doing dumb stuff not stuff that makes sense
09:23:29FromDiscord<pmunch> In reply to @isofruit "<@392962235737047041> , I choose": PMunch PMunch!
09:23:53FromDiscord<Elegantbeef> sent a code paste, see https://play.nim-lang.org/#ix=html>
09:24:12FromDiscord<Elegantbeef> whoops `: fmt"""`
09:24:20FromDiscord<Phil> In reply to @4zv4l "is there any draft": Ratel was brought up PMunch, see here
09:24:39FromDiscord<graveflo> yea `fmt` is better
09:24:53FromDiscord<Elegantbeef> all those `\"` are also useless
09:24:54FromDiscord<Phil> No need for the backslashing of " anymore though 😄
09:25:01FromDiscord<Elegantbeef> too slow phil
09:25:12FromDiscord<Phil> Curse you Sonic!
09:25:29FromDiscord<Elegantbeef> SOOOOOONIIIIIIC HEEEEEEERRROOOOES
09:26:11FromDiscord<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:07FromDiscord<Elegantbeef> I'm still absolutely baffled about the sonic heroes OST 😄
09:29:51FromDiscord<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:21FromDiscord<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:06FromDiscord<khazakar> But also having web hosted docs explaining what to do + encouragement to send PRs with new boards would be best 😛
09:52:30FromDiscord<Phil> I encourage everyone that writes a lib to write introductory and reference docs, but it is a decent chunk of work
09:53:05FromDiscord<Phil> (edit) "docs," => "docs (there's a reason I have docs for writing and hosting docs on github),"
09:54:35FromDiscord<Elegantbeef> Writing docs is for nerds
09:54:39FromDiscord<Elegantbeef> Just intuit the code
09:54:45FromDiscord<Phil> You write code, you are a nerd
09:55:27FromDiscord<Elegantbeef> A who?
09:56:40*wheatengineer joined #nim
10:27:31FromDiscord<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:59FromDiscord<Phil> Sure but that entirely depends on the mentality with which you make a project public
10:28:01FromDiscord<khazakar> Just like without any commit, even simple readme update, for half month+
10:28:05FromDiscord<Phil> Could be that you're just doing it as a courtesy
10:29:02FromDiscord<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:25FromDiscord<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:16FromDiscord<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:05FromDiscord<khazakar> When using Nim, I'm unlearning such behavior 🙂
10:33:10FromDiscord<Phil> Sure, but that is an impossible ask for anyone that's not a massive language
10:33:26FromDiscord<khazakar> Somehow those languages took off, right? 😃
10:33:31FromDiscord<Phil> So it's not that useful to bring up, outside of my writing a workflow to produce dummy commits
10:33:43FromDiscord<Phil> But not because people made biweekly dummy commits
10:33:58FromDiscord<khazakar> Even once in few months is fine to be fair
10:34:23FromDiscord<Phil> If it works, it is worthwhile.
10:34:48FromDiscord<khazakar> Current OSS space is weird in this regard, attention span is short like tiktok clips
10:38:58FromDiscord<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:25FromDiscord<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:12FromDiscord<nnsee> db_connector/db_postgres is blocking, which is unacceptable for an async web service
11:13:27FromDiscord<khazakar> Pg / asyncpg?
11:14:02FromDiscord<nnsee> asyncpg doesn't seem to compile, pg is... very barebones and somewhat dubious.
11:15:02FromDiscord<nnsee> asyncpg doesn't even compile for nim 0.19.0, lol https://github.com/cheatfate/asyncpg/pull/8
11:20:18FromDiscord<khazakar> Kek
11:20:41FromDiscord<nnsee> I guess I'll just use db_postgres for the time being...
11:21:16FromDiscord<Phil (he/him)> There was a suggestion to add async pg support to postgres
11:21:28FromDiscord<Phil (he/him)> Ah , wait now
11:21:32FromDiscord<Phil (he/him)> To lowdb, not postgres, argh
11:21:49FromDiscord<Phil (he/him)> But the amount of work involved made it very much a "not me" thing
11:22:47FromDiscord<Phil (he/him)> (For reference, norm was built on ndb, which did no longer receive maintenance so I forked it)
11:28:55FromDiscord<khazakar> Eventually try https://github.com/itsumura-h/nim-allographer
11:31:28FromDiscord<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:02FromDiscord<nnsee> In reply to @khazakar "Eventually try https://github.com/itsumura-h/nim-al": neat
11:35:09FromDiscord<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:33FromDiscord<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:14FromDiscord<Phil> In reply to @nnsee "i ended up vendoring": Ras, you know about tsan, right?
13:36:06FromDiscord<khazakar> In reply to @nnsee "i ended up vendoring": Why bot making PRs out of some of the changes? 😃
13:38:06FromDiscord<nnsee> In reply to @isofruit "Ras, you know about": a little bit, sure
13:38:17FromDiscord<Phil> Ever used no_sanitize?
13:38:17FromDiscord<nnsee> In reply to @khazakar "Why bot making PRs": maybe, if I get the time
13:38:26FromDiscord<nnsee> In reply to @isofruit "Ever used no_sanitize?": yup
13:38:47FromDiscord<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:45FromDiscord<Phil> Wait, do you put no_Sanitize in a bash script ?
13:39:53FromDiscord<Phil> (edit) "no_Sanitize" => "no_sanitize"
13:40:16FromDiscord<nnsee> i've generally used it in `attribute` for specific funcs
13:40:24FromDiscord<nnsee> in nim I assume you can just `emit` it
13:40:52*antranigv_ is now known as antranigv
13:41:01FromDiscord<nnsee> see https://clang.llvm.org/docs/AttributeReference.html#no-sanitize
13:41:03FromDiscord<Phil> In reply to @nnsee "i've generally used it": So that is definitely something you write inside of C code?
13:41:32FromDiscord<Phil> I'm struggling to see where you're supposed to write the attribute stuff
13:41:44FromDiscord<Phil> I'm really only guessing when I say "doc comment in C code (?)"
13:42:56FromDiscord<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:17FromDiscord<nnsee> sent a code paste, see https://play.nim-lang.org/#ix=html>
13:43:22FromDiscord<odexine> attributes are like pragmas
13:43:25FromDiscord<Phil> Yeah I only want to apply it to 2 very specific function calls
13:43:31FromDiscord<odexine> for C, i mean, ofc
13:43:54FromDiscord<odexine> sent a code paste, see https://play.nim-lang.org/#ix=html>
13:43:56FromDiscord<Phil> sent a code paste, see https://play.nim-lang.org/#ix=html>
13:44:03FromDiscord<odexine> it depends per compiler so watch out ig
13:45:19FromDiscord<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:36FromDiscord<khazakar> In reply to @nnsee "maybe, if I get": Would be dope
13:45:54FromDiscord<Phil> Ohhh so it needs to be directly above the function.... wait how the heck would you even do this with nim
13:46:01FromDiscord<Phil> The function names get so garbled after compilation
13:48:19FromDiscord<nnsee> if you `emit` just before the proc does it not work?
13:48:32FromDiscord<Phil> Hmmmmm I'll see
13:51:23FromDiscord<Phil> You always emit that kind of stuff at global scope, not inside a proc, right?
13:51:52FromDiscord<nnsee> yes
13:52:30FromDiscord<Phil> sent a code paste, see https://play.nim-lang.org/#ix=html>
13:52:39FromDiscord<Phil> Hmmmm
13:52:52FromDiscord<Phil> (edit)
13:53:24FromDiscord<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:43FromDiscord<nnsee> or maybe you need to use the emit pragma in the proc signature itself?
13:53:54FromDiscord<nnsee> at this point i'm just guessing
14:00:24FromDiscord<Phil> sent a code paste, see https://play.nim-lang.org/#ix=html>
14:00:53FromDiscord<Phil> My procs nowhere in sight, attribute just randomly thrown in there
14:01:54FromDiscord<nnsee> i'd ask in #internals, araq probably knows
14:09:44FromDiscord<nnsee> sent a code paste, see https://play.nim-lang.org/#ix=html>
14:10:12FromDiscord<nnsee> i think
14:10:58FromDiscord<Phil> ~~Not in nim though+~
14:11:03FromDiscord<Phil> (edit) "though+~" => "though~~"
14:24:22FromDiscord<odinshat> Apparently Rust is better than Nim. Is that true?
14:25:14FromDiscord<Phil> Both have the same level of access to low-level operations, so eh
14:25:16FromDiscord<odexine> better in what sense? and what metric?
14:26:14FromDiscord<odinshat> But doesn't Nim require a garbage collector whereas Rust doesn't.
14:29:58FromDiscord<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:26FromDiscord<Phil> That is not even going into that you can also just straight up disable GC in the first place
14:30:36FromDiscord<Phil> (edit) "GC" => ""GC""
14:31:52FromDiscord<odinshat> If Nim is so good why wasn't Lemmy built in it?
14:32:13FromDiscord<odinshat> That's not a valid program. It's just a memory leak waiting to die,↵(@Phil)
14:32:20FromDiscord<Phil> In reply to @odinshat "If Nim is so": Because the creator decided not to?
14:32:53FromDiscord<MDuardo> Actually yes an no↵You can customize if you want a gc, reference counting, manual managemen, etc
14:32:59FromDiscord<MDuardo> https://nim-lang.org/docs/mm.html
14:33:11FromDiscord<odinshat> Rust is being used in Mozilla, Linux kernel and drivers, web, etc. Wheres Nim being used?↵(@Phil)
14:33:14FromDiscord<Phil> In reply to @odinshat "That's not a valid": Whatever you wish to believe.
14:33:34FromDiscord<Phil> In reply to @odinshat "Rust is being used": Are we about to play the "My backers are cooler than yours" game?
14:33:46FromDiscord<Phil> Because that is such a waste of my time that I'll leave the conversation
14:35:12FromDiscord<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:29FromDiscord<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:16FromDiscord<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:57FromDiscord<MDuardo> Godot bindings too
14:38:32FromDiscord<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:33FromDiscord<Phil> (edit) "secto" => "sector"
14:39:54FromDiscord<khazakar> In reply to @MDuardo "Godot bindings too": And Unreal Engine bindings. NimforUE or something like this
14:40:19FromDiscord<khazakar> And enu in case of more native way of approaching gamedev in nim 🙂
14:41:56FromDiscord<MDuardo> sent a long message, see <!doctype html>
14:44:30FromDiscord<odinshat> Does Nim support concurrency like Rust?
14:45:05FromDiscord<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:24FromDiscord<odinshat> I've developed in Python so I'm leaning towards Nim due to it's similar syntax. \:)
14:45:26FromDiscord<Phil> sent a long message, see <!doctype html>
14:46:12FromDiscord<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:25FromDiscord<odinshat> OK thanks. I'll get started on Nim. 👍
14:46:53FromDiscord<ringabout> And a promising one for ARC/ORC => https://github.com/mratsim/weave-io
14:46:59FromDiscord<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:20FromDiscord<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:28FromDiscord<MDuardo> Yeshttps://nim-by-example.github.io/concurrency/
14:47:30FromDiscord<Phil> Kinda like a websocket connection if you used those before
14:48:31FromDiscord<MDuardo> I tried some stuff with Rust, is really cool tooBut I'm not a fan of Cargo
14:48:47FromDiscord<Phil> For the most part I tried rust back when I was mostly a pythonista
14:49:16FromDiscord<MDuardo> Some projects have way too many Cargo depeniencies and gets kinda annoying to install all for a single program
14:49:32FromDiscord<MDuardo> How was it?↵(@Phil)
14:49:42FromDiscord<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:57FromDiscord<Phil> But then there's the compiletimes and the fact that rust projects have a tendency to absolutely balloon
14:50:06FromDiscord<Phil> Like we're talking half a gig when starting a web project
14:50:34FromDiscord<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:31FromDiscord<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:27FromDiscord<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:57FromDiscord<Phil> And the syntax is still not pleasant to look at, even with the gain in experience I've had since then.
14:53:06Amun-Ranot to mention average rust project dependency list looks pretty close to npm one
14:53:09FromDiscord<MDuardo> I'd rather use Go for Web development↵It's slim and simple↵(@Phil)
14:53:48FromDiscord<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:59Amun-Raboth
14:55:04Amun-RaI finally finished part of JS target of my retro image viewer \o/
14:55:41FromDiscord<MDuardo> You have a repo?
14:55:43Amun-Ranim 2.0 bigint support was major step to success
14:55:53Amun-Ranot yet
14:56:37Amun-RaMDuardo: beta tests for image identification (a'la fileutils): https://retro.rocks/work/ridentify/
14:56:54FromDiscord<MDuardo> Well, please share it with us when you do it
14:56:57Amun-RaMDuardo: and the browser looks like this: https://retro.rocks/ronin/
14:57:32Amun-Rasure, I'll release it this year (I need to clean the code - it's my first nim project)
15:01:00FromDiscord<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:12FromDiscord<Phil> My cold is claiming me, I'm going to sleep. If I am needed... expect me not for the next 4h
15:03:12FromDiscord<MDuardo> See you Phil
15:03:12FromDiscord<MDuardo> Kiloneie (Kiloneie) I don't know, sorry \:(
15:04:44Amun-Rakiloneie: 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:27FromDiscord<leorize> you can just put them as is in nim.cfg
15:21:52*wheatengineer quit (Quit: Leaving)
15:31:10FromDiscord<kiloneie> is there a page with differences on nim.cfg vs config.nims ? i found extremely little.
15:38:34FromDiscord<leorize> config nims is nimscript
15:38:36FromDiscord<leorize> nim cfg is just an ini derivative
15:38:36FromDiscord<leorize> the latter is faster
15:42:17FromDiscord<kiloneie> okay
16:04:47Amun-Rayou can find both of these files (iirc) in nim directory
16:10:26FromDiscord<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:15FromDiscord<lasxxxx> #main
16:28:54FromDiscord<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:33Amun-Ranothing in standard library
16:37:10Amun-Rathis is very OS dependent, too
16:40:24FromDiscord<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:14FromDiscord<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:55FromDiscord<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:23FromDiscord<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:00FromDiscord<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:56Amun-RaI can't say I'm a python refugee, I haven't had performance issues with python
17:45:12Amun-Ra…but I don't write hello world benchmarks
17:45:25FromDiscord<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:45FromDiscord<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:01FromDiscord<odinshat> Who would win in a fight between Araq and Guido no weapons. Just barehand grappling & striking.
17:54:21FromDiscord<michaelb.eth> sent a long message, see <!doctype html>
17:54:58FromDiscord<MDuardo> German vs. Dutch... A tough fight
17:55:34FromDiscord<MDuardo> The joke is Python = bad↵(@michaelb.eth)
17:55:47ehmrythe joke is python is named after a joke
17:57:16ehmryit's a joke all the way down
17:57:21*attah quit (Remote host closed the connection)
17:58:17ehmrypython 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:58Amun-Radev time vs exec time
18:01:47*via quit (Ping timeout: 264 seconds)
18:01:53*via joined #nim
18:02:28Amun-Raalmost 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:34FromDiscord<Phil> That's a statement based on an impossible premise and thus I'll refute that wholeheartedly
18:03:53Amun-Rawhich one?
18:04:01FromDiscord<Phil> ehmrys
18:04:13Amun-RaI started learning nim to fill the gap I was missing with python
18:04:31*jmdaemon joined #nim
18:04:59Amun-Ranim is an extremely flexible language, not bound to any libc like zig if one wants to
18:05:41Amun-Ranim also allowes to write any bindings in a matter of minutes
18:05:46FromDiscord<expert> Hi chat
18:05:47ehmryPhil: 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:57FromDiscord<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:12FromDiscord<MDuardo> Hi🤚
18:06:17Amun-RaPhil: and we should all write assembly to save the planet
18:06:21FromDiscord<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:47Amun-RaI agree
18:07:24ehmryPhil: python is bad. the design is bad. it has a bunch of dumbass features that bolted on that don't make sense
18:07:54Amun-Ra#based
18:07:55ehmryif you look at the python design docs there are incoherent now because of all stuff slopped on top
18:08:24FromDiscord<expert> Does lang server work for anyone in nvim for nim?
18:08:24FromDiscord<expert> cant install it through mason in my case
18:08:24FromDiscord<MDuardo> Nope, there's a problem↵TreeSitter doesn't work either (at least on AstroNvim)
18:08:26FromDiscord<expert> doesn't work on lazyvim either
18:08:37Amun-Rawhich python design you find the most bad, ehmry?
18:08:46FromDiscord<odinshat> Proof!↵(<@709044657232936960_ehmry=5b=49=52=43=5d>)
18:08:53FromDiscord<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:57FromDiscord<odinshat> Nim devs hate Python devs
18:08:58FromDiscord<Phil> In reply to @odinshat "Proof! (<@709044657232936960_ehmry=5b=49=52=43=5d>)": That guy is a new dude himself
18:08:59ehmryi'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:11FromDiscord<Phil> He's been here like what, a week or two IIRC
18:09:28Amun-Ra"object oriented" is a very loose term
18:09:28FromDiscord<Phil> If I go into the GO server and shout a bunch of nonsense does Go now represent that?
18:09:44ehmrylots of devs didn't have the option to learn anything else, because the people teaching them didn't know any better
18:10:20ehmry"object oriented" is a loose term because of drivel like python
18:10:33FromDiscord<MDuardo> See if there's an open issue
18:10:34Amun-Rathere are a few OO paradigms and I'm not aware of any langauge that has all of those
18:10:48FromDiscord<expert> I did post it on reddit
18:10:49FromDiscord<MDuardo> I would reply but I don't use Reddit
18:10:50FromDiscord<odinshat> Good lad. Cancerous website for only the diseased and debauced of society.
18:10:52FromDiscord<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:03ehmryPhil: no code is not worse
18:11:16Amun-RaI started programming at the uni writing pascal, I take python any day any time
18:11:47FromDiscord<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:02Amun-Raehmry: not because of the python, it was that way way before py
18:12:07FromDiscord<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:33FromDiscord<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:49ehmryfine
18:12:57Amun-Ranervecenter: I come from C/py world, I tend to write nim more C-way than py-way
18:13:10Amun-Ra(but I target "weird" archs and platforms)
18:13:16FromDiscord<odinshat> This 🐍 vs 👑 battle is heating up
18:13:31Amun-Raa duck? ;)
18:13:49FromDiscord<Phil> In reply to @odinshat "This 🐍 vs 👑": ... I know you like posting inflammatory things but this is starting to border on trolling.
18:14:41Amun-RaPhil: speaking of #offtopic, is that discord exclusive?
18:15:04FromDiscord<MDuardo> Yeah. Is there an off-topic Nim room on Matrix?
18:15:14FromDiscord<mengu> IRC has #nim-offtopic iiirc
18:15:21Amun-Raoh
18:15:44FromDiscord<Phil> It does, so no
18:15:52FromDiscord<Phil> Not discord exclusive
18:16:13Amun-Raack
18:16:17FromDiscord<expert> Depends on how you use it XD
18:16:33FromDiscord<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:53FromDiscord<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:56Amun-RaMDuardo: irssi → weechat
18:17:30FromDiscord<odinshat> Don't know how anyone can use Discord. Horrible. Enshittified and centralised IRC.
18:17:32Amun-Ranervecenter: I'm a fan of whitespace indented syntax
18:17:33FromDiscord<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:00FromDiscord<nervecenter> Same
18:18:15FromDiscord<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:17FromDiscord<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:40Amun-Ranervecenter: 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:40FromDiscord<zectbumo> In reply to @mengu "I'm not the only": waaay too few )))))))))))))
18:18:49FromDiscord<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:05FromDiscord<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:46FromDiscord<mengu> In reply to @zectbumo "waaay too few )))))))))))))": lisp is an idea, an exploration, an abstract 😄
18:19:52FromDiscord<MDuardo> I like to name my files with snake\_case but I don't want the titles to be generatedlike\_this
18:19:53FromDiscord<mengu> (edit) "In reply to @zectbumo "waaay too few )))))))))))))": lisp is an idea, an exploration, an abstract ... 😄" added "not parens"
18:20:03FromDiscord<expert> alright XD
18:20:24FromDiscord<Phil (he/him)> You mean for docs?
18:20:37FromDiscord<MDuardo> Correct
18:22:10FromDiscord<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:47FromDiscord<Phil (he/him)> I don't think the section names (imports, types, vars, procs etc.) can be customized either
18:23:08FromDiscord<MDuardo> Exactly
18:23:49FromDiscord<Phil (he/him)> You can add your own heading. I mean, using markdown or html it should show up accordingly
18:24:08FromDiscord<Phil (he/him)> But that's in addition to whats there, so more your own section heading in the module docs
18:24:10FromDiscord<MDuardo> sent a code paste, see https://play.nim-lang.org/#ix=html>
18:24:31FromDiscord<MDuardo> The only way is to change the HTML after being generated
18:24:41FromDiscord<MDuardo> Apparently
18:25:46FromDiscord<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:55FromDiscord<MDuardo> Is all on? https://nim-lang.org/docs/docgen.html
18:31:54FromDiscord<Phil> That is all I know of
18:33:24*xet7 joined #nim
18:40:18FromDiscord<Phil (he/him)> Alrighty, time to see if I can't slap some atomics into the channel implementation
18:51:38FromDiscord<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:49FromDiscord<kiloneie> wait
18:52:09FromDiscord<kiloneie> nevermind
18:52:29FromDiscord<kiloneie> the program actually has to output something lol
18:52:57Amun-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:14FromDiscord<kiloneie> sent a long message, see <!doctype html>
19:39:38FromDiscord<Phil> You do all flags before the file
19:39:41FromDiscord<Phil> Always
19:39:55FromDiscord<Phil> so `nim c -r --hints:off nimFile`
19:40:09FromDiscord<Phil> its nim <command> <flags> <nimFile>
19:42:07FromDiscord<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:13FromDiscord<kiloneie> with the same answer D:
19:42:34FromDiscord<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:05entikanhow do I reverse a seq in place?
20:44:58FromDiscord<fosster> hi guys, is everyone using (or has used) nimterop to create c++ bindings in nim?
20:45:06Amun-Raentikan: reverse from std/algorithm
20:45:26Amun-Rafosster: yes
20:45:42FromDiscord<odinshat> https://nim-lang.org/docs/algorithm.html#reverse%2CopenArray%5BT%5D%2CNatural%2CNatural↵(<@709044657232936960_entikan=5b=49=52=43=5d>)
20:45:56FromDiscord<fosster> basically i can't add it to my project bc it fails to build
20:46:07Amun-Raentikan: https://nim-lang.org/docs/algorithm.html#reverse%2CopenArray%5BT%5D
20:46:31FromDiscord<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:51Amun-Rathat doesn't look like interop related error
20:46:51FromDiscord<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:34Amun-Ra(I haven't used nimterop)
20:48:03FromDiscord<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:39entikanthanks Amun-Ra
22:42:08*xet7 quit (Remote host closed the connection)
22:47:24*xet7 joined #nim
23:09:06FromDiscord<␀ Array 🇵🇸 🍉> sent a code paste, see https://play.nim-lang.org/#ix=html>
23:17:24*advesperacit quit ()
23:20:12FromDiscord<␀ Array 🇵🇸 🍉> sent a code paste, see https://play.nim-lang.org/#ix=html>
23:20:12FromDiscord<Elegantbeef> Walkdir yields a tuple
23:20:13FromDiscord<Elegantbeef> You just attempt to iterate a tuple and there is no `items` iterator defined for a tuple value
23:20:13FromDiscord<Elegantbeef> You can use `fields` or `fieldPairs` to iterator a tuple value
23:20:13FromDiscord<␀ Array 🇵🇸 🍉> sent a code paste, see https://play.nim-lang.org/#ix=html>
23:20:13FromDiscord<Elegantbeef> But that'd yield `2` then `4` then `6`
23:20:16FromDiscord<␀ Array 🇵🇸 🍉> i understand now, thank you
23:24:48NimEventerNew Nimble package! waku - Implementation of the Waku protocol, see https://github.com/waku-org/nwaku
23:42:23*xet7 quit (Quit: Leaving)
23:56:17FromDiscord<odinshat> Everyone back up and prepare yourselves...
23:56:24FromDiscord<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:47FromDiscord<Phil (he/him)> Sure, how good are you at spotting data races with multithreading \:-P ?
23:57:50FromDiscord<Elegantbeef> I cannot look at your name but say "Yea it's not that good"
23:57:52*Jjp137 quit (Quit: Leaving)