00:27:13 | * | krux02 quit (Remote host closed the connection) |
00:34:36 | FromDiscord | <Avatarfighter> @Gyllou You can always dm him π He responds and doesn't bite π |
00:46:20 | Axiomatic | Are the nim compiler version, and the version of nim, one and the same thing? Or how does it work? |
00:46:59 | Axiomatic | For full marks, do not state your answer in the form of a question. |
00:47:43 | * | leorize quit (Ping timeout: 240 seconds) |
00:48:17 | mipri | 1. you could conveivably ship a compiler of nim with a different stdlib, and this would violate the versions being one in the same, but this doesn't happen, and why would you? |
00:49:05 | mipri | 2. if Nim develops additional compilers then a distinction between language version and compiler version might be introduced, as in C++17 vs. gcc and clang versions |
00:50:41 | mipri | at present there's just Nim 1.0, 1.2, 1.4 |
00:51:01 | Axiomatic | So, at present, nim --version is effectively the right way to retrieve "the" version of nim? |
00:51:29 | mipri | yeah. what else would you be looking for? |
00:52:15 | Axiomatic | I'm new, so it's not a deep question, just a basic howto |
00:53:24 | Axiomatic | In the docs it mentions " Since version 0.8.2..." and I was just checking how to check that value against what I have installed. |
00:54:22 | mipri | ok, that's from the same numbering scheme as nim --version gives you |
00:57:42 | * | mbomba quit (Ping timeout: 260 seconds) |
00:59:51 | FromDiscord | <shujidev> anyone knows why this doesn't work? [[1,4],[5,6]].map(sum) |
01:00:41 | Axiomatic | @mipri tx u |
01:00:41 | FromDiscord | <shujidev> it works when I define a sum that accepts arrays but not with the math module that takes an openArray |
01:01:40 | FromDiscord | <Revenant> sent a code paste, see https://paste.rs/7kq |
01:01:50 | FromDiscord | <Revenant> (edit) |
01:02:10 | FromDiscord | <Revenant> i thought you always need to pass in the symbols like in `doStuff2` |
01:03:11 | FromDiscord | <ElegantBeef> well templates are code subsitution |
01:03:12 | * | TomDotTom quit (Ping timeout: 272 seconds) |
01:03:12 | mipri | what do you mean 'pass in the symbols'? you're only passing numbers in that code |
01:05:05 | * | shu61 joined #nim |
01:05:50 | FromDiscord | <Revenant> symbols, literals, whatever... i meant i wasn't aware it has access to the whole scope |
01:06:04 | FromDiscord | <Revenant> by default |
01:06:34 | FromDiscord | <Revenant> but if it works like that by design, that's cool. wasn't 100% sure if this is intended or maybe a compiler bug |
01:06:59 | FromDiscord | <ElegantBeef> Templates basically just get pasted where you called them |
01:07:51 | * | Tanger joined #nim |
01:08:30 | FromDiscord | <Revenant> cool, understood. thanks man |
01:09:45 | mipri | shujidev: proc map[T, S](s: openArray[T]; op: proc (x: T): S {.closure.}): seq[S] |
01:10:20 | mipri | T is array[0..1, int] here, so sum has to be sum[array[0..1, int]] per the definition of *map* |
01:10:50 | mipri | but sum needs to be sum[int] to sum over an array like that |
01:11:01 | mipri | ... I think that's the problem. |
01:11:07 | FromDiscord | <ElegantBeef> You can get away with using mapit https://play.nim-lang.org/#ix=2C9E |
01:17:09 | shu61 | ok thanks I need to think a little about it |
01:18:09 | shu61 | what I find weird is that I defined sum like proc sum[T](x:openArray[T]):T = x[0]+x[1] and it didn't work |
01:18:28 | shu61 | only when I defined it with an array as input proc sum[I,T](x:array[I,T]):T = x[0]+x[1] |
01:21:04 | mipri | oh yeah. that seems to me to be a bug then |
01:21:07 | shu61 | @ElegantBeef that's excellent I was afraid I had to define all those functions with tuple inputs for the zip return |
01:47:25 | FromDiscord | <MiniApple> what is proc something() {.inline.} |
01:47:28 | FromDiscord | <MiniApple> (edit) "proc" => "`proc" | "{.inline.}" => "{.inline.}`" |
02:08:38 | mipri | same as inline hints in C. because that's what nim does, it just generates the hint and leaves it to C to inline or not |
02:09:32 | mipri | https://nim-lang.org/docs/manual.html mentions it. inlining is described at https://en.wikipedia.org/wiki/Inline_expansion |
02:19:17 | * | apahl quit (Ping timeout: 260 seconds) |
02:19:40 | leorize[m]1 | note that `{.inline.}` hints are the only way to make nim inline a function across module boundaries |
02:20:36 | * | abm quit (Quit: Leaving) |
02:21:07 | * | apahl joined #nim |
02:26:04 | FromDiscord | <nikki> do options from `.nims` or other module-specific options apply from the source module when inlining? |
02:26:22 | disruptek | module-specific options? |
02:26:52 | FromDiscord | <nikki> specifically asking cuz i was told sink inference is on by default in the stdlib, but i found interestingly that it didn't eg. infer the `val` parameter of the `Option[T]` `some` constructor as a sink and i thought maybe it was bc. it was inlined into my module |
02:27:07 | FromDiscord | <nikki> (it would infer it if i did `--sinkInference:on` in my module tho) |
02:27:27 | FromDiscord | <nikki> disruptek: whatever the word is for the mechanism that makes sink inference on in stdlib and not in other ones (if that's a thing) |
02:27:29 | disruptek | that's... interesting. |
02:27:40 | FromDiscord | <nikki> maybe it's similar to the mechanism for module_blah.nims files |
02:28:37 | disruptek | well, we don't process module.nims. we process entry.nims, though. |
02:28:58 | disruptek | and config.nims adjacent and above. |
02:29:48 | FromDiscord | <nikki> ah got it |
02:29:49 | disruptek | leorize[m]1: inference is off by default in stdlib? or is it on by default? i can't remember. |
02:30:19 | * | rockcavera quit (Remote host closed the connection) |
02:30:23 | leorize[m]1 | on for stdlib, off elsewhere |
02:30:26 | FromDiscord | <nikki> it was, in any case, cool to see the behavior with and without inference. i know it could be better but the nim gen'd C code is alfeady so great |
02:30:27 | disruptek | i honestly haven't paid close attention during this 1.4 release. |
02:30:33 | FromDiscord | <nikki> so much better than reading llvm IR or asm lol |
02:30:47 | disruptek | you should try this: |
02:30:50 | disruptek | !pull mangling |
02:30:52 | disbot | https://github.com/nim-lang/Nim/pull/14632 -- 3porting name mangling from ic effort 7& 20 more... |
02:30:55 | disruptek | you'll like it. |
02:31:11 | FromDiscord | <nikki> haha seen that. i'll try it if/when i get around to building the repo and not using choosenim (sorry) |
02:31:15 | FromDiscord | <nikki> i do have a repo checkout just to browse it tho |
02:31:36 | disruptek | what's the point of that? |
02:31:38 | FromDiscord | <nikki> actually........ i wanna try it more now |
02:31:47 | FromDiscord | <nikki> point of which part? |
02:31:53 | leorize[m]1 | disruptek let me know when you got the mangling rule set pinned so I can make a demangler for it |
02:32:02 | disruptek | leorize[m]1: ffs no. |
02:32:20 | FromDiscord | <nikki> choosenim: it was just easy and on the homepage and i was new to nim. repo checkout: bc. nim's own source code is p instructive and i can use my lsp stuff to browse it |
02:32:31 | disruptek | anyway, it seems we're doing the front-end ic first, and believe me, that's a good thing. |
02:32:42 | leorize[m]1 | i want a demangler :p what's the point of nice names when I can't use it with my debugger |
02:32:58 | disruptek | use ndi. |
02:32:59 | FromDiscord | <nikki> the compilation flags work out with my c/c++ lsp so i can jump around the nim-generated C with goto def too which is a big win |
02:33:56 | disruptek | you're mad. |
02:34:38 | FromDiscord | <shashlick> @disruptek: I'm debugging that nimterop issue affecting golden |
02:34:58 | disruptek | i can't remember why nimterop has something to do with it. |
02:35:07 | disruptek | wasn't it a nimble reqs buglet? |
02:35:18 | FromDiscord | <shashlick> basically nimterop is hard-coding the location of the dynamic lib |
02:35:49 | FromDiscord | <shashlick> and nimble builds it in temp so the path doesn't exist on install |
02:35:49 | disruptek | i thought it located the libs in the project directory. |
02:35:56 | disruptek | oh, that makes sense. |
02:36:09 | FromDiscord | <shashlick> i can make it a relative path but that would require a nimterop update for you |
02:36:40 | disruptek | well, if you fix it i'll meet you halfway for the sake of the user. |
02:36:48 | disruptek | i can't believe anyone is using golden, though. |
02:36:55 | disruptek | it's a half-implemented concept. |
02:37:13 | disruptek | and most of that needs reimpl using new gittyup and frosty and gram. |
02:39:19 | FromDiscord | <shashlick> okay so i looked at nimph and it has a line to compile toast, we could add one for loaf |
02:39:38 | disruptek | should we just look for loaf.nim? |
02:40:01 | FromDiscord | <shashlick> is that the only nimterop issue blocking you at this time? |
02:40:15 | disruptek | nimterop is only blocking the user. |
02:40:47 | disruptek | but did you manage to build golden manually? |
02:40:52 | disruptek | iirc, i tried and i couldn't. |
02:42:22 | FromDiscord | <shashlick> i'm still testing my fix |
02:44:02 | disruptek | hmm, so maybe something else is broken. |
02:50:17 | FromDiscord | <PizzaFox> i rewrote the JS that runs on documentation pages |
02:50:23 | FromDiscord | <PizzaFox> how do i PR this |
02:51:44 | shu61 | hi, do you know if it is possible to escape a `{` symbol within a & string? |
02:53:45 | FromDiscord | <shashlick> @disruptek: i'm not able to test this since both gittyup and golden have <= requires statements so my debug version of nimterop doesn't get picked |
02:54:32 | mipri | shu61: {{ |
02:55:07 | shu61 | I see thanks, couldnt find it anywhere |
02:55:56 | mipri | it's demonstrated under Implementation details in https://nim-lang.org/docs/strformat.html |
02:56:37 | mipri | but, I think this is *the* problem with Nim docs, that they rely heavily on the reader already knowing what's being documented |
02:56:47 | disruptek | shashlick: what does that have to do with it? you can manipulate the .nimble files in those packages locally, no? |
02:57:06 | FromDiscord | <shashlick> i did, and then moved the files around, so i think the fix works |
02:57:14 | disruptek | ah, nice! |
02:57:28 | shu61 | yes one has to memorize it at sight |
02:58:23 | disruptek | i just wrote some ic code against io when i wanted to write it against streams. i don't worry too much about memorizing stuff and it doesn't bite me too often. |
02:58:57 | disruptek | find someone that writes comments and then read their code. |
02:59:09 | disruptek | pmunch would be a good one; he seems to write comments. |
02:59:18 | disruptek | i write comments. shashlick has been known to write a comment or two. |
03:00:42 | shu61 | i will do thanks |
03:00:52 | disruptek | !repo bump |
03:00:53 | disbot | https://github.com/disruptek/bump -- 9bump: 11a tiny tool to bump nimble versions π» 15 17β 2π΄ 7& 1 more... |
03:01:04 | disruptek | it's a little thing i made shashlick and i documented the shit outta it. |
03:02:42 | Axiomatic | n00b question: given that VSCode is the recommended(?) IDE on Windows, is there consensus for Nim for what to use as a Linux IDE? |
03:03:00 | disruptek | most of us use nvim, but vscode runs on linux, too. |
03:03:18 | disruptek | doesn't it? |
03:03:34 | disruptek | seems like it does. |
03:03:47 | Axiomatic | nvim you say.. that's in package neovim? |
03:03:52 | disruptek | yep. |
03:04:01 | disruptek | !repo alaviss/nim.nvim |
03:04:02 | disbot | https://github.com/alaviss/nim.nvim -- 9nim.nvim: 11Nim plugin for NeoVim 15 104β 12π΄ |
03:04:03 | FromDiscord | <ElegantBeef> Yea vscode runs on linux |
03:04:09 | FromDiscord | <ElegantBeef> It's electron afterall |
03:04:13 | FromDiscord | <shashlick> okay it doesn't work - i am hoping nim doesn't change a relative dynlib path into absolute but it might be doing that |
03:04:24 | FromDiscord | <ElegantBeef> I should setup nvim again |
03:04:29 | disruptek | -d:debugDlOpen or whatever? |
03:06:36 | disruptek | shashlick: don't we need an absolute path in the binary? |
03:06:48 | Axiomatic | VSCode on Linux eh? Let's put that on the maybe pile. And the NimEdit thing is old/deprecated/vapourware, yes? |
03:06:58 | disruptek | yes. |
03:07:06 | Axiomatic | A'ight |
03:07:27 | disruptek | emacs is an option but it has fewer users. some heavy hitters do use it, though. |
03:07:34 | Axiomatic | With no Borland Turbo Nim to be found, there's also not a NimCharm, eh? |
03:07:51 | disruptek | luckily not. |
03:07:55 | Axiomatic | I don't pretend to be worthy to worship at the temple of emacs. |
03:08:00 | FromDiscord | <shashlick> @disruptek: why not a relative path - it is loaded by the binary at runtime on load |
03:08:24 | mipri | https://github.com/fox0430/moe is already pretty capable |
03:08:33 | disruptek | shashlick: well, then you can't move the binary, right? |
03:09:04 | disruptek | shashlick: oh if the libs are adjacent to the binary then that sounds fine to me. |
03:09:13 | FromDiscord | <shashlick> ya that's the case i'm modifying |
03:09:23 | disruptek | aha, makes sense, then. |
03:09:43 | * | mbomba joined #nim |
03:10:41 | FromDiscord | <PizzaFox> can someone smart at nimdoc internals help with https://github.com/nim-lang/Nim/pull/15744 |
03:10:42 | disbot | β₯ refactor(nimdoc): rewrite docs JS in Nim |
03:21:23 | * | muffindrake quit (Ping timeout: 260 seconds) |
03:23:26 | * | muffindrake joined #nim |
04:03:54 | ForumUpdaterBot | New post on r/nim by MrCordigle: Immutable variable assignments and proc declarations, see https://www.reddit.com/r/nim/comments/jiuali/immutable_variable_assignments_and_proc/ |
04:06:01 | * | supakeen quit (Quit: WeeChat 2.9) |
04:06:45 | * | supakeen joined #nim |
04:17:09 | FromDiscord | <cabboose> Hey, is the docs for nim-lang.org overlapped by the navigation side bar or is that just me? |
04:17:43 | FromDiscord | <cabboose> https://media.discordapp.net/attachments/371759389889003532/770501452945817620/Capture.PNG |
04:18:00 | FromDiscord | <Avatarfighter> Its a bug that is fixed upstream I believe |
04:28:52 | leorize[m]1 | partially fixed, yes |
04:29:31 | * | disruptek shakes his fist at the docs. |
04:29:35 | disruptek | never again. |
04:41:29 | * | bunbunbunbunny joined #nim |
04:46:48 | * | shu61 quit (Remote host closed the connection) |
04:57:42 | * | bunbunbunbunny quit (Quit: Lost terminal) |
05:08:53 | * | mbomba quit (Quit: WeeChat 2.9) |
05:49:06 | * | mbomba joined #nim |
05:52:25 | * | mbomba quit (Quit: WeeChat 2.9) |
05:57:50 | * | narimiran joined #nim |
06:32:23 | * | solitudesf- joined #nim |
06:38:03 | * | narimiran quit (Ping timeout: 256 seconds) |
06:46:31 | FromGitter | <jrfondren> ah I see, it becomes much easier to use view types when the {.experimental.} is turned on |
06:46:54 | FromGitter | <jrfondren> ... that's obvious, but it's funny to me how much my code just reverted to the first thing I'd tried, which now actually works. |
06:47:43 | * | narimiran joined #nim |
06:48:22 | leorize[m]1 | nim is very intuitive, as long as the compiler support the feature you're trying to use :p |
07:04:10 | * | BarrOff joined #nim |
07:09:45 | * | mmohammadi9812 quit (Ping timeout: 240 seconds) |
07:10:10 | * | mmohammadi9812 joined #nim |
07:29:10 | FromDiscord | <Recruit_main707> are cpp vectors the same as nim seqs internally? |
07:29:37 | FromDiscord | <Recruit_main707> can you cast one to the other? |
07:35:30 | * | Tlangir joined #nim |
07:37:28 | * | oculux joined #nim |
07:38:39 | * | Tanger quit (Ping timeout: 260 seconds) |
07:38:46 | FromGitter | <jrfondren> I'm pretty sure they aren't, since they're written in Nim and not with an FFI to C++ |
07:39:03 | * | oculuxe quit (Ping timeout: 260 seconds) |
07:45:03 | FromDiscord | <nikki> yeah they def aren't π
you can have an openArray pointing to the memory in an std::vector though. for a c++ view of nim data you could maybe use std::span |
07:45:47 | FromDiscord | <Recruit_main707> id need some kind of conversion functions for:β΅ cpp vector <-> nim seq |
07:55:56 | * | BarrOff quit (Ping timeout: 265 seconds) |
07:56:03 | * | mmohammadi9812 quit (Ping timeout: 258 seconds) |
07:56:29 | * | mmohammadi9812 joined #nim |
08:02:36 | FromDiscord | <mratsim> @Gyllou better ask in #science too hard to deal with all notifications |
08:13:21 | * | xet7 quit (Quit: Leaving) |
08:15:12 | * | xet7 joined #nim |
08:37:22 | FromDiscord | <Varriount> @PizzaFox Commented on your PR. Nice work so far! |
08:39:12 | FromDiscord | <Varriount> sent a code paste, see https://play.nim-lang.org/#ix=2CaY |
08:43:33 | FromDiscord | <Recruit_main707> i only get the sequence of bytes, so id rather skip the creation of a vector and then iterating over it and copying into a seq |
08:48:44 | FromDiscord | <Varriount> sent a code paste, see https://play.nim-lang.org/#ix=2Cb1 |
08:49:01 | PMunch | Damn it, left my IRC client on again.. alehander92, sweet! And Zevv, npeg is working out fantastically! |
08:49:48 | PMunch | I would like a way to get which rule did the maxParsed value though, so it would be possible to guess at an error message |
08:50:06 | FromDiscord | <Varriount> PMunch: The rule can emit an error |
08:51:00 | PMunch | Yeah, but won't that just always trigger an error? |
08:51:31 | FromDiscord | <Varriount> Not if you put it behind an alternation |
08:52:07 | FromDiscord | <Varriount> sent a code paste, see https://play.nim-lang.org/#ix= |
08:53:00 | FromDiscord | <Varriount> One moment, let get a proper example |
08:53:05 | * | hnOsmium0001 quit (Quit: Connection closed for inactivity) |
08:54:39 | FromDiscord | <Varriount> sent a long message, see http://ix.io/2Cb3 |
08:56:17 | PMunch | True, but then you need to create all those cases |
08:57:28 | FromDiscord | <Varriount> PMunch: You can only reduce things so much |
09:00:05 | * | brainbomb[m] quit (Quit: Idle for 30+ days) |
09:05:59 | * | hoijui joined #nim |
09:10:57 | * | krux02 joined #nim |
09:12:15 | FromDiscord | <mu_studio> hey |
09:15:45 | PMunch | Hello |
09:19:51 | * | mwbrown quit (Ping timeout: 260 seconds) |
09:24:03 | * | Tlangir quit (Remote host closed the connection) |
09:27:00 | * | mwbrown joined #nim |
09:30:37 | Zevv | PMunch: hm interesting, how would you want to get the "which rule" part, just the name of the rule? |
09:31:22 | * | mwbrown quit (Ping timeout: 246 seconds) |
09:34:26 | * | mwbrown joined #nim |
09:35:37 | PMunch | That's what I was thinking, but I'm not sure if that would really help all that much |
09:40:16 | Zevv | You know about the "E" pattern, right? |
09:41:29 | Zevv | the problem with your idea is that it's not just in any rule, it has kind of an active call stack |
09:41:42 | Zevv | and it can not know which level of that you are interested in |
09:48:24 | * | mbomba joined #nim |
09:59:05 | * | hoijui quit (Quit: Leaving) |
10:04:56 | * | sealmove joined #nim |
10:20:01 | PMunch | Zevv, hmm that's true |
10:20:19 | PMunch | I guess adding the E patterns to my parser is the best bet |
10:22:57 | sealmove | Guys nimitai is going well :) I think it will be ready to use (with json until we fix nimyaml) before the end of this awesome *cough* year. |
10:23:39 | planetis[m] | congrats sealmove :) |
10:24:11 | sealmove | yeah finally after 1 year... |
10:24:29 | sealmove | of not being able to get the design right |
10:25:52 | * | solitudesf joined #nim |
10:26:12 | planetis[m] | I know that feeling first hand, lol |
10:27:07 | PMunch | nimitai? |
10:27:08 | sealmove | planetis what have you been up to during these busy times? oh also I saw the greek channel on discord. |
10:27:30 | sealmove | PMunch: https://github.com/sealmove/nimitai |
10:27:47 | supakeen | Neat :) |
10:27:49 | * | solitudesf- quit (Ping timeout: 264 seconds) |
10:28:28 | planetis[m] | I had no idea there is a greek channel, I don't have discord |
10:29:23 | sealmove | ah oh, it's not active at all anyways. just thought it's cool they made it. |
10:29:49 | PMunch | sealmove, oh cool |
10:34:18 | planetis[m] | a bit of everything, farming in August, (missed my exams ffs), now remote lessons, and in my freetime i coded https://github.com/planetis-m/breakout-ecs |
10:37:45 | planetis[m] | you? |
10:44:17 | * | abm joined #nim |
10:45:22 | sealmove | sdl cool! similar. I moved back to Athens (was studying in Tripoli). Still have 1 year of studies so I am also attending remote lessons. |
10:53:51 | sealmove | btw breakout was my first game ever in gameboy color :D |
11:09:20 | * | leorize joined #nim |
11:09:23 | * | mbomba quit (Quit: WeeChat 2.9) |
11:23:40 | * | TomDotTom joined #nim |
11:25:06 | * | lritter joined #nim |
11:25:42 | FromDiscord | <Yardanico> so, about https://github.com/nim-lang/Nim/pull/15747 - do we prefer british or american english in docs? |
11:25:42 | disbot | β₯ Massive documentation fixes + copy editing |
11:25:51 | FromDiscord | <Yardanico> because that PR changes some correct british english spellings into american english ones |
11:26:02 | FromDiscord | <Yardanico> like "afterwards" -> "afterward", "initialisation" -> "initialization" |
11:26:33 | supakeen | I don't feel it matters much. |
11:26:55 | supakeen | But since the entire PR is minor fixes maybe it's a thing in this case. |
11:27:38 | mipri | it's not fixing anything though in these cases. |
11:29:31 | ForumUpdaterBot | New thread by KnorrFG: Mysterious crashed with SIGSEGV, see https://forum.nim-lang.org/t/6990 |
11:30:09 | mipri | an example of a pass that would change such things, is one to make a document more consistent. initialisation is fine; initialization in one paragraph and then initailisation the next isn't as fine. |
11:30:57 | FromDiscord | <Yardanico> yes, that's true |
11:31:15 | mipri | but if the PR is just running down an automatic grammar checker and making complaints go away--forget it. You'll just get that exact same kind of inconstency when the source of the 'corrected' spelling comes back to add more to the document |
11:32:10 | FromDiscord | <Idefau> use Australian english |
11:32:13 | FromDiscord | <Yardanico> mate |
11:32:25 | FromDiscord | <Idefau> Hungry Jack's |
11:42:05 | FromDiscord | <Yardanico> !last narimiran |
11:42:05 | disbot | narimiran joined 12#nim 4 hours ago and last spoke 724 hours ago https://irclogs.nim-lang.org/26-10-2020.html#11:21:51 |
11:42:32 | FromDiscord | <Yardanico> narimiran: what do you think about https://github.com/nim-lang/Nim/pull/15747 ? I mean the change of british spellings to american spellings |
11:42:33 | disbot | β₯ Massive documentation fixes + copy editing |
11:48:03 | narimiran | i personally more like british spelling (when writing my own stuff), but in the end i probably use a mix of both because i'm not careful/knowledgeable enough. as for the official nim documents - i'm not sure what is preferred |
11:48:39 | FromDiscord | <Yardanico> need to ask Araq then? :) |
11:49:35 | narimiran | he has more important stuff on his plate ;) |
11:52:19 | mipri | https://github.com/nim-lang/Nim/blame/devel/doc/backends.rst |
11:52:53 | mipri | initialize with a z is already there two times, and both from Araq looks like, so new text that's added to the document would also have the z |
11:53:10 | mipri | so the Americanization both makes the document more consistent with itself and more consistent with likely additions |
11:53:25 | mipri | the initialise with an 's' was someone else |
11:57:23 | * | rockcavera joined #nim |
11:59:58 | TomDotTom | wrt British vs. Murcian spellings, I've found it's best to follow a single style as outlined by the project. It's much more common to use US English. |
12:00:54 | TomDotTom | Nim docs appear to use Murican English. |
12:01:39 | * | BarrOff joined #nim |
12:05:04 | narimiran | ok, i'm convinced :) |
12:06:01 | * | supakeen quit (Quit: WeeChat 2.9) |
12:06:37 | * | supakeen joined #nim |
12:10:36 | * | NimBot joined #nim |
12:14:19 | TomDotTom | As a Brit it always hurts a little to omit the 'u' from colour :( |
12:14:47 | narimiran | as a non-brit, same here |
12:14:53 | narimiran | and neighbour too |
12:15:21 | FromDiscord | <Yardanico> @TomDotTom I like colour too :) |
12:15:31 | FromDiscord | <Yardanico> and neighbour, initialisation, afterwards, etc |
12:15:52 | PMunch | Wait, how do they spell afterwards? |
12:15:57 | FromDiscord | <Yardanico> afterward |
12:15:59 | FromDiscord | <Yardanico> :D |
12:16:26 | TomDotTom | How does everyone feel about 'Maths' |
12:16:37 | TomDotTom | Drives my murican wife up the wall :D |
12:16:40 | FromDiscord | <Yardanico> Seems like my ForumUpdaterBot stopped crashing after I added the missing .close() statements :) |
12:16:44 | FromDiscord | <Yardanico> !last ForumUpdaterBot |
12:16:45 | disbot | ForumUpdaterBot spoke in 12#nim-news 66 seconds ago |
12:16:50 | FromDiscord | <Yardanico> what about uptime |
12:17:30 | FromDiscord | <Yardanico> (it was crashing because it hit the max open files limit - I wasn't closing AsyncHttpClient instances) |
12:18:59 | Yardanico | !status |
12:19:01 | FromDiscord | Uptime - 6 days, 16 hours, and 42 minutes |
12:19:07 | Yardanico | nice, almost a week for the bridge |
12:19:57 | FromDiscord | <Rika> afterwards has no s in american english?! |
12:20:00 | FromDiscord | <Yardanico> no |
12:20:09 | FromDiscord | <Rika> but y tho |
12:20:25 | FromDiscord | <Yardanico> well afterwards is used too, but afterward is more common |
12:20:31 | FromDiscord | <Yardanico> @Rika just american vs british english things |
12:20:31 | FromDiscord | <Yardanico> https://dictionary.cambridge.org/dictionary/essential-american-english/afterward |
12:20:37 | FromDiscord | <Yardanico> https://github.com/nim-lang/website/pull/241 |
12:20:38 | disbot | β₯ versions 1.2.8 and 1.0.10 released |
12:22:44 | FromGitter | <jrfondren> procCall is a little bit tricky: https://play.nim-lang.org/#ix=2CbZ |
12:23:53 | PMunch | I vote for writing all the docs in british english |
12:24:13 | FromGitter | <jrfondren> oh .procCall works, and that looks nicest anyway |
12:24:21 | PMunch | I tend to name my variable colour for example, but all the procedures and stuff is always color.. |
12:24:26 | PMunch | Makes the code look really weird |
12:24:55 | FromGitter | <jrfondren> {.experimental: "dialectInsensitivity".} |
12:25:01 | narimiran | :D |
12:25:13 | leorize[m]1 | https://forum.nim-lang.org/c/3 <- we have the Docs category on the forum |
12:25:17 | FromDiscord | <Yardanico> @PMunch I vote for it too :) |
12:25:28 | FromDiscord | <Yardanico> @leorize good idea |
12:25:53 | PMunch | Good thing you mentioned that about newAsyncHttpClient, had a look at my own code and I had forgotten it as well :) |
12:26:10 | FromDiscord | <Yardanico> haha |
12:26:22 | FromDiscord | <Yardanico> yeah I was really ashamed when I realised the cause |
12:27:34 | FromGitter | <gogolxdong> Is there a handy way to find index of some element? |
12:28:16 | FromDiscord | <Yardanico> .find |
12:28:52 | FromDiscord | <Yardanico> https://nim-lang.org/docs/system.html#find%2CT%2CS |
12:29:39 | ForumUpdaterBot | New thread by Miran: Nim 1.2.8 and 1.0.10 are released, see https://forum.nim-lang.org/t/6992 |
12:29:47 | Yardanico | leorize[m]1: https://forum.nim-lang.org/t/6991 |
12:29:51 | Yardanico | I made a thread to vote about it |
12:29:51 | narimiran | thanks, bot! |
12:29:58 | Yardanico | narimiran: :P |
12:31:19 | Yardanico | poor man's poll |
12:31:42 | narimiran | Yardanico: where is "it doesn't matter" option? :P |
12:32:07 | Yardanico | done |
12:32:08 | leorize[m]1 | you signify that by not voting :P |
12:32:21 | narimiran | leorize[m]1: *voting for both |
12:32:22 | FromGitter | <gogolxdong> for seq or array? |
12:32:31 | Yardanico | @gogolxdong it'll work for both |
12:32:39 | Yardanico | it'll in fact work for any types that have items and == defined |
12:35:05 | * | luis_ joined #nim |
12:43:12 | FromGitter | <gogolxdong> found find in system.nim, thanks! |
12:48:15 | * | luis_ quit (Quit: luis_) |
12:58:53 | * | WilhelmVonWeiner quit (Ping timeout: 258 seconds) |
13:05:37 | * | dadadani joined #nim |
13:39:50 | ForumUpdaterBot | New thread by Wilypomegranate: Equivalent stdlib data structure to std::map, see https://forum.nim-lang.org/t/6993 |
13:49:57 | PMunch | I there any way to fix this? https://github.com/Dualog/Dualog.Insights.git |
13:50:00 | PMunch | https://github.com/nim-lang/Nim/pull/15729/checks?check_run_id=1308768715 |
13:50:01 | disbot | β₯ Implements streams for sockets |
13:50:10 | PMunch | Woops, that was an entirely wrong URL :P |
13:50:25 | PMunch | The second one is correct though |
13:50:51 | Yardanico | try to add nimcall pragma to your stream procs? |
13:54:21 | PMunch | Nope, didn't help |
13:54:22 | * | TomDotTom quit (Read error: Connection reset by peer) |
13:54:26 | PMunch | I mean they should already be nimcall.. |
13:54:53 | PMunch | lib/pure/socketstreams.nim(146, 22) Error: type mismatch: got <proc (s: Stream){.nimcall, gcsafe, locks: <unknown>.}> but expected 'proc (s: Stream){.nimcall, gcsafe.}' .tag effects differ |
13:54:56 | PMunch | Now I just get that |
13:57:50 | FromDiscord | <Rika> well its in the end of the error |
13:59:49 | Yardanico | nah |
13:59:56 | Yardanico | it's the whole error in that case :) |
14:00:22 | Yardanico | @Rika https://github.com/nim-lang/Nim/pull/15729/checks?check_run_id=1308768715#step:13:3325 |
14:00:23 | disbot | β₯ Implements streams for sockets |
14:04:56 | PMunch | socket.close can apparently have RootEffect, which isn't listed in stream.close |
14:06:44 | * | TomDotTom joined #nim |
14:12:28 | * | BarrOff quit (Ping timeout: 260 seconds) |
14:32:50 | FromDiscord | <lqdev> can someone explain to me, what's the point in having a binary tree table (or std::map)? |
14:32:58 | FromDiscord | <lqdev> hash tables seem much superioe |
14:33:00 | FromDiscord | <lqdev> (edit) "superioe" => "superio" |
14:33:02 | FromDiscord | <lqdev> (edit) "superio" => "superior" |
14:33:14 | Zevv | supermario |
14:33:25 | FromDiscord | <lqdev> i had a stroke there |
14:33:42 | Zevv | I don't realle get your question, tho |
14:33:58 | ForumUpdaterBot | New thread by Enthus1ast: How to handle non ordinal enums (enum with holes), see https://forum.nim-lang.org/t/6994 |
14:34:39 | FromDiscord | <lqdev> Zevv: what's the point of btreetables if regular tables are better. |
14:35:03 | Zevv | in general, or in nim? |
14:35:06 | Zevv | and how are they 'better' |
14:35:10 | Zevv | they are different |
14:35:32 | FromDiscord | <lqdev> yeah, but tables have better lookup performance being O(1) |
14:35:59 | FromDiscord | <lqdev> iirc btreetables have O(log n) but i don't remember |
14:36:19 | FromDiscord | <Rika> but look up performance isnt everything innit |
14:36:22 | Zevv | hash tables need to handel collisions |
14:36:34 | Zevv | either by popping to the next bin or putting a list under every bin |
14:37:21 | Zevv | there's probably tons of 'vs' lists on the internets. It's apples and oranges |
14:37:28 | Zevv | but for "general purpose" hashes should usually be fine |
14:37:49 | FromDiscord | <lqdev> ok, so when do i use btreetables? |
14:38:05 | Zevv | ordering. |
14:38:57 | * | Kaivo quit (Ping timeout: 260 seconds) |
14:40:54 | Zevv | hash tables also generally have more overhead as they should keep emtpy slots for insertions. OTOH they usually are more cache friendly |
14:40:56 | * | Kaivo joined #nim |
14:44:42 | FromGitter | <jrfondren> you might also prefer trees as you want to make reliably good use of space while potentially having a huge amount of data. That's where you see them, in on-disk databases and stuff like rbldnd's ipv6 trie |
14:46:40 | FromGitter | <jrfondren> I'm working on a maxmind db reader now and their datasets come as a tree in a blob. Not a huge one, only megabytes for GeoLite2-Country.mmdb, but that'd be a lot larger if instead of cidr keys you had one IP per bucket |
14:47:09 | FromGitter | <jrfondren> and that's another advantage of trees: they can be clever with how keys are looked up, vs. hash tables which have more constraints |
14:49:02 | FromGitter | <jrfondren> if you want a rule, use arrays and hash tables until you can't anymore :p |
14:51:39 | FromDiscord | <lqdev> anyone has good resources on writing indentation-based parsers? i've been struggling to create one lately but can't figure out how to handle newlines properly |
14:52:01 | ForumUpdaterBot | New thread by Psirus: Compile-time if and/or syntax conflicts, see https://forum.nim-lang.org/t/6995 |
14:58:45 | Yardanico | 7000th forum thread soon! |
15:01:09 | Yardanico | @lqdev btw I beat you because that thread was moderated and I approved the user myself :P |
15:02:06 | FromDiscord | <lqdev> burn rubber |
15:04:38 | * | rokups joined #nim |
15:13:42 | * | Kaivo quit (Quit: WeeChat 2.9) |
15:14:47 | * | Kaivo joined #nim |
15:50:06 | * | hnOsmium0001 joined #nim |
15:59:11 | * | liblq-dev joined #nim |
15:59:16 | * | liblq-dev quit (Client Quit) |
15:59:24 | * | liblq-dev joined #nim |
15:59:40 | * | liblq-dev quit (Client Quit) |
16:07:55 | disruptek | hearts and minds, people; hearts and minds! |
16:13:32 | FromDiscord | <shashlick> @disruptek - this nimterop fix is not working - if i put a relative path in, the executable uses current directory as the base instead of its own location |
16:14:33 | FromDiscord | <shashlick> considering {.dynlib.} is handled by the compiler, i might need to change the nim code |
16:29:36 | * | dadadani quit (Remote host closed the connection) |
16:33:06 | FromDiscord | <g5becks> Hi, I am new to Nim |
16:33:07 | disruptek | it sounds like a nim bug to me. |
16:33:19 | disruptek | shashlick: if you build it, i will thumb it. |
16:33:20 | FromDiscord | <g5becks> primarly use Typescript and Go |
16:33:29 | FromDiscord | <Rika> welcome |
16:34:04 | FromDiscord | <g5becks> Can anyone tell me what the equivalent of typescript 'any' or Go 'interface{}' is in Nim |
16:34:18 | FromDiscord | <g5becks> @Rika glad to be here |
16:34:34 | FromDiscord | <g5becks> I looked around |
16:34:35 | FromDiscord | <Rika> i do not know what either is |
16:34:48 | FromDiscord | <g5becks> Could'nt seem to find it. |
16:35:11 | disruptek | describe `any`. |
16:35:25 | disruptek | or just paste 3-5 lines that demo it. |
16:35:25 | FromDiscord | <g5becks> Basically, its type that allows any type to be used. Basically. disables type checking for a param |
16:35:29 | FromDiscord | <g5becks> or variable |
16:35:35 | FromDiscord | <g5becks> In C# |
16:35:38 | FromDiscord | <Rika> use a generic type |
16:35:44 | FromDiscord | <g5becks> the type would be dynamic |
16:36:24 | disruptek | we have auto, but it has extremely few uses that aren't code smell. |
16:36:40 | FromDiscord | <g5becks> Yea |
16:36:42 | disruptek | use a generic. |
16:36:49 | FromDiscord | <Rika> auto isnt dynamic either, vars must still be the same type across its life |
16:36:51 | FromDiscord | <g5becks> it's a code smell in TS and Go as well |
16:37:08 | FromDiscord | <g5becks> but I am attempting to write a go generator |
16:37:15 | FromDiscord | <g5becks> code |
16:37:32 | FromDiscord | <g5becks> I want to transform some typescript code to nim |
16:37:41 | FromDiscord | <g5becks> I need a 1 to 1 mapping of this type |
16:38:04 | FromDiscord | <Rika> then prolly auto |
16:39:10 | FromDiscord | <g5becks> @Rika thanks |
16:39:13 | FromDiscord | <g5becks> Actually |
16:39:17 | FromDiscord | <g5becks> just found it |
16:39:22 | FromDiscord | <Rika> `any`? |
16:39:27 | FromDiscord | <g5becks> Nim has an any type |
16:39:35 | FromDiscord | <Rika> i dont remember the difference between `any` and `auto` |
16:39:42 | FromDiscord | <g5becks> https://nim-lang.org/docs/system.html#any |
16:40:22 | FromDiscord | <lqdev> `any` makes your proc implicitly generic |
16:42:24 | FromDiscord | <g5becks> That makes sense. |
16:42:32 | FromDiscord | <g5becks> It's my first day coding nim |
16:43:14 | FromDiscord | <g5becks> So I think Ill be doing lots of digging |
16:43:20 | FromDiscord | <g5becks> thanks again |
16:43:49 | FromDiscord | <Rika> hey no one understands a whole damn programming language in a day |
16:44:05 | FromDiscord | <Rika> unless youre dis.rup.tek or something maybe |
16:44:09 | FromDiscord | <Recruit_main707> and nim is complex |
16:45:12 | FromDiscord | <g5becks> Yea, but I am surprised by how much the semantics of the language map directly to typescript code |
16:45:25 | FromDiscord | <g5becks> as far as the type system is concerned anyway |
16:46:02 | FromDiscord | <g5becks> It seem very flexible |
16:46:09 | FromDiscord | <Recruit_main707> it is indeed |
16:46:58 | FromDiscord | <Recruit_main707> probably even more thantypescript |
16:47:43 | FromDiscord | <g5becks> From my first impression. I would say that might be true due to the meta programming abilities |
16:48:06 | FromDiscord | <g5becks> Nim is probably the only language that can make the claim |
16:48:20 | FromDiscord | <g5becks> As far as statically typed languages go |
16:55:13 | Zevv | Rika: I claim that a language lik Go is totally understandable in a day |
16:55:20 | Zevv | Nim, not so |
16:56:51 | FromDiscord | <Recruit_main707> @g5becks metaprogramming doesnt allow you to change the syntax, its just very exploitable on purpose, (even 99% of python can be parsed as nim code) |
16:56:58 | Zevv | and disruptek is probably not particulary smart, he's just *extremely* prolific. That will bring you a loooong way |
16:57:14 | FromDiscord | <Recruit_main707> `Macros cannot change Nim's syntax because there is no need for it β the syntax is flexible enough.` |
16:57:25 | FromDiscord | <Rika> rip pinged someone named nim |
16:57:59 | Avatarfighter[m] | Hello hello everyone π |
16:58:12 | FromDiscord | <Rika> who are you |
16:58:18 | FromDiscord | <Rika> never met this man in my life |
16:58:35 | FromDiscord | <Rika> > and disruptek is probably not particulary smart, he's just extremely prolific. That will bring you a loooong wayβ΅i was joing |
16:58:37 | FromDiscord | <Rika> joking |
16:58:44 | FromDiscord | <MiniApple> hmm |
16:58:50 | FromDiscord | <MiniApple> hello hello hello hello hello hello |
16:59:18 | FromDiscord | <g5becks> @Recruit_main707 Are you familiar with typescript? |
16:59:40 | FromDiscord | <Recruit_main707> not really |
16:59:48 | FromDiscord | <g5becks> I was referring to the metaprogramming because there is no language that would be abel to do the things typescript does |
16:59:54 | FromDiscord | <g5becks> without meta programming |
17:00:14 | FromDiscord | <g5becks> It has a lot of the same features as nim |
17:00:33 | FromDiscord | <g5becks> except its not done via macros |
17:00:43 | FromDiscord | <g5becks> well, at least not user defined |
17:03:42 | FromDiscord | <William_CTO> What is the nim-lang.org site written in? |
17:03:50 | narimiran | english |
17:04:14 | FromDiscord | <William_CTO> Ask a silly question, get a silly answer π |
17:06:08 | FromDiscord | <William_CTO> jekyll is the answer I was looking for |
17:06:17 | narimiran | :) |
17:10:21 | FromDiscord | <William_CTO> Going repost this from #webdev to get some more opinions :)β΅In your opinion, what's the best module/framework for a web server. All it will be doing is allowing users to login with discord then once logged in, redirect them to another site that uses jwt for authentication |
17:11:13 | FromDiscord | <martinium> when working with futures in async code are we able to use generics as an expected value type for a future? |
17:11:32 | FromDiscord | <martinium> or does it have to have an explicit declared type each time |
17:11:52 | FromDiscord | <lqdev> you can use generics just fine with futures |
17:12:45 | FromDiscord | <martinium> Futures[T] would work in a proc just fine as Futures[JsonNode] |
17:13:05 | FromDiscord | <martinium> That would save me a ton of time |
17:13:38 | FromDiscord | <lqdev> `proc thing[T](fut: Future[T]) = discard` |
17:13:51 | FromDiscord | <lqdev> or `thing[T](): Future[T] = discard` |
17:14:42 | TomDotTom | William_CTO: Can't you do this with a simple proxy? |
17:15:44 | TomDotTom | Or, another angle, can't this redirect be baked into the other site/app directly? |
17:16:51 | TomDotTom | The other site is, after all, capable of performing jwt validation, and hence can redirect when needed. |
17:17:15 | FromDiscord | <William_CTO> I don't own the other site |
17:17:46 | FromDiscord | <William_CTO> Sure I could throw this together with php or python, but I think this would be a good candidate for a first project |
17:18:59 | TomDotTom | Not actually built a web-service myself in nim. So any advice I gave would be pure conjecture. |
17:19:13 | Zevv | dude who'se all these people |
17:19:31 | Zevv | did we suffer exponential growth? |
17:19:43 | Zevv | Hullo, ya'll fellow nimmers! |
17:21:09 | FromDiscord | <Rika> nimmers vs nimions |
17:21:10 | FromDiscord | <nikki> hi π |
17:21:11 | FromDiscord | <martinium> @lqdev so are you saying that a Future[T] is automatically discarded? |
17:21:14 | TomDotTom | Hallo |
17:21:15 | FromDiscord | <Rika> im more of a nimion myself |
17:21:31 | FromDiscord | <Rika> > so are you saying that a Future[T] is automatically discarded?β΅its just an example, i believe |
17:21:33 | FromDiscord | <martinium> nimion sounds way cooler |
17:21:35 | TomDotTom | nimdiot maybe ? |
17:21:39 | FromDiscord | <martinium> rolls off the tongue better |
17:21:43 | FromDiscord | <g5becks> ποΈ |
17:21:44 | FromDiscord | <lqdev> @martinium no, why? |
17:21:58 | FromDiscord | <Rika> tomdottom: are you describing yourself? |
17:21:59 | FromDiscord | <martinium> you just used = discard as an example? |
17:22:10 | FromDiscord | <nikki> @martinium you can put anything in the function body. in this case the body was `discard` |
17:22:29 | TomDotTom | Rika: obviously :) |
17:23:34 | FromDiscord | <martinium> @nikki gotcha just making sure I didn't read into the example too much |
17:23:58 | FromDiscord | <nikki> yeah it's a normal proc, just happens to take a future which is just a type |
17:26:29 | * | PMunch quit (Quit: leaving) |
17:28:58 | disruptek | when you thread a lot of needles, you're able to look at any needle and choose the right thread. |
17:29:44 | FromDiscord | <Rika> how are you so wise |
17:32:35 | disruptek | lead paint probably has something to do with it. |
17:42:26 | * | tane joined #nim |
17:44:58 | Zevv | right about the needles |
17:45:00 | FromDiscord | <martinium> nice |
17:45:57 | FromDiscord | <martinium> in Nim does marshalling json to an object offer any performance benefits vs accessing the key:values directly? |
17:49:25 | FromDiscord | <dom96> it likely offers a performance penalty |
17:55:39 | FromDiscord | <martinium> interesting |
17:55:50 | FromDiscord | <martinium> sent a code paste, see https://play.nim-lang.org/#ix=2CdE |
17:55:50 | FromDiscord | <martinium> where is my error here |
17:56:14 | FromDiscord | <martinium> sent a code paste, see https://play.nim-lang.org/#ix=2CdF |
17:56:15 | disruptek | you can only await inside .async procs. |
17:56:21 | FromDiscord | <martinium> ahh the pragma |
17:56:23 | disruptek | use `waitfor`. |
17:57:33 | FromDiscord | <martinium> sent a code paste, see https://play.nim-lang.org/#ix=2CdH |
17:58:24 | disruptek | why does your request yield the same type as its url input? |
17:58:45 | FromDiscord | <martinium> was following the example on nim tutorial II |
17:58:58 | disruptek | well, maybe give your proc an argument, for starters. |
17:59:12 | FromDiscord | <martinium> oh duhh wow |
17:59:35 | FromDiscord | <martinium> there we go |
17:59:40 | FromDiscord | <martinium> what a dumb error |
17:59:54 | FromDiscord | <martinium> (edit) "what a dumb error ... " added "on my part" |
18:00:46 | * | luis_ joined #nim |
18:00:59 | FromDiscord | <Rika> lol |
18:12:07 | * | luis_ quit (Quit: luis_) |
18:14:27 | * | BarrOff joined #nim |
18:26:11 | FromDiscord | <martinium> what is the correct way to add query parameters to a URL in a request? Multipartdata or parseUri? |
18:27:40 | FromDiscord | <Rika> Parseuri |
18:28:03 | FromDiscord | <Rika> I believe multipart data is not relevant to query parameters |
18:28:11 | FromDiscord | <martinium> gotcha, good to know |
18:31:45 | * | astronavt quit (Quit: Leaving) |
18:32:17 | * | hyiltiz quit (Ping timeout: 260 seconds) |
18:42:51 | * | hyiltiz joined #nim |
18:42:51 | * | hyiltiz quit (Changing host) |
18:42:51 | * | hyiltiz joined #nim |
18:44:28 | * | natrys joined #nim |
18:59:22 | * | rokups quit (Quit: Connection closed for inactivity) |
19:10:17 | FromGitter | <matrixbot> `ergpopler` pp |
19:10:23 | FromGitter | <matrixbot> `ergpopler` ergpopler: ergpopler ergpopler ergpopler |
19:10:27 | disruptek | noted. |
19:10:39 | FromGitter | <matrixbot> `ergpopler` * hi |
19:11:12 | FromGitter | <matrixbot> `ergpopler` Nim is written in nim how tf |
19:11:18 | Zevv | it's magic |
19:11:40 | disruptek | the first chicken to lay a nim egg was named nim. |
19:11:45 | disruptek | go figure. |
19:11:53 | FromGitter | <matrixbot> `ergpopler` how was nim made in nim if nim wasnt made because nim didnt exist because nim is nim and its made of nim whiuch didnt exust |
19:12:12 | Zevv | how was C made |
19:12:40 | FromGitter | <matrixbot> `ergpopler` oh yeah egg scenario, nim was made in prenim and prenim didn't have to be made in nim π |
19:12:41 | Zevv | because C compilers are typically written in, you know, C |
19:13:12 | FromGitter | <matrixbot> `ergpopler` bcz they were compiled in a c compiler not written in c |
19:13:34 | disruptek | you're blowin' my mind right now. |
19:14:13 | disruptek | Zevv: you hold his arms and i'll get his legs. |
19:14:53 | Zevv | don't hit the newbs |
19:15:46 | disruptek | clyybber: do you need zevv's help to fix the bug blocking cps? |
19:15:57 | disruptek | 'cause, y'know, i'd be happy to volunteer it. |
19:19:14 | FromDiscord | <nikki> https://godbolt.org/z/Y7Tj9c checking out some nim-gen'd c on godbolt π |
19:19:31 | FromDiscord | <nikki> you can actually just #include nimbase.h by its raw github uri lol (that's what this one does at the top) |
19:22:09 | FromDiscord | <Clyybber> godbolt has direct nim support btw |
19:22:22 | FromDiscord | <nikki> yeah i actually wanted to see the mapping through nim-c |
19:22:28 | FromDiscord | <Clyybber> ah gotcha |
19:22:37 | FromDiscord | <Clyybber> disruptek: forgot what bug |
19:22:52 | disruptek | any of the ones assigned to you. |
19:22:54 | FromDiscord | <nikki> godbolt's nim only goes through gcc and i have more practice reading clang's gen; and also on godbolt it only has nim 1.2 afaict (i think the head version just doesn't work; doesn't have 1.4) |
19:23:22 | FromDiscord | <Clyybber> disruptek: i'll take a look once I get this done |
19:23:32 | disruptek | aight, 10q. |
19:23:58 | FromDiscord | <William_CTO> What is the preferred number of spaces for indentation? 2 or 4? |
19:24:04 | disruptek | yes. |
19:37:13 | FromDiscord | <Recruit_main707> 2 |
19:39:03 | FromDiscord | <Idefau> 8 |
19:42:48 | FromDiscord | <Idefau> !eval echo 2 or 4 |
19:42:50 | NimBot | 6 |
19:42:56 | FromDiscord | <Idefau> you got your answer |
19:42:58 | FromDiscord | <ache of head> Whaaat |
19:43:07 | FromDiscord | <Recruit_main707> bitwise or |
19:43:11 | FromDiscord | <ache of head> Ohhhh |
19:43:18 | FromDiscord | <ache of head> I didn't know it was overloaded for ints |
19:43:22 | FromDiscord | <ache of head> (edit) "ints" => "number values" |
19:43:27 | FromDiscord | <ache of head> I thought it was a separate operator |
19:43:31 | FromDiscord | <Idefau> nah |
19:43:42 | disruptek | & |
19:43:47 | disruptek | ~& |
19:43:47 | disbot | &: 11unreachable |
19:44:03 | FromDiscord | <Idefau> or if you want either 2 or 4 |
19:44:06 | FromDiscord | <Idefau> !eval echo 2 xor 4 |
19:44:08 | NimBot | 6 |
19:44:12 | FromDiscord | <Idefau> wow |
19:44:24 | FromDiscord | <Idefau> see you must use 6 ident spaces |
19:44:29 | FromDiscord | <Recruit_main707> !eval echo 2 and 4 |
19:44:31 | NimBot | 0 |
19:45:20 | FromDiscord | <Idefau> !eval echo 2 shr 4 or 6 |
19:45:22 | NimBot | 6 |
19:47:21 | * | mmohammadi9812 quit (Read error: Connection reset by peer) |
19:49:04 | * | mmohammadi9812 joined #nim |
19:51:02 | * | apahl quit (Ping timeout: 260 seconds) |
19:51:58 | * | apahl joined #nim |
19:58:26 | FromDiscord | <Clyybber> !eval echo 2b or not 2b |
19:58:27 | NimBot | Compile failed: /usercode/in.nim(1, 7) Error: invalid number: '2b' |
19:58:42 | disruptek | itym 10b. |
19:59:22 | FromDiscord | <Clyybber> doesn't flow as nicely |
20:00:01 | FromDiscord | <Clyybber> !eval echo 10b or not 10b |
20:00:05 | NimBot | Compile failed: /usercode/in.nim(1, 8) Error: invalid number: '10b' |
20:00:09 | FromDiscord | <Idefau> !eval echo 0x2b or not 0x2b |
20:00:14 | NimBot | -1 |
20:00:21 | disruptek | snap. |
20:00:43 | * | opal quit (Ping timeout: 240 seconds) |
20:02:50 | * | opal joined #nim |
20:03:42 | FromDiscord | <Idefau> 0x2be would work as well |
20:11:46 | FromDiscord | <nikki> the path for `staticRead` is relative to the file it's used in right? |
20:11:52 | FromDiscord | <nikki> or is there some shenanignas with module search paths too |
20:12:53 | * | sealmove quit (Quit: WeeChat 2.9) |
20:15:19 | * | kinkinkijkin quit (Remote host closed the connection) |
20:17:22 | * | kinkinkijkin joined #nim |
20:19:57 | FromDiscord | <whisperdev> Does the zig compiler really make it easy to cross compile Nim? |
20:25:15 | FromDiscord | <ElegantBeef> It's super easy to cross compile as is |
20:31:32 | * | tane quit (Ping timeout: 256 seconds) |
20:40:18 | * | narimiran quit (Quit: leaving) |
20:43:05 | * | solitudesf quit (Ping timeout: 240 seconds) |
20:45:31 | * | gangstacat quit (Ping timeout: 272 seconds) |
20:47:05 | * | hyiltiz quit (Ping timeout: 240 seconds) |
20:48:29 | * | hyiltiz joined #nim |
20:48:29 | * | hyiltiz quit (Changing host) |
20:48:29 | * | hyiltiz joined #nim |
20:49:09 | FromDiscord | <scott> My wifi dongle broke, and I've realized there are no offline docs. Is there something I'm not finding or is that just not a thing? |
20:49:33 | FromDiscord | <ElegantBeef> I believe you can generate the docs yourself |
20:49:41 | FromDiscord | <scott> Idk I kinda expected choosenim to generate the docs and put them in /usr/share or something |
20:49:47 | FromDiscord | <Recruit_main707> @nikki yes, 90% sure |
20:49:59 | FromDiscord | <scott> @ElegantBeefβ΅β΅Do I have to have the compiler downloaded? |
20:50:25 | FromDiscord | <ElegantBeef> Uncertain, but i imagine so |
20:50:37 | FromDiscord | <nikki> @scott do you just want the manual? i have a pdf of the manual if you want π
|
20:50:43 | FromDiscord | <scott> I haven't done `nimble install compiler` yet on this machine π |
20:51:13 | FromDiscord | <ElegantBeef> If you used choosenim it should've downloaded all the libs afaik |
20:51:20 | FromDiscord | <ElegantBeef> https://media.discordapp.net/attachments/371759389889003532/770751506060017694/unknown.png |
20:51:35 | FromDiscord | <scott> Idk I really need the stdlib reference but thanks @nikki |
20:52:06 | FromDiscord | <scott> Ah there it is, thanks @ElegantBeef |
20:52:34 | FromDiscord | <scott> I was looking in `~/.nimble` not `~/.choosenim` |
20:55:16 | FromDiscord | <ElegantBeef> No problem |
20:55:16 | * | natrys quit (Quit: natrys) |
20:56:11 | FromDiscord | <ElegantBeef> What's the best way to check if a symbol is a primitive? |
20:56:48 | * | tane joined #nim |
20:58:40 | * | axion quit (*.net *.split) |
20:59:21 | * | axion joined #nim |
21:07:23 | Prestige | can macros create top level variables in a file? |
21:07:35 | disruptek | sure. |
21:11:28 | ForumUpdaterBot | New thread by BarrOff25: Template expanding to multiple sequence members, see https://forum.nim-lang.org/t/6997 |
21:13:13 | FromDiscord | <ElegantBeef> Macros can do whatever a programmer can do |
21:13:52 | disruptek | macro man, macro man, does whatever a coder can. |
21:15:10 | FromDiscord | <ElegantBeef> Makes a spaghetti, lookout it's macroman. Writting code no one can understand.... |
21:20:01 | * | disruptek tried to use std/with in the compiler... |
21:20:04 | * | disruptek failed. |
21:29:52 | FromDiscord | <Clyybber> disruptek: probably because bootstrapping? |
21:30:18 | disruptek | what does that have to do with my balls throbbing? |
21:30:34 | Prestige | well if the strap is tigth enough |
21:30:41 | Prestige | tight* |
21:30:54 | FromDiscord | <Clyybber> oh no |
21:31:45 | FromDiscord | <ElegantBeef> So clyybber i've started working on your suggestion, the nimscript -> nim side shouldnt be too bad for objects of shallow depth, but collections seem rather difficult to send across sadl |
21:31:46 | FromDiscord | <ElegantBeef> (edit) "sadl" => "sadly" |
21:32:28 | FromDiscord | <Clyybber> any examples of difficult stuff? |
21:32:37 | FromDiscord | <ElegantBeef> Sequences |
21:33:09 | FromDiscord | <Clyybber> treat seqs as primitves |
21:33:24 | FromDiscord | <ElegantBeef> The proc signature gets larger and larger |
21:33:33 | FromDiscord | <Clyybber> lol why? |
21:33:50 | FromDiscord | <ElegantBeef> Cause the signature i make has to take all the primitives as parameters |
21:33:59 | FromDiscord | <Clyybber> oh eh |
21:34:05 | FromDiscord | <ElegantBeef> Should note the hidden proc siganture does |
21:34:06 | FromDiscord | <Clyybber> why not just use a seq of strings? |
21:34:09 | FromDiscord | <Clyybber> or a string |
21:34:19 | FromDiscord | <ElegantBeef> Didnt quite understand how i'd use a string |
21:34:20 | FromDiscord | <Clyybber> ah |
21:34:24 | FromDiscord | <Clyybber> I see what you are doing |
21:34:29 | FromDiscord | <Clyybber> interesting approach |
21:35:11 | FromDiscord | <ElegantBeef> Well the VM args are sitting there, but yea this is rather difficult to manager so probably should stop now |
21:35:50 | FromDiscord | <ElegantBeef> But i mean the current rewrite sorta generates ok atm, but yea would need to go quite deep for supporting all objects https://media.discordapp.net/attachments/371759389889003532/770762702997028884/unknown.png |
21:36:30 | FromDiscord | <Clyybber> my suggestion from yesterday |
21:36:39 | FromDiscord | <ElegantBeef> Would be so much easier if i could just treat it like a network packet π |
21:36:44 | FromDiscord | <Clyybber> was actually to use a string as a binary buffer |
21:36:57 | FromDiscord | <Clyybber> and use a vm callback to write primitives to that buffer |
21:37:03 | FromDiscord | <ElegantBeef> Oh shit |
21:37:08 | FromDiscord | <Clyybber> :D |
21:37:50 | disruptek | just generate ast and then run it on the other side. what's the problem? |
21:38:09 | FromDiscord | <Clyybber> disruptek: its about nimscript -> nim |
21:38:14 | FromDiscord | <Clyybber> but nim is running |
21:38:24 | disruptek | i'm okay with that. |
21:38:40 | FromDiscord | <ElegantBeef> And nimscript as we've gone into deeply is incapble of using more intelligent copy methods |
21:38:48 | disruptek | rude. |
21:40:21 | FromDiscord | <ElegantBeef> So clyyber you just gave me the method to make a network packet like buffer, so cheers now just need a template or macro to go through each field to get to the most primitive type and send it |
21:40:25 | * | BarrOff quit (Ping timeout: 264 seconds) |
21:40:43 | FromDiscord | <Clyybber> cheers |
21:41:05 | FromDiscord | <ElegantBeef> I've just deleted the entirety of my `nimscripted` file π |
21:41:43 | disruptek | again you want frosty. |
21:41:48 | FromDiscord | <ElegantBeef> Yea |
21:41:50 | disruptek | just copy that shit and get it done. |
21:41:59 | FromDiscord | <ElegantBeef> Well yea clyybber suggested that basically |
21:42:09 | FromDiscord | <Clyybber> disruptek: think of it as a vm frosty |
21:42:25 | FromDiscord | <Clyybber> maybe it can be merged into frosty at some point |
21:42:35 | FromDiscord | <Clyybber> virtual frost |
21:43:02 | disruptek | frosty needs the native socket code pulled out when it goes into the compiler. |
21:43:12 | disruptek | so, i dunno. maybe we split it up. |
21:46:34 | * | hyiltiz quit (Ping timeout: 256 seconds) |
21:49:01 | * | hyiltiz joined #nim |
21:53:46 | FromDiscord | <nikki> does `staticRead` use the hash (or such) of the input file and not cause a recompile if it didn't change π€ |
21:53:58 | FromDiscord | <nikki> like does it factor into the same cache mechanism as for nim modules |
21:54:02 | disruptek | nope. |
21:55:40 | * | mmohammadi9812 quit (Remote host closed the connection) |
21:57:44 | * | mmohammadi9812 joined #nim |
22:03:02 | * | mmohammadi9812 quit (Quit: Quit) |
22:05:33 | ForumUpdaterBot | New thread by Mrhdias: Listening for variable changes in Nim?, see https://forum.nim-lang.org/t/6998 |
22:08:30 | * | mmohammadi9812 joined #nim |
22:08:48 | * | mmohammadi9812 quit (Client Quit) |
22:09:05 | FromDiscord | <nikki> seems like .... it does actually |
22:09:30 | * | mmohammadi9812 joined #nim |
22:10:50 | Prestige | I'm creating a const section in a macro with quote do - if I create variable name here, the output has a `gensym6 suffix. Is this normal? |
22:11:37 | * | gangstacat joined #nim |
22:11:46 | FromGitter | <ynfle> I'm pretty sure al variable names are gensym'ed unless marked with the pragma `{.dirty.}` |
22:12:04 | FromDiscord | <nikki> and i believe also unless the name comes in as a parameter? |
22:12:19 | FromDiscord | <ElegantBeef> sent a code paste, see https://play.nim-lang.org/#ix=2CeP |
22:12:22 | disruptek | Prestige: it's not normal. stop using macros immediately and consult your physician. |
22:12:28 | Prestige | lol |
22:12:39 | disruptek | seek professional help! |
22:12:45 | FromDiscord | <Recruit_main707> Dr disruptek |
22:12:51 | Prestige | As long is it's working as intended, just wanted to make sure I wasn't doing something improper |
22:14:00 | FromDiscord | <nikki> yeah i think the main reasno is so the variable doesn't collide with another variable of the same name in the enclosing scope |
22:20:48 | * | lritter quit (Quit: Leaving) |
22:22:40 | FromDiscord | <scott> Is there a simple way (besides a bare for-loop) to create a seq from an iterator? |
22:23:17 | FromDiscord | <Clyybber> toSeq |
22:23:40 | FromDiscord | <scott> Ok thanks |
22:23:48 | FromDiscord | <Clyybber> its in sequtils :) |
22:24:53 | FromDiscord | <scott> Don't know how I missed it haha |
22:26:15 | * | tane quit (Quit: Leaving) |
22:26:28 | FromDiscord | <nikki> disruptek: do you actually try to avoid macros mostly (referring to what you said to Prestige) or was that mostly only a joke |
22:27:02 | FromDiscord | <Clyybber> regardless of what he answers it should be understood as a joke :D |
22:27:02 | FromDiscord | <nikki> avoid as in -- avoid reaching for a macro solution initially and mostly only resort to it if you really need to / consider rearchitecting to not need it |
22:27:21 | FromDiscord | <Clyybber> but in general, yeah go for the simples solution first |
22:27:33 | FromDiscord | <Clyybber> unless you have good reasons to do otherwise |
22:27:52 | FromDiscord | <nikki> yeah mainly i'm wondering how much of a sense of additional complexity + pitfalls to internalize about macros |
22:28:01 | FromDiscord | <nikki> eg. needing to keep track of whether to use `evalOnceAs` |
22:31:18 | FromDiscord | <ElegantBeef> Very few times you're happy to see something like `dοΏ½r@@οΏ½@οΏ½r@` |
22:31:39 | FromDiscord | <Clyybber> lol |
22:31:52 | * | mbomba joined #nim |
22:52:47 | * | acidx quit (Quit: Reconnecting) |
22:54:03 | * | acidx joined #nim |
22:55:23 | FromDiscord | <nikki> hahais that a gensym? |
22:55:34 | FromDiscord | <nikki> i haven't macro'd much yet (other than using them) |
22:55:50 | mipri | Lisp terminology. it's a throwaway symbol that won't collide with one already in the program |
22:56:39 | FromDiscord | <Clyybber> @nikki thats the string @ElegantBeef is using as a binary buffer :D |
22:56:40 | FromDiscord | <nikki> oh yeah i've coded macros in lisp and actually had to use gensym directly |
22:56:53 | FromDiscord | <nikki> my question was just: is that an identifier generated by nim's gensym |
22:56:58 | FromDiscord | <nikki> ah word |
22:57:15 | FromDiscord | <ElegantBeef> Nah it's the output of me using the nim backend to serialize an objects primitives |
22:57:20 | FromDiscord | <nikki> nice |
22:58:28 | FromDiscord | <ElegantBeef> Also sorry again for being a tosser yesterday, i couldnt parse what you were saying well enough π |
22:59:26 | FromDiscord | <nikki> oh really no worries @ElegantBeef π |
23:03:01 | * | acidx_ joined #nim |
23:04:33 | FromDiscord | <ElegantBeef> I wouldnt be canadian if i didnt apologize more than once π |
23:19:14 | FromDiscord | <ElegantBeef> Interestingly i'm getting a crash trying to convert a string to the object on nimscript side |
23:19:33 | FromDiscord | <ElegantBeef> It doesnt give any errors just doesnt continue after attempting to get a float |
23:20:09 | FromDiscord | <Clyybber> how do you attempt it? |
23:20:17 | FromDiscord | <Clyybber> and are you on the latest devel? |
23:20:31 | FromDiscord | <ElegantBeef> https://play.nim-lang.org/#ix=2Cf7 |
23:20:42 | FromDiscord | <ElegantBeef> I am not, i'll update |
23:20:47 | FromDiscord | <ElegantBeef> the nimside works |
23:21:00 | FromDiscord | <ElegantBeef> IE getint returns 100 |
23:21:16 | FromDiscord | <Clyybber> yeah, devel has seen some critical VM bugfixes yesterday |
23:21:23 | FromDiscord | <Clyybber> or the day before yesterday |
23:22:11 | FromDiscord | <ElegantBeef> Yea like my super important 1 line fix π |
23:22:46 | FromDiscord | <Clyybber> that one too :D |
23:23:24 | FromDiscord | <ElegantBeef> How does one update to the most recent commit `choosenim upgrade devel` didnt work |
23:23:41 | FromDiscord | <Avatarfighter> choosenim update devel? |
23:23:48 | FromDiscord | <Clyybber> I don't use choosenim so I don't know :/ |
23:24:08 | FromDiscord | <ElegantBeef> Well that's what i meant |
23:24:17 | FromDiscord | <Avatarfighter> `choosenim update devel` should rebuidl it |
23:24:33 | FromDiscord | <Clyybber> maybe -f ? |
23:29:14 | FromDiscord | <ElegantBeef> Guess i have to manually give it the hash weirdly |
23:35:19 | * | mmohammadi9812 quit (Ping timeout: 260 seconds) |
23:38:08 | FromDiscord | <Avatarfighter> @ElegantBeef not to flex πͺ https://media.discordapp.net/attachments/371759389889003532/770793486008975390/unknown.png |
23:38:45 | FromDiscord | <ElegantBeef> Not to flex but... π https://media.discordapp.net/attachments/371759389889003532/770793640846557234/unknown.png |
23:38:48 | FromDiscord | <Avatarfighter> LOL |
23:38:51 | FromDiscord | <Avatarfighter> psh |
23:39:36 | * | acidx_ quit (Quit: leaving) |
23:39:36 | * | acidx quit (Quit: leaving) |
23:39:40 | FromDiscord | <ElegantBeef> Yea latest version didnt resolve this |
23:45:46 | * | acidx joined #nim |
23:54:15 | FromDiscord | <Clyybber> @ElegantBeef where exactly does it hang? |
23:54:16 | FromDiscord | <shashlick> You need to use --latest |
23:54:28 | FromDiscord | <shashlick> Else it downloads the most recent nightlies build |