00:00:02 | * | junland_ quit (Quit: %ZNC Disconnected%) |
00:00:03 | arecaceae | oh there's closure iterators nice! |
00:00:11 | arecaceae | gonna check them out right away |
00:00:47 | * | junland joined #nim |
00:02:25 | arecaceae | beautiful, 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:52 | disruptek | i 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:49 | voltist | Does 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:59 | FromDiscord | <treeform> are your keys random strings or only an N set of strings? |
02:09:26 | FromDiscord | <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:52 | FromDiscord | <treeform> have you compiled with -d:release or -d:dangaer to see if your code is fast in release mode? |
02:14:30 | voltist | Oh 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:42 | voltist | I think it will do for now |
02:23:37 | FromDiscord | <treeform> how many elements are your hash tables? |
02:27:35 | voltist | Only 4, which is why I was so surprised at the poor performance |
02:29:46 | disruptek | wut |
02:44:47 | * | mollusk joined #nim |
02:44:52 | * | mollusk is now known as silvernode |
02:45:23 | disruptek | now i've seen everything. |
02:51:00 | disruptek | you have to admit, this compiler is like, the greatest playground we've ever seen. |
02:52:19 | disruptek | do a lot of people choose a language for the wrong reasons? |
02:53:05 | voltist | Like what? |
02:53:24 | disruptek | ~motd is do a lot of people choose a language for the wrong reasons? |
02:53:25 | disbot | motd: 11do a lot of people choose a language for the wrong reasons? |
02:53:39 | disruptek | that's what i'm asking. |
02:54:08 | disruptek | do we think that people choose languages for the right reasons? |
02:54:26 | voltist | I hope so |
02:55:16 | disruptek | so you're saying that because why? |
02:55:26 | disruptek | because nim compares favorably to its competition? |
02:55:46 | disruptek | or because you just want to believe that people agree with you as to language strengths? |
02:57:45 | disruptek | you know that all those languages that are winning are full of similar commuties. larger communities. |
02:58:11 | disruptek | there are more people who think this isn't the next language than there are who think it is. |
02:58:59 | voltist | Well thats unfortunate, because that inbalance would make the former correct |
03:00:02 | disruptek | point is, there's perspective to both sides. and more perspective on the other side. |
03:00:34 | disruptek | i just really don't understand what i'm missing about this language. |
03:03:22 | disruptek | i just don't get it. |
03:03:47 | disruptek | you can get as low as you want to go and, and safely. |
03:04:51 | disruptek | but you have elegance and expression over python. |
03:05:12 | disruptek | you've got huge flexibility in memory models. |
03:05:21 | disruptek | superior ffi. |
03:05:36 | disruptek | lisp at compile time. |
03:05:43 | disruptek | runtime of raw c. |
03:06:08 | disruptek | portability of c, but no need for undefined c behaviors. |
03:06:40 | disruptek | you've even abstracted away the backends. |
03:07:49 | disruptek | pluggable gc. pluggable exceptions. hot code reloading. |
03:08:10 | disruptek | llvm if you want it. |
03:08:56 | disruptek | what makes this such a bitter pill. |
03:09:32 | disruptek | mixed case? |
03:09:35 | disruptek | whitespace? |
03:10:43 | disruptek | what is it that turns people off? |
03:12:14 | disruptek | it's like there's a long tail of programmer taste and we're just at the end of it. |
03:15:03 | disruptek | i wonder if the syntax is too flexible; it becomes a turn off for some people. |
03:17:15 | disruptek | no one is getting paid to write it. |
03:17:18 | disruptek | that's the problem. |
03:17:59 | disruptek | so we need to target the people who hire nim programmers. |
03:18:24 | disruptek | what do those people want? |
03:24:00 | disruptek | we gotta get viktor's talk out there. |
03:26:15 | disruptek | need to do more streaming. i think we should try to put together a channel. |
03:30:04 | disruptek | doesn'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:06 | disruptek | that's a lot of content. |
03:31:13 | disruptek | that's content that people want to see. |
03:31:26 | disruptek | it's cheap for to us to make. |
03:31:35 | disruptek | er, you get the gist of that. |
03:31:58 | disruptek | it pays dividends for us forever after we create it. |
03:35:45 | * | ltriant quit (Ping timeout: 265 seconds) |
03:41:30 | disruptek | i'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:46 | disruptek | y'know, after having os'd it. |
03:41:55 | disruptek | from live media. |
03:42:14 | disruptek | it's amazing to me that this is a thing. |
03:42:48 | disruptek | it'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:42 | silvernode | disruptek: 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:07 | silvernode | disruptek: 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:22 | silvernode | with good audio quality and editing. |
04:12:12 | disruptek | editing is hard, though. |
04:12:17 | disruptek | well, i find it hard. |
04:13:48 | disruptek | okay, you say scope... and that means, what? 12 episodes at 1hr/ea? |
04:15:44 | silvernode | disruptek: just a program to build. The program in question is the scope |
04:15:54 | silvernode | Like "today we are building a calculator" |
04:16:23 | silvernode | "Today we are making a calendar" |
04:16:26 | disruptek | okay, so it's a 20min episode but maybe it's not 20min real time. |
04:16:38 | silvernode | "Today we are focusing on the garbage collector. |
04:16:48 | disruptek | right, right. |
04:16:49 | silvernode | yeah |
04:17:03 | silvernode | We need clear and well spoken learning material |
04:17:04 | disruptek | okay, huh. i like that. |
04:17:46 | silvernode | I 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:29 | silvernode | What I did find was on bad microphones, not planned out and very unorganized and was not very engaging. |
04:19:13 | disruptek | it seems like pretty imposing challenge to me. |
04:19:59 | silvernode | I say the editing doesn't have to be good, just the content. Even if these programs are very small |
04:20:27 | disruptek | right. |
04:20:44 | silvernode | I would like weekly videos on one tiopic broken up over a month. |
04:21:08 | silvernode | part one comes out one week, then part 2 the next until we get to the end of the month. |
04:21:34 | silvernode | could plan to do 6 topics a year or something |
04:21:41 | disruptek | okay. i'm starting to see how this works. |
04:22:04 | disruptek | okay, this is a real campaign, isn't it? |
04:22:31 | silvernode | Think of it this way, we have to be engaging to get engagement |
04:22:55 | shashlick | what's up gang |
04:23:06 | disruptek | we're brainstorming. |
04:23:24 | disruptek | also, i'm pretty sure i just munched on a bug that fell in my water. |
04:24:09 | silvernode | disruptek: The water has a bug, so you need to file a report :) |
04:24:12 | disruptek | i 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:53 | voltist | Extra protein |
04:25:02 | disruptek | i'm getting in touch with my inner ape these days. |
04:25:18 | silvernode | someone 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:55 | silvernode | Seems the most critical complaint is the whitespace |
04:26:08 | disruptek | oh, autoformatting. |
04:26:33 | disruptek | i guess that could be a thing. i think they mean auto-format like `go fmt`, right? |
04:26:50 | disruptek | where there's just, like, one true way. |
04:26:53 | disruptek | stylistically. |
04:28:13 | disruptek | wow, that's kinda rough. |
04:28:20 | disruptek | a rough kinda thing to be known for. |
04:28:26 | FromGitter | <matrixbot> `silvernode` yeah like gofmt |
04:28:43 | FromGitter | <matrixbot> `silvernode` i thought we had nimpretty |
04:28:55 | disruptek | we do, but it's not super opinionated. |
04:29:03 | disruptek | it's not rigid in its output. |
04:30:37 | disruptek | it's surprising, but i guess it /would/ be, right? |
04:31:05 | disruptek | i mean, what's your least favorite part of the language? |
04:31:18 | disruptek | what's the thing that most irritates you. |
04:31:40 | FromGitter | <matrixbot> `silvernode` The whitespace |
04:31:47 | FromGitter | <matrixbot> `silvernode` needing to care how Indent |
04:31:57 | disruptek | wow. |
04:32:03 | FromGitter | <matrixbot> `silvernode` how I indent. |
04:32:13 | disruptek | so you agree with the other complaint? |
04:32:31 | FromGitter | <matrixbot> `silvernode` but I am over the whitespace thing these days. |
04:32:41 | disruptek | oh. |
04:32:50 | disruptek | but it was the biggest irritant, right? |
04:33:42 | FromGitter | <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:10 | FromGitter | <matrixbot> `silvernode` i would get so many runtime errors |
04:34:12 | disruptek | ahh, so, like tabs-vs-spaces at its worst? |
04:34:21 | FromGitter | <matrixbot> `silvernode` and all I was trying to do was learn. |
04:34:24 | FromGitter | <matrixbot> `silvernode` yeah |
04:34:34 | disruptek | yeah, that was a bad period in python. |
04:34:40 | FromGitter | <matrixbot> `silvernode` that stuff just got in the way |
04:34:46 | disruptek | it'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:22 | FromGitter | <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:14 | disruptek | i guess it sorta depends on your editor. |
04:36:20 | * | snowolf joined #nim |
04:36:41 | silvernode | These days I use VSCode and I get a lot of hate from a lot of programmers for saying that. |
04:37:23 | disruptek | i used it for something. it was decent. probably was the best gui editor i'd used. |
04:37:46 | silvernode | People are stuck on the fact that it's made with electron |
04:38:02 | disruptek | electron hasn't stood still, either. |
04:38:13 | * | MD87 quit (Ping timeout: 245 seconds) |
04:38:28 | * | euantor joined #nim |
04:38:42 | silvernode | I 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:50 | disruptek | i'm not a great vimmer but i cannot imagine using anything else. |
04:40:06 | silvernode | Yeah 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:13 | disruptek | editor support in these videos is key, isn't it? |
04:40:59 | silvernode | I'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:38 | silvernode | I think at some point you just have to accept that people are going to stay closed minded though |
04:42:14 | disruptek | i think covering three or four editors doesn't seem like such a big ask. |
04:43:24 | silvernode | it 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:26 | voltist | Anybody got any idea why 'fps' is always ~10 greater than X in this code for a game? https://pastebin.com/iS2muGKJ |
04:44:39 | silvernode | Figure 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:49 | disruptek | oh, you mean a different cut of the same tutorial but on a different editor? |
04:45:49 | disruptek | these are editor tutorials? |
04:45:50 | kungtotte | silvernode: 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:10 | silvernode | More 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:46 | silvernode | kungtotte: yeah I always forget about frameworks and git repos |
04:46:47 | disruptek | ahh, okay. |
04:47:54 | kungtotte | You 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:39 | silvernode | The appealing thing about Vim is that I can run it in tmux |
04:50:19 | disruptek | they say there was a point at which you could do the same with emacs. |
04:50:27 | disruptek | 😉 |
04:52:15 | silvernode | you can't do that with Emacs? |
04:52:28 | disruptek | you can, i'm just being rude. |
04:52:33 | silvernode | ha |
04:52:58 | silvernode | Every time I try emacs, I give up lol |
04:53:14 | silvernode | cording commands is just not intuitive to me |
04:53:48 | disruptek | i wish i'd known how entrentched my editor would be to my flow. |
04:54:01 | disruptek | or some kinda e-word. |
04:54:11 | disruptek | like, pick a really juicey one. |
04:55:56 | silvernode | So 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:13 | silvernode | I like to make functions be like menus and call them from each other |
04:56:40 | disruptek | menus? |
04:56:49 | disruptek | oh, ui menus? |
04:56:57 | silvernode | so like proc room1() = press 1 to get to room 2 |
04:57:18 | disruptek | oh, so state machine. |
04:57:51 | kungtotte | You 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:04 | silvernode | and 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:30 | silvernode | kungtotte: yeah |
04:58:43 | disruptek | so, you can forward declare a proc by repeating its signature without = and the body of the proc. |
04:59:01 | silvernode | so 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:42 | silvernode | disruptek: I didn't know that |
05:00:14 | disruptek | that sounds frustrating. |
05:00:50 | disruptek | i was really frustrated by methods. i'm still a little peeved by them. |
05:01:15 | kungtotte | https://nim-lang.org/docs/tut1.html#procedures-forward-declarations |
05:02:11 | disruptek | so you figured out `*` first, i guess, huh? |
05:02:37 | silvernode | disruptek: yep |
05:03:30 | disruptek | that's not a great story. |
05:03:42 | disruptek | it's a bad thing to get wrong. |
05:03:53 | silvernode | kungtotte: Ah yesh I think I read about this in Nim-in action |
05:04:03 | silvernode | Reminds me of how C does things |
05:04:10 | silvernode | this is the key to what I want to do |
05:05:12 | silvernode | Do I have to define a return type though? |
05:05:48 | disruptek | yeah. |
05:05:49 | FromDiscord | <Rika> hello |
05:05:51 | FromDiscord | <Rika> whats up |
05:05:57 | kungtotte | If the actual proc has a return type, yes. The forward declaration had to match the actual declaration. |
05:06:00 | disruptek | sorry, took me awhile to understand the question. |
05:06:16 | kungtotte | s/had/has/ |
05:06:16 | disruptek | sup rika |
05:06:43 | FromDiscord | <Rika> someone asking for help? |
05:07:11 | silvernode | yeah it was me |
05:07:13 | disruptek | you saw the bat sign? |
05:07:26 | silvernode | chinken or the egg problem with functions calling functions |
05:07:32 | disruptek | ~motd |
05:07:33 | disbot | motd: 11do a lot of people choose a language for the wrong reasons? -- disruptek |
05:07:57 | FromDiscord | <Rika> like what reasons hmm |
05:09:04 | silvernode | I 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:06 | disruptek | pick any you like, i think. |
05:10:03 | disruptek | yeah, those are good reasons. |
05:10:22 | disruptek | this is the problem. |
05:10:29 | silvernode | Rika, were were talking earlier about ways to get people outside of the Nim community to engage more and learn Nim |
05:10:30 | disruptek | or, this is the question we're trying to answer. |
05:11:08 | disruptek | i'm trying to figure out if we're in a selection bias or what. |
05:11:23 | FromDiscord | <Rika> prolly, because of indention |
05:11:51 | disruptek | it's really like religion, right? |
05:12:14 | silvernode | I 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:28 | silvernode | think* |
05:12:50 | disruptek | you 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:29 | silvernode | What whitespace does is bring in the new commers and alienate the gray beards. |
05:13:45 | disruptek | so that means we can control for syntax. all that remains is the people who care about something else. |
05:14:44 | FromDiscord | <Rika> also brings in the pythonistas looking for speed |
05:14:46 | kungtotte | The 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:10 | silvernode | What 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:20 | kungtotte | The case insensitivity is more understandable that people care about. |
05:15:27 | FromDiscord | <Rika> kungtotte, everyone does it but not manually; people can leave the formatter to indent their code |
05:15:49 | FromDiscord | <Rika> for indention based languages, you have to manually indent (if the indent level is wrong) |
05:15:53 | disruptek | well, i don't get the case issue. the very point of it is that case doesn't matter. |
05:15:59 | FromDiscord | <Rika> (auto when making a new line so thats nice) |
05:16:06 | disruptek | terminate code blocks without whitespace? what does this mean? |
05:16:17 | FromDiscord | <Rika> basically add braces |
05:16:28 | * | narimiran joined #nim |
05:17:20 | silvernode | nim 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:20 | disruptek | i guess that makes some sense. |
05:17:31 | disruptek | that's probably the best argument i've ever heard for braces. |
05:17:42 | FromDiscord | <Rika> no end keywords please |
05:17:42 | disruptek | it might just sway me, honestly. |
05:18:08 | disruptek | well, it just feels like an obvious hack to say a lot with a little. |
05:18:09 | FromDiscord | <Rika> also there's the argument araq made i think that you can use parens as braces |
05:18:25 | disruptek | true. |
05:19:04 | disruptek | okay, so that's a price you pay with nim. |
05:19:05 | FromDiscord | <Rika> and it does work |
05:19:09 | disruptek | and python. |
05:19:32 | silvernode | I 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:54 | disruptek | oh, are you counting? |
05:20:02 | FromDiscord | <Rika> ok it doesnt work 100% just tested it |
05:20:09 | disruptek | like, 1 glyph, 2 glyph, 3 glyph...? |
05:20:37 | FromDiscord | <Rika> also i dont see how an end char is any different to looking at the indent |
05:20:48 | silvernode | I 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:03 | disruptek | it's easier to count braces than it is to count spaces. |
05:21:28 | silvernode | disruptek: yes because I can see braces |
05:21:37 | disruptek | right. |
05:21:47 | disruptek | i'm trying to restate that for rika. |
05:21:50 | FromDiscord | <Rika> ~~argument that your text editor should be able to highlight the level~~ |
05:21:50 | disbot | no footnotes for `~argument`. 🙁 |
05:21:59 | silvernode | I learned something today though, more than one person on more than one IRC channel hates the end keyword. |
05:22:32 | silvernode | I have never heard of anyone hating on the end keyword. I find it interesting. |
05:23:00 | silvernode | I quite like it myself. I first saw the end keyword in Lua |
05:23:10 | FromDiscord | <Rika> it is annoying |
05:23:34 | silvernode | Man 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:34 | FromDiscord | <Rika> needing to type end is of course longer than either unindenting or close bracket |
05:24:04 | silvernode | Ah I see, it's the typing it out all the time that bugs people |
05:24:08 | disruptek | the oughts were tough, man. |
05:24:20 | disruptek | things like numbers were just gettin' started. |
05:24:27 | silvernode | we should make up a new keyword |
05:24:31 | disruptek | numbers just got started at 1. |
05:24:44 | disruptek | seem like a good first number. |
05:25:16 | silvernode | I like things starting from 0. Otherwise we pretend that 0 is not a number and that's just silly |
05:25:24 | disruptek | lol |
05:25:33 | disruptek | well said. |
05:25:47 | silvernode | I actually haven't paid much attention to what Nim starts at. |
05:25:56 | disruptek | that quote needs to be on the nim website. |
05:26:15 | silvernode | disruptek: You like that hu? :) thanks |
05:26:34 | silvernode | Every now and then I say something wiorthwhile. |
05:26:35 | FromDiscord | <Rika> nim can have arrays starting at 1 |
05:26:40 | disruptek | sure. |
05:26:55 | silvernode | Can I make an array start at 0 if I'd like? |
05:27:05 | FromDiscord | <Rika> that's by default |
05:27:05 | silvernode | I haven't gotten to arrays in the book yet |
05:27:26 | FromDiscord | <Rika> but afaik seqs can only start at 0, unless im mistaken |
05:31:14 | * | ltriant joined #nim |
05:32:43 | silvernode | trying 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:22 | disruptek | why 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:08 | disruptek | i mean, i know we're not guaranteed to hit, but we might. |
05:34:33 | disruptek | especially with a deterministic allocator. |
05:36:33 | * | ltriant quit (Ping timeout: 268 seconds) |
05:38:35 | silvernode | Wow, found a live coding site, they have every syntax highlighting under the sun, except Nim |
05:39:04 | silvernode | They have Pascal, Julia ACL but no Nim, |
05:40:56 | silvernode | https://codeshare.io/5RX9XQ |
05:41:10 | disruptek | we probably need to figure out where these places get their highlighting and send a pr. |
05:41:51 | disruptek | oh, this is literally live. |
05:47:55 | disruptek | so if you abstract these to nodes, you can just specify a series of "rooms" by creating nodes. |
05:48:21 | disruptek | then the menus and numbers are handled for you once, on the node. |
05:48:58 | silvernode | so that's basically what I was trying to do with my real code |
05:49:09 | silvernode | by the way you can edit the document at any time |
05:50:16 | silvernode | Going 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:23 | silvernode | feel free to change my stuff. I need to use the restroom, brb |
05:57:20 | silvernode | back |
05:58:06 | silvernode | oh 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:33 | disruptek | the map is just a collection of rooms. |
05:59:47 | disruptek | rooms are differentiated by their names. |
06:00:07 | disruptek | that's an operator. |
06:00:27 | disruptek | we're definition addition for two rooms as in `room1 + room2` |
06:00:37 | disruptek | the result is a map (a collection of rooms). |
06:00:47 | disruptek | Map, rather. |
06:02:16 | silvernode | that's awesome |
06:02:41 | silvernode | I 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:04 | disruptek | i started coding seriously on muds. |
06:03:31 | silvernode | oh really? I love muds |
06:03:39 | skrylar[m] | i kind of remember moo's |
06:04:00 | disruptek | always looked down on moos because they were more high-level. |
06:04:03 | FromDiscord | <Rika> okay so maybe rooms should have "left right up down" fields or so, referencing another room |
06:04:03 | disruptek | scripty. |
06:04:32 | silvernode | Rika yeah that's what we need |
06:04:58 | silvernode | I guess just strings for direction? |
06:05:10 | FromDiscord | <Rika> then you just make a proc like `Room.move` which takes an enum of directions |
06:05:15 | FromDiscord | <Rika> enum!!! |
06:05:19 | FromDiscord | <Rika> enums are great |
06:05:31 | FromDiscord | <Rika> you can use strings for the human interface |
06:05:33 | disruptek | why, some of my best friends are enums. |
06:05:40 | FromDiscord | <Rika> but in the back an enum would be great |
06:05:53 | disruptek | an enum in the back is very fine, indeed. |
06:06:10 | silvernode | I really need to finish the book, sounds like I need to learn enums asap |
06:06:20 | disruptek | lol |
06:07:06 | silvernode | I have only known the basic concepts for 10 years now. everything language, I don't get beyond arrays |
06:07:08 | FromDiscord | <Rika> the field can actually just be an array of 4 rooms... |
06:07:22 | FromDiscord | <Rika> since an enum can be converted into integers... |
06:07:29 | FromDiscord | <Rika> ...which can be used as the index for the array |
06:07:38 | disruptek | yes, that's the idea. |
06:07:45 | disruptek | but you have to store the name of the room. |
06:07:46 | silvernode | basic question, what are enums useful for? |
06:07:53 | FromDiscord | <Rika> a lot of things |
06:08:04 | silvernode | common use cases? |
06:08:13 | FromDiscord | <Rika> when you want to hard limit options |
06:08:24 | FromDiscord | <Rika> like for the directions |
06:08:39 | FromDiscord | <Rika> if it were a string instead, you'd need to account for an unknown strin |
06:08:41 | FromDiscord | <Rika> g |
06:08:41 | disruptek | there's like uniquely symbolled grouped ordinals. |
06:08:47 | FromDiscord | <Rika> ill have to go now |
06:09:07 | silvernode | Thanks Rika |
06:09:36 | kungtotte | disruptek: you could store references to actual room objects in the array, then getting the name is just a room.name away |
06:09:53 | silvernode | I am going to try to put the directions in an array |
06:10:10 | silvernode | I just need to remember the syntax |
06:10:10 | disruptek | that's what the map is. |
06:10:48 | njoseph | What is the representation for an empty character in nim? '' is not working in a replace. |
06:11:19 | disruptek | i think you want "". |
06:11:31 | silvernode | I don't know if that will work in an array |
06:11:34 | silvernode | assignments |
06:11:40 | silvernode | line 7 |
06:12:22 | disruptek | weirdly, it almost does work. |
06:12:29 | njoseph | I'm just trying to strip off backslashes in a string. |
06:12:30 | njoseph | url.replace('\\', '') |
06:12:45 | disruptek | you need to define the enum on its own line; it needs a complete definition of members. |
06:13:00 | silvernode | how do you mean? |
06:13:14 | disruptek | lookup the syntax to the enum type. |
06:13:20 | silvernode | ok |
06:13:24 | silvernode | 1 sec |
06:13:38 | disruptek | njoseph: try using strings, not characters. |
06:14:26 | njoseph | disruptek: Yes, that works. Thanks |
06:16:00 | silvernode | "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:09 | silvernode | Not sure what qualified means here |
06:16:33 | silvernode | it's just an enum with cdNorth, cdSouth etc.. |
06:16:39 | disruptek | qualified with the enum type name as in `MyGroup.MyUnit` |
06:17:00 | disruptek | because it's not {.pure.} |
06:17:14 | silvernode | I guess I just don't understand the lingo |
06:17:38 | disruptek | the cd is short for CompassDirections. |
06:17:48 | silvernode | oh ok so that's the group |
06:18:12 | disruptek | they'll saying that they chose the names cdFoo, cdBar, etc. |
06:18:12 | silvernode | that way you can use North and South in another enum without conflicts |
06:18:16 | disruptek | right. |
06:18:46 | silvernode | but if you know you are only going to have one enum with those properties then you use {.pure.} |
06:19:07 | disruptek | no, you might have something like |
06:19:43 | disruptek | type Fire = enum Hot, VeryHot, Burny |
06:19:51 | kungtotte | Typically 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:15 | disruptek | and you want people to specify it as Fire.Hot, Fire.VeryHot, and Fire.Burny |
06:20:32 | silvernode | kungtotte: so like namespaces |
06:20:46 | skrylar[m] | True, False, FileNotFound |
06:21:00 | disruptek | yeah, that was a bad example because i'm dumb. |
06:21:04 | disruptek | On, Off |
06:21:11 | disruptek | those are more obvious. |
06:22:51 | silvernode | so enums with {.pure.} need to have the namespace written out like Colors.Red |
06:23:02 | disruptek | right. |
06:23:12 | disruptek | outside of the module in which they are defined. |
06:23:31 | silvernode | without {,pur.} you need a way to tell the difference between the properties. |
06:23:44 | silvernode | like cdNorth |
06:24:07 | disruptek | right, because you're using it in enum DogNames, too. |
06:24:37 | silvernode | I see |
06:25:14 | silvernode | so again, if you make something qualifies, you should make sure it's the only instance you are going to be using |
06:25:24 | silvernode | qualified* |
06:26:06 | disruptek | no, they aren't static. |
06:26:16 | kungtotte | Vice versa. If it's qualified it doesn't matter how many times you repeat the "cdNorth" part in other enum definitions |
06:26:22 | disruptek | they are just symbols for ordinal values. |
06:27:05 | silvernode | So it's literally only the difference between writing out the namespace and not writing it out? |
06:27:14 | disruptek | right. |
06:27:16 | kungtotte | If you *don't* qualify the name, Nim doesn't know if you mean directions.North, DogNames.North, or KanyesKidsNames.North |
06:27:29 | silvernode | Oh ok |
06:27:29 | disruptek | this. |
06:27:46 | silvernode | so making things qualified means to be specific when talking to Nim |
06:28:04 | disruptek | yes. |
06:28:09 | kungtotte | Yes, it's providing Nim with the place to look for whatever it is you're talking about |
06:28:20 | silvernode | Tell nim what you really want |
06:28:26 | disruptek | really. |
06:28:30 | silvernode | don't leave it up to nim to guess |
06:28:41 | Zevv | what you really really want |
06:28:50 | disruptek | clear communication can be a matter of life and death. |
06:28:51 | silvernode | Zevv: rofl |
06:28:56 | disruptek | especially in the bedroom. |
06:29:18 | disruptek | good morning, zevv |
06:29:25 | Zevv | ok, you might as well talk about seqs then |
06:29:44 | silvernode | Zevv: They were helping me with my rooms problem: https://codeshare.io/5RX9XQ |
06:29:52 | Zevv | mornin disruptek. is it not time you did some eye shut as well, youve been overflowing my scrollback |
06:29:57 | disruptek | provide nim with the place to look for whatever it is you're talking about. |
06:30:03 | silvernode | They started using enums at the top, I just had functions |
06:30:18 | Zevv | ah the rooms, I remember that, good! |
06:30:19 | disruptek | lol |
06:30:59 | silvernode | Zevv: Then on line 7 I tried putting that in an array which I don't think will work at all |
06:31:47 | disruptek | it almost does due to a neat quirk of syntax. |
06:32:02 | silvernode | disruptek: tell me more |
06:32:09 | disruptek | you can do [index: value, ...] in arrays. |
06:33:05 | disruptek | so you can do [cdNorth: room1] for example, if you get the order right. |
06:34:12 | silvernode | disruptek: 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:35 | disruptek | you don't put the enum in there; you put rooms in there. |
06:34:52 | disruptek | the enum is sufficient as an index because, remember, it's really just a simple ordinal. |
06:34:58 | disruptek | an integer. |
06:35:06 | silvernode | I think I need an example of how to use the code you wrote |
06:35:17 | silvernode | how to start calling rooms and such |
06:36:00 | disruptek | no, zevv says i have to hit the hay. |
06:36:06 | disruptek | gn |
06:36:15 | silvernode | I don't know how I would use the proc on line 22 |
06:36:24 | silvernode | disruptek: oh ok |
06:36:24 | silvernode | lol |
06:36:35 | silvernode | hit they hay then |
06:37:21 | FromGitter | <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:44 | FromGitter | <jivank> or whatever the type for type is |
06:40:27 | silvernode | FromGitter: sounds very specific. I'd help if I weren't such a noob |
06:40:27 | FromGitter | silvernode, I'm a bot, *bleep, bloop*. I relay messages between here and https://gitter.im/nim-lang/Nim |
06:44:51 | silvernode | Does anyone else besides me use Void Linux? |
06:45:00 | silvernode | just curious |
06:45:24 | silvernode | I always feel like an outlier |
06:52:12 | kungtotte | I 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:41 | FromGitter | <sheerluck> ~gentoo |
06:58:41 | disbot | no footnotes for `gentoo`. 🙁 |
06:58:50 | FromGitter | <sheerluck> 🙁 |
07:00:04 | kungtotte | sheerluck: did you know that Gentoo is an ancient Native American word for "masochist"? ;) |
07:01:48 | FromGitter | <sheerluck> I know |
07:02:34 | FromGitter | <sheerluck> That's how I roll |
07:08:12 | FromDiscord | <Rika> jivank, maybe a macro is what u need |
07:08:30 | FromDiscord | <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:48 | FromGitter | <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:27 | silvernode | kungtotte: 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:45 | FromGitter | <Varriount> @sheerluck That link doesn't appear valid |
07:41:53 | silvernode | There are a few others that I have since abandoned |
07:44:13 | FromGitter | <sheerluck> @Varriount I hope @Araq will make it valid soon |
07:46:10 | silvernode | So, 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:56 | kungtotte | I 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:53 | silvernode | kungtotte: 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:25 | silvernode | kungtotte: Looking at delta chat: Holy crap this is exactly what I have been looking for. My friend will faint. |
07:53:21 | silvernode | kungtotte: I might try packaging this for Void, this is amazing |
07:54:22 | silvernode | huh...it's electron |
07:54:40 | silvernode | could be a pain in the butt to package |
07:55:36 | silvernode | I'm happy they have an appimage though\ |
07:56:17 | silvernode | too bad the flatpak is outdated |
07:57:20 | * | chenhq2005 joined #nim |
07:57:59 | silvernode | yo chenhq2005 |
07:58:03 | silvernode | welcome |
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:33 | FromDiscord | <Rika> hey silvernode i'm back |
08:25:40 | FromDiscord | <Rika> so what're the plans again? |
08:25:56 | FromDiscord | <Rika> oh wow what happened to this enum |
08:26:25 | silvernode | wb |
08:26:43 | silvernode | Only plan is to make a space game in text |
08:26:57 | FromDiscord | <Rika> i mean the code share link |
08:27:05 | FromDiscord | <Rika> the enum is weird; i dont think it's valid syntax |
08:29:27 | silvernode | I have no idea, someone started "fixing it" |
08:31:39 | silvernode | I only wrote the room procs, I have no idea how to use the code in practive at the top |
08:32:30 | FromDiscord | <Rika> so that's wrong syntax |
08:32:36 | FromDiscord | <Rika> let me fix it |
08:35:06 | silvernode | ah yes the result var. I learned about that in the book |
08:35:16 | silvernode | If not define, it takes on a default value |
08:35:51 | FromDiscord | <Rika> which, for "ref object" types, is `nil` |
08:36:57 | silvernode | hmm, not sure which proc to start calling |
08:37:20 | silvernode | the name of those procs is + |
08:38:05 | FromDiscord | <Rika> no no, the new proc |
08:38:20 | FromDiscord | <Rika> i think its not a proc actually, i dont know |
08:38:26 | silvernode | newRoom? |
08:39:24 | silvernode | oh I see how that works |
08:39:34 | silvernode | room + room + room |
08:40:17 | * | lj00nal quit (Ping timeout: 260 seconds) |
08:43:53 | FromDiscord | <Rika> actually |
08:44:16 | FromDiscord | <Rika> i dont think we even need to make a map type |
08:44:24 | FromDiscord | <Rika> since we have the adjacentRooms field |
08:44:53 | FromDiscord | <Rika> (but that means we have to traverse each room to see the whole map |
08:45:07 | silvernode | working on setting up a live stream so we can run the code and both see it |
08:46:12 | FromDiscord | <Rika> 👀 |
08:46:22 | FromDiscord | <Rika> i'll be leaving soon though |
08:46:39 | silvernode | yeah I should probably get to bed anyway |
08:46:50 | FromDiscord | <Rika> i have a few minutes |
08:46:51 | FromDiscord | <Rika> 15 |
08:47:08 | FromDiscord | <Rika> okay lets try removing the map type we dont need that |
08:49:45 | silvernode | forget the streaming, I'm on Wayland |
08:49:48 | * | nsf joined #nim |
08:50:02 | silvernode | back in codeshare |
08:50:14 | silvernode | so what did I miss? |
08:51:06 | * | ljoonal joined #nim |
08:54:10 | FromDiscord | <Rika> uh |
08:54:16 | FromDiscord | <Rika> me making a weirdproc |
08:54:18 | FromDiscord | <Rika> weird proc* |
08:54:30 | silvernode | 'left'? |
08:54:51 | skrylar[m] | wayland has some streaming support; at least wlroots (sway) does |
08:55:03 | skrylar[m] | not sure how you do it with weston (something about pipewire) |
08:55:16 | silvernode | skrylar[m]: I'm using Plasma |
08:55:45 | FromDiscord | <Rika> silvernode, yeah that one |
08:55:56 | silvernode | skrylar[m]: [-] wlroots-0.8.1_1 Modular Wayland compositor library |
08:56:01 | FromDiscord | <Rika> i'm prolly gonna overwhelm you if i continued though |
08:56:06 | silvernode | skrylar[m]: Looks like it's not even installed |
08:56:21 | silvernode | Rika, probably |
08:57:15 | skrylar[m] | silvernode: you'll have to deal with pipewire rigging then https://phabricator.kde.org/T7785 |
08:58:12 | skrylar[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:41 | silvernode | skrylar[m]: I am just trying to stream with OBS to youtube |
08:59:22 | silvernode | skrylar[m]: [-] wf-recorder-0.2_1 Screen recorder for wlroots-based compositors |
09:00:07 | FromDiscord | <Rika> silvernode, i just locally wrote something somewhat complex so maybe i'll leave that local |
09:00:29 | silvernode | lol |
09:00:38 | silvernode | I'm watching |
09:03:29 | Zevv | Ar_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:54 | voltist | Oh 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:26 | Zevv | why? |
09:10:41 | silvernode | Good code needs no comments right? |
09:11:02 | Zevv | I'm years into some projects and I added maybe, 10 comments |
09:11:24 | silvernode | I never make comments unless it's something I struggled to understand at the time |
09:11:54 | voltist | It needs comments because a) I struggle to understand my own code often and b) I intend to open source it soon |
09:12:06 | Zevv | a) is a good reason :) |
09:13:40 | voltist | Sometimes 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:06 | voltist | It's a part of the human condition specific to programmers |
09:28:48 | FromGitter | <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:28 | FromDiscord | <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:12 | FromGitter | <Albus70007> how can i make my own `*` function and pass it a float and a Vector3? |
13:27:24 | FromGitter | <sheerluck> func `*` |
13:27:50 | Yardanico | proc `*`(x: float, y: Vector3): Vector3 = |
13:28:06 | FromGitter | <Albus70007> and to make it public? |
13:28:15 | FromGitter | <Albus70007> it throws me an error |
13:28:20 | Yardanico | proc `*`*(x: float, y: Vector3): Vector3 = |
13:28:35 | * | xet7 joined #nim |
13:30:24 | FromGitter | <Albus70007> i think it works now, thank you |
13:32:06 | Zevv | Araq: 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:48 | FromDiscord | <mratsim> you might want to use nim-glm @Albus70007 |
13:56:53 | FromDiscord | <mratsim> !repo nim-glm |
13:56:54 | disbot | https://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:59 | enthus1ast | dom96: 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:34 | enthus1ast | ok 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:29 | enthus1ast | but now i'm moderated :D |
14:21:28 | dom96 | yeah, we have an issue for this |
14:21:31 | dom96 | what's your nick? |
14:21:47 | * | dom96 wonders why people don't click these links immediately |
14:22:29 | enthus1ast | enthus1ast |
14:23:04 | enthus1ast | changed my email and was not aware of this ;) |
14:23:10 | dom96 | fixed |
14:23:13 | enthus1ast | ty |
14:27:14 | enthus1ast | btw, must i login to gravatar to change the user image? |
14:29:43 | dom96 | yep |
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:38 | sschwarzer | As 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:49 | sschwarzer | pegs module, not peg |
14:39:39 | * | nixfreak quit (Ping timeout: 240 seconds) |
14:41:00 | enthus1ast | sschwarzer: echo repr examplePeg |
14:42:58 | sschwarzer | enthus1ast: 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:49 | enthus1ast | i don't know how peg is implmented, but i guess it is a macro that does transform the entered string into ast |
14:43:52 | sschwarzer | "entered" = created with `peg"..."` |
14:45:11 | sschwarzer | enthus1ast: 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:26 | sschwarzer | https://nim-lang.org/docs/pegs.html |
14:47:10 | enthus1ast | echo $examplePeg only prints (B 'c') |
14:47:18 | enthus1ast | so i guess nothing obvious :) |
14:47:38 | sschwarzer | enthus1ast: That's my point :) |
14:47:46 | sschwarzer | Ok, maybe semi-obvious ;) |
14:49:57 | sschwarzer | By 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:36 | sschwarzer | Interesting ... 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:16 | blackbeard420 | is 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:53 | disruptek | there /should/ be, right? |
15:51:13 | Zevv | good morning, disruptek |
15:51:55 | disruptek | sup zevv |
15:54:33 | disruptek | hearts and minds! people! hearts! and their minds! |
15:54:36 | * | filcuc_ quit (Quit: Konversation terminated!) |
15:59:18 | disruptek | nim is betamax for pl. change my mind. |
15:59:20 | disruptek | ~motd |
15:59:21 | disbot | motd: 11do a lot of people choose a language for the wrong reasons? -- disruptek |
16:03:36 | FromDiscord | <Rika> are you implying nim will fail? |
16:03:45 | disruptek | nah. |
16:04:32 | blackbeard420 | nim 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:08 | disruptek | this 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:19 | FromDiscord | <Rika> his dankness broke my dankmeter |
16:24:11 | * | narimiran joined #nim |
16:25:37 | * | krux02 joined #nim |
16:25:38 | Zevv | disruptek: 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:02 | disruptek | lower to zero allocs? |
16:26:54 | Zevv | zero overhead |
16:27:07 | disruptek | i don't understand why we don't make a special allocator that helps debug the gc. |
16:27:20 | disruptek | is that a good idea or is it dumb? |
16:27:28 | Zevv | why special, what should it do? |
16:27:42 | disruptek | arrange the memory with lots of fences and tripwires. |
16:27:52 | Zevv | nah use valgrind for that or libefence |
16:28:09 | Zevv | togetehr with -d:useMalloc |
16:28:20 | disruptek | oh, useMalloc. |
16:28:46 | disruptek | like, i don't understand why we paint memory with nil when freeing it. |
16:28:56 | Zevv | the 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:31 | Zevv | and we had a little chat yesterday about hooks and stuff, figuring out that 'weak' symbol definitions would be cool. |
16:29:44 | disruptek | yeah, i saw that. |
16:29:49 | disruptek | i like that idea. |
16:29:58 | Zevv | I 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:34 | disruptek | it could be super useful for building really wild objects in nim. |
16:30:44 | disruptek | plugin systems, hcr, etc. |
16:31:04 | Zevv | right |
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:49 | Araq | https://github.com/nim-lang/Nim/pull/13117#issuecomment-573433632 fyi |
16:46:51 | disbot | ➥ fix #12998 nim doc regression |
16:46:58 | Araq | since it keeps coming up |
16:47:20 | * | NimBot joined #nim |
16:54:48 | Araq | Zevv, what's the problem? remove allocators.nim and the void* pointer in the codegen |
16:55:29 | Zevv | yeah, well, "remove", as in, just throw it out? seqs_v2 and strs_v2 use it |
16:55:49 | Zevv | so should those not use it, and use the default alloc instead? What about -d:threads then? |
16:56:20 | Araq | well ok, it requires C codegen patches too |
16:56:29 | Zevv | yeah ok, I found those, that's ok. |
16:56:39 | Zevv | but I was wondering about what strs_V2 should use instead |
16:56:56 | Araq | well the code duplication is already bad |
16:57:14 | Araq | I suppose we need an allocators.nim that uses templates instead of function pointers |
16:57:54 | Zevv | but with threading on, it still should use allocShared I guess? |
16:57:54 | Araq | or maybe we should use mmdisp.nim for it? |
16:58:18 | Araq | yeah, --threads:on --gc:arc means you get a "shared" heap |
16:58:58 | Zevv | I 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:19 | Araq | this is the cost we cannot avoid, else you cannot move things effectively. That's not Nim specific either. |
16:59:33 | Zevv | sure |
16:59:53 | Araq | well alloc.nim -- Nim's TLSF based alloc/dealloc implementation, uses osalloc.nim to get memory from the OS |
17:00:12 | Araq | osalloc.nim -- get big chunks of memory from somewhere (mmap, malloc, etc) |
17:00:28 | Araq | mmdisp.nim -- dispatching logic for the different GCs nim supports |
17:00:48 | Araq | allocators.nim -- allocators for ARC's new strings and seqs, bad idea, to be removed. |
17:00:58 | Zevv | right, that makes sense |
17:02:05 | Zevv | when 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:37 | Araq | make it a flag inside the 'capacity' field like the old runtime does |
17:02:48 | Zevv | right |
17:03:12 | Araq | alternatively, we can keep the field and turn it into a refcount |
17:03:25 | Araq | and then we can even keep shallow() and shallowCopy() support |
17:03:34 | Zevv | ok, 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:49 | Araq | and for strings we could even go for COW |
17:04:27 | Zevv | that might surprise some people, although in practice it probably already is as soon as you hit a realloc |
17:04:48 | Araq | and RC == -1 can mean "wasn't allocated" |
17:04:58 | Zevv | RC? |
17:05:02 | Zevv | oh r |
17:05:04 | Zevv | rc |
17:05:06 | Zevv | right |
17:05:23 | Araq | but yeah, probably not that wise, COW bites with me "use Nim for hard realtime" goals |
17:05:26 | Araq | *my |
17:06:34 | Zevv | when threads are enabled, seqs and strings are allocated with sharedAlloc, is that the same for all other allocations like `new`? |
17:06:58 | Zevv | and 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:08 | Araq | exactly |
17:07:09 | * | ptdel joined #nim |
17:07:58 | Zevv | right, 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:38 | Zevv | and alloc()/realloc()/free() are provided by template |
17:08:58 | Araq | not sure, in the end everything uses malloc or our sharedAlloc |
17:09:19 | Araq | and sharedAlloc can be alloc if --threads:off |
17:09:42 | Araq | malloc vs sharedAlloc is to be decided via -d:useMalloc |
17:10:06 | Zevv | yeah but then there are two toggles for 3 options. |
17:10:13 | Zevv | but 2*2 = 4 |
17:10:23 | Zevv | but I see what you mean |
17:10:34 | disruptek | new math. |
17:11:07 | disruptek | COW can be impl inside there and then you have another toggle. 😉 |
17:11:19 | Zevv | good morning, disruptek |
17:11:38 | disruptek | it's a beautiful day. |
17:11:44 | disruptek | like spring weather. |
17:11:49 | Zevv | in januari |
17:11:53 | disruptek | yep. |
17:13:06 | FromDiscord | <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:23 | disruptek | araq: you're right. spreading packages across dirs is stupid. |
17:14:33 | disruptek | so what is the actual problem here. in #13117 |
17:14:34 | disbot | https://github.com/nim-lang/Nim/pull/13117 -- 3fix #12998 nim doc regression |
17:15:00 | * | Vladar joined #nim |
17:15:30 | Zevv | araq, 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:41 | Zevv | anywy, need to cook and fed the kids first etc |
17:19:03 | disruptek | what 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:40 | Yardanico | Zig has pluggable allocators like this actually |
17:20:49 | disruptek | you can just swap allocators by switching out a lib? |
17:25:20 | * | nsf joined #nim |
17:25:35 | disruptek | maybe 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:35 | FromDiscord | <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:25 | Araq | Zevv, no, you misunderstand me, the way you describe it is how we can implement it indeed |
17:54:11 | Araq | Rika: fwiw I heard new projects inside Google should be in Go now that it's considered stable enough |
17:54:44 | Araq | but don't quote me on that, it's all hearsay |
17:55:31 | disruptek | i thought go was google's training wheels language. |
17:56:04 | Zevv | Araq: ok, all clear |
17:56:30 | disruptek | zevv you have a branch i can look at? |
17:56:49 | disruptek | i can see this becoming very useful very quickly. |
17:59:19 | Araq | and your math is wrong because -d:useMalloc has no thread-local vs shared distinction |
17:59:31 | Araq | so it's 3 different settings, not 4 |
17:59:50 | disruptek | don't forget the cow level. |
18:00:03 | Araq | there is no cow level. |
18:01:12 | Araq | https://vignette.wikia.nocookie.net/diablo/images/f/fe/Cow03.jpg/revision/latest?cb=20090102095005 |
18:01:36 | disruptek | totally a cow level. |
18:10:03 | disruptek | y'know, we have to solve the perf issue with arc, too. |
18:10:32 | Araq | I think crashes are more important |
18:10:50 | Araq | perf is gained by waiting for Zevv's and clyybber's PRs |
18:12:59 | disruptek | i 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:49 | Zevv | disruptek: zevv-os-ansic is the minimalism-branch |
18:17:10 | Zevv | if you wanna go low, do --os:any -d:noSignalHandler -d:useMalloc --gc:arc -d:danger --opt:size --stackTrace:off |
18:23:36 | Araq | -d:danger implies --stackTrace:off |
18:25:03 | Zevv | right |
18:25:15 | Zevv | but now its even offer |
18:25:22 | Zevv | just in case, you never know |
18:25:58 | disruptek | unplug it, and then turn the switch to off for good measure. |
18:37:17 | Zevv | yeah nice instantiateForRegion |
18:38:02 | FromDiscord | <Rika> im scared, i just found a 1.2m line file just full of hello world |
18:38:07 | FromDiscord | <Rika> i dont even remember why i have this file |
18:38:34 | Zevv | did you happen talk to cadey a few weeks ago? |
18:38:54 | Cadey | hi |
18:39:12 | Zevv | oi :) was it you doing the 1.2m hello world tests in different languages? |
18:42:23 | FromDiscord | <Rika> it was around 4 months ago |
18:45:24 | FromDiscord | <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:44 | FromDiscord | <treeform> I need some way to capture i |
18:46:46 | Zevv | closureScope |
18:47:02 | Zevv | https://nim-lang.github.io/Nim/system.html#closureScope.t%2Cuntyped |
18:47:07 | FromDiscord | <treeform> Zevv thanks! some one had exact same question: https://forum.nim-lang.org/t/3193 |
18:47:29 | Zevv | I 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:06 | Zevv | btw, there is also capture: https://nim-lang.github.io/Nim/sugar.html#capture.m,openArray[typed],untyped |
18:48:15 | Zevv | which is better IMHO, as it is more explicit |
18:48:54 | FromDiscord | <Rika> treeform you sent a blank playground link lmao |
18:49:17 | Araq | capture is not in 1.0 |
18:49:46 | FromDiscord | <Rika> oh so what is? |
18:50:00 | Araq | closureScope is |
18:50:22 | Araq | and yeah, Nim does it this way for easier JS interop indeed, it's sad |
18:50:30 | Araq | well we also do it for async's speed |
18:51:06 | Araq | in retrospect we could put more effort into detecting the pattern and optimizing it but days only have 24 hours here in Germany |
18:51:21 | Zevv | rent a fast jet |
18:53:11 | Zevv | Araq: 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:13 | FromDiscord | <treeform> @Rika lol https://play.nim-lang.org/#ix=27fj, thanks Zevv, both capture and closureScope worked great! |
18:57:43 | Araq | Zevv, right but keep in mind that ARC is actually about good interop with custom data types |
18:58:08 | Araq | and custom node based data structures can optimize for threadlocal allocations |
18:58:25 | Araq | so alloc vs allocShared stays for the precise control they offer |
19:13:34 | FromDiscord | <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:55 | Araq | when coro got submitted we already had async and coro had weird crashes on OSX |
19:15:47 | Araq | coroutines also have stack size problems, nobody knows how to size them |
19:16:55 | Araq | in the end thread pool + async is what will win us most benchmarks, my prediction |
19:19:11 | shashlick | If anyone wants any fixes or improvements in choosenim, now is the time |
19:19:21 | * | Kaivo quit (Quit: WeeChat 2.7) |
19:19:22 | Araq | 64bit Windows support? |
19:19:43 | Araq | but it's TV time here, bbl |
19:19:54 | shashlick | Am in bug fixing mode right now, have fixed a few and scrubbing the entire issue tracker |
19:20:20 | Zevv | ok, so alloc and allocShared should stay. string and seq use allocShared by default then I assume |
19:20:20 | shashlick | Any priorities, feel free to comment or post new ones |
19:20:37 | sschwarzer | shashlick: Awesome! :) |
19:20:41 | shashlick | Araq: once we post a bug fix release, I'll be implementing that |
19:21:30 | shashlick | My backlog for new features is 99, 116, 123 and 128 so far |
19:21:53 | shashlick | But would rather hear from the community what's most important |
19:22:12 | sschwarzer | shashlik: You mean out of the four you mentioned? |
19:22:38 | shashlick | Anything goes, those are just ones I've seen so far |
19:24:37 | sschwarzer | shashlick: What are the numbers, they all lead to very old issues. (I'm looking under https://github.com/nim-lang/Nim/issues/ ) |
19:25:57 | FromDiscord | <mratsim> look in !repo choosenim |
19:26:08 | FromDiscord | <mratsim> !repo choosenim |
19:26:09 | disbot | https://github.com/dom96/choosenim -- 9choosenim: 11 15 218⭐ 23🍴 |
19:26:22 | sschwarzer | mratsim: Oops, you were at choosenim, right. Sorry. |
19:27:49 | sschwarzer | shashlick: I'd like #140 implemented. I also ran into this recently. |
19:27:58 | shashlick | appreciate more eyes on the issue tracker |
19:28:21 | shashlick | yes but that one needs a fix on the Nim side first |
19:33:57 | sschwarzer | Re #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:43 | shashlick | yep, that's #1 in the feature list |
19:35:07 | shashlick | it 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:17 | sschwarzer | Also #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:37 | shashlick | yep, it's in |
19:37:15 | * | ltriant joined #nim |
19:37:39 | sschwarzer | shashlik: I mentioned it for priorization among your prioritized four tickets. ;) |
19:37:58 | shashlick | agreed |
19:38:12 | sschwarzer | shashlick: I don't know how many you can do |
19:40:21 | shashlick | there'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:39 | shashlick | looks like Araq's wishlist is still pending - that's on top - https://github.com/dom96/choosenim/milestone/1 |
19:48:26 | disruptek | ~closureScope is https://nim-lang.github.io/Nim/system.html#closureScop |
19:48:26 | disbot | closureScope: 11https://nim-lang.github.io/Nim/system.html#closureScop |
19:48:28 | disruptek | e.t%2Cuntyped |
19:52:45 | disruptek | if it's not too much trouble, please tag this stuff so we can find it more easily. |
19:53:22 | disruptek | ~closureScope is https://nim-lang.github.io/Nim/system.html#closureScope.t%2Cuntyped |
19:53:23 | disbot | closureScope: 11https://nim-lang.github.io/Nim/system.html#closureScope.t%2Cuntyped |
19:59:02 | Zevv | disbot: make a web interface on your bot so we can explore its knowledge |
19:59:15 | disruptek | really. |
19:59:44 | disruptek | i will just have a command that dumps it to ix and gives you a link. |
19:59:59 | disruptek | i don't want to mess with hosting anything. |
20:01:58 | disruptek | oh, i'll just put the footnotes in a public git repo. |
20:03:47 | Yardanico | https://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:04 | disruptek | ~data |
20:08:04 | disbot | data: 11disbot databases are at https://github.com/disruptek/disbot -- disruptek |
20:10:28 | FromGitter | <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:45 | Yardanico | can you share the code? |
20:12:10 | FromGitter | <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:23 | dom96 | Hrm, 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:57 | disruptek | do more work all-at-once. |
20:28:17 | sschwarzer | I'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:03 | sschwarzer | Somehow Nim doesn't like the type I've given it. ;-) |
20:29:34 | disruptek | the type is seq[...]; it's created with newSeq[...]() |
20:29:40 | disruptek | use = not : |
20:30:10 | FromDiscord | <Rika> use , not ; |
20:30:20 | disruptek | use ; not , |
20:32:09 | FromDiscord | <Rika> disruptek where? |
20:32:10 | sschwarzer | disruptek: I replaced : with = and it compiles. That makes sense. :) |
20:32:22 | disruptek | 😉 |
20:32:30 | sschwarzer | disruptek: But what do you mean by "use ; not ,"? |
20:32:42 | disruptek | i mean don't listen to rika. |
20:32:52 | sschwarzer | disruptek: Haha, ok :) |
20:32:55 | FromDiscord | <Rika> why? |
20:33:14 | disruptek | i prefer ; to separate proc arg defs. |
20:33:40 | FromDiscord | <Rika> so its just difference in preference |
20:33:46 | disruptek | yep. |
20:34:20 | disruptek | it's less ambiguous, since a , may exist for other reasons. |
20:35:21 | FromDiscord | <Rika> what |
20:35:24 | FromDiscord | <Rika> ugh |
20:35:27 | FromDiscord | <Rika> pressed enter early |
20:35:33 | FromDiscord | <Rika> what does the stdlib use? |
20:35:43 | disruptek | i think mostly , |
20:35:52 | sschwarzer | Wow, it works! :-) :-) :-) https://play.nim-lang.org/#ix=27fP |
20:35:55 | FromDiscord | <Rika> also why are there two ways to write it too |
20:36:24 | FromDiscord | <Rika> you're gonna run into issues when the key function takes in a flag parameter |
20:36:34 | FromDiscord | <Rika> you're gonna need to create a partial function |
20:37:18 | disruptek | !repo currying |
20:37:19 | disbot | https://github.com/t8m8/currying -- 9currying: 11Currying Library for Nim 15 29⭐ 4🍴 |
20:37:37 | sschwarzer | Rika: Yes, that may be an extension, but I didn't want to make it too complicated right at the start. |
20:38:03 | sschwarzer | And from what I understand, you'd pass in the already curried proc, right? |
20:38:19 | FromDiscord | <Rika> yes |
20:39:45 | sschwarzer | disruptek: Did you see my direct message? |
20:40:04 | disruptek | nah, what's up |
20:40:16 | sschwarzer | disruptek: see there :) |
20:42:01 | disruptek | i can't deal with my client right now. |
20:42:12 | disruptek | what does it say? |
20:42:17 | disruptek | is it BTC address? |
20:42:49 | sschwarzer | disruptek: no :) We can continue that chat once your client works again. It's nothing urgent :) |
20:43:20 | disruptek | i just os'd a palmtop and i don't have keys. |
20:45:16 | sschwarzer | disruptek: What kind of palmtop? |
20:45:18 | * | al_ joined #nim |
20:45:18 | * | al_ is now known as Guest94576 |
20:45:30 | disruptek | pocket 2 |
20:48:43 | sschwarzer | disruptek: Something like this? https://www.amazon.com/Update-8GB-Windows-Portable-Processor-Graphics/dp/B07MMSQ9ZM |
20:49:06 | disruptek | yeah but intel m3-1800 |
20:49:30 | disruptek | 8100 |
20:49:53 | disruptek | the keyboard takes some getting used-to. |
20:50:36 | sschwarzer | disruptek: Good luck :) |
20:52:43 | * | Guest94576 quit (Quit: Guest94576) |
20:53:02 | disruptek | -d:toDebug="always" is amazing. |
20:57:41 | sschwarzer | Bye everyone :) |
20:57:51 | disruptek | cya stefan |
20:58:04 | * | narimiran quit (Quit: leaving) |
20:58:51 | sschwarzer | disruptek: We can talk another time when you can use private chats again. :) |
20:59:01 | disruptek | kinky |
20:59:21 | sschwarzer | disruptek: *lol* No, nothing kinky. Not _that_ private ;) |
20:59:30 | disruptek | awww |
20:59:51 | disruptek | how come no one wants to play "ride the horsey" with me? |
20:59:58 | * | sschwarzer quit (Quit: leaving) |
21:02:21 | FromGitter | <timotheecour> @disruptek let’s keep this professional please :) |
21:02:54 | disruptek | i might be a cowboy. |
21:03:08 | FromGitter | <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:21 | FromGitter | <timotheecour> (https://github.com/nim-lang/Nim/pull/13000) |
21:03:22 | disbot | ➥ exporting normalizePathEnd |
21:03:31 | disruptek | that's a pity. |
21:15:20 | * | ltriant joined #nim |
21:17:03 | * | natrys quit (Quit: natrys) |
21:23:47 | silvernode | disruptek: Good morning/afternoon |
21:29:09 | disruptek | it's only a model. |
21:31:35 | * | pbb_ joined #nim |
21:31:41 | * | pbb quit (Ping timeout: 246 seconds) |
21:34:28 | silvernode | disruptek: 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:57 | disruptek | sure, sounds fun. |
21:35:03 | silvernode | disruptek: https://github.com/silvernode/space-nim/blob/master/ideas.md |
21:35:59 | silvernode | I 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:39 | silvernode | I figure this project can just be added to whenever. If it takes 10 years to finish it, that's fine. |
21:37:46 | silvernode | The best way for me to learn is to work on something that's ambitious for my skill level. |
21:38:00 | disruptek | yep. |
21:38:29 | silvernode | disruptek: if you give me your github username I will add you as a contributor. |
21:38:38 | disruptek | that's why i'm trying to get araq to switch to a real os. |
21:38:52 | silvernode | disruptek: what OS? |
21:38:55 | silvernode | Linux? |
21:39:13 | disruptek | when you run windows, there's basically nowhere to go but up. |
21:39:25 | Araq | the first part of "OS" stands for "operating". |
21:39:33 | Araq | aka "working" |
21:40:03 | skrylar[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:37 | disruptek | pulse-jack? |
21:40:47 | disruptek | jack is for rt; pulse is not. |
21:42:41 | skrylar[m] | you have to set up some dbus voodoo to get them to hand audio off to jack |
21:42:49 | Araq | for 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:15 | disruptek | i can't help your experience. |
21:43:24 | skrylar[m] | admittedly cups worked for me :b |
21:43:42 | disruptek | but that doesn't mean it's typical. |
21:44:46 | Araq | I used Linux for at least 5 years, only had dual boot for gaming |
21:45:11 | skrylar[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:14 | disruptek | you can see in this graph when i booted into windows: https://github.com/disruptek |
21:45:19 | disruptek | so much for "working". |
21:45:30 | skrylar[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:58 | Araq | in 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:08 | Araq | not that I used them, but it's all there |
21:46:16 | disruptek | i see. |
21:46:49 | skrylar[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:59 | disruptek | i guess switching to windows because it can also run software you don't use makes sense to some folks. |
21:47:07 | skrylar[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:08 | Araq | the fact that I could easily install the Python version I cared about was a bonus too |
21:47:25 | Araq | back then when I used Python... |
21:47:48 | skrylar[m] | now araq uses ruby :^) |
21:47:52 | Araq | when I ran opensuse its package manager would easily run for hours, super slow |
21:47:56 | * | demotomohiro joined #nim |
21:48:10 | skrylar[m] | hm. zypper doesn't do that these days |
21:48:13 | Araq | it was some nice, new'ish development iirc |
21:48:50 | skrylar[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:04 | skrylar[m] | dunno about abuild/apk. haven't tried to bundle packages with it yet |
21:49:51 | Araq | maybe SteamOS will bring me back to Linux land. |
21:50:06 | Araq | ha ha ha |
21:50:09 | shashlick | I've been quite happy with Ubuntu desktop but main driver is a windows laptop |
21:50:37 | skrylar[m] | elementary was pleasant, although the kernel was a bit old |
21:50:41 | disruptek | i just cannot work in windows. |
21:50:57 | FromGitter | <Albus70007> does nim have something like % in python? |
21:51:10 | skrylar[m] | now to eat foodstuffs and go back to patching all this stuff to work |
21:53:57 | demotomohiro | Albus70007, you want something like this? https://nim-lang.org/docs/system.html#mod%2Cint%2Cint |
21:55:01 | lqdev[m] | @Albus70007 if you're looking for modulo, see ↑, otherwise, look in strutils |
21:55:03 | FromGitter | <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:21 | FromDiscord | <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:52 | FromDiscord | <mratsim> FAudio + Proton/DXVK for Steam or Lutris otherwise |
22:24:05 | FromDiscord | <mratsim> My only issue is finding time to play |
22:25:13 | Araq | sure 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:36 | FromDiscord | <mratsim> Actually there is a problem with competitive games, it will almost always trigger anti-cheat |
22:33:49 | Araq | or 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:45 | disruptek | it's not perfect. |
22:35:04 | Araq | or 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:47 | disruptek | you're right, everything should be closed source so it's harder to crack, right? |
22:36:11 | Araq | disruptek: the problem is not that "It's not perfect", the problem is that nothing ever improves and changes for the better. |
22:36:35 | disruptek | it could be me, but i'm finding it hugely improved this go-round. |
22:36:50 | disruptek | maybe my tastes have changed, though. |
22:36:52 | FromDiscord | <treeform> I always switched to windows because I want to make games, and most of my players are on windows. |
22:37:16 | Araq | no, closed source is worse for security but nobody uses Windows and expects it to be "secure" :P |
22:37:20 | disruptek | Araq: i agree that progress in certain areas is painfully slow. |
22:37:38 | disruptek | so, windows wins by default because it refuses to play. |
22:38:00 | disruptek | honestly, i don't understand why people don't make more software. |
22:38:38 | disruptek | i can't believe how little support there seems to be for simple tools line cron or syslog. |
22:38:59 | Araq | or how about we talk about distributions, there are hundreds of them. That's an utter nightmare for QA. |
22:39:14 | disruptek | yes, i want to talk about distributions. |
22:40:59 | FromGitter | <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:00 | disbot | ➥ fix #12998 nim doc regression |
22:41:35 | disruptek | i wonder what that means to cli and nim.cfg though. |
22:41:43 | Araq | timotheecour: we already use some runtime check and you know my opinion on env vars |
22:41:43 | disruptek | you're talking about changing $pathsubs |
22:42:07 | disruptek | env vars are tools of the devil in araqlogic. |
22:42:43 | Araq | they are inter-process mutable global state. in any logic. |
22:42:49 | FromGitter | <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:53 | disruptek | they are poorly specified and poorly scoped. |
22:43:44 | disruptek | how about the solution doesn't create more trouble than the original issue? |
22:44:31 | FromGitter | <timotheecour> @disruptek happy to hear your concrete suggestion for https://github.com/nim-lang/Nim/pull/13117#issuecomment-573433632 |
22:44:33 | disbot | ➥ fix #12998 nim doc regression |
22:44:52 | Araq | the 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:06 | disruptek | well, the fix is for #12998 |
22:45:08 | disbot | https://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:19 | disruptek | that to me doesn't sound like an env var. |
22:45:32 | Araq | timotheecour: just let me take over your PR |
22:46:21 | FromGitter | <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:48 | disruptek | look, we have something similar in the form of $NIMBLE_DIR. |
22:46:50 | disruptek | it's terrible. |
22:47:03 | FromGitter | <timotheecour> what else do u suggest besides env var (which is really not that bad in this case) |
22:47:14 | disruptek | it's so bad that shashlick cannot even use it for its intended purpose. |
22:47:20 | disruptek | he has to patch the compiler to emit json instead. |
22:47:25 | disruptek | now, c'mon... 🤣 |
22:47:55 | Araq | nimconf.getSystemConfigPath is the mechanism, it exists |
22:48:09 | disruptek | nimble cannot use $NIMBLE_DIR sufficiently to use $NIMBLE_DIR. |
22:48:31 | Araq | disruptek: that might only be a Nimble specific problem though |
22:48:44 | disruptek | the behavior is poorly defined in nimph, too, as a result. |
22:51:39 | Araq | timotheecour: the other solution is to staticRead"nimdoc.css" into the compiler's binary so that it can always dump the "resource" |
22:52:17 | Araq | I don't like the binary bloat though |
22:52:57 | Araq | but it would work. |
22:53:44 | FromGitter | <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:22 | disruptek | i think it's easy enough for this stage of the game. |
22:56:07 | Araq | here 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:30 | Araq | and so there will be no nimdoc.css whatsoever |
22:56:42 | Araq | unless we bundled it as a resource |
22:57:09 | disruptek | in the grand scheme of this, it's negligible bloat. |
22:57:19 | Araq | see the problem: Linux has over 100 distributions, QA made impossible. |
22:57:45 | disruptek | qa is possible, it's just conducted at 100x the cost. |
22:58:28 | Araq | well 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:07 | disruptek | i dunno, i have some ideas i want to try. |
23:03:36 | FromGitter | <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:26 | Araq | doesn't work, there is not a single "root" |
23:04:39 | FromGitter | <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:50 | Araq | there are at least 3 different "roots" |
23:05:21 | Araq | binaries, config, docs, "shared" and "var"? tbh I don't remember |
23:05:22 | disruptek | i think he means {parent} == {parent1, parent2, parent3} |
23:05:24 | FromGitter | <timotheecour> (with `which dmd`: ⏎ `/usr/local//bin/dmd`) |
23:06:34 | Araq | well you can get /etc via getSystemConfigPath |
23:06:40 | FromGitter | <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:47 | Araq | seems good enough to me |
23:07:10 | Araq | what do you mean "no difference"? |
23:07:25 | Araq | the difference is introduced by Unix with its /usr/bin madness |
23:08:03 | FromGitter | <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:37 | FromGitter | <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:18 | Araq | please simply use getSystemConfigPath, it's battle tested and mostly does what you have in mind |
23:10:29 | FromGitter | <timotheecour> `nim —getnewinstallcfglocaiton` points to `/os_specific_prefix/nim/doc/nimdoc.ss` |
23:11:45 | Araq | I still don't share this philosophy "ok, it doesn't really work so we made it configurable" |
23:11:52 | FromGitter | <timotheecour> > please simply use getSystemConfigPath ⏎ ⏎ so i need would be to expose it at runtime, where ConfigRef is not known |
23:12:02 | disruptek | shouldn'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:41 | disruptek | i wouldn't rather have configuration as a last resort, to solve unworkable problems. so far, nimph needs none. |
23:13:21 | Araq | disruptek: I'll fix it tomorrow |
23:13:42 | disruptek | i'm just trying to understand. |
23:13:44 | Araq | good night |
23:13:47 | disruptek | night |
23:36:17 | * | ptdel quit (Ping timeout: 260 seconds) |
23:49:56 | * | demotomohiro joined #nim |
23:54:44 | FromDiscord | <Clyybber> ayy, I'm always too late to the party |
23:55:09 | * | ptdel joined #nim |
23:57:38 | FromDiscord | <Clyybber> good night then :d |