<< 22-12-2021 >>

00:01:55FromDiscord<Forest> Is it possible to use asynchronous code and multiprocessing at once? Would it be better to stick to one or would utilising both be a good idea? I'm working on a (small) implementation of an MC server that should be as fast as possible
00:05:37*noeontheend quit (Ping timeout: 240 seconds)
00:28:00FromDiscord<Elegantbeef> You can use async with multithreading though it might make it more annoying to debug
00:42:35FromDiscord<IsaacPaul> damn std/wrapnils is .... meh
00:43:25FromDiscord<Elegantbeef> What's meh about it?
00:44:02FromDiscord<Forest> Ah okay, thanks!
00:48:44FromDiscord<IsaacPaul> sent a code paste, see https://play.nim-lang.org/#ix=3J53
00:49:54FromDiscord<Elegantbeef> I mean the default should be an optional
00:50:08FromDiscord<Elegantbeef> But i dont really see the issue with the syntax
00:50:32FromDiscord<Elegantbeef> I also dont use references much so i'm the wrong person 😀
00:52:20FromDiscord<IsaacPaul> from the docs it seems like its not an optional unless assigned to one.. I would rather it just not work lmbo
00:52:45FromDiscord<Elegantbeef> I more mean "It should've been default to begin with"
00:52:59FromDiscord<Elegantbeef> there is the `??` variant which returns an optional
00:54:54FromDiscord<IsaacPaul> yea that variant for my use case.. still not happy with syntax lol like I said meh
00:55:00FromDiscord<IsaacPaul> works
00:56:45FromDiscord<Elegantbeef> Suppose it could be done using `[?]` since we cannot do prefix 😀
00:56:59FromDiscord<Elegantbeef> Postifx i mean
00:59:33FromDiscord<Elegantbeef> Perhaps not
01:00:50FromDiscord<IsaacPaul> hmm it doesn't seem to work for optionally calling functions. Perhaps I'm just misinterpreting it's usecase
01:06:28FromDiscord<Elegantbeef> `??` returns an optional over the entire tree so if any is nil it returns none else true
01:07:20FromDiscord<Elegantbeef> I'm abusing unicode to achieve the funny impl https://play.nim-lang.org/#ix=3J5c
01:13:20FromDiscord<IsaacPaul> hmm
01:13:40FromDiscord<IsaacPaul> This basically tells me I know nothing about macros lol
01:14:27FromDiscord<Elegantbeef> Lol
01:14:37FromDiscord<Elegantbeef> There isnt any reason to use a macro here
01:15:09FromDiscord<Elegantbeef> sent a code paste, see https://play.nim-lang.org/#ix=3J5d
01:15:17FromDiscord<Elegantbeef> Anyway it's a silly toy really, i was just wanting to see if there was a way to get `[?]` to work
01:15:35FromDiscord<Elegantbeef> But since `?` is an operator you cannot use it inside `[]` or have a type named it
01:16:09FromDiscord<Elegantbeef> sent a code paste, see https://play.nim-lang.org/#ix=3J5e
01:17:39FromDiscord<IsaacPaul> honestly if I can get `a.child?.child?.child` to work or `a.child?.childProc()` I'd be happy
01:18:16FromDiscord<Elegantbeef> Nim doesnt have postfix operators so sadly that cannot
01:18:25FromDiscord<Elegantbeef> Which is why `?` is prefix
01:19:37FromDiscord<Elegantbeef> The only postfix operators in nim are `[]``{}` and `` and the last can only be used in exporting
01:20:18FromDiscord<IsaacPaul> ah so that's why your stuff works
01:20:40FromDiscord<Elegantbeef> Yep
01:22:42FromDiscord<Elegantbeef> Oh actually
01:26:48FromDiscord<Elegantbeef> Thought maybe `?.` might be usable as you want but i think not
01:29:04FromDiscord<IsaacPaul> I'm playing around with your example.. just to see
01:29:27FromDiscord<Elegantbeef> It's very much a toy so there be dragons 😛
01:35:00*krux02 quit (Remote host closed the connection)
01:50:48FromDiscord<Elegantbeef> So it seems that type of syntax is possible https://play.nim-lang.org/#ix=3J5o so if you want to make wrap nils like the others it's possible it seems
02:05:27FromDiscord<TurtleP> sent a code paste, see https://play.nim-lang.org/#ix=3J5s
02:05:44FromDiscord<TurtleP> (edit) "https://play.nim-lang.org/#ix=3J5s" => "https://play.nim-lang.org/#ix=3J5t"
02:06:01FromDiscord<TurtleP> (edit) "https://play.nim-lang.org/#ix=3J5t" => "https://play.nim-lang.org/#ix=3J5u"
02:15:48*arkurious quit (Quit: Leaving)
02:59:29FromDiscord<Leonardo da Vinci> Hello!!
03:02:02FromDiscord<Elegantbeef> Hello
03:03:22FromDiscord<Leonardo da Vinci> In reply to @Elegantbeef "Hello": Are you human?
03:04:25FromDiscord<that_dude> sent a code paste, see https://play.nim-lang.org/#ix=3J5z
03:04:36FromDiscord<Elegantbeef> I'm only human on days that end with Y
03:05:22FromDiscord<Elegantbeef> try `[modify.addr]`
03:06:05FromDiscord<Elegantbeef> What's the entire error?
03:06:08FromDiscord<that_dude> same error
03:06:23FromDiscord<Elegantbeef> Oh did you not `import std/tables`?
03:06:49FromDiscord<Elegantbeef> If the module calling this doesnt have `tables` imported it'll error
03:06:59FromDiscord<that_dude> I do have tables imported
03:07:08FromDiscord<Elegantbeef> Full error then
03:07:10FromDiscord<that_dude> sent a code paste, see https://play.nim-lang.org/#ix=3J5A
03:07:15FromDiscord<Elegantbeef> Yea it's a tables import issue
03:07:28FromDiscord<Elegantbeef> inside this module do you have `std/tables` imported?
03:07:31FromDiscord<that_dude> Yeah
03:07:31*rockcavera quit (Remote host closed the connection)
03:07:39FromDiscord<Elegantbeef> The one calling or the one with the macro?
03:07:48FromDiscord<that_dude> The one with the macro
03:07:58FromDiscord<Elegantbeef> do `export tables` in that module
03:08:15FromDiscord<that_dude> where should I put it?
03:08:31FromDiscord<Elegantbeef> Anywhere after you import tables
03:08:31FromDiscord<that_dude> right under the import?
03:08:39FromDiscord<Elegantbeef> That's preferable
03:09:06FromDiscord<Elegantbeef> The issue is that you dont have `[]` in the module that imports this so it doesnt know how to do `table[key]`
03:09:27FromDiscord<that_dude> I think I understand
03:09:47FromDiscord<that_dude> could this also have been fixed if I imported tables in the other module?
03:09:52FromDiscord<Elegantbeef> Yes
03:10:00FromDiscord<Elegantbeef> Afterall that's what you're doing
03:11:24*stosby joined #nim
03:11:25FromDiscord<that_dude> Cool.
03:11:28FromDiscord<that_dude> Will prob be back
03:11:37FromDiscord<Elegantbeef> This is the second import issue today
03:11:49FromDiscord<Elegantbeef> Seems to be common recently
03:12:38FromDiscord<that_dude> Well from what I could understand, the error said that the method to get the value doesn't exist, but I had already done the correct import
03:13:15*stosby quit (Read error: Connection reset by peer)
03:13:20FromDiscord<that_dude> I'm assuming it's because its a macro specific thing that tried to put code that required tables in the file that doesn't have them
03:13:20FromDiscord<Elegantbeef> The issue is cause of where the code is emitted
03:13:39FromDiscord<Leonardo da Vinci> In reply to @Elegantbeef "I'm only human on": I don't understand Mr bot
03:13:46FromDiscord<Elegantbeef> I'm not a robot
03:13:53FromDiscord<Elegantbeef> I'm a human using the matrix bridge
03:14:02FromDiscord<impbox [ftsf]> that's just what a robot would say
03:14:14FromDiscord<that_dude> He's a robot, but a damn good one
03:14:17FromDiscord<Elegantbeef> Impbox more like shitbox amirite!
03:14:24FromDiscord<impbox [ftsf]> better than human
03:14:39FromDiscord<impbox [ftsf]> rude bot!
03:14:48FromDiscord<Elegantbeef> Bad bot bad?
03:14:54FromDiscord<Rika> unplug him!
03:16:09FromDiscord<Elegantbeef> I have internal batteries something about mitochondria being the powerhouse of the cell
03:16:37FromDiscord<Rika> remove his mitochondria!
03:17:10FromDiscord<Elegantbeef> We're going to be here for a while
03:17:45FromDiscord<TryAngle> sent a code paste, see https://play.nim-lang.org/#ix=3J5D
03:18:32FromDiscord<Elegantbeef> sent a code paste, see https://play.nim-lang.org/#ix=3J5E
03:18:33FromDiscord<Elegantbeef> Though that allocates so not ideal
03:18:55FromDiscord<Rika> i mean its the smae
03:18:56FromDiscord<Rika> same
03:19:13FromDiscord<Rika> its close enough i mean
03:19:28FromDiscord<Elegantbeef> Yea if you care about allocations then you'll need your own
03:19:29FromDiscord<TryAngle> does it also allocates in use with arrays?
03:19:30FromDiscord<Rika> if you want an iterator beef is probably typing one up rioght now
03:19:39FromDiscord<Elegantbeef> Lol
03:19:45FromDiscord<Elegantbeef> I could be but i wasnt at the moment
03:19:49FromDiscord<Elegantbeef> So many libraries offer it i reason
03:19:54FromDiscord<Rika> never know with you you code monkey
03:20:01FromDiscord<Rika> smh
03:20:35FromDiscord<Elegantbeef> Yea i do write a lot of stupid code
03:20:41FromDiscord<TryAngle> sent a code paste, see https://play.nim-lang.org/#ix=3J5F
03:20:43FromDiscord<Elegantbeef> And then there's the code i share here
03:20:45FromDiscord<TryAngle> In reply to @Elegantbeef "Yea i do write": don't we all 😔
03:21:04FromDiscord<Elegantbeef> Ugh i'm trying herbsluftwm now and oh boy is it an experience
03:21:05FromDiscord<Rika> yeah given that attitude
03:21:14FromDiscord<Rika> you're trying what
03:21:31FromDiscord<Elegantbeef> A dynamic tiling window manager 😛
03:21:32FromDiscord<TryAngle> In reply to @Elegantbeef "Ugh i'm trying herbsluftwm": oh, what is it like, I want to switch to that exact wm when I finally build my new pc next month
03:21:40FromDiscord<TryAngle> heard only good things
03:21:47FromDiscord<Elegantbeef> It's pretty nifty so far i like some of the things it has
03:21:57FromDiscord<Elegantbeef> I3wm always pissed me off with it's static tiling
03:22:03FromDiscord<TryAngle> I had bspwm before but had some issues
03:22:17FromDiscord<Elegantbeef> Bspwm takes too much setup from my brief toying
03:22:27FromDiscord<Rika> me, still using a floater:
03:22:27FromDiscord<Elegantbeef> Also following in pmunch's path using xlunch a s my launcher
03:22:39FromDiscord<Elegantbeef> Herbs has some cool floating functionality
03:22:50FromDiscord<Rika> ~~though to be fair i am blind as fuck so i need to make everything fullscreen~~
03:22:53FromDiscord<TryAngle> I saw a lot of herbstluft on r/unixporn
03:22:55FromDiscord<Elegantbeef> You can move floating windows to corners with the keyboard and grow them out
03:23:14FromDiscord<Rika> im not good at sizing things with a keyboard, best i can do is just swapping things
03:23:31FromDiscord<Rika> i really rather the precision of a mouse when i resize things
03:24:54FromDiscord<Elegantbeef> Ah i dont often float but when i do i want it out of my way
03:25:25FromDiscord<Rosen> herbstluftwm is so cool!
03:25:38FromDiscord<Rosen> The built in hooks shit was fun to use to build a custom bar using lemonbar
03:26:35FromDiscord<Elegantbeef> I still need to theme mine and setup a better status bar, but this is what i'm talking about rika https://streamable.com/wanhge
03:27:01FromDiscord<TryAngle> In reply to @Elegantbeef "I still need to": do u use a compositor too?
03:27:04FromDiscord<Rika> oh interesting, logarithmic sizing
03:27:15FromDiscord<Elegantbeef> Using picom yes
03:27:20*noeontheend joined #nim
03:27:30FromDiscord<Elegantbeef> I like my transparent windows
03:27:35FromDiscord<TryAngle> nvidia gpu?
03:27:41FromDiscord<Elegantbeef> Amd
03:27:45FromDiscord<TryAngle> ah I see
03:28:12FromDiscord<Elegantbeef> There are some weird things like the way tags work
03:28:22FromDiscord<Elegantbeef> I havent figured out how to open a window where my mouse is
03:28:34FromDiscord<Elegantbeef> On an empty tag i should say
03:33:05FromDiscord<TryAngle> sent a code paste, see https://play.nim-lang.org/#ix=3J5H
03:33:30FromDiscord<TryAngle> (edit) "https://play.nim-lang.org/#ix=3J5H" => "https://play.nim-lang.org/#ix=3J5I"
03:33:35FromDiscord<TryAngle> (edit) "https://play.nim-lang.org/#ix=3J5I" => "https://play.nim-lang.org/#ix=3J5J"
03:39:57FromDiscord<TryAngle> nvm fixed it forgot a decimal point...
03:40:38FromDiscord<TryAngle> wait it doesn't fix it 🤔
03:40:54FromDiscord<Rika> i'd love to switch but i like fancy animations so xd dont think im moving away from kde any time soon
03:41:03FromDiscord<Rika> what issue are we talking about
03:41:59FromDiscord<TryAngle> I deleted bc I thought I fixed it but I didn't lol
03:43:03FromDiscord<TryAngle> sent a code paste, see https://paste.rs/y6B
03:43:25FromDiscord<Rika> `for (neuronWeights, neuronBias) in zip(weights, biases):`
03:43:27FromDiscord<Rika> how about now
03:43:32FromDiscord<Rika> same with the other zip
03:43:48FromDiscord<Elegantbeef> just do `zip(weight, biases).pairs`
03:44:30FromDiscord<TryAngle> ah I see thanks u two both ways work 👍
03:47:02FromDiscord<Elegantbeef> Actually pairs might not work
03:47:13FromDiscord<Elegantbeef> Since that's what it implicitly called
03:47:41FromDiscord<TryAngle> how do I run a nim project in release?↵`nimble run -release`↵?
03:47:55FromDiscord<TryAngle> In reply to @Elegantbeef "Since that's what it": it gave no syntax error highlight at least
03:47:56FromDiscord<Rika> i dont know how nimble run works
03:48:01FromDiscord<Rika> try -d:release nonetheless
03:48:25FromDiscord<Rika> In reply to @TryAngle "it gave no syntax": well because its a logic error, which isnt usually caught 😛
03:48:31FromDiscord<TryAngle> how do I know if it works ?xd↵use a when one time?
03:48:43FromDiscord<Rika> In reply to @TryAngle "how do I know": it should say that its a release build
03:49:09FromDiscord<TryAngle> https://media.discordapp.net/attachments/371759389889003532/923059556593053756/unknown.png
03:49:19FromDiscord<Rika> i dont know
03:49:23FromDiscord<Rika> i dont build with nimble
03:50:45FromDiscord<TryAngle> 🤔
03:51:22FromDiscord<Elegantbeef> `nimble run` makes a release
03:52:03FromDiscord<TryAngle> ah wow didn't expect that bc compile time is so fast o_O
03:52:43FromDiscord<Elegantbeef> Well if you want the full compile time do `nimble run -f`
03:52:57*noeontheend quit (Ping timeout: 240 seconds)
03:53:25FromDiscord<Rika> would be funny if its still considered fast to them
03:54:07FromDiscord<TryAngle> In reply to @Elegantbeef "Well if you want": that didnt' do anything o.o
03:56:45FromDiscord<Elegantbeef> Should've force a recompilation, so maybe nimble doesnt take all commands
04:03:05FromDiscord<TryAngle> well its a small programm and I'm used to rust
04:03:12FromDiscord<TryAngle> (edit) "well its a small programm and I'm used to rust ... " added "compile times"
04:19:27*noeontheend joined #nim
04:22:16FromDiscord<Roundlay> Trying to write a wrapper for some stuff in a TypeScript API. Anyone know of any examples demonstrating how to do this? Specifically wrapping classes?
04:24:44FromDiscord<TryAngle> In reply to @Roundlay "Trying to write a": https://github.com/saem/vscode-nim/tree/main/src/platform↵not sure if this applies to your case but the vscode-nim plugin from saem wrapped parts of vscode api
04:26:46FromDiscord<Roundlay> In reply to @TryAngle "https://github.com/saem/vscode-nim/tree/main/src/pl": Thank you very much
04:26:48FromDiscord<Roundlay> Looks good
04:29:49FromDiscord<TryAngle> how do I export a module that the module has to be called explicitly?
04:30:15FromDiscord<Elegantbeef> Uhh what?
04:30:24FromDiscord<TryAngle> sent a code paste, see https://play.nim-lang.org/#ix=3J5N
04:30:38FromDiscord<TryAngle> because if I export A, I export all contents of A
04:30:50FromDiscord<Elegantbeef> You can export selective parts
04:33:12FromDiscord<TryAngle> sent a code paste, see https://play.nim-lang.org/#ix=3J5O
04:33:23FromDiscord<TryAngle> something like that
04:33:43FromDiscord<TryAngle> so I can ignore module3 in some parts, but import it in other modules for example
04:34:10FromDiscord<Elegantbeef> make library import all modules then just make the user do `library/[module1, module2]` for selective
04:34:47FromDiscord<TryAngle> ah so if I don't export I can still import?
04:36:32FromDiscord<TryAngle> hmm doesn't work 🤔
04:36:49FromDiscord<Elegantbeef> sent a code paste, see https://play.nim-lang.org/#ix=3J5P
04:37:05FromDiscord<Elegantbeef> Then for importing selectively you just do `import library/[module1, module2]`
04:38:23FromDiscord<Elegantbeef> Hopefully i understood the question
04:40:22FromDiscord<Elegantbeef> Or are you after forcing namespaces?
04:42:23FromDiscord<Elegantbeef> You cannot fake import paths so you just need the package structure to match your import want, hopefully i dont drone on about non-issues 😀
04:43:33FromDiscord<TryAngle> In reply to @Elegantbeef "Or are you after": kinda
04:43:47FromDiscord<TryAngle> In reply to @Elegantbeef "Then for importing selectively": hmmm I still get file not found error 🤔
04:45:01FromDiscord<Elegantbeef> Is this on a repo?
04:46:14FromDiscord<TryAngle> In reply to @Elegantbeef "Is this on a": not yet but I can quickly make it one
04:46:39FromDiscord<Elegantbeef> Also what type of API are you after when using this, cause i'm lost
04:59:27FromDiscord<TryAngle> In reply to @Elegantbeef "Also what type of": well basically I want to make a personal science library where I can implement things I learned in university or that interest me personally so I can reuse them etc.↵For example when I add an alignment algorithm under the module library/bio, I'd like to import it via library/bio↵because in that library I also implement concepts and procs for abstract algebra under library/algebra which
05:01:29FromDiscord<Elegantbeef> I feel like that's what the `from X import Y` is for
05:01:44FromDiscord<Elegantbeef> Export everything you want and if you want selective imports, import selectively
05:01:54FromDiscord<Elegantbeef> Or you can make a file that only exports what you want as an intermediate
05:02:08FromDiscord<TryAngle> but wouldn't that require me to import every type and function that one algorithm under bio uses?
05:02:17FromDiscord<TryAngle> (edit) "uses?" => "uses manually?"
05:02:37FromDiscord<TryAngle> In reply to @Elegantbeef "Or you can make": that sounds good
05:03:14FromDiscord<TryAngle> In reply to @Elegantbeef "What i'd suggest is": but the weird thing is, I tried that here but I get an error that library/module1 does not exist
05:03:24FromDiscord<TryAngle> does it not work for tests?
05:03:58FromDiscord<Elegantbeef> It's hard to say what's wrong
05:04:15FromDiscord<Elegantbeef> I can only imagine your package isnt installed or your tests dont move to that path
05:05:19FromDiscord<TryAngle> hmmm I try from other nimble project then
05:05:28FromDiscord<TryAngle> (edit) "hmmm I try ... from" added "that"
05:05:35FromDiscord<TryAngle> (edit) "hmmm I try that from other nimble project then ... " added "instead of the tests folder"
05:06:11FromDiscord<TryAngle> but hahha anaother thing I don't know and couldn't find 🥲 ↵what would be the way to import a local nimble project into another nimble project?
05:06:14FromDiscord<Elegantbeef> does your test folder have a `config.nims`?
05:07:03FromDiscord<TryAngle> In reply to @Elegantbeef "does your test folder": ....
05:07:04FromDiscord<Elegantbeef> I generally just do `nimble develop` in the nimble library I want then just use it as it's there
05:07:04FromDiscord<TryAngle> ...
05:07:06FromDiscord<TryAngle> ....
05:07:08FromDiscord<TryAngle> that was the issue
05:07:12FromDiscord<TryAngle> the config.nims
05:07:14FromDiscord<TryAngle> XD
05:07:41FromDiscord<TryAngle> so it was correct all along 😅
05:07:42FromDiscord<Elegantbeef> `nimble develop` symlinks a package in your installed packages to that folder
05:07:46FromDiscord<Elegantbeef> Indeed
05:11:29FromDiscord<TryAngle> thanks for helping me once again 👍
05:11:37FromDiscord<Elegantbeef> No problem
05:28:59FromDiscord<Sabena Sema> why is there no anon inline object defn syntax (like for tuples)
05:29:06FromDiscord<Sabena Sema> does having that break something?
05:29:30FromDiscord<Elegantbeef> You can define them in any scope so it's not a big deal
05:29:33FromDiscord<Elegantbeef> Or atleast most scopes
05:29:42FromDiscord<IsaacPaul> In reply to @Elegantbeef "It's very much a": I got something semi-semi-working https://play.nim-lang.org/#ix=3J5Z though garbage collection crashes on the cpp backend.. I would work on it more but I gotta sleep. ✌️
05:29:44FromDiscord<Sabena Sema> well, they need a name
05:30:11FromDiscord<Elegantbeef> sent a code paste, see https://play.nim-lang.org/#ix=3J60
05:30:23FromDiscord<Sabena Sema> and you cant define them inside another object defn, or as a return type
05:30:48FromDiscord<Sabena Sema> ofc since they dint structurally convert doing them as a return type would be… not so useful
05:30:55FromDiscord<Sabena Sema> (edit) "dint" => "dont"
05:31:51FromDiscord<Elegantbeef> Leorize's union does anonymous objects similar to this so if interested could look there
05:32:27FromDiscord<Sabena Sema> link?
05:34:03FromDiscord<Elegantbeef> https://github.com/alaviss/union
05:34:28FromDiscord<Elegantbeef> It uses a template/macro to generate and reference the type
05:38:05FromDiscord<ajusa> anyone here used https://github.com/jart/cosmopolitan/?
05:38:46FromDiscord<ajusa> sent a code paste, see https://play.nim-lang.org/#ix=3J62
05:43:00FromDiscord<Elegantbeef> @IsaacPaul\: dont forget to pass the node to `error` to be even more helpful https://play.nim-lang.org/#ix=3J64
05:45:03FromDiscord<IsaacPaul> Ah I didn’t know that
05:46:26FromDiscord<Elegantbeef> It gives the lineinfo of the nimnode to things like nimcheck
05:46:26FromDiscord<Elegantbeef> So it's great for things like codelens with vscode
05:50:42*mahlon quit (Ping timeout: 256 seconds)
05:54:17*noeontheend quit (Ping timeout: 240 seconds)
06:00:26NimEventerNew Nimble package! mcu_utils - Utilities and simple helpers for programming with Nim on embedded MCU devices, see https://github.com/EmbeddedNim/mcu_utils
06:07:18FromDiscord<that_dude> sent a code paste, see https://play.nim-lang.org/#ix=3J69
06:07:25FromDiscord<that_dude> (edit) "https://play.nim-lang.org/#ix=3J69" => "https://play.nim-lang.org/#ix=3J6a"
06:07:32FromDiscord<that_dude> (edit)
06:07:41FromDiscord<Elegantbeef> `pointer` is a typeless pointer
06:07:50FromDiscord<Elegantbeef> You need to decay that pointer for that array
06:08:12FromDiscord<that_dude> How would I do that?
06:08:21FromDiscord<Rika> Cast
06:08:22FromDiscord<Sabena Sema> you can cast it
06:08:32FromDiscord<that_dude> but to what? just pointer?
06:08:36FromDiscord<Sabena Sema> yeah
06:08:55FromDiscord<that_dude> something like `cast[pointer](var)`
06:08:57FromDiscord<that_dude> (edit) "`cast[pointer](var)`" => "`cast[pointer](var)`?"
06:09:13FromDiscord<Sabena Sema> yep
06:09:19FromDiscord<that_dude> Cool
06:09:19FromDiscord<Sabena Sema> `ptr` alone is a typeclass!
06:09:29FromDiscord<Sabena Sema> kinda confusing, indeed
06:11:03FromDiscord<Elegantbeef> You an just do `pointer yourPtrT`
06:11:23FromDiscord<Sabena Sema> as a dot style cast?
06:11:38FromDiscord<Elegantbeef> Yes
06:11:40FromDiscord<Sabena Sema> is that more restrictive
06:11:45FromDiscord<Elegantbeef> Cleaner
06:11:54FromDiscord<Sabena Sema> definitely
06:14:24FromDiscord<that_dude> Why (ast wise) is there a distinction between call, command, infix, and the sort?
06:14:44FromDiscord<that_dude> Just curious
06:15:00FromDiscord<that_dude> They seem to be formatted and behave the same
06:17:09FromDiscord<Rika> Same semantics different syntax
06:17:19FromDiscord<Rika> Abstract syntax tree
06:18:01FromDiscord<Elegantbeef> The difference is mostly just at a parser level
06:18:10FromDiscord<that_dude> I guess, but I though it goes user code -> ast -> compiler. And the compiler doesn't really need to make a distinction if they behave the same
06:18:34FromDiscord<that_dude> I guess it doesn't matter as long as it works
06:18:52FromDiscord<Elegantbeef> it's like expressions vs statements
06:19:31FromDiscord<Sabena Sema> yeah, and when codegen happens I'm sure each node calls the same codegen function
06:19:43FromDiscord<Sabena Sema> (edit) "calls" => "causes" | "causesthe same codegen function ... " added "to be called"
06:19:49FromDiscord<Elegantbeef> I can confirm
06:20:45FromDiscord<Sabena Sema> there are some differences between the syntaxes too, you can overload `.`
06:21:02FromDiscord<Sabena Sema> and do dirty, dirty syntax dependent things with trmacros
06:21:19FromDiscord<Elegantbeef> Hey dont call it dirty!
06:21:29FromDiscord<Sabena Sema> they are useful
06:23:23FromDiscord<Sabena Sema> Plutonium is useful too, but I don't wanna handle it day-to-day
06:23:38FromDiscord<Elegantbeef> Let's be honest no one is really using TRM
06:23:41FromDiscord<Elegantbeef> As cool as they're
06:24:11FromDiscord<Sabena Sema> They are just soooo dangerous
06:24:33FromDiscord<Sabena Sema> and a good indication a feature might best live in the compiler itself 😄
06:24:34FromDiscord<that_dude> Lol "With great power comes great responibility"
06:24:37FromDiscord<Elegantbeef> And they're going to get ripped out in Nim2.0 apparently
06:25:11FromDiscord<that_dude> (edit) "responibility"" => "responsibility""
06:34:30FromDiscord<that_dude> What are the benefits to using `func` instead of `proc`? I get it's more limited by marking it with no side effects ie can't access variables outside of the parameters, but what does it gain in exchange for this?
06:35:00FromDiscord<Elegantbeef> Having an easier tested api, that you know doesnt rely on external data
06:35:26FromDiscord<Sabena Sema> in theory better optimization
06:35:34FromDiscord<Sabena Sema> but ... in theory
06:35:59FromDiscord<Sabena Sema> it'll cause a compile error if any of the called functions change to start messing with external data
06:36:27FromDiscord<that_dude> So to simplify procs to make them easier to think about/test. But not much else is gained right?
06:37:03FromDiscord<that_dude> fair enough
06:40:18FromDiscord<Elegantbeef> It's more "pure" and as the name implies functional
06:43:39FromDiscord<Yardanico> https://forums.swift.org/t/a-roadmap-for-improving-swift-performance-predictability-arc-improvements-and-ownership-control/54206 a lot of similar stuff to Nim :)
06:44:19FromDiscord<Yardanico> they changed to lexical lifetimes, added `move`, `consuming` for me looks like `sink`
06:46:15FromDiscord<Yardanico> and more stuff
06:54:59FromDiscord<impbox [ftsf]> In reply to @that_dude "So to simplify procs": nice thing about funcs is that you can be sure that caching the input->output is safe
06:55:24FromDiscord<impbox [ftsf]> same inputs will always give the same outputs
06:55:49FromDiscord<that_dude> I see
06:56:14FromDiscord<Yardanico> unless you have `var T` arguments in your func, but they're explicit so it's easy to see them
06:56:33FromDiscord<Yardanico> or some types that are `ref object`, but with `strictFuncs` nim also checks for deep immutability with refs
06:57:08FromDiscord<impbox [ftsf]> hmm yeah I guess that's not true for a ref type where what the object the ref points to might have changed between calls
06:57:44FromDiscord<Elegantbeef> Eh it's true with strict funcs
06:58:09FromDiscord<Elegantbeef> Cannot mutate any part of a reference that is passed in as immutable when strict funcs is on
06:58:54FromDiscord<impbox [ftsf]> no but it might have been mutated between calls
06:59:24FromDiscord<Elegantbeef> How does that change anything
07:01:20FromDiscord<Yardanico> In reply to @impbox "no but it might": that's not the point of funcs :)
07:01:36FromDiscord<Yardanico> and it doesn't really apply to refs, it applies to everything
07:01:53FromDiscord<Yardanico> sent a code paste, see https://play.nim-lang.org/#ix=3J6g
07:01:57FromDiscord<Elegantbeef> sent a code paste, see https://play.nim-lang.org/#ix=3J6h
07:02:07FromDiscord<Elegantbeef> The thing about function is they're pure, the same input data, gives you the same output data
07:02:35FromDiscord<Elegantbeef> The fact they dont give the same values doesnt matter, it's like having a mathematical formula and applying it to random numbers
07:02:53FromDiscord<Elegantbeef> The output will be different but if you pass the same number you'll always get the same output
07:16:09FromDiscord<KatrinaKitten> What's the best way to track down potential memory leaks? `valgrind` reports my unit tests leaking about 4kb, but it's hard to tell where from.
07:17:05FromDiscord<Elegantbeef> You did compile with `-d:useMalloc` right?
07:17:20FromDiscord<Elegantbeef> Or are you doing manual memory management
07:17:33FromDiscord<Elegantbeef> Guess eitherway using malloc helps
07:18:10FromDiscord<KatrinaKitten> `nim c -d:release -d:useMalloc --opt:speed tests/test.nim`
07:18:17FromDiscord<KatrinaKitten> Same leak reported with or without `useMalloc`
07:18:45FromDiscord<Elegantbeef> pass `--debugger:native` aswell
07:19:14FromDiscord<sigmasd> nimsuggest 1.6.2 `nimsuggest --autobind --address:localhost` fails with `Additional info: Name does not resolve [OSError]` it works after removing `--address:localhost`nimsuggest 1.4.8 the same line used to workIs this a known issue?
07:19:17FromDiscord<Elegantbeef> That will hopefully give atleast some line information
07:21:05FromDiscord<Elegantbeef> Wonder if there was a change in a library which broke localhost, does "127.0.0.1" work in it's stead?
07:21:09FromDiscord<Elegantbeef> Guess i could test 😀
07:21:55FromDiscord<Elegantbeef> Hmm mine doesnt error
07:22:10FromDiscord<Elegantbeef> What OS are you on and are you sure your `nimsuggest -v` is 1.6.2?
07:25:46FromDiscord<Elegantbeef> Just noticed my nimsuggest is built in danger so probably just ignores that error
07:26:56FromDiscord<Elegantbeef> Actually that's an `OsError` not a defect, maybe i'll be a smart person one day
07:27:05FromDiscord<Elegantbeef> Anywho cannot reproduce here
07:30:06FromDiscord<Solitude> In reply to @Sabena Sema "so why copy them": they dont, i made a mistake in a benchmark
07:30:28FromDiscord<Sabena Sema> phew
07:30:30FromDiscord<Sabena Sema> saved
07:30:38FromDiscord<Sabena Sema> I'll still make the full benchmark at some point
07:31:05FromDiscord<Sabena Sema> good opertunity to learn how to gather that kind of benchmark data on non-intel systems (where vtune doesn't really work)
07:32:56FromDiscord<sigmasd> [Elegantbeef](https://matrix.to/#/@elegantbeef:matrix.org)\: arch linux, and yes I'm sure about the version, I noticied this when the vim extension stopped working
07:33:26FromDiscord<Sabena Sema> I'd bet money something changed in your sd-resolved conf
07:33:43FromDiscord<Sabena Sema> there's several places where localhost can get turned into your actual IP
07:33:57FromDiscord<KatrinaKitten> sent a code paste, see https://play.nim-lang.org/#ix=3J6r
07:34:31FromDiscord<KatrinaKitten> There are also a few from `unittest` that don't even show my library in the trace.
07:34:32FromDiscord<Sabena Sema> top level compiled regex?
07:34:52FromDiscord<Sabena Sema> in general I'm not sure if nim bothers freeing top level allocations when NimMain exits
07:35:00FromDiscord<Sabena Sema> I think there's an option to tell it to make valgrind happy
07:35:02FromDiscord<Sabena Sema> one sec
07:35:32FromDiscord<Sabena Sema> (you generally don't want to free memory right before exiting, it's much more efficient to just let the OS deal with it
07:35:34FromDiscord<Sabena Sema> (edit) "it" => "it)"
07:35:51FromDiscord<Elegantbeef> Time to use the better pure Nim regex 😛
07:35:54FromDiscord<sigmasd> Just to explain more, the arch linux package manager uses nim-sugesst 1.4.8 so I had no issue, but then I noticed that nim-doc doesn't play well with this structure (it looks for in-existant files under /usr/doc (its a known issue)) so I removed that nim installation, and installed thorough choosenim which makes nim-docs work now, but it uses this recent version of nimsuggest which has this issue
07:36:20FromDiscord<Elegantbeef> I oddly cannot reproduce it, does the 1.4.8 through choosenim work?
07:36:32FromDiscord<sigmasd> also if I strace it, it errors right after reading /etc/resolv.conf
07:36:54FromDiscord<sigmasd> [Elegantbeef](https://matrix.to/#/@elegantbeef:matrix.org)\: I'll check that
07:37:58FromDiscord<Sabena Sema> https://github.com/nim-lang/Nim/issues/3063
07:38:10FromDiscord<Solitude> In reply to @treeform "Do you have benchmarks": benchmarks i did prove that small objects dont have a meaningful impact even when passed by copy, and passing by reference or using reference type doesnt bring meaningful speedup. and that would make sense.
07:38:47FromDiscord<Sabena Sema> it is easy to accidentally get copies in like, actual assignment statements
07:39:02FromDiscord<Sabena Sema> but the semantics are wildly different between ref assignment and value assignment
07:39:40FromDiscord<Sabena Sema> `ref object` is just my little hobby horse, I need one in each language I learn 😄
07:39:44FromDiscord<sigmasd> Same error with 1.4.8 via choosenim
07:40:07FromDiscord<sigmasd> Well if its not reproducible its not a big deal I guess, since it works after removing those arguments
07:40:32FromDiscord<Sabena Sema> I bet your dns config is kinda broken in any case
07:40:41FromDiscord<Sabena Sema> localhost really should resolve
07:41:01FromDiscord<sigmasd> Ah wait 1.4.8 shows the error if installed via choosenim
07:41:07FromDiscord<sigmasd> but if installed via arch it works
07:41:10FromDiscord<Sabena Sema> what does `getent hosts localhosts` print
07:41:20FromDiscord<sigmasd> so its not about the version ,, more about where its installed from
07:41:29FromDiscord<Sabena Sema> that's extremely odd
07:41:42FromDiscord<Sabena Sema> unless there's a bunch of patching going on
07:41:44FromDiscord<sigmasd> getent hosts localhosts -\> print nothing
07:42:07FromDiscord<sigmasd> getent hosts localhost -\> print \:\:1 localhost
07:42:15FromDiscord<Sabena Sema> sorry: `getent hosts localhost`
07:42:19FromDiscord<Sabena Sema> no s on the end
07:42:42*sagax quit (Ping timeout: 260 seconds)
07:43:02FromDiscord<Sabena Sema> also what does `ls -l /etc/resolv.conf` print
07:44:22FromDiscord<Sabena Sema> and what's the hosts line in /etc/nsswitch.conf
07:44:29FromDiscord<sigmasd> .rw-r--r-- 45 root 22 Sep 16\:59 /etc/resolv.conf
07:44:37FromDiscord<sigmasd> hosts\: wins
07:44:39FromDiscord<Sabena Sema> it should be something like `files myhostname resolve [!UNAVAIL=return] dns`
07:44:53FromDiscord<Sabena Sema> that's ... pretty broken
07:44:58FromDiscord<sigmasd> the arch pkg have some patches https://github.com/archlinux/svntogit-community/blob/packages/nim/trunk/PKGBUILD maybe one of them is relevant
07:45:14FromDiscord<Sabena Sema> in that configuration `gethostbyname` will _never_ make dns lookups
07:46:15FromDiscord<Sabena Sema> I see no patches there
07:46:23FromDiscord<Sabena Sema> but ... fix you're resolver config
07:47:20FromDiscord<sigmasd> Doesnt explain why it works with everything else and with nim when installed through arch
07:47:41FromDiscord<sigmasd> But thanks I see your points tough I'll search a bit more
07:47:50FromDiscord<Elegantbeef> Ponders if the installed arch nim has some elevation
07:47:53FromDiscord<Sabena Sema> run a trace to see how the working one is resolving the name
07:48:20FromDiscord<Sabena Sema> also check if it's linked to some bizarre c library or something
07:48:31FromDiscord<Sabena Sema> that means that nss config isn't used
07:48:46FromDiscord<Sabena Sema> frankly I'm surprised much more isn't broken
07:49:11FromDiscord<Sabena Sema> do you have the dns resolver running on 127.0.0.53?
07:49:20FromDiscord<Sabena Sema> what is the actual content of `/etc/resolv.conf`
07:50:14FromDiscord<valerga> arch's nim is outdated
07:50:27FromDiscord<Elegantbeef> That's established 😛
07:50:34FromDiscord<Elegantbeef> It's outdated pretty much everywhere
07:50:54FromDiscord<sigmasd> sent a code paste, see https://play.nim-lang.org/#ix=3J6t
07:50:56FromDiscord<Sabena Sema> ugh
07:51:00FromDiscord<Sabena Sema> cursed
07:51:16FromDiscord<Sabena Sema> not as cursed as that nss config though
07:51:27FromDiscord<Elegantbeef> Nim on ubuntu's repo is 1.4.6, damn really outdated
07:51:51FromDiscord<valerga> is there any disadvantage on just using choosenim?
07:51:58FromDiscord<Sabena Sema> not really
07:52:05FromDiscord<Sabena Sema> but it's nice to have distro packages
07:52:14FromDiscord<Sabena Sema> it's just they are not that maintained=
07:52:15FromDiscord<Sabena Sema> (edit) "maintained=" => "maintained"
07:52:52FromDiscord<Elegantbeef> The annoying part about using your system package manager is that you dont always want to run a set version
07:52:56FromDiscord<sigmasd> I was surpirsed its outdated on arch, they should just keep it on the aur if its not getting their attention
07:53:21FromDiscord<Sabena Sema> well, you should mark it as outdated and help get it updated
07:53:27FromDiscord<Sabena Sema> I should do the same for fedora's package
07:53:28FromDiscord<Sabena Sema> I won't
07:53:31FromDiscord<Sabena Sema> but I _should_
07:54:02FromDiscord<sigmasd> Its already marked
07:56:10FromDiscord<valerga> the guy who maintains it on arch maintains like 150 other packages so...
07:57:20FromDiscord<Sabena Sema> package maintainers do tend to be overworked
07:57:31FromDiscord<Sabena Sema> and nim stuff tends to be leaves with few downstream dependents
07:57:42FromDiscord<Sabena Sema> the solution is to write more linux userspace in nim
07:57:51FromDiscord<sigmasd> The problem with this is the information doesn't get through, with arch you really assume that if its an official pkg its updated, when I install through pacman It would be great if a flagged pkg appears as flagged outdated at least
07:57:55FromDiscord<Sabena Sema> and to maintain more nim packages
07:59:33FromDiscord<Leonardo da Vinci> hello
07:59:40FromDiscord<Elegantbeef> Hello again
07:59:45FromDiscord<Leonardo da Vinci> In reply to @valerga "the guy who maintains": what is the best distro?
08:00:12*PMunch joined #nim
08:01:38FromDiscord<Leonardo da Vinci> for gaming
08:01:58FromDiscord<valerga> I don't have trouble recommending linux mint
08:02:17FromDiscord<Leonardo da Vinci> i use mx, but it doesn't do well with gaming
08:02:24FromDiscord<Leonardo da Vinci> (edit) "mx," => "mx linux,"
08:04:12FromDiscord<Michal58> When defining generics, how can I make `MyCollection[N]` behave the same as `MyCollection[range[0..<N]]` as it is with arrays?
08:04:37FromDiscord<Anis Taluqdar> Windows 😅↵(@Leonardo da Vinci)
08:04:53FromDiscord<Leonardo da Vinci> In reply to @Anis Taluqdar "Windows 😅 (<@873527032645042266>)": I am not installing that again, never
08:05:42FromDiscord<Leonardo da Vinci> In reply to @Anis Taluqdar "Windows 😅 (<@873527032645042266>)": My religion forbids the installation of windows
08:05:45FromDiscord<Anis Taluqdar> What makes you hate that? 😆. I need to use it because not all software is present in Linux.↵(@Leonardo da Vinci)
08:06:07FromDiscord<Anis Taluqdar> 😅😅😅 amazing↵(@Leonardo da Vinci)
08:06:19FromDiscord<sigmasd> Ok I fixed the issue I had a weird /etc/hosts file, I restored it to normal and now it works
08:07:17FromDiscord<sigmasd> Thanks for your help
08:07:43FromDiscord<sigmasd> This is just a symptom of an old arch installation, I just need to install fedora oneday
08:08:32FromDiscord<sigmasd> Not arch issue , but Its that I changed a lot of stuff over the time and I keep hitting issues where I forgot what I did xD
08:10:53FromDiscord<Elegantbeef> Yay we helped! (Mostly sabena) 😛
08:11:03FromDiscord<sigmasd> thanks!
08:12:06PMunch@Leonardo_da_Vinci, I use Arch and Manjaro. Both seem to work fine for gaming
08:12:19PMunchWith Steam and Proton most stuff "just works" nowadays
08:12:58FromDiscord<Elegantbeef> Oh hay pmunch just the man i want to talk to 😀
08:13:11PMunchUh oh
08:13:16PMunchWhat have I done this time
08:13:17FromDiscord<Elegantbeef> Is there any utillity in xlunch to rebuild the `dsv`?!
08:13:37FromDiscord<Elegantbeef> I didnt see how to rebuild it so i cloned the repo again and ran `make test`
08:14:16PMunchAh yes
08:14:25PMunchThere is the genentries script
08:14:39PMunchAnother thing I've been meaning to rewrite in Nim actually
08:15:07FromDiscord<Elegantbeef> Ah i moved to herbsluftwm to try something new today so though "why not try that utillity pmunch is using"
08:15:15PMunchI don't think the original maintainer would approve of a Nim solution, he tries to keep it super minimal, but I could distribute that separately
08:15:22FromDiscord<Leonardo da Vinci> In reply to @PMunch "@Leonardo_da_Vinci, I use Arch": Cool, gotta get Manjaro then
08:15:28FromDiscord<Elegantbeef> RRIN 😛
08:15:34PMunch@Elegantbeef, cool!
08:15:36PMunchRRIN?
08:15:41FromDiscord<Elegantbeef> RIIN\
08:16:02FromDiscord<Elegantbeef> Rewrite it in Nim 😛
08:16:06PMunchLet me know if you run into any issues or have any questions, I think I've modified almost every single line of that project over the years :P
08:16:07FromDiscord<Leonardo da Vinci> In reply to @PMunch "With Steam and Proton": is wine good there?
08:16:09PMunchAha :P
08:16:24FromDiscord<Leonardo da Vinci> i can't make anything work in MX Linux
08:16:29FromDiscord<Elegantbeef> Proton and lutris make life so simple that most games do work like pmunch said
08:16:31PMunch@Leonardo_da_Vinci, haven't had any Manjaro/Arch specific complaints about it at least
08:16:38FromDiscord<Elegantbeef> I'm on an ubuntu derived and it works well
08:16:52PMunchAnd since it's bleeding edge that means you don't get a year old Wine version you have to replace anyways :P
08:16:52FromDiscord<sigmasd> Would someone review my first nim try https://github.com/sigmaSd/nimcolor/blob/master/src/color.nim I just want to know if this is idiomatic that I didn't miss anything obvious
08:17:32PMunch@Elegantbeef, I did consider rewriting xlunch in Nim. It's quite a simple program, but the C code is a horrible mess :P
08:17:33FromDiscord<Leonardo da Vinci> In reply to @PMunch "And since it's bleeding": Sounds really cool
08:17:39FromDiscord<Elegantbeef> Anyway to make the first entry the selected one like if i type "stea" and steam is the first i want enter to select it
08:17:51PMunchIt is shadow-selected
08:18:03PMunchSo if you just hit enter it will open the first thing
08:18:11FromDiscord<Michal58> In reply to @Michal58 "When defining generics, how": Anynone knows?
08:18:18FromDiscord<sigmasd> sent a code paste, see https://play.nim-lang.org/#ix=3J6A
08:18:29FromDiscord<Elegantbeef> `for x in A..C`?
08:19:08PMunch@Michal58, I believe arrays have defined a [] operator that takes a HSlice
08:19:09FromDiscord<Solitude> In reply to @Michal58 "Anynone knows?": can you give a bit more context?
08:19:26FromDiscord<Elegantbeef> Enum's are an ordinal so work as a Range
08:19:29PMunchAlong with the one that takes an integer index
08:19:31FromDiscord<Elegantbeef> You can also do `for x in MyEnum`
08:19:31FromDiscord<Elegantbeef> Atleast iirc
08:21:20FromDiscord<sigmasd> Nice! but it gives intergers, I think I saw a method that convert those to the enum varaint name
08:21:50FromDiscord<Elegantbeef> Ew, but it'd be `for x in MyEnum.low.ord .. MyEnum.high.ord`
08:21:59FromDiscord<Elegantbeef> I dont know if there is a sugar for it
08:22:02FromDiscord<Elegantbeef> You can always make one
08:22:42FromDiscord<Michal58> In reply to @PMunch "<@431798919719288832>, I believe arrays": this is not at all about the indeces, it is about the type itself
08:23:22FromDiscord<Michal58> sent a code paste, see https://play.nim-lang.org/#ix=3J6C
08:23:29PMunchOh you want to be able to define it like arrays with the array[5..10, int] thing?
08:23:48FromDiscord<Elegantbeef> sent a code paste, see https://paste.rs/nj4
08:24:37FromDiscord<Elegantbeef> Probably should be `typedesc[enum and Ordinal]`
08:25:35FromDiscord<Elegantbeef> sent a code paste, see https://play.nim-lang.org/#ix=3J6E
08:26:12FromDiscord<Elegantbeef> I'm very dumb today
08:27:04FromDiscord<Elegantbeef> https://play.nim-lang.org/#ix=3J6F here is a proper solution, and i'll quite spammin
08:27:50PMunch@Michal58, not quite sure TBH
08:28:11FromDiscord<Elegantbeef> So the want is to have an integer and a range?
08:28:22FromDiscord<sigmasd> xD I actually want the result to be A,B,C R,Z,W
08:28:24FromDiscord<Michal58> In reply to @PMunch "Oh you want to": Is `array[3,int]` some special syntax that is not possible to achieve with user defined types?
08:28:37FromDiscord<Elegantbeef> So then just `for x in MyEnum` ?
08:28:49FromDiscord<sigmasd> it also returns intergers
08:28:58FromDiscord<Elegantbeef> I dont follow
08:29:25FromDiscord<Elegantbeef> Does it return `(0, A)`?
08:29:48FromDiscord<sigmasd> type MyEnum = enum A,B,C↵for x in MyEnum\:↵ echo $x # returns 1,2,3 instead of A,B,C
08:29:55PMunch@Michal58, I mean it's defined as Magic: https://nim-lang.org/docs/system.html#array
08:30:11FromDiscord<Elegantbeef> https://play.nim-lang.org/#ix=3J6G
08:30:12FromDiscord<Elegantbeef> No it doesnt
08:30:30FromDiscord<sigmasd> hmm, let me check again
08:30:30FromDiscord<Elegantbeef> Michal are you after a range or a int as the base value?
08:30:45FromDiscord<Elegantbeef> I'll assume range for now
08:31:53FromDiscord<Michal58> @ElegantBeef wdym
08:32:16FromDiscord<Elegantbeef> What do you want the typedef to be?
08:32:43FromDiscord<Michal58> I want a type that can be parametrized with an integer value rather than with a type
08:32:57FromDiscord<Michal58> just like arrays are
08:33:02FromDiscord<Elegantbeef> `type A[T static: int]`
08:33:15FromDiscord<Elegantbeef> Jesus i cannot type
08:33:22FromDiscord<Elegantbeef> `type A[T: static[int]]`
08:33:30FromDiscord<Elegantbeef> There you go
08:34:10FromDiscord<sigmasd> Oh my bad I overrided `$`
08:34:26FromDiscord<Elegantbeef> makes sense i was going to suggest to check that
08:35:11FromDiscord<sigmasd> Is there a way to access the original version, I kind of want the override, but I can do without it
08:35:39FromDiscord<Elegantbeef> sent a code paste, see https://play.nim-lang.org/#ix=3J6H
08:35:45FromDiscord<apahl> In reply to @IsaacPaul "damn std/wrapnils is ....": Did you have a look at https://github.com/status-im/questionable ?
08:35:48FromDiscord<Elegantbeef> It's ugly but it's how explicit calls work
08:36:20FromDiscord<Elegantbeef> Isnt that a package for options and not nils?
08:36:57FromDiscord<Elegantbeef> They're after getting nicer nil checked statements/calls
08:37:03FromDiscord<sigmasd> it outputs M Y E N U M
08:37:24FromDiscord<Elegantbeef> What?
08:37:54FromDiscord<Rika> Your terminal is broken then
08:38:04FromDiscord<Elegantbeef> https://play.nim-lang.org/#ix=3J6J
08:38:09FromDiscord<sigmasd> https://play.nim-lang.org/#ix=3J6K
08:38:30FromDiscord<Elegantbeef> Well yea
08:38:34FromDiscord<sigmasd> Ah you mean like that xD
08:38:37FromDiscord<Elegantbeef> you're iterating over a string
08:39:56FromDiscord<Michal58> In reply to @Elegantbeef "There you go": Thanks. Can we make it support both range and int as in arrays?
08:40:08FromDiscord<Elegantbeef> I'm on it
08:43:25FromDiscord<Elegantbeef> Ugh cannot use `..`
08:43:28FromDiscord<Elegantbeef> Even with my bodge
08:43:48FromDiscord<Elegantbeef> sent a code paste, see https://play.nim-lang.org/#ix=3J6L
08:45:51*neurocyte0132889 joined #nim
08:45:51*neurocyte0132889 quit (Changing host)
08:45:51*neurocyte0132889 joined #nim
08:47:40FromDiscord<Michal58> sent a code paste, see https://play.nim-lang.org/#ix=3J6M
08:47:45FromDiscord<Michal58> I was able to create this workaround
08:49:32FromDiscord<Michal58> I don't understand your code
08:49:49FromDiscord<sigmasd> sent a code paste, see https://paste.rs/MAy
08:50:16FromDiscord<Elegantbeef> What dont you understand I'm more than happy to explain
08:50:22FromDiscord<Elegantbeef> The `: typdesc` was me being dumb
08:50:42FromDiscord<Elegantbeef> All the usages of `typedesc` was me being in the writing code zone and not thinking zone
08:51:04FromDiscord<Elegantbeef> Wait nvm i use them as parameters
08:51:04FromDiscord<Solitude> sent a code paste, see https://play.nim-lang.org/#ix=3J6O
08:51:17FromDiscord<Elegantbeef> Think it's a bug with slices
08:53:30FromDiscord<Michal58> In reply to @Elegantbeef "What dont you understand": What does it mean when the body is `discard`?
08:53:41FromDiscord<Elegantbeef> It's a no op
08:53:51FromDiscord<Elegantbeef> It's just an empty proc that doesnt do anything but return the default value
08:54:12FromDiscord<Elegantbeef> `discard` is nim's `pass` if you're a python user
08:54:22FromDiscord<Michal58> oh I dumb
08:54:52FromDiscord<Michal58> Ik discard but didn't realise the point is to return default value
08:55:40FromDiscord<Elegantbeef> Yea solitude it just seems static objects field's arent accessible
08:55:47FromDiscord<Elegantbeef> So i guess we've found me something to work on
08:55:52FromDiscord<Elegantbeef> Cheers 🙂
08:55:57FromDiscord<Solitude> mmmmm ,cringe
08:57:42FromDiscord<Michal58> In reply to @Elegantbeef "What dont you understand": Also, how does the return type depend on the arguments? That feels like magic
08:58:09FromDiscord<Elegantbeef> The arguments are static so they can be used
08:58:33FromDiscord<Elegantbeef> `typedesc` is a static and has to be known at compile time as is a `range` and `static Natural`
08:58:51FromDiscord<Elegantbeef> hey fixing that bug will be nice↵(@Solitude)
08:59:07FromDiscord<Elegantbeef> The question is will I be able to fix it or is it a fucky thing
09:03:39FromDiscord<Elegantbeef> Ah i see the isssue
09:03:45FromDiscord<Michal58> Thank you so much @ElegantBeef !
09:03:45FromDiscord<Elegantbeef> It's the same thing as arrays
09:03:56*neurocyte0132889 quit (Ping timeout: 256 seconds)
09:05:42PMunchThis HTMX stuff is really neat
09:06:34FromDiscord<Elegantbeef> Ugh this bug will probably be another one that haunts me
09:08:13*neurocyte0132889 joined #nim
09:08:13*neurocyte0132889 quit (Changing host)
09:08:13*neurocyte0132889 joined #nim
09:15:57FromDiscord<Leonardo da Vinci> In reply to @Elegantbeef "I'm on an ubuntu": which one? Mint?
09:16:13FromDiscord<Elegantbeef> Regolith
09:17:48FromDiscord<Leonardo da Vinci> @ElegantBeef I will install Mint and Manjaro↵Ubuntu-derived and arch-derived. that should cover almost everything?
09:17:53FromDiscord<Michal58> Is there a proc for inserting into a sorted seq or should I just do `insert` with `algorithm.binarySearch`?
09:18:06FromDiscord<Elegantbeef> Why do you need more than one distro
09:18:23FromDiscord<Leonardo da Vinci> In reply to @Elegantbeef "Why do you need": Because sometimes some program doesn't exist in one distro
09:19:01FromDiscord<Elegantbeef> Probably the best michal
09:19:32FromDiscord<Leonardo da Vinci> In reply to @Elegantbeef "Probably the best michal": what is a michal?
09:21:37FromDiscord<Rika> In reply to @Michal58 "Is there a proc": This person is called Michal
09:22:26FromDiscord<Sabena Sema> In reply to @Leonardo da Vinci "Because sometimes some program": have you seen mkosi? Its handy for this kinda stuff
09:25:34FromDiscord<Leonardo da Vinci> In reply to @Sabena Sema "have you seen mkosi?": i don't know what is mkosi
09:25:56FromDiscord<Sabena Sema> https://github.com/systemd/mkosi
09:25:57PMunch@Michal58, `for i in 0..mySeq.high: if mySeq[i] > x: mySeq.insert(x, i); break`
09:26:26FromDiscord<Michal58> In reply to @PMunch "<@431798919719288832>, `for i in": Oof that is not very efficient
09:26:48FromDiscord<Michal58> (edit) "efficient" => "efficient↵I think I'll use the binarysearch 😉"
09:27:00PMunchWell it's O(n)
09:27:18FromDiscord<Sabena Sema> itll setup a linux distro, install the packages, and do final “initial setup” stuff into an image of various sorts (even just a directory)↵↵you can then use systemd-nspawn to enter the image (or even boot it for real/kexec into it)
09:27:30PMunchBinary search would work as well, but you'd have to tweak it to find essentially two spots (one below and one above yours)
09:28:10FromDiscord<Elegantbeef> To add to that pmunch you can sample the middle and the start/end and cut the search to `O(n/2)`
09:28:28FromDiscord<Michal58> In reply to @PMunch "Binary search would work": Binary search returns an index at which the searched value should be present
09:28:39FromDiscord<Leonardo da Vinci> In reply to @Sabena Sema "itll setup a linux": Its a linux installer?
09:28:44FromDiscord<Sabena Sema> yeah sorta
09:28:49FromDiscord<Michal58> I mean it still is O(n) because of the insert op
09:28:51FromDiscord<Sabena Sema> but for every distro
09:28:59FromDiscord<valerga> no need to do fancy stuff when most stuff is on flatpak now anyway
09:29:07FromDiscord<valerga> like steam and lutris
09:29:15FromDiscord<Michal58> (edit) "In reply to @PMunch "Binary search would work": Binary search returns an index at which the searched value should be present ... " added "no tweaking needed"
09:29:25FromDiscord<Sabena Sema> using flatpak to setup libs for testing is extremely annoying
09:29:26PMunch@Michal58, oh right, I'm being dumb. The binary search would give you the position it's supposed to be in :P
09:29:46FromDiscord<Sabena Sema> flatpak is only really for applications
09:29:55FromDiscord<valerga> ah yeah, we were talking about linux for gaming earlier
09:30:04FromDiscord<Sabena Sema> ah, yeah
09:30:09FromDiscord<Sabena Sema> I use the steam flatpak
09:30:14FromDiscord<Sabena Sema> in fedora
09:30:17FromDiscord<Sabena Sema> works wellp
09:30:42FromDiscord<Michal58> In reply to @PMunch "<@431798919719288832>, oh right, I'm": Hmm, except `algorithm.binarySearch` doesn't... it just returns -1 if it is not present :/
09:30:47FromDiscord<Sabena Sema> I only really play factorio on my laptop tho
09:30:58FromDiscord<Michal58> I'll just write my own version than
09:31:06FromDiscord<Michal58> (edit) "than" => "then"
09:31:35PMunch@Michal58, well that's a bummer. I guess for a typical search that is what you'd expect though..
09:31:58PMunchYou can probably just copy the one from algorithm and then remove the last little check
09:32:12FromDiscord<Michal58> In reply to @PMunch "<@431798919719288832>, well that's a": I mean binarySearch is often use exactly for finding the position to insert in so both versions are useful
09:32:26PMunchI'm guessing it just has something like `if data[i] == x: i else: -1` at the end
09:32:55PMunchToo bad we don't have a generic version of ropes (https://nim-lang.org/docs/ropes.html)
09:33:04PMunchThat would make your insert O(1) as well
09:33:12FromDiscord<Sabena Sema> btrees
09:33:17FromDiscord<Sabena Sema> always btrees
09:33:22FromDiscord<Sabena Sema> as far as the eye can see
09:33:53FromDiscord<Michal58> In reply to @PMunch "I'm guessing it just": it does
09:34:17PMunchProblem is that a tree structure can totally wreck your cache-efficiency..
09:35:14FromDiscord<Leonardo da Vinci> @Sabena Sema thanks for telling me, i will try it
09:37:14*mahlon joined #nim
09:37:14PMunchIf you want efficiency I guess you could keep a long seq as the backing memory. Then have a btree with indices. To begin with the seq will be sorted and the only index would be to the start. Then if you insert in the middle you simply split the seq into three, left part, right part, and new part. The original halves stay put in memory, while the new part is added at the end. The indices b-tree will point you to where you need to go to find your element
09:37:25PMunchShould be fairly efficient
09:37:32FromDiscord<Elegantbeef> Tiime to just use a linked list 😛
09:37:52FromDiscord<Leonardo da Vinci> I am learning C
09:37:56FromDiscord<Leonardo da Vinci> Because i hate OOP
09:38:14FromDiscord<Elegantbeef> Nim exists
09:38:19PMunch@Elegantbeef, same problem as a b-tree, and you don't get the sorted benefit :P
09:38:24FromDiscord<Leonardo da Vinci> Nim is not OOP
09:38:29PMunchExactly
09:38:36FromDiscord<Leonardo da Vinci> Based language xd
09:38:53FromDiscord<Leonardo da Vinci> In reply to @PMunch "Exactly": wait, can i use the word based here?
09:39:17PMunchI mean you can, I have no idea what you mean by it, but you're free to use whatever words you like
09:39:36PMunchIt does xorxz communications a bit though
09:39:37FromDiscord<Elegantbeef> Welcome to boomerhood pmunch
09:39:45FromDiscord<Leonardo da Vinci> In reply to @PMunch "I mean you can,": Do you know another procedural language?
09:39:52FromDiscord<Elegantbeef> Odin, Zig
09:39:53PMunch@Elegantbeef :D I've been here a while :P
09:40:03PMunchC
09:40:08FromDiscord<Elegantbeef> Pascal, Oberon, Modula, Ada ...
09:40:23FromDiscord<Leonardo da Vinci> With cute Syntaxis?
09:40:26PMunchJavaScript is also procedural isn't it?
09:40:40FromDiscord<Elegantbeef> nah it's protypal or something like that
09:40:48FromDiscord<Elegantbeef> It's a weird OOP/functional mix
09:40:49FromDiscord<Leonardo da Vinci> (edit) "Syntaxis?" => "syntaxis?"
09:41:13FromDiscord<Elegantbeef> I'm going to bash my head into a wall since this bug is the same as the array one i've ran into before just in the `set` version
09:41:22FromDiscord<Elegantbeef> I mean `range` version
09:41:22FromDiscord<KatrinaKitten> Prototypal yes. Think functional imitating OOP, despite syntactically trying to appear the other way around.
09:41:36FromDiscord<Leonardo da Vinci> I found Nim because i wanted a compiled language with a syntax clean just like Python
09:41:57PMunch@Leonardo_da_Vinci, so why are you looking for something else then?
09:42:04PMunchSounds like you've found the perfect match
09:42:25FromDiscord<Leonardo da Vinci> Because i want to find the best
09:42:34FromDiscord<Leonardo da Vinci> before marrying a language
09:42:40FromDiscord<KatrinaKitten> Though technically most OOP is also procedural anyway, as is functional... but that gets into the fact that the opposite of procedural is actually declarative, not OOP or functional or what have you.
09:43:21FromDiscord<Leonardo da Vinci> In reply to @Leonardo da Vinci "I found Nim because": and it compiles to C!!!!
09:43:30FromDiscord<Elegantbeef> Look at the language nerd
09:44:31FromDiscord<Leonardo da Vinci> I hate OOP, i was helping a friend, and they teach that in college
09:44:40FromDiscord<Leonardo da Vinci> 🤮
09:44:57FromDiscord<qb> How would I `scanf` the license (MIT) out of ` license: MIT` ? My results always require some temp variable since `$` also matches and gets grouped
09:44:59FromDiscord<KatrinaKitten> Language geek, tyvm /j
09:45:04FromDiscord<Leonardo da Vinci> I used C++.
09:45:08FromDiscord<Leonardo da Vinci> Python
09:45:27FromDiscord<Leonardo da Vinci> I am learning now C, and learning to use the SDL graphics library
09:45:56FromDiscord<Leonardo da Vinci> In reply to @KatrinaKitten "Language geek, tyvm /j": what is tyvm/j?
09:46:24FromDiscord<Leonardo da Vinci> btw, are you a vtuber? @KatrinaKitten
09:46:29FromDiscord<Anis Taluqdar> If you know c++ what is the benefits of learning c over it?↵(@Leonardo da Vinci)
09:47:07FromDiscord<KatrinaKitten> In reply to @Leonardo da Vinci "what is tyvm/j?": Tyvm is thank you very much, and /j is a tone marker (short for "joking) https://tonetags.carrd.co
09:47:08FromDiscord<Leonardo da Vinci> In reply to @Anis Taluqdar "If you know c++": I like C
09:47:19FromDiscord<KatrinaKitten> (edit) ""joking)" => ""joking")"
09:48:03FromDiscord<KatrinaKitten> In reply to @Leonardo da Vinci "btw, are you a": I suppose technically, I use a Vtuber avatar on some of my streams, but I don't do it seriously or as a job.
09:48:05FromDiscord<qb> In reply to @qb "How would I `scanf`": nvm, `$slicense:$s$w$.`
09:48:17FromDiscord<Leonardo da Vinci> In reply to @KatrinaKitten "I suppose technically, I": I see
09:48:31FromDiscord<Leonardo da Vinci> I C
09:49:04FromDiscord<Anis Taluqdar> Why u like c over c++?↵(@Leonardo da Vinci)
09:50:23FromDiscord<Leonardo da Vinci> In reply to @Anis Taluqdar "Why u like c": Good question
09:52:06PMunchOne thing I was concerned about for the HTMX based playground was to keep support for the JSON interface (that e.g. NimBot uses), but this seems to work fine http://ix.io/3J70/nim
09:52:40PMunchThen I just have hx-headers defined on the <html> element in my index file to set the accept type to HTML and voila
09:52:42FromDiscord<Leonardo da Vinci> In reply to @Anis Taluqdar "Why u like c": I just like writting code in a procedural style, write once, debug less
09:57:37PMunchHmm, the only tone marker I've ever seen before is /s. Didn't know it was actually part of a system
09:59:09FromDiscord<Elegantbeef> Nice i have a possible fix for that `range` bug
10:01:23FromDiscord<KatrinaKitten> @Pmunch /s is definitely the most well known, but a few others such as /j are fairly well used; that site documents a lot I've never seen in practice. It's a bigger thing in neurodivergency-heavy communities, among others.
10:02:43FromDiscord<Leonardo da Vinci> In reply to @KatrinaKitten "@Pmunch /s is definitely": Why are they used?
10:03:18FromDiscord<Elegantbeef> Poe's law
10:03:48FromDiscord<Schelz> Can somebody provide me a documentation of how to wrap up some module for nim ?
10:03:58FromDiscord<Schelz> (edit) removed "a"
10:04:26FromDiscord<KatrinaKitten> In reply to @Leonardo da Vinci "Why are they used?": A huge portion of face to face communication is nonverbal, things like expressions and tone of voice, but you don't get that with text. Tone tags can help more clearly indicate your intended tone, so you don't come across as angry or upset unintentionally, for example.
10:04:38PMunch@Leonardo_da_Vinci, sarcasm. You typically see it a lot on Reddit
10:04:43FromDiscord<Leonardo da Vinci> In reply to @KatrinaKitten "A huge portion of": Sounds good to me
10:04:47FromDiscord<Elegantbeef> What do you mean "wrap up"↵(@Schelz)
10:05:07FromDiscord<Leonardo da Vinci> In reply to @KatrinaKitten "A huge portion of": I have autism, but i trained myself a lot to detect stuff
10:05:12FromDiscord<Schelz> How to use cpp or C code in nim
10:05:23FromDiscord<Elegantbeef> For some reason i'm viewed as a jaded asshole, i just dont get it 😛↵(@KatrinaKitten)
10:05:38FromDiscord<Solitude> In reply to @KatrinaKitten "A huge portion of": why are there no tags if i want to come across as angry or upset?
10:06:42FromDiscord<Elegantbeef> Throw a few cunts in there it'll get the message across ya dumb cunt 😉
10:06:50FromDiscord<Leonardo da Vinci> In reply to @Elegantbeef "For some reason i'm": Some people are todo sensitive
10:07:07FromDiscord<Leonardo da Vinci> (edit) "todo" => "too"
10:07:10FromDiscord<amadan> In reply to @Elegantbeef "Throw a few cunts": Might confuse Australians though wouldn't it?
10:07:17FromDiscord<Solitude> In reply to @Elegantbeef "Throw a few cunts": okay /mad
10:07:23FromDiscord<Elegantbeef> I dont speak boomerang sorry
10:07:42FromDiscord<Leonardo da Vinci> In reply to @Elegantbeef "Throw a few cunts": Okay /laughing
10:09:14FromDiscord<KatrinaKitten> In reply to @Solitude "why are there no": Honest answer, probably because they're primarily used to defuse situations that could otherwise cause a misunderstanding and spiral, as opposed to ensuring a situation does spiral. It's easy enough to communicate that you're ticked off with other methods, but sometimes subtler things like sarcasm or a light hearted jab can fly under the radar, which is why the system was originally create
10:09:32FromDiscord<Elegantbeef> That's one long way of writing "poes law" 😛
10:09:39FromDiscord<KatrinaKitten> Yeah, basically lol
10:09:55FromDiscord<KatrinaKitten> But most people probably aren't familiar with that either, so
10:10:37FromDiscord<Elegantbeef> Get learneded
10:10:45FromDiscord<Leonardo da Vinci> In reply to @KatrinaKitten "Honest answer, probably because": Okay /confused
10:11:14FromDiscord<KatrinaKitten> TLDR they're shorthand for "I'm not mad, I'm just <insert intended tone>"
10:11:34FromDiscord<Leonardo da Vinci> I am installing manjaro now /anxious
10:11:44FromDiscord<Elegantbeef> We're really going long down this path of one `/j`
10:11:52FromDiscord<Elegantbeef> I personally just use `/j` to sign off
10:12:17FromDiscord<Leonardo da Vinci> In reply to @Elegantbeef "We're really going long": Join us!!! /join the trend
10:18:16FromDiscord<Anis Taluqdar> Yeah, I was used to it. It's best. But I need to leave for windows 😭😭↵(@Leonardo da Vinci)
10:19:06FromDiscord<Elegantbeef> Sucks to suck
10:19:37FromDiscord<Anis Taluqdar> Maybe suck to sucks 😅
10:27:26PMunchHmm, I have this weird long-standing issue with one of my Nim script where it compiles fine but just doesn't work in release mode. Works fine in debug though
10:29:19FromDiscord<Elegantbeef> Do we guess the issue or is it sharable?
10:30:04*krux02 joined #nim
10:30:33PMunchHaha, give me a sec
10:31:30PMunchThis is the script: http://ix.io/3J7m/nim
10:32:01FromDiscord<Elegantbeef> Uploaded with raw new lines?
10:32:02PMunchBut by itself it isn't very useful as it calls out to some external scripts
10:32:23PMunchJust remove the /nim from the URL
10:32:33PMunchSometimes ix messes up when it tries to syntax highlight..
10:33:00FromDiscord<Elegantbeef> Well there's your problem 300 indent levels 😛
10:33:34PMunchIt's just a hacky little script :P
10:34:15PMunchThe problem is with the nimSHA2 library that libkeepass uses
10:34:32PMunchOr nimAES, I don't remember
10:34:43PMunchIt fails to decrypt when it's compiled in release mode
10:34:50FromDiscord<Elegantbeef> Odd
10:35:06FromDiscord<Elegantbeef> Well i cant look into it right now i need to sleep
10:35:27FromDiscord<Elegantbeef> If i remember i might take a look at it and see if there's an issue, but i probably cant be arsed 😛
10:40:56PMunchLazy sod
10:41:16PMunch:P
10:45:14FromDiscord<Leonardo da Vinci> In reply to @Anis Taluqdar "Yeah, I was used": I installed Ubuntu once, and it did broke somehow, i prefer just work, stable distros
10:46:40PMunchI used to use Ubuntu
10:47:02PMunchBut I always ended up breaking it when I tried to install a newer package than what it offered for some task
10:47:29PMunchSo then I switched to Manjaro (because it had an i3 community flavour at the time) and I haven't reinstalled that machine since
10:49:11FromDiscord<valerga> last ubuntu i had was a kde neon transformed to kubuntu transformed to tiling wm setup
10:49:17FromDiscord<valerga> it worked for a few years
10:49:44FromDiscord<valerga> suddenly some weird audio problem and I kinda blame the proprietary programs I ran
10:50:24PMunchI had Xubuntu transformed to i3
10:50:33FromDiscord<Leonardo da Vinci> What is i3?
10:50:40PMunchTiling window manager
10:51:04FromDiscord<Leonardo da Vinci> does mandado break easily?
10:51:18PMunchBut Manjaro i3 flavour just had a bunch of nice little scripts that made the i3 integration smoother
10:51:22FromDiscord<Leonardo da Vinci> (edit) "mandado" => "manjaro"
10:51:49PMunchWell, it is a bleeding edge distro. But it is a month behind Arch I believe. So the worst errors should be weeded out
10:52:19PMunchI have broken it a couple times, but nothing I wasn't able to fix
10:52:41PMunchAnd the community used to be super helpful back when I first got into it, but I haven't been in there for ages
10:52:52PMunchAlso helps that you can use the Arch wiki more or less directly
10:55:49FromDiscord<Leonardo da Vinci> Ubuntu got broken in 1 day
10:56:48FromDiscord<Moregon> manjaro breaks very easily, I thought Ubuntu was supposed to be more of a just work distro too
10:57:01FromDiscord<Leonardo da Vinci> In reply to @Moregon "manjaro breaks very easily,": Noooo
10:57:18FromDiscord<Moregon> You should avoid manjaro over all else imo
10:57:37FromDiscord<Leonardo da Vinci> I just installed manjaro
10:57:48FromDiscord<Moregon> rip
10:57:55FromDiscord<Leonardo da Vinci> i amor gonna try, and if it breaks, i will delete it just like ubuntu
10:58:13FromDiscord<Moregon> ok
10:58:33FromDiscord<Leonardo da Vinci> (edit) "amor" => "am" | "try," => "try it" | "breaks," => "breaks"
10:59:33FromDiscord<Moregon> If it breaks I was happy with openSUSE tumbleweed when I used it for a bit and Fedora is pretty good just works distro I think
11:00:22FromDiscord<Leonardo da Vinci> In reply to @Moregon "ok": What do you recommend me for a gaming, just works?
11:03:33FromDiscord<Clonkk> Pop OS! is prob. best distro for gaming
11:05:16FromDiscord<hmmm> oh dear I just realized I have two procs: datecheck and checkdate that do the same thing: call parse from datetime lol. The first works on seq[T] and the second on string. Any chance I can compact those ugly ducklings in a beautiful flamethrower err swan
11:05:48FromDiscord<Leonardo da Vinci> In reply to @Clonkk "Pop OS! is prob.": Can i use it with XFCE?
11:11:43FromDiscord<Rika> In reply to @Leonardo da Vinci "Can i use it": Likely not
11:11:58FromDiscord<Rika> In reply to @hmmm "oh dear I just": Rename them to the same thing
11:12:06FromDiscord<Rika> Overloading, baby
11:12:10FromDiscord<hmmm> wut
11:12:11FromDiscord<hmmm> it works?
11:12:30FromDiscord<hmmm> this might be the coolest thing I learned today rika san
11:13:04FromDiscord<Rika> I mean if the types are different then it should work
11:13:13FromDiscord<hmmm> I'll let you know
11:15:03FromDiscord<enthus1ast> check is one of the worst proc names btw 😉
11:15:10FromDiscord<hmmm> nu!
11:15:37FromDiscord<hmmm> I find it beautiful and my little brain can find ease in the simple concept of checking
11:15:39FromDiscord<enthus1ast> Why not parseDatetime ?
11:15:51FromDiscord<hmmm> it's ugly as sin enthy
11:16:14FromDiscord<enthus1ast> Then overload it for a string and a seq
11:19:09FromDiscord<enthus1ast> I mean, what does it "check"? It does not even return bool, it is clearly a parseDatetime, and if it would return a bool it must be named isDatetime.
11:19:38FromDiscord<enthus1ast> My bank would prolly have a check function
11:19:40FromDiscord<hmmm> nunu both are checkers and return bool
11:23:23FromDiscord<enthus1ast> Ahh now i get you\:↵"checkers[note 1] (American English) is a group of strategy board games for two players"
11:23:55FromDiscord<hmmm> hey do not make fun of my ugly ducklings 🤨
11:27:09FromDiscord<hmmm> is there something I should know about 'things' inside bigger "things". Like in "this is a 'thing', bro"
11:27:28FromDiscord<hmmm> I have the feeling I should escape the little guys
11:27:32FromDiscord<hmmm> but maybe they work
11:28:27FromDiscord<Anis Taluqdar> 🙄🙄
11:32:54FromDiscord<Rika> In reply to @enthus1ast "My bank would prolly": No your bank would have a cheque function 😉
11:33:15FromDiscord<enthus1ast> i've learned english very late
11:33:36FromDiscord<enthus1ast> or never actually ;)
11:35:49*xet7 quit (Remote host closed the connection)
11:43:26FromDiscord<Rika> No it’s a joke, cheque is British and check is American
11:48:46FromDiscord<hmmm> yay overloading work'd
11:49:06FromDiscord<hmmm> now I must choose what I like more between datecheck and checkdate 😦
11:54:58FromDiscord<sigmasd> Anyone uses nvim with nim? I'm using https://github.com/alaviss/nim.nvim and I'm currently mainly missing auto completion
11:55:17FromDiscord<sigmasd> Anyone uses nvim +coc with nim? I'm using https://github.com/alaviss/nim.nvim and I'm currently mainly missing auto completion
11:55:30FromDiscord<Rika> You need an autocomplete engine
11:55:43FromDiscord<Rika> You also then need to register such plugin with the engine
11:55:53FromDiscord<Rika> There is instructions on the read me of that plugin
11:56:31FromDiscord<sigmasd> I'm using coc and the one recommended on the extension page (prabirshrestha/asyncomplete.vim) conflicts with it apparently
12:12:48*arkurious joined #nim
12:36:32*rockcavera joined #nim
12:36:33*rockcavera quit (Changing host)
12:36:33*rockcavera joined #nim
12:37:28FromDiscord<Rika> Yes because those are two autocomplete engines
13:03:27*sagax joined #nim
13:12:16FromDiscord<keks> Hi all! I'm new to NIM and still figuring things out. I'm trying to apply a map() function to an iterator, but it seems it only works with sequences. Is it intentional? I expect that map() should work on all kinds of iterables, i.e. not only on the sequences.
13:19:22FromDiscord<IsaacPaul> In reply to @apahl "Did you have a": Thanks will definitely take a look. Seems like what I’m looking for
13:35:42qwrkeks: there is mapIt macro that is often better choice to use
13:38:57qwrkeks: thought there is also map definition for iterators
13:42:04qwrhm i'm wrong, the simple map don't work, but mapIt works
14:00:06FromDiscord<keks> In reply to @qwr "hm i'm wrong, the": Thank you! Though mapIt doesn't seem to work either "echo "0101001110".items.mapIt(parseInt($it))"
14:01:18FromDiscord<Solitude> omit `items`
14:01:29FromDiscord<keks> I found that there is an "iterutils" package that seems to provide map/reduce/filter for iterators, but it is really weird that it wouldn't work on iterators.
14:01:39FromDiscord<keks> (edit) "iterators." => "iterators in the standard library."
14:02:25FromDiscord<keks> In reply to @Solitude "omit `items`": Brilliant, thanks a ton!
14:03:10FromDiscord<keks> Though this separation between sequences and iterators is weird. In Python or D algorithms from the standard library work on both arrays and iterators/ranges.
14:03:28FromDiscord<Rika> nim iterators are inlined
14:03:32FromDiscord<Solitude> yeah, everything sucks
14:03:42FromDiscord<Rika> though i assume
14:03:48FromDiscord<Rika> whoops, i hit enter by accidenta
14:03:49FromDiscord<Rika> (edit) "accidenta" => "accident"
14:04:53FromDiscord<Rika> it being inlined means there isnt something to pass into a function
14:05:29FromDiscord<Rika> i guess there could be an automatic inline->closure to "ensure" first class iterators without losing too much performance? but yeah, closure iterators are apparently much slower
14:05:34FromDiscord<Rika> too much slower to be a default
14:07:36FromDiscord<keks> It's been a while since I looked at ranges in D, but I'm sure they are equally well optimised.
14:09:19FromDiscord<keks> but ranges in D are quite a bit different to the yield-based iterators in Nim..
14:09:34FromDiscord<Rika> well i'd like to know
14:14:36qwrsome languages like haskell can optimise normal function usage by inlining pretty much away, but it means more work for the compiler (and the pure no-sideeffects language also helps)
14:15:35FromDiscord<ajusa> man why are linking issues impossible to debug
14:15:39FromDiscord<Rika> nim kinda does that too for regular functions but iterators are just by default always inlined
14:15:57FromDiscord<Rika> there isnt any real special sauce thats used to make it fast in a smarter way
14:16:25FromDiscord<retkid> how do i know when something is a good candidate for async and not threads
14:16:26FromDiscord<Rika> i guess its kinda sad but i can imagine it being one hell of a task to do
14:16:44FromDiscord<Rika> In reply to @retkid "how do i know": when your bottleneck is networking or reading files or so
14:16:48FromDiscord<retkid> my program currently maxes out each thread its on doing all its math
14:16:48qwrand python is just slow :)
14:17:01FromDiscord<retkid> so i assume
14:17:04FromDiscord<Rika> In reply to @retkid "my program currently maxes": then thats not an async task
14:17:04FromDiscord<retkid> threading is applicable
14:17:08FromDiscord<Rika> keep on using threads
14:17:09FromDiscord<Rika> yes
14:17:18*Vladar joined #nim
14:17:23FromDiscord<retkid> well, im not using threads lol, i meant any thread it randomly spawns upon
14:17:24FromDiscord<Rika> you need more threads it feels like lol
14:17:29FromDiscord<Rika> wdym?
14:17:44FromDiscord<retkid> whenever a thread is allocated to the process it goes from 0.7% to 100
14:18:11FromDiscord<Rika> idk then lol
14:18:14FromDiscord<retkid> also my memory goes from 4 gb to 8 gb then it just dies L
14:18:16FromDiscord<retkid> (edit) "L" => ":("
14:18:25FromDiscord<Rika> youre prolly doing something wrong? idk
14:18:26FromDiscord<enthus1ast> sounds like a bug \:)
14:18:27FromDiscord<keks> In reply to @Rika "nim *kinda* does that": well, chaining map/filter on the iterators could be unrolled into a big for loop, no?
14:18:36FromDiscord<Rika> In reply to @keks "well, chaining map/filter on": i know
14:18:38FromDiscord<retkid> no im not its just bad memory managment
14:18:41FromDiscord<Rika> and thats exactly what zerofunctional does
14:18:42FromDiscord<retkid> (edit) "managment" => "management"
14:18:48FromDiscord<Rika> but i dont know why its not like that from the getgo
14:19:40FromDiscord<retkid> now that i think about it, maybe this is wrong?
14:19:50FromDiscord<retkid> ah im not deallocing it
14:20:17FromDiscord<Rika> lol
14:20:58FromDiscord<retkid> nah that doesn't solve anything, the tables are just super big
14:21:32FromDiscord<Rika> so you just literally dont have enough memory to do the task
14:21:41FromDiscord<retkid> likely
14:21:51FromDiscord<retkid> are orderedtable less efficient than just tables?
14:22:00FromDiscord<Rika> no
14:22:03FromDiscord<Rika> well
14:22:07FromDiscord<Rika> i didnt check
14:22:19FromDiscord<Rika> it probably is by a small bit? but afaik the representations seem the same...
14:23:28FromDiscord<retkid> they're much smaller
14:24:03FromDiscord<retkid> by maybe 30%
14:24:39FromDiscord<retkid> at least for my tables of 2073600 entries
14:24:46FromDiscord<retkid> (edit) "2073600" => "2073600+"
14:25:29FromDiscord<retkid> hmmm
14:25:37FromDiscord<retkid> each one should be 5 mbs doing the math
14:25:42FromDiscord<retkid> maybe I should just use a sequence
14:26:09FromDiscord<retkid> (edit) "math" => "math, here they're like 500 mb"
14:33:42FromDiscord<enthus1ast> Do you need the table for your calculation?
14:34:01FromDiscord<retkid> i need it to organize the data but after that I can just use a sequence
14:34:18FromDiscord<enthus1ast> If no then just don't store it in memory but dump it to your mass storage
14:34:55FromDiscord<retkid> yea thats the next step of optimization but im concerned for some weird race condition if i thread it
14:34:58FromDiscord<retkid> if that makes sesne
14:39:29FromDiscord<retkid> alright so i've got near the 5 mb goal by storing everything as joined
14:39:34FromDiscord<retkid> (edit) "joined" => "strings"
14:39:39FromDiscord<retkid> tables => seq => string
14:48:33FromDiscord<ajusa> Currently getting a `/usr/bin/ld.bfd: errno: TLS reference in /usr/lib64/libm-2.34.a(w_pow.o) mismatches non-TLS reference in /home/ajusa/.cache/nim/main_r/stdlib_io.nim.c.o` with cosmonim, anyone here understand linkers?
15:19:09FromDiscord<Smarc> Hey guys, I have a confusing little issue with https://github.com/Smarcy/nim_chess especially with 'nimble test'.↵If I run 'nimble test' as it is right now, it works fine and every test is green. But if I insert 'b.draw' above L461 in 'test_move.nim' it draw the board correct and the tests are still green. If I insert 'b.draw' right after L461 the test crashes. I just don't understand how this behaviour is able to happen. Would really app
16:01:56FromDiscord<Smarc> Nobody any clue? Or should I provide any more information? :(
16:04:14FromDiscord<qb> Is there no `readAll` for `osproc`?
16:05:54*PMunch quit (Quit: Leaving)
16:09:30Amun-RaSmarc: that test case is kinda largish
16:17:28nrds<Prestige99> qb what are you trying to do?
16:20:51FromDiscord<IsaacPaul> In reply to @Smarc "Nobody any clue? Or": Do you really need to draw during a test? If I had to _guess_ it maybe because of echo. I'm not sure how tests are run.. if they are ran in parallel then accessing a single resource (echo) from multiple places definitely will cause issues. ↵↵Perhaps an out of bounds error or accessing a nil somewhere? xD
16:21:14FromDiscord<IsaacPaul> Comment pieces out of draw until it starts working
16:21:27FromDiscord<IsaacPaul> (edit) "pieces" => "lines"
16:21:53FromDiscord<IsaacPaul> Comment lines
16:36:22*xet7 joined #nim
16:44:51FromDiscord<lytedev> am I dumb or is there no `parseInt` for `int64`?
16:46:15FromDiscord<Solitude> "1".parseInt.int64
16:46:48FromDiscord<lytedev> would that not fail for >32bit int strings?
16:47:28FromDiscord<Solitude> !eval echo "9223372036854775807".parseInt
16:47:29NimBotCompile failed: /usercode/in.nim(1, 27) Error: undeclared field: 'parseInt' for type system.string [type declared in /playground/nim/lib/system.nim(34, 3)]
16:47:47FromDiscord<Solitude> !eval import strutils; echo "9223372036854775807".parseInt
16:47:50NimBot9223372036854775807
16:48:51FromDiscord<lytedev> Ah so int _is_ an int64 on 64-bit platforms, then? I should certainly have expected that I suppose. Thank you!
16:49:05FromDiscord<lytedev> Presumably, that would fail on 32-bit platforms, though, no?
16:49:15FromDiscord<Solitude> probably
16:49:27FromDiscord<lytedev> 👍 thank you
16:51:21Amun-Rathere's parseBiggestInt
16:51:26FromDiscord<Saptak> sent a code paste, see https://play.nim-lang.org/#ix=3J9r
16:51:36FromDiscord<Saptak> sent a code paste, see https://play.nim-lang.org/#ix=3J9s
16:52:02FromDiscord<Solitude> !eval var name:int
16:52:04NimBotCompile failed: /usercode/in.nim(1, 10) Error: invalid token: (\29)
16:52:23FromDiscord<demotomohiro> In reply to @Saptak "is this valid?": What do you want to do with that code?
16:52:35FromDiscord<Saptak> In reply to @demotomohiro "What do you want": i need a pointer
16:52:52FromDiscord<demotomohiro> You need to write `var name: ptr int`.
16:52:55FromDiscord<lytedev> `Pint`?
16:53:14FromDiscord<Saptak> In reply to @demotomohiro "You need to write": ok
16:53:43FromDiscord<Solitude> In reply to @Saptak "i need a pointer": https://nim-lang.github.io/Nim/tut1.html#advanced-types-reference-and-pointer-types
16:54:08FromDiscord<Saptak> thanks
16:57:04FromDiscord<qb> In reply to @nrds "<Prestige> qb what are": I just want a the whole output of a process as one string instead of a seq[string]
17:02:43FromDiscord<qb> `outputStream.readAll()` did it
17:06:33FromDiscord<demotomohiro> There is asynchronous version of osproc.
17:06:34FromDiscord<demotomohiro> https://github.com/cheatfate/asynctools
17:06:57FromDiscord<demotomohiro> But I never used it.
17:21:02*freevryheid left #nim (WeeChat 3.4)
18:27:57*tinytoast is now known as tinytim
18:44:24*ldlework joined #nim
18:45:31ldleworkI just had a silly idea to pass along; People painstakingly clean-room reverse engineered the Ocarina of Time 64 source-code to C. It would be funny to strip down the C source to what's minimally required to compile a valid ROM. Then port it to Nim to set the stage for Nim N64 homebrew scene. ^_^
18:53:15*neurocyte0132889 quit (Read error: Connection reset by peer)
18:54:26*neurocyte0132889 joined #nim
18:54:26*neurocyte0132889 quit (Changing host)
18:54:26*neurocyte0132889 joined #nim
18:54:55*rb quit (Read error: Connection reset by peer)
18:55:06*rwb joined #nim
18:55:47*Vladar quit (Quit: Leaving)
18:57:00*rwb is now known as rb
19:45:21perroit's not a bad idea
19:45:34perrokind of a very specialized mini console
19:45:43perroretro*
19:46:00*tinytim is now known as typnoking
20:04:33GreaseMonkeya minimal ROM typically starts with a blob to talk to the given 3rd-party lockout chip or something like that, and then it jumps to the actual program which can be as simple as setting up the video mode then memcpy()ing to the framebuffer
20:05:27GreaseMonkeyRSP is completely optional here although i do believe the blob copies at least part of itself to RSP RAM in order to initialise the 4 or 8 MB of RDRAM
20:06:53GreaseMonkeyerm did i say memcpy() i meant to say memset() to force it to... some colour
20:07:14GreaseMonkeybut memcpy() can work too if you don't count data as being part of the "minimal" part ;)
20:08:48GreaseMonkeyanyway, long story short: there is no point in stripping down some C code to a minimal base when one can instead start from nothing and put whatever one needs to into the thing, and as an added bonus, this has already been done in assembly plenty of times
20:10:43GreaseMonkeyoh and if anyone's tempted to say "what about the gigaleak? would that help?": the N64 scene has had "interestingly-obtained" documentation from back when the N64 was still seeing new games coming out (and yet N64 emulators are still beyond complete embarassment)
20:12:39GreaseMonkeybut those docs were leaked out of SGI, so that ends up covering the RDP (the GPU) and the RSP (the secondary CPU, or as emulators treat it, the GPU), but not the PIF interface (so you still need unofficial docs for how to interface e.g. controllers and their paks and possibly also the save memory inside of the cartridge), and not the RDRAM interface
20:13:11FromDiscord<retkid> is there anyway to use del but have t be a specific value
20:13:29*vicfred joined #nim
20:13:30FromDiscord<retkid> ive found a time in my life where i need to remove values from a sequence but keep it the same length
20:13:46GreaseMonkeythe lack of RDRAM controller docs is evident in one of the actually good but still not fast enough emulators, where it spoofs the behaviour to get the boot ROM to finish, and then depending on the lockout chip used it dumps the RAM size into a given location in RAM
20:16:21*SebastianM joined #nim
20:31:38FromDiscord<hmmm> yo doods if I have two seqs A [a,b,c,d,e] and B [a,b,c] and want another seq with all the elements of A that are not in B should I use set stuff or is there some nifty "not in" keyword
20:32:27FromDiscord<lytedev> sounds like you want a set - any reason you need a seq?
20:32:44FromDiscord<hmmm> I need to loop it later
20:33:02FromDiscord<lytedev> you can iterate over the set -- if you need to preserve order, there's even an ordered set
20:33:30FromDiscord<hmmm> hmm no handy shortcuts from keywords or sequtils? 😦
20:33:37FromDiscord<hmmm> I guess it's a fairly common operation
20:33:44FromDiscord<lytedev> what is?
20:34:00FromDiscord<hmmm> taking as a seq all the items from A not in B
20:34:20FromDiscord<lytedev> yeah that's a set thing, not really a seq thing
20:34:51FromDiscord<lytedev> you could do it, of course, but it definitely sounds like you've got the wrong data structure 😉
20:35:04FromDiscord<hmmm> well that's a given lol
20:35:50FromDiscord<geekrelief> Just use a filter
20:36:22FromDiscord<hmmm> eh I might try, it's handier than the sets?
20:37:03FromDiscord<lytedev> but... why not use sets? they're not scary, I promise
20:37:31FromDiscord<hmmm> I wanted a one liner lol, I can feel in my bones that it's easy stuff that people do all the time with a oneline lol
20:37:55FromDiscord<lytedev> if you must, you can even `for sharedElement in (mySeq.toHashSet - myOtherSeq.toHashSet):`
20:38:44FromDiscord<hmmm> hmm hash set is what people commonly refer to set?
20:38:58FromDiscord<lytedev> docs here: https://nim-lang.org/docs/sets.html#incl%2CHashSet%5BA%5D%2CA
20:39:05FromDiscord<lytedev> (edit) "https://nim-lang.org/docs/sets.html#incl%2CHashSet%5BA%5D%2CA" => "https://nim-lang.org/docs/sets.html"
20:39:16FromDiscord<geekrelief> A.filterit(it notin B)
20:39:24FromDiscord<Elegantbeef> sent a code paste, see https://play.nim-lang.org/#ix=3Jau
20:39:35FromDiscord<Elegantbeef> If it's a settable type (any ordinal with a range smaller that 2^16)
20:39:39FromDiscord<hmmm> yay we got a bunch of oneliners
20:39:43FromDiscord<hmmm> 🥳
20:41:07FromDiscord<lytedev> TIL: std/setutils! thanks
20:41:26FromDiscord<Elegantbeef> You're welcome it's got some nice stuff some idiot made
20:41:29FromDiscord<Elegantbeef> Shit that was me
20:41:36FromDiscord<Elegantbeef> 😛
20:42:26FromDiscord<lytedev> why in `std/setutils` and not just in `std/sets`?
20:42:41FromDiscord<Solitude> because std/sets are hashsets
20:42:53FromDiscord<Solitude> and this is for builtin sets
20:42:57FromDiscord<lytedev> ah I see
20:48:32FromDiscord<Solitude> wait until you find about jsonutils
20:50:55*audiophile_ joined #nim
20:52:18*SebastianM quit (Quit: Bye)
21:00:23FromDiscord<Sabena Sema> ugh I have thoughts on araq’s proposal to add ADL to nim
21:00:32FromDiscord<Sabena Sema> I should write them up
21:02:38FromDiscord<retkid> is there any cools sugar way to organize a sequence into a squence of sequences
21:02:42FromDiscord<retkid> (edit) "squence" => "sequence"
21:03:34FromDiscord<retkid> oooh i can use chunks again!
21:11:16FromDiscord<retkid> i got it <3
21:11:29FromDiscord<michaelb> if I have `proc foo(x: varargs[uint]): uint`, in the body of `foo` how can I forward `x` to `bitops.bitor`?
21:12:36FromDiscord<Solitude> just as a regular argument
21:12:43FromDiscord<retkid> im a cylcepath
21:13:23FromDiscord<retkid> wait im gonna show you why
21:15:00FromDiscord<TryAngle> how do I import a local nimble project that is not (yet?) published on nimble?
21:15:10FromDiscord<retkid> var full = unorganized.organizeRow(width).map(x => x.join().splitHex((pad+1)6)).map(x => x.map(y => cutString(y)))
21:15:15FromDiscord<retkid> (edit) "var full = unorganized.organizeRow(width).map(x => x.join().splitHex((pad+1)6)).map(x => x.map(y => cutString(y)))" => "sent a code paste, see https://play.nim-lang.org/#ix="
21:15:35FromDiscord<michaelb> sent a code paste, see https://play.nim-lang.org/#ix=3JaH
21:15:41FromDiscord<Solitude> In reply to @TryAngle "how do I import": nimble develop
21:16:09FromDiscord<michaelb> (edit) "https://play.nim-lang.org/#ix=3JaH" => "https://play.nim-lang.org/#ix=3JaI"
21:16:15FromDiscord<Solitude> and import it like any other package
21:16:42FromDiscord<TryAngle> sent a code paste, see https://play.nim-lang.org/#ix=3JaJ
21:18:15FromDiscord<TryAngle> sent a code paste, see https://play.nim-lang.org/#ix=3JaK
21:18:24FromDiscord<TryAngle> so I can require it in projectB
21:19:24FromDiscord<Solitude> yes
21:19:31FromDiscord<TryAngle> ah I see thanks
21:19:35FromDiscord<TryAngle> (edit) "https://play.nim-lang.org/#ix=3JaK" => "https://play.nim-lang.org/#ix=3JaL"
21:20:34FromDiscord<retkid> can i filter a list for its length
21:20:53FromDiscord<retkid> if slice mod 4 != 0: remove
21:23:52FromDiscord<Solitude> sent a code paste, see https://play.nim-lang.org/#ix=3JaM
21:23:58FromDiscord<michaelb> 😿
21:24:09FromDiscord<Solitude> yep, generics are buggy as hell
21:24:24FromDiscord<michaelb> I guess I can try a reduce or loop
21:31:25FromDiscord<Elegantbeef> Brain what's the real code?
21:31:37FromDiscord<Elegantbeef> `varargs` are converted to arrays internally so you'd need to index it
21:33:50FromDiscord<Solitude> sent a code paste, see https://play.nim-lang.org/#ix=3JaP
21:34:52FromDiscord<Elegantbeef> Interesting
21:44:27FromDiscord<Sabena Sema> uint of int?
21:44:54FromDiscord<Sabena Sema> it seems zah got distracted with blorkchain a few years ago 😦
21:44:59FromDiscord<Elegantbeef> `uint` apparently is just broke
21:45:04FromDiscord<Sabena Sema> most of these bugs are nit actually that had to fix tho
21:45:18FromDiscord<Elegantbeef> Indeed
21:45:22FromDiscord<Sabena Sema> (edit) "nit" => "not"
21:45:23FromDiscord<Elegantbeef> So start helping 😛
21:45:30nrds<Prestige99> wat
21:45:33FromDiscord<retkid> sent a code paste, see https://play.nim-lang.org/#ix=
21:45:37nrds<Prestige99> why echo T and not echo i?
21:45:38FromDiscord<retkid> kinda proud of this
21:45:46FromDiscord<Sabena Sema> wants the type
21:45:51FromDiscord<Sabena Sema> bot the value
21:45:52FromDiscord<Elegantbeef> They want to see the type that is bounded
21:45:56nrds<Prestige99> o
21:46:17FromDiscord<Sabena Sema> in any event it is hard to forward parameters through generics
21:46:28FromDiscord<Sabena Sema> easier to do with a macro or template
21:46:41FromDiscord<retkid> still dont understand macros
21:47:10nrds<Prestige99> beef link your dev.to post
21:47:12nrds<Prestige99> :P
21:47:45FromDiscord<Elegantbeef> It's a bit outdated with `genast`
21:47:54FromDiscord<Elegantbeef> But if you want me to https://dev.to/beef331/demystification-of-macros-in-nim-13n8
21:48:05nrds<Prestige99> update it ;)
21:51:51FromDiscord<Elegantbeef> Nah gotta see why the above generic doesnt concretely bind to `uint`
21:53:17FromDiscord<retkid> elegant way to flatten a list
21:55:00FromDiscord<retkid> (edit) "list" => "sequence"
21:56:12FromDiscord<retkid> to the person who gave me itertools
21:56:15FromDiscord<retkid> my life will never be the same
21:56:40FromDiscord<retkid> reminds me to continue my Ocaml quest
22:22:37FromDiscord<Ricky Spanish> are there pre-compiled releases of nim i can download directly from a url to integrate into my ci system without running a script? i.e just the folder as is containing the binary for my platform
22:24:08FromDiscord<IsaacPaul> https://nim-lang.org/install.html
22:24:21FromDiscord<Solitude> i tried to reduce your problem and i cant reproduce it at all, varargs are forwarded as expected...
22:24:53FromDiscord<Solitude> sent a code paste, see https://play.nim-lang.org/#ix=3Jb2
22:25:11FromDiscord<michaelb> hmm
22:25:16FromDiscord<michaelb> what Nim version are you using?
22:25:28FromDiscord<Solitude> devel
22:25:33FromDiscord<michaelb> btw, I ended up using a `for` loop over the varargs, works fine
22:25:45FromDiscord<Solitude> yeah, but it should just work...
22:25:47FromDiscord<michaelb> I'm using v1.6.2, so not sure what's up
22:26:33FromDiscord<Solitude> it was erroring for me too, magical
22:27:28FromDiscord<Solitude> In reply to @brainproxy "I'm using v1.6.2, so": wait, can you show me the body of this proc?
22:28:00FromDiscord<Ricky Spanish> the link tells me to use brew on mac or choosenim, the tarballs are for linux or a src archive is there a pre-compiled macos release? @IsaacPaul
22:28:16FromDiscord<IsaacPaul> There are not
22:28:45FromDiscord<Ricky Spanish> ah ok ill just write someting to compile it from the src tar i guess, thanks anyway
22:31:19FromDiscord<IsaacPaul> yea currently its just windows and linux
22:31:34FromDiscord<IsaacPaul> and that's what choosenim uses otherwise its builds from source
22:41:19FromDiscord<Ricky Spanish> yeh understandable its always a big like this for mac to be fair 😆 makes it a nightmare trying to automate mac builds internally
22:42:00FromDiscord<Ricky Spanish> (edit) "big" => "bit"
22:44:07FromDiscord<Elegantbeef> So solitude that issue you've showed today of `proc a[T: uint](i: T)` I think is caused because any literal smaller than the type is considered the same type, and as such the generic says "Yep this works"
22:44:58FromDiscord<Elegantbeef> sent a code paste, see https://play.nim-lang.org/#ix=3Jb5
22:45:12FromDiscord<Elegantbeef> So i guess it's a case of "Dont allow this logic for generics"
22:45:41FromDiscord<Elegantbeef> Oh shit that applies to even normal types, this is just wrong
22:46:01FromDiscord<Elegantbeef> sent a code paste, see https://play.nim-lang.org/#ix=3Jb6
22:56:07FromDiscord<Solitude> damn
22:56:43FromDiscord<Elegantbeef> Which means there is just an issue with integer type relations
22:57:10FromDiscord<michaelb> sent a code paste, see https://play.nim-lang.org/#ix=3Jb8
22:58:14FromDiscord<Solitude> sent a code paste, see https://play.nim-lang.org/#ix=3Jb9
23:00:18FromDiscord<Solitude> In reply to @Elegantbeef "Which means there is": I get why it would allow to pass smaller sized number, but mixing signed/unsigned....
23:01:08FromDiscord<Elegantbeef> It doesnt work with signed/unsigned
23:01:22FromDiscord<Elegantbeef> The reason your example works is it's a int literal and it says "yes this is valid"
23:02:22FromDiscord<Elegantbeef> sent a code paste, see https://play.nim-lang.org/#ix=3Jbe
23:06:18FromDiscord<michaelb> In reply to @Solitude "Oh, like that, thats": can you enlighten me?
23:11:58FromDiscord<Solitude> In reply to @brainproxy "can you enlighten me?": it wont help you in your case. without a macro, at least. you can pass vararg argument to another vararg parameter, but not make varargs magically fill required parameters. without a macro.
23:21:37*audiophile_ quit (Ping timeout: 240 seconds)
23:37:55FromDiscord<qb> I'm looking for `split` which doesn't replaces the split separator. https://play.nim-lang.org/#ix=3Jbo
23:37:59FromDiscord<qb> anything done for this task?
23:49:22FromDiscord<qb> https://play.nim-lang.org/#ix=3Jbq