00:04:05 | FromDiscord | <Xydium> `Error: unhandled exception: 'sym' is not accessible using discriminant 'kind' of type 'TNode' [FieldError]` |
00:04:20 | FromDiscord | <Xydium> @mratsim The macro produces this only if I try to use the result |
00:04:51 | FromDiscord | <Xydium> I.e. just using the macro to construct the CSP compiles, but adding `let (solution, status) = test.search` after doesn't |
00:05:22 | FromDiscord | <mratsim> what's the type of test.search |
00:05:40 | FromDiscord | <Xydium> `proc search*[T](problem: Problem[T]): (seq[(string, T)], SearchStatus)` |
00:06:04 | FromDiscord | <Xydium> `test: Problem[int]` |
00:06:06 | * | tane quit (Quit: Leaving) |
00:07:09 | FromDiscord | <Xydium> It's not a problem in the macro, the macro returns before the exception |
00:07:11 | FromDiscord | <mratsim> ah seems like it exists in the code you sent |
00:07:27 | FromDiscord | <Xydium> it wasn't implemented in that code though |
00:07:42 | FromDiscord | <Xydium> and the proc signature changed |
00:07:45 | FromDiscord | <mratsim> TNode sounds like an internal Nim VM type though |
00:08:11 | FromDiscord | <Xydium> Could it be that the debug compiler still optimizes out the macro because it's unused? |
00:08:36 | FromDiscord | <Xydium> And once I use the result of the macro, that optimization disappears and the error can occur |
00:08:54 | FromDiscord | <mratsim> I think you are trying to access an enum sym or symbol but you are no the wrong type or the wrong enum variant |
00:09:32 | FromDiscord | <mratsim> easiest way to debug macros if it compiles is to use them in an expandMacros block |
00:09:47 | FromDiscord | <mratsim> or put result.toStrLit at the end of the macro |
00:09:59 | FromDiscord | <mratsim> and copy-past the code directly (and comment out the macro) |
00:11:12 | FromDiscord | <Xydium> Oh.... it might be from the define macro instead |
00:11:32 | FromDiscord | <Xydium> but define happens before constrain, so that would be weird |
00:11:42 | FromDiscord | <Xydium> because I know constrain was called and returned |
00:12:19 | FromDiscord | <Xydium> oh, oh my |
00:12:37 | FromDiscord | <Xydium> yeah the expansion of the define macro is.... some ugly stuff |
00:13:09 | FromDiscord | <Xydium> wait no, |
00:13:15 | FromDiscord | <Xydium> it's because the toSeq is being inlined |
00:13:15 | FromDiscord | <Clyybber> @mratsim Nice |
00:13:28 | FromDiscord | <mratsim> use result.toStrLit then |
00:13:37 | FromDiscord | <mratsim> AFAIK one or the other expands everything |
00:13:43 | FromDiscord | <mratsim> including templates |
00:14:00 | FromDiscord | <mratsim> but in one of them you get the ugly gensym |
00:14:15 | FromDiscord | <Xydium> `test.addVariable("X", toSeq(1 .. 9))` is the result, looks normal to me |
00:16:14 | FromDiscord | <Clyybber> @mratsim Did the resulting binary size change in any meaningful way? |
00:16:49 | FromDiscord | <Xydium> It happens even if I only use manual function calls |
00:17:44 | FromDiscord | <mratsim> Ah yes forgot to measure that |
00:22:16 | FromDiscord | <mratsim> no change |
00:26:46 | FromDiscord | <mratsim> Ah this article was a good explanation of what I was feeling when trying to implement nested barriers: https://gameprogrammingpatterns.com/state.html |
00:27:09 | FromDiscord | <mratsim> I don't agree with the state pattern at the end though |
00:30:12 | FromDiscord | <Xydium> So, I tried compiling in 0.19.6 and get a different error |
00:30:29 | FromDiscord | <Xydium> `/playground/nim/lib/pure/collections/tables.nim(583, 12) Error: cannot instantiate: 'A'` |
00:30:50 | FromDiscord | <Xydium> `var assignment = newTable[Variable[T], T]()` is in the search function |
00:31:41 | FromDiscord | <Xydium> oh wait I see the issue |
00:32:08 | FromDiscord | <Xydium> I'm trying to return the TableRef[Variable[T], T] as a seq[string, T] |
00:32:26 | FromDiscord | <Xydium> And for some reason the compiler since 0.20 doesn't scream at me |
00:33:54 | FromDiscord | <Xydium> still doesn't fix it |
00:42:35 | FromDiscord | <Fern & Simula (They/Them)> anyone know of a good way to traverse a series of `DotExpr`? |
00:42:42 | FromDiscord | <Fern & Simula (They/Them)> i just can't quite figure it out |
00:44:10 | FromDiscord | <Xydium> What's the tree look like? |
00:45:21 | FromDiscord | <Fern & Simula (They/Them)> just figured it out haha |
00:45:31 | FromDiscord | <Xydium> Recursion? Recursion. |
00:45:34 | FromDiscord | <Fern & Simula (They/Them)> absolutely |
00:45:51 | FromDiscord | <Fern & Simula (They/Them)> the nice thing about compiletime procs is you know at compiletime if your recursion is too deep lmaop |
00:46:10 | FromDiscord | <Fern & Simula (They/Them)> although in this case, going that deep means really bad things lol |
00:47:07 | FromDiscord | <Xydium> solid |
00:56:19 | FromDiscord | <Fern & Simula (They/Them)> anyone have any examples of how to use `newIfStmt`? |
00:57:39 | FromDiscord | <mratsim> probably just newIfStmt(nnkElifStmt.newTree(expr, stmt), nnkElifStmt.newTree(expr2, stmt2), nnkElse(stmt3)) |
00:57:45 | FromDiscord | <mratsim> or something like that |
00:58:04 | FromDiscord | <mratsim> see here: https://nim-lang.org/docs/macros.html#statements-if-statement |
00:58:21 | FromDiscord | <mratsim> ah it's ElifBranch |
00:58:41 | FromDiscord | <mratsim> going to sleep but in general, always keep the macro doc opened when you do macros ๐ |
00:58:54 | FromDiscord | <Fern & Simula (They/Them)> alright, thanks. this got real complex real fast, probably just gonna sleep on it haha |
00:59:12 | FromDiscord | <Clyybber> we should get something like https://github.com/alehander92/breeze into stdlib |
00:59:12 | FromDiscord | <mratsim> if you deal with a lot of conditional, synthesis has a lot of examples: https://github.com/mratsim/Synthesis |
00:59:32 | clyybber | gn8 y'all |
00:59:34 | * | clyybber quit (Quit: WeeChat 2.7) |
00:59:36 | FromDiscord | <mratsim> for example: https://github.com/mratsim/Synthesis/blob/master/synthesis/factory.nim#L370-L376 |
00:59:38 | FromDiscord | <Fern & Simula (They/Them)> night fam |
01:00:27 | * | actuallybatman quit (Quit: leaving) |
01:15:57 | FromDiscord | <exelotl> what is this ! operator in !"foo" |
01:18:03 | FromDiscord | <exelotl> oh it's a deprecated way to make an identifier |
01:27:45 | * | azed quit (Read error: Connection reset by peer) |
01:33:17 | * | Hideki joined #nim |
01:33:40 | * | Hideki is now known as Guest92838 |
01:42:40 | * | Guest92838 quit (Remote host closed the connection) |
01:42:57 | * | Hideki joined #nim |
01:43:21 | * | Hideki is now known as Guest33491 |
01:45:57 | FromGitter | <bung87> @zevv can I use userdata in grammar level? |
01:53:28 | * | Guest33491 quit (Remote host closed the connection) |
01:54:02 | * | Hideki joined #nim |
01:54:25 | * | Hideki is now known as Guest78793 |
01:58:53 | * | Guest78793 quit (Ping timeout: 260 seconds) |
02:08:17 | FromDiscord | <slymilano> Does anyone know of a very very hand holdy guide for cross compilation from a Mac OSX dev box to windows, linux and mac binaries? |
02:19:04 | shashlick | I already shared earlier but I prefer building on the target since you can run tests as well - cross compilation does not afford testing |
02:25:40 | FromDiscord | <slymilano> If you mean the travis ci .sh script unfortunately i've never used travis ci |
02:27:29 | * | Hideki joined #nim |
02:27:53 | * | Hideki is now known as Guest88776 |
02:29:17 | shashlick | Ya but it is a general comment, you can do the same on appveyor, azure pipes or whatever else |
02:30:03 | shashlick | And the point is that you just need to commit that yml file into your repo and enable your repo in Travis and it will work |
02:30:34 | shashlick | But ya, you'd certainly prefer your own CI for familiarity |
02:31:51 | * | Guest88776 quit (Ping timeout: 258 seconds) |
02:44:04 | * | endragor joined #nim |
02:48:28 | * | endragor quit (Ping timeout: 260 seconds) |
03:00:02 | FromDiscord | <mfiano> How is the vim/neovim tooling for Vim currently? I tried about a year ago and felt it lacking. Looking forward to trying Nim again soon. |
03:00:08 | FromDiscord | <mfiano> Err for Nim |
03:00:11 | disruptek | pretty great. |
03:00:41 | disruptek | !repo alaviss/nim.nvim |
03:00:42 | disbot | https://github.com/alaviss/nim.nvim -- 9nim.nvim: 11Nim plugin for NeoVim 15 56โญ 8๐ด |
03:02:04 | FromDiscord | <mfiano> Can it do symbol completion of external modules, recompile/display compiler output on a keybind, source code navigation (jump to definition), and or inline semantic analysis to catch problems before compiling? |
03:02:36 | disruptek | yes, except for ffi symbol resolution. |
03:02:45 | FromDiscord | <mfiano> Yes to which one? |
03:03:02 | disruptek | all of them. |
03:03:20 | FromDiscord | <mfiano> Is the last one new? It hadn't done that before. |
03:04:22 | disruptek | i just started with nim in april, so it's /all/ new afaic. |
03:08:51 | FromDiscord | <mfiano> Alright thanks. It's going to be new to me for sure. I've been using a single language for like 20 years |
03:09:04 | disruptek | english, i guess. |
03:09:11 | FromDiscord | <mfiano> PL |
03:10:33 | disruptek | the suspense is killing me. what is it? |
03:10:51 | FromDiscord | <mfiano> Ha, Common Lisp. |
03:11:08 | disruptek | ahh. well, this'll be quite a departure. |
03:12:04 | FromDiscord | <mfiano> Aye, considering it's had a lot of its features for decades, and even more I'll be missing. But change and the challenges involved can be good |
03:12:44 | disruptek | the performance is addictive. |
03:13:18 | FromDiscord | <mfiano> I'm not a stranger to performance. CL compares with C, and in some applications can be much faster. |
03:13:45 | disruptek | some. ๐ |
03:14:20 | disruptek | but yes, if you've spent 20 with CL, you're a wizard alright. |
03:14:39 | FromDiscord | <mfiano> But the best kind of performance is interactive compilation. Never have to stop your main loop to change its functionality. |
03:14:55 | FromDiscord | <mfiano> Code writing performance trumps execution perfroamnce in my opinion. |
03:15:16 | disruptek | true. |
03:16:04 | disruptek | maybe you can write the missing repl for us. |
03:16:14 | disruptek | there have been some abortive efforts in the past. |
03:16:27 | * | muffindrake quit (Ping timeout: 246 seconds) |
03:16:32 | FromGitter | <deech> In that case I wonder how you're making do with Nim's lack of a REPL. |
03:16:42 | disruptek | incremental compilation is one of the main goals for 2020. |
03:16:54 | FromDiscord | <mfiano> I noticed, though I think HCR has to become a bit more mature for that to have any good effect. |
03:17:12 | disruptek | one step at a time. |
03:18:54 | * | muffindrake joined #nim |
03:21:03 | FromDiscord | <mfiano> I have tried learning many other languages in the past but keep going back to Lisp. I want that to change with Nim. |
03:21:36 | disruptek | why is that? |
03:24:07 | FromDiscord | <mfiano> 2 reasons. CL is good at rapid prototyping ideas into working code, arguably better than a language like Python (where I came from). There is no disconnect of flow to stop and recompile, etc. Also, because I'm old and heavily invested. It'd take another lifetime to rewrite my stack in a new language. |
03:25:09 | disruptek | no, i understand CL. i want to know what's attracting you to nim. |
03:26:51 | disruptek | or do you just want the new-language-new-paradigm-assimilate-new-techniques-into-existing-language thing? |
03:27:38 | FromDiscord | <mfiano> I'm a professional game developer, and it seems to have a niche for that. I also like terse languages with gradual typing, and of course the performance. The challenge is another reason. Finally, and probably a really big reason, is I like Vim, and Lisp is heavily tied to Emacs to get the most out of it. |
03:28:29 | disruptek | do you use parinfer? |
03:28:37 | FromDiscord | <mfiano> No I can't stand it. |
03:28:42 | disruptek | why is that? |
03:29:33 | FromDiscord | <mfiano> Because I like structural editing - changing the shape of my code with parentheses-manipulating commands, rather than trying to do it automatically based on indentation. |
03:29:34 | disruptek | we can always use more fp people. i think it's a weak point for nim, despite the obvious. |
03:30:53 | disruptek | and vim people are, of course, highly prized. ๐ |
03:31:32 | FromDiscord | <mfiano> Well Lisp isn't really a functional language, but I get what you are saying. |
03:33:05 | disruptek | send !help to disbot -- he's pretty useful. |
03:33:38 | disruptek | and #nim is your best bet for support. |
03:33:57 | disruptek | and i'm biased, but i think this is the best package manager: |
03:33:59 | disruptek | !repo nimph |
03:33:59 | disbot | https://github.com/disruptek/nimph -- 9nimph: 11a nim package hierarchy manager from the future ๐ง 15 26โญ 1๐ด 7& 1 more... |
03:35:26 | FromDiscord | <mfiano> Well first stop I guess is getting nvim configured. Then I will probably read the documentation from start to finish because that's how I learn. So it'll probably be a while before I get to playing around with code, or the tooling involved like package managers ๐ |
03:36:18 | disruptek | oh jump in. it's just python done right. |
03:36:44 | * | mfiano joined #nim |
03:37:35 | FromDiscord | <mfiano> I think the biggest disadvantage of Nim is the size of the community, but I am hopeful that will change. |
03:38:19 | disruptek | true, it's a problem. |
03:40:14 | FromDiscord | <mfiano> I believe a language is like a tripod. 1 leg is the stdlib, 1 is the tooling, and the other is the ecosystem. Take out one and it falls over flat. Hopefully Nim can grow before it does so |
03:41:05 | FromDiscord | <mfiano> It's why I normally don't pay attention to most languages in the sea of toy languages. The situation is like Linux distros of the early 2000's |
03:42:10 | disruptek | true, but nim has the technical chops. it just needs stdlib and tooling improvements, imo. |
03:43:00 | FromDiscord | <slymilano> I think it needs better guides for common scenarios and features you would build in other more mainstream languages. |
03:43:07 | FromDiscord | <mfiano> It has enough of that to gain the momentum needed for contributors to do the rest. But it needs contributors, which needs users. |
03:43:30 | disruptek | i think the stdlib will largely sort itself out, but i think we need to give people a tooling experience that meets or exceeds that of rust. that's one of the main things that has helped rust, in my opinion. |
03:44:08 | yumaikas | disruptek: What makes you think that the tooling situation is the major win of rust? and where is Nim lacking there? |
03:44:30 | FromDiscord | <mfiano> I found it interesting that Nim is rated #1 systems language over Rust, on Slant |
03:44:30 | disbot | https://github.com/nim-lang/Nim/issues/1 -- 5Trojan horse reported by avira free-av during the setup (installer) |
03:44:35 | FromDiscord | <mfiano> Despite the user count |
03:44:45 | disruptek | disbot: hush. |
03:44:46 | disbot | on it. ๐ |
03:45:12 | disruptek | the rust tooling is nice to use. i think that matters to new users. |
03:45:50 | disruptek | do you think slant means anything? when i've visited the site, it hasn't impressed me as an authority. |
03:45:56 | FromDiscord | <mfiano> I know Rust fairly well, and I'm not impressed. There is a big problem with the language I've seen for a long time and is only recently being discussed in the community. |
03:46:07 | yumaikas | mfiano: What is that? |
03:46:53 | disruptek | i don't know if my experience is typical, but i've had nothing but problems with fitting nimble into my workflow. choosenim was even worse. |
03:47:22 | yumaikas | Hrm... I've not had much trouble with nimble, but I've only ever used it to install things |
03:47:33 | yumaikas | I've yet to package anything using it |
03:48:02 | disruptek | i'm sure i'm in the minority, but i don't have the sense that it's a small minority. |
03:48:18 | FromDiscord | <mfiano> If you building anything significant, you're pulling in a lot of dependencies, which in turn pull in dependencies transitively. And because you can version dependencies at each level, it means the same libraries are compiled and linked multiple times, and it really slows down compilation. The Rust community's answer to that, is to sacrifice performance by making more use of generics for dynamic dispatch, which I find quite funny and sort of |
03:48:22 | yumaikas | disruptek: You have a place where your problems are documented? |
03:48:24 | FromDiscord | <mfiano> If you're building anything significant, you're pulling in a lot of dependencies, which in turn pull in dependencies transitively. And because you can version dependencies at each level, it means the same libraries are compiled and linked multiple times, and it really slows down compilation. The Rust community's answer to that, is to sacrifice performance by making more use of generics for dynamic dispatch, which I find quite funny and sort |
03:48:35 | disruptek | yumaikas: yes, in nimph. |
03:48:43 | yumaikas | nimph? |
03:48:49 | disruptek | !repo nimph |
03:48:49 | FromDiscord | <mfiano> I see a lot of projects making more use of generics at the expense of runtime performance to combat compile times. |
03:48:49 | disbot | https://github.com/disruptek/nimph -- 9nimph: 11a nim package hierarchy manager from the future ๐ง 15 26โญ 1๐ด 7& 1 more... |
03:49:04 | FromDiscord | <mfiano> Even though the Rust compiler is 3x faster than it was a couple years ago, it's still a huge problem. |
03:49:16 | yumaikas | mfiano: So rust has a version of the npm problem? |
03:49:20 | FromDiscord | <mfiano> Something to keep in mind when Nim has a large software ecosystem |
03:50:21 | FromDiscord | <mfiano> Pretty much |
03:50:43 | * | dddddd quit (Remote host closed the connection) |
03:50:46 | disruptek | nim doesn't have this problem yet because its module system is comparatively simple. i don't see it as a primary limitation, either. |
03:51:02 | FromDiscord | <mfiano> These things could be solved with hot code reloading and iterative live recompilation at the function level. But that's a lot of work. |
03:51:15 | yumaikas | Especially for rust, I'd imagine |
03:51:51 | yumaikas | Random question: Is there a way to mark a variable as thread safe? |
03:52:06 | disruptek | the module system will need an upgrade, but probably not in the next year, imo. |
03:52:48 | yumaikas | Like, I have some globals that are set once on application startup using let, but the compiler warns me about them not being threadsafe |
03:53:27 | disruptek | i dunno, i'm not bothering with threading before weave. |
03:53:35 | FromDiscord | <mfiano> I would think something immutable should be thread safe. I wonder why that is |
03:53:37 | yumaikas | weave? |
03:53:39 | disruptek | async is fine for my purposes. |
03:53:42 | disruptek | !repo weave |
03:53:43 | disbot | https://github.com/mratsim/weave -- 9weave: 11A state-of-the-art multithreading runtime: message-passing based, fast, scalable, ultra-low overhead 15 84โญ 6๐ด |
03:55:34 | yumaikas | mfiano: Well, specifically, I'm in jester, which marks it's main router with {.gcsafe.}, which starts complaining about global state |
03:55:41 | yumaikas | {.threadvar.} doesn't work |
03:55:41 | FromDiscord | <mfiano> Another thing I wish Nim had was a dead tree book. Yes I know about the dated one that already exists, but I don't want to read it, especially as a beginner, being so old and running into lots of problems. |
03:56:15 | disruptek | some effort has gone into keeping that book relevant. |
03:56:37 | disruptek | i wouldn't worry about problems, is my point. |
03:57:18 | disruptek | also, i wouldn't worry about reading it. but, i say that from one old-timer to another. |
03:58:20 | yumaikas | I think I'll try to help look over the jester docs some over the holiday, depening on what sort of time I have free |
03:58:30 | FromDiscord | <mfiano> I'm gonna set up nvim now. Then think about how I want to start learning Nim (I only browser the docs so far, mostly type system and syntax) |
03:58:38 | FromDiscord | <mfiano> I'm gonna set up nvim now. Then think about how I want to start learning Nim (I only browsed the docs so far, mostly type system and syntax) |
03:58:41 | disruptek | everybody has that period where they chafe against the language, but eventually you find your compass. |
03:59:17 | yumaikas | disruptek: Are you talking about rust, or nim? |
03:59:27 | disruptek | nim. |
03:59:57 | yumaikas | I definitely experienced that with rust |
04:00:01 | yumaikas | Not nearly so much with Nim |
04:00:24 | disruptek | i didn't code in rust long enough to get the compass. |
04:00:30 | yumaikas | Nor me |
04:00:47 | disruptek | i picked up python in like '96 or so. |
04:00:52 | disruptek | it fit my brain instantly. |
04:01:16 | disruptek | can't say nim was the same, but it's a much larger language, also. |
04:01:36 | yumaikas | I won't say that *everything* about Nim has fit my brain. The standard db libs took a bit of getting used to |
04:01:46 | yumaikas | I still don't bother writing macros much |
04:02:00 | yumaikas | disruptek: Python is also much bigger than it was in '96 |
04:02:18 | FromDiscord | <mfiano> Macros are good for only 2 things. |
04:02:24 | disruptek | i wrote a lot of macro stuff for openapi. i'm glad i did that. but i don't feel i need that power most of the time. |
04:02:38 | disruptek | much more important to me to write the simplest possible code. |
04:02:40 | FromDiscord | <Xydium> @mratsim Figured out why the compiler was crashing: I tried to pass an iterator as a sequence without actually converting it to a sequence. Any compiler after 0.19.6 crashed, and 0.19.X compilers gave me a completely unrelated error in a completely different part of the code |
04:03:25 | yumaikas | disruptek: Yeah. I've gotten a *lot* of mileage out of templates. I even have one (currently on my work machine) called patch, which is basically an awk-lite |
04:04:40 | disruptek | honestly, there are still sharp edges in nim that make simple code more attractive to me right now. |
04:04:59 | FromDiscord | <mfiano> Can you elaborate on that? |
04:04:59 | yumaikas | such as? |
04:05:33 | disruptek | i mean, you run into them whenever you stray from the beaten path. mratsim has them hotkeyed. |
04:05:53 | disruptek | but i have a few favorites. |
04:05:58 | * | yumaikas can think of the lack of being able to splat args with a macro |
04:06:03 | FromDiscord | <Xydium> considering I've spent the past 24+ hours hating macros and the type system for reasons I never expected, I think I understand lol |
04:06:05 | disruptek | !issue author:disruptek exceptions |
04:06:06 | disbot | https://github.com/nim-lang/Nim/issues/11088 -- 5Exceptions, raises pragma hard to use at best |
04:06:08 | disruptek | !issue author:disruptek exception |
04:06:09 | disbot | https://github.com/nim-lang/Nim/issues/11081 -- 3DateTime field on Exception produces inconsistent C/++ handling 7& 2 more... |
04:06:31 | disruptek | !issue mutable iterator |
04:06:32 | disbot | https://github.com/nim-lang/Nim/issues/12945 -- 3mutable iterator cannot yield named tuples 7& 4 more... |
04:06:58 | disruptek | !pull varargs |
04:07:01 | disbot | https://github.com/nim-lang/Nim/pull/12907 -- 3lenVarargs: number of varargs elements 7& 29 more... |
04:07:50 | disruptek | !issue author:disruptek inheritance generics |
04:07:51 | disbot | https://github.com/nim-lang/Nim/issues/12818 -- 3inheritance and generics and ambiguous error message |
04:08:14 | disruptek | !issue author:disruptek httpheaders |
04:08:15 | disbot | https://github.com/nim-lang/Nim/issues/12211 -- 3proposed changes to HttpHeaders as in HttpClient |
04:08:28 | disruptek | admittedly, a stdlib issue. |
04:09:35 | disruptek | hanging out in irc, you tend to get what may be a bit of a selection bias with respect to what works and what people run into problems with. |
04:10:01 | yumaikas | disruptek: Since IRC folks tend to push the edges? |
04:10:11 | disruptek | no, because people come here for support. |
04:10:26 | * | yumaikas wonders what len varargs[untyped] would be used for |
04:10:27 | yumaikas | ah |
04:10:49 | yumaikas | You think it biases towards new people problems? |
04:11:16 | disruptek | no, it biases me towards thinking that what i see here is representational of what others are experiencing. |
04:11:23 | yumaikas | Ah, I see |
04:11:41 | disruptek | it's probably not -- i just see many people come in with choosenim issues that are solved by reinstalling, for example. |
04:12:09 | disruptek | so, because i don't use choosenim, i get the feeling that it's spray-and-pray. |
04:12:31 | * | endragor joined #nim |
04:12:36 | disruptek | probably unfair to choosenim. |
04:13:14 | yumaikas | Possibly. Isn't choosenim based on a shell script? |
04:13:15 | disruptek | anyway, it's the case with lots of rough edges. it predisposes me to simpler code that i know will work today and tomorrow. |
04:13:37 | disruptek | i dunno much about choosenim, but i don't believe it's shell. |
04:13:42 | yumaikas | I think I used it on my older box |
04:14:11 | FromGitter | <bung87> pythonโs `getattr` in Nim ? is there one? |
04:14:32 | yumaikas | I think I used it to get things set up on my older ubuntu box |
04:14:44 | disruptek | bun87: not really, no. there's a fields iterator... |
04:15:33 | FromGitter | <bung87> ah, maybe can be use or not.. |
04:16:03 | yumaikas | bung87: What are you trying to do? Is it something that you could do with Optional[T]? |
04:16:45 | FromGitter | <bung87> it access object property by string name |
04:17:02 | yumaikas | bung87: Why are you trying to do that? |
04:17:44 | FromGitter | <bung87> hmm, thinking Nim is static type, I may consider other way |
04:18:33 | yumaikas | You could always use the tables module, if you need dynamically specified access to something |
04:18:54 | FromGitter | <bung87> just want a ActiveRecord lib ,I have found a python implement |
04:19:16 | yumaikas | ActiveRecord specifically, or an ORM? |
04:19:27 | yumaikas | !disbot norm |
04:20:01 | FromGitter | <bung87> I โv looked at it ,seems it not comple |
04:20:09 | yumaikas | https://github.com/moigagoo/norm |
04:20:14 | yumaikas | There's stuff like norm |
04:20:46 | FromGitter | <bung87> not really like this one |
04:21:03 | disruptek | !repo ormin |
04:21:04 | disbot | https://github.com/Araq/ormin -- 9ormin: 11Ormin -- An ORM for Nim. 15 103โญ 14๐ด |
04:21:44 | FromGitter | <bung87> yeah I also know this one, but it not finished |
04:22:09 | disruptek | it's finished, just not very well documented. |
04:22:50 | FromGitter | <bung87> ah? the document described it has three todo task. |
04:27:04 | * | yumaikas wonders if it'd be possible to make the search bar not hide in nim docs when they get narrow |
04:28:30 | FromGitter | <bung87> can using css `position: sticky;` |
04:29:58 | yumaikas | I know it's possible, but someone needs to do it at some point, IMO. I don't like it when funcitonality disappears because my aspect ration went down |
04:32:23 | FromGitter | <bung87> well, that can be controled through media query |
04:32:50 | yumaikas | Right, I know that can be done, I'm just considering putting in a PR for it at some point. |
04:33:56 | yumaikas | bung87: What brings you to nim? |
04:33:59 | FromGitter | <bung87> also I aware of that the search xhr request is sync |
04:34:24 | yumaikas | The search xhr is sync? That doesn't seem right |
04:35:18 | FromGitter | <bung87> I cant rember , just Nim is my favorite language now, even I dont use it on work. |
04:36:26 | FromGitter | <bung87> (https://files.gitter.im/nim-lang/Nim/1SfJ/Screenshot-2019-12-23-at-12.36.13-PM.png) |
04:36:57 | yumaikas | huh, strange |
04:38:05 | yumaikas | (I didn't write that code, just seems strange that sync XHR is part of that, is all) |
04:40:01 | FromDiscord | <mfiano> Trying to set up my editor. I installed latest nim stable with choosenim, but nimsuggest errors when I run it |
04:41:38 | * | yumaikas doesn't even have nimsuggest running on his linux server atm |
04:41:44 | FromDiscord | <mfiano> Not even nimble works |
04:42:10 | FromDiscord | <mfiano> heh or `nim` |
04:42:23 | disruptek | maybe it's not in your path? |
04:42:28 | yumaikas | You give your $PATH a chance to update? |
04:42:30 | FromGitter | <bung87> look care of your PATH |
04:42:32 | FromDiscord | <mfiano> It is. I even get completion of them |
04:42:44 | yumaikas | XD |
04:42:59 | yumaikas | what kinds of errors are you getting? |
04:43:20 | FromDiscord | <mfiano> `Error: Spawning of process failed. (Error was: Additional info: "Could not find command: \'/home/mfiano/.choosenim/toolchains/nim-1.0.4/bin/nim\'. OS error: Permission denied")` |
04:43:29 | FromDiscord | <mfiano> The file exists and permission was set |
04:43:51 | yumaikas | what happens when you type `which nim`? |
04:44:20 | disruptek | well, i think i mentioned that i'm not a fan of choosenim. |
04:44:55 | FromDiscord | <mfiano> `/home/mfiano/.nimble/bin/nim` |
04:45:05 | * | yumaikas suggests reinstalling choosenim, since that seems to have worked for other people, per disruptek |
04:45:21 | yumaikas | huh |
04:45:33 | FromDiscord | <mfiano> ``` |
04:45:33 | FromDiscord | <mfiano> ./.nimble/bin/nim |
04:45:33 | FromDiscord | <mfiano> Error: Spawning of process failed. (Error was: Additional info: "Could not find command: \'/home/mfiano/.choosenim/toolchains/nim-1.0.4/bin/nim\'. OS error: Permission denied") |
04:45:34 | FromDiscord | <mfiano> ``` |
04:45:54 | yumaikas | And what happens if you ls that folder? |
04:46:13 | yumaikas | `ls` the nim-1.0.4/bin folder, that is |
04:46:30 | yumaikas | You might need to chmod +x some stuff? |
04:46:39 | FromDiscord | <mfiano> ``` |
04:46:39 | FromDiscord | <mfiano> mfianomfiano@wyvern ~$ ls ~/.choosenim/toolchains/nim-1.0.4/bin |
04:46:41 | FromDiscord | <mfiano> .rw-r--r-- 5.0M mfiano 2019-12-22 23:26 nim |
04:46:43 | FromDiscord | <mfiano> .rw-r--r-- 1.0M mfiano 2019-12-22 23:26 nimble |
04:46:44 | FromDiscord | <mfiano> .rw-r--r-- 3.5M mfiano 2019-12-22 23:26 nimfind |
04:46:46 | FromDiscord | <mfiano> .rw-r--r-- 346k mfiano 2019-12-22 23:26 nimgrep |
04:46:48 | FromDiscord | <mfiano> .rw-r--r-- 658k mfiano 2019-12-22 23:26 nimpretty |
04:46:50 | FromDiscord | <mfiano> .rw-r--r-- 2.7M mfiano 2019-12-22 23:26 nimsuggest |
04:46:51 | disruptek | lol |
04:46:51 | FromDiscord | <mfiano> .rw-r--r-- 901k mfiano 2019-12-22 23:26 testament |
04:46:53 | FromDiscord | <mfiano> ``` |
04:46:56 | FromDiscord | <mfiano> heh yeah. Bad installer I guess |
04:47:05 | yumaikas | Yeah, you need to chmod +x all of that |
04:47:11 | yumaikas | Well, u+x |
04:47:15 | FromDiscord | <mfiano> That is a big issue |
04:47:21 | FromDiscord | <mfiano> Stupid choosenim |
04:47:51 | disruptek | rust tooling is looking pretty good about now, huh? |
04:48:23 | FromDiscord | <mfiano> Oh don't get me started on the rust tooling. racer decides to work for external crates when the moon is full on a tuesday |
04:48:58 | yumaikas | Every langauge has tooling edges that suck |
04:50:08 | FromDiscord | <Xydium> Some famous last words: https://pastebin.com/Tb4N7eiE |
04:51:29 | FromDiscord | <Xydium> Well, I know that infix functions still break the AST for some reason, but that's a problem for another time |
04:52:12 | FromDiscord | <mfiano> choosenim sets the executable bit on the symlink only, ha |
04:52:29 | disruptek | the one place it doesn't need to be set. |
04:52:52 | * | chemist69 quit (Ping timeout: 248 seconds) |
04:53:13 | yumaikas | Maybe it assumes that the executable bit is already set due to the nature of how the executables are set? idk |
04:54:43 | * | chemist69 joined #nim |
04:56:15 | FromDiscord | <mfiano> Well nimsuggest is probably not working correctly now |
04:56:43 | FromDiscord | <mfiano> Unless it suffers from racer-like issues failing to suggest the important things |
04:56:48 | FromDiscord | <mfiano> https://files.michaelfiano.com/images/screenshots/img-20191222235544.png |
04:57:33 | yumaikas | Does it not suggest proc? |
04:57:39 | FromDiscord | <mfiano> Nope, nor import |
04:58:00 | disruptek | do you need a list of keywords? |
04:58:02 | yumaikas | I thought it worked ok in VS Code |
04:58:33 | FromDiscord | <mfiano> Sigh |
04:58:57 | yumaikas | (I realize that doesn't solve your current problem, but makes me wonder what the VS Code plugin does) |
05:02:15 | FromDiscord | <mfiano> I don't know enough about it to know why it would only suggest some standard symbols. But I absolutely won't use Nim without basic vim completion support |
05:02:36 | FromDiscord | <mfiano> Off to a good start ๐ |
05:05:54 | FromDiscord | <mfiano> Even better ๐ฆ https://files.michaelfiano.com/images/screenshots/img-20191223000522.png |
05:07:16 | * | yumaikas does *not* remember having that much trouble with choosenim |
05:08:03 | FromDiscord | <mfiano> This is beyond choosenim. nimble can't fetch a nimsuggest that compiles |
05:08:24 | disruptek | no comment. |
05:10:58 | FromGitter | <bung87> https://github.com/itsumura-h/nim-allographer found someone did |
05:11:37 | FromDiscord | <mfiano> Same issue when deleting choosenim and installing manually. |
05:11:48 | FromDiscord | <mfiano> Well this is the dead end I get off at I think |
05:11:55 | disruptek | you built the compiler from source and then what? |
05:12:18 | FromDiscord | <mfiano> Same error as above for installing nimsuggest |
05:12:27 | FromDiscord | <mfiano> It tries stable, then HEAD, and both fail to build |
05:12:29 | disruptek | nimsuggest comes with the compiler. |
05:12:38 | disruptek | it's built along with the compiler. |
05:14:04 | FromDiscord | <mfiano> Aye it does. And same issue of only suggesting a small subset of nim identifiers |
05:15:20 | disruptek | if you import modules, it will include their symbols. |
05:15:31 | disruptek | with no symbols, there is nothing to suggest. |
05:15:46 | FromDiscord | <mfiano> It won't even suggest `import` or `proc` |
05:15:59 | FromDiscord | <mfiano> `procCall`, yes, but not `proc` |
05:16:06 | FromDiscord | <mfiano> Makes me wonder what else is missing |
05:17:28 | disruptek | there may be an option to enable completion for keywords; you'd have to ask leorize. |
05:20:30 | disruptek | well, i hope this speedbump doesn't deter you, mfiano. |
05:21:55 | FromDiscord | <mfiano> How do I set up a new project? Maybe because it's missing a manifest and I'm just typing into a scratch *.nim file? |
05:22:19 | disruptek | `nimble init` |
05:22:43 | FromDiscord | <mfiano> Also my install doesn't seem to have `koch`? How do I get that? |
05:23:03 | disruptek | it is built when you compiler the compiler. |
05:23:10 | disruptek | er, compile the compiler. |
05:23:17 | yumaikas | compiler the compiler, lol |
05:23:29 | yumaikas | Reminds me of relections on trusting trust |
05:23:54 | FromDiscord | <mfiano> I installed nim from the official Arch Linux repos after nuking choosenim |
05:23:58 | disruptek | i just use git for everything. i guess that's why i don't have these issues. |
05:24:17 | disruptek | what do you need koch for? |
05:24:24 | yumaikas | ^ |
05:24:33 | FromDiscord | <mfiano> I keep seeing references to it in my learning of the language and just wondered why I don't have it |
05:24:52 | disruptek | it's used to build the compiler or run the compiler tests. |
05:25:04 | yumaikas | IIRC, it's a tool used to automate working on the nim compiler itself |
05:25:16 | yumaikas | You shouldn't need it handy for your own stuff |
05:25:24 | FromDiscord | <mfiano> Ok |
05:25:35 | yumaikas | Thankfully, I've not needed to debug the nim compiler much |
05:25:39 | yumaikas | Well, at all |
05:25:50 | yumaikas | There have been a couple of edges I've hit |
05:28:11 | FromDiscord | <mfiano> Ok so further testing shows that completion is missing a lot |
05:28:33 | * | yumaikas is finally getting close to hitting the db in his web-spreadsheet project |
05:29:13 | FromDiscord | <mfiano> `import`, `proc`, `while`, `if`, `let`, pretty much every most basic symbol is not suggested |
05:29:20 | FromDiscord | <mfiano> https://files.michaelfiano.com/images/screenshots/img-20191223002846.png |
05:30:08 | disruptek | yes, keywords. there might be an option to turn them on. |
05:33:36 | FromDiscord | <mfiano> You are right. In the irc log I found someone saying that nimsuggest never suggests keywords and can't be changed. That's how I've normally learned what's available in a language I'm learning. Oh well |
05:34:41 | disruptek | there's a file called keywords.txt in the compiler that lists them all. |
05:35:21 | disruptek | addr and as asm bind block break case cast concept const continue converter defer discard distinct div do elif else end enum except export finally for from func if import in include interface is isnot iterator let macro method mixin mod nil not notin object of or out proc ptr raise ref return shl shr static template try tuple type using var when while xor yield |
05:35:33 | disruptek | now you've learned what's available. |
05:35:47 | FromDiscord | <mfiano> disruptek, were you the one that said neovim support for showing compilation results exists? I don't see that in the docs for the plugin |
05:36:30 | disruptek | i think the README explains how to setup support for it. |
05:37:09 | shashlick | I suspect there's a new bug in choosenim since I moved it to nimarchive |
05:37:09 | FromDiscord | <mfiano> Nah, it only tells about completion |
05:37:26 | shashlick | It might not be setting the permissions right on extract |
05:37:47 | shashlick | Either that or there's something on arch |
05:37:50 | yumaikas | Sounds like a possiblity. |
05:38:35 | disruptek | those are the instructions i used to set it up and i have compilation results in my :cw |
05:38:42 | yumaikas | Welp, I think I'm going to call it a night. did some grinding away at Tabula Scripta |
05:38:55 | shashlick | More debugging, what's new, who has some extra time |
05:40:41 | yumaikas | Night all |
05:40:44 | disruptek | night |
05:40:48 | disruptek | mfiano: try these: |
05:40:52 | disruptek | autocmd QuickFixCmdPost [^l]* nested copen |
05:40:57 | disruptek | autocmd QuickFixCmdPost l* nested lwindow |
05:52:49 | FromDiscord | <mfiano> How do you issue a compile? |
06:17:51 | * | nsf joined #nim |
07:05:20 | * | gour joined #nim |
07:09:32 | skrylar[m] | woo. got the blake working |
07:34:35 | * | azed joined #nim |
07:51:58 | * | Vladar joined #nim |
07:55:51 | * | nsf quit (Quit: WeeChat 2.6) |
08:00:00 | * | gmpreussner quit (Quit: kthxbye) |
08:01:33 | Araq | I'm back, what's up? |
08:02:19 | Araq | ping mratsim |
08:05:07 | * | gmpreussner joined #nim |
08:06:43 | * | solitudesf joined #nim |
08:16:25 | FromDiscord | <Milerius> Hey |
08:18:52 | FromDiscord | <Milerius> I use a hash map concurrent hash map imported from C ++, I store inside a Nim JsonNode, but I have the impression that I am doing something map, the map in question returns and always take copies, however the garbage collector seems to destroy my object while it is socked in my map (I tried with pointers, and even like that it seems destroyed) |
08:18:53 | FromDiscord | <Milerius> |
08:18:53 | FromDiscord | <Milerius> I Read / Write from different threads + Using boehm |
08:18:58 | FromDiscord | <Milerius> I use a hash map concurrent hash map imported from C++, I store inside a Nim JsonNode, but I have the impression that I am doing something map, the map in question returns and always take copies, however the garbage collector seems to destroy my object while it is socked in my map (I tried with pointers, and even like that it seems destroyed) |
08:18:58 | FromDiscord | <Milerius> |
08:18:58 | FromDiscord | <Milerius> I Read / Write from different threads + Using boehm |
08:19:15 | FromDiscord | <Milerius> doing something wrong* |
08:21:58 | * | chemist69 quit (Ping timeout: 245 seconds) |
08:22:14 | Araq | hey, with --gc:boehm I think your C++ must also use it |
08:22:20 | FromDiscord | <Milerius> So now I try to change my strategy, assume that I don't want to use this C++ object anymore but that instead I would like to use 100% nim, how I can write / read in a json map from different threads in nim without being blocking? |
08:22:29 | Araq | so you need to override C++'s new operator |
08:22:37 | Araq | boehm should have some support for that |
08:22:53 | FromDiscord | <Milerius> What would be your advice for sharing a json map between threads Araq ? |
08:22:57 | * | chemist69 joined #nim |
08:23:00 | FromDiscord | <Milerius> Instead of tricking with a C++ Object |
08:23:23 | FromDiscord | <Milerius> I don't want to do a Thread that will write to channels every seconds the change for the Json Configuration it's seem's costly |
08:23:25 | Araq | there is no sharing of json in Nim, you have to put it into a channel |
08:23:38 | FromDiscord | <Milerius> Hmmm |
08:23:50 | Araq | or you wait until --gc:arc supports it |
08:23:59 | Araq | we aim for a christmas release... |
08:24:05 | FromDiscord | <Milerius> What's will be gc arc ? |
08:24:13 | FromDiscord | <Milerius> a bit context ? :p |
08:24:45 | FromDiscord | <Milerius> Anyway, i really think that we need some Concurrent lock free data structure in Nim that can take "GC ed Object as key/value) |
08:24:46 | FromDiscord | <Milerius> Anyway, i really think that we need some Concurrent lock free data structure in Nim that can take "GC ed Object as key/value" |
08:25:05 | Araq | thinking about it |
08:25:10 | FromDiscord | <Milerius> I really think that if we follow implementation using Hazard Pointers, we can do something 100% in nim |
08:25:16 | FromDiscord | <Milerius> Hazard Pointers are known to solve this problem |
08:25:20 | Araq | you can also use a SharedTable and GC_ref/unref |
08:26:00 | Araq | it's not about Hazard pointers and stuff, Nim does not have a shared heap |
08:26:01 | FromDiscord | <Milerius> Yeah but for the moment the API is unstable, and i think that in the future, if we discuss it about an issue on GitHub we will move to a lock free design |
08:26:16 | FromDiscord | <Milerius> Yeah but Bohem is a shared heap ? or am i wrong |
08:26:45 | Araq | yeah but then whether Boehm works with your C++ concurrent hash map is unknown and might depend on the OS |
08:26:54 | Araq | or the hash map's implementation |
08:26:56 | FromDiscord | <Milerius> What is Automatic Reference Counting that you speak about ? |
08:27:08 | FromDiscord | <Milerius> the main difference between it and arc |
08:27:18 | FromDiscord | <Milerius> bohem* |
08:27:48 | Araq | well it's reference counting, it's deterministic |
08:28:03 | FromDiscord | <Milerius> You mean, that with the "arc" garbage collector we will be able to save Nim Type in a Thread Safe way using Thread Safe container from C++ |
08:28:25 | Araq | er yes, that is what I'm saying |
08:28:39 | FromDiscord | <Milerius> Basically i tried `ConcurrentHashMapCpp[string, JsonNode]` and `ConcurrentHashMapCpp[string, ptr JsonNode]` |
08:28:43 | FromDiscord | <Milerius> but i got so much trouble |
08:29:46 | FromDiscord | <Milerius> But let's say now that this container Always Take/Return Copies, how the ARC will handle that compare to Bohem ? |
08:29:59 | FromDiscord | <Milerius> How my object will still valid i mean, it's interesting |
08:30:13 | FromDiscord | <Milerius> I read an article this morning about memory model in Nim, it's was interesting |
08:30:35 | Araq | well it wouldn't copy |
08:32:05 | FromDiscord | <Milerius> From the doc from hashmap: "Therefore operator[] and at() return copies, since they do not return an iterator. The returned value is const, to remind you that changes do not affect the value in the map." |
08:32:16 | FromDiscord | <Milerius> I dont know if it's the same for concurrent container in Java/C# |
08:33:25 | FromDiscord | <Milerius> Do we have a discussion / pr about arc that i can read about ? |
08:33:32 | Araq | that doesn't mean much, there is no "deep immutability" in C++ |
08:33:52 | Araq | it's likely to only be a shallow copy or rather what the copy constructor does |
08:34:07 | Araq | which for JSON might as well be a pointer copy |
08:34:50 | FromDiscord | <Milerius> Yep |
08:35:28 | Araq | https://github.com/nim-lang/RFCs/issues/177 is the RFC |
08:35:30 | disbot | โฅ Unify Nim's GC/memory management options ; snippet at 12https://play.nim-lang.org/#ix=24Ua |
08:35:40 | FromDiscord | <Milerius> Thanks ! |
08:36:32 | FromDiscord | <Milerius> So the name will be gc:destructors ? |
08:36:44 | Araq | no, it's --gc:arc |
08:37:02 | Araq | --gc:destructors is an outdated alias for arc |
08:37:09 | FromDiscord | <Milerius> ok. i got it. |
08:37:21 | Araq | I changed it because 'destructors' was too long to type :P |
08:37:29 | FromDiscord | <Milerius> Because Yep for the moment i got to much trouble to continue the program that i'm writing. |
08:37:51 | FromDiscord | <Milerius> What is your goal for the gc arc ? 2020 ? |
08:38:15 | Araq | tomorrow |
08:38:32 | FromDiscord | <Milerius> Lol ๐ |
08:38:37 | FromDiscord | <Milerius> it's will be fantastic |
08:39:15 | Araq | anyway you can write your program today with --gc:boehm, plain old Table[] and a lock |
08:40:10 | FromDiscord | <Milerius> Yeah i tried that |
08:40:18 | FromDiscord | <Milerius> But it's complaining about locking a global variable |
08:40:18 | FromDiscord | <Milerius> xD |
08:40:44 | Araq | I'm not following |
08:42:09 | FromDiscord | <Milerius> https://gist.github.com/Milerius/ae4a2b3ffa1e7b1e5e56f666e834df7b |
08:42:13 | FromDiscord | <Milerius> This is my current approach |
08:43:01 | FromDiscord | <Milerius> When i call getEnabledCoins from different threads, it's break |
08:44:06 | Araq | I said, instead of folly::map use tables.nim and a Nim lock |
08:44:23 | FromDiscord | <Milerius> Yeah i tried that, i got an error message about GC Unsafe etc |
08:44:27 | FromDiscord | <Milerius> even withLock(lock): |
08:45:01 | Araq | use {.gcsafe.}: block |
08:45:27 | FromDiscord | <Milerius> But it's should not be implicit since i'm locking ? |
08:48:07 | FromDiscord | <Milerius> Because using with async i got weird stuff like |
08:48:18 | FromDiscord | <Milerius> `Warning: 'task30SecondsAsyncNimAsyncContinue' is not GC-safe as it accesses 'nameIterVar`gensym577480'` |
08:49:37 | skrylar[m] | oh cute. sourcehuts highlighter supports nim |
08:50:31 | FromDiscord | <Milerius> How it's work well with Table + lock :p |
08:50:35 | FromDiscord | <Milerius> thanks @Araq |
08:50:43 | * | letto quit (Ping timeout: 260 seconds) |
08:50:45 | skrylar[m] | https://git.sr.ht/~skrylar/skyhash-blake :3 |
08:51:08 | Araq | Milerius: .gcsafe is not related to locking |
08:51:20 | Araq | you need the lock to make it safe at runtime |
08:51:30 | FromDiscord | <Milerius> is it safe to do `let copy = my_sequence_shared` and after using copy (locking only during the copy ?) |
08:51:32 | Araq | and you need the .gcsafe to make Nim shut up |
08:51:45 | FromDiscord | <Milerius> like lock -> copy -> unlock -> use copy |
08:52:06 | Araq | and you need --gc:boehm so that you get the shared heap that allows you to make Nim shut up |
08:52:19 | FromDiscord | <Milerius> yeah i use gc boehm by default |
08:52:20 | FromDiscord | <Milerius> :p |
08:52:27 | FromDiscord | <Milerius> in my nim cfg |
08:53:10 | Araq | to answer your question: well it's a copy, it's rather safe |
08:54:14 | FromDiscord | <Milerius> https://gist.github.com/Milerius/027a7417af3bad5b87a9e0af44981417 |
08:54:19 | FromDiscord | <Milerius> I'm hesitating between both |
08:54:23 | FromDiscord | <Milerius> Which one do you advice ? |
08:55:11 | FromDiscord | <Milerius> May be it's better to lock the critical section just for copy |
08:55:18 | FromDiscord | <Milerius> There is less than 10 element in this sequence |
08:55:19 | FromDiscord | <Milerius> all the time |
08:56:09 | FromGitter | <alehander92> @bung87 yeah its a project |
08:56:27 | FromGitter | <alehander92> but its mostly the languist stuff |
08:59:38 | * | letto joined #nim |
09:08:20 | FromGitter | <alehander92> how is it guys |
09:08:26 | FromGitter | <alehander92> vacation already? |
09:08:47 | FromGitter | <bung87> @alehander92 I tried it, seems not ready to be used |
09:10:43 | skrylar[m] | started writing code again actually. and replaced my dead laptop |
09:18:40 | FromGitter | <alehander92> yeah its mostly research |
09:18:48 | FromGitter | <alehander92> but it can give you some ideas |
09:18:58 | FromGitter | <alehander92> how to port code manually |
09:19:05 | FromGitter | <alehander92> what is your usecase |
09:19:22 | FromGitter | <alehander92> skyrlar[m] nice, what do you work on |
09:21:09 | * | dddddd joined #nim |
09:24:19 | FromGitter | <bung87> Iโm currently using regex, and try to do something like this โ โ ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=5e0087c3c62fdf33f73ca617] |
09:25:54 | FromGitter | <bung87> I think it will achieve same goal, if I can finish the AST parse process. |
09:26:24 | FromDiscord | <Milerius> Do we have a good tutorial for manipulating IO with nim ? |
09:26:26 | FromDiscord | <Milerius> Read/write file |
09:27:27 | FromGitter | <bung87> I think itโs documented in tutorials, or example |
09:28:54 | FromGitter | <alehander92> @bung87 what is pyImport |
09:29:36 | Araq | Milerius: I don't know which is better |
09:30:16 | Araq | well the 2nd one is bad, don't use, Nim doesn't copy seqs properly for 'let', use a 'var' |
09:30:35 | FromDiscord | <Milerius> ah. |
09:30:40 | FromDiscord | <Milerius> Ok thanks for the advice |
09:30:44 | FromGitter | <bung87> coming from `import nimpy` |
09:33:15 | FromGitter | <alehander92> yeaah |
09:33:17 | FromGitter | <alehander92> thats the gist of it |
09:33:19 | * | azed quit (Read error: Connection reset by peer) |
09:33:31 | FromGitter | <alehander92> Milerius read the streams docs maybe |
09:33:38 | FromGitter | <alehander92> but if you just need that |
09:33:40 | FromDiscord | <Milerius> I find what i want ! |
09:33:49 | FromGitter | <alehander92> you can even use readFile writeFile for simple stuff |
09:34:07 | FromDiscord | <Milerius> Yeah but there is a bug from me i guess when using writeFile |
09:36:45 | * | WilhelmVonWeiner joined #nim |
09:37:09 | * | azed joined #nim |
09:44:11 | FromDiscord | <mfiano> how do I import into a new namespace? |
09:46:04 | Araq | from module import nil |
09:47:51 | FromDiscord | <mfiano> Sorry, I'm new but what I'm looking for is how to import from a module into a namespace so that I don't pollute the current namespace and I can see at a glance where symbols are coming from by accessing them with a prefix |
09:48:24 | FromDiscord | <Milerius> You can always use the prefix |
09:48:30 | FromDiscord | <Milerius> module.nameFunction() |
09:48:45 | FromDiscord | <mfiano> and can I supply an alias, say `m`? |
09:49:24 | * | NimBot joined #nim |
09:49:28 | FromDiscord | <Milerius> import os as my_os |
09:49:34 | FromDiscord | <Milerius> i believe |
09:50:59 | FromDiscord | <mfiano> Thanks. They weren't kidding when they told me nim is the useful, faster, better designed python |
09:53:06 | * | mfiano left #nim ("WeeChat 2.6") |
09:53:35 | Araq | I think the jury is still out on that one, but Nim has the better macro system ;-) |
09:54:01 | FromDiscord | <mfiano> You don't have to convince me macros are great. I've been a Lisp developer for 20 years |
09:54:06 | skrylar[m] | they are certainly fun |
09:54:43 | skrylar[m] | saw somebody droling over some later javascript update because of optional chaining and i just stared at it like.. some lisper probably patched -> to do that |
09:55:25 | FromDiscord | <Milerius> Nim is excellent, my only concern is the threading model etc, but otherwise i love everything. |
09:55:45 | skrylar[m] | is the threading story still undefined |
09:56:00 | FromDiscord | <Milerius> I do only Golang, C++ and Nim now, i'm happy with that :p |
09:56:38 | FromDiscord | <mfiano> My impression so far isn't bad at all, though admittedly, I'm still following the tutorials/reading the docs for the second time, so no *real* code written yet |
09:58:44 | skrylar[m] | i have some but its yak shaving |
09:59:19 | * | Trustable joined #nim |
10:05:46 | Araq | Milerius: as I said, changing the threading model is priority number one for us |
10:05:53 | Araq | and we're getting close |
10:13:06 | FromDiscord | <Milerius> Hey, how can i import a c enum in nim ? |
10:13:20 | FromDiscord | <Milerius> I got `candidate function not viable: no known conversion from 'tyEnum_e_awesome_icon__xPyaj2Fnlh7ojGo0SJ5niw' (aka 'unsigned char') to 'e_awesome_icon' (aka 'awesome_icon') for 2nd argument` |
10:19:04 | FromGitter | <gogolxdong> Is there any B+ tree implemention in Nim? |
10:19:15 | FromGitter | <gogolxdong> implementation |
10:20:07 | skrylar[m] | @Milerius straight c enums are just numbers. i recommend just making a distinct cint and then a bunch of constants of that type |
10:20:34 | skrylar[m] | if you try to make them a nim enum you run in to stupids like "enum out of order" or some c api will have two names for the same value |
10:21:11 | FromDiscord | <Milerius> okok |
10:21:14 | skrylar[m] | (`iota` is one of those few things i miss from go some days) |
10:21:21 | FromDiscord | <Milerius> and by anychance there is a shortcut to create utf8 string ? |
10:21:27 | FromDiscord | <Milerius> such as u8"my__str" |
10:21:34 | FromDiscord | <mfiano> Does vim have first-class functions? |
10:21:36 | skrylar[m] | aren't strings already utf-8 |
10:21:37 | FromDiscord | <mfiano> Does nim have first-class functions? |
10:22:00 | FromDiscord | <Milerius> i look the equivalent of: https://github.com/juliettef/IconFontCppHeaders/blob/master/IconsFontAwesome5.h |
10:22:33 | Araq | mfiano: yes |
10:22:52 | Araq | gogolxdong: use narimirans's sorta package |
10:22:58 | Araq | !search sorta |
10:22:59 | disbot | https://github.com/nim-lang/packages/pull/1236 -- 6add package 'sorta' 7& 10 more... |
10:23:50 | * | gour quit (Remote host closed the connection) |
10:24:29 | skrylar[m] | as far as i know nim strings are already the equivalent of u8's, but its been a while |
10:24:33 | * | gour joined #nim |
10:24:52 | FromDiscord | <Milerius> yeah i just tested |
10:24:55 | FromDiscord | <Milerius> it's working ๐ |
10:25:19 | skrylar[m] | (>^_^)> |
10:26:19 | FromDiscord | <Milerius> So happy ๐ |
10:26:19 | FromDiscord | <Milerius> https://cdn.discordapp.com/attachments/371759389889003532/658616366709866516/Capture_decran_2019-12-23_a_11.25.47.png |
10:26:21 | FromDiscord | <Milerius> It's look good |
10:26:50 | FromDiscord | <Milerius> 100% nim ๐ |
10:26:59 | skrylar[m] | woo guis |
10:27:11 | FromDiscord | <Milerius> Isn't nice ? :p |
10:27:25 | skrylar[m] | i have this unfinished cassoway module and an almost finished gtk3 ._. |
10:27:47 | FromDiscord | <Milerius> Still wip but you can take a look: https://github.com/Milerius/make_ui_great_again |
10:28:04 | FromDiscord | <Milerius> Basically in 5 lines of code you have a GUI loop running; and you can start code in nim |
10:28:23 | skrylar[m] | oh an immgui |
10:28:39 | FromDiscord | <Milerius> yup |
10:28:51 | FromDiscord | <Milerius> Imgui can look very good if you have some opengl tweek etc |
10:29:15 | FromDiscord | <Milerius> it's not that hard, it's nice :p |
10:30:04 | FromGitter | <gogolxdong> Is that B+ tree? |
10:30:24 | Zevv | \o/ NPeg is now agnostic on the type of data it is parsing, trivial to implement separate lexer and parsers with that now: https://play.nim-lang.org/#ix=25de |
10:30:43 | skrylar[m] | woot. |
10:32:43 | FromGitter | <Varriount> Zevv: Wow! |
10:35:07 | Araq | gogolxdong: it's a B-Tree |
10:35:11 | Araq | without the + I think |
10:35:23 | * | skrylar[m] tries to remember what the + was for |
10:35:42 | Araq | + means only the leaves have data |
10:35:59 | skrylar[m] | contains only keys says the interweb |
10:36:53 | skrylar[m] | all i remember at the moment is b trees require some fiddly tuning or something |
10:38:31 | couven92 | How do you tell nim doc to output the documentation into a specified directory? I try `nim doc --project src\project --outdir doc` but that does not work :O |
10:38:34 | FromGitter | <gogolxdong> yes. |
10:39:18 | couven92 | Nim tells me that "arguments can only be given if the '--run' option is selected" |
10:39:47 | Araq | couven92, --project --out:docsdir |
10:39:57 | Araq | should do the trick, at least that's what our tests test |
10:41:25 | couven92 | Araq, ah I figured it out. The --project switch is a boolean. So it does not accept the value of the project to document, but that the argument is a project. And I specified the output directory after I specified the project, so that was what was wrong |
10:53:21 | * | Trustable quit (Remote host closed the connection) |
10:59:49 | * | azed quit (Read error: Connection reset by peer) |
11:02:43 | * | deansher quit (Quit: Connection closed for inactivity) |
11:06:31 | FromDiscord | <mfiano> Are seqs arrays on the heap, or linked lists? |
11:12:35 | skrylar[m] | heap; they're you're typical stretchy buffer |
11:12:41 | skrylar[m] | *your |
11:12:59 | FromDiscord | <mfiano> Yeah I'm just wondering if they are linear time or not |
11:13:09 | skrylar[m] | should be |
11:13:32 | FromDiscord | <mfiano> So accessing the nth index incurs the cost of traversing the pointers from the head. |
11:14:25 | FromDiscord | <mfiano> Then what would be the type for heap allocated arrays that can be resized? |
11:14:39 | skrylar[m] | those are seqs |
11:15:01 | FromDiscord | <mfiano> Then they can't have linear time complexity |
11:15:21 | FromDiscord | <Milerius> How works the optimize settings with the nim Compiler, i just look at the output of my compiler there is no optimisation flags, is this normal ? |
11:15:21 | * | skrylar[m] squints |
11:16:08 | skrylar[m] | i have no idea how allocating a flat chunk of memory in one go doesn't have O(1) access time but many things are beyond me |
11:16:54 | FromDiscord | <mfiano> I had asked if access time was O(n) and you said should be ๐
|
11:17:37 | skrylar[m] | sorry. confused linear for constant |
11:17:39 | FromDiscord | <mfiano> Looks like linked lists, are in the lists module. |
11:17:51 | FromDiscord | <mfiano> Great thanks |
11:21:46 | FromDiscord | <mratsim> @Xydium, I had my fair share of fights with the type system and macros, battle logs: https://github.com/nim-lang/RFCs/issues/44, https://github.com/nim-lang/Nim/issues/8677 but somehow I always managed to not get deadlocked into a corner |
11:21:47 | disbot | โฅ [Meta] Generics/Static early symbol resolution |
11:39:13 | shashlick | Araq - for #12939 - how do I recover stdout after reopening a file - I want only some of the output to be redirected and then to go back to stdout |
11:39:14 | disbot | https://github.com/nim-lang/Nim/issues/12939 -- 5stdout cannot be reassigned on some systems ; snippet at 12https://play.nim-lang.org/#ix=253B |
12:01:45 | FromDiscord | <funcmike> How to make Stream from the remaining buffer of BaseLexer? |
12:04:10 | Araq | I don't know if it's possible efficiently |
12:07:25 | FromDiscord | <funcmike> i'm writing simple .eml parser (mostly for mail headers) so at the end of header section i want to stop and return rest of buffer / stream as mail body (i'm not parsing it), how to do this efficiently? |
12:10:08 | FromDiscord | <Milerius> lseek @funcmike |
12:10:30 | FromDiscord | <Milerius> http://man7.org/linux/man-pages/man2/lseek.2.html |
12:10:30 | FromDiscord | <Milerius> |
12:10:30 | FromDiscord | <Milerius> we should have an equivalent |
12:10:33 | FromDiscord | <Milerius> in nim |
12:10:42 | FromDiscord | <funcmike> i want to work on streams not on files |
12:10:49 | Araq | setFilePos, we do, but that's not the question |
12:11:11 | Araq | funcmike: it depends on the concrete Stream |
12:11:23 | Araq | don't close your BaseLexer so that the stream remains open |
12:11:48 | Araq | and you need to do stream.setPosition(lex.bufpos) |
12:12:00 | FromDiscord | <Milerius> is setFilePos equivalent to fseek ? which works for stream |
12:12:11 | Araq | but there is a complication |
12:12:29 | Araq | as the 'bufpos' refers to the buffer position and not to the stream position |
12:13:49 | Araq | ah |
12:13:51 | Araq | # use ``offsetBase + bufpos`` to get the offset |
12:13:59 | Araq | so ... that's what you need |
12:14:05 | FromDiscord | <funcmike> ok thanks ๐ |
12:14:26 | Araq | stream.setPosition(lex.offsetBase + lex.bufpos) |
12:14:33 | FromDiscord | <funcmike> ok |
12:14:39 | Araq | and a stdlib addition for that would be nice |
12:14:46 | Araq | PRs are welcome |
12:16:34 | Araq | ping mratsim |
12:17:47 | FromDiscord | <funcmike> for now i will finish my parser (first project in Nim) then i will think about PR |
12:24:17 | Araq | ty |
12:25:44 | * | clyybber joined #nim |
12:35:04 | Araq | clyybber, any news? |
12:37:14 | clyybber | Araq: Yeah, alias refs require linear types |
12:37:27 | clyybber | At least for the doubly linked list |
12:37:32 | clyybber | But |
12:37:44 | Araq | 'owned ref' is affine |
12:37:51 | clyybber | Yeah |
12:37:54 | Araq | that is good enough, no need for proper linearity |
12:38:15 | clyybber | alias refs are linear because they are required to not outlive the owned ref |
12:38:32 | clyybber | anyways |
12:38:49 | clyybber | I have condensed the ref count optimization to a few rules |
12:39:08 | clyybber | those make these refs almost as good as alias refs |
12:39:33 | clyybber | The only thing alias refs would gain us is static enforcement (with complicated proofs) |
12:40:56 | clyybber | Warning paste incoming: |
12:40:58 | clyybber | assignments that require rc ops: |
12:41:01 | clyybber | involving field of ref param |
12:41:03 | clyybber | involving field of var param |
12:41:05 | clyybber | involving var param |
12:41:07 | clyybber | involving field of result |
12:41:09 | clyybber | involving result |
12:41:11 | clyybber | involving field of global |
12:41:15 | clyybber | involving global |
12:41:15 | clyybber | no further alias analysis required since the creation of an alias will have used rc ops |
12:41:33 | clyybber | this is what I came up with |
12:41:54 | Araq | so in other words, stack refs don't have to be counted? |
12:42:23 | clyybber | hmm, yeah, nothing new :/ |
12:42:50 | clyybber | but hey, derived from ponys recover idea :D |
12:44:54 | clyybber | because its essentially the same, but towned down so we don't need escape analusis |
12:45:09 | clyybber | (pony doesn't need it because of its restricitve type system) |
12:45:46 | Araq | x = y; passToSink(x); # frees 'x' if 'y' is on the stack? |
12:45:48 | * | gour quit (Remote host closed the connection) |
12:46:28 | * | gour joined #nim |
12:46:37 | * | nsf joined #nim |
12:48:14 | clyybber | alias refs would have the property that they cant transfer ownership I guess |
12:48:25 | clyybber | that means no passign to sink/owned params |
12:48:41 | clyybber | they can only be lent |
12:49:20 | clyybber | and lent ref params would be disallowed from being stored somewhere that outlives them |
12:49:45 | Araq | I know it's hard to accept but why not simply do a runtime check? |
12:49:56 | clyybber | I have accepted it :) |
12:50:12 | Araq | no need for 'owned' or 'recover' then |
12:50:15 | clyybber | yeah |
12:50:28 | clyybber | that is what my conclusion was :D |
12:50:54 | Araq | the only disappointing aspect is that 'owned' also prevented cycles at compile-time |
12:52:27 | Araq | and well unique-ness is an elegant concept |
12:52:46 | Araq | maybe we should have UniqueRef in the stdlib, constructor is |
12:53:08 | Araq | proc makeUnique[T](x: sink T): UniqueRef[T] |
12:53:22 | clyybber | uniqueness sure is elegant, but not if enforced at runtime |
12:53:27 | Araq | and then this is a very special "move only" sink-parameter |
12:53:40 | * | FromGitter quit (Read error: Connection reset by peer) |
12:53:46 | Araq | that restricts the 'x' in the same way as 'recover' does |
12:53:58 | * | FromGitter joined #nim |
12:54:54 | clyybber | hmm, how so? Have an assert (rc == 1) in there? |
12:55:57 | Araq | also 'proc newT(): owned ref T' is splendid to have for the optimizer |
12:55:59 | skrylar[m] | are you bikeshedding rust again =p |
12:56:16 | Araq | skrylar[m], yeah except that our stuff actually works :P |
12:56:37 | Araq | eventually. |
12:56:38 | clyybber | well, rust also works, sadly it disallows doubly linked lists |
12:57:13 | clyybber | I think it may not be possible to enforce a doubly linked lists safety without GC/RC and only affine types |
12:57:28 | clyybber | it is certainly possible with linear types though |
12:57:35 | clyybber | AST does it |
12:57:47 | clyybber | ATS |
12:58:00 | Araq | B/D does it too |
12:58:14 | clyybber | with runtime checks :D |
12:58:37 | Araq | so what, the problem with B/D are elsewhere |
12:58:42 | skrylar[m] | i used indexed buffers mostly when it came to rust |
12:59:10 | skrylar[m] | also you could double link through the use of weakly referenced boxes :p |
12:59:50 | clyybber | well, yeah |
12:59:58 | Araq | clyybber, on the other hand C++ offers the incomplete unique_ptr and survives |
13:00:00 | clyybber | we can all do linked lists with pointers :p |
13:00:04 | clyybber | Araq: Yeah |
13:00:50 | Araq | it's fine to wait until researchers figured out how to add separation logic to type system without creating a mess |
13:01:18 | * | clyybber quit (Read error: Connection reset by peer) |
13:01:31 | Araq | in the meantime we follow C++ and make our users happy... (?) |
13:01:35 | * | clyybber joined #nim |
13:03:55 | Araq | so ... let me summarize: |
13:04:20 | Araq | - you can pass data to threads but the data must contain 'owned ref' and no ordinary 'ref' |
13:04:28 | FromDiscord | <mratsim> @araq yes? |
13:04:40 | Araq | - 'owned ref' is optional, if used, it enforces moves |
13:05:43 | Araq | you can have a 'ref' inside 'owned ref' and then the isolation is not enforced at compile-time |
13:05:54 | Araq | but at runtime |
13:06:08 | clyybber | or we forbid that |
13:06:20 | clyybber | and make you write an explicit `own` |
13:06:27 | clyybber | doesn't matter probably |
13:06:35 | Araq | yeah but then you forbid passing json :P |
13:06:59 | clyybber | Araq: Not if json returned a struct that only contains owned refs |
13:07:05 | clyybber | Which should be possible |
13:07:21 | Araq | possible but not very backwards compatible |
13:07:44 | clyybber | why? owned annotations are ignored without nrt? |
13:08:31 | Araq | mratsim: thought about channels vs flowvars? |
13:08:56 | Araq | I'm redesigning 'spawn' |
13:09:29 | FromDiscord | <mfiano> Is there an in-depth layman coverage of refs? I was never a C coder and always used a pass-by-value language. I am just not getting it. |
13:10:25 | Araq | and there is a tension between "wrap the function's result in a flow var" and "send the function's result to a channel" |
13:10:49 | FromDiscord | <mratsim> is there a difference? https://github.com/mratsim/weave/blob/master/weave/datatypes/flowvars.nim#L27-L47 |
13:11:13 | FromDiscord | <mratsim> @mfiano if you never used C, C++ or Rust, you probably always were using a pass by ref language |
13:12:01 | Araq | it depends, most languages are pass-by-value but the "values" are heap objects |
13:12:17 | FromDiscord | <mratsim> even in my PoC in July: https://github.com/mratsim/weave/blob/master/experiments/e04_channel_based_work_stealing/future_internal.nim#L25 |
13:12:24 | FromDiscord | <mratsim> type Future = Channel |
13:12:52 | FromDiscord | <mratsim> Future/Flowvars just means that it's awaitable |
13:13:06 | Araq | well good to know, but actually a flow variable is not a channel, it's a single variable |
13:13:33 | FromDiscord | <mratsim> channels are just the transport |
13:13:50 | Araq | but the point I'm trying to make is: |
13:13:51 | FromDiscord | <mratsim> I think mirroring async/await is good |
13:15:01 | FromDiscord | <mfiano> @mratsim Common Lisp uses pass by value for the most part. |
13:15:01 | Araq | replyChan.send f(a, b); replyChan.send g(x, y) # more contention on 'replyChan' but less memory overhead |
13:15:37 | Araq | mfiano: yes, pass by reference is uncommon in general, Fortran being the exception |
13:16:21 | Araq | what mratsim means is that most languages default to reference semantics for their object systems |
13:16:25 | FromDiscord | <mratsim> Python, all the .Net, Java uses ref types everywhere |
13:16:27 | clyybber | mratsim: sink and ref should work just fine with weave with newruntime, no? Or is the problem that they are an pointer, size pair? |
13:16:38 | * | Hideki joined #nim |
13:16:39 | FromDiscord | <mfiano> Anyway, I'm just not sure when to use refs, and how to handle mutability correctly and efficiently. |
13:17:01 | * | Hideki is now known as Guest73089 |
13:17:12 | Araq | mratsim: or let me phrase it differently yet again: |
13:17:22 | FromDiscord | <mratsim> sink works fine, I use them, ref maybe with a multithreaded GC, but for now I'm just plain disabling them |
13:18:01 | Araq | a[0] = spawn f(a, b); a[1] = spawn g(...); waitFor f+g |
13:18:03 | FromDiscord | <mratsim> so you want multiple use channels @Araq? |
13:18:08 | clyybber | mratsim: I'm fucking dumb, I didnt mean sink and ref, but string and seq |
13:18:11 | clyybber | lol |
13:18:35 | clyybber | slept nearly 12 hours still fucking tired |
13:18:55 | FromDiscord | <mratsim> didn't try, to use them. I don't want to play the GC_ref and GC_unref dance |
13:19:13 | Araq | mratsim: the channel/flowvar abstraction is costly |
13:19:24 | clyybber | mratsim: strings and seq don't use the GC |
13:19:27 | clyybber | with the newruntime |
13:19:42 | Araq | as it merges the syncronization with a storage |
13:20:37 | Araq | mostly because 'recv' implies a second copy |
13:20:54 | Araq | consider this example: |
13:21:35 | Araq | for i in 0..x.high: results[i] = spawn f(a[i]) # disjoint locations, safe |
13:21:50 | Araq | sync() # now safe to access 'results' |
13:22:13 | Araq | for i in 0..results.high: echo results[i] # no Future[T] wrapping, no cry. |
13:22:54 | FromDiscord | <mratsim> (coming back in 5 min) |
13:23:17 | Araq | (and you should know by now I don't like Option[T]; Future[T] monads around my data) |
13:23:53 | skrylar[m] | @mratsim the blake2b stuff works now :p |
13:24:41 | skrylar[m] | i have part of an int128 type written because of reasons related to it, haven't dug around with the proper way to hook up simd to nim tho :\ |
13:25:19 | skrylar[m] | jamming in emitc's to gcc intrinsics is obvious |
13:25:41 | Araq | !search simd |
13:25:42 | disbot | https://github.com/mratsim/Arraymancer/issues/405 -- 3Vectorized RNG 7& 29 more... |
13:27:02 | skrylar[m] | i'm not sure people want to bring in all of arraymancer just to run crypto code B) |
13:27:33 | Araq | https://github.com/nimlibs/simdX86 |
13:27:46 | Araq | "nimble search" is your friend |
13:27:58 | Araq | (disbot not so much...) |
13:28:49 | skrylar[m] | yep; thats just emitc shims |
13:29:20 | skrylar[m] | (well, imports.) |
13:30:05 | Araq | as long as it works |
13:32:00 | skrylar[m] | gcc has an extension from what i recall where you can have multiple implementation procs marked and when yo utried to call it it branches based on which flags are in the cpu cap |
13:32:17 | skrylar[m] | less fancy ones just pick a level and crash if its wrong |
13:32:34 | FromGitter | <mratsim> It's called "target" |
13:33:08 | FromGitter | <mratsim> Not sure if it can work with nim as they need the same C name |
13:33:26 | FromGitter | <mratsim> I'll just generate functions with different names |
13:33:36 | Araq | bbl |
13:35:20 | skrylar[m] | i think this is the target you mentioned https://lwn.net/Articles/691932/ |
13:35:45 | Zevv | is there a conventional proc name to check if a thing X is of type Y, whatver 'is of type' means in that context? Similar to 'contains' or 'items'? |
13:36:12 | skrylar[m] | `is`? |
13:36:31 | Zevv | oh right, can that be overloaded as well? let me check |
13:37:35 | skrylar[m] | @mratsim its not super hard to do manually since we have module initializers.. you just fill out some function pointers with the right procs at boot and call in to them after things start |
13:37:36 | Zevv | hmm I'll just abuse `==` I guess |
13:39:03 | skrylar[m] | ah its the indirect functions which are linked from the article https://gcc.gnu.org/onlinedocs/gcc-4.7.2/gcc/Function-Attributes.html#index-g_t_0040code_007bifunc_007d-attribute-2529 |
13:40:24 | skrylar[m] | although sadly the computer i had capable of testing avx2 on is quite dead (^^;;) |
13:40:42 | skrylar[m] | bochs/qemu might do it :ponders: |
13:45:45 | FromDiscord | <mratsim> Intel has an emulator |
13:46:01 | Yardanico | emulator for avx2? wow |
13:46:37 | FromDiscord | <mratsim> https://software.intel.com/en-us/articles/intel-software-development-emulator |
13:46:40 | FromDiscord | <mratsim> and AVX512 |
13:48:52 | muffindrake | Is there some document that explains nimble usage, like what you want to do when creating a new project? |
13:49:40 | FromDiscord | <mratsim> @Araq, I agree with mixing storage and sync, but it's not that bad: |
13:49:40 | FromDiscord | <mratsim> |
13:49:40 | FromDiscord | <mratsim> - Most likely you return small pointers, integers, tuples from a spawned computation |
13:49:40 | FromDiscord | <mratsim> |
13:49:41 | FromDiscord | <mratsim> - Putting them in the same array storage like you did is verboten because threads will compete for the same cache line and the performance will be abysmal |
13:49:42 | FromDiscord | <mratsim> |
13:49:45 | FromDiscord | <mratsim> - You need some datastructure that will serve as a basis for synchronization like "andThen" or fine-grained ^/sync |
13:50:13 | FromDiscord | <mratsim> because the global sync() is a pessimization, in most cases you only need a single task, not wait for all tasks |
13:51:07 | skrylar[m] | @muffindrake `nimble init` and follow the wizard, usually. then edit the nimble file to add in dependencies |
13:51:09 | FromDiscord | <mratsim> nqueens is an example where this comes into play: https://github.com/mratsim/weave/blob/master/benchmarks/nqueens/weave_nqueens.nim#L128-L132 |
13:51:13 | FromGitter | <deech> Is https://github.com/alehander92/gara currently the best pattern matching library? |
13:51:26 | skrylar[m] | (altho i typically vendor dependencies with submodules, but.. eh.) |
13:52:04 | FromDiscord | <mratsim> As an alternative to Futures/Flowvar, we can have a dedicated synchronization object, and that would be this one that could be awaited. |
13:52:27 | FromDiscord | <mratsim> Fibril takes this approach with something called "frame": https://github.com/chaoran/fibril/blob/master/test/fib.c#L27-L30 |
13:52:37 | skrylar[m] | do we already have working futures/promises and scheduler stuff? was thinking about those recently :/ |
13:52:43 | FromDiscord | <mratsim> which is basically a fiber stack, with continuations and restoring registers |
13:53:02 | FromDiscord | <mratsim> a a bonus, it ias way faster than anything I've benchmarked |
13:53:30 | FromDiscord | <mratsim> including Weave, for overhead-bound tasks (i.e. fibonacci or depth-first-search with tasks taking only 1 CPU cycle) |
13:53:55 | FromDiscord | <mratsim> as a secon bonus it could serve as a common building block for both async/await and spawn/sync |
13:54:54 | FromDiscord | <mratsim> as a third bonus, it makes it easier to await for 3..N spawns, just spawn them on with the same frame and await that frame |
13:55:52 | FromDiscord | <mratsim> I.e. making continuations first-class might be a nice way to approach async and threading |
13:56:07 | FromDiscord | <mratsim> and since we can wait on that frame ther eis no need to store the data in a channel/flowvar |
14:00:33 | FromDiscord | <mratsim> @skrylar, you can play with Weave: https://github.com/mratsim/weave |
14:00:46 | stefantalpalaru | Reinventing Scheme? https://en.wikipedia.org/wiki/Call-with-current-continuation |
14:04:07 | FromDiscord | <mratsim> It's hard to invent a,ything nowadays ๐ |
14:04:59 | muffindrake | > Error: Version may only consist of numbers and the '.' character but found 'v'. |
14:05:02 | muffindrake | Awh, how mean. |
14:05:32 | muffindrake | Is that only a 'nimble init' restriction, or would changing that to something else break stuff? |
14:06:01 | clyybber | mratsim: Another deadlock ? |
14:06:18 | Yardanico | muffindrake: that's so you can compare versions with comparasion operators |
14:06:23 | Yardanico | I think |
14:06:28 | Yardanico | https://github.com/nim-lang/nimble#dependencies |
14:06:28 | FromDiscord | <mratsim> well CI was running stuck for 40 minutes on a benchmark that should take at most a second |
14:07:08 | FromDiscord | <mratsim> it might be a livelock though, there is nothing to deadlock at since I don't use locks |
14:07:25 | FromDiscord | <mratsim> and the only place where I use condition variables/futex has been formally verified deadlock-free |
14:08:17 | muffindrake | Yardanico: Sure, but that's hardly a consideration for a binary project |
14:09:27 | Yardanico | but rules should apply to everyone :P |
14:18:50 | * | endragor quit (Remote host closed the connection) |
14:23:29 | * | Trustable joined #nim |
14:39:23 | * | eys joined #nim |
14:39:30 | * | eys left #nim (#nim) |
14:40:33 | * | gour quit (Remote host closed the connection) |
14:41:11 | muffindrake | What's the proper way to specify that I need a TLS library in order to use TLS with nim's HTTP implementation? |
14:41:16 | muffindrake | In the .nimble file |
14:41:33 | * | gour joined #nim |
14:43:38 | * | couven92 quit (Read error: Connection reset by peer) |
14:43:57 | FromGitter | <deech> The docs for `startProcess` say that it returns an `owned(Process)`. Does it do this regardless of which runtime is chosen meaning that closing the `Process` is always statically enforced? |
14:44:01 | FromGitter | <deech> https://nim-lang.org/docs/osproc.html#startProcess%2Cstring%2Cstring%2CopenArray%5Bstring%5D%2CStringTableRef%2Cset%5BProcessOption%5D |
14:45:59 | * | couven92 joined #nim |
14:46:10 | clyybber | deech: owned is ignored without --newruuntime |
14:46:16 | * | couven92 quit (Remote host closed the connection) |
14:46:35 | * | couven92 joined #nim |
14:48:26 | FromGitter | <deech> Ok that makes sense. Can I suggest regenerating the official docs using only officially supported runtimes? |
14:49:58 | dom96 | deech: please make an issue, we should at the very least have a tooltip on the "owned" |
14:51:00 | FromGitter | <deech> Sure |
14:54:12 | FromGitter | <deech> https://github.com/nim-lang/Nim/issues/12951 |
14:54:13 | disbot | โฅ The return type of `startProcess` in the official docs is `owned(Process)` |
14:54:58 | FromDiscord | <Milerius> Hello i'm reading the doc: https://nim-lang.org/docs/manual.html#importcpp-pragma-importcpp-for-procs, trying it here: https://gist.github.com/Milerius/46c6c39c6a2e9e602a57e00e65a1032d is it normal that i'm not compiling ? |
14:55:03 | FromDiscord | <Milerius> Did i made a mistake ? |
15:02:34 | FromDiscord | <Clyybber> Try `res.convertTo[:cstring]()` |
15:04:29 | * | ng0_ joined #nim |
15:04:30 | Araq | mratsim: that's a good point so then it's about how to use the "same" channel for outputs |
15:04:42 | Araq | in my new DSL I'm thinking about |
15:04:53 | Araq | spawn f(args) -> resultChannel |
15:05:12 | Araq | via the '->' so that 'spawn' itself is not burdened with the Channel creation |
15:05:23 | FromDiscord | <Milerius> thanks clyybber |
15:05:51 | * | ng0 quit (Disconnected by services) |
15:06:03 | FromDiscord | <Clyybber> @Milerius Np, this is needed because otherwise it could be ambiguos with array indexing syntax |
15:06:05 | * | ng0_ quit (Client Quit) |
15:06:17 | * | ng0 joined #nim |
15:06:17 | * | ng0 quit (Changing host) |
15:06:17 | * | ng0 joined #nim |
15:06:18 | FromDiscord | <Milerius> Erf it's not possible todo: NCSTRING res_c = res.convert_to<std::string>().c_str(); |
15:06:24 | Araq | consider this example: |
15:06:26 | FromDiscord | <Milerius> It's blame me about r_value |
15:06:49 | Araq | spawn f(args) -> a |
15:07:01 | Araq | spawn g(args) -> a |
15:07:12 | Araq | echo recv(a) + recv(a) # order does not matter |
15:07:14 | Araq | vs |
15:07:20 | Araq | spawn f(args) -> a |
15:07:27 | Araq | spawn g(args) -> b |
15:07:44 | Araq | echo recv(a) - recv(b) # order matters for '-' |
15:08:33 | Araq | it's also a design aspect of async/await that keeps us from optimizing allocations, consantly new futures have to be allocated |
15:10:00 | FromDiscord | <Milerius> Ok i use .data() from string |
15:10:08 | FromDiscord | <Milerius> i don't know if it's more dangerous than .c_str() in my case |
15:10:14 | FromDiscord | <Milerius> But i cannot assign from c_str() |
15:10:17 | FromDiscord | <Milerius> so i'm using .data() |
15:10:48 | FromDiscord | <Milerius> Is it possible to specify that we return a const char* and not a char* in nim ? |
15:10:50 | FromDiscord | <Milerius> using cstring |
15:11:16 | Araq | via workardounds like |
15:11:53 | Araq | type constCstring {.importc: "const char*", nodecl.} = object |
15:12:01 | FromDiscord | <Milerius> xD |
15:12:03 | Araq | or maybe |
15:12:04 | FromDiscord | <Milerius> Okok ! |
15:12:09 | Araq | type constCstring {.importc: "const char*", nodecl.} = distinct cstring |
15:12:13 | FromDiscord | <Milerius> My guess it's should be integrated in the langage |
15:12:26 | FromDiscord | <Milerius> will be really helpful |
15:12:29 | FromDiscord | <Milerius> will be really helpfull |
15:12:30 | Araq | over my dead body |
15:12:41 | FromDiscord | <Milerius> xD |
15:12:59 | Araq | const is a clusterfuck of a design in C/C++ |
15:13:17 | FromDiscord | <Milerius> i agree |
15:13:28 | FromDiscord | <Milerius> but there is constexpr :p |
15:13:37 | Araq | and soon consteval |
15:13:47 | FromDiscord | <Milerius> std::is_const_evaluated xD |
15:13:59 | FromDiscord | <Milerius> well, i will stop about masturbating academic C++ |
15:14:01 | FromDiscord | <Milerius> it's drive me sick |
15:14:28 | FromDiscord | <Milerius> Man if i show you how we retrieve a human date from a timestamp in c++ |
15:14:30 | FromDiscord | <Milerius> you will cry |
15:17:02 | FromDiscord | <Clyybber> Araq: `recv(a)` will be FIFO? |
15:18:21 | clyybber | And will the channels be typed? |
15:20:24 | FromDiscord | <mratsim> @milerius, template is_const_evaluated(x: typed) = when compiles(static(x)): true else: false |
15:20:33 | FromDiscord | <mratsim> @Milerius * |
15:20:51 | FromDiscord | <Milerius> :DDDD |
15:22:20 | FromDiscord | <mratsim> @Araq, just embrace alloca |
15:25:44 | FromDiscord | <mratsim> also you can only reuse the same channel if it's type erased and the size are compatible |
15:26:05 | FromDiscord | <mratsim> That's why I wrote my main memory pool |
15:26:21 | FromDiscord | <mratsim> A nice flowvar abstraction familiar to everyone that used futures |
15:26:44 | FromDiscord | <mratsim> and the fact that memory is complicated and slow is handle in an specialized allocator |
15:27:24 | FromDiscord | <mratsim> Also, it is extremely rare that the thread that allocates the flowvar does not reclaim it. I think it can only happen with nested parallelism |
15:27:41 | FromDiscord | <mratsim> no proof though. |
15:28:17 | FromDiscord | <mratsim> is handled in a specialied* |
15:30:14 | * | endragor joined #nim |
15:37:03 | FromGitter | <deech> Not being able to use `fmt` in a template is yet another manifestation of too-early symbol resolution, yes? |
15:37:41 | FromDiscord | <mratsim> yep |
15:38:00 | FromDiscord | <mratsim> it's mentionned in strformat limitations |
15:38:19 | clyybber | sux |
15:38:29 | FromDiscord | <mratsim> but that makes deprecating round in "math" impossible (it mentions use strformat instead) |
15:38:55 | FromDiscord | <mratsim> Also in many cases, especially debug and logs I would love to use strformat bu I can't ... |
15:42:38 | * | nsf quit (Quit: WeeChat 2.6) |
15:45:23 | FromDiscord | <mratsim> @Clyybber, the state machine approach is a bit verbose :/. I'll have to try on the "barrier" which is a pain right now. https://github.com/mratsim/weave/pull/63/commits/533bca556c12593ad809eb3e3685faba993d0c38 |
15:45:23 | FromDiscord | <mratsim> |
15:45:23 | FromDiscord | <mratsim> Hopefully the price in LOC counterbalanced by good graph generation. |
15:45:24 | disbot | โฅ [WIP] Refactor workers into state machines |
15:49:01 | FromDiscord | <mratsim> and verification/modelization |
15:49:39 | * | endragor quit (Remote host closed the connection) |
15:50:59 | Araq | mratsim: nevertheless I might go ahead and invent something new |
15:51:12 | * | endragor joined #nim |
15:51:49 | FromGitter | <deech> It seems from a couple of small tests that qualified arguments to procs can't passed without parens, eg. `f a.foo b.bar` seems to fail but `f(a.foo,b.bar)` works. |
15:52:23 | livcd | what would be the biggest nim app outside of status things ? |
15:52:27 | FromGitter | <deech> Possibly things like `f a.foo,b.bar` and `f a.foo: b.bar` also work but haven't tested. |
15:52:28 | Araq | you also left out the comma though |
15:52:54 | FromGitter | <deech> Ah, yes I did. Thought I could apply args like ML. :) |
15:52:57 | Araq | so you wrote f(a.foo(b.bar)), not f(a.foo, b.bar) |
15:53:10 | FromGitter | <deech> Thanks! |
15:53:29 | FromDiscord | <mratsim> Oh this sounds like an interesting language, seems like Microsoft Research is doing a lot of fun things: https://github.com/p-org/P |
15:53:35 | Araq | there is hardly any ML influence in Nim and more interestingly |
15:53:50 | Araq | Swift removed currying in later versions iirc |
15:54:19 | livcd | Araq: are there some monstrous Nim apps that nobody knows about ? |
15:54:33 | FromGitter | <deech> ML does not support automatic currying, Haskell is somewhat unique there I think ... |
15:55:20 | Araq | livcd, I don't know, "some" probably, "Many" hardly |
15:55:38 | * | couven92 quit (Read error: Connection reset by peer) |
15:55:57 | * | couven92 joined #nim |
15:57:14 | * | tane joined #nim |
15:57:28 | livcd | Also are these "FromGitter/FromDiscord" nim apps ? I cant find it on github i am doing something wrong obviously |
15:58:13 | FromGitter | <deech> Araq, curious was the lack of ML influence deliberate? |
15:58:19 | FromGitter | <kayabaNerve> What defines monstrous? :P |
15:58:36 | * | couven92 quit (Read error: Connection reset by peer) |
15:58:46 | FromGitter | <kayabaNerve> I know there is a Nim Discord bot. I'm not sure if FromDiscord is written in Nim. |
15:58:50 | * | jonafato quit (Quit: ZNC - http://znc.in) |
15:58:56 | * | couven92 joined #nim |
15:59:16 | livcd | kayabaNerve: afaik they used juju to benchmark compilation speeds for Go. That's what I would call monstrous :P |
15:59:37 | * | jonafato joined #nim |
16:01:19 | Yardanico | livcd: both are sadly not in Nim |
16:01:30 | Yardanico | FromGitter is in Crystal, FromDiscord is in Go (matterbridge) |
16:01:37 | * | sealmove joined #nim |
16:01:38 | FromDiscord | <mratsim> I'll play with fiber implementations in Nim and using fiber stackframes as sync objects instead of futures. Not sure if I'll be able to support more than x86+Posix though. depends on ucontext/setjmp longjmp |
16:01:43 | livcd | Yardanico: thanks |
16:01:46 | Yardanico | https://github.com/oprypin/critter fromgitter one |
16:03:24 | dom96 | livcd, pro-tip, you can send a CTCP VERSION to anyone to see their client name/version. That should give you insight into how bots are implemented (usually just /version <nick> on most IRC clients) |
16:05:08 | Araq | deech: deliberate in the sense that I didn't understand ML well enough to borrow from it. |
16:05:39 | Araq | I only wrote some trivial programs at university in ML |
16:06:40 | Araq | and passing local state around in parameters to enable tail recursions never felt elegant |
16:07:27 | FromDiscord | <Generic> this code currently compiles and runs without any problems with newruntime enabled: https://gist.github.com/RSDuck/cf091bed9ee31473eed426922a816cdc |
16:07:34 | FromDiscord | <Generic> is this right? |
16:08:21 | FromDiscord | <mratsim> why wouldn't it be? |
16:08:26 | FromGitter | <deech> Araq, makes sense. Conversely ML like langs have a lot to learn from langs like Nim too IMO. |
16:08:46 | FromDiscord | <Generic> because a non owned ref outlives the owned refs |
16:08:49 | Araq | (nor necessary when you already know about Hoare Triples) |
16:09:09 | * | Guest73089 quit (Remote host closed the connection) |
16:09:11 | sealmove | Araq: Zevv is making you proud |
16:09:24 | clyybber | Generic: No its not |
16:09:26 | FromDiscord | <mratsim> @Generic: you have no owned indication, and your ref is in global scope so its lifetime is the program lifetime |
16:09:46 | * | Hideki joined #nim |
16:10:01 | clyybber | Generic: You are creating no owned ref here |
16:10:05 | * | Hideki is now known as Guest35431 |
16:10:11 | clyybber | And even if you were, it would not outlive the owned ref |
16:10:15 | disruptek | !package simd |
16:10:16 | disbot | https://github.com/nimlibs/simdX86 -- 9simdX86: 11Wrappers for X86 SIMD intrinsics 7& 2 more... |
16:10:31 | disruptek | the package command searches nimble's database. |
16:10:45 | FromDiscord | <mratsim> the best simd wrapper is here: https://github.com/numforge/laser/blob/master/laser/simd.nim ๐ |
16:13:52 | FromDiscord | <Generic> I thought that after instantiating an object at first you would get a owned ref |
16:14:22 | Araq | Generic: looks like a bug to me ;-) |
16:14:38 | * | Guest35431 quit (Ping timeout: 260 seconds) |
16:15:01 | Araq | we have a check for that in the compiler, not sure why it doesn't trigger |
16:15:30 | FromDiscord | <Generic> I have another one |
16:16:01 | Araq | deech: also I read that ML styled type inference combined with overloading is NP complete |
16:16:24 | FromDiscord | <Generic> https://gist.github.com/RSDuck/335d69a265a26c7e4a4afc20c306aba3 |
16:16:33 | Araq | and since it was clear that Nim is about overloading to move polymorphism into compile-time I never investigated in more powerful type inference |
16:17:28 | FromDiscord | <mratsim> *cough* Idris *cough* |
16:22:37 | FromGitter | <deech> https://www.cl.cam.ac.uk/~sd601/papers/mlsub-preprint.pdf |
16:22:55 | FromGitter | <deech> Araq, ^^^ claims to have a promising approach but haven't seen it in practice. |
16:23:44 | Araq | you cannot innovate on every front at the same time, back then Ocaml had +. for floating point addition and I assumed for good reasons |
16:25:41 | Araq | later we got 'using' instead of parameter type inference, trying to do something similar with a completely different mechanism |
16:28:45 | FromGitter | <deech> Yeah to me Nim is about fast compiling, efficient codegen, static introspection and great C/C++/JS interop. I don't see myself leaning on it's concurrency/parallelism model. If I want those other things I'll FFI into/from Nim |
16:29:44 | FromGitter | <deech> Should also add great GC. |
16:29:55 | Yardanico | we're getting an even better GC :P |
16:30:35 | FromGitter | <deech> If you mean the new runtime, idk, maybe. |
16:31:11 | muffindrake | Is nim significantly slower than C? |
16:31:25 | FromGitter | <Willyboar> i think 2020 would be nim's year |
16:31:28 | Yardanico | muffindrake: no? |
16:31:33 | Yardanico | depends on your code of course |
16:32:11 | Araq | muffindrake, sometimes it's faster, sometimes it's equally fast, sometimes it's even slower than Python. |
16:33:02 | Araq | why? because Python has optimized libraries and Nim's is optimized for "can you also run it at compile-time" |
16:33:08 | Araq | ;-) |
16:33:11 | clyybber | deech: Nice paper |
16:33:47 | clyybber | Their approach seems reasonable and has a worst case of N((n+m)^2) with an avg of N(n+m) |
16:35:50 | clyybber | Maybe we should adopt it |
16:36:15 | clyybber | Unfortunately messing with sigmatch and the like is really hard |
16:36:37 | clyybber | The code has grown really "organically" |
16:37:14 | FromGitter | <deech> Yeah I tried to mess with that and got frustrated and gave up. |
16:37:51 | Araq | just write an alternative frontend |
16:38:14 | * | Hideki joined #nim |
16:38:15 | clyybber | Araq: WDYM? |
16:38:18 | FromGitter | <deech> to what? |
16:38:27 | Araq | to Nim. |
16:38:37 | * | Hideki is now known as Guest87433 |
16:39:13 | FromGitter | <deech> Change the syntax? Didn't 1.0 just get released? :) |
16:39:57 | Araq | not my point |
16:40:01 | Yardanico | nim had syntax skins :P |
16:40:10 | Araq | no, argh, it's not about the syntax |
16:40:36 | Araq | it's about the Nim compiler |
16:40:54 | Araq | lexer/parser's quality: ok |
16:41:12 | Araq | sem'check: please rewrite it |
16:41:14 | Araq | VM: ok |
16:41:15 | FromDiscord | <mratsim> For me Nim is about having a Python, syntax and the speed of C, which makes it a great fit for scientific computing. And multithreading for scientific computing in general is lacking, even in C/C++ land |
16:41:47 | Araq | codegen: bad but most of its complexity is now in injectdestructors.nim which is ok |
16:41:51 | Araq | sempass2: ok |
16:42:00 | Araq | lambda lifting: ok |
16:42:24 | clyybber | injectdestructors: good :) |
16:42:28 | Araq | indeed |
16:42:52 | clyybber | I want to rewrite sigmatch |
16:43:07 | clyybber | But I also wanted to finish default fields |
16:43:12 | FromGitter | <deech> Early symbol resolution issues: bad? |
16:43:28 | clyybber | But I think default fields must wait until the VM is ready for injectdestructors |
16:43:36 | clyybber | deech: Ok, yeah |
16:43:39 | disruptek | there's this annoyingly pervasive idea that the first impl is the last. |
16:43:49 | * | endragor quit (Remote host closed the connection) |
16:43:52 | * | Guest87433 quit (Remote host closed the connection) |
16:44:08 | clyybber | disruptek: Ship of theseus |
16:44:09 | * | Hideki joined #nim |
16:44:17 | disruptek | it's a collection of design decisions that leave options open for future innovation. |
16:44:24 | disruptek | that's what's great about nim, imo. |
16:44:31 | FromGitter | <deech> brb rewriting nim in rust |
16:44:33 | * | Hideki is now known as Guest49997 |
16:44:38 | FromDiscord | <snluu> With generic, is there some way to indicate/guard that it must satisfy a specific requirement? |
16:44:39 | FromDiscord | <snluu> For example, if iโm implementing MyHashTable[K, V], is there anyway to enforce that K must have a hasher function? |
16:44:39 | Yardanico | ohno |
16:44:40 | * | Guest49997 quit (Remote host closed the connection) |
16:44:46 | clyybber | deech: brb rewriting nim in ats-xanadu |
16:44:49 | Yardanico | @snluu concepts? |
16:45:13 | FromDiscord | <snluu> huh? |
16:45:19 | FromGitter | <deech> clyybber, you will be missed. |
16:45:25 | disruptek | there's this concept called concepts... |
16:45:30 | disruptek | it does what you want. |
16:45:32 | Yardanico | https://nim-lang.org/docs/manual_experimental.html#concepts |
16:45:44 | FromGitter | <alehander92> i wanted to rewrite nim as an example |
16:46:10 | FromDiscord | <mratsim> the default hash tables impl requires hash from the hashes module anyway |
16:46:18 | FromGitter | <deech> clyybber, seriously though ATS is insane in good and bad ways ... |
16:46:18 | FromDiscord | <snluu> oh i see. thanks! iโll take a look at concepts |
16:46:22 | FromDiscord | <mratsim> you can do the same |
16:46:33 | FromDiscord | <mratsim> they were written before concepts though |
16:46:36 | FromGitter | <alehander92> to rewrite nim as an example of my compiler dsl toolkit which doesnt really exist yet |
16:46:52 | FromGitter | <alehander92> but its obviously a crazy idea and i cant really do it and it probably cant work |
16:46:54 | FromDiscord | <mratsim> Readme driven development? |
16:46:58 | FromGitter | <alehander92> so ill just write some random stuff |
16:47:06 | FromGitter | <alehander92> of course, thats the best kind of development |
16:47:15 | clyybber | deech: I like its explicit handling of proof |
16:47:16 | clyybber | s |
16:47:23 | clyybber | But the syntax is just batshit insane |
16:47:51 | FromDiscord | <snluu> @mratsim how did the default hash table enforce that the key is hashable, without using concepts? compiler magic? |
16:48:21 | FromGitter | <deech> clyybber, have you seen it's error messages? |
16:48:27 | FromGitter | <alehander92> but i mean its like |
16:48:28 | clyybber | of course |
16:48:29 | disruptek | it doesn't work if it cannot hash. |
16:48:30 | FromGitter | <alehander92> https://news.ycombinator.com/item?id=21860713 |
16:48:38 | FromGitter | <alehander92> btw guys the nim os thing |
16:48:42 | clyybber | deech: Its the first thing I saw while trying to use it |
16:48:44 | FromGitter | <alehander92> would be good marketing i knew it |
16:48:48 | FromGitter | <deech> haha |
16:49:27 | clyybber | deech: Have you seen its commit log? |
16:49:33 | clyybber | updating very very minorly... |
16:49:42 | clyybber | lol |
16:49:59 | FromGitter | <deech> It's clear to me Dr. Xi just thinks differently ... |
16:50:04 | Yardanico | https://ru.wikipedia.org/wiki/420_(%D0%BA%D1%83%D0%BB%D1%8C%D1%82%D1%83%D1%80%D0%B0_%D1%83%D0%BF%D0%BE%D1%82%D1%80%D0%B5%D0%B1%D0%BB%D0%B5%D0%BD%D0%B8%D1%8F_%D0%BC%D0%B0%D1%80%D0%B8%D1%85%D1%83%D0%B0%D0%BD%D1%8B) |
16:50:09 | Yardanico | sorry wrong window :( |
16:50:25 | FromGitter | <alehander92> russia |
16:50:50 | FromGitter | <alehander92> i was pro before, but i am kinda anti 420 now |
16:50:50 | FromDiscord | <snluu> holy shit. is that what all russian wiki urls look like? all the unicode characters get transformed to % something? |
16:50:59 | FromGitter | <alehander92> cyrillic is bulgarian |
16:51:11 | Yardanico | @snluu well it will work without url encoding as well |
16:51:14 | FromGitter | <alehander92> ok thats my duty as a internet bulgarian comment warrior |
16:51:16 | Yardanico | modern browsers don't really care |
16:51:18 | clyybber | deech: To be fair, updating very very minorly is better than whatever this is: https://github.com/githwxi/ATS-Xanadu/commit/9dd393cf5e1a1858ac84d76a28e7a77d91f64761 |
16:51:37 | FromGitter | <deech> wow |
16:51:50 | clyybber | Nice readme update dare I say |
16:51:50 | FromGitter | <alehander92> there were some amazing comments |
16:51:59 | FromGitter | <alehander92> spanning like blog articles inside the commi messages |
16:52:03 | FromGitter | <alehander92> but i cant remember where |
16:52:46 | * | endragor joined #nim |
16:53:27 | FromGitter | <deech> clyybber, did you hear how it got kicked out of the language benchmarks? Apparently no one could read it and could not tell if it was following the benchmark rules. Otherwise it was always right up there with C/C++ for years. |
16:53:46 | clyybber | I know, pretty funny |
16:55:23 | FromGitter | <alehander92> i still feel pluggable syntaxes |
16:55:25 | FromGitter | <alehander92> might be a good idea |
16:55:40 | FromGitter | <alehander92> but maybe people just like to connect semantic ideas with certain syntaxes |
16:55:48 | disruptek | yeah, otherwise how else will we confuse everyone? |
16:55:51 | FromGitter | <alehander92> maybe the reason this doesnt take off is how we think, not technical |
16:56:09 | FromGitter | <alehander92> disruptek come one everything has to be pluggable |
16:56:33 | FromGitter | <alehander92> myFunction(mygrammar, customgc, custombackend) -> int |
16:56:46 | FromGitter | <alehander92> just like usa and laws |
16:56:55 | Yardanico | lol |
16:56:56 | FromGitter | <alehander92> and my understanding of law |
16:57:02 | disruptek | i have a rot13 plugin ready to go. |
16:57:26 | FromGitter | <alehander92> nim probablty doesnt need |
16:57:31 | FromGitter | <alehander92> so i say put it in every function |
16:57:32 | clyybber | "international law" |
16:57:38 | clyybber | """" |
16:57:43 | FromDiscord | <snluu> alehander92: HN itself definitely has a boner for anything that looks like ruby syntax, so while the project is cool, im sure that community is also receiving it with a lot of positive bias |
16:57:51 | FromGitter | <alehander92> international programming |
16:58:07 | FromGitter | <alehander92> can you imagine if calling an api from usa required going through the customs guys api |
16:58:12 | FromGitter | <alehander92> amazing |
16:58:14 | * | Hideki joined #nim |
16:58:37 | * | Hideki is now known as Guest35270 |
16:58:38 | FromGitter | <alehander92> snluu but i dont think so, if it was a nim "cool os" thing, people would still be similar |
16:58:56 | FromGitter | <alehander92> they also like python-y syntax, everything "hackerish" like hobby oses |
16:59:15 | FromGitter | <alehander92> and underdogs |
16:59:25 | FromDiscord | <snluu> maybe. last time nim was posted there, a bunch of them bitched about โwhitespace significanceโ |
16:59:39 | FromDiscord | <Rika> ah man that gets on my nerves |
17:00:09 | FromGitter | <alehander92> ah its very random |
17:00:14 | FromGitter | <alehander92> sometimes they do sometimes not |
17:00:18 | FromDiscord | <Rika> like okay i get it sometimes linters/formatters fuck it up real badly (vscode plugin im looking at you) |
17:00:39 | FromDiscord | <Rika> idk |
17:00:49 | FromDiscord | <Rika> i dont like the "fuck whitespace significance" thing |
17:00:57 | FromDiscord | <Rika> like -> get |
17:01:40 | FromGitter | <sheerluck> Bug #12691: "detectOs doesn't find Ubuntu 18.04"; it doesn't find Gentoo as well, bc `uname -o` is "GNU/Linux" so `result = ("-" & $d & " ") in uname()` is false :( |
17:01:42 | disbot | https://github.com/nim-lang/Nim/issues/12691 -- 3detectOs doesn't find Ubuntu 18.04 ; snippet at 12https://play.nim-lang.org/#ix=25fq |
17:01:45 | FromDiscord | <Rika> maybe the formatter thing is that important for them |
17:01:53 | FromDiscord | <snluu> i mean, i somewhat get it. when you work on a big open source project, people come from all parts of the world. it comes from the whole tab vs space thing, etc |
17:02:01 | FromDiscord | <snluu> not everyone has editorconfig installed |
17:02:10 | Yardanico | @sheerluck as I said in the issue itself, it would be better to rewrite it a bit to actually use lsb_release |
17:02:14 | Yardanico | for all distros |
17:02:30 | FromGitter | <alehander92> if there are interesting projects in nim |
17:02:31 | FromDiscord | <Rika> @snluu that applies to whitespaced bracketed languages too doesnt it |
17:02:33 | Yardanico | or also read "/etc/os-release" |
17:02:33 | FromGitter | <alehander92> this wouldnt matter so much |
17:02:38 | FromGitter | <alehander92> if python managed |
17:02:41 | FromGitter | <alehander92> it cant be so bad |
17:02:46 | FromDiscord | <Rika> python is "managing" |
17:02:49 | FromDiscord | <Rika> but not really no |
17:02:57 | FromDiscord | <Rika> its still met with a fucktonne of whitespace haters |
17:03:02 | FromGitter | <alehander92> well python is like hugely popular |
17:03:06 | FromGitter | <alehander92> it doesnt really matter |
17:03:09 | FromGitter | <alehander92> you cant win everyone |
17:03:18 | FromDiscord | <snluu> @Rika the thing is, in bracketed languages, people just bikeshed about styling. in python & Nim, it fucks up a build ๐ |
17:03:53 | Yardanico | well except that Nim is more permissive than Python when it comes to indentation (with spaces) |
17:04:05 | FromGitter | <alehander92> i wonder what to do for my vacation mini project |
17:04:05 | FromDiscord | <Rika> @snluu how what i dont get it |
17:04:10 | Yardanico | or maybe the same, IDK if you can have one function with 2 spaces indentation, and other one with 3 spaces |
17:04:14 | Yardanico | in python |
17:04:18 | FromDiscord | <Rika> Yardanico, i'd say Nim is more restricted than python in general |
17:04:21 | FromDiscord | <Rika> (no tabs) |
17:04:33 | Yardanico | I know, that's why I mentioned (with spaces) |
17:04:34 | FromDiscord | <Rika> Yardanico, no you cant |
17:04:35 | FromDiscord | <snluu> @Rika |
17:04:35 | FromDiscord | <snluu> ``` |
17:04:35 | FromDiscord | <snluu> ``` |
17:04:39 | FromGitter | <alehander92> work on my "hobby os" , or make a language toolkit example, or the little gdb in rust thing |
17:05:13 | FromDiscord | <Rika> @snluu i dont see what you're trying to show |
17:05:16 | dom96 | I originally created https://github.com/dom96/nimkernel/ with the intention of doing something similar to lilith |
17:05:19 | FromDiscord | <Rika> is that intended...? |
17:05:25 | FromDiscord | <snluu> @Rika |
17:05:25 | FromDiscord | <snluu> ``` |
17:05:25 | FromDiscord | <snluu> function x() { |
17:05:25 | FromDiscord | <snluu> doX() |
17:05:25 | FromDiscord | <snluu> doY() |
17:05:26 | FromDiscord | <snluu> } |
17:05:26 | FromDiscord | <snluu> ``` |
17:05:26 | FromDiscord | <snluu> |
17:05:27 | FromDiscord | <snluu> ``` |
17:05:29 | FromDiscord | <snluu> proc x() = |
17:05:30 | FromDiscord | <snluu> doX() |
17:05:31 | FromDiscord | <snluu> doY() |
17:05:33 | FromDiscord | <snluu> ``` |
17:05:34 | FromDiscord | <snluu> one works, one doesnt |
17:05:37 | Yardanico | please use paste services :( |
17:05:46 | FromDiscord | <Rika> "fuck irc!" |
17:05:55 | Yardanico | D: |
17:05:56 | FromDiscord | <snluu> oh ops my bad |
17:05:57 | FromGitter | <alehander92> @dom96 i have https://github.com/alehander92/lodka which i based on nimkernel and https://github.com/samanthadoran/Mero |
17:06:09 | FromDiscord | <Rika> im joking, i'm `aeverr` on matrix |
17:06:24 | dom96 | alehander92: where is the GUI and HN post? :P |
17:06:46 | FromGitter | <alehander92> thank you ! for nimkernel |
17:06:51 | FromDiscord | <Rika> @snluu you could argue that it shouldnt build because it doesnt work cognitively |
17:06:52 | dom96 | Rika: nothing like running an embedded browser just to chat over the internet huh? :P |
17:07:01 | FromGitter | <alehander92> so one idea i had was to modularize this stuff |
17:07:11 | FromDiscord | <Rika> dom96, i wish discord wasnt like this |
17:07:11 | FromGitter | <alehander92> to libs like x86 / interrupts / etc |
17:07:13 | FromGitter | <alehander92> like rust |
17:07:22 | FromGitter | <alehander92> so its easier for people to construct hobby os-es |
17:07:26 | FromDiscord | <Rika> but i also wish irc had linebreaks and embed |
17:07:33 | FromDiscord | <Rika> add an s |
17:07:52 | FromGitter | <alehander92> @dom96 my idea for a gui is very TUI-ish :D |
17:08:03 | dom96 | Rika: it just goes to show that perfection simply isn't necessary to gain millions of users. :) |
17:08:33 | Araq | perfection is rather harmful to this goal |
17:08:40 | FromDiscord | <Rika> why so? |
17:08:43 | FromDiscord | <snluu> @Rika I agree. Thatโs why I use Nim. Just saying some people prefer to indent however they want |
17:08:50 | FromGitter | <alehander92> or "define my own custom gui framework and way to do things with no windows but with some other concept " thing which yeah no |
17:08:54 | FromDiscord | <snluu> comes from the language not having proper block support |
17:09:17 | FromDiscord | <snluu> where they wanna do things like โopen fileโ, everything in between indented, โclose fileโ |
17:09:37 | FromGitter | <alehander92> many languages have similar concepts today |
17:09:38 | FromDiscord | <Rika> ~~context manager~~ |
17:09:43 | FromGitter | <alehander92> similar concept* |
17:09:46 | FromDiscord | <Rika> but i guess yeah that makes sense |
17:09:58 | FromDiscord | <Rika> usually i'd use comments for those |
17:10:12 | Araq | personally I would like to see Exokernels in Nim |
17:10:30 | FromDiscord | <Rika> like `# ~~~~ (repeated until col 80) \n # SOME NAME OR SOMETHING \n # ~~~~ (repeated until col 80)` |
17:10:47 | * | sealmove quit (Quit: WeeChat 2.6) |
17:10:47 | FromDiscord | <Rika> exokernel, thats a term ive learned pretty recently |
17:11:20 | FromGitter | <alehander92> exokernels sound fun |
17:11:36 | FromDiscord | <snluu> chemistry-dog.jpeg |
17:11:47 | FromGitter | <alehander92> so its like a library to write your own very low level application but still dont bother with too much arch/asm differences? |
17:18:57 | * | Guest35270 quit (Remote host closed the connection) |
17:20:33 | FromDiscord | <mratsim> oh zero-functional 1.0 |
17:22:09 | shashlick | Araq: you here? |
17:28:13 | FromGitter | <deech> Is there an http file download library that supports `https` and `Digest` proxy server auth? The built in one only support `Plain`. |
17:30:12 | Araq | the builtin one supports it just fine via -d:ssl |
17:30:15 | Araq | shashlick, pong |
17:31:02 | FromGitter | <deech> https://github.com/nim-lang/Nim/blob/devel/lib/pure/httpclient.nim#L136 |
17:33:32 | shashlick | Araq: on #12939 - how do you reopen stdout |
17:33:34 | disbot | https://github.com/nim-lang/Nim/issues/12939 -- 5stdout cannot be reassigned on some systems ; snippet at 12https://play.nim-lang.org/#ix=253B |
17:33:47 | shashlick | I get stdout redirected to a file, but how do I get stdout back? |
17:34:07 | shashlick | like I mentioned in the issue, reassigning stdout works on posix, only not on windows |
17:34:38 | FromGitter | <deech> Sorry I meant `Basic` not `Plain`. |
17:37:38 | shashlick | Araq: I am using reopen on windows right now but I cannot recover stdout unlike on posix |
17:38:22 | shashlick | https://github.com/nimterop/nimterop/blob/master/nimterop/toast.nim#L171 |
17:40:35 | FromGitter | <sheerluck> Araq: This is my first contribution so be gentle please :) https://github.com/nim-lang/Nim/pull/12954 |
17:40:36 | disbot | โฅ fix for detectOs |
17:41:48 | Yardanico | lol |
17:42:17 | FromDiscord | <Rika> lmao did disbot fuck up unicode |
17:42:35 | FromDiscord | <Clyybber> lol |
17:42:46 | disruptek | disbot: word on the street is you broke unicode. is this true? |
17:42:47 | disbot | yep. ๐ |
17:42:50 | disruptek | jesus. |
17:43:47 | FromDiscord | <Clyybber> fuck this shit, I'm going back to IRC where those fucking emojis are just fancy nice boxe |
17:43:48 | FromDiscord | <Clyybber> s |
17:44:29 | livcd | i am on irc and i see a smiley face |
17:44:43 | disruptek | he's a smug mofo, isn't he? |
17:46:12 | * | GitterIntegratio quit (Quit: killed) |
17:46:13 | * | aeverr[m] quit (Quit: killed) |
17:46:14 | * | BitPuffin quit (Quit: killed) |
17:46:14 | * | Connor[m] quit (Quit: killed) |
17:46:22 | * | isaac[m]1 quit (Quit: killed) |
17:46:22 | * | nc-x[m] quit (Quit: killed) |
17:46:22 | * | Miguelngel[m] quit (Quit: killed) |
17:46:23 | * | yglukhov[m] quit (Quit: killed) |
17:46:23 | * | Balu[m] quit (Quit: killed) |
17:46:28 | * | lqdev[m] quit (Quit: killed) |
17:46:32 | * | planetis[m] quit (Quit: killed) |
17:46:34 | * | macsek1911[m] quit (Quit: killed) |
17:46:34 | * | pigmej quit (Quit: killed) |
17:46:36 | * | leorize[m] quit (Quit: killed) |
17:46:38 | Yardanico | rip matrix bridge |
17:46:39 | * | skrylar[m] quit (Quit: killed) |
17:46:45 | * | Manny8888 quit (Quit: killed) |
17:46:48 | * | watzon[m] quit (Quit: killed) |
17:46:50 | * | salotz[m] quit (Quit: killed) |
17:46:51 | * | xomachine[m] quit (Quit: killed) |
17:46:54 | * | Demos[m] quit (Quit: killed) |
17:46:54 | * | k0mpjut0r quit (Quit: killed) |
17:46:56 | * | zielmicha[m]1 quit (Quit: killed) |
17:46:56 | * | TheManiac[m] quit (Quit: killed) |
17:46:56 | * | spymasterd[m] quit (Quit: killed) |
17:46:56 | * | d-nice2[m] quit (Quit: killed) |
17:46:56 | * | vycb[m] quit (Quit: killed) |
17:46:59 | * | nergal[m]1 quit (Quit: killed) |
17:46:59 | * | LEdoian[m] quit (Quit: killed) |
17:47:00 | * | lasso[m] quit (Quit: killed) |
17:47:17 | FromGitter | <alehander92> oh love the holiday |
17:47:23 | FromGitter | <alehander92> what happens to matrix |
17:47:40 | Yardanico | matrix<->freenode bridge dies from time to time |
17:47:42 | ehmry | the bridge is written in nodejs |
17:47:44 | FromGitter | <alehander92> i am in a mood to throw stange dsl-s at people |
17:47:49 | FromGitter | <alehander92> sorry |
17:47:49 | clyybber | ehmry: sad noises |
17:47:53 | FromGitter | <alehander92> we can rewrite it |
17:48:08 | FromGitter | <alehander92> we need better discord<->irc from long time |
17:48:18 | clyybber | alehander92: oh yeah, do it, throw something like breeze at macros.nim in a PR please :D |
17:48:27 | clyybber | that would be fine D |
17:48:57 | disruptek | the problem with the bridge is that it basically works. |
17:49:27 | FromGitter | <Willyboar> @alehander92 i have a nice holiday project for you |
17:49:36 | disruptek | it's hard to justify rewriting it because there aren't enough suggested improvements. |
17:50:17 | FromGitter | <alehander92> @Willyboar oh nice |
17:50:21 | FromGitter | <alehander92> how is nimux going |
17:51:02 | FromGitter | <Willyboar> This is your xmas project :p |
17:52:02 | FromGitter | <Willyboar> I finished the future structure and i want to write the cli part |
17:52:38 | clyybber | cligen? |
17:53:00 | clyybber | or do you mean something like ncurses? |
17:54:11 | FromGitter | <Willyboar> I want to write cli commands for create project, scaffold, migration files etc. I dont know if i will use cligen |
17:54:55 | shashlick | No @leorize in a while now |
17:55:07 | * | Hideki joined #nim |
17:55:09 | shashlick | Need some nimsuggest chops |
17:55:10 | FromGitter | <Willyboar> I want to keep the dependency list short |
17:55:20 | disruptek | cligen is practically stdlib. |
17:55:30 | * | Hideki is now known as Guest38521 |
17:55:53 | clyybber | Willyboar: You should really use cligen |
17:57:29 | clyybber | bbl |
17:57:30 | * | clyybber quit (Quit: WeeChat 2.7) |
17:57:39 | FromGitter | <alehander92> i actually have a bigger idea |
17:57:56 | FromGitter | <Willyboar> Drop it |
17:58:04 | FromGitter | <alehander92> one can write a scaffolding framework |
17:58:14 | FromGitter | <alehander92> as many projects in many languages need a simple way to define scaffolds |
17:58:17 | FromGitter | <alehander92> but i think this exists |
17:58:18 | FromGitter | <alehander92> actually |
17:58:21 | FromGitter | <alehander92> i forgot its name |
17:58:35 | FromGitter | <alehander92> it was mostly about project structure maybe but it seems similar |
17:58:36 | disruptek | !repo nim_websitecreator |
17:58:37 | disbot | https://github.com/ThomasTJdev/nim_websitecreator -- 9nim_websitecreator: 11Nim fullstack website framework - deploy a website within minutes 15 76โญ 2๐ด |
17:58:38 | FromGitter | <alehander92> anyway its offtopic |
17:59:28 | FromGitter | <alehander92> but for nimux i think you can define |
17:59:30 | FromGitter | <Willyboar> Disruptek this is not framework |
17:59:43 | FromGitter | <Willyboar> Is more a cms |
18:00:36 | FromGitter | <alehander92> https://github.com/alehander92/http/blob/master/src/http.nim#L406 โ and |
18:00:37 | FromGitter | <alehander92> https://github.com/alehander92/http/blob/master/src/http.nim#L254 those |
18:00:42 | FromGitter | <alehander92> thats how i started doing it |
18:00:48 | FromGitter | <alehander92> but i admit its a bit too simple |
18:00:49 | FromGitter | <Willyboar> Nwx can be a wordpress alternative |
18:01:16 | FromGitter | <alehander92> https://github.com/alehander92/http/blob/master/src/http.nim#L386 |
18:01:30 | FromGitter | <Willyboar> I have build projects from console with my static generator |
18:02:01 | FromGitter | <alehander92> i think some kind of a bit more general lib can just define lists with "templates" for each submenu |
18:02:24 | FromGitter | <alehander92> and high level commands |
18:02:25 | FromGitter | <Willyboar> This is not the difficult part |
18:02:41 | FromGitter | <alehander92> but i dont see a difficult part then |
18:02:59 | FromGitter | <alehander92> Araq : i decided to apply your fav idea in reverse |
18:03:06 | FromGitter | <Willyboar> The difficult is after that |
18:03:10 | FromGitter | <alehander92> code generators! need tokens. like lexers |
18:03:21 | FromGitter | <Willyboar> :) routing, dsl etc |
18:03:52 | FromGitter | <alehander92> for generation: e.g. `code a & "." & b` in my dsl would generate tokens and then depending on format / debuginfo options additional stuff for each token |
18:04:01 | FromGitter | <alehander92> @Willyboar oh i agree |
18:04:12 | * | nsf joined #nim |
18:05:29 | FromGitter | <Willyboar> Will see. |
18:10:01 | FromGitter | <alehander92> here it depends on stuff like middleware |
18:10:24 | FromGitter | <alehander92> i'd try to use more types there to somehow make validation more obvious |
18:11:23 | FromGitter | <alehander92> you can generate validators from stuff like `a: string(4..20)` and somehow propagate the validated values only "untainted" types internally |
18:11:29 | FromGitter | <alehander92> but probably thats a bit too far |
18:11:44 | FromGitter | <alehander92> i guess just a good dsl for validation and models is great enough |
18:11:58 | * | endragor quit (Remote host closed the connection) |
18:12:28 | * | Guest38521 quit (Ping timeout: 260 seconds) |
18:13:43 | disruptek | you could generate the concepts surrounding the types. |
18:14:30 | FromGitter | <alehander92> but concepts wouldnt cut it |
18:14:37 | FromGitter | <alehander92> some of those checks can be only dynamic |
18:14:44 | FromGitter | <alehander92> so i imagine somehow just ensuring |
18:14:51 | FromGitter | <alehander92> what you can do is to simulate typepass |
18:14:56 | FromGitter | <alehander92> ugh i forgot it zah explained it once |
18:15:02 | FromGitter | <alehander92> typestate yeah |
18:15:14 | FromGitter | <alehander92> state machine for types |
18:15:33 | disruptek | right, but that can be generated, too. |
18:15:36 | FromGitter | <alehander92> you have validate(input: A) -> B, internalApi(input: B) -> C .. (C) -> Output |
18:15:46 | FromGitter | <alehander92> so you can only generate B after validation |
18:15:55 | FromGitter | <alehander92> and Output after e.g. other stuff |
18:16:24 | FromGitter | <alehander92> yeah, but no need, its mostly just "make only those procs take A" |
18:17:03 | FromGitter | <alehander92> but you probably need a small dsl to make it easier to make different "stages" of the same type with the same fields |
18:17:15 | FromGitter | <alehander92> but thats not really web framework specific, a general lib problem |
18:17:59 | FromGitter | <alehander92> e.g. you can generate it from case objects definitions indeed |
18:20:35 | FromGitter | <alehander92> but this is again probably not relevant for a web framework sorry for the spam @Willyboar |
18:25:14 | FromGitter | <alehander92> http://ix.io/25fW |
18:25:18 | FromGitter | <alehander92> clyybber Araq |
18:25:25 | FromGitter | <alehander92> this is the next iteration |
18:25:29 | FromGitter | <alehander92> of my idea :D |
18:25:55 | FromGitter | <alehander92> disruptek totally reusing npeg |
18:26:16 | * | luis_ joined #nim |
18:26:39 | Zevv | "reusing"? |
18:28:30 | * | leorize[m] joined #nim |
18:28:30 | * | Connor[m] joined #nim |
18:28:31 | * | BitPuffin joined #nim |
18:28:31 | * | GitterIntegratio joined #nim |
18:28:31 | * | lqdev[m] joined #nim |
18:28:31 | * | nergal[m]1 joined #nim |
18:28:31 | * | Demos[m] joined #nim |
18:28:32 | * | isaac[m]1 joined #nim |
18:28:32 | * | k0mpjut0r joined #nim |
18:28:36 | * | lasso[m] joined #nim |
18:28:36 | * | vycb[m] joined #nim |
18:28:37 | * | aeverr[m] joined #nim |
18:28:37 | * | spymasterd[m] joined #nim |
18:28:37 | * | xomachine[m] joined #nim |
18:28:37 | * | TheManiac[m] joined #nim |
18:28:37 | * | d-nice2[m] joined #nim |
18:28:37 | * | Miguelngel[m] joined #nim |
18:28:37 | * | zielmicha[m]1 joined #nim |
18:28:38 | * | nc-x[m] joined #nim |
18:28:38 | * | watzon[m] joined #nim |
18:28:38 | * | LEdoian[m] joined #nim |
18:28:38 | * | yglukhov[m] joined #nim |
18:28:38 | * | planetis[m] joined #nim |
18:28:38 | * | macsek1911[m] joined #nim |
18:28:38 | * | skrylar[m] joined #nim |
18:28:39 | * | Manny8888 joined #nim |
18:28:39 | * | salotz[m] joined #nim |
18:28:39 | * | Balu[m] joined #nim |
18:28:39 | * | pigmej joined #nim |
18:29:00 | disruptek | i think i'd need to be stoned to follow this paste. |
18:29:15 | Zevv | what's stopping you? |
18:29:25 | disruptek | i have to do some driving later. |
18:29:42 | Zevv | fair enough |
18:29:58 | disruptek | c'mon people, i need some bugs. |
18:30:37 | Zevv | http://zevv.nl/div/here-is-your-bug.png |
18:30:38 | FromDiscord | <Rika> merry christmas, your christmas gifts are bugs |
18:31:24 | disruptek | i mean, not bugs in nimble. |
18:31:27 | disruptek | bugs in nimph. |
18:31:29 | Zevv | ooooh |
18:31:31 | Zevv | :) |
18:31:40 | disruptek | i wonder what that is. |
18:32:28 | disruptek | why are you even running `nimble build`? |
18:32:33 | Zevv | dude what is my computer doing. I only typed './boostrap.sh' and now it's downloading and building the whole world?! |
18:32:44 | Zevv | disruptek: why not |
18:33:20 | disruptek | when i compile stuff i use a compiler. |
18:33:32 | Zevv | funny man you are |
18:33:39 | disruptek | so i've been told. |
18:34:01 | disruptek | my `nimble build` crashes too, but from a different bug. |
18:34:26 | Zevv | error messages being *italic* does probably not count as a bug, right? |
18:34:40 | disruptek | i thought you stripped those out? |
18:34:50 | Zevv | not the italics, apparently |
18:35:04 | disruptek | there is a compile-time option to turn them off. just for you. |
18:35:09 | Zevv | wow! |
18:35:15 | disruptek | i know, right? |
18:35:29 | rockcavera | how to get the executable folder? |
18:35:34 | disruptek | --define:cutelogBland |
18:35:47 | disruptek | --define:cutelogMonochrome as well |
18:35:57 | disruptek | see src/nimph.nim.cfg |
18:35:59 | Zevv | dude |
18:36:03 | Zevv | +1! |
18:36:07 | disruptek | i know, i know. merry christmas. |
18:36:37 | disruptek | also i dunno if i ever tested them. so they might be bugged. |
18:37:07 | disruptek | it seems like they work. |
18:37:10 | Zevv | Even my christmas lights are green |
18:37:19 | disruptek | lol |
18:37:37 | disruptek | incidentally, are you color blind? |
18:37:43 | Zevv | I whish, sometimes |
18:38:17 | Zevv | boldblind and italicsblind would be ok every now and then as well |
18:38:47 | disruptek | just turn your head. |
18:38:53 | Zevv | yes, works |
18:38:53 | disruptek | instant italics-blindness. |
18:39:36 | disruptek | what i want to know is, |
18:39:41 | disruptek | why is reading from nil so wrong? |
18:39:46 | Zevv | ok. I created a new project with nimble init. Now I run nimph without arguments and my screen is full or red and yellow italics |
18:39:49 | Zevv | is that a bug? |
18:39:51 | disruptek | i'm tired of being punished in the search for knowledge. |
18:40:05 | disruptek | Zevv: probably not. |
18:40:10 | Zevv | http://ix.io/25g3 |
18:40:34 | disruptek | what's in your nn.nimble? |
18:40:42 | Zevv | http://ix.io/25g4 |
18:40:44 | Zevv | generated by nimble |
18:41:00 | disruptek | and nimble cannot read it? |
18:41:03 | Zevv | Nope :) |
18:41:07 | disruptek | you need "" around the strings. |
18:41:12 | disruptek | gah. wtf nimble. |
18:41:35 | disruptek | i swear it's like no one tests this stuff. |
18:42:06 | Zevv | http://zevv.nl/div/yeahIknow.gif |
18:42:43 | disruptek | i guess this is a scenario i can test for, maybe, somehow. |
18:43:02 | Zevv | my nimble is ancient probably, again |
18:48:12 | shashlick | ooo I found the nimsuggest log file, it's in my home dir |
18:50:28 | Zevv | I think I also have problems parsing alehander92 proposal doc |
18:51:41 | * | endragor joined #nim |
18:53:41 | disruptek | there's a bug fix for ya. |
18:55:33 | disruptek | we need someone to write an alehander92 parser doc parser. |
18:56:13 | * | endragor quit (Ping timeout: 260 seconds) |
18:56:35 | disruptek | i read from nil and you know what happened? |
18:56:42 | disruptek | nothing. |
18:58:37 | Zevv | what exactly does "Exception: 'version' is not accessible using discriminant 'kind' of type 'Release'" mean? |
18:59:06 | disruptek | it means Release is a variant object of the wrong variant to supply a version field. |
18:59:22 | disruptek | hey, i spent hours on that error message. it's not obvious enough? |
18:59:38 | Zevv | I must admit it eludes me what I should do to solve this |
18:59:47 | disruptek | 0.6.3 is improved. try that. |
19:00:11 | disruptek | but also, put your name in "". ditto the description. |
19:00:15 | Zevv | I did |
19:00:18 | Zevv | of course |
19:00:21 | disruptek | oh, you still get an error? |
19:00:28 | Zevv | yeah |
19:00:44 | disruptek | hmm, i can't reproduce using the same .nimble. |
19:00:49 | Zevv | http://ix.io/25gk |
19:01:32 | disruptek | pull and rebuild nimph please. |
19:01:41 | Zevv | I did - is ./boostrap.sh enough? |
19:01:53 | Zevv | after 'git pull', of course |
19:01:58 | disruptek | to build it, yes, it should be. |
19:02:01 | FromDiscord | <Rika> disruptek, i'm already pretty fuckin high (not literally, cant find a better equivalent word in english) right now and i still cant understand alehander |
19:02:18 | disruptek | pretty fuckin' high is pretty fuckin' accurate, i think. |
19:02:30 | FromGitter | <alehander92> zevv disruptek |
19:02:36 | FromGitter | <alehander92> i just mean i would use |
19:02:37 | nisstyre | how can you be high but not nigh |
19:02:38 | disruptek | nimph --version says 0.6.3? |
19:02:42 | FromGitter | <alehander92> npeg for the parser dsl |
19:02:48 | FromGitter | <alehander92> but maybe this gives somemore |
19:03:01 | nisstyre | s/nigh/high/ |
19:03:21 | FromGitter | <alehander92> https://gist.github.com/alehander92/d207c2f9a681e7c1e37c64b9576c2de7 |
19:03:27 | nisstyre | Anyone hiring Nim developers? |
19:03:28 | FromGitter | <alehander92> context |
19:03:33 | nisstyre | or know of positions open |
19:03:44 | FromGitter | <alehander92> but more focused on "just building funny experiments" than "2nd impl" |
19:04:09 | Zevv | bttw @alehander92: not sure if you picked that up today: npeg got a bit of an upgrade today, it can now parse any seq[T] you put in - ideal for two stage lexer/parser for example |
19:04:10 | nisstyre | (doesn't have to be just Nim, it would be cool to use it for even part of a project) |
19:04:37 | nisstyre | Zevv: so you could write all your compiler passes with a PEG? |
19:04:39 | nisstyre | that's pretty cool |
19:04:47 | disruptek | nisstyre: drop a link to your cv? |
19:04:56 | FromGitter | <alehander92> great ! |
19:05:24 | FromGitter | <alehander92> Zevv but anyway basically i want to also define dsl-s for several other things |
19:05:28 | Zevv | nisstyre: well, technically it already could do the same stages, but combined grammers with lexers/parsers tend to be nasty |
19:05:36 | Zevv | alehander92: DSL away! |
19:05:39 | FromGitter | <alehander92> and a conventional way to write all the other custom code |
19:06:08 | nisstyre | disruptek: sure, https://wesk.tech/weskerfoot.pdf |
19:06:09 | FromGitter | <alehander92> and make an example subset-of-c / minimal-subset-of-nim / myownthing impl |
19:06:14 | FromGitter | <alehander92> as an example |
19:06:30 | FromGitter | <alehander92> and the point of the `passes` thing is to demostrate |
19:06:39 | FromGitter | <alehander92> configuration which enables the framework |
19:06:45 | FromGitter | <alehander92> to compile parallelly |
19:06:48 | FromGitter | <alehander92> and with caching |
19:06:58 | FromGitter | <alehander92> if the structure of the lang/config allows it |
19:07:09 | Zevv | sweet |
19:07:25 | nisstyre | Zevv: I agree, I think a lot of people still write the lexer by hand for performance/control too |
19:07:46 | FromGitter | <alehander92> and it should also make it easy to autogenerate debug info + server stub for repl/langserver |
19:07:48 | nisstyre | also for certain things like, e.g. precedence parsing, PEGs aren't necessarily a great solution |
19:07:53 | FromGitter | <alehander92> but this is like a huge wannabe thing |
19:08:35 | FromDiscord | <Rika> thats a lot of likes |
19:08:39 | FromGitter | <alehander92> but you can imagine a single language impl which can be very scripted/configured |
19:08:54 | Zevv | nisstyre: true, that was a big PITA for NPeg as well. I got around this by extending PEG with knowledge of precedences, which works quite well |
19:09:11 | FromGitter | <alehander92> so if you can adapt your hobby lang code to somehow fit the "convention" structure |
19:09:16 | Zevv | nisstyre: https://github.com/zevv/npeg/blob/master/misc/rod.nim#L181 for example |
19:09:16 | FromGitter | <alehander92> / interfaces |
19:09:20 | FromGitter | <alehander92> it should be kinda fine |
19:09:35 | FromGitter | <alehander92> of course people think this is insane |
19:10:06 | FromGitter | <alehander92> and they are kinda right that it is very confusing |
19:10:13 | FromGitter | <alehander92> so i need to write a bigger example project |
19:10:43 | nisstyre | Zevv: if you use an algorithm like precedence climbing you can make it possible to define operators within the language itself too, since all you need is to add it to a table with the associativity/precedence and you're good |
19:10:50 | nisstyre | not sure if your solution allows for that or not |
19:10:51 | Zevv | alehander92: maybe make it more concrete already, just make up an example DSL to show a practical example? |
19:11:06 | FromGitter | <alehander92> i made a bit for the type checking |
19:11:16 | FromGitter | <alehander92> and the passes config |
19:11:21 | nisstyre | looks like it probably could with some tweaking |
19:11:29 | * | sagax quit (Read error: Connection reset by peer) |
19:11:29 | FromGitter | <alehander92> e.g. the passes thing shows you can parse the input files |
19:11:45 | FromGitter | <alehander92> oh wait, it needs some tweaking to find out imports sooner |
19:11:54 | disruptek | i just can't reproduce this issue. |
19:12:02 | Zevv | nisstyre: that's basically whats happening here. There's precedence climbing inside the generated parser, certain paths of the parse tree are only available depending on the current precedence, recursion will hit a dead end and will backtrack to the previous level |
19:12:17 | nisstyre | Zevv: oh, that's awesome |
19:12:18 | Zevv | well, not backtrack - continue from there, basically |
19:12:24 | nisstyre | I'm going to have to dig into that later |
19:13:04 | FromGitter | <alehander92> but after that it would be : parse files parallelly in a queue then generate their dependency graph, then semcheck them in several passes parallelly, then apply local optimization paralellly, but then optionally global one serialy(as you probably cant isolate that well) and then join those jobs and finish with parallel codegen (and here it depends on the backend if you have linking etc) |
19:13:35 | FromGitter | <alehander92> and you can see that you can cache on "finish of stage for module A" here |
19:13:41 | Zevv | dude dont overdo it :) |
19:13:46 | FromGitter | <alehander92> and autogenerate caching strategies |
19:14:00 | FromGitter | <alehander92> i am only beginning! |
19:14:26 | FromGitter | <alehander92> but i dont really think its overdoing it, its mostly just functions in pipelines of processess |
19:14:39 | FromGitter | <alehander92> small blocks |
19:14:43 | FromGitter | <alehander92> combined with other blocks |
19:16:18 | disruptek | zevv: gimme another screenshot? |
19:16:46 | Zevv | of what? |
19:16:53 | disruptek | whatever this bug is. |
19:17:01 | Zevv | Exception: 'version' is not accessible using discriminant 'kind' of type 'Release' |
19:17:19 | disruptek | but the input is just the .nimble file? |
19:17:29 | disruptek | nothing else in the directory? because i cannot achieve that error. |
19:17:33 | Zevv | I guess? I just type 'nimph' without arguments |
19:17:53 | Zevv | there's src/nn.nimp which echo "hello" in there |
19:18:15 | disruptek | maybe your binary is not up-to-date. |
19:18:23 | FromGitter | <alehander92> and yeah we need something like stuff easily loadable from memory |
19:18:24 | * | nsf quit (Quit: WeeChat 2.6) |
19:18:45 | Zevv | disruptek: http://ix.io/25gB |
19:19:00 | FromGitter | <alehander92> and a "database"-y thing so processes can indeed share some global stuff, but i hope its not so much slower |
19:19:17 | disruptek | this is nuts. |
19:19:34 | Zevv | alehander92: sounds like a project - I'll be watching you |
19:19:39 | leorize[m] | shashlick: you were looking for me? |
19:20:16 | * | luis_ quit (Quit: luis_) |
19:20:29 | disruptek | Zevv: you must have some broken package in ~/.nimble/pkgs |
19:20:44 | * | luis_ joined #nim |
19:20:46 | disruptek | echo '--clearNimblePath' > nim.cfg |
19:20:57 | * | sagax joined #nim |
19:21:03 | leorize[m] | you can configure nimsuggest by editing 'autoload/nim/suggest.vim' in nim.nvim |
19:21:09 | Zevv | ๐nn version 0.1.0 lookin' good |
19:21:11 | * | luis_ quit (Client Quit) |
19:21:19 | disruptek | that helped? |
19:21:22 | leorize[m] | shashlick: add '--log' to extraArgs |
19:21:22 | Zevv | it seems |
19:21:37 | * | luis_ joined #nim |
19:21:48 | disruptek | thanks. this gives me something to try to repro. |
19:23:15 | disruptek | echo '--nimblePath="$config/deps/pkgs/"' >> nim.cfg |
19:23:17 | FromGitter | <bung87> anyone rember a arcticle about string cstring shallow copy ? |
19:23:25 | disruptek | then you can play with local deps. |
19:24:39 | disruptek | leorize[m]: is there an option to toggle completion for keyword identifiers? |
19:25:52 | shashlick | @leorize ya got lucky and found the nimsuggest log |
19:26:09 | shashlick | I've fixed the issue, now nimterop generated symbols will work |
19:26:29 | shashlick | As long as you run with nim c at least once so that symbols get cached |
19:27:49 | disruptek | you're kidding. |
19:29:08 | * | luis_ quit (Ping timeout: 248 seconds) |
19:29:14 | FromDiscord | <mratsim> The last hour of discussion is hell to parse on Discord |
19:29:43 | federico3 | why? |
19:29:43 | Zevv | switch to IRC then :) |
19:29:44 | disruptek | shashlick: is that in trunk? |
19:29:52 | disruptek | srsly |
19:30:08 | FromDiscord | <mratsim> no one saw my post :/ https://www.reddit.com/r/programming/comments/eenkf2/zerofunctional_10_zerocost_functional_programming/ |
19:30:43 | FromDiscord | <mratsim> or this one: https://news.ycombinator.com/item?id=21865204 |
19:31:21 | Zevv | mratsim: is that yours? I didnt even know! |
19:31:39 | disruptek | it's not new. |
19:32:07 | Zevv | no, but it's 1.0.0. Which is always reason to celebrate |
19:32:37 | dom96 | bah, how is it possible for Nimble's package parser to disintegrate without me updating Nim or Nimble at all |
19:33:14 | disruptek | cosmic radiation. |
19:33:26 | Zevv | bit rot |
19:33:27 | FromDiscord | <mratsim> @dom96, pretty sure findExe is broken |
19:33:41 | disruptek | since when? |
19:33:44 | dom96 | First this error appeared after my task finished successfully, which was odd but I ignored it |
19:33:50 | dom96 | and now it just fails outright: https://gist.github.com/dom96/6b0b8279dbbf72047912d8d893ccedec |
19:33:53 | FromDiscord | <mratsim> it's broken when using git bash under windows |
19:34:32 | FromDiscord | <mratsim> oh this one seems new, though there is still the "." in the error message |
19:35:06 | disruptek | git bash under windows? |
19:36:26 | skrylar[m] | consteval: because running m4 wasn't good enough |
19:36:30 | skrylar[m] | or something. |
19:36:58 | dom96 | wtf this line isn't under the `when nimvm` branch |
19:37:03 | skrylar[m] | i kind of agree with go's approach of just giving you the compiler as a lib so you can parse your code and then saying good luck just generate any meta crap you need out of band |
19:37:16 | dom96 | I swear I will rip out nimscript from Nimble, *sigh* |
19:37:50 | skrylar[m] | you could just make a wasm backend and run wasm from nimble ๐คฃ |
19:38:00 | shashlick | disruptek: just pushing, laptop crashed |
19:38:37 | dom96 | oh, it is my fault after all |
19:38:57 | shashlick | it is in the issue144 branch, running through CI |
19:39:00 | dom96 | My .nimble file imports a file which now does a `staticExec` |
19:40:28 | dom96 | the error message here is absolutely horrible :( |
19:43:22 | disruptek | skrylar: nim /does/ provide the compiler as a lib. |
19:44:06 | dom96 | disruptek, barely |
19:44:40 | FromGitter | <alehander92> zevv disruptek this is not a vacation project |
19:44:44 | disruptek | shashlick: awesome! it works! |
19:44:47 | FromGitter | <alehander92> i feel i need bell labs to do it |
19:44:56 | shashlick | disruptek: awesome, thanks for checking ๐ |
19:45:04 | disruptek | w000h0000000 |
19:45:29 | disruptek | wow i've gone so long without leorize's benefit. good to have you back, buddy. |
19:45:37 | disruptek | nearly 8,000 lines of bullshit error messages. |
19:45:49 | shashlick | seriously, he showed up and it works |
19:45:53 | disruptek | right? |
19:46:09 | disruptek | it's christmas over here. |
19:46:17 | disruptek | i got the colored lights up for zevv and everything. |
19:46:30 | disruptek | i even got a bug report. |
19:46:37 | disruptek | h0 h0 h0 merry merry merry |
19:47:04 | FromGitter | <alehander92> yeeee |
19:51:03 | disruptek | man this is huge. |
19:53:04 | lqdev[m] | leorize: you here? |
19:55:55 | dom96 | shashlick, does Nimble store cache anywhere but /tmp/nimblecache? |
19:56:50 | dom96 | I've literally stashed my changes and I'm still getting this error. |
19:57:37 | skrylar[m] | @disruptek |
19:57:56 | skrylar[m] | (and then i fail at tagging) that was mostly a reply to a few hours ago when people were dissing c++'s far reaching nonsense |
19:58:29 | skrylar[m] | they seem to be gifted at realizing the hundreds of pages of nonsense is not safer or simpler than just letting someone defmacro |
19:58:53 | disruptek | go, you mean? |
19:59:28 | skrylar[m] | no, they were talking about c++ consts |
20:00:10 | skrylar[m] | i can respect go since they would rather just not do something than do it badly |
20:00:59 | disruptek | oh, i see. m4. |
20:03:10 | * | azed joined #nim |
20:08:29 | disruptek | zevv: i think your bug is fixed. |
20:09:35 | * | Hideki joined #nim |
20:09:57 | * | Hideki is now known as Guest30967 |
20:12:58 | * | nsf joined #nim |
20:14:25 | * | Guest30967 quit (Ping timeout: 265 seconds) |
20:15:58 | skrylar[m] | go put in that thing where you can put a backtick string on struct fields and sort of shrugged it off as a generic way to meta-tag stuff, which is a little clunky but it does scale. |
20:16:10 | skrylar[m] | before my laptop died i saw one of the cryptopunks here complaining that their bignum lib in nim built slow |
20:22:11 | FromGitter | <alehander92> disruptek do you have a movie bot |
20:22:15 | FromGitter | <alehander92> !disbot give movei |
20:22:19 | FromGitter | <alehander92> ok english bad |
20:40:06 | * | jonafato quit (Quit: ZNC - http://znc.in) |
20:40:07 | * | Trustable quit (Remote host closed the connection) |
20:40:16 | * | jonafato joined #nim |
20:42:52 | * | oculux quit (Ping timeout: 268 seconds) |
20:46:17 | * | oculux joined #nim |
20:52:02 | shashlick | dom96: just should be that place |
20:55:19 | shashlick | disruptek: merged to master and tagged |
21:10:34 | Zevv | disruptek: i think my bug is fixed. |
21:11:53 | Zevv | why doesn't the doctor fix my tags? |
21:12:37 | Zevv | oh 'nimph tag' just fixed my tags retroactively, sweet |
21:13:05 | * | oculux quit (Ping timeout: 258 seconds) |
21:13:28 | Zevv | you ask for bugs when you have *fourty six* open issues?! |
21:16:08 | * | oculux joined #nim |
21:18:59 | * | Mister_Magister quit (Ping timeout: 265 seconds) |
21:23:27 | * | Mister_Magister joined #nim |
21:24:29 | * | leorize joined #nim |
21:31:06 | * | gour quit (Remote host closed the connection) |
21:47:17 | disruptek | yeah, it does retroactive tagging. |
21:47:45 | disruptek | the problem with that feature is that github ranks the releases by date, so... |
21:48:10 | disruptek | i guess it's still correct, but not perfect. |
21:49:28 | Zevv | not something you can help, github problem |
21:50:03 | disruptek | i sort on version anyway. maybe we will one day be able to fix the timestamps, too. |
21:50:34 | disruptek | you can use the graph command to look for missing tags in advance. |
21:50:48 | disruptek | or, it warns you in --dry-run, right? |
21:50:57 | Zevv | i dindnt dry run |
21:51:34 | Zevv | i saw in my git reflog that it messed about alot though. checkking out all the tags etc? |
21:51:58 | disruptek | yeah; if the repo is clean it will roll it around to find out when the version changed. |
21:52:24 | Zevv | make sense |
21:52:29 | disruptek | if it's dirty, it can only look at tags but not the .nimble file. |
21:53:13 | disruptek | would upgrade nimterop from 0.4.2 to v0.4.3 |
21:53:15 | disruptek | woohoo |
21:55:35 | disruptek | so what should i prioritize, zevv? |
21:59:47 | * | watzon quit (Quit: WeeChat 2.7) |
22:00:09 | leorize | disruptek: there aren't any option for keyword completion |
22:00:35 | disruptek | mfiano was pretty upset. said he couldn't write nim without proper keyword completion. |
22:00:49 | leorize | lqdev[m]: o/ |
22:01:04 | leorize | there are only a handful of them... |
22:01:20 | disruptek | i know. i showed him the keywords.txt. ๐คท |
22:04:41 | leorize | usually I'd add more features but the keywords are so short it's kinda useless for autocompletion |
22:04:56 | disruptek | agree. he wanted completion for `proc`. |
22:05:12 | leorize | just point them to tabnine if they really need that :P |
22:06:09 | disruptek | i like to think that i'm intolerant of crappy software, but that surpasses even my high standards. |
22:07:43 | * | Vladar quit (Quit: Leaving) |
22:08:18 | skrylar[m] | tabnine no longer offers their offline options |
22:08:28 | skrylar[m] | or rather they're sub-only now :| |
22:09:35 | * | NimBot joined #nim |
22:09:52 | leorize | there's the tabnine professional in beta |
22:10:25 | skrylar[m] | the algorithm they used to use isn't all that complex.. needs some doing tho |
22:11:22 | skrylar[m] | well if everything is on one line you can just look for repeating tokens and replace those with {1} and so on... multi-line expressions a bit harder because you have to find where to split those, but none of the examples on their site used to show it with multi-line expressions so i don't know if it ever supported it |
22:13:37 | leorize | anyone wanna volunteer to help this person? https://github.com/alaviss/nim.nvim/issues/19 |
22:13:38 | disbot | โฅ Can't install, Please help |
22:14:19 | disruptek | i don't use vim package managers. i just git clone stuff. is that weird? |
22:15:02 | leorize | i use a small script wrapping git clone, but basically the same idea |
22:20:20 | disruptek | if i don't specify `installExt = @["nim"]`, nimble doesn't install .nim files for my hybrid project? is that right? |
22:20:23 | skrylar[m] | pathogen :c |
22:22:02 | FromGitter | <bung87> @zevv https://github.com/bung87/nlm/blob/master/src/nlm.nim#L123 can you help find out why it doest match? |
22:23:54 | solitudesf | if you have `bin` set, it cant know that your project is hybrid |
22:24:28 | disruptek | hmm, i just did `nimble init` and it created a "hybrid" .nimble that includes installExt and bin. |
22:25:03 | disruptek | also, zevv, the strings seem to've been written correctly. so, y'know, upgrade your nimble. |
22:25:09 | solitudesf | well, yes, you have to have both to count as hybrid |
22:25:18 | disruptek | so that's what nimph should do? |
22:32:03 | * | solitudesf quit (Ping timeout: 260 seconds) |
22:35:17 | * | jken_ quit (Ping timeout: 268 seconds) |
22:39:44 | * | jken joined #nim |
22:39:51 | shashlick | vire is my vim package manager |
22:43:06 | * | clyybber joined #nim |
22:45:55 | * | clyybber quit (Client Quit) |
22:50:39 | * | koltrast joined #nim |
22:53:27 | * | nsf quit (Quit: WeeChat 2.6) |
22:53:37 | FromDiscord | <Milerius> Hey is it possible to have a thread name in the logging module ? |
22:53:47 | FromDiscord | <Milerius> So we can set in each thread the name of our current thread |
22:54:05 | disruptek | sure, you can control the format string used for logging. |
22:54:09 | FromDiscord | <Milerius> https://nim-lang.org/docs/logging.html#basic-usage-format-strings It's will be fantastic to have it here |
22:54:20 | FromDiscord | <Milerius> Yeah but there is nothing for the thread name ? |
22:54:22 | FromDiscord | <slymilano> Curious what you Nim vets think. What things would move the needle to increase Nim mindshare? More packages in the nimble directory? More API wrappers and such? |
22:54:57 | shashlick | more people using nim every day to build real things |
22:55:07 | shashlick | and being noisy about it |
22:55:19 | disruptek | probably noise is the main thing. |
22:55:32 | FromDiscord | <slymilano> Yeah Iโm building consumer apps with Nim and posting on HN and Reddit |
22:56:00 | FromDiscord | <slymilano> A single static binary thatโs 6MB is incredibly compelling and good publicity bait |
22:56:11 | disruptek | 6mb? |
22:56:12 | FromDiscord | <Milerius> What i would like is something like |
22:56:16 | * | endragor joined #nim |
22:56:19 | disruptek | my pants are getting tight. |
22:56:25 | FromDiscord | <slymilano> I meant 1MB binary 6MB ram on use hehe |
22:56:26 | FromDiscord | <Milerius> `var consoleLogger = newConsoleLogger(fmtStr="[$levelid][$date $time][$thread_id]: ")` |
22:56:40 | FromDiscord | <Milerius> But i don't think it's possible atm to add the thread ID |
22:57:04 | disruptek | just alter the format string inside your thread. |
22:57:11 | FromDiscord | <slymilano> Jester is awesome but a more traditional Rails/Phoenix would be amazing |
22:57:28 | FromDiscord | <slymilano> If anyone starts one hopefully I can learn enough Nim to help |
22:57:37 | disruptek | !repo nimx |
22:57:38 | disbot | https://github.com/yglukhov/nimx -- 9nimx: 11GUI library 15 580โญ 54๐ด 7& 1 more... |
22:57:49 | disruptek | not that one. what is mr. boar's repo called? |
22:57:58 | disruptek | !repo willyboar/ |
22:57:58 | disbot | https://github.com/Willyboar/nimux -- 9nimux: 11WIP Nim MVC Web Framework 15 4โญ 0๐ด |
22:58:03 | disruptek | there you go. |
22:58:10 | FromDiscord | <slymilano> Nice gonna check that out |
22:58:20 | shashlick | there are lots of opportunities but we need to have a zero bug experience |
22:58:20 | FromGitter | <Willyboar> don't do it |
22:58:31 | disruptek | DON'T DO IT |
22:58:32 | FromDiscord | <slymilano> My app is simple af but useful |
22:58:44 | FromDiscord | <slymilano> !repo torrentim |
22:58:45 | disbot | https://github.com/banenen/torrentImdb -- 9torrentImdb: 11Conencts torrent page to IMDB information popup 15 0โญ 0๐ด |
22:58:55 | FromDiscord | <slymilano> No wrong repo |
22:59:02 | FromGitter | <Willyboar> @smyliano it's not completed |
22:59:03 | FromDiscord | <slymilano> Why donโt do it? Is it abandoned? |
22:59:30 | FromGitter | <Willyboar> In fact it's not even started |
22:59:42 | FromDiscord | <slymilano> Oh lol |
22:59:49 | FromDiscord | <slymilano> Letโs start one fuck it |
22:59:58 | FromDiscord | <exelotl> one day I wanna make an open source clone of adobe fireworks |
23:00:26 | FromGitter | <Willyboar> You are welcome to contribute if you want |
23:00:30 | FromDiscord | <slymilano> Imagine a rails like single binary, handle 300,000 req per second on minimal hardware.... Nim on the map |
23:00:41 | FromDiscord | <slymilano> Iโll take a look |
23:01:29 | FromGitter | <Willyboar> But this is my target too. A rails app compile din a single binary |
23:01:33 | FromGitter | <Willyboar> :) |
23:01:38 | FromDiscord | <exelotl> all the image editing software out there is horrible, tailored to a specific purpose or costs 1000 moneys |
23:01:38 | skrylar[m] | you'll still have to gently nudge the gophers once you get there |
23:02:23 | FromDiscord | <slymilano> I want people to care about performance again |
23:02:51 | * | endragor quit (Ping timeout: 268 seconds) |
23:02:52 | FromDiscord | <slymilano> The solution is to give people these tools |
23:02:59 | FromGitter | <Willyboar> The other target is to attract more people to use nim |
23:03:20 | FromDiscord | <slymilano> Hell yeah |
23:03:57 | FromDiscord | <slymilano> Iโm already writing som easy Nim guides to increase ease of use |
23:04:11 | FromDiscord | <slymilano> Thinking about making a YouTube channel as well |
23:04:18 | FromDiscord | <slymilano> Send email with Nim etc etc |
23:04:22 | FromDiscord | <slymilano> Bullshit like that |
23:04:33 | FromGitter | <Willyboar> Nim is great |
23:05:04 | FromGitter | <Willyboar> I build a static blog generator in my second week in nim |
23:05:18 | FromGitter | <Willyboar> and i am not a programmer |
23:05:30 | FromDiscord | <slymilano> Well you kinda are now ๐ |
23:05:54 | FromGitter | <Willyboar> nah i am too old to become one |
23:06:06 | FromGitter | <Willyboar> i just do it for fun |
23:07:58 | FromGitter | <deech> What does this syntax mean? `proc f(`a`,b:string)` |
23:08:15 | FromDiscord | <snluu> is there some way to create a module and import it from nim playground? I'm trying to show repro of an issue that requires importing another module |
23:08:18 | FromGitter | <deech> Sorry, `proc f(``a``,b:string)` |
23:08:34 | skrylar[m] | just means a is quoted for no reason |
23:09:14 | skrylar[m] | there are some reserved words you can still use if you quote it in backticks but you have to do that everywhere it gets referenced |
23:09:19 | FromGitter | <deech> Here for example: https://github.com/nim-lang/Nim/blob/version-1-0/lib/system/nimscript.nim#L224 |
23:09:50 | Araq | from is a keyword, must quote it |
23:09:56 | skrylar[m] | yes, that's to stop the lexer from eating `from` as a keyword |
23:10:01 | FromGitter | <deech> Ah, got it. |
23:11:59 | FromDiscord | <snluu> so the linter has this small bug. if you have a name collision, and need to specify the module name, it will bark and says that the name should be without the prefix (at least it repros when I try to do `var xs: seq[mymodule.MyObjectWithNameCollision]` |
23:13:53 | FromDiscord | <snluu> something like this: https://gist.github.com/snluu/4d5abd441817761bf91797f59bc3edda |
23:17:00 | FromDiscord | <snluu> output: main.nim(9, 21) Hint: 'fileinfo' should be: 'FileInfo' |
23:17:33 | disruptek | oh bother. |
23:17:59 | FromDiscord | <snluu> well, i have --styleCheck:error set |
23:18:07 | leorize | more AST traversing bugs I s'pose :P |
23:18:08 | FromDiscord | <snluu> so the build breaks unless i alias it or something |
23:18:31 | leorize | see posix.nim for how to ignore style in an area :P |
23:18:43 | FromDiscord | <snluu> ๐ฎ |
23:24:18 | FromGitter | <Willyboar> Araq is are you struggling to releasse arc for xmas? |
23:25:00 | FromDiscord | <snluu> I'm just aliasing the module for now. Regardless, reporting it here: https://github.com/nim-lang/Nim/issues/12955 |
23:27:10 | FromDiscord | <Milerius> That's strange i'm setting name of thread from 2 different thread with different name and now they have same name in the logger ๐ค |
23:28:45 | FromGitter | <bung87> maybe just one thread write logs |
23:36:00 | deepend | how do I add a .ico icon to my binary on windows? |
23:36:32 | deepend | looks like koch is linking to the compiled resource file |
23:37:01 | deepend | do I need to use a windows tool to create a resource file or can I do this with nim compiler? |
23:39:21 | * | tobbez quit (Ping timeout: 250 seconds) |
23:40:54 | * | tobbez joined #nim |
23:45:27 | disruptek | shashlick: why is json preferable in #12950? don't you want the fully typed object instead? |
23:45:28 | disbot | https://github.com/nim-lang/Nim/pull/12950 -- 3Add getCompileOptionString() to get Nim config at compile time |
23:52:59 | deepend | rc is only for 32bit? guess rsrc for golang will work.. |
23:53:05 | deepend | don't know what I'm doing but it's working now |
23:53:06 | deepend | ยฏ\_(ใ)_/ยฏ |
23:57:05 | shashlick | disruptek: I would but doubt compiler can give such access |
23:57:49 | shashlick | Only int, float and string data types |
23:58:24 | disruptek | yeah but really? |
23:58:57 | shashlick | ? |