<< 20-10-2020 >>

00:04:25*gmaggior quit (Ping timeout: 260 seconds)
00:06:42disrupteki always thought of it as a sugarfree sweetener.
00:15:07Yardanicobut it's sugar
00:15:10Yardanico🤔
00:15:33Yardanicois word "sugar" offensive to people with diabetes
00:16:20Prestigehaha
00:16:26*gmaggior joined #nim
00:19:07*ElegantBeef quit (Remote host closed the connection)
00:27:49FromDiscord<ElegantBeef> https://github.com/beefytech/Beef/issues/14
00:27:50disbotProject name and logo can hurt people's sensibilities
00:27:53FromDiscord<ElegantBeef> Beeflang has similar issues 😄
00:28:41disrupteki went through the same shit when i launched bigdickdigital.com.
00:28:45Yardanico@ElegantBeef HAHAHHA
00:28:48Yardanicothis is same as rubocop
00:28:51disruptekbuncha pussies.
00:28:58Yardanicoexactly
00:29:11Yardanicohttps://github.com/rubocop-hq/rubocop/issues/8091
00:29:12disbotIs it time to change the name?
00:29:13Yardanicohttps://metaredux.com/posts/2020/06/08/the-rubocop-name-drama-redux.html
00:29:15Yardanicohttps://timriley.info/writing/2020/06/08/rubyists-we-must-do-better/
00:29:30Yardanico@ElegantBeef ^
00:29:57FromDiscord<ElegantBeef> It's such a non solution and it hurts
00:30:27FromDiscord<ElegantBeef> Like if the project was name `racialSlur#2321` then yea obviously it should be changed cause you're actively being a cunt
00:31:45FromDiscord<krabbypatty> why can't I do `from std/with import with`
00:32:46Yardanicoyou can though?
00:33:00Yardanicoah nvm
00:33:12FromDiscord<krabbypatty> Error: undeclared identifier: 'with'
00:33:33Yardanicoyeah you can report it
00:33:48FromDiscord<krabbypatty> ok I'll open an issue
00:33:51Yardanicobut anyway you wouldn't see "from x import y" imports often
00:34:03FromDiscord<krabbypatty> I use those exclusively :p
00:34:05Yardanicobecause nim is statically compiled and all ambiguity is resolved at compile-time
00:34:18Yardanicoand any normal editor with a nim plugin supports go to definition/etc
00:34:34FromDiscord<krabbypatty> github doesn't
00:34:41Yardanicogithub isn't a good editor
00:34:48Yardanicobelieve it or not :)
00:34:52FromDiscord<krabbypatty> people use github for code reviews
00:34:57Yardanicothat's their fault :P
00:35:15Yardanicobut really you'll see that most nim programmers just know where stuff comes from
00:35:19Yardanicoby looking at code
00:35:37Yardanicoalso "from x import y" breaks ufcs
00:35:40FromDiscord<krabbypatty> 🤷‍♂️ I highly dislike it
00:35:42FromDiscord<krabbypatty> no it doesn't
00:35:44Yardanicoit does lol
00:35:46Yardanicoin full
00:35:47FromDiscord<krabbypatty> how so
00:36:17FromDiscord<krabbypatty> from sequtils import mapIt
00:36:19Yardanicofrom sequtils import mapIt; let a = @[1, 2, 3]; echo a.mapIt(it + 3)
00:36:21Yardanicosimplest example
00:36:21FromDiscord<krabbypatty> @[1,2,3].mapIt
00:36:24FromDiscord<krabbypatty> yeah
00:36:25FromDiscord<krabbypatty> that works
00:37:35Yardanicowell anyway you can use that syntax if you want
00:37:40Yardanicojust know that most nim programmers dislike it
00:37:44Yardanicoin general
00:37:46FromDiscord<krabbypatty> lol
00:37:50FromDiscord<krabbypatty> no new language I know of does this
00:37:56FromDiscord<krabbypatty> import is an antipattern everywhere
00:38:01Yardanicowhy should it be ?
00:38:03FromDiscord<ElegantBeef> Not many languages usu UFCS
00:38:05FromDiscord<ElegantBeef> (edit) "usu" => "use"
00:38:07Yardanicowe have proper export/import
00:38:18FromDiscord<krabbypatty> what does UFCS have to do with import
00:38:26Yardanico@krabbypatty please read https://narimiran.github.io/2019/07/01/nim-import.html
00:38:27FromDiscord<krabbypatty> I still use UFCS and I type out all my imporst explicitly
00:38:29Yardanicoplease
00:38:45Yardanicoyeah ufcs will work with "from x import y"
00:38:48Yardaniconot with "from x import nil"
00:38:53Yardanicothe same as "import x" in python
00:39:21FromDiscord<krabbypatty> i'm not advocating for the second
00:39:22YardanicoI just want to look at your code when you'll have tens of "from x import y, z, x" statements
00:39:24FromDiscord<ElegantBeef> C# is the same as nim in the regard of importing all exposed symbols
00:39:37FromDiscord<krabbypatty> Yes, I have tens of those
00:39:49Yardanicoyeah that makes me cry internally :)
00:39:52FromDiscord<krabbypatty> And those are trivial for tooling to add manially
00:39:55FromDiscord<krabbypatty> Automatically
00:40:07Yardanicosame goes for normal imports
00:40:20Yardanicobut it's far from trivial really
00:40:23Yardaniconim has macros/templates/etc
00:40:29FromDiscord<krabbypatty> So the same argument for "tooling can find definitions in your editor" goes to "tooling can add imports automatically based on call site"
00:40:40Yardanicobut it's not limited to "from x import y"
00:40:48Yardanicoit will work just fine for normal imports then
00:41:01Yardanicobecause the tooling will still to know all procs available in a module
00:41:09Yardanicoand just add "import module" if a proc is used
00:41:25FromDiscord<krabbypatty> I'm saying tooling could add `from sequtils import map`
00:41:26Yardanicoanyway, you're free to use "from x import y", snake_case, or something else, but I personally don't like that :)
00:41:32Yardanico@krabbypatty same for "import x"
00:41:35FromDiscord<krabbypatty> when you type map<TAB> in your editor
00:41:47FromDiscord<krabbypatty> typescript is a perfect example of this
00:41:51Yardanicosame goes for normal imports
00:41:55FromDiscord<krabbypatty> yes
00:41:55Yardanicothere would be no difference
00:41:59FromDiscord<krabbypatty> there is
00:42:02FromDiscord<krabbypatty> when you don't have tooling
00:42:05Yardanicoand please read the article I linked
00:42:06FromDiscord<krabbypatty> and for new developers
00:42:10FromDiscord<krabbypatty> I will
00:42:47Yardanicojust know that nim code usually doesn't have "from x import y"
00:42:52FromDiscord<krabbypatty> but when you don't have tooling, and that is much more common than you're claiming (e.g. code reviews on github/gitlab/bitbucket, using cat on a terminal, etc etc), the implicit imports are much more useful
00:43:01FromDiscord<krabbypatty> explicit
00:43:03YardanicoI'm doing code reviews for nim PRs just fine
00:43:10FromDiscord<krabbypatty> I'm not saying you aren't
00:43:11FromDiscord<krabbypatty> lol
00:43:25FromDiscord<krabbypatty> people use python with import just fine too
00:43:26Yardanico@krabbypatty if you are for "explicit is better than implicit", then nim isn't for you ;)
00:43:42Yardanicoof course it some cases it makes sense, but not in all
00:43:57FromDiscord<krabbypatty> hmm I don't see why it doesn't
00:44:00FromDiscord<krabbypatty> it's perfectly compatible with UFCS
00:44:06Yardanicoyeah, UFCS is about from x import nil
00:44:18Yardanico@krabbypatty because nim has a lot of features you might consider "implicit"
00:44:19Yardanicolike macros
00:44:34FromDiscord<krabbypatty> I don't consider macros implicit
00:44:41Yardanicoanyway, let's stop I guess, you are free to use any import syntax you want, I just explained that most nim code doesn't use that
00:44:50FromDiscord<krabbypatty> and implicit vs explicit isn't even my argument. I'm saying there's zero benefit to `import x` except typing less
00:45:01FromDiscord<krabbypatty> and tooling can automate the "typing less" part so that you don't type at all
00:45:10Yardanicobut we don't have that tooling :) and let's stop
00:47:27Yardanicoyou can also consider making a forum thread if you want to discuss this in more depth and with more information - https://forum.nim-lang.org/
00:47:44FromDiscord<krabbypatty> eh it's not like nim will change now
00:47:50Yardanicowell, it's not about changing
00:47:57Yardanicoit's about reasoning, you can add your arguments about tooling too
00:48:04Yardanicoconstructive criticism can be useful
00:48:28FromDiscord<krabbypatty> you're right
00:48:46FromDiscord<krabbypatty> thanks, I might create a forum thread
00:53:38*bunbunbunbunny joined #nim
00:55:54FromDiscord<ElegantBeef> I dont really like the importing of specific identifiers but to each their own
00:58:01*silvernode joined #nim
01:02:38FromDiscord<exelotl> Is that a thing with say, JS editor plugins? Like the editor can turn `import { foo } from './mymodule'` intob`import { foo, bar } from './mymodule'` the first time you try to use `bar` in the file
01:02:45FromDiscord<krabbypatty> Yea
01:02:55FromDiscord<krabbypatty> With typescript you can
01:05:57FromDiscord<exelotl> Ah I see, it makes sense for JS/TS, but maybe its challenging for Nim because templates and macros will mean that you're implicitly using a lot of symbols that you didn't type yourself? Although I'm aware that usually that's not actually an issue, like a template can access a private variable from the module where it came from... So maybe that's not it...
01:06:38FromDiscord<krabbypatty> sent a long message, see http://ix.io/2BjJ
01:06:59FromDiscord<ElegantBeef> What about proc name overlap?
01:07:07FromDiscord<ElegantBeef> Also what's the benefit of each proc getting imported instead of the full file
01:07:23FromDiscord<ElegantBeef> It creates noise, makes it more tedious and certainly requires tooling to keep up with
01:07:27FromDiscord<krabbypatty> Readability for beginners and places where you don't have tooling
01:07:45FromDiscord<krabbypatty> Whereas the only benefit I see for import x is typing less
01:07:53FromDiscord<ElegantBeef> Without tooling you have to manually scroll up and add the proc and module
01:08:05FromDiscord<ElegantBeef> Whereas just importing the module gives you all exported symbols
01:08:25FromDiscord<krabbypatty> Right, but that's basically typing less
01:09:04FromDiscord<krabbypatty> You're saving 5 seconds right now at the cost of not remembering where the proc comes from in the future
01:09:11FromDiscord<krabbypatty> Or someone on your team not knowing
01:11:28FromDiscord<krabbypatty> @exelotl I think you're right in the general case
01:11:29Yardanico"at the cost of not remembering where the proc comes from in the future" only in environments without proper tooling
01:11:58FromDiscord<krabbypatty> In practice the only implicit usage of stmbols I've run into is echo requiring $
01:11:59Yardanicoyes "github code review as you said", but I can't think of any other case
01:12:20FromDiscord<krabbypatty> Terminal, any code review, any slack snippet, any terminal, git diffs
01:12:31FromDiscord<krabbypatty> Lol typed terminal twice
01:12:57Yardanico"terminal" you can use vim/neovim in a terminal just fine
01:13:06Yardanico"any code review" you can review code in editors
01:13:24FromDiscord<ElegantBeef> The funny thing is to keep up with your explict imports you want tooling
01:13:36FromDiscord<krabbypatty> this is much less common than you're claiming
01:13:51Yardanicoand these issues are much less common than you're claiming
01:13:57Yardanicoabout "people not knowing there stuff comes from"
01:13:59FromDiscord<ElegantBeef> Without tooling you need to know where proc comes from
01:14:03FromDiscord<krabbypatty> Uhhh they haven't been for me
01:14:21FromDiscord<krabbypatty> @ElegantBeef what do you mean?
01:14:31FromDiscord<krabbypatty> You always have to know where it comes from
01:14:35Yardanicoidk, before nim I only knew python on a ~medium level and haven't had any issues becoming accustomed to the nim way at all
01:14:57Yardanicoand no I didn't use "from x import *" in python
01:15:00FromDiscord<ElegantBeef> No if i'm writting code in an editor without tooling, you write `a.Ident` you now need to import `ident` wherever it comes from
01:15:14FromDiscord<krabbypatty> Working in languages with import -type imports has always been a nightmare for me
01:15:22FromDiscord<krabbypatty> Nim is slightly better because its statically typed
01:16:14FromDiscord<krabbypatty> @ElegantBeef but you'd already have to `import` the correct package anyway
01:16:33FromDiscord<exelotl> Sidenote: I'm currently using Nim without tooling because Nimsuggest regularly gets stuck using 100% CPU. Its totally manageable for a solo project, but I'd like it to work again at some point lol
01:16:36FromDiscord<ElegantBeef> Yea and if the module is already imported you dont have to remember where it comes from, it's just there
01:16:45FromDiscord<krabbypatty> @exelotl sometimes mine does that too
01:16:51FromDiscord<krabbypatty> I just restart vim then lol
01:16:57FromDiscord<krabbypatty> but you can try switching to nim devel
01:17:06FromDiscord<exelotl> It got too frequent for me haha
01:18:03FromDiscord<krabbypatty> @ElegantBeef IMO it's a tradeoff between saving your time versus saving everyone else's (including yours) time in the future
01:18:47FromDiscord<ElegantBeef> Doesnt importing an entire module save everyones time, since you have everything exposed and never have to worry about importing a new module, in a tooless environment or a tooled one
01:18:57FromDiscord<krabbypatty> for writing sure
01:19:06FromDiscord<krabbypatty> for reading you can't claim it possibly saves time
01:19:25Yardanicoit's gonna be fun to see how you will use explicit import with libs like https://github.com/mratsim/Arraymancer :)
01:20:20FromDiscord<krabbypatty> I don't use that so I don't know why it'd be harder
01:20:51FromDiscord<krabbypatty> but it's not like you couldn't have exceptions
01:21:02leorize[m]custom operators
01:21:04FromDiscord<krabbypatty> like people in python using `from numpy import ` but importing explicitly for everthing else
01:21:17FromDiscord<ElegantBeef> Python also doesnt have export control
01:21:23FromDiscord<krabbypatty> yep
01:21:24FromDiscord<krabbypatty> which sucks
01:21:25FromDiscord<krabbypatty> lol
01:21:35FromDiscord<ElegantBeef> Nim does meaning you only get what's designed to be imported
01:21:44FromDiscord<krabbypatty> https://media.discordapp.net/attachments/371759389889003532/767920454164938782/unknown.png
01:21:46Yardanicoand there's also whole dead code elimination always
01:21:47FromDiscord<krabbypatty> I already import operators manually
01:21:48FromDiscord<ElegantBeef> You can argue that qualified imports do the same
01:21:49FromDiscord<krabbypatty> so I don't see the problem
01:21:51FromDiscord<krabbypatty> lol
01:21:56Yardanico@krabbypatty my eyes :((
01:22:01FromDiscord<ElegantBeef> So you can argue that you should only use qualified code
01:22:10leorize[m]I'd recommend just writing things the idiomatic way for a while to get a feel of it
01:22:17Yardanicoalso python differs from nim much in "from x import y"
01:22:26Yardanicosince nim doesn't have "classes" so you have to import operators manually like you did
01:22:29Yardanicoand procs operating on types
01:22:35FromDiscord<krabbypatty> why does the screenshot bother you?
01:22:44leorize[m]it's easy to dismiss something when you have a negative bias for it
01:23:13FromDiscord<krabbypatty> I just don't see the point.
01:23:17FromDiscord<krabbypatty> It saves me 5 seconds
01:23:39FromDiscord<ElegantBeef> Do you use `import x as nil` so you can increase so you know exactly where a proc comes from?
01:23:48FromDiscord<krabbypatty> I use it exactly once in my codebase
01:23:48FromDiscord<ElegantBeef> (edit) "Do you use `import x as nil` so you can increase ... so" added "readabillity"
01:23:56FromDiscord<krabbypatty> for `terminal`
01:24:03FromDiscord<ElegantBeef> So you arent consistant in your goal for readabillity imo
01:24:08FromDiscord<krabbypatty> what do you mean?
01:24:19FromDiscord<krabbypatty> I can always know where a proc comes from by reading the whole file
01:24:20Yardanicoyou have to scroll up to know where something comes from
01:24:27FromDiscord<krabbypatty> yes
01:24:29FromDiscord<krabbypatty> that's my goal
01:24:36FromDiscord<ElegantBeef> If you were so concerned with knowing where stuff comes from without tooling or extra reading you'd know where it comes from inline
01:24:40FromDiscord<krabbypatty> I can know statically, without tooling, with pure human reasoning where a proc comes from
01:25:01FromDiscord<ElegantBeef> What if two modules have 2 procs with the same name?
01:25:22FromDiscord<krabbypatty> you can still import both I think?
01:25:32leorize[m]look, just try the normal way for like a month or so
01:25:39FromDiscord<ElegantBeef> Yes but you dont have any clue which is being used without knowing the parameters
01:25:39leorize[m]this sort of thing is really subjective
01:25:40FromDiscord<krabbypatty> oh I get what you're saying
01:25:45leorize[m]you can bike shed about it forever
01:25:51FromDiscord<krabbypatty> you can still find out types statically
01:25:58FromDiscord<krabbypatty> in most cases
01:26:00FromDiscord<ElegantBeef> Not with type inference
01:26:58Yardanico@ElegantBeef well you *can* make it work if you make it a part of nimsuggest somehow
01:27:04FromDiscord<krabbypatty> you're right 🙂 if you don't know the return types of some procs that might happen
01:27:21FromDiscord<krabbypatty> I don't think that makes what I'm saying inconsitent
01:27:23FromDiscord<krabbypatty> inconsistent
01:27:43Yardanicomost of us just don't see how is it better than "import x" :)
01:27:54Yardanicobut anyway, a forum thread will have a longer discussion than a random one in a real-time chat
01:28:20FromDiscord<ElegantBeef> I also am a firm believe that tooling exists, use it
01:28:25FromDiscord<ElegantBeef> (edit) "believe" => "believer"
01:28:31Yardanicoyou missed if*
01:28:39*apahl quit (Ping timeout: 246 seconds)
01:28:42FromDiscord<ElegantBeef> nope
01:29:04FromDiscord<ElegantBeef> I believe that tooling exists, and you should use it 😛
01:29:22Yardanicoit doesn't
01:29:28YardanicoI mean the one krabby wants
01:29:34Yardanicoto automatically insert imports
01:29:53FromDiscord<krabbypatty> The difference between the tooling I'm suggesting is that it is only under your control - I can't control GitHub and how their code review is implemented, or people's environments to ensure that they always code review under VSCode with proper LSP support, or that they never read git logs in a terminal
01:30:18FromDiscord<krabbypatty> With the tooling I'm suggesting it's completely under my control, and people in environments without tooling can still collaborate effectively
01:30:21FromDiscord<ElegantBeef> Well you can use github's vscode
01:30:40*apahl joined #nim
01:30:42FromDiscord<krabbypatty> and I'm saying "people in environments without tooling" but honestly that's everyone 🙂
01:30:54FromDiscord<krabbypatty> I highly doubt you're always reading code in an editor with proper LSP support
01:31:03FromDiscord<ElegantBeef> If i'm modifying it i am
01:31:22Yardanico99% same here
01:31:31FromDiscord<krabbypatty> same
01:31:32Yardanico@krabbypatty nim has plugins for a lot of editors
01:31:36FromDiscord<krabbypatty> I'm talking about reading, not modifying
01:31:52Yardanicowell, I read mostly in the editor too
01:31:55FromDiscord<ElegantBeef> I'm not going to go with code introspection without goto definition
01:32:05Yardanicosometimes from the phone on github, and somehow I still manage to understand what's going on in the code
01:32:11Yardanicoeven if I don't know where that exact proc comes from
01:32:14Yardanicoyou know, context..
01:32:34FromDiscord<ElegantBeef> C# doesnt have explict proc imports as the convention either and it's fine
01:32:43Yardanicojust be prepared that looking at almost any nim project will be a nightmare for you then :)
01:32:45FromDiscord<krabbypatty> ¯\_(ツ)_/¯
01:32:48FromDiscord<krabbypatty> there's no point discussing
01:32:51FromDiscord<ElegantBeef> You say `using Namespace` and then get all tokens that are exposed from there
01:32:54FromDiscord<krabbypatty> most people in the nim community disagree with me
01:32:58FromDiscord<ElegantBeef> It's completely subjective
01:33:03Yardanicowell, you can put it on the forum, some people are not here
01:33:07FromDiscord<ElegantBeef> Yea
01:33:09Yardanicomaybe people on the forum will make better arguments for/against it :)
01:33:12FromDiscord<krabbypatty> but I think it's one of the few bad design decisions that nim made
01:33:13FromDiscord<ElegantBeef> Also some people are not us
01:33:16FromDiscord<krabbypatty> and no other modern language does
01:33:19FromDiscord<ElegantBeef> C#!
01:33:34FromDiscord<ElegantBeef> Unless C# isnt modern anymore 😄
01:33:38FromDiscord<krabbypatty> it isn't
01:33:45FromDiscord<ElegantBeef> Doesnt rust do the same with namespaces?
01:34:02FromDiscord<exelotl> I totally see the merit in krab's approach, even though its not for me, the only criticisms I have are "if you're already familiar with the project then it's just ugly noise" and "that's not how we do things around here"
01:34:04FromDiscord<krabbypatty> I mean it has modern features, but I'm saying languages created since ~2010 have mostly avoided that mistake
01:34:14Yardanico"mistake"
01:34:14Yardanicomeh
01:34:22YardanicoD does the same btw
01:34:23FromDiscord<ElegantBeef> Nim isnt modern then by your own definition 😛
01:34:27Yardanicoyeah that too
01:34:45Yardanicosame goes for rust
01:35:08FromDiscord<krabbypatty> lol that's exactly what I'm saying, I think Nim is great but that's one of the few design decisions that I disagree with. Most other modern languages (D and C# aren't modern, they might be good languages but they aren't modern) don't do this
01:35:14FromDiscord<ElegantBeef> I understand that it could be benefical in some specific cases, but so would qualified imports, based of similar reasoning
01:35:25FromDiscord<ElegantBeef> (edit) "of" => "off"
01:35:28Yardanico@krabbypatty "modern" itself is subjective :)
01:35:34FromDiscord<krabbypatty> rust doesn't do this I think, not by default
01:35:40FromDiscord<ElegantBeef> But yea make a forum post and see what people say!
01:35:43FromDiscord<krabbypatty> you can `use a::`
01:35:48Yardanicowell, people use "use" usually
01:35:51FromDiscord<ElegantBeef> I'd like name spaces though
01:35:52Yardanicous
01:36:03FromDiscord<krabbypatty> yeah but with use I think you know what you're getting?
01:36:21FromDiscord<krabbypatty> like if you do `use std::env`
01:36:22Yardanicosame with import?
01:36:25FromDiscord<krabbypatty> you have to call `env::args`
01:36:26Yardanicoyou know what you're getting
01:36:42Yardanicoprocs in nim modules are not just randomly thrown together
01:36:47Yardanico"tables" module is for tables
01:36:51Yardanicofor any operations involving them
01:36:55Yardanico"strutils" is for string utilities
01:36:56Yardanicoetc
01:37:02Yardanicoit all makes sense
01:37:09FromDiscord<krabbypatty> I meant that you know by looking at the name
01:37:18FromDiscord<krabbypatty> it's not implicit like `import x` in nim
01:37:26Yardanicoyeah, I'm talking about a different thing
01:37:48Yardanicobut still, if you see "import tables" and then see mytable["myname"] - it's only logical that this comes from the tables module
01:37:59Yardanicostrutils/sequtils/os/asyncdispatch/etc
01:38:35*Tanger joined #nim
01:38:38Yardanicosee https://forum.nim-lang.org/t/6728#41767
01:38:57Yardanicofor one forum thread about that
01:39:18Yardanicoit's about fully explicit imports though
01:39:27FromDiscord<krabbypatty> the fact that this forum thread exists kinda proves my point about beginners
01:39:42Yardanicodoes it?
01:39:56FromDiscord<ElegantBeef> Beginners coming from languages that arent
01:39:59FromDiscord<ElegantBeef> (edit) "Beginners coming from languages that arent ... " added "nim"
01:40:15FromDiscord<krabbypatty> That's the definition of beginner 😛
01:40:25YardanicoI understand your point, but we really rarely hear that someone dislikes these imports
01:40:29FromDiscord<ElegantBeef> Well they have a preconcieved notion on how a language should work
01:40:34Yardanicoyeah survivorship bias whatever
01:40:41Yardanico@ElegantBeef exactly
01:40:44FromDiscord<krabbypatty> I interpreted that differently
01:40:59FromDiscord<krabbypatty> > Where does DF comes from? (I know it's defined in nimdata, but the unqualified imports don't tell me...) I'm using Emacs with nim-mode, however I couldn't figure out how nim-mode can tell me where DF comes from.
01:40:59Yardanicowhen you're programming, you develop your own "taste"
01:41:03FromDiscord<krabbypatty> > So I'm a bit at a loss... I'm sure these are typical beginner's troubles and they'll evaporated with more experience, but at the moment I can't see how...
01:41:38FromDiscord<ElegantBeef> > Hey @aEverr, thanks for this. Super cool.↵> ↵> I was not aware how general in Nim the loose coupling of functions and objects/variables is - and that it is called Uniform Function Call Syntax.
01:41:55Yardanico@ElegantBeef well we're talking about a bit different thing
01:42:02FromDiscord<ElegantBeef> Yea now
01:42:03Yardanicobut yes, imports like that in Nim make much less sense
01:42:12Yardanicobecause nim has "loose coupling of objects"
01:42:16Yardanicoyou don't have "classes"
01:42:19Yardanicoyou have objects, procs, etc
01:42:39FromDiscord<krabbypatty> yes `import nil` in most cases doesn't make senses
01:42:49FromDiscord<ElegantBeef> We could always ask the author of that post they're in the discord 😄
01:42:50FromDiscord<krabbypatty> in very few cases I find it useful tho
01:43:21FromDiscord<krabbypatty> https://nim-lang.org/
01:43:31Yardanico?
01:44:27disrupteklook, i don't know how to say this.
01:44:38disrupteksometimes the end isn't the beginning of the end, or the end of the beginning.
01:44:42disruptekit's just the fucking end.
01:44:53FromDiscord<ElegantBeef> So poetic
01:45:01FromDiscord<krabbypatty> true
01:46:14disruptekin future, procs will follow /their/ types as far as imports go.
01:46:39FromDiscord<krabbypatty> what do you mean?
01:46:57*sagax quit (Quit: Konversation terminated!)
01:47:06disruptekif you get a table as a return value from somewhere, you'll be able to use table procs against it without a separate import.
01:47:20FromDiscord<krabbypatty> huh
01:47:40Yardanicodisruptek: do you mind me making a repo of your quotes
01:47:49FromDiscord<krabbypatty> that's even worse 😦
01:49:00disruptekmaking a repo about shit i've said says more about you than it does me.
01:49:28Yardanico😘
01:49:44Yardanicois that a "yes"
01:49:44FromDiscord<krabbypatty> > if you get a table as a return value from somewhere, you'll be able to use table procs against it without a separate import.
01:49:46FromDiscord<krabbypatty> is there an rfc for this
01:49:59Yardanicono(t yet? idk)
01:50:46disruptekif you want an example of a nim-2 feature, this is one.
01:51:28FromDiscord<krabbypatty> what's the reasoning for it
01:51:36FromDiscord<krabbypatty> sounds like a very bad idea
01:51:46disruptektypes aren't that useful without procs.
01:52:06FromDiscord<krabbypatty> I agree
01:52:07*kenran joined #nim
01:53:42disruptekif i don't use some types from tables, i don't want to have to export all of tables just so you get the procs you need.
01:53:48FromDiscord<krabbypatty> wait
01:53:52FromDiscord<krabbypatty> are you talking about something like
01:54:01FromDiscord<krabbypatty> from tables import Table
01:54:09disruptekon the other hand, i don't want to have to export individual procs, guessing about what exists or what you might want.
01:54:12FromDiscord<krabbypatty> this imports automatically all the procs that operate on `Table` as their first arg?
01:54:40disruptekit's more like my example, where you import a proc with a return value that is defined outside your module.
01:54:53disruptektoday, you can't do anything with it.
01:55:04disruptekeventually, it will arrive more fully-formed.
01:55:38*Pisuke quit (Ping timeout: 272 seconds)
01:55:52FromDiscord<krabbypatty> > on the other hand, i don't want to have to export individual procs, guessing about what exists or what you might want.
01:56:04FromDiscord<krabbypatty> I don't get this
01:56:12FromDiscord<krabbypatty> will explicit exports not be a thing anymore?
01:56:23disruptekthey will.
01:56:31disruptekbut there will be implicit imports, too.
01:56:59disruptekanyway, it's just a goal to polish out a small wart.
01:57:04*kenran quit (Ping timeout: 246 seconds)
01:57:05*Pisuke joined #nim
01:57:28FromDiscord<krabbypatty> so what's the small wart? types not being useful by themselves?
01:57:39disruptekyes.
01:57:52FromDiscord<krabbypatty> I agree that might be an issue, I think that solution is am uch bigger wart though
01:58:10FromDiscord<ElegantBeef> What's the way to check if a generic is not a type `when not T is A`?
01:58:12disruptekwell, there is plenty of time to object and discuss alternatives.
01:58:17disruptekisnot
01:58:30FromDiscord<krabbypatty> so the issue is that in languages like rust, python, JS etc when you import a type, you're importing all their methods along with the import
01:58:52FromDiscord<krabbypatty> e.g. when you do use std::collection::HashMap` you're bringing HashMap::new() , .isnert, etc too
01:59:11FromDiscord<krabbypatty> You could just have nim do that
01:59:20disruptekthat's kinda the idea.
01:59:22FromDiscord<krabbypatty> from tables import Table would bring every proc that operates on a table as its first argument
01:59:26FromDiscord<krabbypatty> but you're saying that
01:59:33FromDiscord<krabbypatty> I wouldn't even need to type out that import line
02:00:01disruptekwell, i dunno. an explicit import might still be explicitly limiting.
02:00:05disruptekafter all, it's explicit.
02:00:18disruptekthat's why i used a different example.
02:00:26disrupteki'm trying to emphasize the implicit nature.
02:00:53FromDiscord<krabbypatty> seems like I'd end up with files with 0 imports
02:00:56FromDiscord<krabbypatty> not knowing where anything comes from
02:01:13disruptekhow do you figure?
02:01:46disruptekyou can't do much with tables without importing tables, for example.
02:02:26disruptekbut if you use a lib that gives you a table-like object, you shouldn't have to intuit that you need a particular import to use that object.
02:03:04disruptekthat the supplier should be able to change the implementation of that object without leaving you with broken imports.
02:03:14FromDiscord<krabbypatty> so if I had a table from string to seq[something]
02:03:28FromDiscord<krabbypatty> and I did table["a"]
02:03:42FromDiscord<krabbypatty> did I just import all of sequtils?
02:03:53FromDiscord<ElegantBeef> Why would it?
02:04:01Yardanicoit's all just an unwritten rfc yet
02:04:01disruptekwell, most seq operations are defined in system.
02:04:04Yardaniconot even discussed
02:04:06Yardanico@krabbypatty
02:04:06PrestigeWhat is {lvalue}? Seeing it in a c wrapper, haven't found details really
02:04:06FromDiscord<ElegantBeef> Seqs can be used without sequtils
02:04:08Yardanicodon't worry
02:04:14YardanicoPrestige: assignment target/location
02:04:21Yardanicobut need more context
02:04:41FromDiscord<notchris> Hello all! I'm trying to figure out how a certain type works. The procedure says the second value is of `type GlslVec2 = Vector2f`
02:04:45Prestigethis: proc setVec2UniformArray*(shader: Shader, name: cstring, vectorArray: (var GlslVec2){lvalue}, length: int) {.cdecl, importc: "sfShader_setVec2UniformArray".}
02:05:03PrestigeIt's about notchris' question
02:05:04disruptekah, it's an optimization.
02:05:04FromDiscord<notchris> TY!
02:05:30YardanicoPrestige: AST-based overloading
02:05:42FromDiscord<krabbypatty> I get that it's unwritten, I'm just discussing it
02:05:43Yardanicohttps://nim-lang.org/docs/manual_experimental.html#ast-based-overloading
02:05:54PrestigeThanks
02:05:57Yardanicohaven't seen lvalue even once though
02:05:57FromDiscord<krabbypatty> but if it doesn't import sequtils then it sounds inconsistent
02:06:01Yardanicoguess it works as well
02:06:08disruptekhow so?
02:06:15FromDiscord<krabbypatty> so it would jus import everything in the file that the type is defined?
02:06:18FromDiscord<notchris> It's odd because I was expecting it to be an array of vec2s
02:06:19YardanicoPrestige: you can find all constraints in https://nim-lang.org/docs/manual_experimental.html#term-rewriting-macros-parameter-constraints
02:06:28Yardanicothey all work for ast based overloading as well
02:06:33Prestigeawesome
02:06:37Yardanico"The matching AST must be an lvalue."
02:06:50disruptekno, it would only introduce operations for the type.
02:07:10disrupteklook, don't let it concern you. this is probably years away.
02:07:16FromDiscord<krabbypatty> what does that mean? import everything in the file that the type is defined that has that type as its first parameter?
02:07:16FromDiscord<krabbypatty> lol ok
02:07:27disruptekno, it would only introduce operations for the type.
02:08:07FromDiscord<krabbypatty> I'll wait for the rfc then 😛
02:21:01*opal quit (Remote host closed the connection)
02:22:14*opal joined #nim
02:34:43*CcxWrk quit (Remote host closed the connection)
02:36:12*muffindrake quit (Ping timeout: 246 seconds)
02:38:35*muffindrake joined #nim
02:39:01*CcxWrk joined #nim
03:02:51FromDiscord<shassard> has anyone else noticed nim 1.4.0 leaving pkgs folders all over your hard drive (on linux)? this seems to happen if I run the nim command in any directory, even empty ones.
03:03:33FromDiscord<flywind> can reproduce in windows
03:04:01FromDiscord<ElegantBeef> what command just `nim`?
03:04:03FromDiscord<shassard> any idea if a bug was reported? I was trying to search in github issues but that pulls up too many unrelated issues.
03:04:04FromDiscord<flywind> https://media.discordapp.net/attachments/371759389889003532/767946203077672981/unknown.png
03:04:18FromDiscord<shassard> yeah, just plain old nim without args does it.
03:04:25FromDiscord<ElegantBeef> Not an issue here
03:04:29disruptekfunny.
03:05:49FromDiscord<shassard> I guess I'll try my luck and file a github issue
03:08:34*bunbunbunbunny quit (Ping timeout: 260 seconds)
03:21:19PrestigeWhere did you see them created?
03:22:44FromDiscord<shassard> They're created in any folder where the nim executable is run.
03:22:51FromDiscord<shassard> https://github.com/nim-lang/Nim/issues/15648
03:22:53disbotnim creates empty pkgs folders in the pwd when run ; snippet at 12https://play.nim-lang.org/#ix=2Bk7
03:28:19PrestigeHmm not happening on my system
03:29:53FromDiscord<shashlick> It's a choosenim bug
03:30:23FromDiscord<shashlick> https://github.com/dom96/choosenim/pull/235
03:30:24disbotFix nimble issue 864
03:31:04FromDiscord<shassard> good find!
03:31:07FromDiscord<shashlick> Use the older choosenim and switch versions
03:31:29FromDiscord<shashlick> It will recreate the shims and issue goes away
03:31:40FromDiscord<shashlick> Will post fix tomorrow hopefully
03:41:25*astronavt quit (Ping timeout: 240 seconds)
03:45:25*tiorock joined #nim
03:45:25*tiorock quit (Changing host)
03:45:25*tiorock joined #nim
03:45:25*rockcavera quit (Killed (tolkien.freenode.net (Nickname regained by services)))
03:45:25*tiorock is now known as rockcavera
03:46:27*rockcavera quit (Killed (orwell.freenode.net (Nickname regained by services)))
03:46:28*rockcavera joined #nim
03:52:12*silvernode quit (Quit: Leaving)
03:53:02*kenran joined #nim
03:58:13*kenran quit (Ping timeout: 265 seconds)
04:05:49*mbomba joined #nim
04:06:02*supakeen quit (Quit: WeeChat 2.9)
04:06:43*supakeen joined #nim
04:06:55*Tanger is now known as mister_dotnet
04:08:16*mbomba quit (Quit: WeeChat 2.9)
04:08:50*mbomba joined #nim
04:09:09*mbomba left #nim (#nim)
04:15:32*antranigv quit (Ping timeout: 256 seconds)
04:15:57*antranigv joined #nim
04:16:08*bunbunbunbunny joined #nim
04:18:47*rockcavera quit (Remote host closed the connection)
04:21:34*mbomba joined #nim
04:35:04*mbomba quit (Quit: WeeChat 2.9)
04:57:03*apahl quit (Ping timeout: 260 seconds)
04:57:59*apahl joined #nim
05:22:44*user0 joined #nim
05:32:38*solitudesf joined #nim
05:32:38*sealmove quit (Read error: Connection reset by peer)
05:47:38mister_dotnetWhat's happened to the nim docs?
05:47:52*mister_dotnet is now known as TangersTongle
05:47:58mipriwhat about them?
05:48:34TangersTongleThey've finally sorted procs into like groups eh?
05:49:01TangersTongleCouldn't make the proc list alphabetical though eh?
05:49:45TangersTongleBut the html is all borked
05:49:51mipriborked how?
05:50:34miprilooks like the procs are in source order
05:51:03TangersTonglehttps://imgur.com/a/Y4VJf9D
05:51:35TangersTongleIt's great, don't get me wrong
05:51:52miprieh I wouldn't defend that shit, I just don't see it
05:52:07mipriah... there it is actually.
05:53:14mipriHTML pages never did this when only tables were used for layout :p
05:53:53*kenran joined #nim
05:56:54TangersTongleHaha
05:58:26*narimiran joined #nim
05:58:55*kenran quit (Ping timeout: 246 seconds)
06:00:00*filcuc joined #nim
06:04:57*oculux quit (Quit: blah)
06:05:17*oculux joined #nim
06:16:30*Vladar joined #nim
06:17:14PrestigeAnother random thing... Is it just me, or is the dark mode toggle not there on mobile?
06:18:04FromDiscord<Rika> it wasnt there before
06:18:43PrestigeYeah I meant in general, not just recently
06:23:40*PMunch joined #nim
06:23:49FromDiscord<Rika> ah i see
06:24:00FromDiscord<Rika> i dont know why nim docs hide the sidebar in mobile
06:24:39PrestigeIt would be fine if we had a way to hide and expand the sidebar
06:28:07PMunchWhat is up with the new sidebar, so much less readable..
06:28:40PMunchNot to mention it is now about twice as long..
06:30:10Zevvi like it
06:30:25Zevvwell, not the fact that its twice as long.
06:30:53Zevvbut i do like the fact that there is not 12 times `[]` in some module and I have to click'em all to find the right signature
06:31:04narimiranPMunch, Zevv: devel docs have wrap, stable has the old cached version (already fixed, but not seen just yet)
06:32:24narimiranPrestige: yeah, we need that toggle; until it is here, it is just hidden
06:33:20PrestigeI read docs with my left eye and irc with my right eye, on mobile
06:33:26PrestigeIt's a party
06:37:29*filcuc quit (Quit: KVIrc 5.0.0 Aria http://www.kvirc.net/)
06:37:52*filcuc joined #nim
06:44:15PMunchnarimiran, wrap?
06:44:32*gmaggior quit (Quit: Leaving)
06:44:42PMunchOh, fixing that wrapping error :P
06:45:08*nc-x joined #nim
06:45:56narimiranPMunch: see https://nim-lang.github.io/Nim/lib.html for some examples of it
06:46:17narimiran(yeah, i know it is (sometimes) ugly, but there are no spaces in the names where you could make a line break)
06:46:37PMunchAnd Zevv, I would rather have only one of each symbol, and then have to scroll to the correct one (or have a small section with the signatures when there's more than one so you click the sidebar to go to the section and then either scroll or click the one you needed)
06:47:20PMunchnarimiran, well you could break on commas at least..
06:48:07PMunchAnd I see now that part of the problem I have with the new docs is that the colour of the sections and procedures are way too close..
06:48:12*nc-x quit (Remote host closed the connection)
06:50:26narimiranPMunch: i played with `line-break`parameter. it allows for several options, and only the current one does any line breaking
06:51:29*xet7 quit (Quit: Leaving)
06:51:57PMunchAh, I see, but aren't there a zero-width character that enables line-breaks?
06:52:56PMunchAh yes, this thing: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/wbr
06:53:37*xet7 joined #nim
06:54:10PMunchOr U+200B ZERO-WIDTH SPACE
06:55:47*krux02 quit (Remote host closed the connection)
06:56:06*arecacea1 quit (Remote host closed the connection)
06:56:49*arecacea1 joined #nim
07:00:15narimiraninteresting idea!
07:01:43FromDiscord<nikki> assigning to stuff in result is such a great way to deal with nrvo and constructors
07:05:50Araqwow thanks. I never heard anyone else to give it credit :-)
07:06:40ForumUpdaterBotNew thread by Anta40: Nim on MacOS: annoying macos cannot verify...., see https://forum.nim-lang.org/t/6959
07:06:42PMunchEy, I've said multiple times that I like result :)
07:07:01FromDiscord<ElegantBeef> I've never said it cause much like result i thought it was implicit
07:07:03Araqyes but you didn't make the connection to NRVO and constructors ;-)
07:07:39Araqbut yeah, sorry, I do know 'result' has its fans (me included)
07:08:03FromDiscord<ElegantBeef> If you're fishing for praise... uhhh the VM is cool 😛
07:08:33PMunchWell nrvo is part of the reason I like it :) That and the fact I don't have to name my returns :P
07:10:14FromDiscord<ElegantBeef> So current state pmunch is i'm using json for all nimscript -> nim communication and i dont support all types yet
07:10:26FromDiscord<ElegantBeef> But i've got some lovely demos out of it
07:11:17FromDiscord<ElegantBeef> Also the VM evaluating time is only slow in debug, in release it's almost instant
07:11:44FromDiscord<nikki> it's cool for by-value operators too
07:11:47FromDiscord<nikki> like vector addition
07:11:59PMunch@ElegantBeef, oh nice!
07:12:33FromDiscord<nikki> (result var i mean) which is still kinda about construction. C math apis would have out-params for this reason
07:12:33FromDiscord<ElegantBeef> If you care to see the speed! <https://streamable.com/90r58l>
07:13:42FromDiscord<ElegantBeef> A tad disappointed i cant use a binary stream for VM -> nim interop
07:14:37PMunchOoh, that is nice indeed
07:15:06PMunchWhy can't you do that?
07:15:29FromDiscord<ElegantBeef> There isnt a way in the vm to convert to bytes
07:15:35PMunchAnd I wonder how much perf you're missing by going via JSON
07:15:53FromDiscord<ElegantBeef> Cant cast to an `UncheckedArray[byte]` or `copyMem`
07:16:03PMunchAh right, I guess there would be a way to do it though, somehow..
07:16:42FromDiscord<ElegantBeef> Well i imagine it doesnt matter too much, but yea json can serialize unnamed tuples so i have to manually handle those and there are some other limitations
07:16:54FromDiscord<ElegantBeef> cant
07:18:00FromDiscord<ElegantBeef> I tried it on fidget(not much as it uses templates) and it also worked easily there for the procs, so other than a few edge cases it's pretty good all around
07:18:25FromDiscord<ElegantBeef> I'd say i'm slightly concerned about the json performance impact, but if performance is an issue "Just fucking compile the code" 😄
07:19:29PMunchHaha, fair enough :P
07:19:49PMunchBasically you just want to do non-performance critical stuff in NimScript
07:20:06FromDiscord<ElegantBeef> Or use it for rapid prototyping
07:20:15*jwm224 quit (Ping timeout: 265 seconds)
07:20:29FromDiscord<ElegantBeef> Since even with HCR your going to be slower than the VM revaluating
07:21:47FromDiscord<ElegantBeef> Also do you know if implementRoutine overrides the functionality or adds to the functionality of the proc?
07:22:04PMunchOverrides
07:22:12*jwm224 joined #nim
07:22:16FromDiscord<ElegantBeef> Cause i implemented name mangling for the non user facing procs, then realized i never looked into that
07:23:48PMunchThere are parts of the stdlib that are overridden by implementRoutine when it's run under NimScript
07:24:02FromDiscord<ElegantBeef> `circfillCompcxcyrrPt` that's a totally unique name that is highly unlikely to conflict, yes 😄
07:24:04PMunchAnd there are some that just have {.error.} in them IIRC
07:25:08*bunbunbunbunny quit (Ping timeout: 256 seconds)
07:25:57*bung joined #nim
07:25:58FromDiscord<ElegantBeef> Mangling is due to using a single string for parameters, since all the nim facing procs are turned into `proc procName(str: string): string`, if you were curious
07:26:33FromDiscord<ElegantBeef> Now what's the eta on Pimo... 2132?
07:40:05*lbart quit (Ping timeout: 240 seconds)
07:45:03*opal quit (Ping timeout: 240 seconds)
07:47:37*opal joined #nim
07:48:09*lbart joined #nim
07:49:46PMunchAaah, that makes sense @Elegant
07:49:55PMunchAnd I hope to have it done by 2030 :P
07:50:07*Kiloneie joined #nim
07:50:24PMunchI mean I have a prototype that works, but it's nowhere close to good enough to use
07:50:53*bunbunbunbunny joined #nim
07:51:40FromDiscord<ElegantBeef> Ah
07:51:56FromDiscord<haxscramper> I think I've seen high-level overview of nim macro expansion loop (how macros are repeatedly expanded etc.), but I cannot find it in manualy now
07:52:13FromDiscord<haxscramper> nor in the compiler internals, tutorials etc.
07:52:21FromDiscord<ElegantBeef> I'm overly happy to have a way to script nim regardless, but will be happy to see someone other than me use it
07:52:33FromDiscord<haxscramper> I'm basically looking for higher-level overview of semantic pass in compiler
07:52:48PMunchYeah I plan to do something cool with it (that will tie into PiMO)
07:54:03FromDiscord<ElegantBeef> I wish i could help hax i'm uncertain what you even mean, so i probably dont know
07:54:47*kenran joined #nim
07:55:02FromDiscord<ElegantBeef> Just remembered my least favourite thing, declaration order matters you have to declare all your exported procs then `import nimscripter` do to that const table
07:56:00*hnOsmium0001 quit (Quit: Connection closed for inactivity)
07:56:37*bunbunbunbunny quit (Ping timeout: 264 seconds)
07:57:17FromDiscord<ElegantBeef> (edit) Just remembered my least favourite thing, declaration order matters you have to declare all your exported procs then `import nimscripter` due to that const table
07:59:25*kenran quit (Ping timeout: 240 seconds)
08:05:45Araqthe plan is "IC first, then weaken the declaration order requirements"
08:06:12*bunbunbunbunny joined #nim
08:07:13*bunbunbunbunny quit (Client Quit)
08:18:27FromDiscord<ElegantBeef> Ah, my dumb hypothetical solution having 0 idea about anything, was just have a "late bind" marker which means it'd evaluate after all files were evaluate, but "Better to remain silent and be thought a fool than to speak and to remove all doubt," 😄
08:51:18Araqso why are you on IRC then? :P
08:56:37bunglet decompressed = decompress(cast[seq[byte]](result)) result = cast[seq[char]](result)
08:56:47bungam I casting wrong ?
08:57:21bungnvm , wrong pass
09:18:39PMunchHmm, is there a way to get the input the same way as argv formats it?
09:19:08PMunchcommandLineParams seems to split the parameters in an unexpected way for my use-case
09:21:25PMunchOh, never mind
09:21:38PMunchIt was justbecause running it through "nimble run" that it messed up
09:24:01*TangersTongle quit (Quit: Leaving)
09:24:51*leorize[m] quit (Quit: killed)
09:24:52*lnxw37d4 quit (Quit: killed)
09:24:52*k0mpjut0r quit (Quit: killed)
09:24:52*hnOsmium0001[m] quit (Quit: killed)
09:24:52*jaens[m] quit (Quit: killed)
09:24:52*GitterIntegratio quit (Quit: killed)
09:24:53*leorize[m]1 quit (Quit: killed)
09:24:53*reversem3 quit (Quit: killed)
09:24:53*inamiyar[m] quit (Quit: killed)
09:24:55*BitPuffin quit (Quit: killed)
09:24:59*unclechu quit (Quit: killed)
09:24:59*Helios quit (Quit: killed)
09:25:03*VijayMarupudi[m] quit (Quit: killed)
09:25:05*nikki93[m] quit (Quit: killed)
09:25:05*themoon[m] quit (Quit: killed)
09:25:06*stisa[m] quit (Quit: killed)
09:25:06*MTRNord[m] quit (Quit: killed)
09:25:09*ee7[m] quit (Quit: killed)
09:25:10*planetis[m] quit (Quit: killed)
09:25:11*solitudesf1 quit (Quit: killed)
09:25:11*silvernode[m] quit (Quit: killed)
09:25:17*guelosk[m] quit (Quit: killed)
09:25:18*brainbomb[m] quit (Quit: killed)
09:30:07*kenran joined #nim
09:34:38*unclechu joined #nim
09:37:20*lbart quit (Ping timeout: 272 seconds)
09:39:12*sagax joined #nim
09:43:03*NimBot joined #nim
09:44:16*lbart joined #nim
09:44:16*lbart quit (Changing host)
09:44:16*lbart joined #nim
09:48:21*lbart quit (Read error: Connection reset by peer)
09:49:31*lbart joined #nim
09:49:31*lbart quit (Changing host)
09:49:31*lbart joined #nim
09:59:03*brainbomb[m] joined #nim
09:59:03*BitPuffin joined #nim
09:59:03*inamiyar[m] joined #nim
09:59:03*GitterIntegratio joined #nim
09:59:03*k0mpjut0r joined #nim
09:59:03*leorize[m] joined #nim
09:59:03*Helios joined #nim
09:59:03*planetis[m] joined #nim
09:59:04*leorize[m]1 joined #nim
09:59:04*MTRNord[m] joined #nim
09:59:04*reversem3 joined #nim
09:59:04*jaens[m] joined #nim
09:59:04*hnOsmium0001[m] joined #nim
09:59:04*stisa[m] joined #nim
09:59:04*lnxw37d4 joined #nim
09:59:04*themoon[m] joined #nim
09:59:09*guelosk[m] joined #nim
09:59:10*silvernode[m] joined #nim
09:59:10*solitudesf1 joined #nim
09:59:10*nikki93[m] joined #nim
09:59:10*VijayMarupudi[m] joined #nim
09:59:12*ee7[m] joined #nim
10:03:45bungcan I avoiding copy `pkt1 = pkt[pos ..< pos + pkt1Len]` they both are seq[char]
10:06:05*kenran quit (Quit: leaving)
10:15:08*Kiloneie quit (Quit: Leaving)
10:23:48*lritter joined #nim
10:55:20*Zevv quit (Ping timeout: 265 seconds)
10:56:47*jaens[m] left #nim ("Kicked by @appservice-irc:matrix.org : Idle for 30+ days")
11:00:36*Zevv joined #nim
11:13:24Araqwith toOpenArray and experimental view types
11:14:31bunghow I store that after toOpenArray
11:15:55bungoh , I see with that experimental enabled it could be declare as variable type
11:19:05Araqbut beware, view types are still so broken we couldn't announce them for 1.4 :-(
11:20:34FromGitter<jrfondren> oh yeah, just got a codegen error
11:24:40bunghmm,the error message not well,Error: cannot borrow from , it is not a path expression; see https://nim-lang.github.io/Nim/manual_experimental.html#view-types-algorithm-path-expressions for details
11:26:52*idf quit (Ping timeout: 246 seconds)
11:28:29FromGitter<ynfle> (https://files.gitter.im/5602f03e0fc9f982beb19f61/yziy/Screen-Shot-2020-10-20-at-2.28.15-PM.png)
11:28:54FromGitter<ynfle> Docs are broken on https://nim-lang.org/docs/unittest.html
11:28:54*lbart quit (Read error: No route to host)
11:29:25miprithat's known, and I think fixed in devel
11:29:45FromGitter<ynfle> > Tests can be nested, however, failure of a nested test will not mark the parent test as failed. Setup and teardown are inherited. Setup can be overridden locally. ⏎ ⏎ How can I override `setup` locally?
11:30:16*lbart joined #nim
11:30:16*lbart quit (Changing host)
11:30:16*lbart joined #nim
11:31:14bungvar pkt1: openArray[char] pkt1 = pkt[0].unsafeAddr.toOpenArray(pos, pos + pkt1Len - 1)
11:31:45bungnot sure error occurs this line or not, am I doing right ?
11:35:16Araqjust use array indexing instead.
11:38:23*abm joined #nim
11:39:04*Zevv quit (Quit: leaving)
11:39:25*Zevv joined #nim
11:40:03FromDiscord<krabbypatty> I just read about NRVO and now I think I get why it has been said that assigning to result is faster than returning
11:40:34FromDiscord<krabbypatty> Is that the only optimization/benefit of result or is there anything else? 🙂
11:41:15FromGitter<jrfondren> I think it often makes for shorter code, especially when result is implicitly initialized
11:42:27FromDiscord<krabbypatty> > assigning to stuff in result is such a great way to deal with nrvo and constructors
11:42:45FromDiscord<krabbypatty> so by constructors I assume they're talking about the same thing as you?
11:43:02FromDiscord<krabbypatty> e.g. you don' tneed to do initTable[string, string] if your retutrn type is already a Table[string, string]
11:43:03FromDiscord<Rika> yeah
11:43:09FromDiscord<krabbypatty> I see
11:43:16bungAraq you mean slice ?
11:44:30Araqno, I mean a 'var i: int' variable
11:44:39Araqthat keeps track of your position
11:44:56FromDiscord<krabbypatty> from what I'm reading C++ compilers do NRVO without having something like Nim's result variable though
11:45:01FromDiscord<krabbypatty> by analyzing the function
11:45:04FromDiscord<krabbypatty> are there any limitations to that?
11:45:20FromDiscord<Rika> you need to analyze the functio
11:45:23FromDiscord<Rika> (edit) "functio" => "function"
11:45:42FromDiscord<krabbypatty> ok yeah, but is it just _harder_ or are there any situations where it's impossible to do NRVO without result
11:46:06bungAraq that need change subsequenc calls args
11:46:07Araqno such situation is known to me
11:46:10FromDiscord<Rika> not that i know of, its just much easier
11:46:17FromDiscord<krabbypatty> hmm I see
11:46:35FromDiscord<krabbypatty> so with result I assume the compiler just checks for the inclusion of a `return` in the AST?
11:46:42FromDiscord<Rika> well you have to consider how hard it is to analyze a function
11:46:43FromDiscord<krabbypatty> whereas without it you'd need some type of control flow analysis
11:47:12Araqnah, it's pretty much
11:47:26AraqT foo() # ABI turns it into
11:47:31Araqvoid foo(T*)
11:47:40FromDiscord<krabbypatty> ok yeah
11:48:11Araqbung, so be it then
11:48:38Araq(actually the parameter should be openArray[] and then in the call you can use toOpenArray)
11:49:02Araq(then you get away with not naming the slice and no experimental feature is required)
11:49:05FromDiscord<krabbypatty> speaking of result, I wish we had a Result[T, E] in the stdlib :p
11:53:05FromGitter<ynfle> Is there a way to have an array with an undefined length at compile time using generics or somethings? I remember seeing that in the docs somewhere
11:53:22FromGitter<jrfondren> that's openArray[T]
11:53:41FromDiscord<krabbypatty> ok wait, a question is how does nim know what the constructor of the type is when using result?
11:54:06FromDiscord<krabbypatty> because I assume there's a difference between `var s: Table[string, string]` and `var s: Table[string, string] = initTable[String, String]()`
11:54:32FromGitter<ynfle> > that's openArray[T] ⏎ ⏎ That doesn't work for variables at least not stably
11:54:32FromDiscord<krabbypatty> how does nim know to call initTable when I'm using result? or it doesn't? and what are the implications of that?
11:55:32FromDiscord<Rika> it doesnt, it uses some sort of default(T) (which cant be overridden)
11:56:52FromDiscord<krabbypatty> ok. what are the implications of that?
11:57:02FromDiscord<krabbypatty> is there any point in using newSeq and initTable?
11:57:18FromDiscord<krabbypatty> if that implicit default(T) already exists
11:58:37FromDiscord<krabbypatty> ok the docs say that we don't need initTable, but it doesn't say anything about newSeq
11:58:58FromDiscord<Rika> needs newseq
11:59:04FromDiscord<Rika> refs are nil by default;
11:59:09FromDiscord<krabbypatty> @Rika also you said that can't be overriden, so I assume I can't have it for my own custom types
11:59:37narimiranrant: we had lots of complaints about "iff", but nobody ever complained about "eg"
11:59:52FromDiscord<krabbypatty> @Rika wait but I thought seq wasn't a ref?
12:00:01FromDiscord<krabbypatty> e.g. this works: `var s: seq[int]; s.add(1)`
12:00:46narimiranyou don't need `newSeq` anymore
12:00:58narimiranseqs are not nil
12:01:11FromDiscord<Rika> oh
12:01:12FromDiscord<Rika> forgot
12:01:24FromDiscord<Rika> when i see "newXXX" i just assume ref type
12:01:37*rockcavera joined #nim
12:01:57FromDiscord<krabbypatty> hmm does this naturally arise from nim's default values for specific types? e.g. seq must have a length somewhere, but that's initialized to zero because it's an int
12:02:02narimiranhttps://narimiran.github.io/nim-basics/#_result_variable
12:02:11FromDiscord<krabbypatty> or does nim have special knowledge of constructors for each type in the stdlib
12:02:18narimirancheck that "Beware!" part
12:06:02*supakeen quit (Quit: WeeChat 2.9)
12:06:12FromDiscord<krabbypatty> it seems weird for result to exist without a notion of constructors in nim
12:06:43*supakeen joined #nim
12:08:09Araqthere is a notion of construction in Nim but it's not like C++ does it
12:09:06FromDiscord<krabbypatty> what is it?
12:16:14*TomDotTom joined #nim
12:18:02*natrys joined #nim
12:20:17Araqfor a start, to construct an object use the ObjectType(field: value, ...) syntax
12:20:43Araqthat's a "notion" of construction right here.
12:23:36FromDiscord<krabbypatty> ok so am I correct in saying that the notion arises naturally from default values given to primitive types?
12:23:48FromDiscord<krabbypatty> e.g. seq's length is initialized to 0 because the default of an int is 0
12:25:00Araqwell I remember a version of Nim that lacked even the ObjectType(...) syntax, so no, that notion doesn't naturally arise from default values
12:25:21FromDiscord<krabbypatty> so how does nim know how to construct a seq?
12:25:43FromDiscord<krabbypatty> in `var s: seq[int]`
12:26:20Araqwell a 'seq' is built-in and its default value is @[] but ok, you can argue that it's the underlying length field which is 0
12:26:49FromDiscord<krabbypatty> basically what I'm getting at, is this default value hardcoded inside the compiler
12:26:57FromDiscord<krabbypatty> or does it come from length being 0 by default
12:27:00FromDiscord<krabbypatty> because to me the latter is worse
12:27:17Araqit's hardcoded and there is an accepted RFC to tweak it
12:27:27FromDiscord<krabbypatty> ok I see, that makes sense
12:27:39FromDiscord<krabbypatty> so at some point we'd be able to specify our own constructors?
12:27:53FromDiscord<krabbypatty> and then those would be called when I do `var s: MyType`
12:28:21Araqread https://github.com/nim-lang/RFCs/issues/252 for the details
12:28:22disbotUser-defined implicit initialization hooks ; snippet at 12https://play.nim-lang.org/#ix=2xc2
12:28:52FromDiscord<krabbypatty> Thanks!
12:29:40Araqand there have been extensive discussion about this elsewhere too
12:30:44Araqsummary: C++'s excessive support for constructors didn't avoid the need for make_unique so why copy its complexity.
12:32:29FromDiscord<krabbypatty> I was mostly concerned about it being the latter (constructors just arising from the default values of primitive types)
12:32:43FromDiscord<Clyybber> constructors that arise from default values are fine
12:32:56FromDiscord<krabbypatty> because coupled with `result` usage I can easily see that leading to bugs
12:33:04FromDiscord<krabbypatty> users being trained not to use newSeq, initTable etc
12:33:21FromDiscord<krabbypatty> and then when you have a type where the default values don't make sense you'll get a bad state for your type
12:33:28FromDiscord<krabbypatty> if you use `result`
12:33:56Araqthat's true, not really related to 'result' and I'm fighting for a better solution :-)
12:34:13FromDiscord<Clyybber> I don't think constructors as a language concept itself make sense though, you will still end up with "createSomeObj" even though SomeObj has a constructor itself
12:34:16FromDiscord<haxscramper> The only types that are really broken from default initialization are ones that use `enum` or `range` fields. For cases where you have fragile internal state - yes, there are some issues with it
12:34:25FromDiscord<krabbypatty> I mean custom types.
12:34:30FromDiscord<haxscramper> But if you really need to make it explicit use `{.requiresinit.}`
12:34:32FromDiscord<Clyybber> so constructors vs proc that constructs something but is not a constructor is really arbitrary
12:34:35FromDiscord<krabbypatty> e.g. a stack where my stackTop should be -1
12:34:56FromDiscord<Clyybber> @krabbypatty default values would solve that
12:35:48FromDiscord<krabbypatty> I guess yeah
12:35:53FromDiscord<haxscramper> And since `{.requiresinit.}` basically makes type non default-initlizable you can work with `-1` even now, without bugs.
12:36:04FromDiscord<haxscramper> There are just some ergonomics issues with it
12:36:12FromDiscord<krabbypatty> you might want some runtime component in some cases though
12:36:20FromDiscord<krabbypatty> like a random type that calls time() for its seed
12:37:02AraqI think if we allow '= value' in objects and make the other .requiresInit we have the best of both worlds
12:37:12FromDiscord<haxscramper> `.requiresinit.` cover it. It explicitly requires you to call all initializers, so you just can't forget to call it
12:37:19FromGitter<ynfle> Do i have to declare my own `.items` & `.pairs` if I have `type mySeq = seq[int]`?
12:37:26FromDiscord<krabbypatty> you can forget to add it
12:38:05FromDiscord<lqdev> Araq: that would be a nice addition to the language :)
12:38:12FromDiscord<haxscramper> Araq: `` =value `` as C++ assignment operator where it implicitly converts things on assignment?
12:38:13FromDiscord<krabbypatty> and then default values for primitive types would lead to bugs, but that's another dicussion 🙂
12:38:29FromDiscord<lqdev> right now you have to create an explicit constructor proc with tons of arguments if your object is big
12:38:50FromGitter<ynfle> I thought if it's not `distinct` you don't have to `{.borrow.}`
12:39:00FromDiscord<haxscramper> E.g. relaxing requirement on `=` operator prototype, so you can have something else that `(a: var T, b: T)`?
12:39:09Araqthe "runtime component" is usually a misfeature, then your constructor can fail and you're in the C++ world of unclear rules where constructors are functions and functions are not constructors and everything is messy
12:39:38FromDiscord<krabbypatty> well I'm mostly concerned about type safety and correctness
12:39:45Araqwhen I write '= value' I mean inside object declarations
12:41:01Araqkrabbypatty: so do I. But C++ is not the gold standard to follow here even though I admire Stroustrup
12:41:48FromDiscord<krabbypatty> oh I don't care for C++ 😛 from the RFC it actually seems like I can use functions in the default value initialization
12:41:56FromDiscord<krabbypatty> so it's more like a lazy initialization
12:42:04FromDiscord<krabbypatty> so in my Random example you'd still be able to use seed = time()?
12:42:27FromDiscord<haxscramper> No, current final version only allows constexpr for expressions, not arbitrary code in `=init`
12:42:42FromDiscord<krabbypatty> hmm ok
12:42:42Araqyou'd be forced to write 'seed = time()'
12:43:08Araqyou can't forget it but it not really hidable
12:43:12Araq*it's
12:43:40FromDiscord<krabbypatty> then we go back to the issue of needing .requiresInit. for those cases :p I think that can lead to bugs when authors forget to add .requiresInit. and users forget to call the constructor proc. that's why I dislike the whole concept of default values for primitive types
12:43:49FromDiscord<krabbypatty> but that's a discussion for another day
12:47:29FromDiscord<krabbypatty> I read the RFC thread and it seems sensible to start with the more restrictive option of only allowing constexprs tho
12:48:38*bung quit (Quit: Lost terminal)
12:51:05FromDiscord<krabbypatty> you could go the other way and instead of allowing implicit initialization hooks, require that a explicit proc (e.g. tagged with .constructor.) is always called
12:51:22FromDiscord<krabbypatty> that idea is probably full of problems tho
12:51:45FromDiscord<krabbypatty> and I'm not sure it can be enforced at compile-time
12:53:53leorize[m]1it can, requiresInit analysis is pretty good now
12:53:54leorize[m]1troublesome for seq though
13:00:54*rockcavera left #nim (#nim)
13:00:54*rockcavera joined #nim
13:04:39*letto quit (Read error: Connection reset by peer)
13:09:32*letto joined #nim
13:21:16FromDiscord<scott> is there a simple way to do this https://play.nim-lang.org/#ix=2Bn0, without calling the `default()` function every time? Something like this but which works? https://play.nim-lang.org/#ix=2Bn1
13:21:34miprihttps://www.manning.com/books/nim-in-action - interesting pricing. you pay them extra if you don't want the printed book
13:22:46narimiranmipri: hahaha, excellent :D
13:22:51FromDiscord<scott> weird sale shenanegans. what even is a "livebook"? haha
13:23:04miprithat's just their web reader
13:23:10FromDiscord<scott> omg
13:23:18FromDiscord<scott> that's not a selling point, guys
13:23:19FromDiscord<Rika> @scott what doesnt work on your examples
13:23:45mipriscott: your second link only fails because you have a space in front of the 'proc'
13:24:06mipriof getOrDo
13:24:13FromDiscord<scott> @Rika I don't want to call the method passed as the `otherwise` argument in the first link
13:24:24FromDiscord<scott> mipri, oh, whoops
13:24:28FromDiscord<Rika> https://play.nim-lang.org/#ix=2Bn3 but it works??
13:25:07FromDiscord<scott> yes, I see. that's not in the stdlib at all?
13:26:24FromDiscord<Rika> well nim isnt really focused on functional
13:27:09narimiranyou don't do `default()`, but you do `default`
13:27:32Araqproc get*[T](self: Option[T], otherwise: T): T # what you asked for?
13:28:04FromDiscord<Rika> they dont want the otherwise proc to run if its not needed
13:28:15narimiranhttps://nim-lang.github.io/Nim/options.html#get%2COption[T]%2CT
13:28:16FromDiscord<scott> Araq, no I want otherwise to be `proc(): T` not `T`
13:28:25narimiranhttps://nim-lang.github.io/Nim/options.html#map%2COption[T]%2Cproc(T)
13:29:06FromDiscord<scott> narimiran, no, map only applies the function if the value is `some`, I want it to only be applied if the value is `none`
13:29:59FromDiscord<scott> do you think a PR would be accepted for this? I don't want to overstep my bounds as someone new around here but this seems easy enough to add and I don't want to ask anyone to take away time from their current projects
13:29:59AraqIMHO you really want an 'if' statement instead of emulating control flow with lazy functions
13:30:00FromDiscord<Rika> is it that undesirable to use your own proc or
13:30:00narimiranok, but what's wrong with your version of it? (when you remove that extra space as pointed out by mipri)
13:30:01FromDiscord<Clyybber> basically get but with template semantics
13:30:23FromDiscord<Clyybber> narimiran: nothing, hes asking why it isn't in stdlib
13:31:37FromDiscord<scott> > is it that undesirable to use your own proc or↵↵Idk it's less that and more just trying to learn the language and was confused when I didn't find this proc in the options module, after having used optionals in a bunch of languages.
13:31:39Araqscott: I would accept a PR but the question of template vs proc callback type isn't an easy one
13:32:06Araqsee our map vs mapIt design in sequtils
13:32:13FromDiscord<scott> ah
13:32:18FromDiscord<Rika> languages with optionals tend to be functional languages as well dont they?
13:32:50AraqRika: FP is everywhere now
13:32:53FromDiscord<scott> not always, see C++, Java, Crystal. Lots of OOP languages are tacking on semi-functional features, like `map` and `fold`.
13:32:55FromDiscord<scott> yeah that
13:33:29FromDiscord<Rika> eeeh okay
13:33:45FromDiscord<scott> what are the pros and cons of templates vs proc args?
13:35:07FromDiscord<Rika> templates are funky when used like a proc i feel
13:35:24FromDiscord<Rika> see as ar/q says, map vs mapIt
13:35:27FromDiscord<Rika> in sequtils
13:35:43Araqtemplates don't depend on a good backend optimizer and save some keystrokes
13:36:12Araqthe cost is worse error messages
13:36:25FromDiscord<scott> interesting.
13:36:28Araqand multi-eval bugs when the template wasn't reviewed by us :P
13:36:42FromDiscord<Rika> scott if you dont mind a 3rd party maybe look at optionsutil
13:36:50FromDiscord<Rika> ...i think is the name
13:37:03leorize[m]1!repo optionsutil
13:37:04disbothttps://github.com/PMunch/nim-optionsutils -- 9nim-optionsutils: 11Utility macros for easier handling of options in Nim 15 21⭐ 1🍴
13:42:56leorize[m]1Araq: have you got a plan for 1.6.0?
13:50:51FromDiscord<scott> why do you guys only do even numbers?
13:51:19FromDiscord<haxscramper> Odd number is devel versions
13:57:17FromDiscord<scott> ah
14:05:48*arecacea1 quit (Remote host closed the connection)
14:06:43*arecacea1 joined #nim
14:22:04Araqleorize[m]1, IC
14:22:44Araqbugfixes for viewtypes and ORC aside, the plan is to merge the new not-nil implementation
14:23:23Araqand then have IC for 1.6. and then once we have IC, remove some or all restrictions wrt to declaration ordering and recursive modules
14:26:54FromDiscord<scott> what is IC?
14:27:21narimiranincremental compilation
14:27:48FromDiscord<Clyybber> speaking of which disruptek/
14:28:46*tane joined #nim
14:36:21FromDiscord<scott> woah, the compiler is already super fast, that would be nuts
14:47:41federico3I want distributed IC
14:51:07FromDiscord<haxscramper> Multithreaded macros when
14:52:20leorize[m]1what the even is multithreaded macros?
14:53:05leorize[m]1Araq: sounds solid
14:53:40*nc-x joined #nim
14:57:27*nc-x quit (Remote host closed the connection)
15:06:51*Sembei joined #nim
15:08:44*Pisuke quit (Ping timeout: 256 seconds)
15:22:24disruptekclyybber: new problem is out-of-order introductions, so i have to bump the counters globally and currently, it seems that either it's not that simple or there's a bug.
15:23:01FromDiscord<Clyybber> you mean syncing the id->name mappings is bugged?
15:23:33*Sembei quit (Ping timeout: 260 seconds)
15:25:00disruptekthe case we're talking about is mutable-name with existing global counters that we want to propogate into local conflicts, so, yes, id->name where we already have a globally cached value for that id.
15:26:04disruptekor something. who the fuck knows anymore.
15:26:06*Sembei joined #nim
15:29:47FromDiscord<Clyybber> its a tree
15:29:58disruptekyes.
15:30:08FromDiscord<Clyybber> the local conflicts have to be derived from the global ones
15:30:10disruptekbut, like, our impl isn't. for reasons.
15:30:25FromDiscord<Clyybber> is there a case where local conflicts influence global ones?
15:30:39disruptekyes, because they arrive first.
15:32:29FromDiscord<Clyybber> but C has shadowing, why do we care?
15:32:52*tane quit (Quit: Leaving)
15:32:59disruptekwell, we still need to be able to reference global symbols in local scope.
15:33:20FromDiscord<Clyybber> yeah, but if we do that we will know while processing the local scope
15:33:49FromDiscord<Clyybber> and when we process that reference to a global symbol in a local scope, we can handle it accordingly
15:34:19disruptektell me more.
15:34:29FromDiscord<Clyybber> e.g. incrementing the global counter by the local counter
15:34:49disrupteklet me push what i wrote yesterday and you can see what i'm talking about.
15:34:59FromDiscord<Clyybber> ok
15:35:01disrupteknote the bumpCounter() introduced in cgendata and used in mangler.
15:35:17disruptekit does that thing.
15:35:46disruptekit's a hackish design that i increasingly dislike.
15:36:32FromDiscord<shashlick> @dom96 - do you want to release a new version of choosenim
15:38:25FromDiscord<Clyybber> disruptek: My point is, just give the global a name whenever you encounter it, it doesn't matter wether you encounter it while processing global scope or while processing local scope
15:38:45disruptekah, but then everything gets a counter.
15:39:09FromDiscord<dom96> @shashlick it would be nice if we could resolve https://forum.nim-lang.org/t/6950 too for the release
15:39:15FromDiscord<Clyybber> disruptek most stuff probably yeah
15:39:19disruptekwhat's slowly happening here is that mangling is turning into current mangling.
15:39:24disruptekand that defeats the purpose.
15:39:26FromDiscord<Clyybber> its still better
15:39:26FromDiscord<dom96> but if you want to quickly cut a new version I don't mind
15:39:34disruptekit's lame and lazy.
15:39:53FromDiscord<Clyybber> disruptek: so whats your better idea?
15:40:11FromDiscord<Clyybber> we could also just append another _ to either global or local symbols hahahaha
15:40:23disrupteklike you said, model the c scope since that's exactly the semantic we need to reproduce.
15:40:56FromDiscord<shashlick> @dom96 - what exactly is the fix for that forum post
15:40:58disruptekwhen the frontend is fixed, we can remove _. or we can rewrite it before codegen.
15:41:11disrupteks/rewrite it/rewrite incoming ast/
15:41:22FromDiscord<dom96> @shashlick no idea
15:42:07FromDiscord<shashlick> okay - can we move the latest version file from nim-lang.org to github itself - that way we can bump updates without requiring website access
15:42:33FromDiscord<shashlick> and the nim-lang.org file can simply redirect to the github file
15:42:46FromDiscord<Clyybber> disruptek: there is no fixing the frontend
15:42:56disruptekwhy not?
15:43:05FromDiscord<Clyybber> because order independence is a nice thing
15:43:15FromDiscord<Clyybber> disruptek: lets just think about the different ways to solve this
15:43:30disruptekthe complexity exists no matter where.
15:43:44disruptekyou cannot pretend it doesn't because it's "nicer."
15:43:49FromDiscord<Clyybber> how about this
15:44:13FromDiscord<Clyybber> globals with a counter of 0 also always get the suffix
15:44:19FromDiscord<Clyybber> then when we are in a local scope
15:44:27FromDiscord<Clyybber> we always have a place left for a global
15:44:44FromDiscord<Clyybber> hmm, but that only works when the global is _0
15:44:59disruptekwe already do this.
15:45:10FromDiscord<Clyybber> we reserve places?
15:45:31disrupteksee line 114 in mangler, maybeAddCounter.
15:45:40disruptek_ == _0
15:45:53FromDiscord<shashlick> @dom96 - let me know and I can switch the download file as part of this PR
15:46:17FromDiscord<dom96> @shashlick I dunno, I'd rather have a separation here
15:46:23FromDiscord<dom96> let's consider this for later
15:46:28FromDiscord<Clyybber> disruptek: Yeah, my point is, lets not do that for globals that we encounter in a local scope
15:46:50disruptekwhat do you propose instead?
15:46:50FromDiscord<Clyybber> If we encounter a global first in a local scope, lets give it the _0 instead of just _
15:46:58FromDiscord<Clyybber> give it the _0 instead of the \_
15:47:02disrupteksame difference.
15:47:05FromDiscord<shashlick> @dom96 - okay cause any releases require this editing so depends on your availability
15:47:30FromDiscord<Clyybber> disruptek: No, because then your locals stay beautiful
15:47:35FromDiscord<Clyybber> We can also do it the other way around
15:47:49disruptekdude, you don't get to pick the order in which this stuff arrives.
15:47:55FromDiscord<Clyybber> exactly
15:47:58disruptekyou don't get to choose how many globals appear, either.
15:48:09FromDiscord<Clyybber> thats why you gotta reserve places or append numbers
15:48:18disruptekwe do append numbers.
15:48:26FromDiscord<Clyybber> my earlier solution would work, but you said it would append numbers everywhere
15:48:28FromDiscord<Clyybber> which you don't want
15:49:07disrupteki looked at ropes.
15:49:10FromDiscord<Clyybber> I say do the simple stuff first, update the local and the global counters when we encounter a global in a local scope
15:49:29FromDiscord<Clyybber> when we got something working we can think about ways to improve it further
15:49:50FromDiscord<Clyybber> and more importantly, we can actually test them then
15:50:22*hnOsmium0001 joined #nim
15:50:22disruptekwe can always test stuff by keeping an oracle.
15:50:30disruptekthe oracle mangles the old way.
15:51:25FromDiscord<Clyybber> pls no
15:51:45disruptekwell, everything works except megatest, in the prior commit.
15:52:05FromDiscord<shashlick> @dom96 - added a changelog entry - https://github.com/dom96/choosenim/pull/235 - will merge when done and tag to v0.7.4
15:52:05disbotFix nimble issue 864
15:52:18FromDiscord<Clyybber> disruptek: Cool, lets make everything work now
15:52:24disruptekneat idea.
15:52:35FromDiscord<Clyybber> without changing the way the frontend supplies us
15:52:40disruptekof course.
15:53:16FromDiscord<Clyybber> so lets do it?
15:53:16disrupteki have a bloodletting at noon and then i will get to work.
15:53:40FromDiscord<enthus1ast> how can i test if threads are enabled? (i've tried various, combinations of `when defined(Thread)` `when defined(Channel)`
15:53:51FromDiscord<Clyybber> disruptek no blood works faster ay?
15:53:56disruptekyou have to check compileSetting("threads") or some shit.
15:54:01disruptekthat should get you closer with grep.
15:54:20FromDiscord<enthus1ast> thank you for your google fo:)
15:54:41disruptekyeah, it's annoying.
15:55:15Yardanico!status
15:55:17FromDiscordUptime - 1 day, 4 hours, and 8 minutes
15:57:18FromDiscord<enthus1ast> `when compileOption("threads")` it is
15:57:48FromDiscord<enthus1ast> its in system.nim
15:57:56*tane joined #nim
15:58:11FromDiscord<19> hello, im trying to statically link sdl2 with nimx by following the commands from here https://github.com/nim-lang/sdl2 but it says `cannot find -lSDL2main` and `cannot find -lSDL2`
15:58:19disruptekenthus1ast: that's the one!
15:58:35*filcuc quit (Quit: KVIrc 5.0.0 Aria http://www.kvirc.net/)
15:59:42FromDiscord<enthus1ast> @19 do you have the static library next to your nim file?
16:00:09FromDiscord<19> no, i thought it can pick it up from the env variables
16:01:07FromDiscord<enthus1ast> this i dont know, my guess it that it depends on the linker search path that your os has configured
16:01:31FromDiscord<19> alright, ill put the lib next to the nim file, thank you very much
16:01:55FromDiscord<enthus1ast> you can also specify the linker search path with `--passl`
16:02:03FromDiscord<19> i could distribute the dll with the exe
16:02:09FromDiscord<19> oh okay, thank you
16:02:39FromDiscord<enthus1ast> you are aware that for static linking you need an lib file, not dll right?
16:02:47FromDiscord<enthus1ast> or .a
16:02:55FromDiscord<19> yes im saying as an alternative solution
16:06:43*nature joined #nim
16:16:02FromDiscord<Avatarfighter> Hello hello everyone 😄
16:16:13ForumUpdaterBotNew thread by Clonk: Writing binary data to SQLite, see https://forum.nim-lang.org/t/6962
16:46:56FromGitter<ynfle> Is there a binary tree implemention for nim in the std library?
16:47:06FromGitter<ynfle> *implementation
16:48:24FromDiscord<haxscramper> https://nim-lang.github.io/fusion/src/fusion/btreetables.html I'm not sure about it's status (e.g. supported/deprecated etc.), but `import fusion/btreetables` works fine
16:49:31FromDiscord<Avatarfighter> Fusion ships with nim now?
16:49:38FromDiscord<Avatarfighter> I didn't realize you could just import it
16:49:55FromDiscord<haxscramper> https://github.com/nim-lang/Nim/pull/15061
16:49:55disbotkoch: bundle nim-lang/fusion with Nim
16:50:15FromDiscord<Avatarfighter> oh wow
16:52:02FromDiscord<haxscramper> Although `btreetables` has severe name clashes with types from regular `tables`, not sure why author choose this naming instead of something like `Map` or only `OrderedTable`
16:52:37FromDiscord<lqdev> BinTable
16:52:41FromDiscord<lqdev> or TreeTable
16:53:16FromDiscord<Avatarfighter> is there any difference between htmlparser in stdlib and fusion?
16:54:04FromGitter<ynfle> I'm confused is a table or binary tree?
16:54:17FromDiscord<haxscramper> In this module yes
16:54:59FromDiscord<Avatarfighter> ynfle: Its a binary tree with the interface of a table from what I'm understanding
16:55:01FromGitter<ynfle> I want a data structure that has a left and right and data section. Simple binary tree
16:55:10FromGitter<ynfle> Oh ok
16:59:12FromDiscord<haxscramper> Yeah, very nice thing to have in stdlib, but naming issues ... I wonder if PR with api that changes all names to `Map` or `TreeTable` would be accepted
16:59:56FromDiscord<haxscramper> Since it is super confusing to have two identically named types (let alone all procs etc.) in stdlib (well, fusion is technically not a part of, but still really close)
17:00:42ZevvHello there, fellow Nimmers!
17:00:59FromDiscord<Avatarfighter> What's up fellow Nimgineer
17:01:26Zevvnotmuch, notmuch. doing some catching up on the forum and the prs.
17:01:26*rockcavera quit (Ping timeout: 256 seconds)
17:01:29Zevvmissed a lot I see
17:01:42FromDiscord<Avatarfighter> haxscramper: do you know what the differences between stdlib htmlparser and fusion htmlparser are?
17:03:29*rockcavera joined #nim
17:04:07*Zevv quit (Quit: Lost terminal)
17:04:29*Zevv joined #nim
17:04:46*Zevv quit (Client Quit)
17:05:02*Zevv joined #nim
17:05:03*Zevv quit (Changing host)
17:05:03*Zevv joined #nim
17:05:24Zevvdisruptek: https://github.com/nim-lang/Nim/pull/15655
17:05:25disbotexperiment showing how iterators can (almost) be implemented with a library solution
17:05:29FromDiscord<haxscramper> Judging from diff - very little (~20 lines, fusion one has more)
17:06:00*nature quit (Ping timeout: 258 seconds)
17:06:02FromDiscord<Avatarfighter> weird
17:06:06*Zevv quit (Client Quit)
17:06:14FromDiscord<Avatarfighter> i dont understand why fusion has htmlparser and the stdlib too tbh
17:06:45leorize[m]1@Avatarfighter we forgot to remove the stdlib one :P
17:06:45leorize[m]1bung fixed htmlparser and moved it to fusion on Araq request
17:06:47*Zevv joined #nim
17:07:08FromDiscord<Avatarfighter> oh what we're going to lose stdlib htmlparser?
17:07:12FromDiscord<Avatarfighter> darn it
17:07:35FromDiscord<haxscramper> I think I will make issue for treetables in fusion. Something like `BTable`, `BTreeTable`, `TreeTable` or `Map`
17:08:55FromDiscord<Avatarfighter> yeah that's smart
17:09:24FromDiscord<Avatarfighter> to access a module in fusion such as htmlparser all i need to do is `import fusion/htmlparser` right?
17:10:10*rockcavera quit (Ping timeout: 272 seconds)
17:10:28FromDiscord<Avatarfighter> yup
17:10:30FromDiscord<Avatarfighter> cool thanks 😄
17:10:40*gangstacat quit (Quit: Ĝis!)
17:14:08disruptekzevv: i know, i saw it.
17:14:25*gangstacat joined #nim
17:23:11*rockcavera joined #nim
17:24:03Zevvcool
17:24:30*krux02 joined #nim
17:25:11*krux02 quit (Read error: Connection reset by peer)
17:26:19*krux02 joined #nim
17:28:25*krux02 quit (Remote host closed the connection)
17:30:37*krux02 joined #nim
17:33:24disruptekmaybe you can add something? i think you have ideas about what you want to do with cps that i haven't really internalized.
17:35:13*gmaggior joined #nim
17:36:13ZevvI did
17:36:36disruptekoh nice.
17:36:37disrupteklol
17:36:45Zevvlol what
17:38:06FromDiscord<shashlick> @dom96 - v0.7.4 is built and ready - can you please update the file on nim-lang.org
17:42:35*Jesin quit (Quit: Leaving)
17:47:08*TomDotTom quit (Ping timeout: 265 seconds)
17:51:22Zevvoh man now he's asking all kind of complicated questions and I forgot all of that stuff
17:52:31*Jesin joined #nim
17:53:36FromGitter<ynfle> https://play.nim-lang.org/#ix=2Bou Why can this have side effects?
17:55:30ZevvI think it's the rand()
17:55:43FromDiscord<Yardanico> rand
17:55:56FromDiscord<Yardanico> It's a side effect since it access a global random state
17:56:30FromGitter<ynfle> Oh ok thanks
17:56:30FromDiscord<haxscramper> Are there plans to generate error message pointing to location where sideffect occurs in function body?
17:56:37Zevvexcellent question
17:57:53FromGitter<ynfle> didn't distruptek have a module that remove everything but the error?
17:58:05disruptek!repo dust
17:58:06disbothttps://github.com/disruptek/dust -- 9dust: 11DUST is Unattended Syntax Truncation 15 4⭐ 0🍴 7& 1 more...
17:58:36FromGitter<iffy> Sometimes I forget to return something from a proc (like this for Futures: https://play.nim-lang.org/#ix=2Box ). Is there some compile-time flag I can enable to detect/prevent this? (Returning Futures and JsonNode are my most common mistakes)
18:00:58disrupteknot sure what the state of dust is. i hack it to solve very particular problems.
18:01:14disruptekbut feel free to ask for help with your problem.
18:01:51*lritter quit (Quit: Leaving)
18:03:32*rockcavera quit (Read error: Connection reset by peer)
18:07:30FromGitter<ynfle> Will it detech sideeffects?
18:08:04disruptekit's designed to minimize any semantic error, so, yes.
18:09:45FromGitter<ynfle> 👍
18:12:57leorize[m]1@iffy maybe make an RFC to request that `{.requiresInit.}` can be attached to procs?
18:13:26leorize[m]1actually we can experiment with adding `{.requiresInit.}` to `Future[T]`
18:14:07disruptekmake Future a concept.
18:14:31Yardanicothat sounds deep
18:14:36disruptekoh nevermind, i forgot we don't have concepts.
18:14:50FromGitter<iffy> But in the Future...
18:15:03*disruptek 😉
18:16:27FromGitter<iffy> leorize: beyond backward compatibility, what's the argument for not making all types {.requiresInit.} by default? I think I don't understand the use case for having uninitialized stuff
18:17:36leorize[m]10-init can be valid
18:18:14leorize[m]1though there are plans to make requiresInit default, indeed
18:18:17FromDiscord<dom96> @shashlick done
18:18:18disrupteki think it's fine once we have defaults.
18:18:31disruptekwithout defaults, i don't like it.
18:18:51leorize[m]1once nil checking gets in we should be a step closer
18:19:20disruptekto me, the identDefs tweak to typedefs syntax seems the right way
18:21:11FromGitter<iffy> Where do I put the pragma? This doesn't find the problem compile-time: https://play.nim-lang.org/#ix=2BoF
18:24:33FromGitter<iffy> @leorize I'm not sure letting me put {.requiresInit.} on procs would prevent me from making the mistake (since the problem is me forgetting to do something -- having to remember to do another thing will not help me) :). If there was a compiler flag that put it on all procs, that would help forgetful me. Glad there are plans to make it default.
18:24:34leorize[m]1if it can be put into proc headers it means that `{.push.}` will then apply it to procs
18:24:39disruptekthere are still some parts of stdlib that cannot be fixed thusly.
18:24:52disrupteki'm thinking of ioselectors here.
18:26:53FromGitter<iffy> okay; I could remember to do it once per file
18:28:23disruptekclyybber: another idea: there's some implicit ordering information delivered to us by comparison of identities themselves. not sure how to use this information yet, though, based upon your "order irrelevant" demand.
18:30:14FromDiscord<UNIcodeX> @disruptek https://github.com/planety/prologue/issues/89#issuecomment-712840105
18:30:16disbot--gc:orc --threads:on slower than --threads:off ; snippet at 12https://play.nim-lang.org/#ix=2BoK
18:31:40disrupteki would copy the example and link the thread by referencing one or the other in, uh, one or the other.
18:32:55FromDiscord<Yardanico> ~ystream live doing random stuff
18:32:55disbotno matching footnotes for `ystream` with regexps `live, doing, random, stuff`. 🙁
18:32:58FromDiscord<Yardanico> ~ystream
18:32:58disbotystream: 11Stream at https://twitch.tv/yardanico, voice chat either on Mumble (mumble://uberalles.mumbl.io/) or in Discord (https://discord.com/invite/ezDFDw2) -- Yardanico
18:38:35FromDiscord<UNIcodeX> @disruptek will do.
18:38:49FromGitter<iffy> @leorize: have a link for the RFC/forum about "plans to make requiresInit default?" I'd like to read that before drafting an RFC
18:44:11Zevvvi
18:45:02*rockcavera joined #nim
18:45:42FromDiscord<Avatarfighter> vim moment
18:46:43Zevv-EWRONGTERM
18:47:35FromDiscord<scott> I've been seeing semicolons used to separate arguments in proc defs, like `proc(a: A; b: B) = somethingElse(a, b)`, what's up with that?
18:48:48disruptekit's just better.
18:49:03Zevvit's for coding in the dark, it allows you to have more pixels on
18:49:08disrupteklol
18:49:15FromDiscord<scott> lol wtf
18:49:17FromGitter<jrfondren> same as comma, except it allows you to use a comma: proc(a, b, c: int; d: float)
18:49:27*Zevv quit (Quit: Lost terminal)
18:49:39FromDiscord<scott> oh so just like when writing a list in plaintext
18:49:50disruptekwhat? no.
18:49:51disruptekTHIS
18:49:52*Zevv joined #nim
18:49:52disruptekIS
18:49:53disruptekNIM
18:49:58Zevvbut seriously, I can't find it in the grammar
18:50:03disruptekoh c'mon.
18:50:05FromDiscord<haxscramper> Yes. It is also necessary when you have `using` declaration
18:50:17*rockcavera quit (Read error: Connection reset by peer)
18:50:21FromDiscord<scott> never seen that one before
18:50:44*rockcavera joined #nim
18:50:47disruptek, is dark-mode for proc signatures.
18:50:57disrupteki love it.
18:51:00FromDiscord<haxscramper> https://github.com/nim-lang/Nim/wiki/Lesser-known-Nim-features#using-statement
18:51:17FromDiscord<haxscramper> And manual link
18:54:25FromGitter<iffy> using! where have you been?
18:55:51disruptekwho knows stuff about click farming?
18:57:04FromDiscord<Avatarfighter> I do but my battery is about to die
18:57:14disrupteki fucking knew it.
18:57:18FromDiscord<Avatarfighter> LOL
18:57:28FromDiscord<Avatarfighter> could've just asked me directly smh
18:57:36disrupteki was hoping i was wrong about you.
18:57:48FromDiscord<Avatarfighter> I am a man of many crafts disruptek
18:57:54*arecacea1 quit (Remote host closed the connection)
18:57:55disruptekyeah, yeah, great.
18:58:00FromDiscord<Avatarfighter> ahah
18:58:04FromDiscord<Avatarfighter> what you need anyways?
18:58:10disrupteki need clicks farmed.
18:58:12disruptekduh.
18:58:23FromDiscord<Avatarfighter> On what a website? an ad?
18:58:29FromDiscord<Avatarfighter> cookie cliker?
18:58:31disruptekairbnb and similar.
18:58:32FromDiscord<Avatarfighter> clicker
18:58:43FromDiscord<Avatarfighter> o
18:58:44disruptekwtf is a cookie clicker?
18:59:17FromDiscord<Avatarfighter> you've never played that game?
18:59:22disrupteki have two flies in my house and only jerry likes watching me code.
18:59:27disruptekgo figure.
18:59:38*arecacea1 joined #nim
18:59:38FromDiscord<Avatarfighter> rip
19:00:05FromDiscord<Avatarfighter> the thing with click farming is that its a bit illegal
19:00:16disrupteki never would have guessed.
19:00:46FromDiscord<Avatarfighter> I’m glad you couldn’t have guessed.
19:01:18FromDiscord<Avatarfighter> well ig if you want to talk abt it and you have a signal or something lmk
19:01:33disruptekwhat's really weird is, when i put timmy's code on the screen, larry gets interested.
19:01:55disruptekhere's my signal: 🖕
19:02:03disruptekare you afraid to talk on irc?
19:03:43disrupteki guess that's a `yes.`
19:03:45FromDiscord<Avatarfighter> What no im just too lazy to get my other laptop
19:03:48FromDiscord<scott> about potentially illegal shit? he should be
19:03:56FromDiscord<scott> also it's discord which is worse
19:03:59FromDiscord<Avatarfighter> yeah lol
19:04:12FromDiscord<Avatarfighter> What you’re suggesting you want to do is straight up fraud
19:04:50Zevvclick farmers, you can just hire those, right?
19:04:52disruptekso what?
19:05:03FromDiscord<scott> so be smart about doing illegal shit
19:05:06FromDiscord<Avatarfighter> Zevv: you can also just use a fuckton of proxies
19:05:07disruptektalking about crime isn't illegal.
19:05:11FromDiscord<Avatarfighter> not that i would know
19:05:22disruptektrust me.
19:05:24FromDiscord<scott> actually it can be
19:05:30Zevvcan't you just curl those clicks?
19:05:32disrupteki'm very trustworthy.
19:05:32FromDiscord<scott> "conspiracy" or whatever
19:05:39Zevvdoes it really involve mice and webbrowsers?
19:05:50disruptekit involves cell phones, usually.
19:05:57FromDiscord<scott> Zevv you can use selenium I bet
19:06:06FromDiscord<Avatarfighter> good thing we’re discussing crime theory instead of actual crimes
19:06:17Zevvphones. Why not boot a fuckton of AOSP emulators
19:06:23Yardanicoupdated sqlite database of all messages in #nim (how far irclogs permits) https://drive.google.com/file/d/1ChoIQhKGCTDjliv-ME7XlRMySzGXJLPR/view?usp=sharing
19:06:27Zevvor, for what it's worth, just one
19:06:37Yardanicoid/timestamp/author/message/service/kind
19:06:38ZevvYardanico: graph that shit man, nobody likes plain text
19:06:40FromDiscord<scott> Zevv, probably cheaper just to hire people with actual shitty phones TBH
19:06:40disrupteki think phones work out to be cheaper.
19:06:43FromDiscord<Avatarfighter> Zevv: Devices get fingerprinted, emulators come back as the same device etc
19:06:53Yardanico1.3mil entries
19:06:54ZevvAvatarfighter: Not my emulators
19:06:57FromDiscord<Avatarfighter> Clicks are usually just ips
19:07:06FromDiscord<Avatarfighter> Wym Zevv
19:07:06ZevvI'm up to my elbows in low level android shit over the last years
19:07:11FromDiscord<Avatarfighter> hehe
19:07:37FromDiscord<Avatarfighter> Wait do ur android emulators allow adb ?
19:07:38FromDiscord<scott> "Android device required, will pay minimum wage plus lunch", is cheaper than "spin up a 5-billion core server on AWS to run android's shitty inefficient Java engine to run a browser you could just emulate with selenium
19:07:50ZevvAvatarfighter sure why not
19:07:52FromDiscord<scott> (edit) "selenium" => "selenium""
19:08:05Zevvscott: that's pretty true. it's also pretty sad
19:08:09FromDiscord<Avatarfighter> Can I use your emulators for something?
19:08:17disruptekyes.
19:08:25FromDiscord<Avatarfighter> or just one to debug an antibot
19:08:29Zevvyou can use them to watch HBO or disney on a deprecated set top box
19:08:32ZevvI'm not proud of it
19:08:34Zevvbut it pays the bills
19:08:41FromDiscord<Avatarfighter> Thats so cool
19:08:58FromDiscord<scott> woah, that using statement is pretty cool
19:09:03FromDiscord<scott> also, Zevv, that was my point.
19:09:06FromDiscord<scott> 😦
19:09:08*natrys quit (Quit: natrys)
19:09:09Zevvhehe
19:09:43FromDiscord<Avatarfighter> i need « real data » from an android app to emulate its requests but it doesnt work for the android emulators ive tried
19:10:18FromDiscord<Avatarfighter> And not everyone with an android is willing to run my code for some reason that I can’t explain
19:10:28ZevvI can
19:10:41FromDiscord<Avatarfighter> 😔
19:11:07FromDiscord<Avatarfighter> Do you have a link to download your emulator?
19:11:50FromDiscord<Avatarfighter> disruptek: what are you trying to do with clicks? Boost an ad?
19:11:53Zevvnah, it's commercial stuff. We run a custom android port on Someone Elses Computers, and remote & render the OpenGL and streaming video+audio on a settop box
19:12:08Zevvso the AOSP think's its running on a phone, but it's actually cloudified stuff
19:12:34disruptekclyybber: okay, so adding _ breaks {.emit: "throw e;".} which is fun.
19:12:40FromDiscord<Avatarfighter> oh that’s really cool zevv
19:12:51Zevvyeah that's what I thought when I got started with all that
19:12:57FromDiscord<Avatarfighter> streaming android stadia style
19:13:06FromDiscord<Avatarfighter> @ElegantBeef would enjoy this
19:13:34Zevvthe project has grown over this magic high-water-mark where I do no longer enjoy working on projects
19:13:58FromDiscord<Avatarfighter> Are you burnt out?
19:14:01disruptekyes.
19:14:06Zevvoh no way. I'm just old and cynical
19:14:17Zevvreally, I spend 25% of my days ranting
19:14:49FromDiscord<Avatarfighter> disruptek what was that yes to lmao
19:14:54Zevvlet's put all this frigging shit in frigging containers stacked on other frigging containers and put more frigging other stuff in other frigging containers on top
19:15:07Zevvno one understand a single *shit* about what stuf actually *does*
19:15:20disruptekoooh zevv, my pants are getting tight.
19:15:30Zevvso they come crying when it breaks, and I pull out my strace, ignore container boundaries and namespaces and just peek my way into kernel space
19:16:05Zevvpoint my finger on some nifty deadlock in CEPHfs kernel drivers, and ask once more, with my friendliest voice and intonation, why the frigging HELL they think it is a good idea to use CEPH in the first place
19:16:12Zevvhmm this is all logged, right
19:16:22ZevvI am not a smart man
19:16:30disruptekdon't worry; names are anonymized.
19:16:33disrupteki think.
19:16:38ZevvYou are not a smart man
19:16:49*supakeen puts Zevv in a container
19:17:26Zevvthere is no such thing. containers are an illusion
19:17:38Zevvbut really, this kubernetes stuff? what the hell, really?!
19:17:42ZevvI will now shut up
19:17:51*supakeen SECCOMP_SET_MODE_NO_RANT Zevv
19:18:44FromDiscord<Avatarfighter> kubernetes 🤪
19:19:16FromDiscord<haxscramper> clybbernetes
19:21:41FromDiscord<shashlick> @haxscramper how's your c++ wrapping work going
19:22:33FromDiscord<haxscramper> I'm trying to figure out how to determine correct way for wrapping forward-declared template classes that are defined in different file
19:22:42FromDiscord<haxscramper> aka `std::string`
19:22:58Zevvand are you having fun yet?
19:23:16FromDiscord<haxscramper> Not the worst think that I had to do today
19:23:18FromDiscord<shashlick> Use code reordering pragma
19:23:54FromDiscord<haxscramper> It is not related to nim code, I need to figure out how to squeeze more information from libclang
19:25:10FromDiscord<haxscramper> It has `getCanonicalType` which is used for working with multiple-declarations-single-definition, but due to how files are parsed it the first place I cannot see actual type definition, so I need to defer analysis
19:26:09FromDiscord<haxscramper> Since right now I just parse file & wrap everything I see, but I should probably analyze dependency graph and let user decide what should be considered "API header file"
19:26:54*lbart quit (Read error: No route to host)
19:27:51disruptekso what's the worst thing you had to do today?
19:28:07*lbart joined #nim
19:28:07*lbart quit (Changing host)
19:28:07*lbart joined #nim
19:28:12disrupteki had to let bentley's health insurance lapse. the fucking dog has better healthcare than i do.
19:28:14*rockcavera quit (Killed (orwell.freenode.net (Nickname regained by services)))
19:28:15*rockcavera joined #nim
19:28:39disruptekalso, i poured a bottle of piss all over my pantleg. life in the country!
19:29:11FromDiscord<scott> what the actual fuck is your life disruptek
19:29:13FromDiscord<haxscramper> Electronics homework windows-only proprietary BS that uses literall ungoogle-able alternative to VHDL & i have to run it in wine
19:29:35disruptekc'mon, i'm a fungi.
19:30:04FromDiscord<scott> must be nice
19:30:06FromDiscord<scott> the simple life
19:30:11FromDiscord<scott> just play your part in the food chain
19:30:37disrupteki make people feel better about their code.
19:31:05Zevvcode shaming is a thing, you know
19:31:14disruptekjust doing my part.
19:31:23Zevvand we all appreciate you for that
19:31:38FromDiscord<Yardanico> i'll revert to the old way of mentioning people ("ping nick", "Nick: hello" at the start of the message, or "@nick")
19:32:09PrestigeSounds good
19:32:39disrupteki think irc people should be able to :nimdog: or whatever.
19:32:40Prestigewill I be able to do partial mentions, like @yard
19:33:13FromDiscord<scott> maybe `nick,`? I think hexchat autocompletes to that if you start typing someone's name at the beginning of the message
19:33:23ZevvI used to live with a mate in this huge empty building that use to house an insurance company or something. It was huge and cold, and I chose to live in the library, which was on the far end of the toilets. We left after 2.5 years, I think we left almost 500 botles of piss
19:33:46Zevvit could have been much worse, right, in 2.5 years
19:34:00FromDiscord<scott> half of me is like "wtf" the other half is "that sounds kinda nice, all that space"
19:34:06disruptekdepends on how big your bottles are.
19:34:12FromDiscord<Yardanico> @scott maybe
19:34:32Zevvoh it was pretty great. we had this rock band from romania we met somewhere on the street live with us for 3 months.
19:34:34voidpiZevv: if you kept logs you can view them with bitline!
19:34:37Zevvsome artists in residence. and the parties.
19:34:54ZevvI view my life with bitline
19:35:03voidpiZevv: it compiles ok void btw
19:35:12voidpiin void I mean
19:35:17Zevvwhat's void?
19:35:20voidpilinux
19:35:24Zevvah right cool
19:35:32Zevvif it compiles, ship it
19:35:50voidpiyes PM
19:36:09disrupteki'd say 3000ml is about the maximum acceptable bottle size.
19:36:28disruptekanywhere below that, you should be fine.
19:36:33*FromDiscord quit (Remote host closed the connection)
19:36:46*FromDiscord joined #nim
19:36:56Yardanico@Yardanico: hi
19:36:57voidpiyou can always water the trees
19:36:59FromDiscord<Yardanico> 123
19:37:05Yardanicoping yardanico
19:37:06disruptekchrist, this again?
19:37:10Yardanicodisruptek: :D
19:37:13Yardaniconot for long
19:37:16Yardanicobut yeah it works now
19:37:21Yardanicoboth irc way and @ way
19:37:28Yardanicowell irc way only at the start
19:37:36Zevvno graphs, no game
19:37:43YardanicoZevv: you have graphomania
19:37:48disruptekno socks, no shoes.
19:38:52Yardanico!status
19:38:54FromDiscordUptime - 2 minutes
19:39:00Yardanico!getlastid
19:39:02FromDiscordUID of Yardanico who sent/edited a message most recently on Discord is 177365113899057152
19:39:23Yardanico!getdiscid disruptek
19:39:25FromDiscorddisruptek#7015 has Discord UID: 667097779541377047
19:39:40*rockcavera quit (Ping timeout: 246 seconds)
19:39:42disrupteklook at that. i'm a fuckin' badass.
19:39:46Yardanico777
19:40:47ZevvYardanico: I do, I do
19:40:57*TomDotTom joined #nim
19:42:17supakeenwhere are the graps?
19:42:21Yardanicograpes?
19:42:25supakeengraphs
19:42:30Zevvgrapes are cool too
19:42:52supakeendo i need to give Zevv graphs?
19:42:53Zevv"grap" * ("h" | "e") * "s"
19:43:08supakeenZevv: https://i.imgur.com/89qkXOR.png there you go
19:43:13FromGitter<matrixbot> `BarrOff` Hello, is there a way to use pointer arithmetic? Could not find anything about this in the manual
19:43:21Zevvsupakeen: you're kidding right
19:43:33supakeeni thought you had graphomania
19:43:43FromDiscord<Vindaar> you guys want graphs? gotta talk to me
19:43:45ZevvI recently got some kid telling me "No use grafana, that's waay better then ntop"
19:43:49Yardanicolol
19:44:03ZevvI waited for him after work with some friends. we beat him up.
19:44:14supakeenhah jokes on you i work from home
19:44:22ZevvI know where your house lives
19:44:30FromDiscord<dom96> oh, are we sharing our graphs? https://media.discordapp.net/attachments/371759389889003532/768197971836928060/unknown.png
19:44:44supakeenyay graphs
19:45:07supakeenbe careful, Zevv will beat you up too :(
19:45:08FromDiscord<Yardanico> i've shared a lot of nimble graphs in the past
19:45:15FromDiscord<dom96> pff, I can take him
19:45:26Zevvbitline graphs are cooler then that
19:45:30FromDiscord<Avatarfighter> You guys have good looking graphs wtf
19:45:32Zevvbecause they render at 100+ fps
19:46:10FromDiscord<dom96> Still can't believe how stable this damn game I wrote is
19:46:16FromDiscord<Yardanico> I did graphs like this with neo4j for nimble packages https://media.discordapp.net/attachments/371759389889003532/768198399093768192/ev86AAK.png
19:46:31supakeenits a real graph!
19:46:32Zevvdom96: well, is that because of *you* or because of the *language* you used?
19:46:37FromDiscord<dom96> I remember the days when Nim services leaked memory left and right
19:46:58disrupteki'm old enough to remember when async leaked.
19:46:58supakeendom96: what's your backend for your stats?
19:47:03Zevvlook at my graphs http://zevv.nl/div/.old/2020-10-11%2022-10-48.mp4
19:47:12FromDiscord<dom96> I mean... both. I found a leak in Nim and fixed it
19:47:21FromDiscord<dom96> supakeen: prometheus
19:47:22Zevvdom96: great stuff
19:47:23supakeenZevv: is that grafana ;)
19:47:34*supakeen runs away
19:48:05ZevvI have now reached that fragile level of alcohol where I don't care about your shit anymore
19:48:11Zevvbut I'm also no quite drunk
19:48:30FromDiscord<dom96> I think disruptek has had a bad effect on you
19:48:32disrupteki'm like that all the time.
19:49:51ZevvI think we share some traits
19:50:59FromDiscord<dom96> Anybody got contacts at LWN?
19:51:03FromDiscord<dom96> Cause this shit ain't cool https://lwn.net/SubscriberLink/834571/e8d7adc0d9b669bc/
19:51:07*krux02 quit (Remote host closed the connection)
19:51:14*rockcavera joined #nim
19:51:22Zevvyeah let's wait for these guys after work, and beat'em up
19:51:29*ForumUpdaterBot quit (Remote host closed the connection)
19:51:51Zevvbut really, I think LWN loves input from guest writers.
19:52:29Zevv"We will currently pay $300 for well-done articles from new authors"
19:52:29FromDiscord<dom96> Cool, who wants to write the same article but about Nim?
19:52:36Zevvy
19:52:38*ForumUpdaterBot joined #nim
19:52:44Zevvyeah, we really need someone with writing experience
19:52:49FromDiscord<dom96> oh nice, you get to promote Nim /and/ you get $300
19:52:59TomDotTomdom96: Last time I tried it was a RPITA to create a deployable binary with Julia
19:54:33ForumUpdaterBotNew thread by Xendi: Console dropdown how?, see https://forum.nim-lang.org/t/6965
19:56:33FromDiscord<scott> author of that article doesn't even seem to have any published julia projects https://github.com/Cyberax?tab=repositories
19:56:41FromDiscord<Yardanico> maybe private
19:56:50FromDiscord<scott> true
19:57:02Zevvso, dom96 will be earning $300 this week, right?
19:57:12Yardanicoor miran :P
19:58:37FromDiscord<dom96> I got other projects on my plate that are way more fun
19:58:40supakeenhah i'm doing a little presentation this weekend about nim i think
19:58:47FromDiscord<scott> I'd do it but I literally just started learning nim this week
19:59:04FromDiscord<scott> supakeen do it
19:59:07FromDiscord<scott> write it up
19:59:15supakeeni mean it's just slides
19:59:31FromDiscord<haxscramper> @scott Can write section about learning experience etc.
20:00:46FromDiscord<scott> idk I'm not really your typical learner.
20:00:48*narimiran quit (Ping timeout: 258 seconds)
20:01:11FromDiscord<scott> nim is like my 20th language. by this point I have a process for learning new languages that wouldn't apply to your typical beginner
20:02:10FromDiscord<scott> I make a lot of assumptions your typical Python or C programmer wouldn't
20:02:38FromDiscord<haxscramper> Well, from my experience nim is good when you already know something (usually python, C++ maybe some FP/LISP) and want to get a better language that combines all neat features, so it might be a good think actually
20:02:53FromDiscord<scott> fair point
20:03:06ZevvI think Nim as few surprises when coming from below
20:03:22Zevvbut when coming from above, it'll hit you in the face every now and then I guess
20:03:23FromDiscord<scott> Nim has more than a few surprises regardless haha
20:03:40FromDiscord<scott> not sure what you mean by above/below though
20:03:47ZevvRead "C", "Python"
20:03:53FromDiscord<scott> oh I see
20:04:11supakeenif you know the problems nim is solving because you come from c some things are easier
20:04:13ZevvIf you come from C, Nim is very cool and natural, it's just C done right
20:04:14supakeenp much
20:04:23Zevvif you come from python and think "Heeeey this all looks familiar"
20:04:24supakeenif you don't then it's 'harder'
20:04:29FromDiscord<scott> yeah, so true
20:04:49supakeenor well, harder, i doubt that we write plenty of small things in nim at work and about half of those don't have experience with things 'lower' than nim :)
20:05:55supakeenjust used to different limitations
20:22:11FromDiscord<ElegantBeef> @Avatarfighter god damn it if you mention stadia to me again, i might purge my nim repos and go learn rust to distance myself from you 😛
20:22:58FromDiscord<Yardanico> @ElegantBeef write in V instead
20:23:01FromDiscord<Yardanico> :nimDog:
20:23:09FromDiscord<scott> @ElegantBeef I'm not sure what your beef is with stadia but it's not worth it haha
20:23:34FromDiscord<ElegantBeef> Dont worry it's a joke
20:23:51FromDiscord<scott> I figured haha
20:24:41*xioren joined #nim
20:24:45*rockcavera quit (Ping timeout: 240 seconds)
20:24:57*rockcavera joined #nim
20:25:58FromDiscord<ElegantBeef> If curious my issue with stadia is it's the single most efficient DRM 😄
20:26:16FromDiscord<scott> oh haha that's a damn good reason
20:31:53FromDiscord<alehander42> ??
20:31:56FromDiscord<alehander42> guys
20:31:57FromDiscord<alehander42> hey
20:32:01FromDiscord<Idefau> hey
20:32:03FromDiscord<alehander42> i need to go back to the not nil stuff
20:32:05FromDiscord<alehander42> how is it
20:32:58FromDiscord<alehander42> disruptek whaaat
20:33:04FromDiscord<alehander42> i havent moved to crystal 😄
20:34:15FromDiscord<alehander42> i write rust
20:34:26FromDiscord<alehander42> a bit, but i mostly debug it and try to fix stuff
20:34:39FromDiscord<alehander42> so yeah how is the pattern matching stuff going @haxscramper
20:35:03FromDiscord<alehander42> (i also did some go these weeks and a bit lua)
20:35:13FromDiscord<haxscramper> It is technically done, I just don't have time to sit down, stare at it for like whole day to finalize my thoughts
20:35:23FromDiscord<alehander42> i kinda .. started digging some rust features
20:35:34FromDiscord<haxscramper> And since fusion is now shipped with nim I will most likely be PRing it to fusion, not stdlib
20:36:09FromDiscord<alehander42> but i should keep calm and not do the "lets do those 2 things in nim " stuff
20:36:19FromDiscord<alehander42> hm, cool
20:36:29FromDiscord<alehander42> i should try it one of those days
20:36:47FromDiscord<haxscramper> sent a code paste, see https://play.nim-lang.org/#ix=2BpL
20:36:56FromDiscord<alehander42> 😮
20:37:01FromDiscord<alehander42> sounds good
20:37:11FromDiscord<Avatarfighter> Lmao i felt like it was so relevant @ElegantBeef
20:37:22*rockcavera quit (Remote host closed the connection)
20:37:36FromDiscord<haxscramper> sent a code paste, see https://play.nim-lang.org/#ix=2BpM
20:37:59FromDiscord<haxscramper> Or write HTML templating with full DSL only by defining enum + node type
20:38:22FromDiscord<Avatarfighter> You would love karax
20:38:27FromDiscord<Avatarfighter> !repo karac
20:38:29disbothttps://github.com/nodeschool/karachi -- 9karachi: 11Repository for organizing the karachi nodeschools events 15 20⭐ 10🍴 7& 29 more...
20:38:31FromDiscord<Avatarfighter> whoops
20:38:37FromDiscord<Avatarfighter> !repo karax
20:38:39disbothttps://github.com/pragmagic/karax -- 9karax: 11Karax. Single page applications for Nim. 15 607⭐ 50🍴 7& 14 more...
20:38:46FromDiscord<Avatarfighter> html dsl
20:38:53FromDiscord<alehander42> haha
20:39:01FromDiscord<haxscramper> I reused the same parser so syntax is the same
20:39:04FromDiscord<Avatarfighter> ah
20:39:11FromDiscord<alehander42> sounds .. intriguing
20:39:19FromDiscord<alehander42> a good idea to make it eneral!
20:39:20FromDiscord<alehander42> general
20:39:30FromDiscord<haxscramper> But the point is - it wasn't even indended feature, I just realized I could do this in like ~80 lines
20:39:43FromDiscord<alehander42> again a HN post
20:39:50FromDiscord<alehander42> about nim today, a language written in nim
20:40:29FromDiscord<Avatarfighter> HN loves us
20:40:37FromDiscord<Avatarfighter> i see nim on it a little too often
20:40:45FromDiscord<alehander42> haha indeed
20:40:55FromDiscord<ElegantBeef> If they loved nim so much why dont they use it 😄
20:41:10FromDiscord<Avatarfighter> 😳
20:44:58FromDiscord<shashlick> Link?
20:45:01FromDiscord<Idefau> i want to sleep with Nim
20:45:39FromDiscord<hobbledehoy> https://news.ycombinator.com/item?id=24834636↵This one?
20:47:24*TomDotTom quit (Ping timeout: 272 seconds)
20:47:50FromDiscord<haxscramper> @alehander42 I also decided that DSL parser + some implementation details should also be exported & documented, so people might either reuse codegen part of parser for DSL
20:48:20FromDiscord<haxscramper> Things like https://haxscramper.github.io/hmisc/src/hmisc/macros/matching.html#Match
20:59:56*Vladar quit (Quit: Leaving)
21:07:57FromDiscord<tomck> I'm trying to use the 'with' macro i saw mentioned here, but it's saying `Error: cannot open file: with`: https://nim-lang.org/docs/with.html#with.m%2Ctyped%2Cvarargs%5Buntyped%5D↵↵I'm just using `import with`. Am i being silly, is something wrong here?
21:08:07Yardanicoimport std/with
21:08:13Yardaniconew nim stdlib modules are in std namespace
21:08:15Yardanico"namespace"
21:08:34FromDiscord<tomck> errrrrrr
21:08:41FromDiscord<tomck> so what about sequtils & everything else
21:08:45FromDiscord<tomck> that still works
21:08:54Yardanicoyes, but for all new modules it's only std/stuff
21:08:56Yardanicoyou can do the same for old ones
21:08:59Yardanicowhich is the recommended way
21:08:59FromDiscord<tomck> or is it just new modules? Should i be writing `import std/` for 'forwards compatibility'?
21:09:12Yardanicoimport std/[sequtils, times, strutils, with]
21:09:14FromDiscord<tomck> oh so it's recommended to write just sequtils, not std/sequtils?
21:09:16Yardanicoyou can do it like that
21:09:21Yardanico@tomck it's better to use std now
21:09:22FromDiscord<tomck> i see
21:09:25FromDiscord<tomck> right, ok
21:09:38FromDiscord<tomck> cool, thanks
21:09:43FromDiscord<scott> _revises open nim file_
21:10:31FromDiscord<scott> it's not really very clear in the discord app there that I did the /me thing :/
21:27:03FromDiscord<Clyybber> disruptek why
21:27:10disruptekwhy what?
21:27:15FromDiscord<Clyybber> why does it break the emit
21:27:16*tane quit (Quit: Leaving)
21:27:24disruptekbecause e_ != e.
21:27:39FromDiscord<Clyybber> but old mangling isn't e either
21:27:46disruptekwhy not?
21:27:48FromDiscord<Clyybber> right?
21:28:02FromDiscord<Clyybber> old mangling is e_18r81948929482ihe9s
21:28:10FromDiscord<Clyybber> figuratively speaking
21:31:06FromDiscord<Clyybber> disruptek
21:31:21disruptekwell, i guess not, right?
21:31:35disrupteki'm not making this stuff up.
21:31:41disruptekmuch as i'd like to.
21:31:58FromDiscord<Clyybber> why does old mangle not mangle it
21:32:33FromDiscord<Clyybber> isn't emit supposed to use ` anyways?
21:33:00FromDiscord<Clyybber> I don't remember, but can you try throw `e`
21:34:01disruptek/home/adavidoff/git/Nim/nimcache/tests/compiler/tcppCompileToNamespace.nim_f6f87c9fdcf8b3c3f07f93f1ee8712c9/stdlib_system.nim.cpp:3222:9: error: ‘e’ was not declared in this scope; did you mean ‘e_’?
21:34:06disruptek 3222 | throw e;
21:34:08disruptek | ^
21:34:09disruptekdoes that help?
21:34:11disruptek | e_
21:34:58disruptekit's literally pushCurrentException(e_); throw e;
21:35:15disruptekmight just be a codegen bug due to laziness.
21:35:38disruptekanyway, i am trying to figure out foo_int.
21:36:42disruptektfThread had some special handling once but i took it out. now it seems to be biting me again.
21:39:44*solitudesf quit (Ping timeout: 256 seconds)
21:44:15FromDiscord<kodkuce> is nim community growing it feels like more post and stuff
21:44:42FromDiscord<scott> this is just after a release, it's pretty common for a surge of community activity after a major release
21:45:18Zevvkodkuce: Ive heard there's dozens of us
21:45:26FromDiscord<ElegantBeef> Atleast 10
21:45:40FromDiscord<scott> I know that's why I'm here. As soon as I heard Nim had ARC I started trying to learn
21:46:27*gmaggior quit (Quit: Leaving)
21:46:49FromDiscord<scott> at least 560 of us! https://github.com/nim-lang/Nim/graphs/contributors
21:47:03FromDiscord<Yardanico> that's not the best way to measure :)
21:47:04FromDiscord<Clyybber> disruptek ah ok, did you implemennt the solution to the order problem?
21:47:06FromDiscord<Yardanico> also check github nim projects
21:47:41FromDiscord<Yardanico> there are at least 473 nim repos on github updated in the last month
21:47:44FromDiscord<Yardanico> https://github.com/search?q=language%3Anim+pushed%3A%3E2020-09-21
21:49:55disruptekclyybber: yep.
21:51:56FromDiscord<kodkuce> hmm duno i feal like it got 30% buff
21:52:01Yardaniconah
21:52:09Yardanicothere are a lot of people who use nim but don't chat here at all
21:52:30FromDiscord<kodkuce> i was saying in total, forums, reddit hacker news
21:52:53FromDiscord<scott> reddit and HN definitely blow up at release time for any language
21:52:55FromDiscord<kodkuce> like in last 2-3 months we got 30% more people
21:52:59Yardaniconot really :)
21:53:07Yardanicoreddit and hacker news are just active after articles and new releases
21:53:08FromDiscord<kodkuce> :(
21:54:18leorize[m]1this release was big though
21:54:18leorize[m]1and a lot more positive
21:54:59leorize[m]1we saw a bigger boom in activity compared to 1.2 release for sure (I guess it's kinda expected when people stay home)
21:55:12disruptekironic, because it doesn't actually have any banner features.
21:55:29FromDiscord<Recruit_main707> True
21:55:37disrupteki think it's more about "hmm, .4 release of stable. i guess it's getting usable."
21:56:07disruptek"it's starting to look like there might be something to this nim thing..."
21:56:12FromDiscord<scott> personally, I don't know why, but I didn't hear about ARC at 1.2. If I had I would've gotten more involved then. I really do think some of it comes down to luck or timing
21:56:17FromDiscord<dom96> Yardanico: sshshhhh
21:56:36FromDiscord<scott> @disruptek ↵↵This but unironically lol
21:56:48Yardanicohe wasn't ironic :)
21:57:17leorize[m]1we're on a steady path to world domination :P
21:57:31disruptekalso, people that talk about nim at a 1.4 release are people that played with it as a result of the 1.2 release. and so on.
21:57:39FromDiscord<Recruit_main707> It’s all coming together.gif
22:02:22*a_b_m joined #nim
22:03:32FromGitter<matrixbot> `✾ Lum` hi there
22:04:26leorize[m]1hi, please join our chat via the matrix irc bridge to avoid being double bridged
22:04:28leorize[m]1~matrix
22:04:28Yardanicodon't use matrix->gitter
22:04:29disbotmatrix: 11Nim channels on Matrix can be found at +nim:asra.gr (https://matrix.to/#/+nim:asra.gr)
22:04:32Yardanicoyeah this
22:05:44*abm quit (Ping timeout: 256 seconds)
22:06:29*Lum[m] joined #nim
22:06:40leorize[m]1welcome :)
22:07:11FromDiscord<ElegantBeef> Nice got anon tuples to be parseably by json in nim, but not nimscript
22:08:24FromDiscord<ElegantBeef> `attempt to access a nil address` ah yes so much information
22:08:29Yardanicoimport segfaults
22:08:36Yardanicoand enable stack traces
22:08:45Yardanicooh, well if you're in the vm it won't help much probably
22:10:01*Lum[m] is now known as lum[m]
22:10:41FromDiscord<ElegantBeef> any ideas what's wrong here https://play.nim-lang.org/#ix=2Bqh
22:10:43leorize[m]1snippets please if it's the VM :P
22:10:55FromDiscord<iWonderAboutTuatara> Are variables destroyed with each iter of a loop?
22:11:19leorize[m]1it depends on what you mean by destroyed
22:11:30FromDiscord<ElegantBeef> Yea leorize i was getting it, just had to format it since there's the large amount of docs for the `to` proc
22:11:39FromDiscord<iWonderAboutTuatara> Is the value reset
22:12:08FromDiscord<ElegantBeef> They're scoped variables
22:12:14leorize[m]1@iWonderAboutTuatara yes
22:12:47FromDiscord<iWonderAboutTuatara> Are they destroyed/dealloced?
22:12:59FromDiscord<iWonderAboutTuatara> Also, is there a for/else or while/else or equivalent
22:13:16FromDiscord<scott> in regards to the latter question, yes
22:13:26FromDiscord<iWonderAboutTuatara> What's the syntax for it?
22:13:29FromDiscord<iWonderAboutTuatara> I looked and didn't find
22:14:21FromDiscord<scott> crap, nvm, must've been thinking of another language https://play.nim-lang.org/#ix=2Bqj
22:14:45FromDiscord<scott> oh, I was thinking of pony. sorry
22:15:52FromDiscord<ElegantBeef> I'm guessing there is an issue with the VM in that the result isnt intialized?
22:16:05FromDiscord<iWonderAboutTuatara> No worries
22:16:29FromDiscord<iWonderAboutTuatara> Should be possible via macros or templates but the syntax will be too ugply to be worth it
22:17:06FromDiscord<scott> sent a code paste, see https://play.nim-lang.org/#ix=2Bqm
22:18:56*rockcavera joined #nim
22:19:16FromDiscord<ElegantBeef> Leorize here is a usable example https://play.nim-lang.org/#ix=2Bqo
22:19:29FromDiscord<ElegantBeef> Works in nim but not the vm
22:22:25*sagax quit (Ping timeout: 244 seconds)
22:23:38FromDiscord<ElegantBeef> Weirdly the issue is just with anon tuples https://play.nim-lang.org/#ix=2Bqs
22:23:47leorize[m]1https://play.nim-lang.org/#ix=2Bqp <- you can open a bug report now
22:25:35FromDiscord<ElegantBeef> I assume any of these examples will suffice?
22:29:57*NimBot joined #nim
22:30:14FromDiscord<ElegantBeef> @Avatarfighter look what you made me due, i found a bug...
22:30:19FromDiscord<ElegantBeef> (edit) "due," => "do,"
22:30:46leorize[m]1you can open a report with both :P
22:30:48FromDiscord<Avatarfighter> whoops 🤷
22:31:16FromDiscord<ElegantBeef> I mean it's the same error so doesnt really matter as it's the same issue
22:32:42FromDiscord<ElegantBeef> After this is fixed i'll probably PR to add support to the json library for serializing/deserializing tuples
22:32:53FromDiscord<ElegantBeef> As someone forgot to actually allow the serializing of them
22:33:43FromDiscord<ElegantBeef> https://github.com/nim-lang/Nim/blob/devel/lib/pure/json.nim#L361
22:33:54FromDiscord<ElegantBeef> it's meant for objects/ tuples but only... accepts objects
22:34:45FromDiscord<scott> how will that work? For example, what if you try to `parseJson("[\"one\", 2, 3.0]").to(tuple[float, string, int])`, vs `parseJson("[\"one\", 2, 3.0]").to(tuple[string, int, float])` since most JSON serializers don't pay attention to order
22:35:38FromDiscord<scott> idk, maybe they do, but a JSON list to a tuple doesn't seem like a straightforward conversion to me
22:35:43FromDiscord<ElegantBeef> It stores the data in `field0`, `field1`, `field2`
22:36:21FromDiscord<ElegantBeef> So you can only parse it into the proper tuple type with the same ordering
22:36:32disrupteki serialize named tuples to objects and unnamed to array.
22:36:33FromDiscord<scott> oh ok
22:36:35disruptek!repo jason
22:36:36disbothttps://github.com/disruptek/jason -- 9jason: 11JSON done right 🤦 15 29⭐ 1🍴
22:37:08FromDiscord<ElegantBeef> Im weary of all serializing libraries that arent in the stdlib 😄
22:37:20disruptekweary or wary?
22:37:24disruptekor are you wooly?
22:38:00FromDiscord<ElegantBeef> wary
22:38:05FromDiscord<ElegantBeef> Due to needing it to run in the VM 😄
22:38:06FromDiscord<scott> disruptek, I was talking about deserializing a JSON `Array<Union<Int, Float, String>>` into a tuple of arbitrary order of all 3 types
22:38:21FromDiscord<ElegantBeef> I serialize anon tuples into an object aswell
22:38:25FromDiscord<ElegantBeef> As it makes the most sense
22:38:40disruptekonly if they have name.
22:38:42disruptekonly if they have names.
22:38:49disruptekno names, no sense.
22:38:51FromDiscord<scott> @ElegantBeef huh?>
22:38:52FromDiscord<scott> (edit) "huh?>" => "huh?"
22:39:03disruptekthere's no such thing as Union in JSON.
22:39:08FromDiscord<ElegantBeef> Well without names it's fine since tuples are ordered pairs
22:39:19FromDiscord<ElegantBeef> and nim lets us extract the `field#` using `fieldPairs`
22:39:30disruptekeh field# is a hack.
22:39:30FromDiscord<ElegantBeef> well order groups rather
22:39:31FromDiscord<scott> disruptek, I meant the typescript type notation for the JSON representation of some data
22:39:42disruptektypescript can kiss my ass.
22:39:52FromDiscord<scott> fair enough
22:39:52disruptekit's right up there with bob marley and van morrison.
22:39:54FromDiscord<ElegantBeef> Well yes, but considering my main goal is nimscript interop i think it's fine
22:39:58FromDiscord<Avatarfighter> I love typescript
22:40:32FromDiscord<ElegantBeef> Named tuples serialize no problem as they're just fugly objects, anon tuples practically just have fieldnames as their properties
22:40:57disruptekhow is that not more accurately an array?
22:41:21disruptekField0, Field1 ... this is just noise.
22:41:21FromDiscord<nikki> i don't like typescript either but i wanna hear why you dislike it
22:41:28FromDiscord<scott> but my point is that the type of `["one", 2, 3.0]` is ambiguous. Is it an array of a union type or a tuple of 3 values? If it's a tuple, how do you deserialize it? I.E. do you associate by order or by type
22:41:44FromDiscord<ElegantBeef> Tuples are ordered so if my goal is to save tuples yes
22:42:01FromDiscord<ElegantBeef> An array works aswell as field names
22:42:07disruptekfirst of all, if the types aren't the same, it's not an array or even a seq.
22:42:10disruptekobvs.
22:42:29FromDiscord<ElegantBeef> Yea which is why i didnt use an array, as tuples arent uniformed types
22:42:36FromDiscord<ElegantBeef> the field names are free and sitting there
22:42:42disruptekit's a tuple because it's immutable and so, what else?
22:43:01disruptekthe field names aren't free, for two reasons:
22:43:12disruptekthey cost money to serialize, and they cost money to deserialize.
22:43:25FromDiscord<scott> but JSON doesn't have tuples, only arrays
22:43:29FromDiscord<ElegantBeef> I meant free as in they're not something i have to implement
22:43:31disrupteknot my problem.
22:43:46disrupteki only care about compile-time serialization/deserialization.
22:43:49FromDiscord<ElegantBeef> I was using index but the index couldnt be evaluated at compile time 😄
22:43:55disruptekwut
22:47:03FromDiscord<ElegantBeef> Guess you dont need the index
22:48:01FromDiscord<ElegantBeef> This works fine aswell i guess https://play.nim-lang.org/#ix=2Bqx
22:48:19FromDiscord<ElegantBeef> But still have that vm issue i cant work around
22:48:55*PMunch quit (Quit: leaving)
22:48:56*rockcavera quit (Read error: Connection reset by peer)
22:49:06*tiorock joined #nim
22:49:06*tiorock quit (Changing host)
22:49:06*tiorock joined #nim
22:49:06*tiorock is now known as rockcavera
22:51:07*tiorock joined #nim
22:51:07*tiorock quit (Changing host)
22:51:07*tiorock joined #nim
22:51:07*rockcavera is now known as Guest45396
22:51:07*Guest45396 quit (Killed (card.freenode.net (Nickname regained by services)))
22:51:07*tiorock is now known as rockcavera
22:53:05*rockcavera quit (Killed (beckett.freenode.net (Nickname regained by services)))
22:53:05*rockcavera joined #nim
23:08:12FromDiscord<notchris> Hello all, does anyone remember the question from yesterday regarding csfml and how it has procedures for passing uniforms to gl shaders
23:08:54FromDiscord<notchris> So I was able to pass values to a shader, worked alright, but now im thinking for some reason that when i pass an array of vec2s, its not getting the whole array
23:09:31FromDiscord<notchris> The length of this array is 3, correct? `var col: colors = [vec3(255.0, 0, 255.0), vec3(255.0, 0, 0), vec3(255.0, 255.0, 0)]`
23:09:51leorize[m]1yes
23:10:01FromDiscord<notchris> Good so im not crazy 😄
23:10:20FromDiscord<notchris> So then i pass the array to the shader via this procedure
23:10:25leorize[m]1it'd be better if you can tell us how you did it so we can diagnose the issue
23:10:30FromDiscord<notchris> ` wbShader.setVec3UniformArray("colors", col[0], 3)`
23:10:42FromDiscord<notchris> And the question from yesterday was about the second parameter
23:11:01FromDiscord<notchris> `graphics.setVec3UniformArray: proc (shader: Shader, name: cstring, vectorArray: var Vector3f, length: int){.cdecl.}`
23:11:16FromDiscord<notchris> Specifically `vectorArray: var Vector3f`
23:11:32FromDiscord<notchris> Which appears to want to have me pass only the first array item
23:11:46leorize[m]1what wrapper are you using?
23:11:57FromDiscord<notchris> lemme grab the doc one sec
23:12:42FromDiscord<notchris> im using `https://github.com/oprypin/nim-csfml`
23:12:51*rockcavera quit (Remote host closed the connection)
23:12:52FromDiscord<notchris> But i think Prestige shared a more recent doc
23:12:55FromDiscord<notchris> looking
23:14:01FromDiscord<scott> oh man oprypin just has to show up everywhere lol
23:15:24FromDiscord<notchris> someone you know? 😄
23:15:35leorize[m]1the wrapper looks terrible by today standards though
23:15:37leorize[m]1but I guess sfml is not really popular in Nim
23:16:31FromDiscord<notchris> 😦
23:16:41FromDiscord<notchris> i thought it would be fun to try, maybe im better off with sdl2?
23:16:42FromDiscord<scott> yes he's a very common contributor to Crystal, for example https://github.com/oprypin/crsfml
23:17:01FromDiscord<dom96> it works well
23:17:06FromDiscord<dom96> I used his wrapper before
23:17:16FromDiscord<notchris> Ooo never heard of crystal, cool
23:17:30FromDiscord<notchris> so if im passing everything right, maybe its my shader?
23:17:39FromDiscord<notchris> but someone in the OpenGL IRC told me the shader should be fine
23:17:55FromDiscord<notchris> Which makes me wonder if the uniform array values are being passed correctly
23:18:09FromDiscord<dom96> the only complaint I have about it IIRC is that it was inconsistent with SFML's method names
23:18:30FromDiscord<notchris> Well that and the latest doc isnt online
23:18:30FromDiscord<scott> yeah I've been doing a lot of crystal the past couple years but development has pretty much ground to a halt and it's got a lot of significant problems, while nim's development is at a really nice steady pace
23:18:36FromDiscord<notchris> you have to generate your own to have latest doc
23:18:38leorize[m]1judging from his activities I guess he jumped ship to crystal
23:18:39leorize[m]1wrapping array as `var` is terrible
23:18:54FromDiscord<notchris> so am i right to only pass the first array item
23:18:55FromDiscord<notchris> ?
23:19:05FromDiscord<notchris> is it really passing the whole array
23:19:19leorize[m]1@scott that's weird considering how crystal seems to have much better tooling regarding FFI compared to nim :P
23:19:35leorize[m]1@notchris it should be correct
23:19:37leorize[m]1but the wrapper is still terrible in that aspect
23:19:49FromDiscord<notchris> well the thing is
23:19:51leorize[m]1can't say much because that might have been the only way to do it a few years back
23:19:59FromDiscord<notchris> the shader apparently is correct, but nim spits out this error
23:20:07FromDiscord<notchris> `Error: unhandled exception: value out of range: 2 notin 0 .. 1 [RangeDefect]`
23:20:08FromDiscord<scott> I haven't tried FFI in Nim yet, but writing Crystal bindings was a genuine pleasure. They definitely have that down for sure
23:20:30FromDiscord<notchris> in any case, maybe i should consider a different renderer
23:20:38FromDiscord<notchris> i just liked how easy it was to pass uniforms
23:20:45FromDiscord<ElegantBeef> Checkout aglet
23:20:57FromDiscord<ElegantBeef> !repo aglet
23:20:57FromDiscord<notchris> Ooo i think i saw that one briefly, lemme check it out again
23:20:58disbothttps://github.com/liquid600pgm/aglet -- 9aglet: 11A safe, high-level, optimized OpenGL wrapper and context manager. 15 12⭐ 1🍴
23:21:15FromDiscord<notchris> Oh dang
23:21:17FromDiscord<ElegantBeef> Super easy to use
23:21:24FromDiscord<notchris> yeah this doesn't look too bad 😄
23:21:40FromDiscord<ElegantBeef> It also feels like idiomatic nim 😄
23:22:11FromDiscord<notchris> it just sucks that
23:22:17FromDiscord<notchris> glsl is not easy to debug in vscode
23:22:17FromDiscord<Recruit_main707> Crystal bindings work in a similar way to nim ones if I remember correctly
23:22:24leorize[m]1@scott yep their tooling on FFI appears to be top-notch. Nim only has a strong FFI facility, the tooling to make them is not very mature yet
23:22:31FromDiscord<ElegantBeef> use nimsl instead 😄
23:23:00FromDiscord<ElegantBeef> Nimsl implements a faux gpu so you can debug shaders like they're cpu code
23:23:22FromDiscord<notchris> oh yeah @ElegantBeef any time i try to use aglet
23:23:25FromDiscord<notchris> i get `SIGABRT: Abnormal termination.`
23:23:32FromDiscord<notchris> from any of the examples
23:23:42leorize[m]1ping @lqdev
23:23:59FromDiscord<ElegantBeef> What OS?
23:24:22FromDiscord<scott> sent a code paste, see https://play.nim-lang.org/#ix=2BqK
23:24:51FromDiscord<notchris> osx 10.15 @ElegantBeef
23:25:00FromDiscord<ElegantBeef> Ah mac + opengl D:
23:25:03FromDiscord<notchris> i know i know
23:25:08FromDiscord<scott> then you would be able to call `SomeLib.function 1, 2`. How would that work in Nim?
23:25:10FromDiscord<notchris> but i usually have no problem with gl
23:25:11FromDiscord<ElegantBeef> It's' 3.3 though i believe
23:25:13FromDiscord<Yardanico> @scott proc function(a, b: cint): cint {.importc.}
23:25:31FromDiscord<Yardanico> @scott proc function(a, b: cint): cint {.importc, header: "myheader.h".}
23:25:31FromDiscord<scott> hah, seriously? That's even nicer
23:25:44FromDiscord<ElegantBeef> So it should work on mac, although he recently did just showcase it in #gamedev working there
23:25:59FromDiscord<ElegantBeef> Did you try most recent aglet version chris?
23:26:15FromDiscord<notchris> yeah i just reinstalled on nimble
23:26:20FromDiscord<notchris> i could make an issue
23:26:36FromDiscord<notchris> nimble pulls latest, right?
23:26:41FromDiscord<ElegantBeef> just for shits and gigs `nimble install aglet@#head`
23:26:49FromDiscord<notchris> yeah lemme try
23:27:06FromDiscord<ElegantBeef> It should fetch most recent, but eh software will be software
23:27:18FromDiscord<notchris> Yeah it fails at `glfwCreateWindow`
23:27:21FromDiscord<notchris> with sigabrt
23:27:32FromDiscord<ElegantBeef> I hope you have glfw installed 😄
23:27:45leorize[m]1update your glfw I guess?
23:27:49FromDiscord<notchris> hmm i should
23:27:54FromDiscord<notchris> lemme check my brew version
23:28:20FromDiscord<notchris> 3.3.2?
23:28:24FromDiscord<ElegantBeef> 3.3.2.1 here
23:28:35FromDiscord<notchris> reinstalling rn
23:28:35FromDiscord<ElegantBeef> Actually i dont have either installed 😄
23:28:41FromDiscord<notchris> lets see if that helps
23:29:03FromDiscord<scott> buen suerte
23:29:23FromDiscord<notchris> gracias, no es justo
23:29:31FromDiscord<notchris> mas dificil
23:29:42FromDiscord<Recruit_main707> buena, but not bad
23:29:43FromDiscord<notchris> my spanish is awful sorry
23:30:00FromDiscord<ElegantBeef> My spanish is aswell, considering i dont know any spanish
23:30:13FromDiscord<Recruit_main707> Bruh
23:30:14FromDiscord<scott> thanks @Recruit_main707
23:30:48FromDiscord<notchris> omg
23:30:54FromDiscord<notchris> it must have been glfw
23:30:59FromDiscord<notchris> reinstalled on brew and now it works
23:31:16FromDiscord<ElegantBeef> Yay we did it!
23:31:17FromDiscord<notchris> 😅
23:31:19FromDiscord<notchris> WOO
23:31:28FromDiscord<ElegantBeef> I'm still confused why i can open a window without glfw installed
23:31:34FromDiscord<notchris> 😮
23:31:57FromDiscord<scott> _hates the partyparrot thing_
23:32:04FromDiscord<notchris> you should have said 'gl'
23:32:09FromDiscord<notchris> would have also been funny btw
23:32:30FromDiscord<notchris> drumhit
23:35:32FromDiscord<scott> at least the partyparrot isn't as bad as on slack where it's animmated even when the window is unfocused. So distracting when you're trying to work
23:36:24FromDiscord<exelotl> I'm kinda scarred by partyparrot tbh
23:38:05FromDiscord<exelotl> at my previous job there weren't really any good emotes besides that, so it became the default reaction for almost every situation
23:38:21FromDiscord<scott> oh god
23:38:28FromDiscord<scott> I'm so sorry
23:38:30FromDiscord<ElegantBeef> You guys are all laid off, but it's ok cause we have :partyparrot:!
23:39:27FromDiscord<Yardanico> tfw #main has more offtopic than #offtopic
23:41:20*astronavt joined #nim
23:46:40FromDiscord<MiniApple> hi
23:46:55FromDiscord<MiniApple> ~~is nim popular?~~
23:47:49miprihttps://www.tiobe.com/tiobe-index/ - top 100 but not top 50.
23:49:13FromDiscord<Yardanico> huh
23:49:18miprihttp://www.modulecounts.com/ has nimble < dub, but with a more promising slope, and crystal and Julia several thousand modules ahead though no particular slope difference.
23:49:22FromDiscord<Yardanico> they actually added zig in this release and told its exact position
23:49:27FromDiscord<Yardanico> "Adrian Arroyo Calle suggested to add the Zig language to the TIOBE index. Zig meets all criteria and enters the TIOBE index at position #114. Thanks for this suggestion, Adrian!"
23:56:48FromDiscord<MiniApple> oh lol thank
23:57:28FromDiscord<Yardanico> but yeah, nim isn't "popular" in the main definition of "popular"
23:58:16FromDiscord<MiniApple> is there some game engine?
23:58:57FromDiscord<ElegantBeef> You can use godot
23:59:05FromDiscord<MiniApple> hmm
23:59:05mipriand there were some NimConf 2020 videos about games: https://www.youtube.com/channel/UCDAYn_VFt0VisL5-1a5Dk7Q/videos
23:59:38FromDiscord<MiniApple> ok
23:59:49FromDiscord<ElegantBeef> You can also make your own engine using SDL2 or opengl 😄
23:59:53FromDiscord<MiniApple> @ElegantBeef i don't like game engine like godot,unity,unreal