00:00:25 | * | flynn joined #nim |
00:30:23 | * | flynn quit (Read error: Connection reset by peer) |
00:31:32 | * | flynn joined #nim |
00:40:38 | * | auxym quit (Quit: Konversation terminated!) |
00:40:53 | * | auxym joined #nim |
01:04:19 | FromDiscord | <shadow.> sent a code paste, see https://paste.rs/oXA |
01:04:34 | FromDiscord | <shadow.> (edit) "https://play.nim-lang.org/#ix=3yai" => "https://play.nim-lang.org/#ix=3yah" |
01:04:44 | * | vicfred quit (Quit: Leaving) |
01:04:47 | FromDiscord | <shadow.> (edit) "https://play.nim-lang.org/#ix=3yah" => "https://play.nim-lang.org/#ix=3yaj" |
01:04:48 | FromDiscord | <shadow.> (edit) "https://play.nim-lang.org/#ix=3yaj" => "https://play.nim-lang.org/#ix=3yak" |
01:08:46 | * | Jjp137 quit (Quit: Leaving) |
01:08:48 | FromDiscord | <shadow.> got it, `(emoji | 1)` |
01:10:43 | * | Jjp137 joined #nim |
01:12:19 | * | neurocyte0 joined #nim |
01:12:19 | * | neurocyte0 quit (Changing host) |
01:12:19 | * | neurocyte0 joined #nim |
01:14:22 | * | neurocyte quit (Ping timeout: 252 seconds) |
01:14:22 | * | neurocyte0 is now known as neurocyte |
01:16:06 | * | arkurious quit (Quit: Leaving) |
01:51:55 | * | auxym quit (Quit: Konversation terminated!) |
01:52:10 | * | auxym joined #nim |
02:45:07 | * | watzon quit (Ping timeout: 252 seconds) |
02:50:09 | * | watzon joined #nim |
03:02:07 | * | watzon quit (Ping timeout: 245 seconds) |
03:50:04 | FromDiscord | <retkid> is there anyway to use nim to generate dependency free python |
03:50:14 | FromDiscord | <retkid> using nim as frontend and python as a backend |
03:54:49 | FromDiscord | <aleclarson> relatively how much faster is incremental compilation? |
03:54:56 | FromDiscord | <Rika> Much |
03:55:17 | FromDiscord | <Rika> Proportional to the amount of code you have to compile |
03:55:46 | FromDiscord | <retkid> i've been thinking about incremental compilation as a concept for like 8 months now and didn't know what its called |
03:56:04 | FromDiscord | <aleclarson> ur welcome \:) |
03:56:15 | FromDiscord | <retkid> "why dont they just keep 90% of the bytecode and just like snip back the differences" |
03:56:17 | FromDiscord | <Rika> In reply to @retkid "is there anyway to": What does this menac |
03:56:19 | FromDiscord | <Rika> Mean |
03:56:36 | FromDiscord | <aleclarson> i want to use it, but i'm using choosenim.↵is there a guide for building nim yourself? |
03:56:40 | FromDiscord | <Rika> In reply to @retkid ""why dont they just": Because it’s complex |
03:57:00 | FromDiscord | <Rika> In reply to @aleclarson "i want to use": What is the issue? You can install devel using it |
03:57:17 | FromDiscord | <aleclarson> and that has incremental flag enabled? |
03:57:24 | FromDiscord | <retkid> In reply to @Rika "Because it’s complex": well yea compilation is a lot more complicated than that |
03:57:30 | FromDiscord | <Elegantbeef> you do `--ic:on` with the compiler |
03:57:32 | FromDiscord | <retkid> but just an id |
03:57:33 | FromDiscord | <Rika> Probably not actually I haven’t checked |
03:57:34 | FromDiscord | <retkid> (edit) "id" => "idea" |
03:58:44 | FromDiscord | <aleclarson> sent a code paste, see https://play.nim-lang.org/#ix=3yaB |
03:58:47 | FromDiscord | <Elegantbeef> Well choosenim doesnt allow you to build danger 😛 |
03:58:55 | FromDiscord | <retkid> I kinda want an archive attached to a nim executable where nim acts as the entry point and executes the code via an entry point |
03:58:58 | FromDiscord | <Elegantbeef> may want to do `choosenim update devel` |
03:59:13 | FromDiscord | <retkid> i kinda regret ever programming this in python |
03:59:29 | FromDiscord | <retkid> but its not wroth it to rewrite it |
03:59:35 | FromDiscord | <retkid> (edit) "wroth" => "worth" |
03:59:36 | FromDiscord | <Elegantbeef> choosenim uses nightlies so you'll be a few commits behind but nothing bad with regards to IC |
04:00:30 | FromDiscord | <aleclarson> i dont see `--ic` on this page↵https://nim-lang.org/docs/nimc.html |
04:00:32 | * | auxym quit (Ping timeout: 252 seconds) |
04:00:38 | FromDiscord | <Elegantbeef> Well that's stable |
04:00:42 | FromDiscord | <Elegantbeef> So... makes sense 😛 |
04:00:52 | FromDiscord | <aleclarson> mm yiss |
04:01:30 | FromDiscord | <Elegantbeef> Also doesnt appear in the compiler docs right now either |
04:02:00 | FromDiscord | <Elegantbeef> ah seems `--ic:on` might be a shortcut for `--incremental` |
04:06:00 | FromDiscord | <aleclarson> > Error: You are working with an old version of Nimble cache repository.↵> Hint: Please delete your "/Users/alec/.nimble" directory.↵↵I did as it said, and now I have no `nimble` command 😐 |
04:06:02 | * | supakeen quit (Quit: WeeChat 3.2.1) |
04:06:25 | FromDiscord | <Elegantbeef> Well your nimble file was probably there |
04:06:26 | FromDiscord | <Rika> Ugh |
04:06:30 | * | supakeen joined #nim |
04:06:31 | FromDiscord | <Rika> Uhh |
04:06:41 | FromDiscord | <Rika> Yeah a lot of things are there |
04:07:09 | FromDiscord | <aleclarson> luckily i alias `rm` to move to trash |
04:07:36 | FromDiscord | <aleclarson> what do i delete instead |
04:17:31 | FromDiscord | <aleclarson> deleting `~/.nimble/{nimbledata.json,pkgs}` worked |
04:22:07 | FromDiscord | <aleclarson> what in gods name↵> Error: File exists↵> ... Additional info: ("../pkgs/nimterop-0.6.13-a93246b2ad5531db11e51de7b2d188c42d95576a/nimterop/loaf", "/Users/alec/.nimble/bin/loaf") |
04:22:12 | FromDiscord | <aleclarson> on `nimble install` |
04:22:41 | FromDiscord | <Elegantbeef> You're installing something that needs nimterop it's attempting to build loaf and it exists |
04:23:33 | FromDiscord | <aleclarson> oh just gotta delete `~/.nimble/bin/loaf` |
04:24:01 | FromDiscord | <Elegantbeef> Swear there needs to be something that gives nimble a fresh start cause i've had a few issues similar to this |
04:26:52 | FromDiscord | <aleclarson> maybe i'm crazy, but i'd prefer a `npm` like approach, where local packages install into `node_modules` and bin files into `node_modules/.bin` |
04:27:22 | * | FromDiscord quit (Remote host closed the connection) |
04:27:37 | * | FromDiscord joined #nim |
04:27:50 | FromDiscord | <aleclarson> no chance for conflict between `.nimble` files |
04:28:13 | FromDiscord | <aleclarson> although the deduplication of global cache is nice |
04:28:15 | FromDiscord | <Elegantbeef> There still isnt presently |
04:30:37 | FromDiscord | <aleclarson> oh weird, in some cases the symlink in `~/.nimble/bin` is replaced just fine↵> Warning: Symlink already exists in /Users/alec/.nimble/bin/napibuild. Replacing. |
04:30:50 | FromDiscord | <aleclarson> probably cuz i linked in a local clone manually |
04:38:40 | FromDiscord | <no name fits> What's the standard practice for making an `object` into a `ref object`? I'm aware I have to copy the `object` into the new `ref`, but what's the best way to go about that? |
04:39:38 | FromDiscord | <Elegantbeef> sent a code paste, see https://play.nim-lang.org/#ix=3yaG |
04:40:22 | FromDiscord | <Elegantbeef> sent a code paste, see https://play.nim-lang.org/#ix=3yaI |
04:40:23 | FromDiscord | <no name fits> Thanks! |
04:41:15 | * | mahlon quit (*.net *.split) |
04:41:53 | * | mahlon joined #nim |
04:49:56 | FromDiscord | <πτ (pi man)> sent a code paste, see https://play.nim-lang.org/#ix=3yaJ |
04:50:20 | FromDiscord | <Elegantbeef> the sequence is mutable but the objects are not? |
04:50:50 | FromDiscord | <πτ (pi man)> yea |
04:52:01 | FromDiscord | <Elegantbeef> There is no built in way that i know of, you'd need your own API over the collection |
04:52:23 | FromDiscord | <πτ (pi man)> hmm, ok |
04:56:15 | FromDiscord | <Elegantbeef> sent a code paste, see https://play.nim-lang.org/#ix=3yaO |
04:57:14 | * | andinus quit (*.net *.split) |
04:57:14 | * | pjzz quit (*.net *.split) |
04:57:14 | * | systemdsucks quit (*.net *.split) |
04:57:36 | * | systemdsucks joined #nim |
04:57:46 | * | pjzz joined #nim |
04:57:47 | * | andinus joined #nim |
05:08:10 | * | flynn quit (Read error: Connection reset by peer) |
05:09:16 | * | flynn joined #nim |
05:40:02 | * | max22- joined #nim |
06:40:39 | * | PMunch joined #nim |
06:45:02 | * | xet7 joined #nim |
06:48:14 | * | jjido joined #nim |
07:03:48 | * | xet7 quit (Remote host closed the connection) |
07:04:51 | * | xet7 joined #nim |
07:10:44 | * | userj joined #nim |
08:00:37 | NimEventer | New thread by Miran: Nim 1.6.0 RC1, see https://forum.nim-lang.org/t/8404 |
08:01:37 | FromDiscord | <impbox [ftsf]> omg 1.6 |
08:01:47 | FromDiscord | <impbox [ftsf]> is there a summary of what's different between 1.4->1.6? |
08:02:28 | PMunch | Not for the RC it seems |
08:04:26 | FromDiscord | <Elegantbeef> @impbox [ftsf]\: https://github.com/nim-lang/Nim/blob/devel/changelog.md |
08:08:11 | FromDiscord | <fae> My first Nim package, and first time doing FFI with C <https://github.com/farism/flex> plz b gentle |
08:08:35 | FromDiscord | <fae> I'm glad I picked a relatively simple library for my first attempt |
08:08:39 | FromDiscord | <Elegantbeef> "please be gentle" means what "code review please" 😛 |
08:09:18 | FromDiscord | <fae> it means if you happen to look at it don't be surprised if I have done stuff that makes no sense 😄 |
08:10:57 | PMunch | Hmm, build failed: http://ix.io/3ybd |
08:14:36 | FromDiscord | <Elegantbeef> Well fae i do want to point out you do not need to set the first enum to `= 0` it's by default 😀 |
08:15:46 | * | PMunch quit (Ping timeout: 252 seconds) |
08:15:55 | FromDiscord | <Elegantbeef> Also you dont need `importC` if the nim name is the same as the C name, i'll stop giving unasked for suggestions eventually |
08:15:56 | FromDiscord | <Elegantbeef> Same issue here pmunch |
08:16:52 | FromDiscord | <fae> every suggestion is (implicitly) asked for, best way to learn |
08:23:23 | FromDiscord | <fae> if i try to remove the pragma i get a syntax error saying implementation expected |
08:24:28 | FromDiscord | <Elegantbeef> i forgot to say you dont need the string name |
08:24:28 | FromDiscord | <Elegantbeef> you need importC, but not the string after |
08:24:58 | FromDiscord | <fae> gotcha, string is just to map it to a diff name |
08:24:59 | FromDiscord | <fae> ty |
08:25:13 | * | jjido quit (Quit: My MacBook Air has gone to sleep. ZZZzzz…) |
08:26:05 | FromDiscord | <impbox [ftsf]> @fae looks awesome! |
08:26:17 | FromDiscord | <impbox [ftsf]> would be great for game ui |
08:26:45 | FromDiscord | <impbox [ftsf]> it's not locked to any specific drawing api right? |
08:27:04 | FromDiscord | <fae> no |
08:27:09 | FromDiscord | <fae> it just returns rects |
08:27:28 | FromDiscord | <impbox [ftsf]> sweet |
08:27:32 | FromDiscord | <fae> i happen to be using sdl2 here but i want to try out pixie |
08:32:00 | FromDiscord | <fae> there is also this <https://github.com/mvenditto/nim-yoga> which is kind of the same thing but pretty old and yoga is c++ |
08:32:26 | FromDiscord | <fae> was happy to find a pure c lib that did the same thing, granted it doesnt have all the features/performance of yoga |
08:32:58 | FromDiscord | <Elegantbeef> The next step is to make it pure nim 😛 |
08:34:04 | FromDiscord | <fae> so I thought about porting yoga to Nim at one point to learn Nim better, but that is a pretty lofty undertaking lol |
08:42:44 | NimEventer | New thread by Jasonfi: Reading stream data only when there is data available, see https://forum.nim-lang.org/t/8405 |
08:44:55 | * | PMunch joined #nim |
08:57:48 | FromDiscord | <zidsal> https://forum.nim-lang.org/t/8404 is there a list of changes in nim 1.6.0 RC1 yet? or do i need to crawl through git commits? |
08:58:00 | FromDiscord | <zidsal> nevermind I should scroll up and read discord |
08:58:04 | FromDiscord | <Yardanico> you can always just read the changelog |
08:58:15 | FromDiscord | <Yardanico> but ofc for all fixed issue you'll have to wait for release |
08:58:20 | FromDiscord | <Yardanico> (edit) "issue" => "issues" |
08:58:32 | FromDiscord | <zidsal> ya I just saw that post by elegant now I look foolish! |
09:01:23 | FromDiscord | <Rika> There was a unary slice operator?? |
09:01:27 | FromDiscord | <Yardanico> In reply to @Rika "There was a unary": ofc? |
09:01:46 | FromDiscord | <Yardanico> and not "was", it still is there |
09:01:51 | FromDiscord | <Yardanico> it was simply deprecated for 1.6 |
09:02:27 | FromDiscord | <Rika> What do you mean of course no one seems to have ever talked about it |
09:03:02 | FromDiscord | <Yardanico> well, I certainly used it on code-golf.io for shortening nim code |
09:03:28 | FromDiscord | <zidsal> sent a code paste, see https://play.nim-lang.org/#ix=3ybl |
09:04:01 | FromDiscord | <Rika> Here marks the conversion of Nim to APL |
09:04:33 | FromDiscord | <Yardanico> well, it'll need an experimental flag specifically passed to the compiler :) |
09:04:41 | FromDiscord | <Yardanico> but yeah, I hope people don't overuse it too much |
09:04:53 | FromDiscord | <zidsal> too late, I'm already making PR to nico, |
09:05:27 | FromDiscord | <Yardanico> but what about backwards compatibility?! |
09:05:48 | FromDiscord | <zidsal> you mean you don't want an api as easy as ⊗★9 |
09:11:13 | FromDiscord | <Rika> > deprecated any↵Nice |
09:14:06 | FromDiscord | <Yardanico> there's also an great thing for noSideEffect fans not mentioned in the changelog - https://github.com/nim-lang/Nim/pull/18418/ :) |
09:14:15 | FromDiscord | <Yardanico> a |
09:14:49 | FromDiscord | <haxscramper> yeah, it is strange that changelog does not mention compilation error changes, at least ones that are so noticeable |
09:15:02 | FromDiscord | <Yardanico> In reply to @haxscramper "yeah, it is strange": because the PR authors didn't add them :P |
09:15:03 | FromDiscord | <haxscramper> also there is a fix, finally for invalid discriminant value |
09:15:19 | FromDiscord | <haxscramper> now it shows the value |
09:15:20 | FromDiscord | <Yardanico> you (or me, or someone else) can make a PR adding those things to the changelog |
09:21:56 | FromDiscord | <haxscramper> We also need to find some smart person and ask for correct names for some operators - `"∙ ∘ × ★ ⊗ ⊘ ⊙ ⊛ ⊠ ⊡ ∩ ∧ ⊓ ± ⊕ ⊖ ⊞ ⊟ ∪ ∨ ⊔"`, like `⊔ ⊠ ⊡` "the crossed square operator" is probably not correct nmae |
09:22:13 | FromDiscord | <haxscramper> This is all domain-specific, but at last something google-able would be nice |
09:29:20 | FromDiscord | <pointystick> Are the Unicode names any use for this? https://www.compart.com/en/unicode/block/U+2200 |
09:30:22 | FromDiscord | <Yardanico> @haxscramper it's called "squared times" :P |
09:30:48 | FromDiscord | <Yardanico> a star is just a star though ("black star") |
09:31:15 | FromDiscord | <haxscramper> I can use unicode search as well, yes |
09:31:47 | FromDiscord | <haxscramper> But for some reason I doubt that it is just called "square times" and not "multipicative someting-something" when it is actually used |
09:33:11 | FromDiscord | <Yardanico> oh! |
09:33:15 | FromDiscord | <Yardanico> apparently you can use wiktionary for that |
09:33:15 | FromDiscord | <Yardanico> https://en.wiktionary.org/wiki/%E2%8A%A0 |
09:33:20 | FromDiscord | <Yardanico> https://media.discordapp.net/attachments/371759389889003532/884733063072997376/unknown.png |
09:33:22 | FromDiscord | <Yardanico> "Free multiplicative convolution" |
09:41:51 | FromDiscord | <haxscramper> sent a code paste, see https://play.nim-lang.org/#ix=3ybx |
09:43:37 | FromDiscord | <haxscramper> (edit) "https://play.nim-lang.org/#ix=3ybx" => "https://play.nim-lang.org/#ix=3yby" |
09:43:45 | FromDiscord | <haxscramper> Or use SCF for ∈ to `in` |
09:51:15 | * | flynn quit (Read error: Connection reset by peer) |
09:52:20 | * | flynn joined #nim |
10:14:30 | arkanoid | I feel like being on the wrong side of the river. I've never used 2 of the 8 modules imported by prelude. 2 of the most "common modules" are unknown to me after months of nim |
10:15:30 | FromDiscord | <Yardanico> i never use prelude |
10:15:44 | FromDiscord | <Yardanico> it's nice for some really quick prototyping, but I prefer to specify imports right away |
10:16:44 | arkanoid | yeah I do prefer that too, but not using parseutils or parseopt makes me feed excluded from the prelude party |
10:17:02 | arkanoid | s/feed/feel |
10:17:34 | FromDiscord | <haxscramper> `parseutils, parseopt` are not really common |
10:17:39 | FromDiscord | <haxscramper> `times` is very specific |
10:17:46 | FromDiscord | <haxscramper> https://github.com/nim-lang/RFCs/issues/398#issuecomment-891762652 |
10:18:12 | FromDiscord | <haxscramper> it seems like this is a prelude-for-something-like-command-line-application |
10:19:03 | FromDiscord | <haxscramper> `options` is more common than |
10:19:47 | FromDiscord | <Yardanico> yeah, I'd agree, parseutils isn't common |
10:20:04 | FromDiscord | <Yardanico> parseopt might be common for CLI apps if you want to use a pure-stdlib solution, otherwise there are things like cligen, docopt, argparse, etc |
10:20:22 | FromDiscord | <haxscramper> sent a code paste, see https://play.nim-lang.org/#ix=3ybM |
10:20:34 | FromDiscord | <haxscramper> in `hmisc` I have multiple preludes |
10:20:40 | FromDiscord | <haxscramper> For unit testing, for CLI apps |
10:20:45 | FromDiscord | <haxscramper> And plan to add a couple more |
10:23:24 | * | flynn quit (Read error: Connection reset by peer) |
10:23:56 | * | Vladar joined #nim |
10:24:30 | * | flynn joined #nim |
10:34:22 | * | flynn quit (Read error: Connection reset by peer) |
10:34:43 | * | arkurious joined #nim |
10:35:29 | * | flynn joined #nim |
10:42:41 | * | flynn quit (Read error: Connection reset by peer) |
10:43:48 | * | flynn joined #nim |
10:47:19 | arkanoid | prelude is a lie! |
10:48:44 | arkanoid | I'd really like to read something about error handling patterns/strategies/tecniques. I'm puzzled about exceptions vs options |
10:49:45 | * | flynn quit (Read error: Connection reset by peer) |
10:50:33 | arkanoid | I've been using exceptions basically all my life, except recently where I've been pushing some pure code and some monads into imperative programming. Point is that even if I feel that options is the "way to go", it also feels much harder than exceptions to deal with and I tend to produce messy verbose code. I'd like to fix that |
10:50:50 | * | flynn joined #nim |
10:53:34 | FromDiscord | <haxscramper> I don't think there are any writeups about error handling strategies, or at least I don't know of any that are nim-specific. |
10:53:53 | FromDiscord | <haxscramper> But I would recommend to stop worrying and just use exceptions |
10:54:19 | FromDiscord | <haxscramper> Default to exceptions, and use options where you want to explicitly communicate optionality of the value |
10:54:44 | arkanoid | Dr. Strangelove approves |
11:15:10 | * | flynn quit (Ping timeout: 260 seconds) |
11:18:20 | * | flynn joined #nim |
11:40:44 | FromDiscord | <Recruit_main707> sent a code paste, see https://play.nim-lang.org/#ix=3yc6 |
12:00:40 | * | max22- quit (Ping timeout: 260 seconds) |
12:03:38 | FromDiscord | <Recruit_main707> and can `=destroy`, `=copy`, etc be methods? |
12:06:02 | * | supakeen quit (Quit: WeeChat 3.2.1) |
12:06:30 | * | supakeen joined #nim |
12:07:41 | * | Zevv left #nim (#nim) |
12:13:51 | FromDiscord | <Yardanico> ofc not :) |
12:13:58 | FromDiscord | <Yardanico> (not on nim side) |
12:22:03 | FromDiscord | <Recruit_main707> do you mean the destroy function? |
12:22:07 | FromDiscord | <Recruit_main707> or the method? |
12:23:08 | arkanoid | I'm wrapping this sprintf like C function, not sure how to use cstring in this context https://www.genivia.com/doc/guide/html/group__group__fault.html#gafc9d67060889f7243381299047f0e8e6 |
12:23:19 | FromDiscord | <Rika> wrapping == always use cstring... |
12:23:42 | arkanoid | Rika, what do you mean? |
12:24:18 | FromDiscord | <Rika> if you're wrapping, always use cstring instead of string. or what do you mean? cstring is equivalent to char in c |
12:24:32 | FromDiscord | <Rika> size_t -> csize |
12:25:07 | FromDiscord | <Recruit_main707> csize_t apparently csize is deprecated |
12:25:15 | FromDiscord | <Rika> oh huh really |
12:25:16 | FromDiscord | <Rika> okay |
12:33:22 | arkanoid | didn't know there was a csize_t |
12:36:29 | * | stkrdknmibalz quit (Quit: WeeChat 3.0.1) |
12:38:21 | FromDiscord | <Recruit_main707> when static linking a library `foo.lib`, i should do `--passL:foo.lib` and `--dynlibOverride:foo`? i dont understand what does dynlibOverride expect, the static lib name? |
12:39:42 | arkanoid | Recluit_main707: best option is using dymlib pragma, less optimal option is using passL |
12:40:16 | arkanoid | dynlibOverride is used for other purposes |
12:40:31 | arkanoid | wait, I misread, you wrote static |
12:40:55 | arkanoid | so you should use link pragma: https://nim-lang.org/docs/manual.html#implementation-specific-pragmas-link-pragma |
12:41:33 | arkanoid | I'm lazy and I'm using passL actually to static link my app |
12:42:07 | arkanoid | {.passL:"-Lout -l:libonvifclient.a -l:libgsoapssl.a -l:libssl.a -l:libcrypto.a -l:libz.a -l:libm.a".} |
12:47:48 | FromDiscord | <Yardanico> In reply to @Recruit_main707 "when static linking a": dynlibOverride is used when you want to statically link libraries that Nim uses as dynamic ones by default |
12:47:49 | FromDiscord | <Yardanico> e.g. OpenSSL |
12:47:58 | FromDiscord | <Yardanico> I mean nim stdlib |
12:49:24 | FromDiscord | <Recruit_main707> ok, thanks |
13:26:39 | arkanoid | Yardanico, but what if I don't use --d:ssl switch but I do {.passL: "-l:libssl.a -l:libcrypto.a -l:libz.a -l:libm.a".}, do I still need to use dynlibOverride? |
13:27:09 | FromDiscord | <Yardanico> no, but then SSL support in httpclient will be disabled and it won't use these statically linked libs |
13:27:36 | arkanoid | got it, thanks |
13:44:05 | * | max22- joined #nim |
14:00:37 | * | PMunch quit (Quit: Leaving) |
14:15:42 | FromDiscord | <gabreal> Hello hello everyone |
14:15:46 | FromDiscord | <gabreal> 👋 |
14:16:30 | FromDiscord | <Rika> i do not recall your former name |
14:16:37 | FromDiscord | <gabreal> Avatarfighter 🙂 |
14:16:54 | FromDiscord | <gabreal> what’s good rika |
14:16:56 | FromDiscord | <Rika> did you get tired of fighting avatars |
14:17:02 | FromDiscord | <gabreal> a bit :p |
14:17:35 | FromDiscord | <gabreal> its tough having that username since the 2nd grade you know sometimes you got to spice things up |
14:18:07 | nrds | <Prestige99> ay gabreal |
14:18:52 | FromDiscord | <gabreal> sup prestige 🙂 |
14:19:38 | nrds | <Prestige99> Just work, dealing with database nonsense :P hbu? |
14:20:47 | FromDiscord | <gabreal> porting my program to cps it’s been a bit rough on the learning curve |
14:23:42 | nrds | <Prestige99> hard to work with? I haven't seen much about cps yet |
14:24:06 | FromDiscord | <Rika> its a concept that is hard to wrap your head around |
14:24:12 | FromDiscord | <Yardanico> In reply to @gabreal "porting my program to": curious - any reason you want cps specifically? |
14:24:19 | FromDiscord | <Yardanico> or just to play around? |
14:24:45 | * | maxime_ joined #nim |
14:24:49 | FromDiscord | <gabreal> cps needs more real usage to improve so I’m learning it |
14:25:33 | FromDiscord | <gabreal> It’s also extremely light on resources for me atm much lighter than my nim async and goroutine versions of my bot |
14:25:53 | FromDiscord | <gabreal> Idk it has some advantages to me that are valuable |
14:26:08 | FromDiscord | <Yardanico> is your code open? |
14:26:17 | FromDiscord | <gabreal> No sadly I am selling my program |
14:26:36 | FromDiscord | <gabreal> im just trying to find weird behavior/complain abt things that should be easier |
14:26:48 | FromDiscord | <gabreal> one complaint i have is the lack of for loops though that is a nim bug afaik |
14:27:40 | * | max22- quit (Ping timeout: 260 seconds) |
14:27:42 | FromDiscord | <gabreal> Prestige: It is a bit hard to wrap my head around how to structure everything :p |
14:28:09 | FromDiscord | <Hamid Bluri> where is docs for nim devel? |
14:28:18 | FromDiscord | <Yardanico> https://nim-lang.github.io/Nim/ |
14:28:22 | FromDiscord | <Hamid Bluri> thanks |
14:29:06 | FromDiscord | <Yardanico> In reply to @gabreal "No sadly I am": do you use http/https? if yes, I guess you had to write http client code supporting cps yourself? |
14:29:07 | FromDiscord | <Rika> In reply to @gabreal "No sadly I am": mans moved up in the world |
14:29:09 | * | vicfred joined #nim |
14:29:11 | * | vicfred quit (Client Quit) |
14:29:11 | FromDiscord | <Rika> im still here doing jack |
14:29:59 | FromDiscord | <gabreal> In reply to @Yardanico "do you use http/https?": Yeah I am still implementing my httpclient |
14:30:06 | nrds | <Prestige99> gabreal hopefully it improves with time |
14:30:12 | FromDiscord | <Yardanico> In reply to @gabreal "Yeah I am still": maybe you can at least open source that part in the future? :P |
14:30:20 | FromDiscord | <gabreal> ofc ofc |
14:30:28 | FromDiscord | <Yardanico> did you start from the normal httpclient source? |
14:30:35 | FromDiscord | <Yardanico> or decided to write your own from ground up? |
14:30:43 | FromDiscord | <gabreal> No I have different needs than what httpclient can provide :p |
14:30:50 | FromDiscord | <Yardanico> huh |
14:31:35 | FromDiscord | <gabreal> Im not sure how to explain it lol |
14:32:07 | FromDiscord | <gabreal> I needed a real cookie jar, better header handling, ability to stream bytes manually and greater proxy support |
14:32:10 | FromDiscord | <Rika> are you still making that thing we tried |
14:32:12 | FromDiscord | <gabreal> Yeah |
14:32:16 | FromDiscord | <Rika> i see |
14:32:22 | FromDiscord | <Yardanico> 👀? |
14:32:25 | FromDiscord | <gabreal> Since December 😩 |
14:32:36 | FromDiscord | <Rika> damn that was a while back |
14:32:36 | FromDiscord | <Yardanico> crypto trading bot? :D |
14:32:40 | FromDiscord | <gabreal> Nah ahah |
14:32:42 | FromDiscord | <Rika> lets say its that |
14:32:44 | FromDiscord | <Rika> its close enough |
14:32:50 | FromDiscord | <Yardanico> hmMmm |
14:32:51 | FromDiscord | <gabreal> ^ |
14:32:56 | FromDiscord | <gabreal> not at all crypto related tho |
14:33:01 | FromDiscord | <gabreal> it is a bot :p |
14:33:09 | FromDiscord | <Rika> and its technically for trading |
14:33:12 | FromDiscord | <gabreal> ^ |
14:33:15 | FromDiscord | <Yardanico> is the bot itself in so-called "grey zone"? 🤔 |
14:33:22 | FromDiscord | <gabreal> yeah |
14:33:26 | FromDiscord | <Rika> yessir |
14:33:32 | FromDiscord | <Yardanico> now im curious |
14:33:41 | FromDiscord | <Rika> yards in on it bet |
14:33:43 | FromDiscord | <Rika> i kid |
14:33:53 | FromDiscord | <gabreal> it’s been really fun making it ngl I’ve been ripping apart antibots like they are nothing |
14:34:10 | FromDiscord | <Rika> lmao |
14:34:16 | FromDiscord | <Rika> thats pretty cool |
14:34:38 | FromDiscord | <gabreal> right ahah |
14:38:13 | arkanoid | you said that "char *" is cstring, correct? |
14:38:40 | FromDiscord | <Hamid Bluri> what is `Example: cmd: -r:off` in the docs? and what it does? |
14:39:25 | FromDiscord | <Rika> arkanoid yes why |
14:39:30 | FromDiscord | <Rika> it should be so afaik |
14:40:01 | FromDiscord | <Yardanico> In reply to @hamidb80 "what is `Example: cmd:": you can ignore it, it's runnableExamples-specific |
14:40:09 | FromDiscord | <Yardanico> means that the specified example code shouldn't run when being tested |
14:40:59 | FromDiscord | <Yardanico> by default runnableExamples will get compiled and run, but with that flag nim doc will only check that it compiles |
14:42:46 | arkanoid | Rika: I'm dealing with SIGSEGV when I try to call this wrapped function this way: https://play.nim-lang.org/#ix=3ycJ |
14:44:09 | arkanoid | do you see any error in my wrapper proc or on how I am calling it? |
14:45:50 | FromDiscord | <Rika> it doesnt seem wrong, maybe do `s[0].addr` instead though (but i believe that should be unnecessary...) |
14:46:42 | FromDiscord | <Yardanico> that's actually pretty really important @Rika |
14:46:50 | FromDiscord | <Yardanico> also implicit cstring conversion is now deprecated in nim |
14:46:55 | FromDiscord | <leorize> and the string should be allocated with `newString` then truncated |
14:47:07 | FromDiscord | <Rika> In reply to @Yardanico "also implicit cstring conversion": ah it is? |
14:47:19 | FromDiscord | <Rika> i see |
14:47:23 | FromDiscord | <Rika> okay then it is necessary] |
14:47:36 | FromDiscord | <leorize> if you allocate it with newStringOfCap, the length will be 0 and when you expand the buffer, Nim will zero out the buffer |
14:48:22 | FromDiscord | <leorize> you only have to explicitly convert it, no need for addr↵(@Yardanico) |
14:48:42 | FromDiscord | <Anuke> is this PR as exciting as it sounds? <https://github.com/nim-lang/Nim/pull/18818> |
14:48:50 | FromDiscord | <Yardanico> yes, have you read the RFC? |
14:48:56 | FromDiscord | <Yardanico> also there's some technical discussion in #internals |
14:49:09 | FromDiscord | <Yardanico> https://github.com/nim-lang/RFCs/issues/416 is the RFC |
14:52:04 | arkanoid | leorize, correct, now it works. len vs cap, makes a lot of sense |
14:52:34 | arkanoid | but string -> cstring implicit conversion works on 1.4.8 |
14:53:17 | FromDiscord | <Yardanico> I didn't say it doesn't work anymore, I said it's _deprecated_ now in devel and will be in 1.6 |
14:53:25 | FromDiscord | <Yardanico> the compiler will show a warning |
14:54:03 | FromDiscord | <Anuke> In reply to @Yardanico "yes, have you read": yeah |
14:54:32 | FromDiscord | <Anuke> does it speed up compilation at the moment? |
14:55:00 | FromDiscord | <Yardanico> it's still in the implementation phase |
14:55:15 | FromDiscord | <Yardanico> and compilation speedup is not the main the focus of that feature :) |
14:55:47 | FromDiscord | <Yardanico> @Anuke if you want you can compile nim from that PR and check it yourself |
14:55:59 | FromDiscord | <Anuke> right, I'm just curious if it really does "massively speed up compilation times" |
14:56:18 | FromDiscord | <Anuke> In reply to @Yardanico "<@!123539225919488000> if you want": I'll take a look at some point |
14:56:28 | FromDiscord | <Yardanico> In reply to @Anuke "right, I'm just curious": well, of course it will speedup time |
14:56:37 | arkanoid | actually I'm not getting that warning |
14:56:43 | FromDiscord | <Yardanico> are you on devel? |
14:56:46 | FromDiscord | <Yardanico> or 1.6rc ? |
14:56:49 | FromDiscord | <Yardanico> (edit) "1.6rc" => "1.6rc1" |
14:57:20 | FromDiscord | <Yardanico> @Anuke it's about being "lazy", so the compiler won't have to check (or at least that will be configurable) code that is not used |
14:57:45 | FromDiscord | <Yardanico> so even if you import a module with a lot of procs, the compiler will only semcheck (check that they are actually allowed to compile) those that you actually use |
14:58:18 | FromDiscord | <Yardanico> @arkanoid as I said, that warning is there in devel and will be in 1.6, it's not in 1.4.8 |
14:58:26 | FromDiscord | <Yardanico> from https://github.com/nim-lang/Nim/blob/devel/changelog.md "A dangerous implicit conversion to cstring now triggers a [CStringConv] warning. This warning will become an error in future versions! Use an explicit conversion like cstring(x) in order to silence the warning." |
14:58:51 | arkanoid | ok ok, sorry |
15:00:26 | FromDiscord | <Anuke> related question: I saw this mentioned in the 1.6 RC thread, but with no apparent solution - when I `choosenim devel`, it fails with↵`Command: ./bin/nim c koch: nim-#devel/config/nim.cfg(16, 1) Error: invalid command line option: '--hint'` |
15:00:37 | FromDiscord | <Anuke> how do I solve this? |
15:01:24 | FromDiscord | <Yardanico> In reply to @hamidb80 "even with administration access": exit vscode |
15:02:05 | FromDiscord | <Hamid Bluri> sent a code paste, see https://play.nim-lang.org/#ix=3ycY |
15:02:09 | FromDiscord | <Hamid Bluri> sent a code paste, see https://paste.rs/Al4 |
15:02:13 | FromDiscord | <Hamid Bluri> im not in vscode |
15:02:21 | FromDiscord | <Yardanico> close whatever text editor you use |
15:02:32 | FromDiscord | <Yardanico> for nim |
15:02:39 | FromDiscord | <Hamid Bluri> use opened powershell individually |
15:02:42 | FromDiscord | <Yardanico> windows doesn't allow you to replace files of running .exe files -> vscode or some other code editor uses nimsuggest -> you're trying to update nim (including nimsuggest) while nimsuggest exe is running -> windows issues this "access is denied" error |
15:02:51 | FromDiscord | <Yardanico> at least that's how it was in my experience before |
15:02:52 | arkanoid | what are the most promising features coming to nim/libs in near future (horizon couple of years)? What are you working on? Please generate hype! I'm only aware or CPS |
15:04:03 | FromDiscord | <Yardanico> the feature anuke linked above |
15:04:04 | FromDiscord | <Yardanico> also ic |
15:05:34 | arkanoid | the lazy symbol semantic checking? |
15:05:43 | FromDiscord | <Hamid Bluri> In reply to @arkanoid "the lazy symbol semantic": yep |
15:07:09 | FromDiscord | <Hamid Bluri> do you think is it even possible in a compiled time programming language you have green threads or schedulers? something like what elixir does |
15:07:17 | FromDiscord | <Hamid Bluri> (edit) "you" => "to" |
15:07:45 | arkanoid | what is ic? |
15:08:39 | FromDiscord | <Rika> incremental compilation |
15:08:40 | nrds | <Prestige99> incremental compilation |
15:08:47 | FromDiscord | <Rika> will speed up nim compilation by a good amount |
15:18:33 | FromDiscord | <leorize> see the disruptek/cps project↵(@Hamid Bluri) |
15:20:25 | arkanoid | thanks |
15:22:58 | FromDiscord | <konsumlamm> In reply to @hamidb80 "do you think is": it's definitely possible (why wouldn't it?), Haskell has that for example |
15:25:01 | FromDiscord | <aleclarson> this happened during `nimble install` with nim devel↵> Error: internal error: getTypeDescAux(tyEmpty)↵> No stack traceback available↵> To create a stacktrace, rerun compilation with './koch temp c <file>', see https://nim-lang.github.io/Nim/intern.html#debugging-the-compiler for details |
15:26:33 | FromDiscord | <aleclarson> some sort of type-checking bug? |
15:27:51 | FromDiscord | <aleclarson> i don't get why it can't at least print the node location |
15:29:55 | FromDiscord | <aleclarson> what file should i run `./koch temp c` on if i don't know which file failed |
15:30:46 | FromDiscord | <aleclarson> also, does choosenim even make `koch` available to me? |
15:31:32 | FromDiscord | <Rika> yes |
15:31:36 | FromDiscord | <Rika> on that last qn |
15:33:03 | FromDiscord | <aleclarson> not seeing it in `~/.nimble/bin` |
15:33:54 | FromDiscord | <Rika> wont be there |
15:34:00 | FromDiscord | <Rika> will be in choosenim/toolchains |
15:35:13 | FromDiscord | <aleclarson> found it thx |
15:35:29 | FromDiscord | <aleclarson> how can i check the nim version from a `.nim` script? |
15:36:02 | FromDiscord | <haxscramper> https://nim-lang.org/docs/system.html#NimMajor |
15:36:25 | FromDiscord | <aleclarson> does that report `devel` or is there another property for that |
15:36:33 | FromDiscord | <aleclarson> nvm |
15:39:02 | FromDiscord | <Rika> devel versions are always odd |
15:39:17 | FromDiscord | <Rika> (only applies to minor and patch versions |
15:41:38 | FromDiscord | <aleclarson> is it possible to run `nimble install` with koch? |
15:41:44 | FromDiscord | <aleclarson> (edit) "koch?" => "`koch temp`?" |
15:41:50 | FromDiscord | <aleclarson> (edit) "run" => "force" | "with" => "to use" |
15:42:05 | FromDiscord | <Rika> no |
15:43:42 | FromDiscord | <aleclarson> how about make `nimble install` log every `.nim` file it's compiling as it goes. `--verbose` doesn't do it unfortunately |
15:43:50 | FromDiscord | <aleclarson> (edit) "goes." => "goes?↵" |
15:44:16 | FromDiscord | <aleclarson> sry should've done `--help` first |
15:44:24 | FromDiscord | <aleclarson> (edit) "first" => "before asking" |
15:45:35 | FromDiscord | <aleclarson> sent a code paste, see https://play.nim-lang.org/#ix=3ydf |
15:46:09 | FromDiscord | <aleclarson> In reply to @aleclarson "how about make `nimble": sadly, `--debug` doesn't help either |
15:48:01 | FromDiscord | <haxscramper> Are you trying to solve some specific issue or this is a suggestion? |
15:48:19 | FromDiscord | <aleclarson> In reply to @aleclarson "this happened during `nimble": I'm solving this issue |
15:49:03 | FromDiscord | <Hamid Bluri> hey |
15:49:41 | FromDiscord | <Hamid Bluri> is there any way to get informaton from `.nimble` file |
15:49:44 | FromDiscord | <Hamid Bluri> ? |
15:50:28 | FromDiscord | <Hamid Bluri> a want a parser for `.nimble` files in other words |
15:51:35 | FromDiscord | <Hamid Bluri> (edit) "?" => "does stdlib have that?" |
15:54:42 | * | maxime_ quit (Remote host closed the connection) |
15:55:31 | * | max22- joined #nim |
15:59:41 | * | maxime_ joined #nim |
16:02:45 | * | max22- quit (Ping timeout: 260 seconds) |
16:05:11 | arkanoid | do you know any avlib based video player project written in nim? |
16:05:20 | arkanoid | I mean libav |
16:07:23 | FromDiscord | <aleclarson> sent a code paste, see https://play.nim-lang.org/#ix=3ydo |
16:21:58 | arkanoid | is it possible to load .so shared libs from same dir of executable without having to wrap it in a LD_LIBRARY_PATH context? |
16:22:50 | * | maxime_ quit (Quit: Leaving) |
16:25:46 | arkanoid | something like https://nehckl0.medium.com/creating-relocatable-linux-executables-by-setting-rpath-with-origin-45de573a2e98 |
16:41:19 | * | max22- joined #nim |
16:47:24 | FromDiscord | <Hamid Bluri> sent a code paste, see https://play.nim-lang.org/#ix=3ydA |
16:48:11 | FromDiscord | <Hamid Bluri> sent a code paste, see https://paste.rs/ipW |
16:58:19 | FromDiscord | <OffenseTeacher> Before I jump into this rabbit hole, do you guys think it is feasible to start renaming everything with the term "nim" inside generated .c file before compilation to avoid the binary being recognized as a Nim executable? Notably "NimMainModule", "NimMainInner", "NimMain", etc |
17:04:54 | FromDiscord | <fae> @Hamid Bluri you could take a look at https://nim-lang.org/docs/parsecfg.html |
17:11:51 | FromDiscord | <Rika> In reply to @OffenseTeacher "Before I jump into": Why |
17:31:02 | FromDiscord | <haxscramper> In reply to @hamidb80 "`lines` iterator doesn't work": `lines` opens file for reading |
17:31:26 | FromDiscord | <haxscramper> `readFile().splitLines()` first reads whole file and then splits it |
17:31:40 | FromDiscord | <haxscramper> But it uses `readFile()` that was made available at CT as well |
17:38:49 | * | jjido joined #nim |
18:08:19 | * | xet7 quit (Remote host closed the connection) |
18:09:31 | * | xet7 joined #nim |
18:13:52 | * | xet7 quit (Remote host closed the connection) |
18:14:53 | * | xet7 joined #nim |
18:16:31 | FromDiscord | <dom96> In reply to @hamidb80 "a want a parser": you should call `nimble dump` in practically all cases |
18:16:44 | FromDiscord | <haxscramper> `nimble dump --json` |
18:17:28 | FromDiscord | <dom96> In reply to @aleclarson "I'm solving this issue": I left a comment on your issues |
18:17:32 | FromDiscord | <haxscramper> In reply to @hamidb80 "a want a parser": https://haxscramper.github.io/hnimast/nimble_aux.html#parsePackageInfo%2Cstring%2CAbsFile |
18:19:20 | FromDiscord | <haxscramper> But `nimble dump --json` is probably good enough as well |
18:20:13 | * | jjido quit (Quit: My MacBook Air has gone to sleep. ZZZzzz…) |
18:21:39 | * | xet7 quit (Remote host closed the connection) |
18:23:51 | * | xet7 joined #nim |
18:35:35 | * | max22- quit (Ping timeout: 260 seconds) |
18:41:06 | FromDiscord | <JSONBash> can we expect in depth documentation on ARC/ORC in terms of how to use, what is different etc... but at a digestable level for non compiler/every day dev people? |
18:48:30 | * | jjido joined #nim |
18:57:40 | * | xet7 quit (Read error: Connection reset by peer) |
18:57:56 | * | xet7 joined #nim |
19:08:29 | FromDiscord | <haxscramper> --gc:arc |
19:08:31 | FromDiscord | <haxscramper> Done |
19:09:16 | FromDiscord | <haxscramper> From what I can tell you just enable different GC, and unless you are doing some interop or something like that you don't have to be concerned with internal details |
19:09:44 | * | jjido quit (Quit: My MacBook Air has gone to sleep. ZZZzzz…) |
19:15:05 | * | max22- joined #nim |
19:20:07 | FromDiscord | <JSONBash> isn't there new 'sink' and 'lent' keywords? and isn't thread and memory different? |
19:20:47 | FromDiscord | <JSONBash> i read that passing/moving/copying variable between threads is different now (from thread local heaps) |
20:27:47 | FromDiscord | <Elegantbeef> Well `lent`/`sink` arent new they're in 1.4.0 and are just annotations for the compiler @JSONBash |
20:28:37 | FromDiscord | <Elegantbeef> They do not prevent you from writing code, `sink` moves memory if the variable isnt used after the procedure otherwise it copies, lent returns a borrowed view unless you hold onto the object |
20:44:32 | FromDiscord | <JSONBash> so lent is like passing a pointer? assuming no mutation though? |
20:45:26 | FromDiscord | <JSONBash> and what about passing variables between threads? If i have a large seq or table (200 K) how would that work? |
20:45:52 | FromDiscord | <Elegantbeef> Well it's not lines that doesnt work it's the `open` that doesnt work |
20:46:16 | FromDiscord | <Elegantbeef> Weird |
20:46:17 | FromDiscord | <Elegantbeef> That jumpepd |
20:46:32 | FromDiscord | <Elegantbeef> Uhh lent is the immutable version of `var` so the same logic applies |
20:47:17 | FromDiscord | <JSONBash> oh okay, that makes sense |
20:47:37 | FromDiscord | <JSONBash> ill try some things out and see if i can just grok it |
20:48:05 | FromDiscord | <Elegantbeef> sent a code paste, see https://play.nim-lang.org/#ix=3yem |
20:48:27 | FromDiscord | <Elegantbeef> sent a code paste, see https://play.nim-lang.org/#ix=3yen |
20:49:41 | FromDiscord | <Elegantbeef> For the passing variables there are many ways to do it, i believe https://nim-lang.github.io/Nim/isolation.html is the main way that you should? Dont know though |
20:52:10 | FromDiscord | <JSONBash> In reply to @Elegantbeef "For the passing variables": Thanks! ill write some code and find out what my real questions are if I have any. I haven't done much threaded work before so I don't know what I don't know yet. |
20:59:48 | * | jjido joined #nim |
21:13:13 | * | kayabaNerve_ is now known as kayabaNerve |
21:13:36 | * | kayabaNerve is now known as kayaba |
21:13:46 | * | kayaba is now known as kayabaNerve |
21:27:11 | * | Vladar quit (Quit: Leaving) |
21:33:07 | * | xet7 quit (Quit: Leaving) |
22:21:19 | FromDiscord | <Recruit_main707> why is interface a keyword? |
22:24:19 | * | jjido quit (Quit: My MacBook Air has gone to sleep. ZZZzzz…) |
22:25:54 | * | stkrdknmibalz joined #nim |
22:37:12 | * | userj quit (Ping timeout: 245 seconds) |
23:05:27 | FromDiscord | <Elegantbeef> Probably something that was done for future implementations? |
23:05:36 | FromDiscord | <Elegantbeef> similar to `out` |
23:12:49 | FromDiscord | <Recruit_main707> can you do something like: `assert NimBase is object of CxxBase` to check if an object inherits from another one? |
23:16:55 | * | vicfred joined #nim |
23:22:50 | * | max22- quit (Remote host closed the connection) |
23:31:53 | * | xet7 joined #nim |
23:39:41 | * | xet7 quit (Quit: Leaving) |
23:52:02 | * | xet7 joined #nim |