<< 28-11-2022 >>

00:06:42*mahlon quit (Remote host closed the connection)
00:06:56*mahlon joined #nim
00:07:32*mahlon quit (Remote host closed the connection)
00:11:03*mahlon joined #nim
00:12:12FromDiscord<yrashk> _is thinking of doing a live coding session building a library for making PostgreSQL extensions in Nim. I am experienced with Rust (and building these extensions in Rust; I am a contributor to https://github.com/tcdi/pgx) but have minimal Nim experience. Let me know if you'd be interested to join!_
00:15:14*derpydoo joined #nim
00:22:13FromDiscord<wick3dr0se> sent a code paste, see https://play.nim-lang.org/#ix=4h3B
00:24:39FromDiscord<wick3dr0se> Just trying to check if one directory or the other exist and whicever does, set to bin variable
00:25:25*Lord_Nightmare quit (Quit: ZNC - http://znc.in)
00:28:17*Lord_Nightmare joined #nim
00:32:49*adium joined #nim
00:35:55FromDiscord<Elegantbeef> Or just use a procedure
00:36:00FromDiscord<Elegantbeef> sent a code paste, see https://paste.rs/pwS
00:37:40FromDiscord<wick3dr0se> Thanks a lot. I like the statement for now. I still have a ton to learn
00:38:52FromDiscord<Rika> In reply to @yrashk "_is thinking of doing": Sounds interesting, not sure what a live coding session exactly is
00:39:36FromDiscord<Rika> sent a code paste, see https://play.nim-lang.org/#ix=4h3H
00:44:23FromDiscord<Elegantbeef> just use a block expression 😛
00:44:49FromDiscord<wick3dr0se> sent a code paste, see https://play.nim-lang.org/#ix=4h3J
00:45:33FromDiscord<Elegantbeef> sent a code paste, see https://play.nim-lang.org/#ix=4h3K
00:46:03FromDiscord<wick3dr0se> Ima need a minute to process this
00:46:23FromDiscord<Elegantbeef> You dont have a `else` branch
00:46:32FromDiscord<wick3dr0se> Well I tried else discard
00:46:38FromDiscord<Elegantbeef> Expressions need to be exhaustive
00:46:44FromDiscord<Elegantbeef> So you need to either raise an exception or have a else branch
00:46:52FromDiscord<Elegantbeef> Well using discard is literally the opposite of what you want
00:47:17FromDiscord<Elegantbeef> You want the value to go up not do dissipate
00:47:41FromDiscord<wick3dr0se> True, I mean I can else set it to windows program files lmao
00:50:05FromDiscord<wick3dr0se> Ah, nice it works setting winBin. I'm way too used to BASH and using elifs with no else
00:56:07FromDiscord<huantian> You can use elifs with no else if it’s not an if expression
00:56:10FromDiscord<huantian> But rather a statement
00:56:32FromDiscord<yrashk> any conventional way to accept TypeDef's name? I am using a macro as a pragma and I get the node with Pragma (Sym "TypeName") inside and can perhaps just match on that, but is there a better way to do so?
00:57:51FromDiscord<wick3dr0se> In reply to @huantian "You can use elifs": Ok thanks, all you guys learnt me something
01:05:42FromDiscord<wick3dr0se> sent a code paste, see https://play.nim-lang.org/#ix=4h3L
01:06:29FromDiscord<wick3dr0se> (edit) "https://play.nim-lang.org/#ix=4h3L" => "https://play.nim-lang.org/#ix=4h3M"
01:09:19FromDiscord<wick3dr0se> Even adding a break doesnt work but echoing d after the if expression works
01:25:39FromDiscord<yrashk> Is it possible to define a `macro` pragma with parameters, like `template` ones? I am getting an "invalid pragma" error
01:25:42*ltriant quit (Ping timeout: 265 seconds)
01:27:53FromDiscord<amadan> sent a code paste, see https://play.nim-lang.org/#ix=4h3N
01:28:32*ltriant joined #nim
01:33:05FromDiscord<yrashk> Is it impossible to do with named parameters (like in template pragmas), like `{.ec(name="hello",...).}`?
01:40:47FromDiscord<yrashk> sent a code paste, see https://play.nim-lang.org/#ix=4h3R
01:55:21FromDiscord<Elegantbeef> Cause it removes static typing
01:55:30FromDiscord<Elegantbeef> Atleast visible static typing
01:55:51FromDiscord<Elegantbeef> It's better to just have a `?` converter imo
01:56:00FromDiscord<Elegantbeef> Also you can just do `none(string)` you dont need that inane cast
02:04:30FromDiscord<albassort> in httpclient
02:04:36FromDiscord<albassort> can i get just the html data
02:05:03FromDiscord<albassort> sure i can split on <script>
02:05:10FromDiscord<albassort> but thats kinda lame
02:05:14FromDiscord<albassort> actually im gonna try that
02:05:58FromDiscord<albassort> https://media.discordapp.net/attachments/371759389889003532/1046607852980150376/image.png
02:08:47FromDiscord<Elegantbeef> Just parse the xml tree and navigate it
02:09:23FromDiscord<albassort> nah im registering it in a database
02:09:30FromDiscord<albassort> which requires valid xml
02:09:39FromDiscord<Elegantbeef> What
02:09:44FromDiscord<albassort> what do you mean what
02:10:01FromDiscord<albassort> postgres db has an XML type
02:10:02FromDiscord<albassort> and i wanna use it
02:10:24FromDiscord<Elegantbeef> Navigate the tree get the xml you want then convert it back to text
02:10:40FromDiscord<albassort> i want the full thing
02:11:11FromDiscord<albassort> eh I'll probably be parsing it back in nim anyway so make it a string
02:31:36FromDiscord<albassort> hmm
02:31:42FromDiscord<Girvo> In reply to @Elegantbeef "Also you can just": But inane casts give me life 😢
02:31:52FromDiscord<albassort> it doesn't look like async is working how i think it would
02:32:13FromDiscord<albassort> sent a code paste, see https://play.nim-lang.org/#ix=4h47
02:32:58FromDiscord<Girvo> Somewhat orthogonal to your actual question, but why `ptr Channel`?
02:33:00FromDiscord<albassort> doCrawlFunction is waiting
02:33:12FromDiscord<albassort> redundancy,
02:33:14FromDiscord<Girvo> Using `ptr` in high-level code is typically a bit of a code-smell
02:33:24FromDiscord<albassort> (edit) "redundancy," => "redundancy"
02:33:30FromDiscord<albassort> sometimes stuffs don't work
02:33:40FromDiscord<albassort> don't worry about it
02:33:52FromDiscord<ChocolettePalette> How would you share a channel between threads? \:&#47;↵(@Girvo)
02:33:52FromDiscord<Girvo> I'm forced to use it down in embedded land, but avoiding it is preferable considering we have `var Channel` or `sink Channel` (or lent, etc.)
02:34:19FromDiscord<albassort> In reply to @ChocolettePalette "How would you share": you usually use ptrs on the shared heap
02:34:27FromDiscord<albassort> thats what i d
02:34:28FromDiscord<albassort> (edit) "d" => "do"
02:34:32FromDiscord<ChocolettePalette> Indeed
02:34:34FromDiscord<albassort> because sometimes they get weird
02:34:35FromDiscord<albassort> anyway
02:34:42FromDiscord<Girvo> shrugs you do you
02:35:14FromDiscord<albassort> whats up with doCrawlFunction
02:35:27FromDiscord<Girvo> You don't have an await anywhere
02:35:33FromDiscord<albassort> i want it to just... run it, then continue the iteration
02:36:46FromDiscord<Girvo> You want it to just be blocking?
02:37:01FromDiscord<albassort> no blocking
02:37:02FromDiscord<albassort> none
02:37:20FromDiscord<Girvo> I'm confused by what you're asking then I'm afraid
02:37:21*arkurious quit (Quit: Leaving)
02:37:39FromDiscord<albassort> i just want the functions to execute, then, just continue, no blocking
02:37:42FromDiscord<Girvo> You want to fire it off and not care about what it returns, etc.?
02:37:49FromDiscord<albassort> currently it seems to be doing it in series
02:37:55FromDiscord<albassort> In reply to @Girvo "You want to fire": yes
02:41:02FromDiscord<Girvo> The point of async is for it to work with the dispatcher specifically to allow you to sequence async IO mind you. I have tried to do what you're doing as well and felt like I was fighting asyncdispatch, so I used threadpool and spawn instead.
02:41:21FromDiscord<Girvo> Dumb question: you've got a runForever to start the dispatcher in there?
02:41:31FromDiscord<albassort> nope
02:42:25FromDiscord<Girvo> async/asyncdispatch is basically a Future interface around event loops, but unlike some other languages you need to run the dispatcher
02:43:01FromDiscord<albassort> hmmmmm
02:43:03FromDiscord<Girvo> Either by calling `poll` yourself, or using `waitFor` or `runForever`
02:44:45FromDiscord<Girvo> > All asynchronous functions returning a Future will not block. They will not however return immediately. ↵^ worth knowing, as I believe it was what was causing me some fun when I tried to do similar
02:46:01FromDiscord<albassort> hmmm
02:46:39FromDiscord<Girvo> threadpool/spawn are frankly a better fit for the "run this somewhere else, I don't care about sequencing its return back to the caller"
02:46:51FromDiscord<Girvo> At least in my experience
02:47:17FromDiscord<albassort> yea....... not at all what is happening here
02:47:56FromDiscord<Girvo> Right, I see you're trying to use a channel to send stuff back. Which again, is a way better fit for threadpool
02:48:10FromDiscord<Girvo> If you're getting data out of an async proc, that's the point of `Future[T]` and await...
02:48:59FromDiscord<albassort> No... everything here is setup in the structure which is optimal and least likely to break
02:49:08FromDiscord<Girvo> lol
02:49:10FromDiscord<Girvo> You do you mate
02:49:16FromDiscord<Girvo> I'm going back to work
02:57:23FromDiscord<albassort> sent a code paste, see https://play.nim-lang.org/#ix=4h49
02:57:28FromDiscord<albassort> am i misunderstanding this? hmm
02:57:32FromDiscord<albassort> @Rika wakeup
02:59:05FromDiscord<Rika> Sleep is not async
02:59:14FromDiscord<Rika> Use the async version
02:59:32FromDiscord<Rika> There is no other fix
03:00:07FromDiscord<albassort> sent a code paste, see https://play.nim-lang.org/#ix=4h4c
03:01:49FromDiscord<Rika> I have no idea what you are doing
03:03:52FromDiscord<albassort> my ideal situation is doCrawl just executes and without blocking, goes onto the next iteration
03:06:09FromDiscord<albassort> who would have thought, rika was right
03:06:26FromDiscord<albassort> they didn't know they were but they were
03:11:48FromDiscord<Rika> sent a code paste, see https://play.nim-lang.org/#ix=4h4f
03:12:00FromDiscord<Rika> (edit) "https://play.nim-lang.org/#ix=4h4f" => "https://play.nim-lang.org/#ix=4h4g"
03:13:36NimEventerNew thread by halloleo: Is there a way to see all or older threads of a user?, see https://forum.nim-lang.org/t/9667
03:14:08FromDiscord<Rika> sent a code paste, see https://play.nim-lang.org/#ix=4h4i
03:14:38FromDiscord<Rika> there is no semblance of async here
03:14:40FromDiscord<Rika> this is all threads
03:14:47FromDiscord<Girvo> nods
03:14:49FromDiscord<Elegantbeef> `while not endy[]` even
03:15:03FromDiscord<albassort> IM TRYING TO MIX THEM
03:15:07FromDiscord<Elegantbeef> sorry couldnt help myself
03:15:23FromDiscord<albassort> In reply to @Elegantbeef "`while not endy[]` even": this was written in like a fit of rage
03:15:23FromDiscord<Girvo> Beef throwing popcorn from the cheap seats lol
03:15:49FromDiscord<albassort> i refuse to accept this valid criticism because i didn't write that part, me from 2 weeks ago did
03:15:52FromDiscord<albassort> blame her
03:16:26FromDiscord<Elegantbeef> That's the only reason i'm here, I do nothing but stand↵(@Girvo)
03:16:47FromDiscord<Rika> In reply to @albassort "IM TRYING TO MIX": and you failed
03:17:06FromDiscord<Rika> there is literally no async code here other than the async pragma
03:17:08FromDiscord<albassort> so it turns out the asynchttpclient cannot handle like 12000 requests at the same time
03:17:21FromDiscord<albassort> In reply to @Rika "there is literally no": i was thinking of it like a coroutine
03:17:30FromDiscord<albassort> (that module should be functioning)
03:17:44FromDiscord<Rika> what?'
03:17:51FromDiscord<albassort> hm
03:20:20FromDiscord<wiga> is it possible to type an enum?
03:20:45FromDiscord<albassort> what
03:20:56FromDiscord<albassort> like assign values
03:21:07FromDiscord<albassort> enums are just named numbers
03:21:11FromDiscord<albassort> you cant type them beyond that
03:21:13FromDiscord<wiga> no like this ugly thing https://media.discordapp.net/attachments/371759389889003532/1046626790862499930/image.png
03:21:26FromDiscord<wiga> idk what i can use instead :/
03:21:39FromDiscord<sOkam!> In reply to @wiga "is it possible to": std/tables
03:21:54FromDiscord<wiga> i'll take a look, ty
03:21:56FromDiscord<albassort> YEA
03:22:21FromDiscord<albassort> keeps the enum, keep all of the types
03:22:30FromDiscord<albassort> then just put them in a table
03:22:46FromDiscord<sOkam!> technically, that type of use of an enum is actually a dictionary. in nim, those are tables instead
03:22:48FromDiscord<wick3dr0se> sent a code paste, see https://play.nim-lang.org/#ix=4h4j
03:23:08FromDiscord<albassort> In reply to @wick3dr0se "Is there a way": tables
03:23:25FromDiscord<wick3dr0se> Tables getting some love today then
03:23:55FromDiscord<albassort> sent a code paste, see https://play.nim-lang.org/#ix=4h4k
03:24:05FromDiscord<albassort> (edit) "https://play.nim-lang.org/#ix=4h4k" => "https://paste.rs/Umr"
03:24:22FromDiscord<albassort> (edit) "https://play.nim-lang.org/#ix=4h4m" => "https://play.nim-lang.org/#ix=4h4l"
03:24:26FromDiscord<wick3dr0se> f yea, thanks!
03:25:18FromDiscord<Rika> sent a code paste, see https://play.nim-lang.org/#ix=4h4n
03:31:05NimEventerNew Nimble package! nimcolor - Color printing interface for nim, see https://github.com/JessaTehCrow/NimColor
03:34:51FromDiscord<wick3dr0se> sent a code paste, see https://play.nim-lang.org/#ix=4h4o
03:35:28FromDiscord<albassort> oh sorry lol
03:35:38FromDiscord<albassort> sent a code paste, see https://play.nim-lang.org/#ix=4h4p
03:35:47FromDiscord<albassort> what happens is, it just doesn't download anything and it blocks
03:36:06FromDiscord<albassort> god damn httpclient
03:36:22FromDiscord<Rika> okay you need to run the dispatcher in the same thread somewhere
03:36:41FromDiscord<Rika> i really dont know much about mixing
03:37:01FromDiscord<albassort> i know nothing about async its scary
03:37:18FromDiscord<albassort> point me to the dispatcher in the docs because it was confusing
03:39:49FromDiscord<Rika> sent a code paste, see https://play.nim-lang.org/#ix=4h4t
03:40:01FromDiscord<Rika> this time you do need try receive because of the poll call
03:41:50FromDiscord<albassort> nah
03:42:03FromDiscord<albassort> nothin
03:42:16FromDiscord<albassort> waitFor works
03:42:32FromDiscord<albassort> I dont think it was intended to be used in both async and threading
03:42:35FromDiscord<Rika> `send` blocks if the channel isnt being consumed
03:42:53FromDiscord<Rika> what
03:42:59FromDiscord<Rika> In reply to @albassort "waitFor works": where do you put that?
03:43:10FromDiscord<albassort> at the client request
03:43:42FromDiscord<albassort> sent a code paste, see https://play.nim-lang.org/#ix=4h4u
03:43:51FromDiscord<albassort> (edit) "https://play.nim-lang.org/#ix=4h4u" => "https://play.nim-lang.org/#ix=4h4v"
03:44:05FromDiscord<albassort> (edit) "https://play.nim-lang.org/#ix=4h4v" => "https://play.nim-lang.org/#ix=4h4w"
03:46:46FromDiscord<albassort> trying Chronos
03:49:18FromDiscord<albassort> hmm, because im too tired to figure this out, I'll just use 40 threads
03:50:48FromDiscord<Rika> what the hell?
03:50:54FromDiscord<Rika> it works on my side though?
03:51:07FromDiscord<Rika> i dont know what you want
03:51:10FromDiscord<Rika> chronos will not help
03:52:41FromDiscord<Rika> sent a code paste, see https://play.nim-lang.org/#ix=4h4x
03:53:07FromDiscord<albassort> what os are you on
03:53:14FromDiscord<albassort> im on arc
03:53:16FromDiscord<albassort> (edit) "arc" => "arch"
03:53:27FromDiscord<Rika> i do not think that would matter
03:53:35FromDiscord<Rika> nonetheless, arch-based
03:54:01FromDiscord<albassort> perhaps its because im shooting so many urls through it
03:55:38FromDiscord<albassort> the initial set is around 3000
03:55:54FromDiscord<wick3dr0se> sent a code paste, see https://play.nim-lang.org/#ix=4h4y
03:55:56FromDiscord<albassort> the next set, if it went through, would at least quadruple
03:56:20FromDiscord<albassort> In reply to @wick3dr0se "Instead of `echo x["add"]`,": you gotta add paramStr(3) to the table
03:56:21FromDiscord<wick3dr0se> Tried setting it to variable first
03:56:24FromDiscord<albassort> mine was just an example
03:56:27FromDiscord<albassort> show code
03:57:13FromDiscord<wick3dr0se> sent a code paste, see https://play.nim-lang.org/#ix=4h4z
03:57:44FromDiscord<wick3dr0se> I know, I'm bad
03:57:55FromDiscord<albassort> so
03:58:06FromDiscord<albassort> probably coming from python, right?
03:58:20FromDiscord<wick3dr0se> Just BASH a bit of C and Go
03:58:47FromDiscord<albassort> last arg is declared in the when scope, and the echo call is outside of that
03:58:51FromDiscord<wick3dr0se> I'm really good with BASH unfortunately it's only created a lot of confusion for me here
03:58:58FromDiscord<albassort> this isn't best practice but
03:59:05FromDiscord<Rika> when does not scope
03:59:13FromDiscord<Rika> it is true that it will error if it is not defined
03:59:15FromDiscord<albassort> lastArg
03:59:15FromDiscord<Rika> but when does not make a scope
03:59:31FromDiscord<albassort> i've never used when declared
04:00:13FromDiscord<albassort> listen to rika they know more stuff and are better at helping people
04:00:15FromDiscord<wick3dr0se> Looks like it works as long as it is supplied
04:00:44FromDiscord<wick3dr0se> Just breaks if nothing, so I guess thats expected since trying to call a location that doesnt exist
04:00:50FromDiscord<Rika> yes
04:00:56FromDiscord<wick3dr0se> BASH has too much magic
04:01:04FromDiscord<Rika> so you should put the echo in the when as well
04:01:23FromDiscord<wick3dr0se> Ok that makes sense
04:01:42NimEventerNew thread by jasonfi: Memory leak fixes for db_postgres.nim, see https://forum.nim-lang.org/t/9668
04:02:49FromDiscord<wick3dr0se> Is paramStr even the best way to read arguments? It annoys me that it reads the --hints:off and file.nims as first two args
04:03:11FromDiscord<albassort> rika remember last year when i complained that if you multithread httpclient eventually it just dies
04:03:26FromDiscord<wick3dr0se> Cant even check if paramStr exist because theres no way it couldnt lol
04:03:53FromDiscord<Rika> In reply to @albassort "rika remember last year": i wouldnt
04:04:33FromDiscord<Girvo> At work we explicitly moved off multi-threaded httpclient because it would die after about 24-ish hours uptime. And had some odd behaviour
04:04:49FromDiscord<albassort> yes
04:05:05FromDiscord<albassort> so what happens is, in this situation, its a bug i haven't tracked down yet
04:05:20FromDiscord<albassort> running it on threads, eventually it locks the thread and the threads die
04:05:32FromDiscord<Rika> threading is wonderful
04:05:45FromDiscord<albassort> this wouldn't happen in C 😤
04:05:54FromDiscord<albassort> a bunch of other things would go wrong
04:05:57FromDiscord<Rika> lol
04:05:59FromDiscord<Girvo> Pfft, it absolutely would. points to all the cases in ESP-IDF that it does
04:06:09FromDiscord<Girvo> Though thats a whole different set of constraints lol
04:06:27FromDiscord<Rika> i will be leaving
04:06:31FromDiscord<albassort> I have never written a C file longer than 500 lines
04:06:32FromDiscord<Rika> i am busy
04:06:38FromDiscord<albassort> which tells you i don't do much c
04:06:40FromDiscord<albassort> bai rika lov u
04:06:43FromDiscord<Girvo> We simplified it to single threaded async-IO with multi-processes instead. Simpler, more robust
04:06:56FromDiscord<albassort> my job is go
04:07:00FromDiscord<albassort> so its not simpler and more robust
04:07:12FromDiscord<albassort> its mildly more complex and less robust
04:08:27FromDiscord<wick3dr0se> I think getopt is my best bet
04:34:39FromDiscord<voidwalker> how to return a sequence without its last element ?
04:36:17FromDiscord<amadan> You could make a copy `yourSeq[0 ..< ^1]`. Or if your using `result` then just remove the last item `result.setLen(result.len - 1)`
04:36:50FromDiscord<voidwalker> Oh I thought I can't use slices on seq
06:03:12*ltriant quit (Ping timeout: 264 seconds)
06:07:13NimEventerNew Nimble package! cpptuples - A wrapper for C++'s std::tuple, see https://github.com/sls1005/cpptuples
06:37:24*wallabra quit (Ping timeout: 264 seconds)
07:25:32*wallabra joined #nim
07:46:57*PMunch joined #nim
08:11:37*kenran joined #nim
08:13:27*kenran quit (Remote host closed the connection)
08:27:11*derpydoo quit (Ping timeout: 264 seconds)
08:39:53FromDiscord<ringabout> My nimble is broken, is there some way to repair it?
08:39:57FromDiscord<ringabout> `Error: unhandled exception: cannot read from file: C:\Users\blue\.nimble\packages_local.json [IOError]`
08:49:00PMunchHmm, does that file exist?
08:55:32FromDiscord<ringabout> I guess it is not, since I installed 0.14.0 for testing it, which messes up with my local installation.
08:55:36FromDiscord<ringabout> (edit) "is" => "does"
09:01:51FromDiscord<emanresu3> Is there a good tutorial for creating nimble packages?
09:02:24PMunch`nimble init` -> fill in the blanks -> ?? -> profit!
09:03:19PMunchThere isn't really that much more to it
09:06:32FromDiscord<ringabout> db_ are going to be moved out of the stdlib to nimble, what should I name it as?
09:10:24FromDiscord<emanresu3> Oh apparently I have to fork nim-lang/packages and make a pull request
09:11:13FromDiscord<emanresu3> dang it, I wish it didn't force me to use github, i'd have to create an account
09:14:29PMunchDevs without a GitHub account are few and far between, it's just a matter of making it the easiest for the most people
09:15:02FromDiscord<Bung> can take the name of https://github.com/jlp765/db ?↵(@ringabout)
09:15:44FromDiscord<ringabout> Yeah, It should have been `db` if the name wasn't taken.
09:16:35FromDiscord<Elegantbeef> clearly deebee
09:19:29FromDiscord<Elegantbeef> Hmph is there such thing as a bidirection git mirror....
09:21:28FromDiscord<Bung> we do have tool check a package really in used right? maybe just replace that `db` one
09:26:24FromDiscord<Rika> Why not dab :OMEGALUL:
09:28:22FromDiscord<Bung> oh I really want see the new design nimble site online
09:28:37FromDiscord<Elegantbeef> Oh shit gitlab actually has it https://docs.gitlab.com/ee/user/project/repository/mirror/bidirectional.html 😄
09:31:05PMunchWell it's just implemented with hooks
09:31:33FromDiscord<Elegantbeef> Yea i just thought it was inane enough no one would explicitly talk about it
09:50:06FromDiscord<ringabout> I changed my mind, I'm going to remove cgi first https://github.com/nim-lang/Nim/pull/20951 because that's simpler.
10:01:27PMunchHuh, this is pretty cool: https://tylercipriani.com/blog/2022/11/19/git-notes-gits-coolest-most-unloved-feature/
10:23:25NimEventerNew thread by sls1005: Importing generic variables, see https://forum.nim-lang.org/t/9671
10:28:48FromDiscord<demotomohiro> I didn't know C++ has generic variables.
10:33:46*pro joined #nim
10:34:25*pro left #nim (#nim)
10:39:38FromDiscord<sneakyfish> question about testament. when i run into an error i never get what that error ends. I always get `Failure: reNimcCrash debugInfo: compiler exit code was 0 but some Error's were found.` am i missing some type of flag?
10:40:24FromDiscord<sneakyfish> or do i need to catch the error?
10:40:39FromDiscord<ringabout> Did you use `nimout`?
10:40:52FromDiscord<sneakyfish> no i didnt.
10:40:56FromDiscord<sneakyfish> let me google that
10:41:32FromDiscord<ringabout> What's your tests?
10:41:33FromDiscord<sneakyfish> any docs on that?
10:41:45FromDiscord<sneakyfish> give me a sec
10:43:07FromDiscord<sneakyfish> sent a code paste, see https://play.nim-lang.org/#ix=4h5L
10:43:16FromDiscord<sneakyfish> and then the file it imports
10:43:56FromDiscord<sneakyfish> i know there is some kind of issue here since if i remove the import it does not fail.
10:44:02FromDiscord<sneakyfish> but im not sure what the error is
10:44:25FromDiscord<sneakyfish> sent a code paste, see https://play.nim-lang.org/#ix=4h5M
10:44:31FromDiscord<ringabout> What if you run it directly?
10:45:43FromDiscord<sneakyfish> ahh i see
10:45:53FromDiscord<sneakyfish> yeah that spits it out
10:46:18FromDiscord<ringabout> Here is the documentation of testament => https://nim-lang.github.io/Nim/testament.html
10:46:54FromDiscord<sneakyfish> cool, yeah i have that opened. just wasn't sure if i was missing something
10:46:59FromDiscord<sneakyfish> thanks 😄 !
10:47:10FromDiscord<ringabout> You are welcome.
10:47:11FromDiscord<Yepoleb> Good morning nim people
10:47:46FromDiscord<ringabout> Good afternoon
10:49:37FromDiscord<Rika> good evening
10:49:49FromDiscord<Dr. Theo> Good morning!
11:02:55FromDiscord<sneakyfish> good evening 😄
11:18:37*ltriant joined #nim
11:33:35*junaid_ joined #nim
11:43:28*junaid_ quit (Remote host closed the connection)
11:45:03FromDiscord<ShalokShalom> sent a long message, see http://ix.io/4h5X
11:45:49FromDiscord<ringabout> Yeah, only awesome one will be added.
11:46:15FromDiscord<ShalokShalom> Ah, ok ^^
11:46:23*jmdaemon quit (Ping timeout: 264 seconds)
11:50:18FromDiscord<ShalokShalom> sent a long message, see http://ix.io/4h5Z
11:50:19FromDiscord<ShalokShalom> https://github.com/ringabout/awesome-nim#scripting
11:58:51FromDiscord<tope> sent a code paste, see https://play.nim-lang.org/#ix=4h61
12:02:14FromDiscord<ringabout> In reply to @ShalokShalom "<@658563905425244160> idk if I": I don't know where to put it though.
12:20:44FromDiscord<ShalokShalom> To be honest
12:20:57FromDiscord<ShalokShalom> I think that could do well as part of the lan
12:21:01FromDiscord<ShalokShalom> (edit) "lan" => "language"
13:27:55*derpydoo joined #nim
13:47:18*NimEventer quit (Remote host closed the connection)
13:47:18*Yardanico quit (Quit: https://quassel-irc.org - Chat comfortably. Anywhere.)
13:47:43*Yardanico joined #nim
13:48:46*NimEventer joined #nim
14:20:57*arkurious joined #nim
14:39:08*kenran joined #nim
14:47:28*LuxuryMode joined #nim
14:50:44*kenran quit (Remote host closed the connection)
15:13:47*PMunch quit (Quit: Leaving)
15:19:33FromDiscord<iffy (Matt Haggard)> I have been given a string as a `ptr byte` and a length. How do I convert that to a string? Or how do I march through the "array" byte by byte? I've tried `cast[UncheckedArray[byte]](data)` and I've tried `data[0]`, `data[1]`, etc... but I think I'm misunderstanding something
15:20:13FromDiscord<Yardanico> In reply to @iffy (Matt Haggard) "I have been given": is it null terminated? if so, just `$cast[cstring](myptr)`
15:21:57FromDiscord<iffy (Matt Haggard)> Not sure if it's null-terminated, but I'll check↵(@Yardanico)
15:25:56FromDiscord<vindaar> sent a code paste, see https://play.nim-lang.org/#ix=4h6P
15:26:27FromDiscord<vindaar> (for the string of course it's better to just treat it as a string, but for other cases)
15:26:32FromDiscord<iffy (Matt Haggard)> sent a code paste, see https://play.nim-lang.org/#ix=4h6Q
15:28:56FromDiscord<wick3dr0se> How can I read command line arguments without reading the arguments supplied to the nim compiler and the filename itself? paramStr and commandLineParams both return filename/nim compiler flags as first 2 parameters
15:29:27FromDiscord<wick3dr0se> (edit) "2" => "2+"
15:32:42FromDiscord<hmmm> HA! finally I have an application for regex or whatever. I have a string in this format "[int number]-[int number]" and I need to replace the number before the dash with a date. What's the easiest dumbproof way to do eet bois?
15:33:52FromDiscord<wick3dr0se> Things like that always have me hell bent on wether I should be using Nim or slip into BASH for string manipulation
15:35:11FromDiscord<hmmm> hmm I think we have a buncha things in nim like regex/npeg/scan but I never needed them till now, I'm waiting for the nimgurus to instruct me in the most comfy way
15:35:26madpropshmmm
15:35:57FromDiscord<wick3dr0se> I'm sure there is plenty more features. I'm good with regex but wouldn't know where to start in Nim
15:36:05FromDiscord<albassort> does someTable exist lol
15:43:46FromDiscord<hmmm> I'm looking at scanf, seems pretty eazy
15:44:15FromDiscord<fowl> Can I write a frontend web app with nim alone? I don't want to write JS or CSS if I can avoid it lol
15:45:37FromDiscord<albassort> In reply to @fowl "Can I write a": technically? Yes. Practically? No.
15:46:09FromDiscord<albassort> go ahead ang give it a shot but 99% chance you'll just do JS and Html
15:49:35madpropsthe nim playground is written in nim
15:49:37madpropsthe frontend
15:50:12madpropshttps://github.com/karaxnim/karax
15:52:26*Phytolizer joined #nim
15:53:50FromDiscord<albassort> https://media.discordapp.net/attachments/371759389889003532/1046816193132122122/image.png
15:54:40FromDiscord<albassort> yea
15:54:43FromDiscord<albassort> its possible
16:01:09FromDiscord<albassort> @Phil since you reminded me that sets actually have use so much of my code is getting rewritten and is faster
16:01:11FromDiscord<albassort> thank u
16:16:15FromDiscord<ShalokShalom> Sets?
16:16:38FromDiscord<ShalokShalom> In reply to @madprops "https://github.com/karaxnim/karax": Oh, nice↵↵How is it?
16:17:39FromDiscord<ShalokShalom> @ringabout do you think it would fit well in the stdlib?↵↵The shell macro.
16:27:47FromDiscord<treeform> If I make my own OS in Nim what should I call it?
16:33:24FromDiscord<Yepoleb> something royalty inspired because of the logo, crown, king, throne and then slap OS at the end
16:33:42FromDiscord<Yepoleb> (edit) "logo," => "logo -" | "logo -crown, king, throne ... and" added "-"
16:37:25FromDiscord<Phil> In reply to @albassort "<@180601887916163073> since you reminded": Happy to be of service.↵Ideally always use the right data structure for your task since it clues the reader in on what exactly you're trying to go
16:37:31FromDiscord<Phil> (edit) "go" => "do"
16:38:07FromDiscord<wick3dr0se> Isn't the system lib imported with any other lib, like os for example?
16:38:50FromDiscord<federico3> @treeform\: a kernel? A whole OS?
16:39:35FromDiscord<Phil> In reply to @wick3dr0se "Isn't the system lib": System lib is always implicitly imported
16:39:52FromDiscord<Phil> Basically you never need to import it manually
16:39:54FromDiscord<wick3dr0se> In reply to @Isofruit "System lib is always": Then I should be able to read stdin?
16:40:15FromDiscord<wick3dr0se> I cant even echo readLine(stdin)
16:40:33FromDiscord<albassort> Phil check off topic lol
16:40:37FromDiscord<Phil> I mean, I'm on phone, so can't really give a good answer. Is taking readline in system?
16:42:01FromDiscord<Phil> In reply to @albassort "Phil check off topic": Found a part of your code that can not executed when using sets?
16:42:15FromDiscord<wick3dr0se> Says readLine is in system/io
16:42:30FromDiscord<albassort> No
16:43:04FromDiscord<wick3dr0se> Thinking NimScript doesn't handle stdin
16:44:37FromDiscord<Phil> The readline docs I'm seeing are all about file reading
16:54:28FromDiscord<treeform> In reply to @federico3 "<@107140179025735680>\: a kernel? A": I am interested in library operating systems for http servers, where you just "import os" and that produces your a OS image that you can run on bare metal or in cloud provider vm.
16:54:47FromDiscord<treeform> (edit) "your a" => "an"
16:57:37*Phytolizer quit (Quit: Client closed)
16:58:23*Phytolizer joined #nim
17:06:13*Phytolizer quit (Ping timeout: 260 seconds)
17:06:27*PMunch joined #nim
17:07:45FromDiscord<federico3> you mean a unikernel?
17:07:56*Phytolizer joined #nim
17:17:29FromDiscord<wick3dr0se> In reply to @Isofruit "The readline docs I'm": Theres examples I found online using `readLine(stdin)` but I only got `readLineFromStdin()` to work in NimScript. Does the job
17:40:03FromDiscord<A Very Merry Reimu ッ> how do i create "methods" on a object so i can have two functions for two types called `visit` and have no ambiguity between them
17:41:52FromDiscord<planetis> why the quotes you need methods for that, or you don't want to use OOP?
17:45:21FromDiscord<Phil> In reply to @A Very Merry Reimu ッ "how do i create": You're looking for the method keyword
17:45:59FromDiscord<Phil> Just define the method in the same file you define the type so that all methods are very their type is defined and that should be it
17:46:58FromDiscord<demotomohiro> Example code in Nim manual: https://nim-lang.org/docs/manual.html#methods
17:49:19FromDiscord<hotdog> In reply to @ShalokShalom "Oh, nice How": Karax is great once you get used to it. Helps if you have experience with react-like libraries beforehand
17:50:21FromDiscord<hotdog> In reply to @fowl "Can I write a": Karax + a bootstrap style css library is your best option if you don't want to write js/css
17:50:25FromDiscord<ShalokShalom> In reply to @Isofruit "Happy to be of": Could you repeat that wisdom to me as well? 😛
17:50:45FromDiscord<ShalokShalom> I like making things explicit by choosing the right feature. 🙂
17:55:00FromDiscord<Phil> In reply to @ShalokShalom "Could you repeat that": Use sets when you need to answer the question "do I have value X in this group of values already", not Arrays
17:55:16FromDiscord<ShalokShalom> notes
17:55:33FromDiscord<Phil> Sets are generally faster at that as well
17:56:04FromDiscord<ShalokShalom> would you say they are a better default
17:56:08FromDiscord<ShalokShalom> like, when I am unsure
18:07:32FromDiscord<Phil> sent a long message, see http://ix.io/4h7p
18:09:06FromDiscord<Phil> Using a seq has no implicit meaning to me, since it's basically the default
18:10:09FromDiscord<Phil> Deviating from the default has meaning and ideally you want to do that when useful because that gives more information to the reader
18:15:07FromDiscord<ShalokShalom> > The reason I laser focus on using the right tool for the job though is that to me, data structures have meaning that goes along with their intended usecase and how I think about the data in question.↵↵Yeah, this is the aspect I like about const and var and func and proc as well.
18:16:22*deadmarshal quit (Read error: Connection reset by peer)
18:16:54FromDiscord<ShalokShalom> In reply to @Isofruit "Both are functional. And": That is actually a reason for me, to think that using those data structures in an unintended way, could sensibly raise a compiler message.
18:17:12FromDiscord<ShalokShalom> But, if I understood you correctly, is this too subjective, in this case?
18:17:17FromDiscord<ShalokShalom> To measure it objectively.
18:17:26FromDiscord<albassort> sent a code paste, see https://play.nim-lang.org/#ix=4h7r
18:17:36FromDiscord<albassort> forget its name
18:18:48FromDiscord<Phil> In reply to @ShalokShalom "But, if I understood": It is because there are times where you have a seq that generally needs to be a seq for most of its tasks but you just happen to need to check once if a value is already in there
18:19:50FromDiscord<ShalokShalom> But a seq is the only data structure that is difficult in this case?
18:20:05FromDiscord<ShalokShalom> Like, we could differentiate between arrays and sets
18:20:09FromDiscord<Phil> There are valid usecase , it's just that when the main task of the data is to solve "do I contain X", you're losing information that you could give your reader to clue them in that that's what your task is
18:20:11FromDiscord<ShalokShalom> And let the compiler give recommendations?
18:20:26FromDiscord<albassort> In reply to @albassort "we have something that": aaa what are theese called aaaa
18:20:37FromDiscord<Rika> query parameters
18:20:59FromDiscord<Rika> https://nim-lang.org/docs/uri.html
18:21:07FromDiscord<Rika> good night
18:21:10FromDiscord<Rika> it is 3 am
18:21:28FromDiscord<albassort> @Rika wait
18:21:33FromDiscord<Phil> Sleep well!
18:21:35FromDiscord<albassort> this is important
18:21:43FromDiscord<Rika> sure
18:21:44FromDiscord<albassort> goodnight ^-^ <3
18:21:47FromDiscord<Rika> okay
18:24:21FromDiscord<ShalokShalom> good night
18:30:48FromDiscord<treeform> In reply to @federico3 "you mean a unikernel?": yes
18:32:13FromDiscord<treeform> In reply to @albassort "we have something that": I have a library https://github.com/treeform/urlly that I think has better API then stdlib and it works in JS mode as well.
18:33:30FromDiscord<Phil> In reply to @ShalokShalom "But a seq is": Kinda, arrays are very specifically only to use when you know the exact shape of the data at compile-time.↵However, I feel like the point at which a piece of data is better suited to be a set vs. a sequence is somewhat fluent.↵It massively depends on how you think about the data in your head. There are often enough times where I go "Personally I'd solve it like in X, but I can see it being
18:33:40FromDiscord<albassort> In reply to @treeform "I have a library": my love, you have a library for everything
18:34:08FromDiscord<treeform> I very nearly do, if I don't have it guzba does.
18:34:38FromDiscord<Phil> albassort's explicit case was somewhat of a special one because they had a sequence with static values and pretty much all they were doing was checking if the sequence contained some value or not
18:35:08FromDiscord<Phil> So I guess you could make a rule that checks for every sequence if the only function calls performed on it are "contains" or "in" and give warnings to use a Set if that's the case
18:35:17FromDiscord<Phil> But that's pretty much it
18:35:56FromDiscord<albassort> wait im being spoken about
18:36:31FromDiscord<albassort> In reply to @Isofruit "So I guess you": dont think that should be a warning
18:36:47FromDiscord<albassort> if that should be a warning, many more should be added for sets, arrays, and seqs
18:36:48*deadmarshal joined #nim
18:36:51FromDiscord<albassort> and it kinda goes against nim's
18:37:05FromDiscord<albassort> (edit) "and it kinda goes against nim's ... " added ""libertarianism""
18:37:08FromDiscord<albassort> it reminds me of rust
18:37:38FromDiscord<albassort> "this var is a sequence but its content is not mutated in compile time so you should make it an array"
18:37:39FromDiscord<treeform> most micro optimizations don't matter
18:37:46FromDiscord<treeform> always profile ™️
18:38:03FromDiscord<albassort> (edit) "compile" => "runtime"
18:39:30FromDiscord<albassort> so I've seen that nimskull hasn't died yet
18:39:37FromDiscord<albassort> that makes me pretty nervous
18:39:58FromDiscord<albassort> I don't want nim to become a fractured group of languages like perl
18:41:08FromDiscord<Phil> In reply to @treeform "most micro optimizations don't": The irony is I'm not even making these suggestions out of performance concerns, but readability concerns. Generally I agree with you, performance don't matter and are a waste of time
18:41:15FromDiscord<Phil> (edit) "In reply to @treeform "most micro optimizations don't": The irony is I'm not even making these suggestions out of performance concerns, but readability concerns. Generally I agree with you, performance don't matter and ... are" added "such optimizations"
18:41:23FromDiscord<Phil> (edit) "don't" => "doesn't"
18:41:30FromDiscord<Phil> It only matters when it actually matters, not before
18:41:39FromDiscord<haxscramper> what a joyful attitude↵(@albassort)
18:41:41FromDiscord<Phil> (edit) "matters," => "matters (aka when you notice sth being slow),"
18:42:02FromDiscord<albassort> In reply to @haxscramper "what a joyful attitude": i gave my reason
18:42:14FromDiscord<Phil> In reply to @albassort "that makes me pretty": Ehhhh personally there's benefit to it. It'd be worse if nimskull died and the developers left that entirely
18:42:36FromDiscord<haxscramper> well yeah, just kind of weird to read that our project not dying makes peopel nervous
18:43:23FromDiscord<Phil> The massive benefit is that even though nimskull (or rather Cyo IIRC) is very similar to nim, so ideas implemented there can cross pollinate into nim.↵Maybe no longer 1:1 if the codebases are significantly different by now, but personally I see it not as detrimental
18:43:37FromDiscord<albassort> probably start calling it cryo
18:44:15FromDiscord<Phil> At least I've gained somewhat the impression that the relations aren't hostile per se (?)
18:44:23FromDiscord<Phil> Feel free to correct me on that one hax
18:44:26FromDiscord<albassort> see
18:44:30FromDiscord<albassort> its like mommy and daddy fighting
18:44:37FromDiscord<albassort> and then they get the divorce papers
18:44:55*PMunch quit (Quit: leaving)
18:44:58FromDiscord<albassort> and they sit you down and go "Ok, look. I love Daddy, but, we're better off together. You can still see him on the weekends"
18:45:08FromDiscord<albassort> (edit) "and they sit you down and go "Ok, look. I love Daddy, but, we're better off ... together." added "not"
18:46:10FromDiscord<albassort> and then you're like "Ok, Cryo is more progressive but so much code was written for nim and they're very similar languages but you cant run nim macros in cryo so they aren't perfectly compatible unless cryo also runs the nimruntime.... whats the point of this"
18:46:39FromDiscord<haxscramper> just write your code in nim; problem solved
18:46:57FromDiscord<Phil> That just means Cyo is not for you alba
18:47:03FromDiscord<haxscramper> we are not actively forcing anyone nor trying to discredit nim
18:47:41FromDiscord<haxscramper> if you feel like current ecosystem and implementation are up to spec then you are free to use whatever language you want, period, it is a free choice
18:48:59FromDiscord<albassort> Ok, thats fair
18:48:59FromDiscord<haxscramper> underlying disagreements lie mostly in the technical dimensoins
18:49:17FromDiscord<haxscramper> and pretty deep at that -- arcane stuff from sem and so on
18:49:31FromDiscord<haxscramper> so we basically don't have a strong PR case anyway
18:49:37FromDiscord<albassort> but you get this intrinsic problem of a small community↵You're taking an already small community with ecosystem problems and then going "Yea, lets split that in half"
18:50:02FromDiscord<haxscramper> no, I'm not talking about splitting it in half
18:50:03FromDiscord<Phil> In reply to @albassort "but you get this": Yeah but the alternative would be to either leave entirely or slog through a codebase that is literally painful to work with
18:50:18FromDiscord<haxscramper> I'm talking about taking a very specific codebase and running a pretty specific set of refactorings on it
18:50:19FromDiscord<Phil> And it's not about splitting, it's about how you want to invest your time on a personal level
18:50:25FromDiscord<haxscramper> in the hope of getting a better implementation
18:50:27FromDiscord<albassort> In reply to @Isofruit "Yeah but the alternative": but then nobody is happy
18:50:48FromDiscord<haxscramper> the fact people tend to treat forking like a crime is a veird thing
18:51:45FromDiscord<haxscramper> especially considering that people like saem could've just left entirely
18:52:03FromDiscord<haxscramper> not like community needs a maintainer for vscode extension, right
18:52:06FromDiscord<haxscramper> or vim extension
18:52:09FromDiscord<haxscramper> oh I guess he also left
18:52:25FromDiscord<haxscramper> package manager? see the thread on twitter. alternative solution implementor also left
18:52:37FromDiscord<haxscramper> async implementatoin? oh, see the same thread, alternative implementors also left
18:52:52FromDiscord<haxscramper> damn, maybe the community is just fucking falling apart at it seams even without our interwention
18:53:35FromDiscord<haxscramper> IC & co run into technical difficulties wall, so that's what we are trying to fix
18:53:48FromDiscord<haxscramper> (edit) "IC & co run into technical difficulties wall, so that's what we are trying to fix ... " added "but not like it is important anyway"
18:53:59FromDiscord<haxscramper> better shove more features in 2.0
18:55:13FromDiscord<haxscramper> In reply to @haxscramper "package manager? see the": https://old.reddit.com/r/nim/comments/ywxsbz/this_is_disappointing_to_read_coming_from_the_nim/ https://nitter.snopyta.org/d0m96/status/1592827547582332929
18:55:22FromDiscord<haxscramper> longest thread on nim reddit btw
18:56:04FromDiscord<haxscramper> In reply to @haxscramper "especially considering that people": the reasoning is actually pretty close; BDFL just banned cabbose over "keeping the fires burning"
18:56:36FromDiscord<albassort> ok but look what happened to Perl and Raku
18:56:53FromDiscord<haxscramper> In reply to @haxscramper "> > dom96": this
18:57:32FromDiscord<haxscramper> In reply to @albassort "ok but look what": nobody uses raku because there is so much code in perl
18:57:38FromDiscord<albassort> yes
18:57:44FromDiscord<haxscramper> the langs are almost incompatible from what I can see
18:57:53FromDiscord<haxscramper> there was not community split
18:57:59FromDiscord<haxscramper> it's just two different languages
18:58:15FromDiscord<haxscramper> and Raku sucks just as much as perl so nobody starts anything in it
18:58:41FromDiscord<haxscramper> Perl 5 just has so much legacy/inertia that people anyway
18:59:26FromDiscord<albassort> I also thing the they/them thing is generational
18:59:41FromDiscord<albassort> I've never heard anything wrong with they / them, when they're used in grammar it sounds fine
18:59:45FromDiscord<haxscramper> it is about intentions
18:59:55FromDiscord<albassort> when it comes to intentions
19:00:09FromDiscord<albassort> you should use they/them as it is a gender neutral form and language is what people make it
19:00:19FromDiscord<albassort> there is no reason not to use it and make "he" as gender neutral arcane
19:00:22FromDiscord<Phil> It's about whether you want to acknowledge and respect the other person enough to give them that or whether your ill conceived notions of what "correct" english is trump that.
19:00:45FromDiscord<albassort> He i gender neutral, but it shouldn't be used in serious modern texts imho
19:01:05FromDiscord<albassort> (this is a complex topic in linguistics)
19:01:33FromDiscord<albassort> In reply to @Isofruit "It's about whether you": what is correct in english is what you make it as, language has no governing body
19:01:40FromDiscord<haxscramper> first time I saw this, but regardless; the main question is the intention behind hijacking random threads on the sensitive topics with opinion that is effectively "ok, cool, nobody cares"
19:01:54FromDiscord<haxscramper> "I can read textbooks"
19:01:56FromDiscord<Phil> In reply to @albassort "what is correct in": Funnily enough, often enough it does
19:02:04FromDiscord<albassort> ok technically
19:02:07FromDiscord<albassort> :spray:
19:02:12FromDiscord<haxscramper> "sure dude, we all can, but what are you implying"
19:02:24FromDiscord<haxscramper> that we all disregard people's requests?
19:02:55FromDiscord<haxscramper> because "ok technically" German kids are taught English one way or another
19:03:24FromDiscord<haxscramper> it is either pointless "ok technically" or implication that something must be changed
19:03:47FromDiscord<haxscramper> with a decently clear definition of how author sees the "correct" way
19:04:32FromDiscord<haxscramper> irrespective the fact it brushes off what other people might have wrt. to preferences
19:04:45FromDiscord<Phil> As a sidenote, german kids when exposed to ye olde english should encounter "they/them" for singular.
19:05:05FromDiscord<Phil> Actually I'm pretty sure there are normal english sentences that contain they/them singular
19:05:30FromDiscord<Phil> I can't think of them atm, I'm semi-braindead post work, but it never particularly felt out of touch to me
19:05:36FromDiscord<Phil> (am german for reference)
19:05:45FromDiscord<haxscramper> also IIRC german has genders in the words, like dog is "he" or smth
19:05:50FromDiscord<haxscramper> english doesn't
19:05:59FromDiscord<haxscramper> or french
19:06:08FromDiscord<haxscramper> russian/ukrainian certainly has this
19:06:46FromDiscord<Phil> Kinda sorta, french and german both have "feminine", "masculine" and "neutral" articles
19:06:57FromDiscord<Phil> der/die/das vs. "the"
19:07:33*Phytolizer quit (Ping timeout: 260 seconds)
19:09:00FromDiscord<Generic> well for German you need to distinguish between genus and sexus
19:09:07FromDiscord<planetis> can you explai to me why the laptop is der, I lost points in my exam from this
19:10:10FromDiscord<planetis> a1 level so i dont really care, but still
19:10:33FromDiscord<Generic> grammatical gender of foreign words is weird
19:10:44FromDiscord<Generic> did you say das Laptop?
19:11:10FromDiscord<Generic> because some people in Germany say that as well and it's even listed in the Duden as an alternative
19:11:22FromDiscord<planetis> yes, true though greek are no different
19:11:23FromDiscord<albassort> In reply to @haxscramper "also IIRC german has": English is one of like 2 indo-european languages to not have grammatical gender
19:12:06FromDiscord<Generic> also fun is Nutella
19:12:07*pro joined #nim
19:12:07FromDiscord<albassort> https://media.discordapp.net/attachments/371759389889003532/1046866096046743602/image.png
19:12:13FromDiscord<Generic> is it der, die oder das?
19:12:23FromDiscord<ali> Just got to suck it up and separate art from artist I say.
19:12:24FromDiscord<albassort> if you don't speak these guys, and are in Europe, everything is gendered
19:12:55FromDiscord<albassort> If linus was a nazi would you still use linux
19:13:01FromDiscord<albassort> genuine question
19:13:04FromDiscord<ali> Some languages get on fine without gendered pronouns at all.
19:13:20FromDiscord<planetis> well how about reiserFS?
19:13:28FromDiscord<Generic> it's das
19:13:29FromDiscord<planetis> In reply to @Generic "is it der, die": die?
19:13:36FromDiscord<planetis> damn
19:13:45FromDiscord<Generic> for Nutella?
19:13:59FromDiscord<Generic> for Nutella the answer is pretty much all of the above
19:14:26FromDiscord<Generic> for reiserFS the answer is die, because it's a compound word so the last word in the compound dictates the gender
19:14:40FromDiscord<Generic> (edit) "die," => "das,"
19:14:55FromDiscord<Generic> and FS is filesystem so dateisystem and system is neutral
19:14:57FromDiscord<albassort> If Cryo offers are better ecosystem, I'll look into it. I'm sure someone like treeform will get nim-interop working
19:15:19FromDiscord<ali> Maybe the solution is a email/browser plugin that replaces all pronouns with they/them
19:15:48FromDiscord<albassort> In reply to @ali "Maybe the solution is": I'm thinking about replacing all my pronouns with the word "Comrade"
19:15:48FromDiscord<planetis> no that's what I meant lol, it's creator is in jail for murdering his wife or something. The remark was did that stopped adoption of the filesystem.
19:15:59FromDiscord<Generic> haha
19:16:05FromDiscord<Generic> or it's not really funny
19:16:06FromDiscord<albassort> :Com:
19:16:08FromDiscord<ali> I definitely used it
19:16:16FromDiscord<ali> But I think it also was out compete
19:16:49FromDiscord<albassort> In reply to @planetis "no that's what I": I still listen to the beatles and John Lennon nearly beat a man to death for asking if he was into men
19:16:59FromDiscord<planetis> lol
19:17:01*FromDiscord quit (Remote host closed the connection)
19:17:14*FromDiscord joined #nim
19:17:50FromDiscord<Generic> well for me a big question with things like this is whether the person who did something problematic profits from me engaging (so most of the time buying their stuff) with their work
19:18:40*pro left #nim (#nim)
19:20:05FromDiscord<albassort> time to use nimpy again
19:20:25FromDiscord<albassort> every time i use nimpy i have to remember how to make local python files work
19:20:26FromDiscord<ShalokShalom> In reply to @treeform "I have a library": did you apply to put this into the stdlib instead?
19:20:34FromDiscord<ShalokShalom> or, additionally to not break anything
19:22:50FromDiscord<ShalokShalom> In reply to @Isofruit "Kinda, arrays are very": > Kinda, arrays are very specifically only to use when you know the exact shape of the data at compile-time.↵I wish that sentence would be in the docs, very approachable. 🙂
19:23:26FromDiscord<albassort> sent a code paste, see https://play.nim-lang.org/#ix=4h7B
19:23:30FromDiscord<albassort> i need to pr this into the docs for nimpy lol
19:23:31FromDiscord<ShalokShalom> In reply to @Isofruit "So I guess you": would that be a benefit in your sense?
19:23:40FromDiscord<ShalokShalom> like, if the compiler does so
19:23:58FromDiscord<Phil> In reply to @ShalokShalom "> Kinda, arrays are": I think this is one of those implicit truths that work across programming languages.↵Use compile time stuff when possible.↵Use fixed size stuff when possible.
19:24:26FromDiscord<ShalokShalom> In reply to @albassort "I don't want nim": Perl 5 merged A LOT of the things of Perl 6 alias Raku
19:24:33FromDiscord<ShalokShalom> So dont worry
19:24:42FromDiscord<albassort> that is my main hope
19:24:43FromDiscord<Phil> In reply to @ShalokShalom "would that be a": Big fat maybe. The mean reason I wouldn't actively propagate for it is because the compiler is already complicated enough as it is
19:24:52FromDiscord<Phil> This kind of thing is what you'd want in a separate tool
19:25:00FromDiscord<albassort> my ideal scenario is cryo is big game successful (for our community standards)
19:25:01FromDiscord<Phil> A linter basically
19:25:07FromDiscord<albassort> and then everything gets merged upstream
19:25:14FromDiscord<albassort> or something
19:26:22FromDiscord<ShalokShalom> In reply to @albassort "and then you're like": Yeah, their stance of breaking compatibility certainly makes the project less interesting by a mile
19:28:28FromDiscord<ShalokShalom> In reply to @Isofruit "I think this is": Sure. Doesnt change that it is helpful to have it explicit 🙂
19:43:45FromDiscord<emanresu3> Hi, I just made a pipe operator for Nim here https://codeberg.org/emanresu3/nim-pipexp, I was wondering if anyone would like to `nimble publish` it
19:50:52FromDiscord<ShalokShalom> In reply to @emanresu3 "Hi, I just made": Thanks a lot. What is different to the existing one?
19:51:14FromDiscord<ShalokShalom> I was hoping, somebody does a composition operator instead 😅
19:52:19FromDiscord<emanresu3> which existing one? the ones packaged in nimble already?↵(@ShalokShalom)
19:52:36FromDiscord<ShalokShalom> https://github.com/CosmicToast/pipe
19:52:43FromDiscord<emanresu3> That sounds interesting as well, maybe I'll look into it if I don't find any existing one↵(@ShalokShalom)
19:53:01FromDiscord<ShalokShalom> Would make me super happy
19:53:13FromDiscord<ShalokShalom> Just to clarify: I mean >> in F#
19:53:56FromDiscord<emanresu3> For what I saw, that operator just functions for piping the result into the first argument of the next pipe↵(@ShalokShalom)
19:54:30FromDiscord<emanresu3> So there's no difference to the builtin UCS syntax of Nim
19:54:53FromDiscord<ShalokShalom> Isnt that piping?
19:54:57FromDiscord<ali> Clojure thread macros ♥️ but pipe excellent too
19:55:03FromDiscord<ShalokShalom> What does yours differently?
19:55:40FromDiscord<emanresu3> The operator I made works for putting the argument in any position with "`_`", and there is a `pipe` macro that allows you to put procs in different lines
19:55:59FromDiscord<emanresu3> Similar to the `dup` macro in nim
19:56:05FromDiscord<ShalokShalom> thats neat
19:56:20FromDiscord<ShalokShalom> You dont wanna publish it yourself?
19:56:57FromDiscord<emanresu3> sent a code paste, see https://play.nim-lang.org/#ix=4h7G
19:57:22FromDiscord<emanresu3> I would, but I don't have nor want to create a github account↵(@ShalokShalom)
19:57:51FromDiscord<emanresu3> So I was wondering if anyone here with github account would like to clone and publish it
19:58:04FromDiscord<ShalokShalom> I never did this, and I can try
19:58:18FromDiscord<ShalokShalom> Does Nimble require you to have a Github account?
19:59:26FromDiscord<emanresu3> For publishing, `nimble publish` asks you for a Github access token, because it wants to clone https://github.com/nim-lang/packages/ and edit its `packages.json`↵(@ShalokShalom)
20:01:29FromDiscord<emanresu3> That would be awesome, so I think it would be a `git clone` on my repo, then `cd` into it, `nimble publish`. The packaging info its on my repo's `packages.json`. And I think it would create a github pull request on https://github.com/nim-lang/packages/, and someone would accept it↵(@ShalokShalom)
20:02:02FromDiscord<hmmm> hmmm wot
20:02:09FromDiscord<ShalokShalom> I am going to do that
20:02:16FromDiscord<ShalokShalom> Can it wait till tomorrow?
20:02:32FromDiscord<ShalokShalom> My wife just asks for attention 🙂
20:02:34FromDiscord<emanresu3> Sure no problem↵(@ShalokShalom)
20:02:49FromDiscord<ShalokShalom> Where is the repo?
20:02:56FromDiscord<hmmm> broskis I took the strscans example from manual, substituted the last int with a string and doesnt work, what I'm getting wrong https://play.nim-lang.org/#ix=4h7J
20:03:08FromDiscord<ShalokShalom> You can prepare the README for it
20:03:16FromDiscord<ShalokShalom> And also mention yourself, please 🙂
20:03:19FromDiscord<emanresu3> Here https://codeberg.org/emanresu3/nim-pipexp↵(@ShalokShalom)
20:03:30FromDiscord<ShalokShalom> wonderful, till tomorrow
20:03:38FromDiscord<emanresu3> It has a readme, do you mean a readme for publishing or something?
20:04:03FromDiscord<emanresu3> It is on the license \:)↵(@ShalokShalom)
20:13:39*dtomato4 quit (Quit: The Lounge - https://thelounge.chat)
20:15:36FromDiscord<ShalokShalom> @emanresu3#0000 thats a real nice readme
20:16:29FromDiscord<ShalokShalom> And no, I just wanted you to mention yourself somewhere↵↵If you are fine with that means in the license, I am fine as well.
20:17:50*dtomato4 joined #nim
20:19:31FromDiscord<emanresu3> Yeah I'm fine just being in there↵(@ShalokShalom)
20:21:02FromDiscord<albassort> I've heard someone say "there should be a language neutral api"
20:21:04FromDiscord<albassort> wtf is that
20:21:06FromDiscord<albassort> how do you do that
20:21:11FromDiscord<albassort> bash?
20:21:33FromDiscord<albassort> Language Neutral == C, but he said "not like you gotta use c or something"
20:22:24FromDiscord<treeform> In reply to @ShalokShalom "did you apply to": No I did not. It's very hard to change things in stdlib because of backward compatibility. And there is no point having two of some thing.
20:22:56FromDiscord<jmgomez> sent a code paste, see https://play.nim-lang.org/#ix=4h7S
20:23:12FromDiscord<albassort> wait what
20:23:20FromDiscord<albassort> interesting
20:24:58FromDiscord<ali> Probably consider JSON over rest "neutral"↵(@albassort)
20:25:09FromDiscord<albassort> thats not neutral at all, thats just slow
20:25:38FromDiscord<albassort> (he was talking about a filesystem)
20:28:22*dtomato4 quit (Quit: The Lounge - https://thelounge.chat)
20:28:23FromDiscord<ali> I'd use that, I'm tired of everything being a file.
20:29:04*dtomato4 joined #nim
20:29:43FromDiscord<albassort> but everything being a file is really neat and cool
20:29:57FromDiscord<Phil> It is the linux way
20:30:12FromDiscord<ali> Well it'll all be JSON files, just be thankful it's not XML
20:31:30FromDiscord<albassort> json is cool until you need to do anything with it
20:33:43FromDiscord<huantian> well when you need to do something with it you make it not json
20:34:48FromDiscord<ali> It's a the worst serialisation format, except for all the rest
20:35:07FromDiscord<ali> Pickle potentially leading to arbitrary code execution 🤢
20:41:07FromDiscord<albassort> is there any particular reason why i cant send procs to threads?
20:41:21*sagax joined #nim
20:41:31FromDiscord<albassort> violates gc saftey
20:41:34FromDiscord<albassort> :smug:
20:42:05FromDiscord<Phil> Does the proc access global state?
20:42:20FromDiscord<Phil> Or call a proc that does something non-local?
20:42:30FromDiscord<albassort> everything local
20:42:37FromDiscord<albassort> the proc is gcsafe
20:42:42FromDiscord<Phil> So you could just as well use "func" instead of proc?
20:46:12FromDiscord<albassort> you cant send funcs
20:46:15FromDiscord<albassort> as paramaters
20:46:21FromDiscord<albassort> (edit) "paramaters" => "parameters"
20:55:44FromDiscord<albassort> oh you nc
20:55:48FromDiscord<albassort> (edit) "nc" => "can"
20:58:16*derpydoo quit (Ping timeout: 265 seconds)
20:59:34*derpydoo joined #nim
21:00:34FromDiscord<wick3dr0se> How can you silence input? Like from readLine so it doesn't echo a response back to the terminal
21:09:35*dnh joined #nim
21:09:40NimEventerNew thread by japplegame: ARC and {.requiresInit.} issue, see https://forum.nim-lang.org/t/9672
21:32:02*neceve quit (Quit: ZNC - https://znc.in)
21:33:47*neceve joined #nim
21:38:07FromDiscord<Yepoleb> In reply to @haxscramper "this": i kept reading after the drama and it was pretty interesting
21:39:31FromDiscord<Yepoleb> > <insert default rant about nobody knowing hwere nim is aiming>↵that's something i just recently discovered myself
21:39:47*Phytolizer joined #nim
21:39:52*neceve quit (Quit: ZNC - https://znc.in)
21:41:07*neceve joined #nim
21:50:30*neceve quit (Quit: ZNC - https://znc.in)
21:53:24FromDiscord<hmmm> ahh finally I'm grokking scanf boiz thanks to a nice blog of mirian 🥳 , now that I know the basic stuffs is there a way to loop it and deposit the matches in a seq 🧐
21:55:28*neceve joined #nim
22:12:26FromDiscord<guttural666> does std/times getCpu() even work on Linux? it says it should give me seconds in the manual but I'm having a bit of a descrepancy here 13 actual seconds vs 0.083291? just subtracted time1 from 2
22:14:03FromDiscord<Yepoleb> i'm assuming you mean cpuTime, for what purpose are you using it?
22:14:24FromDiscord<Yepoleb> i could not find a procedure getCpu
22:14:50FromDiscord<guttural666> sorry, yes
22:14:57FromDiscord<guttural666> https://nim-lang.org/docs/times.html#cpuTime
22:17:32FromDiscord<Yepoleb> cpuTime measures how much time the cpu spent on your program, this is almost always less than the actual runtime for simple programs
22:17:55FromDiscord<guttural666> ahhhh
22:18:00FromDiscord<guttural666> need wall time or what is the term
22:18:03FromDiscord<Yepoleb> for example if you just sleep for 10 seconds the runtime of the program is 10 seconds, but the cpu time is close to zero
22:18:58FromDiscord<guttural666> okay, things make sense now, I'm fetching jsons from a web resource
22:20:39FromDiscord<guttural666> I'm guessing get time would be the appropreate alternative then
22:23:05FromDiscord<Yepoleb> yes, that or getMonoTime
22:23:51FromDiscord<Yepoleb> are you trying to just print something along "This program took 10 seconds"?
22:24:31FromDiscord<guttural666> yeah okay monotimes is what I need then
22:24:48FromDiscord<ali> And the command line tool \`time\` isn't useful for this?
22:25:33FromDiscord<guttural666> yeah basically doing stuff like this rn https://media.discordapp.net/attachments/371759389889003532/1046914771099844799/image.png
22:26:02FromDiscord<Yepoleb> yes, use monotonic time for that
22:30:12FromDiscord<Yepoleb> but the difference is only really relevant when your application would crash if time suddenly moved backwards
22:31:57*neceve quit (Quit: ZNC - https://znc.in)
22:35:47*neceve joined #nim
22:55:35*neceve quit (Quit: ZNC - https://znc.in)
22:55:55FromDiscord<hmmm> ya it was eazy 🥳 used a mix of split and scanf to do eet, gj @narimiran for this https://narimiran.github.io/2021/01/11/nim-parsing.html
22:56:57*neceve joined #nim
23:02:51*Phytolizer quit (Remote host closed the connection)
23:08:14*vicecea quit (Remote host closed the connection)
23:35:16*dnh quit (Quit: My MacBook has gone to sleep. ZZZzzz…)
23:42:42FromDiscord<treeform> In reply to @ali "Some languages get on": Georgian is a great example, it just has one pronoun "is" - ის
23:57:11*LuxuryMode quit (Quit: Connection closed for inactivity)
23:58:26FromDiscord<dani> Hi. I'm new to this language. How could I get a collection of strings from different types at compile time? (https://play.nim-lang.org/#ix=4h8L) This doesn't work so far. Any help is appreciated!
23:59:38FromDiscord<Corazone> In reply to @hotdog "To explain the other": Thank you so much, I will check the book for sure. I decided to use the header style, it fits nicer in my project. Also really nice community, very helpful and I must say Nim is so wonderful.↵Thank you again