<< 13-07-2022 >>

00:08:15*noeontheend quit (Ping timeout: 272 seconds)
00:12:24*noeontheend joined #nim
00:16:30FromDiscord<TryAngle> how can I exit a nim program on a error that is not an error
00:16:38FromDiscord<TryAngle> something like rusts panic! and todo!
00:16:44FromDiscord<TryAngle> (edit) "something like rusts panic! and todo! ... " added "or unimplemented!"
00:16:47FromDiscord<Elegantbeef> `quit`
00:17:19FromDiscord<TryAngle> In reply to @Elegantbeef "`quit`": 👍
00:19:18FromDiscord<Elegantbeef> Or if you're really lazy you can always go for the ol' faithful `assert false, "unimplemented"`
00:25:51FromDiscord<TryAngle> In reply to @Elegantbeef "Or if you're really": lol true
00:26:39FromDiscord<TryAngle> does tryRecv block?↵or does dataAvailable == false and no block?
00:27:21FromDiscord<Elegantbeef> channels?
00:27:34FromDiscord<TryAngle> ye
00:28:39FromDiscord<Elegantbeef> It's non blocking
00:28:56FromDiscord<TryAngle> ok ty
00:29:17FromDiscord<carlosri> Hi everyone, I have a friend who is realy into nim, and get me interested in the language. I wonder if it is posible to make an android app using nim without android studio?
00:29:41FromDiscord<Elegantbeef> Due to how android software works kinda
00:29:57FromDiscord<Elegantbeef> You will need to get a basic java program to compile, but you can use ndk to include your Nim code
00:33:22FromDiscord<Elegantbeef> https://github.com/yglukhov/nimx i think does support android so you can look at what they do
00:36:09FromDiscord<treeform> In reply to @carlosri "Hi everyone, I have": I would just use Android studio. It's not that bad once you have everything setup. It will sign everything and work well with google play. If you want to do anything advanced with Android it will require some sort of Java shim anyways.
00:36:29FromDiscord<Elegantbeef> It's tedious as hell to setup and get the proper sdk ime
00:36:29FromDiscord<carlosri> In reply to @Elegantbeef "You will need to": thanks ,will give it a look
00:36:32FromDiscord<Elegantbeef> But ymmv
00:37:27FromDiscord<treeform> Android studio is a huge pain. But once you have it going you just open it to press build, play in simulator or upload to phone. You don't have to use it for writing your code, just compiling.
00:37:56FromDiscord<treeform> some instructions here: https://github.com/treeform/glfm
00:38:54FromDiscord<treeform> example draws a openGl triangle in nim with NDK on android
00:39:06FromDiscord<treeform> (and iOS)
00:39:25FromDiscord<TryAngle> is this still compatible with nim? https://github.com/haxscramper/hmatching
00:39:53*noeontheend quit (Ping timeout: 244 seconds)
00:41:14FromDiscord<Elegantbeef> Probably does
00:41:42*nullsh quit (Ping timeout: 260 seconds)
00:55:03*nullsh joined #nim
01:04:58FromDiscord<Arathanis> Can anyone explain whats going on here? Trying to play with concepts and adapt the Functor example in the experimental docs: https://media.discordapp.net/attachments/371759389889003532/996582979763720212/unknown.png
01:05:27FromDiscord<Arathanis> sent a code paste, see https://play.nim-lang.org/#ix=44cW
01:06:21FromDiscord<Elegantbeef> All this sugar is giving me eye cancer
01:06:32FromDiscord<Arathanis> i can de-sugar it real fast if thar helps
01:07:09FromDiscord<Elegantbeef> I've got it
01:08:39FromDiscord<Arathanis> also the echo for `Option[int] is Functor` prints false, even the code in the docs does not work as expected.
01:09:13FromDiscord<Arathanis> (edit) "false," => "false;" | "expected." => "expected and prints false."
01:10:01FromDiscord<Arathanis> i should have stripped some of the superfluous code from this, oh well
01:10:05FromDiscord<Arathanis> let me know if you want me to clean it up
01:10:17FromDiscord<Elegantbeef> I can write Nim, i think
01:10:35FromDiscord<Arathanis> oh i just meant theres random test code that has nothing to do with the question im asking that I should remove
01:10:41FromDiscord<Arathanis> i very well know you can write Nim lol
01:10:45FromDiscord<Arathanis> sorry
01:16:24FromDiscord<TryAngle> can I leak ref object fields somehow? something like java's public static
01:16:44FromDiscord<Elegantbeef> You dont mean leak do you?
01:16:50FromDiscord<carlosri> In reply to @treeform "I would just use": mi pc can't handle android studio
01:17:03FromDiscord<TryAngle> In reply to @Elegantbeef "You dont mean leak": I mean leak in syntax way, not memory way
01:17:10FromDiscord<Elegantbeef> So the first issue arath is that you passed the `type` in the parameter
01:17:23FromDiscord<Elegantbeef> `A -> S` or w/e is a type not an instance
01:17:30FromDiscord<Elegantbeef> But now we have another issue
01:18:11FromDiscord<Elegantbeef> There is no way to instantiate the `S`
01:19:01FromDiscord<Elegantbeef> sent a code paste, see https://play.nim-lang.org/#ix=44cZ
01:19:08FromDiscord<Elegantbeef> How does one instantiate a `S` for the `fmap`?
01:20:01FromDiscord<Arathanis> Ahhh ok.
01:21:32FromDiscord<Arathanis> So are the docs just incorrect right now?
01:21:45FromDiscord<Arathanis> sent a code paste, see https://play.nim-lang.org/#ix=44d1
01:21:57FromDiscord<Elegantbeef> let's see
01:21:57FromDiscord<Arathanis> which I was adapting from
01:25:10FromDiscord<Elegantbeef> It might not be wrong just relying on a legacy API, need to look harder myself
01:31:39FromDiscord<Elegantbeef> Yea i think it's wrong
01:31:45FromDiscord<Elegantbeef> I cannot see how it can instantiate the `T`
01:31:59FromDiscord<Arathanis> I see what you are saying, I figured high magic was going on
01:39:12NimEventerNew Nimble package! nimiSlides - Create Reveal.js slideshows in Nim, see https://github.com/HugoGranstrom/nimib-reveal/
01:40:30*noeontheend joined #nim
01:43:05FromDiscord<Elegantbeef> Niifty another nice doc tool
01:44:10FromDiscord<Elegantbeef> Yea arath i tried a bunch of things but couldnt get it to compile
01:44:21FromDiscord<Elegantbeef> Even an example that had a `Functor[X, S]`
01:44:35FromDiscord<Arathanis> yeah im fiddling with it too, same results
01:46:52FromDiscord<Elegantbeef> The issue seems to be the procedure callback
01:48:18FromDiscord<Elegantbeef> Oh it might be the usage of `genericHead`
01:48:23FromDiscord<Elegantbeef> Actually nevermind
01:49:06FromDiscord<TryAngle> sent a code paste, see https://play.nim-lang.org/#ix=44d5
01:49:34FromDiscord<TryAngle> (edit) "https://play.nim-lang.org/#ix=44d5" => "https://play.nim-lang.org/#ix=44d6"
01:49:37FromDiscord<Elegantbeef> Does gflw not allow user data?
01:49:54FromDiscord<Elegantbeef> Eventually i''l write that properly aswell
01:50:07FromDiscord<Elegantbeef> Most callback libraries allow attaching userdata
01:50:12FromDiscord<TryAngle> In reply to @Elegantbeef "Does gflw not allow": what do you mean? From what I konw is u have to add Callback functions
01:51:09FromDiscord<TryAngle> `SIGSEGV: Illegal storage access. (Attempt to read from nil?)` I get this error when eventLoop.windowHandleToId[handle] is called
01:52:00FromDiscord<Elegantbeef> Is eventloop heap or stack allocated?
01:52:12FromDiscord<TryAngle> In reply to @Elegantbeef "Is eventloop heap or": it's a ref
01:52:39FromDiscord<Elegantbeef> Ok so then you can do `GcRef` to allow it to outlive it's scope
01:52:48FromDiscord<TryAngle> sent a code paste, see https://play.nim-lang.org/#ix=44d8
01:52:58FromDiscord<Elegantbeef> I mean you can use global variables
01:53:10FromDiscord<Elegantbeef> If it's easier/safer for you to write it that way do it that way
01:53:19FromDiscord<TryAngle> In reply to @Elegantbeef "Ok so then you": what do you eman?
01:53:26FromDiscord<TryAngle> does that work on ARC / ORC aswell?
01:53:32FromDiscord<Elegantbeef> Yes
01:53:42FromDiscord<TryAngle> ok what is GcRef
01:53:52FromDiscord<Elegantbeef> It increments the reference counter manually
01:53:57FromDiscord<Elegantbeef> as the name implies
01:54:09FromDiscord<TryAngle> yes but how do I use it 😄
01:54:19FromDiscord<Elegantbeef> sent a code paste, see https://play.nim-lang.org/#ix=44d9
01:54:27FromDiscord<Elegantbeef> How do you think you use it?
01:54:43FromDiscord<Elegantbeef> I know i'm rather kind but can people atleast attempt to look before asking follow ups
01:54:57FromDiscord<TryAngle> In reply to @Elegantbeef "How do you think": is it a pragma 😐
01:55:17FromDiscord<Elegantbeef> No
01:55:19FromDiscord<Elegantbeef> It's a procedure
01:56:19FromDiscord<Arathanis> makes my head hurt
01:56:22FromDiscord<Arathanis> sent a code paste, see https://play.nim-lang.org/#ix=44da
01:57:24FromDiscord<Elegantbeef> It gets even worse
01:57:30FromDiscord<Arathanis> oh no
01:57:36FromDiscord<Elegantbeef> sent a code paste, see https://play.nim-lang.org/#ix=44db
01:57:51FromDiscord<Arathanis> hug
01:57:56FromDiscord<Elegantbeef> Even the new concepts dont work
01:57:58FromDiscord<Arathanis> (edit) "hug" => "guh"
01:58:15FromDiscord<Arathanis> what do you mean "the new concepts"?
01:58:29FromDiscord<Elegantbeef> I mean what i said
01:58:38FromDiscord<Elegantbeef> Nim has a new concept API
01:58:53FromDiscord<Elegantbeef> Instead of using when compiles magic it just does the look ups
01:58:58FromDiscord<Arathanis> wow, where do you even find information like that
01:59:21FromDiscord<Elegantbeef> RFCs and PRs
01:59:25FromDiscord<Arathanis> ah got it
01:59:34FromDiscord<Arathanis> so new style concepts dont work either
01:59:49FromDiscord<Elegantbeef> Well they do just not for this case
02:00:45FromDiscord<Arathanis> sent a code paste, see https://play.nim-lang.org/#ix=44dd
02:00:51FromDiscord<Arathanis> in this case `apply` = `fmap`
02:01:03FromDiscord<Elegantbeef> Well a similar thing
02:01:11FromDiscord<Elegantbeef> It's this
02:01:12FromDiscord<Arathanis> similar enough to demonstrate that it does not work
02:01:22FromDiscord<Girvo> Hi all 🙂
02:01:30FromDiscord<Elegantbeef> It's very much the proc declaration that causes the issue
02:01:41FromDiscord<Arathanis> i very much want concepts to work haha
02:01:43FromDiscord<Elegantbeef> So lets see if we can contort the compiler
02:01:49FromDiscord<Arathanis> specifically this kind of concept
02:02:02FromDiscord<Arathanis> In reply to @Elegantbeef "So lets see if": should i get a crowbar? :P
02:02:08FromDiscord<Elegantbeef> Nah
02:02:24FromDiscord<Elegantbeef> You just have to play darts until you can change the evaluation enough that it behaves differently
02:03:16FromDiscord<Elegantbeef> Fuck yea
02:03:24FromDiscord<Elegantbeef> Compiles
02:03:28FromDiscord<Elegantbeef> sent a code paste, see https://play.nim-lang.org/#ix=44df
02:03:39FromDiscord<Elegantbeef> So now back to the docs example
02:04:07FromDiscord<Arathanis> Are there docs for the new concept API you are using somewhere?
02:04:18FromDiscord<Elegantbeef> Nope
02:04:39FromDiscord<Elegantbeef> They're 'very' experimental
02:04:48FromDiscord<Arathanis> capital V Very
02:04:52FromDiscord<Arathanis> (edit) "V" => "'V'"
02:05:01FromDiscord<Elegantbeef> I mean i've used them with great effect
02:05:42FromDiscord<Elegantbeef> https://github.com/nim-lang/RFCs/issues/168 is the RFC
02:06:50FromDiscord<Dino> hello, I'm learning nim and I have a question about` nimporter`/`nimpy` - hopefully this is an appropriate place for it. If not let me know. ↵↵Basically, I'm curious if there is a way to make it so that things imported in nim that are not things you will call in python can stay nim without having to rewrite all of them with the `{.exportpy.}` thing? I realize if it imports them, they use them, but is there a way to 'compile' that porti
02:07:06FromDiscord<Dino> (edit) "hello, I'm learning nim and I have a question about` nimporter`/`nimpy` - hopefully this is an appropriate place for it. If not let me know. ↵↵Basically, I'm curious if there is a way to make it so that things imported in nim that are not things you will call ... in" added "directly"
02:07:49FromDiscord<Elegantbeef> No Nim/C compilers do dead code elimination so the code is just not considered
02:08:31FromDiscord<Elegantbeef> Also they do name mangling
02:08:42FromDiscord<Dino> Fair enough. I figured it was lofty, but it would've saved me a ton of time so figured worth asking.
02:09:12FromDiscord<Elegantbeef> Arath hopefully that workaround helps you a bit
02:09:33FromDiscord<Arathanis> yeah gonna approach it using the new knowledge see if I can find purchase
02:09:46FromDiscord<Elegantbeef> It probably also works with the new syntax aswell then
02:10:35FromDiscord<Elegantbeef> Nope nevermind
02:35:36*arkurious quit (Quit: Leaving)
02:45:34*wallabra_ joined #nim
02:47:20*wallabra quit (Ping timeout: 260 seconds)
02:47:20*wallabra_ is now known as wallabra
02:56:07*sagax joined #nim
02:59:09*wallabra quit (Quit: ZNC 1.8.2 - https://znc.in)
03:00:43*wallabra joined #nim
03:18:32*wallabra_ joined #nim
03:20:35*wallabra quit (Ping timeout: 244 seconds)
03:20:35*wallabra_ is now known as wallabra
04:04:35*noeontheend quit (Ping timeout: 255 seconds)
04:06:11*toluene quit (Quit: Ping timeout (120 seconds))
04:09:35*toluene joined #nim
04:34:42FromDiscord<xflywind> sent a code paste, see https://play.nim-lang.org/#ix=44dG
04:35:10FromDiscord<xflywind> It doesn't work with Arc/Orc, is there a known issue or intended?
04:35:22FromDiscord<xflywind> (edit) "there" => "it"
04:40:01*kenran joined #nim
04:40:12FromDiscord<Elegantbeef> It might just be a bug, I dont have a clue
04:40:31FromDiscord<xflywind> I see, thanks. Just filed one.
04:41:45*kenran quit (Client Quit)
04:42:17FromDiscord<Elegantbeef> A similar thing is that `GcRef` and `GcUnref` dont work with `seq` and `string`
04:43:22FromDiscord<xflywind> Yeah, I hope not many libraries use it.
04:44:01FromDiscord<Rika> I don’t think most do
04:44:06FromDiscord<Rika> Maybe those by advanced users
04:45:34FromDiscord<Elegantbeef> It adds another pointer indirection but it's not big deal
04:45:54FromDiscord<Elegantbeef> Have to use `ref string` or `ref seq[T]` if you pass the ref as a pointer
04:46:10FromDiscord<Elegantbeef> It probably creates 'safer' code though
04:46:32FromDiscord<Arathanis> sent a code paste, see https://play.nim-lang.org/#ix=44dJ
04:46:50FromDiscord<Elegantbeef> No clue it still doesnt have a way to instantiate the S if you ask me
04:47:07FromDiscord<Arathanis> That is apparently exactly what each is supposed to solve
04:47:14FromDiscord<Arathanis> https://media.discordapp.net/attachments/371759389889003532/996638914267848744/unknown.png
04:47:37FromDiscord<Elegantbeef> Ah ok it's `auto`
04:47:53FromDiscord<Arathanis> yeah I read it as "for all types" kind of thing
04:48:05FromDiscord<Arathanis> or maybe `each T: Hashable` will be syntactically valid
04:48:18FromDiscord<Arathanis> semantically
04:48:48FromDiscord<Arathanis> (edit) "syntactically" => "~~syntactically~~ semantically"
05:22:31*sagax quit (Quit: Konversation terminated!)
05:44:16CyberTailorError: Invalid node kind nnkBracketExpr for macros.`$`
05:44:20CyberTailorany macro gurus here?
05:44:29FromDiscord<Elegantbeef> Yes
05:45:57CyberTailormaybe i use "weave" wrong
05:46:16FromDiscord<Elegantbeef> Seems it's expecting a identifier or symbol and you passed a bracket expr
05:46:19FromDiscord<Elegantbeef> So probably generic related
05:46:31FromDiscord<Elegantbeef> If you can make a min repro make an issue
05:48:10CyberTailorwhat is bracket expr?
05:48:40FromDiscord<Elegantbeef> `someSymbol[someargs]`
05:49:19CyberTailorah, i have seq[string] indeed
05:49:37CyberTailorso i need to make a type alias, i suppose
05:50:05FromDiscord<haxscramper> Yes↵(@TryAngle)
05:50:30FromDiscord<haxscramper> Yes it is compatible with nim 1.6.2 or whatever version I used at the time of writing
05:51:06CyberTailoryaay it works
05:51:10FromDiscord<haxscramper> Newer versions might have breakages that I didn't account for
06:10:17CyberTailordeadlocks, deadlocks
06:10:22CyberTailorof course deadlocks
06:10:28CyberTailorwhat could i expect
07:00:02FromDiscord<lantos> sent a long message, see http://ix.io/44e9
07:04:16*rockcavera quit (Remote host closed the connection)
07:27:06FromDiscord<jan0809> neat
08:45:00*CyberTailor quit (Read error: Connection reset by peer)
08:45:55*CyberTailor joined #nim
09:16:40FromDiscord<Goel> Once i do this, am I 100% sure that the data contained in labelArray will reimain the same during all program execution?↵`let labelArray = makeLabelArray(40)`
09:17:12FromDiscord<Elegantbeef> Unless you use unsafe mechanisms yes
09:17:28FromDiscord<Elegantbeef> Or if it's a reference
09:18:35FromDiscord<Goel> I have this bug that i can't seem to figure out what causes it. Its probably from a C fall of a function of Raylib, because its data are modified after a nim procedure call
09:18:43FromDiscord<Rika> If it’s a reference and you don’t have strict functions or something on
09:18:44FromDiscord<Goel> (edit) "fall" => "call"
09:23:35FromDiscord<Goel> sent a code paste, see https://play.nim-lang.org/#ix=44eH
09:24:08FromDiscord<Elegantbeef> No
09:24:19FromDiscord<Goel> (edit) "https://play.nim-lang.org/#ix=44eH" => "https://play.nim-lang.org/#ix=44eI"
09:24:22FromDiscord<Elegantbeef> Nim does not have a mechanism to ensure data is never mutated in the entirety of runtime
09:24:28FromDiscord<Elegantbeef> `const` in Nim is compile time constant
09:24:30FromDiscord<Goel> (edit) "https://play.nim-lang.org/#ix=44eI" => "https://paste.rs/Y1x"
09:24:56FromDiscord<Goel> So how can i assure that the data won't be changed?
09:25:05FromDiscord<Elegantbeef> You dont mutate it 😄
09:25:43FromDiscord<Goel> But i'm not mutating it, in fact, thats i call it a bug. I'm just using that array to read its data from, i'm not modifing any data
09:25:48FromDiscord<Elegantbeef> I assume `label` is an array of strings?
09:26:18FromDiscord<Goel> label is labelArray that is `array[40, cstring]`
09:26:41FromDiscord<Elegantbeef> And how is it being mutated?
09:27:07FromDiscord<Elegantbeef> And what bindings are you using?
09:27:09FromDiscord<Goel> All its data are changed to another value, that come from another Nim procedure (writeFile)
09:27:12FromDiscord<Rika> If you’re passing pointers of any sort you’re pretty much boned
09:27:26FromDiscord<Goel> But that procedure have nothing to do with labelArray, its not part of it nor it call it
09:27:51FromDiscord<Elegantbeef> Code
09:27:53FromDiscord<Elegantbeef> Give us code
09:27:58FromDiscord<Elegantbeef> I think i see the issue
09:28:07FromDiscord<Elegantbeef> You're doing `label[i] = myString.cstring`
09:28:19FromDiscord<Elegantbeef> Then mutating `myString`
09:29:04FromDiscord<Elegantbeef> sent a code paste, see https://play.nim-lang.org/#ix=44eK
09:29:09FromDiscord<Elegantbeef> Nim's `cstring` conversion on string is non allocating
09:29:16FromDiscord<Phil> so b is also world
09:29:17FromDiscord<Phil> ?
09:29:34FromDiscord<Elegantbeef> b is a pointer to the first element of `a`
09:29:51FromDiscord<Elegantbeef> I meant to do \`assert b == "world"
09:30:50FromDiscord<Elegantbeef> Actually that example is wrong
09:31:40FromDiscord<Goel> https://github.com/PrimaIVoid/nimRaylib_tests
09:32:40FromDiscord<Elegantbeef> Why are you using cstrings?
09:32:43FromDiscord<Elegantbeef> Just use strings
09:33:10FromDiscord<Elegantbeef> Cstrings are only meant for interop with the backend
09:33:21FromDiscord<Elegantbeef> you can convert a string ot a cstring without any cost
09:34:43FromDiscord<Goel> It seems like changing from `let` labelArray to `const` labelArray fixes it
09:35:22FromDiscord<retkid> https://media.discordapp.net/attachments/371759389889003532/996711423558287380/unknown.png
09:35:26FromDiscord<retkid> i've been doing some ml
09:35:32FromDiscord<Elegantbeef> What's happening is you're copying pointers to a string and then they get collected and your data is getting replaced
09:35:32FromDiscord<Elegantbeef> cstring is an unsafe pointer
09:35:38FromDiscord<Elegantbeef> sent a code paste, see https://play.nim-lang.org/#ix=44eM
09:36:13FromDiscord<Elegantbeef> Yea in this case it will since you removed the pointers↵(@Goel)
09:36:43FromDiscord<Elegantbeef> But it's not cause it makes them immutable, it's cause it makes the collection at compile time so the cstrings are encoded in your program
09:36:52FromDiscord<Goel> So i can simply create a string in Nim and pass it into a C call of a cstring, without coverting it?
09:37:02FromDiscord<Goel> (edit) "coverting" => "converting"
09:37:09FromDiscord<Elegantbeef> you should do `cstring myString`
09:37:18FromDiscord<Elegantbeef> but yes you can do it without converting it with 1.6.6
09:37:26FromDiscord<Elegantbeef> Though it's a warning as it's unsafe
09:38:31FromDiscord<Phil> In reply to @Elegantbeef "you can convert a": Why is that btw? Aren't nim strings all characters and an associated counter for the length of the string?
09:38:46FromDiscord<Elegantbeef> Cause Nim puts a `\0` at the end of the string data
09:39:03FromDiscord<Elegantbeef> this ensures you can give it to a procedure expecting a null terminated string without any issues
09:39:17FromDiscord<Phil> ... that's so pragmatic I'm asking myself why I thought it'd be complicated
09:39:34FromDiscord<Elegantbeef> No clue it's how most languages handle their pascal strings
09:39:48FromDiscord<Elegantbeef> You just have to make sure all growths/shrinks put that `\0` and you're golden
09:40:04FromDiscord<Tuatarian> Can I get nim to compile to a standalone .c file?
09:40:09FromDiscord<Tuatarian> Or .cpp I don't really care
09:40:20FromDiscord<Phil> Check, to see whether I got this correctly though, the inverse conversion would be an allocation, right?↵Since you'd need to put a number that is the length of the string where the null termination is and that is overall more memory than the cstring occupied previously, right?
09:41:40FromDiscord<Phil> Like, string --> cstring works because you don't need as much memory as you occupied before, you just, essentially chop some off.↵cstring --> string needs to reallocate some memory because a string needs more memory space than the same cstring, correct?
09:42:09FromDiscord<Phil> (edit) "same" => "equivalent"
09:42:45FromDiscord<TryAngle> In reply to @haxscramper "Newer versions might have": Ah ok thanks good to know bc this library looks sick, I remembered u wanted to rewrite some of ur libs to nim skull once derivations exist, is this the case for this library also or do I misremember all along?
09:42:54FromDiscord<Rika> In reply to @iWonderAboutTuatara "Can I get nim": No all files from Nim require nimbase.h
09:43:14FromDiscord<Rika> Well you can always manually preprocess it I guess
09:43:27FromDiscord<Rika> Yardanico did it but it’s kinda a pain so
09:44:31FromDiscord<Elegantbeef> not only that but it's also GC'd↵(@Phil)
09:44:34FromDiscord<Tuatarian> Asking since most online judges on codeforces, leetcode etc don't support nim
09:44:37FromDiscord<Elegantbeef> cstrings are not always gc'd
09:47:39FromDiscord<TryAngle> In reply to @iWonderAboutTuatara "Asking since most online": Is leet code not just a meme for jobs or do ppl actually grind it?
09:47:41FromDiscord<Phil> In reply to @Elegantbeef "not only that but": As in, the cstring is GC'd upon creation of the string?↵Hmm that's also the case with orc, right?
09:48:02FromDiscord<TryAngle> Or do u do competivie programming as hobby
09:48:08FromDiscord<Tuatarian> I don't do leetcode but it might be some fun to do codeforces
09:48:11FromDiscord<Tuatarian> Second one yeah
09:48:30FromDiscord<Tuatarian> It's a decent way to kill small amounts of time
09:48:41FromDiscord<TryAngle> Ah I see, that's really cool then 😎
09:48:52FromDiscord<Tuatarian> Lmao thanks but I'm not good at it
09:52:04FromDiscord<Rika> https://web.archive.org/web/20210614091703/https://zen.su/posts/amalgamating-nim-programs/
10:16:16*toluene quit (Quit: Ping timeout (120 seconds))
10:18:20*toluene joined #nim
10:20:51FromDiscord<Yardanico> you can go to zeta.su
10:20:57FromDiscord<Yardanico> I sold zen.su :)
10:29:51*wallabra_ joined #nim
10:31:29*wallabra quit (Ping timeout: 244 seconds)
10:31:29*wallabra_ is now known as wallabra
10:34:39FromDiscord<Rika> I see
11:00:03*CyberTailor quit (Remote host closed the connection)
11:00:07FromDiscord<mirandaniel> Any idea if treeform/ws can be used to host a wss server too?
11:01:06*CyberTailor joined #nim
11:01:38*LyndsySimon quit (Quit: Connection closed for inactivity)
11:03:57FromDiscord<hotdog> In reply to @mirandaniel "Any idea if treeform/ws": I don't think so, but you can put a reverse proxy in front of it
11:07:06FromDiscord<laker31> Anyone know why `import nimsuggest/sexp` gives the following error?↵`Error: cannot open file: nimsuggest/sexp`↵↵I have installed Nim and its tool via choosenim.
11:11:38FromDiscord<planetis> not good enough you need to nimble install compiler
11:12:29FromDiscord<mirandaniel> In reply to @hotdog "I don't think so,": Do you know of any public key/private key encryption package?
11:12:56FromDiscord<enthus1ast> @mirandaniel libsodium
11:13:28FromDiscord<enthus1ast> or use ed25519 by hand and do the shared secret exchange, then use any other crypto
11:14:12FromDiscord<mirandaniel> thanks!
11:14:17FromDiscord<laker31> In reply to @planetis "not good enough you": Woo thank you! That fixed it 🙂
11:14:21FromDiscord<Rika> In reply to @enthus1ast "or use ed25519 by": Scary
11:15:00FromDiscord<enthus1ast> @mirandaniel\: another smaller option is to use https://github.com/enthus1ast/nimMonocypher/blob/master/monocypherll.nim
11:15:11FromDiscord<enthus1ast> but this is a low leve wrapper over monocypher
11:15:27FromDiscord<enthus1ast> why?↵(@Rika)
11:15:54xigoi@Yardanico why did you sell it?
11:16:09FromDiscord<Phil> My eyes glaze over the second I even think of looking at the libsodium docs. I'm... Too ignorant for that level of cryptographic knowledge still
11:16:10FromDiscord<mirandaniel> Interesting
11:16:34FromDiscord<enthus1ast> i think the libsodium docs are superb
11:17:00FromDiscord<Phil> Though I guess demos blog took some of the fear away from looking at c
11:34:12FromDiscord<Rika> I think sodium is one of the simpler libraries for cryptography so far
11:55:38FromDiscord<planetis> There was an unsafe set the case discriminator for object variants, somewhere? How is it called?
11:57:01FromDiscord<planetis> Was I dreaming it, why I can't find it anywhere...
11:58:39FromDiscord<Rika> You’ll get the warning when you set the discriminate outside of the object construction syntax
11:58:45FromDiscord<Rika> I assume it’s that that you mean
11:59:18FromDiscord<Yardanico> In reply to @xigoi "<@177365113899057152> why did you": can't say much, but it's because I'm not particularly attached to the domain and I got some money, not a lot, but quite enough for a random domain
12:00:03FromDiscord<enthus1ast> https://monocypher.org/ is even simpler↵(@Rika)
12:00:20FromDiscord<Rika> Never heard of it, I’ll look
12:01:13FromDiscord<enthus1ast> Another one is https://github.com/jedisct1/libhydrogen
12:01:18FromDiscord<enthus1ast> i actually meant this...
12:01:23FromDiscord<Rika> “cannot fail on correct input” so it can fuck itself on wrong input?
12:02:05FromDiscord<konsumlamm> In reply to @planetis "There was an unsafe": https://nim-lang.github.io/Nim/manual.html#types-cast-uncheckedassign this?
12:02:18FromDiscord<enthus1ast> i meant libhydrogen not monocypher all the time lol
12:02:21FromDiscord<planetis> nice thank you so much
12:02:36FromDiscord<planetis> I was searching for unsafe
12:04:18FromDiscord<enthus1ast> i meant libhydrogen not monocypher all the time lol https://github.com/enthus1ast/nimHydrogen the high level wrapper is not 100% done yet
12:04:37FromDiscord<Rika> Nice
12:05:07FromDiscord<Rika> Mono cypher looks cool too though
12:07:23FromDiscord<@zaz:sinnfrei.xyz> sent a long message, see http://ix.io/44fp
12:07:45FromDiscord<enthus1ast> the thing is, i do not know the author, at least in the case of libhydrogen its the same as for libsodium↵(@Rika)
12:11:21FromDiscord<Phil> Just for my own sanity, I can have inheritance on value object types, right?↵doing `Type A = object of RootObj` doesn't make it automatically a ref type somehow, correct?
12:11:23FromDiscord<TryAngle> @Phil https://www.youtube.com/watch?v=AVtuFp3lkpI
12:12:12FromDiscord<Rika> It doesn’t make it a red
12:12:14FromDiscord<Rika> Reference
12:12:21FromDiscord<Rika> But it doesn’t give you inheritance either
12:12:37FromDiscord<enthus1ast> whats the purpose?
12:15:10FromDiscord<Rika> Composition I believe
12:16:25FromDiscord<Phil> I'm mostly staring at norm and trying to wrap my head around some design decisions
12:17:44FromDiscord<Phil> Mainly: ↵1) Why are models ref types?↵2) Why doesn't it just demand that implicitly a constructor function is supplied by the user in the context (e.g. `new(M)`) instead of demanding that the user provides instantiated model objects
12:18:14FromDiscord<Phil> (edit) "Mainly: ↵1) Why are models ref types?↵2) Why doesn't it just demand that implicitly a constructor function is supplied by the user in the context (e.g. `new(M)`) instead of demanding that the user provides instantiated model objects ... " added "that norm then fills with data it fetches / duplicates if you're querying a list of entries"
12:18:39FromDiscord<Rika> Perhaps it wasn’t considered
12:18:52FromDiscord<Phil> In reply to @TryAngle "<@180601887916163073> https://www.youtube.com/watch": I could look at the monad video, or I could focus on norm for now 😛
12:18:58FromDiscord<Rika> Make a prototype branch with those design considerations swapped in and see what new limitations you get from it
12:21:06FromDiscord<Phil> I might. Overall the second question is confusing me a bit more than the first, for I consider the API of "here, have a db connection, an id and the type of model I want and give me the constructed object back" to be simpler than "here, have a db connection, an instantiated object to overwrite and an SQL condition on what to use as where clause"
12:21:54FromDiscord<Phil> norm's creator did advise against it early on though since apparently they tried and hit a wall somewhere
12:22:04FromDiscord<Phil> I'm just not seeing where
12:22:20FromDiscord<TryAngle> In reply to @Isofruit "I *could* look at": 🥵
12:23:08FromDiscord<TryAngle> wow didn't know about norm but it looks so nice to use 😳
12:23:22FromDiscord<TryAngle> but everything feels nice after using rust's Diesel library I suppose
12:25:33FromDiscord<Phil> Honestly I'm not a huge fan of the API, it's why I wrote an abstraction layer over norm to make it more useful to me
12:25:47FromDiscord<Phil> But it does lift a significant chunk of work away from me
12:25:57FromDiscord<TryAngle> u should take a look at DevOnDuty
12:26:08FromDiscord<TryAngle> he wrote an insane abstraction for SQL queries
12:27:41FromDiscord<TryAngle> https://github.com/David-Kunz/Nery/blob/main/tests/test.nim
12:30:58FromDiscord<Phil> That looks like DIesel but Nim
12:31:17FromDiscord<Phil> Sadly, doesn't take care of transforming the queried data into an object for me
12:31:25FromDiscord<Phil> (edit) "Sadly, doesn't take care of transforming the queried data into an object for me ... " added "as far as I can see"
12:31:45FromDiscord<TryAngle> In reply to @Isofruit "Sadly, doesn't take care": it's just for generating queries afaik
12:32:00FromDiscord<TryAngle> (edit) "queries" => "the SQL code"
12:32:23FromDiscord<Phil> So its sole purpose is giving compile-time guarantee of correctness for the SQL?
12:32:32FromDiscord<Phil> well, syntactic correctness
12:39:46FromDiscord<TryAngle> In reply to @Isofruit "well, syntactic correctness": I guess so, since Diesel I'm kinda scared of ORMs 💀
12:42:13FromDiscord<dom96> Diesel sure helps you see how bad Rust error messages can get
12:42:28FromDiscord<dom96> So many traits
12:43:07FromDiscord<jan0809> my fave orm is prisma python
12:43:31FromDiscord<jan0809> in terms of sql, but i also like edgedb
12:48:20FromDiscord<Goel> sent a code paste, see https://play.nim-lang.org/#ix=44fx
12:48:37FromDiscord<TryAngle> tbh after I started writing SQL scripts for pharmaceuticals sql feels easier to use than ORMS
12:49:03FromDiscord<TryAngle> only annoying thing is writing with some legacy oracle sql
12:49:13FromDiscord<jan0809> you mean like without models?
12:51:47FromDiscord<TryAngle> do u mean me? idk what u mean with models, just plain SQL even used some legacy SQL editor lmao
12:52:22*noeontheend joined #nim
12:53:32FromDiscord<deech> I'm aware that circular imports don't exist but is there a way to forward declare types?
12:58:22FromDiscord<Prestige> Just types? Don't think so
13:22:22*arkurious joined #nim
13:36:30*noeontheend quit (Ping timeout: 240 seconds)
13:58:43*CyberTailor quit (Remote host closed the connection)
13:59:34*CyberTailor joined #nim
14:09:48FromDiscord<Yardanico> In reply to @deech "I'm aware that circular": There is one feature for that, but I haven't seen anyone actually use it
14:10:44FromDiscord<jmgomez> In reply to @Yardanico "There is one feature": Really? I had to break the UE convention on the filenames because of it. Do you mind to elaborate?
14:11:38FromDiscord<Yardanico> It's a very specific feature and is only available for reference (and pointer I guess) types
14:11:39FromDiscord<Yardanico> https://nim-lang.org/docs/manual_experimental.html#package-level-objects
14:13:50FromDiscord<jmgomez> Awesome! Thanks!!
14:25:18FromDiscord<deech> Interesting! I wonder if that works well with lifetime hooks. I guess I would need to specify them when the type is fleshed out and not at the package level.
14:25:31FromDiscord<TryAngle> how do I add `==` for this? `WindowId = distinct int64`
14:26:50FromDiscord<Generic> `proc `==`(a, b: WindowId): bool {.borrow.}`
14:27:10FromDiscord<Generic> (edit) "`proc `==`(a, b: WindowId): bool {.borrow.}`" => "sent a code paste, see https://play.nim-lang.org/#ix=44g2"
14:27:28FromDiscord<TryAngle> sent a code paste, see https://play.nim-lang.org/#ix=44g4
15:02:21*noeontheend joined #nim
15:45:33FromDiscord<TryAngle> can I use nim's new destructors for cleanups in c wrappers? for example glfwDestroyWindow and glfwTerminate?
15:45:43FromDiscord<TryAngle> (edit) "new" => ""new""
15:48:20FromDiscord<Phil> Hmm if I have a ref and it is nil, I can't get the type that nil is supposed to represent out of it again, can I?
15:49:03FromDiscord<Phil> sent a code paste, see https://play.nim-lang.org/#ix=44gD
15:49:28FromDiscord<Phil> Strictly speaking, the variable a might have the information what type it is, but I don't think that info makes it into memory
15:49:42FromDiscord<Phil> (edit) "Strictly speaking, the variable a might have the information what type ... it" added "the ref inside of"
15:50:57FromDiscord<xflywind> nil is runtime info, Use if a == nil ?
15:52:46FromDiscord<Phil> sent a code paste, see https://play.nim-lang.org/#ix=44gF
15:54:02FromDiscord<Phil> Wait, no I'M an idiot
15:54:33FromDiscord<Phil> yeah that works, I had forgotten there were 10 lines of old code in the playground file
15:55:06FromDiscord<Phil> (edit) "yeah that works, I had forgotten there were 10 lines of old code in the playground file ... " added "which got invalidated by a copy paste thingy and I had to delete them first"
15:55:24FromDiscord<aMOPel> sent a code paste, see https://paste.rs/sww
15:56:35FromDiscord<xflywind> it is used in macros/templates to restrict the pattern of the parameters.
15:56:58FromDiscord<aMOPel> alright, thanks 🙂
15:57:10FromDiscord<aMOPel> so it has no effect of procs
15:57:30FromDiscord<aMOPel> (edit) "of" => "on"
15:57:35FromDiscord<aMOPel> (edit) "procs" => "procs?"
15:59:30*noeontheend quit (Ping timeout: 260 seconds)
15:59:32FromDiscord<xflywind> I think so.
15:59:40FromDiscord<xflywind> An example https://nim-lang.org/docs/tasks.html#toTask.m
16:00:06FromDiscord<xflywind> for typed etc. parameters.
16:01:20FromDiscord<xflywind> In reply to @aMOPel "so it has no": here is the docs https://nim-lang.org/docs/manual_experimental.html#term-rewriting-macros-parameter-constraints
16:21:24*xet7 joined #nim
16:37:05*fallback quit (Quit: IRCNow and Forever!)
16:57:39FromDiscord<mattrb> Is it expected that orc would be significantly slower than refc in some cases? When building my gba emulator with orc, I tend to see a 10-20% decrease in performance
17:11:30*fallback joined #nim
17:15:01FromDiscord<TryAngle> I'm having a werid issue, I'm casting a pointer of a ref object and the values of the ref object a the default ones even though the pointer has the same value
17:16:49FromDiscord<TryAngle> sent a code paste, see https://play.nim-lang.org/#ix=44h0
17:17:16FromDiscord<TryAngle> (edit) "https://play.nim-lang.org/#ix=44h0" => "https://play.nim-lang.org/#ix=44h1"
17:17:40FromDiscord<TryAngle> (edit) "https://play.nim-lang.org/#ix=44h1" => "https://play.nim-lang.org/#ix=44h2"
17:18:50FromDiscord<TryAngle> SharedState is a ref object and is owned by a window and another object
17:20:06FromDiscord<TryAngle> sent a code paste, see https://play.nim-lang.org/#ix=44h3
17:20:18FromDiscord<TryAngle> (edit) "SharedState is a ref object and is owned by a window and another object ... " added "and I want to use it in the callbacks aswell but as a pointer obv"
17:20:21*oddish joined #nim
17:21:00FromDiscord<TryAngle> EventLoop and WindowObj have the same values for SharedState, only the pointer has issues 🤔
17:32:10*noeontheend joined #nim
17:46:32*soileh quit (Read error: Connection reset by peer)
17:49:33FromDiscord<Generic> In reply to @mattrb "Is it expected that": yes, it depends a lot on your code, that sounds pretty weird though
17:50:10FromDiscord<Generic> since you're working on an emulator, you shouldn't really need/have circular data structures right?
17:50:55FromDiscord<Generic> you can try out how arc performs to see whether the difference comes from the cycle detection/breaking or from other differences
18:06:16FromDiscord<mattrb> In reply to @Generic "since you're working on": There are probably a dozen circular references that exist for the lifetime of the program. I have a heap-allocated object for each component that references a 'gba' object, which has a reference back to all of the components. I use that to communicate between the components
18:06:22*kenran joined #nim
18:06:25FromDiscord<mattrb> In reply to @Generic "you can try out": Good thought, I'll give that a shot
18:07:42FromDiscord<Generic> In reply to @mattrb "There are probably a": me programming my gc emulator mostly procedurally with global variables
18:07:54FromDiscord<Generic> I don't have such weakness
18:17:45*noeontheend quit (Ping timeout: 260 seconds)
19:25:10FromDiscord<TryAngle> sent a code paste, see https://play.nim-lang.org/#ix=44hr
19:40:05FromDiscord<TryAngle> In reply to @TryAngle "I get the same": actually this works↵I was casting the pointer from getWinoowUserPointer to SharedState but after applying the changes from this, SharedState should have been ptr SharedState now .. .. . .. . adding doing cast[ptr SharedState](...) and ti works XD
19:40:48FromDiscord<pruno> Hello, how would you do to read a file to a certain string (or bytes for my example since it's a binary file) ?
19:40:55FromDiscord<TryAngle> so much pain and suffering bc of the pointer not being casted to a ptr but an object and I did not noctice it 😭 😭
19:41:37FromDiscord<TryAngle> In reply to @pruno "Hello, how would you": hmm do u mean not reading the whole file?
19:41:42FromDiscord<TryAngle> maybe std/streams
19:42:29FromDiscord<enthus1ast> you read in chunks eg of the size of the byte pattern, then if you find the byte patter you break
19:42:37FromDiscord<pruno> Actually i want to have the whole file in memory but read and print it to stdout before a certain string
19:45:49*CyberTailor quit (Quit: Konversation terminated!)
19:48:00FromDiscord<pruno> In reply to @enthus1ast "you read in chunks": How would you do that ?
19:48:59FromDiscord<enthus1ast> you call eg. read(sizeOfYourBytePattern) in a loop until you reach the end of the file
19:50:07FromDiscord<pruno> I see, gonna try to that then, thanks
19:57:32FromDiscord<mattrb> In reply to @Generic "you can try out": Just tested, if you're curious. It seems that arc marginally outperforms orc here, but refc is still significantly faster
20:00:36FromDiscord<Darkstepan> Hello, what is the Nim equivalent of Python's `ìf name == "main"`↵(check if not imported)
20:00:51FromDiscord<Darkstepan> (edit) "Hello, what is the Nim equivalent of Python's `ìf name == "main"`↵(check if ... notbeing" added "the code is" | "the code isnot ... imported)" added "being"
20:01:34FromDiscord<Darkstepan> (edit) "`ìf" => "`if"
20:01:58FromDiscord<aruZeta> sent a code paste, see https://play.nim-lang.org/#ix=44hy
20:02:04FromDiscord<aruZeta> (edit)
20:02:06FromDiscord<Darkstepan> thanks
20:02:23*kenran quit (Quit: WeeChat info:version)
20:04:00FromDiscord<enthus1ast> @Darkstepan\: `when` is like a "compiletime if"
20:09:41FromDiscord<Darkstepan> I'm aware of that, I just wasn't sure about which variable to check
20:12:30FromDiscord<Darkstepan> btw is there a list of compile time variables?
20:12:47FromDiscord<Darkstepan> (edit) "btw" => "also,"
20:28:38FromDiscord<Elegantbeef> https://github.com/nim-lang/Nim/wiki/Consts-defined-by-the-compiler there is this
20:33:29FromDiscord<soundmodel> anyone used Quorum https://quorumlanguage.com/?
20:33:34FromDiscord<soundmodel> (edit) "https://quorumlanguage.com/?" => "https://quorumlanguage.com/ ?"
20:33:52FromDiscord<soundmodel> (edit) "anyone used Quorum https://quorumlanguage.com/ ? ... " added "A bit worried as to how evidence-basedness could trump even the so-nice Nim syntax."
20:34:09FromDiscord<soundmodel> (edit) "as to how" => "if"
20:34:25FromDiscord<soundmodel> (edit) "anyone used Quorum https://quorumlanguage.com/ ? A bit worried if evidence-basedness could trump even the so-nice Nim syntax. ... " added "So if someone has, then a comparison might be interesting."
20:34:34FromDiscord<huantian> ngl their website looks like a government agency's website lmao
20:34:52FromDiscord<soundmodel> I think they're still developing it, but the theory is interesting
20:34:57FromDiscord<Elegantbeef> And the language looks like pascal meets OOP
20:35:15FromDiscord<Elegantbeef> Shit if only there was an oop pascal
20:35:24FromDiscord<huantian> what does evidence based mean?
20:35:41FromDiscord<Elegantbeef> They designed their language based off studies it seems
20:35:55FromDiscord<soundmodel> In reply to @huantian "what does evidence based": that they've studied a plethora of programming languages and how people use them. Then formed conclusions about how to design a well-usable language.
20:36:41FromDiscord<huantian> hm based off of the syntax only I think I like python better 😛
20:36:43FromDiscord<soundmodel> but since I expect that people here would consider Nim to be well-designed, then that's why I found this interesting
20:36:49FromDiscord<Elegantbeef> They decided to go for the `end` delimited blocks which is a travesty
20:37:12FromDiscord<Elegantbeef> This language is much much simpler than Nim though
20:37:15FromDiscord<!Patitotective> In reply to @Elegantbeef "They decided to go": its a crime
20:37:25FromDiscord<huantian> same, I prefer {} so much more than `end`
20:38:04FromDiscord<!Patitotective> why not normal for loops, why `repeate` :[
20:38:08FromDiscord<!Patitotective> (edit) "`repeate`" => "`repeat`"
20:38:16FromDiscord<Elegantbeef> Notice there isnt a while loop
20:38:35FromDiscord<Elegantbeef> Oh god `repeat while` is a while loop
20:38:36FromDiscord<soundmodel> Nim is the most interesting language I know, but without that theory, it creates a bit of a stir doesn't it?
20:38:53FromDiscord<soundmodel> i.e. can it be possible that Nim is as usable, or how usable it's in comparison?
20:39:07FromDiscord<!Patitotective> nim doesnt have audio library ¯\_(ツ)_/¯
20:39:15FromDiscord<!Patitotective> https://media.discordapp.net/attachments/371759389889003532/996878498675294319/unknown.png
20:39:28FromDiscord<Elegantbeef> Just use miniaudio problem solved
20:40:05FromDiscord<!Patitotective> wrapping...
20:40:17FromDiscord<huantian> they do have some ideas that I agree with mentioned in <https://quorumlanguage.com/evidence.html>
20:40:17FromDiscord<Elegantbeef> I think this language is 100% educational
20:40:29FromDiscord<Elegantbeef> Oh my https://github.com/beef331/miniaudio/↵(@!Patitotective)
20:40:40FromDiscord<TryAngle> how big are Variant Types again, their max possible size or sum of all possibilities?↵if I have ~10-20 variants should I split it up into two?
20:40:53FromDiscord<Elegantbeef> Variant types are as big as your heart desires
20:40:57FromDiscord<huantian> max possible size
20:41:03FromDiscord<soundmodel> In reply to @Elegantbeef "I think this language": what do you mean?
20:41:08FromDiscord<!Patitotective> In reply to @Elegantbeef "I think this language": scratch ¯\_(ツ)_/¯
20:41:21FromDiscord<TryAngle> In reply to @Elegantbeef "Variant types are as": I just wanna pay some respect for the cache 💀
20:41:26FromDiscord<!Patitotective> In reply to @Elegantbeef "Oh my https://github.com/beef331/miniaudio/ (<@7620": not even a readme jk
20:41:27FromDiscord<Elegantbeef> It doesnt state where/how it runs
20:41:30FromDiscord<soundmodel> ehh, possibly, but evidence-basedness should be a big deal for real-world languages
20:41:36FromDiscord<soundmodel> because that can explain e.g. why software projects fail
20:41:51FromDiscord<soundmodel> (when they fail because of bugs etc.)
20:41:52FromDiscord<Elegantbeef> It's a union so the largest variant is the one that is the size of the type↵(@TryAngle)
20:42:10FromDiscord<TryAngle> In reply to @Elegantbeef "It's a union so": ok so all gucci 😎↵thanks
20:42:53FromDiscord<huantian> In reply to @soundmodel "ehh, possibly, but evidence-basedness": I think it is important, but on the other hand, I think every idea has some "evidence" behind it
20:42:53FromDiscord<Elegantbeef> Like it seems it's an interpreted language as it's possible to embed it in web
20:43:23FromDiscord<soundmodel> the other thing is, which I don't know about, is whether experience trumps design
20:43:36FromDiscord<soundmodel> i.e. that in principle Nim is "as effective", when it's used with experience
20:43:39FromDiscord<huantian> it kinda looks like statically typed lua 😛 which honestly might not be a bad thing
20:44:22FromDiscord<Elegantbeef> The big issue to me looking at this language is very much they dont say what it's capable of or how it runs
20:44:44FromDiscord<Elegantbeef> It's JVM'd language
20:45:01FromDiscord<Elegantbeef> > Note that running the test suite, by default, runs only on the Java Virtual Machine. To test Quorum's JavaScript transpiled mode, you need to install Node JS.
20:45:05FromDiscord<huantian> and it doesn't have a linux download??
20:45:35FromDiscord<soundmodel> In reply to @Elegantbeef "The big issue to": I interpreted that to mean that maybe it's just not finished yet
20:45:36FromDiscord<Elegantbeef> So it's a JVM/JS alternative which explains why it's pretty much Pascal C# 😄
20:45:42FromDiscord<soundmodel> obviously if they needed to market that to the industry
20:45:48FromDiscord<soundmodel> then you'd expect to see benchmarks
20:45:53FromDiscord<huantian> yeah the language definitely is marketed toward education
20:46:01FromDiscord<Elegantbeef> I mean it's 4.0.3 they should be able eto say what the point of the language is
20:46:30FromDiscord<huantian> which makes design and the first user experience much more imporant than execution speed or how you actually run the program
20:46:47FromDiscord<Elegantbeef> Yea that's what it seems
20:47:54FromDiscord<huantian> And in general I think I do agree with the language’s ideas and it’s evidence based philosophy, but I’m not sure exactly what evidence based entails and how it improved the lang
20:48:01FromDiscord<soundmodel> ultimately I'm just sick of "yet another language"
20:48:14FromDiscord<soundmodel> because I'd like to build up libraries, instead of parse different tools
20:48:50FromDiscord<Elegantbeef> > Inheritance depth is not a significant driver of software maintenance effort↵Is a very questionable statement if you ask me
20:48:55FromDiscord<huantian> The cynical bit in me says that this is just “yet another language” with a new buzzword
20:49:23FromDiscord<soundmodel> but not before can one do evidence-based design
20:49:39FromDiscord<soundmodel> think about it, you need to design a lot of flawed models before you can learn from all of them
20:49:45FromDiscord<TryAngle> In reply to @soundmodel "ultimately I'm just sick": every language was yet another language when it came out
20:50:28FromDiscord<soundmodel> yes but they all fail in some sense
20:50:49FromDiscord<soundmodel> but the point is that it'd be interesting to compare that and Nim
20:50:55FromDiscord<soundmodel> e.g. on syntax
20:51:39FromDiscord<huantian> Like I’ve tried to teach people who don’t know programming python and I was bad at it
20:52:03FromDiscord<huantian> So first we’re gonna learn about the monad
20:52:09FromDiscord<Elegantbeef> Lol
20:52:21FromDiscord<huantian> That’s how you teach someone Haskell right
20:53:07FromDiscord<Elegantbeef> That's my understanding of haskell
20:53:08FromDiscord<soundmodel> but it'd be also shame to go 10 years from now to
20:53:19FromDiscord<Elegantbeef> Monads exist and if you dont understand them you're not allowed in the cool kids club
20:53:26FromDiscord<soundmodel> "oh now we wrote all code with this lang, but it wasn't evidence-based"
20:53:36FromDiscord<soundmodel> "so now we have to take yet another language"
20:53:37FromDiscord<huantian> I think the main part is the actual thought process behind programming, and the syntax has to somehow be able to guide the person into thinking programmatically.↵(@soundmodel)
20:54:06FromDiscord<soundmodel> and also readability
20:54:16FromDiscord<soundmodel> some languages become really messy when you have a lot of files
20:54:24FromDiscord<Elegantbeef> What's so hard to understand about `if((MyFlagA | MyFlagB) & myFlags){}`?
20:54:32FromDiscord<soundmodel> then it's hell to infer what connects to what
20:54:38FromDiscord<soundmodel> unless you're the program's designer
20:54:50FromDiscord<huantian> The hard part is knowing that you need an ig statement
20:54:56FromDiscord<huantian> \if
20:55:13FromDiscord<Elegantbeef> I mean it doesnt make any sense to a non advanced user
20:55:19FromDiscord<soundmodel> I think the reason people use Python so much even if it's slow
20:55:26FromDiscord<Elegantbeef> Why are we using `|`... why are we using `&`
20:55:28FromDiscord<TryAngle> what is cleaner, I'm wrapping a c library that uses int32 for almost everything, should I for the user interface use int or uint for things that are always above 0 (e.g. window size) or should I just continue the int32 always?
20:55:37FromDiscord<huantian> You can tell someone what if does and show them you using it, but you can’t tell them when they need an if
20:55:37FromDiscord<soundmodel> is because it at least allows people to understand what the code does after months and years
20:55:40FromDiscord<soundmodel> compared to Java
20:55:41FromDiscord<Elegantbeef> It's up to you try
20:56:45FromDiscord<TryAngle> In reply to @Elegantbeef "It's up to you": hmm, what would u do if u overengineered it
20:57:15FromDiscord<soundmodel> but the transitioning from language to language is total pain IMO
20:57:21FromDiscord<Elegantbeef> I'm going to say it slowly
20:57:25FromDiscord<Elegantbeef> It's up to you
20:57:54FromDiscord<TryAngle> In reply to @Elegantbeef "It's up to you": freedom is a scary concept
20:58:16FromDiscord<!Patitotective> In reply to @TryAngle "freedom is a scary": it is
20:58:16FromDiscord<huantian> I’ve personally been fine transitioning between languages, like it all makes sense to me (not that I don’t mess up), but I’ve seen other people definitely struggle more than me↵(@soundmodel)
20:58:32FromDiscord<soundmodel> no I mean reusing code of another language
20:58:37FromDiscord<soundmodel> JNI, FFIs etc.
20:58:50FromDiscord<Elegantbeef> If you want to reuse the code the only way is to use system languages otherwise you're fucked 😛
20:58:53FromDiscord<huantian> Like maybe I’m just the only person in the world that understands the code I’m writing and everyone else just crutches off of language features?? I don’t know how to express this feeling
20:59:00FromDiscord<soundmodel> and that's the result when people don't agree on what language to use
20:59:59FromDiscord<soundmodel> Nim's interop has seemed very nice because you have out-of-the-box calls to C and Python
21:00:14FromDiscord<Yardanico> python isn't really "out of the box" though, it's a third-party module
21:00:25FromDiscord<Yardanico> and there are much more modules like that, not only for python
21:00:35FromDiscord<soundmodel> but the question was still, could "evidence-basedness" bring something unseen on the table
21:00:51FromDiscord<Elegantbeef> No cause the evidence is opinionated
21:00:55FromDiscord<soundmodel> I meant out-of-the-box in the sense that it's easy to get running
21:00:59FromDiscord<soundmodel> compared to e.g. JNI
21:01:30FromDiscord<Yardanico> https://github.com/Clonkk/nimjl↵https://github.com/yglukhov/jnim↵https://github.com/SciNim/rnim
21:01:38FromDiscord<Elegantbeef> Bad example 😛
21:01:43FromDiscord<Yardanico> julia, java, R
21:01:57FromDiscord<Yardanico> metaprogramming does wonders even for JNI https://media.discordapp.net/attachments/371759389889003532/996884208339398716/unknown.png
21:01:59FromDiscord<Yardanico> @soundmodel ^
21:02:11FromDiscord<Phil> In reply to @soundmodel "is because it at": I'd only say that it facilitates that, but not much more. Source: I've seen academic python code. It's.... it's a thing
21:02:58FromDiscord<TryAngle> In reply to @soundmodel "but the question was": I think semi, isn't rust's compiler basically "proofing" the code?
21:02:59FromDiscord<Phil> Hell, I've started out with writing academic python code and seen the folks writing such code around me. None of it was actually maintainable
21:03:08FromDiscord<soundmodel> also Nim does have some sort of evidence-basedness perhaps
21:03:13FromDiscord<soundmodel> but it's not the same as Quorum's
21:03:53FromDiscord<Elegantbeef> To have something be considered evidence to me atleast it needs to be conclusive and repeatable, a single experiment is the exact opposite
21:03:58FromDiscord<TryAngle> In reply to @Yardanico "metaprogramming does wonders even": are u srsly writing java in nim
21:04:02FromDiscord<TryAngle> ????
21:04:08FromDiscord<Yardanico> jnim
21:04:25NimEventerNew Nimble package! nimwin - Platform Agnostic Windowing Library for Nim, see https://github.com/TriedAngle/nimwin
21:04:33FromDiscord<TryAngle> 😳
21:05:03FromDiscord<soundmodel> but we also live a time when it's very possible to learn from all the mistakes
21:05:20FromDiscord<soundmodel> of e.g. unmaintainable C and Java code
21:05:28FromDiscord<soundmodel> so it'd be dumb to repeat those things
21:06:05FromDiscord<TryAngle> I mean just wait until AI driven development comes out after and AI writes code for u and u chill and be unemployed gg
21:06:07FromDiscord<Phil> Yes, there are are some design decisions that are overwhelmingly favoured by a group of programmers, which lead to the rise of system-language alternatives
21:06:18FromDiscord<TryAngle> (edit) removed "after"
21:06:36FromDiscord<soundmodel> I've been also reading that something like Rust might fall prey of something down the line
21:06:40FromDiscord<Phil> But you'll still see peeps preferring C/C++ and feeling they're the better language for arbitrary X reason
21:06:48FromDiscord<soundmodel> (edit) "of" => "to"
21:07:08FromDiscord<Phil> And these reasons will still be valid for they are their opinion
21:07:10FromDiscord<Elegantbeef> Like let's look at a simple Nim bitset vs C bitflags
21:07:12FromDiscord<TryAngle> In reply to @soundmodel "I've been also reading": I think rust's only mistake is it's strict no braking changes policy
21:07:17FromDiscord<soundmodel> in essence, it just seems odd that PL designers keep repeating mistakes
21:07:26FromDiscord<Elegantbeef> Most Nim programmers will say the bitsets are better, most C programmers will say bitflags are better
21:07:27FromDiscord<TryAngle> rust 2021 was dissapointing tbh
21:07:30FromDiscord<soundmodel> (edit) "that" => "that/if"
21:08:40FromDiscord<Elegantbeef> There is no good way to test for which is actually better cause every programmer prefers a different API or has a different knowledge basis
21:08:52FromDiscord<Phil> In reply to @TryAngle "are u srsly writing": I have been accused of actually performing java deeds in nim
21:08:58FromDiscord<Phil> It happens
21:09:00FromDiscord<Elegantbeef> You fucking know you do
21:09:11FromDiscord<Phil> BASELESS ACCUSATIONS
21:09:36FromDiscord<Phil> BAAASEEELEEESS
21:09:53FromDiscord<Elegantbeef> Anyway evidence based design would be great if it was capable to get
21:09:59FromDiscord<Yardanico> phil is broken, time to replace him
21:10:34FromDiscord<Elegantbeef> We will replace you
21:10:48FromDiscord<Phil> Maybe I've looked at too much rust recently, who knows
21:11:17FromDiscord<huantian> I think the main question is if community opinion driven language is good
21:11:40FromDiscord<Prestige> That project rename lol
21:11:51FromDiscord<Elegantbeef> "All the people that contribute on community driven languages say 'yes'"
21:12:01FromDiscord<TryAngle> In reply to @Isofruit "Maybe I've looked at": I feel that
21:12:03FromDiscord<Elegantbeef> Context prestige?
21:12:13FromDiscord<huantian> Like is the community more right than a scientific paper?
21:12:47FromDiscord<TryAngle> In reply to @Isofruit "Maybe I've looked at": whenever I write something that requires unicode I go back to rust and for everything else I go nim >. <
21:12:49FromDiscord<Elegantbeef> Does the scientific paper use more than a single study? 😛
21:13:10FromDiscord<Phil> Anyway, evidence based design is sth I have a hard time defining. Is it asking people what syntax is the best? Because I can't see anything getting a straight up "that's best".↵Is it realizing things that have proven problematic in the past, such as dealing with memory allocation completely manual is a massive pain in the but and should be avoided if possible? That I can see being sensible, but even that I'm not sure you could find an actu
21:13:13FromDiscord<dom96> Wasn't there an experiment to build a language solely by community vote?
21:13:15FromDiscord<Elegantbeef> Make a unicode distinct cmon↵(@TryAngle)
21:13:26FromDiscord<Phil> In reply to @TryAngle "whenever I write something": ... why?
21:13:34FromDiscord<soundmodel> also as I suggested evidence-basedness does not guarantee usability
21:13:39FromDiscord<soundmodel> look all the natural languages
21:13:43FromDiscord<soundmodel> not designed, still used
21:13:48FromDiscord<Elegantbeef> I think the issue is mainly phrasing
21:13:53FromDiscord<huantian> Twitch build a programming language↵(@dom96)
21:14:00FromDiscord<Elegantbeef> It's "Evidence based language design for ensuring easy learning"
21:14:19FromDiscord<Phil> In reply to @huantian "Twitch build a programming": They have found a language more brain-breaking than brainfuck? Wow
21:14:32FromDiscord<Elegantbeef> They call it braindamage↵(@Phil)
21:14:48FromDiscord<dom96> In reply to @huantian "Twitch build a programming": maybe there were two, the one I recall wasn't on Twitch lol
21:15:02FromDiscord<dom96> but maybe it went on to get on Twitch too
21:15:04FromDiscord<Phil> In reply to @Elegantbeef "They call it braindamage": Based on what I've heard about twitch chats, everybody on there might have learned that language already!
21:15:09FromDiscord<Elegantbeef> I'd hope huan was just making aj oke
21:15:28FromDiscord<soundmodel> but I think the comparison down the line might still be useful
21:15:29FromDiscord<huantian> yeah that was just a joke
21:15:44FromDiscord<soundmodel> there's so much energy going into PLs that the cycle of picking wrong languages is taxing
21:15:57FromDiscord<Elegantbeef> Then just pick C and shun all the other language users
21:16:01FromDiscord<huantian> > They already do activities that have some relationship to computing - color-by-number pictures, following algorithms, classifying objects by type. The key is to identify how to frame those activities to make connections with computational thinking, as well as identify what bridge activities could come between existing activities and more mature activities↵I agree with them here, people know the concepts of programming, they just don'
21:16:12FromDiscord<soundmodel> In reply to @Elegantbeef "Then just pick C": actually this was my initial idea
21:16:21FromDiscord<huantian> maybe we should just have everyone beat shenzhen I/O before learning to program
21:16:29FromDiscord<Phil> In reply to @Elegantbeef "Then just pick C": Beef out here, straight up shunning assembly
21:16:31FromDiscord<soundmodel> but then I looked at "what's the best superset of C that is not C++"
21:16:33FromDiscord<soundmodel> -> Nim
21:16:33FromDiscord<Elegantbeef> But i mean every system language is reusable
21:16:53FromDiscord<dom96> In reply to @soundmodel "there's so much energy": and by the time you invest significant time into one language hundreds new ones pop up
21:16:56FromDiscord<huantian> beef you should play shenzhen io I think you'd like it
21:17:23FromDiscord<Elegantbeef> I cant even code my own projects i want to work on you want me to make ICs that are just for a game↵(@huantian)
21:17:23FromDiscord<TryAngle> In reply to @Isofruit "... why?": we actually had discussion in #internals a week ago↵it just feels foreign and ugly imo.↵but others like it so idk
21:17:30FromDiscord<soundmodel> one source said that Nim is the best "thin layer" on top of C
21:17:36FromDiscord<soundmodel> "best in theory" or something
21:17:40FromDiscord<huantian> In reply to @Elegantbeef "I cant even code": don't worry it's just asm
21:17:44FromDiscord<Elegantbeef> try is too scared of making their own unicode string for whatever reason
21:18:03FromDiscord<Elegantbeef> I mean really Nim's unicode should have two distinct variants
21:18:04FromDiscord<Phil> In reply to @TryAngle "we actually had discussion": Like, I can't say I ever paid specific attention to it, but is the unicode lib somehow painful to use?
21:18:25FromDiscord<soundmodel> I've been also wondering whether Quorum or something focuses too much on high-level things
21:18:26FromDiscord<TryAngle> not really, only in specific cases
21:18:35FromDiscord<soundmodel> i.e. that e.g. if it did realize, it would e.g. be a slow language
21:18:43FromDiscord<soundmodel> because it's meant to be used like Tcl/Tk or something
21:18:47FromDiscord<huantian> well I think that their goal is purely educational
21:18:56FromDiscord<Elegantbeef> sent a code paste, see https://play.nim-lang.org/#ix=44hV
21:19:03FromDiscord<huantian> if they wanted to be fast and good they would need to change up exactly what evidence they're looking at
21:19:28FromDiscord<Elegantbeef> Though i guess `RuneSeq` doesnt need to be distinct
21:20:03FromDiscord<TryAngle> In reply to @Elegantbeef "try is too scared": nah I agree with u, it's pretty easy in this case, but the fact u have to redo this everytime and not already built in just feels so amogus
21:20:08FromDiscord<dom96> hm, actually thinking about it, maybe a language built by votes would work better if those votes were only given to those with a stake in the language
21:20:16FromDiscord<Elegantbeef> The fuck do you mean "have to redo this everytime
21:20:21FromDiscord<Elegantbeef> Make a `unicode` module
21:20:25FromDiscord<Elegantbeef> Problem fucking solved
21:20:33FromDiscord<Elegantbeef> You can import your own code in your modules
21:20:41FromDiscord<Elegantbeef> Nim has this wild `import` statement
21:21:18FromDiscord<Elegantbeef> Like i said I think it should be apart of the stdlib unicode module
21:22:05FromDiscord<Elegantbeef> that and `proc rune(s: string): Rune = assert s.runeLen == 1; s.runeAt(0)`
21:22:21FromDiscord<Elegantbeef> This way you can do `rune"h"`
21:23:01FromDiscord<dom96> _plays the "PRs welcome" song_
21:23:08FromDiscord<dom96> :D
21:24:13FromDiscord<!Patitotective> In reply to @dom96 "_plays the "PRs welcome"": lol
21:24:45*qwr currently uses nim as a better way to write complicated shell script, occasionally tripping into FP land with mapIt etc - its pretty flexible language
21:25:19FromDiscord<Elegantbeef> Yea macros/templates make the language very sculptable
21:25:49FromDiscord<Phil> > This module provides support to handle the Unicode UTF-8 encoding.↵Wait a minute, no UTF-16? Even when UTF-8 support in browsers is terrible? Sad Iso noises
21:25:54FromDiscord<dom96> Guess I should PR IRC action support for the Discord bridge
21:26:19FromDiscord<TryAngle> sent a code paste, see https://play.nim-lang.org/#ix=44hX
21:26:47FromDiscord<TryAngle> (edit) "https://play.nim-lang.org/#ix=44hX" => "https://play.nim-lang.org/#ix=44hY"
21:26:52FromDiscord<Elegantbeef> I think it's elegant
21:27:03FromDiscord<Elegantbeef> But even if it's not we can resolve this
21:27:10FromDiscord<huantian> same I really don't like doing a bunch of `encode` and `decode` procs everywhere just to convert between all my strings
21:27:20FromDiscord<TryAngle> (edit) "https://play.nim-lang.org/#ix=44hY" => "https://play.nim-lang.org/#ix=44hZ"
21:28:30FromDiscord<dom96> try this `template 📜(x: str): Rune = rune(x)` then you should be able to elegantly write `📜"+"`
21:28:55FromDiscord<Elegantbeef> QED
21:28:56FromDiscord<huantian> just let term rewriting macros rewrite `"`s
21:28:59FromDiscord<Elegantbeef> sent a code paste, see https://play.nim-lang.org/#ix=44i0
21:29:02FromDiscord<!Patitotective> In reply to @dom96 "try this `template 📜(x:": hahah
21:29:30FromDiscord<TryAngle> In reply to @dom96 "try this `template 📜(x:": wait nim supports unicode for proc / templates 😳
21:29:38FromDiscord<dom96> for all identifiers
21:29:47FromDiscord<Elegantbeef> sent a code paste, see https://play.nim-lang.org/#ix=44i2
21:30:16FromDiscord<Elegantbeef> It's really a shame that Nim looks identical to the odin with no work
21:30:35FromDiscord<Elegantbeef> Without having string be a sequence of runes
21:30:42FromDiscord<dom96> !eval let 📜 = "You shall not pass 🧙‍♂️"; echo 📜
21:30:45NimBotYou shall not pass 🧙‍♂️
21:31:06FromDiscord<TryAngle> In reply to @Elegantbeef "Without having string be": I'm not saying strings should be that, rust or odin don't use sequenes of runes either
21:31:06FromDiscord<Yardanico> yes nim supports unicode identifiers
21:31:48FromDiscord<Elegantbeef> Tryangle my point is that what you want is possible
21:31:54FromDiscord<Elegantbeef> Without any internal changes
21:32:12FromDiscord<Elegantbeef> Nim is all about extending in userspace
21:32:27FromDiscord<dom96> Now here is a fun challenge: make emojicode work using Nim macros/templates/procs. (https://www.emojicode.org/)
21:33:25FromDiscord<TryAngle> In reply to @Elegantbeef "To really chad this": ok this converter is really cool 😳
21:33:43FromDiscord<Elegantbeef> Not to mention there is even the case statement macros so you could make your own case statement to convert strings runes at compile time without converters
21:33:57FromDiscord<dom96> Note that converters are also dangerous, be careful when using them (especially if you export them)
21:34:29FromDiscord<Elegantbeef> There are multiple methods to remove `rune"SomeUnicode"`
21:34:46FromDiscord<!Patitotective> In reply to @dom96 "Now here is a": why would someone bother making and emoji based lang lol
21:34:49FromDiscord<Elegantbeef> So i dont really see a need to make char literals work with unicode
21:35:22FromDiscord<dom96> In reply to @Patitotective "why would someone bother": It's all about that street nerd cred
21:35:37FromDiscord<Prestige> emojis were a mistake
21:35:39FromDiscord<Elegantbeef> Well given that they'd only really need the `static string` variant there really is not much danger↵(@dom96)
21:35:54FromDiscord<Elegantbeef> How else do i not break poe's law?↵(@Prestige)
21:35:57FromDiscord<!Patitotective> In reply to @Avahe "emojis were a mistake": why↵theyre awsome 🌈
21:37:38FromDiscord<Elegantbeef> Nevermind the static variant doesnt work
21:37:43FromDiscord<Elegantbeef> 10/10 dispatch
21:38:12NimEventerNew thread by Can-lehmann: Owlkettle 2.0.0 is a declarative GUI framwork for GTK 4, see https://forum.nim-lang.org/t/9302
21:38:35FromDiscord<huantian> isn't gtk 5 out already
21:39:00FromDiscord<Elegantbeef> sent a code paste, see https://play.nim-lang.org/#ix=44i4
21:39:09FromDiscord<Elegantbeef> Nah huan qt6 is
21:39:26FromDiscord<Elegantbeef> I swear i've read that forum post before
21:39:34FromDiscord<Elegantbeef> Seems like hmmm someone's readme
21:40:11FromDiscord<!Patitotective> why would someone make the documentation markdown files↵github wiki existing and nim docgen?↵https://github.com/yglukhov/nimx/tree/master/doc
21:40:18FromDiscord<!Patitotective> (edit) "why would someone make the documentation ... markdown" added "using"
21:40:37FromDiscord<Elegantbeef> You're right why wouldnt they use nimib
21:41:10FromDiscord<Yardanico> maybe because "7 years ago"
21:41:59FromDiscord<Elegantbeef> If patito could read he'd ask fewer questions
21:42:36FromDiscord<TryAngle> In reply to @Elegantbeef "If patito could read": thanks for not calling out me also 😊
21:42:40FromDiscord<!Patitotective> yes, my eyes ignore relevant information by default
21:42:47FromDiscord<Elegantbeef> It was implied↵(@TryAngle)
21:42:58FromDiscord<TryAngle> 💀
21:43:39FromDiscord<Elegantbeef> So for that pointer to glfw you used a reference right?
21:43:57FromDiscord<TryAngle> no I'm using a pointer wiht sharedAlloc0
21:44:04FromDiscord<Elegantbeef> Lol
21:44:11FromDiscord<TryAngle> I think using ref works also now that I fixed it
21:44:15FromDiscord<Elegantbeef> what a world
21:44:47FromDiscord<TryAngle> my whole issue was just at the "derefercing" side I casted the pointer to a object and not to a ptr of an object
21:45:03FromDiscord<Elegantbeef> The fun part about ref is you just cast it to your ref
21:45:20FromDiscord<TryAngle> 🤔 ↵doesn't work for glfw
21:45:42FromDiscord<TryAngle> it needs a `ptr` and gives `pointer`
21:45:56FromDiscord<Elegantbeef> sent a code paste, see https://play.nim-lang.org/#ix=44i6
21:46:07FromDiscord<TryAngle> ah I'm not using globals anymore 😎
21:46:10FromDiscord<Elegantbeef> `ref` is castable to `ptr T`
21:46:18FromDiscord<TryAngle> the changes are not pushedy et
21:46:22FromDiscord<Elegantbeef> `data =` isnt a global you nimskull
21:46:40FromDiscord<Elegantbeef> It's whatever the api uses
21:47:47FromDiscord<Elegantbeef> Whoops i said a word that hax follows
21:47:53FromDiscord<Elegantbeef> Sorry for summoning you
21:48:53FromDiscord<TryAngle> wait I push code in probably next 5 min and then link u to the lines,↵but I agree I will once I"m done adding all the events try redoing this part with refs, as I said before I think I only messed up at the recieving end and refs would have worked just as well
21:49:33FromDiscord<TryAngle> Ij ust fixed this end when I was using pointers + sharedAlloc0 already so I didn't redo it
21:54:28*rockcavera joined #nim
21:54:28*rockcavera quit (Changing host)
21:54:28*rockcavera joined #nim
21:57:52FromDiscord<dom96> guess I shouldn't say nimskull 3 times in front of a mirror eh
21:58:31FromDiscord<!Patitotective> is this their icon:nim1:💀? it shuld
21:58:39FromDiscord<!Patitotective> (edit) "shuld" => "should"
21:59:00FromDiscord<!Patitotective> better↵:nim1: ↵💀
22:02:58reversem3[m]I'm not seeing an asymmetric encryption library, has anyone programmed with nim for RSA / ECC/ DES ?
22:03:03FromDiscord<jan0809> lol true
22:03:29FromDiscord<jan0809> meant the nimskull icon
22:06:43FromDiscord<jan0809> In reply to @reversem3 "I'm not seeing an": could that post help?↵https://forum.nim-lang.org/t/6547
22:08:32FromDiscord<TryAngle> sent a long message, see http://ix.io/44ia
22:08:47*jmdaemon joined #nim
22:19:47FromDiscord<TryAngle> @ElegantBeef ok just changed it to ref and it works ;3
22:20:06FromDiscord<TryAngle> and I didn't need any GCref()
22:35:40FromDiscord<Yardanico> you need GC_ref though, it just works for some time because refc is deferred RC
22:35:48FromDiscord<Yardanico> or maybe you're keeping your reference alive somewhere else
22:36:37FromDiscord<Elegantbeef> You want to gcref it to ensure it doesnt get allocated over and your program state is corrupted
23:30:22FromDiscord<TryAngle> In reply to @Yardanico "you need GC_ref though,": hm I'm using this data until the program ends
23:31:03FromDiscord<TryAngle> eventloop has a ref to this and the liftetime of eventloop is literally until the program ends
23:31:20FromDiscord<TryAngle> (edit) removed "has a ref to this"
23:31:29FromDiscord<Elegantbeef> Well then you're fine
23:32:08FromDiscord<Elegantbeef> I do have to ask what's the benefit of this over windy?
23:32:15FromDiscord<TryAngle> what is windy?
23:32:24FromDiscord<Elegantbeef> https://github.com/treeform/windy
23:32:33FromDiscord<Elegantbeef> Treeform's windowing library that's crossplatform
23:33:28FromDiscord<TryAngle> ah I wanted to support multiple window handling
23:34:12FromDiscord<TryAngle> and the library is talking a lot about opengl, i'm not sure if it's only for that, but I want to mainly focus on vulkan
23:35:17FromDiscord<TryAngle> (edit) "vulkan" => "vulkan↵ah ye it hard depends on opengl https://github.com/treeform/windy/blob/bba338590dbf30fc3418f5b749b9689a80a1df04/windy.nimble#L9"
23:36:17FromDiscord<TryAngle> and I liked winit's architecture a lot
23:40:36FromDiscord<Elegantbeef> I mean yes it currently uses opengl as the default, but you could fork it to support vulkan and other graphics API 😄