00:00:39 | FromDiscord | <🐒 br4n_d0n> sent a code paste, see https://play.nim-lang.org/#ix=40za |
00:03:53 | FromDiscord | <🐒 br4n_d0n> Or would the enum be of 8-bits anyways? |
00:05:40 | FromDiscord | <huantian> it would be 8 bits anyways yes |
00:06:01 | FromDiscord | <huantian> ~~also why not spell out Direction it's like 3 extra letters 😛 and it's more readable~~ |
00:09:48 | FromDiscord | <🐒br4n_d0n> So, if I added 1 more item to my enum would that store it as 16-bits or 9? |
00:11:33 | FromDiscord | <Rika> 16 |
00:11:42 | FromDiscord | <Rika> 9 used 7 padded |
00:11:56 | FromDiscord | <🐒br4n_d0n> That's what I figured, but wasn't sure |
00:22:12 | FromDiscord | <haskellandchill> anybody here know about `Mach-O` files |
00:22:33 | FromDiscord | <huantian> sounds macosy |
00:26:23 | FromDiscord | <haskellandchill> yea |
00:26:28 | FromDiscord | <🐒br4n_d0n> https://en.wikipedia.org/wiki/Mach-O |
00:26:35 | FromDiscord | <haskellandchill> well yea |
00:26:52 | FromDiscord | <haskellandchill> I'm trying to see dependencies |
00:27:24 | FromDiscord | <demotomohiro> In reply to @ynfle "What's the easiest way": `nimble install pixie nimgl`, copy following file and write image you want to draw to `image` variable.↵https://gist.github.com/demotomohiro/6ae8baf1e40fffae3858c2ff01a8d241 |
00:28:34 | FromDiscord | <haskellandchill> hm I tried a mach object view of some sort seems to be kind helpful |
00:28:49 | FromDiscord | <haskellandchill> (edit) removed "" | "view" => "viewer" |
00:32:18 | FromDiscord | <haskellandchill> `otool -L` is what I wanted |
00:38:44 | FromDiscord | <ynfle> In reply to @demotomohiro "`nimble install pixie nimgl`,": Thanks. It doesn't have to be real time |
00:38:52 | FromDiscord | <ynfle> I just wrote it to a file |
00:44:00 | FromDiscord | <ynfle> Does anyone know if there is an easy way to do a convolution in arraymancer? Not for neural networks. Just applying element wise multiplication using a sliding window over the matrix |
00:45:30 | FromDiscord | <demotomohiro> sent a long message, see http://ix.io/40zi |
00:47:04 | FromDiscord | <ynfle> I know, but I want to tensor operations, so I am using arraymancer |
00:48:04 | FromDiscord | <ynfle> In reply to @demotomohiro "Then, use pixie https://github.com/treeform/pixie": Which question was this for? |
00:50:02 | FromDiscord | <demotomohiro> In reply to @ynfle "Which question was this": It is for write 2d matrix to image file. |
00:51:34 | FromDiscord | <ynfle> In reply to @demotomohiro "It is for write": Ok thought so |
00:56:50 | FromDiscord | <demotomohiro> Is there better or simpler way to expand a template before the macro?↵That template is in the code block that is passed to `untyped` macro parameter, and I want to pass that code block to the macro after that template is expanded.↵https://play.nim-lang.org/#ix=40zg |
01:06:30 | * | kayabaNerve quit (Ping timeout: 240 seconds) |
01:25:55 | * | kayabaNerve joined #nim |
01:35:00 | * | kayabaNerve quit (Ping timeout: 276 seconds) |
01:40:21 | * | kayabaNerve joined #nim |
01:42:49 | * | euantorano quit (Ping timeout: 248 seconds) |
01:48:41 | * | kayabaNerve quit (Ping timeout: 248 seconds) |
01:49:44 | * | Guest12 joined #nim |
01:51:25 | * | kayabaNerve joined #nim |
01:52:16 | * | Guest12 quit (Client Quit) |
01:59:42 | * | euantorano joined #nim |
02:00:58 | FromDiscord | <🐒br4n_d0n> @ElegantBeef ROFL, my question was right here all along ↵https://nim-lang.org/docs/manual.html#numeric-literals-custom-numeric-literals |
02:01:10 | FromDiscord | <🐒br4n_d0n> (edit) "@ElegantBeef ROFL, ... my" added "the answer to" |
02:01:46 | FromDiscord | <🐒br4n_d0n> sent a code paste, see https://play.nim-lang.org/#ix=40zx |
02:10:14 | FromDiscord | <U9G> How can I debug `/home/me/.choosenim/toolchains/nim-1.6.6/lib/core/macros.nim(533, 23) Error: ':' or '=' expected, but got '('` ? |
02:10:21 | FromDiscord | <U9G> it doesnt say where the error is |
02:11:26 | FromDiscord | <Elegantbeef> https://github.com/nim-lang/Nim/blob/version-1-6/lib/core/macros.nim#L533 is that line |
02:11:30 | FromDiscord | <Elegantbeef> It's a `parseExpr` you have |
02:11:42 | FromDiscord | <U9G> I dont have any parseExpr |
02:11:46 | FromDiscord | <U9G> I just wrote normal code |
02:11:54 | FromDiscord | <Elegantbeef> What's your code? |
02:12:14 | FromDiscord | <U9G> its like 200 lines |
02:12:48 | FromDiscord | <Prestige> Beef, this mocking stuff is going to be the end of me |
02:13:15 | FromDiscord | <Prestige> Maybe I should make a forum post |
02:13:21 | FromDiscord | <Elegantbeef> Lol |
02:13:21 | FromDiscord | <Elegantbeef> 200 loc is nothing |
02:13:25 | FromDiscord | <U9G> what mocking stuff? |
02:13:30 | FromDiscord | <Elegantbeef> Comment out code until it compiles then find the suspect line |
02:13:41 | FromDiscord | <U9G> I just commented out the whole file and I get the same error |
02:13:42 | FromDiscord | <Elegantbeef> Prestige i did figure out a way to make it like the TRM but you arent going to like it |
02:13:46 | FromDiscord | <U9G> now I'm very confused... |
02:13:49 | FromDiscord | <Prestige> oh? |
02:14:25 | FromDiscord | <U9G> Okay, apparently its this line `import os, httpclient, strformat, tables, strutils, sequtils` |
02:14:43 | FromDiscord | <Elegantbeef> Decompile the binary find any access of procedures at your addresses and change that to a pointer proc 😄 |
02:14:50 | FromDiscord | <Elegantbeef> It's not a sensible solution |
02:14:54 | FromDiscord | <U9G> import os, httpclient, strformat, tables, strutils, sequtils |
02:14:58 | FromDiscord | <U9G> https://i.imgur.com/iwCv9I1.png |
02:15:06 | FromDiscord | <U9G> I have no idea lol |
02:15:50 | FromDiscord | <🐒br4n_d0n> is it the commas? should they be ; or on separate lines? |
02:15:52 | FromDiscord | <Elegantbeef> You arent importing macros so that's just wrong |
02:16:20 | FromDiscord | <Elegantbeef> What's your config file look like |
02:17:33 | FromDiscord | <Elegantbeef> So like prestige you'd do something like `mock(myProc, doThing)` which would on first run export addresses of the `myProc` and a pointer proc, then you'd use that information to replace the calls at that address to your pointer proc's address then it'd just work |
02:17:47 | FromDiscord | <Elegantbeef> Can I tell you how to do that properly, fuck no, is it easy, fuck no |
02:18:36 | * | kayabaNerve quit (Remote host closed the connection) |
02:18:55 | * | kayabaNerve joined #nim |
02:21:48 | FromDiscord | <Elegantbeef> Actually you might not need to run it once you might be able to feed it directly... hm |
02:28:04 | FromDiscord | <Prestige> 🤔 |
02:43:57 | FromDiscord | <ripluke> How can I get the CPU usage percent |
02:44:08 | FromDiscord | <ripluke> Like what htop gives you |
02:52:10 | FromDiscord | <Elegantbeef> There might be a nimble package for it or a github repo if not search "C how to get cpu usage" |
03:06:19 | FromDiscord | <Elegantbeef> Yea i think it might be theoretically possible to replace either a procedure or a procedure's body with a call of your pointer proc after compilation but it'll require a bit of work i imagine, looking into it most people just do what i suggested with two modules↵(@Prestige) |
03:07:09 | FromDiscord | <Elegantbeef> If you really dont want your tests to pollute your code you can always look at using `patchFile` to replace the specific modulee |
03:07:24 | FromDiscord | <Elegantbeef> But the issue here is your tests/non tests could have different implementations |
03:08:01 | FromDiscord | <Prestige> hm I'll look up patchFile I suppose |
03:08:32 | FromDiscord | <Prestige> Too bad this is such a hard thing to pull off |
03:08:39 | FromDiscord | <Elegantbeef> I mean it's not that bad |
03:08:52 | FromDiscord | <Elegantbeef> I'd be annoyed if someone could override my code easily, makes testing hard 😛 |
03:08:56 | FromDiscord | <Prestige> We haven't found a working solution though yet |
03:09:28 | FromDiscord | <Elegantbeef> I mean we have you just dont like it |
03:09:35 | FromDiscord | <Prestige> What was it |
03:09:37 | FromDiscord | <Prestige> ? |
03:09:40 | FromDiscord | <Elegantbeef> The split module |
03:09:45 | FromDiscord | <Elegantbeef> It works 100% of the time |
03:10:18 | FromDiscord | <Prestige> But you have to add that code to all your module code, right? |
03:11:04 | FromDiscord | <Elegantbeef> What? |
03:11:18 | FromDiscord | <Elegantbeef> You make a module that hass all your procs you'd want to mock be exported and be pointer procs |
03:11:26 | FromDiscord | <Elegantbeef> So i guess "sure" |
03:12:00 | FromDiscord | <Prestige> Why didn't the TRM solutions work? They seemed really close to working |
03:12:22 | FromDiscord | <Elegantbeef> dont recall |
03:12:29 | FromDiscord | <Elegantbeef> Think it was too aggressive |
03:15:00 | FromDiscord | <Prestige> I might take another stab at it |
03:15:10 | FromDiscord | <Prestige> It's the closest we've come |
03:16:30 | FromDiscord | <Elegantbeef> I have had an idea to maybe make it less aggressive which i didnt try |
03:17:32 | FromDiscord | <Elegantbeef> do you have the mocker file + code that failed? |
03:18:13 | FromDiscord | <Prestige> The original one? |
03:18:32 | FromDiscord | <Elegantbeef> The last state of both |
03:18:48 | FromDiscord | <Prestige> let me check |
03:19:01 | FromDiscord | <Elegantbeef> I dont have any of the files and dont feel like rewriting them |
03:19:14 | FromDiscord | <Prestige> Mocker: https://play.nim-lang.org/#ix=40zH |
03:19:48 | FromDiscord | <Prestige> Code that was failing: https://play.nim-lang.org/#ix=40zI |
03:23:00 | * | rockcavera joined #nim |
03:23:00 | * | rockcavera quit (Changing host) |
03:23:00 | * | rockcavera joined #nim |
03:50:24 | * | arkurious quit (Quit: Leaving) |
04:34:41 | * | GreaseMonkey quit (Ping timeout: 255 seconds) |
04:58:21 | * | ltriant joined #nim |
05:00:37 | * | ltriant_ quit (Ping timeout: 256 seconds) |
05:11:50 | * | kayabaNerve quit (Ping timeout: 240 seconds) |
05:20:04 | * | greaser|q joined #nim |
05:21:44 | * | rockcavera quit (Remote host closed the connection) |
05:26:07 | * | kayabaNerve joined #nim |
05:56:09 | * | kayabaNerve quit (Ping timeout: 248 seconds) |
06:03:38 | * | xet7 quit (Remote host closed the connection) |
06:17:06 | * | PMunch joined #nim |
06:43:39 | * | greaser|q quit (Changing host) |
06:43:39 | * | greaser|q joined #nim |
06:44:01 | * | greaser|q is now known as GreaseMonkey |
06:44:59 | * | FromDiscord quit (Remote host closed the connection) |
06:46:18 | * | FromDiscord joined #nim |
06:46:34 | * | FromDiscord quit (Remote host closed the connection) |
06:47:28 | * | FromDiscord joined #nim |
06:47:48 | * | FromDiscord quit (Remote host closed the connection) |
06:49:24 | * | FromDiscord joined #nim |
06:49:42 | * | FromDiscord quit (Remote host closed the connection) |
06:51:14 | * | FromDiscord joined #nim |
06:53:14 | * | FromDiscord quit (Remote host closed the connection) |
06:57:26 | * | FromDiscord joined #nim |
06:57:59 | * | FromDiscord quit (Remote host closed the connection) |
06:58:19 | * | FromDiscord joined #nim |
06:58:37 | * | FromDiscord quit (Remote host closed the connection) |
07:00:30 | * | FromDiscord joined #nim |
07:02:00 | * | FromDiscord quit (Remote host closed the connection) |
07:02:14 | * | FromDiscord joined #nim |
07:05:18 | FromDiscord | <d4rckh> are the docs working for anyone else? |
07:05:20 | FromDiscord | <d4rckh> https://nim-lang.org/docs/sequtils.html |
07:05:30 | FromDiscord | <huantian> They’re up for me |
07:05:36 | FromDiscord | <Asbjørn F> Up for me |
07:05:41 | FromDiscord | <d4rckh> okay the entire nim-lang.org website is 500ing me |
07:05:42 | FromDiscord | <huantian> But there was a recent cloud flare outage so that’s probably why |
07:05:44 | FromDiscord | <d4rckh> https://media.discordapp.net/attachments/371759389889003532/988701237337800714/unknown.png |
07:05:53 | FromDiscord | <Asbjørn F> yeah it's probably regional |
07:06:03 | FromDiscord | <d4rckh> i see |
07:06:20 | * | ltriant quit (Ping timeout: 246 seconds) |
07:06:20 | FromDiscord | <Asbjørn F> What's your locale? |
07:06:45 | FromDiscord | <d4rckh> im from romania |
07:07:34 | FromDiscord | <d4rckh> are the docs clonable from github? |
07:07:37 | FromDiscord | <d4rckh> (edit) "clonable" => "cloneable" |
07:07:44 | FromDiscord | <Asbjørn F> yes |
07:08:03 | FromDiscord | <Asbjørn F> If you're on the Russian region it's being re-routed according to cloudflare status |
07:08:24 | FromDiscord | <Asbjørn F> https://www.cloudflarestatus.com/ |
07:08:31 | FromDiscord | <Asbjørn F> You can scroll down to your region |
07:08:32 | FromDiscord | <d4rckh> https://nim-lang.github.io/Nim/sequtils.html |
07:08:39 | FromDiscord | <d4rckh> ah a github mirror! |
07:09:05 | FromDiscord | <Asbjørn F> In reply to @d4rckh "https://nim-lang.github.io/Nim/sequtils.html": these are the devel docs though |
07:09:08 | FromDiscord | <Asbjørn F> just fyi |
07:09:33 | FromDiscord | <d4rckh> its okay for what im using it, probably |
07:24:25 | FromDiscord | <d4rckh> okay, why cant i add a tuple to a sequence? |
07:24:32 | FromDiscord | <d4rckh> sent a code paste, see https://paste.rs/SoR |
07:24:39 | FromDiscord | <d4rckh> sent a code paste, see https://paste.rs/2sb |
07:24:49 | FromDiscord | <d4rckh> im definitely missing something lol |
07:24:56 | FromDiscord | <d4rckh> (edit) "https://paste.rs/uZY" => "https://paste.rs/ZwW" |
07:25:18 | * | gsalazar_ joined #nim |
07:26:59 | FromDiscord | <huantian> Use var not let for your sequence |
07:27:01 | FromDiscord | <huantian> Let is immutable |
07:30:24 | FromDiscord | <d4rckh> ah crap |
07:33:07 | FromDiscord | <Phil> TFW you notice that norm doesn't use `?` for placeholders in its postgres module and you don't know why |
07:33:16 | FromDiscord | <Phil> (edit) "placeholders" => "sql-placeholders" |
08:44:18 | * | dtomato quit (Quit: Ping timeout (120 seconds)) |
08:44:38 | * | dtomato joined #nim |
08:57:18 | * | ltriant joined #nim |
09:21:06 | * | firq joined #nim |
09:27:32 | * | firq quit (Quit: Konversation terminated!) |
10:48:33 | * | jmdaemon quit (Ping timeout: 256 seconds) |
11:49:25 | * | oprypin quit (Remote host closed the connection) |
11:50:33 | * | oprypin joined #nim |
12:16:02 | * | wallabra quit (Ping timeout: 244 seconds) |
12:18:51 | * | arkanoid joined #nim |
12:19:31 | arkanoid | will asyncfutures.all execute all futures sequentially or in parallel? |
12:20:56 | FromDiscord | <enthus1ast> i allocate a buffer↵a winapi call fills it with an array of windows structures.↵what good options do i have to let nim automatically manage this pointer? |
12:22:24 | FromDiscord | <enthus1ast> i was returning a seq with these structs, then deallocated the buffer, but since there are strings in the struct the're deallocated aswell, giving me rubbish |
12:23:33 | FromDiscord | <enthus1ast> one option might be to wrap this in an object to have a =destruct proc, since this does not work with pointer (yet?) right? |
12:28:31 | FromDiscord | <Rika> In reply to @arkanoid "will asyncfutures.all execute all": Async is not parallelism |
12:28:40 | FromDiscord | <Rika> They will run concurrently but one by one |
12:29:07 | FromDiscord | <Rika> When the CPU is needed, one by one; when IO is being waited for, effectively parallel |
12:36:14 | arkanoid | Rika, there's a difference in awaiting in the loop, or running all async procs collecting futures and awaiting that all are completed/failed |
12:36:33 | arkanoid | Rika, the difference boils down to the implementation, that may be called "all" in both cases |
12:38:03 | arkanoid | I actually don't understand what is happening here https://github.com/nim-lang/Nim/blob/1561a83c49b446b0f2ed0eae00c847610f9ee310/lib/pure/asyncfutures.nim#L468 , where is the execution/awaiting of each fut? |
12:38:32 | FromDiscord | <Rika> On creation, futures are run until the first await in them |
12:39:49 | arkanoid | oh, correct |
12:40:38 | arkanoid | this means that this "all" implements the "parallel" strategy |
12:41:09 | PMunch | Yes, they're all started, and when they're all done the future returned by all will be done |
12:43:18 | arkanoid | thanks |
12:45:23 | arkanoid | long time since my last use of nim, is there any relevant update on the incremental compilation / better module import (circular dependency) topic? |
12:49:18 | PMunch | Not really |
12:49:28 | PMunch | I mean there are some updates behind the scenes I imagine |
12:49:35 | PMunch | But for users not much has changed |
13:00:17 | arkanoid | Thanks. I'm studying rust, but I really hope Nim gets features required for largish / team-based projects soon |
13:00:52 | arkanoid | I'd prefer keeping Nim as my daily driver, instead of pain-in-ass rust |
13:08:09 | FromDiscord | <ezquerra> @PMunch would know much more than I do but I believe that incremental compilation is a big focus of the dev team at the moment. However as he said that work is not complete yet |
13:14:28 | arkanoid | ezquerra, thanks for the info! |
13:25:18 | PMunch | Oh yeah, its been iterated lots of times that this is the main focus at the moment |
13:25:54 | FromDiscord | <Tanguy> sent a code paste, see https://play.nim-lang.org/#ix=40AC |
13:26:39 | FromDiscord | <Rika> I feel like the first working part shouldn’t work |
13:26:51 | FromDiscord | <Tanguy> (edit) "https://paste.rs/2Cw" => "https://paste.rs/qgE" |
13:27:18 | FromDiscord | <Tanguy> I think templates are supposed to also work with the "template local scope", no? |
13:28:21 | FromDiscord | <Tanguy> (so `bind`) |
13:28:52 | FromDiscord | <Rika> Really? I don’t remember anymore |
13:29:38 | FromDiscord | <Tanguy> sent a long message, see http://ix.io/40AD |
13:35:08 | * | arkurious joined #nim |
13:37:38 | * | ltriant quit (Ping timeout: 246 seconds) |
13:58:21 | * | derpydoo joined #nim |
14:19:49 | FromDiscord | <!Patitotective> sent a code paste, see https://paste.rs/S4I |
14:20:33 | FromDiscord | <Rika> last time i recall, you dont |
14:21:55 | FromDiscord | <!Patitotective> In reply to @Rika "last time i recall,": if you're answering to me↵wdym |
14:22:02 | FromDiscord | <!Patitotective> (edit) "answering" => "replying" |
14:22:53 | FromDiscord | <Rika> you dont/cant statically link them |
14:22:58 | FromDiscord | <Rika> i dont recall if im correct tho |
14:27:43 | PMunch | !Patiotective, you can't statically link to a Dynamic Link Library (DLL). It's kind of the point that they are dynamic |
14:28:02 | PMunch | You have to put your DLL next to your binary (or some other place it will find it) to get it to work |
14:30:49 | FromDiscord | <Phil> sent a long message, see http://ix.io/40AV |
14:32:21 | FromDiscord | <Rika> im not sure what the question is |
14:34:59 | FromDiscord | <Phil> If anyone sees an actually clean way to solve this problem.↵I want to essentially be able to pool all sorts of connections (though not multiple at once)... actually why don't I support that usecase, it might very well be a user has multiple databases attached to a server |
14:35:10 | FromDiscord | <Phil> hmmm |
14:39:40 | FromDiscord | <!Patitotective> In reply to @PMunch "You have to put": Hmm, I wouldn't want to make the user download the DLLs manually↵Is niminst a good option? https://nim-lang.org/docs/niminst.html |
14:40:14 | FromDiscord | <voidwalker> anyone know of game launcher, or maybe other type of media catalog/database/collection kind of software, like playnite, launchbox, etc, written in nim ? |
14:40:24 | FromDiscord | <voidwalker> I searched for a bit on github and did not find anything |
14:40:56 | PMunch | !Patiotective, maybe. I'm not too versed in Windows installations. On Linux you'd just mark it as a dependency in your package |
14:41:21 | PMunch | But yeah, this is typically done with an installer, or simply a zip file |
14:41:21 | FromDiscord | <Rika> In reply to @Isofruit "Hmm designquestion! I've been": maybe i understand now; what about a concept for dbconn? |
14:42:39 | FromDiscord | <!Patitotective> In reply to @PMunch "!Patiotective, maybe. I'm not": i think OpenSSL in linux is mostly already installed so i dont need to add it↵also i use appimage ;] |
14:49:41 | FromDiscord | <Phil> sent a code paste, see https://play.nim-lang.org/#ix=40AY |
14:49:52 | FromDiscord | <Phil> (edit) "https://play.nim-lang.org/#ix=40AY" => "https://paste.rs/5bk" |
14:50:13 | FromDiscord | <Rika> probably not without library modifications? |
14:50:19 | FromDiscord | <Phil> I'd expect it to cause issues at compile time when the concept goes "I don't know the type on the POOL object!" |
14:51:20 | FromDiscord | <Rika> i'll think |
14:51:38 | FromDiscord | <Phil> Was mostly to point out the global var POOL and that it's directly within the module, so it gets "created" at compile time and thus needs to have a specific type as far as I've understood nim so far |
14:51:46 | FromDiscord | <Rika> yeah youre gonna have to return a pool and set it as global when you make your applications |
14:52:52 | FromDiscord | <Phil> So if I want to have the approach that the end user does not have to give a hoot about the pool and if I want to manage that global thingy entirely on my own, I'm out of luck? |
14:53:21 | FromDiscord | <Phil> The original idea was to keep exposure of the pool object so minimal, the user does not even know it exists, they merely borrow connections from it and return them |
14:53:36 | FromDiscord | <Phil> Via the only 2 public procs that the module has |
14:54:30 | * | ltriant joined #nim |
14:59:44 | * | ltriant quit (Ping timeout: 255 seconds) |
15:01:16 | FromDiscord | <Phil> Gnaaa, I don't think there's a way to make connection pooling quite as hassle free and clean if I want to support multiple pools to different servers |
15:01:36 | FromDiscord | <Phil> Since I then start to need the information what pool you want to borrow your connection from |
15:11:46 | FromDiscord | <!Patitotective> how should i build niminst? `kock tools` doesn't seem to build it |
15:33:37 | * | rockcavera joined #nim |
15:33:37 | * | rockcavera quit (Changing host) |
15:33:37 | * | rockcavera joined #nim |
15:35:17 | FromDiscord | <haskellandchill> good question I see no docs |
15:37:09 | FromDiscord | <haskellandchill> what's a `nimf` file |
15:38:23 | FromDiscord | <!Patitotective> In reply to @haskellandchill "what's a `nimf` file": https://nim-lang.org/docs/filters.html |
15:40:39 | FromDiscord | <xflywind> In reply to @Patitotective "how should i build": Yeah, you need to compile it manually. |
15:41:21 | FromDiscord | <haskellandchill> looks like koch has a note here: https://github.com/nim-lang/Nim/blob/devel/koch.nim#L542 |
15:41:39 | FromDiscord | <xflywind> See also https://github.com/nim-lang/Nim/issues/11433 It needs to be documented though |
15:41:47 | FromDiscord | <!Patitotective> In reply to @flywind "Yeah, you need to": `nim c tools/niminst/niminst.nim`? |
15:42:20 | FromDiscord | <xflywind> yeah |
15:56:06 | FromDiscord | <!Patitotective> does zippy support compressing directories? |
15:59:36 | FromDiscord | <ezquerra> And does zippy support opening a file "in place" (i.e. without extracting it)? In particular, can you access a zip file within a zip file? That is, would it be possible to extract a file that is inside a zip file that is itself inside another zip file? |
16:00:04 | FromDiscord | <Rika> zippy can only extract |
16:00:12 | FromDiscord | <Rika> it can compress, but not archiver |
16:00:13 | FromDiscord | <Rika> (edit) "archiver" => "archive" |
16:00:42 | FromDiscord | <Rika> sorry, i mean extract, decompress, and compress |
16:00:46 | FromDiscord | <Rika> it cant archive |
16:01:19 | FromDiscord | <Rika> youre gonna have to program the archival part |
16:01:45 | FromDiscord | <Rika> In reply to @ezquerra "And does zippy support": zippy can decompress in-memory i believe? |
16:01:51 | FromDiscord | <Rika> so you just decompress twice? not sure |
16:09:11 | FromDiscord | <!Patitotective> are there any other zip libraries that do support compressing archives? |
16:13:03 | FromDiscord | <Rika> idk |
16:13:19 | FromDiscord | <Rika> theres the zip wrapper |
16:13:26 | FromDiscord | <Rika> has external dependency |
16:13:26 | FromDiscord | <Rika> https://github.com/nim-lang/zip |
16:13:29 | FromDiscord | <!Patitotective> niminst directly uses `7z` lol |
16:13:58 | FromDiscord | <Rika> https://github.com/status-im/nim-zippy |
16:14:01 | FromDiscord | <Rika> ? |
16:14:11 | FromDiscord | <Rika> are you using this |
16:14:15 | FromDiscord | <Rika> or the other zippy |
16:14:28 | FromDiscord | <Rika> im not sure of the difference |
16:14:37 | FromDiscord | <!Patitotective> In reply to @Rika "or the other zippy": guzba's zippy |
16:14:41 | FromDiscord | <Rika> this other one (status) has compress support |
16:15:12 | FromDiscord | <Rika> but its also... kinda outdated? |
16:15:33 | FromDiscord | <Rika> maybe port the whopping 3 extra commits from the status version into guzba's zippy |
16:15:45 | FromDiscord | <Rika> or idk |
16:15:53 | FromDiscord | <Rika> not sure what happened between this and guzba's |
16:16:11 | FromDiscord | <Rika> it seems like zip file compression was removed instead of added by the status lib |
16:16:21 | FromDiscord | <Rika> (edit) "it seems like zip file compression was removed ... instead" added "by guzba's" |
16:16:44 | FromDiscord | <!Patitotective> sus |
16:27:23 | * | gsalazar_ quit (Ping timeout: 246 seconds) |
16:27:28 | FromDiscord | <deech> How do I tell Nim to use `g++` with the CPP backend? `define("cc","g++")` failed with `Error: unknown C compiler: 'g++'. Available options are: gcc, switch_gcc, llvm_gcc, clang, bcc, vcc, tcc, env, icl, icc, clang_cl`. |
16:28:05 | FromDiscord | <Rika> use env then set CC in the env? not sure of better solutions |
16:28:16 | FromDiscord | <Rika> what's wrong with the default |
16:28:56 | FromDiscord | <deech> Nothing wrong with `clang` but I'd like to make sure I can compile against `g++` without warnings as well. |
16:29:35 | NimEventer | New thread by Morturo: Export to android, see https://forum.nim-lang.org/t/9253 |
16:29:37 | FromDiscord | <deech> There appears to be no command line switch to set a C++ compiler, `--cc` seems to be it. |
16:32:16 | FromDiscord | <deech> sent a code paste, see https://play.nim-lang.org/#ix=40Bl |
16:38:49 | FromDiscord | <Phil> Errr if I have to throw up a docker container for testing (connecting to mysql/postgres databases)... how do I do that in nim?↵I see norm doing something similar, but if I'm understanding it correctly they're running a docker compose command and on container start-up they trigger testament.↵I'm not a fan of that order, imo the test should determine that a container is needed and if it does, the test should be able to fire up a container.↵Do |
16:39:20 | FromDiscord | <Phil> (edit) "a container.↵Do" => "the container it needs.↵Do" |
16:45:09 | FromDiscord | <!Patitotective> a nim program to run on a windows machine that doesnt have nim installed requires all this DLLs? https://media.discordapp.net/attachments/371759389889003532/988847050605080616/unknown.png |
16:45:46 | FromDiscord | <!Patitotective> (edit) "this" => "these" |
16:47:09 | FromDiscord | <!Patitotective> well, all the 64 or 32 ones |
16:47:29 | FromDiscord | <!Patitotective> what are the DLLs without 32 or 64 for? 🤔 |
16:47:50 | * | ltriant joined #nim |
16:55:38 | * | ltriant quit (Ping timeout: 240 seconds) |
16:59:40 | FromDiscord | <ripluke> Can I use zig as a compiler for nim in it's c/cpp backend |
17:05:08 | FromDiscord | <Rika> yes |
17:16:59 | FromDiscord | <ripluke> Where would I define this? |
17:17:26 | FromDiscord | <ripluke> At the command line? |
17:21:42 | NimEventer | New thread by Patitotective: Deploy DLLs, see https://forum.nim-lang.org/t/9254 |
17:24:39 | FromDiscord | <S3cur3Th1sSh1t> What would you say is the best way to set Metadata Information for a Nim executable? Such as version Information, CopyRight, Productname and so on. Compile a `.rc` file to `.res` and embed this via linking or via mingw compiler flags? |
17:24:50 | FromDiscord | <S3cur3Th1sSh1t> Is there some Nim library for doing so? |
17:29:02 | FromDiscord | <U9G> https://i.imgur.com/takKYiY.png |
17:29:05 | FromDiscord | <U9G> what am I to do here? |
17:35:23 | FromDiscord | <Phil> In reply to @S3cur3Th1sSh1t "What would you say": Metadata for nim projects belong in the .nimble file |
17:36:34 | FromDiscord | <Phil> See here for an example: https://github.com/PhilippMDoerner/NimStoryFont/blob/master/nimstoryfont.nimble↵And docs: https://github.com/nim-lang/nimble#nimble-reference |
17:41:22 | FromDiscord | <Phil> In reply to @U9G "https://i.imgur.com/takKYiY.png": On what platform are you compiling? Windows?↵I'm asking since I can't replicate the issue↵Also, does this still happen if you rewrite your import as `std/[os, httpclient, strformat, tables, strutils, sequtils]`? |
17:42:27 | FromDiscord | <U9G> In reply to @Isofruit "On what platform are": windows yeah, I'll give it a try |
17:49:33 | FromDiscord | <ezquerra> @!Patitotective those dll are only needed in some cases (e.g. if you use regular expressions you need pcre). I’ve compiled many nim programs in windows that required no additional DLLs |
17:56:17 | FromDiscord | <U9G> In reply to @Isofruit "On what platform are": same thing: https://i.imgur.com/fbb2Lfq.png |
17:57:46 | FromDiscord | <Phil> Could you add imports one by one to see at which point the problem occurs? |
18:01:54 | FromDiscord | <d4rckh> how can i read the post data of a request from std/asynchttpserver |
18:01:56 | FromDiscord | <d4rckh> (edit) "std/asynchttpserver" => "std/asynchttpserver?" |
18:02:12 | FromDiscord | <enthus1ast> its in the body |
18:02:21 | FromDiscord | <enthus1ast> the format depends of course |
18:02:29 | FromDiscord | <d4rckh> should i just json parse it if i know its json? |
18:02:40 | FromDiscord | <enthus1ast> yes might work |
18:06:27 | FromDiscord | <!Patitotective> In reply to @ezquerra "<@762008715162419261> those dll are": Yep https://forum.nim-lang.org/t/9254#60609 |
18:09:26 | * | ltriant joined #nim |
18:14:08 | * | ltriant quit (Ping timeout: 246 seconds) |
18:14:21 | FromDiscord | <d4rckh> sent a code paste, see https://play.nim-lang.org/#ix=40Bz |
18:14:22 | FromDiscord | <d4rckh> is this the proper way of sending headers? lol |
18:14:31 | FromDiscord | <d4rckh> https://media.discordapp.net/attachments/371759389889003532/988869535610318899/unknown.png |
18:16:10 | FromDiscord | <enthus1ast> you could of course disable cors but why do you try to access this ressource from another port in the first place? |
18:17:08 | FromDiscord | <d4rckh> sever is supposed to be located on another server |
18:17:11 | FromDiscord | <d4rckh> (edit) "sever" => "server" |
18:18:01 | FromDiscord | <d4rckh> In reply to @enthus1ast "you could of course": am i not doing that already using `Access-Control-Allow-Origin: `? |
18:18:10 | FromDiscord | <Phil> @U9G ? |
18:18:13 | FromDiscord | <d4rckh> i have other endpoints using that header and it works fine 🤔 |
18:20:05 | FromDiscord | <enthus1ast> mh yes i think this should work↵(@d4rckh) |
18:20:56 | FromDiscord | <enthus1ast> is this header present in the response? |
18:22:21 | FromDiscord | <d4rckh> wait a second.. |
18:22:24 | FromDiscord | <d4rckh> its doing a GET |
18:22:37 | FromDiscord | <d4rckh> sent a code paste, see https://play.nim-lang.org/#ix=40BB |
18:22:40 | FromDiscord | <d4rckh> and 404ing |
18:24:05 | FromDiscord | <d4rckh> wtf javascript |
18:24:54 | FromDiscord | <d4rckh> it says POST in console but when i print the request method on the server it says GET 🤔 https://media.discordapp.net/attachments/371759389889003532/988872156265984030/unknown.png |
18:29:19 | FromDiscord | <S3cur3Th1sSh1t> In reply to @Isofruit "Metadata for nim projects": I mean those metadata information. That won't come in with a nimble file.. https://media.discordapp.net/attachments/371759389889003532/988873264547901510/unknown.png |
18:29:43 | FromDiscord | <enthus1ast> what does normally set these stuff ? |
18:29:49 | FromDiscord | <enthus1ast> the compiler? |
18:30:30 | FromDiscord | <S3cur3Th1sSh1t> Normally those can be embedded with a resource file named `somename.res` |
18:30:51 | FromDiscord | <S3cur3Th1sSh1t> `koch.nim` for example also uses this for am image. But I wonder how to to so for the other informations. |
18:30:57 | FromDiscord | <S3cur3Th1sSh1t> an Image |
18:31:25 | FromDiscord | <Phil> Ohhhh that sort of displayed metadata |
18:33:02 | FromDiscord | <enthus1ast> https://stackoverflow.com/questions/284258/how-do-i-set-the-version-information-for-an-existing-exe-dll |
18:33:18 | FromDiscord | <enthus1ast> the 41 upvote one looks reasonable |
18:34:15 | FromDiscord | <enthus1ast> or the rcedit one |
18:42:13 | FromDiscord | <S3cur3Th1sSh1t> Yeah those definitely work but I would like to do it somehow natively with nim and compiler flags. |
18:42:28 | FromDiscord | <S3cur3Th1sSh1t> With nim `Or` compiler flags. |
18:42:43 | FromDiscord | <S3cur3Th1sSh1t> Not via third party tools |
18:43:51 | FromDiscord | <treeform> In reply to @S3cur3Th1sSh1t "Yeah those definitely work": I don't think Nim can do it easily, I just use `rcedit` as part of my bigger build/release step. |
18:44:48 | FromDiscord | <treeform> Same step as using Inno Setup build the installer. |
18:44:59 | FromDiscord | <d4rckh> ok actually https://media.discordapp.net/attachments/371759389889003532/988877204098265168/unknown.png |
18:45:01 | FromDiscord | <d4rckh> its doing OPTIONS |
18:45:11 | FromDiscord | <d4rckh> even tho im doing a post |
18:47:16 | FromDiscord | <d4rckh> okay actually |
18:47:24 | FromDiscord | <d4rckh> i need to completely disable cors 🤔 |
18:48:24 | FromDiscord | <S3cur3Th1sSh1t> I found, that compiling an `.rc` file to `.o`via windres and using `--passL:"file.o"` works to embed it. |
18:48:33 | FromDiscord | <S3cur3Th1sSh1t> So that's one way working for me now |
19:09:21 | * | kayabaNerve joined #nim |
19:25:03 | FromDiscord | <planetis> which vscode extension is the recommended one? for nim |
19:25:53 | FromDiscord | <!Patitotective> nimsaem |
19:25:59 | FromDiscord | <planetis> thanks |
19:26:29 | * | ehmry quit (Ping timeout: 256 seconds) |
19:26:33 | FromDiscord | <planetis> I wonder if the copilot thing works with nim |
19:27:31 | * | ehmry joined #nim |
19:27:39 | FromDiscord | <d4rckh> why not |
19:28:45 | FromDiscord | <d4rckh> how can i parse this in nim? |
19:28:45 | FromDiscord | <planetis> eh short of |
19:28:46 | FromDiscord | <d4rckh> sent a code paste, see https://play.nim-lang.org/#ix=40BV |
19:29:41 | FromDiscord | <enthus1ast> you mean because of the '\_' ? |
19:30:43 | FromDiscord | <d4rckh> Yeah it's generating a bunch of "metadata" for the keys |
19:32:39 | FromDiscord | <guzba> In reply to @Rika "it seems like zip": correct, i redid how zip file reading / extracting works to be much better, but have not redone zip archive writing. the legacy writer still exists though |
19:33:16 | FromDiscord | <enthus1ast> i would rather build a clean json message instead of sending and parsing some meta data you do not need↵(@d4rckh) |
19:34:18 | * | kayabaNerve quit (Ping timeout: 264 seconds) |
19:34:55 | FromDiscord | <🐒🧠br4n_d0n> Ugh, I wish Nim could infer the type of an array NOT based on the first item... I would like to do this ``[1, 2.0, 3.14]`` and have it an array of floats instead of int. Yeah, I know I could do ``1.0``, but I find that annoying |
19:35:10 | FromDiscord | <🐒🧠br4n_d0n> (edit) "2.0," => "2," |
19:35:27 | FromDiscord | <guzba> In reply to @ezquerra "And does zippy support": you can `openZipArchive` to get a `ZipArchiveReader` (cheap call), then call `extractFile` to get extract (and uncompress if needed) any file in it. i do not have an in-memory zip archive reader, currently it expects a file path and memory maps the file. i could add a ptr + len api but this is the first i have heard of the russian egg doll zip archive strategy |
19:36:01 | FromDiscord | <dom96> In reply to @br4n_d0n "Ugh, I wish Nim": same, although maybe this could be made possible with a macro |
19:37:33 | FromDiscord | <d4rckh> In reply to @enthus1ast "i would rather build": Well how Id build a clean json string? |
19:38:05 | FromDiscord | <🐒🧠br4n_d0n> In reply to @dom96 "same, although maybe this": It would only be worth it if, they would take a pull request for something like this otherwise I'm writing something that I have to include in all of my projects for a little convenience |
19:42:16 | * | wallabra joined #nim |
19:43:30 | * | derpydoo quit (Quit: derpydoo) |
19:50:19 | FromDiscord | <🐒🧠br4n_d0n> Anyone know where is the Nim source code the code for inferring array types is? |
19:50:29 | FromDiscord | <🐒🧠br4n_d0n> (edit) removed "is" |
19:50:45 | FromDiscord | <🐒🧠br4n_d0n> (edit) removed "the code" |
19:58:48 | FromDiscord | <Phil> Out of curiosity, what sort of package manager exist besides nimble? As apparently there are some |
19:59:07 | FromDiscord | <Elegantbeef> There are a few nimph is another one that's relatively popular |
19:59:57 | FromDiscord | <Phil> Just read a bit through the forum and talk came to package managers, thus my curiosity |
20:00:16 | FromDiscord | <ripluke> In reply to @br4n_d0n "Anyone know where the": https://github.com/nim-lang/nimble↵↵Have fun :P |
20:00:18 | FromDiscord | <Elegantbeef> I mean it's not as easy as you imagine to add, you need to pass on for all values what they're expected is and then attempt to convert to that↵(@🐒🧠br4n_d0n) |
20:00:54 | FromDiscord | <Elegantbeef> rip that's nimble not nim |
20:01:11 | FromDiscord | <ripluke> Trying to use zig with nimble is a pain |
20:01:30 | FromDiscord | <ripluke> I have it set as my $CC |
20:01:47 | FromDiscord | <ripluke> And when I try compiling c files it works perfectly |
20:02:13 | FromDiscord | <ripluke> But when run ↵nim c --cc:env |
20:02:16 | FromDiscord | <ripluke> It fails |
20:02:21 | FromDiscord | <Phil> Ohhh saem and disruptek still work on nimph? Neat! |
20:02:53 | FromDiscord | <Phil> Well, mostly disruptek I guess |
20:02:53 | FromDiscord | <🐒🧠br4n_d0n> In reply to @Elegantbeef "I mean it's not": I'm willing to try, I just need a little push in the correct direction |
20:06:47 | FromDiscord | <Elegantbeef> https://github.com/nim-lang/Nim/blob/4680ab61c06782d142492d1fcdebf8e942373c09/compiler/semexprs.nim#L584 it's here have fun! |
20:07:16 | * | LuxuryMode joined #nim |
20:08:21 | FromDiscord | <Phil> I see proc 50 lines long, I shudder |
20:08:55 | FromDiscord | <Elegantbeef> Turns out compilers are complex and someone doesnt comment their code |
20:09:32 | FromDiscord | <🐒🧠br4n_d0n> Lol, well I'll try my best |
20:11:23 | FromDiscord | <Phil> Compiler code looks like one of those things where "What you want it to do" is so conceptually complex and thus hard to express that it seems neigh impossible to make it easily comprehensible |
20:11:37 | * | ltriant joined #nim |
20:11:41 | FromDiscord | <Elegantbeef> You know what helps.... comments |
20:12:17 | FromDiscord | <Phil> Sounds like hearsay |
20:12:39 | FromDiscord | <Phil> Though actually this does kinda motivate me to skim through my own codebase to see if there's a big proc to split up |
20:12:45 | FromDiscord | <Elegantbeef> Eh whenever i contribute i generally comment the fuck i did to explain to the next person that visits |
20:15:40 | * | kayabaNerve joined #nim |
20:16:08 | FromDiscord | <Phil> sent a code paste, see https://play.nim-lang.org/#ix=40Ca |
20:16:18 | * | ltriant quit (Ping timeout: 240 seconds) |
20:16:39 | FromDiscord | <Phil> (Ways to express my proc documentation more concisely are welcome) |
20:16:53 | FromDiscord | <Elegantbeef> iso you know you can do `static: discard validateFkField`? |
20:17:06 | FromDiscord | <Elegantbeef> No need to introduce some funky consts |
20:17:10 | FromDiscord | <Phil> ... |
20:17:12 | FromDiscord | <Phil> Man |
20:17:22 | FromDiscord | <Phil> If that works, that would've been really nice to know 3 months ago 😄 |
20:17:43 | FromDiscord | <Elegantbeef> I mean `static:` is "run at compile time" and `discard` is well... discard the value" |
20:18:11 | FromDiscord | <Phil> Yeh, I was aware of both, just not that this interaction worked this way |
20:18:42 | FromDiscord | <Elegantbeef> I mean you're after a side effect from the compile time call right? |
20:19:56 | FromDiscord | <Phil> Pretty much |
20:20:03 | FromDiscord | <Phil> Which is "Throw compile time error if something evil is afoot" |
20:20:23 | FromDiscord | <Phil> Which is basically me wanting to have a concept but not trusting myself to actually write it and have it work |
20:20:33 | FromDiscord | <Elegantbeef> Yep then the above would certainly work |
20:20:55 | FromDiscord | <Elegantbeef> lol |
20:21:11 | FromDiscord | <ezquerra> In reply to @guzba "you can `openZipArchive` to": @guzba, I have to deal with zip files of zip files. That is why I am asking about it 😅 |
20:21:58 | FromDiscord | <Elegantbeef> If you're more comfortable with macros than concepts you're doing something wrong |
20:22:30 | FromDiscord | <Phil> I'm not comfortable with macros! There's a reason I have like 2 of them and actually stole both of them from you |
20:22:51 | FromDiscord | <Elegantbeef> What are you using then? |
20:23:12 | FromDiscord | <Phil> generics. Tons of generics. And to a much, much lesser extent tempaltes |
20:23:15 | FromDiscord | <Phil> (edit) "tempaltes" => "templates" |
20:23:34 | FromDiscord | <Elegantbeef> I mean what is `validateField` or w/e the name is |
20:23:40 | FromDiscord | <Phil> compile time proc |
20:23:48 | FromDiscord | <Elegantbeef> .... |
20:24:06 | FromDiscord | <Phil> It uses nims normal syntax, it just runs at compile time! I will not have that declared a macro! |
20:24:18 | FromDiscord | <Elegantbeef> No but you should use a concept |
20:24:51 | FromDiscord | <Elegantbeef> Actually you might not be able to |
20:26:33 | FromDiscord | <Elegantbeef> So i guess the only take away is use static |
20:26:37 | FromDiscord | <Phil> Oh right, because the concept itself spans multiple types? |
20:26:57 | FromDiscord | <Elegantbeef> Well the issue is you dont have a single type you're wanting to limit a relation ship between 3 types |
20:26:59 | FromDiscord | <Phil> Like, the check is how 3 types behave in relation to one another |
20:27:07 | FromDiscord | <Phil> Yeh |
20:28:17 | FromDiscord | <Phil> I think I could cover this still though, can't I? Make the concept the entire proc signature? |
20:28:26 | FromDiscord | <Elegantbeef> What? |
20:28:27 | FromDiscord | <Phil> Since a proc signature can be a type |
20:29:18 | FromDiscord | <Elegantbeef> How does one make a proc a concept |
20:30:08 | FromDiscord | <jan0809> hi |
20:30:16 | FromDiscord | <Elegantbeef> Hello |
20:30:25 | FromDiscord | <Phil> I definitely haven't written enough Concepts I guess to understand their limitations.↵First trail of thought would've been to go:↵`type Blub = [M1: Model, J: Model, M2: Model](dbConn; queryStartEntry: M1, joinModelEntries: var seq[J], queryEndEntries: var seq[M2], fkColumnFromJoinToManyStart: static string, fkColumnFromJoinToManyEnd: static string)`↵And then throw a concept over that, somehow figure out how to extract the values from that p |
20:31:01 | FromDiscord | <Phil> In reply to @jan0809 "hi": Heyho |
20:31:13 | FromDiscord | <Phil> In reply to @Elegantbeef "What?": Basically just a half baked idea not properly thought through |
20:31:58 | FromDiscord | <Elegantbeef> Actually you might be able to have a concept for this |
20:33:25 | FromDiscord | <Phil> Wouldn't you need to extract the parameter-values that the proc gets called with? |
20:33:47 | FromDiscord | <Phil> Actually, more like get the generic types that the generic proc gets compiled with |
20:34:47 | FromDiscord | <Elegantbeef> sent a code paste, see https://play.nim-lang.org/#ix=40Ci |
20:35:04 | FromDiscord | <Elegantbeef> I dont know what the `validateField` does but... yea something like this could be used if i understand it |
20:36:40 | FromDiscord | <Phil> It basically checks if Type A has a field that is annotated with a pragma that contains Type B |
20:36:53 | FromDiscord | <Phil> (edit) "It basically checks if Type A has a field that is annotated with a pragma that contains Type B ... " added "OR if it has a Field that is of type B" |
20:36:58 | FromDiscord | <Elegantbeef> Well anyway concepts are hard for this problem but probably doable |
20:38:01 | FromDiscord | <Elegantbeef> You actually can do some nice metaprogramming with just concepts + procs https://github.com/beef331/nimtrest/blob/master/yeacs.nim#L5-L26 |
20:41:42 | * | jmdaemon joined #nim |
20:41:50 | * | ehmry quit (Ping timeout: 246 seconds) |
20:48:57 | * | ehmry joined #nim |
20:57:02 | * | emery joined #nim |
20:57:03 | * | ehmry quit (Read error: Connection reset by peer) |
20:57:11 | FromDiscord | <guzba> In reply to @ezquerra "<@318284269908918273>, I have to": yeah i figured it was something like that, funny but not much you can do about it if that is how things are |
20:58:18 | FromDiscord | <ezquerra> This is on windows, where there is no built-in tar tool, so I guess zipping files to "bundle them" is a reasonable alternative, even if what you are zipping is a bunch of zip files |
21:19:34 | FromDiscord | <guzba> the key question is, did those zip archives inside a zip archive get deflated (compressed)↵if they did, you must uncompress them first, nothing can be done about it↵if they did not get compressed, you would in theory be able to work with it directly, though not with current zippy |
21:21:57 | FromDiscord | <ezquerra> I think they are compressed 😦 |
21:23:04 | FromDiscord | <ezquerra> How does Windows Explorer do it though? Explorer lets me "dig into" those zipped zip files. Does it silently extract them into some temp file? The process is pretty fast even though the zip files are pretty large... |
21:28:53 | FromDiscord | <guzba> either they are not compressed (which is possible, most zip composers detect if compressing will not / did not help and will just include it in the zip uncompressed), or they are uncompressing on the fly which can be very fast if the zips are not huge |
21:30:17 | FromDiscord | <guzba> remember -d:release when compiling to get a real sense of speed if you experiment with zippy, makes >10x difference |
21:31:21 | FromDiscord | <jan0809> what about kaitai struct btw, there seem to be a nim runtime for quite w while now right? |
21:31:30 | FromDiscord | <d4rckh> How small can I make a hello world nim binary? |
21:31:41 | FromDiscord | <d4rckh> And which compiler flags should I use? |
21:34:37 | FromDiscord | <jan0809> `nimble build` (?) |
21:34:44 | FromDiscord | <Yardanico> In reply to @d4rckh "How small can I": ~5KB for Linux binaries |
21:34:55 | FromDiscord | <jan0809> oh i missread lol |
21:36:05 | FromDiscord | <Yardanico> In reply to @d4rckh "And which compiler flags": `--gc:arc -d:danger --panics:on --opt:size --passC:"-flto" --passL:"-flto" -d:useMalloc -d:noSignalHandler` will work for Windows as well |
21:36:12 | FromDiscord | <d4rckh> In reply to @Yardanico "~5KB for Linux binaries": What about windows? |
21:36:13 | FromDiscord | <Yardanico> don't forget to `strip -s` the binary afterwards |
21:48:16 | FromDiscord | <vestel> How to get rid of this import? Compiled dll for 32-bit and smh this c-lib func appeared in IAT https://media.discordapp.net/attachments/371759389889003532/988923333255000154/unknown.png |
21:48:49 | FromDiscord | <Yardanico> nim doesn't use that directly |
21:49:08 | FromDiscord | <vestel> In reply to @Yardanico "nim doesn't use that": Still windows loader fails to load dll |
21:49:14 | FromDiscord | <Yardanico> maybe it's some C compiler issue |
21:49:28 | FromDiscord | <Yardanico> ah libgcc, do you have 32-bit libgcc installed? |
21:49:35 | FromDiscord | <vestel> Maybe, cause when compiling for 64 bit all is ok |
21:49:46 | FromDiscord | <vestel> In reply to @Yardanico "ah libgcc, do you": Idk, just drag-n-dropped ming32 |
21:50:01 | FromDiscord | <vestel> (edit) "ming32" => "mingw32" |
21:50:30 | FromDiscord | <vestel> Still 32-bit executables doesn't have this import |
21:50:31 | FromDiscord | <Yardanico> if you want to statically link that, the best way is to just use tdm-gcc as it'll link all that libgcc exception lib stuff automatically |
21:51:03 | Amun-Ra | Yardanico_: or pass -s instead directly |
21:51:29 | FromDiscord | <Yardanico> In reply to @Amun-Ra "Yardanico_: or pass -s": that doesn't work as well as `strip -s` does in all cases :P |
21:51:33 | FromDiscord | <Yardanico> 🤷 |
21:52:14 | Amun-Ra | hmm, it did in my tests :> |
21:58:24 | FromDiscord | <Elegantbeef> @Prestige\: so i had yet another idea for how to mock procs using TRMs https://github.com/beef331/nimtrest/tree/master/mocker |
21:59:23 | FromDiscord | <Elegantbeef> It's a much dumber method which might mean it will work bettererer |
22:12:01 | FromDiscord | <🐒🧠br4n_d0n> While I was looking at the Nim github I stumbled across Nimskull again and wondered what was actually so different about it. Anyone care to explain in layman's terms? |
22:12:49 | FromDiscord | <Elegantbeef> Did you read the readme |
22:12:49 | FromDiscord | <Elegantbeef> They explain what their reason for existence is |
22:13:07 | FromDiscord | <🐒🧠br4n_d0n> I skimmed it, but didn't understand it really |
22:13:12 | * | ltriant joined #nim |
22:13:44 | FromDiscord | <🐒🧠br4n_d0n> There's a reason I added the Monkey and Brain emoji to my username |
22:13:48 | FromDiscord | <Elegantbeef> They do not like the leadership of Nim and also do not like the way the language is going so want to make their own version |
22:14:59 | FromDiscord | <🐒🧠br4n_d0n> OK, is there an example of what was so wrong with the direction of the language that they decided to change it? |
22:15:15 | FromDiscord | <Elegantbeef> They have many PRs active and merged you can look at |
22:15:26 | FromDiscord | <Elegantbeef> I'm not going to explain their views cause i dont even know it |
22:15:53 | FromDiscord | <🐒🧠br4n_d0n> I tried looking at it, but it all went over my head |
22:16:24 | FromDiscord | <Elegantbeef> Then dont worry about it |
22:17:50 | * | ltriant quit (Ping timeout: 240 seconds) |
22:18:55 | FromDiscord | <🐒🧠br4n_d0n> I'm just trying to keep an open mind because I'm not 100% sold on any programming language at the moment. Guess I'm trying to unrealistically be "Goldilocks s" over here |
22:19:15 | FromDiscord | <Elegantbeef> I mean it's not "usable" atm |
22:19:53 | FromDiscord | <🐒🧠br4n_d0n> Well then, that helps me with that decision |
22:19:58 | FromDiscord | <🐒🧠br4n_d0n> lol |
22:20:48 | FromDiscord | <Elegantbeef> It's a hard fork being developed by people who are working on it on their freetime so it does have many changes but is actively under development |
22:39:24 | * | ltriant joined #nim |
22:40:41 | * | cyraxjoe joined #nim |
22:46:32 | * | jmdaemon quit (Quit: ZNC 1.8.2 - https://znc.in) |
22:47:39 | * | jmdaemon joined #nim |
22:51:37 | * | wallabra quit (Ping timeout: 248 seconds) |
22:55:52 | * | jmdaemon quit (Quit: ZNC 1.8.2 - https://znc.in) |
22:55:54 | * | ltriant quit (Read error: Connection reset by peer) |
23:01:08 | * | ltriant joined #nim |
23:21:25 | * | rockcavera quit (Remote host closed the connection) |
23:41:45 | * | rockcavera joined #nim |
23:41:45 | * | rockcavera quit (Changing host) |
23:41:45 | * | rockcavera joined #nim |
23:42:15 | * | cyraxjoe quit (Quit: I'm out!) |