<< 07-08-2023 >>

00:00:02FromDiscord<Chronos [She/Her]> We definitely prefer using Visual Studio Code or IntelliJ for Java, I can say that much
00:00:06FromDiscord<Elegantbeef> Writing code on a phone is like sanding using a handful of sand
00:00:38skulksometimes I run terminal emacs over ssh on my phone and push a quick fix to something when I'm on the go
00:00:38FromDiscord<Chronos [She/Her]> But pain from sitting for too long just makes it impossible to code for a while and currently have no PC with me
00:01:20skulkbut only to prove to myself that I can do it
00:01:33FromDiscord<Elegantbeef> Hey you don't have to tell me you have problems you're in the Nim real time chat
00:02:04skulklol
00:11:09FromDiscord<Chronos [She/Her]> Hm I'm wondering how would I handle the order of text insertion and deletion... Maybe instead of doing the index with the highest edits first, I could instead create a history of text insertions and deletions, and carry them out?
00:12:29FromDiscord<Chronos [She/Her]> Bit streams don't have a way to insert text I don't think so that would require me to create copies of text again-
00:12:34FromDiscord<Chronos [She/Her]> Of entire lines
00:13:00FromDiscord<Chronos [She/Her]> Maybe ropes will be the best way to do this but sigh
00:13:05FromDiscord<Elegantbeef> sent a code paste, see https://paste.rs/u1i7B
00:14:05FromDiscord<Elegantbeef> You have to write the file from the lowest edit to the end whenever you save
00:14:16FromDiscord<Chronos [She/Her]> sent a code paste, see https://play.nim-lang.org/#ix=4CGa
00:14:35FromDiscord<Chronos [She/Her]> In reply to @Elegantbeef "You have to write": Yep, so it'd follow everything in order
00:14:42FromDiscord<Elegantbeef> Right, but I mean how many people are modifying files of gigabytes in size?
00:15:19FromDiscord<Elegantbeef> 99% of files can be loaded in memory no problem realistically, not that you actually need to
00:16:07FromDiscord<Elegantbeef> Or store a diff in a file and apply it like kate does 😄
00:16:07FromDiscord<Elegantbeef> You can async write to a buffer file then move it to where your actual file is when it's done
00:21:39FromDiscord<Chronos [She/Her]> That's definitely an idea... But yeah I'm overthinking waaay too much, for now I'll just do what you said
00:21:55FromDiscord<Chronos [She/Her]> Ropes will be beneficial here then I guess if I'm working on strings in memory
00:22:15FromDiscord<Elegantbeef> I should say I have never written a text editor or looked into how to write one, so don't blame me when it's an awful API
00:22:53FromDiscord<Chronos [She/Her]> Lol it'll be fineee
00:25:28FromDiscord<Chronos [She/Her]> Ah... Ropes don't have anything for `insert`, nothing for splitting directly either, so I'm probably gonna need to do something like `var a, b = (myRope[0..cursorPos], [cursorPos..^1])`
00:25:45FromDiscord<Chronos [She/Her]> ...if that's even supported sigh
00:26:05FromDiscord<Chronos [She/Her]> And it isn't! Fucking dandy!
00:28:10FromDiscord<Chronos [She/Her]> For reading the entire line at the start it's not too much of an issue, but when I'm applying edits further down, it defeats the point if I need to make a string for every single new change
00:28:22FromDiscord<Chronos [She/Her]> Which means I may just need to use strings
00:28:25FromDiscord<Chronos [She/Her]> Sigh.
00:29:37FromDiscord<that_dude.> Without much thought put into it, would there be something wrong with linked lists?
00:29:51FromDiscord<Chronos [She/Her]> Wdym?
00:30:36FromDiscord<that_dude.> sent a code paste, see https://paste.rs/36NFF
00:30:40FromDiscord<that_dude.> oops didn't mean to send whatever that is
00:30:46FromDiscord<Chronos [She/Her]> Lol
00:31:00FromDiscord<Chronos [She/Her]> What are you trying to do exactly?
00:31:09FromDiscord<Chronos [She/Her]> I'd imagine using Nim seqs would be better
00:31:21FromDiscord<that_dude.> Well I'd say it depends on what you want to optimize
00:31:54FromDiscord<Chronos [She/Her]> Wait are you responding to my cries of pain or?
00:32:05FromDiscord<that_dude.> imo linked lists let you add or remove lines in O(1) while a seq/table lets you modify in O(1), I'm not too sure what a tree calculates too
00:32:30FromDiscord<that_dude.> Yeah, just lightly looked at you mentioning data types to hold the text
00:33:26FromDiscord<that_dude.> In reply to @yu.vitaqua.fer.chronos "Wait are you responding": Yeah I was sorry that it seemed a bit out of the blue lol
00:34:16FromDiscord<Chronos [She/Her]> Nah that's fine lol, was immensely confused at first lol
00:35:43FromDiscord<Chronos [She/Her]> In reply to @that_dude. "imo linked lists let": The issue is more so modifying the existing text since I'm not storing the entire file in memory, just the lines that are being edited, the painful issue that I'm having is the fact that when editing larger files and doing many large edits, there's no way to reasonably split ropes to allow for insertion of text
00:35:47FromDiscord<Chronos [She/Her]> But oh well
00:37:34FromDiscord<that_dude.> Ah f. I'm still not too sure about how ropes works, but linked lists can make it easy to load/unload lines of text
00:37:35FromDiscord<Chronos [She/Her]> Reason why ropes would be beneficial is because I could be doing many large operations at once too
00:37:36FromDiscord<that_dude.> Gl
00:37:45FromDiscord<Chronos [She/Her]> Thanks lol, appreciate the help!
00:38:01FromDiscord<Elegantbeef> ropes are practically linked lists
00:38:10FromDiscord<Elegantbeef> They're a concatenation graph really
00:38:19FromDiscord<that_dude.> Ah I assumed ropes are a tree
00:38:30FromDiscord<Elegantbeef> That's the basic principle
00:38:34FromDiscord<Elegantbeef> sent a code paste, see https://paste.rs/s2zxM
00:39:14FromDiscord<Chronos [She/Her]> Hm... Trying to think of an idea for how I'd split ropes
00:39:41FromDiscord<Elegantbeef> You cannot with the present api cause they're not split able until it's turned into a string
00:40:05FromDiscord<Chronos [She/Her]> Even when I traverse the rope myself?
00:40:12FromDiscord<Chronos [She/Her]> Though
00:40:16FromDiscord<Chronos [She/Her]> Actually yeah you're right
00:40:17FromDiscord<Chronos [She/Her]> Sigh
00:40:21FromDiscord<Elegantbeef> I mean you have to remake the entire rope tree
00:40:34FromDiscord<Elegantbeef> It's easier to just use `string` and likely better
00:40:47FromDiscord<Elegantbeef> helpful usage of `sink` and `openArray[char]` and you'll likely be fine
00:40:54FromDiscord<Elegantbeef> healthy\
00:40:56FromDiscord<Chronos [She/Her]> In reply to @Elegantbeef "It's easier to just": Yeah, will just do that
00:41:09FromDiscord<Chronos [She/Her]> What does sink do, actually? Never really used it
00:41:18FromDiscord<Elegantbeef> Someone did make the `std/unciode` work with `openArray`
00:41:22FromDiscord<Elegantbeef> sink moves memory
00:41:38FromDiscord<Chronos [She/Her]> In reply to @Elegantbeef "*Someone* did make the": Oh? Oh shit yeah unicode... Pain, I need to support that too don't I
00:41:47FromDiscord<Elegantbeef> sent a code paste, see https://play.nim-lang.org/#ix=4CGf
00:42:03FromDiscord<Elegantbeef> Luckily std/unicode supports `openArray[char]`
00:42:22FromDiscord<Elegantbeef> 0 cost unicode slices and similar
00:43:30FromDiscord<Chronos [She/Her]> sent a code paste, see https://play.nim-lang.org/#ix=4CGg
00:43:50FromDiscord<Chronos [She/Her]> In reply to @Elegantbeef "Luckily std/unicode supports `openArray[char]`": Epic :> Tho that may be an issue for me to handle when editing text
00:43:51FromDiscord<Elegantbeef> Well it doesnt copy \ assuming you do not make the compiler do an implicit copy to pass to the procedure
00:44:29FromDiscord<Chronos [She/Her]> Because obviously I have to iterate over characters to allow people to scroll through them which means I have to have code to handle that too
00:44:32FromDiscord<Chronos [She/Her]> Pain but oh well
00:45:29FromDiscord<Elegantbeef> On the plus side you can use `replace` for replacing and removing
00:52:08FromDiscord<Chronos [She/Her]> Replacing and removing? How?
00:53:37FromDiscord<Chronos [She/Her]> Also even for replacement I wouldn't be able to, since a user may only want to replace a few occurrences of a string
00:53:53FromDiscord<Chronos [She/Her]> So that'd just be deletion and insertion edits
01:49:17FromDiscord<Prestige> Are there issues using concepts with inheritance? I have a code example but can't get the playground to open
01:49:25FromDiscord<Prestige> sent a code paste, see https://play.nim-lang.org/#ix=4CGt
01:49:50FromDiscord<Prestige> I was thinking maybe I can't have a seq[Updatable] since it's not a real type
01:57:24FromDiscord<konsumlamm> you can have it, but all elements have the same type, it's like an implicit generic `[T: Updatable]` and then `seq[T]` i think
02:04:24FromDiscord<Prestige> ah, I see. Maybe I'll have to rework this idea then
02:53:29FromDiscord<.kanaxa> In reply to @isofruit "Anyway, in JS basically": I can’t remember what package it was but the first time I had a node module for some project, I didn’t realize how much space it ate, and I accidentally committed a 300+ mb node module folder to a repo
02:53:43FromDiscord<.kanaxa> It was infuriating to say the least
02:54:18FromDiscord<.kanaxa> And shocking, first time I discovered of the indecent dependency chains common in the JS world
02:55:13FromDiscord<.kanaxa> In comparison Nim scares me with just how small its binaries are, I keep thinking that I must be doing something wrong
02:55:28FromDiscord<Elegantbeef> You are!
02:56:09FromDiscord<.kanaxa> And then i realize I’m not even doing a release build yet and it could get even _smaller_
02:56:47FromDiscord<.kanaxa> In reply to @Elegantbeef "You are!": Ahahahaha
03:08:54FromDiscord<.kanaxa> In reply to @Elegantbeef "Go use illwill or": Oh wow thanks for the recommend! Was looking for TUI libraries, didn’t know which ones were community-recommended, these look great
03:15:20*rockcavera quit (Remote host closed the connection)
03:18:45FromDiscord<.kanaxa> What are open source projects in Nim that have good code and practices to study/learn from?
03:19:18FromDiscord<.kanaxa> I’d appreciate having a few to look at and glean the habits of the Nim language and community
03:20:21FromDiscord<Elegantbeef> https://nimble.directory/ 😄
03:27:08FromDiscord<.kanaxa> In reply to @yu.vitaqua.fer.chronos "Hey y'all, how hard": Not sure if you've seen this one, but it's a guide to building a text editor in C: https://viewsourcecode.org/snaptoken/kilo/↵↵May be helpful for your studies
03:27:19FromDiscord<.kanaxa> It's one of the things I'm planning to study as well, just to see how someone does it
03:27:51FromDiscord<Chronos [She/Her]> In reply to @.kanaxa "Not sure if you've": Hm, thanks! Will keep it in mind!
03:30:06FromDiscord<.kanaxa> In reply to @Elegantbeef "https://nimble.directory/ 😄": In your view what's a project with good source code to study?
03:30:21FromDiscord<Elegantbeef> No clue I havent really looked at other people's code
04:20:33*lucasta quit (Quit: Leaving)
05:05:39FromDiscord<Phil> Really depends on what you're looking for.↵The thing with nim's flexibility is that you'll find some vastly different code-styles
05:06:55FromDiscord<odexine> its pretty much up to you to decide what you think is good, no?
05:07:05FromDiscord<odexine> there's always status' guidelines if you want a base
05:07:20FromDiscord<Elegantbeef> You're empirically wrong if you do not code like me
05:07:23FromDiscord<Phil> I mean there's some stuff I think we all agree on which is that avoiding mutable state is good generally
05:07:36FromDiscord<Phil> (edit) "I mean there's some stuff I think we all agree on which is that avoiding mutable state ... is" added "and variables"
05:07:41FromDiscord<Phil> But that's such a broad statement
05:07:49FromDiscord<Phil> (edit) "But that's such a broad statement ... " added "that it borders on useless"
05:08:58FromDiscord<Phil> I would claim my codebases are pretty nicely setup, but that's solely my opinion, beef would violently disagree with that for example given the way I name things
05:09:54FromDiscord<odexine> how do you name things
05:10:11FromDiscord<Elegantbeef> poorly
05:10:15FromDiscord<odexine> if you put the type on the name you're immediately disqualified
05:10:18FromDiscord<Phil> `CharacterRepository`
05:10:41FromDiscord<Elegantbeef> Java level naming
05:10:42FromDiscord<Phil> Well no, that I don't do
05:12:04FromDiscord<odexine> i am not too sure on my opinion of that
05:12:26FromDiscord<Phil> 🤷 ↵I'm nowhere near as bad in my opinion, but I do have a dislike for abbreviations such as "str" etc in my code
05:13:08FromDiscord<Elegantbeef> sent a code paste, see https://play.nim-lang.org/#ix=4CGT
05:13:11FromDiscord<Phil> Which invariably leads to longer names compared to ↵`var constrStmt = nnkObjConstr.newTree(retT)`
05:13:20FromDiscord<Phil> If you care that little about the string you might as well name it x
05:13:29FromDiscord<emanresu3> maybe the nim standard library?↵(@.kanaxa)
05:13:29FromDiscord<Phil> If that string has meaning, it deserves a propper name
05:13:34FromDiscord<Elegantbeef> Lol
05:13:44FromDiscord<odexine> imean
05:13:47FromDiscord<odexine> (edit) "imean" => "i mean"
05:14:13FromDiscord<odexine> what meaning does a string have when you're implementing a `concat` proc that concatenates two strings
05:14:27FromDiscord<odexine> other than `a` and `b` what name would be more appropriate?
05:14:34FromDiscord<Elegantbeef> `left, right: string` 😛
05:15:10FromDiscord<Phil> `first, second: string`
05:15:36FromDiscord<Phil> Ah yeah, and that's another thing, I'm not all that into the `parameters share an assignment`thing, so I'd also write `first: string, second: string`
05:15:49FromDiscord<Elegantbeef> Wow you're really writing bad code
05:16:05FromDiscord<Elegantbeef> If I change a type I now need to replace more instances of it!
05:16:16FromDiscord<odexine> well
05:16:22FromDiscord<Elegantbeef> Think about the git diff!
05:16:23FromDiscord<Phil> That literally has nothing to do with writing bad code beef.
05:16:26FromDiscord<odexine> sometimes the parameter types being the same have no relation with each other
05:16:43FromDiscord<odexine> if they do have a relation i would keep them shared
05:16:46FromDiscord<odexine> if they dont i would separate them
05:17:05FromDiscord<Phil> That's actually a good nuanced take on that, if the parameter types are coupled, group assignment is a good way to express that
05:17:12FromDiscord<Phil> Hmmm
05:18:23FromDiscord<Phil> I'll ponder this a bit whether I'll integrate that idea going forward, I like the expressiveness argument a lot
05:18:28FromDiscord<odexine> lol
05:18:36FromDiscord<odexine> i convinced phil wow
05:18:38FromDiscord<odexine> well
05:18:39FromDiscord<odexine> not yet
05:22:32*advesperacit joined #nim
05:44:21FromDiscord<Prestige> sent a code paste, see https://play.nim-lang.org/#ix=4CGX
05:45:31FromDiscord<Elegantbeef> Stop using the concept and just use `seq[Node]`
05:46:07FromDiscord<Prestige> Well I don't want just that, I want the user to be able to provide any object with an update function so it can be updated per frame
05:47:25FromDiscord<odexine> That wouldn’t work because sequences are still heterogeneous on the concrete type no?
05:47:42FromDiscord<odexine> Concepts are not concrete
05:47:52FromDiscord<Elegantbeef> sent a code paste, see https://play.nim-lang.org/#ix=4CH0
05:49:32*kenran joined #nim
05:50:48FromDiscord<Prestige> hmm that's interesting
05:52:53FromDiscord<Prestige> But then everything must extend Box so that's kind of the same problem I guess
05:53:11FromDiscord<Elegantbeef> No it doesnt
05:53:17FromDiscord<Prestige> just another layer of inheritance and not really caring about the concept
05:53:21FromDiscord<Prestige> oh?
05:55:07FromDiscord<Elegantbeef> sent a code paste, see https://play.nim-lang.org/#ix=4CH2
05:58:20FromDiscord<Prestige> 🤔
05:58:42FromDiscord<Elegantbeef> You should also store a `updataProc: pointer`
05:59:22FromDiscord<Prestige> at this point I'm thinking of just have a seq of function pointers
06:00:45FromDiscord<Elegantbeef> Don't see how that solves the problem
06:08:20FromDiscord<Prestige> Trying to figure out how I need to type it. But basically if I had a seq of a tuple (object pointer, function pointer) I could iterate over it and call the function by passing the object pointer to it (I think)
06:10:38FromDiscord<Elegantbeef> What about dangling pointers?
06:11:25FromDiscord<Prestige> Just another problem created that has to be solved
06:12:40FromDiscord<Elegantbeef> The box api seems like best solution if you ask me
06:13:56FromDiscord<Prestige> I wish the playground was working
06:15:16FromDiscord<Prestige> the box solution seems like overkill creating a new object just to wrap the existing ref object just to invoke its update function, idk
06:15:49FromDiscord<Elegantbeef> You're the one that wants arbitrarily stored objects
06:16:15FromDiscord<Elegantbeef> If you're going to force ref you could use `RootRef`
06:16:21FromDiscord<Prestige> aren't ref objects just pointers under the hood? can't we store an array of pointers?
06:16:53FromDiscord<Phil> Out of curiosity, how do you plan on figuring out what type is associated with that pointer when using that array of pointers later?
06:17:33FromDiscord<Phil> Because if you plan on having a fixed order of types then you might as well just have a tuple that enshrines that order
06:17:37FromDiscord<Elegantbeef> sent a code paste, see https://paste.rs/hBM16
06:17:54FromDiscord<Phil> (edit) "Because if you plan on having a fixed order of types ... then" added "(which could be a way)"
06:17:58FromDiscord<Elegantbeef> Actually that doesnt work
06:18:35FromDiscord<Phil> Ah method call syntax means you don't necessarily need to know the type, hmm
06:18:40FromDiscord<Elegantbeef> There is a solution that'll work but I'm destracted
06:18:56FromDiscord<Elegantbeef> distracted even
06:26:55*PMunch joined #nim
06:40:55FromDiscord<Elegantbeef> sent a code paste, see https://play.nim-lang.org/#ix=4CH8
06:41:11*ntat joined #nim
06:41:13FromDiscord<Elegantbeef> Shit I had a cast in there I'm a failure
06:41:38FromDiscord<Elegantbeef> !/s/cast[T]/T
06:43:12FromDiscord<Elegantbeef> Probably should also be `RootRef(u)` inside the concept instead of `u is ref`
06:44:40FromDiscord<Elegantbeef> If you want to add more procs and reduce the overhead you can use make a Vtable manually and dispatch it all
06:45:19FromDiscord<Prestige> This is crazy
06:45:22FromDiscord<Prestige> ty
06:51:21FromDiscord<Elegantbeef> sent a code paste, see https://paste.rs/Kjw56
06:51:34FromDiscord<Elegantbeef> We have completely remade dynamic dispatch using vtables for limited procedures!
06:52:11FromDiscord<Phil> So basically dynamic dispatch but for concepts is a thing now? Time to make a package you guys 😛
06:52:26FromDiscord<Elegantbeef> Don't tell traitor or iface that
06:52:49FromDiscord<Phil> Oh wow, you're so damn far ahead of me you literally already implemented it?
06:53:04FromDiscord<Elegantbeef> Is this apart of the joke still?
06:53:40FromDiscord<Phil> It wasn't, that was actually me being "Oh wow, you've already done this?"
06:53:48FromDiscord<Elegantbeef> https://github.com/beef331/traitor
06:53:56FromDiscord<Elegantbeef> No clue how usable it truly is
06:54:06FromDiscord<Phil> Keep in mind I only skimmed through the code you posted as well as skimmed with the roughest of looks over traitor
06:54:08FromDiscord<Elegantbeef> It worked in small demos and I never made anything more on it
06:54:26FromDiscord<Phil> And I have the tendency to gloss over the bits I don't understand
06:54:38FromDiscord<Elegantbeef> Traitor forces implementation of a concept and allows you to box to underlying types
06:55:01FromDiscord<Phil> Type-interfaces basically
06:55:04FromDiscord<Elegantbeef> Though due to how I do it, it adds yet another pointer indirection to refs
06:55:56FromDiscord<Phil> Actually, while I'm quite fancying the idea of module interfaces, I maybe should play around with type-interfaces a bit more as that is more flexible
06:56:32FromDiscord<Phil> Insist on types having certain abilities in the contexts they're being called instead of modules being forced to provide certain procs
06:56:59FromDiscord<Elegantbeef> In Nim yes you should do type based
06:57:02FromDiscord<Phil> Let's add that to the bucket list
06:57:30FromDiscord<Elegantbeef> Even if you want to have pluggable modules just force a `proc init(_: typedesc[T]): T`
06:57:44FromDiscord<Elegantbeef> Cause generally you want state on things
06:58:01FromDiscord<Elegantbeef> I learned that from my GUI you need to have a generic state object
06:59:06FromDiscord<Elegantbeef> But I also went full bore "Make gooey as reusable as possible, I do not care if you want to use vectors that are actually 2 bits"
06:59:19FromDiscord<Elegantbeef> I say that but it assumes they're float32
07:27:38*azimut quit (Ping timeout: 240 seconds)
07:59:05FromDiscord<dissolved.girl> I'm a bit out of the loop. Can someone explain to me, in short, what concepts are and what they're useful for? Thank you!
07:59:43FromDiscord<dissolved.girl> It seems like a way of specifying generic types that must conform to some specifications?
08:04:10FromDiscord<ratogbm> (I am programming Turing machine) how do I program this:↵` var tape: ref seq[int] = ref newSeq[int](settings.tape_size)`
08:04:21FromDiscord<ratogbm> Currently it gives an error
08:04:21FromDiscord<demotomohiro> https://nim-lang.org/docs/manual_experimental.html#concepts
08:05:58FromDiscord<ratogbm> In reply to @demotomohiro "https://nim-lang.org/docs/manual_experimental.html#": I have no clue what I am looking at... Or was it not for me?
08:06:02PMunch`var tape = new seq[int]; tape[].setLen(settings.tape_size)` I believe
08:06:26PMunchratogbm, that was for the person before you who asked about concepts
08:06:26FromDiscord<.kanaxa> In reply to @emanresu3 "maybe the nim standard": I've been going through the entirety of it, it's really great, but was looking more for great third-party projects to also learn from, especially in relation to a complete application rather than just libraries
08:06:47PMunchratogbm, my reply was for you. But why do you need a ref seq?
08:07:03FromDiscord<dissolved.girl> In reply to @demotomohiro "https://nim-lang.org/docs/manual_experimental.html#": Yes, I've read this, but I'm having a hard time wrapping my head around why I would use this or what it's useful for.
08:07:12FromDiscord<ratogbm> In reply to @PMunch "<@720535934025596929>, my reply was": Because I am punching it into functions which have to modify it.
08:07:25FromDiscord<ratogbm> (edit) "punching" => "sending" | "into" => "to"
08:10:10FromDiscord<demotomohiro> In reply to @ratogbm "I have no clue": It is reply to @dissolved.girl
08:12:03FromDiscord<demotomohiro> In reply to @dissolved.girl "Yes, I've read this,": Concept is some kind of typeclass:↵https://nim-lang.org/docs/manual.html#generics
08:13:34FromDiscord<demotomohiro> So when you define generics, you can define it so that it takes only types that has specific procs.
08:14:53FromDiscord<.kanaxa> In reply to @dissolved.girl "Yes, I've read this,": I got this from Nim in Action - to my understanding, they function a bit like protocols from Swift https://media.discordapp.net/attachments/371759389889003532/1138022439201275985/image.png
08:15:03FromDiscord<.kanaxa> Composition over inheritance
08:18:06FromDiscord<dissolved.girl> I see. Thank you!
08:35:53FromDiscord<Elegantbeef> Pmunch if you want an update to the nimscripter dynamic library https://github.com/beef331/nimscripter/blob/dll/tests/lib/helloworld.nim uses it, almost on part to the direct use code
08:36:11FromDiscord<Elegantbeef> on par\
09:02:27FromDiscord<ratogbm> Can you multiply strings/char in nim like in python? `'a'5=="aaaaa"`
09:02:49FromDiscord<Elegantbeef> `strutils.repeat`
09:04:22FromDiscord<ezquerra> I'm trying to install nim on a Linux container using the choosenime script. My user is not root. If I do `curl https://nim-lang.org/choosenim/init.sh -sSf | sh` I get the following error:↵> choosenim-init: Downloading choosenim-0.8.4_linux_amd64↵> curl: (23) Failure writing output to destination
09:04:53FromDiscord<ezquerra> I can fix it by using `sudo sh` but then the .nimble directory is installed in the root user's home directory
09:07:56FromDiscord<Andreas> sent a code paste, see https://play.nim-lang.org/#ix=4CHv
09:09:17PMunchratogbm, well you could just take in the parameter as `proc myProc(x: var seq[int])`, that makes it mutable from inside the procedure
09:09:51FromDiscord<ratogbm> In reply to @PMunch "<@720535934025596929>, well you could": hold up... why has noone told me about this?
09:10:55FromDiscord<ratogbm> 😭 I wrote an entire project painfully dealing with refs....
09:10:58PMunchBecause you never asked (I assume) :P
09:11:15FromDiscord<ratogbm> In reply to @PMunch "Because you never asked": thanks I guess...
09:11:42PMunchYeah that's why I asked, dealing with a `ref seq` isn't very common in Nim, because it's painful and rarely useful
09:13:06FromDiscord<5starrss> guys im learning nim but whats it usefull for
09:13:20PMunchAnd to answer your other question, you can't multiply strings/chars in Nim without implementing your own custom `*` procedure. But there is `repeat` in the `strutils` module which does the same thing
09:13:43PMunchSo `"a".repeat(5) = "aaaaa"`
09:13:59FromDiscord<ratogbm> In reply to @5starrss "guys im learning nim": It can compile to JS so I guess it's usefull for that.
09:14:04FromDiscord<ratogbm> (edit) "compile" => "compiles"
09:14:17FromDiscord<5starrss> i dont even know js
09:14:20FromDiscord<ratogbm> (edit) "that." => "webdev."
09:14:33FromDiscord<ratogbm> For me it's just "faster" python
09:14:40FromDiscord<Elegantbeef> What's the issue?↵(@Andreas)
09:15:24FromDiscord<Andreas> In reply to @5starrss "i dont even know": it usefull for many things - take a look at the nimble-directory to get a idea. Do you know any other programming language ?
09:15:27FromDiscord<ratogbm> (edit) "python" => "python."
09:16:49PMunch5starrss, you can pretty much do anything you'd like in Nim
09:16:49FromDiscord<5starrss> nope
09:16:57FromDiscord<Andreas> In reply to @Elegantbeef "What's the issue? (<@754284517316886598>)": it blows on my side ? Does not accept the `distinct uint64` inside the Atomic ? using threading/atomics.
09:17:22FromDiscord<5starrss> i dont know any other becuase i dont have time rn to learn python and also people told me nim is very very easy to learn
09:17:27FromDiscord<5starrss> thats why i wanna start with nim
09:17:28FromDiscord<Elegantbeef> https://github.com/nim-lang/threading/issues/35
09:17:51FromDiscord<Elegantbeef> https://github.com/nim-lang/threading/issues/17
09:18:39FromDiscord<Andreas> In reply to @Elegantbeef "https://github.com/nim-lang/threading/issues/17": ohh ic, thx, last time i looked `threading/atomics` was the future solution.
09:19:00FromDiscord<Elegantbeef> Regardless a PR is likely needed for `std/atomics` with the afforementioned concept
09:22:05FromDiscord<ratogbm> In reply to @5starrss "i dont know any": 1. I think python is easier, at least it has a bigger community and more tutorials.↵2. nim is easier but not the easiest. The difficulty between 1st and 5th language is bigger than between 6th - 10th.
09:22:44FromDiscord<ratogbm> (edit) "In reply to @5starrss "i dont know any": 1. I think python is easier, at least it has a bigger community and more tutorials.↵2. nim is easier but not the easiest. The difficulty between 1st and 5th ... language" added "easiest"
09:22:54FromDiscord<ratogbm> (edit) "-" => "and"
09:25:47FromDiscord<Andreas> In reply to @Elegantbeef "Regardless a PR is": the concept-solution in issue-17 does not compile with nim-2.0, so thats why you say, a PR is needed ?
09:26:03PMunch5starrss, in that case you might like: https://www.udemy.com/course/nim-programming-for-beginners/ and https://narimiran.github.io/nim-basics/
09:26:17PMunchThere are also some nice video tutorials for beginners
09:26:41FromDiscord<Andreas> (edit) "In reply to @Elegantbeef "Regardless a PR is": the concept-solution in issue-17 does not compile with nim-2.0, so thats why you say, a PR is needed ? ... " added "Sry, update - found a typo, works.."
09:32:58FromDiscord<5starrss> this bot is so fucking smart
09:35:34FromDiscord<5starrss> but im not buying ac course 💀
09:35:38PMunch5starrss, which bot?
09:36:09PMunchOh, I didn't realise that was a paid course. Since when have we had that?
09:36:12FromDiscord<5starrss> In reply to @PMunch "<@1137563570448638074>, which bot?": you your so smart
09:38:27FromDiscord<Phil> Just in case this is the daily reoccurrence of the "Is this a bot" topic:↵Our discord server is bridged to other chat-servers/applications as well such as IRC and matrix
09:38:35FromDiscord<demotomohiro> They are Not BOT, just posting from IRC.
09:38:49FromDiscord<Phil> Messages coming from users from those servers to discord are displayed as "Bot"
09:38:54PMunch5starrss, this is the one I meant to link to: https://exercism.org/tracks/nim
09:38:56FromDiscord<5starrss> oh
09:39:21FromDiscord<5starrss> can you run nim code without compling it
09:39:22PMunchSsssh, I was going to lean into it this time. Pretend to actually be a bot :P
09:39:23FromDiscord<Phil> This is me typing from matrix for example.
09:39:30FromDiscord<5starrss> i sound so doumb
09:39:33PMunch5starrss, well kinda
09:39:37FromDiscord<5starrss> (edit) "doumb" => "dumb"
09:39:44FromDiscord<Phil> In reply to @PMunch "Ssssh, I was going": I'll leave the next one to you 😛
09:39:45PMunchYou can run NimScript without compiling
09:39:53FromDiscord<5starrss> how
09:40:03FromDiscord<5starrss> i only got told nim c -r
09:40:04PMunchAnd of course you can run Nim on the playground without compiling it yourself :P
09:40:09PMunch`nim r`
09:40:14FromDiscord<5starrss> oh
09:40:21FromDiscord<Phil> doesn't r compile and run?
09:40:25PMunchBut why don't you want to compile? Nim is a compiled language..
09:40:32PMunchAh wait, `nim e`?
09:41:18PMunchYes `nim e` to evaluate a NimScript file
09:41:19FromDiscord<5starrss> ahh
09:41:37FromDiscord<5starrss> this shit is confusing i dont think coding is for me
09:41:41PMunch`nim r` just compiles the code and puts the binary in the nimcache folder
09:41:52PMunch5starrss, it only gets wores
09:41:54PMunchworse*
09:41:58FromDiscord<Phil> Okay so first things first:↵5stars, I'd recommend only dealing with normal nim
09:42:01FromDiscord<Phil> (edit) "Okay so first things first:↵5stars, I'd recommend only dealing with normal nim ... " added "for now"
09:42:04PMunchBut programming is fun :)
09:42:07FromDiscord<Phil> You can dive into stuff like nimscript later
09:42:22FromDiscord<5starrss> In reply to @isofruit "Okay so first things": what do you mean normal nim
09:42:55FromDiscord<5starrss> and they told me nim was easy 🤦
09:43:17FromDiscord<Phil> sent a code paste, see https://play.nim-lang.org/#ix=4CHJ
09:43:19PMunchWell, Nim is easy compared to many other programming languages. But programming is still hard..
09:43:59FromDiscord<Phil> (edit) "https://play.nim-lang.org/#ix=4CHJ" => "https://play.nim-lang.org/#ix=4CHK"
09:44:38FromDiscord<5starrss> In reply to @isofruit "If you just want": yeah so thats what i have been doing
09:44:42FromDiscord<Phil> Nim is relatively easy in the sense that to get started it doesn't take that much, there's not a lot of "mandatory" stuff to know about.↵But nim (like most programming languages) has a ton of things you can opt into that are useful to know once you're more experienced
09:44:45FromDiscord<5starrss> i just dont know stuff like variables
09:44:52FromDiscord<5starrss> its so fucking confusing
09:44:58PMunchElegantbeef, this NimScript as a dynamic library is really cool!
09:45:24FromDiscord<5starrss> also how old are yall
09:45:25FromDiscord<5starrss> im 14
09:45:58PMunchAges here vary quite considerably, but I started when I was about your age
09:46:01FromDiscord<Phil> In reply to @5starrss "i just dont know": Ahh check. So basically you know how in math you have stuff like↵`5 + x = 8`?
09:46:13FromDiscord<5starrss> oh yeah
09:46:33FromDiscord<5starrss> and you need to figure out what x = in that case it whould be 3
09:46:35FromDiscord<5starrss> right ?
09:46:43FromDiscord<5starrss> please tell me im not wrong 🤓
09:46:51FromDiscord<Phil> You're entirely correct!
09:46:55FromDiscord<5starrss> leshgoo
09:46:59FromDiscord<Phil> Now in math X is often something you need to figure out
09:47:15FromDiscord<Phil> If you look at it from a different perspective, x is kind of like a placeholder for the value 3, right?
09:47:49FromDiscord<5starrss> so if i did like ↵↵x = 3 ↵echo 3
09:47:51FromDiscord<5starrss> fuck
09:47:53FromDiscord<5starrss> idk
09:47:55FromDiscord<Phil> Almost!
09:48:19FromDiscord<Phil> in nim to put a value into a variable you need to tell it "Hey, this is supposed to create a variable", you can do that with let and var
09:48:25FromDiscord<Phil> so `let x = 3`
09:48:40FromDiscord<5starrss> let x =3 ↵echo 3
09:48:41FromDiscord<5starrss> ?
09:48:58FromDiscord<5starrss> or whould it be like echo"3"
09:49:19FromDiscord<Phil> `echo 3` and `echo "3"` will both work, but I'll get to that in a second
09:49:31FromDiscord<5starrss> oh alrighty
09:49:45FromDiscord<Phil> echo 3 by itself already is a valid statement, because you're basically telling nim "Hey, show me whatever is right of the echo word"
09:49:59FromDiscord<Phil> What you do with ↵`let x = 3` is you put the value 3 into the x
09:50:21FromDiscord<Phil> And if you later want to figure out "Oh shit, I forgot what is in x.... show it to me!"↵You can do ↵`echo x`
09:50:36FromDiscord<5starrss> oh yeah thats what i meant to say
09:50:37FromDiscord<5starrss> lmao
09:50:44FromDiscord<Phil> sent a code paste, see https://play.nim-lang.org/#ix=4CHN
09:50:52FromDiscord<5starrss> what whould this even be usefull for tho
09:51:38FromDiscord<Phil> That's the starting point.↵Think of it like this.↵Say you have a school and you have a list of classes with how many students are in each class
09:51:43*ehmry quit (Quit: https://quassel-irc.org - Chat comfortably. Anywhere.)
09:51:59FromDiscord<Phil> And you want to just add them up together in an easy manner
09:52:21*ehmry joined #nim
09:52:24FromDiscord<Phil> So say you have 5 classes with 20, 25, 26, 32 and 16 pupils each
09:52:57FromDiscord<Phil> `let x = @[20, 25, 26, 32, 16]` This is a list of values. Now we want to add them all up
09:53:46FromDiscord<Phil> sent a code paste, see https://play.nim-lang.org/#ix=4CHO
09:54:02FromDiscord<5starrss> head hurting
09:54:07FromDiscord<5starrss> i dont understand
09:54:50FromDiscord<Phil> Hmm in that case it might make sense to look into some beginner guides that don't assume programming knowledge
09:55:56FromDiscord<Phil> But those guides will more likely lead you towards python or java since those languages are more broadly available.
09:56:08FromDiscord<Phil> (edit) "available." => "accessible."
09:56:13FromDiscord<Phil> (edit) "accessible." => "used."
09:56:23FromDiscord<Phil> (edit) "java" => "javascript"
09:56:52FromDiscord<5starrss> why did you put the @ let x = @20,
09:56:53FromDiscord<5starrss> ?
09:57:38FromDiscord<Phil> Ah, apologies, that is nim syntax thingie and for now not relevant
10:01:08FromDiscord<Phil> sent a long message, see http://ix.io/4CHQ
10:01:29FromDiscord<Phil> (edit) "http://ix.io/4CHQ" => "http://ix.io/4CHR"
10:01:55FromDiscord<Phil> (edit) "http://ix.io/4CHU" => "http://ix.io/4CHT"
10:03:57FromDiscord<5starrss> so if i wanted just one value it whould just be `let x = 7`↵but if i wanted a list of arrays it whould be `let x = @[7, 25, 30] ?
10:04:06FromDiscord<5starrss> (edit) "30]" => "30]`"
10:04:35FromDiscord<Phil> Pretty much!
10:04:53FromDiscord<Phil> To be more exact in terms of wording I'd call the second thing you created a sequence, rather than an array
10:05:37FromDiscord<Phil> People in nim (and a lot, but not all other programming languages) tend to immediately think "I can't change the length of this" if you talk about arrays because in their languages those are fixed-size.
10:06:36FromDiscord<Phil> Okay, before we move on, another side-trip.↵Remember when I mentioned `var` earlier?
10:06:49FromDiscord<5starrss> what is var ?
10:06:53FromDiscord<5starrss> i remeber you saying it
10:06:58FromDiscord<5starrss> i just dont remember what it is
10:07:02FromDiscord<Phil> Aye, `let x = 5` was to create a variable that is fixed
10:07:08FromDiscord<Phil> you can't change x anymore at that point
10:07:18FromDiscord<5starrss> oh
10:07:20FromDiscord<5starrss> yeah varaible
10:07:21FromDiscord<5starrss> lmao
10:07:26FromDiscord<5starrss> im so fucking stupid
10:07:33FromDiscord<Phil> sent a code paste, see https://play.nim-lang.org/#ix=4CHV
10:07:44FromDiscord<Phil> Because you already said with `let x = 5` that x is the value 5, it can't change.
10:07:56FromDiscord<Phil> But what if you want to have a variable that you can change?↵Then you use var
10:08:21FromDiscord<Phil> sent a code paste, see https://play.nim-lang.org/#ix=4CHW
10:09:15FromDiscord<5starrss> but why whoudnt you just delete the var x =5 ↵and put x = 3
10:10:50FromDiscord<Phil> In this particular case you're completely correct, it would do the same if you just removed the `var x = 5` and just did a `var x = 3`.↵However keep in mind to create a variable for the first time you always need to use either var or let (there's also const but that is not relevant for now)
10:10:55FromDiscord<Phil> (edit) "now)" => "much, much later)"
10:11:25FromDiscord<5starrss> what about like if statements and stuff
10:12:28FromDiscord<Phil> sent a code paste, see https://play.nim-lang.org/#ix=4CHY
10:12:44FromDiscord<Phil> (edit) "https://play.nim-lang.org/#ix=4CHY" => "https://play.nim-lang.org/#ix=4CHZ"
10:12:48FromDiscord<5starrss> so it whould be 30
10:12:53FromDiscord<Phil> Correct!
10:12:58FromDiscord<5starrss> YAY
10:13:11FromDiscord<Phil> Now if you want to throw in an if-statement, lets first talk about booleans
10:13:23FromDiscord<5starrss> wtf is a boolean?
10:13:24FromDiscord<5starrss> lmao
10:13:34FromDiscord<Phil> In every programming language there's the concept that something is either "true" or "false"
10:13:50FromDiscord<5starrss> yeah
10:14:13FromDiscord<Phil> a boolean represents that something is either true or false. It is a kind of variable.↵Note for example that until now we've only put numbers into variables
10:14:18FromDiscord<Phil> Well you can also put booleans into variables
10:14:29FromDiscord<Phil> sent a code paste, see https://play.nim-lang.org/#ix=4CI1
10:14:39FromDiscord<5starrss> wait
10:15:14FromDiscord<5starrss> so then whould u do somthing like if isHungry = true then bla bla bla ?
10:16:11FromDiscord<Phil> You can do it that way, but to check if 2 things are the same, you use `==` because `=` is for putting a value into a variable
10:16:19FromDiscord<Phil> so it would be `isHungry == true`
10:16:40FromDiscord<Phil> sent a code paste, see https://play.nim-lang.org/#ix=4CI2
10:16:51FromDiscord<5starrss> oh okay yeah that makes sense
10:17:00FromDiscord<Phil> However, you know what the funny thing is?
10:17:06FromDiscord<Phil> isHungry == true is a comparison
10:17:20FromDiscord<Phil> and the result of a comparison like this is also either true or false
10:17:39FromDiscord<Phil> so isHungry == true has the result of true
10:17:54FromDiscord<Phil> because it is true that isHungry has the value `true` in it
10:18:40FromDiscord<5starrss> becuase you put let isHungry = true so if you do ↵↵if isHungry ==true ↵ it whould just be true
10:18:48FromDiscord<5starrss> thats confusing
10:18:52FromDiscord<5starrss> to many trues
10:19:11FromDiscord<Phil> sent a code paste, see https://play.nim-lang.org/#ix=4CI5
10:19:44FromDiscord<Phil> Does that make sense?
10:19:48FromDiscord<5starrss> yeah
10:19:54FromDiscord<5starrss> ig 😆
10:20:04FromDiscord<5starrss> (edit) "😆" => "🤣"
10:22:00FromDiscord<Phil> sent a code paste, see https://play.nim-lang.org/#ix=4CI6
10:25:30FromDiscord<5starrss> if you write is hungry the value whould stay at 50 becuase he didnt eat lunch(becuase he wasnt hungry)↵but if you wrote var is hungry = true then it whould be 30 becuase he was hungry there for he ate lunch↵and the cost was 30
10:25:34FromDiscord<5starrss> (edit) "30" => "20"
10:25:56FromDiscord<Phil> Exactly correct
10:26:28FromDiscord<5starrss> yay
10:26:47FromDiscord<Phil> There is a bunch of ways you can do comparisons, but they depend on what you have in your variables
10:27:44FromDiscord<Phil> `==` is a way to compare 2 things most of the time, assuming you have the same thing on both ends.↵So you can compare 2 booleans with it `isHungry == true` , but you can't compare a boolean and a number with it.↵ `isHungry == 5` will not work because one is a number, not a boolean
10:27:50FromDiscord<Phil> (edit) "`==` is a way to compare 2 things most of the time, assuming you have the same thing on both ends.↵So you can compare 2 booleans with it `isHungry == true` , but you can't compare a boolean and a number with it.↵ `isHungry == 5` will not work because one ... is" added "of those"
10:29:03FromDiscord<5starrss> ohhh alrighty
10:29:28FromDiscord<Phil> booleans and numbers are what's called "types"
10:30:23FromDiscord<Phil> There are a couple "core"-types that are basically the basis for everything else, to which boolean and multiple different kinds of numbers belong
10:32:16FromDiscord<Phil> For the most part there's boolean (true, false), full numbers aka integers (-2, -1, 0, 1, 2, 3 etc.), text aka Strings ("I am a string and could be assigned to a variable"), partial numbers or floats (0.5, 1.245, 0.341 etc.)
10:32:31FromDiscord<Phil> (edit) "variable")," => "variable") and"
10:32:47FromDiscord<5starrss> oh alright thanks man.
10:32:55FromDiscord<5starrss> your actually the best
10:33:32*marcus quit (Remote host closed the connection)
10:33:42FromDiscord<Phil> You can actually give yourself a hint at what "type" of value goes into a variable by using so called type annotations.↵`let x = 5` tells you that full numbers aka integers go into x.↵But you can also make that explicit by writing:↵`let x: int = 5`
10:34:42*marcus joined #nim
10:35:25FromDiscord<Phil> Sometimes you'll even have to specify them because otherwise nim can't figure out what should go into a variable.↵For example ↵`var x` won't compile because nim isn't sure "Will a string, an integer, a float or something else entirely go int here?"
10:35:45FromDiscord<Phil> (edit) "compile" => "work"
10:36:40FromDiscord<Phil> And nim (as well as a lot of other langauges that have the same concept) is super finnicky about this stuff by design.↵Because it prevents mistakes
10:37:14FromDiscord<Phil> sent a code paste, see https://play.nim-lang.org/#ix=4CId
10:37:32FromDiscord<Phil> (edit) "https://play.nim-lang.org/#ix=4CId" => "https://play.nim-lang.org/#ix=4CIe"
10:38:45*jmd_ quit (Ping timeout: 246 seconds)
10:39:25FromDiscord<5starrss> 5 Potato
10:39:54FromDiscord<Phil> In that case you fully agree with how javascript (the language that runs on websites) works 😄
10:40:24FromDiscord<Phil> in nim it goes "Wait, that feels like I'd need to guess what you want me to do, I block this"
10:40:30FromDiscord<Phil> (edit) "this"" => "this, no program for you""
10:40:40FromDiscord<5starrss> so that whoudnt work
10:40:44FromDiscord<5starrss> x + y
10:40:48FromDiscord<5starrss> that works in python tho ?
10:41:31FromDiscord<Phil> sent a code paste, see https://play.nim-lang.org/#ix=4CIj
10:41:42FromDiscord<Phil> (edit) "https://play.nim-lang.org/#ix=4CIj" => "https://play.nim-lang.org/#ix=4CIk"
10:41:50FromDiscord<5starrss> whats the, >>>
10:42:09FromDiscord<Phil> I have python open in a terminal, one sec
10:42:24FromDiscord<5starrss> https://media.discordapp.net/attachments/371759389889003532/1138059564412051476/image.png
10:42:25FromDiscord<5starrss> confusing
10:42:25FromDiscord<Phil> https://media.discordapp.net/attachments/371759389889003532/1138059567280967741/image.png
10:42:36FromDiscord<5starrss> oh
10:42:49FromDiscord<5starrss> what the fuck is that terminal
10:42:56FromDiscord<5starrss> what device do you use
10:42:58FromDiscord<Phil> You're on windows?
10:43:02FromDiscord<5starrss> yes
10:43:06FromDiscord<5starrss> mines diffrent
10:43:07FromDiscord<Phil> In that case you have something similar, it's called powershell
10:43:10FromDiscord<Phil> Or the older one, cmd
10:43:17FromDiscord<5starrss> i use cmd
10:43:23FromDiscord<5starrss> what do you use
10:43:28FromDiscord<Phil> Linux ^^
10:43:29Amun-Ra5starrss: that's gnome terminal
10:43:48FromDiscord<leetnewb> there is a tabbed powershell available in the windows app store - quite nice
10:44:52Amun-Rabtw, if you ever feel useless - there's powershell for linux ;)
10:44:52FromDiscord<5starrss> how whould i make a banner on nim
10:45:03FromDiscord<Phil> I use a terminal such as that because it's faster than opening an application
10:45:06FromDiscord<nomad> Is there any way to interact with sqllite databases with only pure libraries?
10:45:10FromDiscord<Phil> In reply to @Amun-Ra "btw, if you ever": Okay that is objectively funny
10:45:12FromDiscord<odexine> Technically power shell is the shell and the windows terminal is the terminal, they’re distinct
10:45:31FromDiscord<Phil> Yeah but I feel like that goes too much into the weeds here ^^
10:45:41FromDiscord<5starrss> In reply to @isofruit "Yeah but I feel": how whould i make a banner on nim
10:45:47FromDiscord<odexine> It can become an important distinction in the future
10:46:00FromDiscord<leetnewb> In reply to @5starrss "how whould i make": what kind of banner?
10:46:03FromDiscord<Phil> I'd move that distinction to the future then
10:46:16FromDiscord<5starrss> In reply to @leetnewb "what kind of banner?": like a text baner
10:46:20FromDiscord<5starrss> (edit) "baner" => "banner"
10:46:34FromDiscord<nomad> In reply to @5starrss "like a text banner": echo "text"?
10:46:35FromDiscord<5starrss> using like ascci text generator
10:46:46FromDiscord<leetnewb> where do you want to display the banner?
10:46:52FromDiscord<leetnewb> web browser? or somewhere else?
10:46:59FromDiscord<5starrss> In reply to @nomad "echo "text"?": yeah but if i make a big line of text using more than one line it whoudnt work
10:47:05FromDiscord<nomad> echo """↵Ascii art↵"""
10:47:05FromDiscord<5starrss> In reply to @leetnewb "where do you want": on the terminal
10:47:14FromDiscord<5starrss> In reply to @nomad "echo """ Ascii art": thansk
10:47:17FromDiscord<5starrss> (edit) "thansk" => "thanks"
10:47:20FromDiscord<nomad> Np
10:47:52FromDiscord<Phil> In reply to @5starrss "yeah but if i": What nomad just wrote is called a multi-line string for reference
10:48:02FromDiscord<Phil> it's basically `"` 3 times in a row
10:48:08FromDiscord<nomad> In reply to @nomad "Is there any way": Anyone know if this is possible btw
10:48:11FromDiscord<Phil> (edit) "it's basically `"` 3 times in a row ... " added "at the start and end of the string"
10:48:20FromDiscord<odexine> In reply to @nomad "Anyone know if this": It’s possible just no one has tried
10:48:36FromDiscord<odexine> And it’s kinda maybe also not a good idea
10:48:50FromDiscord<nomad> Why is that
10:49:09FromDiscord<odexine> SQLite is server less right? That means all the code is in the library
10:49:19FromDiscord<odexine> You’d have to convert all that into Nim plus maintain it
10:49:41FromDiscord<nomad> Mmm
10:49:45FromDiscord<nomad> Thats a lot of work
10:49:50FromDiscord<Phil> 'tis indeed
10:49:58FromDiscord<odexine> Yeah basically you’d be implementing SQLite all over again
10:50:35PMunchYeah with only pure libraries you'd basically have to implement SQLite in Nim
10:51:04FromDiscord<nomad> Thats gonna be a lot of work, work im probably not capable of doing
10:51:14FromDiscord<Phil> Would it still count as pure if there were some madlad out there that reimplemented sqlite in a functional language that you can have bindings to?
10:51:24FromDiscord<odexine> You’re capable, I’d say it’s just not a good idea to do it lol
10:51:35FromDiscord<odexine> In reply to @isofruit "Would it still count": Wrong pure
10:51:43FromDiscord<5starrss> In reply to @nomad "echo """ Ascii art": any way to change the colour
10:51:47FromDiscord<5starrss> (edit) "colour" => "colour?"
10:52:11FromDiscord<Phil> That one will need you to import a module of the nim library which provides a proc for that
10:52:13FromDiscord<Phil> one sec
10:53:37FromDiscord<Phil> sent a code paste, see https://play.nim-lang.org/#ix=4CIo
10:54:05FromDiscord<5starrss> thanks man
10:54:53FromDiscord<Phil> To explain the above, styledWriteLine is what's called a proc or procedure.↵Procedure take variables and do something with them.↵They're useful so you don't have to write the same thing twice.↵You could for example write yourself a procedure to immediately write text red that makes use of this
10:54:56FromDiscord<5starrss> how whould i do the """ thing
10:55:00FromDiscord<5starrss> with the colour
10:55:11FromDiscord<5starrss> just fgred,"""
10:55:12FromDiscord<5starrss> ?
10:55:42FromDiscord<Phil> sent a code paste, see https://play.nim-lang.org/#ix=4CIp
10:55:58FromDiscord<5starrss> so i whould have to do it line by line
10:56:00FromDiscord<5starrss> ?
10:56:17FromDiscord<Phil> sent a code paste, see https://play.nim-lang.org/#ix=4CIq
10:56:24FromDiscord<Phil> You can do of course both, write line by line or all at once
10:56:32Amun-Raif I understand you correctly, no - you can use stdout.write
10:56:39FromDiscord<5starrss> oh alright thanks you
10:56:43FromDiscord<5starrss> (edit) "thanks" => "thank"
10:58:39FromDiscord<5starrss> https://media.discordapp.net/attachments/371759389889003532/1138063650750476339/image.png
10:58:42FromDiscord<5starrss> ?
10:58:48FromDiscord<5starrss> somone happend
10:59:38Amun-Rahttps://play.nim-lang.org/#ix=4CIs
10:59:43Amun-Rastdio is now in separate module
11:00:09FromDiscord<5starrss> oh wait i forgot to import lmao
11:00:37Amun-Rathe error reported states that nim compiler could not find matching write proc
11:01:41FromDiscord<5starrss> In reply to @Amun-Ra "the error reported states": what do i do then
11:01:54FromDiscord<5starrss> https://media.discordapp.net/attachments/371759389889003532/1138064465905057852/image.png
11:01:55FromDiscord<5starrss> this is what i have
11:02:08FromDiscord<5starrss> im new dont make fun of me
11:03:07FromDiscord<Phil> Oh you still need the proc we wrote earlier when I tried to introduce procs
11:04:14FromDiscord<Phil> sent a code paste, see https://play.nim-lang.org/#ix=4CIu
11:05:20FromDiscord<Phil> sent a code paste, see https://play.nim-lang.org/#ix=4CIv
11:05:33FromDiscord<5starrss> oh
11:05:35FromDiscord<5starrss> okay
11:05:39FromDiscord<5starrss> i kinda get it now
11:05:45FromDiscord<5starrss> what the fuck is stdout
11:05:59FromDiscord<Phil> sent a code paste, see https://play.nim-lang.org/#ix=4CIw
11:06:22FromDiscord<Phil> "stdout" stands for "Standard output".↵I think the short version of it is, that is one of the many things that gets shown in your terminal
11:06:24PMunchstdout is standard output, it's basically just the name for what appears in your terminal
11:06:40PMunchYou also have stderr which is the error stream
11:06:55FromDiscord<5starrss> yall are too smart for me
11:07:12PMunchYou could run a program and pipe these two streams to separate files or into other programs
11:07:21FromDiscord<Phil> Basically if somebody "writes" (using e.g. stdout.styledWriteLine) to stdout it shows up in the terminal.
11:07:26PMunchNot sure how common that is on Windows, but on Linux you do it all the time
11:07:33FromDiscord<Phil> Pmunch, that's a bit far, slow down ^^
11:07:43PMunchHaha, sorry
11:08:10FromDiscord<Phil> We're talking starting out programming, so introducing procs etc first I think is already overdoing it if I remember how I started out
11:08:19FromDiscord<Phil> (edit) "We're talking starting out programming, so introducing procs etc first I think is already overdoing it if I remember how I started out ... " added "with programming"
11:09:04FromDiscord<Phil> In reply to @5starrss "yall are too smart": Nah, smart is thinking fast. We're just old and had the time to learn a lot of this stuff and use it again and again.
11:09:44FromDiscord<5starrss> so if i wrote `stdout.styledWriteLine(fgRed, myText)` its just telling it to make it red
11:09:58FromDiscord<5starrss> in that case i chould do like fgblue
11:10:02FromDiscord<Phil> It's telling it to write whatever string is in `myText` as red
11:10:06FromDiscord<Phil> (edit) "red" => "red, yeah"
11:10:33FromDiscord<Phil> Yep, because fgBlue is one of the other colors that is defined (if you recall the link I gave you earlier)
11:10:40FromDiscord<5starrss> whats this one
11:10:43FromDiscord<5starrss> https://media.discordapp.net/attachments/371759389889003532/1138066686994559048/image.png
11:11:10FromDiscord<Phil> So remember how you can make the text-color change?↵You can also change the background-color instead, I'd need to check which proc allows that
11:11:44FromDiscord<odexine> The same one
11:11:46FromDiscord<odexine> I think
11:12:30FromDiscord<Phil> sent a code paste, see https://play.nim-lang.org/#ix=4CIz
11:14:40FromDiscord<5starrss> okay let me try and put this all together
11:15:47FromDiscord<5starrss> shit
11:15:51FromDiscord<5starrss> im so stupid
11:16:01FromDiscord<Phil> You can btw. also try to play around with some of the other examples
11:16:15FromDiscord<Phil> Hm?
11:16:27FromDiscord<5starrss> https://media.discordapp.net/attachments/371759389889003532/1138068130292322345/image.png
11:16:30FromDiscord<5starrss> whats wrong with this now
11:16:34FromDiscord<5starrss> omg
11:16:39FromDiscord<5starrss> didnt even show the whole thing
11:16:44FromDiscord<5starrss> dont mind the s at the end
11:16:59FromDiscord<5starrss> https://media.discordapp.net/attachments/371759389889003532/1138068261834084362/image.png
11:17:01FromDiscord<5starrss> whats wrong with this
11:17:15FromDiscord<5starrss> is it becuase i didnt proc
11:17:25FromDiscord<Phil> Ah, nah the issue is because of something called indentation
11:17:36FromDiscord<5starrss> lmao what.
11:17:42FromDiscord<5starrss> everything has such a long name
11:17:43FromDiscord<Phil> So a proc is basically a set of instructions
11:17:56FromDiscord<Phil> but to know what things are all part of the proc and what aren't you need to "indent" them
11:17:58FromDiscord<5starrss> but did i get infront of the instructiong
11:18:27FromDiscord<5starrss> so how whould i fix this code ?
11:18:33FromDiscord<Phil> sent a code paste, see https://play.nim-lang.org/#ix=4CIA
11:19:20FromDiscord<Phil> To make sure that it is clear that both ↵`let a = 5` and `echo a` belong to `doAnEcho` they both have 2 spaces at the start, they are "indented"
11:19:36FromDiscord<Phil> (edit) "spaces" => "whitespaces"
11:20:06FromDiscord<jmgomez> sent a code paste, see https://paste.rs/p9EGs
11:20:43FromDiscord<Phil> sent a code paste, see https://play.nim-lang.org/#ix=4CID
11:21:16FromDiscord<Phil> (edit) "https://play.nim-lang.org/#ix=4CID" => "https://play.nim-lang.org/#ix=4CIE"
11:21:35FromDiscord<Phil> Never tried jmgomez, well not yet
11:23:49FromDiscord<5starrss> In reply to @isofruit "You can fix this": there the same ?
11:24:13FromDiscord<5starrss> i cannot even see the diffrence
11:24:15FromDiscord<Phil> Nah, one has 2 whitespaces before the `stdout`.↵That is important for nim to be able to tell it belongs to writeRed
11:24:55FromDiscord<Phil> The bottom one has the stdout pushed slightly to the right, no? https://media.discordapp.net/attachments/371759389889003532/1138070261111984128/image.png
11:26:19FromDiscord<odexine> In reply to @jmgomez "hmm is it me": Should be allowed; might just be an incorrect macro parameter count thing but I don’t know
11:27:27FromDiscord<Phil> Both of those will print an empty string to the terminal btw.
11:27:57FromDiscord<Phil> If you want to print whatever you put into writeRed, you'll need to change it to ↵`stdout.styledWriteLine(fgRed, bgWhite, myText)`
11:33:45FromDiscord<Andreas> recently on HN there was a paper on SLIMalloc ? Has anybody here tried this allocator ? According to the paper it comes with some interesting features i.e. detecting memory-leaks and uses-after-free ?
11:36:19FromDiscord<odexine> Ugh I looked at the paper abstract
11:36:20FromDiscord<odexine> I don’t like their tone xd
11:36:48FromDiscord<Andreas> In reply to @odexine "I don’t like their": 🙂 it makes great claims..
11:36:52FromDiscord<jmgomez> In reply to @odexine "Should be allowed; might": doesnt seem like so, tried with a different number of params
11:37:04FromDiscord<Phil> To get my emoji-fu up there, is xd an expression in and of itself or is that just a miss-typed `xD`?
11:37:11FromDiscord<Phil> (edit) "miss-typed" => "mistyped"
11:37:31FromDiscord<odexine> In reply to @isofruit "To get my emoji-fu": It’s a lowercase XD, I use it like a cringing XD
11:37:41FromDiscord<Phil> Check
11:38:01FromDiscord<odexine> I don’t know how others use it but I’ve seen others use it
11:38:24FromDiscord<Phil> Same, to the point where I was like "This can't be just all those people missing the shift button accidentally"
11:39:02FromDiscord<odexine> Same difference to LOL and lol I guess
11:42:09FromDiscord<jmgomez> In reply to @jmgomez "doesnt seem like so,": well, having the same issue/error in a type field and I think those are allow so probably you are right @odexine
11:42:18FromDiscord<jmgomez> (edit) "allow" => "allowed"
11:42:31FromDiscord<odexine> In reply to @jmgomez "well, having the same": It’s definitely allowed in type fields
11:42:56FromDiscord<jmgomez> yes, but I cant recall the shape of the macro
11:51:57FromDiscord<5starrss> yoo anyone from australia in here ?
11:56:47FromDiscord<jmgomez> In reply to @odexine "It’s definitely allowed in": now Im not so sure about it
12:04:47FromDiscord<odexine> In reply to @5starrss "yoo anyone from australia": Why specifically Australia?
12:18:13*PMunch quit (Quit: Leaving)
12:23:20*PMunch joined #nim
12:26:24FromDiscord<5starrss> In reply to @odexine "Why specifically Australia?": just wondering becuaes im from australia
12:26:33FromDiscord<odexine> Okay
12:26:57FromDiscord<5starrss> do you fucking live in this channel or what that was the fastest respond ever
12:31:18FromDiscord<leetnewb> tagging/responding pushes a notification
12:32:15FromDiscord<odexine> In reply to @5starrss "do you fucking live": You pinged me so I got a notification
12:32:44FromDiscord<5starrss> In reply to @odexine "You pinged me so": oh
12:45:24FromDiscord<arnetheduck> @pmunch any ideas about https://github.com/status-im/nim-chronos/issues/436 ? I thought chronos used to work in the playground, no?
12:48:43PMunchHmm, I would guess it runs out of time for the compilation and execution
12:48:54PMunchOr that it runs out of resources, but that seems less likely
12:49:46PMunchThe VM the playground runs on is seriously underpowered. So I had to nerf how long your program can run and how many resources are available to each instance quite severely
12:53:20PMunchIt's a 2.3Ghz single-core with 1GB of RAM and 25GB of storage
12:54:30PMuncharnetheduck ^
12:54:53FromDiscord<leetnewb> Do you see usage patterns surging around events like a major release / does it make sense to temporarily boost specs?
12:57:02PMunchHmm, good question. Preferably I'd want it to run on something more powerful so it doesn't crash all the time..
12:57:33PMunchI guess I could analyze the Nginx access logs and see if we have traffic spikes..
12:57:51FromDiscord<5starrss> how to center this ?
12:57:53FromDiscord<5starrss> https://media.discordapp.net/attachments/371759389889003532/1138093654288900106/image.png
12:57:57PMunchIt doesn't have any other telemetry
12:58:32FromDiscord<5starrss> hello guys
12:58:35FromDiscord<5starrss> ?
12:58:38FromDiscord<5starrss> anyone
12:58:52FromDiscord<5starrss> In reply to @PMunch "It doesn't have any": how to center this
12:58:54FromDiscord<5starrss> https://media.discordapp.net/attachments/371759389889003532/1138093912922259466/image.png
12:58:59PMunch5starrss, a combination of this: https://nim-lang.org/docs/strutils.html#indent%2Cstring%2CNatural%2Cstring, and this: https://nim-lang.org/docs/terminal.html#terminalWidth
12:59:02PMunchBe patient..
12:59:10FromDiscord<5starrss> alrighty
12:59:56FromDiscord<5starrss> tell me when your ready to tell me how to center it
13:02:20*xet7 quit (Remote host closed the connection)
13:05:07FromDiscord<leetnewb> In reply to @PMunch "I guess I could": If nothing else, that would be pretty interesting to observe.
13:13:40*rockcavera joined #nim
13:38:18FromDiscord<arnetheduck> In reply to @PMunch "Hmm, I would guess": ah, timeout could be it indeed - compile times in general have been creeping up both for nim itself and the libraries .. though for 1.6, it reports chronos is not found at all as a package?
13:47:59PMunchYeah, since the hard-disk space is limited it's only the latest versions which have any packages installed
13:47:59PMunchlatest version*
13:48:12FromDiscord<nomad> How do i add items to a json object?
13:48:26PMunch5starrss, I already told you :) You get the width of the thing you want to print, the width of the terminal, then you subtract one from the other, divide by two, and indent by that amount.
13:48:48PMunchnomad, `myJsonObj["somekey"] = %someval`
13:49:14PMunchAssuming `someval` isn't already a JsonNode, then you don't need the `%`
14:03:09*PMunch quit (Quit: Leaving)
14:13:47FromDiscord<nomad> Im trying to make my code walk through a directory, and if the code finds a file that begins with "LOG" it adds a item which key is the file name and the value is the file contents
14:13:59FromDiscord<nomad> But i cant make it work
14:20:25*junaid_ joined #nim
14:31:27*kenran quit (Remote host closed the connection)
15:01:06FromDiscord<djazz> PMunch: I fixed the PR following your suggestion 🙂 https://github.com/PMunch/futhark/pull/78
15:03:02*xet7 joined #nim
15:07:42FromDiscord<.maverk> sent a code paste, see https://play.nim-lang.org/#ix=4CJZ
15:09:44FromDiscord<griffith1deadly> "welcome " & x ?
15:11:01FromDiscord<.maverk> doesn't work either
15:13:12FromDiscord<griffith1deadly> https://play.nim-lang.org/#ix=4CK1
15:17:12FromDiscord<.maverk> hmmm now it is working
15:17:17FromDiscord<.maverk> thanks
15:17:41FromDiscord<griffith1deadly> maybe you forgot return
15:19:00FromDiscord<.maverk> no
15:19:07FromDiscord<.maverk> return is not required
15:19:15FromDiscord<.maverk> functions returns by default
15:19:45FromDiscord<.maverk> https://media.discordapp.net/attachments/371759389889003532/1138129359576764457/ggd.PNG
15:24:59FromDiscord<that_dude.> Every expression that returns something needs to be captured, could be via a variable or discard statement. If the last expression in a proc doesn't get captured by anything, it returns it/sets it to result
15:29:01*lucasta joined #nim
15:29:12FromDiscord<aph> hi just wondering if anyone translated theforger's win32 api tutorial to nim (or if there is other tutorials to learn them)↵because im lazy and i dont want to rewrite code from c to winim stuff
15:29:30FromDiscord<aph> (edit) "is" => "are"
15:29:52FromDiscord<.maverk> what is the difference between ``let`` and ``const`` they both define constant data but where is the benefit of const then ?
15:30:09FromDiscord<aph> In reply to @.maverk "what is the difference": const is in compile time and let is in runtime iirc
15:30:21FromDiscord<enthus1ast> sent a code paste, see https://play.nim-lang.org/#ix=4CK7
15:30:35FromDiscord<aph> (edit) "In reply to @.maverk "what is the difference": const is in compile time and let is in runtime iirc ... " added "(dont trust me not a pro)"
15:31:14FromDiscord<enthus1ast> let is computed on runtime, but the variable can only once be assigend;↵const is computed on compile time by the nim vm
15:31:47FromDiscord<aph> In reply to @enthus1ast "Any idea why this": dont rlly know sry (┬┬﹏┬┬)
15:32:03FromDiscord<enthus1ast> ah, wait a sec, this must be an converter
15:32:11FromDiscord<.maverk> In reply to @aphkyle "const is in compile": wrong
15:32:50FromDiscord<.maverk> they are both compile-time
15:32:56FromDiscord<enthus1ast> no
15:33:06FromDiscord<.maverk> if let meant for run time i should see executable file
15:33:17FromDiscord<.maverk> but no exe
15:34:04FromDiscord<.maverk> they both produce no exe https://media.discordapp.net/attachments/371759389889003532/1138132962181922876/77463.PNG
15:34:56FromDiscord<enthus1ast> sent a code paste, see https://play.nim-lang.org/#ix=4CK8
15:35:14FromDiscord<enthus1ast> yes, you can only assign a let once
15:35:34FromDiscord<enthus1ast> let is like var, but can only be assigned once
15:37:17FromDiscord<.maverk> aaaaah
15:37:21FromDiscord<.maverk> now i get it
15:39:41FromDiscord<enthus1ast> sent a code paste, see https://paste.rs/59wbG
15:40:38FromDiscord<enthus1ast> sent a code paste, see https://paste.rs/GSa2x
15:40:44FromDiscord<that_dude.> sent a code paste, see https://paste.rs/ZBWQc
15:40:44FromDiscord<.maverk> i know static
15:40:58FromDiscord<.maverk> static used to force the compiler to check everything at compile-time
15:41:07FromDiscord<.maverk> means before producing an executable file
15:41:30FromDiscord<nervecenter> More than that, most of the Nim language can run at compile-time. So a static block can contain almost any code you want
15:41:54FromDiscord<.maverk> In reply to @nervecenter "More than that, most": yes true but everything is checked before exe
15:43:14FromDiscord<nervecenter> Further, `const` values are compile-time, so you can read in a file at compile time using `const afile = read_file(...)` and the file's contents will be incorporated into the executable
15:44:15FromDiscord<.maverk> aww that is awesome i am still new to nim i started it 2 days ago
15:44:36FromDiscord<bostonboston> In reply to @.maverk "they are both compile-time": Let is runtime assignment↵`proc doThing(foo: float) = let bar = foo` is valid
15:45:08FromDiscord<bostonboston> Oops everyone else's answers just loaded, so you get another
15:45:12FromDiscord<.maverk> In reply to @bostonboston "Let is runtime assignment": that is amazing i will try it
15:45:13FromDiscord<.maverk> also
15:45:17FromDiscord<.maverk> user input
15:45:19FromDiscord<.maverk> works ?
15:46:23FromDiscord<bostonboston> You mean like `let input = readLine()`?
15:46:29FromDiscord<.maverk> yes
15:46:31FromDiscord<.maverk> from stdin
15:46:39FromDiscord<bostonboston> Yeah that should be valid
15:46:46FromDiscord<.maverk> awesome
15:46:49FromDiscord<.maverk> i will try it
15:47:36FromDiscord<bostonboston> https://nim-lang.org/docs/rdstdin.html
15:48:23FromDiscord<_alkamist_> How do you call NimMain using vcc? Defining `proc NimMain() {.importc.}` and then calling it works on gcc but on vcc it gives the error `error C2375: 'NimMain': redefinition; different linkage`
16:00:25FromDiscord<_alkamist_> It seems to be because nim isn't putting `N_LIB_EXPORT` on the function prototype.
16:00:48FromDiscord<_alkamist_> Doing `{.emit: "/TYPESECTION/N_LIB_EXPORT N_CDECL(void, NimMain)(void);".}` instead works but I'm wondering if there is a better way.
16:04:55FromDiscord<jos7388> hello friends!!
16:05:13FromDiscord<jos7388> i'm writing a parser in nim
16:05:19FromDiscord<jos7388> i want to express some tokens like this
16:06:51FromDiscord<jos7388> sent a code paste, see https://play.nim-lang.org/#ix=4CKi
16:07:27FromDiscord<jos7388> is there a way to
16:08:33FromDiscord<jos7388> for example
16:09:02FromDiscord<Phil> First of, `case kind: LiteralKind`
16:09:05FromDiscord<jos7388> sent a code paste, see https://paste.rs/PiuL6
16:09:11FromDiscord<Phil> (edit) "LiteralKind`" => "LiteralKind`, the current line won't compile"
16:09:18FromDiscord<jos7388> sure im just going from memory!!
16:09:33FromDiscord<jos7388> but the important part is i want to access those fields without destructuring it first, if they're known statically
16:09:41FromDiscord<Phil> Oh, apologies! I thought the code was copypaste, my bad 😅
16:10:14FromDiscord<jos7388> my bad was a typo
16:10:22FromDiscord<jos7388> but i make all this
16:10:36FromDiscord<jos7388> https://media.discordapp.net/attachments/371759389889003532/1138142156448616618/image.png
16:10:38FromDiscord<jos7388> and then i get an error like this
16:10:48FromDiscord<Phil> `let` is immutable
16:10:51FromDiscord<jos7388> o
16:10:58FromDiscord<Phil> If you want to change anything, use `varǹ
16:11:00FromDiscord<jos7388> wait that works.. huh
16:11:00FromDiscord<Phil> (edit) "`varǹ" => "`var`"
16:11:35FromDiscord<jos7388> oh wow so
16:11:42FromDiscord<jos7388> the compiler actually knows the `kind` statically
16:11:44FromDiscord<jos7388> that's awesome
16:12:11FromDiscord<Phil> sent a code paste, see https://play.nim-lang.org/#ix=4CKm
16:12:22FromDiscord<enthus1ast> what do you mean by destructuring?
16:12:32FromDiscord<Phil> (edit) "https://play.nim-lang.org/#ix=4CKm" => "https://play.nim-lang.org/#ix=4CKn"
16:12:41FromDiscord<jos7388> i meant matching, not destructuring i guess
16:12:49FromDiscord<jos7388> sent a code paste, see https://play.nim-lang.org/#ix=4CKo
16:13:08FromDiscord<Phil> Choose whatever you find more readable.↵I'd chose this for the sole reason that I try to avoid var wherever possible
16:13:20FromDiscord<Phil> (edit) "possible" => "possible, but there's many ways to skin a cat"
16:13:21FromDiscord<jos7388> is there any way to wrap that
16:13:27FromDiscord<jos7388> i need to do some extra work when i create a token
16:13:33FromDiscord<Phil> Define "wrap"
16:13:42FromDiscord<Phil> You could of course write yourself a constructor proc
16:13:47FromDiscord<jos7388> hmm ok
16:13:49FromDiscord<jos7388> yea a template might work
16:13:53FromDiscord<jos7388> i keep forgetting about those features
16:14:05FromDiscord<jos7388> thanks! i'm actually surprised it works even through function invocation
16:14:38FromDiscord<jos7388> sent a code paste, see https://paste.rs/M6g25
16:14:39FromDiscord<jos7388> like this actually works
16:14:45FromDiscord<jos7388> it doesn't complain about not knowing the kind of token on the last line
16:14:49FromDiscord<jos7388> wild!!!!
16:15:08FromDiscord<Phil> sent a code paste, see https://play.nim-lang.org/#ix=4CKq
16:15:21FromDiscord<jos7388> true i can do that too
16:15:28FromDiscord<jos7388> just stick the kind in the function name instead of arg
16:15:48FromDiscord<Phil> Depending on what you find readable, this of course causes the problems that you might start mixing up what is an actual type and what is just a constructor proc
16:15:54FromDiscord<Phil> Your naming scheme also makes perfect sense
16:16:47FromDiscord<Phil> so could of course be `newLiteralToken`↵(Though for nim standards it would be more like `initLiteralToken`, `new` is more associated with creating ref-types)
16:16:55FromDiscord<Phil> (edit) "ref-types)" => "ref-types, init for value types)"
16:17:20FromDiscord<jos7388> ah ok
16:17:23FromDiscord<jos7388> nice tip
16:17:30FromDiscord<jos7388> i'll change that too
16:17:35FromDiscord<jos7388> i did see there was like a typeclass for init
16:17:44FromDiscord<jos7388> or whatever u call it in nim, concept?
16:18:02FromDiscord<Phil> My brain is slightly fried from work, what do you mean by typeclass for init?
16:18:37FromDiscord<Phil> There is something interface-like which is called `concept`, it basically checks if an object of a given type has arbitrary ability X, whatever you define in that concept.
16:19:33FromDiscord<Phil> (edit) "an object" => "a variable"
16:19:55FromDiscord<jos7388> ye i think `init` is one of those, no?
16:20:08FromDiscord<jos7388> or at least its like a convention that you could put behind a concept
16:20:19FromDiscord<jos7388> `init(self: Token)`
16:20:24FromDiscord<jos7388> rather than `initToken()`
16:20:28FromDiscord<jos7388> or `init[Token]`?
16:20:31FromDiscord<jos7388> i think last
16:21:35FromDiscord<Phil> sent a code paste, see https://play.nim-lang.org/#ix=4CKr
16:22:24FromDiscord<Phil> In reply to @jos7388 "or `init[Token]`?": It would be more `init(Token)` but that is not a hard convention at all
16:22:49FromDiscord<Phil> Official guides go for `newToken`/`initToken`, I prefer overloading `new` and `init`
16:23:07FromDiscord<Phil> Well more init, I don't think you can overload new (?)
16:24:02FromDiscord<Phil> nevermind, you can overload `new`
16:26:30FromDiscord<jos7388> dang `inferGenericTypes` is a feature now
16:26:34FromDiscord<jos7388> so cool.. i love nim!!
16:26:54Amun-RaI moved from using initType() to init(T: typedesc[Type])
16:27:05FromDiscord<Phil> sam
16:27:10FromDiscord<Phil> (edit) "sam" => "same"
16:29:53FromDiscord<jos7388> is there any way to apply a pragma to an entire package
16:30:23FromDiscord<jos7388> i want `{.experimental "codeReordering".}` to be enabled across my entire project
16:30:36FromDiscord<jos7388> it might be the LSP freaking out but if i put it in the main module it doesn't work
16:31:23FromDiscord<jos7388> nvm even without the LSP just compiling it doesn't work either
16:35:00FromDiscord<jos7388> aha there's a cli switch.. genius!!
16:36:26FromDiscord<jos7388> wow.. inferGenericTypes added 4 daysa go
16:36:28FromDiscord<jos7388> (edit) "daysa go" => "days ago"
16:36:35FromDiscord<jos7388> homebrew is out of date by 3 days i can't use it
16:36:39FromDiscord<jos7388> <:sad_kermit:763192714085793853>
16:39:26FromDiscord<jos7388> wow choosenim works on macos arm64 now
16:39:34FromDiscord<jos7388> infergenerictypes makes my code so much better no more `none[Token]`
16:39:40FromDiscord<jos7388> i LOVE the changes over the last few months!! nim rules!!
16:39:44FromDiscord<jos7388> :peppodance:
16:41:15*lucasta quit (Quit: Leaving)
16:47:03FromDiscord<nomad> how can i send a file as multipart data with httpclient?
16:51:48FromDiscord<Phil> https://nim-lang.org/docs/httpclient.html#post%2CHttpClient%2C%2Cstring%2CMultipartData↵post has a multipart parameter which accepts a ref object
16:56:25FromDiscord<crim4> sent a code paste, see https://play.nim-lang.org/#ix=4CKy
16:57:24FromDiscord<Phil> I don't understand, what is the problem?↵Are you looking for a printString equivalent?↵That's echo
16:57:57FromDiscord<crim4> im looking for a way to call functions attached to an object
16:58:03FromDiscord<Phil> sent a code paste, see https://play.nim-lang.org/#ix=4CKz
16:58:18FromDiscord<Phil> Wait, are you looking for the syntax or dynamic dispatch?
16:58:40FromDiscord<crim4> im lookint for the semantic, noy the syntax neither the ds
16:59:04FromDiscord<Phil> sent a code paste, see https://play.nim-lang.org/#ix=4CKA
16:59:21FromDiscord<Phil> (edit) "https://play.nim-lang.org/#ix=4CKA" => "https://play.nim-lang.org/#ix=4CKB"
16:59:37FromDiscord<Phil> (edit) "https://play.nim-lang.org/#ix=4CKB" => "https://play.nim-lang.org/#ix=4CKC"
16:59:41FromDiscord<crim4> mh yea, not this stuff in sorry for the bad explaination
16:59:53FromDiscord<Phil> If you're looking for dynamic dispatch then you're looking for methods
17:00:01*azimut joined #nim
17:00:19*rockcavera quit (Ping timeout: 260 seconds)
17:00:24FromDiscord<Phil> (edit) "methods" => "`method`s"
17:01:47FromDiscord<crim4> sent a code paste, see https://play.nim-lang.org/#ix=4CKE
17:02:27FromDiscord<crim4> you can call print from any place
17:02:49FromDiscord<Phil> Oh, as in a proc that is globally available even without importing it?
17:03:03FromDiscord<crim4> and still get it work whether any_t has a method called tostring
17:03:05FromDiscord<Phil> Okay, you're looking for a prelude
17:03:28FromDiscord<crim4> In reply to @crim4 "and still get it": and that doesn't require dyn disp
17:03:38FromDiscord<crim4> just because c++ has methods
17:03:57FromDiscord<crim4> In reply to @isofruit "Okay, you're looking for": ok thanks let me document about it
17:04:00FromDiscord<Phil> Oh, it's just "if this proc exists and takes in a parameter of this type, make it work" kind of things?
17:04:49FromDiscord<Phil> Actually you might not, I'm still confused
17:05:13FromDiscord<Phil> If you just want to basically have a sort of "global import" of lib.nim that is always available in any module, that is a prelude.
17:05:19FromDiscord<Phil> (edit) "module," => "module in your project,"
17:05:38FromDiscord<Phil> God where were the docs on this...
17:07:44*rockcavera joined #nim
17:07:44*rockcavera quit (Changing host)
17:07:44*rockcavera joined #nim
17:08:07FromDiscord<crim4> In reply to @isofruit "Actually you might not,": mh yes the doc talks about a way to import basic std modules
17:08:24FromDiscord<crim4> definitely not what i need but thanks
17:09:01FromDiscord<crim4> In reply to @isofruit "If you just want": mhh im not sure its the same thing
17:09:02FromDiscord<Phil> Like the goal is to be able to call `print` from any module in your project even without importing `lib.nim`?
17:09:53FromDiscord<Phil> Or is it to be able to call `print` with any type after you imported `lib.nim`, because that sounds just like any normal generic does
17:10:37FromDiscord<that_dude.> Maybe your looking for mixin?
17:10:50FromDiscord<crim4> basically from lib.nim you can call a .f() function on an argument
17:11:09FromDiscord<crim4> but that .f is not declared in lib.nim
17:11:36FromDiscord<crim4> its just an attached method to the type of the argument
17:12:02FromDiscord<crim4> In reply to @isofruit "Like the goal is": no
17:12:04FromDiscord<crim4> sorry my bad
17:12:23FromDiscord<that_dude.> Usually it doesn't make sense to only have the type without any helpers
17:12:30FromDiscord<rio> testing (ignore)
17:12:40FromDiscord<that_dude.> Could you pass in the proc as an argument?
17:13:06FromDiscord<that_dude.> https://nim-lang.org/docs/manual.html#generics-mixin-statement Also what about this? is it close to what you want?
17:13:19FromDiscord<crim4> In reply to @that_dude. "Could you pass in": mh it would require runtime stuff
17:13:38FromDiscord<Phil> sent a code paste, see https://play.nim-lang.org/#ix=4CKJ
17:14:08FromDiscord<Phil> (edit) "https://play.nim-lang.org/#ix=4CKJ" => "https://play.nim-lang.org/#ix=4CKK"
17:14:49FromDiscord<Phil> (edit) "https://play.nim-lang.org/#ix=4CKK" => "https://play.nim-lang.org/#ix=4CKL"
17:15:33FromDiscord<01r> tesing (igno...)
17:15:47FromDiscord<01r> (edit) "(igno...)" => "(ignore)"
17:16:03FromDiscord<crim4> In reply to @that_dude. "https://nim-lang.org/docs/manual.html#generics-mixi": ah yes perfect
17:16:06FromDiscord<huantian> sent a code paste, see https://paste.rs/Yq7bg
17:16:14FromDiscord<crim4> thank you so much
17:16:24FromDiscord<that_dude.> In reply to @crim4 "ah yes perfect": Just be careful, you're making the promise it exists and the compiler trusts you on it
17:16:28FromDiscord<Phil> So you wanted to capture a proc in the scope of the generic-definition rather than the place of its instantiation?
17:16:36FromDiscord<huantian> (edit) "https://play.nim-lang.org/#ix=4CKO" => "https://play.nim-lang.org/#ix=4CKN"
17:16:40FromDiscord<huantian> In reply to @that_dude. "Just be careful, you're": well it still won't compile if it doesn't exist
17:16:49FromDiscord<huantian> it'll just give a slightly more annoying and harder to read error message
17:17:07FromDiscord<that_dude.> In reply to @huantian "it'll just give a": Kinda where I was going with it lol
17:17:18FromDiscord<crim4> In reply to @that_dude. "Just be careful, you're": im away from pc for days, what happens if the mixin-ed symbols is not declared
17:17:50FromDiscord<Phil> Oh wait, other way round, you wanted to tell the compiler "this proc will exist, but only where the proc is called, not here where it's defined"
17:18:03FromDiscord<Phil> (edit) "Oh wait, other way round, you wanted to tell the compiler "this proc will exist, but only where the ... proccalled" added "generic" | "called," => "called from,"
17:18:50FromDiscord<that_dude.> Actually the error message should be fine. It just works like a normal one saying something like `Error: undeclared identifier: 'other'`
17:20:04NimEventerNew thread by morturo: Unsure about lifetime-tracking hooks, see https://forum.nim-lang.org/t/10383
17:20:12FromDiscord<crim4> In reply to @isofruit "Oh wait, other way": kind of
17:20:23FromDiscord<crim4> thank you all
17:21:58*rockcavera quit (Read error: Connection reset by peer)
17:22:39*rockcavera joined #nim
17:22:39*rockcavera quit (Changing host)
17:22:39*rockcavera joined #nim
17:24:33FromDiscord<.maverk> is using ``return`` considered a good practice ? i know if i didn't assign the value to a variable i won't need to return it is gonna be returned automatically
17:25:54FromDiscord<Phil> I don't think there's consensus.↵I tend to prefer using return, but even that's not an ironclad rule.↵Often enough a proc is literally just building an instance of type A from an input and sometimes I just use result for those
17:26:30FromDiscord<Phil> The folks from status made a statement somewhere that they avoid result and only use return as it was a source of bugs for them.↵Not quite sure how, but maybe that was because of macro stuff
17:26:41FromDiscord<that_dude.> Depends on how you format code. Some people want the functions to look nice and use implicit return, others want to make sure that the function always reaches the bottom for consistency via result, and then some people simply want to end the function when some specific branch is reached. It's just preference tho ime \
17:26:43FromDiscord<that_dude.> (edit) removed "\"
17:27:06FromDiscord<.maverk> i see
17:27:18FromDiscord<.maverk> i think i have to work more on it
17:27:24FromDiscord<.maverk> to get a good grasp of it
17:28:29FromDiscord<Phil> A hard rule I have is though that if I have guard-clauses for early returns, I 100% use only return in that proc
17:29:16FromDiscord<Phil> sent a code paste, see https://play.nim-lang.org/#ix=4CKQ
17:29:28FromDiscord<Phil> (edit) "https://play.nim-lang.org/#ix=4CKQ" => "https://play.nim-lang.org/#ix=4CKR"
17:29:46FromDiscord<that_dude.> Imo I use implicit when it's a simple calculation that doesn't have a lot of logic in it, result if I need to modify the output multiple times (think incrementing a sum) or return for early returns or standard business procs
17:30:06FromDiscord<Phil> I mean if it's simple I just inline it
17:30:22FromDiscord<Phil> `proc myProc(a,b: int): int = a + b
17:30:24FromDiscord<Phil> (edit) "b" => "b`"
17:31:14*pbsds quit (Ping timeout: 260 seconds)
17:33:39FromDiscord<Chronos [She/Her]> Hey could someone explain how seqs work? They work by putting stuff onto the stack and storing pointers to the elements in the heap, right?
17:45:42FromDiscord<Phil> sent a long message, see http://ix.io/4CKX
17:46:06FromDiscord<Phil> (edit) "http://ix.io/4CKX" => "http://ix.io/4CKY"
17:51:24FromDiscord<bostonboston> Seq have a capacity and a length as well, If I remember correctly the capacity is on the heap with the data, length is how many elements are in the seq and capacity denotes how much memory has been allocated. The data is also contiguous in memory
17:52:50*pbsds joined #nim
17:59:01FromDiscord<Chronos [She/Her]> In reply to @isofruit "Hmm my mental model": Ah
17:59:16FromDiscord<Chronos [She/Her]> Honestly debating on if I need something like ropes for efficiency
18:12:57FromDiscord<codic> sent a long message, see https://paste.rs/N5FKX
18:14:43FromDiscord<adokitkat> Does someone please now how to develop 2 nimble packages while one depends on the other? ↵Both are forks and when I use `nimble develop` on any of them it works but only for the package in which directory I am in. ↵I need to have `requires package2` in `package1` to point to other one I am modifying, not the system-wide original package (which I cannot delete because of the unwanted dependency).
18:16:09FromDiscord<Phil> I'd have first developed them as one package until you've got an mvp, then split them apart and develop inepdendently
18:16:31FromDiscord<Phil> Then your package A can depend on old versions of package B and vice versa as needed.
18:16:59FromDiscord<Phil> Should have a clearly defined interface between the two though
18:23:05FromDiscord<morgan> is there a way to print the type in a template? i'm trying to hack nimpng to correctly export a 16 bit grayscale image and it's creating an 8 bit seq
18:24:05FromDiscord<Phil> what's not working on `echo $someVar.type()`?
18:25:54FromDiscord<morgan> ah i'll try that
18:26:05FromDiscord<morgan> i just tried echo(T)
18:27:04FromDiscord<morgan> well echo($T) doesn't work
18:27:41FromDiscord<Phil> Okay, show me your template, are you passing a typedesc directly?
18:28:10FromDiscord<Phil> Basically, minimal example and so on
18:28:15FromDiscord<morgan> sent a code paste, see https://play.nim-lang.org/#ix=4CLa
18:28:20FromDiscord<Phil> That's nota template, that's a generic
18:28:33FromDiscord<morgan> oh right
18:28:33FromDiscord<Phil> or rather that shouldn't be a templet if you use it as a generi
18:28:34FromDiscord<Phil> (edit) "generi" => "generic"
18:28:38FromDiscord<morgan> well
18:28:46FromDiscord<morgan> im modifying existing code
18:28:57FromDiscord<morgan> to add in uint16 as an option
18:29:19FromDiscord<morgan> idk what T is other than not string
18:29:26FromDiscord<Phil> sent a code paste, see https://play.nim-lang.org/#ix=4CLb
18:30:11FromDiscord<morgan> well nimpng had it as a template
18:30:18FromDiscord<morgan> so im not gonna change that
18:30:35FromDiscord<morgan> i just wanna make it actually work for writing 16 bit grayscale images
18:30:58FromDiscord<morgan> also echo($T) causes an error
18:33:19FromDiscord<Phil> ... okay, what in the
18:33:37FromDiscord<Phil> I'm looking at the original implementation and I'm getting a lot of wtf's per second out of me
18:33:58FromDiscord<Phil> elegantbeef, Rika, PMunch, any idea when you would ever want a generic template of all things?
18:34:04FromDiscord<morgan> > lineinfos.nim(291) raiseRecoverableError↵> Error: unhandled exception: cannot extract string from invalid AST node [ERecoverableError]
18:34:33FromDiscord<Phil> and by that I mean something with this signature:↵`template newStorage[T](size: int): auto =`↵https://github.com/jangko/nimPNG/blob/82cfffd91582baeffa2e2a6895c97fa2112f1c30/nimPNG.nim#L278
18:36:19FromDiscord<Phil> sent a code paste, see https://play.nim-lang.org/#ix=4CLf
18:37:20FromDiscord<Phil> The newStorage template only gets used roughly 12 or so times and its all in the same file.↵Just removing that type from the template trying to make it generic and pushing it into the proc parameters should do the trick.
18:37:32FromDiscord<Phil> (edit) "file.↵Just" => "file, replacing that seems doable↵Just"
18:37:40FromDiscord<Phil> (edit) "The newStorage template only gets used roughly 12 or so times and its all in the same file, replacing that seems doable↵Just removing that type from the template ... trying" added "which is"
18:41:40FromDiscord<Chronos [She/Her]> Trying to think... How would I split a rope? Surely it's possible without needing to flatten it out
18:42:25FromDiscord<Chronos [She/Her]> Would require traversal code but surely I could have an internal counter until I reach the index I want to split the rope at
18:42:27FromDiscord<Phil> Never even heard the concept of a rope in programming ^^'
18:42:36FromDiscord<Chronos [She/Her]> std/ropes aha
18:43:08FromDiscord<Phil> Ohh basically a string so long you get a rope
18:43:19FromDiscord<Phil> Yeah that's so low level it's beyond me
18:46:49FromDiscord<morgan> iirc, a rope is a string that's cut up into sections (seq?), i think it would involve checking each string if it has a point to split at, and if not, it goes in with the last one
18:47:12FromDiscord<Phil> Are ropes a common data type?
18:47:24FromDiscord<morgan> also i moved the error, i had to use seq[uint16] as T
18:47:28FromDiscord<morgan> no clue
18:50:52FromDiscord<morgan> ok i got it to export, it's very wrong lmao
18:50:58FromDiscord<morgan> i should test with 8 bit
18:51:06FromDiscord<morgan> to make sure my code is correct
18:52:26FromDiscord<morgan> https://media.discordapp.net/attachments/371759389889003532/1138182880619663380/invdist_kernel_512.png
18:55:48FromDiscord<morgan> 8 bit isn't working right either lol, so it might be my code
18:56:04FromDiscord<morgan> oh maybe i shouldm
18:56:10FromDiscord<morgan> (edit) "shouldm" => "shouldn't use casts"
18:57:23*junaid_ quit (Remote host closed the connection)
19:02:53FromDiscord<morgan> i think it's still my code https://media.discordapp.net/attachments/371759389889003532/1138185510188236950/invdist_kernel_512.png
19:05:40FromDiscord<Phil> Okay this is kind of getting into weird territory a bit
19:06:25FromDiscord<djazz> looks like dithering lol
19:06:41FromDiscord<Phil> I meant more the thing I was about to write ^^
19:07:28FromDiscord<morgan> yeah i think something is wrong with how it's interpreting the data
19:08:20FromDiscord<morgan> https://media.discordapp.net/attachments/371759389889003532/1138186881662734428/invdist_kernel_512.png
19:08:54FromDiscord<morgan> maybe i should only turn it to an int at the end when im converting the tensor to a seq
19:09:53FromDiscord<Phil> sent a code paste, see https://play.nim-lang.org/#ix=4CLq
19:10:08FromDiscord<Phil> Because `generateMapCall` only builds the NimNode, it doesn't evaluate it in any manner
19:10:29FromDiscord<Phil> mapper only kind of inserts the NimNodes with the expressions into a procBody, I'm not sure that gets evaluated there either
19:11:01FromDiscord<Phil> (edit) "https://play.nim-lang.org/#ix=4CLq" => "https://play.nim-lang.org/#ix=4CLr"
19:12:09FromDiscord<Phil> I'm also uncertain if it is even possible to bind a generic proc since generic procs aren't real
19:16:42FromDiscord<morgan> yeah if i switch everything over to 8 bit it works
19:16:43FromDiscord<morgan> grr
19:17:08FromDiscord<morgan> i don't really need 16 bit for this but i do need it for other stuff
19:18:21FromDiscord<Phil> maybe there's weird stuff with int and uint?
19:19:08FromDiscord<Chronos [She/Her]> In reply to @isofruit "Ohh basically a string": Helpful for when dealing with very very long strings for editing code for example
19:19:50FromDiscord<Chronos [She/Her]> Also hi fellow transfem
19:19:51FromDiscord<morgan> it is nice to see something intended coming out of it tho https://media.discordapp.net/attachments/371759389889003532/1138189782602764389/invdist_kernel_512.png
19:20:08FromDiscord<Phil> Oh, that looks kinda nice!
19:20:22FromDiscord<Phil> Like a flashlight shining into the abyss
19:20:33FromDiscord<morgan> yea i'm going to use it for prebaked glow convolution
19:21:12FromDiscord<morgan> horizontal for the value it writes in a line, vertical for the input level on the second pass, since it's not normally separable
19:21:17FromDiscord<Phil> The fascinating thing is it looks brighter the longer I look at it
19:21:27FromDiscord<Phil> But at the first moment basically just black
19:22:18FromDiscord<morgan> and part of my plan is that i can scale the prebaked glow images to change the percieved intensity, but that requires a lot of dynamic range
19:22:33FromDiscord<morgan> hence 16 but
19:22:38FromDiscord<morgan> (edit) "but" => "bit"
19:24:24FromDiscord<morgan> i scaled the distance on that so it was even visible
19:24:40FromDiscord<morgan> 10 times wider than it would be
19:25:13FromDiscord<morgan> and it's just 1 divided by the distance, but i think it's a really good model of light falloff
19:25:26FromDiscord<morgan> compared to a gaussian blur for example
19:40:25*advesperacit quit ()
20:21:19*ntat quit (Quit: leaving)
20:55:16FromDiscord<dersnof> what is Nim used best for
20:59:14FromDiscord<huantian> programming
20:59:30FromDiscord<roupi.rb> lol
20:59:49FromDiscord<dersnof> wow
21:00:21FromDiscord<roupi.rb> you should add a "hope i was useful"
21:09:39FromDiscord<saint._._.> sent a code paste, see https://play.nim-lang.org/#ix=
21:09:50FromDiscord<saint._._.> I'm getting this as an error in my nim lsp the moment I open any file
21:10:10FromDiscord<saint._._.> Any idea what is going on?
21:57:11FromDiscord<morgan> welp i think im gonna instead store 32 bits in a rgba png as 4 chunks of 8 bits
21:57:36FromDiscord<morgan> as long as my code on the other end handles that it should be fine
21:58:15FromDiscord<morgan> and one of them would be the 8 bit version of it assuming it's the same range and not prescaled for more range when added at runtime
21:58:31FromDiscord<morgan> oh yeah just do 24 bit rgb then
22:05:43FromDiscord<Phil> Do we have any way of annotating proc parameters in a way that other macros can pick up?↵Because I know I can annotate parameters with a pragma, I just can't see them afterwards in the AST
22:06:20FromDiscord<Phil> And using hasCustomPragma is a tad difficult on NimNode, at least for me that's not working successfully
22:07:19FromDiscord<ieltan> sent a long message, see http://ix.io/4COE
22:16:15*jmdaemon joined #nim
22:17:54FromDiscord<bostonboston> The other huge sell for Nim is that it compiles to C before machine code, meaning that anything that has a C compiler can run nim
22:32:51FromDiscord<ieltan> sent a long message, see http://ix.io/4COJ
22:33:16FromDiscord<ieltan> (edit) "http://ix.io/4COJ" => "http://ix.io/4COK"
22:39:32FromDiscord<that_dude.> In reply to @isofruit "Do we have any": Would effects be useful here?
22:40:25FromDiscord<that_dude.> Though I think they're proc only
22:43:15*xet7 quit (Remote host closed the connection)
22:43:56FromDiscord<morgan> In reply to @ieltan "There is also a": ooo
22:55:18*xet7 joined #nim
23:35:19FromDiscord<5starrss> how whould i center this guys?
23:42:16FromDiscord<5starrss> https://media.discordapp.net/attachments/371759389889003532/1138255819666886809/image.png
23:44:33FromDiscord<intellij_gamer> Probably a combo of [align](https://nim-lang.org/docs/strutils.html#align%2Cstring%2CNatural%2Cchar) and [terminalWidth](https://nim-lang.org/docs/terminal.html#terminalWidth)
23:47:48FromDiscord<5starrss> can you help me 😦
23:48:34FromDiscord<5starrss> im gonna go whatch some youtube tutorials
23:48:40FromDiscord<5starrss> but im in class rn
23:48:51FromDiscord<5starrss> and there's really not that much tutorials
23:51:42FromDiscord<leetnewb> What part of those functions is tripping you up?
23:54:25FromDiscord<nomad> is pixie a pure library?
23:55:20FromDiscord<5starrss> In reply to @leetnewb "What part of those": everything im so new to nim
23:55:32FromDiscord<5starrss> im trying to find a good tutorail but i cant 🤣
23:57:49FromDiscord<leetnewb> It might not answer this specific question, but you might consider reading some of this: https://ssalewski.de/nimprogramming.html
23:57:55FromDiscord<ajusa> In reply to @nomad "is pixie a pure": Yes? No non-Nim dependencies if that's what you are asking
23:59:11FromDiscord<nomad> In reply to @ajusa "Yes? No non-Nim dependencies": so no dlls needed?