<< 16-03-2022 >>

00:00:13FromDiscord<retkid> sent a code paste, see https://paste.rs/sVU
00:00:15FromDiscord<retkid> but no
00:00:30FromDiscord<retkid> sent a code paste, see https://play.nim-lang.org/#ix=3SmN
00:00:50FromDiscord<retkid> this is bad and you should feel bad
00:01:16FromDiscord<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:25FromDiscord<Elegantbeef> You can always use the C stdio if you wanted 😛
00:01:59FromDiscord<retkid> sent a code paste, see https://paste.rs/qpu
00:02:56FromDiscord<retkid> C is better than CPP but feels more antiquated but its ok
00:04:36FromDiscord<retkid> CPP rant over but, it has some of the least readable code I've ever seen
00:05:51FromDiscord<Elegantbeef> How can you say that C++'s code is the most readable code ever!
00:09:03FromDiscord<creikey> sent a code paste, see https://play.nim-lang.org/#ix=3SmO
00:09:10FromDiscord<Elegantbeef> `let`
00:09:12FromDiscord<creikey> is there just a stupid string.copy or something that makes it in a dynamic context
00:09:31FromDiscord<creikey> In reply to @Elegantbeef "`let`": same error
00:09:31FromDiscord<Elegantbeef> either do `let fontData = static: staticRead("Roboto-Regular_1.ttf")` or `const fontData = staticRead("Roboto-Regular_1.ttf")`
00:10:15FromDiscord<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:03FromDiscord<auxym> my gripe is way more stupid than that
00:11:19FromDiscord<auxym> I can't bring myself to type out a semicolon after every single line
00:11:35FromDiscord<Elegantbeef> Me writing shaders inside a Nim project 😀
00:11:51FromDiscord<auxym> heh. shady?
00:12:29FromDiscord<Elegantbeef> No
00:13:12FromDiscord<auxym> shady looks interesting. why not?
00:14:21FromDiscord<Elegantbeef> I may use UBOs and dont want to seperate shader languages in a single project
00:14:28FromDiscord<Elegantbeef> two seperate\
00:15:18FromDiscord<auxym> i see.
00:17:24FromDiscord<Elegantbeef> Same with SSBOs I guess, i like my modern opengl features
00:17:47FromDiscord<auxym> i don't know shit about opengl tbh
00:18:03FromDiscord<auxym> btw did you see this crazy stuff? https://kilograham.github.io/rp2040-doom/
00:18:09FromDiscord<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:32FromDiscord<Elegantbeef> Previously you needed to bake to a texture or similar
00:18:33FromDiscord<Elegantbeef> This gives you a more ergonomic and faster api
00:18:33FromDiscord<Elegantbeef> I had seen it
00:18:54FromDiscord<Elegantbeef> I still have the want to make a pretend commedore 64 with the pico
00:19:40FromDiscord<auxym> that'd be neat. Boot direct to basic?
00:19:54FromDiscord<Elegantbeef> Yea
00:20:09FromDiscord<Elegantbeef> One core for graphics the other for the main loop
00:30:21FromDiscord<creikey> is there https://github.com/jackmott/easygl but actually updated?
00:31:54*Gustavo6046 joined #nim
00:32:48FromDiscord<Elegantbeef> It's close to my API, but it probably has a larger surface
00:34:03FromDiscord<Elegantbeef> https://github.com/beef331/truss3d/tree/master/src/truss3D it's a base if you want to fork
00:47:46FromDiscord<retkid> which would be faster
00:47:52FromDiscord<retkid> figuring out c++ interop
00:48:33FromDiscord<retkid> or use execShellCmd
00:48:58FromDiscord<Elegantbeef> Faster to run or faster to do?
00:49:00FromDiscord<Elegantbeef> Also what library?
00:49:03FromDiscord<retkid> both
00:49:10FromDiscord<retkid> I have all the code run
00:49:11FromDiscord<retkid> (edit) "run" => "made"
00:49:30FromDiscord<Elegantbeef> Well not using system calls will be faster
00:49:43FromDiscord<Elegantbeef> But using the shell will be quicker to write
00:50:37FromDiscord<retkid> I suppose because i need to do this... around 201600 times
00:50:54FromDiscord<retkid> I need to execute shell commands either way unless there is imagemagick bindings
00:51:21FromDiscord<Elegantbeef> What are you doing to the images and what are the formats?
00:51:22FromDiscord<retkid> or i take the original library to bits and remake it to my specific need
00:51:41FromDiscord<retkid> crop and swap the red and blue channels
00:52:08FromDiscord<congusbongus> imagemagick works well on the command line; trying to interop with it is overkill
00:52:34FromDiscord<Elegantbeef> Use pixie then
00:52:50FromDiscord<retkid> would it be faster then command line?
00:52:55FromDiscord<Elegantbeef> Yes
00:53:01FromDiscord<Elegantbeef> Probably atleast
00:53:14FromDiscord<retkid> treeform strikes again
00:54:51FromDiscord<retkid> i cant find a crop function in pixie?
00:56:03FromDiscord<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:51FromDiscord<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:58FromDiscord<Elegantbeef> @auxym\: have you used micros any or is it still confusing?
02:11:34FromDiscord<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:04FromDiscord<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:15FromDiscord<m4ul3r> sent a code paste, see https://play.nim-lang.org/#ix=3Sno
03:50:54*arkurious quit (Quit: Leaving)
03:56:20FromDiscord<Elegantbeef> Use an if expression and set `STRING`
03:56:29FromDiscord<Elegantbeef> I mean `test`
03:57:08*slowButPresent quit (Quit: leaving)
03:57:14FromDiscord<Elegantbeef> sent a code paste, see https://play.nim-lang.org/#ix=3Snp
04:01:22FromDiscord<Elegantbeef> @m4ul3r\: or does that not work for you?
04:05:49FromDiscord<m4ul3r> sent a code paste, see https://play.nim-lang.org/#ix=3Snr
04:06:13FromDiscord<Elegantbeef> `calc_range` returns what?
04:06:22FromDiscord<m4ul3r> a sequence of strings
04:07:14FromDiscord<Elegantbeef> sent a long message, see http://ix.io/3Sns
04:07:18FromDiscord<demotomohiro> When you use if expression, type of all branch must be same.
04:07:27FromDiscord<Elegantbeef> sent a code paste, see https://paste.rs/NGT
04:07:51FromDiscord<Elegantbeef> Damn the matrix bridge still doesnt delete across the bridge
04:09:51FromDiscord<m4ul3r> @demotomohiro @ElegantBeef Thank you 👍 very helpful and it's working how I am wanting
04:10:07FromDiscord<m4ul3r> I'm coming from python, so I am stuck in some old ways
04:10:07FromDiscord<Elegantbeef> you also could make `calcrange` handle it
04:10:59FromDiscord<Elegantbeef> sent a code paste, see https://play.nim-lang.org/#ix=3Snu
04:11:13FromDiscord<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:15FromDiscord<Shinyzenith> @demotomohiro Thank you soo much futhark was just what I needed and it works perfectly
05:17:33FromDiscord<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:24FromDiscord<Elegantbeef> Futhark is magic for using C code 😀
05:21:04FromDiscord<demotomohiro> In reply to @Shinyzenith "<@!288750616510201856> Thank you soo": Congratulations!
05:22:28FromDiscord<Shinyzenith> In reply to @Elegantbeef "Futhark is magic for": yeah it's really good!
05:22:40FromDiscord<Shinyzenith> I just have some header issues but I have a temporary nasty workaround using sudo
05:22:43FromDiscord<Shinyzenith> In reply to @demotomohiro "Congratulations!": <:8ACOSP_CatHearts:755833620467417240>
06:31:49*ltriant quit (Ping timeout: 256 seconds)
07:12:32FromDiscord<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:58FromDiscord<Elegantbeef> does `--out:index.html` work?
07:14:02FromDiscord<dilawar (Dilawar Singh)> Unfortunately no. It created directory `index.html` and put `a.html` inside it!
07:16:19*PMunch joined #nim
07:17:37FromDiscord<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:50FromDiscord<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:25FromDiscord<Elegantbeef> You can pass `--project` which generates a project index, but that's not what you want 😛
07:21:12FromDiscord<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:48FromDiscord<Elegantbeef> I'd just make a task like i said that calls your docgen then moves the file
07:22:47FromDiscord<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:00FromDiscord<Elegantbeef> Perhaps it's a feature request at the very least
07:36:09NimEventerNew 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:09FromDiscord<Elegantbeef> That's not an issue, that's forum post
07:37:16FromDiscord<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:11FromDiscord<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:53FromDiscord<Elegantbeef> Are you using tabs?
07:53:02FromDiscord<Rika> Missing colon before proc return type
07:53:13FromDiscord<Elegantbeef> Also dont do what you're doing
07:53:29FromDiscord<VideoCarp> I'm using 4 spaces
07:53:34*jjido joined #nim
07:53:37FromDiscord<VideoCarp> In reply to @Elegantbeef "Also dont do what": wdym?
07:53:37FromDiscord<Rika> In reply to @Rika "Missing colon before proc": You are missing this
07:53:53FromDiscord<Elegantbeef> `const alphaNumerics = {'a'..'z', 'A'..'Z', '0'..'9', '_'}`
07:53:55FromDiscord<Elegantbeef> Do that instead
07:54:13FromDiscord<Elegantbeef> It's a bitset it's vastly cheaper to check if a value is in it than the sting
07:54:17FromDiscord<Elegantbeef> string\
07:54:32FromDiscord<Elegantbeef> then you can do `proc isAlpha(ch: char): bool = ch in alphaNumerics`
07:55:21FromDiscord<Rika> That set is also identical to the IdentChars set in strutils
07:55:30FromDiscord<Rika> https://nim-lang.org/docs/strutils.html#IdentChars
07:55:31FromDiscord<VideoCarp> I will. But I tried `proc alpha(n: char): bool =` won't work.
07:55:33FromDiscord<Elegantbeef> Yep i was going to mention strutils
07:55:49FromDiscord<Rika> In reply to @VideoCarp "I will. But I": Then there is more issues in your indentation
07:55:57FromDiscord<VideoCarp> exact same error
07:56:01FromDiscord<Elegantbeef> https://play.nim-lang.org/ post the code here
07:56:14FromDiscord<Elegantbeef> The site you used introduced tabs
07:56:17FromDiscord<Elegantbeef> So we have 0 clue what your actual code is
07:56:42FromDiscord<Rika> In reply to @Elegantbeef "The site you used": It didn’t
07:56:50FromDiscord<Rika> There are no tabs from what I see in that site
07:56:53FromDiscord<Elegantbeef> I copied from it an d it had tabs
07:57:10FromDiscord<VideoCarp> oh
07:57:13FromDiscord<VideoCarp> i will then
07:57:17FromDiscord<Elegantbeef> Ah there is a `raw`
07:57:33FromDiscord<Elegantbeef> the only issue with the raw file was not having `: bool`
07:57:41FromDiscord<Rika> It’s really the colon
07:57:41FromDiscord<Elegantbeef> and `n` not existing for `echo alpha(n)`
07:57:51FromDiscord<Elegantbeef> Are you sure you saved after modifying?
07:58:07FromDiscord<Rika> In reply to @Elegantbeef "and `n` not existing": That shouldn’t yield an indentation error
07:58:20FromDiscord<Elegantbeef> I mean i was saying the issues with the code
07:58:20FromDiscord<VideoCarp> it's the thing i was using to run it
07:58:23FromDiscord<VideoCarp> it is forcing tabs
07:58:28FromDiscord<Rika> Ok
07:58:51FromDiscord<Elegantbeef> Either run the code locally or use the playground and make pmunch sad
07:59:02FromDiscord<Elegantbeef> The more code we run there the more likely it crashes again 😛
07:59:53PMunchHaha, doesn't make me sad. I'm happy that people use it :)
08:00:08FromDiscord<Elegantbeef> I wonder how many cache files you have just from me
08:00:17FromDiscord<Rika> I’m on it boss, making a threaded code submitter to the playground
08:00:29FromDiscord<Rika> Buying bulk proxy IPs right now brb
08:00:37PMunch@Rika, I'm happy that people uses it
08:00:43FromDiscord<Elegantbeef> I heavily use the playground for macro debugging steps
08:00:49PMunchDitto :P
08:00:50FromDiscord<Rika> Lol
08:01:06FromDiscord<Elegantbeef> "I need to dumptree, time to open up the ol' playground"
08:01:08FromDiscord<Rika> I don’t use the playground often, I just have a scratch folder
08:01:31FromDiscord<Elegantbeef> I too have a scratch folder it's called `/tmp/`
08:02:04FromDiscord<Elegantbeef> Anyway videocarp everything going swell now?
08:03:27FromDiscord<Rika> I tend to save everything
08:04:07FromDiscord<Elegantbeef> packrats
08:06:23FromDiscord<VideoCarp> yeah
08:06:25FromDiscord<VideoCarp> working
08:06:36*jjido quit (Quit: My MacBook Air has gone to sleep. ZZZzzz…)
08:08:22FromDiscord<Elegantbeef> Gooooood
08:08:45FromDiscord<Rika> The more O’s the gooder
08:09:03FromDiscord<Elegantbeef> Goooooooodest gooooooood
08:22:35PMunch@dom96, did you ever write anything about the AV situation?
08:32:39PMunchHmm, is there no align pragma for objects?
08:33:16FromDiscord<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:39PMunchSo to wrap something like this: http://ix.io/3Sq7 I need to add `align(4)` to every field?
08:38:11FromDiscord<Elegantbeef> I think so, you could of course make a macro to make it less complicated
08:40:33FromDiscord<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:40FromDiscord<Elegantbeef> But YMMV
08:41:09PMunchI guess I'll just implement the pragma myself as a macro
08:41:15*wyrd quit (Ping timeout: 240 seconds)
08:41:27PMunchThis is for Futhark by the way
08:41:35FromDiscord<Elegantbeef> Yea i know
08:42:31FromDiscord<Elegantbeef> If only micros was a proper package at this point
08:42:38FromDiscord<Elegantbeef> Would make your life easier 😛
08:43:24*wyrd joined #nim
08:45:53*toulene quit (Remote host closed the connection)
09:05:19FromDiscord<m4ul3r> Nim tables, best way to search values and return the key?
09:05:33FromDiscord<Rika> Make a reverse table
09:05:52FromDiscord<Elegantbeef> make your own bidirectional table object
09:05:57FromDiscord<Elegantbeef> Hmm is there a library for it
09:06:39FromDiscord<Elegantbeef> There is not
09:06:41PMunchHmm, can't I make a type definition pragma?
09:07:06FromDiscord<Elegantbeef> Yes you can
09:07:12FromDiscord<Elegantbeef> How are you trying?
09:08:28PMunchLike so: https://play.nim-lang.org/#ix=3Sve
09:08:51FromDiscord<Elegantbeef> Arguments go before the typedef
09:09:20FromDiscord<Elegantbeef> hmmm
09:09:34PMunchAha, it can't be called align
09:09:45FromDiscord<Elegantbeef> Odd
09:10:05PMunchIt already exist as a pragma, so I guess it checks that first
09:10:39FromDiscord<Elegantbeef> Also these macros are weird you need to return a typesection
09:10:56FromDiscord<Elegantbeef> If i recally correctly atleast
09:11:47PMunchHmm, it works in the playground, but I get invalid pragma when I try to use it..
09:14:18FromDiscord<Elegantbeef> Odd
09:17:04PMunchAh, I was generating the pragma incorrectly
09:17:26*ltriant quit (Ping timeout: 245 seconds)
09:17:46*jjido joined #nim
09:19:03FromDiscord<m4ul3r> sent a code paste, see https://play.nim-lang.org/#ix=3SwO
09:21:30FromDiscord<Elegantbeef> sent a code paste, see https://play.nim-lang.org/#ix=3Sxc
09:22:07FromDiscord<Rika> Probably capitalise the T in table there
09:22:14FromDiscord<Rika> Not that it matters of course
09:22:16FromDiscord<Rika> But stil
09:22:32FromDiscord<Elegantbeef> Yea just an example of how to start it
09:22:55FromDiscord<Elegantbeef> I'm going now so buh bye and hope you make a nice solution
09:23:17FromDiscord<m4ul3r> 🙏 You're too helpful
09:41:26FromDiscord<dom96> In reply to @PMunch "<@132595483838251008>, did you ever": Nope. Really busy this month. Should have time next month.
09:43:18PMunchNo 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:30FromDiscord<Generic> so I abused whatever is possible out of Nim's current support for cyclic dependencies
10:11:08*dtan joined #nim
10:11:26FromDiscord<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:05FromDiscord<Generic> specifically the outline command seems to be the easiest way to trigger it
10:12:18FromDiscord<Generic> any idea where to look?
10:12:32FromDiscord<Generic> though this is probably way above my level
10:12:58FromDiscord<Rika> Look into not abusing cyclic support 😉
10:14:14FromDiscord<Generic> I don't want to plaster everything with indirect calls though
10:14:25FromDiscord<Generic> I'm working on an emulator
10:14:40FromDiscord<Generic> and all the peripherals are mapped to the bus
10:14:59FromDiscord<Generic> but a lot of them can access the bus again
10:15:17FromDiscord<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:42NimEventerNew 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:06FromDiscord<untoreh> sent a code paste, see https://paste.rs/3mZ
10:49:47FromDiscord<Rika> Sanitisation
10:50:10FromDiscord<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:17PMunch@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:50FromDiscord<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:22Amun-Ramake a Table instead of seq
11:53:26FromDiscord<hmmm> hmm seems simpler
12:13:38*ltriant joined #nim
12:15:06FromDiscord<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:34FromDiscord<Rika> my brain cannot read this sentence and i am unsure why
12:15:35FromDiscord<Phil> At least coming from higher level languages that's my take on it
12:16:35FromDiscord<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:49FromDiscord<Phil> (edit) "insiden" => "inside"
12:16:55FromDiscord<Rika> yes
12:17:11FromDiscord<Rika> `but you care about data inside your seq to be reconsidered` just reads wrong
12:17:29FromDiscord<Phil> Hmmm fair
12:17:58FromDiscord<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:18FromDiscord<Rika> "but" is also the wrong word to use
12:18:31FromDiscord<Phil> Aaanyway, my bad english aside, hashmaps when complicated mappings are in use
12:18:40FromDiscord<Rika> whatever lol yeah
12:18:55FromDiscord<Phil> (edit) "Aaanyway, my bad english aside, hashmaps when complicated mappings are in use ... " added "that go beyond "map entry to index""
13:14:42NimEventerNew 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:38Amun-Ra"This question was voluntarily removed by its author."
14:03:03FromDiscord<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:15FromDiscord<Rika> thats what the preview shows
14:04:08PMunchWell, I'd link them to my blog post on how I created my own stack based language
14:04:18PMunchOr to the Min programming language sources
14:24:56*Gustavo6046 quit (Ping timeout: 245 seconds)
14:26:23FromDiscord<DevNugget> In reply to @Amun-Ra ""This question was voluntarily": they forced me to but yeah
14:26:44FromDiscord<DevNugget> In reply to @PMunch "Well, I'd link them": yes please
14:29:06PMunchThey forced you to?
14:29:57PMunchThis 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:20PMunchAnd you can find Min here: https://min-lang.org/
14:30:49FromDiscord<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:58FromDiscord<DevNugget> In reply to @PMunch "This is my article:": thank you very much
14:31:29FromDiscord<enthus1ast> parsecfg needs something like this
14:31:30FromDiscord<enthus1ast> to also support int, float etc
14:31:37FromDiscord<enthus1ast> sent a code paste, see https://play.nim-lang.org/#ix=3SyB
14:31:45PMunchThat article mostly deals with how I rewrote the initial project to be much cleaner
14:32:17PMunchThe stacklang repo is a much more complete language, and v2 which is currently only private is an entirely different beast
14:33:00PMunchIt 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:41FromDiscord<hmmm> hoy I forgot the magic incantation to reverse a seq, halp pls?
14:34:30FromDiscord<demotomohiro> Check sequtils or algoritm module
14:34:40FromDiscord<hmmm> sequtils I checked
14:34:54FromDiscord<hmmm> if I'm not blind there shouldn't be anything, I'll check algo
14:35:19FromDiscord<Solitude> https://nim-lang.org/docs/algorithm.html#reverse%2CopenArray%5BT%5D
14:35:24FromDiscord<Solitude> use the goddamn index
14:35:35FromDiscord<hmmm> yea it's in algo!
14:36:02FromDiscord<hmmm> ty demo and solibro
14:36:26PMunchThe god damn index in question: https://nim-lang.org/docs/theindex.html
14:37:05FromDiscord<hmmm> damn I just got told to rtfm 🤔
14:37:48FromDiscord<hmmm> it means I'm on the right path for enlightenment right?
14:38:22FromDiscord<enthus1ast> you could also just loop in reverse if you do not need to store another copy
14:39:39FromDiscord<enthus1ast> sent a code paste, see https://play.nim-lang.org/#ix=3SyD
14:39:59FromDiscord<enthus1ast> ss.high also works
14:40:29FromDiscord<hmmm> yea it works!
14:40:35*arkurious joined #nim
14:42:01FromDiscord<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:47FromDiscord<hmmm> yea but I like to be given the fish because I like the fishermen 😊
14:43:29FromDiscord<enthus1ast> give a man 1000 fish then he will be eaten by a bear
14:43:49nrds<Prestige99> I need that on a t-shirt
14:45:29FromDiscord<enthus1ast> here you go\:
14:45:30FromDiscord<enthus1ast> image.png https://media.discordapp.net/attachments/371759389889003532/953665315982680155/image.png
14:46:03nrds<Prestige99> Nice
14:46:35FromDiscord<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:36FromDiscord<DevNugget> is it possible to have different data types in a sequence?
15:22:56FromDiscord<ynfle> In reply to @DevNugget "is it possible to": Using inheritance, yes
15:23:09FromDiscord<ynfle> But it's suggested to use object variants instead
15:23:14FromDiscord<ynfle> Most of the time
15:25:27FromDiscord<DevNugget> would you mind elaborating on how it works a little more please?
15:27:07FromDiscord<enthus1ast> an example useing object variants\: https://github.com/nim-lang/Nim/blob/2d2587747f0c7d8b18422a5e6110b949afbf3eb4/lib/pure/json.nim#L186
15:27:28FromDiscord<Solitude> Do you actually need that or youre just translating some python?
15:27:57FromDiscord<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:12FromDiscord<enthus1ast> @DevNugget\: https://play.nim-lang.org/#ix=3Sz2
15:33:31FromDiscord<DevNugget> In reply to @enthus1ast "<@583926969138151426>\: https://play.nim-lang.org/": I see, thanks a bunch!
15:35:09FromDiscord<enthus1ast> sent a code paste, see https://play.nim-lang.org/#ix=3Sz3
15:35:20FromDiscord<enthus1ast> one line for config unpacking
15:40:16FromDiscord<Solitude> In reply to @DevNugget "I see, thanks a": Please, try using object variants before spawning another inheritance using codebase into existence.
15:41:05FromDiscord<enthus1ast> object variants == being creative with nameing elements
15:41:27*zgasma joined #nim
15:41:50FromDiscord<enthus1ast> ● boilerplate to actually use them afterwards
15:52:31arkanoidwhat's the advantage of variants vs inheritance?
15:55:18FromDiscord<soda> i havent programmed in C++ since i've discovered nim 😂
16:00:08FromDiscord<exelotl> variants: all objects are the same size, so you can pack them contiguously in an array, leading to better performance
16:00:15FromDiscord<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:20FromDiscord<exelotl> so basically use variants unless you really need that flexibility and are willing to sacrifice performance for it
16:01:33FromDiscord<demotomohiro> variants are similar to 1 enum field + union
16:06:22*daanb joined #nim
16:14:08daanbHello, 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:31FromDiscord<Rika> external imported functions are gc safe unless they also depend on globals
16:31:46daanbOne of the imported functions imports some constants. from another file
16:33:40FromDiscord<Rika> constants are fine, if theyre `const` and not otherwise i think
16:37:32daanbTheyre 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:54FromDiscord<retkid> does anyone know of a headless DAW
16:58:57FromDiscord<retkid> kinda
16:59:06FromDiscord<retkid> I want a headless audio processor
16:59:19FromDiscord<retkid> i can load vsts, modify them, then input tracks and output them
17:06:36FromDiscord<Rika> pipewire
17:06:55FromDiscord<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:48NimEventerNew Nimble package! aqcalc - Calculate gematria values for Alphanumeric Qabbala, see https://github.com/VitorGoatman/aqcalc
18:23:32FromDiscord<hmmm> hoooy is there an isUpperAscii for strings or do I need to do it the caveman way?
18:24:38FromDiscord<Daan Breur> sent a code paste, see https://paste.rs/BBT
18:24:48FromDiscord<Daan Breur> The file im trying to read does exist
18:24:58FromDiscord<hmmm> python has isupper() that sounds like Apple made some kind of shiny soup
18:30:54daanbI want to add to the error, file contents isn't being read currently. The code only checks if a file exists.
18:33:03FromDiscord<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:53FromDiscord<tandy> but i can use it on the js backend fine
18:53:54FromDiscord<tandy> sent a code paste, see https://paste.rs/fvF
18:56:50FromDiscord<hotdog> In reply to @tandy "why does this proc": Different implementations of async
18:58:25FromDiscord<Goat> In reply to @NimEventer "New Nimble package! aqcalc": Yay, my package made it!
18:59:26*jjido joined #nim
19:00:13FromDiscord<tandy> hmm
19:23:15*pro quit (Quit: pro)
19:23:39*Gustavo6046 quit (Ping timeout: 260 seconds)
19:44:50FromDiscord<Daan Breur> sent a code paste, see https://paste.rs/eIC
19:45:37FromDiscord<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:17FromDiscord<tandy> what is this project? looks interesting↵(@Daan Breur)
19:47:30FromDiscord<Daan Breur> Its @d4rckh's. I just helped him with some stuff. Its a fuzzer↵https://github.com/d4rckh/vaf
20:01:15FromDiscord<tandy> cool!↵(@Daan Breur)
20:03:19FromDiscord<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:13FromDiscord<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:35FromDiscord<Rika> Removing the echo should make it work
20:04:59FromDiscord<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:18FromDiscord<Daan Breur> I added the echo to check its content
20:07:57FromDiscord<Elegantbeef> https://nim-lang.org/docs/strutils.html#isUpperAscii%2Cchar↵(@hmmm)
20:07:57FromDiscord<Elegantbeef> Wait that's for just chars
20:08:17FromDiscord<Elegantbeef> `myString.allCharsInSet({'A'..'Z'}`
20:08:23FromDiscord<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:51FromDiscord<whee> sent a long message, see http://ix.io/3SAL
21:49:42*wyrd joined #nim
21:50:38FromDiscord<Elegantbeef> Those are words, yes. Wish i understood what any of it meant 😛
21:51:01FromDiscord<Elegantbeef> One day i should play around with databases just to answer these questions
21:53:28FromDiscord<whee> In reply to @Elegantbeef "One day i should": you were my only hope! 😄
21:53:58FromDiscord<Elegantbeef> I'm a pretend game dev, I dont use databases
21:56:41*lungaro joined #nim
21:57:38FromDiscord<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:41FromDiscord<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…)