<< 18-11-2020 >>

00:00:11disrupteki want to write some tiny comparisons to other languages for each of the categories.
00:01:00disruptekhttp://ix.io/2Exi/md
00:02:07disrupteki think each category can have ~3 little demos that will capture the flavor trivially.
00:02:40FromDiscord<Rebel> well that's not feasible
00:02:48FromDiscord<exelotl> ah I like this
00:02:55FromDiscord<dom96> That's what https://nim-lang.org/features.html tries to do
00:03:03hmmmcrappy concurrency is what made me choose nim
00:03:13hmmmI have no intention of using concurrency :o
00:03:31disruptekthe problem is that none of what's written on features is important/discriminating.
00:03:33mipriRebel, probably what you want to do is feasible but you just haven't been shown how because nobody knows knows waht you're looking for yet
00:03:38FromDiscord<Rebel> The user is passing an arbitrary number of headers I need to dynamically create the array but if it's too big the request will fail (depending on the server as you have invalid headers). You can not use a seq
00:03:51FromDiscord<Rebel> This is for creating httpheaders for asynchronous http communications
00:04:04FromDiscord<dom96> disruptek: your list and the features page's list overlap
00:04:29FromDiscord<Rebel> one sec
00:04:30FromDiscord<Rebel> I can show you
00:04:38disrupteki'm talking about the first block.
00:05:02disrupteki mean, fuck. no one codes in Ada or Modula.
00:05:17disrupteki don't want to see "inspired by Python" everywhere.
00:05:18FromDiscord<dom96> I bet you more people code in Ada than Nim
00:05:45disruptekyou're right, dom. the features page is perfect.
00:05:49miprimore appropriate material for a page like https://doc.rust-lang.org/reference/influences.html
00:06:00FromDiscord<nikki> for me personally the things that drew me to it were:↡- metaprogramming and type introspection at compile time, esp. with compile time vars so i can register stuff from many modules↡- compiles to C(++) and interops with them so i can see what it does + use libs in 'em↡- syntax with very low overhead
00:06:01FromDiscord<Rebel> Something like this mipri (https://play.nim-lang.org/#ix=2Exn) if you change it from a 3 to a 1 the request will work
00:06:07FromDiscord<nikki> - seems to compile somewhat fast(-ish?)
00:06:21FromDiscord<dom96> the thing with Nim is that there isn't a single shiny thing that no other language offers
00:06:47disruptekyes, but saying "inspired by Python" is kinda useless.
00:06:56disruptekit's really not very similar to python.
00:07:09disruptekthe only part that's similar is syntax.
00:07:31FromDiscord<dom96> "Multiple constructs inspired by Python"
00:07:36FromDiscord<dom96> Nothing false about this statement
00:07:41disruptekjesus christ.
00:07:47FromDiscord<notchris> died for our sins
00:07:53FromDiscord<dom96> lol
00:08:00FromDiscord<notchris> _bows_
00:08:04disruptekgonna go jerk off instead; peace out.
00:08:09FromDiscord<notchris> fair
00:08:22miprithe complaint isn't that it's false, but that it's not useful. People who really like Python won't be jazzed about Nim the way Ruby people might be jazzed by Crystal
00:08:47FromDiscord<dom96> disruptek: good, you need to chill, you getting way too worked up about this features page man
00:08:51miprithe code examples show enough Python influence
00:09:03*opal quit (Ping timeout: 240 seconds)
00:09:11disruptekhey dom96, kiss my ass.
00:09:32*opal joined #nim
00:10:52mipriRebel: you can use a seq there
00:11:28FromDiscord<Rebel> but I can't
00:11:35mipriexample with the same paramater: https://play.nim-lang.org/#ix=2Exq
00:11:42federico3sometimes stdlib is surprising. It's lacking a lot of stuff but has things like sameFileContent
00:12:53FromDiscord<Rebel> ok
00:12:54FromDiscord<Rebel> yes you can
00:13:05FromDiscord<Rebel> Not sure why but when I was trying to use it earlier it was complaining
00:13:06FromDiscord<Rebel> that was on me
00:13:07FromDiscord<Rebel> ok thanks
00:13:08FromDiscord<notchris> i come from javascript to nim, quite a weird jump, and i found the documentation and general site easy to follow as noob
00:13:08FromDiscord<Rebel> excellent
00:13:11FromDiscord<dom96> mipri: sure, it might not be useful. There certainly are plenty of Python programmers out there who want a faster Python though, and Nim definitely fits the bill. It's a worthwhile marketing tactic
00:13:24federico3+1
00:13:39FromDiscord<nikki> i don't think it's about whether that's a good tactic. it's about how to phrase / show things to use that tactic well
00:13:53FromDiscord<exelotl> it was only a few months ago that I heard the mantra "readability of python, speed of C, metaprogramming power of Lisp" or however it goes - I explained it to someone that way and it seemed to go down pretty well
00:14:01FromDiscord<nikki> and also use it effectively while keaving space for all of the other tactics involved
00:14:03*mbomba joined #nim
00:14:09mipriyeah in comparison with those other pages I don't think nim-lang.org has any particular faults.
00:14:13FromDiscord<nikki> @exelotl i kinda like that one
00:14:31FromDiscord<nikki> altho does lisp actually have compile time vars that you can write to from all over
00:14:36miprijust, the source tarball should have an INSTALL that repeats the online instructions, because people don't read them after they download the source. very strange.
00:14:37FromDiscord<nikki> that one seems kinda specific to nim
00:15:25FromDiscord<dom96> Ideally we should iterate on the existing features page, sadly it was instead made less prominent
00:15:41FromDiscord<dom96> and now we've just got a big wall of text on the front page
00:15:53FromDiscord<notchris> lets re-design the site and record tutorial videos
00:16:01FromDiscord<notchris> and pictures
00:16:14mipriCrystal had a great slogan: "fast as C, slick as ruby", and then they switched to, gag, "A language for humans and computers". Gotta be careful about letting too many people provide helpful input on website design, too.
00:16:46hmmmjesus a language for humans and computers is pretty bad :|
00:17:31hmmmwell I g2slp cu nimians
00:17:36*hmmm quit ()
00:17:43miprinim-lang.org has a lot of text but the important text is large. the code blocks are large. the important links are on the top - Download, Learn, Documentation. it works
00:17:48FromDiscord<nikki> i like racket's website
00:18:06FromDiscord<notchris> nikki and i will remake the site
00:18:14FromDiscord<nikki> or i did at one point, it kinda seems πŸ€” now (racket one)
00:18:23FromDiscord<nikki> @notchris haha πŸ™Œ
00:18:29FromDiscord<notchris> first order of business
00:18:31mipriEfficient <- it's not a scripting language. expressive <- it's not go. elegant <- it's not... go?
00:18:32FromDiscord<notchris> lets fix the nim logo
00:18:36FromDiscord<notchris> so its not asymetrical
00:18:39FromDiscord<nikki> can we just make a game in nim and make it the homepage
00:18:56FromDiscord<notchris> we cant make a game in nim
00:18:59FromDiscord<notchris> theres no UI library
00:19:01FromDiscord<notchris> that works 100%
00:19:02FromDiscord<notchris> BUT
00:19:07FromDiscord<notchris> we can make cool command line apps
00:19:08FromDiscord<dom96> Hmmm, maybe I should just redirect nim-lang.org to stardust.dev πŸ˜›
00:19:26FromDiscord<notchris> πŸ˜‰
00:19:33FromDiscord<nikki> not having a ui library but still having gfx makes it more gamey than websitey/appey even
00:19:33FromDiscord<dom96> On a scale of 1-10 how mad you think Araq would be?
00:19:42FromDiscord<nikki> would he notice
00:19:47FromDiscord<dom96> hah
00:19:48FromDiscord<ElegantBeef> I dont really like the expressive part of the front page, but eh
00:20:09FromDiscord<ElegantBeef> It's just, doesnt really explain anything
00:20:20FromDiscord<notchris> And the footer text isn't centered
00:20:24FromDiscord<nikki> how about -- make the homepage vscode's editor (monaco) and when you land you're editing a new webapp and previewing it
00:20:29FromDiscord<notchris> if you dont center your footer
00:20:31FromDiscord<ElegantBeef> Most languages are self hosted grats
00:20:33FromDiscord<ElegantBeef> Lol nikki
00:20:36FromDiscord<notchris> are you going to center your code
00:21:32FromDiscord<ElegantBeef> I very much think "Extensible" fits more for what that category is trying to suggest
00:22:58FromDiscord<nikki> extensible is cool, but also can be like worrying to a lot of folks in a language space (not saying the train of thought has merit in nim's case)
00:23:31FromDiscord<nikki> wonder how to basically say extensible but also that it's used judiciously / also isn't super hard
00:23:43FromDiscord<nikki> zed shaw's series of tweets being positive about nim was pretty good
00:23:48FromDiscord<nikki> maybe could get ideas from that
00:24:28FromDiscord<notchris> @nikki done
00:24:29FromDiscord<notchris> https://jsfiddle.net/notchris/ap4g5mjh/11/
00:24:41jonjitsu[m]why are some constructors initXxxx and some newXxxx?
00:25:40FromDiscord<nikki> we need a nimfiddle that's as good / better
00:25:58FromDiscord<dom96> really surprised by Zed's sudden uptake of Nim
00:28:31FromDiscord<ElegantBeef> new is for reference types, init is for non references
00:28:58FromDiscord<ElegantBeef> It's purely to indicate that it's a `ref object` or just `object`
00:30:17jonjitsu[m]would the new objects be created on the heap and the init ones on the stack?
00:30:25FromDiscord<ElegantBeef> that's the indication
00:31:47*rockcavera quit (Remote host closed the connection)
00:32:14*rockcavera joined #nim
00:36:56federico3dom96: Zed?
00:37:20miprihttps://twitter.com/zedshaw
00:55:10*krux02 quit (Remote host closed the connection)
01:05:25*Tanger joined #nim
01:06:15FromDiscord<Rika> good morning yall
01:06:20*xet7 quit (Remote host closed the connection)
01:06:48FromDiscord<Rika> :ThonkDumb: no one has said anything for the past 30 minutes
01:08:43*xet7 joined #nim
01:09:54FromDiscord<ElegantBeef> Lies you just did
01:11:12*jjido quit (Quit: My MacBook has gone to sleep. ZZZzzz…)
01:12:09FromDiscord<Rebel> oh oh oh I am a bit late about the conversation about making the welcoming Nim page easier to read one of the suggestions would be for better wording or an explanation? On the homepage one point in the Efficient section is `Support for various backends: it compiles to C, C++ or JavaScript so that Nim can be used for all backend and frontend needs.` Saying it compiles to a language is a bit weird imo, you compile a language into a binary/li
01:12:16FromDiscord<Rika> other than me, damn it
01:12:43FromDiscord<Rika> sent a long message, see http://ix.io/2ExC
01:13:15FromDiscord<Rika> oops, i forgot to not use quote in discord
01:13:24FromDiscord<Rika> what i said was "binaries are just files with a different language"
01:13:42FromDiscord<Rebel> I don't know about that one chief
01:14:24FromDiscord<Rika> the big difference is that nim compiles to a language that we can read a bit easier than normal
01:14:44FromDiscord<Rika> ~~then it compiles again to a binary~~
01:15:47mipriit's important information, with both positive and negative implications, and it might be good to get it out of the way for anyone who's spooked by it.
01:16:24FromDiscord<Rika> most people put off the language just because of this though without trying it
01:16:52FromDiscord<Rika> just because of "weird" features like the style insensitivity, the compilation to c, and whatever
01:17:14mipriI'd put money on many more people being spooked by style insensitivity than by transpilation.
01:17:21FromDiscord<Rebel> generation of C code that is then linked πŸ˜›
01:17:40FromDiscord<Rebel> well the object files are linked
01:17:55FromDiscord<Rika> i dont acknowledge the word "transpilation" existing xd
01:18:24federico3someone said the t- word
01:18:46FromDiscord<Rika> reset the "days without transpilation mention" count
01:19:49mipriyeah, people who are spooked by it aren't going to be persuaded by your rejection of the term.
01:20:00FromDiscord<nikki> i think transpilation if it had any merit would stand for compilation across languages with mostly similar concepts / low-levelness
01:21:06FromDiscord<Rika> mipri i'm just joking around man ya too serious
01:25:27*Quibono joined #nim
01:25:33miprimeanwhile: https://web.archive.org/web/19990203181248/http://www.python.org/
01:26:01QuibonoHow do you do an echo where it updates on the same line? i'm trying to do a status bar type thing in the command prompt.
01:26:23FromDiscord<ElegantBeef> You can use stdout.write instead of echo if you so wanted
01:28:15miprifor status bars printing with \r is usually enough, but take a look at man console_codes on Linux
01:30:01Quibonomipri what would that look like in terms of an echo command?
01:30:33mipriyou wouldn't use echo because it includes a newline, wihch you don't want
01:30:56QuibonoOkay, but when I do stdout.write it just waits and then dumps a whole ton of them.
01:31:06mipribut the string is just "\ryour new status", provided the new status is at least as long as the last one
01:31:27mipriright, gotta flush it as well
01:31:33FromDiscord<Rika> you need to have a carriage return (\r or \c)
01:32:26mipristdout.write "hi\rthere"; stdout.flushFile
01:32:41miprirun that, you'll see just 'there' without a trailing newline
01:33:03FromDiscord<nikki> flush?
01:33:14FromDiscord<nikki> dang i scrolled up and didn't see the later msgs
01:33:22QuibonoCool, thank you.
01:45:00*Quibono quit (Remote host closed the connection)
01:46:28FromDiscord<Clownstick Von FuckFace> for parsing json with optional keys, what is the idiomatic way to do soemthing like `a = js{"key"} if key else pass`? i.e., only set the variable if the keys there?
01:47:22FromDiscord<ElegantBeef> you could make a template for it, but really it's just `if jsonNode.contains(key)`
01:49:29FromGitter<ynfle> What is pass? don't set a or it's null?
01:51:01FromDiscord<ElegantBeef> Whipped the template up to show if interested https://play.nim-lang.org/#ix=2ExK
01:51:07FromDiscord<nikki> you can use `.getStr("foo", "bar")`
01:52:19FromDiscord<nikki> it seems like they wanted to set a variable, not mutate a json node in an existing json structure?
01:52:34FromDiscord<ElegantBeef> I'm uncertain
01:53:25FromDiscord<ElegantBeef> @Clownstick Von FuckFace Did i misunderstand?
01:54:47FromDiscord<Rika> pass is python's discard
01:56:58FromGitter<ynfle> Right So I'm askind if a has that value of none after or it's a noop
02:01:18FromDiscord<Rika> a is not set
02:02:07FromDiscord<Rika> idk why you'd do this over `if key: a = js{"key"}` though but whatever
02:03:39FromDiscord<ElegantBeef> Yea i totally misread πŸ˜„
02:07:31*kotrcka joined #nim
02:08:36FromDiscord<iWonderAboutTuatara> Man, I haven't had time to write anything interesting in a good while
02:08:47FromDiscord<iWonderAboutTuatara> I'll start a rubik's cube solver, hopefully I finish
02:25:23*abm quit (Quit: Leaving)
02:29:51*astronavt quit (Quit: ...)
02:30:58*astronavt joined #nim
02:33:11FromDiscord<ElegantBeef> I havent wrote anything interesting ever, so good luck πŸ˜›
02:34:53*apahl quit (Ping timeout: 272 seconds)
02:36:28*apahl joined #nim
02:41:43FromDiscord<Rebel> How about a skyscraper puzzle solver πŸ˜‹ @iWonderAboutTuatara
02:52:12*mfiano quit (Ping timeout: 260 seconds)
02:53:17*mfiano joined #nim
03:19:16FromGitter<iffy> @leorize are you also alaviss?
03:19:21disruptekyep.
03:22:58leorize[m]1@iffy yes
03:24:14FromGitter<iffy> @leorize: I'm interested in getting a community setup-nim working (hopefully one day to live in github.com/nim-lang). A version that meets some of the needs of nimble, at least. I see you're working on ng of yours. What's your plan?
03:24:41FromGitter<iffy> context: GitHub actions alaviss/setup-nim is what I mean :)
03:27:29leorize[m]1I plan to make setup-nim download prebuilts from nightlies based on a given semantic version range, similar to actions/setup-node and friends
03:29:17FromGitter<iffy> So we'll specify the version as 1.4.x or 1.2.x, etc? Are installing specific commits in your plan? And how do you feel about dogfooding with choosenim?
03:31:11leorize[m]1I don't plan for specific commit support. The current form of nightlies versioning is based on date and traversing the release history to pick a commit will run you against the API limit really fast
03:32:39*mbomba quit (Quit: WeeChat 3.0)
03:33:45leorize[m]1re: choosenim, I will have to reevaluate it. One of the main reasons I didn't use choosenim was that we were unsure of choosenim reliability.
03:34:36disrupteki'm sure.
03:35:06FromGitter<iffy> It has become more reliable (on GitHub actions at least) since the latest release. I avoided it before then, too. (It used to fail for macOS)
03:35:19*Quibono joined #nim
03:35:30QuibonoIs there a performance bonus to using an array over a seq?
03:36:14leorize[m]1yes, arrays are stored on the stack, which avoids the mess that's heap allocation
03:37:07leorize[m]1@iffy one of my main problem with choosenim is that it has too much code and aim for a very general use case
03:37:17leorize[m]1CIs are simpler and can make do with less
03:37:36FromGitter<iffy> That's fair
03:37:55leorize[m]1well at least that's my opinion until I wrote setup-nim :p
03:38:01FromGitter<iffy> hehehe
03:38:18leorize[m]1nightlies are a pain to dig through and I might offload more logic to nightlies
03:38:35leorize[m]1I want downloading from nightlies to be as simple as possible
03:38:45disruptekjust put it into gitnim and then put gitnim into choosenim.
03:38:58FromGitter<iffy> I started with what you have in setup-nim and have arrived at this abomination: https://github.com/nim-lang/nimble/pull/871/files It supports all the ways you can install Nim. And honestly it's not *that* bad.
03:38:58disbotβž₯ Simpler GitHub Actions CI
03:39:13FromGitter<iffy> okay, it doesn't support gitnim yet
03:39:16FromGitter<sealmove> @PMunch now I am thinking of writing a binaryparse backend for Kaitai Struct :D (they got one for construct already). ⏎ We can have extra logic external of binaryparse as plugin macros. I've already written one for conditions: https://github.com/sealmove/n4n6/blob/main/parsers/utils.nim
03:39:23*a_chou joined #nim
03:40:43FromGitter<iffy> Here are the possible install targets: https://github.com/nim-lang/nimble/blob/0375ebef2f48fa3def4df71d077ee432570b8b34/.github/workflows/ci.yml#L15
03:40:55*Quibono quit (Remote host closed the connection)
03:42:22*muffindrake quit (Ping timeout: 260 seconds)
03:44:17*muffindrake joined #nim
03:44:18FromGitter<iffy> I don't actually think it's worth supporting all those install methods, but I do think being able to install a specific commit is valuable for some projects.
03:45:24leorize[m]1so one of my main goals is to rely completely on nightlies prebuilts
03:45:37leorize[m]1those compilers are guaranteed to be "built the right way"
03:47:18FromGitter<iffy> Does building from source sometimes build it the wrong way?
03:47:23leorize[m]1this also means that specific commits are out of the question
03:47:42leorize[m]1and tbh I think pinning the commit for the compiler is dumb for CI
03:48:00leorize[m]1you don't really develop your software on a commit, you develop them on a release
03:49:01FromGitter<iffy> I agree on that point -- I wouldn't use the specific-commit build for any of my things. It's a request for nimble, though. They want to test against devel, but not the bleeding edge. They're content to increment the commit manually as needed.
03:49:41leorize[m]1nah, but why duplicate the work when nightlies did it already?
03:51:14leorize[m]1for the best reproducibility I'd recommend pinning a nightly build
03:51:40leorize[m]1those builds are reproducible and when CI fails you know you can get the exact compiler used
03:51:51FromGitter<iffy> I think that would be an okay compromise for nimble (I'm guessing -- I don't know)
03:52:43leorize[m]1setup-nim was built to replace the build-from-source pipeline I made for fusion
03:52:51FromGitter<iffy> There was also a request to use the official release of a particular version rather than the latest nightly. For instance the official 1.4.0 rather than the latest-1-4
03:53:16leorize[m]1I got official release working on my local copy
03:54:05FromGitter<iffy> even for macOS?
03:54:20FromGitter<iffy> I got official releases to work except for macOS (had to build from source there)
03:54:46leorize[m]1sorta :p
03:55:08leorize[m]1I cross reference with nightlies if a the official binary is not available
03:56:58FromGitter<iffy> :) Okay, so from a user's perspective (regardless of implementation) you'd change this https://gist.github.com/iffy/329256a067f090c678f2c1902420c83c to exclude the commit-style build. What about stable and devel?
03:57:46leorize[m]1'^1.0.0' per semantic version range
03:58:11FromGitter<iffy> ah dang... I can never remember what all those symbols in package.json mean...
03:58:41leorize[m]1and I will add a flag to consider prereleases as well :p
03:58:42FromGitter<iffy> oh, does `^1.0.0` mean stable?
04:00:20leorize[m]1you can look here: https://semver.npmjs.com/
04:01:02leorize[m]1I'm exploring the direction of mimicking the official actions/setup-*
04:01:43disruptekhow does it differ from nimph/cargo?
04:06:02*supakeen quit (Quit: WeeChat 2.9)
04:06:35*supakeen joined #nim
04:08:50*kotrcka quit (Quit: Konversation terminated!)
04:09:12FromGitter<iffy> disruptek: I've almost tried nimph a few times, but I get scared away thinking I'll have to learn too many new things (and I just want to write code, not learn more package managing). Convince me that it's easy
04:31:53*rockcavera quit (Remote host closed the connection)
04:42:33*a_chou quit (Quit: a_chou)
04:46:55*a_chou joined #nim
04:54:42*lritter quit (Ping timeout: 260 seconds)
04:55:15*lritter joined #nim
05:46:25*thomasross quit (Ping timeout: 240 seconds)
06:00:07*waleee-cl quit (Quit: Connection closed for inactivity)
06:06:16*a_chou quit (Quit: a_chou)
06:26:37*habamax joined #nim
07:08:53*narimiran joined #nim
07:27:59*lum quit (Ping timeout: 246 seconds)
07:33:49*lum joined #nim
07:36:11ForumUpdaterBotNew thread by Lepot311: Win10 terminal game, see https://forum.nim-lang.org/t/7111
07:53:59FromGitter<sealmove> @planetis hey, I just saw your PR for testify. Honestly I didn't expect anyone to have eyes on this little project (it's obvious from how sloppy it is). I'll take a look at the PR in the evening. Sorry for the delay.
07:55:56*PMunch joined #nim
08:00:54*jjido joined #nim
08:02:06FromGitter<sealmove> And thank you very much for the PR :>
08:22:04lbartwe don't have a isClose (aproxEqual) in nim as dlang or python, isn't it?
08:22:20lbartI mean, in std library
08:27:40FromDiscord<flywind> It is introduced recently.
08:28:05FromDiscord<flywind> http://nim-lang.github.io/Nim/math.html#almostEqual%2CT%2CT%2CNatural
08:29:15lbartah thanks!
08:29:26FromDiscord<flywind> no problem
08:46:23*jjido quit (Quit: My MacBook has gone to sleep. ZZZzzz…)
08:51:44*Tanger quit (Remote host closed the connection)
09:05:30planetis[m]sealmove: thank you
09:08:44FromDiscord<Rebel> Any chance people some people already set up sweet github actions or travis builds for CI preferably with a linter or codeql or both πŸ˜‹?
09:18:02FromDiscord<juan_carlos> https://github.com/juancarlospaco/nimpretty-action
09:20:18*jjido joined #nim
09:22:01*jjido quit (Client Quit)
09:25:01disruptekrebel: see leorize's dnsstamp project for ci reference. i use his stuff on most of my recent public work.
09:28:30disruptekiffy: if you like nimble, stick with it -- you won't like nimph.
09:31:40disruptekiffy: plus, i think dom truly likes your contributions, which is really saying something.
09:32:54*hnOsmium0001 quit (Quit: Connection closed for inactivity)
09:34:31planetis[m]sealmove: it's not bad at all, I mean, if you need something more future complete there is testament but for a simpler tool it's perfect
09:38:07FromDiscord<sealmove> Glad someone likes it
10:01:17*Tanger joined #nim
10:18:58*oculux quit (Read error: Connection reset by peer)
10:20:31*oculux joined #nim
10:21:05*krux02 joined #nim
10:49:22*vicfred quit (Quit: Leaving)
10:56:48*hmmmmm joined #nim
10:57:02hmmmmmhallo!
11:00:12PMunchHi there
11:02:40hmmmmmmunchie!
11:07:00*hmmmm joined #nim
11:08:01*hmmmmm quit (Ping timeout: 264 seconds)
11:13:47FromDiscord<iWonderAboutTuatara> @Rebel I've never heard of that puzzle, can you explain a bit?
11:13:50FromDiscord<iWonderAboutTuatara> Sounds interesting
11:19:58FromDiscord<Rebel> https://www.brainbashers.com/skyscrapershelp.asp
11:24:49narimiranif anybody is interested in testing 1.4.1 (soon to become 1.4.2), grab it from https://github.com/nim-lang/Nim/tree/version-1-4
11:31:05*narimiran quit (Ping timeout: 240 seconds)
11:38:17*rockcavera joined #nim
11:47:42hmmmmheeey
11:48:04FromDiscord<lqdev> hi
11:48:07hmmmmI'd like to slap a very simple gui on my precious example of func
11:48:11hmmmmwhat can I use
11:49:02FromDiscord<lqdev> there's https://github.com/trustable-code/NiGui
11:49:34hmmmmlooks good enough
11:52:16hmmmmit works! :o
11:58:12*Zevv quit (Quit: Lost terminal)
11:59:54PMunchBest feeling, when stuff just works
12:06:02*supakeen quit (Quit: WeeChat 2.9)
12:06:31*supakeen joined #nim
12:25:31bung`[]` when compiler see this what's its kind called in , tyXX?
12:26:05Zoom[m]NiGui is really easy and I recommend it. Manual layout is a pain, though. I'd like it to have something like wnim's autolayout https://khchen.github.io/wNim/autolayout.html
12:26:57PMunchTyBracketExpr I think
12:27:01PMunchOr something like that
12:27:28PMunchZoom[m], I was thinking of ripping the layout thing out of notifishower and create a package out of it
12:27:59PMunchBut not sure how generaliseable it is..
12:28:16Zoom[m]Any demo of what yours is capable?
12:28:42PMunchSure: https://github.com/PMunch/notifishower
12:28:42Zoom[m]I saw only a bubble with 4 black lines for a moment
12:28:48Zoom[m]It was cool though
12:28:50PMunchAh, that is the ninepatch stuff
12:28:57PMunchNot strictly related
12:29:26bungdont know , it may get into tyTypeDesc and final get tyRange ?
12:29:36PMunchAh right..
12:30:02bungTraceback dont show sigmatch file
12:30:14Zoom[m]Is anyone in the mood fo some code review?
12:31:08*waleee-cl joined #nim
12:31:47PMunchZoom[m], here you can see me playing around with it a bit: https://www.youtube.com/watch?v=0Uzori2oZ3c
12:31:53PMunchThe formatting language
12:32:21PMunchOops, meant to share with a timestamp: https://youtu.be/0Uzori2oZ3c?t=9089
12:33:03Zoom[m]If anyone feels like it, please, take a look at my Gale Shapley algo and say how I can make it better/more idiomatic: https://github.com/ZoomRmc/rosettacode_nim/blob/main/src/stable_marriage_gale_shapley.nim
12:36:44*luis_ joined #nim
12:40:02PMunchJust from a quick peek it doesn't have any glaring omissions
12:48:08Zoom[m]Good to hear. I'm sure someone will find something
12:48:43Zoom[m]By the way, Nim doesn't have dedicated seq init proc? Just use repeat?
12:50:31FromGitter<ynfle> newSeq, newSeqWith
12:50:46FromGitter<ynfle> check the sequtils module
12:52:37Zoom[m]I meant initializing with a value
12:55:22PMunchLike `let a = @[1, 2, 3]` ?
12:58:00FromGitter<ynfle> I found `newSeqWith` very useful
13:00:27Zoom[m]Like `repeat(X)` :) Right, newSeqWith is cool
13:00:30Zoom[m]Nice to see we have `mgetOrPut` for tables, weird name, though
13:00:41*hmmmm quit (Remote host closed the connection)
13:01:01FromDiscord<lqdev> mutable get or put
13:03:13Zoom[m]Of course, just not as clear as getMutOrInsert
13:05:52*luis_ quit (Ping timeout: 260 seconds)
13:06:16PMunchHmm, that is actually a really good name
13:07:11*luis_ joined #nim
13:17:33*jjido joined #nim
13:17:37Zoom[m]It's also would be cool to have a distinct type for entry so you could chain methods and propagate empty entries through
13:18:00*hmmm joined #nim
13:18:28PMunchFor entry?
13:19:19Zoom[m]Enum container for tables/maps
13:39:10*Zevv joined #nim
13:39:18ZevvAnyone here who knows how to tame .gcsafe. stuff?
13:42:46Araq{.cast(gcsafe).}: ...
13:42:54Araqit's pretty simple to tame
13:46:53FromDiscord<exelotl> is there a way to test 1.4.1 via choosenim?
13:47:00PMunchchoosenim devel
13:47:27FromDiscord<exelotl> it said "Extracting nim-1.5.1-linux_x64.tar.xz"
13:47:37PMunchAh wait
13:47:48PMunchchoosenim version-1-4 might work
13:47:54PMunchNot entirely sure though
13:48:18PMunchYou might have to clone the Nim repo, checkout that branch and then do `choosenim <path>` to where you have it
13:50:24FromDiscord<exelotl> ah I'll give that a try
13:54:03*jjido quit (Quit: My MacBook has gone to sleep. ZZZzzz…)
13:57:52FromDiscord<haxscramper> What is the simplest nim GUI library? I want to write a small application to test my fuzzy string sorting - so it should only contain text input and list of strings. By simplest I mean "will take the least amount of time to get a crude prototype working - preferably has similar example"
13:58:22PMunchPlatform?
13:59:16FromDiscord<haxscramper> linux
13:59:41PMunchWell Gtk with the genui macro is pretty simple
14:04:51*luis_ left #nim (#nim)
14:05:39FromDiscord<shad0w> is there a goto web framework for nim ?
14:05:45ZevvAraq: yeah, I know how it's used, but I have a bit of a corner case. NPeg can call back into used code, which can or can not properly handle gcsafe. If I .gcsafe. tag my way into NPeg, users will get warnings all the time, even wihtout --threads
14:05:49FromDiscord<shad0w> i found prologue
14:06:14Zevvbecause it is perfectly fine to access globals from parser code in a non-threaded setup
14:06:24Zevvso I'd like to make these pragmas conditional I think
14:08:12FromDiscord<lqdev> @shad0w karax?
14:08:38FromDiscord<shad0w> that's a frontend thing isnt it @lqdev ?
14:08:44FromDiscord<lqdev> ah yeah
14:08:47FromDiscord<lqdev> i meant jester
14:08:55FromDiscord<lqdev> gosh i always mix those two up
14:08:56FromDiscord<shad0w> what do you guys build apis with ?
14:09:08FromDiscord<lqdev> APIs as in web APIs, or…?
14:09:17FromDiscord<shad0w> yea, webservers
14:09:28FromDiscord<lqdev> ~~sockets~~
14:09:37FromDiscord<shad0w> never sockets
14:09:41FromDiscord<shad0w> i meant.
14:09:45FromDiscord<shad0w> open socket
14:09:50FromDiscord<shad0w> never sockets
14:09:52FromDiscord<shad0w> close socket
14:09:54FromDiscord<shad0w> ugh
14:10:17FromDiscord<lqdev> i haven't messed around too much with nim webdev yet but i'd just use jester tbh
14:10:24FromDiscord<lqdev> seems pretty simple to use
14:10:49FromDiscord<shad0w> prologue interests me cause we can use karax as an extension to it
14:10:55FromDiscord<shad0w> backend rendered html
14:11:02FromDiscord<shad0w> with eventhandlers
14:11:03FromDiscord<shad0w> win
14:11:13FromDiscord<lqdev> interesting
14:11:34FromDiscord<lqdev> honestly the most web i ever do is static pages so i can't give you many good backend ideas
14:11:45FromDiscord<shad0w> but wasn't sure if its what everyone uses
14:12:11FromDiscord<shad0w> that's alright. i just got an insight
14:12:36*hmmm quit (Ping timeout: 240 seconds)
14:12:37FromDiscord<shad0w> i should just look at nimble package downloads if i need to know about popular packages : P
14:12:42FromDiscord<shad0w> wooosh
14:14:22PMunchshad0w, I've been using Jester, but Prologue seems great and I'll try it out for my next web project
14:15:28FromDiscord<shad0w> PMunch: i just got done watching your nim everywhere talk video on youtube
14:15:53PMunchOh cool, what did you think?
14:16:02FromDiscord<shad0w> it was pretty nice
14:16:09FromDiscord<shad0w> : )
14:16:35*hmmm joined #nim
14:16:40FromDiscord<shad0w> make me look around if i could really use nim everywhere
14:16:53FromDiscord<shad0w> frontend, backend, small IOT devices
14:17:05FromDiscord<shad0w> maybe im reaching, but android / IOS apps ?
14:17:40PMunchI've made an Android game with it
14:17:59FromDiscord<shad0w> fo real ?
14:18:00notchrisgood morning friends
14:18:06PMunchYup, pretty simple
14:18:16FromDiscord<shad0w> how does that even work ?
14:18:23PMunchWhat do you mean?
14:18:38FromDiscord<shad0w> nim -> java / kotlin ?
14:18:40PMunchIn theory you should be able to wrap the native UI libraries as well, but I haven't tried it
14:19:03PMunchAh, they use the NDK
14:19:13notchrisThere are a bunch of intermediate mode UIs, none of them are perfect but enough to get something built out
14:19:18PMunchhttps://developer.android.com/ndk
14:19:28notchrisI feel like most people will manually build out some basic ui though
14:20:04PMunchYeah those would be simple
14:20:44notchrisPMunch: i saw a wrapper for dawrin the other day but im still pretty sure there is no way to access like AVFoundation or some core osx libs correctly
14:20:51notchrisOh sorry, didnt mean to ping you for that one
14:20:56FromDiscord<shad0w> do you write game logic in nim, compile to c, add it as a dependency in the native android app and build it with android studio ?
14:21:18PMunchNo worries
14:21:32PMunchWell I built it from the command line
14:21:53FromDiscord<shad0w> and the UI ?
14:21:58PMunchSDL
14:22:28PMunchBasically SDL runs under the NDK and everything is handled in Nim
14:22:38PMunchThere is just a thin Java wrapper to start the Nim stuff
14:22:39notchristhe UI libs will generally have some kind of render they attach to, be it SDL or Opengl, it will generally either look for a surface or create their own window as a bass
14:22:42notchrisbasis*
14:22:54FromDiscord<shad0w> i'd really have to try this
14:23:25FromDiscord<shad0w> mind sharing a link to yours if it's on github or somewhere i can read the code ?
14:24:14hmmmmunchie I think I have a small vscode problem
14:24:32FromDiscord<shad0w> notChris: that's alright i guess ?
14:24:41PMunch@shad0w, it was only as a test to check if it worked so it's not on GitHub
14:25:25FromDiscord<shad0w> i see
14:25:29FromDiscord<shad0w> i'll try hacking some
14:25:32PMunchIt was built on this though: https://github.com/PMunch/nim-sdl-template
14:36:04Zoom[m]So what's happening in the Dali land? Any progress?
14:38:11Zoom[m]That announcement on forums I saw a long time ago was very promising
14:42:27*Vladar joined #nim
14:45:32PMunchWasn't that just a PoC?
14:53:35ForumUpdaterBotNew thread by AlectronikHQ: Question to tables & objects, see https://forum.nim-lang.org/t/7112
14:55:27FromDiscord<exelotl> my game builds and runs just fine under 1.4.1↡first class openarray support seems to be improved too! But still possible to get invalid codegen
14:58:49hmmmcan I try something and leave except empty?
14:59:07PMunchIt can't be empty
14:59:13PMunchBut you can put a `discard` in it
14:59:23hmmmthat's convenient
14:59:25hmmmty
14:59:57*rockcavera quit (Remote host closed the connection)
15:00:49PMunchHmm, my old SDL code gives me an out of memory error when I try to render some text..
15:01:53FromDiscord<exelotl> ohh i didn't know `try: ... except IOError as e: ...` was valid
15:02:17FromDiscord<exelotl> that's nice, no need to call getCurrentException()
15:03:28hmmmI want to use a proc I found in an example but it has a red asterisk after the proc name, should I be worried?
15:04:04FromDiscord<exelotl> the asterisk is an export marker, it just means "public"
15:04:11hmmmoh
15:04:13hmmmthanks
15:04:37FromDiscord<exelotl> np
15:05:21*rockcavera joined #nim
15:11:30FromDiscord<notchris> im hoping to find a solution soon for accessing AVFoundation on osx via nim
15:12:21*hmmm quit ()
15:15:11FromDiscord<dom96> Can we get this, but for Nim https://cxx.rs ? πŸ™‚
15:19:39ForumUpdaterBotNew thread by JPLRouge: Trouble , name etc..., see https://forum.nim-lang.org/t/7113
15:20:31bunghttps://github.com/nim-lang/Nim/issues/11684
15:20:32disbotβž₯ For loops over a hardcoded empty array crash the compiler. ; snippet at 12https://play.nim-lang.org/#ix=2mEp
15:20:35*PMunch quit (Quit: leaving)
15:21:55bungI try to fix this, the node reach there become HSlice[]
15:23:02bungam not sure raise constant message like cant infferd the type of array is fine
15:23:28FromDiscord<haxscramper> @dom96 I skimmed over documentation (will read it more thoroughly later on), but it seems quite close to hcparse. And in addition - because we can just generate C++ it should be even simpler. In theory. E.g. main problem in wrapping C++ is that nobody in the world knows what is considered 'API' part, and what should not be wrapped. After that it is mostly like writing macros - you get (quite ugly) AST and can do whatewher you want.
15:23:40FromDiscord<haxscramper> Or list of declarations in the C++ project
15:25:12FromDiscord<haxscramper> Though figuring it out "API" for C++ library is extremely annoying
15:26:58Oddmongerdo you think it's wise to use web libs like threejs or babylonjs with nim ?
15:27:41FromDiscord<dom96> @haxscramper cool, now you just need a nice domain πŸ™‚
15:30:23*aaronm joined #nim
15:31:43aaronmHey guys , how can I add assembly to a nim program? Learning about low level coding and C, so wondering if I can do the samething with nim
15:32:52FromDiscord<haxscramper> https://nim-lang.org/docs/manual.html#statements-and-expressions-assembler-statement
15:33:00FromDiscord<exelotl> ^
15:33:33aaronmThank you
15:37:20FromDiscord<exelotl> you can also use the {.compile.} pragma to add an external asm file to the build, and then use the {.importc.} and {.extern.} pragmas to bring the symbols from that file into nim
15:37:27FromDiscord<exelotl> e.g. https://github.com/exelotl/natu/blob/master/examples/anim_sprite/main.nim#L25
15:44:53aaronmok cool thanks
15:55:11FromGitter<sealmove> what's the benefit of wrapping a whole module into a main() proc?
15:56:10FromGitter<sealmove> if it's a simple program for example (not library)
15:57:50*tiorock joined #nim
15:57:50*tiorock quit (Changing host)
15:57:50*tiorock joined #nim
15:57:50*rockcavera is now known as Guest81539
15:57:50*Guest81539 quit (Killed (tolkien.freenode.net (Nickname regained by services)))
15:57:50*tiorock is now known as rockcavera
16:08:33aaronmnim main function is interesting in assembly
16:14:20FromGitter<sealmove> Is that all?
16:21:10Zevvdisruptek: awake?
16:21:15disrupteksure.
16:21:39disruptekhow are they hangin', zevv?
16:22:01Zevvjust down below, as usual
16:22:12disruptekcould be worse.
16:22:16Zevvtrue.
16:22:24Zevvhow's life
16:22:28Zevvyou down at the lake yet
16:22:45disrupteknope, there's still no electric, no well, no septic.
16:22:51disruptekfucking typical.
16:22:59Zevvstart diggin' then
16:23:22Zevvwhat's that blocked on
16:23:25disruptekneeds to start soon because the ground is gonna freeze.
16:23:39Zevvyeah that as well, damn
16:23:51disruptekthe electric company put in a demarc and they managed to place it on the neighbor's property.
16:23:59Zevvhappy neighbour
16:24:02*habamax quit (Ping timeout: 256 seconds)
16:24:13disrupteksuch a shit show.
16:24:53disruptekspeaking of, if i don't get some glycol into my blackwater tank, it's gonna freeze and explode.
16:25:07Zevvyou should find another country
16:25:27disruptekpassport is useless right now.
16:25:37disruptekgonna hit 200k new cases in a single day soon.
16:25:55Zevvyeah pretty unreal how that all is going
16:26:05disruptekhow does it smell where you are?
16:26:19Zevvfine, life is pretty normal for me actually
16:26:27Zevvkids just go to school, shops are open
16:26:39disruptekweird.
16:26:45Zevvi work from home, but I always do that
16:26:45disruptekmasks?
16:26:57Zevvyeah sure
16:27:26Zevvhttps://aatishb.com/covidtrends/?location=Netherlands&location=US log-log-phase-space plot
16:27:38*natrys joined #nim
16:27:45Zevvcases vs new cases
16:28:05disruptekmusk can't email me soon enough.
16:28:39disrupteki'm literally still waiting for dns.
16:29:00disruptekokay.
16:29:04Zevvdude. good thing there is irc
16:29:10disruptekover a minute.
16:30:09disruptekthis graph does not look very good for you.
16:30:18Zevvwait until its done and look at the USA
16:30:38disruptekwell, yeah, i'm intimately acquainted with the states.
16:31:01Zevvand how does that work for you
16:31:08Zevvlets talk Nim instead
16:31:41supakeenDe Nimste.
16:31:56Zevvnpeg code blocks can not be called from threads because the inner generated match fn is not marked gcsafe. If I do that, it works fine, but then everyone not doing threads gets warnings all the time when accessing stuff outside the code blocks.
16:32:08ZevvCan I make .gcsafe. conditional somehow
16:32:21disruptekconditional on threads?
16:32:25disrupteksure.
16:32:57disruptekthere's a proc called, like, compileOptions.
16:33:12disruptekyou run it like if compileOption("threads") or something.
16:33:12Zevvyeah but a pragma is there or it is not there
16:33:20ZevvI can't put a pragma inside an if or when, right
16:33:34disruptekwhen you generate your fn, you elect to include it or not.
16:34:12ZevvI can't see what that looks like
16:34:39disruptekno?
16:35:19disruptekwhen compileOption("threads"): addPragma ident"gcsafe"
16:35:23disruptekor whatever.
16:35:41disruptekit /is/ `compileOption("threads")` at least.
16:35:49Zevvhttps://github.com/zevv/npeg/blob/master/src/npeg/codegen.nim#L347
16:35:51ZevvThat one
16:36:08ZevvMy problem is that I quote that shit of course
16:36:20disruptekyou did a result = though.
16:36:26disruptekso just modify the result after that.
16:37:07Zevvhm fair point. But then there is still https://github.com/zevv/npeg/blob/master/src/npeg/codegen.nim#L37 so it's some more mess, but that'll be fine
16:37:33disruptekyou know what's weird?
16:37:39Zevvlife
16:37:41disrupteki couldn't make a when inside a type block work recently.
16:38:03Zevvhmm
16:38:38disruptekhttps://github.com/disruptek/frosty/blob/master/frosty.nim#L13
16:38:56disruptekand by recent i mean a few months ago.
16:39:26disrupteklike, i literally do it for the Serializer type but i couldn't do it for the ice type.
16:39:33disruptekbananas.
16:40:31disruptekor something. i actually forget the specifics. but it's nucking futs in any event.
16:41:15disrupteki think it was something like, the const wasn't "compile-time enough" and maybe because i made it a .booldefine.
16:43:02*jjido joined #nim
16:46:26Zevvbut does it or does it not work in the end/
16:47:18disruptekthe code works as you see it but i wasn't able to simplify it.
16:47:29Zevvclyybber: why do you have a bird house as your git logo
16:47:40Zevvdisruptek: that's nasty
16:47:48FromDiscord<Clyybber> lol @zevv
16:47:57Zevvit's a bird house for bees, actually
16:47:58FromDiscord<Clyybber> disruptek: booldefine used to be buggy
16:48:09disruptekuntil when?
16:48:18FromDiscord<Clyybber> it was supposed to be a turret :D
16:48:59FromDiscord<Clyybber> disruptek: https://github.com/nim-lang/Nim/issues/12880
16:49:01disbotβž₯ {.booldefine.} are not considered constants in type sections ; snippet at 12https://play.nim-lang.org/#ix=2EB4
16:49:11disruptekwow, exactly this.
16:49:16FromDiscord<Clyybber> yep
16:49:49disruptekso it's not in 1.0 i guess.
16:50:05disruptekthat must be my problem.
16:51:44disruptekthanks clyybber.
16:51:54*oculux quit (Ping timeout: 272 seconds)
16:51:54disrupteki guess you're not completely useless.
16:52:31FromDiscord<Recruit_main707> :disruptek:
16:53:02ZevvRecruit_main707: that's a solid 8 on a compliment scale of 1..10
16:53:53FromDiscord<Recruit_main707> true
16:54:16*narimiran joined #nim
16:57:28*hnOsmium0001 joined #nim
16:58:50disrupteksome day i need to find out what :disruptek: means.
16:59:41disruptekclyybber: i thought your avatar was a keyhole.
16:59:54narimiranit isn't?
17:01:06FromDiscord<Clyybber> its supposed to be something like https://media.discordapp.net/attachments/371759389889003532/778666097314365471/373.png
17:01:22*bung quit (Quit: Lost terminal)
17:03:11FromDiscord<Clyybber> but I kinda like the keyhole/birdhouse interpretation too :D
17:03:13FromDiscord<Recruit_main707> im gonna be honest i dont think you really got the essence of it
17:03:30FromDiscord<Clyybber> lol
17:03:56*PMunch joined #nim
17:04:09supakeenhttps://www.youtube.com/watch?v=J0NXY89WsxY why not one of these Clybber
17:05:11FromDiscord<Clyybber> I mean it looks a bit like that
17:05:59FromDiscord<Clyybber> both of these have inspired my 15 yo me
17:07:01*Lord_Nightmare quit (Quit: ZNC - http://znc.in)
17:07:07*oculux joined #nim
17:08:11FromDiscord<Clyybber> if my phone wasn't broken I would take a picture of what its supposed to resemble
17:10:26PMunchHmm, I'm considering a stream. But I'm not entirely sure what I'd do..
17:10:34*Lord_Nightmare joined #nim
17:10:51*oculuxe joined #nim
17:11:00PMunchI mean notifishower is pretty much done..
17:11:27FromDiscord<Clyybber> now work on notifihider
17:11:49PMunch`killall notifishower`
17:11:54PMunchDone!
17:12:47FromDiscord<Clyybber> ok what about notifipretender
17:12:59FromDiscord<Clyybber> sends you fake notifications to keep you distracted
17:13:16*oculux quit (Ping timeout: 240 seconds)
17:13:17PMunchThat could easily be done with notifishower
17:16:21FromDiscord<Clyybber> does notifishower support filtering?
17:20:02*jjido quit (Quit: My MacBook has gone to sleep. ZZZzzz…)
17:20:34PMunchWhat do you mean?
17:31:36*cgfuh joined #nim
17:36:32*hmmmmm joined #nim
17:36:41FromDiscord<Clyybber> only showing some notifications
17:36:41hmmmmmhoy!
17:36:46FromDiscord<Clyybber> and hiding others
17:36:58FromDiscord<Clyybber> hmmmm:sup
17:37:13*cgfuh quit (Quit: WeeChat 2.9)
17:37:26*cgfuh joined #nim
17:37:35hmmmmmI'm slowly upgrading from nimwit to nimblet
17:37:38PMunch@Clyybber, ah notifishower doesn't actually handle notifications, it only shows them
17:37:49FromDiscord<Clyybber> ah right, sorry
17:38:04PMunchFor that you want notificatcher, which catches freedesktop notifications and can write them to a file or run a program
17:38:27PMunchSo you would do any kind of filtering with a script in between notificatcher and notifishower
18:02:47*vicfred joined #nim
18:03:19*Vladar quit (Quit: Leaving)
18:04:18*jjido joined #nim
18:13:38disruptekleorize[m]1: setup-nim working great for me. couple ideas for improvements that would make it better:
18:14:06disruptektake the matrix from an env. parse the package name from the env.
18:14:22disruptekthen i can use the same yaml in all my projects.
18:15:08disruptekmore of a ci.yml patch than a setup-nim patch.
18:15:25leorize[m]1that'd be an extension instead. I can call that `test-nim` maybe
18:15:38leorize[m]1will look into that once I got the new test-nim sorted out
18:15:43leorize[m]1setup-nim*
18:17:58*jjido quit (Quit: My MacBook has gone to sleep. ZZZzzz…)
18:19:14*apahl quit (Ping timeout: 264 seconds)
18:20:04*apahl joined #nim
18:21:33*habamax joined #nim
18:23:43FromDiscord<Avatarfighter> what is setup-nim?
18:26:11*jjido joined #nim
18:27:39leorize[m]1!repo alaviss/setup-nim
18:27:39disbothttps://github.com/alaviss/setup-nim -- 9setup-nim: 11CI helpers to setup Nim using prebuilt nightlies 15 5⭐ 0🍴
18:27:40*Vladar joined #nim
18:29:07*opal quit (Remote host closed the connection)
18:29:50*opal joined #nim
18:32:02*NimBot joined #nim
18:32:08disruptekunbelievable.
18:34:02disruptekgram fails on devel because it cannot use the items iterator from the new packedsets.
18:34:15PMunch@brainpoxy, you can try to output `self.kind` and see what it is
18:35:44PMunchNot sure why Nim doesn't do this by default TBH
18:36:13PMunchIt shows you the name of the type, and the name of the field, but not the value of it, which is the problem..
18:36:20FromDiscord<Clyybber> theres a PR for that
18:37:34disruptekgah this is so weird.
18:37:48PMunch@Clyybber, ah there is?
18:39:45FromDiscord<Clyybber> https://github.com/nim-lang/Nim/pull/11955
18:39:48disbotβž₯ properly fix #10053 (more informative FieldError msg): report discriminant value + lineinfo; also improve for VM case ; snippet at 12https://play.nim-lang.org/#ix=2EBx
18:40:11ForumUpdaterBotNew thread by AlectronikHQ: C library bindings generator, see https://forum.nim-lang.org/t/7115
18:42:45PMunch@Clyybber, any idea why that hasn't been merged?
18:46:09FromDiscord<Clyybber> it doesn't seem finished/cleaned up
18:46:12ForumUpdaterBotNew thread by AlectronikHQ: Sample compiler/interpreter (like kaleidoscope/llvm, monkey/go etc), see https://forum.nim-lang.org/t/7116
18:46:26disruptekclyybber:
18:46:29disruptek!repo carnac
18:46:30disbothttps://github.com/disruptek/carnac -- 9carnac: 11magical function memoization across runtimes 15 3⭐ 0🍴
18:46:45FromDiscord<Clyybber> oh is that the repro I should have looked at?
18:46:51disruptekyeah.
18:47:16FromDiscord<UNIcodeX> sent a code paste, see https://play.nim-lang.org/#ix=2EBz
18:47:27FromDiscord<Clyybber> disrutptek: sorry I'm still on/off on that untyped thing
18:47:39disruptekkk
18:47:57FromDiscord<Clyybber> currently not even doing something in code, just thinking about how it should work
18:48:41disruptekmy big project is this tierra remake. i'm not writing any logic, just data structures.
18:49:33FromDiscord<Clyybber> whats tierra?
18:49:43FromDiscord<Clyybber> http://life.ou.edu/tierra/ this?
18:49:57disruptekyeah.
18:50:30disrupteki was really into it back in the day.
18:54:29federico3Did anyone ever wrote a firefox extension in Nim?
18:56:08*tane joined #nim
18:58:05disrupteki saw an extension but i think it was for chrome.
18:59:14*thomasross joined #nim
19:02:58*hmmmmm quit (Remote host closed the connection)
19:04:10*jjido quit (Quit: My MacBook has gone to sleep. ZZZzzz…)
19:12:36*PMunch quit (Quit: leaving)
19:18:17*MyMind quit (Read error: Connection reset by peer)
19:18:54FromDiscord<Clyybber> damn it looks really interesting
19:19:04FromDiscord<Clyybber> disruptek: Heh changed your avatar to transparent background?
19:19:14FromDiscord<Clyybber> confused me for a bit here too :D
19:19:15disruptekyeah, i had to shrink the dog.
19:30:50*hmmm joined #nim
19:31:01hmmmhallou
19:37:03hmmmcan I call a proc before I define it?
19:37:10disruptekof course.
19:37:27hmmmError: undeclared identifier: 'updateResult'
19:37:30hmmmhmm
19:38:10hmmmif I remember correctly the tutorial said I could
19:41:25hmmmhmm now I called it after the define and the program works
19:41:30disruptekweird.
19:41:34hmmmVERY!
19:41:38Amun_RaI don't think you can
19:42:26hmmmmaybe it was some weird lang I tried before nim
19:43:23Amun_Rawasn't it in experimental? hmm
19:44:57FromDiscord<alehander42> ѝиь,
19:44:59FromDiscord<alehander42> Araq
19:45:09FromDiscord<alehander42> i .. rebased and fixed the id stuff i think
19:45:12FromDiscord<alehander42> several days ago
19:45:22FromDiscord<alehander42> but i plan on just reverting to a working state for now
19:45:32FromDiscord<alehander42> sorry for delaying until now
19:45:40FromDiscord<alehander42> i also got .. some kind of cold
19:45:52FromDiscord<alehander42> so i am sick these days, but I'll see what I can do
19:46:16FromDiscord<alehander42> disruptek it's strange to think of code with ferver
19:46:30disruptektry being stoned all the time.
19:46:37FromDiscord<nikki> https://twitter.com/lzsthw/status/1329057683316629513?s=21
19:46:48FromDiscord<nikki> zed continuing on the nim dive
19:47:04FromDiscord<alehander42> i am like
19:47:08FromDiscord<alehander42> dude
19:48:09Amun_Raand I have no smell and taste since yesterday evening :)
19:48:22ForumUpdaterBotNew thread by Stefan_Salewski: Optional var out proc parameters, see https://forum.nim-lang.org/t/7117
19:50:12disruptekyou're fucked.
19:51:00FromDiscord<alehander42> dude
19:51:04FromDiscord<alehander42> hospital today
19:51:07FromDiscord<alehander42> it's .. i mean
19:51:17FromDiscord<alehander42> super hard situation
19:51:23FromDiscord<alehander42> there is like one-two main doctors
19:51:31hmmmit's 0..10
19:51:32FromDiscord<Zachary Carter> you don't have covid do you?
19:51:33FromDiscord<alehander42> running like 4-5 store hospital and emergency
19:51:39*habamax quit (Ping timeout: 260 seconds)
19:51:41FromDiscord<alehander42> well .. my gp said it's probably covid
19:51:46FromDiscord<Zachary Carter> damnnnnnn
19:51:47FromDiscord<alehander42> the doctor said "whatever dude dont worry"
19:51:53FromDiscord<alehander42> they are like war zone
19:52:00FromDiscord<alehander42> if you can breathe well, you're ok there
19:52:06FromDiscord<Zachary Carter> I think I already had covid but I'm not sure
19:52:17FromDiscord<alehander42> it might be just a cold
19:52:22FromDiscord<alehander42> i have fever and tiredness
19:52:34FromDiscord<Zachary Carter> yeah could also be influenza
19:52:43FromDiscord<alehander42> yeah, so i'll wait several days
19:52:51FromDiscord<alehander42> it's not good to test early ? iirc
19:53:02FromDiscord<alehander42> but i mean
19:53:05FromDiscord<alehander42> waiting there
19:53:18Amun_Ranah, if I call a doctor I'd be officially sent home, exactly where I am
19:54:21FromDiscord<alehander42> there were old people young people despair happiness a guy that wanted to vendetta the main doctor and got his name and city (from the main doctor himself who was like meh)
19:54:30FromDiscord<alehander42> and a guy that had bigger beard than me
19:54:36FromDiscord<alehander42> and wants to become a monk
19:55:52FromDiscord<Zachary Carter> sounds like quite the party
19:56:27FromDiscord<Zachary Carter> that Zed guy basically just hates all statically typed language and loves dynamic languages
19:57:26Amun_RaZed Shaw?
20:04:29FromDiscord<nikki> i've put off getting a flu shot -- should probs do that soon 😐
20:04:57FromDiscord<nikki> @Zachary Carter yeah. sounds like he's kinda getting into nim tho. he wrote some popular python books i believe (never actually read 'em myself)
20:05:37FromDiscord<Zachary Carter> yeah - I just remember reading his rant about Nim suggest's error messages
20:05:55FromDiscord<Zachary Carter> but it'd be cool to have more books written about Nim
20:07:02FromDiscord<nikki> @Zachary Carter i think the rant was about the error messages being unhelpful, not about the fact that there were errors, the way i interpreted it πŸ€”
20:07:18FromDiscord<nikki> but yeah in this case he seems to say-- the type system is helping with async stuff
20:08:57FromDiscord<alehander42> show him metaprogramming and JsObject imho
20:09:03FromDiscord<alehander42> you can kinda get gradual
20:12:32*xet7 quit (Quit: Leaving)
20:14:11*xet7 joined #nim
20:25:35FromDiscord<Zachary Carter> yeah I believe that's their name
20:25:50FromDiscord<Zachary Carter> @nikki - yeah sorry that's what I meant
20:26:00FromDiscord<Zachary Carter> but I'm glad he's now finding the static typing beneficial (because it always is)
20:26:32FromDiscord<Zachary Carter> So many deploys at my company have needed hotfixes recently because we have no static type checking
20:26:45FromDiscord<Zachary Carter> and people do bad things and don't catch them until they're deployed
20:28:48disrupteki basically do bad things all day long.
20:28:57disruptekthat's kinda "my thing."
20:29:59disrupteksasha i would pray for you but with my faith, it would probably hurt more than it helps.
20:30:05Araqdisruptek, I'm ready for your wild things
20:30:08disruptekclyybber: you wanna work on my tierra clone with me?
20:30:13disruptekmy what?
20:30:59FromDiscord<Zachary Carter> what's a tierra clone?
20:31:03disruptekoh lemme go get my mic from home. gimme a few mins.
20:31:17FromDiscord<Zachary Carter> do you mean terraria?
20:33:12disruptekyeah because what the world needs is another crafting game.
20:34:50disruptekgoogle tom ray tierra.
20:37:12disruptekmy wild things make araq's heart sing.
20:37:12FromDiscord<shadow.> is there an operator to concat an object to a seq
20:37:19disruptekthey make everything... groovy.
20:37:19FromDiscord<shadow.> similar to & with two seq's
20:37:45disruptekthat doesn't make any sense.
20:38:18FromDiscord<shadow.> wdym lmao
20:38:34FromDiscord<shadow.> ah wait
20:38:36FromDiscord<shadow.> sent a code paste, see https://play.nim-lang.org/#ix=2ECb
20:38:43FromDiscord<shadow.> brilliant
20:38:44FromDiscord<shadow.> sent a code paste, see https://play.nim-lang.org/#ix=2ECc
20:40:10Araqdisruptek, well?
20:40:17Araqmumble or not?
20:40:40disruptekyeah.
20:40:58*FromDiscord quit (Remote host closed the connection)
20:41:13*FromDiscord joined #nim
20:45:51FromDiscord<Rebel> @shadow. yourseq.add(yourobject) ?
20:46:32FromDiscord<shadow.> oo
20:46:33FromDiscord<shadow.> ty
20:46:39FromDiscord<shadow.> wait no
20:46:42FromDiscord<shadow.> doesnt that modify in place?
20:46:47FromDiscord<shadow.> yeah
20:47:05FromDiscord<shadow.> i think i can just concat with a temporary seq of 1 lol
20:52:23FromDiscord<nikki> why not modify in place
20:57:49FromDiscord<tinygiant> A quick search of the nimble directory didn't reveal much, anyone know if there's a webhook listener in nim (specifically, for github)?
21:02:01Zoom[m]@shadow. that's wasteful, you probably want to grow the first one with add, if your bigger one is immutable, copy it and grow the copy
21:02:26FromDiscord<lqdev> the heck https://media.discordapp.net/attachments/371759389889003532/778726833255874681/unknown.png
21:02:34FromDiscord<lqdev> nim just quits
21:03:52Zoom[m]But the question I had in the similar situation: if the seq A is used the last time in `var seqB = seqA; seqB.add() ...` does Nim move the seqA under the hood?
21:08:16*narimiran quit (Ping timeout: 240 seconds)
21:09:57*hmmm quit ()
21:10:06Zoom[m]I mean, does it track where to shallow copy seqs?
21:17:07Zoom[m]I understand that's two different questions, though
21:18:13planetis[m]@Zoom that video answers your question https://www.youtube.com/watch?v=aUJcYTnPWCg
21:18:22planetis[m]better than i can
21:19:13Zoom[m]The fact that I've watched it already and still have those questions says a lot about me
21:20:05planetis[m]ok so it depends wether you use seqA afterwards or not
21:20:44Zoom[m]That's why I mentioned "last time"
21:20:57FromDiscord<nikki> it's supposed to move it under the hood
21:21:05FromDiscord<nikki> if you don't use it after
21:21:28Zoom[m]I was hoping that :)
21:23:07FromDiscord<nikki> Zoom: put your example in a proc, then run with --expandArc:nameOfThatProc
21:23:18FromDiscord<nikki> it'll show you what arc does
21:23:34Zoom[m]Oh, that's useful, thanks
21:25:13Zoom[m]@nikki, could you glance over my Gale Shapley implementation and say what you think?
21:25:22FromDiscord<nikki> https://play.nim-lang.org/#ix=2ECl
21:25:33FromDiscord<nikki> Zoom: ^ the example you asked about, with expandArc output below
21:25:45FromDiscord<nikki> personally i just look at the C output
21:26:23Zoom[m]Is it better to -d:release to look at it?
21:26:52FromDiscord<nikki> idk, try it both ways and see? πŸ™‚
21:27:02FromDiscord<nikki> i always use -d:danger bc. yolo
21:27:35FromDiscord<nikki> oh sorry i thought you meant expandArc
21:27:54FromDiscord<nikki> for C output yeah -- i've found that -d:danger is the nicest, but also if you wanna know what nim is adding in release or debug then you can check under those
21:28:35FromDiscord<nikki> --exceptions:goto also helps (tho it leads to some codegen errors in c++ mode looks like). and --panics:on
21:28:44FromDiscord<nikki> also yeah i can look at your algo code (may not look right away tho)
21:29:29Zoom[m]https://github.com/ZoomRmc/rosettacode_nim/blob/main/src/stable_marriage_gale_shapley.nim
21:30:31Zoom[m]Please, don't check the algo itself, that would be too much
21:30:35FromDiscord<nikki> haha i see you used my suggested randPairs
21:31:15FromDiscord<nikki> should i be looking at anything in particular here?
21:31:37Zoom[m]General style and cq, I suppose
21:31:44FromGitter<ynfle> Don't use python_case use nimCase
21:32:15Zoom[m]That's probably the biggest chunk of pure Nim from me
21:32:33FromDiscord<nikki> so just style feedback?
21:32:36FromGitter<ynfle> https://nim-lang.org/docs/nep1.html
21:32:51FromDiscord<nikki> i think nim one tends to not do `I_AM_LOUD` for constants
21:32:56FromDiscord<nikki> and just do `iAmNormal
21:32:57FromDiscord<nikki> (edit) "`iAmNormal" => "`iAmNormal`"
21:33:09FromGitter<ynfle> πŸ‘
21:33:27FromGitter<ynfle> @Zoom, checkout the style guide in nep1
21:33:41FromDiscord<nikki> lines 1-29 could be formatted better, probably
21:33:58FromDiscord<nikki> like 3 doesn't have a line break and 4 does, for the same column
21:34:02Zoom[m]Eh, not exactly style, I know this is not what official style guide suggest, I'm more interested in idiomatic usage of the lang
21:34:31Zoom[m]It's been run through nimpretty
21:34:36FromDiscord<nikki> seems fine, nothing stands out
21:34:47FromDiscord<nikki> well, it still doesn't look as pretty as it could πŸ™‚
21:34:58planetis[m]i would use flat seq[int] because that's wasteful πŸ˜‰
21:34:58FromDiscord<nikki> nimpretty often needs your help
21:35:41Zoom[m]Ok, that's good. Peter said so too. Style is easy to fix.
21:36:24Zoom[m]planetis: where?
21:36:32planetis[m]but you already know the length so why not use array instead of seq?
21:37:04planetis[m]newSeq[int](PAIRS)
21:37:26planetis[m]line 41
21:37:34planetis[m]and in general
21:38:27FromDiscord<Zachary Carter> for constants I do - `IAmNormal` similar to types
21:38:40FromDiscord<Zachary Carter> but I'm not sure what the actual convention is
21:38:49planetis[m]no you don't now the size im wrong
21:39:02FromGitter<ynfle> @Zachary Carter, check out https://nim-lang.org/docs/nep1.html
21:39:10Zoom[m]Ah, right, thanks planetis
21:40:19planetis[m]style nitpick dont USE ALL UPPERCASE
21:40:45planetis[m]WHY DOES YOUR CODE SCREAMS AT ME
21:41:16FromDiscord<For Your Health> Is it idiomatic to always use an initFoo or newFoo function instead of directly instantiating an object?
21:41:56planetis[m]u mean object contructor syntax `Foo(x: 2)`
21:42:16FromDiscord<For Your Health> Yeah, is it frowned upon to do that?
21:42:31planetis[m]not at all
21:42:47planetis[m]maybe even prefered
21:43:15FromDiscord<haxscramper> It is preferable to have constructor proc like `init` and `new` for maintenance reasons, but nothing wropng with `Foo(x: 2)`. If you use object only handlful of times
21:43:30FromDiscord<haxscramper> Why bother creating separate proc
21:44:15FromDiscord<haxscramper> And you can throw in `{.requiresinit.}` for debugging, so it is even less of an issue. For uninitialized fields
21:45:33FromDiscord<For Your Health> The thing that is tripping me up is when you want default values that are different from the default values of the type. The way to do that seems to be to make an init function, which can lead to a lot of boilerplate
21:46:29FromDiscord<For Your Health> sent a code paste, see https://play.nim-lang.org/#ix=2ECt
21:46:35FromDiscord<For Your Health> member is being written 4 times
21:47:26FromDiscord<Rika> There are rfcs for that I think
21:48:09FromDiscord<For Your Health> rfcs?
21:48:29FromDiscord<haxscramper> sent a code paste, see https://play.nim-lang.org/#ix=2ECu
21:48:42FromDiscord<haxscramper> Where `makeNode` is a constructor with all important things set up
21:48:46FromDiscord<Rika> Request for comment, basically proposals
21:49:00*luis_ joined #nim
21:49:05FromDiscord<haxscramper> @For Your Health https://github.com/nim-lang/RFCs/issues/252
21:49:06disbotβž₯ User-defined implicit initialization hooks ; snippet at 12https://play.nim-lang.org/#ix=2xc2
21:50:02FromDiscord<haxscramper> sent a code paste, see https://play.nim-lang.org/#ix=2ECv
21:50:13FromDiscord<haxscramper> Easily initialized upon construction
21:50:37*mbomba joined #nim
21:50:58*mbomba quit (Client Quit)
21:51:45FromDiscord<For Your Health> Oh, yeah I've seen that this seems to be a contested issue on the github.
21:52:07FromDiscord<haxscramper> sent a code paste, see https://play.nim-lang.org/#ix=2ECx
21:52:17*mbomba joined #nim
21:52:47FromDiscord<haxscramper> @For Your Health It was accepted in limited form
21:52:48FromDiscord<For Your Health> @haxscramper I figured there would be some way to alleviate the issue with a template or something, but then all of your code becomes dependent on that template right?
21:53:15FromDiscord<haxscramper> Well, yeah, but considering how much does it simplify a lot of things
21:54:04FromDiscord<haxscramper> I wouldn't be an exaggeration to say this is one of the best pieces of code I've ever written in terms of time spent/usability. I just use it absolutely everywhere now
21:54:28FromDiscord<haxscramper> It also doubles are rust field update syntax
21:54:42FromDiscord<haxscramper> And for DSL-like things with shell (see above)
21:55:11FromDiscord<haxscramper> Maybe I should PR it in `std/sugar` actually, it's literally 5 line implementation
21:55:27FromDiscord<For Your Health> sent a code paste, see https://play.nim-lang.org/#ix=2ECy
21:55:33FromDiscord<For Your Health> So how does that replace initThing
21:55:46FromDiscord<For Your Health> I have trouble with templates because I'm new
21:55:57FromDiscord<haxscramper> sent a code paste, see https://play.nim-lang.org/#ix=2ECz
21:56:40FromDiscord<haxscramper> But this is good for fields that you might want to initializ manually, but they have adequate default values otherwise
21:57:41FromDiscord<haxscramper> E.g. it is not a replacement for default initialization. It is just a intermediate solution - you have `initT` proc that sets up all fragile values, and then you tweak created object however you like for all other fields.
21:58:35FromDiscord<haxscramper> So if you have a lot of fields that require some non-standard default values (e.g. zero-filled memory doesn't cut it) then you still have to implement everything.
21:58:39planetis[m]i prefer this one https://github.com/nim-lang/Nim/pull/12378
21:58:40disbotβž₯ Default fields for objects
21:59:42FromDiscord<haxscramper> planetis: it is almost the same as RFC/252 no?
21:59:55*natrys quit (Ping timeout: 246 seconds)
22:00:40planetis[m]...no?
22:01:10planetis[m]its https://github.com/nim-lang/RFCs/issues/126
22:01:12disbotβž₯ Support default values for object properties ; snippet at 12https://play.nim-lang.org/#ix=2ECC
22:01:15FromDiscord<For Your Health> @haxscramper I see. That is pretty cool. What is `it` supposed to mean? Is that abbreviating something?
22:03:08FromGitter<ynfle> It's commonly used as a filler for a variable
22:03:15FromDiscord<haxscramper> `it` is an injected variable inside of template body. It is not magical (like result), you can see it in the `var it {.inject.} = val` part of template, but almost all templates in sequtils use this naming convention.
22:03:30FromDiscord<haxscramper> Like `mapIt`, `filterIt`, `sortedByIt` and so on
22:03:48FromDiscord<Rebel> `requirements.txt` in python == `X` in Nim?
22:04:12FromDiscord<haxscramper> `requires "nim >= 1.4.0", "sorta", "cligen"` in `.nimble` file
22:04:35FromDiscord<For Your Health> Ok I see.
22:04:45FromDiscord<For Your Health> sent a code paste, see https://play.nim-lang.org/#ix=2ECD
22:05:01FromDiscord<For Your Health> Is there some reason why something like this is a bad idea?
22:05:01FromDiscord<haxscramper> @Rebel https://github.com/nim-lang/nimble#creating-packages
22:05:56FromDiscord<haxscramper> @For Your Health Aside from style nitpicking - no. This is not implemented though, but `RFC/252` actually has the same syntax
22:06:02FromDiscord<Rebel> well it also accept a github url if the nimble package is not in the main package list?
22:06:44FromDiscord<haxscramper> Yes, see example I linked - `requires "https://github.com/user/pkg#5a54b5e"` should work
22:08:05FromDiscord<For Your Health> sent a code paste, see https://play.nim-lang.org/#ix=2ECF
22:09:08FromDiscord<For Your Health> So that way all of the code that interfaces with the type is idiomatic and not dependent on the macro
22:09:18FromDiscord<For Your Health> And only the definition is
22:09:31FromDiscord<haxscramper> Yes, but I ultimately decided it is easier to just write `init` here and there instead of maintaining macro like this
22:10:17FromDiscord<haxscramper> But parsing nim object AST is not a fun thing to do, due to lots of edge cases etc.
22:10:34disruptekrude.
22:10:47FromDiscord<For Your Health> Is a macro like I am describing really complicated? I know very little about macros
22:11:45FromDiscord<ElegantBeef> !repo constructor
22:11:46disbothttps://github.com/beef331/constructor -- 9constructor: 11Nim macros to aid in object construction including event programming, and constructors. 15 3⭐ 0🍴 7& 2 more...
22:11:47FromDiscord<ElegantBeef> @For Your Health
22:12:30FromDiscord<For Your Health> Thanks for the link. I'll take a look
22:12:45FromDiscord<ElegantBeef> It's not exactly like your idea, but the current macro system doesnt really allow what you have
22:12:47*natrys joined #nim
22:13:17FromDiscord<For Your Health> Really? I assumed it would have been capable of something like I am describing.
22:13:44FromDiscord<haxscramper> It is capable
22:14:24FromDiscord<haxscramper> And I've written this, but it is not really fun to use/maintain - https://github.com/haxscramper/nimtraits
22:14:48*natrys quit (Client Quit)
22:14:56FromDiscord<ElegantBeef> It is, it'd just be a bit difficult to make
22:15:06FromDiscord<haxscramper> Well, not init, but if I have full structure of an object (which I do) it is just a matter of implementing things
22:15:07FromDiscord<For Your Health> That looks like full blown rust traits though
22:15:12FromDiscord<haxscramper> it is
22:15:19FromDiscord<ElegantBeef> Mine is just constructors
22:16:08FromDiscord<For Your Health> Does my idea require a rust trait like system? Perhaps I'm missing something
22:16:13FromDiscord<haxscramper> It was proof-of-concept for how much things you can compress into object annotation pragmas. I can automatically declare hashing, field validation, equality (for case objects too) and provide API for implementing custom traits.
22:16:21planetis[m]that's pretty impressive @haxscramper
22:16:26FromDiscord<haxscramper> But I've never actually used it, because it was not necessary
22:16:45FromDiscord<haxscramper> E.g. there is too much magic going on with the code
22:17:04FromDiscord<haxscramper> And in the end I decided that `type` section is off-limit for macros, just for sanity reasons
22:18:02FromDiscord<For Your Health> I'll study the macro implementations you guys linked and see if I can understand it. Then maybe I'll have a go at it if I can wrap my head around it
22:18:13planetis[m]what you mean?
22:18:46planetis[m]it's hard to deal with typed macros?
22:20:16planetis[m]@For Your Health I have written a blog post once https://nim-lang.org/blog/2018/06/07/create-a-simple-macro.html
22:20:35planetis[m]/sameless self promotion
22:20:49planetis[m]now that i look at it, its pretty dumb
22:21:36FromDiscord<For Your Health> I'll take a look
22:22:14*jjido joined #nim
22:22:43planetis[m]also try out this macro: https://nim-lang.github.io/fusion/src/fusion/astdsl.html it's vey convenient
22:22:55*luis__ joined #nim
22:24:22*luis_ quit (Ping timeout: 260 seconds)
22:24:34*Vladar quit (Quit: Leaving)
22:24:47planetis[m]ignore the min macro i blew it
22:25:16planetis[m]looking for a replacement if anyone has any ideas...
22:27:35FromGitter<ynfle> @planetis, I don't get what the matrix is trying to do
22:27:43FromGitter<ynfle> *macro
22:27:55planetis[m]which one?
22:28:13*BitPuffin quit (Ping timeout: 260 seconds)
22:28:14*Prestige quit (Ping timeout: 260 seconds)
22:29:08*Prestige joined #nim
22:29:14FromGitter<ynfle> `buildAst`. What probelm does it try to solve
22:29:46planetis[m]buildAst, constructs an nim tree as described in https://nim-lang.org/docs/macros.html#the-ast-in-nim
22:29:47FromDiscord<haxscramper> Okay, I can do it like this
22:29:52FromDiscord<haxscramper> sent a code paste, see https://play.nim-lang.org/#ix=2ECJ
22:30:14FromDiscord<haxscramper> only because I have 1600+ lines of parser for nim type implementation itself
22:30:45FromDiscord<haxscramper> I't is overly generic, and I'm actually really impressed that it works at all honestly
22:31:28FromGitter<ynfle> I don't get how it differs from a regular macro. How is it more convenient?
22:32:02FromDiscord<haxscramper> ynifle: it is better form of `newTree`, with syntax closer to `dumpTree`
22:32:13*BitPuffin joined #nim
22:32:15FromDiscord<haxscramper> And it does not suffer from all quirks of `quote do`
22:32:47FromDiscord<For Your Health> @haxscramper Is that a macro of what I was talking about earlier?
22:32:57FromDiscord<Rebel> When are you going to write those yummy blog posts about the wonders of metaprogramming in Nim πŸ˜‹
22:33:50FromDiscord<haxscramper> @For Your Health yes, technically. To be more precise this a callback for macro framework that `nimtraits` is. But it does exactly what you described. But it will probably fail on case objects and more convoluted cases like `void` generic parameters for fields and so on
22:34:38FromGitter<ynfle> So in the example, tmp is the resulting ast, or each line of the expression is the AST?
22:35:05planetis[m]@ynfle you can define the tree declaratively
22:35:36planetis[m]its a common pattern with templates/macros returning a value
22:35:56FromGitter<ynfle> so just `tmp` is part of the matrix?
22:36:00FromDiscord<For Your Health> @haxscramper That is beyond my comprehension at the moment that's for sure.
22:36:02FromGitter<ynfle> *macro
22:36:20planetis[m]its like `(var tmp = call(), tmp)`
22:36:25FromDiscord<haxscramper> @Rebel me? Well I'm already working on pattern matching article, so ...
22:37:10*FromDiscord quit (Remote host closed the connection)
22:37:27*FromDiscord joined #nim
22:37:34FromDiscord<Rebel> https://media.discordapp.net/attachments/371759389889003532/778750768668475392/67efe01c62447cdeb57f61d3c3172aec.png
22:37:45planetis[m]template foo: untyped = (var tmp: sometype, dosomething(), tmp)
22:37:48FromDiscord<Rebel> You were also right btw
22:38:02FromDiscord<haxscramper> @For Your Health mine too to be honest. I'm literally feeling how my brain cools down after I wrote this abomination in like ~10 minutes
22:38:05FromDiscord<Rebel> (edit) "You were also right btw ... " added "the thing you said 2 months ago on 9/11 about exposing nim procs to nimscript and invoking it that way"
22:38:50FromGitter<ynfle> Right so it's basically a syntactic sugar for ⏎ ⏎ ```result = nnkstmtlist.newtree ⏎ result.add block: ⏎ ... ⏎ tmp``` [https://gitter.im/nim-lang/Nim?at=5fb5a27abf955735eb8a3ce5]
22:39:06*luis__ quit (Quit: luis__)
22:39:32FromDiscord<haxscramper> @Rebel - actually - https://gist.github.com/haxscramper/ad781ebd5a343b53197bf538a1252f83 - (note that it describes not-yet-merged-or-reviewed addition to fusion, so things might change).
22:39:42planetis[m]yes
22:40:41planetis[m]but not the code you wrote
22:41:14FromDiscord<haxscramper> But I want to put it together when ` fusion/matching` will be finally merged, so if you have any feedback (article, ideas, implementation or whatnot) it might be very useful.
22:41:17FromGitter<ynfle> I mean conceptually equivalent
22:45:46*FromDiscord quit (Remote host closed the connection)
22:46:01*FromDiscord joined #nim
22:46:26*FromDiscord quit (Remote host closed the connection)
22:46:41*FromDiscord joined #nim
22:49:45ForumUpdaterBotNew post on r/nim by shujidev: $ procedure not exported with float parameters, see https://www.reddit.com/r/nim/comments/jwqdeb/procedure_not_exported_with_float_parameters/
22:52:01planetis[m]@ynfle do you get why it's convenient?
22:52:12FromGitter<ynfle> Not really
22:52:34planetis[m]🀦
22:52:48FromGitter<ynfle> Sorry man
22:53:01*FromDiscord quit (Remote host closed the connection)
22:53:02planetis[m]then you can try writting a few macros without helpers and you'll get it :)
22:53:14FromGitter<ynfle> I have
22:53:16*FromDiscord joined #nim
22:53:28planetis[m]anything to share?
22:54:47planetis[m]goodnight all
22:54:57FromDiscord<Avatarfighter> gn!
22:55:10FromGitter<ynfle> GN
22:55:13FromGitter<ynfle> About what?
23:11:44*mwbrown quit (Ping timeout: 240 seconds)
23:11:47*lritter quit (Quit: Leaving)
23:12:04*idxu quit (Ping timeout: 240 seconds)
23:12:04*ldlework quit (Remote host closed the connection)
23:12:09*vicfred quit (Quit: Leaving)
23:12:13*idxu_ joined #nim
23:12:44*MTRNord[m] quit (Ping timeout: 240 seconds)
23:12:57*ldlework joined #nim
23:12:57*MTRNord[m] joined #nim
23:13:13*idxu_ is now known as idxu
23:13:16*vicfred joined #nim
23:14:20*vicfred quit (Max SendQ exceeded)
23:14:50*vicfred joined #nim
23:15:41*tane quit (Quit: Leaving)
23:18:19*mwbrown joined #nim
23:57:03FromDiscord<Varriount> Hm. In general, why do programming languages use "continue" instead of "skip" for the directive to skip an iteration of a loop?
23:57:19FromDiscord<Varriount> On the face of it, "continue" doesn't make much sense.
23:59:48FromGitter<ynfle> I think because it would mean continue looping not continue the iteration