<< 07-09-2021 >>

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:19FromDiscord<shadow.> sent a code paste, see https://paste.rs/oXA
01:04:34FromDiscord<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:47FromDiscord<shadow.> (edit) "https://play.nim-lang.org/#ix=3yah" => "https://play.nim-lang.org/#ix=3yaj"
01:04:48FromDiscord<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:48FromDiscord<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:04FromDiscord<retkid> is there anyway to use nim to generate dependency free python
03:50:14FromDiscord<retkid> using nim as frontend and python as a backend
03:54:49FromDiscord<aleclarson> relatively how much faster is incremental compilation?
03:54:56FromDiscord<Rika> Much
03:55:17FromDiscord<Rika> Proportional to the amount of code you have to compile
03:55:46FromDiscord<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:04FromDiscord<aleclarson> ur welcome \:)
03:56:15FromDiscord<retkid> "why dont they just keep 90% of the bytecode and just like snip back the differences"
03:56:17FromDiscord<Rika> In reply to @retkid "is there anyway to": What does this menac
03:56:19FromDiscord<Rika> Mean
03:56:36FromDiscord<aleclarson> i want to use it, but i'm using choosenim.↵is there a guide for building nim yourself?
03:56:40FromDiscord<Rika> In reply to @retkid ""why dont they just": Because it’s complex
03:57:00FromDiscord<Rika> In reply to @aleclarson "i want to use": What is the issue? You can install devel using it
03:57:17FromDiscord<aleclarson> and that has incremental flag enabled?
03:57:24FromDiscord<retkid> In reply to @Rika "Because it’s complex": well yea compilation is a lot more complicated than that
03:57:30FromDiscord<Elegantbeef> you do `--ic:on` with the compiler
03:57:32FromDiscord<retkid> but just an id
03:57:33FromDiscord<Rika> Probably not actually I haven’t checked
03:57:34FromDiscord<retkid> (edit) "id" => "idea"
03:58:44FromDiscord<aleclarson> sent a code paste, see https://play.nim-lang.org/#ix=3yaB
03:58:47FromDiscord<Elegantbeef> Well choosenim doesnt allow you to build danger 😛
03:58:55FromDiscord<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:58FromDiscord<Elegantbeef> may want to do `choosenim update devel`
03:59:13FromDiscord<retkid> i kinda regret ever programming this in python
03:59:29FromDiscord<retkid> but its not wroth it to rewrite it
03:59:35FromDiscord<retkid> (edit) "wroth" => "worth"
03:59:36FromDiscord<Elegantbeef> choosenim uses nightlies so you'll be a few commits behind but nothing bad with regards to IC
04:00:30FromDiscord<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:38FromDiscord<Elegantbeef> Well that's stable
04:00:42FromDiscord<Elegantbeef> So... makes sense 😛
04:00:52FromDiscord<aleclarson> mm yiss
04:01:30FromDiscord<Elegantbeef> Also doesnt appear in the compiler docs right now either
04:02:00FromDiscord<Elegantbeef> ah seems `--ic:on` might be a shortcut for `--incremental`
04:06:00FromDiscord<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:25FromDiscord<Elegantbeef> Well your nimble file was probably there
04:06:26FromDiscord<Rika> Ugh
04:06:30*supakeen joined #nim
04:06:31FromDiscord<Rika> Uhh
04:06:41FromDiscord<Rika> Yeah a lot of things are there
04:07:09FromDiscord<aleclarson> luckily i alias `rm` to move to trash
04:07:36FromDiscord<aleclarson> what do i delete instead
04:17:31FromDiscord<aleclarson> deleting `~/.nimble/{nimbledata.json,pkgs}` worked
04:22:07FromDiscord<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:12FromDiscord<aleclarson> on `nimble install`
04:22:41FromDiscord<Elegantbeef> You're installing something that needs nimterop it's attempting to build loaf and it exists
04:23:33FromDiscord<aleclarson> oh just gotta delete `~/.nimble/bin/loaf`
04:24:01FromDiscord<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:52FromDiscord<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:50FromDiscord<aleclarson> no chance for conflict between `.nimble` files
04:28:13FromDiscord<aleclarson> although the deduplication of global cache is nice
04:28:15FromDiscord<Elegantbeef> There still isnt presently
04:30:37FromDiscord<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:50FromDiscord<aleclarson> probably cuz i linked in a local clone manually
04:38:40FromDiscord<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:38FromDiscord<Elegantbeef> sent a code paste, see https://play.nim-lang.org/#ix=3yaG
04:40:22FromDiscord<Elegantbeef> sent a code paste, see https://play.nim-lang.org/#ix=3yaI
04:40:23FromDiscord<no name fits> Thanks!
04:41:15*mahlon quit (*.net *.split)
04:41:53*mahlon joined #nim
04:49:56FromDiscord<πτ (pi man)> sent a code paste, see https://play.nim-lang.org/#ix=3yaJ
04:50:20FromDiscord<Elegantbeef> the sequence is mutable but the objects are not?
04:50:50FromDiscord<πτ (pi man)> yea
04:52:01FromDiscord<Elegantbeef> There is no built in way that i know of, you'd need your own API over the collection
04:52:23FromDiscord<πτ (pi man)> hmm, ok
04:56:15FromDiscord<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:37NimEventerNew thread by Miran: Nim 1.6.0 RC1, see https://forum.nim-lang.org/t/8404
08:01:37FromDiscord<impbox [ftsf]> omg 1.6
08:01:47FromDiscord<impbox [ftsf]> is there a summary of what's different between 1.4->1.6?
08:02:28PMunchNot for the RC it seems
08:04:26FromDiscord<Elegantbeef> @impbox [ftsf]\: https://github.com/nim-lang/Nim/blob/devel/changelog.md
08:08:11FromDiscord<fae> My first Nim package, and first time doing FFI with C <https://github.com/farism/flex> plz b gentle
08:08:35FromDiscord<fae> I'm glad I picked a relatively simple library for my first attempt
08:08:39FromDiscord<Elegantbeef> "please be gentle" means what "code review please" 😛
08:09:18FromDiscord<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:57PMunchHmm, build failed: http://ix.io/3ybd
08:14:36FromDiscord<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:55FromDiscord<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:56FromDiscord<Elegantbeef> Same issue here pmunch
08:16:52FromDiscord<fae> every suggestion is (implicitly) asked for, best way to learn
08:23:23FromDiscord<fae> if i try to remove the pragma i get a syntax error saying implementation expected
08:24:28FromDiscord<Elegantbeef> i forgot to say you dont need the string name
08:24:28FromDiscord<Elegantbeef> you need importC, but not the string after
08:24:58FromDiscord<fae> gotcha, string is just to map it to a diff name
08:24:59FromDiscord<fae> ty
08:25:13*jjido quit (Quit: My MacBook Air has gone to sleep. ZZZzzz…)
08:26:05FromDiscord<impbox [ftsf]> @fae looks awesome!
08:26:17FromDiscord<impbox [ftsf]> would be great for game ui
08:26:45FromDiscord<impbox [ftsf]> it's not locked to any specific drawing api right?
08:27:04FromDiscord<fae> no
08:27:09FromDiscord<fae> it just returns rects
08:27:28FromDiscord<impbox [ftsf]> sweet
08:27:32FromDiscord<fae> i happen to be using sdl2 here but i want to try out pixie
08:32:00FromDiscord<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:26FromDiscord<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:58FromDiscord<Elegantbeef> The next step is to make it pure nim 😛
08:34:04FromDiscord<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:44NimEventerNew 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:48FromDiscord<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:00FromDiscord<zidsal> nevermind I should scroll up and read discord
08:58:04FromDiscord<Yardanico> you can always just read the changelog
08:58:15FromDiscord<Yardanico> but ofc for all fixed issue you'll have to wait for release
08:58:20FromDiscord<Yardanico> (edit) "issue" => "issues"
08:58:32FromDiscord<zidsal> ya I just saw that post by elegant now I look foolish!
09:01:23FromDiscord<Rika> There was a unary slice operator??
09:01:27FromDiscord<Yardanico> In reply to @Rika "There was a unary": ofc?
09:01:46FromDiscord<Yardanico> and not "was", it still is there
09:01:51FromDiscord<Yardanico> it was simply deprecated for 1.6
09:02:27FromDiscord<Rika> What do you mean of course no one seems to have ever talked about it
09:03:02FromDiscord<Yardanico> well, I certainly used it on code-golf.io for shortening nim code
09:03:28FromDiscord<zidsal> sent a code paste, see https://play.nim-lang.org/#ix=3ybl
09:04:01FromDiscord<Rika> Here marks the conversion of Nim to APL
09:04:33FromDiscord<Yardanico> well, it'll need an experimental flag specifically passed to the compiler :)
09:04:41FromDiscord<Yardanico> but yeah, I hope people don't overuse it too much
09:04:53FromDiscord<zidsal> too late, I'm already making PR to nico,
09:05:27FromDiscord<Yardanico> but what about backwards compatibility?!
09:05:48FromDiscord<zidsal> you mean you don't want an api as easy as ⊗★9
09:11:13FromDiscord<Rika> > deprecated any↵Nice
09:14:06FromDiscord<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:15FromDiscord<Yardanico> a
09:14:49FromDiscord<haxscramper> yeah, it is strange that changelog does not mention compilation error changes, at least ones that are so noticeable
09:15:02FromDiscord<Yardanico> In reply to @haxscramper "yeah, it is strange": because the PR authors didn't add them :P
09:15:03FromDiscord<haxscramper> also there is a fix, finally for invalid discriminant value
09:15:19FromDiscord<haxscramper> now it shows the value
09:15:20FromDiscord<Yardanico> you (or me, or someone else) can make a PR adding those things to the changelog
09:21:56FromDiscord<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:13FromDiscord<haxscramper> This is all domain-specific, but at last something google-able would be nice
09:29:20FromDiscord<pointystick> Are the Unicode names any use for this? https://www.compart.com/en/unicode/block/U+2200
09:30:22FromDiscord<Yardanico> @haxscramper it's called "squared times" :P
09:30:48FromDiscord<Yardanico> a star is just a star though ("black star")
09:31:15FromDiscord<haxscramper> I can use unicode search as well, yes
09:31:47FromDiscord<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:11FromDiscord<Yardanico> oh!
09:33:15FromDiscord<Yardanico> apparently you can use wiktionary for that
09:33:15FromDiscord<Yardanico> https://en.wiktionary.org/wiki/%E2%8A%A0
09:33:20FromDiscord<Yardanico> https://media.discordapp.net/attachments/371759389889003532/884733063072997376/unknown.png
09:33:22FromDiscord<Yardanico> "Free multiplicative convolution"
09:41:51FromDiscord<haxscramper> sent a code paste, see https://play.nim-lang.org/#ix=3ybx
09:43:37FromDiscord<haxscramper> (edit) "https://play.nim-lang.org/#ix=3ybx" => "https://play.nim-lang.org/#ix=3yby"
09:43:45FromDiscord<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:30arkanoidI 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:30FromDiscord<Yardanico> i never use prelude
10:15:44FromDiscord<Yardanico> it's nice for some really quick prototyping, but I prefer to specify imports right away
10:16:44arkanoidyeah I do prefer that too, but not using parseutils or parseopt makes me feed excluded from the prelude party
10:17:02arkanoids/feed/feel
10:17:34FromDiscord<haxscramper> `parseutils, parseopt` are not really common
10:17:39FromDiscord<haxscramper> `times` is very specific
10:17:46FromDiscord<haxscramper> https://github.com/nim-lang/RFCs/issues/398#issuecomment-891762652
10:18:12FromDiscord<haxscramper> it seems like this is a prelude-for-something-like-command-line-application
10:19:03FromDiscord<haxscramper> `options` is more common than
10:19:47FromDiscord<Yardanico> yeah, I'd agree, parseutils isn't common
10:20:04FromDiscord<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:22FromDiscord<haxscramper> sent a code paste, see https://play.nim-lang.org/#ix=3ybM
10:20:34FromDiscord<haxscramper> in `hmisc` I have multiple preludes
10:20:40FromDiscord<haxscramper> For unit testing, for CLI apps
10:20:45FromDiscord<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:19arkanoidprelude is a lie!
10:48:44arkanoidI'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:33arkanoidI'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:34FromDiscord<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:53FromDiscord<haxscramper> But I would recommend to stop worrying and just use exceptions
10:54:19FromDiscord<haxscramper> Default to exceptions, and use options where you want to explicitly communicate optionality of the value
10:54:44arkanoidDr. Strangelove approves
11:15:10*flynn quit (Ping timeout: 260 seconds)
11:18:20*flynn joined #nim
11:40:44FromDiscord<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:38FromDiscord<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:51FromDiscord<Yardanico> ofc not :)
12:13:58FromDiscord<Yardanico> (not on nim side)
12:22:03FromDiscord<Recruit_main707> do you mean the destroy function?
12:22:07FromDiscord<Recruit_main707> or the method?
12:23:08arkanoidI'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:19FromDiscord<Rika> wrapping == always use cstring...
12:23:42arkanoidRika, what do you mean?
12:24:18FromDiscord<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:32FromDiscord<Rika> size_t -> csize
12:25:07FromDiscord<Recruit_main707> csize_t apparently csize is deprecated
12:25:15FromDiscord<Rika> oh huh really
12:25:16FromDiscord<Rika> okay
12:33:22arkanoiddidn't know there was a csize_t
12:36:29*stkrdknmibalz quit (Quit: WeeChat 3.0.1)
12:38:21FromDiscord<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:42arkanoidRecluit_main707: best option is using dymlib pragma, less optimal option is using passL
12:40:16arkanoiddynlibOverride is used for other purposes
12:40:31arkanoidwait, I misread, you wrote static
12:40:55arkanoidso you should use link pragma: https://nim-lang.org/docs/manual.html#implementation-specific-pragmas-link-pragma
12:41:33arkanoidI'm lazy and I'm using passL actually to static link my app
12:42:07arkanoid{.passL:"-Lout -l:libonvifclient.a -l:libgsoapssl.a -l:libssl.a -l:libcrypto.a -l:libz.a -l:libm.a".}
12:47:48FromDiscord<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:49FromDiscord<Yardanico> e.g. OpenSSL
12:47:58FromDiscord<Yardanico> I mean nim stdlib
12:49:24FromDiscord<Recruit_main707> ok, thanks
13:26:39arkanoidYardanico, 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:09FromDiscord<Yardanico> no, but then SSL support in httpclient will be disabled and it won't use these statically linked libs
13:27:36arkanoidgot it, thanks
13:44:05*max22- joined #nim
14:00:37*PMunch quit (Quit: Leaving)
14:15:42FromDiscord<gabreal> Hello hello everyone
14:15:46FromDiscord<gabreal> 👋
14:16:30FromDiscord<Rika> i do not recall your former name
14:16:37FromDiscord<gabreal> Avatarfighter 🙂
14:16:54FromDiscord<gabreal> what’s good rika
14:16:56FromDiscord<Rika> did you get tired of fighting avatars
14:17:02FromDiscord<gabreal> a bit :p
14:17:35FromDiscord<gabreal> its tough having that username since the 2nd grade you know sometimes you got to spice things up
14:18:07nrds<Prestige99> ay gabreal
14:18:52FromDiscord<gabreal> sup prestige 🙂
14:19:38nrds<Prestige99> Just work, dealing with database nonsense :P hbu?
14:20:47FromDiscord<gabreal> porting my program to cps it’s been a bit rough on the learning curve
14:23:42nrds<Prestige99> hard to work with? I haven't seen much about cps yet
14:24:06FromDiscord<Rika> its a concept that is hard to wrap your head around
14:24:12FromDiscord<Yardanico> In reply to @gabreal "porting my program to": curious - any reason you want cps specifically?
14:24:19FromDiscord<Yardanico> or just to play around?
14:24:45*maxime_ joined #nim
14:24:49FromDiscord<gabreal> cps needs more real usage to improve so I’m learning it
14:25:33FromDiscord<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:53FromDiscord<gabreal> Idk it has some advantages to me that are valuable
14:26:08FromDiscord<Yardanico> is your code open?
14:26:17FromDiscord<gabreal> No sadly I am selling my program
14:26:36FromDiscord<gabreal> im just trying to find weird behavior/complain abt things that should be easier
14:26:48FromDiscord<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:42FromDiscord<gabreal> Prestige: It is a bit hard to wrap my head around how to structure everything :p
14:28:09FromDiscord<Hamid Bluri> where is docs for nim devel?
14:28:18FromDiscord<Yardanico> https://nim-lang.github.io/Nim/
14:28:22FromDiscord<Hamid Bluri> thanks
14:29:06FromDiscord<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:07FromDiscord<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:11FromDiscord<Rika> im still here doing jack
14:29:59FromDiscord<gabreal> In reply to @Yardanico "do you use http/https?": Yeah I am still implementing my httpclient
14:30:06nrds<Prestige99> gabreal hopefully it improves with time
14:30:12FromDiscord<Yardanico> In reply to @gabreal "Yeah I am still": maybe you can at least open source that part in the future? :P
14:30:20FromDiscord<gabreal> ofc ofc
14:30:28FromDiscord<Yardanico> did you start from the normal httpclient source?
14:30:35FromDiscord<Yardanico> or decided to write your own from ground up?
14:30:43FromDiscord<gabreal> No I have different needs than what httpclient can provide :p
14:30:50FromDiscord<Yardanico> huh
14:31:35FromDiscord<gabreal> Im not sure how to explain it lol
14:32:07FromDiscord<gabreal> I needed a real cookie jar, better header handling, ability to stream bytes manually and greater proxy support
14:32:10FromDiscord<Rika> are you still making that thing we tried
14:32:12FromDiscord<gabreal> Yeah
14:32:16FromDiscord<Rika> i see
14:32:22FromDiscord<Yardanico> 👀?
14:32:25FromDiscord<gabreal> Since December 😩
14:32:36FromDiscord<Rika> damn that was a while back
14:32:36FromDiscord<Yardanico> crypto trading bot? :D
14:32:40FromDiscord<gabreal> Nah ahah
14:32:42FromDiscord<Rika> lets say its that
14:32:44FromDiscord<Rika> its close enough
14:32:50FromDiscord<Yardanico> hmMmm
14:32:51FromDiscord<gabreal> ^
14:32:56FromDiscord<gabreal> not at all crypto related tho
14:33:01FromDiscord<gabreal> it is a bot :p
14:33:09FromDiscord<Rika> and its technically for trading
14:33:12FromDiscord<gabreal> ^
14:33:15FromDiscord<Yardanico> is the bot itself in so-called "grey zone"? 🤔
14:33:22FromDiscord<gabreal> yeah
14:33:26FromDiscord<Rika> yessir
14:33:32FromDiscord<Yardanico> now im curious
14:33:41FromDiscord<Rika> yards in on it bet
14:33:43FromDiscord<Rika> i kid
14:33:53FromDiscord<gabreal> it’s been really fun making it ngl I’ve been ripping apart antibots like they are nothing
14:34:10FromDiscord<Rika> lmao
14:34:16FromDiscord<Rika> thats pretty cool
14:34:38FromDiscord<gabreal> right ahah
14:38:13arkanoidyou said that "char *" is cstring, correct?
14:38:40FromDiscord<Hamid Bluri> what is `Example: cmd: -r:off` in the docs? and what it does?
14:39:25FromDiscord<Rika> arkanoid yes why
14:39:30FromDiscord<Rika> it should be so afaik
14:40:01FromDiscord<Yardanico> In reply to @hamidb80 "what is `Example: cmd:": you can ignore it, it's runnableExamples-specific
14:40:09FromDiscord<Yardanico> means that the specified example code shouldn't run when being tested
14:40:59FromDiscord<Yardanico> by default runnableExamples will get compiled and run, but with that flag nim doc will only check that it compiles
14:42:46arkanoidRika: I'm dealing with SIGSEGV when I try to call this wrapped function this way: https://play.nim-lang.org/#ix=3ycJ
14:44:09arkanoiddo you see any error in my wrapper proc or on how I am calling it?
14:45:50FromDiscord<Rika> it doesnt seem wrong, maybe do `s[0].addr` instead though (but i believe that should be unnecessary...)
14:46:42FromDiscord<Yardanico> that's actually pretty really important @Rika
14:46:50FromDiscord<Yardanico> also implicit cstring conversion is now deprecated in nim
14:46:55FromDiscord<leorize> and the string should be allocated with `newString` then truncated
14:47:07FromDiscord<Rika> In reply to @Yardanico "also implicit cstring conversion": ah it is?
14:47:19FromDiscord<Rika> i see
14:47:23FromDiscord<Rika> okay then it is necessary]
14:47:36FromDiscord<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:22FromDiscord<leorize> you only have to explicitly convert it, no need for addr↵(@Yardanico)
14:48:42FromDiscord<Anuke> is this PR as exciting as it sounds? <https://github.com/nim-lang/Nim/pull/18818>
14:48:50FromDiscord<Yardanico> yes, have you read the RFC?
14:48:56FromDiscord<Yardanico> also there's some technical discussion in #internals
14:49:09FromDiscord<Yardanico> https://github.com/nim-lang/RFCs/issues/416 is the RFC
14:52:04arkanoidleorize, correct, now it works. len vs cap, makes a lot of sense
14:52:34arkanoidbut string -> cstring implicit conversion works on 1.4.8
14:53:17FromDiscord<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:25FromDiscord<Yardanico> the compiler will show a warning
14:54:03FromDiscord<Anuke> In reply to @Yardanico "yes, have you read": yeah
14:54:32FromDiscord<Anuke> does it speed up compilation at the moment?
14:55:00FromDiscord<Yardanico> it's still in the implementation phase
14:55:15FromDiscord<Yardanico> and compilation speedup is not the main the focus of that feature :)
14:55:47FromDiscord<Yardanico> @Anuke if you want you can compile nim from that PR and check it yourself
14:55:59FromDiscord<Anuke> right, I'm just curious if it really does "massively speed up compilation times"
14:56:18FromDiscord<Anuke> In reply to @Yardanico "<@!123539225919488000> if you want": I'll take a look at some point
14:56:28FromDiscord<Yardanico> In reply to @Anuke "right, I'm just curious": well, of course it will speedup time
14:56:37arkanoidactually I'm not getting that warning
14:56:43FromDiscord<Yardanico> are you on devel?
14:56:46FromDiscord<Yardanico> or 1.6rc ?
14:56:49FromDiscord<Yardanico> (edit) "1.6rc" => "1.6rc1"
14:57:20FromDiscord<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:45FromDiscord<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:18FromDiscord<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:26FromDiscord<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:51arkanoidok ok, sorry
15:00:26FromDiscord<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:37FromDiscord<Anuke> how do I solve this?
15:01:24FromDiscord<Yardanico> In reply to @hamidb80 "even with administration access": exit vscode
15:02:05FromDiscord<Hamid Bluri> sent a code paste, see https://play.nim-lang.org/#ix=3ycY
15:02:09FromDiscord<Hamid Bluri> sent a code paste, see https://paste.rs/Al4
15:02:13FromDiscord<Hamid Bluri> im not in vscode
15:02:21FromDiscord<Yardanico> close whatever text editor you use
15:02:32FromDiscord<Yardanico> for nim
15:02:39FromDiscord<Hamid Bluri> use opened powershell individually
15:02:42FromDiscord<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:51FromDiscord<Yardanico> at least that's how it was in my experience before
15:02:52arkanoidwhat 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:03FromDiscord<Yardanico> the feature anuke linked above
15:04:04FromDiscord<Yardanico> also ic
15:05:34arkanoidthe lazy symbol semantic checking?
15:05:43FromDiscord<Hamid Bluri> In reply to @arkanoid "the lazy symbol semantic": yep
15:07:09FromDiscord<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:17FromDiscord<Hamid Bluri> (edit) "you" => "to"
15:07:45arkanoidwhat is ic?
15:08:39FromDiscord<Rika> incremental compilation
15:08:40nrds<Prestige99> incremental compilation
15:08:47FromDiscord<Rika> will speed up nim compilation by a good amount
15:18:33FromDiscord<leorize> see the disruptek/cps project↵(@Hamid Bluri)
15:20:25arkanoidthanks
15:22:58FromDiscord<konsumlamm> In reply to @hamidb80 "do you think is": it's definitely possible (why wouldn't it?), Haskell has that for example
15:25:01FromDiscord<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:33FromDiscord<aleclarson> some sort of type-checking bug?
15:27:51FromDiscord<aleclarson> i don't get why it can't at least print the node location
15:29:55FromDiscord<aleclarson> what file should i run `./koch temp c` on if i don't know which file failed
15:30:46FromDiscord<aleclarson> also, does choosenim even make `koch` available to me?
15:31:32FromDiscord<Rika> yes
15:31:36FromDiscord<Rika> on that last qn
15:33:03FromDiscord<aleclarson> not seeing it in `~/.nimble/bin`
15:33:54FromDiscord<Rika> wont be there
15:34:00FromDiscord<Rika> will be in choosenim/toolchains
15:35:13FromDiscord<aleclarson> found it thx
15:35:29FromDiscord<aleclarson> how can i check the nim version from a `.nim` script?
15:36:02FromDiscord<haxscramper> https://nim-lang.org/docs/system.html#NimMajor
15:36:25FromDiscord<aleclarson> does that report `devel` or is there another property for that
15:36:33FromDiscord<aleclarson> nvm
15:39:02FromDiscord<Rika> devel versions are always odd
15:39:17FromDiscord<Rika> (only applies to minor and patch versions
15:41:38FromDiscord<aleclarson> is it possible to run `nimble install` with koch?
15:41:44FromDiscord<aleclarson> (edit) "koch?" => "`koch temp`?"
15:41:50FromDiscord<aleclarson> (edit) "run" => "force" | "with" => "to use"
15:42:05FromDiscord<Rika> no
15:43:42FromDiscord<aleclarson> how about make `nimble install` log every `.nim` file it's compiling as it goes. `--verbose` doesn't do it unfortunately
15:43:50FromDiscord<aleclarson> (edit) "goes." => "goes?↵"
15:44:16FromDiscord<aleclarson> sry should've done `--help` first
15:44:24FromDiscord<aleclarson> (edit) "first" => "before asking"
15:45:35FromDiscord<aleclarson> sent a code paste, see https://play.nim-lang.org/#ix=3ydf
15:46:09FromDiscord<aleclarson> In reply to @aleclarson "how about make `nimble": sadly, `--debug` doesn't help either
15:48:01FromDiscord<haxscramper> Are you trying to solve some specific issue or this is a suggestion?
15:48:19FromDiscord<aleclarson> In reply to @aleclarson "this happened during `nimble": I'm solving this issue
15:49:03FromDiscord<Hamid Bluri> hey
15:49:41FromDiscord<Hamid Bluri> is there any way to get informaton from `.nimble` file
15:49:44FromDiscord<Hamid Bluri> ?
15:50:28FromDiscord<Hamid Bluri> a want a parser for `.nimble` files in other words
15:51:35FromDiscord<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:11arkanoiddo you know any avlib based video player project written in nim?
16:05:20arkanoidI mean libav
16:07:23FromDiscord<aleclarson> sent a code paste, see https://play.nim-lang.org/#ix=3ydo
16:21:58arkanoidis 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:46arkanoidsomething like https://nehckl0.medium.com/creating-relocatable-linux-executables-by-setting-rpath-with-origin-45de573a2e98
16:41:19*max22- joined #nim
16:47:24FromDiscord<Hamid Bluri> sent a code paste, see https://play.nim-lang.org/#ix=3ydA
16:48:11FromDiscord<Hamid Bluri> sent a code paste, see https://paste.rs/ipW
16:58:19FromDiscord<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:54FromDiscord<fae> @Hamid Bluri you could take a look at https://nim-lang.org/docs/parsecfg.html
17:11:51FromDiscord<Rika> In reply to @OffenseTeacher "Before I jump into": Why
17:31:02FromDiscord<haxscramper> In reply to @hamidb80 "`lines` iterator doesn't work": `lines` opens file for reading
17:31:26FromDiscord<haxscramper> `readFile().splitLines()` first reads whole file and then splits it
17:31:40FromDiscord<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:31FromDiscord<dom96> In reply to @hamidb80 "a want a parser": you should call `nimble dump` in practically all cases
18:16:44FromDiscord<haxscramper> `nimble dump --json`
18:17:28FromDiscord<dom96> In reply to @aleclarson "I'm solving this issue": I left a comment on your issues
18:17:32FromDiscord<haxscramper> In reply to @hamidb80 "a want a parser": https://haxscramper.github.io/hnimast/nimble_aux.html#parsePackageInfo%2Cstring%2CAbsFile
18:19:20FromDiscord<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:06FromDiscord<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:29FromDiscord<haxscramper> --gc:arc
19:08:31FromDiscord<haxscramper> Done
19:09:16FromDiscord<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:07FromDiscord<JSONBash> isn't there new 'sink' and 'lent' keywords? and isn't thread and memory different?
19:20:47FromDiscord<JSONBash> i read that passing/moving/copying variable between threads is different now (from thread local heaps)
20:27:47FromDiscord<Elegantbeef> Well `lent`/`sink` arent new they're in 1.4.0 and are just annotations for the compiler @JSONBash
20:28:37FromDiscord<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:32FromDiscord<JSONBash> so lent is like passing a pointer? assuming no mutation though?
20:45:26FromDiscord<JSONBash> and what about passing variables between threads? If i have a large seq or table (200 K) how would that work?
20:45:52FromDiscord<Elegantbeef> Well it's not lines that doesnt work it's the `open` that doesnt work
20:46:16FromDiscord<Elegantbeef> Weird
20:46:17FromDiscord<Elegantbeef> That jumpepd
20:46:32FromDiscord<Elegantbeef> Uhh lent is the immutable version of `var` so the same logic applies
20:47:17FromDiscord<JSONBash> oh okay, that makes sense
20:47:37FromDiscord<JSONBash> ill try some things out and see if i can just grok it
20:48:05FromDiscord<Elegantbeef> sent a code paste, see https://play.nim-lang.org/#ix=3yem
20:48:27FromDiscord<Elegantbeef> sent a code paste, see https://play.nim-lang.org/#ix=3yen
20:49:41FromDiscord<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:10FromDiscord<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:19FromDiscord<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:27FromDiscord<Elegantbeef> Probably something that was done for future implementations?
23:05:36FromDiscord<Elegantbeef> similar to `out`
23:12:49FromDiscord<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