<< 13-09-2021 >>

01:21:36arfyhi. wehn it comes to wrappers for libraries, what's the general idiom? To have a thin wrapper, with types close to the C interface, or to provide sweetened syntax?
01:25:04FromDiscord<auxym> Personal preference I guess, but I prefer an idiomatic nim API hiding the unsafe C FFI stuff under it. I'd rather not have to deal with cstrings and ptrs
01:25:57*arfy nods. I'm currently looking into the nimbass package from nimble, and it seems to be an auto-generated wrapper with ninterop
01:28:29FromDiscord<auxym> Writing a nice idiomatic nim on top is likely a lot of manual work, yeah. If you want, you can write a wrapper over the stuff you're going to use in your project only
01:30:56arfyyeah. I might do that. I really just need a simple playFile function. but bass is the library I'm familiar with.
01:30:58FromDiscord<impbox [ftsf]> A nimmy wrapper is definitely nicer to use. But a c like wrapper is better than nothing
01:39:06*arfy wonders what's coming in nim 1.6.
01:39:26FromDiscord<leorize> nimble lock file
02:39:51*arkurious quit (Quit: Leaving)
02:48:34FromDiscord<cabboose> So I started using CPS after reading all the RFCs and what not on it; it's really fun to use and im pretty stoked; is there a timeline when they will complete the compiler support for generics though?
02:49:03FromDiscord<cabboose> This thing is a weapon and I'm surprised it's not very promoted or supported
02:49:37*oprypin quit (Ping timeout: 245 seconds)
02:54:14arfyoh dear. python people will be annoyed by this.
02:54:15arfyC:\Users\arfy3>pip search bass
02:54:15arfyERROR: XMLRPC request failed [code: -32500]
02:54:15arfyRuntimeError: PyPI's XMLRPC API is currently disabled due to unmanageable load and will be deprecated in the near future. See https://status.python.org/ for more information.
02:55:44FromDiscord<cabboose> Excellent
02:56:58*rockcavera joined #nim
02:56:59*rockcavera quit (Changing host)
02:56:59*rockcavera joined #nim
02:57:38arfynim. taking over the world, one language at a time. mwhahahahaha.
03:10:58FromDiscord<impbox [ftsf]> In reply to @cabboose "So I started using": I don't really understand it, but glad it's awesome.
03:11:04*oprypin joined #nim
03:50:44FromDiscord<gogolxdong (liuxiaodong)> Is there any known issues of showing svg with jester?
04:06:01*supakeen quit (Quit: WeeChat 3.2.1)
04:06:03*nrds quit (*.net *.split)
04:06:03*perro quit (*.net *.split)
04:06:05*Yardanico quit (*.net *.split)
04:06:05*Ekho quit (*.net *.split)
04:06:05*greyrat quit (*.net *.split)
04:06:05*oz quit (*.net *.split)
04:06:14*Yardanico joined #nim
04:06:15*nrds joined #nim
04:06:17*perro joined #nim
04:07:28*ox joined #nim
04:07:30*greyrat joined #nim
04:07:45*supakeen joined #nim
04:19:25*NimBot joined #nim
04:19:26*aaaaaaaaaa joined #nim
04:19:35*mikko joined #nim
04:19:38*djanatyn joined #nim
04:20:25*Ekho joined #nim
04:23:27*arkanoid joined #nim
04:25:05*happycorsair[m] joined #nim
04:25:35*nixfreak_nim[m] joined #nim
04:27:25FromDiscord<impbox [ftsf]> showing svg is client side so as long as you can serve the file it should be no problem
04:44:10*rockcavera quit (Remote host closed the connection)
05:12:01*Gustavo6046 quit (Ping timeout: 252 seconds)
05:30:38*bkay quit (Quit: Leaving)
05:32:33FromDiscord<PsychoClay> how do i iterate over a sharedtable?
06:14:07NimEventerNew thread by Doongjohn: Discard vs var _ {.global.} =, see https://forum.nim-lang.org/t/8417
06:41:41*max22- joined #nim
06:42:04*jjido joined #nim
06:44:10NimEventerNew thread by Alexeypetrushin: How to convert range types 'a'..'z'?, see https://forum.nim-lang.org/t/8418
07:28:48*PMunch joined #nim
08:06:50*neurocyte joined #nim
08:06:50*neurocyte quit (Changing host)
08:06:50*neurocyte joined #nim
08:17:49FromDiscord<Varriount> @treeform Congrats on the Hacker News posts!
08:19:52PMunchDamn, two things on the front page at the same time, congrats!
08:20:52arkanoiddamn, wow
08:21:57arkanoidshould I wrap js types as "object" or "ref object" for ffi?
08:22:28Zevvtreeform is on a roll, right
08:28:38*jjido quit (Quit: My MacBook Air has gone to sleep. ZZZzzz…)
08:34:43PMunchHuh, I have to say nimPNG is a pretty neat library
08:35:07PMunchI just created a 255x255 image montage by simply copying the pixels around
08:35:22PMunchTried to do the same with imagemagick but it just kept crashing
08:39:14FromDiscord<impbox [ftsf]> yeah, it's pretty rad
08:39:35*max22- quit (Quit: Leaving)
08:40:29*max22- joined #nim
08:41:31PMunchNow to just find a program that can actually open this 155648 x 98304 monstrosity :P
09:07:01FromDiscord<tandy> is there an md5 library for the javascript backend?
09:11:17PMunchHmm, kinda hard to know if I managed to actually create the image properly when I don't have any program that will open it..
09:20:09FromDiscord<Rika> Nothing can open something that large?
09:20:16FromDiscord<Rika> I’d imagine something could
09:25:45FromDiscord<tandy> sent a code paste, see https://play.nim-lang.org/#ix=3yJu
09:30:11*Gustavo6046 joined #nim
09:31:09*aaaaaaaaaa is now known as madprops
09:31:09*madprops quit (Changing host)
09:31:09*madprops joined #nim
10:08:43NimEventerNew thread by Ul: How to get the next iterator value outside of the loop?, see https://forum.nim-lang.org/t/8419
10:13:00*Vladar joined #nim
10:15:05FromDiscord<tandy> why was `nimble develop` behaviour changed?
10:15:14FromDiscord<tandy> its kinda anoying \:o(
10:17:23FromDiscord<Rika> What changed
10:22:43*robertmeta quit ()
10:23:00*robertmeta joined #nim
10:37:49FromDiscord<tandy> im not sure, but i cant do nimble develop in a folder to use the local copy instead of git
10:39:16*oprypin quit (Ping timeout: 252 seconds)
10:41:20FromDiscord<Rika> ?
10:41:32FromDiscord<Rika> Go in the folder, then type only “nimble develop”
10:43:50FromDiscord<impbox [ftsf]> Yeah that changed in 1.6 according to the forum post
10:46:31FromDiscord<tandy> i cry
10:59:52PMunchHmm, given a module like this: http://ix.io/3yJX/nim
11:01:02PMunchI can use it like you would expect from a second module: http://ix.io/3yK1/nim
11:01:34PMunchBut `nim doc m1` just gives me `Exported = Test` which isn't all that helpful..
11:01:50FromDiscord<Rika> I was about to ask what was wrong lol
11:02:07*pro joined #nim
11:02:48PMunchI mean I generate this code with a macro, so I could throw in a when defined(nimdoc) switch..
11:03:01PMunchAnd replicate all the code there..
11:04:51*pro quit (Client Quit)
11:06:29Mister_Magisterhello i want to get time in two different timezones but i can't quite get around that :/ do you maybe have some snippet?
11:18:19FromDiscord<enthus1ast> Does this mean one has to commit every change?↵(@impbox [ftsf])
11:25:59Mister_Magisterscrew that i just subtracted 6 hours :D
11:28:10arkanoidI'm wrapping a js lib with karax. I'm having success in calling functions and stuff, but I'm unsure how I should deal with linking css and js file. How would you do that?
11:58:42FromDiscord<Innokentiy Sokolov> <@&371760044473319454@Zynah who PMed me and tried to scam or compromise my Steam account with some bullshit he made up?
11:59:15FromDiscord<Innokentiy Sokolov> hi everyone)
11:59:34FromDiscord<Yardanico> done
11:59:42FromDiscord<Innokentiy Sokolov> thanks man!
12:00:10*oprypin joined #nim
12:00:37FromDiscord<enthus1ast> hi!
12:00:37*max22- quit (Remote host closed the connection)
12:06:01*supakeen quit (Quit: WeeChat 3.2.1)
12:06:30*supakeen joined #nim
12:08:41*max22- joined #nim
12:10:55NimEventerNew thread by Ggibson: How to build devel these days? (pre 1.6), see https://forum.nim-lang.org/t/8420
12:13:10FromDiscord<Yardanico> can't answer rn, answer him that he needs to use csources_v1 and that build_all.sh clones that by itself :)
12:31:32PMunch@Yardanico, I answered him for you :)
12:33:47*rockcavera joined #nim
12:33:47*rockcavera quit (Changing host)
12:33:47*rockcavera joined #nim
12:38:41*maxime_ joined #nim
12:40:18*max22- quit (Ping timeout: 268 seconds)
12:47:38FromDiscord<tandy> https://news.ycombinator.com/item?id=28506220
12:47:43FromDiscord<tandy> pixie is on hn
12:47:55PMunch@tandy, Genny is as well
12:48:01PMunchOr at least it was earlier today
12:48:14FromDiscord<tandy> was pixie made to support fidget2?
12:54:19PMunchHmm, how would I add a comment to a type definition in a macro?
12:55:00PMunchI tried to add it to the nnkRecList, but while repr outputs it fine I get an error complaining about illformed AST
12:55:40FromDiscord<haxscramper> it is not possible to construct type definition with comments
12:55:53FromDiscord<haxscramper> the only toplevel entry with documentation comments that you can create is proc def
12:56:27PMunchBut they can have comments in real code?
12:57:00FromDiscord<Gumber aka Zachary Carter> In reply to @Innokentiy Sokolov "<@&371760044473319454> could someone please": Hey, glad Yard helped you out, but in the future please provide a screenshot so we can confirm they're a spammer / scammer
12:57:13FromDiscord<haxscramper> yes, they can have comment in real code↵(<@709044657232936960_=50=4dunch=5b=49=52=43=5d>)
12:57:19FromDiscord<haxscramper> but `.comment` is not accessible in macros
12:57:35FromDiscord<haxscramper> and type/var definition comments are placed in `.comment`
12:57:47FromDiscord<haxscramper> and proc definitinos are not placed anywhere but parsed as `nnkCommentStmt`
12:59:02PMunchHmm, well that's annoying..
13:01:47FromDiscord<haxscramper> sent a long message, see http://ix.io/3yKB
13:02:07*kayabaNerve_ joined #nim
13:02:19FromDiscord<haxscramper> Maybe I should write RFC for `.comment`, because for those who do write documentation comments and do care about macros generating something usable this is needed
13:02:44FromDiscord<haxscramper> Otherwise we would end up waiting for several years in the end
13:02:56FromDiscord<haxscramper> And getting v2 AST structure that breaks all existing code
13:03:12FromDiscord<haxscramper> Maybe his opinion changed on that matter again since I last asked though
13:03:44*oprypin quit (Ping timeout: 268 seconds)
13:04:03FromDiscord<haxscramper> https://github.com/nim-lang/Nim/issues/8516
13:04:22*kayabaNerve quit (Ping timeout: 252 seconds)
13:04:45PMunchIn the meantime it's apparently possible to get .comment set by using parseStmt: http://ix.io/3yKC/nim
13:04:52PMunchIt's a bit of a hack, but it works..
13:05:29FromDiscord<haxscramper> yes, just kill me please
13:05:45FromDiscord<haxscramper> I can also `exec` nim compiler to `nim doc --json`
13:05:54FromDiscord<haxscramper> Same level of usability
13:07:06PMunchSlightly less of a hack: use quote do
13:10:16FromDiscord<haxscramper> `quote(field: int ##[ DOcumentation ]##)` ?
13:10:40FromDiscord<haxscramper> ` expected: ')', but got: 'DOcumentation '`
13:11:35PMunchThis is what I'm using: http://ix.io/3yKF/Nim
13:11:56PMunchSeems to be impossible to get anything into that comment programatically though..
13:15:39*oprypin joined #nim
13:16:01*rockcavera quit (Remote host closed the connection)
13:16:35*stkrdknmibalz quit (Quit: WeeChat 3.0.1)
13:18:42FromDiscord<haxscramper> Well, having access to this would be extremely useful for all sorts of auto-codegen thigns
13:19:05FromDiscord<haxscramper> Though ideally toplevel entries should not be generated from macros, it makes things harder to figure out
13:19:16FromDiscord<haxscramper> But at the same time sometimes it is inevitable
13:20:58FromDiscord<Innokentiy Sokolov> In reply to @Gumber "Hey, glad Yard helped": Sure no problem! Can do this straight away - I can PM to any moderator with the screenshots - just knock-knock to me )
13:21:35*arkurious joined #nim
13:22:43FromDiscord<Gumber aka Zachary Carter> It's all good
13:22:53FromDiscord<Gumber aka Zachary Carter> It's just nice to have proof before we click the b7 button
13:24:04FromDiscord<Rika> bseven?
13:25:46FromDiscord<Innokentiy Sokolov> In reply to @Gumber "It's just nice to": got it thanks!
13:28:28FromDiscord<Gumber aka Zachary Carter> In reply to @Rika "bseven?": B&
13:28:45FromDiscord<Gumber aka Zachary Carter> banned
13:29:24FromDiscord<Gumber aka Zachary Carter> https://www.urbandictionary.com/define.php?term=B7
13:29:59FromDiscord<Gumber aka Zachary Carter> I don't even know why I started using it - I think I spent too much time on some stupid message board in my early twenties haha
13:30:49FromDiscord<Rika> b& is more understandable
13:31:03nrds<Prestige99> bampersand
13:40:44*oprypin quit (Ping timeout: 268 seconds)
13:42:07PMunchApparently it goes: Banned > Band > B& > B7
13:42:25PMunchI have & on the 6 key though..
13:43:03supakeenscandinavian detected
13:48:24PMunch:D
13:49:03PMunchDamn, I'm trying to convert this massive montage image into something that feh can display (it doesn't like the PNG format it's in for some reason)
13:49:15PMunchCurrently it's using 382Gb of cache..
13:49:36PMunchThe image is "only" 804Mb..
13:57:33FromDiscord<tandy> does anyone know if karax supports async procs?
13:57:53*oprypin joined #nim
13:59:03FromDiscord<tandy> is kajax the only way to make api requests in the client browser?
14:00:02*ox is now known as oz
14:11:19PMunchtandy, well you can use the ajax call library directly
14:11:34PMunchHmm, my doc comment hack doesn't appear to work for enums..
14:16:09PMunchHmm, can't I comment on a importc procedure?
14:18:28*PMunch quit (Quit: Leaving)
14:18:58FromDiscord<Yardanico> you can, just do it below the proc
14:19:03FromDiscord<tandy> the problem is i have some api bindings which i ported to the javascript backend so that I could use them in the browser with karax↵(<@709044657232936960_=50=4dunch=5b=49=52=43=5d>)
14:19:04FromDiscord<Yardanico> with indentation iirc
14:20:49*oprypin quit (Ping timeout: 268 seconds)
14:30:17FromDiscord<QueenFuckingAdrielle> does anyone have good example of type declaration, proc signature, and calling with multiple generic types?
14:32:30*oprypin joined #nim
14:38:36FromDiscord<cabboose> Trying out Elijahrs lockfreequeues; they fail to compile as a field of an object under orc but succeeds with refc gc
14:38:48FromDiscord<cabboose> rip
14:38:55FromDiscord<cabboose> sent a code paste, see https://play.nim-lang.org/#ix=3yL4
14:39:00FromDiscord<Yardanico> In reply to @QueenFuckingAdrielle "does anyone have good": the tutorial probably? :)
14:39:14FromDiscord<cabboose> sent a code paste, see https://play.nim-lang.org/#ix=3yL5
14:39:41FromDiscord<Yardanico> https://nim-lang.org/docs/tut1.html#procedures https://nim-lang.org/docs/tut1.html#advanced-types https://nim-lang.org/docs/tut2.html#generics
14:48:34FromDiscord<cabboose> you're my only hope \:')
14:48:37FromDiscord<cabboose> sent a code paste, see https://play.nim-lang.org/#ix=3yL8
14:50:15FromDiscord<haxscramper> no, I don't know how to debug good-for-refc-bad-for-orc errors
14:50:26FromDiscord<haxscramper> You might've hit a bug
14:50:38*oprypin quit (Ping timeout: 268 seconds)
14:50:41FromDiscord<cabboose> rip
14:50:42FromDiscord<haxscramper> If you can minimize it you migth ask in #internals
14:50:52FromDiscord<haxscramper> Or on forum
14:51:03FromDiscord<cabboose> cheers
14:51:35FromDiscord<haxscramper> Yes, I've been in this situation as well, but I basically ended up with "requires refc" check
14:51:49FromDiscord<haxscramper> `when not <uses refc>: error`
14:56:04FromDiscord<cabboose> sent a code paste, see https://play.nim-lang.org/#ix=3yLb
14:56:18FromDiscord<leorize> looks minimal
14:57:57FromDiscord<leorize> one day auto minimization will be a reality
14:58:27FromDiscord<leorize> well it kinda is with disruptek's dust, the only issue is that it doesn't work \:p
14:58:34FromDiscord<cabboose> Going to try latest devel first or people will yell at me (still on 9/1 nightly)
14:59:06FromDiscord<cabboose> Yep still chopped
14:59:17FromDiscord<cabboose> I'll post to nim issues; cheers
15:00:05FromDiscord<leorize> we fixed cps for newer compilers so you can migrate up now \:p
15:01:52*oprypin joined #nim
15:02:01FromDiscord<cabboose> image.png https://media.discordapp.net/attachments/371759389889003532/886990105372426290/image.png
15:02:01FromDiscord<cabboose> I'm glad this is not a reality anymore
15:02:02FromDiscord<cabboose> thank you
15:03:56*eph joined #nim
15:21:55FromDiscord<enthus1ast> i'm trying to do a "distinct select" with ormin
15:22:18FromDiscord<enthus1ast> does one know how/if this is possible?
15:22:49FromDiscord<enthus1ast> or, can i insert sql literally into the generated query?
15:24:17FromDiscord<enthus1ast> i want to generate this sql\:`select DISTINCT checkName from checkruns;`
15:24:21FromDiscord<isd> Has anyone seen this kind of message before? https://media.discordapp.net/attachments/371759389889003532/886995722266894419/unknown.png
15:25:19FromDiscord<cabboose> You wouldnt happen to have the file opened accidentally in a editor or something?
15:25:21FromDiscord<isd> (edit) "Has anyone seen this kind of message before? ... https://media.discordapp.net/attachments/371759389889003532/886995722266894419/unknown.png" added "This was totally unexpected for me because I tried just to run https://rosettacode.org/wiki/Walk_a_directory/Non-recursively#Nim"
15:28:13FromDiscord<isd> indeed yes, thank you roboto @cabboose
15:28:32FromDiscord<cabboose> Meep morp
15:38:18FromDiscord<QueenFuckingAdrielle> In reply to @Yardanico "the tutorial probably? :)": lol i went through it 😛 just looking for myObject: [T, A] --> [int, float]
15:38:24FromDiscord<QueenFuckingAdrielle> i figured it out
15:39:54FromDiscord<cabboose> 💯🤟❤️
15:45:18*oprypin quit (Ping timeout: 268 seconds)
15:55:34*oprypin joined #nim
16:01:27NimEventerNew thread by Serge: How do you create a <div> with Nim dom? , see https://forum.nim-lang.org/t/8421
16:05:33*tdc joined #nim
16:06:02FromDiscord<Rika> nimdom sounds like kingdom + nim
16:08:00FromDiscord<auxym> if I want to import a C function via `{.header., importc.}`, but the header requires that the `#include`ing file defines a bunch of `#defines` to configure it, what are my options? Use `{.emit.}` to set the defines?
16:08:36FromDiscord<haxscramper> `header: "#define AAA\n#include BBB"`
16:08:38FromDiscord<haxscramper> `header` can contain anything
16:08:57FromDiscord<haxscramper> But this won't be a 'configuration'
16:09:02nrds<Prestige99> impbox if you're here, I started looking into sdl and it's awesome. Thanks for the recommendation
16:10:18FromDiscord<haxscramper> sent a code paste, see https://play.nim-lang.org/#ix=3yLL
16:10:48FromDiscord<haxscramper> `.emit.` works very weirdly for this use case, since it is emitted once
16:10:54FromDiscord<haxscramper> But header might have to be included multiple times
16:11:11FromDiscord<auxym> Thanks, that's what I had in mind!
16:11:58FromDiscord<haxscramper> sent a code paste, see https://play.nim-lang.org/#ix=3yLM
16:12:16FromDiscord<auxym> emit might fit my use cas better though? I have to include {.header.} for a dozen or so functions from the same header (in the same file), but only need to set the defines once
16:12:53FromDiscord<haxscramper> it is not possible to guarantee emit placement
16:13:17FromDiscord<haxscramper> It might end up in the middle of some proc, instantiated once
16:13:22FromDiscord<enthus1ast> sent a code paste, see https://play.nim-lang.org/#ix=3yLP
16:13:51FromDiscord<haxscramper> While you need `header` to be present in every single file where you use C library
16:14:07FromDiscord<haxscramper> Since nim generates undefined number of C files, you have to do it via header
16:14:17FromDiscord<enthus1ast> maybe you can define them with --passc
16:14:22FromDiscord<haxscramper> Maybe there is another workaround I'm not aware of
16:14:48FromDiscord<cabboose> Well no other human would have a chance of knowing it if you dont
16:14:49FromDiscord<haxscramper> Yes, this would work as well. `--passc:-DLIBMACRO=VALUE`
16:14:57FromDiscord<haxscramper> it is global
16:15:15FromDiscord<haxscramper> You can place all the necessary defined in the`{.passc:` section of your library
16:15:24FromDiscord<haxscramper> In this case configuration would be global
16:15:39FromDiscord<haxscramper> But that is not much different from directly using `header`
16:21:04FromDiscord<enthus1ast> (i know having to select stuff, then remove doublicates indicates a database design mistake... )
16:21:51FromDiscord<cabboose> Man cps is fucking baller
16:22:04FromDiscord<cabboose> I wrote this; without using closures or anything
16:22:12FromDiscord<cabboose> sent a code paste, see https://play.nim-lang.org/#ix=3yLQ
16:22:36FromDiscord<cabboose> with that cwait I have it swapped to another thread and then back so i only do io bs on one thread
16:22:39FromDiscord<cabboose> so juicy
16:23:13FromDiscord<cabboose> and don't have to be concerned about doing a bunch of callbacks or anything like that
16:23:37FromDiscord<cabboose> devs pls bring generic support
16:27:29FromDiscord<auxym> @haxscramper @enthus1ast Global is indeed what I want (I think), so `{.passC.}` does seem like a good option. I'll run some tests
16:31:35FromDiscord<auxym> The nim docs (https://nim-lang.org/docs/manual.html#implementation-specific-pragmas-header-pragma) don't seem to mention that you can put arbitrary text in `{.header.}`. The example only shows `{.header.: "<stdint.h>"}`, doesn't even have the `#include`
16:33:06FromDiscord<haxscramper> well
16:33:19FromDiscord<haxscramper> I can tell you what sanity levels I was on when I figured that out
16:34:05FromDiscord<haxscramper> But in general nim doc is missing some stuff like this, because otherwise it would mean enumerating all possible combinations of all pragmas
16:34:13FromDiscord<haxscramper> With examples
16:34:40FromDiscord<haxscramper> So basically no sane person is able to come up with use cases, so nobody ever thought about putting them in docs
16:34:58FromDiscord<haxscramper> Like when you might want to use `byref` instead of `bycopy` when wrapping C++ stuff
16:38:37*PMunch joined #nim
16:41:10FromDiscord<Yardanico> In reply to @cabboose "with that cwait I": wait but why are you using newAsyncHttpClient?
16:41:27FromDiscord<Yardanico> there won't be any difference from normal newHttpClient since cps is not really compatible with nim's async so you'll have to run it in another thread anyway
16:41:38FromDiscord<Yardanico> or write a proper cps-compatible http client
16:42:00FromDiscord<cabboose> It is being run in another thread
16:42:28FromDiscord<Yardanico> yes, so there's no difference between newAsyncHttpClient and newHttpClient
16:42:33FromDiscord<Yardanico> in fact newHttpClient will be better for you
16:42:54FromDiscord<cabboose> except I will have lots of queued requests wont I?
16:42:57FromDiscord<Yardanico> ?
16:43:10FromDiscord<cabboose> if a client request is big I don't want it to block
16:43:16FromDiscord<Yardanico> you still use async in that separate thread where you run newAsyncHttpClient or not?
16:43:24FromDiscord<cabboose> yea
16:43:29FromDiscord<Yardanico> can you show the code?
16:44:00FromDiscord<auxym> @haxscramper >I can tell you what sanity levels I was on when I figured that out Yeah, I can imagine D:
16:44:12*rockcavera joined #nim
16:44:13*rockcavera quit (Changing host)
16:44:13*rockcavera joined #nim
16:44:23FromDiscord<cabboose> gimme a sec
16:48:16FromDiscord<cabboose> https://github.com/shayanhabibi/cpslearning/blob/main/common.nim↵(@Yardanico)
16:48:50FromDiscord<Yardanico> interesting
16:52:52*maxime__ joined #nim
16:55:51*maxime_ quit (Ping timeout: 265 seconds)
16:56:33FromDiscord<dom96> What does cps buy you here? Why not just use async on its own?
16:57:11FromDiscord<cabboose> I guess I can scale it easier in my mind and the code just fits better for me in making sense of it
16:57:32FromDiscord<cabboose> I'm just playing with it atm; my original pharmacy project is written completely with async
16:58:02FromDiscord<cabboose> the ability to transfer these little stacks is pretty nifty though
16:58:55FromDiscord<cabboose> The cps will be more heavily used as I go deeper into it; I'm just learning to play around with it \:)
16:59:14FromDiscord<cabboose> it's fun!
17:30:36*oprypin quit (Read error: Connection reset by peer)
17:30:38*oprypin_ joined #nim
17:35:33Zevvso, what did you get running yet?
17:39:29FromDiscord<cabboose> Well... I... shut up... I am still playing with my feet here
17:40:35*oprypin_ quit (Quit: Bye)
17:40:55*oprypin joined #nim
17:42:35*PMunch quit (Quit: leaving)
17:46:34*Guest16 joined #nim
18:00:14FromDiscord<ismustachio> sent a long message, see http://ix.io/3yMd
18:00:22madpropsso i found this https://forum.nim-lang.org/t/2742
18:01:03madpropskind of a funny request
18:01:49FromDiscord<ismustachio> (edit) "http://ix.io/3yMd" => "http://ix.io/3yMg"
18:02:25madpropsbtw any library to read/write metadata on audio files?
18:06:50FromDiscord<Recruit_main707> @ismustachio a: ref Test1 is of type `ref ref object` because Test1 is implicitly a ref object already
18:09:22*notchris quit ()
18:09:36*notchris joined #nim
18:09:58FromDiscord<cabboose> none off the top of the head; have you checked nimble?↵(<@709044657232936960_madprops=5b=49=52=43=5d>)
18:12:39FromDiscord<ismustachio> @Recruit_main707 thank you very much!
19:04:02NimEventerNew thread by HerdingSheep: Beginer problem: Combine and alternate list, see https://forum.nim-lang.org/t/8422
19:09:59*stkrdknmibalz joined #nim
19:22:16*leth joined #nim
19:27:27*Guest16 quit (Quit: Client closed)
19:52:57FromDiscord<jakkn> sent a code paste, see https://play.nim-lang.org/#ix=3yMI
19:56:17NimEventerNew thread by Elcritch: How to create C defines from Nim?, see https://forum.nim-lang.org/t/8423
19:59:36*stkrdknmibalz quit (Read error: Connection reset by peer)
20:14:31*Guest16 joined #nim
20:14:56*Guest16 left #nim (#nim)
20:30:46*maxime__ quit (Remote host closed the connection)
20:38:18*max22- joined #nim
20:45:18FromDiscord<Recruit_main707> @jakkn cstring is bascially a `char`, i assume c#'s string is a class which will have more stuff and you cant just pass it like that, try to find a way to turn c#'s strings into a `char`
20:54:26*supakeen quit (Remote host closed the connection)
20:54:50*supakeen joined #nim
20:55:36FromDiscord<Varriount> Zevv: Just an FYI, the bulk of the time spent compiling my SQL grammar isn't spent by NPeg, it's spent by the Nim compiler and C compiler.
21:04:07FromDiscord<tandy> when using var objects, do you need to return a var object?
21:07:00FromDiscord<Recruit_main707> you cant return var objects, var means the argument is variable, (implicitly a pointer) and you can edit it
21:07:19*Vladar quit (Quit: Leaving)
21:07:28FromDiscord<tandy> oh cool
21:12:27FromDiscord<Varriount> In reply to @Recruit_main707 "you cant return var": Well, you can have a "var" return type, but it isn't quite the same thing.
21:31:46FromDiscord<Varriount> sent a long message, see http://ix.io/3yN3
21:33:10FromDiscord<tandy> dam \:(↵`Error: 'user' is of type <var User> which cannot be captured as it would violate memory safety, declared here:`
21:33:43nrds<Prestige99> I'm attempting to get this rendering example working for sdl2: https://github.com/treeform/pixie/blob/master/examples/realtime_sdl.nim but the screen doesn't seem to clear between frames. Anyone have experience with this lib?
21:34:27FromDiscord<Elegantbeef> I think the issue is that your textture isnt cleared every frame
21:34:38nrds<Prestige99> Ah good point
21:34:39FromDiscord<Varriount> In reply to @jakkn "hi, I'm a nim": Oh, and one that trips up people quite often: the Nim compiler automatically determines whether a procedure's parameter will be passed by pointer or by copy (by value). This is true even for procedures marked with a calling convention (`cdecl`, etc.). If you need a custom type to be passed a certain way, use the `byref` or `bycopy` pragmas.
21:36:24*tdc quit (Ping timeout: 268 seconds)
21:37:44FromDiscord<tandy> oo nice↵(@Varriount)
21:38:38FromDiscord<tandy> where is the documentation for this?
21:40:01FromDiscord<tandy> also how do u use multiple pragma at once?
21:43:37FromDiscord<tandy> this is it right?
21:43:42FromDiscord<tandy> sent a code paste, see https://paste.rs/4ka
21:43:45*supakeen quit (Remote host closed the connection)
21:44:09*supakeen joined #nim
21:46:39FromDiscord<tandy> sent a code paste, see https://play.nim-lang.org/#ix=3yNc
21:47:11FromDiscord<Recruit_main707> `{.pragma, anotherpragma.}`
21:47:36FromDiscord<tandy> ahh yes↵(@Recruit_main707)
22:01:09FromDiscord<tandy> hmm okay
22:01:37FromDiscord<tandy> so the issue occurs when the object is instantiated in one module, but edited in another
22:14:24*max22- quit (Quit: Leaving)
22:15:22FromDiscord<fae> whats the best way to disambiguate operators? e.g. I'm importing vmath, but i want to do just normal division between two floats using system./
22:18:48FromDiscord<Elegantbeef> sent a code paste, see https://play.nim-lang.org/#ix=3yNl
22:20:41FromDiscord<Elegantbeef> But afaik vmath doesnt override `float / float`
22:24:06FromDiscord<fae> ah i was actually trying to divide a float by an int, but i just realized that system doesnt even support that either
22:24:17FromDiscord<fae> if i use two floats then vmaths generic procs dont interfere, thanks
22:24:31FromDiscord<Elegantbeef> If you want to support that `import std/leniantops`
22:24:36FromDiscord<Elegantbeef> Of spelled correctly 😛
22:25:15FromDiscord<fae> but `system.\`/`\(a,b)` also works nicely
22:25:28FromDiscord<fae> (edit) "`system.\`/`\(a,b)`" => "`system./(a,b)`"
22:25:54FromDiscord<fae> i guess you cant escape backticks in single line code snippets huh
22:26:10FromDiscord<Elegantbeef> I think you can but idk how
22:26:19FromDiscord<Elegantbeef> Might be two graves
22:38:18*PersonMcGuy joined #nim
22:42:23PersonMcGuyHello all, has anyone ever got the error: "cannot 'importc' variable at compile time; c_memmove"
22:42:52PersonMcGuyI was using the base58 library under stew and it was working fine, then all of sudden it started throwing this error
22:42:55FromDiscord<Elegantbeef> You're attempting to use a procedure which require C interop at compile time
22:43:30FromDiscord<Elegantbeef> You're attempting to use apart of it at compile time, so assigning a const or inside a `static:`
22:44:14PersonMcGuyBut I had been using it fine with no problems with interop at all
22:44:32FromDiscord<Elegantbeef> Any link to your code?
22:44:49PersonMcGuyAnd I guess technically the errors is coming out of system.nim: 2232
22:45:51PersonMcGuyAh. Nevermind I just realized where I goofed.
22:45:59FromDiscord<Elegantbeef> you're building for JS?
22:46:15FromDiscord<Elegantbeef> Ah nvm that's not js
22:46:15FromDiscord<Elegantbeef> I've got superb reading skills
22:46:26PersonMcGuyI had it working with a var and I guess I copy and pasted the call on to a const
22:48:01PersonMcGuyThanks again for the help as always. How have you been? I hope you're doing okay
22:48:22FromDiscord<Elegantbeef> Bashing my head into jsgen, so take that as my present state
22:50:07PersonMcGuyHuh, never seen that area before. Looks... involved. lol
22:51:37FromDiscord<Elegantbeef> Well it's taking Nim and ouputting it into a language with different semantics so it's "fun" to say the least
22:52:08FromDiscord<Elegantbeef> One of my bug fixes made an issue evident in the js gen so i have to fix that before making a PR
22:52:43PersonMcGuyHow does it even handle dynamic typing?
22:52:59FromDiscord<Elegantbeef> It doesnt handle it
22:53:02FromDiscord<Elegantbeef> It handles it on the nim side and lets js do what it will
22:53:45FromDiscord<tandy> [Elegantbeef](https://matrix.to/#/@elegantbeef:matrix.org)\: since ur doing javascript stuff do u kno if its possible to pass a var object to a proc to update its values with js?
22:53:58FromDiscord<tandy> im going slightly mad with this issue
22:54:07FromDiscord<Elegantbeef> Why wouldnt it be
22:54:15FromDiscord<tandy> yeah..
22:54:19FromDiscord<Elegantbeef> You were attempting to use a closure with a `var object`
22:54:31FromDiscord<Elegantbeef> As such nim's safety said "No" since the reference can outlive the closure
22:54:54FromDiscord<Elegantbeef> you can use a `ptr object` instead for the closure which should work on JS
22:55:13FromDiscord<Elegantbeef> But on C/C++ it might be unsafe as the closure can outlive the place of "borrowing"
22:55:47FromDiscord<tandy> hmmm
22:56:09FromDiscord<tandy> maybe that will fix it
22:56:20FromDiscord<Elegantbeef> Well it'll fix it but it's unsafe
22:57:14FromDiscord<tandy> i considered just using indexedDB to store the data that im passing around
22:57:29FromDiscord<tandy> is that the wiser approach?
22:58:38FromDiscord<Elegantbeef> you could also just use an `ref object` if you wanted
22:58:50FromDiscord<Elegantbeef> https://play.nim-lang.org/#ix=3yNr here's that unsafe behaviour
22:59:45FromDiscord<tandy> thats what i was doing before, but when i run `discard updateObject(object)` it doesnt actually store anything in `object`
23:01:41FromDiscord<tandy> scary
23:16:26*PersonMcGuy quit (Quit: Client closed)
23:42:30*leth quit (Quit: no reason)