00:00:13 | FromDiscord | <retkid> sent a code paste, see https://paste.rs/sVU |
00:00:15 | FromDiscord | <retkid> but no |
00:00:30 | FromDiscord | <retkid> sent a code paste, see https://play.nim-lang.org/#ix=3SmN |
00:00:50 | FromDiscord | <retkid> this is bad and you should feel bad |
00:01:16 | FromDiscord | <Elegantbeef> IOStream was thought to be a good idea, but who knew a weird usage of operators mutating a global state wasnt intuitive |
00:01:25 | FromDiscord | <Elegantbeef> You can always use the C stdio if you wanted 😛 |
00:01:59 | FromDiscord | <retkid> sent a code paste, see https://paste.rs/qpu |
00:02:56 | FromDiscord | <retkid> C is better than CPP but feels more antiquated but its ok |
00:04:36 | FromDiscord | <retkid> CPP rant over but, it has some of the least readable code I've ever seen |
00:05:51 | FromDiscord | <Elegantbeef> How can you say that C++'s code is the most readable code ever! |
00:09:03 | FromDiscord | <creikey> sent a code paste, see https://play.nim-lang.org/#ix=3SmO |
00:09:10 | FromDiscord | <Elegantbeef> `let` |
00:09:12 | FromDiscord | <creikey> is there just a stupid string.copy or something that makes it in a dynamic context |
00:09:31 | FromDiscord | <creikey> In reply to @Elegantbeef "`let`": same error |
00:09:31 | FromDiscord | <Elegantbeef> either do `let fontData = static: staticRead("Roboto-Regular_1.ttf")` or `const fontData = staticRead("Roboto-Regular_1.ttf")` |
00:10:15 | FromDiscord | <Elegantbeef> The issue isnt that it needs to copy it's that it knows the right hand needs to be done statically but is not allowed `static` forces that or using const |
00:11:03 | FromDiscord | <auxym> my gripe is way more stupid than that |
00:11:19 | FromDiscord | <auxym> I can't bring myself to type out a semicolon after every single line |
00:11:35 | FromDiscord | <Elegantbeef> Me writing shaders inside a Nim project 😀 |
00:11:51 | FromDiscord | <auxym> heh. shady? |
00:12:29 | FromDiscord | <Elegantbeef> No |
00:13:12 | FromDiscord | <auxym> shady looks interesting. why not? |
00:14:21 | FromDiscord | <Elegantbeef> I may use UBOs and dont want to seperate shader languages in a single project |
00:14:28 | FromDiscord | <Elegantbeef> two seperate\ |
00:15:18 | FromDiscord | <auxym> i see. |
00:17:24 | FromDiscord | <Elegantbeef> Same with SSBOs I guess, i like my modern opengl features |
00:17:47 | FromDiscord | <auxym> i don't know shit about opengl tbh |
00:18:03 | FromDiscord | <auxym> btw did you see this crazy stuff? https://kilograham.github.io/rp2040-doom/ |
00:18:09 | FromDiscord | <Elegantbeef> Well there are modern features that allow you to upload data directly to the gpu as long as it's 16 byte aligned |
00:18:32 | FromDiscord | <Elegantbeef> Previously you needed to bake to a texture or similar |
00:18:33 | FromDiscord | <Elegantbeef> This gives you a more ergonomic and faster api |
00:18:33 | FromDiscord | <Elegantbeef> I had seen it |
00:18:54 | FromDiscord | <Elegantbeef> I still have the want to make a pretend commedore 64 with the pico |
00:19:40 | FromDiscord | <auxym> that'd be neat. Boot direct to basic? |
00:19:54 | FromDiscord | <Elegantbeef> Yea |
00:20:09 | FromDiscord | <Elegantbeef> One core for graphics the other for the main loop |
00:30:21 | FromDiscord | <creikey> is there https://github.com/jackmott/easygl but actually updated? |
00:31:54 | * | Gustavo6046 joined #nim |
00:32:48 | FromDiscord | <Elegantbeef> It's close to my API, but it probably has a larger surface |
00:34:03 | FromDiscord | <Elegantbeef> https://github.com/beef331/truss3d/tree/master/src/truss3D it's a base if you want to fork |
00:47:46 | FromDiscord | <retkid> which would be faster |
00:47:52 | FromDiscord | <retkid> figuring out c++ interop |
00:48:33 | FromDiscord | <retkid> or use execShellCmd |
00:48:58 | FromDiscord | <Elegantbeef> Faster to run or faster to do? |
00:49:00 | FromDiscord | <Elegantbeef> Also what library? |
00:49:03 | FromDiscord | <retkid> both |
00:49:10 | FromDiscord | <retkid> I have all the code run |
00:49:11 | FromDiscord | <retkid> (edit) "run" => "made" |
00:49:30 | FromDiscord | <Elegantbeef> Well not using system calls will be faster |
00:49:43 | FromDiscord | <Elegantbeef> But using the shell will be quicker to write |
00:50:37 | FromDiscord | <retkid> I suppose because i need to do this... around 201600 times |
00:50:54 | FromDiscord | <retkid> I need to execute shell commands either way unless there is imagemagick bindings |
00:51:21 | FromDiscord | <Elegantbeef> What are you doing to the images and what are the formats? |
00:51:22 | FromDiscord | <retkid> or i take the original library to bits and remake it to my specific need |
00:51:41 | FromDiscord | <retkid> crop and swap the red and blue channels |
00:52:08 | FromDiscord | <congusbongus> imagemagick works well on the command line; trying to interop with it is overkill |
00:52:34 | FromDiscord | <Elegantbeef> Use pixie then |
00:52:50 | FromDiscord | <retkid> would it be faster then command line? |
00:52:55 | FromDiscord | <Elegantbeef> Yes |
00:53:01 | FromDiscord | <Elegantbeef> Probably atleast |
00:53:14 | FromDiscord | <retkid> treeform strikes again |
00:54:51 | FromDiscord | <retkid> i cant find a crop function in pixie? |
00:56:03 | FromDiscord | <Elegantbeef> make a new image the size you need then use `drawImage` |
01:30:23 | * | rb quit (Remote host closed the connection) |
01:31:27 | * | acidsys quit (Excess Flood) |
01:31:37 | * | rwb joined #nim |
01:32:00 | * | acidsys joined #nim |
02:03:51 | FromDiscord | <auxym> dom has bindings for opencv, it might be another option if it has what you need: https://github.com/dom96/nim-opencv |
02:05:00 | * | krux02 quit (Remote host closed the connection) |
02:10:58 | FromDiscord | <Elegantbeef> @auxym\: have you used micros any or is it still confusing? |
02:11:34 | FromDiscord | <auxym> haven't had a look yet! on my to-do 😛 |
02:17:14 | * | ltriant_ joined #nim |
02:18:04 | * | ltriant quit (Ping timeout: 250 seconds) |
02:58:04 | FromDiscord | <Elegantbeef> Ah @auxym i did add the case stmt macro btw, so tedious API away 🙂 https://github.com/beef331/micros/blob/master/tests/tcasemacro.nim#L6-L72 |
03:15:15 | * | ltriant_ quit (Quit: leaving) |
03:48:15 | FromDiscord | <m4ul3r> sent a code paste, see https://play.nim-lang.org/#ix=3Sno |
03:50:54 | * | arkurious quit (Quit: Leaving) |
03:56:20 | FromDiscord | <Elegantbeef> Use an if expression and set `STRING` |
03:56:29 | FromDiscord | <Elegantbeef> I mean `test` |
03:57:08 | * | slowButPresent quit (Quit: leaving) |
03:57:14 | FromDiscord | <Elegantbeef> sent a code paste, see https://play.nim-lang.org/#ix=3Snp |
04:01:22 | FromDiscord | <Elegantbeef> @m4ul3r\: or does that not work for you? |
04:05:49 | FromDiscord | <m4ul3r> sent a code paste, see https://play.nim-lang.org/#ix=3Snr |
04:06:13 | FromDiscord | <Elegantbeef> `calc_range` returns what? |
04:06:22 | FromDiscord | <m4ul3r> a sequence of strings |
04:07:14 | FromDiscord | <Elegantbeef> sent a long message, see http://ix.io/3Sns |
04:07:18 | FromDiscord | <demotomohiro> When you use if expression, type of all branch must be same. |
04:07:27 | FromDiscord | <Elegantbeef> sent a code paste, see https://paste.rs/NGT |
04:07:51 | FromDiscord | <Elegantbeef> Damn the matrix bridge still doesnt delete across the bridge |
04:09:51 | FromDiscord | <m4ul3r> @demotomohiro @ElegantBeef Thank you 👍 very helpful and it's working how I am wanting |
04:10:07 | FromDiscord | <m4ul3r> I'm coming from python, so I am stuck in some old ways |
04:10:07 | FromDiscord | <Elegantbeef> you also could make `calcrange` handle it |
04:10:59 | FromDiscord | <Elegantbeef> sent a code paste, see https://play.nim-lang.org/#ix=3Snu |
04:11:13 | FromDiscord | <Elegantbeef> Eh Nim has scope so things have to exist in scope |
04:23:28 | * | ltriant joined #nim |
04:59:41 | * | ltriant quit (Ping timeout: 256 seconds) |
05:09:36 | * | ltriant joined #nim |
05:17:15 | FromDiscord | <Shinyzenith> @demotomohiro Thank you soo much futhark was just what I needed and it works perfectly |
05:17:33 | FromDiscord | <Shinyzenith> I was able to spin up a basic wayland display in no time https://media.discordapp.net/attachments/371759389889003532/953522390355292190/unknown.png |
05:18:24 | FromDiscord | <Elegantbeef> Futhark is magic for using C code 😀 |
05:21:04 | FromDiscord | <demotomohiro> In reply to @Shinyzenith "<@!288750616510201856> Thank you soo": Congratulations! |
05:22:28 | FromDiscord | <Shinyzenith> In reply to @Elegantbeef "Futhark is magic for": yeah it's really good! |
05:22:40 | FromDiscord | <Shinyzenith> I just have some header issues but I have a temporary nasty workaround using sudo |
05:22:43 | FromDiscord | <Shinyzenith> In reply to @demotomohiro "Congratulations!": <:8ACOSP_CatHearts:755833620467417240> |
06:31:49 | * | ltriant quit (Ping timeout: 256 seconds) |
07:12:32 | FromDiscord | <dilawar (Dilawar Singh)> `nim doc --project src/a.nim` will product `a.html` as the starting point for html docs. It is possible to change it to `index.html` for easy deployment? |
07:12:58 | FromDiscord | <Elegantbeef> does `--out:index.html` work? |
07:14:02 | FromDiscord | <dilawar (Dilawar Singh)> Unfortunately no. It created directory `index.html` and put `a.html` inside it! |
07:16:19 | * | PMunch joined #nim |
07:17:37 | FromDiscord | <Elegantbeef> Based off https://nim-lang.org/docs/docgen.html i dont think there is a way so guess make a nimble build task forr it |
07:19:50 | FromDiscord | <dilawar (Dilawar Singh)> > Based off https://nim-lang.org/docs/docgen.html i dont think there is a way so guess make a nimble build task forr it↵\:-( . I'll probably just rename the a.html to index.html and hope for the best. github pages expect `index.html` to be starting point. |
07:19:54 | * | ltriant joined #nim |
07:20:25 | FromDiscord | <Elegantbeef> You can pass `--project` which generates a project index, but that's not what you want 😛 |
07:21:12 | FromDiscord | <dilawar (Dilawar Singh)> I have `--project` and `--index:on` as well. `theindex.html` is a html with indices that I don't want to the first page. |
07:21:48 | FromDiscord | <Elegantbeef> I'd just make a task like i said that calls your docgen then moves the file |
07:22:47 | FromDiscord | <dilawar (Dilawar Singh)> Just saw the nimscript tasks are allowed in nimble file. That make life easier. Do you think I should raise an issue for this? |
07:23:00 | FromDiscord | <Elegantbeef> Perhaps it's a feature request at the very least |
07:36:09 | NimEventer | New thread by Monsoonman: Cant't change the name of main html file in the output of `nim doc`?, see https://forum.nim-lang.org/t/9017 |
07:37:09 | FromDiscord | <Elegantbeef> That's not an issue, that's forum post |
07:37:16 | FromDiscord | <Elegantbeef> Tsk tsk [dilawar (Dilawar Singh)](https://matrix.to/#/@dilawar-599aa234d73408ce4f7246bd:gitter.im) you had one job! 😛 |
07:39:09 | * | ltriant quit (Ping timeout: 252 seconds) |
07:52:11 | FromDiscord | <VideoCarp> I'm getting indentation error here. But I can't see why, at all. Have a look here https://paste.gg/p/anonymous/81d855b097594182af9cb52a6b329a12 |
07:52:53 | FromDiscord | <Elegantbeef> Are you using tabs? |
07:53:02 | FromDiscord | <Rika> Missing colon before proc return type |
07:53:13 | FromDiscord | <Elegantbeef> Also dont do what you're doing |
07:53:29 | FromDiscord | <VideoCarp> I'm using 4 spaces |
07:53:34 | * | jjido joined #nim |
07:53:37 | FromDiscord | <VideoCarp> In reply to @Elegantbeef "Also dont do what": wdym? |
07:53:37 | FromDiscord | <Rika> In reply to @Rika "Missing colon before proc": You are missing this |
07:53:53 | FromDiscord | <Elegantbeef> `const alphaNumerics = {'a'..'z', 'A'..'Z', '0'..'9', '_'}` |
07:53:55 | FromDiscord | <Elegantbeef> Do that instead |
07:54:13 | FromDiscord | <Elegantbeef> It's a bitset it's vastly cheaper to check if a value is in it than the sting |
07:54:17 | FromDiscord | <Elegantbeef> string\ |
07:54:32 | FromDiscord | <Elegantbeef> then you can do `proc isAlpha(ch: char): bool = ch in alphaNumerics` |
07:55:21 | FromDiscord | <Rika> That set is also identical to the IdentChars set in strutils |
07:55:30 | FromDiscord | <Rika> https://nim-lang.org/docs/strutils.html#IdentChars |
07:55:31 | FromDiscord | <VideoCarp> I will. But I tried `proc alpha(n: char): bool =` won't work. |
07:55:33 | FromDiscord | <Elegantbeef> Yep i was going to mention strutils |
07:55:49 | FromDiscord | <Rika> In reply to @VideoCarp "I will. But I": Then there is more issues in your indentation |
07:55:57 | FromDiscord | <VideoCarp> exact same error |
07:56:01 | FromDiscord | <Elegantbeef> https://play.nim-lang.org/ post the code here |
07:56:14 | FromDiscord | <Elegantbeef> The site you used introduced tabs |
07:56:17 | FromDiscord | <Elegantbeef> So we have 0 clue what your actual code is |
07:56:42 | FromDiscord | <Rika> In reply to @Elegantbeef "The site you used": It didn’t |
07:56:50 | FromDiscord | <Rika> There are no tabs from what I see in that site |
07:56:53 | FromDiscord | <Elegantbeef> I copied from it an d it had tabs |
07:57:10 | FromDiscord | <VideoCarp> oh |
07:57:13 | FromDiscord | <VideoCarp> i will then |
07:57:17 | FromDiscord | <Elegantbeef> Ah there is a `raw` |
07:57:33 | FromDiscord | <Elegantbeef> the only issue with the raw file was not having `: bool` |
07:57:41 | FromDiscord | <Rika> It’s really the colon |
07:57:41 | FromDiscord | <Elegantbeef> and `n` not existing for `echo alpha(n)` |
07:57:51 | FromDiscord | <Elegantbeef> Are you sure you saved after modifying? |
07:58:07 | FromDiscord | <Rika> In reply to @Elegantbeef "and `n` not existing": That shouldn’t yield an indentation error |
07:58:20 | FromDiscord | <Elegantbeef> I mean i was saying the issues with the code |
07:58:20 | FromDiscord | <VideoCarp> it's the thing i was using to run it |
07:58:23 | FromDiscord | <VideoCarp> it is forcing tabs |
07:58:28 | FromDiscord | <Rika> Ok |
07:58:51 | FromDiscord | <Elegantbeef> Either run the code locally or use the playground and make pmunch sad |
07:59:02 | FromDiscord | <Elegantbeef> The more code we run there the more likely it crashes again 😛 |
07:59:53 | PMunch | Haha, doesn't make me sad. I'm happy that people use it :) |
08:00:08 | FromDiscord | <Elegantbeef> I wonder how many cache files you have just from me |
08:00:17 | FromDiscord | <Rika> I’m on it boss, making a threaded code submitter to the playground |
08:00:29 | FromDiscord | <Rika> Buying bulk proxy IPs right now brb |
08:00:37 | PMunch | @Rika, I'm happy that people uses it |
08:00:43 | FromDiscord | <Elegantbeef> I heavily use the playground for macro debugging steps |
08:00:49 | PMunch | Ditto :P |
08:00:50 | FromDiscord | <Rika> Lol |
08:01:06 | FromDiscord | <Elegantbeef> "I need to dumptree, time to open up the ol' playground" |
08:01:08 | FromDiscord | <Rika> I don’t use the playground often, I just have a scratch folder |
08:01:31 | FromDiscord | <Elegantbeef> I too have a scratch folder it's called `/tmp/` |
08:02:04 | FromDiscord | <Elegantbeef> Anyway videocarp everything going swell now? |
08:03:27 | FromDiscord | <Rika> I tend to save everything |
08:04:07 | FromDiscord | <Elegantbeef> packrats |
08:06:23 | FromDiscord | <VideoCarp> yeah |
08:06:25 | FromDiscord | <VideoCarp> working |
08:06:36 | * | jjido quit (Quit: My MacBook Air has gone to sleep. ZZZzzz…) |
08:08:22 | FromDiscord | <Elegantbeef> Gooooood |
08:08:45 | FromDiscord | <Rika> The more O’s the gooder |
08:09:03 | FromDiscord | <Elegantbeef> Goooooooodest gooooooood |
08:22:35 | PMunch | @dom96, did you ever write anything about the AV situation? |
08:32:39 | PMunch | Hmm, is there no align pragma for objects? |
08:33:16 | FromDiscord | <Elegantbeef> Only for fields |
08:34:35 | * | retronav quit (Quit: ZNC 1.8.2+deb2+b1 - https://znc.in) |
08:35:18 | * | ltriant joined #nim |
08:36:39 | PMunch | So to wrap something like this: http://ix.io/3Sq7 I need to add `align(4)` to every field? |
08:38:11 | FromDiscord | <Elegantbeef> I think so, you could of course make a macro to make it less complicated |
08:40:33 | FromDiscord | <Elegantbeef> I say less complicated in the way that you dont have to do it in your generating code, you can do it after |
08:40:40 | FromDiscord | <Elegantbeef> But YMMV |
08:41:09 | PMunch | I guess I'll just implement the pragma myself as a macro |
08:41:15 | * | wyrd quit (Ping timeout: 240 seconds) |
08:41:27 | PMunch | This is for Futhark by the way |
08:41:35 | FromDiscord | <Elegantbeef> Yea i know |
08:42:31 | FromDiscord | <Elegantbeef> If only micros was a proper package at this point |
08:42:38 | FromDiscord | <Elegantbeef> Would make your life easier 😛 |
08:43:24 | * | wyrd joined #nim |
08:45:53 | * | toulene quit (Remote host closed the connection) |
09:05:19 | FromDiscord | <m4ul3r> Nim tables, best way to search values and return the key? |
09:05:33 | FromDiscord | <Rika> Make a reverse table |
09:05:52 | FromDiscord | <Elegantbeef> make your own bidirectional table object |
09:05:57 | FromDiscord | <Elegantbeef> Hmm is there a library for it |
09:06:39 | FromDiscord | <Elegantbeef> There is not |
09:06:41 | PMunch | Hmm, can't I make a type definition pragma? |
09:07:06 | FromDiscord | <Elegantbeef> Yes you can |
09:07:12 | FromDiscord | <Elegantbeef> How are you trying? |
09:08:28 | PMunch | Like so: https://play.nim-lang.org/#ix=3Sve |
09:08:51 | FromDiscord | <Elegantbeef> Arguments go before the typedef |
09:09:20 | FromDiscord | <Elegantbeef> hmmm |
09:09:34 | PMunch | Aha, it can't be called align |
09:09:45 | FromDiscord | <Elegantbeef> Odd |
09:10:05 | PMunch | It already exist as a pragma, so I guess it checks that first |
09:10:39 | FromDiscord | <Elegantbeef> Also these macros are weird you need to return a typesection |
09:10:56 | FromDiscord | <Elegantbeef> If i recally correctly atleast |
09:11:47 | PMunch | Hmm, it works in the playground, but I get invalid pragma when I try to use it.. |
09:14:18 | FromDiscord | <Elegantbeef> Odd |
09:17:04 | PMunch | Ah, I was generating the pragma incorrectly |
09:17:26 | * | ltriant quit (Ping timeout: 245 seconds) |
09:17:46 | * | jjido joined #nim |
09:19:03 | FromDiscord | <m4ul3r> sent a code paste, see https://play.nim-lang.org/#ix=3SwO |
09:21:30 | FromDiscord | <Elegantbeef> sent a code paste, see https://play.nim-lang.org/#ix=3Sxc |
09:22:07 | FromDiscord | <Rika> Probably capitalise the T in table there |
09:22:14 | FromDiscord | <Rika> Not that it matters of course |
09:22:16 | FromDiscord | <Rika> But stil |
09:22:32 | FromDiscord | <Elegantbeef> Yea just an example of how to start it |
09:22:55 | FromDiscord | <Elegantbeef> I'm going now so buh bye and hope you make a nice solution |
09:23:17 | FromDiscord | <m4ul3r> 🙏 You're too helpful |
09:41:26 | FromDiscord | <dom96> In reply to @PMunch "<@132595483838251008>, did you ever": Nope. Really busy this month. Should have time next month. |
09:43:18 | PMunch | No worries, just wanted to make sure I didn't miss it |
10:00:12 | * | jjido quit (Quit: My MacBook Air has gone to sleep. ZZZzzz…) |
10:10:30 | FromDiscord | <Generic> so I abused whatever is possible out of Nim's current support for cyclic dependencies |
10:11:08 | * | dtan joined #nim |
10:11:26 | FromDiscord | <Generic> but now I've run into an issue with nimsuggest where it would get into an endless loop and would suggest the same symbols over and over until it dies at some point (possibly just OOM) |
10:12:05 | FromDiscord | <Generic> specifically the outline command seems to be the easiest way to trigger it |
10:12:18 | FromDiscord | <Generic> any idea where to look? |
10:12:32 | FromDiscord | <Generic> though this is probably way above my level |
10:12:58 | FromDiscord | <Rika> Look into not abusing cyclic support 😉 |
10:14:14 | FromDiscord | <Generic> I don't want to plaster everything with indirect calls though |
10:14:25 | FromDiscord | <Generic> I'm working on an emulator |
10:14:40 | FromDiscord | <Generic> and all the peripherals are mapped to the bus |
10:14:59 | FromDiscord | <Generic> but a lot of them can access the bus again |
10:15:17 | FromDiscord | <Generic> that makes it pretty hard not to use cyclic imports |
10:26:27 | * | dtan quit (Read error: Connection reset by peer) |
10:27:27 | * | dtan joined #nim |
10:34:14 | * | jmdaemon quit (Ping timeout: 250 seconds) |
10:34:42 | NimEventer | New thread by Dabod: How to prevent nim generate C code access parent type through `Sup` field?, see https://forum.nim-lang.org/t/9018 |
10:41:09 | * | dtan quit (Ping timeout: 256 seconds) |
10:49:06 | FromDiscord | <untoreh> sent a code paste, see https://paste.rs/3mZ |
10:49:47 | FromDiscord | <Rika> Sanitisation |
10:50:10 | FromDiscord | <Rika> I think you have to put the inject pragma on the let x statement |
11:00:38 | * | dtan joined #nim |
11:00:42 | * | dtan quit (Remote host closed the connection) |
11:01:01 | * | dtan joined #nim |
11:01:16 | * | dtan left #nim (#nim) |
11:11:26 | * | dtan joined #nim |
11:11:27 | * | dtan quit (Client Quit) |
11:11:43 | * | dtan joined #nim |
11:26:41 | * | dtan quit (Read error: Connection reset by peer) |
11:27:10 | * | dtan joined #nim |
11:29:17 | PMunch | @untoreh, @Rika is correct, the way to do this is https://play.nim-lang.org/#ix=3SxN |
11:29:18 | * | dtan quit (Read error: Connection reset by peer) |
11:40:27 | * | ltriant joined #nim |
11:45:02 | * | ltriant quit (Ping timeout: 240 seconds) |
11:45:50 | FromDiscord | <hmmm> boyz if I had a large seq of objects, does it make sense to make a table of {object.id + seqindex} for fast search or there is a simpler way 🤔 |
11:52:22 | Amun-Ra | make a Table instead of seq |
11:53:26 | FromDiscord | <hmmm> hmm seems simpler |
12:13:38 | * | ltriant joined #nim |
12:15:06 | FromDiscord | <Phil> The nanosecond your desired data mapping is no longer just a list but you care about data inside your seq to be reconsidered, make it a hashmap / table |
12:15:34 | FromDiscord | <Rika> my brain cannot read this sentence and i am unsure why |
12:15:35 | FromDiscord | <Phil> At least coming from higher level languages that's my take on it |
12:16:35 | FromDiscord | <Phil> The moment you want to access your data not just as a list, but also by somehow taking something insiden of your data into account (like an id), you should be using a hashmap/table.↵More readable? |
12:16:49 | FromDiscord | <Phil> (edit) "insiden" => "inside" |
12:16:55 | FromDiscord | <Rika> yes |
12:17:11 | FromDiscord | <Rika> `but you care about data inside your seq to be reconsidered` just reads wrong |
12:17:29 | FromDiscord | <Phil> Hmmm fair |
12:17:58 | FromDiscord | <Phil> I think "considered" is one issue as that should be used, not reconsidered, and its data of the individual entries of the seq, not the data of the seq |
12:18:17 | * | ltriant quit (Ping timeout: 256 seconds) |
12:18:18 | FromDiscord | <Rika> "but" is also the wrong word to use |
12:18:31 | FromDiscord | <Phil> Aaanyway, my bad english aside, hashmaps when complicated mappings are in use |
12:18:40 | FromDiscord | <Rika> whatever lol yeah |
12:18:55 | FromDiscord | <Phil> (edit) "Aaanyway, my bad english aside, hashmaps when complicated mappings are in use ... " added "that go beyond "map entry to index"" |
13:14:42 | NimEventer | New question by Dev Nugget: How to create a stack-based programming language in Nim, see https://stackoverflow.com/questions/71497724/how-to-create-a-stack-based-programming-language-in-nim |
14:00:38 | Amun-Ra | "This question was voluntarily removed by its author." |
14:03:03 | FromDiscord | <Rika> "How to create a stack-based programming language in Nim: so I want to create a stack based programming language and I want to create it using the Nim programming language. However, I don't mind getting any help from other languages. How would I go on about" |
14:03:15 | FromDiscord | <Rika> thats what the preview shows |
14:04:08 | PMunch | Well, I'd link them to my blog post on how I created my own stack based language |
14:04:18 | PMunch | Or to the Min programming language sources |
14:24:56 | * | Gustavo6046 quit (Ping timeout: 245 seconds) |
14:26:23 | FromDiscord | <DevNugget> In reply to @Amun-Ra ""This question was voluntarily": they forced me to but yeah |
14:26:44 | FromDiscord | <DevNugget> In reply to @PMunch "Well, I'd link them": yes please |
14:29:06 | PMunch | They forced you to? |
14:29:57 | PMunch | This is my article: https://peterme.net/metaprogramming-and-read-and-maintainability-in-nim.html with the v1 of the language here: https://github.com/PMunch/stacklang |
14:30:20 | PMunch | And you can find Min here: https://min-lang.org/ |
14:30:49 | FromDiscord | <DevNugget> Uh well, I wasn't able to specify my problem clearly enough so it got flagged. I resubmitted it after correcting but it didn't look like it was getting aproved anytime soon so I just deleted it hoping to make a new question but I ran into a daily limit |
14:30:58 | FromDiscord | <DevNugget> In reply to @PMunch "This is my article:": thank you very much |
14:31:29 | FromDiscord | <enthus1ast> parsecfg needs something like this |
14:31:30 | FromDiscord | <enthus1ast> to also support int, float etc |
14:31:37 | FromDiscord | <enthus1ast> sent a code paste, see https://play.nim-lang.org/#ix=3SyB |
14:31:45 | PMunch | That article mostly deals with how I rewrote the initial project to be much cleaner |
14:32:17 | PMunch | The stacklang repo is a much more complete language, and v2 which is currently only private is an entirely different beast |
14:33:00 | PMunch | It also has a library mode, so I've written stacksheet which is a small terminal spreadsheet application where each cell is a stacklang calculation |
14:33:41 | FromDiscord | <hmmm> hoy I forgot the magic incantation to reverse a seq, halp pls? |
14:34:30 | FromDiscord | <demotomohiro> Check sequtils or algoritm module |
14:34:40 | FromDiscord | <hmmm> sequtils I checked |
14:34:54 | FromDiscord | <hmmm> if I'm not blind there shouldn't be anything, I'll check algo |
14:35:19 | FromDiscord | <Solitude> https://nim-lang.org/docs/algorithm.html#reverse%2CopenArray%5BT%5D |
14:35:24 | FromDiscord | <Solitude> use the goddamn index |
14:35:35 | FromDiscord | <hmmm> yea it's in algo! |
14:36:02 | FromDiscord | <hmmm> ty demo and solibro |
14:36:26 | PMunch | The god damn index in question: https://nim-lang.org/docs/theindex.html |
14:37:05 | FromDiscord | <hmmm> damn I just got told to rtfm 🤔 |
14:37:48 | FromDiscord | <hmmm> it means I'm on the right path for enlightenment right? |
14:38:22 | FromDiscord | <enthus1ast> you could also just loop in reverse if you do not need to store another copy |
14:39:39 | FromDiscord | <enthus1ast> sent a code paste, see https://play.nim-lang.org/#ix=3SyD |
14:39:59 | FromDiscord | <enthus1ast> ss.high also works |
14:40:29 | FromDiscord | <hmmm> yea it works! |
14:40:35 | * | arkurious joined #nim |
14:42:01 | FromDiscord | <demotomohiro> give a man a fish and you feed him for a day; teach a man to fish and you feed him for a lifetime↵"teach a man to fish" == "teach a man to use theindex" |
14:42:45 | * | ltriant joined #nim |
14:42:47 | FromDiscord | <hmmm> yea but I like to be given the fish because I like the fishermen 😊 |
14:43:29 | FromDiscord | <enthus1ast> give a man 1000 fish then he will be eaten by a bear |
14:43:49 | nrds | <Prestige99> I need that on a t-shirt |
14:45:29 | FromDiscord | <enthus1ast> here you go\: |
14:45:30 | FromDiscord | <enthus1ast> image.png https://media.discordapp.net/attachments/371759389889003532/953665315982680155/image.png |
14:46:03 | nrds | <Prestige99> Nice |
14:46:35 | FromDiscord | <hmmm> lol |
14:49:29 | * | jjido joined #nim |
15:02:03 | * | ltriant quit (Ping timeout: 256 seconds) |
15:05:50 | * | jjido quit (Quit: My MacBook Air has gone to sleep. ZZZzzz…) |
15:08:57 | * | Gustavo6046 joined #nim |
15:15:29 | * | PMunch quit (Quit: Leaving) |
15:20:36 | FromDiscord | <DevNugget> is it possible to have different data types in a sequence? |
15:22:56 | FromDiscord | <ynfle> In reply to @DevNugget "is it possible to": Using inheritance, yes |
15:23:09 | FromDiscord | <ynfle> But it's suggested to use object variants instead |
15:23:14 | FromDiscord | <ynfle> Most of the time |
15:25:27 | FromDiscord | <DevNugget> would you mind elaborating on how it works a little more please? |
15:27:07 | FromDiscord | <enthus1ast> an example useing object variants\: https://github.com/nim-lang/Nim/blob/2d2587747f0c7d8b18422a5e6110b949afbf3eb4/lib/pure/json.nim#L186 |
15:27:28 | FromDiscord | <Solitude> Do you actually need that or youre just translating some python? |
15:27:57 | FromDiscord | <DevNugget> In reply to @Solitude "Do you actually need": I actually need that |
15:30:35 | * | zgasma quit (Read error: Connection reset by peer) |
15:31:12 | FromDiscord | <enthus1ast> @DevNugget\: https://play.nim-lang.org/#ix=3Sz2 |
15:33:31 | FromDiscord | <DevNugget> In reply to @enthus1ast "<@583926969138151426>\: https://play.nim-lang.org/": I see, thanks a bunch! |
15:35:09 | FromDiscord | <enthus1ast> sent a code paste, see https://play.nim-lang.org/#ix=3Sz3 |
15:35:20 | FromDiscord | <enthus1ast> one line for config unpacking |
15:40:16 | FromDiscord | <Solitude> In reply to @DevNugget "I see, thanks a": Please, try using object variants before spawning another inheritance using codebase into existence. |
15:41:05 | FromDiscord | <enthus1ast> object variants == being creative with nameing elements |
15:41:27 | * | zgasma joined #nim |
15:41:50 | FromDiscord | <enthus1ast> ● boilerplate to actually use them afterwards |
15:52:31 | arkanoid | what's the advantage of variants vs inheritance? |
15:55:18 | FromDiscord | <soda> i havent programmed in C++ since i've discovered nim 😂 |
16:00:08 | FromDiscord | <exelotl> variants: all objects are the same size, so you can pack them contiguously in an array, leading to better performance |
16:00:15 | FromDiscord | <exelotl> inheritance: user can define their own additional subtypes with custom behaviour, but practically you use them as `ref`s so there's a layer of indirection, more allocations, reference counting, and additionally dynamic dispatch all leading to worse performance |
16:01:20 | FromDiscord | <exelotl> so basically use variants unless you really need that flexibility and are willing to sacrifice performance for it |
16:01:33 | FromDiscord | <demotomohiro> variants are similar to 1 enum field + union |
16:06:22 | * | daanb joined #nim |
16:14:08 | daanb | Hello, its me again. I found a way to fix the GC-Safe issue by moving all variables that where global to the arguments of the function. However what do we need todo with external functions like imports etc |
16:22:31 | FromDiscord | <Rika> external imported functions are gc safe unless they also depend on globals |
16:31:46 | daanb | One of the imported functions imports some constants. from another file |
16:33:40 | FromDiscord | <Rika> constants are fine, if theyre `const` and not otherwise i think |
16:37:32 | daanb | Theyre defined as `let` but could be changed to `const` cause theyre never changed and not defined in code. |
16:55:01 | * | slowButPresent joined #nim |
16:58:54 | FromDiscord | <retkid> does anyone know of a headless DAW |
16:58:57 | FromDiscord | <retkid> kinda |
16:59:06 | FromDiscord | <retkid> I want a headless audio processor |
16:59:19 | FromDiscord | <retkid> i can load vsts, modify them, then input tracks and output them |
17:06:36 | FromDiscord | <Rika> pipewire |
17:06:55 | FromDiscord | <Rika> not sure if it can do vsts with a plugin of sorts or w/e |
17:37:27 | * | pro joined #nim |
17:46:53 | * | Figworm quit (Ping timeout: 250 seconds) |
17:49:44 | * | Figworm joined #nim |
17:59:25 | * | Figworm quit (Ping timeout: 256 seconds) |
18:01:52 | * | Figworm joined #nim |
18:02:52 | * | pro quit (Quit: pro) |
18:05:43 | * | pro joined #nim |
18:18:48 | NimEventer | New Nimble package! aqcalc - Calculate gematria values for Alphanumeric Qabbala, see https://github.com/VitorGoatman/aqcalc |
18:23:32 | FromDiscord | <hmmm> hoooy is there an isUpperAscii for strings or do I need to do it the caveman way? |
18:24:38 | FromDiscord | <Daan Breur> sent a code paste, see https://paste.rs/BBT |
18:24:48 | FromDiscord | <Daan Breur> The file im trying to read does exist |
18:24:58 | FromDiscord | <hmmm> python has isupper() that sounds like Apple made some kind of shiny soup |
18:30:54 | daanb | I want to add to the error, file contents isn't being read currently. The code only checks if a file exists. |
18:33:03 | FromDiscord | <Daan Breur> sent a code paste, see https://paste.rs/x8m |
18:33:57 | * | ltriant joined #nim |
18:38:51 | * | ltriant quit (Ping timeout: 256 seconds) |
18:53:53 | FromDiscord | <tandy> but i can use it on the js backend fine |
18:53:54 | FromDiscord | <tandy> sent a code paste, see https://paste.rs/fvF |
18:56:50 | FromDiscord | <hotdog> In reply to @tandy "why does this proc": Different implementations of async |
18:58:25 | FromDiscord | <Goat> In reply to @NimEventer "New Nimble package! aqcalc": Yay, my package made it! |
18:59:26 | * | jjido joined #nim |
19:00:13 | FromDiscord | <tandy> hmm |
19:23:15 | * | pro quit (Quit: pro) |
19:23:39 | * | Gustavo6046 quit (Ping timeout: 260 seconds) |
19:44:50 | FromDiscord | <Daan Breur> sent a code paste, see https://paste.rs/eIC |
19:45:37 | FromDiscord | <Daan Breur> The only major update to this code since yesterday when it worked is that i added stuff to the tuple. Yes I know the typing is wierd its just to get it working 🙂 |
19:46:17 | FromDiscord | <tandy> what is this project? looks interesting↵(@Daan Breur) |
19:47:30 | FromDiscord | <Daan Breur> Its @d4rckh's. I just helped him with some stuff. Its a fuzzer↵https://github.com/d4rckh/vaf |
20:01:15 | FromDiscord | <tandy> cool!↵(@Daan Breur) |
20:03:19 | FromDiscord | <Rika> In reply to @Daan Breur "I found the issue": m items is not a field, it’s an iterator; hence you cannot echo it |
20:04:13 | FromDiscord | <Rika> It’s an inline iterator specifically, meaning it is not usable outside of a for loop or a macro (that in turn makes a for loop, or whatever else like untyped or so) |
20:04:35 | FromDiscord | <Rika> Removing the echo should make it work |
20:04:59 | FromDiscord | <Daan Breur> In reply to @Daan Breur "So i finally fixed": Ah I thought it was why I kept getting that error here |
20:05:18 | FromDiscord | <Daan Breur> I added the echo to check its content |
20:07:57 | FromDiscord | <Elegantbeef> https://nim-lang.org/docs/strutils.html#isUpperAscii%2Cchar↵(@hmmm) |
20:07:57 | FromDiscord | <Elegantbeef> Wait that's for just chars |
20:08:17 | FromDiscord | <Elegantbeef> `myString.allCharsInSet({'A'..'Z'}` |
20:08:23 | FromDiscord | <Elegantbeef> For the "caveman" method |
20:15:25 | * | jjido quit (Quit: Textual IRC Client: www.textualapp.com) |
20:16:36 | * | jjido joined #nim |
20:23:00 | * | kenran joined #nim |
20:34:09 | * | rawrrr joined #nim |
20:48:01 | * | cyraxjoe quit (Ping timeout: 250 seconds) |
20:50:04 | * | cyraxjoe joined #nim |
20:51:07 | * | kenran quit (Quit: WeeChat info:version) |
20:58:58 | * | krux02 joined #nim |
21:04:06 | * | xet7 quit (Quit: Leaving) |
21:07:13 | * | daanb quit (Quit: Leaving) |
21:07:17 | * | xet7 joined #nim |
21:14:47 | * | jjido quit (Quit: My MacBook Air has gone to sleep. ZZZzzz…) |
21:16:06 | * | jjido joined #nim |
21:27:59 | * | ltriant joined #nim |
21:32:32 | * | ltriant quit (Ping timeout: 240 seconds) |
21:38:27 | * | Gustavo6046 joined #nim |
21:42:35 | * | wyrd quit (Ping timeout: 240 seconds) |
21:47:51 | FromDiscord | <whee> sent a long message, see http://ix.io/3SAL |
21:49:42 | * | wyrd joined #nim |
21:50:38 | FromDiscord | <Elegantbeef> Those are words, yes. Wish i understood what any of it meant 😛 |
21:51:01 | FromDiscord | <Elegantbeef> One day i should play around with databases just to answer these questions |
21:53:28 | FromDiscord | <whee> In reply to @Elegantbeef "One day i should": you were my only hope! 😄 |
21:53:58 | FromDiscord | <Elegantbeef> I'm a pretend game dev, I dont use databases |
21:56:41 | * | lungaro joined #nim |
21:57:38 | FromDiscord | <whee> I have a lot of random data manipulations that outgrow sq + miller and other CLI tools, so I'm trying out nim. It seems like it would be more reliable and easier to extend |
21:58:41 | FromDiscord | <Elegantbeef> I'm sure you'll eventually get your answer, just gotta cross your fingers and hope someone that knows what you're talking about is on 😛 |
22:07:05 | * | ltriant joined #nim |
22:32:21 | * | Gustavo6046 quit (Ping timeout: 252 seconds) |
23:20:53 | * | ltriant quit (Read error: Connection reset by peer) |
23:21:07 | * | ltriant joined #nim |
23:35:53 | * | jjido quit (Quit: My MacBook Air has gone to sleep. ZZZzzz…) |