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:12 | FromDiscord | <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:13 | FromDiscord | <wick3dr0se> sent a code paste, see https://play.nim-lang.org/#ix=4h3B |
00:24:39 | FromDiscord | <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:55 | FromDiscord | <Elegantbeef> Or just use a procedure |
00:36:00 | FromDiscord | <Elegantbeef> sent a code paste, see https://paste.rs/pwS |
00:37:40 | FromDiscord | <wick3dr0se> Thanks a lot. I like the statement for now. I still have a ton to learn |
00:38:52 | FromDiscord | <Rika> In reply to @yrashk "_is thinking of doing": Sounds interesting, not sure what a live coding session exactly is |
00:39:36 | FromDiscord | <Rika> sent a code paste, see https://play.nim-lang.org/#ix=4h3H |
00:44:23 | FromDiscord | <Elegantbeef> just use a block expression 😛 |
00:44:49 | FromDiscord | <wick3dr0se> sent a code paste, see https://play.nim-lang.org/#ix=4h3J |
00:45:33 | FromDiscord | <Elegantbeef> sent a code paste, see https://play.nim-lang.org/#ix=4h3K |
00:46:03 | FromDiscord | <wick3dr0se> Ima need a minute to process this |
00:46:23 | FromDiscord | <Elegantbeef> You dont have a `else` branch |
00:46:32 | FromDiscord | <wick3dr0se> Well I tried else discard |
00:46:38 | FromDiscord | <Elegantbeef> Expressions need to be exhaustive |
00:46:44 | FromDiscord | <Elegantbeef> So you need to either raise an exception or have a else branch |
00:46:52 | FromDiscord | <Elegantbeef> Well using discard is literally the opposite of what you want |
00:47:17 | FromDiscord | <Elegantbeef> You want the value to go up not do dissipate |
00:47:41 | FromDiscord | <wick3dr0se> True, I mean I can else set it to windows program files lmao |
00:50:05 | FromDiscord | <wick3dr0se> Ah, nice it works setting winBin. I'm way too used to BASH and using elifs with no else |
00:56:07 | FromDiscord | <huantian> You can use elifs with no else if it’s not an if expression |
00:56:10 | FromDiscord | <huantian> But rather a statement |
00:56:32 | FromDiscord | <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:51 | FromDiscord | <wick3dr0se> In reply to @huantian "You can use elifs": Ok thanks, all you guys learnt me something |
01:05:42 | FromDiscord | <wick3dr0se> sent a code paste, see https://play.nim-lang.org/#ix=4h3L |
01:06:29 | FromDiscord | <wick3dr0se> (edit) "https://play.nim-lang.org/#ix=4h3L" => "https://play.nim-lang.org/#ix=4h3M" |
01:09:19 | FromDiscord | <wick3dr0se> Even adding a break doesnt work but echoing d after the if expression works |
01:25:39 | FromDiscord | <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:53 | FromDiscord | <amadan> sent a code paste, see https://play.nim-lang.org/#ix=4h3N |
01:28:32 | * | ltriant joined #nim |
01:33:05 | FromDiscord | <yrashk> Is it impossible to do with named parameters (like in template pragmas), like `{.ec(name="hello",...).}`? |
01:40:47 | FromDiscord | <yrashk> sent a code paste, see https://play.nim-lang.org/#ix=4h3R |
01:55:21 | FromDiscord | <Elegantbeef> Cause it removes static typing |
01:55:30 | FromDiscord | <Elegantbeef> Atleast visible static typing |
01:55:51 | FromDiscord | <Elegantbeef> It's better to just have a `?` converter imo |
01:56:00 | FromDiscord | <Elegantbeef> Also you can just do `none(string)` you dont need that inane cast |
02:04:30 | FromDiscord | <albassort> in httpclient |
02:04:36 | FromDiscord | <albassort> can i get just the html data |
02:05:03 | FromDiscord | <albassort> sure i can split on <script> |
02:05:10 | FromDiscord | <albassort> but thats kinda lame |
02:05:14 | FromDiscord | <albassort> actually im gonna try that |
02:05:58 | FromDiscord | <albassort> https://media.discordapp.net/attachments/371759389889003532/1046607852980150376/image.png |
02:08:47 | FromDiscord | <Elegantbeef> Just parse the xml tree and navigate it |
02:09:23 | FromDiscord | <albassort> nah im registering it in a database |
02:09:30 | FromDiscord | <albassort> which requires valid xml |
02:09:39 | FromDiscord | <Elegantbeef> What |
02:09:44 | FromDiscord | <albassort> what do you mean what |
02:10:01 | FromDiscord | <albassort> postgres db has an XML type |
02:10:02 | FromDiscord | <albassort> and i wanna use it |
02:10:24 | FromDiscord | <Elegantbeef> Navigate the tree get the xml you want then convert it back to text |
02:10:40 | FromDiscord | <albassort> i want the full thing |
02:11:11 | FromDiscord | <albassort> eh I'll probably be parsing it back in nim anyway so make it a string |
02:31:36 | FromDiscord | <albassort> hmm |
02:31:42 | FromDiscord | <Girvo> In reply to @Elegantbeef "Also you can just": But inane casts give me life 😢 |
02:31:52 | FromDiscord | <albassort> it doesn't look like async is working how i think it would |
02:32:13 | FromDiscord | <albassort> sent a code paste, see https://play.nim-lang.org/#ix=4h47 |
02:32:58 | FromDiscord | <Girvo> Somewhat orthogonal to your actual question, but why `ptr Channel`? |
02:33:00 | FromDiscord | <albassort> doCrawlFunction is waiting |
02:33:12 | FromDiscord | <albassort> redundancy, |
02:33:14 | FromDiscord | <Girvo> Using `ptr` in high-level code is typically a bit of a code-smell |
02:33:24 | FromDiscord | <albassort> (edit) "redundancy," => "redundancy" |
02:33:30 | FromDiscord | <albassort> sometimes stuffs don't work |
02:33:40 | FromDiscord | <albassort> don't worry about it |
02:33:52 | FromDiscord | <ChocolettePalette> How would you share a channel between threads? \:/↵(@Girvo) |
02:33:52 | FromDiscord | <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:19 | FromDiscord | <albassort> In reply to @ChocolettePalette "How would you share": you usually use ptrs on the shared heap |
02:34:27 | FromDiscord | <albassort> thats what i d |
02:34:28 | FromDiscord | <albassort> (edit) "d" => "do" |
02:34:32 | FromDiscord | <ChocolettePalette> Indeed |
02:34:34 | FromDiscord | <albassort> because sometimes they get weird |
02:34:35 | FromDiscord | <albassort> anyway |
02:34:42 | FromDiscord | <Girvo> shrugs you do you |
02:35:14 | FromDiscord | <albassort> whats up with doCrawlFunction |
02:35:27 | FromDiscord | <Girvo> You don't have an await anywhere |
02:35:33 | FromDiscord | <albassort> i want it to just... run it, then continue the iteration |
02:36:46 | FromDiscord | <Girvo> You want it to just be blocking? |
02:37:01 | FromDiscord | <albassort> no blocking |
02:37:02 | FromDiscord | <albassort> none |
02:37:20 | FromDiscord | <Girvo> I'm confused by what you're asking then I'm afraid |
02:37:21 | * | arkurious quit (Quit: Leaving) |
02:37:39 | FromDiscord | <albassort> i just want the functions to execute, then, just continue, no blocking |
02:37:42 | FromDiscord | <Girvo> You want to fire it off and not care about what it returns, etc.? |
02:37:49 | FromDiscord | <albassort> currently it seems to be doing it in series |
02:37:55 | FromDiscord | <albassort> In reply to @Girvo "You want to fire": yes |
02:41:02 | FromDiscord | <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:21 | FromDiscord | <Girvo> Dumb question: you've got a runForever to start the dispatcher in there? |
02:41:31 | FromDiscord | <albassort> nope |
02:42:25 | FromDiscord | <Girvo> async/asyncdispatch is basically a Future interface around event loops, but unlike some other languages you need to run the dispatcher |
02:43:01 | FromDiscord | <albassort> hmmmmm |
02:43:03 | FromDiscord | <Girvo> Either by calling `poll` yourself, or using `waitFor` or `runForever` |
02:44:45 | FromDiscord | <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:01 | FromDiscord | <albassort> hmmm |
02:46:39 | FromDiscord | <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:51 | FromDiscord | <Girvo> At least in my experience |
02:47:17 | FromDiscord | <albassort> yea....... not at all what is happening here |
02:47:56 | FromDiscord | <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:10 | FromDiscord | <Girvo> If you're getting data out of an async proc, that's the point of `Future[T]` and await... |
02:48:59 | FromDiscord | <albassort> No... everything here is setup in the structure which is optimal and least likely to break |
02:49:08 | FromDiscord | <Girvo> lol |
02:49:10 | FromDiscord | <Girvo> You do you mate |
02:49:16 | FromDiscord | <Girvo> I'm going back to work |
02:57:23 | FromDiscord | <albassort> sent a code paste, see https://play.nim-lang.org/#ix=4h49 |
02:57:28 | FromDiscord | <albassort> am i misunderstanding this? hmm |
02:57:32 | FromDiscord | <albassort> @Rika wakeup |
02:59:05 | FromDiscord | <Rika> Sleep is not async |
02:59:14 | FromDiscord | <Rika> Use the async version |
02:59:32 | FromDiscord | <Rika> There is no other fix |
03:00:07 | FromDiscord | <albassort> sent a code paste, see https://play.nim-lang.org/#ix=4h4c |
03:01:49 | FromDiscord | <Rika> I have no idea what you are doing |
03:03:52 | FromDiscord | <albassort> my ideal situation is doCrawl just executes and without blocking, goes onto the next iteration |
03:06:09 | FromDiscord | <albassort> who would have thought, rika was right |
03:06:26 | FromDiscord | <albassort> they didn't know they were but they were |
03:11:48 | FromDiscord | <Rika> sent a code paste, see https://play.nim-lang.org/#ix=4h4f |
03:12:00 | FromDiscord | <Rika> (edit) "https://play.nim-lang.org/#ix=4h4f" => "https://play.nim-lang.org/#ix=4h4g" |
03:13:36 | NimEventer | New 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:08 | FromDiscord | <Rika> sent a code paste, see https://play.nim-lang.org/#ix=4h4i |
03:14:38 | FromDiscord | <Rika> there is no semblance of async here |
03:14:40 | FromDiscord | <Rika> this is all threads |
03:14:47 | FromDiscord | <Girvo> nods |
03:14:49 | FromDiscord | <Elegantbeef> `while not endy[]` even |
03:15:03 | FromDiscord | <albassort> IM TRYING TO MIX THEM |
03:15:07 | FromDiscord | <Elegantbeef> sorry couldnt help myself |
03:15:23 | FromDiscord | <albassort> In reply to @Elegantbeef "`while not endy[]` even": this was written in like a fit of rage |
03:15:23 | FromDiscord | <Girvo> Beef throwing popcorn from the cheap seats lol |
03:15:49 | FromDiscord | <albassort> i refuse to accept this valid criticism because i didn't write that part, me from 2 weeks ago did |
03:15:52 | FromDiscord | <albassort> blame her |
03:16:26 | FromDiscord | <Elegantbeef> That's the only reason i'm here, I do nothing but stand↵(@Girvo) |
03:16:47 | FromDiscord | <Rika> In reply to @albassort "IM TRYING TO MIX": and you failed |
03:17:06 | FromDiscord | <Rika> there is literally no async code here other than the async pragma |
03:17:08 | FromDiscord | <albassort> so it turns out the asynchttpclient cannot handle like 12000 requests at the same time |
03:17:21 | FromDiscord | <albassort> In reply to @Rika "there is literally no": i was thinking of it like a coroutine |
03:17:30 | FromDiscord | <albassort> (that module should be functioning) |
03:17:44 | FromDiscord | <Rika> what?' |
03:17:51 | FromDiscord | <albassort> hm |
03:20:20 | FromDiscord | <wiga> is it possible to type an enum? |
03:20:45 | FromDiscord | <albassort> what |
03:20:56 | FromDiscord | <albassort> like assign values |
03:21:07 | FromDiscord | <albassort> enums are just named numbers |
03:21:11 | FromDiscord | <albassort> you cant type them beyond that |
03:21:13 | FromDiscord | <wiga> no like this ugly thing https://media.discordapp.net/attachments/371759389889003532/1046626790862499930/image.png |
03:21:26 | FromDiscord | <wiga> idk what i can use instead :/ |
03:21:39 | FromDiscord | <sOkam!> In reply to @wiga "is it possible to": std/tables |
03:21:54 | FromDiscord | <wiga> i'll take a look, ty |
03:21:56 | FromDiscord | <albassort> YEA |
03:22:21 | FromDiscord | <albassort> keeps the enum, keep all of the types |
03:22:30 | FromDiscord | <albassort> then just put them in a table |
03:22:46 | FromDiscord | <sOkam!> technically, that type of use of an enum is actually a dictionary. in nim, those are tables instead |
03:22:48 | FromDiscord | <wick3dr0se> sent a code paste, see https://play.nim-lang.org/#ix=4h4j |
03:23:08 | FromDiscord | <albassort> In reply to @wick3dr0se "Is there a way": tables |
03:23:25 | FromDiscord | <wick3dr0se> Tables getting some love today then |
03:23:55 | FromDiscord | <albassort> sent a code paste, see https://play.nim-lang.org/#ix=4h4k |
03:24:05 | FromDiscord | <albassort> (edit) "https://play.nim-lang.org/#ix=4h4k" => "https://paste.rs/Umr" |
03:24:22 | FromDiscord | <albassort> (edit) "https://play.nim-lang.org/#ix=4h4m" => "https://play.nim-lang.org/#ix=4h4l" |
03:24:26 | FromDiscord | <wick3dr0se> f yea, thanks! |
03:25:18 | FromDiscord | <Rika> sent a code paste, see https://play.nim-lang.org/#ix=4h4n |
03:31:05 | NimEventer | New Nimble package! nimcolor - Color printing interface for nim, see https://github.com/JessaTehCrow/NimColor |
03:34:51 | FromDiscord | <wick3dr0se> sent a code paste, see https://play.nim-lang.org/#ix=4h4o |
03:35:28 | FromDiscord | <albassort> oh sorry lol |
03:35:38 | FromDiscord | <albassort> sent a code paste, see https://play.nim-lang.org/#ix=4h4p |
03:35:47 | FromDiscord | <albassort> what happens is, it just doesn't download anything and it blocks |
03:36:06 | FromDiscord | <albassort> god damn httpclient |
03:36:22 | FromDiscord | <Rika> okay you need to run the dispatcher in the same thread somewhere |
03:36:41 | FromDiscord | <Rika> i really dont know much about mixing |
03:37:01 | FromDiscord | <albassort> i know nothing about async its scary |
03:37:18 | FromDiscord | <albassort> point me to the dispatcher in the docs because it was confusing |
03:39:49 | FromDiscord | <Rika> sent a code paste, see https://play.nim-lang.org/#ix=4h4t |
03:40:01 | FromDiscord | <Rika> this time you do need try receive because of the poll call |
03:41:50 | FromDiscord | <albassort> nah |
03:42:03 | FromDiscord | <albassort> nothin |
03:42:16 | FromDiscord | <albassort> waitFor works |
03:42:32 | FromDiscord | <albassort> I dont think it was intended to be used in both async and threading |
03:42:35 | FromDiscord | <Rika> `send` blocks if the channel isnt being consumed |
03:42:53 | FromDiscord | <Rika> what |
03:42:59 | FromDiscord | <Rika> In reply to @albassort "waitFor works": where do you put that? |
03:43:10 | FromDiscord | <albassort> at the client request |
03:43:42 | FromDiscord | <albassort> sent a code paste, see https://play.nim-lang.org/#ix=4h4u |
03:43:51 | FromDiscord | <albassort> (edit) "https://play.nim-lang.org/#ix=4h4u" => "https://play.nim-lang.org/#ix=4h4v" |
03:44:05 | FromDiscord | <albassort> (edit) "https://play.nim-lang.org/#ix=4h4v" => "https://play.nim-lang.org/#ix=4h4w" |
03:46:46 | FromDiscord | <albassort> trying Chronos |
03:49:18 | FromDiscord | <albassort> hmm, because im too tired to figure this out, I'll just use 40 threads |
03:50:48 | FromDiscord | <Rika> what the hell? |
03:50:54 | FromDiscord | <Rika> it works on my side though? |
03:51:07 | FromDiscord | <Rika> i dont know what you want |
03:51:10 | FromDiscord | <Rika> chronos will not help |
03:52:41 | FromDiscord | <Rika> sent a code paste, see https://play.nim-lang.org/#ix=4h4x |
03:53:07 | FromDiscord | <albassort> what os are you on |
03:53:14 | FromDiscord | <albassort> im on arc |
03:53:16 | FromDiscord | <albassort> (edit) "arc" => "arch" |
03:53:27 | FromDiscord | <Rika> i do not think that would matter |
03:53:35 | FromDiscord | <Rika> nonetheless, arch-based |
03:54:01 | FromDiscord | <albassort> perhaps its because im shooting so many urls through it |
03:55:38 | FromDiscord | <albassort> the initial set is around 3000 |
03:55:54 | FromDiscord | <wick3dr0se> sent a code paste, see https://play.nim-lang.org/#ix=4h4y |
03:55:56 | FromDiscord | <albassort> the next set, if it went through, would at least quadruple |
03:56:20 | FromDiscord | <albassort> In reply to @wick3dr0se "Instead of `echo x["add"]`,": you gotta add paramStr(3) to the table |
03:56:21 | FromDiscord | <wick3dr0se> Tried setting it to variable first |
03:56:24 | FromDiscord | <albassort> mine was just an example |
03:56:27 | FromDiscord | <albassort> show code |
03:57:13 | FromDiscord | <wick3dr0se> sent a code paste, see https://play.nim-lang.org/#ix=4h4z |
03:57:44 | FromDiscord | <wick3dr0se> I know, I'm bad |
03:57:55 | FromDiscord | <albassort> so |
03:58:06 | FromDiscord | <albassort> probably coming from python, right? |
03:58:20 | FromDiscord | <wick3dr0se> Just BASH a bit of C and Go |
03:58:47 | FromDiscord | <albassort> last arg is declared in the when scope, and the echo call is outside of that |
03:58:51 | FromDiscord | <wick3dr0se> I'm really good with BASH unfortunately it's only created a lot of confusion for me here |
03:58:58 | FromDiscord | <albassort> this isn't best practice but |
03:59:05 | FromDiscord | <Rika> when does not scope |
03:59:13 | FromDiscord | <Rika> it is true that it will error if it is not defined |
03:59:15 | FromDiscord | <albassort> lastArg |
03:59:15 | FromDiscord | <Rika> but when does not make a scope |
03:59:31 | FromDiscord | <albassort> i've never used when declared |
04:00:13 | FromDiscord | <albassort> listen to rika they know more stuff and are better at helping people |
04:00:15 | FromDiscord | <wick3dr0se> Looks like it works as long as it is supplied |
04:00:44 | FromDiscord | <wick3dr0se> Just breaks if nothing, so I guess thats expected since trying to call a location that doesnt exist |
04:00:50 | FromDiscord | <Rika> yes |
04:00:56 | FromDiscord | <wick3dr0se> BASH has too much magic |
04:01:04 | FromDiscord | <Rika> so you should put the echo in the when as well |
04:01:23 | FromDiscord | <wick3dr0se> Ok that makes sense |
04:01:42 | NimEventer | New thread by jasonfi: Memory leak fixes for db_postgres.nim, see https://forum.nim-lang.org/t/9668 |
04:02:49 | FromDiscord | <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:11 | FromDiscord | <albassort> rika remember last year when i complained that if you multithread httpclient eventually it just dies |
04:03:26 | FromDiscord | <wick3dr0se> Cant even check if paramStr exist because theres no way it couldnt lol |
04:03:53 | FromDiscord | <Rika> In reply to @albassort "rika remember last year": i wouldnt |
04:04:33 | FromDiscord | <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:49 | FromDiscord | <albassort> yes |
04:05:05 | FromDiscord | <albassort> so what happens is, in this situation, its a bug i haven't tracked down yet |
04:05:20 | FromDiscord | <albassort> running it on threads, eventually it locks the thread and the threads die |
04:05:32 | FromDiscord | <Rika> threading is wonderful |
04:05:45 | FromDiscord | <albassort> this wouldn't happen in C 😤 |
04:05:54 | FromDiscord | <albassort> a bunch of other things would go wrong |
04:05:57 | FromDiscord | <Rika> lol |
04:05:59 | FromDiscord | <Girvo> Pfft, it absolutely would. points to all the cases in ESP-IDF that it does |
04:06:09 | FromDiscord | <Girvo> Though thats a whole different set of constraints lol |
04:06:27 | FromDiscord | <Rika> i will be leaving |
04:06:31 | FromDiscord | <albassort> I have never written a C file longer than 500 lines |
04:06:32 | FromDiscord | <Rika> i am busy |
04:06:38 | FromDiscord | <albassort> which tells you i don't do much c |
04:06:40 | FromDiscord | <albassort> bai rika lov u |
04:06:43 | FromDiscord | <Girvo> We simplified it to single threaded async-IO with multi-processes instead. Simpler, more robust |
04:06:56 | FromDiscord | <albassort> my job is go |
04:07:00 | FromDiscord | <albassort> so its not simpler and more robust |
04:07:12 | FromDiscord | <albassort> its mildly more complex and less robust |
04:08:27 | FromDiscord | <wick3dr0se> I think getopt is my best bet |
04:34:39 | FromDiscord | <voidwalker> how to return a sequence without its last element ? |
04:36:17 | FromDiscord | <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:50 | FromDiscord | <voidwalker> Oh I thought I can't use slices on seq |
06:03:12 | * | ltriant quit (Ping timeout: 264 seconds) |
06:07:13 | NimEventer | New 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:53 | FromDiscord | <ringabout> My nimble is broken, is there some way to repair it? |
08:39:57 | FromDiscord | <ringabout> `Error: unhandled exception: cannot read from file: C:\Users\blue\.nimble\packages_local.json [IOError]` |
08:49:00 | PMunch | Hmm, does that file exist? |
08:55:32 | FromDiscord | <ringabout> I guess it is not, since I installed 0.14.0 for testing it, which messes up with my local installation. |
08:55:36 | FromDiscord | <ringabout> (edit) "is" => "does" |
09:01:51 | FromDiscord | <emanresu3> Is there a good tutorial for creating nimble packages? |
09:02:24 | PMunch | `nimble init` -> fill in the blanks -> ?? -> profit! |
09:03:19 | PMunch | There isn't really that much more to it |
09:06:32 | FromDiscord | <ringabout> db_ are going to be moved out of the stdlib to nimble, what should I name it as? |
09:10:24 | FromDiscord | <emanresu3> Oh apparently I have to fork nim-lang/packages and make a pull request |
09:11:13 | FromDiscord | <emanresu3> dang it, I wish it didn't force me to use github, i'd have to create an account |
09:14:29 | PMunch | Devs 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:02 | FromDiscord | <Bung> can take the name of https://github.com/jlp765/db ?↵(@ringabout) |
09:15:44 | FromDiscord | <ringabout> Yeah, It should have been `db` if the name wasn't taken. |
09:16:35 | FromDiscord | <Elegantbeef> clearly deebee |
09:19:29 | FromDiscord | <Elegantbeef> Hmph is there such thing as a bidirection git mirror.... |
09:21:28 | FromDiscord | <Bung> we do have tool check a package really in used right? maybe just replace that `db` one |
09:26:24 | FromDiscord | <Rika> Why not dab :OMEGALUL: |
09:28:22 | FromDiscord | <Bung> oh I really want see the new design nimble site online |
09:28:37 | FromDiscord | <Elegantbeef> Oh shit gitlab actually has it https://docs.gitlab.com/ee/user/project/repository/mirror/bidirectional.html 😄 |
09:31:05 | PMunch | Well it's just implemented with hooks |
09:31:33 | FromDiscord | <Elegantbeef> Yea i just thought it was inane enough no one would explicitly talk about it |
09:50:06 | FromDiscord | <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:27 | PMunch | Huh, this is pretty cool: https://tylercipriani.com/blog/2022/11/19/git-notes-gits-coolest-most-unloved-feature/ |
10:23:25 | NimEventer | New thread by sls1005: Importing generic variables, see https://forum.nim-lang.org/t/9671 |
10:28:48 | FromDiscord | <demotomohiro> I didn't know C++ has generic variables. |
10:33:46 | * | pro joined #nim |
10:34:25 | * | pro left #nim (#nim) |
10:39:38 | FromDiscord | <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:24 | FromDiscord | <sneakyfish> or do i need to catch the error? |
10:40:39 | FromDiscord | <ringabout> Did you use `nimout`? |
10:40:52 | FromDiscord | <sneakyfish> no i didnt. |
10:40:56 | FromDiscord | <sneakyfish> let me google that |
10:41:32 | FromDiscord | <ringabout> What's your tests? |
10:41:33 | FromDiscord | <sneakyfish> any docs on that? |
10:41:45 | FromDiscord | <sneakyfish> give me a sec |
10:43:07 | FromDiscord | <sneakyfish> sent a code paste, see https://play.nim-lang.org/#ix=4h5L |
10:43:16 | FromDiscord | <sneakyfish> and then the file it imports |
10:43:56 | FromDiscord | <sneakyfish> i know there is some kind of issue here since if i remove the import it does not fail. |
10:44:02 | FromDiscord | <sneakyfish> but im not sure what the error is |
10:44:25 | FromDiscord | <sneakyfish> sent a code paste, see https://play.nim-lang.org/#ix=4h5M |
10:44:31 | FromDiscord | <ringabout> What if you run it directly? |
10:45:43 | FromDiscord | <sneakyfish> ahh i see |
10:45:53 | FromDiscord | <sneakyfish> yeah that spits it out |
10:46:18 | FromDiscord | <ringabout> Here is the documentation of testament => https://nim-lang.github.io/Nim/testament.html |
10:46:54 | FromDiscord | <sneakyfish> cool, yeah i have that opened. just wasn't sure if i was missing something |
10:46:59 | FromDiscord | <sneakyfish> thanks 😄 ! |
10:47:10 | FromDiscord | <ringabout> You are welcome. |
10:47:11 | FromDiscord | <Yepoleb> Good morning nim people |
10:47:46 | FromDiscord | <ringabout> Good afternoon |
10:49:37 | FromDiscord | <Rika> good evening |
10:49:49 | FromDiscord | <Dr. Theo> Good morning! |
11:02:55 | FromDiscord | <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:03 | FromDiscord | <ShalokShalom> sent a long message, see http://ix.io/4h5X |
11:45:49 | FromDiscord | <ringabout> Yeah, only awesome one will be added. |
11:46:15 | FromDiscord | <ShalokShalom> Ah, ok ^^ |
11:46:23 | * | jmdaemon quit (Ping timeout: 264 seconds) |
11:50:18 | FromDiscord | <ShalokShalom> sent a long message, see http://ix.io/4h5Z |
11:50:19 | FromDiscord | <ShalokShalom> https://github.com/ringabout/awesome-nim#scripting |
11:58:51 | FromDiscord | <tope> sent a code paste, see https://play.nim-lang.org/#ix=4h61 |
12:02:14 | FromDiscord | <ringabout> In reply to @ShalokShalom "<@658563905425244160> idk if I": I don't know where to put it though. |
12:20:44 | FromDiscord | <ShalokShalom> To be honest |
12:20:57 | FromDiscord | <ShalokShalom> I think that could do well as part of the lan |
12:21:01 | FromDiscord | <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:33 | FromDiscord | <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:13 | FromDiscord | <Yardanico> In reply to @iffy (Matt Haggard) "I have been given": is it null terminated? if so, just `$cast[cstring](myptr)` |
15:21:57 | FromDiscord | <iffy (Matt Haggard)> Not sure if it's null-terminated, but I'll check↵(@Yardanico) |
15:25:56 | FromDiscord | <vindaar> sent a code paste, see https://play.nim-lang.org/#ix=4h6P |
15:26:27 | FromDiscord | <vindaar> (for the string of course it's better to just treat it as a string, but for other cases) |
15:26:32 | FromDiscord | <iffy (Matt Haggard)> sent a code paste, see https://play.nim-lang.org/#ix=4h6Q |
15:28:56 | FromDiscord | <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:27 | FromDiscord | <wick3dr0se> (edit) "2" => "2+" |
15:32:42 | FromDiscord | <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:52 | FromDiscord | <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:11 | FromDiscord | <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:26 | madprops | hmmm |
15:35:57 | FromDiscord | <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:05 | FromDiscord | <albassort> does someTable exist lol |
15:43:46 | FromDiscord | <hmmm> I'm looking at scanf, seems pretty eazy |
15:44:15 | FromDiscord | <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:37 | FromDiscord | <albassort> In reply to @fowl "Can I write a": technically? Yes. Practically? No. |
15:46:09 | FromDiscord | <albassort> go ahead ang give it a shot but 99% chance you'll just do JS and Html |
15:49:35 | madprops | the nim playground is written in nim |
15:49:37 | madprops | the frontend |
15:50:12 | madprops | https://github.com/karaxnim/karax |
15:52:26 | * | Phytolizer joined #nim |
15:53:50 | FromDiscord | <albassort> https://media.discordapp.net/attachments/371759389889003532/1046816193132122122/image.png |
15:54:40 | FromDiscord | <albassort> yea |
15:54:43 | FromDiscord | <albassort> its possible |
16:01:09 | FromDiscord | <albassort> @Phil since you reminded me that sets actually have use so much of my code is getting rewritten and is faster |
16:01:11 | FromDiscord | <albassort> thank u |
16:16:15 | FromDiscord | <ShalokShalom> Sets? |
16:16:38 | FromDiscord | <ShalokShalom> In reply to @madprops "https://github.com/karaxnim/karax": Oh, nice↵↵How is it? |
16:17:39 | FromDiscord | <ShalokShalom> @ringabout do you think it would fit well in the stdlib?↵↵The shell macro. |
16:27:47 | FromDiscord | <treeform> If I make my own OS in Nim what should I call it? |
16:33:24 | FromDiscord | <Yepoleb> something royalty inspired because of the logo, crown, king, throne and then slap OS at the end |
16:33:42 | FromDiscord | <Yepoleb> (edit) "logo," => "logo -" | "logo -crown, king, throne ... and" added "-" |
16:37:25 | FromDiscord | <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:31 | FromDiscord | <Phil> (edit) "go" => "do" |
16:38:07 | FromDiscord | <wick3dr0se> Isn't the system lib imported with any other lib, like os for example? |
16:38:50 | FromDiscord | <federico3> @treeform\: a kernel? A whole OS? |
16:39:35 | FromDiscord | <Phil> In reply to @wick3dr0se "Isn't the system lib": System lib is always implicitly imported |
16:39:52 | FromDiscord | <Phil> Basically you never need to import it manually |
16:39:54 | FromDiscord | <wick3dr0se> In reply to @Isofruit "System lib is always": Then I should be able to read stdin? |
16:40:15 | FromDiscord | <wick3dr0se> I cant even echo readLine(stdin) |
16:40:33 | FromDiscord | <albassort> Phil check off topic lol |
16:40:37 | FromDiscord | <Phil> I mean, I'm on phone, so can't really give a good answer. Is taking readline in system? |
16:42:01 | FromDiscord | <Phil> In reply to @albassort "Phil check off topic": Found a part of your code that can not executed when using sets? |
16:42:15 | FromDiscord | <wick3dr0se> Says readLine is in system/io |
16:42:30 | FromDiscord | <albassort> No |
16:43:04 | FromDiscord | <wick3dr0se> Thinking NimScript doesn't handle stdin |
16:44:37 | FromDiscord | <Phil> The readline docs I'm seeing are all about file reading |
16:54:28 | FromDiscord | <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:47 | FromDiscord | <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:45 | FromDiscord | <federico3> you mean a unikernel? |
17:07:56 | * | Phytolizer joined #nim |
17:17:29 | FromDiscord | <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:03 | FromDiscord | <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:52 | FromDiscord | <planetis> why the quotes you need methods for that, or you don't want to use OOP? |
17:45:21 | FromDiscord | <Phil> In reply to @A Very Merry Reimu ッ "how do i create": You're looking for the method keyword |
17:45:59 | FromDiscord | <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:58 | FromDiscord | <demotomohiro> Example code in Nim manual: https://nim-lang.org/docs/manual.html#methods |
17:49:19 | FromDiscord | <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:21 | FromDiscord | <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:25 | FromDiscord | <ShalokShalom> In reply to @Isofruit "Happy to be of": Could you repeat that wisdom to me as well? 😛 |
17:50:45 | FromDiscord | <ShalokShalom> I like making things explicit by choosing the right feature. 🙂 |
17:55:00 | FromDiscord | <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:16 | FromDiscord | <ShalokShalom> notes |
17:55:33 | FromDiscord | <Phil> Sets are generally faster at that as well |
17:56:04 | FromDiscord | <ShalokShalom> would you say they are a better default |
17:56:08 | FromDiscord | <ShalokShalom> like, when I am unsure |
18:07:32 | FromDiscord | <Phil> sent a long message, see http://ix.io/4h7p |
18:09:06 | FromDiscord | <Phil> Using a seq has no implicit meaning to me, since it's basically the default |
18:10:09 | FromDiscord | <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:07 | FromDiscord | <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:54 | FromDiscord | <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:12 | FromDiscord | <ShalokShalom> But, if I understood you correctly, is this too subjective, in this case? |
18:17:17 | FromDiscord | <ShalokShalom> To measure it objectively. |
18:17:26 | FromDiscord | <albassort> sent a code paste, see https://play.nim-lang.org/#ix=4h7r |
18:17:36 | FromDiscord | <albassort> forget its name |
18:18:48 | FromDiscord | <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:50 | FromDiscord | <ShalokShalom> But a seq is the only data structure that is difficult in this case? |
18:20:05 | FromDiscord | <ShalokShalom> Like, we could differentiate between arrays and sets |
18:20:09 | FromDiscord | <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:11 | FromDiscord | <ShalokShalom> And let the compiler give recommendations? |
18:20:26 | FromDiscord | <albassort> In reply to @albassort "we have something that": aaa what are theese called aaaa |
18:20:37 | FromDiscord | <Rika> query parameters |
18:20:59 | FromDiscord | <Rika> https://nim-lang.org/docs/uri.html |
18:21:07 | FromDiscord | <Rika> good night |
18:21:10 | FromDiscord | <Rika> it is 3 am |
18:21:28 | FromDiscord | <albassort> @Rika wait |
18:21:33 | FromDiscord | <Phil> Sleep well! |
18:21:35 | FromDiscord | <albassort> this is important |
18:21:43 | FromDiscord | <Rika> sure |
18:21:44 | FromDiscord | <albassort> goodnight ^-^ <3 |
18:21:47 | FromDiscord | <Rika> okay |
18:24:21 | FromDiscord | <ShalokShalom> good night |
18:30:48 | FromDiscord | <treeform> In reply to @federico3 "you mean a unikernel?": yes |
18:32:13 | FromDiscord | <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:30 | FromDiscord | <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:40 | FromDiscord | <albassort> In reply to @treeform "I have a library": my love, you have a library for everything |
18:34:08 | FromDiscord | <treeform> I very nearly do, if I don't have it guzba does. |
18:34:38 | FromDiscord | <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:08 | FromDiscord | <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:17 | FromDiscord | <Phil> But that's pretty much it |
18:35:56 | FromDiscord | <albassort> wait im being spoken about |
18:36:31 | FromDiscord | <albassort> In reply to @Isofruit "So I guess you": dont think that should be a warning |
18:36:47 | FromDiscord | <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:51 | FromDiscord | <albassort> and it kinda goes against nim's |
18:37:05 | FromDiscord | <albassort> (edit) "and it kinda goes against nim's ... " added ""libertarianism"" |
18:37:08 | FromDiscord | <albassort> it reminds me of rust |
18:37:38 | FromDiscord | <albassort> "this var is a sequence but its content is not mutated in compile time so you should make it an array" |
18:37:39 | FromDiscord | <treeform> most micro optimizations don't matter |
18:37:46 | FromDiscord | <treeform> always profile ™️ |
18:38:03 | FromDiscord | <albassort> (edit) "compile" => "runtime" |
18:39:30 | FromDiscord | <albassort> so I've seen that nimskull hasn't died yet |
18:39:37 | FromDiscord | <albassort> that makes me pretty nervous |
18:39:58 | FromDiscord | <albassort> I don't want nim to become a fractured group of languages like perl |
18:41:08 | FromDiscord | <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:15 | FromDiscord | <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:23 | FromDiscord | <Phil> (edit) "don't" => "doesn't" |
18:41:30 | FromDiscord | <Phil> It only matters when it actually matters, not before |
18:41:39 | FromDiscord | <haxscramper> what a joyful attitude↵(@albassort) |
18:41:41 | FromDiscord | <Phil> (edit) "matters," => "matters (aka when you notice sth being slow)," |
18:42:02 | FromDiscord | <albassort> In reply to @haxscramper "what a joyful attitude": i gave my reason |
18:42:14 | FromDiscord | <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:36 | FromDiscord | <haxscramper> well yeah, just kind of weird to read that our project not dying makes peopel nervous |
18:43:23 | FromDiscord | <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:37 | FromDiscord | <albassort> probably start calling it cryo |
18:44:15 | FromDiscord | <Phil> At least I've gained somewhat the impression that the relations aren't hostile per se (?) |
18:44:23 | FromDiscord | <Phil> Feel free to correct me on that one hax |
18:44:26 | FromDiscord | <albassort> see |
18:44:30 | FromDiscord | <albassort> its like mommy and daddy fighting |
18:44:37 | FromDiscord | <albassort> and then they get the divorce papers |
18:44:55 | * | PMunch quit (Quit: leaving) |
18:44:58 | FromDiscord | <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:08 | FromDiscord | <albassort> (edit) "and they sit you down and go "Ok, look. I love Daddy, but, we're better off ... together." added "not" |
18:46:10 | FromDiscord | <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:39 | FromDiscord | <haxscramper> just write your code in nim; problem solved |
18:46:57 | FromDiscord | <Phil> That just means Cyo is not for you alba |
18:47:03 | FromDiscord | <haxscramper> we are not actively forcing anyone nor trying to discredit nim |
18:47:41 | FromDiscord | <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:59 | FromDiscord | <albassort> Ok, thats fair |
18:48:59 | FromDiscord | <haxscramper> underlying disagreements lie mostly in the technical dimensoins |
18:49:17 | FromDiscord | <haxscramper> and pretty deep at that -- arcane stuff from sem and so on |
18:49:31 | FromDiscord | <haxscramper> so we basically don't have a strong PR case anyway |
18:49:37 | FromDiscord | <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:02 | FromDiscord | <haxscramper> no, I'm not talking about splitting it in half |
18:50:03 | FromDiscord | <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:18 | FromDiscord | <haxscramper> I'm talking about taking a very specific codebase and running a pretty specific set of refactorings on it |
18:50:19 | FromDiscord | <Phil> And it's not about splitting, it's about how you want to invest your time on a personal level |
18:50:25 | FromDiscord | <haxscramper> in the hope of getting a better implementation |
18:50:27 | FromDiscord | <albassort> In reply to @Isofruit "Yeah but the alternative": but then nobody is happy |
18:50:48 | FromDiscord | <haxscramper> the fact people tend to treat forking like a crime is a veird thing |
18:51:45 | FromDiscord | <haxscramper> especially considering that people like saem could've just left entirely |
18:52:03 | FromDiscord | <haxscramper> not like community needs a maintainer for vscode extension, right |
18:52:06 | FromDiscord | <haxscramper> or vim extension |
18:52:09 | FromDiscord | <haxscramper> oh I guess he also left |
18:52:25 | FromDiscord | <haxscramper> package manager? see the thread on twitter. alternative solution implementor also left |
18:52:37 | FromDiscord | <haxscramper> async implementatoin? oh, see the same thread, alternative implementors also left |
18:52:52 | FromDiscord | <haxscramper> damn, maybe the community is just fucking falling apart at it seams even without our interwention |
18:53:35 | FromDiscord | <haxscramper> IC & co run into technical difficulties wall, so that's what we are trying to fix |
18:53:48 | FromDiscord | <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:59 | FromDiscord | <haxscramper> better shove more features in 2.0 |
18:55:13 | FromDiscord | <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:22 | FromDiscord | <haxscramper> longest thread on nim reddit btw |
18:56:04 | FromDiscord | <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:36 | FromDiscord | <albassort> ok but look what happened to Perl and Raku |
18:56:53 | FromDiscord | <haxscramper> In reply to @haxscramper "> > dom96": this |
18:57:32 | FromDiscord | <haxscramper> In reply to @albassort "ok but look what": nobody uses raku because there is so much code in perl |
18:57:38 | FromDiscord | <albassort> yes |
18:57:44 | FromDiscord | <haxscramper> the langs are almost incompatible from what I can see |
18:57:53 | FromDiscord | <haxscramper> there was not community split |
18:57:59 | FromDiscord | <haxscramper> it's just two different languages |
18:58:15 | FromDiscord | <haxscramper> and Raku sucks just as much as perl so nobody starts anything in it |
18:58:41 | FromDiscord | <haxscramper> Perl 5 just has so much legacy/inertia that people anyway |
18:59:26 | FromDiscord | <albassort> I also thing the they/them thing is generational |
18:59:41 | FromDiscord | <albassort> I've never heard anything wrong with they / them, when they're used in grammar it sounds fine |
18:59:45 | FromDiscord | <haxscramper> it is about intentions |
18:59:55 | FromDiscord | <albassort> when it comes to intentions |
19:00:09 | FromDiscord | <albassort> you should use they/them as it is a gender neutral form and language is what people make it |
19:00:19 | FromDiscord | <albassort> there is no reason not to use it and make "he" as gender neutral arcane |
19:00:22 | FromDiscord | <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:45 | FromDiscord | <albassort> He i gender neutral, but it shouldn't be used in serious modern texts imho |
19:01:05 | FromDiscord | <albassort> (this is a complex topic in linguistics) |
19:01:33 | FromDiscord | <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:40 | FromDiscord | <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:54 | FromDiscord | <haxscramper> "I can read textbooks" |
19:01:56 | FromDiscord | <Phil> In reply to @albassort "what is correct in": Funnily enough, often enough it does |
19:02:04 | FromDiscord | <albassort> ok technically |
19:02:07 | FromDiscord | <albassort> :spray: |
19:02:12 | FromDiscord | <haxscramper> "sure dude, we all can, but what are you implying" |
19:02:24 | FromDiscord | <haxscramper> that we all disregard people's requests? |
19:02:55 | FromDiscord | <haxscramper> because "ok technically" German kids are taught English one way or another |
19:03:24 | FromDiscord | <haxscramper> it is either pointless "ok technically" or implication that something must be changed |
19:03:47 | FromDiscord | <haxscramper> with a decently clear definition of how author sees the "correct" way |
19:04:32 | FromDiscord | <haxscramper> irrespective the fact it brushes off what other people might have wrt. to preferences |
19:04:45 | FromDiscord | <Phil> As a sidenote, german kids when exposed to ye olde english should encounter "they/them" for singular. |
19:05:05 | FromDiscord | <Phil> Actually I'm pretty sure there are normal english sentences that contain they/them singular |
19:05:30 | FromDiscord | <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:36 | FromDiscord | <Phil> (am german for reference) |
19:05:45 | FromDiscord | <haxscramper> also IIRC german has genders in the words, like dog is "he" or smth |
19:05:50 | FromDiscord | <haxscramper> english doesn't |
19:05:59 | FromDiscord | <haxscramper> or french |
19:06:08 | FromDiscord | <haxscramper> russian/ukrainian certainly has this |
19:06:46 | FromDiscord | <Phil> Kinda sorta, french and german both have "feminine", "masculine" and "neutral" articles |
19:06:57 | FromDiscord | <Phil> der/die/das vs. "the" |
19:07:33 | * | Phytolizer quit (Ping timeout: 260 seconds) |
19:09:00 | FromDiscord | <Generic> well for German you need to distinguish between genus and sexus |
19:09:07 | FromDiscord | <planetis> can you explai to me why the laptop is der, I lost points in my exam from this |
19:10:10 | FromDiscord | <planetis> a1 level so i dont really care, but still |
19:10:33 | FromDiscord | <Generic> grammatical gender of foreign words is weird |
19:10:44 | FromDiscord | <Generic> did you say das Laptop? |
19:11:10 | FromDiscord | <Generic> because some people in Germany say that as well and it's even listed in the Duden as an alternative |
19:11:22 | FromDiscord | <planetis> yes, true though greek are no different |
19:11:23 | FromDiscord | <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:06 | FromDiscord | <Generic> also fun is Nutella |
19:12:07 | * | pro joined #nim |
19:12:07 | FromDiscord | <albassort> https://media.discordapp.net/attachments/371759389889003532/1046866096046743602/image.png |
19:12:13 | FromDiscord | <Generic> is it der, die oder das? |
19:12:23 | FromDiscord | <ali> Just got to suck it up and separate art from artist I say. |
19:12:24 | FromDiscord | <albassort> if you don't speak these guys, and are in Europe, everything is gendered |
19:12:55 | FromDiscord | <albassort> If linus was a nazi would you still use linux |
19:13:01 | FromDiscord | <albassort> genuine question |
19:13:04 | FromDiscord | <ali> Some languages get on fine without gendered pronouns at all. |
19:13:20 | FromDiscord | <planetis> well how about reiserFS? |
19:13:28 | FromDiscord | <Generic> it's das |
19:13:29 | FromDiscord | <planetis> In reply to @Generic "is it der, die": die? |
19:13:36 | FromDiscord | <planetis> damn |
19:13:45 | FromDiscord | <Generic> for Nutella? |
19:13:59 | FromDiscord | <Generic> for Nutella the answer is pretty much all of the above |
19:14:26 | FromDiscord | <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:40 | FromDiscord | <Generic> (edit) "die," => "das," |
19:14:55 | FromDiscord | <Generic> and FS is filesystem so dateisystem and system is neutral |
19:14:57 | FromDiscord | <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:19 | FromDiscord | <ali> Maybe the solution is a email/browser plugin that replaces all pronouns with they/them |
19:15:48 | FromDiscord | <albassort> In reply to @ali "Maybe the solution is": I'm thinking about replacing all my pronouns with the word "Comrade" |
19:15:48 | FromDiscord | <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:59 | FromDiscord | <Generic> haha |
19:16:05 | FromDiscord | <Generic> or it's not really funny |
19:16:06 | FromDiscord | <albassort> :Com: |
19:16:08 | FromDiscord | <ali> I definitely used it |
19:16:16 | FromDiscord | <ali> But I think it also was out compete |
19:16:49 | FromDiscord | <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:59 | FromDiscord | <planetis> lol |
19:17:01 | * | FromDiscord quit (Remote host closed the connection) |
19:17:14 | * | FromDiscord joined #nim |
19:17:50 | FromDiscord | <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:05 | FromDiscord | <albassort> time to use nimpy again |
19:20:25 | FromDiscord | <albassort> every time i use nimpy i have to remember how to make local python files work |
19:20:26 | FromDiscord | <ShalokShalom> In reply to @treeform "I have a library": did you apply to put this into the stdlib instead? |
19:20:34 | FromDiscord | <ShalokShalom> or, additionally to not break anything |
19:22:50 | FromDiscord | <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:26 | FromDiscord | <albassort> sent a code paste, see https://play.nim-lang.org/#ix=4h7B |
19:23:30 | FromDiscord | <albassort> i need to pr this into the docs for nimpy lol |
19:23:31 | FromDiscord | <ShalokShalom> In reply to @Isofruit "So I guess you": would that be a benefit in your sense? |
19:23:40 | FromDiscord | <ShalokShalom> like, if the compiler does so |
19:23:58 | FromDiscord | <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:26 | FromDiscord | <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:33 | FromDiscord | <ShalokShalom> So dont worry |
19:24:42 | FromDiscord | <albassort> that is my main hope |
19:24:43 | FromDiscord | <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:52 | FromDiscord | <Phil> This kind of thing is what you'd want in a separate tool |
19:25:00 | FromDiscord | <albassort> my ideal scenario is cryo is big game successful (for our community standards) |
19:25:01 | FromDiscord | <Phil> A linter basically |
19:25:07 | FromDiscord | <albassort> and then everything gets merged upstream |
19:25:14 | FromDiscord | <albassort> or something |
19:26:22 | FromDiscord | <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:28 | FromDiscord | <ShalokShalom> In reply to @Isofruit "I think this is": Sure. Doesnt change that it is helpful to have it explicit 🙂 |
19:43:45 | FromDiscord | <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:52 | FromDiscord | <ShalokShalom> In reply to @emanresu3 "Hi, I just made": Thanks a lot. What is different to the existing one? |
19:51:14 | FromDiscord | <ShalokShalom> I was hoping, somebody does a composition operator instead 😅 |
19:52:19 | FromDiscord | <emanresu3> which existing one? the ones packaged in nimble already?↵(@ShalokShalom) |
19:52:36 | FromDiscord | <ShalokShalom> https://github.com/CosmicToast/pipe |
19:52:43 | FromDiscord | <emanresu3> That sounds interesting as well, maybe I'll look into it if I don't find any existing one↵(@ShalokShalom) |
19:53:01 | FromDiscord | <ShalokShalom> Would make me super happy |
19:53:13 | FromDiscord | <ShalokShalom> Just to clarify: I mean >> in F# |
19:53:56 | FromDiscord | <emanresu3> For what I saw, that operator just functions for piping the result into the first argument of the next pipe↵(@ShalokShalom) |
19:54:30 | FromDiscord | <emanresu3> So there's no difference to the builtin UCS syntax of Nim |
19:54:53 | FromDiscord | <ShalokShalom> Isnt that piping? |
19:54:57 | FromDiscord | <ali> Clojure thread macros ♥️ but pipe excellent too |
19:55:03 | FromDiscord | <ShalokShalom> What does yours differently? |
19:55:40 | FromDiscord | <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:59 | FromDiscord | <emanresu3> Similar to the `dup` macro in nim |
19:56:05 | FromDiscord | <ShalokShalom> thats neat |
19:56:20 | FromDiscord | <ShalokShalom> You dont wanna publish it yourself? |
19:56:57 | FromDiscord | <emanresu3> sent a code paste, see https://play.nim-lang.org/#ix=4h7G |
19:57:22 | FromDiscord | <emanresu3> I would, but I don't have nor want to create a github account↵(@ShalokShalom) |
19:57:51 | FromDiscord | <emanresu3> So I was wondering if anyone here with github account would like to clone and publish it |
19:58:04 | FromDiscord | <ShalokShalom> I never did this, and I can try |
19:58:18 | FromDiscord | <ShalokShalom> Does Nimble require you to have a Github account? |
19:59:26 | FromDiscord | <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:29 | FromDiscord | <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:02 | FromDiscord | <hmmm> hmmm wot |
20:02:09 | FromDiscord | <ShalokShalom> I am going to do that |
20:02:16 | FromDiscord | <ShalokShalom> Can it wait till tomorrow? |
20:02:32 | FromDiscord | <ShalokShalom> My wife just asks for attention 🙂 |
20:02:34 | FromDiscord | <emanresu3> Sure no problem↵(@ShalokShalom) |
20:02:49 | FromDiscord | <ShalokShalom> Where is the repo? |
20:02:56 | FromDiscord | <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:08 | FromDiscord | <ShalokShalom> You can prepare the README for it |
20:03:16 | FromDiscord | <ShalokShalom> And also mention yourself, please 🙂 |
20:03:19 | FromDiscord | <emanresu3> Here https://codeberg.org/emanresu3/nim-pipexp↵(@ShalokShalom) |
20:03:30 | FromDiscord | <ShalokShalom> wonderful, till tomorrow |
20:03:38 | FromDiscord | <emanresu3> It has a readme, do you mean a readme for publishing or something? |
20:04:03 | FromDiscord | <emanresu3> It is on the license \:)↵(@ShalokShalom) |
20:13:39 | * | dtomato4 quit (Quit: The Lounge - https://thelounge.chat) |
20:15:36 | FromDiscord | <ShalokShalom> @emanresu3#0000 thats a real nice readme |
20:16:29 | FromDiscord | <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:31 | FromDiscord | <emanresu3> Yeah I'm fine just being in there↵(@ShalokShalom) |
20:21:02 | FromDiscord | <albassort> I've heard someone say "there should be a language neutral api" |
20:21:04 | FromDiscord | <albassort> wtf is that |
20:21:06 | FromDiscord | <albassort> how do you do that |
20:21:11 | FromDiscord | <albassort> bash? |
20:21:33 | FromDiscord | <albassort> Language Neutral == C, but he said "not like you gotta use c or something" |
20:22:24 | FromDiscord | <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:56 | FromDiscord | <jmgomez> sent a code paste, see https://play.nim-lang.org/#ix=4h7S |
20:23:12 | FromDiscord | <albassort> wait what |
20:23:20 | FromDiscord | <albassort> interesting |
20:24:58 | FromDiscord | <ali> Probably consider JSON over rest "neutral"↵(@albassort) |
20:25:09 | FromDiscord | <albassort> thats not neutral at all, thats just slow |
20:25:38 | FromDiscord | <albassort> (he was talking about a filesystem) |
20:28:22 | * | dtomato4 quit (Quit: The Lounge - https://thelounge.chat) |
20:28:23 | FromDiscord | <ali> I'd use that, I'm tired of everything being a file. |
20:29:04 | * | dtomato4 joined #nim |
20:29:43 | FromDiscord | <albassort> but everything being a file is really neat and cool |
20:29:57 | FromDiscord | <Phil> It is the linux way |
20:30:12 | FromDiscord | <ali> Well it'll all be JSON files, just be thankful it's not XML |
20:31:30 | FromDiscord | <albassort> json is cool until you need to do anything with it |
20:33:43 | FromDiscord | <huantian> well when you need to do something with it you make it not json |
20:34:48 | FromDiscord | <ali> It's a the worst serialisation format, except for all the rest |
20:35:07 | FromDiscord | <ali> Pickle potentially leading to arbitrary code execution 🤢 |
20:41:07 | FromDiscord | <albassort> is there any particular reason why i cant send procs to threads? |
20:41:21 | * | sagax joined #nim |
20:41:31 | FromDiscord | <albassort> violates gc saftey |
20:41:34 | FromDiscord | <albassort> :smug: |
20:42:05 | FromDiscord | <Phil> Does the proc access global state? |
20:42:20 | FromDiscord | <Phil> Or call a proc that does something non-local? |
20:42:30 | FromDiscord | <albassort> everything local |
20:42:37 | FromDiscord | <albassort> the proc is gcsafe |
20:42:42 | FromDiscord | <Phil> So you could just as well use "func" instead of proc? |
20:46:12 | FromDiscord | <albassort> you cant send funcs |
20:46:15 | FromDiscord | <albassort> as paramaters |
20:46:21 | FromDiscord | <albassort> (edit) "paramaters" => "parameters" |
20:55:44 | FromDiscord | <albassort> oh you nc |
20:55:48 | FromDiscord | <albassort> (edit) "nc" => "can" |
20:58:16 | * | derpydoo quit (Ping timeout: 265 seconds) |
20:59:34 | * | derpydoo joined #nim |
21:00:34 | FromDiscord | <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:40 | NimEventer | New 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:07 | FromDiscord | <Yepoleb> In reply to @haxscramper "this": i kept reading after the drama and it was pretty interesting |
21:39:31 | FromDiscord | <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:24 | FromDiscord | <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:26 | FromDiscord | <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:03 | FromDiscord | <Yepoleb> i'm assuming you mean cpuTime, for what purpose are you using it? |
22:14:24 | FromDiscord | <Yepoleb> i could not find a procedure getCpu |
22:14:50 | FromDiscord | <guttural666> sorry, yes |
22:14:57 | FromDiscord | <guttural666> https://nim-lang.org/docs/times.html#cpuTime |
22:17:32 | FromDiscord | <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:55 | FromDiscord | <guttural666> ahhhh |
22:18:00 | FromDiscord | <guttural666> need wall time or what is the term |
22:18:03 | FromDiscord | <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:58 | FromDiscord | <guttural666> okay, things make sense now, I'm fetching jsons from a web resource |
22:20:39 | FromDiscord | <guttural666> I'm guessing get time would be the appropreate alternative then |
22:23:05 | FromDiscord | <Yepoleb> yes, that or getMonoTime |
22:23:51 | FromDiscord | <Yepoleb> are you trying to just print something along "This program took 10 seconds"? |
22:24:31 | FromDiscord | <guttural666> yeah okay monotimes is what I need then |
22:24:48 | FromDiscord | <ali> And the command line tool \`time\` isn't useful for this? |
22:25:33 | FromDiscord | <guttural666> yeah basically doing stuff like this rn https://media.discordapp.net/attachments/371759389889003532/1046914771099844799/image.png |
22:26:02 | FromDiscord | <Yepoleb> yes, use monotonic time for that |
22:30:12 | FromDiscord | <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:55 | FromDiscord | <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:42 | FromDiscord | <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:26 | FromDiscord | <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:38 | FromDiscord | <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 |