00:02:49 | FromDiscord | <Elegantbeef> Fuck i've officially drank the wasm koolaid, a Kate contributor made a post on r/linux about using python for plugins and i suggest a wasm plugin system instead |
00:03:23 | * | wallabra_ joined #nim |
00:05:18 | FromDiscord | <Prestige> How does Nim <-> wasm look? |
00:05:34 | FromDiscord | <Elegantbeef> Get emcc and it's a single config |
00:05:38 | * | wallabra quit (Ping timeout: 240 seconds) |
00:05:38 | * | wallabra_ is now known as wallabra |
00:05:40 | FromDiscord | <Elegantbeef> Or use clang and it's a single config |
00:05:49 | FromDiscord | <Elegantbeef> Or use nlvm and it's a single config |
00:06:22 | FromDiscord | <voidwalker> Do I remember well or I can't use preparedSql + bindparams between sql"BEGIN" and sql"COMMIT" ? |
00:06:28 | FromDiscord | <Elegantbeef> https://github.com/beef331/wasmedge_playground/blob/master/wasmsources/hooks.nim this is an example of a module that talks to a wasm runtime |
00:07:05 | FromDiscord | <Elegantbeef> for emscripten you need to use `cgendecl` for procedures exported to the wasm runtime easily |
00:07:16 | FromDiscord | <Elegantbeef> Clang i think should just use `exportC` but i've yet to look into that |
00:07:46 | qwr | plugin system is pretty tough topic, but python technically quite slow and bloated, wasm or luajit should be lighter and much faster... |
00:07:46 | FromDiscord | <Elegantbeef> Ya'know what i need something to do so why not, let's get emscripten-less Nim -\> Wasm |
00:08:08 | FromDiscord | <Elegantbeef> I mean using wasm is better than python for a variety of reasons |
00:08:22 | qwr | wasm avoid language lock-in |
00:08:30 | FromDiscord | <Elegantbeef> Exactly! |
00:08:45 | FromDiscord | <Elegantbeef> I dont want to use your silly scripting language choice, i want to use what's comfortable to me |
00:09:27 | FromDiscord | <Prestige> How would you implement that say in our Wayland compositor so it has a wasm plugin engine? |
00:09:53 | FromDiscord | <Elegantbeef> https://github.com/beef331/aiarena/blob/master/src/core/wasmenvs.nim#L49-L68 |
00:10:32 | FromDiscord | <Prestige> Well that seems simple enough |
00:10:45 | * | qwr . o O ( about silly scripting language choices, VimScript is imho unbeatable... ) |
00:11:35 | FromDiscord | <Elegantbeef> YMMV i like Nim and it's mechanisms |
00:12:08 | FromDiscord | <Elegantbeef> If I can extend a language using the language i like using i'm a happy boy |
00:12:21 | FromDiscord | <Elegantbeef> It's why lapce is interesting to me |
00:12:30 | FromDiscord | <Elegantbeef> Vscode-like that uses wasm for extensions |
00:14:30 | FromDiscord | <Elegantbeef> And yea prestige, one think i'd like to look into for our wayland compositor is shipping nlvm |
00:15:21 | FromDiscord | <Elegantbeef> The big benefit there is that it'd be a self contained way to support even non programmers to tinker with any default modules, or to extend their own |
00:16:05 | * | Figworm quit (Quit: Figworm) |
00:16:44 | FromDiscord | <Elegantbeef> Being able to just make a new `goodwm/layouts/mynewlayout.nim` and have the compositor compile it on layout reload is just such a nice idea to me |
00:17:12 | FromDiscord | <Prestige> That would be pretty cool actually |
00:19:24 | FromDiscord | <Prestige> Looks like I'll be writing react again soon, gotta brush up on that... |
00:19:41 | FromDiscord | <Prestige> And maybe golang |
00:21:58 | FromDiscord | <!Patitotective> how do i get the unique elements of a sequence? |
00:23:03 | FromDiscord | <Prestige> Really depends on your use case, desired performance etc. But you can just iterate over a seq and add the elements to a Hashset |
00:23:23 | FromDiscord | <Prestige> Idk if there's some shortcut way of doing so |
00:23:29 | FromDiscord | <!Patitotective> sent a code paste, see https://play.nim-lang.org/#ix=45xb |
00:24:12 | FromDiscord | <Prestige> Probably won't be very fast with larger seqs |
00:24:41 | FromDiscord | <!Patitotective> https://nim-lang.org/docs/sequtils.html#deduplicate,openArray[T],bool lol |
00:25:54 | FromDiscord | <Prestige> Seems that does essentially the same thing, which is interesting |
00:26:20 | FromDiscord | <Prestige> Although I suppose the common case is not having very long sequences |
00:30:12 | FromDiscord | <Elegantbeef> Deduplicate probably doesnt use a hashset to reduce dependencies |
00:31:47 | FromDiscord | <!Patitotective> isnt hashset part of the standard library |
00:33:26 | FromDiscord | <Elegantbeef> Yes |
00:33:29 | FromDiscord | <Prestige> You still have to import it |
00:33:46 | FromDiscord | <Elegantbeef> Having parts of the stdlib depend on other parts makes it tedious to change |
00:34:00 | FromDiscord | <Elegantbeef> Alternatively someone just didnt think about using a set |
00:34:19 | * | summer left #nim (#nim) |
00:34:37 | FromDiscord | <carlosri> In reply to @Elegantbeef "You could look at": GRacias amigo |
00:34:47 | FromDiscord | <Prestige> I would think it'd make sense to have that impl live in the sets module |
00:35:51 | FromDiscord | <Elegantbeef> Yea an impl that returns the `HashSet[T]` 😛 |
00:36:01 | FromDiscord | <Elegantbeef> Though that's just `toHashSet` |
00:36:46 | FromDiscord | <ghoom> sent a code paste, see https://play.nim-lang.org/#ix=45xd |
00:37:10 | FromDiscord | <ghoom> sent a code paste, see https://play.nim-lang.org/#ix=45xe |
00:37:38 | FromDiscord | <Elegantbeef> `seconds` isnt exported |
00:38:17 | FromDiscord | <ghoom> how do i get them then? |
00:38:33 | FromDiscord | <Elegantbeef> Why do you need them? |
00:38:49 | FromDiscord | <ghoom> i wanna convert t into a millisecond timestamp |
00:39:31 | FromDiscord | <ghoom> nvm i can just use `toUnix` |
00:39:44 | FromDiscord | <Elegantbeef> There is also `format` |
00:41:57 | FromDiscord | <Elegantbeef> I imagine the reason those fields arent exported is they dont really make any sense to use |
00:53:20 | FromDiscord | <voidwalker> Do I remember well or I can't use preparedSql + bindparams between sql"BEGIN" and sql"COMMIT" ? |
00:53:56 | FromDiscord | <voidwalker> I need to insert binary data in db.. 9 mil rows. It will take forever like that |
01:30:39 | * | vicecea quit (Remote host closed the connection) |
01:31:59 | * | vicecea joined #nim |
01:53:41 | FromDiscord | <gibson> Why does `quote do` generate `gensym`s? Those often break what I'm trying to do, and I must overwrite them with regular `ident`s. |
01:54:03 | FromDiscord | <Elegantbeef> Cause it's hygenic |
01:54:12 | FromDiscord | <Elegantbeef> You can use `{.inject.}` if you need |
01:58:21 | FromDiscord | <gibson> Okay, what should I learn so I could have answered my question? I'm fuzzy on AST lingo and what's used where, and it only vaguely connects back to my formal training in compiler design. But I find macros still difficult here and there even after reading the manual and both books. Is it compiler design I need more of? Is it something specific about ASTs I've missed? |
01:58:53 | FromDiscord | <Elegantbeef> I mean the best way to learn how to write macros is to write them |
01:59:12 | FromDiscord | <gibson> Me going on 8 years of writing macros (poorly) 😆 |
01:59:15 | FromDiscord | <Elegantbeef> Nim's templates/genasts/quote do are all hygenic which means any new symbols declared are gensymd |
01:59:28 | FromDiscord | <Elegantbeef> Well shoot them to someone that knows how to write them and let them enlighten you |
02:00:48 | FromDiscord | <gibson> Thanks, every answer helps build that model.. |
02:07:59 | FromDiscord | <Prestige> Re: my question earlier, just did this https://github.com/avahe-kellenberger/seq2d/commit/c998c1f7654d858583b251ae4d12c2fe487bd262 @beef |
02:08:07 | FromDiscord | <Prestige> It's fine, I suppose |
02:08:17 | FromDiscord | <Elegantbeef> why not what i did? |
02:08:27 | FromDiscord | <Prestige> What'd you do? |
02:08:47 | FromDiscord | <Elegantbeef> sent a code paste, see https://play.nim-lang.org/#ix=45xt |
02:09:05 | FromDiscord | <Prestige> Didn't know reset was a thing, but also to sort of bypass the bounds checking |
02:09:31 | FromDiscord | <Elegantbeef> There are no bounds checks there |
02:09:41 | FromDiscord | <Prestige> True |
02:09:57 | FromDiscord | <Prestige> Wasn't sure how nim handles like |
02:10:02 | FromDiscord | <Prestige> the yielded item |
02:10:03 | FromDiscord | <Elegantbeef> I mean i guess it does check to ensure you dont mutate it |
02:10:14 | FromDiscord | <Elegantbeef> https://github.com/nim-lang/Nim/blob/version-1-6/lib/system/iterators.nim#L242 |
02:10:17 | FromDiscord | <Elegantbeef> But it only does that in debug |
02:10:46 | FromDiscord | <Prestige> like if you had a Seq2D[int] would that mitem actually be muted inside `this.data` |
02:11:36 | FromDiscord | <Elegantbeef> I dont follow |
02:12:34 | FromDiscord | <Prestige> oh you're operating on this.data |
02:12:49 | FromDiscord | <Elegantbeef> Of course |
02:13:47 | FromDiscord | <Prestige> That'd be better |
02:45:32 | FromDiscord | <KepKep> Hey so I'm trying to install nim to give it a shot , is there a way to check if I installed it correctly? it auto added the paths and everything but I can't compile and I'm pretty sure it's cause it didn't actually generate the .nimble folder when I ran the finish.exe |
02:47:21 | FromDiscord | <KepKep> https://media.discordapp.net/attachments/371759389889003532/1000957395884855326/unknown.png |
02:48:10 | FromDiscord | <KepKep> I have gcc installed from when I was fiddling with c but gcc doesn't compile it ether |
02:48:45 | FromDiscord | <Elegantbeef> `which nim` or `where nim` should show you nim if it's in your path |
02:48:51 | FromDiscord | <Elegantbeef> If it's not in your path you'll need to add it |
02:50:14 | * | arkurious quit (Quit: Leaving) |
02:53:11 | FromDiscord | <Prestige> or `command -v nim` |
02:56:22 | FromDiscord | <KepKep> nope not working for some reason, I'm a pretty bad at programming so I dunno what to do to fix it :PikaDerp: https://media.discordapp.net/attachments/371759389889003532/1000959667964481616/unknown.png |
02:56:36 | FromDiscord | <huantian> Maybe try restarting your pc? I have no idea how windows path works |
02:56:42 | FromDiscord | <Elegantbeef> On windows you need to restart it |
02:56:47 | FromDiscord | <KepKep> ah |
02:56:53 | FromDiscord | <KepKep> also why did it create like 3 paths for me |
02:56:57 | FromDiscord | <KepKep> :MonkaS: |
02:57:00 | FromDiscord | <Elegantbeef> There is some way to make it not restart but i dont recall how |
02:57:25 | FromDiscord | <Elegantbeef> Seems you installed it once then installed it again |
02:59:29 | FromDiscord | <KepKep> new errors now :PepeHands: https://media.discordapp.net/attachments/371759389889003532/1000960455474426016/unknown.png |
03:03:21 | FromDiscord | <# Luke> hmm whats nims default c compiler |
03:04:59 | FromDiscord | <Yardanico> In reply to @ripluke "hmm whats nims default": it depends on the platform, but on most that's GCC (except macOS where it's clang) |
03:05:38 | FromDiscord | <# Luke> hmm? when i tried explicitly defining gcc it gives avx2 erreors when compiling pixie |
03:06:02 | FromDiscord | <# Luke> it compiles fine normally |
03:06:04 | FromDiscord | <Yardanico> In reply to @KepKep "nope not working for": why do you have two different nim folders? |
03:06:06 | FromDiscord | <Yardanico> remove one of them and try again |
03:06:30 | FromDiscord | <huantian> There’s 3 Nim folders |
03:06:49 | FromDiscord | <Yardanico> lol |
03:07:07 | FromDiscord | <KepKep> In reply to @Yardanico "why do you have": already did and removed them from path too didn't help sadly |
03:08:24 | FromDiscord | <Yardanico> what's the error now? |
03:08:34 | FromDiscord | <KepKep> In reply to @KepKep "new errors now <:PepeHands:625122342577897473>": this |
03:08:36 | FromDiscord | <Yardanico> (and yeah, you have to reopen the cmd after doing the path manipulations) |
03:09:12 | FromDiscord | <Yardanico> In reply to @KepKep "this": well, you don't need to call gcc directly when you're using nim, but the nim error is weird |
03:09:26 | FromDiscord | <Yardanico> are you sure you restarted the cmd? maybe try re-logging to your user account? |
03:09:49 | FromDiscord | <KepKep> restarted pc and everything |
03:10:23 | FromDiscord | <Yardanico> can you show what do you have in the nim foldeR? |
03:10:25 | FromDiscord | <Yardanico> (edit) "foldeR?" => "folder?" |
03:10:34 | FromDiscord | <KepKep> the .nimble file has no bin inside it for whatever reason but the path it generated points towards a bin folder |
03:10:39 | FromDiscord | <Yardanico> the one you added to PATH, and outside of `bin` |
03:10:45 | FromDiscord | <KepKep> (edit) "file" => "folder" |
03:11:15 | FromDiscord | <KepKep> https://media.discordapp.net/attachments/371759389889003532/1000963414182604912/unknown.png |
03:11:39 | FromDiscord | <Yardanico> not this one |
03:11:42 | FromDiscord | <Yardanico> the nim folder |
03:11:48 | FromDiscord | <Yardanico> .nimble/bin is just for packages that have binaries when you install them |
03:11:58 | FromDiscord | <KepKep> https://media.discordapp.net/attachments/371759389889003532/1000963595850498108/unknown.png |
03:12:14 | FromDiscord | <Yardanico> and can you check what's in bin and in `lib` ? |
03:12:41 | FromDiscord | <KepKep> lots of funny files in bin https://media.discordapp.net/attachments/371759389889003532/1000963773504442459/unknown.png |
03:12:53 | FromDiscord | <KepKep> https://media.discordapp.net/attachments/371759389889003532/1000963824540729498/unknown.png |
03:13:02 | FromDiscord | <Yardanico> In reply to @KepKep "": hmm, maybe try running finish.exe? It adds nim to path too, but maybe it'll work correctly |
03:14:04 | FromDiscord | <KepKep> nope still same issue |
03:14:24 | FromDiscord | <KepKep> https://media.discordapp.net/attachments/371759389889003532/1000964206117519360/unknown.png |
03:15:14 | FromDiscord | <# Luke> Is there any example of nim GitHub actions? |
03:16:46 | FromDiscord | <KepKep> I guess I'll just try deleting everything restarting and downloading fresh |
03:17:31 | FromDiscord | <Yardanico> In reply to @ripluke "Is there any example": https://github.com/jiro4989/setup-nim-action |
03:19:18 | FromDiscord | <# Luke> Like how can I get it to compile a binary for like Windows Mac and Linux and then create a release with those binaries |
03:21:05 | FromDiscord | <!Patitotective> https://github.com/Patitotective/ImTemplate/blob/main/.github/workflows/build.yml |
03:21:19 | FromDiscord | <# Luke> ok |
03:21:58 | FromDiscord | <!Patitotective> notice that it uploads them to the release that workflow was activated with |
03:23:17 | FromDiscord | <huantian> <https://github.com/huantianad/levelsync/blob/master/.github/workflows/main.yml> |
03:23:23 | FromDiscord | <huantian> if you want an overcomplicated one |
03:24:07 | FromDiscord | <!Patitotective> In reply to @huantian "<https://github.com/huantianad/levelsync/blob/maste": you could have done that in a nimble task :] |
03:24:17 | FromDiscord | <# Luke> In reply to @Patitotective "notice that it uploads": wdym |
03:24:29 | FromDiscord | <KepKep> okay I guess I just clicked too fast or something somewhere on my first install attempt or maybe it was shting itself cause instead of cutting the folder and placing where I want it I copied hence the multiple paths , it finally compiled and ran :peepoBlush: |
03:24:36 | FromDiscord | <huantian> In reply to @Patitotective "you could have done": but look how cool this is https://media.discordapp.net/attachments/371759389889003532/1000966775472652318/unknown.png |
03:24:41 | FromDiscord | <KepKep> https://media.discordapp.net/attachments/371759389889003532/1000966792669315182/unknown.png |
03:25:05 | FromDiscord | <!Patitotective> In reply to @ripluke "wdym": that worflow is activated on the `released` event↵meaning when you create a release, assets are uploaded to that release |
03:25:12 | FromDiscord | <!Patitotective> In reply to @huantian "but look how cool": youve got reason |
03:25:26 | FromDiscord | <KepKep> I stumbled upon Vim like 30 minutes ago while deciding if I really wanna learn c or not |
03:25:26 | FromDiscord | <# Luke> In reply to @Patitotective "that worflow is activated": ohh |
03:25:43 | FromDiscord | <KepKep> and this language looks like a very weird but interesting hybrid of python with the speed of c |
03:25:47 | FromDiscord | <# Luke> In reply to @Patitotective "that worflow is activated": and can i cross compile? |
03:25:50 | FromDiscord | <KepKep> at least that's how I understood it |
03:26:01 | FromDiscord | <KepKep> and I heckin love indent based languages |
03:26:06 | FromDiscord | <KepKep> I'm weird like that |
03:26:30 | FromDiscord | <!Patitotective> In reply to @ripluke "and can i cross": of course↵you can run jobs in different hosts, my workflow does that |
03:26:37 | FromDiscord | <# Luke> okie |
03:26:38 | FromDiscord | <huantian> In reply to @Patitotective "you could have done": also it's more ✨reproducable ❇️ |
03:26:55 | FromDiscord | <!Patitotective> In reply to @KepKep "and this language looks": it has lots of more features like macros :] |
03:27:18 | FromDiscord | <Elegantbeef> Just dont expect it to be like writing python |
03:27:25 | FromDiscord | <Yardanico> exactly what I wanted to say ^ |
03:27:31 | FromDiscord | <Yardanico> it might look similar to python at first glance but it's not |
03:27:38 | FromDiscord | <Elegantbeef> It differs a lot, syntax similarities aside |
03:27:55 | FromDiscord | <Yardanico> so don't expect it to just be like compiled python, |
03:27:57 | FromDiscord | <Yardanico> (edit) "python," => "python" |
03:27:59 | FromDiscord | <KepKep> I'm a learning junkie , I have learned a little bit of basically everything but no language actually sticks to me rust for example looks cool and all but after reading for days and stuff I still struggle writing even the most basic things :PepeHands: |
03:28:04 | FromDiscord | <!Patitotective> In reply to @Elegantbeef "Just dont expect it": python code is unreadable, how are parameters untyped and you can't know if they're variable or not????? thats horrible |
03:28:08 | FromDiscord | <Elegantbeef> I personally find the "Compiled python" tagline some people say very misrepresenting, but some people like it 😄 |
03:28:20 | FromDiscord | <huantian> In reply to @Patitotective "python code is unreadable,": thats why you type your python |
03:28:26 | FromDiscord | <huantian> untyped python is bad python |
03:28:32 | FromDiscord | <Elegantbeef> Well i'm not going to type python |
03:28:38 | FromDiscord | <Elegantbeef> So dont tell me to type my untyped python |
03:28:51 | FromDiscord | <KepKep> I was about to start learning C but vim popped up in my youtube recomendations |
03:28:58 | FromDiscord | <KepKep> so here I am sleep deprived |
03:28:59 | FromDiscord | <Yardanico> it's nim, not vim |
03:29:03 | FromDiscord | <Yardanico> vim is an editor |
03:29:06 | FromDiscord | <!Patitotective> it's neovim, not nim |
03:29:06 | FromDiscord | <KepKep> yep |
03:29:08 | FromDiscord | <Yardanico> you are writing it "vim" for the second time already |
03:29:11 | FromDiscord | <KepKep> exactly what I mean |
03:29:11 | FromDiscord | <Elegantbeef> Hey maybe they seen someone writing Nim with vim |
03:29:22 | FromDiscord | <KepKep> this is what 20 hours of no sleep does to a mf |
03:29:24 | FromDiscord | <KepKep> :OMEGALUL: |
03:29:29 | FromDiscord | <!Patitotective> with nitro |
03:29:32 | FromDiscord | <# Luke> like me :P |
03:29:33 | FromDiscord | <Elegantbeef> Fuck i was going to try to use clang to generate Nim |
03:29:34 | FromDiscord | <KepKep> sorry it's not intentional |
03:29:42 | FromDiscord | <KepKep> Vim and nim are literally one letter off |
03:30:14 | FromDiscord | <# Luke> yaml is so fun :< |
03:30:21 | FromDiscord | <KepKep> inb4 I get banned cause my autopilot brain keeps calling it vim instead of nim |
03:30:33 | FromDiscord | <!Patitotective> In reply to @ripluke "yaml is so fun": toml 😎 |
03:30:33 | FromDiscord | <KepKep> but yeah |
03:30:54 | FromDiscord | <# Luke> In reply to @Patitotective "toml 😎": toml is nice |
03:31:01 | FromDiscord | <# Luke> so is json |
03:31:17 | FromDiscord | <KepKep> hey guys , I'm a weird fellow that keeps learning a bit of every language and nothing sticks to me so I hope this one does :MokoThumbsUp: I go try to sleep for like the 6th time now that nim is installed and I can learn tomorrow |
03:31:19 | FromDiscord | <!Patitotective> nah, json's not nice |
03:31:34 | FromDiscord | <KepKep> thank for tha help |
03:31:42 | FromDiscord | <# Luke> In reply to @Patitotective "nah, json's not nice": It has braces so it’s alot more readable than yank |
03:31:45 | FromDiscord | <# Luke> (edit) "yank" => "yaml" |
03:31:58 | FromDiscord | <!Patitotective> it has quotes everywhere and no comments |
03:32:25 | FromDiscord | <# Luke> In reply to @Patitotective "it has quotes everywhere": Yea the comment thing i can agree with |
03:32:35 | FromDiscord | <Rika> In reply to @ripluke "It has braces so": Well that’s preference for everyone isn’t it |
03:32:36 | FromDiscord | <# Luke> I don’t mind the quotes |
03:32:52 | FromDiscord | <Rika> Readability depends a lot on the person reading 🙂 |
03:32:53 | FromDiscord | <!Patitotective> In reply to @Rika "Well that’s preference for": you make a yaml file to config you want to write yaml |
03:33:02 | FromDiscord | <!Patitotective> In reply to @Rika "Readability depends a lot": with or without glasses |
03:33:07 | FromDiscord | <# Luke> Lmao |
03:33:10 | FromDiscord | <!Patitotective> (edit) "In reply to @Rika "Well that’s preference for": you make a yaml file to config ... you" added "how" |
03:33:29 | FromDiscord | <Rika> In reply to @Patitotective "you make a yaml": I never want to use YAML, not because it’s “ugly”, but because it’s a pain to parse and has a lot of gotchas and inconsistencies |
03:34:03 | FromDiscord | <!Patitotective> hmmm, i really don't like strings _sometimes_ being written without quotes |
03:34:05 | FromDiscord | <# Luke> Can I make nim compile for other platforms? Instead of manually changing the os |
03:34:24 | FromDiscord | <!Patitotective> In reply to @ripluke "Can I make nim": of course you can↵https://nim-lang.org/docs/nimc.html#crossminuscompilation |
03:34:24 | FromDiscord | <# Luke> Like can I make nim compile a windows binary on Ubuntu |
03:34:26 | FromDiscord | <Yardanico> yes, but then you need a C compiler for that other platform |
03:34:29 | FromDiscord | <# Luke> Ok |
03:34:33 | FromDiscord | <Yardanico> In reply to @ripluke "Like can I make": that's pretty simple, with mingw it's easy, yes |
03:34:50 | FromDiscord | <Yardanico> but things like windows -> linux or linux -> macos are more complicated |
03:35:04 | FromDiscord | <Yardanico> linux -> windows is the easiest cross-compilation you can do I think |
03:35:09 | FromDiscord | <!Patitotective> if github actions allow you to select the host, why not? |
03:35:16 | FromDiscord | <Yardanico> yes that's true |
03:35:43 | FromDiscord | <# Luke> In reply to @Yardanico "but things like windows": Can’t I use clang to compile for Mac? |
03:35:55 | FromDiscord | <Yardanico> but you need to find a clang compiler that outputs mac binaries |
03:35:56 | FromDiscord | <!Patitotective> you can do everything else with `when defined(Windows)` in a nimble task |
03:36:12 | FromDiscord | <Yardanico> i mean zig cc can work for linux -> macos probably, but only for simpler cases |
03:36:16 | FromDiscord | <# Luke> In reply to @Patitotective "you can do everything": That’s what I’m planning on doing |
03:36:33 | FromDiscord | <# Luke> In reply to @Yardanico "i mean zig cc": O.o that might work |
03:36:39 | FromDiscord | <# Luke> But not on my pc |
03:36:52 | FromDiscord | <# Luke> Cuz I don’t have avx and zig needs it |
03:37:07 | FromDiscord | <# Luke> Hmm so I’ll probably just change os |
03:37:26 | FromDiscord | <!Patitotective> what are you compiling luke? 👀 |
03:37:34 | FromDiscord | <Yardanico> In reply to @ripluke "Cuz I don’t have": huh, wat? |
03:37:46 | FromDiscord | <# Luke> Compiling pixie doesn’t work |
03:37:51 | FromDiscord | <# Luke> I can send the output |
03:37:55 | FromDiscord | <Rika> That’s not Zig then |
03:38:07 | FromDiscord | <Rika> Pixie doesn’t require AVX iirc though |
03:38:32 | FromDiscord | <# Luke> In reply to @Rika "That’s not Zig then": It is lol |
03:38:51 | FromDiscord | <Yardanico> In reply to @ripluke "It is lol": what? |
03:39:08 | FromDiscord | <Yardanico> pixie is a nim image library, and zig is a language (zig cc is the clang-based cross-compiler) |
03:39:15 | FromDiscord | <Yardanico> they're completely unrelated |
03:39:27 | FromDiscord | <# Luke> I’m using zig to compile pixie |
03:39:38 | FromDiscord | <Yardanico> but what error do you get? |
03:39:45 | FromDiscord | <Yardanico> and why do you set gcc mode when you're clearly compiling with zig cc |
03:39:46 | FromDiscord | <Yardanico> which is clang |
03:39:53 | FromDiscord | <# Luke> I’ll send it |
03:41:44 | FromDiscord | <# Luke> https://pastebin.com/GH1Kxw54 |
03:41:57 | FromDiscord | <# Luke> the comments are the 2 commands i used |
03:42:23 | FromDiscord | <Yardanico> can you try using --cc:clang and instead create a wrapper script for zig cc? |
03:42:26 | FromDiscord | <Yardanico> so it doesn't have spaces |
03:42:36 | FromDiscord | <Yardanico> and then do `nim c --cc:clang --clang.exe:"zigccwrapperscriptname"` |
03:42:42 | FromDiscord | <# Luke> ok |
03:42:57 | FromDiscord | <!Patitotective> (you can do `CC="zigcc" nim --cc:env -d:release c src/dye.nim` btw) |
03:43:23 | FromDiscord | <Yardanico> sent a code paste, see https://play.nim-lang.org/#ix=45xX |
03:43:23 | FromDiscord | <# Luke> Yup |
03:43:26 | FromDiscord | <Yardanico> don't forget to make it executable of course |
03:43:34 | FromDiscord | <# Luke> It is |
03:44:34 | FromDiscord | <# Luke> It seems to be working but it’s not done yet |
03:45:07 | FromDiscord | <# Luke> Yup it’s done! |
03:45:11 | FromDiscord | <# Luke> No errors |
03:57:48 | * | krux02 quit (Remote host closed the connection) |
04:02:39 | FromDiscord | <ghoom> is there an std proc to parse an integer string in an arbitrary base? |
04:03:40 | FromDiscord | <!Patitotective> In reply to @ghoom "is there an std": i don't think there is, don't you know the base of the integer? |
04:03:59 | FromDiscord | <ghoom> ofc |
04:04:28 | FromDiscord | <!Patitotective> what is it |
04:05:03 | FromDiscord | <ghoom> 36 |
04:05:34 | FromDiscord | <ghoom> (edit) "36" => "62" |
04:05:49 | FromDiscord | <ghoom> 0 to z |
04:07:02 | FromDiscord | <!Patitotective> there's this thing https://github.com/singularperturbation/base62-encode |
04:07:21 | FromDiscord | <!Patitotective> not sure how difficult would it be to implement a arbitrary-base-decoder |
04:07:50 | FromDiscord | <ghoom> i just found out about `std/base64` |
04:07:57 | FromDiscord | <ghoom> i guess that'll do |
04:08:11 | FromDiscord | <!Patitotective> but thats not 62 |
04:08:29 | FromDiscord | <ghoom> ye it's fine i didn't strictly want arbitrary-base parsing |
04:08:39 | FromDiscord | <ghoom> i just asked to see my options |
04:08:49 | FromDiscord | <ghoom> 🐸👍 |
04:10:26 | FromDiscord | <!Patitotective> https://github.com/D-Nice/nbaser |
04:10:41 | FromDiscord | <ghoom> 😮 |
04:20:13 | * | reversem3[m] uploaded an image: (958KiB) < https://libera.ems.host/_matrix/media/r0/download/matrix.org/KHPWWmrCGQUVLqsRepbVNaNg/image.png > |
04:20:14 | reversem3[m] | @can.I -- |
04:20:30 | reversem3[m] | using orientX didn't really work |
04:22:30 | FromDiscord | <!Patitotective> I don't think he got pinged @can.l |
04:24:17 | reversem3[m] | I think I figured it out |
04:42:44 | FromDiscord | <ghoom> In reply to @reversem3 "I think I figured": if you wanna ping someone from there you need their ids, then write `<@ID>` |
04:42:53 | FromDiscord | <ghoom> (edit) "ids," => "id," |
04:43:04 | FromDiscord | <ghoom> (edit) "In reply to @reversem3 "I think I figured": if you wanna ping someone from there you need their ... id," added "discord" |
04:43:07 | FromDiscord | <ghoom> ¯\_(ツ)_/¯ |
04:44:17 | FromDiscord | <Elegantbeef> Fuck it didnt save |
04:44:18 | FromDiscord | <Elegantbeef> I couldnt help myself rev 😛 https://hatebin.com/ |
04:44:43 | FromDiscord | <Rika> The bridge should automatically convert text into pings iirc |
04:44:53 | FromDiscord | <Rika> In reply to @Elegantbeef "I couldnt help myself": You sent nothing lol |
04:49:38 | FromDiscord | <Elegantbeef> https://gdl.space/ubekikoyoq.cs a paste site that actually worked |
04:50:40 | FromDiscord | <# Luke> How can I get the item of a tuple that matches the value of a variable |
04:51:16 | FromDiscord | <Rika> Fake units lmao |
04:51:20 | FromDiscord | <Elegantbeef> sent a code paste, see https://play.nim-lang.org/#ix=45y5 |
04:51:26 | FromDiscord | <Rika> Fahrenheit is how it is spelled |
04:51:32 | FromDiscord | <Elegantbeef> I try |
04:51:42 | FromDiscord | <# Luke> sent a code paste, see https://play.nim-lang.org/#ix=45y6 |
04:51:55 | FromDiscord | <Elegantbeef> Wait i spelled it correctly in my joke comment? |
04:51:59 | FromDiscord | <Rika> No |
04:52:11 | FromDiscord | <Elegantbeef> Aw shit h and r were swapped |
04:52:14 | FromDiscord | <Elegantbeef> See |
04:52:14 | FromDiscord | <Rika> Lol |
04:52:48 | FromDiscord | <Elegantbeef> Luke what are you actually after |
04:53:01 | * | estiquelapice quit () |
04:53:15 | FromDiscord | <# Luke> The value in a tuple that matches the input that the user provided |
04:53:38 | FromDiscord | <Elegantbeef> So the user gave an input you want to get what value from what tuple? |
04:53:59 | FromDiscord | <# Luke> Wait I think I got it |
04:54:03 | FromDiscord | <Elegantbeef> Fuck i thought clang -\> wasm was going to be less of a abrasive path than emcc |
04:54:19 | FromDiscord | <huantian> is it not |
04:54:19 | FromDiscord | <Rika> Lol |
04:54:44 | FromDiscord | <Elegantbeef> I'm reading you need clang, wasm-libc, and a sysroot |
04:55:02 | FromDiscord | <Elegantbeef> I figured the sysroot was installed with wasm-libc but clang doesnt care about me apparently |
04:55:16 | FromDiscord | <Elegantbeef> sent a code paste, see https://play.nim-lang.org/#ix=45y9 |
04:55:42 | FromDiscord | <Elegantbeef> I know that's where my wasm32-wasi headers are, but i guess that doesnt matter? |
04:56:28 | * | reversem3[m] uploaded an image: (987KiB) < https://libera.ems.host/_matrix/media/r0/download/matrix.org/WbBTvAIphrheMcqNpbmOpefH/image.png > |
04:56:30 | FromDiscord | <Elegantbeef> Hmph |
04:56:43 | FromDiscord | <Elegantbeef> Replacing `--sysroot` with `-I` makes it compile |
04:56:56 | FromDiscord | <Elegantbeef> Ah that's what you're doing |
04:57:03 | reversem3[m] | can.I - How do I get rid of the bulky entry box on the left hand side? |
04:57:36 | FromDiscord | <Elegantbeef> image.png https://media.discordapp.net/attachments/371759389889003532/1000990179366027294/image.png |
04:57:37 | FromDiscord | <Elegantbeef> For reference mine emitted |
04:57:54 | reversem3[m] | * can.I - How do I get rid of the bulky entry box on the left hand side? |
04:58:01 | * | reversem3[m] uploaded an image: (987KiB) < https://libera.ems.host/_matrix/media/r0/download/matrix.org/aGuOVkvEHyKrEQrwJhZCJUKh/image.png > |
04:58:48 | reversem3[m] | Beef did you see the difference between the two entry boxes ? |
04:58:55 | FromDiscord | <Elegantbeef> Yea i see |
04:58:59 | FromDiscord | <Elegantbeef> I dont know why there is a difference |
04:59:32 | FromDiscord | <Elegantbeef> Actually it's due to the spacing i'd wager |
04:59:34 | reversem3[m] | lol me either , frustrating .. the only thing I can think of its inheriting the label properties |
04:59:44 | FromDiscord | <Elegantbeef> Can you not put the left side in it's own box aswell? |
05:00:20 | reversem3[m] | left side is in its own box |
05:00:34 | FromDiscord | <Elegantbeef> Not in the code on your right |
05:00:39 | FromDiscord | <Elegantbeef> You have a box compassing both |
05:01:20 | FromDiscord | <Elegantbeef> If you do `Box(orient = OrienetX, margin = 12, spacing = 10): Entry... Label...` it might work |
05:01:24 | reversem3[m] | Yeah I know. I tried but I can't after the label = " = " |
05:01:29 | FromDiscord | <Elegantbeef> One lining that to save you a click |
05:01:47 | FromDiscord | <Elegantbeef> What happens when you do a `Box Label Box`? |
05:02:50 | reversem3[m] | hmm Box: Label box |
05:03:06 | FromDiscord | <Elegantbeef> Also i do have to ask, how the hell are you talking to us here, it says matrix in your name it looks like you're using matrix to upload images, but you're going through a Matrix -\> Libera -\> Discord -\> Matrix for me 😄 |
05:04:07 | * | dom96 quit (*.net *.split) |
05:04:07 | * | void09 quit (*.net *.split) |
05:04:28 | * | void09 joined #nim |
05:04:49 | * | dom96 joined #nim |
05:05:15 | * | reversem3[m] uploaded an image: (1022KiB) < https://libera.ems.host/_matrix/media/r0/download/matrix.org/FHQaItPwVdZLCxkbfnBlSjCD/image.png > |
05:05:31 | reversem3[m] | Through IRC |
05:05:35 | FromDiscord | <Elegantbeef> Can you send the code please |
05:05:44 | reversem3[m] | No , doesn't change ... sure |
05:07:03 | reversem3[m] | https://hatebin.com/lpcnwynjju |
05:07:34 | * | arkanoid quit (*.net *.split) |
05:07:34 | * | ldlework quit (*.net *.split) |
05:07:34 | * | v9fk quit (*.net *.split) |
05:07:34 | * | blackbeard420 quit (*.net *.split) |
05:07:35 | * | oisota quit (*.net *.split) |
05:07:53 | * | blackbeard420 joined #nim |
05:08:01 | reversem3[m] | Do you need me to change to straight Matrix ? |
05:08:08 | * | arkanoid joined #nim |
05:08:15 | * | v9fk joined #nim |
05:08:16 | * | oisota joined #nim |
05:08:26 | FromDiscord | <reversem3> Hows that |
05:08:37 | FromDiscord | <Elegantbeef> I dont need you to but it makes life easier |
05:08:44 | FromDiscord | <huantian> are we having a matrix party |
05:08:55 | * | hexeme joined #nim |
05:09:14 | FromDiscord | <reversem3> I'll post on both IRC and Matrix and make it fun ! |
05:09:52 | FromDiscord | <reversem3> add discord too /j/k |
05:10:44 | FromDiscord | <Elegantbeef> The nice part about using matrix is we can just write the code blocks and you can see them 😄 |
05:12:47 | FromDiscord | <Elegantbeef> image.png https://media.discordapp.net/attachments/371759389889003532/1000994001303900250/image.png |
05:12:52 | FromDiscord | <Elegantbeef> Was this the issue you were talking about? |
05:13:35 | * | ephaptic joined #nim |
05:14:25 | * | ephaptic quit (Quit: WeeChat 3.6) |
05:16:40 | FromDiscord | <reversem3> ohh , thats what you where talking about , ok very cool... So why does that work then ? |
05:18:25 | FromDiscord | <# Luke> does ubuntu ship with tar and gzip? |
05:20:34 | FromDiscord | <Elegantbeef> It works cause boxes are basic "Layout the elements inside in this orientation, expanding if they ask" |
05:21:32 | FromDiscord | <reversem3> So boxes inside boxes ? |
05:21:36 | FromDiscord | <Elegantbeef> When you do `Box(orient = OrientX)` you're saying "Put all elements inline with default spacing and margins" so when you had the one box nested it had the even less space |
05:21:51 | FromDiscord | <Elegantbeef> Cause it had spacing/margin which reduced it's internal elements space |
05:22:48 | FromDiscord | <reversem3> Damn ok , well thank you I learned a lot |
05:23:12 | FromDiscord | <Elegantbeef> sent a code paste, see https://play.nim-lang.org/#ix=45yd |
05:23:13 | FromDiscord | <reversem3> I wonder how I can do that better then |
05:23:17 | FromDiscord | <Elegantbeef> Indistinguishable rather |
05:23:58 | FromDiscord | <Elegantbeef> image.png https://media.discordapp.net/attachments/371759389889003532/1000996813098209350/image.png |
05:23:58 | FromDiscord | <Elegantbeef> It emits this |
05:24:46 | FromDiscord | <reversem3> That look a lot more cleaner |
05:25:13 | FromDiscord | <reversem3> I guess I thought I needed multiple boxes |
05:25:31 | FromDiscord | <Elegantbeef> If you want elements inline in a single direction it does not |
05:25:46 | FromDiscord | <Elegantbeef> It's when you want thinks shared on a single axis you need them |
05:25:55 | FromDiscord | <Elegantbeef> things\ |
05:27:20 | FromDiscord | <Elegantbeef> image.png https://media.discordapp.net/attachments/371759389889003532/1000997660985135206/image.png |
05:27:25 | FromDiscord | <Elegantbeef> Stuff like this(stole from gnome-terminal) |
05:28:01 | FromDiscord | <Elegantbeef> To replicate this you'd do a `Box(orient = OrientY)` then nest `Box(orient = OrientX)` for those sub elements in each row |
05:28:44 | FromDiscord | <Elegantbeef> Probably actually use a ListBox or similar but that's a minor technical difference |
05:28:47 | FromDiscord | <KepKep> My brain keeps correcting nim to vim |
05:29:03 | FromDiscord | <KepKep> I'm googling questions about vim when thinking of nim |
05:29:04 | FromDiscord | <KepKep> help |
05:29:07 | FromDiscord | <Elegantbeef> Main thing to take away from this is boxes are used to nest orientation or sizing |
05:31:57 | FromDiscord | <reversem3> Actually I noticed that the boxes are not the same |
05:32:33 | FromDiscord | <Elegantbeef> They are |
05:32:45 | FromDiscord | <Elegantbeef> Selected boxes shrink a bit |
05:33:13 | FromDiscord | <reversem3> yep your right , my bad I see it now |
05:33:21 | FromDiscord | <reversem3> Contacts are drying out |
05:34:08 | FromDiscord | <reversem3> Ok now do write the proc for F and C and I'll have a working sample |
05:34:18 | FromDiscord | <Elegantbeef> Feel free to steal from my code 😄 |
05:34:29 | FromDiscord | <Elegantbeef> fuck i love distinct types for units |
05:34:57 | FromDiscord | <reversem3> Nah I have my own calculations for temperature |
05:35:19 | FromDiscord | <reversem3> I just use a float and parse int |
05:35:26 | FromDiscord | <Elegantbeef> That's what i do aswell |
05:35:32 | FromDiscord | <Elegantbeef> Indirectly 😛 |
05:37:23 | FromDiscord | <reversem3> lol |
05:37:58 | FromDiscord | <Elegantbeef> I actually do wonder if a parseFloat wrapped in `try` is faster than a `scanf` |
05:38:44 | FromDiscord | <Elegantbeef> I'm not going to check, but i do wonder |
05:38:50 | FromDiscord | <reversem3> isn't try and scanf way different |
05:39:02 | FromDiscord | <Elegantbeef> Yes which is why I wonder which is more performant |
05:39:21 | FromDiscord | <reversem3> isn't like comparing apples and oranges though |
05:39:38 | FromDiscord | <reversem3> would you want readLine.stdin and scanf ? |
05:40:50 | FromDiscord | <Elegantbeef> sent a code paste, see https://paste.rs/UbN |
05:41:06 | FromDiscord | <Elegantbeef> Both do the "same" thing |
05:41:25 | FromDiscord | <Elegantbeef> I guess i should remove the second scanf to be faithful |
05:41:45 | FromDiscord | <Elegantbeef> sent a code paste, see https://play.nim-lang.org/#ix=45yf |
05:43:05 | FromDiscord | <Elegantbeef> Both do the same operation practically but i wonder which is faster on parse, the try method of course uses exceptions on fail so will almost certainly be slower |
05:43:49 | FromDiscord | <reversem3> I would think try would be slower |
05:44:13 | FromDiscord | <Elegantbeef> As would i but by how much is the think that interests me 😄 |
05:44:17 | FromDiscord | <Elegantbeef> Not enough to actually benchmark it |
05:46:23 | FromDiscord | <reversem3> Can't be by much I would think , milliseconds |
05:46:40 | FromDiscord | <Elegantbeef> Milliseconds?! |
05:46:49 | FromDiscord | <Elegantbeef> We're in two different ballparks 😄 |
05:47:00 | FromDiscord | <KepKep> bunch of bots in here smh |
05:47:05 | FromDiscord | <Rika> No you |
05:47:07 | FromDiscord | <reversem3> you think faster ? |
05:47:10 | FromDiscord | <Elegantbeef> We're on matrix and you should be too |
05:47:13 | FromDiscord | <Rika> How do you know you’re not a bot hmmm |
05:47:26 | FromDiscord | <Elegantbeef> Certainly in a few ns rev |
05:47:36 | FromDiscord | <KepKep> I'm too mentally challanged to be one |
05:47:41 | FromDiscord | <huantian> I think you all are bots and I am hte only human |
05:47:56 | FromDiscord | <Elegantbeef> huan "hte human" tian |
05:47:57 | FromDiscord | <huantian> or maybe I'm neither bot nor human |
05:48:21 | FromDiscord | <huantian> I'm glad my typo is forever engraned in my new nickname |
05:48:25 | FromDiscord | <reversem3> alright folks my done for the night .. thanks again for the help |
05:48:31 | FromDiscord | <Elegantbeef> Buh bye |
05:48:39 | FromDiscord | <Rika> "engraned" |
05:48:58 | FromDiscord | <Elegantbeef> huan is worse at the spellings than I |
05:49:09 | FromDiscord | <huantian> I mean you can read it so it's fineeeee |
05:49:13 | FromDiscord | <Rika> How many granes of sand are there in a beach |
05:49:24 | FromDiscord | <Elegantbeef> Not when rika is here |
05:49:29 | FromDiscord | <Rika> Haha |
05:49:33 | FromDiscord | <Rika> The pedant |
05:49:45 | FromDiscord | <huantian> don't you mean pendant |
05:49:49 | FromDiscord | <Rika> What |
05:49:54 | FromDiscord | <amadan> sent a code paste, see https://play.nim-lang.org/#ix=45yg |
05:50:01 | FromDiscord | <Elegantbeef> There we go |
05:50:03 | FromDiscord | <Rika> Now I can’t tell if you’re joking or not |
05:50:10 | FromDiscord | <Elegantbeef> With what compile flags though |
05:50:13 | FromDiscord | <huantian> you might wanna test error times too |
05:50:24 | FromDiscord | <amadan> just -d:release |
05:50:28 | FromDiscord | <huantian> with maybe 1 or 2 different error cases |
05:50:35 | FromDiscord | <KepKep> the more I'm reading about nim the more I'm confused why isn't this more popular , if I'm correctly understanding it's a systems programming language that by default compiles down to c but can compile down to many other languages, the syntax looks clean and human readable so I'd assume that developing and iterating trhough versions in it would be fast and it's garbage collected so you don't really have to worry about memory unless you want |
05:51:01 | FromDiscord | <amadan> sent a code paste, see https://play.nim-lang.org/#ix=45yh |
05:51:20 | FromDiscord | <Elegantbeef> Big programming keeps it down |
05:51:32 | FromDiscord | <Elegantbeef> That's what i figured |
05:51:41 | FromDiscord | <reversem3> Not much of a difference |
05:51:53 | FromDiscord | <KepKep> big programming? what does that mean |
05:51:57 | FromDiscord | <KepKep> like big projects? |
05:52:40 | FromDiscord | <Elegantbeef> "not much" meanwhile 10 times slower |
05:52:42 | FromDiscord | <Elegantbeef> That's at runtime |
05:52:43 | FromDiscord | <reversem3> Yeah but would you even noticed that , maybe during compile time but not runtime right |
05:52:43 | FromDiscord | <Elegantbeef> Pass `-d:lto` for me if you dont mind |
05:52:43 | FromDiscord | <reversem3> oh |
05:52:59 | FromDiscord | <Elegantbeef> One is 10 times slower on failure than the other, so if you have millions of things you're parsing one is clearly better |
05:53:02 | FromDiscord | <Elegantbeef> It was a joke kep |
05:53:07 | FromDiscord | <Elegantbeef> You know like "Big pharma" |
05:53:14 | FromDiscord | <KepKep> oh |
05:53:36 | FromDiscord | <amadan> sent a code paste, see https://play.nim-lang.org/#ix=45yi |
05:54:02 | FromDiscord | <amadan> sent a code paste, see https://play.nim-lang.org/#ix=45yj |
05:54:11 | FromDiscord | <huantian> hm I bet it'll vary depending on the kind of erring string too |
05:54:12 | FromDiscord | <KepKep> dunno this language on paper sounds really insane if I'm understanding it right but I wouldhave probably never found it if youtube didn't randomly recomend me a video while I was looking at C tutorials |
05:54:14 | FromDiscord | <Elegantbeef> change to arc/orc to see that go away |
05:54:24 | FromDiscord | <amadan> (edit) "https://play.nim-lang.org/#ix=45yi" => "https://play.nim-lang.org/#ix=45yk" |
05:54:39 | FromDiscord | <huantian> I think the main issue is that it's still small, and the language still feels a tad scuffed 😛↵(@KepKep) |
05:55:27 | FromDiscord | <amadan> sent a code paste, see https://play.nim-lang.org/#ix=45yl |
05:55:37 | FromDiscord | <Elegantbeef> lol |
05:55:39 | FromDiscord | <KepKep> well I'm like really bad at programming so everything feels scuffed to me |
05:55:57 | FromDiscord | <KepKep> but then again I do this as a hobby for fun |
05:56:08 | FromDiscord | <KepKep> so I have nothing to lose while messing around with everything |
05:56:11 | NimEventer | New question by nonimportant: Why does my Heroku application always return a 403 error?, see https://stackoverflow.com/questions/73104565/why-does-my-heroku-application-always-return-a-403-error |
05:56:32 | FromDiscord | <Elegantbeef> I think it forces C++ to use goto exceptions and i guess C++ doesnt like them |
05:58:08 | FromDiscord | <Yardanico> In reply to @Elegantbeef "I think it forces": i don't think so |
05:58:26 | FromDiscord | <huantian> I wouldn't think cpp would not like goto exceptions that much |
05:58:36 | FromDiscord | <Elegantbeef> Yea i dont know |
05:58:44 | FromDiscord | <Elegantbeef> I'm an idiot anyone that listens to me is dumber than i |
05:59:10 | FromDiscord | <Elegantbeef> Speaking of, that code review github repo still sounds nice |
05:59:41 | FromDiscord | <Elegantbeef> Make an issue a with code you want reviewed and someone might review it and say "Damn this is bad" 😄 |
05:59:46 | FromDiscord | <flywind> arc(cpp) uses cpp exception by default. |
05:59:47 | FromDiscord | <Yardanico> yes |
05:59:52 | FromDiscord | <Yardanico> i just checked to be sure |
06:00:15 | FromDiscord | <Elegantbeef> Are C++ exceptions that much worse than C exceptions |
06:00:26 | FromDiscord | <Elegantbeef> Well Nim's C exceptions |
06:00:44 | FromDiscord | <flywind> It is probably better than Nim's exception. |
06:01:01 | FromDiscord | <Elegantbeef> The above code showed it 100times slower roughly |
06:01:13 | FromDiscord | <Yardanico> not necessarily, goto exceptions should be roughly on par |
06:02:01 | FromDiscord | <Elegantbeef> Ah sorry misread 20 times slower |
06:02:29 | FromDiscord | <Elegantbeef> I gues it could just be the C++ compiler not liking the generated C++ |
06:02:33 | FromDiscord | <huantian> speaking out of my something random, but I think Nim has great design, but the implementation is still a tad lacking on the polish side in some areas↵(@KepKep) |
06:03:07 | FromDiscord | <huantian> though ig that's less of "why nim no popular" and more of "why nim not perfect"? |
06:03:12 | FromDiscord | <KepKep> what did the polish do again smh |
06:03:27 | FromDiscord | <KepKep> again dunno |
06:03:37 | FromDiscord | <KepKep> I'm like a noob in programming |
06:03:38 | FromDiscord | <flywind> In reply to @Elegantbeef "Ah sorry misread 20": Cannot reproduce on windows |
06:03:56 | FromDiscord | <KepKep> I'm trying to find a comfortable simple but fast language |
06:04:04 | FromDiscord | <flywind> sent a code paste, see https://paste.rs/a6B |
06:04:12 | FromDiscord | <Elegantbeef> Is this another case of "Dont trust others" |
06:04:13 | FromDiscord | <flywind> `-d:lto -d:release -b:cpp --mm:arc ` |
06:05:20 | FromDiscord | <Elegantbeef> Nope gcc doesnt like the C++ code |
06:05:38 | FromDiscord | <Elegantbeef> and clang cant even compile it |
06:05:45 | FromDiscord | <KepKep> can someone give me a comparison of c vs nim cause I'm not really sure what's better to learn, I kinda wanna dabble in gamedev but because C isn't oop I've heard that can make it difficult and c++ is basically hell so I'm staying the hell away from it |
06:06:02 | FromDiscord | <KepKep> well not just gamedev |
06:06:08 | FromDiscord | <KepKep> I kinda just like to dabble in a bit of everything |
06:06:21 | FromDiscord | <Elegantbeef> Nim and C are very similar in how to program, they're both procedural without cyclical dependencies so games can get a bit weird |
06:06:26 | FromDiscord | <Elegantbeef> Nim has OOP though if you want that |
06:06:54 | FromDiscord | <Yardanico> In reply to @KepKep "can someone give me": if you just want to _make_ a game, using game engines (and whatever languages they're built around) is probably a better choice |
06:06:55 | FromDiscord | <flywind> In reply to @KepKep "can someone give me": https://github.com/nim-lang/Nim/wiki/Nim-for-C-programmers |
06:07:03 | FromDiscord | <Elegantbeef> Yea also with clang it gets shitty exceptions |
06:07:06 | FromDiscord | <Yardanico> but if you want to program a game specifically, then yeah, choose the language you prefer the most |
06:07:07 | FromDiscord | <KepKep> from what I understood C is actually memorizable as in it has like 100 reserved phrases or something like that |
06:07:10 | FromDiscord | <Elegantbeef> So something with linux and C++ exceptions such? |
06:07:20 | FromDiscord | <Elegantbeef> suck rather |
06:07:34 | FromDiscord | <KepKep> In reply to @flywind "https://github.com/nim-lang/Nim/wiki/Nim-for-C-prog": I have no clue what half of that means :MokoThumbsUp: |
06:08:07 | FromDiscord | <Elegantbeef> Nim can be used just as C and you can make games with it, the issues might be in cyclical dependencies but it's managable |
06:08:27 | FromDiscord | <KepKep> In reply to @Yardanico "if you just want": nono not just games, I'm just someone who learns stuff for fun, I've learned about a lot of stuff from webdev to rust but I |
06:08:30 | FromDiscord | <Elegantbeef> You might have a game with a weird design due to that issue, but it's "soon" to be resolved |
06:08:37 | FromDiscord | <KepKep> (edit) "I" => "I'm trying to find something "comfortable"" |
06:09:21 | FromDiscord | <KepKep> something comfortable and that's pretty low level so I can try out everything from graphics api's to game frameworks to building gui apps etc |
06:09:39 | FromDiscord | <Elegantbeef> That describes Nim |
06:09:49 | FromDiscord | <KepKep> basically I wanna spend less time learning the language and more time actually making stuff |
06:09:52 | FromDiscord | <Elegantbeef> The worst case is you use it learn things then dislike it |
06:10:12 | FromDiscord | <KepKep> Rust has so many strings attatched to the base version of it that it's making my head implode |
06:10:30 | FromDiscord | <KepKep> Javascrip mainly for web |
06:10:38 | FromDiscord | <Yardanico> In reply to @KepKep "Javascrip mainly for web": hahaha |
06:10:41 | FromDiscord | <KepKep> Python slow-ish unless you giga optimize it |
06:10:42 | FromDiscord | <Yardanico> good joke |
06:10:53 | FromDiscord | <Yardanico> tell that to people who make everything in JS :) |
06:10:58 | FromDiscord | <Elegantbeef> No speaking, do not remind me↵(@Yardanico) |
06:11:08 | FromDiscord | <Yardanico> and tell that to discord which you're using to talk right now |
06:11:18 | FromDiscord | <Elegantbeef> I already heard someone jokingly say "embedded.js" today which made me rush to check that it didnt exist |
06:11:20 | FromDiscord | <Yardanico> (it's made with electron which is basically Chromium, so it's programmed with JS) |
06:11:33 | FromDiscord | <Rika> i mean technically discord is "web" |
06:11:36 | FromDiscord | <KepKep> yeah discord the consumer of ram |
06:11:44 | FromDiscord | <Yardanico> In reply to @Rika "i mean technically discord": yes, but I mean that you can use electron to make games |
06:12:13 | FromDiscord | <Yardanico> even treeform's previous steam game is made with electron :) |
06:12:18 | FromDiscord | <KepKep> as far as I understand you can use any language for anything you want but I want something small fast and that my pepega brain can understand |
06:12:30 | FromDiscord | <KepKep> and Nim seems to be just that |
06:12:30 | FromDiscord | <Elegantbeef> You can also put your fingers in a paper shredder |
06:12:32 | FromDiscord | <flywind> sent a code paste, see https://play.nim-lang.org/#ix=45yp |
06:12:35 | FromDiscord | <Yardanico> In reply to @KepKep "as far as I": it's also a matter of how many libraries are available |
06:12:50 | FromDiscord | <Yardanico> unless you're okay with building everything from scratch you also need to judge by that |
06:12:52 | FromDiscord | <Elegantbeef> Lol my xeon1231v3 is not liking it↵(@xflywind) |
06:13:17 | FromDiscord | <KepKep> In reply to @Yardanico "unless you're okay with": I like to know how things work but I'm way too horible at maths to build anything overly complex |
06:13:34 | FromDiscord | <Yardanico> maths are rarely related to "building things from scratch" |
06:13:35 | FromDiscord | <Elegantbeef> Just use godot 😄 |
06:13:47 | FromDiscord | <Elegantbeef> Hey it's required for a 3D engine from scratch |
06:14:07 | FromDiscord | <Yardanico> In reply to @Elegantbeef "*Just use godot* 😄": waiting for godot 4, since using godot 3 is kinda pointless right now, and godot 4 is still in beta :) |
06:14:14 | FromDiscord | <Elegantbeef> Yea |
06:14:16 | FromDiscord | <Yardanico> so it has no tutorials/docs are not fully accurate/etc |
06:14:23 | FromDiscord | <Yardanico> i mean not using, but starting a new project in godot |
06:14:32 | FromDiscord | <KepKep> like I said not just games I want a language that can kinda do most if not everything that's why I started looking towards C that's small compact and can do basically everything |
06:14:37 | FromDiscord | <KepKep> and also it's zoomy fast |
06:14:54 | FromDiscord | <Elegantbeef> Well i'd like godot 4 to make me happy with the play button capable of recompiling native code |
06:15:06 | FromDiscord | <Elegantbeef> That'd be a killer feature that'd make it way less annoying |
06:15:29 | FromDiscord | <flywind> Nim can do script programming with the same syntax while C needs lua. |
06:16:17 | FromDiscord | <KepKep> basically #Let'sMakeNimTheNewPython |
06:16:25 | FromDiscord | <Elegantbeef> Ley's not |
06:16:26 | FromDiscord | <Elegantbeef> Let's not\ |
06:16:33 | FromDiscord | <KepKep> I meant like |
06:16:38 | FromDiscord | <KepKep> popularity wise |
06:16:42 | FromDiscord | <Yardanico> In reply to @KepKep "basically #Let'sMakeNimTheNewPython": i mean, just go ahead and try Nim, you already have it installed |
06:16:48 | FromDiscord | <Yardanico> see if you like it in the end or not |
06:16:51 | FromDiscord | <KepKep> I am trying it |
06:16:55 | FromDiscord | <KepKep> seems heckin cool |
06:17:06 | FromDiscord | <KepKep> head empty tho |
06:17:16 | FromDiscord | <KepKep> I havent slept basically whole 24hrs |
06:17:29 | FromDiscord | <Elegantbeef> Do you want to use gdscript or nim with godot4 yardanico? |
06:17:30 | FromDiscord | <KepKep> but I'm too hyper thinking about nim |
06:17:55 | FromDiscord | <Yardanico> In reply to @Elegantbeef "Do you want to": well of course Nim if possible, godot seems too scripty |
06:18:15 | FromDiscord | <Elegantbeef> Ah have fun with the new extensions then |
06:18:30 | FromDiscord | <Yardanico> I just want to create some game idea and make it into a proper game, kinda like one of my "long-term goals" |
06:18:55 | FromDiscord | <Yardanico> not just ping-pong, but something more complex of course |
06:19:00 | FromDiscord | <KepKep> make the next wow killer :kappa: |
06:19:12 | FromDiscord | <Yardanico> I don't play MOBAs |
06:19:14 | FromDiscord | <Elegantbeef> Yea i have a dumb idea of making a open source networked pool game 😄 |
06:19:24 | FromDiscord | <Elegantbeef> "Pool with friends" if you wiill |
06:19:44 | FromDiscord | <Yardanico> I mean wow is not MOBA, but I don't really like WoW-style RPGs either |
06:19:47 | FromDiscord | <Generic> have fun with floating point numbers and networking |
06:19:55 | FromDiscord | <Elegantbeef> I'm not an idiot↵(@Generic) |
06:20:12 | FromDiscord | <Elegantbeef> Server runs simulation |
06:20:18 | FromDiscord | <Generic> I know, but you don't have to be an idiot for this to get messy |
06:20:27 | FromDiscord | <KepKep> I'm a massive roguelike, roguelite fan especially with co-op |
06:20:36 | FromDiscord | <Yardanico> and yeah, I'm not even sure if I'll use Godot for my "game" or not |
06:20:43 | FromDiscord | <Generic> it's just messy either way, the players have to position their sticks(?) |
06:21:08 | FromDiscord | <Elegantbeef> Cues |
06:21:10 | FromDiscord | <Yardanico> I actually have a bit of experience with Unity and I've done some reverse-engineering of Unity games too (shh, just for academic purposes) |
06:21:22 | FromDiscord | <Elegantbeef> "reverse engineering" you mean ilspy |
06:21:26 | FromDiscord | <Yardanico> dnSpy but yes :P |
06:22:04 | FromDiscord | <Yardanico> even nowadays a lot of unity devs are too lazy to add proper multiplayer to a game so they use photon which in its most popular default mode doesn't have a master server, so you can easily cheat |
06:22:19 | FromDiscord | <Yardanico> just change something on your client, and it actually affects the multiplayer |
06:22:26 | FromDiscord | <KepKep> cheating in co-op games is whatever |
06:22:30 | FromDiscord | <Elegantbeef> I'd be a casual pool game, so really it's just on player go sync balls, player then can hit the cue ball |
06:22:37 | FromDiscord | <KepKep> I love balls |
06:22:43 | FromDiscord | <Yardanico> disruptek does too |
06:22:54 | FromDiscord | <Yardanico> @KepKep deleting your messages is pointless |
06:23:01 | FromDiscord | <KepKep> you saw nothing |
06:23:01 | FromDiscord | <Yardanico> they're bridged to matrix and IRC, and IRC specifically has no way of deleting messages |
06:23:06 | FromDiscord | <KepKep> I wrote it on autopilot |
06:23:08 | FromDiscord | <Rika> ive always wondered why FP isnt deterministic |
06:23:11 | FromDiscord | <Yardanico> so your message is there for everyone to see |
06:23:23 | FromDiscord | <Yardanico> https://irclogs.nim-lang.org/25-07-2022.html#06:22:37 |
06:23:27 | FromDiscord | <Generic> In reply to @Rika "ive always wondered why": it is deterministic for the most part |
06:23:47 | FromDiscord | <Elegantbeef> The physics engine isnt generally |
06:23:59 | FromDiscord | <Yardanico> i mean you can always just do it the proper "remote input" way |
06:24:05 | FromDiscord | <Yardanico> only run physics on the server, but that's complicated, yes |
06:24:18 | FromDiscord | <Yardanico> or let clients run physics just for visual purposes, but sync with the server |
06:24:22 | FromDiscord | <Yardanico> for actual results |
06:24:31 | FromDiscord | <Yardanico> but I'm not an expert on that matter |
06:24:36 | FromDiscord | <KepKep> if I had the skills and the patience I'd make a magic based arena but I have nether and networking is scary, everyone always tells me it's a nightmare and even triple A companies fail it often times so uhhh yeah I'll just leave it as a dream |
06:24:50 | FromDiscord | <Rika> networking is hard |
06:24:58 | FromDiscord | <Yardanico> I mean with the Photon thing I mentioned it's not "hard", but it has its trade-offs |
06:24:59 | FromDiscord | <Rika> well, hard for most people ig |
06:25:08 | FromDiscord | <huantian> I’ve actually considered making a magic engine |
06:25:14 | FromDiscord | <huantian> But I have no idea how to even do that |
06:25:22 | FromDiscord | <huantian> Like mtg is so complex |
06:25:30 | FromDiscord | <KepKep> yeah for a pvp arena game people being able to just cheat client side would be a nono |
06:25:48 | FromDiscord | <huantian> And there are so many mtg cards |
06:26:28 | FromDiscord | <KepKep> I have a massive dream idea in my head ever since I saw a video about a game phantom dust but it would be a massive undertaking |
06:26:42 | FromDiscord | <KepKep> maybe if I actually stick to a single language and refine my skills I'll make it |
06:26:49 | FromDiscord | <KepKep> but for now I can't even begin to imagine it |
06:26:53 | FromDiscord | <Yardanico> yes everyone has big ideas about games, me included |
06:27:00 | FromDiscord | <huantian> Beef do you wanna help me program the like 50k magic cards out there |
06:27:06 | FromDiscord | <Yardanico> but even small indie games take years to make and polish |
06:27:34 | FromDiscord | <KepKep> I'll just beg you in dm's to make it for me :RatirlBusiness: |
06:28:29 | FromDiscord | <Yardanico> block button is always easy to click |
06:28:45 | FromDiscord | <# Luke> can someone help me with gh actions? |
06:28:46 | FromDiscord | <KepKep> https://tenor.com/view/dog-smile-puppy-love-eyes-gif-24151147 |
06:28:50 | FromDiscord | <KepKep> please make it for me |
06:29:05 | FromDiscord | <Rika> blodk |
06:29:06 | FromDiscord | <Rika> (edit) "blodk" => "blokd" |
06:29:19 | FromDiscord | <KepKep> waaaah |
06:29:27 | FromDiscord | <# Luke> lol anyone a pro with github actions |
06:29:33 | FromDiscord | <KepKep> okay well thanks for the warm welcome , I'll do my like 10th attempt to sleep now |
06:29:43 | FromDiscord | <# Luke> In reply to @ripluke "lol anyone a pro": i need some help |
06:29:49 | FromDiscord | <Yardanico> In reply to @ripluke "lol anyone a pro": it'll be better if you ask the question straight away |
06:30:08 | FromDiscord | <Yardanico> https://dontasktoask.com/ |
06:30:10 | FromDiscord | <Yardanico> classic |
06:31:59 | FromDiscord | <# Luke> ok so basicall i have this much of my action, i want it to create a github release, and upload all of the files, right now it just builds and uploads the files↵heres the yml: https://github.com/Infinitybeond1/dye/blob/master/.github/workflows/build.yml |
06:32:10 | FromDiscord | <# Luke> (edit) "basicall" => "basically" |
06:41:02 | FromDiscord | <fbpyr> had not known that link. 🙂 ↵one additional thing it misses imho\: there potentially might be even folks in the chat room able to answer the the question, who do not think of themselves as experts.. |
06:54:56 | FromDiscord | <# Luke> YES!!!! I finally got it working |
07:19:00 | FromDiscord | <lantos> sent a code paste, see https://play.nim-lang.org/#ix=45yT |
07:19:08 | FromDiscord | <lantos> (edit) "https://play.nim-lang.org/#ix=45yT" => "https://paste.rs/U8t" |
07:19:25 | FromDiscord | <lantos> (edit) "https://play.nim-lang.org/#ix=45yV" => "https://play.nim-lang.org/#ix=45yU" |
07:20:21 | FromDiscord | <lantos> (edit) "https://play.nim-lang.org/#ix=45yU" => "https://play.nim-lang.org/#ix=45yW" |
07:55:53 | FromDiscord | <t8m8> I have updated nim's currying library, which has not been updated for a while. It should now be available in nim 1.6.x You can try it if you want! https://github.com/t8m8/currying |
08:15:39 | FromDiscord | <Require Support> have an object that has a timestamp field using epoch time as float ex : `timestamp : 1578706611.324671` Whats the best way to sort a `seq[myobject]` based on that timestamp |
08:15:53 | FromDiscord | <Require Support> (edit) "1578706611.324671`" => "1518306611.324341`" |
08:31:29 | FromDiscord | <vestel> In reply to @Require Support "have an object that": import std/algorithm↵↵list.sort() |
08:59:12 | FromDiscord | <vindaar> not quite. If it's an object with such a field, you'd best use the `sortedByIt` template as `s.sortedByIt(it.timestampField)` https://nim-lang.github.io/Nim/algorithm.html#sortedByIt.t%2Cuntyped%2Cuntyped |
09:06:34 | * | estiquelapice joined #nim |
09:07:09 | FromDiscord | <PyryTheBurger> what is the difference between an object and a tuple |
09:07:31 | FromDiscord | <Elegantbeef> Internally nothing |
09:07:49 | FromDiscord | <Elegantbeef> Tuples are structurally typed which means all of them with types in the same order are equivlent |
09:08:30 | FromDiscord | <PyryTheBurger> arte they like structs in c++ |
09:08:52 | FromDiscord | <Elegantbeef> Both are yes |
09:11:45 | FromDiscord | <Elegantbeef> Though objects are typed properly in Nim |
09:14:02 | FromDiscord | <PyryTheBurger> what is the difference between proc and method |
09:14:21 | FromDiscord | <Elegantbeef> Methods are dynamically dispatched and procs are statically |
09:14:35 | FromDiscord | <PyryTheBurger> aand what that means |
09:15:03 | FromDiscord | <Elegantbeef> Methods use runtime type information to dispatch calls to the procedure, procedures are just called directly |
09:15:40 | FromDiscord | <Phil> So basically you don't know exactly what function will be called when you use a method at compile-time, you'll only know at runtime? |
09:16:05 | FromDiscord | <Elegantbeef> Correct |
09:16:21 | FromDiscord | <PyryTheBurger> so is proc better |
09:16:25 | FromDiscord | <Phil> That's slower than static dispatch right? I'd assume the latter has more compile-time information and thus is better to optimize |
09:17:06 | FromDiscord | <Elegantbeef> Static is faster as there is no checking or indirection |
09:17:09 | FromDiscord | <Elegantbeef> It can also be inlined |
09:21:52 | FromDiscord | <Phil> sent a code paste, see https://play.nim-lang.org/#ix=45ze |
09:22:24 | FromDiscord | <Phil> Is that how structs in C++ work? |
09:22:31 | FromDiscord | <PyryTheBurger> oh |
09:22:36 | FromDiscord | <PyryTheBurger> no |
09:22:52 | FromDiscord | <PyryTheBurger> okay io think objects are better |
09:23:37 | FromDiscord | <Phil> I have personally no idea when the tuple usecase comes into play, but I guess I might just be writing code in the wrong area for me to stumble over the usecase |
09:25:00 | FromDiscord | <Phil> I guess they're really nice for more mathematical code? |
09:26:21 | FromDiscord | <Phil> In reply to @PyryTheBurger "so is proc better": You may want to contemplate using func as often as possible btw |
09:26:35 | FromDiscord | <PyryTheBurger> what is func |
09:26:49 | FromDiscord | <Phil> func is the same as proc, but it guarantees you that in this proc there are no side-effects happening |
09:26:54 | FromDiscord | <Elegantbeef> Tuples are useful for multiple return values and anything that needs to be easily written |
09:27:02 | FromDiscord | <Phil> So basically proc on steroids |
09:27:18 | FromDiscord | <PyryTheBurger> what are side effects |
09:27:54 | FromDiscord | <Phil> Think in math terms. There a function takes an input and transforms value x into value y |
09:28:04 | FromDiscord | <Phil> It's a pure function. |
09:28:38 | FromDiscord | <Phil> The only thing that happens on a function happens without manipulating its inputs or affecting anything outside the function. It's fully self-enclosed |
09:29:22 | FromDiscord | <PyryTheBurger> i need to change values inside functions tho |
09:29:35 | FromDiscord | <Phil> A side-effect is something that violates that.↵E.g. if you access a global variable, as you didn't input the global variable into the function.↵Or "echo "blub"" is a side-effect, it causes an effect that is something else than transforming a value |
09:29:55 | FromDiscord | <Elegantbeef> Parameters can be marked `var` and they do not count as sideffect |
09:30:07 | FromDiscord | <PyryTheBurger> yeah |
09:31:04 | FromDiscord | <Phil> In general, func is just the guarantee "I don't do stuff you don't expect, all I access is stuff I'm given directly" |
09:31:32 | FromDiscord | <Phil> At least as far as I'm aware, the above may be incomplete |
09:32:40 | FromDiscord | <Phil> I'm still trying to ingrain the habit into myself to use func when possible... not very successful so far |
09:37:13 | FromDiscord | <Elegantbeef> Luckily Nim does side effect analysis so protects you for pointer procs and the like |
09:54:36 | * | CyberTailor quit (Excess Flood) |
09:56:35 | * | CyberTailor joined #nim |
10:13:53 | FromDiscord | <exelotl> hey, can anyone see what's wrong with this code? https://git.sr.ht/~exelotl/natu/tree/uint64-vectors/item/natu/math.nim#L232-250 |
10:14:24 | FromDiscord | <exelotl> I'm trying to pack 2 ints (which are 32-bits on my platform) into a single uint64 |
10:14:56 | FromDiscord | <exelotl> as this allows it to be passed and returned more efficiently |
10:16:16 | FromDiscord | <exelotl> but the behaviour is funky. When I drop this into my game all the coordinates come out wrong. |
10:17:22 | FromDiscord | <Generic> maybe just misoptimisation due to the violation of strict aliasing? |
10:17:34 | FromDiscord | <Generic> does it work in debug builds? |
10:19:51 | FromDiscord | <Generic> also I'm currently thinking about an incredibly evil hack |
10:20:20 | FromDiscord | <Generic> so openArray in Nim will always be passed as a pointer and an int |
10:20:40 | FromDiscord | <exelotl> oh god xD |
10:21:17 | FromDiscord | <Generic> I think it's possible, the question is whether it's worth anybody's sanity |
10:21:51 | FromDiscord | <Generic> though it would be cool just in general to have some way for any type to be passed unpacked in parameters |
10:23:50 | FromDiscord | <Generic> ah though the openArray thing wouldn't work with var parameters |
10:34:30 | FromDiscord | <Yardanico> In reply to @Generic "maybe just misoptimisation due": yeah I think it's that |
10:34:36 | FromDiscord | <Yardanico> @exelotl try to use `copyMem` instead |
10:35:02 | FromDiscord | <Yardanico> zippy had a weird problem with LTO that got fixed by changing from similar casting to proper `copyMem`, probably due to strict aliasing rules |
10:36:22 | FromDiscord | <Yardanico> also is there any reason you can't just use a `packed` object/tuple instead? |
10:36:46 | FromDiscord | <Yardanico> or even not `packed`, probably the alignment will be fine anyway so it'll only take 8 bytes |
10:57:10 | FromDiscord | <exelotl> unfortunately it's not about alignment, rather the ARM procedure calling convention says that when you have a composite type (struct/array/union) larger than 4 bytes as a return value, it _must_ be returned as a pointer rather than being returned across multiple registers https://media.discordapp.net/attachments/371759389889003532/1001080664021545011/unknown.png |
11:02:07 | FromDiscord | <exelotl> using GCC's vector extensions like in https://github.com/numforge/laser/blob/master/benchmarks/vector_math/vector_extension.nim could solve this, but unfortunately Nim likes to call nimZeroMem on the vectors, which doesn't work because GCC forbids you from taking a pointer to a vector. |
11:03:05 | * | jmdaemon quit (Ping timeout: 255 seconds) |
11:04:11 | FromDiscord | <Generic> even with noinit? |
11:04:32 | FromDiscord | <Generic> ah it's not possible to do noinit per type |
11:04:49 | FromDiscord | <exelotl> yeah, I'd have to put noinit on every single function that returns a vector |
11:05:03 | FromDiscord | <Generic> what about making the type completely opaque to Nim? |
11:05:39 | FromDiscord | <exelotl> then I can't put it in a const or use it at compile-time |
11:06:44 | FromDiscord | <Generic> but otherwise it would be possible to use the gcc vector type at compile time? |
11:08:08 | FromDiscord | <exelotl> sent a code paste, see https://play.nim-lang.org/#ix=45zv |
11:10:57 | FromDiscord | <Generic> https://godbolt.org/z/n5Pboshzx |
11:11:00 | FromDiscord | <Generic> this seems to work |
11:14:05 | FromDiscord | <exelotl> sent a code paste, see https://play.nim-lang.org/#ix=45zx |
11:14:51 | FromDiscord | <exelotl> sent a code paste, see https://play.nim-lang.org/#ix=45zy |
11:15:13 | FromDiscord | <Generic> ah yeah |
11:15:27 | FromDiscord | <Generic> the problem is the array[2, int] |
11:16:44 | FromDiscord | <Generic> it assumes that is an array which would be already a pointer |
11:17:02 | FromDiscord | <exelotl> ahhhh |
11:17:02 | FromDiscord | <Generic> I think changing the definition to |
11:17:11 | FromDiscord | <Generic> sent a code paste, see https://play.nim-lang.org/#ix=45zz |
11:17:28 | FromDiscord | <Generic> and then adding appropriate `[]` operators for compiletime and runtime could work |
11:49:48 | FromDiscord | <blashyrk> Is it possible to call another macro or proc that returns a NimNode and inject it within the body of a genAst/quote do block? |
12:12:47 | * | CyberTailor quit (Remote host closed the connection) |
12:13:47 | * | CyberTailor joined #nim |
13:09:56 | * | CyberTailor quit (Ping timeout: 268 seconds) |
13:11:45 | FromDiscord | <deech> Is there a more "functional" way of working with tables? Currently I have to do a lot of `if myTable.hasKey(k): myTable[k] ... else: `. It would be convenient if table access returned an `Option` so I can do `myTable[k].map(...)`. Thoughts? |
13:13:14 | FromDiscord | <Prestige> https://github.com/nim-lang/Nim/issues/18250 related @deech |
13:16:37 | FromDiscord | <deech> Not saying Nim needs to be a functional language, but some pattern matching and functional combinators sure would make things easier from time to time. 🙂 |
13:26:23 | * | arkurious joined #nim |
13:28:35 | * | pch quit (Quit: Leaving) |
13:58:46 | * | krux02 joined #nim |
14:43:17 | NimEventer | New post on r/nim by polite-pagan: Nim -- Error: internal error: getTypeDescAux(tyVoid), see https://reddit.com/r/nim/comments/w7qouc/nim_error_internal_error_gettypedescauxtyvoid/ |
14:44:03 | FromDiscord | <Clonkk> I don't know how up to date it is, but there is https://github.com/nim-lang/fusion/blob/master/src/fusion/matching.nim↵(@deech) |
14:57:54 | FromDiscord | <deech> I've used it. It's nice. |
15:13:28 | FromDiscord | <Phil> Give me result types that can deal with n exceptions |
15:14:38 | FromDiscord | <Rika> how would that work actually |
15:15:00 | FromDiscord | <Rika> if an exception is raised then no others would be raised no? |
15:15:34 | FromDiscord | <Phil> I have no idea, I just want to be forced to deal with all exceptions my code can raise without having to trigger that behaviour by writing pragmas |
15:16:27 | FromDiscord | <Phil> Like rust result pattern matching or java with its "throws" declaration on functions... Though I'd prefer to not need the "throws", bit |
15:17:15 | FromDiscord | <Phil> In reply to @Rika "if an exception is": I guess it would be correcter to say deal with exceptions of n types |
15:17:18 | FromDiscord | <Rika> i dont know whats so wrong about the pragma |
15:17:36 | FromDiscord | <Phil> Nothing, I'm just lazy |
15:17:56 | FromDiscord | <Rika> then thats your problem |
15:41:24 | FromDiscord | <Tanguy> `{.push raises: [].}` |
16:11:06 | FromDiscord | <reversem3> image.png https://media.discordapp.net/attachments/371759389889003532/1001159667470311524/image.png |
16:11:10 | FromDiscord | <reversem3> Wow how cool is this , css just works for owlkettle |
16:13:48 | FromDiscord | <reversem3> image.png https://media.discordapp.net/attachments/371759389889003532/1001160350965702818/image.png |
16:19:54 | FromDiscord | <reversem3> @can.l\: Is there a "tooltip" macro or function ? sort of like alt for HTML? |
16:22:23 | * | Schnouki quit (Remote host closed the connection) |
16:22:24 | * | spff quit (Remote host closed the connection) |
16:22:24 | * | toothlessgear quit (Write error: Connection reset by peer) |
16:22:25 | * | mronetwo quit (Remote host closed the connection) |
16:22:25 | * | noeontheend quit (Write error: Connection reset by peer) |
16:26:50 | * | mronetwo joined #nim |
16:26:52 | * | Schnouki joined #nim |
16:27:01 | * | toothlessgear joined #nim |
16:27:06 | * | spff joined #nim |
16:27:29 | * | noeontheend joined #nim |
16:28:19 | FromDiscord | <reversem3> @can.I https://docs.gtk.org/gtk4/class.Tooltip.html |
16:31:00 | FromDiscord | <jmgomez> In reply to @blashyrk "Is it possible to": I dont think you can but what's wrong with passing it as a parameter with genAst? I do that all the time i.e. https://github.com/jmgomez/NimForUE/blob/5615292708226dfc6036654b8a0b2141c2be5d18/src/nimforue/typegen/ueemit.nim#L330 |
16:34:27 | * | mronetwo quit (Remote host closed the connection) |
16:34:27 | * | spff quit (Remote host closed the connection) |
16:34:27 | * | toothlessgear quit (Remote host closed the connection) |
16:34:27 | * | Schnouki quit (Remote host closed the connection) |
16:34:27 | * | noeontheend quit (Remote host closed the connection) |
16:36:18 | * | Schnouki joined #nim |
16:36:19 | * | mronetwo joined #nim |
16:36:21 | * | Schnouki quit (Changing host) |
16:36:21 | * | Schnouki joined #nim |
16:36:39 | * | toothlessgear joined #nim |
16:37:24 | * | noeontheend joined #nim |
16:37:26 | * | spff joined #nim |
16:37:57 | FromDiscord | <ghoom> sent a code paste, see https://play.nim-lang.org/#ix=45Ax |
16:38:21 | FromDiscord | <Rika> Mac is not a byte |
16:38:33 | FromDiscord | <ghoom> but i thought `&` concats sequences and strings |
16:38:46 | FromDiscord | <Rika> Mac isn’t a sequence though |
16:39:01 | FromDiscord | <ghoom> i can't convert it to one |
16:39:08 | FromDiscord | <Rika> Then you’re doing something wrong |
16:39:19 | FromDiscord | <Rika> Refer to the documentation of whatever you’re using |
16:39:19 | FromDiscord | <ghoom> using `cast[seq[byte]](mac)` |
16:39:34 | FromDiscord | <ghoom> monocypher literally has no nim documentation |
16:39:49 | FromDiscord | <ghoom> no type defintions |
16:39:52 | FromDiscord | <ghoom> (edit) "defintions" => "definitions" |
16:40:06 | FromDiscord | <ghoom> nvm i can just look at the code |
16:40:14 | FromDiscord | <ghoom> mac is an array |
16:40:25 | FromDiscord | <ghoom> how do i convert an array to a seq? |
16:40:30 | FromDiscord | <Phil> erm... iterate over it and add individually? |
16:40:45 | FromDiscord | <Phil> ah, convert not concat |
16:40:46 | FromDiscord | <Phil> hm |
16:41:04 | FromDiscord | <Phil> your answer is likely in sequtils or nonexistant |
16:42:02 | FromDiscord | <ghoom> found it |
16:42:04 | FromDiscord | <ghoom> `toSeq` |
16:42:47 | FromDiscord | <ghoom> 🐸👍 |
16:43:53 | FromDiscord | <ghoom> also |
16:43:56 | FromDiscord | <ghoom> weird thing |
16:44:18 | FromDiscord | <ghoom> `toseq(mac) & cipherText` puts `cipherText` before not after |
16:44:23 | FromDiscord | <ghoom> (edit) "`toseq(mac)" => "`toSeq(mac)" |
16:44:34 | FromDiscord | <ghoom> (edit) "`cipherText`" => "`cipherText`'s items" |
16:45:12 | FromDiscord | <Phil> I dunno why but I'll never get used to the fact "&" can be used to concat seqs instead of, yknow, the concat method |
16:46:23 | FromDiscord | <ghoom> nvm |
16:46:25 | FromDiscord | <ghoom> im just dumb |
16:46:31 | FromDiscord | <ghoom> i expected the mac to be shorter |
16:46:38 | FromDiscord | <ghoom> so my brain got confused for a sec |
16:46:48 | FromDiscord | <ghoom> 👌🐸 |
16:47:33 | FromDiscord | <ghoom> In reply to @Isofruit "I dunno why but": wym? you can use concat too |
16:49:24 | FromDiscord | <Phil> I was more off-handedly mentioning that in general, having seq-concat functionality on the `&` symbol remains weird for me to look at |
16:49:35 | FromDiscord | <ghoom> ah |
16:49:55 | FromDiscord | <ghoom> i mean seqs are like strings so why not? |
16:50:05 | FromDiscord | <ghoom> for me, it's trivial |
16:50:30 | FromDiscord | <ghoom> maybe cuz im used to js |
16:52:17 | FromDiscord | <Rika> Just think of it like + in other languages |
16:58:27 | FromDiscord | <ghoom> ye |
16:58:50 | FromDiscord | <ghoom> oh you mean why they haven't used `+` instead? |
16:58:52 | FromDiscord | <treeform> In reply to @Yardanico "even treeform's previous steam": And I don't really recommend it anymore. But yes it works. |
16:59:40 | FromDiscord | <Phil> In reply to @ghoom "oh you mean why": not quite, I'm just not used to short-hand symbols for these operations I guess.↵I prefer concat proc for seqs, I'll use strformat any day for string concatenation over "&" etc. |
17:00:26 | FromDiscord | <ghoom> yo @treeform thanks for flatty 🐸👍 |
17:01:04 | FromDiscord | <ghoom> In reply to @Isofruit "not quite, I'm just": are you a heavy c programmer? |
17:02:43 | FromDiscord | <Phil> In reply to @ghoom "are you a heavy": Nope. I am short-hand traumatized from scientific programming. As in, people that never wrote variable names beyond 3 letters and couldn't write readable code if their live's depended on it |
17:02:56 | FromDiscord | <ghoom> lol |
17:08:05 | FromDiscord | <treeform> In reply to @ghoom "yo <@107140179025735680> thanks for": you welcome |
17:15:57 | FromDiscord | <ghoom> is there an std event wrapper like is js? |
17:20:26 | FromDiscord | <Phil> ... somehow, I have played myself. What I wanted to do was create actually random characters. What I have achieved is getting random characters, but always the same ones |
17:21:02 | FromDiscord | <Phil> The goal was a string of x random readable characters to create auth tokens |
17:21:39 | * | Schnouki quit (Remote host closed the connection) |
17:21:39 | * | spff quit (Write error: Broken pipe) |
17:21:40 | * | toothlessgear quit (Remote host closed the connection) |
17:21:40 | * | noeontheend quit (Remote host closed the connection) |
17:21:40 | * | mronetwo quit (Remote host closed the connection) |
17:21:59 | FromDiscord | <Phil> sent a code paste, see https://play.nim-lang.org/#ix=45AI |
17:22:39 | * | Schnouki joined #nim |
17:22:39 | * | mronetwo joined #nim |
17:22:45 | * | spff joined #nim |
17:22:45 | FromDiscord | <Phil> It'll always pick the same sequence of random characters out of the characters between A and z |
17:22:56 | * | toothlessgear joined #nim |
17:23:54 | * | noeontheend joined #nim |
17:24:09 | FromDiscord | <Phil> Good old "Should've called `randomize()` first |
17:24:11 | FromDiscord | <Phil> (edit) "first" => "first"" |
17:42:09 | FromDiscord | <demotomohiro> Please dont use random module for security things. |
17:44:10 | FromDiscord | <demotomohiro> https://nim-lang.org/docs/sysrand.html↵Please use sysran. |
17:44:28 | FromDiscord | <demotomohiro> sysrand |
17:45:23 | FromDiscord | <ghoom> In reply to @demotomohiro "Please dont use random": wonder why |
17:45:31 | FromDiscord | <ghoom> serious question |
17:48:22 | FromDiscord | <Phil> In reply to @demotomohiro "Please dont use random": The module states mostly not to use it for cryptographic purposes. ↵Which I'm not, I'm generating a random string with it, that I store in a db and compare against strings that users send me. ↵I'm not using it to calculate hashes or the like where, I'd assume, actual randomness matters more |
17:49:03 | FromDiscord | <flywind> std/sysrand still lacks some basic apis like `choice`, `rand` with range etc. Or someone needs to wrap it like https://docs.python.org/3/library/secrets.html and publish it to nimble. |
17:49:06 | FromDiscord | <demotomohiro> Pseudo random number generator algorithm used in random module is not designed for security. |
17:49:10 | FromDiscord | <voidwalker> is there a fast file diff algo in nim libs somewhere? |
17:51:09 | FromDiscord | <demotomohiro> If you need ramdom numbers for security, use true random number or cryptography secure random number generator. |
17:51:30 | FromDiscord | <blashyrk> In reply to @jmgomez "I dont think you": That's what I ended up doing, thanks! |
17:55:15 | FromDiscord | <Phil> In reply to @demotomohiro "Pseudo random number generator": If that's the bar, then given the generous usage of disclaimers on sysrand it would not qualify either.↵Which basically leaves you with staring at nimcrypto hoping it has a useful proc or scouring the web for a c lib whose proc you can steal |
17:56:36 | FromDiscord | <Phil> Aaaaand nimcrypto doesn't have an option there either |
17:57:46 | FromDiscord | <demotomohiro> In reply to @Isofruit "The module states mostly": You said it is auth tokens. Isn't it only known to user and your db?↵What if attacker got auth token? |
17:58:29 | FromDiscord | <Phil> In reply to @demotomohiro "You said it is": In that case it doesn't matter how I generated the token, the attacker will still have a valid token to authenticate themselves against my db and thus will be able to do so freely |
18:01:07 | FromDiscord | <Phil> The danger would lie if the attacker could predict which token was generated, based on knowing a state the machine was in at one point and from there knowing what the next results of urandom are. |
18:02:23 | FromDiscord | <Phil> Based on that they could be able to predict which tokens will be within the database and thus wrongly authenticate↵But that relies on them having knowledge of the state the machine was in at one point after a randomize() call |
18:09:47 | FromDiscord | <demotomohiro> sent a long message, see http://ix.io/45AV |
18:10:32 | FromDiscord | <demotomohiro> You should be able to get random bytes from sysrand and encode to base64:↵https://nim-lang.org/docs/sysrand.html↵https://nim-lang.org/docs/base64.html |
18:34:55 | FromDiscord | <ghoom> sent a code paste, see https://play.nim-lang.org/#ix=45AY |
18:36:43 | FromDiscord | <huantian> you can't have a variable be a generic proc |
18:36:57 | FromDiscord | <ghoom> why |
18:40:19 | FromDiscord | <iffy (Matt Haggard)> Is https://play.nim-lang.org/ down for anyone else? |
18:40:28 | FromDiscord | <ghoom> yep |
18:40:32 | FromDiscord | <huantian> In reply to @ghoom "why": because it has to be a concrete type |
18:40:34 | FromDiscord | <ghoom> two days now |
18:40:41 | FromDiscord | <Prestige> Where is PMunch? |
18:40:51 | FromDiscord | <huantian> generics (basically) make a new proc for each type you give it |
18:40:57 | FromDiscord | <huantian> In reply to @Avahe "Where is PMunch?": irc iirc |
18:40:58 | FromDiscord | <ghoom> ah |
18:41:06 | FromDiscord | <ghoom> makes sense |
18:41:48 | FromDiscord | <iffy (Matt Haggard)> sent a code paste, see https://play.nim-lang.org/#ix=45AZ |
18:43:56 | FromDiscord | <flywind> In reply to @iffy (Matt Haggard) "Is https://play.nim-lang.org/ down for": Maybe <@&371760044473319454> can have access to the server of the Nim playground. |
18:44:33 | FromDiscord | <demotomohiro> In reply to @Isofruit "In that case it": If you use non-CSPRNG, attackers can find the state of PRNG by reading outputs from PRNG even if they cannot access the state of PRNG.↵https://www.pcg-random.org/posts/predictability-party-tricks.html (ctrl-f "Trivial Predictability")↵https://en.wikipedia.org/wiki/Cryptographically_secure_pseudorandom_number_generator#Requirements↵https://en.wikipedia.org/wiki/Next-bit_test |
18:45:50 | * | wallabra quit (Ping timeout: 240 seconds) |
18:47:14 | * | wallabra joined #nim |
18:47:49 | FromDiscord | <ghoom> sent a code paste, see https://play.nim-lang.org/#ix=45B0 |
18:48:02 | FromDiscord | <ghoom> (edit) "https://play.nim-lang.org/#ix=45B0" => "https://play.nim-lang.org/#ix=45B1" |
18:51:07 | FromDiscord | <huantian> sent a code paste, see https://play.nim-lang.org/#ix=45B2 |
18:51:38 | FromDiscord | <demotomohiro> sent a code paste, see https://play.nim-lang.org/#ix=45B3 |
18:52:25 | FromDiscord | <reversem3> @can.l\: Is there a way to focus on an entry and trigger an event rather then clicked proc for a button? |
18:52:34 | FromDiscord | <demotomohiro> Which address of function procedural type points to can be changed at runtime. |
18:52:37 | FromDiscord | <huantian> (edit) "https://play.nim-lang.org/#ix=45B2" => "https://play.nim-lang.org/#ix=45B5" |
18:52:42 | * | jmdaemon joined #nim |
18:52:45 | * | jmdaemon quit (Remote host closed the connection) |
18:55:20 | * | jmdaemon joined #nim |
19:09:25 | * | jmdaemon quit (Quit: ZNC 1.8.2 - https://znc.in) |
19:15:25 | FromDiscord | <gibson> sent a code paste, see https://play.nim-lang.org/#ix=45Bd |
19:18:22 | FromDiscord | <ghoom> sent a code paste, see https://paste.rs/Qbj |
19:18:27 | FromDiscord | <huantian> still won't work |
19:18:32 | FromDiscord | <ghoom> (edit) "https://play.nim-lang.org/#ix=45Bg" => "https://play.nim-lang.org/#ix=45Bf" |
19:18:40 | FromDiscord | <ghoom> i mean how can i fix it |
19:18:49 | FromDiscord | <huantian> you have to make the base object generic |
19:19:07 | FromDiscord | <huantian> sent a code paste, see https://play.nim-lang.org/#ix=45Bh |
19:19:49 | FromDiscord | <ghoom> bummer |
19:20:56 | FromDiscord | <huantian> again it has to be a concrete type |
19:21:13 | FromDiscord | <huantian> you can't reason it at runtime |
19:21:24 | FromDiscord | <ghoom> 👌🐸 |
19:26:10 | FromDiscord | <ghoom> can someone link me to `do`'s manual section? |
19:26:20 | FromDiscord | <ghoom> (edit) "can someone ... link" added "pls" |
19:26:30 | FromDiscord | <huantian> https://nim-lang.org/docs/manual_experimental.html#do-notation |
19:26:34 | FromDiscord | <ghoom> tamks |
19:34:10 | FromDiscord | <ghoom> what does `{.closure.}` do? |
19:34:46 | FromDiscord | <huantian> https://nim-lang.org/docs/manual.html#types-procedural-type |
19:35:15 | FromDiscord | <huantian> it makes the proc a, well, closure |
19:35:36 | FromDiscord | <huantian> which means it captures any variables in it's surrounding environment |
19:35:51 | FromDiscord | <ghoom> 🐸👍 |
19:36:02 | FromDiscord | <ghoom> that's very useful! |
19:36:31 | FromDiscord | <ghoom> imperative programming to da max! |
19:38:43 | FromDiscord | <gibson> I just tried ReplIt (nim v1.2) and my macro works, but breaks on my installation (1.6.4). Just checking here if I'm doing anything silly that has changed in the mean time, otherwise I'll head to the forums and see if it's a bug.↵https://pastebin.com/rHHKzVwr |
19:50:10 | FromDiscord | <reversem3> Hmm ok so readLine(stdin) isn't allowed in owlkettle https://hatebin.com/oogjblpuzw |
19:58:40 | FromDiscord | <lantos> sent a code paste, see https://play.nim-lang.org/#ix=45Bs |
20:07:39 | FromDiscord | <ghoom> what's the exception type for "item not found"? |
20:07:51 | FromDiscord | <ghoom> (edit) "what's the ... exception" added "standard" |
20:08:25 | FromDiscord | <ghoom> in tables |
20:08:51 | FromDiscord | <planetis> KeyError |
20:09:27 | NimEventer | New thread by Ggibson: How to update macro nim1.2 to nim1.6.6?, see https://forum.nim-lang.org/t/9325 |
20:12:17 | * | LuxuryMode joined #nim |
20:22:49 | FromDiscord | <ghoom> sent a code paste, see https://play.nim-lang.org/#ix=45Bz |
20:23:34 | FromDiscord | <lantos> is there a way to peek into a future[string] without completing the future? |
20:23:42 | FromDiscord | <ghoom> bruh |
20:23:50 | FromDiscord | <ghoom> that doesn't make any sense |
20:23:57 | FromDiscord | <ghoom> 🤔🤔🤔 |
20:26:32 | FromDiscord | <creikey> sent a code paste, see https://play.nim-lang.org/#ix=45BC |
20:26:42 | FromDiscord | <creikey> (edit) "https://play.nim-lang.org/#ix=45BC" => "https://play.nim-lang.org/#ix=45BD" |
20:28:11 | FromDiscord | <lantos> sent a code paste, see https://play.nim-lang.org/#ix=45BE |
20:28:58 | FromDiscord | <lantos> (edit) "https://play.nim-lang.org/#ix=45BE" => "https://play.nim-lang.org/#ix=45BF" |
20:29:10 | FromDiscord | <!Patitotective> sent a code paste, see https://play.nim-lang.org/#ix=45BG |
20:29:29 | FromDiscord | <ghoom> thanks |
20:29:43 | FromDiscord | <ghoom> didn't work |
20:30:53 | FromDiscord | <!Patitotective> error? |
20:32:05 | FromDiscord | <!Patitotective> sent a code paste, see https://play.nim-lang.org/#ix=45BH |
20:33:01 | FromDiscord | <ghoom> sent a code paste, see https://play.nim-lang.org/#ix=45BI |
20:33:11 | FromDiscord | <ghoom> that's the point of the default value |
20:33:36 | FromDiscord | <planetis> It means you need to specify int in the object constructor |
20:33:44 | FromDiscord | <planetis> The last line |
20:33:57 | FromDiscord | <ghoom> so i can't specify a default type? |
20:34:10 | FromDiscord | <lantos> sent a code paste, see https://play.nim-lang.org/#ix=45BJ |
20:34:29 | FromDiscord | <lantos> (edit) "https://play.nim-lang.org/#ix=45BJ" => "https://play.nim-lang.org/#ix=45BK" |
20:34:30 | FromDiscord | <lantos> (edit) "https://play.nim-lang.org/#ix=45BK" => "https://play.nim-lang.org/#ix=45BL" |
20:41:21 | FromDiscord | <guttural666> is there a way to compile to a different directory than the current one? |
20:42:30 | FromDiscord | <planetis> --out:patg |
20:42:36 | FromDiscord | <planetis> (edit) "--out:patg" => "--out:path" |
20:46:27 | FromDiscord | <dom96> sent a code paste, see https://play.nim-lang.org/#ix=45BP |
20:46:30 | FromDiscord | <dom96> Why are you creating an iterator yourself? |
20:49:58 | FromDiscord | <lantos> sent a long message, see http://ix.io/45BQ |
20:50:58 | FromDiscord | <lantos> sent a code paste, see https://play.nim-lang.org/#ix=45BR |
20:51:19 | FromDiscord | <lantos> oops |
20:51:43 | FromDiscord | <lantos> (edit) "oops" => "oops, I'll snip it to be more relevant" |
20:51:55 | FromDiscord | <dom96> ahh, so you're trying to create an async iterator, fun |
20:52:22 | FromDiscord | <lantos> yeah :< |
20:52:33 | FromDiscord | <lantos> sent a code paste, see https://play.nim-lang.org/#ix=45BS |
20:53:25 | FromDiscord | <lantos> (edit) "https://play.nim-lang.org/#ix=45BS" => "https://play.nim-lang.org/#ix=45BT" |
20:53:50 | FromDiscord | <lantos> I don't think it is possible because the async dispatch is saying that the future is already read but I am creating a new future to hold the data |
20:55:03 | FromDiscord | <!Patitotective> In reply to @ghoom "that's the point of": what default value? |
20:55:16 | FromDiscord | <ghoom> In reply to @Patitotective "what default value?": default generic type value |
20:55:24 | FromDiscord | <!Patitotective> In reply to @ghoom "so i can't specify": its not default, you sepecify the acceptable types |
20:55:36 | FromDiscord | <!Patitotective> any other than int will fail |
20:55:43 | FromDiscord | <ghoom> can i specify a default? |
20:56:06 | FromDiscord | <!Patitotective> i dont thing |
20:56:10 | FromDiscord | <!Patitotective> it doesnt really make sense |
20:57:23 | FromDiscord | <dom96> In reply to @lantos "I don't think it": what you really need is a way to tell the caller of the iterator "Await this to get the next item" |
20:57:45 | FromDiscord | <!Patitotective> (edit) "thing" => "think" |
20:57:46 | FromDiscord | <dom96> this shouldn't be too difficult to implement but it won't work with the native Nim for loop |
20:57:46 | FromDiscord | <!Patitotective> sent a code paste, see https://play.nim-lang.org/#ix=45BU |
20:57:54 | FromDiscord | <ghoom> In reply to @Patitotective "it doesnt really make": imagine `O(...)` automatically expanding to `O[T](...)` where `T` is a default |
20:58:20 | FromDiscord | <ghoom> they should add dis |
20:58:34 | FromDiscord | <!Patitotective> making generics accept a default type would just be more confusing↵why dont you just use the code is showed you |
20:58:35 | FromDiscord | <!Patitotective> (edit) "you" => "you?" |
20:59:53 | FromDiscord | <lantos> sent a code paste, see https://play.nim-lang.org/#ix=45BV |
21:00:59 | FromDiscord | <ghoom> In reply to @Patitotective "making generics accept a": i just thought it would be a nice feature |
21:01:01 | FromDiscord | <ghoom> lazy feature |
21:01:03 | FromDiscord | <ghoom> ¯\_(ツ)_/¯ |
21:01:14 | FromDiscord | <ghoom> (edit) "lazy" => "laziness" |
21:02:16 | FromDiscord | <dom96> sent a code paste, see https://play.nim-lang.org/#ix=45BX |
21:02:48 | FromDiscord | <dom96> I do know for definite that you cannot have an async iterator (i.e. {.async.} on `iterator`) |
21:03:04 | FromDiscord | <!Patitotective> In reply to @ghoom "i just thought it": there's really no need for that feature, the code i showed you is much clearer and simpler than implementing a new "feature" |
21:03:40 | FromDiscord | <huantian> i feel like the ocrrect feature is inferring the generic type from object constructor parameters |
21:03:59 | FromDiscord | <huantian> "correct" |
21:04:16 | FromDiscord | <ghoom> yes |
21:04:21 | FromDiscord | <!Patitotective> In reply to @huantian "i feel like the": that would be really cool, also inferring open array types |
21:05:57 | FromDiscord | <ghoom> In reply to @Patitotective "that would be really": dis getting hot |
21:06:11 | FromDiscord | <ghoom> 🔥 |
21:08:21 | FromDiscord | <lantos> In reply to @dom96 "I mean create an": uh o you think you caught covid? I heard it is flaring up also with the monkey pox in the tubes atm. |
21:08:47 | FromDiscord | <dom96> dunno, I've been doing LFTs and they've been negative but who knows |
21:09:35 | FromDiscord | <guttural666> In reply to @planetis "--out:path": thanks! |
21:10:40 | FromDiscord | <lantos> I think I got it 3 weeks ago. All tests negative but it felt exactly like covid and was sick for the same time as I had it before. I think the bbc said in the last few days that there are 2 new variants that don't show up on tests. |
21:10:56 | FromDiscord | <# Luke> How can I loop over each item in a tuple and get the field name |
21:11:10 | FromDiscord | <lantos> (edit) "I think I got it 3 weeks ago. All tests negative but it felt exactly like covid and was sick for the same time as I had it before. I think the bbc said in the last few days that there are 2 new variants that don't show up on tests. ... " added "guess cuppa soup and tv shows is the best bet" |
21:11:21 | FromDiscord | <!Patitotective> In reply to @ripluke "How can I loop": the fieldPairs iterator also works for tuples |
21:11:37 | FromDiscord | <# Luke> Ok |
21:11:44 | FromDiscord | <ghoom> In reply to @Patitotective "there's really no need": bruh, it'd literally be like proc default values |
21:12:00 | FromDiscord | <lantos> In reply to @dom96 "I do know for": Yeah I have tried haha, hence the hacky way I'm doing it. And the code you sent threw me off haha. I thought iterators where like a {.magic.} pragma or something I'll check it |
21:12:31 | FromDiscord | <!Patitotective> In reply to @ghoom "bruh, it'd literally be": i dont see any case where default generic types would be useful 🤷♂️ |
21:12:40 | FromDiscord | <ghoom> In reply to @Patitotective "i dont see any": bro |
21:12:41 | FromDiscord | <lantos> (edit) "something I'll check it" => "reserved words" |
21:12:44 | FromDiscord | <ghoom> we're programmers |
21:12:49 | FromDiscord | <ghoom> we're lazy af |
21:12:58 | FromDiscord | <ghoom> you should know that |
21:13:01 | FromDiscord | <ghoom> you're sus |
21:13:06 | FromDiscord | <!Patitotective> In reply to @ghoom "you should know that": i know lazy programmers are lazy |
21:14:17 | FromDiscord | <ghoom> https://tenor.com/view/the-rock-rock-gif-21708339 |
21:14:27 | FromDiscord | <ghoom> i always forget gifs dont work |
21:17:05 | FromDiscord | <demotomohiro> If you think it is really the nice feature Nim should have: https://github.com/nim-lang/RFCs/issues |
21:20:05 | FromDiscord | <ghoom> lez go |
21:33:24 | FromDiscord | <ghoom> posted! |
21:36:13 | FromDiscord | <jan0809> is there any chance nim could target carbon one day? theoretically i mean |
21:37:25 | FromDiscord | <!Patitotective> In reply to @jan0809 "is there any chance": why would you want to target carbon lol↵compile to c++ |
21:37:29 | FromDiscord | <Prestige> Yeah, they talked about it on the forum |
21:39:12 | FromDiscord | <theangryepicbanana> sent a code paste, see https://play.nim-lang.org/#ix=45C6 |
21:39:58 | FromDiscord | <jan0809> In reply to @Patitotective "why would you want": wait does carbon compile cpp aswell? no right? |
21:40:29 | FromDiscord | <Elegantbeef> That's literally the point of converters↵(@theangryepicbanana) |
21:40:33 | FromDiscord | <!Patitotective> In reply to @jan0809 "wait does carbon compile": i havent really taken a look at carbon yet↵im expecting it to die quick lmao |
21:40:42 | FromDiscord | <jan0809> you sure |
21:40:54 | FromDiscord | <theangryepicbanana> In reply to @Elegantbeef "That's literally the point": I used converters so I can do stuff like `1.Foo` and `Foo(1)` |
21:40:55 | FromDiscord | <jan0809> dart isnt dead and go neither |
21:41:09 | FromDiscord | <Elegantbeef> Just make a proc then |
21:41:27 | FromDiscord | <!Patitotective> In reply to @jan0809 "you sure": 🤨 |
21:41:27 | FromDiscord | <theangryepicbanana> I have a lot of code that depends on converters implicitly outside of overload resolution -_- |
21:41:40 | FromDiscord | <Elegantbeef> `proc foo(i: SomeInteger): Foo = Foo(i.int)` |
21:41:58 | FromDiscord | <Elegantbeef> The entire point of converts is implicit conversions, which includes overload resolution |
21:42:04 | FromDiscord | <theangryepicbanana> ok |
21:43:13 | FromDiscord | <jan0809> even things like rust live somehow |
21:43:37 | FromDiscord | <theangryepicbanana> rust has a very active community and is still growing a lot |
21:43:42 | FromDiscord | <theangryepicbanana> not that surprising |
21:43:43 | FromDiscord | <jan0809> see |
21:44:14 | FromDiscord | <theangryepicbanana> golang has a very niche but useful place in backend code |
21:44:22 | FromDiscord | <Elegantbeef> Though banana your specific issue right now might be a bug |
21:44:25 | FromDiscord | <Elegantbeef> what nim version are you on? |
21:44:26 | FromDiscord | <theangryepicbanana> dart is used for cross-platform webapps |
21:44:35 | FromDiscord | <theangryepicbanana> In reply to @Elegantbeef "what nim version are": 1.6.6 |
21:44:43 | FromDiscord | <Elegantbeef> Nevermind 😄 |
21:44:58 | FromDiscord | <!Patitotective> In reply to @jan0809 "even things like rust": rust is for people that dont believe in the off-side rule |
21:45:01 | FromDiscord | <jan0809> and dart is perfect for mobile devs not considering to touch kotlin |
21:45:07 | FromDiscord | <theangryepicbanana> ah nvm |
21:45:16 | FromDiscord | <jan0809> so why should carbon fail that badly |
21:45:22 | FromDiscord | <theangryepicbanana> In reply to @Elegantbeef "Nevermind 😄": actually it's 1.7.1 lol, I forgot |
21:45:44 | FromDiscord | <theangryepicbanana> In reply to @jan0809 "so why should carbon": likely because it's Another C++ Clone ™️ |
21:46:09 | FromDiscord | <theangryepicbanana> I personally don't see anything interesting about the language, it doesn't even have a complete spec so idk if it even has unions and enums, and how they function |
21:46:29 | FromDiscord | <jan0809> c++ is from the 80s |
21:46:36 | FromDiscord | <!Patitotective> nim already has c++ ffi :D |
21:46:36 | FromDiscord | <theangryepicbanana> indeed |
21:46:55 | FromDiscord | <jan0809> In reply to @theangryepicbanana "I personally don't see": yeah its not ready for sure |
21:47:07 | FromDiscord | <theangryepicbanana> the idea of c++ in general is archaic, hence newer languages like rust, swift, and julia |
21:47:44 | FromDiscord | <jan0809> is swift a thing outside darwin btw? |
21:47:50 | FromDiscord | <theangryepicbanana> yeah |
21:47:54 | FromDiscord | <theangryepicbanana> you can run it on linux |
21:48:02 | FromDiscord | <jan0809> oh interesting |
21:48:11 | FromDiscord | <theangryepicbanana> supposedly windows as well, though it requires building the entire toolchain by hand (no thanks!) |
21:48:33 | FromDiscord | <theangryepicbanana> the easiest way to use swift on linux atm is probably via nix |
21:49:00 | FromDiscord | <jan0809> that linux ios sdk is very dead too right? |
21:49:00 | FromDiscord | <!Patitotective> (this is off-topic btw) |
21:49:15 | FromDiscord | <jan0809> true |
21:50:01 | FromDiscord | <theangryepicbanana> In reply to @jan0809 "that linux ios sdk": not sure, I haven't used it in a while |
21:50:10 | FromDiscord | <theangryepicbanana> at the very least you could use gnustep |
21:53:13 | FromDiscord | <jan0809> In reply to @theangryepicbanana "not sure, I haven't": just read apple dropped the lawsuit after two years, interesting, (when they ported android 11 to the iphone 7 as a revenge move apple prolly just gave up lol) |
21:53:36 | FromDiscord | <theangryepicbanana> lol ok |
21:56:28 | FromDiscord | <ghoom> sent a code paste, see https://play.nim-lang.org/#ix=45Ca |
21:56:56 | FromDiscord | <Elegantbeef> `proc myThing(str: string): string = "Hello world"` |
21:59:18 | FromDiscord | <ghoom> lol |
21:59:38 | FromDiscord | <can.l> In reply to @reversem3 "<@893965307171979326>\: Is there": I just added a BaseWidget.tooltip field, which allows you to add a tooltip for any widget (https://github.com/can-lehmann/owlkettle/blob/main/docs/widgets.md#fields). |
22:04:18 | FromDiscord | <can.l> In reply to @reversem3 "<@893965307171979326>\: Is there": Entrys currently support the changed(text: string) and activate() events. changed is called when the text in the entry is changed and activate is called when the user presses the enter key. |
22:13:10 | FromDiscord | <ghoom> how to do an async `do`? |
22:13:29 | FromDiscord | <ghoom> `do(...) {.async.}: ...`? |
22:14:42 | FromDiscord | <voidwalker> How do I represent the char literal with code 0002 ? |
22:14:42 | FromDiscord | <voidwalker> |
22:15:40 | FromDiscord | <Prestige> maybe just cast it |
22:15:42 | FromDiscord | <ghoom> `'\x02'` |
22:15:45 | FromDiscord | <Prestige> or that |
22:15:52 | FromDiscord | <voidwalker> wait.. it's unicode |
22:15:53 | FromDiscord | <voidwalker> U+0002 <control> character |
22:16:00 | FromDiscord | <ghoom> same thing |
22:16:07 | FromDiscord | <Elegantbeef> No it's not the same thing |
22:16:15 | FromDiscord | <Elegantbeef> You just past the rune in a string |
22:16:18 | FromDiscord | <Elegantbeef> paste\ rahter |
22:16:25 | FromDiscord | <Elegantbeef> It's not a char |
22:16:29 | FromDiscord | <voidwalker> even if it's a char ? |
22:16:31 | FromDiscord | <!Patitotective> yea, you cant use unicode in char literals |
22:16:35 | FromDiscord | <voidwalker> ohh damn : ) |
22:16:41 | FromDiscord | <Elegantbeef> It's not a char, it's more than a single byte |
22:16:47 | FromDiscord | <ghoom> In reply to @Elegantbeef "No it's not the": bruh what? ascii 0x2 is not unicode 0x2? |
22:16:48 | FromDiscord | <voidwalker> For some reason this file got it as separator for some strings.. |
22:16:55 | FromDiscord | <!Patitotective> In reply to @ghoom "bruh what? ascii 0x2": of course not |
22:17:05 | FromDiscord | <ghoom> 🤯 |
22:17:21 | FromDiscord | <Elegantbeef> No ascii and unicde `\02` is the same the difference is there is a unicode code point ahead of the `\02` |
22:17:22 | FromDiscord | <ghoom> does that mean ascii is not part of unicode? |
22:17:41 | FromDiscord | <Elegantbeef> 0..126 ascii is apart of unicode |
22:17:51 | FromDiscord | <ghoom> then why'd you say it's not the same? |
22:17:51 | FromDiscord | <Elegantbeef> Atleast utf8 |
22:17:57 | FromDiscord | <dom96> sent a code paste, see https://play.nim-lang.org/#ix=45Ce |
22:18:05 | FromDiscord | <Elegantbeef> I didnt say it wasnt the same |
22:18:21 | FromDiscord | <Elegantbeef> They have a unicode character which is different to the ascii character |
22:18:30 | FromDiscord | <ghoom> sent a code paste, see https://play.nim-lang.org/#ix=45Cf |
22:18:41 | FromDiscord | <ghoom> In reply to @Elegantbeef "They have a unicode": myy mind is fucking blown rn |
22:18:44 | FromDiscord | <dom96> meh, I prefer it to the do notation |
22:18:47 | FromDiscord | <!Patitotective> read unicode spec lol |
22:18:57 | FromDiscord | <Elegantbeef> is control, \\02 |
22:19:01 | FromDiscord | <dom96> wish the do notation wasn't in the language |
22:19:04 | FromDiscord | <voidwalker> so how do I deal with this +0002 U thing, to pass it as a variable separator for a string split ;\ |
22:19:06 | FromDiscord | <Elegantbeef> Control characters change how to parse the \` |
22:19:10 | FromDiscord | <ghoom> In reply to @dom96 "wish the do notation": why lol |
22:19:11 | FromDiscord | <Elegantbeef> parse the character |
22:19:22 | FromDiscord | <Elegantbeef> you do `""` voidwalker |
22:19:33 | FromDiscord | <dom96> In reply to @ghoom "why lol": cause it's ugly and inconsistent with the rest of the language |
22:19:39 | FromDiscord | <voidwalker> but then it's of string type ? |
22:19:42 | FromDiscord | <ghoom> or `'\u0002'` |
22:19:45 | FromDiscord | <ghoom> i think |
22:19:52 | FromDiscord | <Elegantbeef> Unicode characters are not characters↵(@voidwalker) |
22:20:05 | FromDiscord | <ghoom> ok |
22:20:09 | FromDiscord | <ghoom> so `"\u0002"` |
22:20:09 | FromDiscord | <Elegantbeef> In Nim characters are only a single byte that is 0..255 |
22:20:14 | FromDiscord | <Elegantbeef> No |
22:20:18 | FromDiscord | <Elegantbeef> it's `""` |
22:20:32 | FromDiscord | <ghoom> yeah but how to do that with escape seqs? |
22:20:56 | FromDiscord | <Elegantbeef> No clue i just use unicode characters directly |
22:21:07 | FromDiscord | <ghoom> i'm pretty sure what i sent is correct |
22:21:11 | FromDiscord | <Elegantbeef> I dont even know if nim support unicode strings |
22:21:22 | FromDiscord | <Elegantbeef> Well unicode escaped strings |
22:21:24 | FromDiscord | <ghoom> imma try dis! |
22:21:44 | FromDiscord | <!Patitotective> In reply to @Elegantbeef "I dont even know": it does |
22:21:52 | FromDiscord | <Elegantbeef> Fairly certain that writes \`\\u' then "0002" to a string buffer and not a unicode escaped string |
22:21:58 | FromDiscord | <Elegantbeef> I mean i got different result between the two |
22:22:14 | FromDiscord | <voidwalker> ahh, split works with string as well for the separator.. |
22:22:34 | FromDiscord | <Elegantbeef> image.png https://media.discordapp.net/attachments/371759389889003532/1001253153041305831/image.png |
22:22:48 | FromDiscord | <ghoom> beef, `"\u0002"` is correct |
22:22:50 | FromDiscord | <Elegantbeef> sent a code paste, see https://play.nim-lang.org/#ix= |
22:22:51 | FromDiscord | <ghoom> |
22:22:56 | FromDiscord | <ghoom> i tested it |
22:22:57 | FromDiscord | <Elegantbeef> sent a code paste, see https://play.nim-lang.org/#ix=45Ch |
22:23:08 | FromDiscord | <Zectbumo> https://nim-lang.org/docs/manual.html#lexical-analysis-string-literals |
22:23:09 | FromDiscord | <ghoom> ye there we go |
22:23:17 | FromDiscord | <Zectbumo> \u HHHH unicode codepoint with hex value HHHH; exactly four hex digits are allowed |
22:23:34 | FromDiscord | <ghoom> i'd use `\u{2}` |
22:23:42 | FromDiscord | <ghoom> looks cuter |
22:23:50 | FromDiscord | <ghoom> and lazier XD |
22:28:14 | NimEventer | New thread by Morturo: Streams and memory usage, see https://forum.nim-lang.org/t/9326 |
22:30:58 | FromDiscord | <gibson> Anyone know this error? I'm quite stuck. `inconsistent typing for reintroduced symbol 'paramsGlobal' previous type was: object; new type is: object` |
22:31:19 | FromDiscord | <Elegantbeef> I seen your forum post and can only say "you're writing macros wrong" |
22:31:39 | FromDiscord | <Elegantbeef> Now that you're here i'll help |
22:31:43 | FromDiscord | <gibson> 😆 thank you.. unfortunately I already knew that. |
22:32:07 | FromDiscord | <gibson> I would love help, thank you. |
22:32:10 | FromDiscord | <Elegantbeef> In this case there is no reason to use a macro |
22:32:17 | FromDiscord | <Elegantbeef> It's quite literally just a template |
22:33:53 | FromDiscord | <Elegantbeef> sent a code paste, see https://play.nim-lang.org/#ix=45Ct |
22:34:38 | FromDiscord | <gibson> Only issue is the fields are determined from macro invocations across many files, and stored in a compileTime seq, from which this macro gets the information necessary to construct the aggregate type. |
22:34:43 | FromDiscord | <Elegantbeef> It doesnt make sense that your macro errors |
22:34:53 | FromDiscord | <Elegantbeef> Well where is your actual macro? |
22:35:27 | FromDiscord | <gibson> I wonder if it's not a bug, because Nim1.2 is fine with it. |
22:36:02 | FromDiscord | <Elegantbeef> It looks like a bug but it's such a dumpster fire of a reproduction that ti's hard to say certainly |
22:36:29 | FromDiscord | <gibson> I'll try removing all the fields and such to whittle it down. |
22:36:36 | FromDiscord | <Elegantbeef> remove the `inject` |
22:43:35 | FromDiscord | <gibson> @ElegantBeef I "solved" it 🤢 by removing `expandMacros`. That was ruining everything. The resulting object works as expected. All good now. |
22:44:23 | FromDiscord | <Elegantbeef> sent a code paste, see https://play.nim-lang.org/#ix=45Di |
22:44:31 | FromDiscord | <Elegantbeef> Remember you can do `echo result.repr` inside of a macro |
22:45:17 | FromDiscord | <gibson> Awesome, I'll quote you and use that for the bug report. |
22:45:30 | FromDiscord | <Elegantbeef> You can remove the `inject` aswell |
22:45:45 | FromDiscord | <Elegantbeef> And remove the `result = newStmtList` |
22:46:03 | FromDiscord | <Elegantbeef> People need to learn to min repro better, just saying |
22:47:00 | FromDiscord | <gibson> Fair enough. |
22:47:10 | FromDiscord | <gibson> The `result = newStmtList()` is required. |
22:47:33 | FromDiscord | <Elegantbeef> No it's not |
22:47:57 | FromDiscord | <Elegantbeef> sent a code paste, see https://play.nim-lang.org/#ix=45Ds |
22:48:17 | FromDiscord | <gibson> Ah k, wondered what you were `add`ing to otherwise. |
22:54:51 | FromDiscord | <gibson> Annnd found the existing issue. Looks like the person working on it is stuck.↵https://github.com/nim-lang/Nim/issues/19071 |
23:01:24 | FromDiscord | <Arathanis> Is there any documentation on how to include c/c++ static libraries for compilation rather than using dynamic linking with `{.dynlib: "someLib.so".}` style? |
23:02:13 | FromDiscord | <Elegantbeef> it's just `{.pass;L "-s -lmyLibName".}` instead |
23:02:44 | FromDiscord | <Arathanis> that totally corsses my eyes gonna have to unpack that |
23:02:55 | FromDiscord | <# Luke> is there any software written in nim on homebrew |
23:03:02 | FromDiscord | <Elegantbeef> sorry it's `-static` |
23:03:04 | FromDiscord | <Arathanis> (edit) "corsses" => "crosses" |
23:03:15 | FromDiscord | <Elegantbeef> Or is it --static fuck i dont recall |
23:03:19 | FromDiscord | <Arathanis> is it supposed to be a `:` or is `;` accurate? |
23:03:28 | FromDiscord | <Arathanis> and what is the `L` for |
23:03:31 | FromDiscord | <Elegantbeef> Supposed to be `passl:` |
23:03:34 | FromDiscord | <Arathanis> (edit) "for" => "for?" |
23:03:36 | FromDiscord | <Arathanis> GOT it |
23:03:39 | FromDiscord | <Arathanis> passl pragma |
23:03:39 | FromDiscord | <Elegantbeef> pass linker |
23:03:53 | FromDiscord | <# Luke> In reply to @ripluke "is there any software": 💀 |
23:03:56 | FromDiscord | <Arathanis> `{.passl: "--static "someLib.a".}`? |
23:03:57 | FromDiscord | <# Luke> Guess not |
23:04:03 | FromDiscord | <Elegantbeef> Yea my fingers dont like saying what i'm thinking |
23:04:08 | FromDiscord | <Arathanis> (edit) ""someLib.a".}`?" => "someLib.a".}`?" |
23:04:25 | FromDiscord | <Elegantbeef> I dont think you do `.a` |
23:04:25 | FromDiscord | <Elegantbeef> it's `--static -lsomelib` iirc |
23:06:16 | FromDiscord | <Arathanis> and this would be a top level pragma I am guessing? |
23:06:17 | FromDiscord | <Zectbumo> https://nim-lang.org/1.4.8/nimc.html#dynliboverride |
23:06:34 | FromDiscord | <Elegantbeef> You can also pass it in the command line as well if you want |
23:06:59 | FromDiscord | <!Patitotective> In reply to @ripluke "Guess not": why dont you search |
23:11:11 | * | crem quit (Ping timeout: 255 seconds) |
23:12:23 | FromDiscord | <# Luke> Where do I put my GitHub token for nimble? |
23:13:26 | FromDiscord | <Prestige> I think you have to use an env variable `GITHUB_TOKEN` |
23:14:19 | * | crem joined #nim |
23:17:05 | * | krux02 quit (Remote host closed the connection) |
23:17:52 | FromDiscord | <!Patitotective> In reply to @Avahe "I think you have": yes |
23:18:06 | FromDiscord | <# Luke> hmm i have it set and its still not working |
23:21:08 | FromDiscord | <demotomohiro> @Arathanis This article might help you to use static library with Nim:↵https://internet-of-tomohiro.netlify.app/nim/clibrary.en.html |
23:21:42 | FromDiscord | <Arathanis> In reply to @demotomohiro "<@136570191038513152> This article might": thanks, i appreciate it |
23:22:11 | FromDiscord | <!Patitotective> In reply to @ripluke "hmm i have it": are you doing `getEnv`↵and running it with `GiTHUB_TOKEN="aklsdkljasjklfkjlasf"` |
23:22:13 | FromDiscord | <!Patitotective> code would help |
23:22:40 | FromDiscord | <!Patitotective> In reply to @Patitotective "are you doing `getEnv`": you also need to assert that `existsEnv("GITHUB_TOKEN")` |
23:22:46 | FromDiscord | <# Luke> im trying to publish a package |
23:22:59 | FromDiscord | <# Luke> with nimble publish |
23:23:10 | FromDiscord | <!Patitotective> sure |
23:23:20 | FromDiscord | <# Luke> like im not the one working with the env, thats nimble |
23:24:00 | FromDiscord | <!Patitotective> so if you're not running the code how is it not working? |
23:24:01 | FromDiscord | <!Patitotective> error? |
23:25:00 | FromDiscord | <# Luke> wdym? im not running any code |
23:25:25 | FromDiscord | <# Luke> all im doing is uploading a package to nimble |
23:25:26 | FromDiscord | <!Patitotective> In reply to @ripluke "hmm i have it": wdym here by "not working"? |
23:26:13 | FromDiscord | <# Luke> sent a code paste, see https://play.nim-lang.org/#ix=45Dy |
23:26:20 | FromDiscord | <# Luke> the comand output |
23:26:34 | FromDiscord | <!Patitotective> oh i understood something completely different LOL |
23:26:45 | FromDiscord | <!Patitotective> well, you just paste it after they tell you |
23:26:47 | FromDiscord | <!Patitotective> and enter |
23:27:03 | FromDiscord | <# Luke> In reply to @Patitotective "well, you just paste": wdym |
23:27:09 | FromDiscord | <# Luke> they never trold me to |
23:27:19 | FromDiscord | <# Luke> it just goes straight to that message' |
23:27:22 | FromDiscord | <# Luke> (edit) "message'" => "message" |
23:27:28 | FromDiscord | <!Patitotective> paste it after they tell you that message |
23:27:33 | FromDiscord | <# Luke> ok |
23:27:36 | FromDiscord | <!Patitotective> (edit) removed "they tell you" |
23:28:16 | FromDiscord | <# Luke> nope that didnt work |
23:28:24 | FromDiscord | <# Luke> it still opens my browser |
23:29:40 | FromDiscord | <!Patitotective> after it opens the browser, go back to the terminal and paste it |
23:29:50 | FromDiscord | <# Luke> hmm ok |
23:30:14 | FromDiscord | <Prestige> I remember having this same issue a bit ago |
23:30:16 | FromDiscord | <Prestige> it was painful |
23:30:27 | FromDiscord | <!Patitotective> yea, messages are unclear |
23:30:57 | FromDiscord | <# Luke> ok that worked |
23:31:00 | FromDiscord | <# Luke> thx |
23:31:36 | FromDiscord | <!Patitotective> easy PR if someone asks me |
23:32:03 | FromDiscord | <Prestige> Do it |
23:34:17 | FromDiscord | <theangryepicbanana> is play.nim-lang down? |
23:34:28 | FromDiscord | <Prestige> Yep |
23:34:48 | FromDiscord | <theangryepicbanana> great |
23:35:11 | FromDiscord | <theangryepicbanana> I'm having this weird issue where a bitpacked object inside of a variant object is being zeroed out when copied |
23:37:53 | FromDiscord | <theangryepicbanana> sent a code paste, see https://play.nim-lang.org/#ix=45DB |
23:42:03 | * | LuxuryMode quit (Quit: Connection closed for inactivity) |
23:42:56 | FromDiscord | <Elegantbeef> Any chance you can give a runnable example? |
23:45:02 | FromDiscord | <theangryepicbanana> sent a code paste, see https://play.nim-lang.org/#ix=45DC |
23:45:40 | FromDiscord | <Elegantbeef> Works here |
23:45:47 | FromDiscord | <Elegantbeef> after fixing the case declaration |
23:45:47 | FromDiscord | <theangryepicbanana> that's strange |
23:46:10 | FromDiscord | <theangryepicbanana> lol yeah still sometimes write pascal by accident |
23:46:20 | FromDiscord | <theangryepicbanana> uh that's weird though |
23:47:23 | FromDiscord | <theangryepicbanana> the actual code having issues is <https://github.com/ALANVF/star/blob/master/vm/dec64.nim#L10> and <https://github.com/ALANVF/star/blob/master/vm/values.nim#L25>, with issues occurring with a seq of the latter type |
23:47:59 | FromDiscord | <theangryepicbanana> ah I suppose it's not updated |
23:48:18 | FromDiscord | <theangryepicbanana> pretend `Value` has a `of vDec64: d64: Dec64` case |
23:49:34 | FromDiscord | <Elegantbeef> Is trying hard to not comment about those constant names |
23:50:02 | FromDiscord | <theangryepicbanana> In reply to @Elegantbeef "*Is trying hard to": well it's translated from C and I was too lazy to improve it lol |
23:50:08 | FromDiscord | <theangryepicbanana> ahhhh it's a copying issue |
23:50:20 | FromDiscord | <theangryepicbanana> are bitpacked structs not given default copy behavior? |
23:50:28 | FromDiscord | <Elegantbeef> Just chop the C namespace is what i'm annoyed of |
23:50:32 | FromDiscord | <Elegantbeef> They should copy as normal |
23:50:53 | FromDiscord | <theangryepicbanana> sent a code paste, see https://play.nim-lang.org/#ix=45DD |
23:51:05 | FromDiscord | <theangryepicbanana> hmm |
23:51:43 | FromDiscord | <Elegantbeef> sent a code paste, see https://play.nim-lang.org/#ix=45DE |
23:52:04 | FromDiscord | <Elegantbeef> sent a code paste, see https://play.nim-lang.org/#ix=45DF |
23:52:07 | FromDiscord | <theangryepicbanana> that's so bizarre |
23:52:18 | FromDiscord | <theangryepicbanana> ok question |
23:52:25 | FromDiscord | <theangryepicbanana> try replacing the `int64` with `-36028797018963968 .. 36028797018963967` |
23:53:05 | FromDiscord | <Elegantbeef> Works fine |
23:53:14 | FromDiscord | <theangryepicbanana> wtf |
23:53:26 | FromDiscord | <Elegantbeef> Have you defined your own `=copy`? |
23:54:12 | FromDiscord | <theangryepicbanana> yeah I tried that |
23:54:26 | FromDiscord | <Elegantbeef> Ah so you didnt before |
23:54:29 | FromDiscord | <theangryepicbanana> yeah |
23:56:16 | FromDiscord | <Elegantbeef> Hmm i have an diea let's see if it causes it 😄 |
23:56:37 | NimEventer | New Nimble package! dye - An image colorizer, see https://github.com/Infinitybeond1/dye |
23:56:45 | FromDiscord | <Elegantbeef> Nope |
23:56:56 | FromDiscord | <Elegantbeef> Having a larger branch did not cause anything |