<< 12-01-2020 >>

00:00:02*junland_ quit (Quit: %ZNC Disconnected%)
00:00:03arecaceaeoh there's closure iterators nice!
00:00:11arecaceaegonna check them out right away
00:00:47*junland joined #nim
00:02:25arecaceaebeautiful, worked and provides a neat API, thanks!
00:09:47*lxbarbosa quit (Remote host closed the connection)
00:11:00*krux02_ joined #nim
00:15:16*krux02 quit (Ping timeout: 268 seconds)
00:15:46*xet7 quit (Remote host closed the connection)
00:19:35*krux02_ quit (Remote host closed the connection)
00:30:20*ltriant joined #nim
00:35:52disrupteki understand how to fix it in the user's code and i understand what the problem is, but i don't know what the right solution for the compiler side is.
00:46:14*Hideki_ joined #nim
01:14:39*lritter quit (Quit: Leaving)
01:34:26*ltriant quit (Ping timeout: 265 seconds)
01:49:11*Hideki_ quit (Ping timeout: 268 seconds)
01:59:42*voltist joined #nim
02:03:49voltistDoes anyone know if there is a more efficient alternative to Nim's hash tables? Objects provide good performance, but I need to be able to get values with ["key"] syntax
02:07:59FromDiscord<treeform> are your keys random strings or only an N set of strings?
02:09:26FromDiscord<treeform> there are things that can map strings to values, like trees ... but that have different tradeoffs. Associative arrays can also be faster if number of items is very small.
02:09:52FromDiscord<treeform> have you compiled with -d:release or -d:dangaer to see if your code is fast in release mode?
02:14:30voltistOh yeah I forgot about -d:release during this test. The difference in performance between objects and tables is similar in release mode, but at least the lesser performance of the tables is acceptable
02:14:42voltistI think it will do for now
02:23:37FromDiscord<treeform> how many elements are your hash tables?
02:27:35voltistOnly 4, which is why I was so surprised at the poor performance
02:29:46disruptekwut
02:44:47*mollusk joined #nim
02:44:52*mollusk is now known as silvernode
02:45:23disrupteknow i've seen everything.
02:51:00disruptekyou have to admit, this compiler is like, the greatest playground we've ever seen.
02:52:19disruptekdo a lot of people choose a language for the wrong reasons?
02:53:05voltistLike what?
02:53:24disruptek~motd is do a lot of people choose a language for the wrong reasons?
02:53:25disbotmotd: 11do a lot of people choose a language for the wrong reasons?
02:53:39disruptekthat's what i'm asking.
02:54:08disruptekdo we think that people choose languages for the right reasons?
02:54:26voltistI hope so
02:55:16disruptekso you're saying that because why?
02:55:26disruptekbecause nim compares favorably to its competition?
02:55:46disruptekor because you just want to believe that people agree with you as to language strengths?
02:57:45disruptekyou know that all those languages that are winning are full of similar commuties. larger communities.
02:58:11disruptekthere are more people who think this isn't the next language than there are who think it is.
02:58:59voltistWell thats unfortunate, because that inbalance would make the former correct
03:00:02disruptekpoint is, there's perspective to both sides. and more perspective on the other side.
03:00:34disrupteki just really don't understand what i'm missing about this language.
03:03:22disrupteki just don't get it.
03:03:47disruptekyou can get as low as you want to go and, and safely.
03:04:51disruptekbut you have elegance and expression over python.
03:05:12disruptekyou've got huge flexibility in memory models.
03:05:21disrupteksuperior ffi.
03:05:36disrupteklisp at compile time.
03:05:43disruptekruntime of raw c.
03:06:08disruptekportability of c, but no need for undefined c behaviors.
03:06:40disruptekyou've even abstracted away the backends.
03:07:49disruptekpluggable gc. pluggable exceptions. hot code reloading.
03:08:10disruptekllvm if you want it.
03:08:56disruptekwhat makes this such a bitter pill.
03:09:32disruptekmixed case?
03:09:35disruptekwhitespace?
03:10:43disruptekwhat is it that turns people off?
03:12:14disruptekit's like there's a long tail of programmer taste and we're just at the end of it.
03:15:03disrupteki wonder if the syntax is too flexible; it becomes a turn off for some people.
03:17:15disruptekno one is getting paid to write it.
03:17:18disruptekthat's the problem.
03:17:59disruptekso we need to target the people who hire nim programmers.
03:18:24disruptekwhat do those people want?
03:24:00disruptekwe gotta get viktor's talk out there.
03:26:15disruptekneed to do more streaming. i think we should try to put together a channel.
03:30:04disruptekdoesn't seem like it'd be too hard to get 2hrs/week out of a fairly long list of people.
03:30:25*ltriant joined #nim
03:31:06disruptekthat's a lot of content.
03:31:13disruptekthat's content that people want to see.
03:31:26disruptekit's cheap for to us to make.
03:31:35disrupteker, you get the gist of that.
03:31:58disruptekit pays dividends for us forever after we create it.
03:35:45*ltriant quit (Ping timeout: 265 seconds)
03:41:30disrupteki'm having one of those moments where you try to remember if you've done everything you need to do before booting a linux box.
03:41:46disrupteky'know, after having os'd it.
03:41:55disruptekfrom live media.
03:42:14disruptekit's amazing to me that this is a thing.
03:42:48disruptekit's just so absurd that such an emotion could be reduced to a meme over the course of our lifetimes.
03:52:42*muffindrake quit (Ping timeout: 260 seconds)
03:54:57*muffindrake joined #nim
04:08:43*dddddd quit (Ping timeout: 260 seconds)
04:09:42silvernodedisruptek: I settled on Nim recently after years of figuring out what I want in a language. Nim lets me be free in many ways including style. I love Nim
04:11:07silvernodedisruptek: The project needs videos that target a scope from start to finish like making a game or a calender, just something from start to finish and regularly.
04:11:22silvernodewith good audio quality and editing.
04:12:12disruptekediting is hard, though.
04:12:17disruptekwell, i find it hard.
04:13:48disruptekokay, you say scope... and that means, what? 12 episodes at 1hr/ea?
04:15:44silvernodedisruptek: just a program to build. The program in question is the scope
04:15:54silvernodeLike "today we are building a calculator"
04:16:23silvernode"Today we are making a calendar"
04:16:26disruptekokay, so it's a 20min episode but maybe it's not 20min real time.
04:16:38silvernode"Today we are focusing on the garbage collector.
04:16:48disruptekright, right.
04:16:49silvernodeyeah
04:17:03silvernodeWe need clear and well spoken learning material
04:17:04disruptekokay, huh. i like that.
04:17:46silvernodeI say this is what we need because I was searching youtube for help to learn the language since that's the best way I learn and I could hardly find anything
04:18:29silvernodeWhat I did find was on bad microphones, not planned out and very unorganized and was not very engaging.
04:19:13disruptekit seems like pretty imposing challenge to me.
04:19:59silvernodeI say the editing doesn't have to be good, just the content. Even if these programs are very small
04:20:27disruptekright.
04:20:44silvernodeI would like weekly videos on one tiopic broken up over a month.
04:21:08silvernodepart one comes out one week, then part 2 the next until we get to the end of the month.
04:21:34silvernodecould plan to do 6 topics a year or something
04:21:41disruptekokay. i'm starting to see how this works.
04:22:04disruptekokay, this is a real campaign, isn't it?
04:22:31silvernodeThink of it this way, we have to be engaging to get engagement
04:22:55shashlickwhat's up gang
04:23:06disruptekwe're brainstorming.
04:23:24disruptekalso, i'm pretty sure i just munched on a bug that fell in my water.
04:24:09silvernodedisruptek: The water has a bug, so you need to file a report :)
04:24:12disrupteki had this moment where i realized, hey, sometimes you're the big hairy ape and sometimes you're the bug that's getting pulled out of its teeth.
04:24:53voltist Extra protein
04:25:02disrupteki'm getting in touch with my inner ape these days.
04:25:18silvernodesomeone on void linux irc: <lemmi> silvernode: as i said. without any other means to structure blocks, autoformatting is basically impossible and it's one feature of new languages i learned to love and rely on and i kind of see no excuse not to have it
04:25:55silvernodeSeems the most critical complaint is the whitespace
04:26:08disruptekoh, autoformatting.
04:26:33disrupteki guess that could be a thing. i think they mean auto-format like `go fmt`, right?
04:26:50disruptekwhere there's just, like, one true way.
04:26:53disruptekstylistically.
04:28:13disruptekwow, that's kinda rough.
04:28:20disrupteka rough kinda thing to be known for.
04:28:26FromGitter<matrixbot> `silvernode` yeah like gofmt
04:28:43FromGitter<matrixbot> `silvernode` i thought we had nimpretty
04:28:55disruptekwe do, but it's not super opinionated.
04:29:03disruptekit's not rigid in its output.
04:30:37disruptekit's surprising, but i guess it /would/ be, right?
04:31:05disrupteki mean, what's your least favorite part of the language?
04:31:18disruptekwhat's the thing that most irritates you.
04:31:40FromGitter<matrixbot> `silvernode` The whitespace
04:31:47FromGitter<matrixbot> `silvernode` needing to care how Indent
04:31:57disruptekwow.
04:32:03FromGitter<matrixbot> `silvernode` how I indent.
04:32:13disruptekso you agree with the other complaint?
04:32:31FromGitter<matrixbot> `silvernode` but I am over the whitespace thing these days.
04:32:41disruptekoh.
04:32:50disruptekbut it was the biggest irritant, right?
04:33:42FromGitter<matrixbot> `silvernode` i just got a bad taste from the first time I tried python 2 back in 2008. when editors were not standardized around language guidelines as well as they are now
04:34:03*nuxdie quit (Ping timeout: 245 seconds)
04:34:10FromGitter<matrixbot> `silvernode` i would get so many runtime errors
04:34:12disruptekahh, so, like tabs-vs-spaces at its worst?
04:34:21FromGitter<matrixbot> `silvernode` and all I was trying to do was learn.
04:34:24FromGitter<matrixbot> `silvernode` yeah
04:34:34disruptekyeah, that was a bad period in python.
04:34:40FromGitter<matrixbot> `silvernode` that stuff just got in the way
04:34:46disruptekit's funny to laugh about it now.
04:35:06*surma quit (Read error: Connection reset by peer)
04:35:11*Snowolf quit (Quit: No Ping reply in 180 seconds.)
04:35:18*surma joined #nim
04:35:18*euantor quit (Ping timeout: 245 seconds)
04:35:22FromGitter<matrixbot> `silvernode` seems like python 3 did something to help make life better but it could be the modern editors
04:35:33*nuxdie joined #nim
04:35:39*nimblepoultry quit (Read error: Connection reset by peer)
04:35:52*nimblepoultry joined #nim
04:36:14disrupteki guess it sorta depends on your editor.
04:36:20*snowolf joined #nim
04:36:41silvernodeThese days I use VSCode and I get a lot of hate from a lot of programmers for saying that.
04:37:23disrupteki used it for something. it was decent. probably was the best gui editor i'd used.
04:37:46silvernodePeople are stuck on the fact that it's made with electron
04:38:02disruptekelectron hasn't stood still, either.
04:38:13*MD87 quit (Ping timeout: 245 seconds)
04:38:28*euantor joined #nim
04:38:42silvernodeI mean I don't like the idea of running chromium just to have an editor but as long as it's optimized with low memory usage, I am ok with it.
04:38:50disrupteki'm not a great vimmer but i cannot imagine using anything else.
04:40:06silvernodeYeah I tried sticking with Vim and got decent with it but I didn't want to port around my config. With vscode I can get up and running from scratch in less than 10 minutes
04:40:13disruptekeditor support in these videos is key, isn't it?
04:40:59silvernodeI'd say so, and that's the other problem. Turning people away from watching the videos because of the editor the tutorial is using
04:41:09*MD87 joined #nim
04:41:38silvernodeI think at some point you just have to accept that people are going to stay closed minded though
04:42:14disrupteki think covering three or four editors doesn't seem like such a big ask.
04:43:24silvernodeit can just come down to 3 or 4 videos to reference on every tutorial. Click here for setting up Vim, click here for Vscode and here for geany or something like that
04:44:26voltistAnybody got any idea why 'fps' is always ~10 greater than X in this code for a game? https://pastebin.com/iS2muGKJ
04:44:39silvernodeFigure out what features you are going to be using in every video and then streamline those features in a Vim config so that people using Vim will have the same basic setup
04:44:49disruptekoh, you mean a different cut of the same tutorial but on a different editor?
04:45:49disruptekthese are editor tutorials?
04:45:50kungtottesilvernode: Getting up and running with vim for me takes however long it takes to pull init.vim from git, then for it to pull down the plugins I'm using. So 2-5 minutes maybe? By all means, use vscode, but that particular point is kind of a solved problem.
04:46:10silvernodeMore like, here is how you set up X editor for Nim on X editors. Make a video just about how to do that on each editor, then choose a static editor for the real tuytorial videos
04:46:46silvernodekungtotte: yeah I always forget about frameworks and git repos
04:46:47disruptekahh, okay.
04:47:54kungtotteYou don't even really need a plugin framework if you don't want. You can just track all of ~/.vim
04:49:25*jwm224 quit (Quit: WeeChat 2.8-dev)
04:49:39silvernodeThe appealing thing about Vim is that I can run it in tmux
04:50:19disruptekthey say there was a point at which you could do the same with emacs.
04:50:27disruptek😉
04:52:15silvernodeyou can't do that with Emacs?
04:52:28disruptekyou can, i'm just being rude.
04:52:33silvernodeha
04:52:58silvernodeEvery time I try emacs, I give up lol
04:53:14silvernodecording commands is just not intuitive to me
04:53:48disrupteki wish i'd known how entrentched my editor would be to my flow.
04:54:01disruptekor some kinda e-word.
04:54:11disrupteklike, pick a really juicey one.
04:55:56silvernodeSo in playing with nim I started programming in the way I always have but with nim it is not working. I know for sure I just don't know programming in general enough to do things a different way
04:56:13silvernodeI like to make functions be like menus and call them from each other
04:56:40disruptekmenus?
04:56:49disruptekoh, ui menus?
04:56:57silvernodeso like proc room1() = press 1 to get to room 2
04:57:18disruptekoh, so state machine.
04:57:51kungtotteYou have to declare functions before they are used, and if you're separating them into different files you need to export them using *. Is that maybe what's tripping you up?
04:58:04silvernodeand then on room3 call room1 which in Nim doesn't work because you have to declare the rom1 before room3 but then that breaks room2
04:58:30silvernodekungtotte: yeah
04:58:43disruptekso, you can forward declare a proc by repeating its signature without = and the body of the proc.
04:59:01silvernodeso then I thought I would start exporting from files but couldn't figure out what I was doing wrong because things still weren't working. \
04:59:42silvernodedisruptek: I didn't know that
05:00:14disruptekthat sounds frustrating.
05:00:50disrupteki was really frustrated by methods. i'm still a little peeved by them.
05:01:15kungtottehttps://nim-lang.org/docs/tut1.html#procedures-forward-declarations
05:02:11disruptekso you figured out `*` first, i guess, huh?
05:02:37silvernodedisruptek: yep
05:03:30disruptekthat's not a great story.
05:03:42disruptekit's a bad thing to get wrong.
05:03:53silvernodekungtotte: Ah yesh I think I read about this in Nim-in action
05:04:03silvernodeReminds me of how C does things
05:04:10silvernodethis is the key to what I want to do
05:05:12silvernodeDo I have to define a return type though?
05:05:48disruptekyeah.
05:05:49FromDiscord<Rika> hello
05:05:51FromDiscord<Rika> whats up
05:05:57kungtotteIf the actual proc has a return type, yes. The forward declaration had to match the actual declaration.
05:06:00disrupteksorry, took me awhile to understand the question.
05:06:16kungtottes/had/has/
05:06:16disrupteksup rika
05:06:43FromDiscord<Rika> someone asking for help?
05:07:11silvernodeyeah it was me
05:07:13disruptekyou saw the bat sign?
05:07:26silvernodechinken or the egg problem with functions calling functions
05:07:32disruptek~motd
05:07:33disbotmotd: 11do a lot of people choose a language for the wrong reasons? -- disruptek
05:07:57FromDiscord<Rika> like what reasons hmm
05:09:04silvernodeI finally chose nim because I wanted binaries for portability, cross compilation and easy syntax like python. Nim is the only language I could find that fit all of those
05:09:06disruptekpick any you like, i think.
05:10:03disruptekyeah, those are good reasons.
05:10:22disruptekthis is the problem.
05:10:29silvernodeRika, were were talking earlier about ways to get people outside of the Nim community to engage more and learn Nim
05:10:30disruptekor, this is the question we're trying to answer.
05:11:08disrupteki'm trying to figure out if we're in a selection bias or what.
05:11:23FromDiscord<Rika> prolly, because of indention
05:11:51disruptekit's really like religion, right?
05:12:14silvernodeI know I for one did not know all of the cool things Nim could do until I read for more than 5 minutes. Before that I would mess around for a bit with some code and move on. I thing we need video projects the go out of their way to make use of the cool features of Nim that aren't apparent from the surface.
05:12:28silvernodethink*
05:12:50disruptekyou think the other side are crazy for making it about syntax, because the syntax is fine! of course, you wouldn't dream of considering their language, because of the syntax.
05:13:29silvernodeWhat whitespace does is bring in the new commers and alienate the gray beards.
05:13:45disruptekso that means we can control for syntax. all that remains is the people who care about something else.
05:14:44FromDiscord<Rika> also brings in the pythonistas looking for speed
05:14:46kungtotteThe indentation is always so weird to me. Everyone is already doing it, but because the language is opinionated about it it's suddenly a VERY BIG PROBLEM.
05:15:10silvernodeWhat I would really like to see in Nim is the option to terminate code blocks without whitespace with some kind of compile flag. I totally understand though that this would mean having to gut the compiler and basically start over...or would it?
05:15:20kungtotteThe case insensitivity is more understandable that people care about.
05:15:27FromDiscord<Rika> kungtotte, everyone does it but not manually; people can leave the formatter to indent their code
05:15:49FromDiscord<Rika> for indention based languages, you have to manually indent (if the indent level is wrong)
05:15:53disruptekwell, i don't get the case issue. the very point of it is that case doesn't matter.
05:15:59FromDiscord<Rika> (auto when making a new line so thats nice)
05:16:06disruptekterminate code blocks without whitespace? what does this mean?
05:16:17FromDiscord<Rika> basically add braces
05:16:28*narimiran joined #nim
05:17:20silvernodenim c --no-whitespace hello.nim # either braces or an end keyword. Basically this flag tells compiler to ignore indention so I can do what I want.
05:17:20disrupteki guess that makes some sense.
05:17:31disruptekthat's probably the best argument i've ever heard for braces.
05:17:42FromDiscord<Rika> no end keywords please
05:17:42disruptekit might just sway me, honestly.
05:18:08disruptekwell, it just feels like an obvious hack to say a lot with a little.
05:18:09FromDiscord<Rika> also there's the argument araq made i think that you can use parens as braces
05:18:25disruptektrue.
05:19:04disruptekokay, so that's a price you pay with nim.
05:19:05FromDiscord<Rika> and it does work
05:19:09disruptekand python.
05:19:32silvernodeI always like to visually see where my code blocks end instead of having to look at how it is indented and figure it out.
05:19:54disruptekoh, are you counting?
05:20:02FromDiscord<Rika> ok it doesnt work 100% just tested it
05:20:09disrupteklike, 1 glyph, 2 glyph, 3 glyph...?
05:20:37FromDiscord<Rika> also i dont see how an end char is any different to looking at the indent
05:20:48silvernodeI think the whitespace does make sure code is readable to others who might read your code. I just wish there was a language that made it possible for me to turn it off.
05:21:03disruptekit's easier to count braces than it is to count spaces.
05:21:28silvernodedisruptek: yes because I can see braces
05:21:37disruptekright.
05:21:47disrupteki'm trying to restate that for rika.
05:21:50FromDiscord<Rika> ~~argument that your text editor should be able to highlight the level~~
05:21:50disbotno footnotes for `~argument`. 🙁
05:21:59silvernodeI learned something today though, more than one person on more than one IRC channel hates the end keyword.
05:22:32silvernodeI have never heard of anyone hating on the end keyword. I find it interesting.
05:23:00silvernodeI quite like it myself. I first saw the end keyword in Lua
05:23:10FromDiscord<Rika> it is annoying
05:23:34silvernodeMan I love Lua. There's just something about it. Although one thing I hate is that numbers start at 1 and not 0
05:23:34FromDiscord<Rika> needing to type end is of course longer than either unindenting or close bracket
05:24:04silvernodeAh I see, it's the typing it out all the time that bugs people
05:24:08disruptekthe oughts were tough, man.
05:24:20disruptekthings like numbers were just gettin' started.
05:24:27silvernodewe should make up a new keyword
05:24:31disrupteknumbers just got started at 1.
05:24:44disruptekseem like a good first number.
05:25:16silvernodeI like things starting from 0. Otherwise we pretend that 0 is not a number and that's just silly
05:25:24disrupteklol
05:25:33disruptekwell said.
05:25:47silvernodeI actually haven't paid much attention to what Nim starts at.
05:25:56disruptekthat quote needs to be on the nim website.
05:26:15silvernodedisruptek: You like that hu? :) thanks
05:26:34silvernodeEvery now and then I say something wiorthwhile.
05:26:35FromDiscord<Rika> nim can have arrays starting at 1
05:26:40disrupteksure.
05:26:55silvernodeCan I make an array start at 0 if I'd like?
05:27:05FromDiscord<Rika> that's by default
05:27:05silvernodeI haven't gotten to arrays in the book yet
05:27:26FromDiscord<Rika> but afaik seqs can only start at 0, unless im mistaken
05:31:14*ltriant joined #nim
05:32:43silvernodetrying to find a browser based live code editing site so we can have some fun. Every time I have used one of those in the past, people end up teaching me a lot of stuff and we all learn.
05:33:22disruptekwhy aren't we assigning a sentinel value to pointers before we return then? if they aren't alloc0d, wouldn't that let us check to see if they are leaked?
05:34:08disrupteki mean, i know we're not guaranteed to hit, but we might.
05:34:33disruptekespecially with a deterministic allocator.
05:36:33*ltriant quit (Ping timeout: 268 seconds)
05:38:35silvernodeWow, found a live coding site, they have every syntax highlighting under the sun, except Nim
05:39:04silvernodeThey have Pascal, Julia ACL but no Nim,
05:40:56silvernodehttps://codeshare.io/5RX9XQ
05:41:10disruptekwe probably need to figure out where these places get their highlighting and send a pr.
05:41:51disruptekoh, this is literally live.
05:47:55disruptekso if you abstract these to nodes, you can just specify a series of "rooms" by creating nodes.
05:48:21disruptekthen the menus and numbers are handled for you once, on the node.
05:48:58silvernodeso that's basically what I was trying to do with my real code
05:49:09silvernodeby the way you can edit the document at any time
05:50:16silvernodeGoing for objects, how did I know! I am not good with the more abstract stuff. I have been trying to wrap my head around objects for years
05:50:23*martinium joined #nim
05:51:23silvernodefeel free to change my stuff. I need to use the restroom, brb
05:57:20silvernodeback
05:58:06silvernodeoh man, maps. I didn't get that far yet. I almost got the hang of maps in Go but I think they were different concepts
05:59:33disruptekthe map is just a collection of rooms.
05:59:47disruptekrooms are differentiated by their names.
06:00:07disruptekthat's an operator.
06:00:27disruptekwe're definition addition for two rooms as in `room1 + room2`
06:00:37disruptekthe result is a map (a collection of rooms).
06:00:47disruptekMap, rather.
06:02:16silvernodethat's awesome
06:02:41silvernodeI have been wanting to make a text based space game for a long time and maps is something I need to get used to
06:03:04disrupteki started coding seriously on muds.
06:03:31silvernodeoh really? I love muds
06:03:39skrylar[m]i kind of remember moo's
06:04:00disruptekalways looked down on moos because they were more high-level.
06:04:03FromDiscord<Rika> okay so maybe rooms should have "left right up down" fields or so, referencing another room
06:04:03disruptekscripty.
06:04:32silvernodeRika yeah that's what we need
06:04:58silvernodeI guess just strings for direction?
06:05:10FromDiscord<Rika> then you just make a proc like `Room.move` which takes an enum of directions
06:05:15FromDiscord<Rika> enum!!!
06:05:19FromDiscord<Rika> enums are great
06:05:31FromDiscord<Rika> you can use strings for the human interface
06:05:33disruptekwhy, some of my best friends are enums.
06:05:40FromDiscord<Rika> but in the back an enum would be great
06:05:53disruptekan enum in the back is very fine, indeed.
06:06:10silvernodeI really need to finish the book, sounds like I need to learn enums asap
06:06:20disrupteklol
06:07:06silvernodeI have only known the basic concepts for 10 years now. everything language, I don't get beyond arrays
06:07:08FromDiscord<Rika> the field can actually just be an array of 4 rooms...
06:07:22FromDiscord<Rika> since an enum can be converted into integers...
06:07:29FromDiscord<Rika> ...which can be used as the index for the array
06:07:38disruptekyes, that's the idea.
06:07:45disruptekbut you have to store the name of the room.
06:07:46silvernodebasic question, what are enums useful for?
06:07:53FromDiscord<Rika> a lot of things
06:08:04silvernodecommon use cases?
06:08:13FromDiscord<Rika> when you want to hard limit options
06:08:24FromDiscord<Rika> like for the directions
06:08:39FromDiscord<Rika> if it were a string instead, you'd need to account for an unknown strin
06:08:41FromDiscord<Rika> g
06:08:41disruptekthere's like uniquely symbolled grouped ordinals.
06:08:47FromDiscord<Rika> ill have to go now
06:09:07silvernodeThanks Rika
06:09:36kungtottedisruptek: you could store references to actual room objects in the array, then getting the name is just a room.name away
06:09:53silvernodeI am going to try to put the directions in an array
06:10:10silvernodeI just need to remember the syntax
06:10:10disruptekthat's what the map is.
06:10:48njosephWhat is the representation for an empty character in nim? '' is not working in a replace.
06:11:19disrupteki think you want "".
06:11:31silvernodeI don't know if that will work in an array
06:11:34silvernodeassignments
06:11:40silvernodeline 7
06:12:22disruptekweirdly, it almost does work.
06:12:29njosephI'm just trying to strip off backslashes in a string.
06:12:30njosephurl.replace('\\', '')
06:12:45disruptekyou need to define the enum on its own line; it needs a complete definition of members.
06:13:00silvernodehow do you mean?
06:13:14disrupteklookup the syntax to the enum type.
06:13:20silvernodeok
06:13:24silvernode1 sec
06:13:38disrupteknjoseph: try using strings, not characters.
06:14:26njosephdisruptek: Yes, that works. Thanks
06:16:00silvernode"Notice that each element in CompassDirections is prepended with cd to avoid name conflicts since references to the enum value do not need to be qualified."
06:16:09silvernodeNot sure what qualified means here
06:16:33silvernodeit's just an enum with cdNorth, cdSouth etc..
06:16:39disruptekqualified with the enum type name as in `MyGroup.MyUnit`
06:17:00disruptekbecause it's not {.pure.}
06:17:14silvernodeI guess I just don't understand the lingo
06:17:38disruptekthe cd is short for CompassDirections.
06:17:48silvernodeoh ok so that's the group
06:18:12disruptekthey'll saying that they chose the names cdFoo, cdBar, etc.
06:18:12silvernodethat way you can use North and South in another enum without conflicts
06:18:16disruptekright.
06:18:46silvernodebut if you know you are only going to have one enum with those properties then you use {.pure.}
06:19:07disruptekno, you might have something like
06:19:43disruptektype Fire = enum Hot, VeryHot, Burny
06:19:51kungtotteTypically when something is said to be qualified in programming, they mean writing out the full name/path to the individual things. You can see this with imported modules as well. Let's say you import the os module, you can write "getCurrentDir()" or you can write "os.getCurrentDir()". The second is said to be qualified.
06:20:15disruptekand you want people to specify it as Fire.Hot, Fire.VeryHot, and Fire.Burny
06:20:32silvernodekungtotte: so like namespaces
06:20:46skrylar[m]True, False, FileNotFound
06:21:00disruptekyeah, that was a bad example because i'm dumb.
06:21:04disruptekOn, Off
06:21:11disruptekthose are more obvious.
06:22:51silvernodeso enums with {.pure.} need to have the namespace written out like Colors.Red
06:23:02disruptekright.
06:23:12disruptekoutside of the module in which they are defined.
06:23:31silvernodewithout {,pur.} you need a way to tell the difference between the properties.
06:23:44silvernodelike cdNorth
06:24:07disruptekright, because you're using it in enum DogNames, too.
06:24:37silvernodeI see
06:25:14silvernodeso again, if you make something qualifies, you should make sure it's the only instance you are going to be using
06:25:24silvernodequalified*
06:26:06disruptekno, they aren't static.
06:26:16kungtotteVice versa. If it's qualified it doesn't matter how many times you repeat the "cdNorth" part in other enum definitions
06:26:22disruptekthey are just symbols for ordinal values.
06:27:05silvernodeSo it's literally only the difference between writing out the namespace and not writing it out?
06:27:14disruptekright.
06:27:16kungtotteIf you *don't* qualify the name, Nim doesn't know if you mean directions.North, DogNames.North, or KanyesKidsNames.North
06:27:29silvernodeOh ok
06:27:29disruptekthis.
06:27:46silvernodeso making things qualified means to be specific when talking to Nim
06:28:04disruptekyes.
06:28:09kungtotteYes, it's providing Nim with the place to look for whatever it is you're talking about
06:28:20silvernodeTell nim what you really want
06:28:26disruptekreally.
06:28:30silvernodedon't leave it up to nim to guess
06:28:41Zevvwhat you really really want
06:28:50disruptekclear communication can be a matter of life and death.
06:28:51silvernodeZevv: rofl
06:28:56disruptekespecially in the bedroom.
06:29:18disruptekgood morning, zevv
06:29:25Zevvok, you might as well talk about seqs then
06:29:44silvernodeZevv: They were helping me with my rooms problem: https://codeshare.io/5RX9XQ
06:29:52Zevvmornin disruptek. is it not time you did some eye shut as well, youve been overflowing my scrollback
06:29:57disruptekprovide nim with the place to look for whatever it is you're talking about.
06:30:03silvernodeThey started using enums at the top, I just had functions
06:30:18Zevvah the rooms, I remember that, good!
06:30:19disrupteklol
06:30:59silvernodeZevv: Then on line 7 I tried putting that in an array which I don't think will work at all
06:31:47disruptekit almost does due to a neat quirk of syntax.
06:32:02silvernodedisruptek: tell me more
06:32:09disruptekyou can do [index: value, ...] in arrays.
06:33:05disruptekso you can do [cdNorth: room1] for example, if you get the order right.
06:34:12silvernodedisruptek: oh ok so it works but you'd probably want to do it a different way like make an array later and put the enum in there.
06:34:35disruptekyou don't put the enum in there; you put rooms in there.
06:34:52disruptekthe enum is sufficient as an index because, remember, it's really just a simple ordinal.
06:34:58disruptekan integer.
06:35:06silvernodeI think I need an example of how to use the code you wrote
06:35:17silvernodehow to start calling rooms and such
06:36:00disruptekno, zevv says i have to hit the hay.
06:36:06disruptekgn
06:36:15silvernodeI don't know how I would use the proc on line 22
06:36:24silvernodedisruptek: oh ok
06:36:24silvernodelol
06:36:35silvernodehit they hay then
06:37:21FromGitter<jivank> is there a way to create a proc that takes a proc and can read the input proc signature? like proc foo(p: proc) ... dumpParamAndParamType(p) so for p(x: int, y: string) a seq[tuple[string,AnyKind]] will be dumped out in the order they are defined
06:37:44FromGitter<jivank> or whatever the type for type is
06:40:27silvernodeFromGitter: sounds very specific. I'd help if I weren't such a noob
06:40:27FromGittersilvernode, I'm a bot, *bleep, bloop*. I relay messages between here and https://gitter.im/nim-lang/Nim
06:44:51silvernodeDoes anyone else besides me use Void Linux?
06:45:00silvernodejust curious
06:45:24silvernodeI always feel like an outlier
06:52:12kungtotteI run Void both on my desktop and my server, and as soon as I get around to it my laptop will as well
06:58:41FromGitter<sheerluck> ~gentoo
06:58:41disbotno footnotes for `gentoo`. 🙁
06:58:50FromGitter<sheerluck> 🙁
07:00:04kungtottesheerluck: did you know that Gentoo is an ancient Native American word for "masochist"? ;)
07:01:48FromGitter<sheerluck> I know
07:02:34FromGitter<sheerluck> That's how I roll
07:08:12FromDiscord<Rika> jivank, maybe a macro is what u need
07:08:30FromDiscord<treeform> I think what makes a language popular is the number of jobs you can find using the language. Big companies don't choose niche languages but some startups do. If they become successful then number of jobs grow. We need more companies using Nim to grow. If next Facebook or Google used Nim that would make it grow quick.
07:14:17*oculuxe joined #nim
07:17:04*oculux quit (Ping timeout: 268 seconds)
07:18:33*oculux joined #nim
07:19:14*solitudesf joined #nim
07:20:50*oculuxe quit (Ping timeout: 240 seconds)
07:32:06*ltriant joined #nim
07:32:48FromGitter<sheerluck> @treeform If @Araq wrote https://nim-lang.org/araq/12_reasons_why_you_should_learn_Nim_in_2020.html and Google abandoned Go Lang and used Nim that would make it grow quick.
07:36:50*ltriant quit (Ping timeout: 240 seconds)
07:41:27silvernodekungtotte: I started using Void back in 2014. You probably use some packages either directly packaged by me or requested for others to packe. Calcurse is one example, deluge torrent is another
07:41:45FromGitter<Varriount> @sheerluck That link doesn't appear valid
07:41:53silvernodeThere are a few others that I have since abandoned
07:44:13FromGitter<sheerluck> @Varriount I hope @Araq will make it valid soon
07:46:10silvernodeSo, my friends complained about the various secure messengers I kept having them use so I said screw it and started hosting my own xmpp server again. Man I missed xmpp
07:47:56kungtotteI like the idea of Delta Chat. It's a messenger for me and anyone who installs it, it's email for everyone else. It's not e2e unless it's Delta to Delta and you set it up, but then I treat all digital communications as compromised in the first place.
07:49:53silvernodekungtotte: Delta is a new one for me. I thought I had used them all but apparently now
07:50:29*ptdel quit (Quit: https://quassel-irc.org - Chat comfortably. Anywhere.)
07:51:25silvernodekungtotte: Looking at delta chat: Holy crap this is exactly what I have been looking for. My friend will faint.
07:53:21silvernodekungtotte: I might try packaging this for Void, this is amazing
07:54:22silvernodehuh...it's electron
07:54:40silvernodecould be a pain in the butt to package
07:55:36silvernodeI'm happy they have an appimage though\
07:56:17silvernodetoo bad the flatpak is outdated
07:57:20*chenhq2005 joined #nim
07:57:59silvernodeyo chenhq2005
07:58:03silvernodewelcome
08:00:00*gmpreussner quit (Quit: kthxbye)
08:04:50*gmpreussner joined #nim
08:09:11*martinium quit (Quit: My MacBook has gone to sleep. ZZZzzz…)
08:15:08*chenhq2005 quit (Ping timeout: 258 seconds)
08:25:33FromDiscord<Rika> hey silvernode i'm back
08:25:40FromDiscord<Rika> so what're the plans again?
08:25:56FromDiscord<Rika> oh wow what happened to this enum
08:26:25silvernodewb
08:26:43silvernodeOnly plan is to make a space game in text
08:26:57FromDiscord<Rika> i mean the code share link
08:27:05FromDiscord<Rika> the enum is weird; i dont think it's valid syntax
08:29:27silvernodeI have no idea, someone started "fixing it"
08:31:39silvernodeI only wrote the room procs, I have no idea how to use the code in practive at the top
08:32:30FromDiscord<Rika> so that's wrong syntax
08:32:36FromDiscord<Rika> let me fix it
08:35:06silvernodeah yes the result var. I learned about that in the book
08:35:16silvernodeIf not define, it takes on a default value
08:35:51FromDiscord<Rika> which, for "ref object" types, is `nil`
08:36:57silvernodehmm, not sure which proc to start calling
08:37:20silvernodethe name of those procs is +
08:38:05FromDiscord<Rika> no no, the new proc
08:38:20FromDiscord<Rika> i think its not a proc actually, i dont know
08:38:26silvernodenewRoom?
08:39:24silvernodeoh I see how that works
08:39:34silvernoderoom + room + room
08:40:17*lj00nal quit (Ping timeout: 260 seconds)
08:43:53FromDiscord<Rika> actually
08:44:16FromDiscord<Rika> i dont think we even need to make a map type
08:44:24FromDiscord<Rika> since we have the adjacentRooms field
08:44:53FromDiscord<Rika> (but that means we have to traverse each room to see the whole map
08:45:07silvernodeworking on setting up a live stream so we can run the code and both see it
08:46:12FromDiscord<Rika> 👀
08:46:22FromDiscord<Rika> i'll be leaving soon though
08:46:39silvernodeyeah I should probably get to bed anyway
08:46:50FromDiscord<Rika> i have a few minutes
08:46:51FromDiscord<Rika> 15
08:47:08FromDiscord<Rika> okay lets try removing the map type we dont need that
08:49:45silvernodeforget the streaming, I'm on Wayland
08:49:48*nsf joined #nim
08:50:02silvernodeback in codeshare
08:50:14silvernodeso what did I miss?
08:51:06*ljoonal joined #nim
08:54:10FromDiscord<Rika> uh
08:54:16FromDiscord<Rika> me making a weirdproc
08:54:18FromDiscord<Rika> weird proc*
08:54:30silvernode'left'?
08:54:51skrylar[m]wayland has some streaming support; at least wlroots (sway) does
08:55:03skrylar[m]not sure how you do it with weston (something about pipewire)
08:55:16silvernodeskrylar[m]: I'm using Plasma
08:55:45FromDiscord<Rika> silvernode, yeah that one
08:55:56silvernodeskrylar[m]: [-] wlroots-0.8.1_1 Modular Wayland compositor library
08:56:01FromDiscord<Rika> i'm prolly gonna overwhelm you if i continued though
08:56:06silvernodeskrylar[m]: Looks like it's not even installed
08:56:21silvernodeRika, probably
08:57:15skrylar[m]silvernode: you'll have to deal with pipewire rigging then https://phabricator.kde.org/T7785
08:58:12skrylar[m]i don't have a lot of experience with it though; if you can pipewire->rtmp or if you have to pipewire->gstreamer->rtmp it
08:58:41silvernodeskrylar[m]: I am just trying to stream with OBS to youtube
08:59:22silvernodeskrylar[m]: [-] wf-recorder-0.2_1 Screen recorder for wlroots-based compositors
09:00:07FromDiscord<Rika> silvernode, i just locally wrote something somewhat complex so maybe i'll leave that local
09:00:29silvernodelol
09:00:38silvernodeI'm watching
09:03:29ZevvAr_q: you mentioned the allocators strings and seqs use are legacy, is that something that should be changed?
09:07:58*lritter joined #nim
09:09:54voltistOh no, I'm hours apon hours into a project and I've just realized that I haven't written ANY comments and I'm going to have to go through and comment everything
09:10:26Zevvwhy?
09:10:41silvernodeGood code needs no comments right?
09:11:02ZevvI'm years into some projects and I added maybe, 10 comments
09:11:24silvernodeI never make comments unless it's something I struggled to understand at the time
09:11:54voltistIt needs comments because a) I struggle to understand my own code often and b) I intend to open source it soon
09:12:06Zevva) is a good reason :)
09:13:40voltistSometimes I write algorithms which work very well, and when I come back to them after not having thought about it in a while I can't figure out how they work
09:14:06voltistIt's a part of the human condition specific to programmers
09:28:48FromGitter<Varriount> I put comments in to act as spacing. Kinda like headings in a document
09:32:59*ltriant joined #nim
09:33:42*arecaceae quit (Remote host closed the connection)
09:34:00*arecaceae joined #nim
09:37:48*ltriant quit (Ping timeout: 245 seconds)
09:44:27*oculux quit (Ping timeout: 268 seconds)
09:47:55*oculux joined #nim
10:03:18*luis_ joined #nim
10:05:25*narimiran quit (Ping timeout: 268 seconds)
10:13:15*solitudesf quit (Ping timeout: 240 seconds)
10:13:35*Vladar joined #nim
10:15:52*luis_ quit (Quit: luis_)
10:18:56*luis_ joined #nim
10:23:30*voltist quit (Remote host closed the connection)
10:26:58*letto_ quit (Quit: Konversation terminated!)
10:28:09*letto joined #nim
10:36:08*nsf quit (Quit: WeeChat 2.7)
11:20:18*dddddd joined #nim
11:25:57*luis_ quit (Ping timeout: 260 seconds)
11:33:51*ltriant joined #nim
11:39:03*ltriant quit (Ping timeout: 260 seconds)
11:47:10*silvernode quit (Ping timeout: 268 seconds)
12:01:22*kungtotte quit (Read error: Connection reset by peer)
12:02:06*kungtotte joined #nim
12:18:07*nsf joined #nim
12:41:28FromDiscord<Rika> Tip, I think vs code and jetbrains products supports region comments (#region {name} and #endregion)
13:13:01*Vladar quit (Quit: Leaving)
13:20:17*nsf quit (Quit: WeeChat 2.7)
13:27:12FromGitter<Albus70007> how can i make my own `*` function and pass it a float and a Vector3?
13:27:24FromGitter<sheerluck> func `*`
13:27:50Yardanicoproc `*`(x: float, y: Vector3): Vector3 =
13:28:06FromGitter<Albus70007> and to make it public?
13:28:15FromGitter<Albus70007> it throws me an error
13:28:20Yardanicoproc `*`*(x: float, y: Vector3): Vector3 =
13:28:35*xet7 joined #nim
13:30:24FromGitter<Albus70007> i think it works now, thank you
13:32:06ZevvAraq: are you available for a few questions?
13:34:47*ltriant joined #nim
13:39:17*filcuc joined #nim
13:40:01*ltriant quit (Ping timeout: 268 seconds)
13:56:48FromDiscord<mratsim> you might want to use nim-glm @Albus70007
13:56:53FromDiscord<mratsim> !repo nim-glm
13:56:54disbothttps://github.com/stavenko/nim-glm -- 9nim-glm: 11glm library to operate vectors and matrices(inspired by https://github.com/g-truc/glm) 15 46⭐ 12🍴
14:05:29*tane joined #nim
14:09:48*solitudesf joined #nim
14:10:30*uvegbot joined #nim
14:12:52*zyklon quit (Ping timeout: 248 seconds)
14:12:59enthus1astdom96: i've changed my email in the forum and received the email confirmation link, but on validation it tells me: "link expired" and i cannot send another one.
14:18:34enthus1astok i've changed it back to my old mail and back to my new mail but there should be a "resend confirmation link" button
14:20:29enthus1astbut now i'm moderated :D
14:21:28dom96yeah, we have an issue for this
14:21:31dom96what's your nick?
14:21:47*dom96 wonders why people don't click these links immediately
14:22:29enthus1astenthus1ast
14:23:04enthus1astchanged my email and was not aware of this ;)
14:23:10dom96fixed
14:23:13enthus1astty
14:27:14enthus1astbtw, must i login to gravatar to change the user image?
14:29:43dom96yep
14:30:46*filcuc_ joined #nim
14:31:23*filcuc quit (Ping timeout: 268 seconds)
14:32:46*abm joined #nim
14:37:49*sschwarzer joined #nim
14:38:38sschwarzerAs far as I can tell, there's no easy way to print a full PEG datastructure (peg module)? See https://play.nim-lang.org/#ix=27e0 I also didn't find anything in the module documentation.
14:38:49sschwarzerpegs module, not peg
14:39:39*nixfreak quit (Ping timeout: 240 seconds)
14:41:00enthus1astsschwarzer: echo repr examplePeg
14:42:58sschwarzerenthus1ast: Thanks! Tried it, and noticed that I had probably tried it. :-) Ok, this gives the full structure, but it's not very readable. I wonder if it wouldn't be useful to print it the same way it was entered.
14:43:49enthus1asti don't know how peg is implmented, but i guess it is a macro that does transform the entered string into ast
14:43:52sschwarzer"entered" = created with `peg"..."`
14:45:11sschwarzerenthus1ast: yes, as far as I can tell it creates a tree you can iterate over etc. (although I don't know if it's a macro). I may be able to write some pretty-printing proc, but wanted to make sure I didn't overlook something "obvious" :)
14:45:26sschwarzerhttps://nim-lang.org/docs/pegs.html
14:47:10enthus1astecho $examplePeg only prints (B 'c')
14:47:18enthus1astso i guess nothing obvious :)
14:47:38sschwarzerenthus1ast: That's my point :)
14:47:46sschwarzerOk, maybe semi-obvious ;)
14:49:57sschwarzerBy the way, the documentation on `$`(r: Peg) says "converts a PEG to its string representation", so maybe this is/was intended to print more
14:55:08*Trustable joined #nim
14:55:36sschwarzerInteresting ... the definition of `$` (the called proc `toStrAux`) looks very much to be intended to work recursively ( https://github.com/nim-lang/Nim/blob/version-1-0/lib/pure/pegs.nim#L521 ) so maybe its a regression
15:00:24*ljoonal quit (Quit: ljoonal.xyz)
15:11:30*ljoonal joined #nim
15:13:23*ng0_ joined #nim
15:13:23*ng0_ quit (Changing host)
15:13:23*ng0_ joined #nim
15:16:25*ng0 quit (Ping timeout: 258 seconds)
15:17:05*jwm224 joined #nim
15:21:01*ng0_ is now known as ng0
15:35:33*ltriant joined #nim
15:35:50*marmotini_ joined #nim
15:36:16blackbeard420is there any builtin way to build and link the nim stdlib as a shared library. instead of static linking it into each nim binary. i got it to work by manually building the generated stdlib c sources into a shlib but was curious if theres a builtin way for it
15:40:45*ltriant quit (Ping timeout: 265 seconds)
15:40:53disruptekthere /should/ be, right?
15:51:13Zevvgood morning, disruptek
15:51:55disrupteksup zevv
15:54:33disruptekhearts and minds! people! hearts! and their minds!
15:54:36*filcuc_ quit (Quit: Konversation terminated!)
15:59:18disrupteknim is betamax for pl. change my mind.
15:59:20disruptek~motd
15:59:21disbotmotd: 11do a lot of people choose a language for the wrong reasons? -- disruptek
16:03:36FromDiscord<Rika> are you implying nim will fail?
16:03:45disrupteknah.
16:04:32blackbeard420nim is too dank to fail
16:04:58*lritter quit (Quit: Leaving)
16:07:13*marmotini_ quit (Remote host closed the connection)
16:07:48*marmotini_ joined #nim
16:08:08disruptekthis guy is serious about his dank.
16:08:18*marmotini_ quit (Remote host closed the connection)
16:08:35*marmotini_ joined #nim
16:09:48*marmotini_ quit (Remote host closed the connection)
16:10:22*marmotini_ joined #nim
16:11:22*abm quit (Quit: Leaving)
16:14:19FromDiscord<Rika> his dankness broke my dankmeter
16:24:11*narimiran joined #nim
16:25:37*krux02 joined #nim
16:25:38Zevvdisruptek: not mutch. Been digging through the alloc code to see if I can get lower to zero, but I need some insights from araq to truly understand the why's
16:26:02disrupteklower to zero allocs?
16:26:54Zevvzero overhead
16:27:07disrupteki don't understand why we don't make a special allocator that helps debug the gc.
16:27:20disruptekis that a good idea or is it dumb?
16:27:28Zevvwhy special, what should it do?
16:27:42disruptekarrange the memory with lots of fences and tripwires.
16:27:52Zevvnah use valgrind for that or libefence
16:28:09Zevvtogetehr with -d:useMalloc
16:28:20disruptekoh, useMalloc.
16:28:46disrupteklike, i don't understand why we paint memory with nil when freeing it.
16:28:56Zevvthe thing I'm looking at now is getting rid of some global struct with pointers to alloc/free functions which is only used by seqs and strs. Araq mentioned that is legacy, maybe it can go away. That will save me a bit of memory on the fight for zero overhead
16:29:31Zevvand we had a little chat yesterday about hooks and stuff, figuring out that 'weak' symbol definitions would be cool.
16:29:44disruptekyeah, i saw that.
16:29:49disrupteki like that idea.
16:29:58ZevvI tried to see what's needed for implementing that, but it touches quite some places that I don't know, so I'm leaving that for now
16:30:34disruptekit could be super useful for building really wild objects in nim.
16:30:44disruptekplugin systems, hcr, etc.
16:31:04Zevvright
16:39:48*marmotini_ quit (Remote host closed the connection)
16:40:21*marmotini_ joined #nim
16:43:29*marmotini_ quit (Remote host closed the connection)
16:43:45*marmotini_ joined #nim
16:46:49Araqhttps://github.com/nim-lang/Nim/pull/13117#issuecomment-573433632 fyi
16:46:51disbotfix #12998 nim doc regression
16:46:58Araqsince it keeps coming up
16:47:20*NimBot joined #nim
16:54:48AraqZevv, what's the problem? remove allocators.nim and the void* pointer in the codegen
16:55:29Zevvyeah, well, "remove", as in, just throw it out? seqs_v2 and strs_v2 use it
16:55:49Zevvso should those not use it, and use the default alloc instead? What about -d:threads then?
16:56:20Araqwell ok, it requires C codegen patches too
16:56:29Zevvyeah ok, I found those, that's ok.
16:56:39Zevvbut I was wondering about what strs_V2 should use instead
16:56:56Araqwell the code duplication is already bad
16:57:14AraqI suppose we need an allocators.nim that uses templates instead of function pointers
16:57:54Zevvbut with threading on, it still should use allocShared I guess?
16:57:54Araqor maybe we should use mmdisp.nim for it?
16:58:18Araqyeah, --threads:on --gc:arc means you get a "shared" heap
16:58:58ZevvI guess it all has some history, but I'm not yet sure which file has what role in the allocation. allocators.nim, alloc.nim, osalloc.nim, mmdisp.nim
16:59:19Araqthis is the cost we cannot avoid, else you cannot move things effectively. That's not Nim specific either.
16:59:33Zevvsure
16:59:53Araqwell alloc.nim -- Nim's TLSF based alloc/dealloc implementation, uses osalloc.nim to get memory from the OS
17:00:12Araqosalloc.nim -- get big chunks of memory from somewhere (mmap, malloc, etc)
17:00:28Araqmmdisp.nim -- dispatching logic for the different GCs nim supports
17:00:48Araqallocators.nim -- allocators for ARC's new strings and seqs, bad idea, to be removed.
17:00:58Zevvright, that makes sense
17:02:05Zevvwhen dropping the void*, something has to be retained to know if something was allocated in the first place, but that could change to a bool I guess
17:02:37Araqmake it a flag inside the 'capacity' field like the old runtime does
17:02:48Zevvright
17:03:12Araqalternatively, we can keep the field and turn it into a refcount
17:03:25Araqand then we can even keep shallow() and shallowCopy() support
17:03:34Zevvok, no promises but I'll fiddle about a bit. Not sure yet how to switch between default/shared allocators yet but that'll show up when I get there
17:03:49Araqand for strings we could even go for COW
17:04:27Zevvthat might surprise some people, although in practice it probably already is as soon as you hit a realloc
17:04:48Araqand RC == -1 can mean "wasn't allocated"
17:04:58ZevvRC?
17:05:02Zevvoh r
17:05:04Zevvrc
17:05:06Zevvright
17:05:23Araqbut yeah, probably not that wise, COW bites with me "use Nim for hard realtime" goals
17:05:26Araq*my
17:06:34Zevvwhen threads are enabled, seqs and strings are allocated with sharedAlloc, is that the same for all other allocations like `new`?
17:06:58Zevvand if so, shouldn't the switch be made at a lower level then. alloc() just doing the shared version when threads are on
17:07:08Araqexactly
17:07:09*ptdel joined #nim
17:07:58Zevvright, so in the end we should end up with one allocator instance being available at any time, the 'normal', the 'shared' and the 'malloc' ones, does that make sense?
17:08:38Zevvand alloc()/realloc()/free() are provided by template
17:08:58Araqnot sure, in the end everything uses malloc or our sharedAlloc
17:09:19Araqand sharedAlloc can be alloc if --threads:off
17:09:42Araqmalloc vs sharedAlloc is to be decided via -d:useMalloc
17:10:06Zevvyeah but then there are two toggles for 3 options.
17:10:13Zevvbut 2*2 = 4
17:10:23Zevvbut I see what you mean
17:10:34disrupteknew math.
17:11:07disruptekCOW can be impl inside there and then you have another toggle. 😉
17:11:19Zevvgood morning, disruptek
17:11:38disruptekit's a beautiful day.
17:11:44disrupteklike spring weather.
17:11:49Zevvin januari
17:11:53disruptekyep.
17:13:06FromDiscord<treeform> sheerluck, I don't think Google will switch to Nim you would need a new nimble company for that. I worked at google and they barely use Go. ... or Dart. Its only used by "cool" fringe teams most of Google is Java or JavaScript. C++ for critical sections.
17:13:23disruptekaraq: you're right. spreading packages across dirs is stupid.
17:14:33disruptekso what is the actual problem here. in #13117
17:14:34disbothttps://github.com/nim-lang/Nim/pull/13117 -- 3fix #12998 nim doc regression
17:15:00*Vladar joined #nim
17:15:30Zevvaraq, Im still not conviced: why not just make three versions of alloc()/realloc()/free(), and choose the right one depending on those switches? Move all the logic for selecting the allocator to one place so no one has to care anymore what to use - everythings uses alloc() only, which does the right thing always
17:17:41Zevvanywy, need to cook and fed the kids first etc
17:19:03disruptekwhat would be amazing about that design is, you could use one allocator to debug memory problems and then ship your code with a performance allocator.
17:19:40YardanicoZig has pluggable allocators like this actually
17:20:49disruptekyou can just swap allocators by switching out a lib?
17:25:20*nsf joined #nim
17:25:35disruptekmaybe you only need three calls in your api, but maybe more calls can let the implementations have more expressive semantics.
17:29:32*natrys joined #nim
17:32:13*lritter joined #nim
17:36:25*ltriant joined #nim
17:37:35FromDiscord<Rika> @treeform really? i thought go was pretty used in google, was that just a hoax?
17:37:50*Vladar quit (Quit: Leaving)
17:41:45*ltriant quit (Ping timeout: 268 seconds)
17:50:47*lritter quit (Quit: Leaving)
17:53:25AraqZevv, no, you misunderstand me, the way you describe it is how we can implement it indeed
17:54:11AraqRika: fwiw I heard new projects inside Google should be in Go now that it's considered stable enough
17:54:44Araqbut don't quote me on that, it's all hearsay
17:55:31disrupteki thought go was google's training wheels language.
17:56:04ZevvAraq: ok, all clear
17:56:30disruptekzevv you have a branch i can look at?
17:56:49disrupteki can see this becoming very useful very quickly.
17:59:19Araqand your math is wrong because -d:useMalloc has no thread-local vs shared distinction
17:59:31Araqso it's 3 different settings, not 4
17:59:50disruptekdon't forget the cow level.
18:00:03Araqthere is no cow level.
18:01:12Araqhttps://vignette.wikia.nocookie.net/diablo/images/f/fe/Cow03.jpg/revision/latest?cb=20090102095005
18:01:36disruptektotally a cow level.
18:10:03disrupteky'know, we have to solve the perf issue with arc, too.
18:10:32AraqI think crashes are more important
18:10:50Araqperf is gained by waiting for Zevv's and clyybber's PRs
18:12:59disrupteki will be able to look at the double free in a couple hours. it's not just the wrapped ref that's a problem, but the fact that it's a ref to a case obj. so it can't be that hard to find.
18:16:49Zevvdisruptek: zevv-os-ansic is the minimalism-branch
18:17:10Zevvif you wanna go low, do --os:any -d:noSignalHandler -d:useMalloc --gc:arc -d:danger --opt:size --stackTrace:off
18:23:36Araq-d:danger implies --stackTrace:off
18:25:03Zevvright
18:25:15Zevvbut now its even offer
18:25:22Zevvjust in case, you never know
18:25:58disruptekunplug it, and then turn the switch to off for good measure.
18:37:17Zevvyeah nice instantiateForRegion
18:38:02FromDiscord<Rika> im scared, i just found a 1.2m line file just full of hello world
18:38:07FromDiscord<Rika> i dont even remember why i have this file
18:38:34Zevvdid you happen talk to cadey a few weeks ago?
18:38:54Cadeyhi
18:39:12Zevvoi :) was it you doing the 1.2m hello world tests in different languages?
18:42:23FromDiscord<Rika> it was around 4 months ago
18:45:24FromDiscord<treeform> Can some one help me with closures? How can I pass and integer there: https://play.nim-lang.org/ How can i make it print 1, 2, 3, 4, 5 ...
18:45:44FromDiscord<treeform> I need some way to capture i
18:46:46ZevvclosureScope
18:47:02Zevvhttps://nim-lang.github.io/Nim/system.html#closureScope.t%2Cuntyped
18:47:07FromDiscord<treeform> Zevv thanks! some one had exact same question: https://forum.nim-lang.org/t/3193
18:47:29ZevvI was kind of surprised Nim does not do this by default, but then I remembered I also was surprised when I found out JS does it like that
18:48:06Zevvbtw, there is also capture: https://nim-lang.github.io/Nim/sugar.html#capture.m,openArray[typed],untyped
18:48:15Zevvwhich is better IMHO, as it is more explicit
18:48:54FromDiscord<Rika> treeform you sent a blank playground link lmao
18:49:17Araqcapture is not in 1.0
18:49:46FromDiscord<Rika> oh so what is?
18:50:00AraqclosureScope is
18:50:22Araqand yeah, Nim does it this way for easier JS interop indeed, it's sad
18:50:30Araqwell we also do it for async's speed
18:51:06Araqin retrospect we could put more effort into detecting the pattern and optimizing it but days only have 24 hours here in Germany
18:51:21Zevvrent a fast jet
18:53:11ZevvAraq: if this allocation rework would go all the way, do we still need an allocShared()? I feel alloc() should just do the right thing, so allocShared can go, right?
18:54:13FromDiscord<treeform> @Rika lol https://play.nim-lang.org/#ix=27fj, thanks Zevv, both capture and closureScope worked great!
18:57:43AraqZevv, right but keep in mind that ARC is actually about good interop with custom data types
18:58:08Araqand custom node based data structures can optimize for threadlocal allocations
18:58:25Araqso alloc vs allocShared stays for the precise control they offer
19:13:34FromDiscord<treeform> Araq, what was the story behind coro module? It looks like there was a decision a while back to go with coro or async, and async was chosen? Nothing in nim land appears to use coro.
19:14:55Araqwhen coro got submitted we already had async and coro had weird crashes on OSX
19:15:47Araqcoroutines also have stack size problems, nobody knows how to size them
19:16:55Araqin the end thread pool + async is what will win us most benchmarks, my prediction
19:19:11shashlickIf anyone wants any fixes or improvements in choosenim, now is the time
19:19:21*Kaivo quit (Quit: WeeChat 2.7)
19:19:22Araq64bit Windows support?
19:19:43Araqbut it's TV time here, bbl
19:19:54shashlickAm in bug fixing mode right now, have fixed a few and scrubbing the entire issue tracker
19:20:20Zevvok, so alloc and allocShared should stay. string and seq use allocShared by default then I assume
19:20:20shashlickAny priorities, feel free to comment or post new ones
19:20:37sschwarzershashlick: Awesome! :)
19:20:41shashlickAraq: once we post a bug fix release, I'll be implementing that
19:21:30shashlickMy backlog for new features is 99, 116, 123 and 128 so far
19:21:53shashlickBut would rather hear from the community what's most important
19:22:12sschwarzershashlik: You mean out of the four you mentioned?
19:22:38shashlickAnything goes, those are just ones I've seen so far
19:24:37sschwarzershashlick: What are the numbers, they all lead to very old issues. (I'm looking under https://github.com/nim-lang/Nim/issues/ )
19:25:57FromDiscord<mratsim> look in !repo choosenim
19:26:08FromDiscord<mratsim> !repo choosenim
19:26:09disbothttps://github.com/dom96/choosenim -- 9choosenim: 11 15 218⭐ 23🍴
19:26:22sschwarzermratsim: Oops, you were at choosenim, right. Sorry.
19:27:49sschwarzershashlick: I'd like #140 implemented. I also ran into this recently.
19:27:58shashlickappreciate more eyes on the issue tracker
19:28:21shashlickyes but that one needs a fix on the Nim side first
19:33:57sschwarzerRe #128, I usually don't use Windows, but I think this sounds like a good idea to make the Windows Nim experience more rounded.
19:34:43shashlickyep, that's #1 in the feature list
19:35:07shashlickit will include a -32 or similar flag to force 32-bit but default will become 64-bit on windows when arch supports it
19:35:17sschwarzerAlso #123 IMHO is a good idea. Although you can remove the directory, a user doesn't necessarily know this is possible without destroying anything.
19:35:37shashlickyep, it's in
19:37:15*ltriant joined #nim
19:37:39sschwarzershashlik: I mentioned it for priorization among your prioritized four tickets. ;)
19:37:58shashlickagreed
19:38:12sschwarzershashlick: I don't know how many you can do
19:40:21shashlickthere's no time limit so we can always release and then come back later on
19:42:37*ltriant quit (Ping timeout: 268 seconds)
19:45:39shashlicklooks like Araq's wishlist is still pending - that's on top - https://github.com/dom96/choosenim/milestone/1
19:48:26disruptek~closureScope is https://nim-lang.github.io/Nim/system.html#closureScop
19:48:26disbotclosureScope: 11https://nim-lang.github.io/Nim/system.html#closureScop
19:48:28disrupteke.t%2Cuntyped
19:52:45disruptekif it's not too much trouble, please tag this stuff so we can find it more easily.
19:53:22disruptek~closureScope is https://nim-lang.github.io/Nim/system.html#closureScope.t%2Cuntyped
19:53:23disbotclosureScope: 11https://nim-lang.github.io/Nim/system.html#closureScope.t%2Cuntyped
19:59:02Zevvdisbot: make a web interface on your bot so we can explore its knowledge
19:59:15disruptekreally.
19:59:44disrupteki will just have a command that dumps it to ix and gives you a link.
19:59:59disrupteki don't want to mess with hosting anything.
20:01:58disruptekoh, i'll just put the footnotes in a public git repo.
20:03:47Yardanicohttps://github.com/laynH/Anime-Girls-Holding-Programming-Books need to add nim :D
20:04:13*nsf quit (Quit: WeeChat 2.7)
20:06:43*silvernode joined #nim
20:08:04disruptek~data
20:08:04disbotdata: 11disbot databases are at https://github.com/disruptek/disbot -- disruptek
20:10:28FromGitter<Albus70007> i am trying to override `<=` to compare a Vector2 and a float, but, first, it doesnt seem to detect my function, and second, it throws me this error ⏎ found 'distanceToBall' of kind 'param'
20:11:45Yardanicocan you share the code?
20:12:10FromGitter<Albus70007> wait a second, im gonna try something
20:13:29*marmotini_ quit (Remote host closed the connection)
20:14:03*marmotini_ joined #nim
20:18:48*marmotini_ quit (Ping timeout: 260 seconds)
20:25:23dom96Hrm, so drawing 500 particles takes 14ms in my game. I wonder how I can speed this sort of thing up, any game devs here have any suggestions?
20:25:57disruptekdo more work all-at-once.
20:28:17sschwarzerI'm experimenting with a sort with a key proc instead of a cmp proc. However, the code at https://play.nim-lang.org/#ix=27fL gives me a "Error: expected type, but got: newSeq(Natural(0))" and I have no idea why.
20:29:03sschwarzerSomehow Nim doesn't like the type I've given it. ;-)
20:29:34disruptekthe type is seq[...]; it's created with newSeq[...]()
20:29:40disruptekuse = not :
20:30:10FromDiscord<Rika> use , not ;
20:30:20disruptekuse ; not ,
20:32:09FromDiscord<Rika> disruptek where?
20:32:10sschwarzerdisruptek: I replaced : with = and it compiles. That makes sense. :)
20:32:22disruptek😉
20:32:30sschwarzerdisruptek: But what do you mean by "use ; not ,"?
20:32:42disrupteki mean don't listen to rika.
20:32:52sschwarzerdisruptek: Haha, ok :)
20:32:55FromDiscord<Rika> why?
20:33:14disrupteki prefer ; to separate proc arg defs.
20:33:40FromDiscord<Rika> so its just difference in preference
20:33:46disruptekyep.
20:34:20disruptekit's less ambiguous, since a , may exist for other reasons.
20:35:21FromDiscord<Rika> what
20:35:24FromDiscord<Rika> ugh
20:35:27FromDiscord<Rika> pressed enter early
20:35:33FromDiscord<Rika> what does the stdlib use?
20:35:43disrupteki think mostly ,
20:35:52sschwarzerWow, it works! :-) :-) :-) https://play.nim-lang.org/#ix=27fP
20:35:55FromDiscord<Rika> also why are there two ways to write it too
20:36:24FromDiscord<Rika> you're gonna run into issues when the key function takes in a flag parameter
20:36:34FromDiscord<Rika> you're gonna need to create a partial function
20:37:18disruptek!repo currying
20:37:19disbothttps://github.com/t8m8/currying -- 9currying: 11Currying Library for Nim 15 29⭐ 4🍴
20:37:37sschwarzerRika: Yes, that may be an extension, but I didn't want to make it too complicated right at the start.
20:38:03sschwarzerAnd from what I understand, you'd pass in the already curried proc, right?
20:38:19FromDiscord<Rika> yes
20:39:45sschwarzerdisruptek: Did you see my direct message?
20:40:04disrupteknah, what's up
20:40:16sschwarzerdisruptek: see there :)
20:42:01disrupteki can't deal with my client right now.
20:42:12disruptekwhat does it say?
20:42:17disruptekis it BTC address?
20:42:49sschwarzerdisruptek: no :) We can continue that chat once your client works again. It's nothing urgent :)
20:43:20disrupteki just os'd a palmtop and i don't have keys.
20:45:16sschwarzerdisruptek: What kind of palmtop?
20:45:18*al_ joined #nim
20:45:18*al_ is now known as Guest94576
20:45:30disruptekpocket 2
20:48:43sschwarzerdisruptek: Something like this? https://www.amazon.com/Update-8GB-Windows-Portable-Processor-Graphics/dp/B07MMSQ9ZM
20:49:06disruptekyeah but intel m3-1800
20:49:30disruptek8100
20:49:53disruptekthe keyboard takes some getting used-to.
20:50:36sschwarzerdisruptek: Good luck :)
20:52:43*Guest94576 quit (Quit: Guest94576)
20:53:02disruptek-d:toDebug="always" is amazing.
20:57:41sschwarzerBye everyone :)
20:57:51disruptekcya stefan
20:58:04*narimiran quit (Quit: leaving)
20:58:51sschwarzerdisruptek: We can talk another time when you can use private chats again. :)
20:59:01disruptekkinky
20:59:21sschwarzerdisruptek: *lol* No, nothing kinky. Not _that_ private ;)
20:59:30disruptekawww
20:59:51disruptekhow come no one wants to play "ride the horsey" with me?
20:59:58*sschwarzer quit (Quit: leaving)
21:02:21FromGitter<timotheecour> @disruptek let’s keep this professional please :)
21:02:54disrupteki might be a cowboy.
21:03:08FromGitter<timotheecour> also your PR is failing here: ⏎ ⏎ > Error: unhandled exception: /home/vsts/.cache/nim/os_d/runnableExamples/os_examples1.nim(8, 10) `normalizePathEnd("", trailingSep = true) == "/"` [AssertionError]
21:03:21FromGitter<timotheecour> (https://github.com/nim-lang/Nim/pull/13000)
21:03:22disbotexporting normalizePathEnd
21:03:31disruptekthat's a pity.
21:15:20*ltriant joined #nim
21:17:03*natrys quit (Quit: natrys)
21:23:47silvernodedisruptek: Good morning/afternoon
21:29:09disruptekit's only a model.
21:31:35*pbb_ joined #nim
21:31:41*pbb quit (Ping timeout: 246 seconds)
21:34:28silvernodedisruptek: Rika and I are going to try to make a text based space game, want me to add you to the project? It's to help us all learn
21:34:57disrupteksure, sounds fun.
21:35:03silvernodedisruptek: https://github.com/silvernode/space-nim/blob/master/ideas.md
21:35:59silvernodeI wrote down some ideas and was hoping for feedback or more ideas. Trying to keep the scope pretty linear though for the first build.
21:36:39silvernodeI figure this project can just be added to whenever. If it takes 10 years to finish it, that's fine.
21:37:46silvernodeThe best way for me to learn is to work on something that's ambitious for my skill level.
21:38:00disruptekyep.
21:38:29silvernodedisruptek: if you give me your github username I will add you as a contributor.
21:38:38disruptekthat's why i'm trying to get araq to switch to a real os.
21:38:52silvernodedisruptek: what OS?
21:38:55silvernodeLinux?
21:39:13disruptekwhen you run windows, there's basically nowhere to go but up.
21:39:25Araqthe first part of "OS" stands for "operating".
21:39:33Araqaka "working"
21:40:03skrylar[m]i remember the last time i had to drop to CLI and reconfigure the sound system on windows so i could get real time audio to work with the rest of the s.. wait, no that was just linux's pulse-jack :P
21:40:37disruptekpulse-jack?
21:40:47disruptekjack is for rt; pulse is not.
21:42:41skrylar[m]you have to set up some dbus voodoo to get them to hand audio off to jack
21:42:49Araqfor some of us "working" includes "being able to print out documents" and also "doesn't forget your working sound config after an update"
21:43:15disrupteki can't help your experience.
21:43:24skrylar[m]admittedly cups worked for me :b
21:43:42disruptekbut that doesn't mean it's typical.
21:44:46AraqI used Linux for at least 5 years, only had dual boot for gaming
21:45:11skrylar[m]the audio situation is typically bad. musicians that aren't using a dedicated daw box tend to report hating having to fuck around with the audio servers to get ardour open just to pop down some ditty they thought up just then
21:45:14disruptekyou can see in this graph when i booted into windows: https://github.com/disruptek
21:45:19disruptekso much for "working".
21:45:30skrylar[m]this may get better since pipewire is trying to support jack and displace pulse, so maybe in a couple years we will have peace
21:45:58Araqin the end I didn't see the point of dual boot anymore, all software I cared about ran on Windows anyway, including precious awk, sed, perl, ...
21:46:08Araqnot that I used them, but it's all there
21:46:16disrupteki see.
21:46:49skrylar[m]i haven't given up like he has; i still use it most of the day, but.. yeah. some workflows better than others
21:46:59disrupteki guess switching to windows because it can also run software you don't use makes sense to some folks.
21:47:07skrylar[m]opensuse typically doesn't break for no reason. tried going systemdless but the distros that support that tend to be a lot weaker
21:47:08Araqthe fact that I could easily install the Python version I cared about was a bonus too
21:47:25Araqback then when I used Python...
21:47:48skrylar[m]now araq uses ruby :^)
21:47:52Araqwhen I ran opensuse its package manager would easily run for hours, super slow
21:47:56*demotomohiro joined #nim
21:48:10skrylar[m]hm. zypper doesn't do that these days
21:48:13Araqit was some nice, new'ish development iirc
21:48:50skrylar[m]dnf on fedora does seem to piddle around downloading manifests when it doesn't need to. zypper and pacman have never given me much sass. apt was fine except packaging was hell
21:49:04skrylar[m]dunno about abuild/apk. haven't tried to bundle packages with it yet
21:49:51Araqmaybe SteamOS will bring me back to Linux land.
21:50:06Araqha ha ha
21:50:09shashlickI've been quite happy with Ubuntu desktop but main driver is a windows laptop
21:50:37skrylar[m]elementary was pleasant, although the kernel was a bit old
21:50:41disrupteki just cannot work in windows.
21:50:57FromGitter<Albus70007> does nim have something like % in python?
21:51:10skrylar[m]now to eat foodstuffs and go back to patching all this stuff to work
21:53:57demotomohiroAlbus70007, you want something like this? https://nim-lang.org/docs/system.html#mod%2Cint%2Cint
21:55:01lqdev[m]@Albus70007 if you're looking for modulo, see ↑, otherwise, look in strutils
21:55:03FromGitter<Albus70007> yes, thx
21:57:57*tane quit (Quit: Leaving)
22:07:38*ltriant quit (Ping timeout: 240 seconds)
22:07:59*ltriant joined #nim
22:09:03*demotomohiro quit (Ping timeout: 260 seconds)
22:11:39*Trustable quit (Remote host closed the connection)
22:13:48*lj00nal joined #nim
22:15:07*oculuxe joined #nim
22:15:14*oculux quit (Ping timeout: 240 seconds)
22:15:33*ljoonal quit (Ping timeout: 268 seconds)
22:18:38*ltriant quit (Ping timeout: 245 seconds)
22:23:21FromDiscord<mratsim> @Araq games work better for me on Linux (especially the DX9 one, I can't install DX9 under windows 10 for some reason)
22:23:52FromDiscord<mratsim> FAudio + Proton/DXVK for Steam or Lutris otherwise
22:24:05FromDiscord<mratsim> My only issue is finding time to play
22:25:13Araqsure and when it doesn't work you tell the support you run it under Wine on Linux, I'm sure it's great
22:26:36FromDiscord<mratsim> Actually there is a problem with competitive games, it will almost always trigger anti-cheat
22:33:49Araqor how about the fact that different C compilers all use the same header files from /usr/include, because hey, these never have vendor specific annotations
22:34:45disruptekit's not perfect.
22:35:04Araqor the fact that every single package must be "audited" for security problems. When every package is crucial to get right for "security", maybe you don't have any...
22:35:47disruptekyou're right, everything should be closed source so it's harder to crack, right?
22:36:11Araqdisruptek: the problem is not that "It's not perfect", the problem is that nothing ever improves and changes for the better.
22:36:35disruptekit could be me, but i'm finding it hugely improved this go-round.
22:36:50disruptekmaybe my tastes have changed, though.
22:36:52FromDiscord<treeform> I always switched to windows because I want to make games, and most of my players are on windows.
22:37:16Araqno, closed source is worse for security but nobody uses Windows and expects it to be "secure" :P
22:37:20disruptekAraq: i agree that progress in certain areas is painfully slow.
22:37:38disruptekso, windows wins by default because it refuses to play.
22:38:00disruptekhonestly, i don't understand why people don't make more software.
22:38:38disrupteki can't believe how little support there seems to be for simple tools line cron or syslog.
22:38:59Araqor how about we talk about distributions, there are hundreds of them. That's an utter nightmare for QA.
22:39:14disruptekyes, i want to talk about distributions.
22:40:59FromGitter<timotheecour> @araq for your comment regarding nimRepoDir in https://github.com/nim-lang/Nim/pull/13117#issuecomment-573433632 , I’d like to have a robust solution; how about allowing user to pass a NIMROOT environment variable? when not set, it’ll used the location inferred from nim sources, when set, user can set it to wherever (including /etc/nim)
22:41:00disbotfix #12998 nim doc regression
22:41:35disrupteki wonder what that means to cli and nim.cfg though.
22:41:43Araqtimotheecour: we already use some runtime check and you know my opinion on env vars
22:41:43disruptekyou're talking about changing $pathsubs
22:42:07disruptekenv vars are tools of the devil in araqlogic.
22:42:43Araqthey are inter-process mutable global state. in any logic.
22:42:49FromGitter<timotheecour> i don’t like them either but I want a solution that works robustly, makes code that uses it simple, and doesn’t get in the way
22:42:53disruptekthey are poorly specified and poorly scoped.
22:43:44disruptekhow about the solution doesn't create more trouble than the original issue?
22:44:31FromGitter<timotheecour> @disruptek happy to hear your concrete suggestion for https://github.com/nim-lang/Nim/pull/13117#issuecomment-573433632
22:44:33disbotfix #12998 nim doc regression
22:44:52Araqthe poor scoping is a feature... so now that we don't know where to find anything in this lovely /usr/bananajoe hierarchy which is machine dependent too, let's use a flat structure that does not change so that we know where to find stuff in the hierarchy
22:45:06disruptekwell, the fix is for #12998
22:45:08disbothttps://github.com/nim-lang/Nim/issues/12998 -- 3regression(1.04) `nim doc main.nim` generates broken html (no css) ; snippet at 12https://play.nim-lang.org/#ix=26CF
22:45:19disruptekthat to me doesn't sound like an env var.
22:45:32Araqtimotheecour: just let me take over your PR
22:46:21FromGitter<timotheecour> araq this problem is recurring and IMO we can offer a clean solution once there is a way to specify root nim dir for users
22:46:48disrupteklook, we have something similar in the form of $NIMBLE_DIR.
22:46:50disruptekit's terrible.
22:47:03FromGitter<timotheecour> what else do u suggest besides env var (which is really not that bad in this case)
22:47:14disruptekit's so bad that shashlick cannot even use it for its intended purpose.
22:47:20disruptekhe has to patch the compiler to emit json instead.
22:47:25disrupteknow, c'mon... 🤣
22:47:55Araqnimconf.getSystemConfigPath is the mechanism, it exists
22:48:09disrupteknimble cannot use $NIMBLE_DIR sufficiently to use $NIMBLE_DIR.
22:48:31Araqdisruptek: that might only be a Nimble specific problem though
22:48:44disruptekthe behavior is poorly defined in nimph, too, as a result.
22:51:39Araqtimotheecour: the other solution is to staticRead"nimdoc.css" into the compiler's binary so that it can always dump the "resource"
22:52:17AraqI don't like the binary bloat though
22:52:57Araqbut it would work.
22:53:44FromGitter<timotheecour> ya i thought about it but also don’t like the bloat, plus it’s less convenient, eg if user wants to make a single change to sources, he’s out of luck with no easy workaround
22:54:22disrupteki think it's easy enough for this stage of the game.
22:56:07Araqhere is what will happen: some distro will **not** install Nim's docs at all because that will be in the nim-compiler-docs package that you have to install independently
22:56:30Araqand so there will be no nimdoc.css whatsoever
22:56:42Araqunless we bundled it as a resource
22:57:09disruptekin the grand scheme of this, it's negligible bloat.
22:57:19Araqsee the problem: Linux has over 100 distributions, QA made impossible.
22:57:45disruptekqa is possible, it's just conducted at 100x the cost.
22:58:28Araqwell yeah, it only works in open source land when you don't pay the people for their work
22:58:55*luis_ joined #nim
22:59:07disrupteki dunno, i have some ideas i want to try.
23:03:36FromGitter<timotheecour> we need a general solution for this that doesn’t require changing the relative path of whatever resource we want to bundle, eg: ⏎ the path should always be `$nimroot/doc/nimdoc.css` whether `nimroot` is the git repo or the installed sources that ends up in, say, `/usr/local/etc/nim`
23:04:26Araqdoesn't work, there is not a single "root"
23:04:39FromGitter<timotheecour> here’s what they do in D btw: ⏎ ⏎ ```dmd -v | grep Config ⏎ Config file: /usr/local/etc/dmd.conf``` [https://gitter.im/nim-lang/Nim?at=5e1ba6070aba1f0d8022fdd4]
23:04:50Araqthere are at least 3 different "roots"
23:05:21Araqbinaries, config, docs, "shared" and "var"? tbh I don't remember
23:05:22disrupteki think he means {parent} == {parent1, parent2, parent3}
23:05:24FromGitter<timotheecour> (with `which dmd`: ⏎ `/usr/local//bin/dmd`)
23:06:34Araqwell you can get /etc via getSystemConfigPath
23:06:40FromGitter<timotheecour> but why can’t we map every resource under a single root such that there’s no difference between relative path wrt git repo vs relative path wrt installed nim
23:06:47Araqseems good enough to me
23:07:10Araqwhat do you mean "no difference"?
23:07:25Araqthe difference is introduced by Unix with its /usr/bin madness
23:08:03FromGitter<timotheecour> as in for whaterver resource you’ll need at runtime (eg: css file above; other cases too), the relative path is the same: in this case: `doc/nimdoc.css`
23:09:37FromGitter<timotheecour> what i mean is we can install whatever we want to the etc path; then `nim -v` can point (just like dmd) to a fixed installed location relative to which every path is the same
23:10:18Araqplease simply use getSystemConfigPath, it's battle tested and mostly does what you have in mind
23:10:29FromGitter<timotheecour> `nim —getnewinstallcfglocaiton` points to `/os_specific_prefix/nim/doc/nimdoc.ss`
23:11:45AraqI still don't share this philosophy "ok, it doesn't really work so we made it configurable"
23:11:52FromGitter<timotheecour> > please simply use getSystemConfigPath ⏎ ⏎ so i need would be to expose it at runtime, where ConfigRef is not known
23:12:02disruptekshouldn't L13 sink and then cursor in L18? https://play.nim-lang.org/#ix=27gQ
23:12:40*solitudesf quit (Ping timeout: 265 seconds)
23:12:41disrupteki wouldn't rather have configuration as a last resort, to solve unworkable problems. so far, nimph needs none.
23:13:21Araqdisruptek: I'll fix it tomorrow
23:13:42disrupteki'm just trying to understand.
23:13:44Araqgood night
23:13:47disrupteknight
23:36:17*ptdel quit (Ping timeout: 260 seconds)
23:49:56*demotomohiro joined #nim
23:54:44FromDiscord<Clyybber> ayy, I'm always too late to the party
23:55:09*ptdel joined #nim
23:57:38FromDiscord<Clyybber> good night then :d