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