00:25:44 | * | noeontheend joined #nim |
00:45:36 | * | krux02 quit (Remote host closed the connection) |
01:09:32 | * | src quit (Quit: Leaving) |
01:33:25 | * | noeontheend quit (Ping timeout: 240 seconds) |
01:38:59 | * | noeontheend joined #nim |
01:53:49 | * | noeontheend quit (Ping timeout: 240 seconds) |
01:56:21 | NimEventer | New post on r/nim by 4runninglife: Nim is great, that is all, see https://reddit.com/r/nim/comments/rfw71y/nim_is_great_that_is_all/ |
02:00:33 | * | lumo_e quit (Ping timeout: 252 seconds) |
02:11:46 | * | vicfred quit (Quit: Leaving) |
02:20:32 | * | crem quit (Ping timeout: 240 seconds) |
02:21:23 | * | crem joined #nim |
02:28:07 | NimEventer | New thread by Prestige: Maze solver benchmark - How would you optimize?, see https://forum.nim-lang.org/t/8709 |
02:54:45 | FromDiscord | <huantian> <https://github.com/huantianad/advent-of-code/blob/150bb6642b246c4b3094c89ebe77bf0214cc0214/2021/day13.nim#L31> ↵why does changing this line to just an `else:` make nim unhappy |
03:19:19 | FromDiscord | <impbox [ftsf]> what does it say? |
03:20:34 | FromDiscord | <impbox [ftsf]> also it's hard to say when you're including stuff and it can't be run |
03:25:52 | FromDiscord | <huantian> sent a code paste, see https://play.nim-lang.org/#ix=3Ikd |
03:27:26 | FromDiscord | <impbox [ftsf]> what's the error? |
03:28:41 | FromDiscord | <huantian> `invalid type: 'void' in this context: 'seq[void]' for var`↵`expression 'x' is of type 'int' and has to be used (or discarded)`↵both on the bottom x |
03:59:51 | FromDiscord | <geekrelief> sent a code paste, see https://play.nim-lang.org/#ix=3Iko |
04:00:38 | FromDiscord | <geekrelief> (edit) "https://play.nim-lang.org/#ix=3Iko" => "https://paste.rs/DhG" |
04:01:26 | FromDiscord | <valerga> i wonder why the arch repos still have nim 1.4.8 hmm |
04:02:18 | FromDiscord | <valerga> `Last Updated: 2021-06-07 ` |
04:03:05 | FromDiscord | <valerga> hmm the maintaner of it maintains a ton of packages though |
04:03:10 | FromDiscord | <valerga> (edit) "maintaner" => "maintainer" |
04:03:19 | FromDiscord | <valerga> https://archlinux.org/packages/?packager=anthraxx |
04:06:02 | * | supakeen quit (Quit: WeeChat 3.3) |
04:06:31 | * | supakeen joined #nim |
04:18:23 | * | arkurious quit (Quit: Leaving) |
04:22:29 | * | rockcavera quit (Remote host closed the connection) |
04:31:16 | * | noeontheend joined #nim |
05:02:51 | * | PersonMcGuy joined #nim |
05:04:20 | PersonMcGuy | Hello everyone. Quick question. What exactly is the difference between waitFor and await? A lot of times I've used waitFor in non-async procs while being lazy, but I'm sure this is not how it was intended to be used |
05:06:19 | FromDiscord | <Rika> It is, it’s the only thing you can use in sync procs |
05:06:28 | FromDiscord | <Rika> You use await in async procs |
05:09:23 | PersonMcGuy | @Rika ah okay, so then is there any weird behavior if waitFor is used within an async proc? |
05:15:39 | FromDiscord | <Rika> Yes, you block |
05:15:53 | FromDiscord | <Rika> Effectively negating the use of async |
05:18:58 | PersonMcGuy | @Rika That makes sense. Thanks for the insight, I appreciate it |
05:19:31 | * | PersonMcGuy quit (Quit: Client closed) |
05:20:12 | FromDiscord | <Schelz> Does directx exist in nim ? |
05:24:39 | FromDiscord | <Rika> It can |
05:24:51 | FromDiscord | <Rika> I don’t know if someone has made a wrapper |
05:25:02 | FromDiscord | <impbox [ftsf]> what is directx even anyway? |
05:25:51 | FromDiscord | <impbox [ftsf]> wow, it's a lot of stuff |
05:25:57 | FromDiscord | <impbox [ftsf]> would be a lot of work to wrap manually i guess |
05:26:10 | FromDiscord | <impbox [ftsf]> i guess just wrap the bits you need |
05:26:26 | FromDiscord | <Rika> I just assumed he meant D3D |
05:27:06 | FromDiscord | <valerga> sent a code paste, see https://play.nim-lang.org/#ix=3IkE |
05:27:23 | FromDiscord | <valerga> how can I do that... or what's a better structure to hold [int, string] ? |
05:30:11 | FromDiscord | <valerga> i'll just make an object |
05:33:09 | FromDiscord | <impbox [ftsf]> what are you trying to do? |
05:34:28 | FromDiscord | <Elegantbeef> The relatiionship between the data is very important here |
05:34:57 | FromDiscord | <valerga> it an association of indexes (int) and strings |
05:38:09 | FromDiscord | <impbox [ftsf]> are you expecting all the indices to be filled out? |
05:38:13 | FromDiscord | <impbox [ftsf]> or random numbers to strings? |
05:38:38 | FromDiscord | <impbox [ftsf]> array[N,string] or seq[string] if the first |
05:38:47 | FromDiscord | <impbox [ftsf]> or Table[int,string] for the latter |
05:42:43 | FromDiscord | <valerga> i don't expect all indices, just some |
05:43:33 | FromDiscord | <valerga> object is cleaner to work with I think |
05:45:11 | FromDiscord | <impbox [ftsf]> what kind of operations will you be doing? |
05:45:26 | FromDiscord | <impbox [ftsf]> indexing will be slow if you're searching through the objects to find the correct one |
05:45:32 | FromDiscord | <impbox [ftsf]> that's where a table is nice |
05:50:12 | FromDiscord | <valerga> what im doing is havea seq of objects, then sort that seq by the object's index property |
05:50:17 | FromDiscord | <valerga> (edit) "havea" => "have a" |
05:57:24 | FromDiscord | <impbox [ftsf]> yep, you'd be better off using a table most likely |
05:57:42 | FromDiscord | <impbox [ftsf]> but depends what kind of operations you're doing most often |
05:58:03 | FromDiscord | <impbox [ftsf]> sorting and searching is generally slow |
06:13:26 | * | noeontheend quit (Ping timeout: 260 seconds) |
06:16:50 | FromDiscord | <valerga> but how do I iterate the table keys in a sorted manner? |
06:19:23 | FromDiscord | <valerga> oh OrderedTable |
06:25:32 | FromDiscord | <Professor Actual Factual> sent a code paste, see https://play.nim-lang.org/#ix=3IkP |
06:26:20 | FromDiscord | <Rika> Do you need compile date and time? |
06:27:54 | FromDiscord | <Elegantbeef> The compiler can be built with libffi |
06:32:05 | FromDiscord | <impbox [ftsf]> OrderedTable is not sorted, it is based on insertion order |
06:32:32 | FromDiscord | <Elegantbeef> It can be sorted though |
06:33:12 | FromDiscord | <impbox [ftsf]> or get the keys and sort them |
06:34:08 | FromDiscord | <Rika> Doesn’t it have a sort function |
06:34:57 | FromDiscord | <Professor Actual Factual> In reply to @Rika "Do you need compile": Dont need compile time, i just want a cimport function to work. Times.now was the first to come to mind but it could be anything |
06:36:56 | FromDiscord | <Elegantbeef> Like i said build the compiler yourself with `-d:nimHasLibffi` then you should be able to |
06:36:59 | FromDiscord | <Elegantbeef> https://github.com/nim-lang/Nim/pull/10150 for reference |
06:37:53 | FromDiscord | <Professor Actual Factual> In reply to @Elegantbeef "https://github.com/nim-lang/Nim/pull/10150 for refe": Thank you for the quick reply, will def look into this. |
06:39:02 | FromDiscord | <valerga> I'm hitting a limit using string.insert. would it be faster to concatenate manually? |
06:39:30 | FromDiscord | <Michal58> Some questions about tables: What is the equivalent of Python's defaultdict? |
06:39:41 | FromDiscord | <Elegantbeef> what does defaultDict do? |
06:40:35 | FromDiscord | <Elegantbeef> Is it just `Table[string, T]`? |
06:40:38 | FromDiscord | <Michal58> Why is there no dec for CountTable? |
06:41:57 | FromDiscord | <Elegantbeef> No clue but you can do `inc` with a negative |
06:42:16 | FromDiscord | <impbox [ftsf]> defaultdict i believe returns a specific value if you try to get an index that hasn't been set |
06:42:30 | FromDiscord | <impbox [ftsf]> you could do similar with `getOrDefault` |
06:42:36 | FromDiscord | <Elegantbeef> Yea |
06:44:24 | FromDiscord | <Michal58> In reply to @impbox "you could do similar": Wa afraid you'd say that |
06:44:35 | FromDiscord | <Elegantbeef> Why afraid? |
06:45:33 | FromDiscord | <impbox [ftsf]> you could make your own type that does it fairly trivially i think |
06:45:35 | FromDiscord | <Michal58> Since it's not that convenient |
06:45:57 | FromDiscord | <Elegantbeef> Sure but it's easy to alias or replicate |
06:47:29 | nrds | <Prestige99> Maybe an example is in order |
06:49:17 | FromDiscord | <Elegantbeef> https://play.nim-lang.org/#ix=3IkT |
06:49:22 | FromDiscord | <Elegantbeef> I can only write so fast my dear boy |
06:51:23 | FromDiscord | <impbox [ftsf]> https://play.nim-lang.org/#ix=3IkU |
06:51:31 | FromDiscord | <impbox [ftsf]> faster than me |
06:52:02 | FromDiscord | <impbox [ftsf]> even had time to add in `std/` |
06:52:18 | FromDiscord | <Elegantbeef> and `contains` |
06:55:45 | FromDiscord | <Elegantbeef> If the value was compile time known this could even be done with just a distinct |
06:56:29 | FromDiscord | <valerga> how can I get the last key in an OrderedTable? |
06:56:39 | FromDiscord | <valerga> seems keys is only an iterator |
06:57:20 | FromDiscord | <valerga> actually nvm I can do it without that |
07:01:09 | FromDiscord | <Michal58> "Paste removed malware"? 👮♂️ |
07:01:52 | FromDiscord | <Michal58> In reply to @Elegantbeef "https://play.nim-lang.org/#ix=3IkT": Yeah, I understand, thanks |
07:02:46 | FromDiscord | <Schelz> Is possible in nim to specify the type of a variable to return HANDLE ? |
07:03:27 | FromDiscord | <impbox [ftsf]> In reply to @Schelz "Is possible in nim": I don't understand the question... you can specify the type of variable a function returns |
07:03:48 | FromDiscord | <impbox [ftsf]> `proc procName(arg: ArgType): ReturnType =` |
07:03:51 | FromDiscord | <Schelz> If its possible to get the HANDLE of a process by its name |
07:04:45 | FromDiscord | <impbox [ftsf]> are you talking about a Windows thing? |
07:04:54 | FromDiscord | <Schelz> Yes :)) |
07:05:29 | FromDiscord | <impbox [ftsf]> if it's exposed by the windows api then probably |
07:05:42 | FromDiscord | <valerga> sorting the OrderedTable is taking seconds... |
07:06:05 | FromDiscord | <impbox [ftsf]> valergra, just sort the keys |
07:06:09 | FromDiscord | <impbox [ftsf]> how many keys do you have? |
07:06:28 | FromDiscord | <valerga> thousands |
07:06:49 | FromDiscord | <valerga> I'm doing `ins.sort(system.cmp, order = SortOrder.Ascending)` |
07:07:07 | FromDiscord | <impbox [ftsf]> if you have a lot of keys probably just use a seq[string] |
07:07:15 | FromDiscord | <impbox [ftsf]> that way you don't need to sort |
07:07:47 | FromDiscord | <impbox [ftsf]> though i'm not sure why you need to sort |
07:07:53 | FromDiscord | <impbox [ftsf]> what are you actually trying to do? |
07:08:11 | FromDiscord | <valerga> im concatenating a string with some replacements. i need the indexes to be ordered to increment them properly |
07:09:12 | FromDiscord | <Michal58> CountTable is basically an implementation of multiset so there should be the basic operations - intersection, union, difference available. merge implements (even tho only in-place) union, but I don't see the rest? |
07:09:14 | FromDiscord | <valerga> sent a code paste, see https://play.nim-lang.org/#ix=3IkZ |
07:09:20 | FromDiscord | <impbox [ftsf]> @Schelz https://nim-lang.org/docs/winlean.html#getCurrentProcess |
07:09:39 | FromDiscord | <Elegantbeef> Michal i can only say be the change you want in the stdlib |
07:11:34 | FromDiscord | <impbox [ftsf]> In reply to @valerga "im concatenating a string": is that the only operation you're doing? |
07:11:44 | FromDiscord | <impbox [ftsf]> if so, use a seq |
07:12:05 | FromDiscord | <impbox [ftsf]> but i don't understand your usecase |
07:12:42 | FromDiscord | <Michal58> In reply to @Elegantbeef "Michal i can only": I don't understand. |
07:13:11 | FromDiscord | <impbox [ftsf]> if you need a feature that doesn't exist yet, feel free to add it. because otherwise probably no one else has needed it yet |
07:13:39 | FromDiscord | <impbox [ftsf]> or it may exist in another library, check nimble |
07:13:54 | FromDiscord | <Michal58> Yeah I just wanted to check that I'm not missing anything |
07:14:07 | FromDiscord | <impbox [ftsf]> well there are sets in nim |
07:14:23 | FromDiscord | <impbox [ftsf]> which have set operations |
07:15:09 | FromDiscord | <impbox [ftsf]> but CountTable is not a set, so I'm not sure why it would have set operations, but I'm not an expert on CountTables. |
07:15:27 | FromDiscord | <Elegantbeef> Me either it seems they're all weird operations for count table |
07:16:19 | FromDiscord | <Elegantbeef> Is `intersection(a, b) == intersection(b, a)`? |
07:16:43 | FromDiscord | <Hamid_Bluri> hey, i found `--checks:off` breaks Tables module with my code |
07:16:53 | FromDiscord | <Hamid_Bluri> (edit) "Tables" => "`tables`" |
07:16:54 | FromDiscord | <Elegantbeef> Cause i very much see them not being commutative |
07:17:13 | FromDiscord | <Elegantbeef> Does the code have runtime errors without checks? |
07:17:23 | FromDiscord | <Elegantbeef> Well with checks 😀 |
07:18:02 | FromDiscord | <Hamid_Bluri> no it does not have any checks |
07:18:03 | FromDiscord | <Hamid_Bluri> https://github.com/hamidb80/problem-solving/blob/main/advent-of-code/2021/d14/main.nim#L48 |
07:19:02 | FromDiscord | <Elegantbeef> So running with checks it works fine? |
07:19:08 | FromDiscord | <Hamid_Bluri> yep |
07:19:38 | FromDiscord | <Hamid_Bluri> sent a code paste, see https://play.nim-lang.org/#ix=3Il2 |
07:19:43 | FromDiscord | <Elegantbeef> That's with checks |
07:19:56 | FromDiscord | <Hamid_Bluri> no its `--checks:off` |
07:20:08 | FromDiscord | <Elegantbeef> Are you sure? |
07:20:09 | FromDiscord | <Hamid_Bluri> with checks it works fine |
07:20:35 | FromDiscord | <Hamid_Bluri> yes |
07:20:41 | FromDiscord | <Hamid_Bluri> you can check it your self |
07:20:54 | FromDiscord | <Hamid_Bluri> it doesn't have any dependencies |
07:21:00 | FromDiscord | <Hamid_Bluri> nim 1.6.0 |
07:21:11 | FromDiscord | <Hamid_Bluri> (edit) "your self" => "by yourself" |
07:21:55 | FromDiscord | <Elegantbeef> Both dont run |
07:22:19 | FromDiscord | <Hamid_Bluri> with what error? |
07:22:41 | FromDiscord | <Elegantbeef> Index error with checks on and without the same error as you've got |
07:23:17 | FromDiscord | <Hamid_Bluri> how can i remove compile cache? |
07:23:23 | FromDiscord | <Elegantbeef> do `-f` |
07:23:59 | FromDiscord | <Hamid_Bluri> https://media.discordapp.net/attachments/371759389889003532/920214518573973534/unknown.png |
07:24:04 | FromDiscord | <Hamid_Bluri> it works fine |
07:24:09 | FromDiscord | <Elegantbeef> Not here |
07:24:22 | FromDiscord | <Hamid_Bluri> where then? |
07:24:58 | FromDiscord | <Elegantbeef> sent a code paste, see https://play.nim-lang.org/#ix=3Il3 |
07:25:27 | FromDiscord | <Elegantbeef> sent a code paste, see https://play.nim-lang.org/#ix=3Il4 |
07:25:42 | FromDiscord | <Hamid_Bluri> windows stores next line as `\r\n` |
07:25:59 | FromDiscord | <Elegantbeef> You know there is a splitlines proc? |
07:27:39 | FromDiscord | <Hamid_Bluri> yeah but i wanted to split where there are 2 next lines |
07:27:53 | FromDiscord | <Hamid_Bluri> line 29 |
07:28:06 | FromDiscord | <Elegantbeef> Anywho yea i dont know what to say |
07:30:36 | FromDiscord | <Michal58> In reply to @impbox "but CountTable is not": Well CountTable (multiset) is a generalisation of a set. In set every element is present either zero times or once. In multiset each item can be present any (natural) number of times. So those operations are also just generalisations. Intersection and union are commutative, while difference is not. |
07:31:33 | FromDiscord | <Michal58> @ElegantBeef |
07:31:42 | FromDiscord | <Hamid_Bluri> https://play.nim-lang.org/#ix=3Il5 |
07:40:08 | FromDiscord | <Schelz> In reply to @impbox "<@!354911589029380097> https://nim-lang.org/docs/wi": Inst there something to get process by id or name ? |
07:40:50 | FromDiscord | <impbox [ftsf]> Process ID is not the same as HANDLE |
07:42:02 | FromDiscord | <Schelz> Ik but rather getCurrentProcess |
07:48:34 | * | PMunch joined #nim |
07:49:36 | * | jjido joined #nim |
07:50:02 | * | PMunch quit (Client Quit) |
07:52:17 | * | PMunch joined #nim |
07:52:43 | * | PMunch quit (Remote host closed the connection) |
07:53:42 | * | PMunch joined #nim |
08:04:37 | FromDiscord | <impbox [ftsf]> Ooh you want a HANDLE of another windows process, I dunno, you should really check the Microsoft docs |
08:05:02 | FromDiscord | <impbox [ftsf]> Then use the corresponding function from the nim windows wrapper |
08:19:28 | FromDiscord | <Schelz> The nim windows api wrapper its import window ? |
08:19:52 | FromDiscord | <enthus1ast> import winim |
08:19:58 | FromDiscord | <enthus1ast> ^ this is the big one |
08:20:12 | FromDiscord | <Schelz> I found now thx |
08:20:12 | FromDiscord | <enthus1ast> or most complete one |
08:22:19 | FromDiscord | <enthus1ast> to get a handle to an process you must call OpenProcess |
08:26:51 | FromDiscord | <Hamid_Bluri> In reply to @hamidb80 "https://play.nim-lang.org/#ix=3Il5": why did I think `assert` discards the following statement 😕 |
08:27:34 | FromDiscord | <Hamid_Bluri> sorry beef |
08:27:40 | FromDiscord | <Elegantbeef> You mean you though assert turns into discard without checks? |
08:27:47 | FromDiscord | <Hamid_Bluri> yep |
08:28:04 | FromDiscord | <Elegantbeef> Nah assert is basically for documenting what values should be |
08:34:44 | * | krux02 joined #nim |
08:37:15 | * | krux02 quit (Remote host closed the connection) |
08:41:52 | PMunch | Hmm, does anyone have a packed bool sequence implementation? |
08:44:41 | FromDiscord | <enthus1ast> this maybe? https://github.com/treeform/bitty |
08:45:06 | FromDiscord | <enthus1ast> but, in my tests, a seq[bool] is way faster |
08:45:24 | PMunch | Yeah I just got mine working and it's way slower |
08:46:13 | FromDiscord | <enthus1ast> why do you need it? |
08:46:20 | FromDiscord | <enthus1ast> or for what? |
08:46:27 | FromDiscord | <Rika> why is the BitArray a ref? |
08:46:45 | FromDiscord | <Elegantbeef> Probably to reduce copies |
08:47:24 | FromDiscord | <Rika> idk imo that should be to the discretion of the user |
08:47:52 | FromDiscord | <Elegantbeef> Sure but a lot of the stuff like this is made specifically for their usages |
08:51:13 | PMunch | Oh wow, yeah that was an order of magnitude slower than my custom solution, which itself was an order of magnitude slower than seq[bool] |
08:52:55 | * | jjido quit (Quit: My MacBook Air has gone to sleep. ZZZzzz…) |
08:59:37 | FromDiscord | <Elegantbeef> What's your indexing logic? |
09:00:19 | FromDiscord | <enthus1ast> i mean do packed bitsets even have the potential to be faster than array (or preallocated seq) ? |
09:00:27 | FromDiscord | <enthus1ast> bitarrays i mean |
09:01:19 | FromDiscord | <Elegantbeef> They probably remove a bit of speed |
09:04:27 | FromDiscord | <enthus1ast> what i can imagine is that they have a speed bonus when reading and unrolled 8 times |
09:10:38 | * | jmdaemon joined #nim |
09:11:57 | NimEventer | New thread by Araq: Nim devel now supports Nimble 0.14, see https://forum.nim-lang.org/t/8710 |
09:15:48 | * | jmd joined #nim |
09:16:07 | * | jmdaemon quit (Quit: WeeChat 3.3) |
09:24:06 | FromDiscord | <hieu.nt> hi guys |
09:24:08 | FromDiscord | <hieu.nt> sent a code paste, see https://play.nim-lang.org/#ix=3Ilw |
09:24:32 | FromDiscord | <hieu.nt> when i try the code above to delete file from google drive |
09:24:35 | FromDiscord | <hieu.nt> i got error |
09:24:39 | FromDiscord | <Rika> what error |
09:25:08 | FromDiscord | <hieu.nt> no handles or timers registered in dispatcher |
09:25:15 | FromDiscord | <Rika> how are you running it |
09:25:48 | FromDiscord | <enthus1ast> this happens when you have a runForever and the only async proc returns, then there are none left |
09:26:05 | FromDiscord | <hieu.nt> let resp = await conn.delete(url) |
09:26:13 | FromDiscord | <hieu.nt> echo resp |
09:26:38 | FromDiscord | <hieu.nt> then i wrap it in waitfor deleteDriveFile proc |
09:26:55 | FromDiscord | <hieu.nt> it throws error |
09:27:03 | FromDiscord | <hieu.nt> but the file still got deleted in google drive |
09:27:04 | PMunch | Do you have a complete snippet we can look at? |
09:27:24 | PMunch | Yeah, that error just means that the pool of asynchronous tasks is empty when the dispatcher goes to find something to run |
09:27:53 | PMunch | It's only fired by runForever I believe |
09:28:33 | * | jmd quit (Quit: ZNC 1.8.2 - https://znc.in) |
09:28:54 | FromDiscord | <hieu.nt> sent a long message, see http://ix.io/3Ilx |
09:29:03 | PMunch | Aah, apparently it's from everything which happens to call runOnce, which is pretty much everything in async |
09:29:06 | FromDiscord | <hieu.nt> (edit) "long message," => "code paste," | "http://ix.io/3Ilx" => "https://play.nim-lang.org/#ix=3Ily" |
09:29:46 | * | jmdaemon joined #nim |
09:30:14 | FromDiscord | <hieu.nt> the issue is: per google api for deleting file "If successful, this method returns an empty response body." |
09:30:16 | PMunch | That's still not a complete snippet |
09:30:34 | PMunch | I don't think that should be an issue |
09:30:35 | FromDiscord | <hieu.nt> only then it throws an error if it successfully delete a file |
09:30:54 | FromDiscord | <hieu.nt> it it fails to delete a file, let resultStr = await resp.bodyStream.readAll() |
09:30:59 | FromDiscord | <hieu.nt> then this run and there is no error |
09:31:16 | FromDiscord | <enthus1ast> we need the full snipped that we see how you call the connect\_and\_delete\_all\_files proc |
09:31:38 | PMunch | Hmm, I guess maybe resp.bodyStream.readAll() doesn't register anything if the bodyStream doesn't have any data, and then await errors out that nothing is register |
09:31:42 | PMunch | But that seems odd |
09:32:17 | FromDiscord | <hieu.nt> the way i call it is: |
09:32:33 | FromDiscord | <hieu.nt> when isMainModule: |
09:32:44 | FromDiscord | <hieu.nt> waitfor connect_and_delete_all_files() |
09:34:20 | PMunch | Where do you get `readAll` from? |
09:34:27 | PMunch | It's not defined in asyncstreams.. |
09:35:30 | FromDiscord | <hieu.nt> import asyncdispatch, cgi, httpclient, json, jwt, os, streams, strformat, times, strutils |
09:35:34 | FromDiscord | <hieu.nt> full import |
09:35:45 | FromDiscord | <hieu.nt> (edit) "import asyncdispatch, cgi, httpclient, json, jwt, os, streams, strformat, times, strutils" => "sent a code paste, see https://play.nim-lang.org/#ix=" |
09:36:26 | FromDiscord | <hieu.nt> here is another snippet to upload to google drive, its almost the same |
09:36:50 | FromDiscord | <hieu.nt> sent a code paste, see https://play.nim-lang.org/#ix=3Ilz |
09:37:03 | FromDiscord | <hieu.nt> this one run successfully, never have any error |
09:37:17 | PMunch | Hmm, I think this might be a bug with FutureStream when no data is written to the stream |
09:38:01 | PMunch | Could you try `deleteContent` instead of delete? |
09:38:32 | FromDiscord | <hieu.nt> not sure if it works for google drive, let me try |
09:38:55 | * | greyrat joined #nim |
09:39:18 | * | rwb joined #nim |
09:39:21 | FromDiscord | <hieu.nt> but i think you might be right about error with FutureStream |
09:39:38 | FromDiscord | <hieu.nt> sent a code paste, see https://play.nim-lang.org/#ix=3IlA |
09:39:41 | * | jmdaemon quit (Quit: ZNC 1.8.2 - https://znc.in) |
09:39:47 | FromDiscord | <hieu.nt> because the code works when it has error deleting file |
09:40:10 | FromDiscord | <hieu.nt> for example resp.status returns 404 No Permission or something like that |
09:40:46 | FromDiscord | <hieu.nt> but when it succeeds, it throws "no handles or timers registered ..." |
09:41:01 | FromDiscord | <hieu.nt> because there is no body response from google api |
09:43:10 | PMunch | Hmm, it's not immediately obvious though where the error is |
09:43:13 | * | jmdaemon joined #nim |
09:43:23 | FromDiscord | <enthus1ast> could it be that the parseJson excepts but it is not catched and leaks to the waitFor? |
09:43:38 | FromDiscord | <enthus1ast> not sure what happens then |
09:44:07 | PMunch | I don't think so |
09:44:15 | PMunch | I mean this is where the error is raised: https://github.com/nim-lang/Nim/blob/version-1-6/lib/pure/asyncdispatch.nim#L360-L362 |
09:44:19 | FromDiscord | <enthus1ast> i would try to wrap all parseJson in an try except anyhow |
09:44:35 | PMunch | And that is called from various parts of the async libraries |
09:46:41 | FromDiscord | <hieu.nt> In reply to @enthus1ast "i would try to": i tried that. It doesnt fall into the try except block |
09:46:44 | * | stkrdknmibalz quit (*.net *.split) |
09:46:44 | * | nrds quit (*.net *.split) |
09:46:44 | * | cornfeedhobo quit (*.net *.split) |
09:46:44 | * | nisstyre quit (*.net *.split) |
09:46:44 | * | greyrat_ quit (*.net *.split) |
09:46:44 | * | rb quit (*.net *.split) |
09:46:57 | FromDiscord | <hieu.nt> it throws error before that |
09:47:40 | FromDiscord | <hieu.nt> anyhow, i search around and see there are some workarounds with adding dummy timer |
09:47:57 | FromDiscord | <hieu.nt> any idea how can do that ? |
09:48:27 | PMunch | I think you rather want to check the error like you did |
09:48:41 | PMunch | Or even read the Content-Length header, and if it's 0 just don't call readAll |
09:49:24 | FromDiscord | <enthus1ast> sent a code paste, see https://play.nim-lang.org/#ix=3IlD |
09:49:36 | FromDiscord | <hieu.nt> let resp = await client.delete(url) |
09:50:11 | FromDiscord | <hieu.nt> it dies before it gets to await |
09:50:30 | FromDiscord | <hieu.nt> so i cannot read anything from the resp |
09:51:20 | FromDiscord | <hieu.nt> i only call readAll() it fails |
09:51:22 | FromDiscord | <hieu.nt> if(resp.status != success_status): |
09:51:52 | * | nisstyre joined #nim |
09:51:59 | PMunch | Wait, it fails already at the delete call? |
09:52:13 | FromDiscord | <hieu.nt> yes |
09:52:30 | * | Colt quit (Remote host closed the connection) |
09:52:48 | PMunch | So if you do `let deleteFut = client.delete(url); let resp = await deleteFut` it fails on the second line? |
09:52:57 | * | Colt joined #nim |
09:53:01 | FromDiscord | <hieu.nt> the echo doesnt print |
09:53:01 | FromDiscord | <hieu.nt> sent a code paste, see https://play.nim-lang.org/#ix=3IlE |
09:53:16 | FromDiscord | <hieu.nt> error is thrown |
09:54:03 | PMunch | Hmm, can you boil this down to a minimal example? |
09:54:54 | PMunch | Preferably not actually calling the Google APIs, but rather trying to call a small Jester API that behaves the same way |
09:55:31 | * | jmdaemon quit (Quit: ZNC 1.8.2 - https://znc.in) |
09:57:48 | * | cornfeedhobo joined #nim |
09:58:51 | FromDiscord | <hieu.nt> wait my bad, i think might know what the errors are from |
09:58:52 | FromDiscord | <hieu.nt> let resultStr = await resp.bodyStream.readAll() |
09:59:02 | FromDiscord | <hieu.nt> this line, when bodyStream is empty |
09:59:10 | FromDiscord | <hieu.nt> it throws error |
09:59:43 | FromDiscord | <hieu.nt> there are some other error status from Google when it returns an empty response body. |
10:00:00 | FromDiscord | <hieu.nt> i think i just have to make a better nulll/empty check |
10:00:08 | FromDiscord | <Elegantbeef> Should you use `finished` or `failed` on the body stream? |
10:01:18 | FromDiscord | <hieu.nt> In reply to @Elegantbeef "Should you use `finished`": how can i do it ? still pretty new to Nim |
10:02:16 | PMunch | `readAll` is basically a loop which calls `read` which in turn should call `finished` |
10:02:32 | PMunch | That's why I said it wasn't obvious where the error came from |
10:03:21 | PMunch | But yeah, the error coming from `await resp.bodyStream.readAll()` was the only thing I could get to make sense |
10:03:29 | PMunch | But it's not obvious why this errors out |
10:04:11 | FromDiscord | <Elegantbeef> Well `.bodyStream` doesnt run any code so awaiting it probably kicks the dispatcher in and as there are no async procs waiting it poops the bed? |
10:04:19 | FromDiscord | <Elegantbeef> You know async better than i so i dont know |
10:04:30 | FromDiscord | <Elegantbeef> Just a guess based off the code and error |
10:04:51 | PMunch | But he awaits readAll, not bodyStream |
10:05:12 | FromDiscord | <Elegantbeef> Ah right |
10:07:25 | FromDiscord | <enthus1ast> just tried it, it reads empty body just fine |
10:07:40 | FromDiscord | <enthus1ast> sent a code paste, see https://play.nim-lang.org/#ix=3IlK |
10:07:54 | FromDiscord | <enthus1ast> sent a code paste, see https://play.nim-lang.org/#ix=3IlL |
10:09:38 | FromDiscord | <hieu.nt> so specifically, it fails when the status is 204 No Content |
10:10:19 | FromDiscord | <hieu.nt> i mean it throws the "no handles or timers registered" |
10:10:35 | FromDiscord | <hieu.nt> i remove the whole resp.bodyStream.readAll() |
10:10:45 | FromDiscord | <hieu.nt> and it doesnt throw error anymore |
10:12:28 | PMunch | Yeah I think I found the error |
10:12:33 | FromDiscord | <hieu.nt> "Although this status code is intended to describe a response with no body, servers may erroneously include data following the headers." From firefox |
10:12:34 | PMunch | Give me a sec to check it out |
10:12:47 | PMunch | That shouldn't be an issue |
10:13:35 | FromDiscord | <enthus1ast> it seems to be though |
10:14:02 | FromDiscord | <enthus1ast> returning Http204 makes the client stuck in my example |
10:14:57 | FromDiscord | <enthus1ast> so this\:↵ resp Http204, "" |
10:15:29 | PMunch | @enthus1ast, yeah and if you turn it into a proc with {.async.} and replace your waitFors with await then you get the same error |
10:16:15 | FromDiscord | <enthus1ast> yeah |
10:16:45 | FromDiscord | <enthus1ast> so then @hieu.nt do a↵`if resp.status == Http200:` |
10:17:24 | PMunch | Then it should work |
10:19:08 | * | xet7 joined #nim |
10:20:28 | PMunch | I believe the error is here: https://github.com/nim-lang/Nim/blob/version-1-6/lib/pure/httpclient.nim#L861 |
10:20:57 | PMunch | Or rather reading from a stream with Http204 is an error, but it should be a better error than just making asyncdispatch freak out.. |
10:24:08 | FromDiscord | <hieu.nt> thanks guys really appreciate all the help |
10:38:35 | FromDiscord | <dom96> Please be sure this is reported on GitHub 🙂 |
11:20:43 | NimEventer | New thread by Xigoi: How would this endianness check be translated to Nim?, see https://forum.nim-lang.org/t/8711 |
11:48:42 | FromDiscord | <valerga> any idea why this code is still running after minutes of execution? https://play.nim-lang.org/#ix=3IlW |
11:48:48 | FromDiscord | <valerga> what's the bottleneck? |
11:49:44 | FromDiscord | <impbox [ftsf]> enable profiler |
11:50:35 | FromDiscord | <impbox [ftsf]> https://nim-lang.org/docs/estp.html |
11:50:53 | PMunch | So hard to help people without getting AoC spoilers :( |
11:51:42 | FromDiscord | <valerga> oh :d |
11:52:04 | FromDiscord | <impbox [ftsf]> oh yeah, if you're asking questions about aoc stuff, do it in the aoc channel and use spoiler tags |
11:52:26 | PMunch | Aaah, that's what people are doing in the AoC channel? |
11:52:34 | PMunch | Those don't really come through to IRC :P |
11:53:19 | FromDiscord | <impbox [ftsf]> well I guess the IRC client doesn't render them the same? |
11:53:46 | PMunch | It shows them as two pipes :P |
11:54:06 | FromDiscord | <impbox [ftsf]> yeah, i'm pretty sure that's what people are typing to do them |
11:54:20 | FromDiscord | <impbox [ftsf]> client would just need to render it as markdown or whatever |
11:57:12 | FromDiscord | <valerga> will the profiler work if I stop in mid execution? |
11:58:34 | PMunch | @dom96, @hieu.nt, issue and PR to fix it: https://github.com/nim-lang/Nim/issues/19253 |
12:06:01 | * | supakeen quit (Quit: WeeChat 3.3) |
12:06:31 | * | supakeen joined #nim |
12:16:02 | FromDiscord | <dom96> cool, thx |
12:16:58 | FromDiscord | <Forest> Anyone know how I'd implement a dynamic programming language in Nim? Any tools i can use? |
12:17:44 | PMunch | Not quite sure what you mean |
12:17:54 | PMunch | If you want to write your own language in nim then it's just to start writing |
12:18:13 | PMunch | Nothing special about writing a language compared to writing any other pgroam |
12:19:38 | FromDiscord | <Forest> I'm trying to reimplement python, and i have no idea where to start, this is a brand new field to me and I'm just confused lol, i know i need to work on a lexer but don't know how to begin implementing one in Nim |
12:20:25 | FromDiscord | <enthus1ast> you could have a look at\:↵https://nim-lang.org/docs/lexbase.html |
12:20:31 | FromDiscord | <enthus1ast> and also nimja's lexer |
12:20:40 | FromDiscord | <Forest> How did that not come up in google- thanks! |
12:20:49 | FromDiscord | <enthus1ast> https://github.com/enthus1ast/nimja/blob/master/src/nimja/lexer.nim |
12:21:06 | FromDiscord | <Forest> Nimja? |
12:21:47 | FromDiscord | <Forest> Thanks! |
12:22:52 | FromDiscord | <enthus1ast> there are also a few others more complete langs written in nim |
12:24:01 | FromDiscord | <enthus1ast> [haxscramper](https://matrix.to/#/@haxscramper:matrix.org)\: has a nice gist where he has collected links for nim language development |
12:24:03 | FromDiscord | <enthus1ast> https://gist.github.com/haxscramper/3562fa8fee4726d7a30a013a37977df6 |
12:27:12 | FromDiscord | <Forest> In reply to @enthus1ast "there are also a": Ooh neat! |
12:31:57 | FromDiscord | <Forest> htsparse looks really neat and useful 👀 |
12:33:25 | FromDiscord | <enthus1ast> i would recommend that you write your own stuff first (does not have to be great or complicated) so that you get a feeling for lexing and parsing stuff |
12:33:55 | FromDiscord | <enthus1ast> eg write a toy assembler and a virtual machine |
12:34:37 | * | jjido joined #nim |
12:34:38 | * | jjido quit (Client Quit) |
12:34:44 | FromDiscord | <enthus1ast> super easy parsing and lexing but requires roughly the same skills as with a full lang |
12:36:29 | FromDiscord | <Forest> Fair enough aha |
13:01:42 | * | src joined #nim |
13:05:34 | PMunch | Hmm, is it possible to create a type which is different across modules? Might sound weird but I was thinking of TaintedString and came up with an idea for CleanString. CleanString would be a `static string or currentModule.EscapedString`, so string literals and other compile-time strings are fine, but if you want to use a runtime string you need to escape it. But I only want the `escape` procedure for module X to work for procedures accepting a CleanString in |
13:05:34 | PMunch | module X and not procedures accepting a CleanString in module Y. |
13:06:46 | PMunch | So essentially `X.escape(input: string): X.EscapedString` and `X.someProc(arg: CleanString)` there I want CleanString to be `static string or X.EscapedString` |
13:07:32 | PMunch | But I want to define CleanString generically |
13:22:40 | FromDiscord | <vindaar> use a `concept` that requires the `escape` proc and returns some type defined in the module (which then still must use a different name of course). You can call the concept `CleanString` though and you get the usage you want I think |
13:22:55 | * | noeontheend joined #nim |
13:24:11 | PMunch | I thought about that, but you I can't think of a way to write a concept that allows `escape` to take a string and return a module-specific type |
13:27:19 | * | noeontheend quit (Ping timeout: 252 seconds) |
13:29:04 | * | rockcavera joined #nim |
13:29:05 | * | rockcavera quit (Changing host) |
13:29:05 | * | rockcavera joined #nim |
13:36:59 | FromDiscord | <vindaar> sent a code paste, see https://play.nim-lang.org/#ix=3ImS |
13:40:46 | PMunch | Aah, yeah that works |
13:43:56 | * | arkurious joined #nim |
13:45:31 | PMunch | Yup, seems to work fine: http://ix.io/3ImV/ |
13:46:22 | FromDiscord | <vindaar> nice! |
13:57:16 | * | lumo_e joined #nim |
14:03:15 | PMunch | If you couldn't tell I'm looking at how TaintedString failed, and what other alternatives we could use, spurred on by the Log4Shell exploit |
14:03:25 | PMunch | After all it's basically just SQL-injection all over again |
14:03:29 | PMunch | Just 10x worse :P |
14:04:49 | PMunch | @dom96, I think that's the fastest bug discovery -> merged to devel time I've ever had :P |
14:05:45 | FromDiscord | <dom96> 😄 |
14:05:54 | FromDiscord | <dom96> Glad to hear it 🙂 |
14:09:07 | * | rockcavera quit (Remote host closed the connection) |
14:13:52 | * | lumo_e quit (Quit: Quit) |
14:32:30 | * | xet7 quit (Remote host closed the connection) |
14:42:10 | FromDiscord | <retkid> so uh |
14:42:17 | FromDiscord | <retkid> i wanted to compile only a single |
14:42:19 | FromDiscord | <retkid> (edit) "single" => "single..." |
14:42:24 | FromDiscord | <retkid> (edit) "single..." => "single proc" |
14:42:31 | FromDiscord | <retkid> so i deleted all the other code |
14:42:38 | FromDiscord | <retkid> well that was a week ago |
14:42:41 | PMunch | Please try to avoid editing your messages too much.. |
14:42:58 | PMunch | Editing creates a new message on platforms that don't support edits |
14:43:14 | FromDiscord | <retkid> that is unfortunate, sorry |
14:43:20 | PMunch | No worries :) |
14:43:38 | FromDiscord | <retkid> but yea i lost 500 lines of code |
14:44:09 | PMunch | You didn't have it in a Git repo? |
14:44:22 | FromDiscord | <retkid> i write my code locally |
14:44:32 | PMunch | You can have local Git repos |
14:44:37 | PMunch | Without a remote |
14:44:50 | PMunch | It's a great way to avoid losing 500 lines of code |
14:44:59 | FromDiscord | <retkid> its fine the code was bad anyway |
14:45:04 | FromDiscord | <retkid> but im not rewriting i |
14:45:06 | FromDiscord | <retkid> (edit) "i" => "it" |
14:45:22 | FromDiscord | <retkid> so i guess I'll just suck a fat chode |
14:46:22 | PMunch | Again, git is your friend :) |
14:46:59 | PMunch | It also means you can roll back stuff, create branches, bisect, and just generally enjoy all the features git provides |
14:47:18 | PMunch | (And if you get used to it you get really good at using Git, which is always handy) |
14:48:40 | FromDiscord | <retkid> wait a second |
14:48:44 | FromDiscord | <retkid> i have a backup |
14:49:22 | FromDiscord | <retkid> I might setup a master git just in my dev folder |
14:49:47 | FromDiscord | <retkid> so i only have to do it once |
14:55:22 | * | nrds joined #nim |
15:05:39 | FromDiscord | <planetis> which syntax looks better? `for i in traverse(x, {"emp_data": JArray, "employee": JObject, /"name": JString}):` or `for i in traverse(x, (JArray, "emp_data") (JObject, "employee") / (JString, "name")):` ? |
15:06:18 | * | PMunch quit (Quit: Leaving) |
15:08:21 | FromDiscord | <planetis> which syntax looks better? `for i in traverse(x, (JArray, "emp_data") (JObject, "employee") / (JString, "name")):` or `for i in traverse(x, {"emp_data": JArray, "employee": JObject, /"name": JString}):` |
15:21:37 | FromDiscord | <Solitude> yes |
15:26:35 | FromDiscord | <IsaacPaul> use triple back ticks please lol |
15:28:39 | FromDiscord | <IsaacPaul> The first one. In the second the quote looks like it's escaped and could cause confusion.. Honest it is all a bit confusing because you're applying math operations to data and strings, so It all doesn't make much sense. |
15:44:37 | FromDiscord | <planetis> you have a point, supposedly ["emp\_data", "employee", "name"] is a path to a json node the / between means direct child and \ it can be any. |
15:45:05 | FromDiscord | <planetis> to be sure, you mean the one with {} is better? |
15:45:56 | FromDiscord | <planetis> I am also trying to encode that "emp\_data" field is of kind JArray and stuff |
15:49:25 | FromDiscord | <hmmm> yo nimlets how can I redirect an echo to a file |
15:50:07 | FromDiscord | <planetis> echo is for debug use the write procs |
15:51:01 | FromDiscord | <hmmm> 😦 |
15:51:44 | FromDiscord | <hmmm> and if I wanted to redirect an echo to a var? |
15:52:40 | FromDiscord | <planetis> what? you pbl have in mind `cin >> a` ? |
16:12:48 | FromDiscord | <Fish-Face> I have a type alias for an array type and want to re-initialise the variable. Is there a simple way to do this? existingVariable = MyArrayType() does not work as it would if it were an object type |
16:25:36 | FromDiscord | <planetis> maybe `a = default()` works |
16:29:44 | FromDiscord | <IsaacPaul> In reply to @hmmm "yo nimlets how can": echo goes to `stdout` I believe you can redirect it to a file: https://stackoverflow.com/questions/29154056/redirect-stdout-to-a-file |
16:30:04 | FromDiscord | <IsaacPaul> There maybe a nim / easier way tho |
16:31:37 | FromDiscord | <hmmm> oh I was looking for something like that do we have a freopen() in nim? |
16:33:28 | FromDiscord | <IsaacPaul> sent a code paste, see https://play.nim-lang.org/#ix=3IoM |
16:36:03 | FromDiscord | <IsaacPaul> It always helps to just have the nim source code open lol |
16:36:27 | * | rockcavera joined #nim |
16:36:27 | * | rockcavera quit (Changing host) |
16:36:27 | * | rockcavera joined #nim |
16:37:59 | FromDiscord | <planetis> do you just meant to do `./myprogram > output.txt` ? |
16:40:33 | FromDiscord | <hmmm> nay I have a blackbox library that spits in echo or stdout and I wanted to capture the spit 🤔 |
16:53:54 | FromDiscord | <eyecon> What is the most idiomatic way to convert from a string o a built-in `set` of `char`s? |
16:54:32 | FromDiscord | <eyecon> I.e. `"abcdabc".convert() == {'a','b','c','d'}` |
16:54:53 | FromDiscord | <eyecon> (edit) "o" => "into" |
16:58:22 | FromDiscord | <Hamid_Bluri> In reply to @eyecon "I.e. `"abcdabc".convert() == {'a','b','c','d'}`": https://nim-lang.org/docs/setutils.html#toSet.t%2Cuntyped |
16:58:58 | FromDiscord | <eyecon> Ah, setutils, good to know, thanks a lot @Hamid_Bluri |
16:59:28 | FromDiscord | <Hamid_Bluri> actually thanks to pmunch 😄 |
17:02:45 | FromDiscord | <Hamid_Bluri> since when we can write `13u8` instead of `13'u8` ? |
17:05:16 | FromDiscord | <Hamid_Bluri> where is github page of https://nim-lang.org/docs/manual.html |
17:05:18 | FromDiscord | <Hamid_Bluri> ? |
17:05:29 | FromDiscord | <Hamid_Bluri> (edit) "page" => "repo" |
17:16:41 | FromDiscord | <konsumlamm> `13u8` worked since before `13'u8` iirc |
17:17:02 | FromDiscord | <konsumlamm> however `13'u8` is more consistent with user defined literals |
17:17:39 | FromDiscord | <konsumlamm> In reply to @hamidb80 "where is github repo": there's literally a source link at the top |
17:40:39 | * | fputs3 joined #nim |
17:42:09 | * | fputs quit (Ping timeout: 252 seconds) |
17:42:09 | * | fputs3 is now known as fputs |
17:47:41 | FromDiscord | <retkid> so what if instead of generating JS manually, it creates a map of the nim compiled code to its c functions that see which c functions are called by JS and then approximates it to the JS |
17:47:48 | FromDiscord | <retkid> hopefully that makes sense |
17:48:02 | FromDiscord | <retkid> go to JS via their common link |
17:48:45 | FromDiscord | <retkid> IE nim rand goes to C rand and so does JS rand so does JS rand, so then you use the function which goes to the same function you do |
17:49:05 | FromDiscord | <retkid> ((idk if nim goes to C rand im just thinking of an example)) |
18:30:10 | * | xet7 joined #nim |
19:05:43 | FromDiscord | <Michal58> In reply to @konsumlamm "however `13'u8` is more": What is the reason for the apostrophe anyways? |
19:21:17 | * | Guest58 joined #nim |
19:21:32 | FromDiscord | <konsumlamm> makes it clear that it's calling a routine |
19:21:37 | FromDiscord | <konsumlamm> also looks better imo |
19:26:02 | * | Guest58 quit (Client Quit) |
19:27:03 | * | xet7 quit (Quit: Leaving) |
19:44:05 | FromDiscord | <IsaacPaul> It's calling a routine? |
19:44:34 | * | jmdaemon joined #nim |
19:50:22 | FromDiscord | <IsaacPaul> sent a code paste, see https://play.nim-lang.org/#ix=3Iqc |
19:51:06 | FromDiscord | <IsaacPaul> Or maybe the routine resolves into a cast? |
19:56:12 | * | neurocyte0132889 joined #nim |
20:19:39 | FromDiscord | <konsumlamm> well, u8 is special cased, it's calling a routine for user defined suffixes |
20:34:36 | FromDiscord | <IsaacPaul> https://github.com/nim-lang/RFCs/issues/216 ah ok I didn't know nim did that |
20:37:51 | FromDiscord | <IsaacPaul> sent a code paste, see https://play.nim-lang.org/#ix=3Iqx |
20:38:21 | FromDiscord | <IsaacPaul> but I'm just nitpicking at this point |
20:42:10 | * | xet7 joined #nim |
20:48:29 | NimEventer | New question by How2: Pythonic string.replace() in Nim?, see https://stackoverflow.com/questions/70355338/pythonic-string-replace-in-nim |
20:49:10 | FromDiscord | <konsumlamm> In reply to @IsaacPaul "But if you look": i literally told you that u8 is special cased |
20:50:42 | FromDiscord | <IsaacPaul> I guess I misunderstood you 🙂 |
21:10:48 | NimEventer | New thread by Miran: Release candidates for Nim 1.6.2 and 1.2.16, see https://forum.nim-lang.org/t/8712 |
21:12:17 | FromDiscord | <hmmm> o boi we got new stuff? |
21:12:36 | FromDiscord | <hmmm> what kind of new stuff we got 😋 |
21:14:10 | * | rwb is now known as rb |
21:17:33 | FromDiscord | <impbox [ftsf]> Mmm a changelog would be nice to include in these posts |
21:52:52 | * | tiorock joined #nim |
21:52:52 | * | tiorock quit (Changing host) |
21:52:52 | * | tiorock joined #nim |
21:52:52 | * | rockcavera is now known as Guest3263 |
21:52:52 | * | Guest3263 quit (Killed (molybdenum.libera.chat (Nickname regained by services))) |
21:52:53 | * | tiorock is now known as rockcavera |
21:59:10 | * | Lord_Nightmare quit (Quit: ZNC - http://znc.in) |
22:01:32 | * | Lord_Nightmare joined #nim |
22:15:21 | FromDiscord | <ynfle (ynfle)> I'm trying to make a minimal docker image for nim without nimble and stuff like that. Can someone help me? I get this error when copying `/nim/lib/` from `1.6.0-alpine-regular` |
22:15:30 | FromDiscord | <ynfle (ynfle)> /nim/lib/pure/json.nim(162, 16) Error\: cannot open file\: tables |
22:15:40 | FromDiscord | <ynfle (ynfle)> So it at least has some stuff |
22:46:31 | * | krux02 joined #nim |
23:19:11 | * | noeontheend joined #nim |
23:27:51 | * | noeontheend quit (Remote host closed the connection) |
23:28:49 | * | noeontheend joined #nim |
23:29:38 | * | src_ joined #nim |
23:30:24 | * | noeontheend quit (Client Quit) |
23:30:37 | * | noeontheend joined #nim |
23:33:14 | * | src_ quit (Client Quit) |
23:33:25 | * | src quit (Ping timeout: 256 seconds) |
23:33:25 | * | src_ joined #nim |
23:45:11 | NimEventer | New thread by Parra: Using C, C#, Java, Wasm, Ruby, Python NodeJS, TypeScript... libraries from Nim with MetaCall, see https://forum.nim-lang.org/t/8713 |
23:52:48 | * | krux02 quit (Remote host closed the connection) |