<< 24-07-2022 >>

00:09:10*pch joined #nim
00:21:30FromDiscord<exelotl> yeah nimcrypto is quality
00:21:58FromDiscord<exelotl> (I say, having only used it to hash a password once)
00:24:19FromDiscord<Elegantbeef> Wait you dont just use `std/hashes`?! 😄
00:26:49FromDiscord<j-james> turns out its symbols are in both `libwayland-client.so` and `libwayland-server.so`??
00:27:05FromDiscord<j-james> strange how different the header file structure is from the dynamic libraries
00:27:30FromDiscord<j-james> or maybe that's normal, i haven't messed with linking much
00:27:52FromDiscord<Elegantbeef> I mean you can just link the two libraries in the main wayland module
00:28:29FromDiscord<j-james> what do you mean?
00:29:11FromDiscord<Elegantbeef> you can use `importc` and `header` then just link the libraries you need in `wayland.nim`
00:29:39FromDiscord<j-james> oh, huh
00:29:43FromDiscord<j-james> with `dynlib`?
00:30:07FromDiscord<Elegantbeef> Dont know if you need the dynlib annotation
00:30:10FromDiscord<Elegantbeef> I've never used it myself
00:30:23FromDiscord<exelotl> In reply to @Elegantbeef "Wait you dont just": std/hashes isn't suitable for hashing passwords 😅
00:30:36FromDiscord<Elegantbeef> that's the joke
00:30:49FromDiscord<exelotl> oh, whoosh moment xD
00:31:41FromDiscord<Elegantbeef> Odd that it doesnt mention they're not cryptographically secure hashes
00:32:23FromDiscord<exelotl> yeah. nor does std/md5 or std/sha1
00:32:36FromDiscord<Elegantbeef> But std/random does say it's not crypto secure
00:32:48FromDiscord<exelotl> yeah, props to std/random xP
00:33:08FromDiscord<j-james> Elegantbeef\: try the latest nim-wayland commit
00:33:53FromDiscord<j-james> can't believe i was linking to the wrong libraries 🤦
00:34:05FromDiscord<Elegantbeef> I mean the issues are related to wlroots aswell
00:34:10FromDiscord<j-james> oh?
00:34:13FromDiscord<Elegantbeef> `nim-wayland` doesnt have a `WLEventSource`
00:34:24FromDiscord<Elegantbeef> `/home/jason/.nimble/pkgs/wlroots-#head/wlroots/backend.nim(24, 22) Error: undeclared identifier: 'WlEventSource'`
00:34:39FromDiscord<j-james> oh, right
00:34:40FromDiscord<Elegantbeef> You can just clone that repo i linked and do \`nim c ./src/tinynimwl
00:35:24FromDiscord<Elegantbeef> Also any ideas for those `ano_...` fields?
00:35:52FromDiscord<Elegantbeef> They used C anonymous unions so their naming is like `ano_session_74` and the type is `DeviceChangeEvent_ano` for instance
00:37:33FromDiscord<Elegantbeef> sent a code paste, see https://play.nim-lang.org/#ix=45lJ
00:41:00FromDiscord<j-james> i've never actually understood what unions are
00:41:10FromDiscord<Elegantbeef> They're structs that can overlap in memory
00:41:28FromDiscord<Elegantbeef> Nim's object variants are tagged unions, which means they have an identifier for the union type
00:41:37FromDiscord<Elegantbeef> A union removes that tagged part
00:42:27FromDiscord<j-james> i see
00:42:33FromDiscord<Elegantbeef> sent a code paste, see https://play.nim-lang.org/#ix=45lK
00:42:45FromDiscord<Elegantbeef> might need to use an int instead
00:43:19FromDiscord<Elegantbeef> `cast[ptr sample](cast[int](data) - offsetOf(sample, member))`
00:43:20FromDiscord<j-james> wait that seems terrifying
00:43:41FromDiscord<Elegantbeef> Eh if you store the type information in another place it's more efficient
00:44:25FromDiscord<Elegantbeef> Consider you have a type that contains an array of entities and those entities can be one of two types , you could use a bitset to indicate which type that entity is
00:45:49FromDiscord<j-james> so that DeviceChangeEvent type is either a hotplug or... nothing?
00:45:56FromDiscord<Elegantbeef> Yes
00:46:04FromDiscord<Elegantbeef> It doesnt make sense to be a union
00:46:07FromDiscord<Elegantbeef> Since there is nothing else it can be
00:46:15FromDiscord<Elegantbeef> It's probably future proofing
00:46:24FromDiscord<j-james> but we have to keep it as a union for interop
00:46:47FromDiscord<Elegantbeef> No
00:47:03FromDiscord<Elegantbeef> It can just be a hotplug if you want since it's the same
00:47:27FromDiscord<Elegantbeef> But if they add another union in the future you get to revert that 😄
00:47:50FromDiscord<Elegantbeef> This is the fun part about interop with these libraries, what the C says doesnt really matter much cause C is just a way to express the api
00:48:22FromDiscord<Elegantbeef> I guess there is a non zero chance depending how you link it that the C compiler would bitch about the type mismatch
00:49:15FromDiscord<j-james> right i see
00:50:15FromDiscord<j-james> it's only really order of types that matters for interop here then
00:50:41FromDiscord<Elegantbeef> Order and size i think
00:50:57FromDiscord<Elegantbeef> There is a chance they expand that union in the future though, so might be a bit annoying if they do
00:53:04FromDiscord<j-james> i'm struggling to see what that type would even look like without the union
00:53:20FromDiscord<Elegantbeef> It'd just be `session: HotPlug`
00:53:32FromDiscord<j-james> oh never mind lol
00:53:47FromDiscord<Elegantbeef> You replace the type usage with the single possible type it can be
00:53:53FromDiscord<j-james> i thought `hotplug` was of `DeviceChangeEvent` type for a moment and was confused
00:55:02FromDiscord<Elegantbeef> Likely
00:55:02FromDiscord<j-james> sent a code paste, see https://play.nim-lang.org/#ix=45lM
00:55:20FromDiscord<Elegantbeef> It's a tagged union so i imagine in the future they'll change the API
01:16:24FromDiscord<j-james> is there some way to show conflicting symbols from imports, without using those symbols
01:18:49FromDiscord<j-james> i'm finding client\_protocol and server\_protocol share a lot of types
01:26:15NimEventerNew thread by Elcritch: Ctrie in Nim for concurrent iterators?, see https://forum.nim-lang.org/t/9321
01:35:06FromDiscord<ghoom> anyone knows of a `std/openssl` tutorial?
01:36:01FromDiscord<ghoom> 🧐
01:36:12FromDiscord<!Patitotective> ~~httpclient~~
01:36:25FromDiscord<ghoom> nah just for general encryption
01:36:33FromDiscord<ghoom> outside http
01:36:58FromDiscord<ghoom> nvm i'll just check httpclient's examples
01:39:10FromDiscord<ghoom> nvm openssl sucks for general encryption
01:44:17FromDiscord<Elegantbeef> Include both in a file could show ambiguity
01:45:55FromDiscord<anonsh> Hi
01:46:00FromDiscord<Elegantbeef> Hello
01:46:04FromDiscord<anonsh> could someone help me with this
01:46:11FromDiscord<Elegantbeef> Likely
01:46:14FromDiscord<anonsh> So I'm trying to install a package with nimble
01:46:20FromDiscord<anonsh> And I keep getting this erro
01:46:27FromDiscord<Elegantbeef> What package?
01:46:32FromDiscord<anonsh> Downloading https://github.com/greenfork/nimraylib_now using git↵oserr.nim(95) raiseOSError↵Error: unhandled exception: The system cannot find the file specified.↵Additional info: Requested command not found: 'git ls-remote --tags https://github.com/greenfork/nimraylib_now'. OS error: [OSError]
01:46:40FromDiscord<anonsh> In reply to @Elegantbeef "What package?": nimraylibnow
01:46:46FromDiscord<Elegantbeef> Ah that answers the question
01:46:58FromDiscord<Elegantbeef> What happens if you do `which git` or `where git`
01:47:18FromDiscord<anonsh> /usr/bin/git
01:47:23FromDiscord<anonsh> git works fine
01:48:29FromDiscord<Elegantbeef> I'm going to give it a whirl myself now
01:48:34FromDiscord<Elegantbeef> Installed fine here
01:48:36FromDiscord<Elegantbeef> So hmmm
01:50:02FromDiscord<Elegantbeef> Try `nimble install nimraylib_now --verbose`
01:50:59FromDiscord<anonsh> same error
01:51:00FromDiscord<anonsh> sent a long message, see http://ix.io/45lR
01:51:28FromDiscord<Elegantbeef> Does `git ls-remote --tags https://github.com/greenfork/nimraylib_now` run for you?
01:52:43FromDiscord<ghoom> yo what's `key` and what's `nkey` in `nimcrypto/twofish`'s `init`?
01:52:53FromDiscord<anonsh> https://media.discordapp.net/attachments/371759389889003532/1000581303781048411/unknown.png
01:53:47FromDiscord<Elegantbeef> Key is likely the encryption key
01:53:53FromDiscord<Elegantbeef> Odd anonsh
01:54:18FromDiscord<Elegantbeef> What OS/Shell are you using?
01:54:35FromDiscord<anonsh> In reply to @Elegantbeef "Odd anonsh": My git command actually runs on a Linux subsystem ↵But nimble runs on windows
01:54:48FromDiscord<anonsh> that may be the problem ↵How does nimble use git here?
01:55:39FromDiscord<Elegantbeef> It invokes it through your shell probably
01:55:39FromDiscord<Elegantbeef> No clue if nimble thinks you're windows or linux in this case
01:56:08FromDiscord<Elegantbeef> But that's probably the issue then, something with WSL and nimble dont work well together
01:56:25FromDiscord<anonsh> ok
01:56:43FromDiscord<Elegantbeef> I'd test it if i had a windows partition 😄
01:56:43FromDiscord<anonsh> Do you think I could clone the package and compile manually?
01:56:49FromDiscord<ghoom> In reply to @Elegantbeef "Key is likely the": how about `nkey`? whish is an int
01:56:52FromDiscord<ghoom> (edit) "whish" => "which"
01:57:03FromDiscord<ghoom> defaults to 0
01:57:05FromDiscord<anonsh> Where does nimble install libraries to?
01:57:56FromDiscord<Elegantbeef> `.nimble/pkgs`↵(@anonsh)
01:58:02FromDiscord<Elegantbeef> In your home directory
01:59:08FromDiscord<anonsh> In reply to @Elegantbeef "In your home directory": so I would have to download the nimralibnow library and then compile it in there
01:59:14FromDiscord<anonsh> and then it would work?
01:59:24FromDiscord<Elegantbeef> Nim ships libraries as source
01:59:56FromDiscord<anonsh> so just download the librbary then?
02:00:23FromDiscord<anonsh> In reply to @Elegantbeef "But that's probably the": I think it's that my git key is stored on WSL
02:01:20FromDiscord<Elegantbeef> You can try just cloning it
02:01:45FromDiscord<Elegantbeef> I dont see anything in the nimble file to indicate any other step required
02:02:09FromDiscord<Elegantbeef> A full clone to where ever and a pass of `--nimblePath:/path/to/my/raylibclone` should do the trick
02:02:34FromDiscord<Elegantbeef> Life is easier when the package manager works properly 😄
02:03:16FromDiscord<Elegantbeef> You could also try https://github.com/disruptek/nimph instead of nimble
02:04:40FromDiscord<anonsh> In reply to @Elegantbeef "A full clone to": --nimblePath:/path/to/my/raylibclone↵what do I with this?
02:04:51FromDiscord<Elegantbeef> Provide it to the Nim compiler
02:04:57FromDiscord<anonsh> ok
02:07:33FromDiscord<Elegantbeef> That's all Nimble really does for compiling of course
02:07:34FromDiscord<Elegantbeef> The compiler has an API for adding search paths and nimble provides it
02:11:05FromDiscord<anonsh> Running nimble install inside the cloned git repo gives this error https://media.discordapp.net/attachments/371759389889003532/1000585885315780608/unknown.png
02:12:13FromDiscord<Elegantbeef> No clue
02:12:36FromDiscord<Prestige> Windows
02:21:07FromDiscord<anonsh> You know what
02:21:09FromDiscord<anonsh> I give up
02:29:36FromDiscord<# Luke> In reply to @Avahe "Windows": Lmao it's quite fun
02:29:46FromDiscord<# Luke> I'm adding windows support to dye
02:29:57FromDiscord<# Luke> And it's going just aswell as I expected
02:30:07FromDiscord<# Luke> ||horribly||
02:31:33FromDiscord<ghoom> how do i convert to an open array?
02:32:04FromDiscord<Elegantbeef> `seq` and `array` are implictly converted to `openArray`
02:32:18FromDiscord<ghoom> how about strings?
02:32:30FromDiscord<ghoom> string to byte openArray
02:32:31FromDiscord<Elegantbeef> They also do to `openarray[char]`
02:32:50FromDiscord<Elegantbeef> If you want to convert to byte there is `myStr.toOpenArrayByte(0, myStr.high)`
02:41:11FromDiscord<ghoom> sent a code paste, see https://play.nim-lang.org/#ix=45m1
02:42:08FromDiscord<ghoom> (edit) "https://play.nim-lang.org/#ix=45m1" => "https://play.nim-lang.org/#ix=45m2"
02:42:21FromDiscord<Elegantbeef> Seems it needs to be atleast 4 bytes?
02:43:08FromDiscord<ghoom> sent a code paste, see https://play.nim-lang.org/#ix=45m3
02:43:20FromDiscord<Elegantbeef> atleast 5 bytes\ 😄
02:43:32FromDiscord<Elegantbeef> also you can just do `[100u8, 100, 100, 100]`
02:43:41FromDiscord<ghoom> `index 8 not in 0 .. 4`
02:43:57FromDiscord<ghoom> In reply to @Elegantbeef "also you can just": oh shweet
02:44:09FromDiscord<sOkam!> If you give a pointer/address to a C binary, from a nim-created dynamic library↵How do you map that in Nim code, so that it can hold a C struct, and Nim can read that data?
02:44:14FromDiscord<Elegantbeef> I have a feeling the key is supposed t obe a given length
02:44:29FromDiscord<ghoom> In reply to @Elegantbeef "I have a feeling": no matter what i pass, it expect a longer one
02:44:36FromDiscord<ghoom> (edit) "expect" => "expects"
02:44:41FromDiscord<Elegantbeef> `newSeq[byte](100)`
02:44:58FromDiscord<Elegantbeef> Importc the struct and give C the pointer↵(@sOkam!)
02:45:30FromDiscord<ghoom> In reply to @Elegantbeef "`newSeq[byte](100)`": it worked, what does that do exactly?
02:45:44FromDiscord<sOkam!> In reply to @Elegantbeef "Importc the struct and": kk. and what do you apply the importc to? an object?
02:45:47FromDiscord<Elegantbeef> Creates a new sequence of bytes with a size of 100
02:45:50FromDiscord<Elegantbeef> Yes
02:46:04FromDiscord<Elegantbeef> You should be using a proper key and not just `0` 100 times
02:46:11FromDiscord<Elegantbeef> No clue what size of key twofish expects
02:46:43FromDiscord<Elegantbeef> Seems it works with 128, 192, and 256 bits
02:46:56FromDiscord<sOkam!> In reply to @Elegantbeef "Yes": is this yes to me or to ghoom?
02:46:59FromDiscord<Elegantbeef> Why it doesnt do a assertion inside is beyond me
02:47:11FromDiscord<Elegantbeef> ghoom didnt ask a yes or no question
02:47:38FromDiscord<sOkam!> well, its intermixed with 6 messages to him... and I didn't keep up with the convo
02:48:08FromDiscord<sOkam!> man, when did you become so bitter. you were the most helpful person in this whole discord
02:48:27FromDiscord<Elegantbeef> I'm not bitter
02:48:28FromDiscord<ghoom> In reply to @Elegantbeef "No clue what size": i experimented. seems like it needs 29+
02:50:04FromDiscord<Elegantbeef> Yea i looked at wikpedia and it states that it works with those 3 sized keys
02:50:14FromDiscord<Elegantbeef> No clue what the Nim impl expects
02:51:22FromDiscord<Elegantbeef> I do have to say this is a bit ironic though given your response was "You were helping a person so much i couldnt see you were helping me"↵(@sOkam!)
02:51:48FromDiscord<Elegantbeef> But anyway yes nim objects are equivlent to C structs
02:52:28FromDiscord<# Luke> Is there any templates for a Nim package on scoop
03:17:04FromDiscord<ghoom> sent a code paste, see https://play.nim-lang.org/#ix=45mb
03:17:11FromDiscord<ghoom> this is from `nimcrypto/twofish` btw
03:18:08FromDiscord<Elegantbeef> you can define a `var a: seq[byte]` or `var a: array[32, byte]`
03:22:16FromDiscord<ghoom> sent a code paste, see https://play.nim-lang.org/#ix=45mc
03:30:57FromDiscord<treeform> In reply to @sOkam! "<@107140179025735680> If I wanted": We use https://github.com/treeform/boxy to draw sprites we make with pixie to screen. Boxy features a dynamic texture atlas. Simple draw your images/text/panels with pixie upload them to GPU. Draw them with GPU. Try not to change the images/text/panels too often.
03:30:59FromDiscord<Elegantbeef> Is your output not allocated?
03:31:24FromDiscord<ghoom> In reply to @Elegantbeef "Is your output not": i just defined a byte seq `s`
03:32:20FromDiscord<Elegantbeef> code please
03:33:48FromDiscord<treeform> In reply to @sOkam! "<@107140179025735680> If I wanted": We have whole stack windy+boxy+pixie+vmath+bumpy+spacy+netty+flatty+slappy that you can make games with.
03:35:19FromDiscord<# Luke> Does Nim have a selenium wrapper/alternative
03:36:37NimEventerNew thread by Curioussav: How to determine why shared lib is linked, see https://forum.nim-lang.org/t/9322
03:38:39FromDiscord<sOkam!> In reply to @treeform "We have whole stack": I see ✍️↵I was thinking of integrating the library into a dynamic library that connects with a 3D engine↵But its really old tech, and I don't understand it enough yet, so that's why I was wondering what pixie needs to draw... or if I could just work within Nim and not have to send draw requests to the engine
03:39:05FromDiscord<sOkam!> Will defo check those out
03:45:29FromDiscord<sOkam!> @treeform trying to understand flatty. But have no perspective of what data serialization is↵Does it have anything in common with huffman coding? 🤔
03:47:31FromDiscord<treeform> In reply to @sOkam! "I see ✍️ I": Pixie will give you pixel buffer, you can send that to any 3d engine. Pixie is very fast at filling text and vector shapes. What are you trying to draw? Find parts that are slow for you and optimize them.
03:48:37FromDiscord<treeform> In reply to @sOkam! "<@107140179025735680> trying to understand": Flatty can take nearly any nim object and turn it into a binary buffer which can you save to a file or send to a different computer. Then you can take that binary buffer and get the nim object back by reading a file or getting network packet.
03:51:17FromDiscord<treeform> The key to drawing graphics fast is to do as little work as possible. So drawing stuff in pixie and then sending it to a texture atlas system like boxy achieves this. Then only updating the texture atlas when you need too.
04:03:07FromDiscord<ghoom> sent a code paste, see https://play.nim-lang.org/#ix=45mh
04:03:34FromDiscord<ghoom> don't mind me using the key as the input lol
04:03:49FromDiscord<ghoom> just for testung
04:03:53FromDiscord<ghoom> (edit) "testung" => "testing"
04:05:14FromDiscord<Elegantbeef> `s` is size of 0
04:05:25FromDiscord<Elegantbeef> you need to do `s = newSeq[byte](myData)`
04:05:57FromDiscord<ghoom> ah ok
04:18:50FromDiscord<creikey> cleaner way to do this without making the variable var? https://media.discordapp.net/attachments/371759389889003532/1000618029840867400/unknown.png
04:24:29FromDiscord<Elegantbeef> Or a single if statement instead of that
04:24:34FromDiscord<Elegantbeef> sent a code paste, see https://play.nim-lang.org/#ix=45mi
04:24:35FromDiscord<Elegantbeef> sent a code paste, see https://paste.rs/6vw
04:30:23FromDiscord<Elegantbeef> sent a code paste, see https://play.nim-lang.org/#ix=45mj
04:52:20FromDiscord<ghoom> is there a shorthand to assigning multiple items of a seq or array?
04:52:29FromDiscord<ghoom> like a slice or something?
04:54:36FromDiscord<Elegantbeef> `myCol[a..b] = myOtherColl`
04:55:04FromDiscord<ghoom> yay
04:55:18FromDiscord<Elegantbeef> sent a code paste, see https://play.nim-lang.org/#ix=45mm
04:55:24FromDiscord<Elegantbeef> Might be better if you want to set it to a specific value
04:55:31FromDiscord<Elegantbeef> There is also `newSeqWith` inside sequtils
04:56:07FromDiscord<ghoom> gotcha
05:00:50FromDiscord<ghoom> sent a code paste, see https://play.nim-lang.org/#ix=45mp
05:01:18FromDiscord<ghoom> (edit) "https://play.nim-lang.org/#ix=45mp" => "https://play.nim-lang.org/#ix=45mq"
05:01:23FromDiscord<ghoom> i thought nim allowed forward decs
05:01:55FromDiscord<Rika> You have to forward declare it then
05:01:59FromDiscord<Rika> You didn’t do so
05:04:41FromDiscord<ghoom> hmmmm
05:08:46FromDiscord<ghoom> ok
05:14:30*mahlon quit (Ping timeout: 240 seconds)
05:22:40FromDiscord<Phil> In reply to @ripluke "Is there any templates": https://nimble.directory/search?query=selenium I'm seeing 3 potential candidates
06:08:58NimEventerNew thread by Hugosenario: Nim packages dependencies visualizations, see https://forum.nim-lang.org/t/9323
07:16:48*mal`` quit (Quit: Leaving)
07:38:37*mal`` joined #nim
07:38:57*rockcavera quit (Remote host closed the connection)
07:47:34FromDiscord<Zectbumo> is there documentation on `concept`?
07:53:43FromDiscord<Zectbumo> found it. it was under experimental. https://nim-lang.org/docs/manual_experimental.html#concepts
08:04:23*CyberTailor quit (Remote host closed the connection)
08:05:21*CyberTailor joined #nim
08:09:33*CyberTailor quit (Excess Flood)
08:10:11*CyberTailor joined #nim
08:25:40*byanka joined #nim
08:25:46*byanka_ joined #nim
08:26:00*byanka_ quit (Remote host closed the connection)
08:37:38FromDiscord<sOkam!> In reply to @treeform "Pixie will give you": Mainly UI things, trying to figure out how to design a UI system for the engine, since the default is very outdated
08:38:43FromDiscord<sOkam!> I guess I would just need a way to get that pixel buffer drawn with the engine↵Dunno how that connection would work, but that explains a lot. tyty ✍️
08:39:29FromDiscord<sOkam!> Is Pixie any similar to Cairo?↵I'm reading through their tutorial, and its being very clarifying
08:40:30FromDiscord<Elegantbeef> Pixie basically cairo or skia
08:40:52FromDiscord<Elegantbeef> Some source of inspiration could be https://github.com/beef331/truss3d/tree/master/src/truss3D/guicomponents
08:53:19NimEventerNew post on r/nim by An0nym0us-sh: nimble does not work on windows, see https://reddit.com/r/nim/comments/w6r64t/nimble_does_not_work_on_windows/
09:18:42*jmdaemon quit (Ping timeout: 264 seconds)
10:03:26FromDiscord<Tuatarian> Beef have you seen beef the language?
10:03:31FromDiscord<Tuatarian> Just curious
10:04:15FromDiscord<Phil> I believe that one has been brought up before
10:11:03FromDiscord<Rika> A billion times
10:11:23FromDiscord<Rika> It’s been at most two weeks since the last time he was asked that
10:12:47*toluene quit (Quit: Ping timeout (120 seconds))
10:14:50*toluene joined #nim
10:23:33FromDiscord<'Champagne> They say it's good for game development.
11:23:59FromDiscord<b1rdf00d> we should add a bot that listens for when someone asks Beef if they've heard of Beef
11:39:03*krux02 joined #nim
12:20:30FromDiscord<eyecon> And a counter: _It has been `x` days since someone asked about Beef the language_
12:23:49*CyberTailor quit (Remote host closed the connection)
12:25:50*CyberTailor joined #nim
12:33:05FromDiscord<Shiba> i wonder what those points indicate in the compiler
12:39:32FromDiscord<sideus> Hi all,↵Anyone know of a coc extension for nim?
12:42:33FromDiscord<jan0809> coc?
12:42:50FromDiscord<Rika> Neovim extension
12:43:14FromDiscord<Rika> You can derive an extension for that with “nim.nvim”
12:45:24FromDiscord<sideus> In reply to @Rika "You can derive an": 👍
12:45:35FromDiscord<sideus> I'll have a look and see, thanks again.
12:45:48FromDiscord<Rika> There are instructions how to in the read me
12:46:02FromDiscord<Rika> I made one for compe with the instructions
12:46:14FromDiscord<sideus> Awesome 😄
12:47:52FromDiscord<Prestige> sent a code paste, see https://paste.rs/M0w
12:47:57FromDiscord<Prestige> I had nimlsp cloned and built locally
12:51:04FromDiscord<sideus> Thanks much 👍
12:55:51FromDiscord<gabreal> Is there a way to get choosenim to get/build Nim for aarch64 instead of amd64 ?
12:56:52FromDiscord<Prestige> Doesn't look like it: https://github.com/dom96/choosenim/issues/149
12:57:37FromDiscord<Professor Actual Factual> sent a code paste, see https://play.nim-lang.org/#ix=45pP
12:57:44FromDiscord<gabreal> In reply to @Avahe "Doesn't look like it:": Thanks Prestige 🙂
12:57:47NimEventerNew thread by Bijinpanicker: Illegal storage access, see https://forum.nim-lang.org/t/9324
12:59:13*pch quit (Remote host closed the connection)
13:17:46*krux02 quit (Remote host closed the connection)
13:28:33FromDiscord<demotomohiro> In reply to @Professor Actual Factual "Currently watching araqs talk": In your code, `values` cannot be moved (so it need to be copied) because `values` is read after `put`.
13:29:40FromDiscord<Professor Actual Factual> In reply to @demotomohiro "In your code, `values`": Im aware how the nim semantics work, im just wondering where the warning message is? It will be useful to debug
13:29:43FromDiscord<demotomohiro> move is an optimization to remove copy. In your case, such optimization cannot be used because values is read after put
13:30:00FromDiscord<aruZeta> when doing `for val in arr`, can you unpack also the index like `for (val, i) in arr`?
13:30:23FromDiscord<Rika> In reply to @aruZeta "when doing `for val": If the values in the array is that then sure
13:30:40FromDiscord<Rika> If you want the index it’s for i, val in arr
13:31:04FromDiscord<aruZeta> thanks :)
13:33:05FromDiscord<demotomohiro> In reply to @Professor Actual Factual "Im aware how the": I think Nim doesn't show warning because put `values` and read it is not a wrong code excepts it requires copy.
13:35:15FromDiscord<Professor Actual Factual> In reply to @demotomohiro "I think Nim doesn't": Im aware, araqs video that i linked says the compiler is supposed to warn you. Which would be incredibly useful as we dont always weite perfect code.
13:35:52FromDiscord<Rika> Is he on devel or stable
13:36:17FromDiscord<Professor Actual Factual> Im not sure what the actual intended effect is. If a warning is supposed to be issued than this is a bug, and its best i submit an issue. This is on 1.6.2 btw
13:36:42*arkurious joined #nim
13:45:54*kenran joined #nim
14:01:20*kenran quit (Quit: WeeChat info:version)
14:13:10*krux02 joined #nim
14:43:36qwrhuh, i have string variable and want to pass it getpwnam, compiler complains that implicit conversion is unsafe, explicit cast is rejected and simply making let s = str; getpwnam(s) won't help - is there any simpler solution than wrapping getpwnam into another proc?
14:44:07qwr(yes, the unsafe is warning in current compiler version, but i like to avoid it)
14:55:28FromDiscord<flywind> In reply to @qwr "huh, i have string": `getpwnam(s.cstring)`
14:56:53qwrflywind: thanks, that worked :)
14:57:32FromDiscord<flywind> You are welcome
14:58:55FromDiscord<flywind> The error message should have been better.
15:03:36FromDiscord<flywind> It should add something like "If the lifetime of the string is not shorter than the cstring, use `cstring(s)` instead."
15:08:13FromDiscord<treeform> In reply to @sOkam! "Is Pixie any similar": Yes you can create a screen texture in pixie and transfer it every frame. And it does work but its quite slow some where around 3-5ms to do that.
15:11:16FromDiscord<treeform> I recommend creating the components you need for your UI and transfer that into texture atlas. Draw your UI mostly in one draw call with one draw buffer. Mostly because some things like complex masking or blurring will require more draw calls. You can easily get to around 0.01ms with that system.
15:13:25FromDiscord<treeform> if this is the UI you need:
15:13:27FromDiscord<treeform> http://www.adriancourreges.com/img/blog/2015/supcom/shot/b_95_final_frame.jpg
15:13:37FromDiscord<treeform> draw it in one draw call:
15:13:38FromDiscord<treeform> http://www.adriancourreges.com/img/blog/2015/supcom/shot/b_96_wireframe.jpg
15:14:29FromDiscord<treeform> using a texture atlas: https://en.wikipedia.org/wiki/Texture_atlas
15:14:56FromDiscord<treeform> ( images are from http://www.adriancourreges.com/blog/2015/06/23/supreme-commander-graphics-study/ )
15:19:42FromDiscord<!Patitotective> does windy support clipboard images? :oo
15:21:13FromDiscord<!Patitotective> it seems like it misses linux support https://github.com/treeform/windy/issues/65:/
15:21:15FromDiscord<!Patitotective> (edit) "https://github.com/treeform/windy/issues/65:/" => "https://github.com/treeform/windy/issues/65 :/"
15:21:51FromDiscord<treeform> yes windy is has lacking linux support
15:22:00FromDiscord<treeform> `proc getClipboardImage(): Image` on other platforms
15:22:25FromDiscord<treeform> Linux UI is very confusing.
15:22:33FromDiscord<treeform> Do you bind to X11 and miss some high level things?
15:22:45FromDiscord<treeform> Do you bind to GTK and make QT people unhappy?
15:22:53FromDiscord<treeform> do you bind to QT?
15:23:01FromDiscord<!Patitotective> hmm, i see
15:23:02FromDiscord<treeform> do you bind to Wayland?
15:23:15FromDiscord<treeform> probably need to bind to all 4.... to be compatible?
15:23:37FromDiscord<treeform> I don't like linux UI development experience
15:23:50FromDiscord<!Patitotective> it would be easier if glfw supported clipboard image data
15:24:05FromDiscord<treeform> yes but how would they bind to? They have same issue.
15:24:20FromDiscord<treeform> On windows and mac its clear who to go to
15:24:26FromDiscord<treeform> On linux it depends
15:24:58FromDiscord<treeform> I though I could do all things with X11
15:25:04FromDiscord<treeform> but its just a display thingy
15:25:27FromDiscord<treeform> for high level things like clipboard, tray icons, notifications, save dialogs you need GTK or QT.
15:25:44FromDiscord<treeform> So maybe its bet to just bind to GTK?
15:25:50FromDiscord<treeform> (edit) "bet" => "best"
15:25:54FromDiscord<treeform> Still trying to puzzle it out
15:27:52FromDiscord<Shiba> why is this happening https://media.discordapp.net/attachments/371759389889003532/1000786398288302180/Screenshot_2022-07-24_16-27-28.png
15:28:06FromDiscord<Shiba> i turned on incremental compiling
15:28:24FromDiscord<Shiba> (edit) "happening" => "happening?"
15:30:19FromDiscord<!Patitotective> @treeform see this python library https://pypi.org/project/pyperclip/↵they use `xclip`/gtk/pyqt
15:35:02FromDiscord<!Patitotective> and this library seems to support binary data (images) on x11 and wayland↵https://github.com/spyoungtech/pyclip
15:44:54FromDiscord<treeform> In reply to @Patitotective "<@107140179025735680> see this python": I think GTK is the way to go. It gives you the high level things and runs everywhere
15:44:59FromDiscord<treeform> over X11 and Wayland
15:45:10FromDiscord<treeform> But I am not sure... it feels like a ton of work
15:46:04FromDiscord<treeform> Maybe GTK only for the high level things and windowing stays x11
15:46:15FromDiscord<treeform> like clipboard, tray icons, notifications, save dialogs
15:46:19FromDiscord<!Patitotective> would that require using gintro or how would you interface with gtk?
15:46:50FromDiscord<treeform> I would just use function signatures of things I need.
15:47:00FromDiscord<treeform> Like how we do windows and mac.
15:47:46FromDiscord<treeform> see https://github.com/treeform/windy/blob/master/src/windy/platforms/win32/windefs.nim
15:48:07FromDiscord<treeform> or x11 https://github.com/treeform/windy/blob/master/src/windy/platforms/linux/x11.nim
15:48:58FromDiscord<treeform> oh I have a gtk experiment here: https://github.com/treeform/windy/blob/master/experiments/gtk/helloworld/nimgtk.nim
15:49:03FromDiscord<treeform> probably just more of that
16:19:56FromDiscord<ghoom> halp! nimcrypto only uses one key for both encryption and decryption
16:19:58FromDiscord<ghoom> what do i do?
16:24:03FromDiscord<huantian> Use an asymmetric encryption alg?
16:26:42FromDiscord<ghoom> will anything work with nimcrypto's twofish?
16:26:43FromDiscord<ghoom> (edit) removed ""
16:26:55FromDiscord<ghoom> i don't quite understand how this works
16:27:24FromDiscord<ghoom> sorry i'll just look it up
16:28:09FromDiscord<huantian> Some algorithms are built for the same key for both encryption and decryption
16:28:16FromDiscord<huantian> Others use different keys
16:28:53FromDiscord<huantian> I haven’t used the library myself so I don’t know exactly how it works, but you probably need to choose a different algorithm
16:29:04FromDiscord<ghoom> ok
16:33:58FromDiscord<demotomohiro> It seems nimcrypto doesn't have Public-key cryptography:↵https://cheatfate.github.io/nimcrypto/↵https://en.wikipedia.org/wiki/Public-key_cryptography#Examples
16:34:53FromDiscord<ghoom> oh 🤦‍♂️
16:35:14FromDiscord<ghoom> im stoopid bish
16:38:25FromDiscord<ghoom> what are your guys' thoughts on libsodium?
16:40:27FromDiscord<Rika> its ok
16:40:37FromDiscord<ghoom> what do you recommend?
16:40:46FromDiscord<ghoom> for asymmetric cryptography
16:51:19FromDiscord<!Patitotective> sent a code paste, see https://play.nim-lang.org/#ix=45sF
16:53:38FromDiscord<ghoom> bruh
16:55:28FromDiscord<huantian> In reply to @Patitotective "why is this commented": I’d assume wayland support isn’t finished yet or is broken
17:05:04FromDiscord<ghoom> if libsodium's `crypto_box_easy` is used for encryption, what's used for decryption?
17:21:37FromDiscord<treeform> In reply to @Patitotective "why is this commented": Because wayland does not work well yet.
17:21:46FromDiscord<treeform> you can try to get it to work if you like
17:38:29FromDiscord<hector> In reply to @ghoom "if libsodium's `crypto_box_easy` is": Pencil and paper
17:41:16FromDiscord<ghoom> wow
17:41:21*mahlon joined #nim
17:41:35FromDiscord<ghoom> 📝🐸
17:41:45FromDiscord<ghoom> decryption successful
17:41:47FromDiscord<ghoom> 🐸👍
17:44:02FromDiscord<!Patitotective> nice
17:44:28FromDiscord<ghoom> only thing left is to hook the paper to the automated system
17:45:21madpropsbeef what's the idea with 3 empty lines between the imports and the 'first' line ?
17:45:25madpropshttps://github.com/beef331/tinynimwl/blob/master/src/nimtinywl.nim
17:45:37madpropsa new beefy standard
17:45:57FromDiscord<!Patitotective> In reply to @madprops "beef what's the idea": he was high
18:04:54*jmdaemon joined #nim
18:09:00FromDiscord<ghoom> how do i do `newSeq` but for arrays?
18:10:06FromDiscord<ghoom> the zeros are important
18:10:22FromDiscord<ghoom> cuz i assume `array[n, t]` doesn't zero out the array
18:10:54FromDiscord<Rika> it does
18:11:11FromDiscord<Rika> arrays are fixed length and that means it cant be empty unless n is 0
18:17:48FromDiscord<Nimion #ඞ> In reply to @treeform "On windows and mac": u can have a look how rust's winit does it maybe? I'm not sure though if they support htat
18:17:48FromDiscord<ghoom> In reply to @Rika "arrays are fixed length": when i use `array[n, t]` it uses it as a typeerf
18:17:50FromDiscord<ghoom> (edit) "typeerf" => "typeref"
18:19:46FromDiscord<Nimion #ඞ> (edit) "htat" => "htat↵↵edit: they don't support clipboards either :c"
18:20:50*xet7 joined #nim
18:21:07FromDiscord<huantian> var x: array[n,t]
18:23:26FromDiscord<ghoom> what if i wanna do it inline?
18:23:41FromDiscord<ghoom> without declaring anything
18:28:01FromDiscord<Rika> wdym
18:30:05FromDiscord<ghoom> In reply to @Rika "wdym": i don't wanna declare a variable to pass an array to a function
18:30:58*xet7_ joined #nim
18:32:42FromDiscord<Rika> `default array[n, t]`
18:32:51FromDiscord<ghoom> 🐸:thumm
18:32:55FromDiscord<ghoom> (edit) "🐸:thumm" => "🐸👍"
18:34:59*xet7 quit (Ping timeout: 268 seconds)
18:37:31*xet7_ quit (Ping timeout: 272 seconds)
18:48:03*ttkap quit (Ping timeout: 276 seconds)
19:02:05*Figworm joined #nim
19:12:42FromDiscord<ghoom> i wanna conditionally specify an object case, like in `T(kind: kind, if kind == A: a: int else: b: string)`
19:13:24FromDiscord<!Patitotective> https://nim-lang.org/docs/manual.html#types-object-variants ?
19:13:41FromDiscord<ghoom> (edit) "i wanna conditionally specify an object case, like in `T(kind: kind, if kind == A: a: int else: b: string)`" => "sent a code paste, see https://play.nim-lang.org/#ix=45vh"
19:14:09FromDiscord<!Patitotective> In reply to @ghoom "i wanna conditionally specify": you're not specifying `a` or `b` fields any value
19:14:28FromDiscord<ghoom> there
19:14:32FromDiscord<ghoom> (edit) "https://play.nim-lang.org/#ix=45vh" => "https://play.nim-lang.org/#ix=45vi"
19:14:48FromDiscord<ghoom> `:` is very ambiguous lol
19:15:17FromDiscord<ghoom> whenever i see `:` i think "type"
19:16:03FromDiscord<!Patitotective> In reply to @ghoom "i wanna conditionally specify": yea well, i dont think you can do this
19:16:12FromDiscord<ghoom> so what do i do?
19:16:40FromDiscord<ghoom> say for example, `kind` gets passed through a function
19:17:08FromDiscord<huantian> Switch case in kind in the function
19:17:15FromDiscord<huantian> (edit) "in" => "on"
19:17:29FromDiscord<ghoom> and write two instanciations?
19:17:35FromDiscord<huantian> Yes
19:17:57FromDiscord<ghoom> bro my type has a lotta properties
19:17:59FromDiscord<ghoom> 😭
19:18:09FromDiscord<ghoom> boilerplate goes brrrrrr
19:18:21FromDiscord<!Patitotective> sent a code paste, see https://play.nim-lang.org/#ix=45vl
19:18:32FromDiscord<ghoom> 😮‍💨👍
19:19:09FromDiscord<!Patitotective> i think there are libraries for doing so, let me check
19:21:12FromDiscord<!Patitotective> well, theres https://github.com/alaviss/union↵and https://github.com/yglukhov/variant↵but i prefer doing it manually :srhu
19:21:17FromDiscord<!Patitotective> (edit) ":srhu" => "🤷‍♂️"
19:21:48FromDiscord<huantian> I just write the object constructor directly
19:26:02*pch joined #nim
19:37:02FromDiscord<ghoom> sent a code paste, see https://play.nim-lang.org/#ix=45vu
19:37:32FromDiscord<ghoom> i'm deliberately delaying the definitions
19:37:37FromDiscord<ghoom> (edit) "definitions" => "definition"
19:37:42FromDiscord<ghoom> (edit) "the" => "`x`'s"
19:39:49FromDiscord<huantian> Uh I don’t understand
19:40:08FromDiscord<huantian> `T(i: 99`?
19:40:13FromDiscord<huantian> (edit) "99`?" => "99)`?"
19:40:46FromDiscord<ghoom> oops
19:41:03FromDiscord<ghoom> this gon take some gettin used to
19:41:26FromDiscord<ghoom> also why is `:` required instead of `=`?
19:41:43FromDiscord<huantian> No idea
19:41:53FromDiscord<huantian> It really should be = imo but that’s a breaking change
19:42:06FromDiscord<ghoom> curious about the thought process behind that decision
19:42:42FromDiscord<ghoom> why can't there be a language with no flaws 😭
19:42:49*Guest78 joined #nim
19:42:58*Guest78 quit (Client Quit)
19:43:39FromDiscord<!Patitotective> In reply to @ghoom "also why is `:`": there's a RFC for taht
19:43:45FromDiscord<!Patitotective> In reply to @ghoom "why can't there be": PRs welcome :]
19:43:55FromDiscord<ghoom> :]
19:48:49FromDiscord<ghoom> sent a code paste, see https://paste.rs/eGV
19:49:11FromDiscord<ghoom> (edit) "https://play.nim-lang.org/#ix=45vK" => "https://paste.rs/srt"
19:49:21FromDiscord<Generic> you can just leave out the = []
19:49:39FromDiscord<ghoom> In reply to @Generic "you can just leave": but what if i'm passing it to a parameter?
19:49:58FromDiscord<ghoom> i don't wanna write `default Table[string, int]`
19:50:07FromDiscord<Generic> you can either do `initTable[string, int]()`
19:50:18FromDiscord<Generic> or what you just wrote
19:50:23FromDiscord<ghoom> :<
19:50:29FromDiscord<# Luke> In reply to @ghoom "i don't wanna write": why not lol
19:50:36FromDiscord<ghoom> cuz i'm a programmer
19:50:43FromDiscord<# Luke> Ah
19:50:56FromDiscord<ghoom> :>
19:55:03FromDiscord<Require Support> is there a general guideline on when to user `let` vs `var` ?
19:55:06FromDiscord<Require Support> (edit) "user" => "use"
19:55:26FromDiscord<Elegantbeef> If you can use let use let, if you need var use var
19:56:41madpropsthere's still no language that has a "make it a constant after the first assignment" kind of variable
19:57:00FromDiscord<ghoom> ye shame
19:57:34FromDiscord<Elegantbeef> There is some desire for it so it might happen eventually where you do something like `let myVar` or similar
19:58:37FromDiscord<Elegantbeef> But given Nim has expressions it's not a massive issue
20:01:17FromDiscord<wiga> any recommendation for a gcsafe http client to send post request?
20:02:33*toluene quit (Quit: The Lounge - https://thelounge.chat)
20:03:48*kenran joined #nim
20:04:19FromDiscord<lantos> sent a long message, see http://ix.io/45vT
20:05:10FromDiscord<lantos> (edit) "http://ix.io/45vT" => "http://ix.io/45vU"
20:05:34*kenran quit (Client Quit)
20:05:50FromDiscord<lantos> (edit) "http://ix.io/45vU" => "http://ix.io/45vV"
20:10:21FromDiscord<voidwalker> what do you think would be the desirable way to check if an sqlite table exists ?
20:11:19FromDiscord<Require Support> trying to parse json then convert it an object.. is there a better way to do this other than checking if key exists then `object.key = jsonNode["key"]` ? Trying to see if theres a function i can use that makes this faster than a list of if conditions
20:11:32FromDiscord<Require Support> (edit) "object.. is" => "object. Is"
20:11:52*xet7 joined #nim
20:12:07FromDiscord<Elegantbeef> https://nim-lang.org/docs/json.html#to%2CJsonNode%2Ctypedesc%5BT%5D
20:13:04FromDiscord<Require Support> omg lifesaver
20:13:27FromDiscord<lantos> also jsony is library you might want to check otu
20:13:29FromDiscord<lantos> (edit) "otu" => "out"
20:13:56FromDiscord<lantos> (edit) "out" => "out, it supports null/sets and other things"
20:15:45reversem3[m]Anyone using owlkettle GTK4 gui yet
20:16:03FromDiscord<Elegantbeef> I've used it a bit
20:16:15FromDiscord<!Patitotective> In reply to @lantos "https://github.com/nim-lang/Nim/blame/685bf944aac0b": 👀
20:16:23FromDiscord<!Patitotective> In reply to @reversem3 "Anyone using owlkettle GTK4": i used it once
20:16:45reversem3[m]Awesome , I'm trying to get an entry below a label
20:17:06reversem3[m]So far I can only get the entry to be on the right hand side of the label
20:17:30FromDiscord<!Patitotective> you should create vertical box
20:18:01FromDiscord<Elegantbeef> sent a code paste, see https://play.nim-lang.org/#ix=45w1
20:18:01FromDiscord<Phil> In reply to @voidwalker "what do you think": In what context? For making a SELECT query? Or for table creation?
20:18:05FromDiscord<!Patitotective> (edit) "you should create ... vertical" added "a"
20:18:07FromDiscord<Elegantbeef> Probably with `{.expand: false.}`
20:19:31FromDiscord<voidwalker> @Phil something like this: if db.getAllRows(sql"SELECT name FROM sqlite_master WHERE type='table' AND name=?",tbName).len > 0:
20:19:46FromDiscord<voidwalker> (edit) "@Phil something like this: if db.getAllRows(sql"SELECT name FROM sqlite_master WHERE type='table' AND name=?",tbName).len > 0:" => "sent a code paste, see https://play.nim-lang.org/#ix=45w2"
20:21:02FromDiscord<ghoom> `cannot prove that it's safe to initialize 'ownerPublicKey' with the runtime value for the discriminator 'remote'`↵i'm trynna instanciate an object inside a function with a parameter being passed to the discriminator
20:21:10reversem3[m]I get a 504 error with the play link Beef
20:21:11FromDiscord<ghoom> `remote` is bool
20:21:18reversem3[m]is it vertBox ?
20:21:27reversem3[m]or BoxVert?
20:21:41FromDiscord<Elegantbeef> Why are you using matrix but not getting a rich text experience! 😛
20:22:08FromDiscord<Elegantbeef> https://hatebin.com/ukwpgllcwo
20:22:36FromDiscord<Elegantbeef> There you go
20:22:56FromDiscord<voidwalker> sent a code paste, see https://play.nim-lang.org/#ix=45w7
20:23:14FromDiscord<voidwalker> but that would uselessly select all rows
20:23:17FromDiscord<Phil> sent a code paste, see https://paste.rs/0D3
20:23:34FromDiscord<voidwalker> if table does not exist, execute this code
20:23:52FromDiscord<Phil> The most straightforward approach to this would be to just handle the exception
20:24:31FromDiscord<Phil> Exception handling is nothing evil and in this case that's a failure scenario that you can anticipate.
20:24:37FromDiscord<voidwalker> there's several queries involved, so I'd rather have it all in an if block
20:24:59FromDiscord<voidwalker> like, if it's already been done, don't touch it
20:25:28reversem3[m]Yeah I had that already https://hatebin.com/fqeqsmdyym
20:25:59FromDiscord<Elegantbeef> You have a horizontal box with a vertical box after
20:26:04FromDiscord<Elegantbeef> So your label will be on the left and your other box on the right
20:26:14FromDiscord<Elegantbeef> move the label into the `Box(orient = OrientX)`
20:27:26FromDiscord<Phil> In reply to @voidwalker "like, if it's already": If it's fine that it's a separate query, just use "EXISTS"↵That checks for you whether whatever subquery you're firing returns 0 or 1+ rows, if the number of rows is 0 it evaluates to false, else to true
20:29:17FromDiscord<wiga> how can i get rid of that? https://media.discordapp.net/attachments/371759389889003532/1000862256701112350/unknown.png
20:29:28FromDiscord<wiga> i dont really see the problem in my code
20:29:43FromDiscord<wiga> saying its at the socket.connect line but why
20:29:53FromDiscord<Require Support> In reply to @lantos "also jsony is library": +1 for jsony, was exactly what I was looking for
20:36:40FromDiscord<Phil> sent a code paste, see https://play.nim-lang.org/#ix=45wg
20:36:57FromDiscord<Phil> (edit) "https://play.nim-lang.org/#ix=45wg" => "https://play.nim-lang.org/#ix=45wh"
20:37:29FromDiscord<voidwalker> after struggling with Rows for 2 weeks, you want me to forget them ? : P
20:38:06FromDiscord<Phil> In reply to @voidwalker "after struggling with Rows": I always want to forget them whenever I can.↵Literally asking enthus1ast for support of optional types so that I can forget about them even harder
20:38:37FromDiscord<voidwalker> so you mean I must rewrite all that spaghetti SQL I worked on so far :\
20:41:59FromDiscord<Phil> sent a long message, see http://ix.io/45wi
20:42:58FromDiscord<voidwalker> the thing is, I've been hacking away at the import database so far, but no idea how exactly I will use the data further on. Maybe I will come to the conclusion that I will need it in a highly structured way, so nisane mini orm will be preferable
20:44:06FromDiscord<Phil> ~~Just wait, there's still hope I can convince moigagoo to include a nisane-like functionality into norm, he still hasn't shot down the issue I opened up for that~~
20:54:32FromDiscord<voidwalker> no hope ? :\
21:17:25reversem3[m]Beef https://hatebin.com/rqtlugdqwl
21:17:57reversem3[m]So I put the label in OrientX and the Entry to OrientX but still have the entry on the right
21:18:48FromDiscord<Elegantbeef> https://hatebin.com/cydumpupgj
21:24:30FromDiscord<Phil> In reply to @voidwalker "no hope ? :\": ? No hope for what?
21:24:36FromDiscord<Elegantbeef> Boxes oriented X are horizontal layout groups, boxes oriented y are vertical layout groups
21:34:24reversem3[m]Hey thanks , can you add_left to a box and not a header ?
21:36:01*reversem3[m] uploaded an image: (948KiB) < https://libera.ems.host/_matrix/media/r0/download/matrix.org/TSXzEssqYlLTgKzumTZGKqWS/image.png >
21:41:18reversem3[m]ok why does the box have to be aligned with the header_bar?
21:47:14FromDiscord<Elegantbeef> I dont really know owlkettle much i know the author is on discord if you want to ping them(they've chatted in #appdev if your client lets you ping them)
21:48:02reversem3[m]#appdev in libera?
21:48:17FromDiscord<Elegantbeef> No clue the irc name
21:49:43reversem3[m]what is the author's nick ?
21:50:16FromDiscord<Elegantbeef> can.l
21:50:24FromDiscord<Elegantbeef> Oh actually i can ping him here 😄
21:50:42reversem3[m]oh cool
21:51:18FromDiscord<Elegantbeef> @can.l
21:51:30FromDiscord<Elegantbeef> No clue how long it'll take for them to respond, but they're very helpful
21:51:57reversem3[m]@can.I
21:52:49FromDiscord<Elegantbeef> Rev i do have to ask what client/protocol are you using?
22:00:38*CyberTailor quit (Write error: Connection reset by peer)
22:01:43*CyberTailor joined #nim
22:05:16*CyberTailor quit (Excess Flood)
22:06:04*CyberTailor joined #nim
22:07:13*jmdaemon quit (Quit: ZNC 1.8.2 - https://znc.in)
22:09:58*jmdaemon joined #nim
22:13:08*CyberTailor quit (Excess Flood)
22:14:06*CyberTailor joined #nim
22:14:37FromDiscord<!Patitotective> In reply to @reversem3 "#appdev in libera?": it should be
22:14:52FromDiscord<!Patitotective> or #nim-appdev
22:15:59FromDiscord<can.l> add_right is only available for HeaderBars. You can use the expand property to emulate its effect in boxes.
22:18:14reversem3[m]Like expand left?
22:18:42FromDiscord<can.l> A quick „hack“ for aligning a widget on the right is adding an empty label and setting expand: false
22:19:07FromDiscord<Elegantbeef> `expand: true` will make it expand to divide space evenly with other components, `expand: false` makes it only take up what it needs
22:20:28FromDiscord<can.l> sent a code paste, see https://play.nim-lang.org/#ix=45wD
22:20:50FromDiscord<can.l> This is not very nice, but should work for now.
22:22:43FromDiscord<ghoom> guys halp, `toFlatty` has a property count cap
22:23:02FromDiscord<ghoom> it won't work when properties exceed a certain number
22:23:15FromDiscord<ghoom> `template/generic instantiation of `toFlatty` from here`
22:23:23FromDiscord<ghoom> (edit) "`toFlatty`" => "toFlatty"
22:23:41FromDiscord<ghoom> (edit) "`template/generic instantiation of toFlatty from here`" => "sent a code paste, see https://play.nim-lang.org/#ix=45wE"
22:23:57FromDiscord<Elegantbeef> Code is more helpful than an error
22:24:01FromDiscord<Elegantbeef> Show the type and the line of code
22:25:55FromDiscord<ghoom> too much code
22:28:08FromDiscord<ghoom> sent a code paste, see https://play.nim-lang.org/#ix=45wF
22:28:15FromDiscord<ghoom> `...` is where all other types are defined
22:28:35FromDiscord<ghoom> (edit) "https://play.nim-lang.org/#ix=45wF" => "https://play.nim-lang.org/#ix=45wG"
22:28:54FromDiscord<ghoom> (edit) "https://play.nim-lang.org/#ix=45wG" => "https://play.nim-lang.org/#ix=45wH"
22:31:25FromDiscord<Zectbumo> new Google Carbon looks buggy https://media.discordapp.net/attachments/371759389889003532/1000892991503876237/unknown.png
22:31:26FromDiscord<Elegantbeef> What's the entire error
22:32:20FromDiscord<Elegantbeef> Zect i dont think they tested the code
22:32:32FromDiscord<ghoom> sent a code paste, see https://play.nim-lang.org/#ix=45wI
22:32:36FromDiscord<Elegantbeef> Well there is your issue
22:32:42FromDiscord<Elegantbeef> You're attempting to serialize a proc
22:32:49FromDiscord<Elegantbeef> `but expression 'x.zonedTimeFromTimeImpl' is of type: proc (x: Time): ZonedTime{.closure, gcsafe, locks: 0.}`
22:32:52FromDiscord<ghoom> bruh what
22:32:57FromDiscord<Elegantbeef> You need to use a custom hook for `DateTime`
22:33:17FromDiscord<ghoom> what does that mean?
22:34:12FromDiscord<Elegantbeef> Jsony allows you to define custom hooks for parsing/serializing
22:34:22FromDiscord<ghoom> like what is a hook?
22:34:28FromDiscord<Elegantbeef> A procedure
22:34:54FromDiscord<Elegantbeef> https://github.com/treeform/jsony/blob/master/src/jsony.nim#L63-L83 you can define custom logic like this
22:35:50FromDiscord<ghoom> but why can't flatty deal with DateTime's?
22:36:06FromDiscord<ghoom> pretty sure datetimes ain't procs
22:36:37FromDiscord<Elegantbeef> It contains procs
22:36:46FromDiscord<Elegantbeef> Look at the data type you're attempting to serialize
22:37:13FromDiscord<ghoom> ooh
22:37:40FromDiscord<ghoom> i think the better approach is to only store the timestamp
22:38:57FromDiscord<ghoom> nvm i used Time instead
22:39:01FromDiscord<ghoom> it worked
22:39:04FromDiscord<ghoom> 🐸👍
22:45:17*wallabra_ joined #nim
22:47:40*wallabra quit (Ping timeout: 260 seconds)
22:47:40*wallabra_ is now known as wallabra
22:51:15reversem3[m]<FromDiscord> "<can.l> sent a code paste, see..." <- Sorry play isn’t working right now
22:53:28FromDiscord<can.l> sent a long message, see http://ix.io/45wL
22:53:29FromDiscord<can.l> Can you see it now?
22:53:57reversem3[m]Got it thanks
22:54:10reversem3[m]So basically this is a hack
22:54:33reversem3[m]Will alignment change in the future
22:54:44FromDiscord<can.l> Yes. I actually do not know what the usual solution for this in GTK is.
22:55:26FromDiscord<can.l> Alignment will probably not change, maybe I add a "Spacer" widget for this purpose.
22:56:06FromDiscord<can.l> One way to make it a bit nicer is to wrap it in a custom widget.
22:56:14FromDiscord<can.l> viewable Spacer:
22:57:01FromDiscord<can.l> (edit) "viewable Spacer:" => "sent a long message, see http://ix.io/45wN"
22:57:17reversem3[m]Ok cool, love the framework by the way.
22:57:22FromDiscord<can.l> Now you could just write Spacer() {.expand: false.}
22:57:30FromDiscord<can.l> In reply to @reversem3 "Ok cool, love the": Thank you!
22:58:08reversem3[m]Hope to figure out a lot more so I can write some good docs.
23:00:21FromDiscord<can.l> That would be much appreciated! Currently most of the documentation is automatically generated (except for the tutorial and examples), so having some more resources for learning would be great.
23:00:56FromDiscord<Elegantbeef> Speaking of custom widgets, i wonder if it'd be silly to make them exported by default
23:01:34FromDiscord<Elegantbeef> It's a likely issue for people to run into i'd wager
23:01:47FromDiscord<can.l> Maybe we could just support the postfix syntax for exports.
23:01:53FromDiscord<Elegantbeef> Nope
23:01:59FromDiscord<Elegantbeef> Parser doesnt like it
23:02:17FromDiscord<can.l> Oh, interesting...
23:03:06FromDiscord<Elegantbeef> sent a code paste, see https://play.nim-lang.org/#ix=45wP
23:03:11FromDiscord<Elegantbeef> You can do prefix `` but it's not ideal
23:03:17FromDiscord<Elegantbeef> `myName` isnt great
23:03:18reversem3[m]Also any plans adding GKTwebkit?
23:03:51FromDiscord<can.l> sent a code paste, see https://play.nim-lang.org/#ix=45wR
23:04:16FromDiscord<Elegantbeef> What i've done before is something like myName, Exported\:\`
23:04:21FromDiscord<Elegantbeef> whoops
23:04:27FromDiscord<Elegantbeef> `something MyName, Exported:`
23:04:28FromDiscord<can.l> In reply to @reversem3 "Also any plans adding": I have never used it, so currently no. But theoretically it should be possible.
23:05:17reversem3[m]https://webkitgtk.org/
23:05:52FromDiscord<can.l> In reply to @Elegantbeef "`something MyName, Exported:`": Since exporting is probably the most common option, I think it should maybe be `viewable MyWidget {.private.}`.
23:06:33FromDiscord<Elegantbeef> Yea makes sense
23:08:35*wallabra_ joined #nim
23:11:11*wallabra quit (Ping timeout: 255 seconds)
23:11:12*wallabra_ is now known as wallabra
23:26:02FromDiscord<can.l> In reply to @reversem3 "https://webkitgtk.org/": I just tried to create a basic wrapper for webkitgtk. It seems like it does not support gtk4 yet however (https://discourse.gnome.org/t/webkitgtk-and-gtk4/5248).
23:27:22FromDiscord<can.l> This makes it incompatible with owlkettle, since I just recently updated it to gtk4.
23:46:27FromDiscord<carlosri> sent a code paste, see https://play.nim-lang.org/#ix=45wY
23:47:14FromDiscord<Elegantbeef> `selectElements` uses the `fields` iterator which does not work for object variants
23:48:39FromDiscord<carlosri> Does that mean I have to implement my own `==` procedure?
23:48:57FromDiscord<Elegantbeef> Yes
23:49:38FromDiscord<Elegantbeef> You could look at `disruptek/assume`'s typeit if you're lazy
23:56:58FromDiscord<Prestige> Any progress on the Wayland wrapper?
23:59:02FromDiscord<Elegantbeef> j-james and i have talked back and forth trying to get it up to snuff, but nothing today