<< 18-03-2022 >>

00:00:30FromDiscord<mattrb> In reply to @Elegantbeef "Yea <@221832495367323648> https://wandbox.org": I was mostly saying I couldn't see the code you shared on play.nim-lang.org :p
00:00:52FromDiscord<Elegantbeef> Ah just replace it with ix.io
00:01:08FromDiscord<Elegantbeef> http://ix.io/3SHT
00:10:53*pch quit (Remote host closed the connection)
00:14:53*pch joined #nim
00:29:44*ltriant_ joined #nim
00:30:37*ltriant quit (Ping timeout: 240 seconds)
00:32:01*arkanoid quit (Ping timeout: 256 seconds)
00:45:45FromDiscord<Girvo> Is a returned seq[byte] from a proc by copy? or is it by ref as its managed? Dumb question I know
00:48:55pchseq is refferential
00:49:00pchopenarray is copied
00:49:01pchiirc
00:50:30pchhowever seqs are also like, they're a reference to a copy usually
00:50:40pchit's just the direct storage in the seq is not the copy
00:50:40FromDiscord<abdu> sent a code paste, see https://play.nim-lang.org/#ix=3SIh
00:52:30FromDiscord<Girvo> Awesome
00:52:39FromDiscord<Girvo> Thats what I was expecting, cheers 🙂
00:55:08FromDiscord<Girvo> I'm having to pass around a lot of `seq[byte]` for the work I'm doing. Good fun, but nice to work with honestly
00:56:45FromDiscord<Elegantbeef> what do you mean?↵(@abdu)
00:57:33FromDiscord<Elegantbeef> sent a code paste, see https://play.nim-lang.org/#ix=3SIk
01:06:08FromDiscord<abdu> sent a code paste, see https://paste.rs/rw9
01:08:34FromDiscord<Elegantbeef> sent a code paste, see https://play.nim-lang.org/#ix=3SIm
01:18:16FromDiscord<abdu> Works great.. so what insight on quote do, should `var l = newLit 6` be better put inside it or just that ?
01:18:55FromDiscord<Elegantbeef> sent a code paste, see https://play.nim-lang.org/#ix=3SIq
01:18:58FromDiscord<abdu> Thanks for useful contribution
01:19:06FromDiscord<Elegantbeef> In this case there is 0 reason to use a macro
01:19:48FromDiscord<Elegantbeef> sent a code paste, see https://play.nim-lang.org/#ix=3SIr
01:21:42FromDiscord<Girvo> Whats the current workflow for working on Nim itself, say if I wanted to try and fix `createThread` etc. for FreeRTOS on the ESP32?
01:22:23FromDiscord<Elegantbeef> Fork the git repo, follow the build instructions, modify the file, make a PR, profit
01:22:48FromDiscord<Elegantbeef> https://nim-lang.github.io/Nim/contributing.html is useful aswell
01:27:16*kayabaNerve joined #nim
01:31:21FromDiscord<Elegantbeef> Oh also @Girvo `openArray`s are slices so even if they're copied they're just a pointer and len so it's cheap
01:32:02FromDiscord<Elegantbeef> You generally want to use them instead of index slicing if you care about memory usage
01:33:36FromDiscord<Elegantbeef> sent a code paste, see https://play.nim-lang.org/#ix=3SIC
01:36:21FromDiscord<Girvo> Ohhhhhhh neat
01:36:42FromDiscord<Girvo> Alright I might swap the nesper stuff to work with openarray instead. I think it'll be superior for what I'm after, I'll have a play though
01:36:54FromDiscord<Girvo> Cheers! (now drink)
01:37:14FromDiscord<Elegantbeef> Drinky drinky is bad for the health
01:37:55FromDiscord<Girvo> Like _incredibly_ bad lol. I've never understood the "Ballmer Peak" stuff, alcohol makes programming way too difficult for me
01:38:26FromDiscord<Elegantbeef> I've never drank so no clue for me, i do know that alcohol can be a stimulant though
01:39:02FromDiscord<Girvo> Not missing much. I'm stoked that the no-alcohol gins are easily available where I am now. All the taste, none of the downside
01:40:26FromDiscord<Elegantbeef> I'm like the completely wrong person for this area, rural Canada yet I dont drink or do drugs
01:40:53FromDiscord<Girvo> Haha yeah
01:41:01FromDiscord<creikey> https://github.com/treeform/windy/blob/master/src/windy.nim#L10 windy exports vmath here, can I `import windy` but just the exported vmath as I don't want the whole library imported?
01:42:26FromDiscord<Girvo> `vmath` appears to be a separate library, no?
01:43:29FromDiscord<Girvo> Though its not in the nimble requirements list. Likely a sub-req of one of its dependencies?
01:43:47FromDiscord<creikey> In reply to @Girvo "Though its not in": it is yes
01:43:56FromDiscord<creikey> it's a requirement of `windy` and exported from it
01:44:05FromDiscord<creikey> I guess I could just do `requries vmath`
01:44:09FromDiscord<creikey> and import vmath
01:44:12FromDiscord<creikey> and it doesn't install it twice
01:44:14FromDiscord<Girvo> Yeah thats what I'd do if thats what you're after
01:44:52FromDiscord<Girvo> As long as the version requirement matches, it will use the same one
01:45:08FromDiscord<creikey> just checked and it didn't even have a requires vmath in the nimble file so I opened an issue
01:46:30FromDiscord<Girvo> Yeah thats what threw me off
01:46:42FromDiscord<Girvo> And I can't see it in the other requires so far
01:47:28FromDiscord<Girvo> Can you see `vmath` in your `.nimble/pkgs` folder after installing `windy`?
01:53:55FromDiscord<Elegantbeef> Seems it's a forgetten dependancy
01:54:26FromDiscord<Girvo> Yeah, most likely because its by the same author so they've `nimble develop`-ed it
01:54:47FromDiscord<Girvo> I made the same mistake with `nesper` initially lol
01:58:31FromDiscord<Elegantbeef> Yea i've done similar
02:01:43FromDiscord<creikey> I feel like that should be linted for
02:47:57NimEventerNew thread by Mardiyah: The 'for i in ...' loop inside parsing macro , see https://forum.nim-lang.org/t/9020
03:32:29FromDiscord<Kiwids> hi guys. I am coding a small webapp that connected to the backend SQLite DB and using jester to get the request from client. But it seems like somewhere in the thread that is blocking( i have to press `Enter` in console to make the data parse thru). I tried to make all function async, but seems like its still unstable sometimes. I wonder if theres a way for me to find out where exactly the blockage is at
03:34:07FromDiscord<Kiwids> https://media.discordapp.net/attachments/371759389889003532/954221135459921950/unknown.png
03:34:23FromDiscord<Kiwids> this is the API that I was testing and getting stuck...
03:42:30FromDiscord<Kiwids> reduced the code to, still getting a block https://media.discordapp.net/attachments/371759389889003532/954223241986191370/unknown.png
03:43:39FromDiscord<Kiwids> 🤔 could it be the decode
03:45:48FromDiscord<Kiwids> nope...
03:46:35FromDiscord<Kiwids> literaly this gets blocked. might be a console app issue on windows? im sorry guys i am so noob at this... https://media.discordapp.net/attachments/371759389889003532/954224272392478720/unknown.png
03:48:09nrds<Prestige99> You think the echo is blocking execution?
03:49:16FromDiscord<Kiwids> oh lord
03:49:26FromDiscord<Kiwids> 😢
03:50:54FromDiscord<Kiwids> I needa a way to see if the request is actually coming in tho.. 🤔
03:51:24nrds<Prestige99> echo should work fine afaik
03:52:26FromDiscord<Kiwids> hmmm that's so weird... I have two bots just sending get request and it gets blocked. but maybe let me try something to see if its the echo
03:53:01FromDiscord<Kiwids> if its blocked without echoing. I should be able to see it if I send the 3rd request on top of my 2 bots, the server should hang
03:53:58FromDiscord<Kiwids> nope.. it still blocking.
03:57:59FromDiscord<Elegantbeef> Do you have a `readline` somewhere?
03:58:20FromDiscord<Kiwids> yes
03:58:34FromDiscord<Kiwids> everytime when program starts. it asks me if I want to reinitiate the DB
03:58:37FromDiscord<Elegantbeef> Well there is you blocking
03:58:38FromDiscord<Kiwids> you think that's the problem?
03:58:53FromDiscord<Elegantbeef> If it's not in the loop, no
03:59:04FromDiscord<Kiwids> its not
03:59:10FromDiscord<Elegantbeef> But you're describing a `readLine` inside your programs loop
03:59:20FromDiscord<Elegantbeef> Needing to hit enter sounds exactly like a readline in the loop
03:59:26FromDiscord<Kiwids> https://media.discordapp.net/attachments/371759389889003532/954227505680777226/unknown.png
03:59:34FromDiscord<Kiwids> this function I create calls a readLine()
04:00:06FromDiscord<Elegantbeef> Can i see the entire program?
04:00:07FromDiscord<Kiwids> In reply to @Elegantbeef "Needing to hit enter": yeah i know haha. sometimes I need to press `Enter` after 5 get request. sometimes is 2
04:00:31FromDiscord<Kiwids> I am so sorry can't really share the source code.
04:00:37FromDiscord<Kiwids> (edit) "I am so sorry can't really share the ... source" added "full"
04:01:08FromDiscord<Elegantbeef> Cant say much then aside from make sure your stdinIO isnt done in the main loope
04:02:32FromDiscord<Kiwids> yeah! my code looks just like this one https://github.com/dom96/nim-in-action-code/tree/master/Chapter7/Tweeter
04:02:41FromDiscord<Kiwids> as I was reading the book and want to start a small project
04:04:23FromDiscord<Kiwids> https://media.discordapp.net/attachments/371759389889003532/954228751619727390/unknown.png
04:04:46FromDiscord<Elegantbeef> `nim -v`?
04:05:35FromDiscord<Kiwids> https://media.discordapp.net/attachments/371759389889003532/954229055102783578/unknown.png
04:06:04FromDiscord<Kiwids> `nim c --gc:boehm --threads:on -d:windows --app:console -o:Server.exe `
04:06:08FromDiscord<Kiwids> and this is my compiler falg
04:06:12FromDiscord<Kiwids> (edit) "falg" => "flag"
04:06:21FromDiscord<Elegantbeef> What does `renderMain`, `renderTimeline` and `renderLogin` do?
04:06:43FromDiscord<Kiwids> it copies the sql data and put them into a hardcoded html page
04:06:53FromDiscord<Kiwids> and just feed it back to the client iirc
04:07:19FromDiscord<Elegantbeef> So there is 100% no stdin io there in your case?
04:08:19FromDiscord<Kiwids> ` let ok = readLineFromStdin("Previous database file found, do you want to start fresh? [Y/N] ", line)` in createDatbase() I have one. but that's it
04:09:12FromDiscord<Kiwids> and if the previous database file is not there. it won't even promot for user input, I wrapped the readLine under a fileExist()
04:09:17FromDiscord<Kiwids> (edit) "readLine" => "`readLine`" | "fileExist()" => "`fileExist()`"
04:09:50FromDiscord<Elegantbeef> If thats the case this shouldnt be happening
04:09:56FromDiscord<Elegantbeef> But without code i cant say anything
04:10:10FromDiscord<Kiwids> sure thanks! i am also very confused hah
04:10:31FromDiscord<Kiwids> I tried spawn new threads to handle some db tasks. but still no luck
04:10:39FromDiscord<Kiwids> (edit) "tasks." => "tasks(previous async)."
04:10:44FromDiscord<Elegantbeef> Well it will never fix the actual problem
04:10:51FromDiscord<Kiwids> yep
04:11:50*slowButPresent quit (Quit: leaving)
04:12:45FromDiscord<Kiwids> like if I press `Enter`, the server will be working fine for a solid minute https://media.discordapp.net/attachments/371759389889003532/954230855352606741/unknown.png
04:13:07FromDiscord<Kiwids> but it will eventually get block, where no debug info is displayed until the next `Enter`
04:19:05FromDiscord<Elegantbeef> I can suggest going to the nearest well and throw a penny and wish for a solution
04:19:17FromDiscord<Kiwids> sounds like a plan!
04:24:19FromDiscord<Kiwids> `customOverlapped.data.fd == lpCompletionKey.AsyncFD` [AssertionDefect]
04:24:26FromDiscord<Kiwids> got a error and program crashed 🤔
04:24:38FromDiscord<Kiwids> could it be this? https://media.discordapp.net/attachments/371759389889003532/954233846054924308/unknown.png
04:24:55FromDiscord<Kiwids> since I reopen the db file everytime the API gets called?
04:26:05FromDiscord<Elegantbeef> You arent closing the dbconnection
04:26:13FromDiscord<Kiwids> oh fk
04:26:22FromDiscord<Kiwids> I commented some of those line out...
04:26:25FromDiscord<Elegantbeef> So if you open a new one then dont close it that could be an isssue
04:26:37FromDiscord<Kiwids> ye
04:26:54FromDiscord<Kiwids> let me try that
04:27:27FromDiscord<Kiwids> still blocked. let me try to pass as ref
04:27:33FromDiscord<Elegantbeef> Doesnt make sense that `enter` would continue
04:28:02FromDiscord<Kiwids> hmm yeah. it crashed again with db.close()
04:28:06FromDiscord<Elegantbeef> Are you 1000% certain the pressing of enter moves it and it's not just a coincidence?
04:28:20FromDiscord<Kiwids> nvm
04:28:34FromDiscord<Kiwids> In reply to @Elegantbeef "Are you 1000% certain": yeah no haha I can screenshare the flow haha
04:29:13FromDiscord<Elegantbeef> That'd mean to me atleast something is getting your stdin as a file descriptor which would be a very odd bug
04:29:35FromDiscord<Kiwids> 🤔
04:31:06FromDiscord<Bubblie> how do I convert nim code to c++ code?
04:31:27FromDiscord<Elegantbeef> You rewrite it but with 20% more brainpower
04:31:55FromDiscord<Bubblie> I mean like, since nim compiles to c/c++/js I was wondering where to get the output
04:32:10FromDiscord<Elegantbeef> Ah
04:32:14FromDiscord<Kiwids> you can
04:32:21FromDiscord<Kiwids> there is a compiler flag for it i think
04:32:26FromDiscord<Elegantbeef> it's in your `.cache/nim/` or you can do `--nimcache:someDir`
04:33:03FromDiscord<Bubblie> I wonder how neat the output would be... I just started with nim and I love it so far because let me tell you c/c++ is awful
04:33:16FromDiscord<Elegantbeef> It's not meant to be human read
04:33:22FromDiscord<Bubblie> yeah
04:33:24FromDiscord<Elegantbeef> You can do `-d:danger` to make it a bit more readable
04:33:29FromDiscord<Bubblie> I would assume so since its compiling to it
04:33:47FromDiscord<Bubblie> In reply to @Elegantbeef "You can do `-d:danger`": ah okay
04:33:49FromDiscord<Bubblie> thank you
04:34:06FromDiscord<Elegantbeef> Also can use `--gc:arc` or `orc` which will help a bit
04:34:16FromDiscord<Bubblie> I like that I can use c/c++ libraries in nim without having to use c/c++ LOL
04:34:21FromDiscord<Elegantbeef> Dont suggest danger unless you want somewhat clean IR, otherwise use `release`
04:34:35FromDiscord<Bubblie> In reply to @Elegantbeef "Dont suggest danger unless": ah okay, thank you so much
04:34:41FromDiscord<Bubblie> Ill keep that in mind
04:35:24FromDiscord<Bubblie> is there vulkan graphics bindings for nim?
04:35:31FromDiscord<Elegantbeef> Yes
04:35:39FromDiscord<Bubblie> oh wow, that's awesome
04:36:30FromDiscord<Bubblie> There is also NimGL 👀
04:36:34FromDiscord<Bubblie> sick
04:36:52FromDiscord<Elegantbeef> You're a gamedev?
04:37:51FromDiscord<Bubblie> sorta, my main language is java and I mostly make mods for minecraft and applications and I have dabbled with web dev a bit but I really disliked JS
04:38:01FromDiscord<Bubblie> I was going into vulkan to make my own engine of sorts
04:38:03FromDiscord<Bubblie> using C++
04:38:24FromDiscord<Bubblie> but uh well, it wasn't enjoyable using C++
04:38:34FromDiscord<Elegantbeef> Of course not it's C++ 😛
04:38:51FromDiscord<Bubblie> my second option is rust but I don't do well with symbol soup languages
04:38:56FromDiscord<Bubblie> then I found nim yesterday
04:39:21FromDiscord<Elegantbeef> I also use Nim for gamedev, though i also just make macros for arbitrary things for fun
04:39:35FromDiscord<Bubblie> that's awesome!
04:39:51FromDiscord<Bubblie> I hope to use nim for gamedev because of how actually readable things are
04:40:19FromDiscord<Elegantbeef> It's very good for gamedev imo since it has nice macros and a good type system
04:40:28FromDiscord<Bubblie> Nim vulkan has no issues right? Or is there something I need to look out for
04:40:35FromDiscord<Bubblie> In reply to @Elegantbeef "It's very good for": yeah I definitely love the type system here
04:40:51FromDiscord<Elegantbeef> What do you mean vulkan issues?
04:42:05FromDiscord<Elegantbeef> I dont use vulkan, so no clue how nice it is to use with Nim
04:46:58FromDiscord<Bubblie> In reply to @Elegantbeef "What do you mean": as in like, there aren't many problems with the bindings
04:47:00FromDiscord<Bubblie> is my question
04:47:10FromDiscord<Elegantbeef> It should be like using it in C
04:56:33FromDiscord<Equinox> In reply to @Bubblie "my second option is": Symbol soup
04:56:45FromDiscord<Equinox> What does that mean
04:57:01FromDiscord<Elegantbeef> `std::<vector<SomeType<int>>`
04:57:22FromDiscord<huantian> I like my <>
04:57:47FromDiscord<Equinox> In reply to @Elegantbeef "`std::<vector<SomeType<int>>`": That’s not so bad
04:58:00FromDiscord<Equinox> How else would you convey that?
04:58:05FromDiscord<Equinox> What’s the nim way
04:58:05FromDiscord<Elegantbeef> sorry it's `std::vector<std::variant<int, SomeType<int, float>`
04:58:11FromDiscord<Elegantbeef> `seq[SomeType[int]`
04:58:21FromDiscord<Elegantbeef> Perhaps closing both brackets
04:58:37FromDiscord<Equinox> Yeah but that rust is not correct
04:58:40FromDiscord<Elegantbeef> It also uses `` and `&` so it gets fucky
04:58:43FromDiscord<Equinox> You don’t need the std
04:58:50FromDiscord<Equinox> Vector is just vec
04:58:53FromDiscord<Elegantbeef> That's not rust
04:59:08FromDiscord<Equinox> Oh ok
04:59:13FromDiscord<Equinox> We’re doing C++
04:59:35FromDiscord<Equinox> I don’t write C++ I have no reason to defend it
04:59:39FromDiscord<Equinox> Too many things
05:01:57FromDiscord<Elegantbeef> Rust and C++ both have similar symbol noise imo
05:03:06FromDiscord<Equinox> The rust version of that is a bit smaller
05:03:15FromDiscord<Elegantbeef> I mean in general
05:03:33FromDiscord<Equinox> Vec<sometype<i32>>
05:04:03FromDiscord<Equinox> In reply to @Elegantbeef "I mean in general": Probably true
05:05:59FromDiscord<treeform> Crazy Nim bug causing me to pull hair out, I get a segfault in reading and writing to some UncheckedArrays, but if I add some dummy code to slow down to loop it works fine... in fact! just doing 17 inc'ers `for z in 0 ..< 17: counter += 1` works but 16 inc'ers `for z in 0 ..< 16: counter += 1` not enough slow down. What kind of crazy things is this!
05:06:30FromDiscord<Elegantbeef> Code causing the issue?
05:08:36FromDiscord<treeform> sent a code paste, see https://play.nim-lang.org/#ix=3SIV
05:08:44FromDiscord<treeform> its a simple copy loop
05:09:05FromDiscord<treeform> Can C cause undefined behavior when copying two overlapping 64 bit numbers?
05:09:10FromDiscord<Elegantbeef> It's syncronous code?
05:09:18FromDiscord<treeform> yes, no threads, no async
05:09:32FromDiscord<treeform> fine in orc and arc, but not refc or none
05:09:52FromDiscord<treeform> if uncomment the `for z in 0 ..` it works
05:10:15FromDiscord<Elegantbeef> Is `dst` or `dst2` a seq?
05:10:35FromDiscord<treeform> no its a `ptr UncheckedArray[uint8]`
05:10:47FromDiscord<Elegantbeef> And it doesnt point to a sequence?
05:11:01FromDiscord<treeform> yes
05:11:04FromDiscord<treeform> it comes from a seq
05:11:16FromDiscord<treeform> I though it was getting moved or something
05:11:20FromDiscord<Elegantbeef> `gcref` and `gcunref` the see before and after the op
05:12:01FromDiscord<treeform> I keep the seq around so it does not get collected
05:12:45FromDiscord<treeform> but I could GCref it so it stays in memory always for ever
05:14:45FromDiscord<treeform> `GC_ref(dst)` does not help
05:22:40FromDiscord<Kiwids> aight. just spend some time reading the nim-forum source code..
05:22:44FromDiscord<Elegantbeef> You do ensure the size is the same or less than right?
05:22:58FromDiscord<Kiwids> I willl try to adjust my db : dbConn to see if that's the problem
05:24:55FromDiscord<Elegantbeef> sent a code paste, see https://play.nim-lang.org/#ix=3SIX
05:25:51FromDiscord<Kiwids> also I tried to search for `runForever()` in the source code for Nim-Forum but I couldn't find an
05:25:52FromDiscord<Kiwids> (edit) "an" => "any"
05:25:55FromDiscord<Kiwids> (edit) "also I tried to search for `runForever()` in the source code for Nim-Forum but I couldn't find any ... " added "🤔"
05:26:29FromDiscord<Elegantbeef> @treeform\: does the above behave differently?
05:29:09FromDiscord<treeform> dst is not len is mod 8
05:29:29FromDiscord<treeform> we need to be able to access any index not just the uint64 steps
05:29:39FromDiscord<Elegantbeef> Well there you go if dst's len isnt mod 8 you're doing unsafe memory access
05:29:41FromDiscord<treeform> with bytes
05:29:42FromDiscord<treeform> sent a code paste, see https://paste.rs/MrG
05:30:06FromDiscord<treeform> we just want to do it faster
05:30:11FromDiscord<treeform> by going 8 bytes at a time
05:30:14FromDiscord<Elegantbeef> If you're writing 8 bytes to a seq that only has allocated 3 bytes you're going to destroy it
05:30:24FromDiscord<treeform> we make sure its long enough
05:30:39FromDiscord<Elegantbeef> You should figure out what size fits the best IE `8 -> 4 -> 2 -> 1`
05:30:51FromDiscord<treeform> the byte works
05:31:04FromDiscord<treeform> but uin16, uint32, uint64 does not
05:31:14FromDiscord<Elegantbeef> How does the above code make sure it's long enough
05:31:17FromDiscord<Elegantbeef> It's offsetting it by 8 bytes writing the 8 bytes from the right
05:31:35FromDiscord<Elegantbeef> Any remainder will be writing after the sequence
05:31:52FromDiscord<Bubblie> does nim have algebraic data types?
05:32:03FromDiscord<Elegantbeef> So if you dont use the largest size that is smaller than dest length it's going to fail
05:32:13FromDiscord<Elegantbeef> It has object variants which are manually declared tagged unions
05:32:23FromDiscord<Elegantbeef> There are also things like https://github.com/alaviss/union
05:33:01FromDiscord<Elegantbeef> In the above case you said the length is not mod 8 which means you write 8 bytes then you attempt to write 8 more and say it's 15 bytes, you have 1 byte going onto some other heap memory
05:33:35FromDiscord<Elegantbeef> Atleast given what you've explained, what you're doing is wildly unsafe
05:34:48FromDiscord<treeform> @ElegantBeef I think you helped me out! I was going to link you the file https://github.com/guzba/zippy/blob/master/src/zippy/inflate.nim#L216-L224 but turns out it has a newer version that fixes the issues that I did not see. Thanks!
05:35:16FromDiscord<treeform> The `if copyTo < 0` is strange but its a cheap way to make it work.
05:37:11FromDiscord<Elegantbeef> I mean i clearly didnt help out at all, i just made you look at it 😛
05:40:01FromDiscord<Elegantbeef> I still dont think `copy64` is actually safe, but i'm a fool
06:05:12FromDiscord<treeform> We been using copy64 in a ton of places. But maybe it some sort of unsafe behavior which works 99.999% of the time.
06:05:18FromDiscord<Bubblie> Can you have nim without garbage collection?
06:05:27FromDiscord<treeform> This is very strange for us.
06:05:30FromDiscord<Bubblie> And manually memory manage
06:05:37FromDiscord<Elegantbeef> You can but there isnt much point to
06:05:54FromDiscord<Elegantbeef> Arc/Orc give you a good memory management system and isnt a typical GC
06:06:04FromDiscord<Elegantbeef> Orc is RAII like memory management with a cycle collector
06:06:12FromDiscord<treeform> We do manually memory manage in tight loops...
06:06:20FromDiscord<treeform> (edit) "manage" => "management"
06:06:39FromDiscord<Bubblie> Is there any docs on nim’s memory management system?
06:06:49FromDiscord<Elegantbeef> I mean you wont really notice if what i think is happening is happening, since you're writing to random spots on the heap
06:06:56FromDiscord<Rika> https://nim-lang.github.io/Nim/mm.html
06:07:34FromDiscord<Elegantbeef> Since you're writing in blocks of 8 i think you're accidently ruining data after the sequence, though i'm not 100% certain
06:08:06FromDiscord<Elegantbeef> Like the `<=` 16 here is very very suspect to me https://github.com/guzba/zippy/blob/master/src/zippy/inflate.nim#L204-L206
06:08:45FromDiscord<Elegantbeef> I know it's min size is 16 based off line 200, but i dont see anything smaller than 8 bytes being written
06:09:13FromDiscord<Bubblie> I was just wondering how memory management would play out in nim if I needed it, like if I wanted to run nim in something relatively old and I couldn’t use a gc in it
06:09:16FromDiscord<Elegantbeef> So like what happens if your source is not divisible by 8
06:09:51FromDiscord<Elegantbeef> You'd use it like c with `alloc` and `dealloc` but Nim's `arc` is RAIII like so is generally very low overhead
06:09:52FromDiscord<treeform> In reply to @Elegantbeef "Since you're writing in": I am pretty sure we don't write beyond the allocated memory. We have asserted that to death.
06:10:05FromDiscord<Rika> In reply to @Bubblie "I was just wondering": As many people have already told you ARC isn’t a “GC” exactly
06:10:34FromDiscord<Elegantbeef> I've used arc on the rpi pico, it's quite easy and lovely to use
06:11:02FromDiscord<Elegantbeef> It's a deterministic memory mangement system that cannot handle cycles so pretty ideal for embedded
06:12:00FromDiscord<treeform> I also like arc for games and such
06:12:26FromDiscord<Elegantbeef> I'd say use orc by default, if you dont need it it's not going to cost you anything
06:12:27FromDiscord<treeform> I wish I could run my stuff with orc enable that only tells me when it finds cycles I forgot about, and then release with arc.
06:13:11FromDiscord<Bubblie> In reply to @Rika "As many people have": Yeah
06:13:15FromDiscord<Elegantbeef> Probably could add a `--nimDebugOrc` which echos some info for cycles
06:13:28FromDiscord<Elegantbeef> Dont know how hard that'd be to add to the compiler
06:13:32FromDiscord<Bubblie> So ORC is more manual than ARC right?
06:13:35FromDiscord<Elegantbeef> I've not touched memory related stuff
06:13:36FromDiscord<Elegantbeef> No
06:13:49FromDiscord<Elegantbeef> Arc is RAII, so it doesnt have a cycle collector
06:13:53FromDiscord<Bubblie> OH
06:13:55FromDiscord<Elegantbeef> Orc is Arc + Cycle collector
06:13:56FromDiscord<Bubblie> Alright
06:14:02FromDiscord<Bubblie> yeah got it
06:14:35FromDiscord<Elegantbeef> So arc will insert RC destroy calls into your program and your entire GC will be a static placement of decrements and calls to destroy
06:14:43FromDiscord<Elegantbeef> So with arc you know where things are going to be destructed
06:15:14FromDiscord<Bubblie> Thats really cool
06:15:16FromDiscord<Elegantbeef> Worth noting that the GCs only effect `ref`, `seq` and `string`
06:15:30FromDiscord<Bubblie> This language is great oml
06:15:57FromDiscord<Elegantbeef> `ptr` is always manually managed which can point to the GC'd stuff if you know it's safe(It's a system programming language afterall, need unsafe features)
06:16:25FromDiscord<Elegantbeef> You havent even experienced the best part, introspective macros which allow you to abstract low level code to a high level api 😛
06:16:52FromDiscord<Rika> Beef here tends to go overkill on those though so practice moderation
06:17:01FromDiscord<Elegantbeef> What's moderation?
06:17:11FromDiscord<Elegantbeef> Everything is a nail and i have a macro hammer
06:19:42FromDiscord<Elegantbeef> To be fair rika my largest Nim package requires macros heavily, so.... uhhh it'd be a disservice if i wasnt proficient in macros!
06:22:10FromDiscord<Bubblie> Lol
06:27:49FromDiscord<Rika> thats not my point
06:27:56FromDiscord<Rika> its fine do be proficient but you're trigger happy
06:28:22FromDiscord<Elegantbeef> Did someone say macro
06:29:41FromDiscord<Elegantbeef> Jokes aside, i do try to use the least complex tool
06:30:11FromDiscord<Bubblie> Im gonna try nim-vulkan tommorow
06:30:26FromDiscord<Elegantbeef> Have fun writing 10000 loc for a single triangle
06:30:33FromDiscord<Bubblie> Try to render a triangle without having to type 10000 lines
06:30:41FromDiscord<Bubblie> LMAO
06:30:52FromDiscord<Bubblie> We said the same thing kinda
06:31:03FromDiscord<Bubblie> Yeah to render a triangle it takes a literal bible
06:31:06FromDiscord<Elegantbeef> https://github.com/beef331/truss3d/blob/master/src/truss3D.nim#L99-L131 cube is easy 😛
06:31:27FromDiscord<Elegantbeef> Yea my opengl/sdl2/assimp abstraction is like 1k loc so far i think
06:31:43FromDiscord<Bubblie> Vulkan java vulkan rust vulkan C++ arent all that better in verbosity
06:31:47FromDiscord<Bubblie> So like
06:32:20FromDiscord<Elegantbeef> Vulkan is just verbose, so it's just going to be getting that to a point you can happily use it
06:32:33FromDiscord<Elegantbeef> Personally i can barely stand the opengl API so i dont know how people write vulkan
06:33:09FromDiscord<Bubblie> Well, I hate OpenGL because of opengl’s state machine
06:33:11FromDiscord<Bubblie> It drives me mad
06:33:26FromDiscord<Bubblie> The reason people use vulkan is to avoid gl’s state
06:33:46FromDiscord<Bubblie> Because oh my god, I had to deal with opengl state before for one of my projects
06:33:48FromDiscord<Bubblie> Horrible
06:34:26FromDiscord<Elegantbeef> My present API is more like raylib so it's hardly an issue
06:39:14*def- quit (*.net *.split)
06:39:14*ssiyad quit (*.net *.split)
06:39:14*tinystoat quit (*.net *.split)
06:44:34*def- joined #nim
06:44:34*ssiyad joined #nim
06:44:34*tinystoat joined #nim
06:44:58*ssiyad quit (Max SendQ exceeded)
06:45:05*ssiyad joined #nim
07:04:01NimEventerNew post on r/nim by thindil: Binding Nim to C++ std::list ❚ A Scripter's Notes, see https://reddit.com/r/nim/comments/tgvhjy/binding_nim_to_c_stdlist_a_scripters_notes/
07:19:48*arkurious joined #nim
07:27:06*vicecea quit (Remote host closed the connection)
07:27:36*vicecea joined #nim
07:42:28FromDiscord<Schelz> Anyone know how to bind to nim a cpp interface M
07:42:35FromDiscord<Schelz> (edit) "M" => "?"
08:18:44*PMunch joined #nim
08:36:22*jjido joined #nim
09:05:51PMunchHmm, why is httpclient.Response.status a string and not a HttpCode?
09:07:14FromDiscord<Elegantbeef> It perhaps carries the extended message like "- page not found"?
09:07:45FromDiscord<Rika> https://nim-lang.org/docs/httpclient.html#code
09:20:40FromDiscord<abdu> How do we pre-allocate a string to avoid reallocation expense ?
09:20:59FromDiscord<Elegantbeef> `newStringOfCap`
09:29:15*jjido quit (Quit: My MacBook Air has gone to sleep. ZZZzzz…)
10:18:35*lumo_e joined #nim
10:20:02*PMunch quit (Quit: Leaving)
10:30:29FromDiscord<abdu> How NIm's syntax a=b=c=5 , just like of it in C ?
10:40:13Amun-Raa=5; b=5; etc.
10:43:12FromDiscord<Generic> Nim does not have a multiple assignment syntax like this
10:43:21FromDiscord<abdu> real RHS is about 30 characters
10:43:32FromDiscord<Generic> in Nim assignments are statements and not expressions
10:46:14Amun-Raabdu: this is a call for refactoring
10:47:10FromDiscord<mratsim> In reply to @abdu "How NIm's syntax a=b=c=5": If you want you can create a template `:=` that assigns and return the assignment.
10:48:24FromDiscord<mratsim> sent a code paste, see https://play.nim-lang.org/#ix=3SJP
10:52:07*Lord_Nightmare quit (Quit: ZNC - http://znc.in)
10:53:10FromDiscord<Generic> doesn't this need a discard or a discardable somewhere?
10:53:43FromDiscord<Rika> Yes I assume so
10:56:11*Lord_Nightmare joined #nim
11:05:04*NeoCron joined #nim
11:17:55FromDiscord<exelotl> (please don't actually do this though) 😅
11:20:58FromDiscord<Rika> Well it’s your choice and you should know the downsides or consequences of using such pattern
11:23:22FromDiscord<0ffh> sent a code paste, see https://play.nim-lang.org/#ix=3SJW
11:24:51FromDiscord<0ffh> sent a code paste, see https://paste.rs/HiJ
12:06:11FromDiscord<Daan B> image.png https://media.discordapp.net/attachments/371759389889003532/954350002174582804/image.png
12:06:27FromDiscord<Daan B> image.png https://media.discordapp.net/attachments/371759389889003532/954350064321568818/image.png
12:07:29FromDiscord<Rika> Tried running under valgrind with malloc?
12:31:44FromDiscord<Forest> 👀 https://github.com/jjv360/nim-classes
12:33:37FromDiscord<Forest> Any reasons why this shouldn't be used?
12:34:48FromDiscord<Forest> Or does anyone know of a more complete implementation
12:34:55FromDiscord<Forest> Yes i haven't given up on classes in Nim
12:36:56FromDiscord<auxym> I don't see anything any reason not to use that style, other than the usual caveats of OOP
12:37:23FromDiscord<auxym> summed up here: https://boxbase.org/entries/2020/aug/3/case-against-oop/
12:37:39FromDiscord<Daan Breur> In reply to @Rika "Tried running under valgrind": Nope. What's that?
12:38:28Amun-RaForest: method is one of the reasons
12:42:42FromDiscord<Forest> In reply to @auxym "summed up here: https://boxbase.org/entries/2020/au": Hm, doesn't seem like anything that limits me in Python
12:42:46FromDiscord<Forest> In reply to @Amun-Ra "<@909883978717204561>: method is one": Wdym?
12:53:57FromDiscord<auxym> deep, opaque class hierarchies and lots of hidden mutable state are things that OOP tend to migrate towards, but I can guess can be avoided if you are careful
12:55:56FromDiscord<auxym> methods use dynamic dispatch, which is a slight performance disadvantage but can also make it harder to reason about which overload will be called
13:01:11FromDiscord<DevNugget> how do I delete the last value from a sequence?↵using ^1 or -1 gives an error
13:07:49FromDiscord<konsumlamm> https://nim-lang.github.io/Nim/system.html#pop%2Cseq%5BT%5D
13:26:28*slowButPresent joined #nim
13:39:49*jjido joined #nim
13:50:30FromDiscord<mratsim> In reply to @Forest "Or does anyone know": https://github.com/yglukhov/iface
13:51:06FromDiscord<Forest> In reply to @auxym "methods use dynamic dispatch,": Ah fair
13:51:12FromDiscord<Forest> In reply to @mratsim "https://github.com/yglukhov/iface": Thanks!
14:15:49NimEventerNew thread by Markus_gritsch: NewSeq() named inconsistently?, see https://forum.nim-lang.org/t/9021
14:24:58*jjido quit (Quit: My MacBook Air has gone to sleep. ZZZzzz…)
14:25:59*robertmeta quit (Ping timeout: 250 seconds)
14:27:36*robertmeta joined #nim
14:27:40*jjido joined #nim
14:28:57*Gustavo6046 quit (Quit: I'm a quit message virus. Please replace your old line with this line and help me take over the world. <screw you aloo_shu my old line was better and more creative!>)
15:10:01*jjido quit (Quit: My MacBook Air has gone to sleep. ZZZzzz…)
15:23:18FromDiscord<DevNugget> how can I insert a value into the second last position of a sequence?
15:26:17FromDiscord<Tanguy> sent a code paste, see https://play.nim-lang.org/#ix=3SKZ
15:27:09FromDiscord<Tanguy> (edit) "https://play.nim-lang.org/#ix=3SKZ" => "https://play.nim-lang.org/#ix=3SL1"
15:27:26NimEventerNew Nimble package! ftd2xx - Nim wrapper for FTDI ftd2xx library, see https://github.com/leeooox/ftd2xx
15:27:33FromDiscord<Tanguy> (edit) "https://play.nim-lang.org/#ix=3SL1" => "https://play.nim-lang.org/#ix=3SL3"
15:38:41FromDiscord<Eshoe> I think I'm too used to dynamic languages. Just the sheer need to convert types. Say an int seq to a string seq is tripping me up.
15:39:35FromDiscord<Tanguy> sent a code paste, see https://play.nim-lang.org/#ix=3SL6
15:40:20FromDiscord<Eshoe> 😯 awesome
15:42:10FromDiscord<Eshoe> Is there a documentation style that's I want to do X, here are the functions you might want to use? Or is the only option right now is to go through libraries until you find something nice?
15:43:50FromDiscord<demotomohiro> https://nim-lang.org/docs/lib.html↵https://internet-of-tomohiro.netlify.app/nim/faq.en.html
15:44:54FromDiscord<demotomohiro> If you want to searcch for libraries: https://internet-of-tomohiro.netlify.app/nim/faq.en.html#libraries-is-there-list-of-libraries-or-packages-for-nimqmark
15:45:38FromDiscord<Eshoe> The FAQ looks interesting, thanks!
15:49:58FromDiscord<Require Support> is there a better way to include a header file other than `{.emit: """#include "../some_header.h"""".}`
15:53:38FromDiscord<demotomohiro> Header pragma: https://nim-lang.org/docs/manual.html#implementation-specific-pragmas-header-pragma
16:17:21FromDiscord<Shinyzenith> How do I specify that a function parameter should be a pointer
16:17:37FromDiscord<Rika> Pointer to what
16:17:44FromDiscord<Rika> Void pointer? Typed pointer?
16:17:52FromDiscord<Rika> Do you really want a pointer?
16:17:58FromDiscord<Shinyzenith> In reply to @Rika "Do you really want": I do
16:18:00FromDiscord<Shinyzenith> sent a code paste, see https://play.nim-lang.org/#ix=3SLj
16:18:06FromDiscord<Shinyzenith> wayland callbacks depend heavily on pointers
16:18:10FromDiscord<Rika> Void pointer is ‘pointer’
16:18:15FromDiscord<Shinyzenith> oke
16:18:51FromDiscord<Shinyzenith> not sure what I'm doing wrong but I think it wants me to give the function a type too↵I'm not sure if that's even possible https://media.discordapp.net/attachments/371759389889003532/954413582987186176/unknown.png
16:18:57FromDiscord<Shinyzenith> this is after I changed it to just `pointer` ^
16:20:28FromDiscord<Rika> Add a cdecl pragma
16:20:33FromDiscord<Shinyzenith> I did
16:20:44FromDiscord<Shinyzenith> https://media.discordapp.net/attachments/371759389889003532/954414057165828198/unknown.png
16:20:52FromDiscord<Shinyzenith> dk how to remove gcsafe
16:20:57FromDiscord<Shinyzenith> or locks:0
16:21:13Amun-Rayou lack a ptr in 1st argument
16:21:58FromDiscord<Shinyzenith> Oh yes
16:22:38FromDiscord<Shinyzenith> should I just change it to listener: pointer <mytype> ? https://media.discordapp.net/attachments/371759389889003532/954414537614975046/unknown.png
16:22:48FromDiscord<Rika> No
16:22:51Amun-Rapass 1st argument via ddr
16:22:54Amun-Raaddr*
16:22:54FromDiscord<Rika> “ptr” for typed
16:23:06FromDiscord<Rika> So ‘ptr type’
16:23:15FromDiscord<Shinyzenith> ok
16:23:38FromDiscord<Shinyzenith> yep ptr worked
16:23:45FromDiscord<Shinyzenith> addr asked me to change it to unsafeAddr
16:23:54FromDiscord<Shinyzenith> and that complained about a possible null pointer
16:37:01*lumo_e quit (Ping timeout: 240 seconds)
16:59:49Amun-RaShinyzenith: either use unsafeAddr or make that thing 'var'
17:01:20FromDiscord<Shinyzenith> ptr works fine :D
18:17:52*jjido joined #nim
18:55:05*jjido quit (Quit: My MacBook Air has gone to sleep. ZZZzzz…)
19:22:11*pro joined #nim
19:26:01FromDiscord<guzba> In reply to @Elegantbeef "I know it's min": there is no check for that, it is all set up to work even if you only actually want eg 12 of the 16 bytes written
19:50:34*pch quit (Read error: Connection reset by peer)
20:07:48FromDiscord<Eshoe> sent a code paste, see https://play.nim-lang.org/#ix=3SMF
20:23:11FromDiscord<Bubblie> Nim has pointers
20:23:13FromDiscord<Bubblie> Right
20:24:47FromDiscord<Bubblie> Since pointers are technically memory management, they cannot be gc’d right?
20:31:41FromDiscord<Generic> In reply to @Eshoe "I'm so confused. Trying": the issue is `arr: array[`len`, int])`
20:31:52FromDiscord<Generic> (edit) "In reply to @Eshoe "I'm so confused. Trying": the issue is `arr: array[`len`, int])`" => "sent a code paste, see https://play.nim-lang.org/#ix=3SMP"
20:32:03FromDiscord<Generic> if you just want to zero initialise the array, leave it away entirely
20:32:45FromDiscord<Generic> otherwise use an array initialiser, i.e. [as, many, values, as, the, array, is, long]
20:33:46FromDiscord<Generic> In reply to @Bubblie "Since pointers are technically": yes, though they can be wrapped in objects with destructors so they can be used like smart pointers in C++
20:35:14FromDiscord<Generic> In reply to @Eshoe "I'm so confused. Trying": also unless you plan on doing some other things in that macro, using a macro for that is a bit of an overkill
20:38:54FromDiscord<auxym> In reply to @Bubblie "Since pointers are technically": this might be relevant: https://forum.nim-lang.org/t/9006
20:45:40FromDiscord<Eshoe> sent a code paste, see https://play.nim-lang.org/#ix=3SMU
20:56:17FromDiscord<Bubblie> In reply to @auxym "this might be relevant:": thanks!
20:56:42FromDiscord<Bubblie> I am dealing with something that requires pointers so using nim pointers would help
20:57:15FromDiscord<Bubblie> or in this case
20:57:38FromDiscord<Bubblie> wrapped in objects
20:58:42FromDiscord<Bubblie> can nim be used with rust?
20:58:59*dtomato quit (Read error: Connection reset by peer)
20:59:10*dtomato joined #nim
21:03:07*pch joined #nim
21:07:42FromDiscord<Bubblie> https://github.com/yglukhov/jnim
21:07:49FromDiscord<Bubblie> this is awesome
21:07:56FromDiscord<Bubblie> java and nim 👀
21:10:16*kenran joined #nim
21:15:46FromDiscord<Daan Breur> Java 👀
21:16:40FromDiscord<Generic> Java 😱
21:22:44*def- quit (Quit: -)
21:22:56*def- joined #nim
21:31:57FromDiscord<Bubblie> Java is the main language I use so
21:32:04FromDiscord<Bubblie> this offers some possibilities 😈
21:42:15*wyrd quit (Ping timeout: 240 seconds)
21:42:18FromDiscord<treeform> In reply to @Bubblie "Java is the main": My condolences
21:44:35*wyrd joined #nim
21:46:17FromDiscord<m4ul3r> Does nim's base64 module only support utf8?
21:47:00FromDiscord<Bubblie> In reply to @treeform "My condolences": LMAO
21:48:49FromDiscord<Bubblie> is nim and rust a thing?
21:48:54FromDiscord<Bubblie> Can I use rust and nim together somehow
21:50:58FromDiscord<TennisBowling> sent a code paste, see https://play.nim-lang.org/#ix=3SNc
21:52:40FromDiscord<Elegantbeef> @TennisBowling\: you're using `await` in a non async proc
21:52:50FromDiscord<Elegantbeef> https://play.nim-lang.org/#ix=3SNd should work
21:53:09FromDiscord<TennisBowling> i-↵↵thank you
21:54:08FromDiscord<Elegantbeef> Really someone needs to PR to the async macro to ensure it's in a procedure that can await
21:55:16FromDiscord<Elegantbeef> That error occurs so much
21:56:47FromDiscord<TennisBowling> it should give a clearer message - although a stupid error on my part
21:57:01FromDiscord<Elegantbeef> Yes like i said
21:58:03FromDiscord<TennisBowling> sent a code paste, see https://paste.rs/Pru
21:58:16FromDiscord<TennisBowling> oh
21:58:19FromDiscord<TennisBowling> is r.body none then
22:02:29FromDiscord<Elegantbeef> Guess today is my "attempt to add a good error message to the `await` macro day"
22:16:01FromDiscord<DeltaPHC> In reply to @Bubblie "Can I use rust": Maybe if you go through the C ABI, which is generally how most languages interoperate these days
22:16:23FromDiscord<Bubblie> C ABI 😭
22:16:39FromDiscord<Elegantbeef> Why would you even use both
22:16:57FromDiscord<Bubblie> idk it would be cool to interop both though
22:17:07FromDiscord<DeltaPHC> Alternatively: poke around with wasm
22:17:09FromDiscord<Elegantbeef> There is a project for it though
22:17:33FromDiscord<Bubblie> Sometimes coding doesn't need to have a purpose, it can just be cursed
22:17:44FromDiscord<Elegantbeef> https://github.com/arnetheduck/nbindgen
22:17:45FromDiscord<Bubblie> In reply to @DeltaPHC "Alternatively: poke around with": 👀
22:17:55FromDiscord<Bubblie> In reply to @Elegantbeef "https://github.com/arnetheduck/nbindgen": 👁️👁️
22:18:02FromDiscord<Bubblie> I will take a look at this
22:18:08FromDiscord<Bubblie> 62 stars
22:18:09FromDiscord<Bubblie> woah
22:18:15FromDiscord<Bubblie> oh wait
22:18:19FromDiscord<Bubblie> 61 contributers
22:18:33FromDiscord<Bubblie> now 63 stars
22:19:13FromDiscord<DeltaPHC> Still goes through the C ABI. It just automates some of it for you
22:20:16FromDiscord<Bubblie> thats still great
22:22:58FromDiscord<Bubblie> also why do anti viruses hate nim exactly
22:23:52FromDiscord<Elegantbeef> Viruses are written in Nim is what some people think
22:23:58FromDiscord<Elegantbeef> So they found a pattern and it's the nim code 😜
22:26:16FromDiscord<Bubblie> damn
22:26:28FromDiscord<Bubblie> I mean, arent viruses commonly made in C and C++ to though
22:26:33FromDiscord<Bubblie> (edit) "to" => "too"
22:26:59FromDiscord<Bubblie> people really using the nim lang for evil ig
22:27:24FromDiscord<Elegantbeef> Well Nim is a high level language that's nice to write and creates small self contained binaries
22:27:54FromDiscord<Bubblie> yeah makes total sense
22:27:56FromDiscord<Bubblie> but damn
22:39:59FromDiscord<Phil> Ah, we on the topic of how Antiviruses are somewhat bs sometimes?
22:41:41FromDiscord<Phil> sent a long message, see http://ix.io/3SNr
22:42:33*kenran quit (Quit: WeeChat info:version)
22:43:03FromDiscord<Phil> I'm semi certain that the details are a bit more complicated than I laid them out here but afaik the gist is correct
22:43:59FromDiscord<Phil> In reply to @Bubblie "Java is the main": Oh hey, a fellow java drinker
22:45:27FromDiscord<Bubblie> In reply to @Isofruit "Think of it more": yeah
22:45:35FromDiscord<Bubblie> but it is definitely saddening to have nim's name tarnished like this
22:45:46FromDiscord<Bubblie> I was talking about nim in a server today
22:45:55FromDiscord<Bubblie> and one of the first things brought up about it is the anti viruses made for it
22:46:06FromDiscord<Bubblie> (edit) removed "anti" | "for it" => "with ti"
22:46:09FromDiscord<Bubblie> (edit) "ti" => "it"
22:46:21FromDiscord<Bubblie> In reply to @Isofruit "Oh hey, a fellow": YOOO you develop in java as well? Lets go
22:47:05FromDiscord<Phil> Webdev, Spring, Elasticsearch, Mysql, mongo etc.
22:48:02FromDiscord<Bubblie> I use java for backend dev, and for minecraft mods
22:48:10FromDiscord<Bubblie> Also for like
22:48:22FromDiscord<Bubblie> software dev too but
22:48:33FromDiscord<Bubblie> for game dev I kind of felt as if I shouldn't use it as much
22:48:36FromDiscord<Bubblie> especially with graphics
22:48:48FromDiscord<Bubblie> lwjgl can be a real pain
22:48:54FromDiscord<Phil> I think the java GC makes consistent framerates near impossible
22:48:58FromDiscord<Bubblie> fr
22:49:00FromDiscord<Bubblie> it does
22:49:16FromDiscord<Bubblie> don't get me wrong java has never failed me with software development and servers and such
22:49:17FromDiscord<Bubblie> but
22:49:22FromDiscord<Bubblie> graphics? uh
22:49:26FromDiscord<Bubblie> not the BEST per say
22:49:28FromDiscord<Bubblie> its doable
22:49:29FromDiscord<Bubblie> but
22:49:36FromDiscord<Phil> Not great, yeah
22:49:39FromDiscord<Phil> I dabbled in swing once
22:49:39FromDiscord<Bubblie> yeah
22:49:41FromDiscord<Phil> I ran screaming
22:49:43FromDiscord<Bubblie> oh no swing
22:49:45FromDiscord<Bubblie> Im so sorry
22:50:32FromDiscord<Phil> Since then I've learned the joys of just using browser-tech for GUIs and the backend just as a REST API
22:51:27FromDiscord<Phil> As apparently the gnome desktop also uses JS for a lot of stuff I'm starting to feel tempted to find a gnome-project though
22:51:35FromDiscord<creikey> sent a code paste, see https://play.nim-lang.org/#ix=3SNt
22:51:53FromDiscord<creikey> sent a code paste, see https://play.nim-lang.org/#ix=3SNu
22:51:58FromDiscord<Bubblie> In reply to @Isofruit "As apparently the": I didnt know gnome used js a lot
22:52:07FromDiscord<Elegantbeef> dont convert to GVec2
22:52:35FromDiscord<Phil> In reply to @Bubblie "I didnt know gnome": Me neither, I was very surprised to find JS and CSS files in gnome extension folders. You can google GJS, it's essentially a node-like thingy with a lot of bindings to gnome libs
22:52:50FromDiscord<creikey> In reply to @Elegantbeef "dont convert to GVec2": without it there's still an error
22:53:13FromDiscord<creikey> sent a code paste, see https://play.nim-lang.org/#ix=3SNv
22:53:22FromDiscord<Elegantbeef> vec2 is float32
22:53:26FromDiscord<creikey> ahhhh
22:53:39FromDiscord<Elegantbeef> do `rotate(120.0f...`
22:53:50FromDiscord<creikey> float64 to float32 converter?
22:54:01FromDiscord<creikey> the worst idea of all time
22:54:11FromDiscord<Elegantbeef> That wouldnt solve it
22:54:18FromDiscord<Elegantbeef> The issue is the `mat3` is a float64
22:54:27FromDiscord<creikey> In reply to @Elegantbeef "The issue is the": mat3 float 64 to mat3 float 32 converter
22:54:35FromDiscord<Elegantbeef> There you go 😛
22:54:43FromDiscord<Elegantbeef> Or you know just write `d` instead of `.0`
22:54:46FromDiscord<Elegantbeef> or `f`
22:55:45*lumo_e joined #nim
22:58:44FromDiscord<TennisBowling> In reply to @TennisBowling "wait this throws this": bump
22:59:11FromDiscord<Elegantbeef> I dont use async so cannot say much
23:00:09FromDiscord<huantian> In reply to @Elegantbeef "Guess today is my": oh yeah I remember trying this and then forgetting about it!↵that was fun
23:00:24FromDiscord<Elegantbeef> Doesnt seem to hard so why didnt you finish it?!
23:00:33FromDiscord<huantian> uhhh I forgot about it
23:00:44FromDiscord<Elegantbeef> Well get at it
23:01:58*pro quit (Quit: pro)
23:07:09FromDiscord<huantian> oh yeah I do remember something about mulitsync errors but I guess that's an issue with mulitsync and not await
23:10:50*Lord_Nightmare quit (Quit: ZNC - http://znc.in)
23:13:34*Lord_Nightmare joined #nim
23:20:13FromDiscord<Equinox> Hey does anyone know what the naming conventions in nim are?
23:20:42FromDiscord<Elegantbeef> lower camel case procedures, pascal cased types
23:22:36FromDiscord<Equinox> In reply to @Elegantbeef "lower camel case procedures,": Thank you
23:22:54FromDiscord<Elegantbeef> https://nim-lang.org/docs/nep1.html for all your conventional needs
23:23:16FromDiscord<Elegantbeef> Nim has style insensitivity so aslong as you start procedures with lower case and types with uppercase you'll be fine in my books
23:25:35*Gustavo6046 joined #nim
23:25:48*jjido joined #nim
23:26:46*Gustavo6046 quit (Remote host closed the connection)
23:27:06*Gustavo6046 joined #nim
23:34:43FromDiscord<luteva> The nim tutorial says that "Usually types with inheritance are also marked as ref types even though this isn't strictly enforced."↵So why is it usual to use a ref type? Why shouldn't you use a value type in inheritance? What is the disadvantage of using a value type in inheritamce?
23:35:24*Gustavo6046 quit (Ping timeout: 252 seconds)
23:37:44FromDiscord<Elegantbeef> A value type loses information on conversion
23:37:59FromDiscord<Elegantbeef> So unless you're ok with that it's highly suggested to use `ref`
23:39:58FromDiscord<luteva> do you have any example?↵which information is lost on conversion? You mean the runtime type information?
23:40:12FromDiscord<Elegantbeef> sent a code paste, see https://paste.rs/z1x
23:40:35FromDiscord<Elegantbeef> In the above case since `A` is a value type, `c` is lost on conversion to `A`
23:40:54FromDiscord<Elegantbeef> And you cannot convert from `A` to `B` since value type conversion chops fields off
23:41:20FromDiscord<luteva> ahhh ok! thanks!
23:41:24FromDiscord<Elegantbeef> This all comes from the fact non refs are stack variables and as such you cannot fit `C` in place of `A`
23:42:17*Gustavo6046 joined #nim
23:50:37FromDiscord<Elegantbeef> @huantian\: what was your solution?
23:50:50FromDiscord<Elegantbeef> https://play.nim-lang.org/#ix=3SND mine is this mess