<< 01-02-2023 >>

00:04:57*Lord_Nightmare quit (Quit: ZNC - http://znc.in)
00:07:54*Lord_Nightmare joined #nim
00:10:48*jmdaemon joined #nim
01:13:59*sommerjan quit (Quit: Konversation terminated!)
01:24:59*def- quit (Quit: -)
01:25:19*def- joined #nim
01:34:05*lumo_e joined #nim
01:43:57FromDiscord<sOkam!> I have an issue, where I want to keep two separate values in sync. When I change one, the other should also change↵But they are different types, so I cannot just reference one to the other↵How would you solve such type of situation? 🤔
01:48:02FromDiscord<Elegantbeef> More context is required
02:01:28FromDiscord<sOkam!> sent a code paste, see https://play.nim-lang.org/#ix=4mKu
02:02:14FromDiscord<Elegantbeef> Make a proc that takes physics and applies it to the render data, or just use the physics body interpolated
02:02:32FromDiscord<sOkam!> I could have both fixed point, but it would make me rewrite big chuncks of vmath for the unique type, so was thinking if there could be some other solution
02:03:03FromDiscord<sOkam!> In reply to @Elegantbeef "Make a proc that": interpolated from where to where? 🤔
02:03:57FromDiscord<Elegantbeef> Using the dt and physics logic to interpolate where the object should be after last tick
02:04:52FromDiscord<sOkam!> yeah but doesn't interpolation take two points?
02:05:06FromDiscord<Elegantbeef> Exterpolate!
02:05:12FromDiscord<Elegantbeef> Polate all the directions
02:23:11*jmdaemon quit (Ping timeout: 252 seconds)
02:24:51termerHow do I check the value of a value I defined in CLI args? I'm doing -d:asyncBackend=chronos but I'm not sure how to check that in the code
02:25:09termer`when asyncBackend == "chronos"` doesn't work
02:25:35FromDiscord<Elegantbeef> `const asyncBackend {.strdefine.} = ...`
02:27:06termerand that will be set by the CLI option?
02:27:36*jmdaemon joined #nim
02:35:42FromDiscord<Elegantbeef> should
02:45:55*jmdaemon quit (Ping timeout: 252 seconds)
02:46:30termerseems to work, thanks ElegantBeef
02:52:39*azimut quit (Remote host closed the connection)
02:53:07*azimut joined #nim
02:57:06FromDiscord<sOkam!> how do you compare if two typedesc are the same? 🤔 ↵im trying `is` and `==` but its complaining for both
02:57:48*rockcavera joined #nim
02:58:17FromDiscord<Arathanis> `is` should work
02:59:43FromDiscord<Arathanis> !eval echo int is int
02:59:46NimBottrue
02:59:56FromDiscord<Arathanis> !eval echo int is string
02:59:59NimBotfalse
03:00:44FromDiscord<sOkam!> sent a code paste, see https://play.nim-lang.org/#ix=4mKD
03:00:57FromDiscord<sOkam!> (edit) "https://play.nim-lang.org/#ix=4mKD" => "https://play.nim-lang.org/#ix=4mKE"
03:01:22FromDiscord<sOkam!> (edit) "https://play.nim-lang.org/#ix=4mKE" => "https://play.nim-lang.org/#ix=4mKF"
03:01:52FromDiscord<sOkam!> sent a code paste, see https://play.nim-lang.org/#ix=4mKG
03:02:02FromDiscord<Arathanis> what is PType
03:02:09FromDiscord<sOkam!> an aliased type
03:02:23FromDiscord<sOkam!> its Fx in this case, aliased
03:02:36FromDiscord<Arathanis> can you show me how it is defined?
03:02:44FromDiscord<huantian> you can't return a typedesc from a func
03:02:54FromDiscord<Arathanis> casuse `distinctBase` is for distinct types
03:02:56FromDiscord<deadmeme77> e
03:02:58FromDiscord<sOkam!> and Fx is a distinct type coming from an int32, because its a fixed point representation
03:03:00FromDiscord<Elegantbeef> Use a template
03:03:00FromDiscord<Arathanis> i think its nonsensical for aliases
03:03:03FromDiscord<huantian> `typedesc` doesn't exist at runtime
03:03:51FromDiscord<sOkam!> In reply to @Arathanis "i think its nonsensical": how do you get the type where the given type is coming from, to compare it with the current, without distinctbase?
03:04:13FromDiscord<Arathanis> fwiw I don't KNOW its nonsensical for an alias
03:04:16FromDiscord<Arathanis> but you could check it
03:04:24FromDiscord<Arathanis> if it is truly an alias you should be able to use raw `is`
03:04:44FromDiscord<Arathanis> but your issue might be what @huantian mentioned
03:05:58FromDiscord<Arathanis> what is the goal this function is trying to accomplish?
03:06:15FromDiscord<sOkam!> sent a code paste, see https://play.nim-lang.org/#ix=4mKJ
03:06:43FromDiscord<Arathanis> oh if its an alias of a distinct type you should be fine
03:06:55FromDiscord<Arathanis> and i just checked, distinctBase doesn't care if its a non distinct type
03:07:00FromDiscord<sOkam!> In reply to @Arathanis "what is the goal": appropiately converting to the type representation, which will need extra processing when its fixed point, but no processing at all when its some number
03:08:12FromDiscord<Arathanis> https://media.discordapp.net/attachments/371759389889003532/1070178728056991824/image.png
03:08:38FromDiscord<sOkam!> that is not what it should say
03:08:45FromDiscord<sOkam!> it should be Next
03:08:53FromDiscord<Elegantbeef> No aliases are not distinct
03:08:58FromDiscord<Elegantbeef> I gave you a macro that shows alias
03:09:00FromDiscord<Arathanis> oh that isn't what distinctBase does
03:09:12FromDiscord<sOkam!> yeah, i use that as `baseType` to get to the raw type
03:09:25FromDiscord<sOkam!> but I only want the previous type, not the most bottom one
03:09:33FromDiscord<Arathanis> In reply to @Elegantbeef "I gave you a": im guessing this is up there somewhere? ^
03:09:36FromDiscord<Elegantbeef> Then change it to do that
03:09:44FromDiscord<sOkam!> but i don't know macros, beef
03:09:50FromDiscord<Elegantbeef> Learn them
03:09:52FromDiscord<sOkam!> like at all... they are cryptic
03:10:04FromDiscord<sOkam!> i have tried at least 4-5times
03:10:13FromDiscord<sOkam!> i understand 0% every time
03:10:50FromDiscord<Arathanis> I honestly sat down and hacked at macros until it stuck
03:10:58FromDiscord<Arathanis> There is a wealth of information online about macros in the abstract
03:11:04FromDiscord<Arathanis> cause its just AST manipulation
03:11:08FromDiscord<sOkam!> sent a code paste, see https://play.nim-lang.org/#ix=4mKK
03:11:29FromDiscord<sOkam!> the top macro is the one that beef wrote, and works
03:11:53FromDiscord<Elegantbeef> Remove `newCall` and there you go
03:12:00FromDiscord<sOkam!> the part below is my failure at trying to get the rest of the behavior. it works well for normal values, but have no clue how to do it for typedesc
03:13:39FromDiscord<Arathanis> im very sad that Windows Defender identifies Nim 1.6.10 as a virus u_u
03:13:49FromDiscord<Arathanis> this is new
03:14:03FromDiscord<Rika> It isn’t lol
03:14:12FromDiscord<Rika> The AV battle has been going on for a while
03:14:18FromDiscord<sOkam!> sent a code paste, see https://play.nim-lang.org/#ix=4mKL
03:14:32FromDiscord<Elegantbeef> Correct that will get the alias's type
03:14:38FromDiscord<sOkam!> kty ✍️
03:14:39FromDiscord<Elegantbeef> But again no one in their right mind cares about aliases
03:14:43FromDiscord<Elegantbeef> Cause they're not types
03:14:56FromDiscord<Arathanis> In reply to @Rika "It isn’t lol": I only mention the "newness" because I updated to 1.6.10 pretty quickly after it's release on one of my Windows machines but now my other Window's machines are very sad about trying to update
03:15:15FromDiscord<sOkam!> how do you check for that correctly then? do you just `is` without getting out of the alias ?
03:15:37FromDiscord<Elegantbeef> What?
03:15:42FromDiscord<Elegantbeef> No one cares about aliases
03:15:50FromDiscord<Elegantbeef> you do `Type is Alias`
03:16:09FromDiscord<Elegantbeef> Or whatever you're doing
03:16:27FromDiscord<Elegantbeef> Aliases are not anything but renaming of types, why you're caring where they point is beyond me
03:16:35FromDiscord<Arathanis> https://media.discordapp.net/attachments/371759389889003532/1070180837691244674/image.png
03:16:51FromDiscord<Arathanis> the alias name has no meaning
03:16:52FromDiscord<Arathanis> its just a name
03:18:40FromDiscord<Arathanis> In reply to @Rika "The AV battle has": is there a good work around?
03:18:45FromDiscord<sOkam!> In reply to @Elegantbeef "Aliases are not anything": because i thought it woould be important, and i fucking suck at understanding ast. so how could I possibly know if its important or not, if they are failing compilation with cryptic errors?
03:18:55FromDiscord<Rika> In reply to @Arathanis "is there a good": Disable your AV xd
03:19:10FromDiscord<Arathanis> so there is a ~~good~~ work around
03:19:22FromDiscord<ringabout> Use devel or 2.0rc
03:19:38FromDiscord<Rika> In reply to @Arathanis "so there is a": You can also compile Nim from source
03:19:39FromDiscord<sOkam!> In reply to @Arathanis "": kty. i guess i was lost in the simple syntax once again 😔
03:19:46FromDiscord<Arathanis> it's ok, learning
03:19:49FromDiscord<Rika> I hear compilation from source isn’t detected
03:20:01FromDiscord<ringabout> In reply to @ringabout "Use devel or 2.0rc": 1.6.10 missed a related PR
03:20:10FromDiscord<Arathanis> In reply to @sOkam! "kty. i guess i": in the context of programming, alias means "another name for something"
03:20:12FromDiscord<sOkam!> In reply to @Arathanis "it's ok, learning": it happens more than with learning. it happens even with stuff i already know. but yeah, i get what you mean, ty
03:20:14FromDiscord<Arathanis> but its not different than that thing
03:21:03FromDiscord<ringabout> In reply to @ringabout "1.6.10 missed a related": https://github.com/nim-lang/Nim/pull/19767
03:26:04FromDiscord<Arathanis> devel worked, thanks everyone
03:26:15FromDiscord<Arathanis> does choosenim always say devel has updates available? lol
03:30:09*arkurious quit (Quit: Leaving)
03:30:45*lain quit (Ping timeout: 260 seconds)
03:31:31*lain joined #nim
03:35:20FromDiscord<sOkam!> `is` fixed the issue, btw. ty for the help ✍️
03:49:53*azimut_ joined #nim
03:49:59*azimut quit (Ping timeout: 255 seconds)
04:26:59*jmdaemon joined #nim
04:29:01*m5zs7k quit (Ping timeout: 268 seconds)
04:29:55*m5zs7k joined #nim
04:37:58*m5zs7k quit (Ping timeout: 252 seconds)
04:43:44FromDiscord<ShalokShalom> sent a long message, see http://ix.io/4mKT
04:43:51*m5zs7k joined #nim
04:46:30FromDiscord<ShalokShalom> You can use single case enums, to define aliases, that create a new type ☺️
05:02:26FromDiscord<sOkam!> sent a long message, see http://ix.io/4mKU
05:02:43FromDiscord<sOkam!> (edit) "http://ix.io/4mKU" => "http://ix.io/4mKV"
05:05:18FromDiscord<Elegantbeef> sent a code paste, see https://play.nim-lang.org/#ix=4mKW
05:07:52FromDiscord<sOkam!> sent a code paste, see https://play.nim-lang.org/#ix=4mKX
05:08:35FromDiscord<sOkam!> so that math needs to be chosen differently depending on whether the type is coming from a type higher in the chain, or from an actual number instead
05:09:17FromDiscord<Elegantbeef> If you need to check the type at runtime you're doing something wrong
05:09:59FromDiscord<sOkam!> how do you mix fixed point math and floating point math in the same type at the same time, then? 🤔
05:10:20FromDiscord<Elegantbeef> Why do you need runtime checks if you know one side is fixed and the other isnt?
05:10:44FromDiscord<Elegantbeef> Without concrete code i cannot say much else though
05:11:12FromDiscord<sOkam!> because the type could be running inside an int as fixed, or inside an int as int, or inside a float, and they are all Vec3 types
05:12:47FromDiscord<Elegantbeef> But there isnt any dynamism afaik
05:12:48FromDiscord<Elegantbeef> If you know if a value is typed as fixed at compile time there is no need to do anything at runtime
05:13:38FromDiscord<sOkam!> In reply to @Elegantbeef "If you know if": yeah but the math is different, and it changes the syntax everywhere
05:14:29FromDiscord<sOkam!> creating an float with `somenum.float` works. but creating it with `somenum.Alias` will break, if the alias links to `Fixed` instead of `float` as its base container
05:15:36FromDiscord<sOkam!> `let val :Alias= 1.Alias` will be `1.000` if float, or `0.0001` if Fixed
05:16:25FromDiscord<Elegantbeef> Implement `to` procedures so you can do `1f.to(Alias)` or `myAlias.to(float)`
05:16:58FromDiscord<sOkam!> there wont be any to(float) only alia
05:17:04FromDiscord<sOkam!> (edit) "alia" => "alias"
05:17:44FromDiscord<sOkam!> that's the point of the "generic" part of the type. that it does it auto, without having to refactor the whole damn engine to change from deterministic to non-deterministic math
05:17:47FromDiscord<Elegantbeef> then make that proc, you can also make userdefined literals
05:18:18FromDiscord<sOkam!> its what i did, that's what the ptype(n :SomeNumber) proc was about
05:18:35FromDiscord<Elegantbeef> Where does the runtime checks come in though?
05:18:50*rockcavera quit (Remote host closed the connection)
05:19:08FromDiscord<sOkam!> well, how do you do the same at compile time, leaving only the correct behavior, without doing a when check?
05:19:18FromDiscord<Elegantbeef> When isnt a runtime check
05:19:23FromDiscord<sOkam!> if its doable, i don't know how
05:19:47FromDiscord<sOkam!> thats what i was doing, afaik. unless 🐠 memory fails me
05:20:17FromDiscord<sOkam!> sent a code paste, see https://paste.rs/0Lz
05:20:23FromDiscord<Elegantbeef> You said it required a runtime check and i was trying to figure out why it required a runtime check
05:20:53FromDiscord<sOkam!> maybe i said runtime as a total noob, im checking with a when though. my bads
05:21:09FromDiscord<Elegantbeef> Also like we pointed out you can just do `PType is SomeNumber`
05:21:14FromDiscord<Elegantbeef> There is no need for that `baseType`
05:21:42FromDiscord<sOkam!> yeah i guess its not needed in this case 🤔
05:28:36FromDiscord<Elegantbeef> sent a code paste, see https://play.nim-lang.org/#ix=4mKY
05:28:46FromDiscord<Elegantbeef> Then you just always call `fx` and it works
05:28:56FromDiscord<Elegantbeef> But this is in the woods i guess now
05:31:52FromDiscord<sOkam!> can you define in code, though?
05:32:15FromDiscord<Elegantbeef> You can do `{.define: fixedPoint.}`
05:33:06FromDiscord<sOkam!> does it work from any file, or does it need to be anywhere specific?
05:33:34FromDiscord<Elegantbeef> It sounds like you want to toggle fixed point on and off so nope
05:34:14FromDiscord<sOkam!> yeah, i have all the config centralized in a single file (except this part specifically, which is away due to dependency hell)
05:51:05*lumo_e quit (Ping timeout: 252 seconds)
05:54:36FromDiscord<Require Support> is there a COM guru on here that can help me with playing vs COM using nim https://learn.microsoft.com/en-us/windows/win32/api/_com/
06:14:31*dza quit (Quit: )
06:35:18FromDiscord<demotomohiro> @Require Support I think winim helps using COM: https://github.com/khchen/winim
06:38:29*kenran joined #nim
06:42:00FromDiscord<Require Support> ye that's what im playing with now, thanks
06:43:31*ltriant quit (Ping timeout: 252 seconds)
07:41:19*dza joined #nim
07:46:37*PMunch joined #nim
07:47:29Amun-RaI have a seq of objects (that can be casted to uint32); I need to base64 all the data; is there a way to cast that to base64.encode?
07:49:48FromDiscord<Elegantbeef> sent a code paste, see https://play.nim-lang.org/#ix=4mLb
07:50:46FromDiscord<Elegantbeef> `cast[ptr UncheckedArray[uint32]` or `cast[seq[uint32]].encode()`
07:51:39Amun-Rathe problem with having T: uint32 is base64.encode takes only one byte of each T
07:52:00Amun-Rahmm
07:57:58FromDiscord<ElegantBeef> Oh nice matrix bridge went down yet again
07:58:11FromDiscord<ElegantBeef> One day t2bot will survive a day without going down for no reason
07:59:50Amun-RaElegantbeef: I modified you example, thanks for the hint
07:59:56Amun-Ra>>> cast[cstring](image.pixmap[0].addr).toOpenArray(0, image.pixmap.len * image.pixmap[0].sizeof - 1).encode
08:00:46FromDiscord<ElegantBeef> There is a possible issue with aliasing, but meh C compilers be damned 😄
08:01:09Amun-Ra:P
08:01:26Amun-Rapassl = "-fno-strict-aliasing"
08:01:30Amun-Ra:>
08:01:37FromDiscord<ElegantBeef> Nim does by default but it still can cause issues apparently
08:02:25Amun-RaI can implement by own pixmap encoder just to be safe
08:06:21Amun-RaElegantBeef: https://i.postimg.cc/50skRKqh/rv.png
08:06:41FromDiscord<Elegantbeef> We did it? 😄
08:06:53Amun-Rayes, we did :P
08:07:34Amun-Ra(I'm writing driver to kitty terminal that's capable of displaying bitmaps)
08:09:46FromDiscord<Rika> nice
08:15:25FromDiscord<Tuatarian> In reply to @Elegantbeef "IE you're using it": It lives exactly as long as the cursor
08:15:42FromDiscord<Tuatarian> It's a tree structure, the parent ref is cursored
08:16:19FromDiscord<Tuatarian> So if the parent dies, the kid has no counted refs, and also dies, and so forth down the tree
08:24:11PMunchAmun-Ra, why are you writing a new way to display bitmaps in Kitty?
08:34:40FromDiscord<Rika> new way?
08:34:52FromDiscord<Rika> whats the other way?
08:42:53PMunchThe kitten icat?
08:43:51Amun-RaPMunch: I'm writing new video/output driver for my image browser
08:43:54Amun-Rahttps://i.postimg.cc/RCkYHs9X/rn.png
08:44:46*LuxuryMode quit (Quit: Connection closed for inactivity)
08:45:02*peterhil joined #nim
08:45:25Amun-Rathe browser supports many long since forgotten image formats (but it's not yet published)
08:45:54Amun-Rathe image seen above was taken from: https://tomseditor.com/gallery/i/1820/blubb-by-sphinx&lang=en
08:51:06Amun-Rait supports right now the following formats: https://pastebin.com/zyR1UTfz (~30 more need to be rewritten to the new internal api)
08:52:00Amun-RaI started the project just to learn Nim language :>
09:06:36*Batzy quit (Quit: https://quassel-irc.org - Chat comfortably. Anywhere.)
09:07:55*Batzy joined #nim
09:11:31*ltriant joined #nim
09:16:07FromDiscord<Elegantbeef> Anyone else find the devel type mismatch messages so diffcult to read?
09:16:43FromDiscord<Elegantbeef> For context
09:16:44FromDiscord<Elegantbeef> sent a code paste, see https://paste.rs/KZd
09:17:47FromDiscord<Rika> i have no idea how that is read
09:18:02FromDiscord<Elegantbeef> `[2]` means teh second parameters is wrong
09:18:07FromDiscord<Rika> oh i can read it with effort
09:18:11FromDiscord<Rika> takes a while to get used to
09:18:21FromDiscord<Coachonko> Tips to quickly setup vscode for nim? What extension is the right one and which settings do you recommend?
09:18:38FromDiscord<Elegantbeef> I find it much harder to read than "Got x, but expected Y"
09:18:40FromDiscord<Coachonko> Oh sht sorry for hijacking
09:18:41FromDiscord<amadan> After a while I found them nicer to read↵Just needed to get used to them first
09:18:59FromDiscord<amadan> (I could be suffering Stockholm syndrome though)
09:19:11FromDiscord<Elegantbeef> It's lacking the useful information of what the mismatch is in this case, and i cannot even compare them to stable since i'm using devel features 😄
09:19:16*Batzy_ joined #nim
09:19:40Amun-RaCoachonko: Nim by nimsaem
09:20:32FromDiscord<Elegantbeef> These error messages might not be so bad if it added `(got X)` in red text next to bad params
09:20:49FromDiscord<Coachonko> In reply to @Amun-Ra "<@969109539523797062>: Nim by nimsaem": Thanks!
09:21:03FromDiscord<Elegantbeef> sent a code paste, see https://play.nim-lang.org/#ix=4mLv
09:21:10FromDiscord<Elegantbeef> One of these i think provides much more readable information
09:21:54*Batzy quit (Ping timeout: 252 seconds)
09:22:21FromDiscord<Rika> In reply to @Elegantbeef "It's lacking the useful": its not, its just obtuse to read
09:22:25FromDiscord<Rika> so it needs better formatting
09:23:14Amun-RaElegantbeef: that formatting is unfortunate
09:23:32FromDiscord<Elegantbeef> I think it needs more clearly written information. Might just be old man syndrome, but i prefer the former messages
09:23:59Amun-Raand the expression is weirdly broken
09:24:39Amun-RaI bet "result.command)" feels alone
09:25:00FromDiscord<Elegantbeef> I dont even really care about that to be frank
09:26:17FromDiscord<Elegantbeef> The overload information is just presented in such a bad manner to me atleast
09:26:45Amun-RaI'd prefer ^~~~~~~ styling over simple [2]
09:45:29*azimut_ quit (Ping timeout: 255 seconds)
09:47:20FromDiscord<Coachonko> sent a code paste, see https://play.nim-lang.org/#ix=4mLD
10:10:17PMunch@Elegantbeef, did you see that I fixed the varargs issuE?
10:10:36FromDiscord<Elegantbeef> yeS
10:11:11PMunchQuite an interesting bug it turns out
10:12:31FromDiscord<Elegantbeef> A funny bug atleast
10:12:41FromDiscord<Elegantbeef> All found cause a rusty api used a macro to declare ownership
10:13:30FromDiscord<Elegantbeef> I do not even remember the wasm runtime that bug was found with at this poiint
10:13:40FromDiscord<Elegantbeef> Might've been wasmer, or wasmtime 😄
10:26:37FromDiscord<ringabout> https://github.com/pietroppeter/nimib/pull/169#issuecomment-1411818732
10:27:04FromDiscord<ringabout> A strange bug only occurred with ARC/ORC.
10:27:53FromDiscord<ringabout> Why is the type not properly inferred in ARC/ORC?
10:46:56FromDiscord<jmgomez> How would you use koch to only compile vcc?
10:48:11FromDiscord<ringabout> What do you mean by "only compile vcc"?
10:48:32FromDiscord<jmgomez> `./koch tools` compiles all the tools, right?
10:48:45FromDiscord<jmgomez> so Im asking compiling just vcc
10:50:31FromDiscord<ringabout> It isn't supported.
10:53:06FromDiscord<ringabout> Though, you might import private `buildVccTool` by `std/importutils` to implement your own installation proc.
11:08:22FromDiscord<luteva> Hi!↵Is there an easy but complete example of how to encapsulate an external lib resource (say an object of a C++ library) through an object in nim that gets garbage collected? Afaik there should be a destructor for the ptr Object in a finalizer(??) so that, once encapsulated through a ref Object in nim, I do not have to care about freeing the memory for the ptr Object. Is that correct/possible/the way to go? Or do I totally misunderstand
11:13:15FromDiscord<mratsim> In reply to @luteva "Hi! Is there an": https://github.com/mratsim/Arraymancer/blob/e297e6d5dcad70f3a39c44d8c79e2bb171fc2bd6/src/arraymancer/tensor/backend/opencl_backend.nim#L41-L50
11:13:30FromDiscord<mratsim> This example auto-dealloc OpenCL memory
11:20:37Amun-Ralet's say I have an empty seq of some T ie: var s = newseq[uint32](); what's the best way to get the size of that seq element?
11:21:10FromDiscord<luteva> sent a long message, see http://ix.io/4mMf
11:21:38FromDiscord<Rika> In reply to @Amun-Ra "let's say I have": "size" as in the heap size? so the allocated capacity?
11:22:04Amun-RaRika: oh, size as uint32.sizeof in the example above
11:23:12FromDiscord<Rika> `sizeof(s[0])`
11:23:18FromDiscord<Rika> works even if it is empty
11:23:37Amun-Ra:O
11:23:42FromDiscord<Rika> same with typeof if ever youll need that
11:23:50Amun-RaI have never tried that, I assumed it won't work
11:23:54Amun-Rathank you Rika
11:24:01FromDiscord<Rika> yeah thats a reasonable assumption
11:24:03FromDiscord<Rika> nim magic
11:24:31Amun-Ranice
11:24:58Amun-Ranow I can remove "if unlikely foo.len == 0: return …" from several places ;)
11:25:40FromDiscord<Rika> nice
11:40:08FromDiscord<mratsim> sent a long message, see http://ix.io/4mMo
11:42:23FromDiscord<mratsim> In reply to @luteva "thx a lot <@570268431522201601>": same for Cuda: https://github.com/mratsim/Arraymancer/blob/master/src/arraymancer/tensor/backend/cuda.nim#L29-L39↵and CudaStorage is a ref object
11:55:52*azimut joined #nim
11:56:40FromDiscord<luteva> ok so, maybe they both together may help me. it's just a kind of 'big' as a first easy example... e.g. the CudaStorage is not in cuda.nim but in a different module data_structure etc. so i have to search around to get an understanding of the context.
12:23:03*lumo_e joined #nim
12:32:29*rockcavera joined #nim
12:36:15*jmdaemon quit (Ping timeout: 252 seconds)
12:53:53Amun-RaElegantbeef: I ended up sending raw pixmap via SHM + MMAP
13:13:16*azimut quit (Quit: ZNC - https://znc.in)
13:13:46*azimut joined #nim
13:14:23*lumo_e quit (Ping timeout: 252 seconds)
13:58:27*Batzy_ quit (Quit: https://quassel-irc.org - Chat comfortably. Anywhere.)
13:58:52*Batzy joined #nim
13:59:32*Batzy quit (Client Quit)
13:59:57*Batzy joined #nim
14:01:43FromDiscord<that_dude> In reply to @luteva "ok so, maybe they": https://scripter.co/binding-nim-to-c-plus-plus-std-list/ this may with c++ stuff. I'm not sure if he covers constructors or destructors
14:16:16*Batzy quit (Quit: https://quassel-irc.org - Chat comfortably. Anywhere.)
14:17:27*Batzy joined #nim
14:31:07FromDiscord<Piqueiras> are object procs supposed to be able to modify parameters even if the object is declared with let and the proc doesnt have var statement 🤔
14:32:09FromDiscord<Phil> object procs as in methods?
14:34:06PMunch@Piqueiras, let me guess, they're not objects but ref objects
14:34:13FromDiscord<Piqueiras> oh nvm I think it was because I did it without init
14:34:17FromDiscord<@thatrandomperson5-6310e3b26da03> sent a code paste, see https://play.nim-lang.org/#ix=4mNw
14:35:22FromDiscord<Piqueiras> and ref object is a pointer to the heap while object is just the whole thing?
14:35:34PMunch@Piqueiras, correct
14:36:14PMunch(Nim might still pass the object by a pointer under the hood if it is more efficient, but logically you can treat it like its passed by value)
14:36:31FromDiscord<Piqueiras> so what it would not allow me to modify is the ref of the ref object
14:36:46FromDiscord<Piqueiras> so idk if there is a way to make the object itself immutable
14:37:26FromDiscord<Piqueiras> need to get a bit more into it cause "newObject" and "initObject" lol
15:02:12*PMunch quit (Quit: Leaving)
15:06:47FromDiscord<Nycto> Quick question: is it possible to check whether an import/include exists before trying to import it? Something like: ‘when compiles(import foo): import foo’
15:14:43FromDiscord<@thatrandomperson5-6310e3b26da03> `when (compiles do: import thelib):`↵(@Nycto)
15:15:40FromDiscord<@thatrandomperson5-6310e3b26da03> https://forum.nim-lang.org/t/3752
15:16:36FromDiscord<Nycto> Thanks 😆
15:35:59*jmdaemon joined #nim
15:40:05*azimut quit (Ping timeout: 255 seconds)
15:56:04*arkurious joined #nim
16:04:59*jmdaemon quit (Ping timeout: 260 seconds)
16:18:02*kenran quit (Remote host closed the connection)
17:03:11FromDiscord<@thatrandomperson5-6310e3b26da03> sent a code paste, see https://play.nim-lang.org/#ix=4mOw
17:04:35*jmdaemon joined #nim
17:10:52FromDiscord<Phil> sent a code paste, see https://play.nim-lang.org/#ix=4mOD
17:10:56FromDiscord<Phil> (edit) "https://play.nim-lang.org/#ix=4mOD" => "https://paste.rs/BTE"
17:11:55FromDiscord<Phil> TBH I'm fascinated that you can import c++ procs to compile them to js
17:11:57FromDiscord<Phil> that's kind of wild
17:12:11FromDiscord<Phil> (edit) "TBH I'm fascinated that you ... can" added "apparently"
17:20:14FromDiscord<@thatrandomperson5-6310e3b26da03> > TBH I'm fascinated that you apparently can import c++ procs to compile them to js↵It imports js.
17:24:46*lumo_e joined #nim
17:31:12*jmdaemon quit (Ping timeout: 248 seconds)
18:39:53FromDiscord<Nerve> Are Datamancer formulas broken? Every time I try to use one I get `undeclared identifier: 'f'` and I'm a bit stuck
18:53:43FromDiscord<gibson> @Nerve You're using this syntax? `let fn = f{ idx("a") == 5 }`
18:53:49*lumo_e quit (Ping timeout: 260 seconds)
18:54:16*lumo_e joined #nim
19:09:04FromDiscord<Nerve> sent a code paste, see https://play.nim-lang.org/#ix=4mPc
19:09:17FromDiscord<Nerve> `lower` and `upper` are floats
19:09:26FromDiscord<Nerve> and `freq` is a float column
19:12:05FromDiscord<gibson> All I can think is try to separate that line out into multiple lines, as if making clear code. See if the formula compiles at all.
19:14:50FromDiscord<Phil> Can I make it so that a proc parameter is an array of exactly 16 entries, but also accepts sequences with 16 entries?
19:24:38FromDiscord<Nerve> In reply to @gibson "All I can think": I've tried other dead simple formulas and I still get the same thing. It's like the macro is completely missing.
19:26:39FromDiscord<Nerve> In reply to @Isofruit "Can I make it": Use an overloaded proc that takes the seq, asserts the length, drops the contents in an array, and calls the array version?
19:27:15FromDiscord<Phil> In reply to @Nerve "Use an overloaded proc": Yeah but that means I only get a runtime error for when you give me a "wrong" seq, that's why I disliked that one
19:27:43FromDiscord<Nerve> Well, seqs lengths are a runtime property...
19:38:17*lumo_e quit (Ping timeout: 252 seconds)
19:54:23*jmdaemon joined #nim
20:01:43*PMunch joined #nim
20:39:50FromDiscord<turbo> I'm interacting with a JSON API that for the same field sometimes responds with a string, sometimes an int and sometime doesn't contain the field at all. How can I capture that in an `object` definition that I can unmarshal to without constantly running into JsonKindErrors?
20:47:33FromDiscord<hotdog> In reply to @turbo "I'm interacting with a": What json library are you using?
20:47:39FromDiscord<turbo> std
20:48:48FromDiscord<planetis> imo you can't do that with any library
20:49:26FromDiscord<hotdog> In reply to @planetis "imo you can't do": You can unmarshal into an object variant
20:49:30FromDiscord<hotdog> You just need a custom hook
20:50:09FromDiscord<hotdog> I've done something along these lines before with jsony
20:51:15FromDiscord<planetis> hmm maybe that would work, but even if you can't control the json? in order to serialize the kind field
20:51:54FromDiscord<hotdog> This is just for consuming what the api responds with though right?
20:53:27*lumo_e joined #nim
20:53:35FromDiscord<planetis> right, so the custom hook first tries to parse it as a number and if it fails just creates an object variant with a string field
20:54:09FromDiscord<planetis> something like that I guess would work
20:54:58FromDiscord<hotdog> Yeah
20:55:23FromDiscord<hotdog> IIRC with jsony you can even have arbitrary json in a field too
20:55:31FromDiscord<hotdog> So you can handle that separately
20:56:48FromDiscord<planetis> I dunno what that means but I am glad it works
21:01:46FromDiscord<hotdog> This is the bit I mean https://github.com/treeform/jsony#full-support-for-json-in-json
21:25:50FromDiscord<Phil> Errr okay, how do I deal with different versions of openssl when I want to be able to be compatible with both?
21:26:17FromDiscord<Phil> Is there a way to do when flags for when a dynamically linked library is version x/y
21:26:19FromDiscord<Phil> (edit) "Is there a way to do when flags for when a dynamically linked library is version x/y ... " added "?"
21:26:45FromDiscord<Phil> (edit) "Errr okay, how do I deal with different versions of openssl ... when" added "(1 and 3)"
21:27:40FromDiscord<Phil> The main reason I'm asking is because openssl 1 uses `EVP_MD_size`, openssl3 changed that to `EVP_MD_get_size`↵So I just need to be able to deal with both modifiers
21:29:28FromDiscord<@thatrandomperson5-6310e3b26da03> sent a code paste, see https://play.nim-lang.org/#ix=4mPL
21:30:06FromDiscord<hotdog> In reply to @@thatrandomperson5-6310e3b26da03 "> > Why does": Can you paste without the html syntax highlighting stuff? It's hard to read on discord
21:30:49FromDiscord<MetuMortis> I believe it shouldn't bee importcpp
21:32:28FromDiscord<Elegantbeef> As i say stop using gitter
21:34:44FromDiscord<hotdog> In reply to @Isofruit "Errr okay, how do": https://www.openssl.org/docs/manmaster/man3/OPENSSL_VERSION_NUMBER.html
21:35:18FromDiscord<Phil> Basically fix it at runtime?
21:35:45FromDiscord<hotdog> In reply to @Isofruit "Basically fix it at": How can you do it at runtime if it's dynamically linked and you want to support both?
21:35:52FromDiscord<hotdog> Maybe I'm misunderstanding the problem
21:36:02FromDiscord<hotdog> (edit) "runtime" => "compiletime"
21:36:59FromDiscord<hotdog> (typo'd and ninja edited runtime->compiletime)
21:38:13FromDiscord<Phil> sent a code paste, see https://play.nim-lang.org/#ix=4mPO
21:38:18FromDiscord<Phil> Ah, yeah, fair point
21:40:19FromDiscord<turbo> In reply to @hotdog "This is the bit": ooh, that looks promising
21:41:19FromDiscord<Phil> sent a code paste, see https://play.nim-lang.org/#ix=4mPP
21:41:40FromDiscord<Phil> I believe a lot of things but not that this ssl version exists
21:43:51FromDiscord<Phil> sent a code paste, see https://play.nim-lang.org/#ix=4mPQ
21:47:21FromDiscord<turbo> Isn't that just:↵↵> OPENSSL_VERSION_NUMBER is a combination of the major, minor and patch version into a single integer 0xMNN00PP0L
21:47:48FromDiscord<Elegantbeef> Is it by anychance a bit set
21:48:21FromDiscord<Elegantbeef> Yea that's what i thought
21:48:22FromDiscord<Elegantbeef> Bitfields
21:48:53FromDiscord<turbo> (edit) "Isn't that just:↵↵> OPENSSL_VERSION_NUMBER is" => "sent" | "combination of the major, minor and patch version into a single integer 0xMNN00PP0L" => "long message, see http://ix.io/4mPS"
21:49:30FromDiscord<Phil> sent a code paste, see https://play.nim-lang.org/#ix=4mPT
21:50:11FromDiscord<turbo> Decoding the values you get indicate version 3 for the first, and version 1 for the seconds, so yeah, it's that compound value documented above
21:50:19FromDiscord<turbo> (edit) "seconds," => "second,"
21:50:19FromDiscord<Phil> Okay so how do you deal with bitfields?
21:50:37FromDiscord<Phil> Do I do it manually? Is there a lib?
21:52:06FromDiscord<Phil> I never ever had to deal with bitfields before so I'm not really sure what I'm staring at
21:53:15FromDiscord<jtv> Look at the built-in sets, they're bitfields
21:53:56FromDiscord<Elegantbeef> You can use bitwise math or use an object
21:54:23FromDiscord<Phil> All I'm currently seeing reading wiki page on bit fields is that they're a custom way to encode data in bit-patterns, at which point I'm even more wtf-ing
21:54:31FromDiscord<Elegantbeef> https://nim-lang.org/docs/manual.html#implementation-specific-pragmas
21:55:02FromDiscord<jtv> Oh, it's just a one-bit data structure; at the machine level, you can set and test bits individually or in parallel for as cheap as any op on the architecture
21:55:26FromDiscord<Elegantbeef> Instead of doing `myInt shl 16 and 0xff` you can just do `myBitField.field`
21:55:50FromDiscord<jtv> So when you have a reasonable number of boolean values it's a good space saver I guess. Most people needlessly over-optimize in general though, it's not a big deal for most apps
21:57:06FromDiscord<Piqueiras> why cant it evaluate at compile time? https://media.discordapp.net/attachments/371759389889003532/1070462826205937765/image.png
22:00:22FromDiscord<Phil> sent a code paste, see https://play.nim-lang.org/#ix=4mPY
22:00:36FromDiscord<Phil> should the bitsize be the number of bits in a culong?
22:02:17FromDiscord<jtv> It's the number of true/false values you want to have
22:02:44FromDiscord<Phil> errr
22:03:47FromDiscord<Phil> What knowledge would I need to be able to figure out how many true-false values I need?↵Like I know what a bit is, I just have no clue how to interpret neither the original number, nor the bitsize pragma
22:04:22FromDiscord<Phil> I mean, if I enter 8 I get the number 112 out, which might stand for version 1.1.2?↵But that seems unlikely since the local version should be openssl3
22:05:05FromDiscord<Elegantbeef> Read the manual for it
22:05:26FromDiscord<Elegantbeef> It'd be more like `cast[B](getOpenSslVersion())`
22:05:55FromDiscord<Phil> Read manual means diving into another comp-sci topic, uuuuuuugh, wiki entry for bit fields here I come >_>
22:06:17FromDiscord<Elegantbeef> What?
22:06:22FromDiscord<Elegantbeef> Read the openssl manual for get version
22:11:18*PMunch quit (Quit: leaving)
22:11:43FromDiscord<Phil> sent a code paste, see https://play.nim-lang.org/#ix=4mQ1
22:11:55FromDiscord<Phil> (edit) "https://play.nim-lang.org/#ix=4mQ1" => "https://play.nim-lang.org/#ix=4mQ2"
22:13:30FromDiscord<huantian> maybe for `long long`?
22:14:33FromDiscord<huantian> `805306480` in dec is `30000070` in hex
22:14:54FromDiscord<huantian> so M = `3`, NN = `00`, and PP = `07`
22:15:10FromDiscord<Phil> Oh god damnit, so take the number, convert to hex and then apply ?
22:15:27FromDiscord<Phil> yeah, 3.0.7 matches what I have
22:15:46FromDiscord<hotdog> @Phil `echo (getOpenSSLVersion() shr 28) and 0xF`
22:16:01FromDiscord<Phil> In reply to @hotdog "<@180601887916163073> `echo (getOpenSSLVersion() sh": You speak in demonic tongues!
22:16:30FromDiscord<hotdog> It should be major version number 🙂
22:17:12*azimut joined #nim
22:18:27FromDiscord<Elegantbeef> sent a code paste, see https://play.nim-lang.org/#ix=4mQ7
22:22:21FromDiscord<Phil> That... squints
22:23:30FromDiscord<Phil> sent a code paste, see https://play.nim-lang.org/#ix=4mQ9
22:24:12FromDiscord<Phil> The thingy from hotdog works though I have no concept as to why
22:24:15FromDiscord<Elegantbeef> Might not need packed
22:24:20FromDiscord<Phil> (edit) "The thingy from hotdog works ... though" added "(returns 3)"
22:24:23FromDiscord<Elegantbeef> Bit packing
22:24:32FromDiscord<Phil> Without packed it returns 0 0 0
22:25:57FromDiscord<Phil> In reply to @hotdog "<@180601887916163073> `echo (getOpenSSLVersion() sh": Is what you're doing there having a mental image of the binary representation and telling nim "move n bits to the right and start interpreting numbers from there and convert to hex"?
22:26:05FromDiscord<Phil> (edit) "In reply to @hotdog "<@180601887916163073> `echo (getOpenSSLVersion() sh": Is what you're doing there having a mental image of the binary representation ... and" added "of that number"
22:28:36FromDiscord<turbo> sent a code paste, see https://play.nim-lang.org/#ix=4mQa
22:29:09FromDiscord<hotdog> In reply to @Isofruit "Is what you're doing": No sort of shift everything to the right and ignore everything that's now not in the first byte
22:29:55FromDiscord<turbo> (edit) "https://play.nim-lang.org/#ix=4mQa" => "https://play.nim-lang.org/#ix=4mQb"
22:31:06FromDiscord<hotdog> sent a code paste, see https://play.nim-lang.org/#ix=4mQc
22:31:21FromDiscord<turbo> Indeed, good catch
22:32:04FromDiscord<hotdog> Did you solve your json issue @turbo ?
22:32:41FromDiscord<turbo> I've paused work on that project for today. Going to play with jsony tomorrow or so
22:36:14FromDiscord<Elegantbeef> Wait the openssl version stores itself as hex....
22:36:39FromDiscord<Elegantbeef> Or am i misreading to unrelated conversations
22:36:41FromDiscord<Elegantbeef> two\
22:36:51FromDiscord<Phil> And today I learned any binary I compile cannot work at the same time with openssl 3 and 1
22:38:49FromDiscord<Phil> sent a code paste, see https://play.nim-lang.org/#ix=4mQg
22:39:02FromDiscord<Phil> So from what I'm seeing I have to hide them behind when switches
22:39:20FromDiscord<Phil> (edit) "https://play.nim-lang.org/#ix=4mQg" => "https://paste.rs/grt"
22:39:42FromDiscord<Elegantbeef> look at `std/dynlib`
22:42:43FromDiscord<hotdog> In reply to @Elegantbeef "Wait the openssl version": No it's just documented a bit weirdly, the hex part refers to the "0xMNN00PP0L" explanation of how the version numbers are oriented
22:43:14FromDiscord<Elegantbeef> So then bitfields should work
22:43:57FromDiscord<hotdog> In reply to @Isofruit "Unless there is some": You need to do similar to what you saw in the openssl wrapper for the getOpenSslVersion impl, which uses std/dynlib as beef mentioned
22:47:16FromDiscord<Phil> sent a code paste, see https://play.nim-lang.org/#ix=4mQi
22:47:35FromDiscord<Phil> The type shouldn't need any additional pragmas I don't think
22:47:46FromDiscord<Elegantbeef> `{.cdecl.}`
22:47:56FromDiscord<Elegantbeef> Proc types are by default `closures`
22:48:35FromDiscord<Phil> sent a code paste, see https://paste.rs/KJ1
22:49:00FromDiscord<Elegantbeef> `stdcall`
22:50:10FromDiscord<Phil> Ohhh is this about how a proc needs a calling convention and "cdecl" gives you one, "stdcall" does as well?
22:50:59FromDiscord<Elegantbeef> Well Nim's default is `closure` inside type defs
22:51:23FromDiscord<Elegantbeef> So you need to specify the convention to what the dll expects
22:55:02FromDiscord<Phil> Is that the same with importc? Does it need cdecl for that reason?
22:56:22FromDiscord<Elegantbeef> Yes
22:56:35FromDiscord<Elegantbeef> ABI requires calling conventions to match
22:56:54FromDiscord<turbo> is there a std method for testing whether one seq contains all elements of another seq (seqs are strings, comparison must be literal case-sensitive)?
22:57:38FromDiscord<⚶ Zeno> In reply to @turbo "is there a std": if i were you, i would use sets but i think theres better way that somebodt here might know
22:57:43FromDiscord<Elegantbeef> https://nim-lang.org/docs/theindex.html#contains doesnt seem so
22:57:51FromDiscord<⚶ Zeno> (edit) "somebodt" => "somebody"
22:59:55FromDiscord<Phil> How necessary is that `unloadLib` ?
23:00:07FromDiscord<Phil> Like, what are the implications?
23:00:42*lumo_e quit (Quit: Quit)
23:02:19FromDiscord<Yepoleb> it just frees up a bit of memory
23:02:59FromDiscord<Yepoleb> the os will clean it up anyway after your application terminates
23:07:15FromDiscord<@thatrandomperson5-6310e3b26da03> That is a gitter problem, not mine, and the discord-safe version is already provided by isofruit↵(@hotdog)
23:07:46FromDiscord<Elegantbeef> The library is not unloaded
23:07:50FromDiscord<Elegantbeef> So it's still in memory
23:11:06FromDiscord<Phil> sent a code paste, see https://play.nim-lang.org/#ix=4mQn
23:11:23FromDiscord<Phil> (edit) "https://play.nim-lang.org/#ix=4mQn" => "https://play.nim-lang.org/#ix=4mQo"
23:12:46FromDiscord<Phil> I know that sizeProc points to some location in memory, I get a memory location when I do `echo sizeProc.repr`
23:13:45FromDiscord<Phil> And I know that `EVP_MD_get_size` must exist because of the docs:↵https://www.openssl.org/docs/man3.0/man3/EVP_MD_get_size.html
23:14:04FromDiscord<Phil> Where it is described as `int EVP_MD_get_size(const EVP_MD md);`
23:14:05FromDiscord<Yepoleb> @Phil you leaked your name
23:14:14FromDiscord<Phil> In reply to @Yepoleb "<@180601887916163073> you leaked your": Nothing I haven't done before
23:16:29*xet7 joined #nim
23:17:28FromDiscord<Yepoleb> is EVP_MD a ref type?
23:18:03FromDiscord<Phil> I think it is (?), it is a digest function
23:18:11FromDiscord<Yepoleb> i can't find its definition
23:18:13FromDiscord<Phil> And I just assume that functions are ref types always
23:18:24FromDiscord<Phil> EVP_MD is just the type of that kind of function
23:18:37FromDiscord<Phil> And it gets imported from std/openssl
23:19:36FromDiscord<Phil> https://nim-lang.org/docs/openssl.html#EVP_MD
23:19:51FromDiscord<Yepoleb> i'd just put two `assert x != nil` before your code that explodes
23:20:06FromDiscord<Yepoleb> for sizeProc and md
23:20:45FromDiscord<Elegantbeef> is EVPMD a pointer in Nim?
23:20:52FromDiscord<Yepoleb> yes
23:21:13FromDiscord<Phil> Yeah, the sizeProc is what's nil
23:21:15FromDiscord<Yepoleb> it's `ptr SslStruct`
23:22:34FromDiscord<Phil> sent a code paste, see https://play.nim-lang.org/#ix=4mQr
23:22:38FromDiscord<Yepoleb> is `lib` already nil`
23:22:40FromDiscord<Yepoleb> (edit) "nil`" => "nil?"
23:22:41FromDiscord<Phil> And that is the thing I know should work
23:23:05FromDiscord<Phil> WTF.... yeah that's the problem
23:23:17FromDiscord<Phil> `lib != nil` [AssertionDefect]
23:23:47FromDiscord<Yepoleb> asserts ftw!
23:24:30FromDiscord<Phil> > `lib != nil` Could not find lib libcrypto.so(.3|.1.1|.1.0.2|.1.0.1|.1.0.0|.0.9.9|.0.9.8|.48|.47|.46|.45|.44|.43|.41|.39|.38|.10|) [AssertionDefect]
23:24:35FromDiscord<Phil> Okay, hmmmm
23:27:07FromDiscord<Yepoleb> https://media.discordapp.net/attachments/371759389889003532/1070485480015155290/libcrypto.so.1.0.2
23:27:30FromDiscord<Yepoleb> legitfreesharedobjects.com
23:27:41FromDiscord<Phil> sent a code paste, see https://play.nim-lang.org/#ix=4mQs
23:27:52FromDiscord<Phil> Wait
23:27:53FromDiscord<Phil> No
23:27:56FromDiscord<Phil> Damnit, there's a star
23:27:58FromDiscord<Phil> seriously
23:28:05FromDiscord<Yepoleb> a star in the filename?
23:28:16FromDiscord<Phil> Yeah no idea either
23:29:03FromDiscord<Phil> sent a code paste, see https://play.nim-lang.org/#ix=4mQt
23:29:11FromDiscord<Yepoleb> what funny os is that?
23:29:14FromDiscord<Phil> arch
23:29:23FromDiscord<Yepoleb> lmao
23:29:33FromDiscord<Yepoleb> sorry
23:29:46FromDiscord<Yepoleb> arch is not that funny
23:30:06FromDiscord<Phil> I think that was just my auto-complete adding the star
23:30:10FromDiscord<Phil> ls-l shows it differently
23:30:28FromDiscord<Phil> sent a code paste, see https://play.nim-lang.org/#ix=4mQv
23:31:13FromDiscord<Phil> Wait one single gosh darn second
23:31:27FromDiscord<Phil> sent a code paste, see https://play.nim-lang.org/#ix=4mQx
23:31:52FromDiscord<Phil> but trying to load `DLLUtilName` (https://nim-lang.org/docs/openssl.html#DLLUtilName) doesn't
23:33:50FromDiscord<Elegantbeef> `loadLibPattern`
23:34:46FromDiscord<Phil> Ohhhhhh
23:35:03FromDiscord<Elegantbeef> there are like 10 procs inside dynlib and you read none of them 😛
23:35:06FromDiscord<Phil> Yep that works
23:35:26FromDiscord<Phil> I read the example and tried to replicate it! I don't read all of strutils either when I need one proc from it!
23:36:08FromDiscord<Yepoleb> the expert arrived to deliver the answer and a snark 😄
23:39:17FromDiscord<Rika> In reply to @Isofruit "I read the example": You don’t?
23:40:07FromDiscord<Phil> I read all of strutils when I'm bored and curious, not as a first task when I'm in the process for something else
23:41:17FromDiscord<Elegantbeef> The snark is for my sanity↵(@Yepoleb)
23:48:20*azimut quit (Ping timeout: 255 seconds)
23:49:02*azimut joined #nim
23:54:41FromDiscord<sOkam!> I want to do some interop with C, but still keep control over the Nim code behavior↵At the end, the result needs to be a `.dll` or `.so` that is executed by some other app↵I was thinking of how to approach the glue connection of both↵What gives more control over the interop, writing C that executes Nim, or writing Nim that executes C?
23:55:23FromDiscord<sOkam!> (edit) "both↵What" => "c-nim↵What"
23:56:06FromDiscord<Yepoleb> In reply to @Isofruit "I read all of": So you read all of strutils? Name every procedure!