00:03:14 | * | Hideki_ quit (Ping timeout: 240 seconds) |
00:12:33 | * | whaletechno joined #nim |
00:18:06 | * | ng0 quit (Quit: Alexa, when is the end of world?) |
00:18:29 | * | Hideki_ joined #nim |
00:32:00 | * | Hideki_ quit (Remote host closed the connection) |
00:32:39 | * | Hideki_ joined #nim |
00:37:17 | * | Hideki_ quit (Ping timeout: 276 seconds) |
01:11:28 | * | Hideki_ joined #nim |
01:17:14 | * | Hideki_ quit (Ping timeout: 240 seconds) |
01:23:19 | * | doesntgolf joined #nim |
01:37:06 | * | owl_000 joined #nim |
01:38:23 | * | owl joined #nim |
01:41:33 | * | owl_000 quit (Ping timeout: 245 seconds) |
01:48:45 | * | neceve quit (Remote host closed the connection) |
01:50:00 | * | Jjp137 quit (Ping timeout: 268 seconds) |
01:51:13 | * | Jjp137 joined #nim |
01:53:08 | * | Hideki_ joined #nim |
02:03:38 | * | exelotl quit (Ping timeout: 245 seconds) |
02:09:17 | * | Hideki_ quit (Ping timeout: 240 seconds) |
02:36:00 | owl | could not load : libcrypto and libeay64, nimble , https://i.ibb.co/YTb6c08/Capture.png |
02:36:01 | * | doesntgolf quit (Read error: Connection reset by peer) |
02:37:07 | * | thomasross quit (Remote host closed the connection) |
02:37:35 | * | thomasross joined #nim |
02:37:35 | owl | installed using choosenim, nim 1.0.99 |
02:38:21 | owl | windows |
02:40:29 | shashlick | Download the dlls zip file and extract it in .nimble/bin |
02:42:16 | shashlick | https://github.com/dom96/choosenim/issues/53 |
02:42:57 | * | mal`` quit (Ping timeout: 245 seconds) |
02:44:24 | * | Hideki_ joined #nim |
02:44:43 | FromGitter | <gogolxdong> ./koch --latest nimble |
02:45:52 | * | mal`` joined #nim |
02:46:32 | owl | i think, previously nim version 1.0.0 was in my path, in the issue dom said `needsDllInstall` return false, maybe this is the reason. because in that directory there are all the dlls.(i removed the path after using choosenim) |
02:48:36 | * | Hideki_ quit (Ping timeout: 240 seconds) |
02:51:25 | owl | choosenim and the procedure for installing nim in nim website is not compatible. |
02:53:50 | shashlick | There's a PR already to fix that issue |
02:55:24 | shashlick | https://github.com/dom96/choosenim/pull/135 |
02:57:38 | owl | in the nim site, for windows it is a zip of precompiled files. rather it should be choosenim, than if the platform is windows it will download binary (stable switch) more unified procedure. |
02:57:51 | owl | across os |
02:59:21 | shashlick | That's the goal, both options are available |
03:00:09 | FromGitter | <gogolxdong> suggest installing Nim from source. |
03:00:26 | FromGitter | <gogolxdong> do you have koch? |
03:00:56 | owl | yes, i have now working nim (after adding the zip) |
03:01:03 | owl | nimble |
03:22:18 | * | endragor joined #nim |
03:56:11 | * | chemist69 quit (Ping timeout: 276 seconds) |
03:57:40 | * | chemist69 joined #nim |
04:12:33 | * | dddddd quit (Remote host closed the connection) |
04:14:11 | * | teimosso quit (Quit: teimosso) |
04:40:26 | * | endragor quit (Ping timeout: 240 seconds) |
05:03:33 | * | endragor joined #nim |
05:06:22 | * | uu91 quit (Ping timeout: 265 seconds) |
05:08:08 | * | nsf joined #nim |
05:22:02 | * | theelous3 quit (Ping timeout: 240 seconds) |
05:42:25 | * | solitudesf- joined #nim |
05:45:02 | * | narimiran joined #nim |
05:52:26 | * | owl quit (Ping timeout: 240 seconds) |
06:09:21 | * | Hideki_ joined #nim |
06:11:09 | * | traviss joined #nim |
06:11:15 | * | Traviss__ joined #nim |
06:12:24 | * | Traviss__ quit (Client Quit) |
06:12:24 | * | traviss quit (Client Quit) |
06:12:44 | * | traviss joined #nim |
06:13:59 | * | Hideki_ quit (Ping timeout: 276 seconds) |
06:14:16 | * | solitudesf- quit (Ping timeout: 240 seconds) |
06:38:29 | FromGitter | <zacharycarter> morning |
06:40:40 | Zevv | oi o/ |
06:44:39 | sealmove | morning!1!1 |
06:49:29 | sealmove | What' |
06:49:35 | sealmove | What's up? |
06:49:49 | sealmove | I'm ready to try npeg finally :> |
06:50:39 | FromGitter | <zacharycarter> working on loading iqm models atm - or about to start anyway |
06:52:08 | sealmove | awesome |
06:53:16 | sealmove | zachary if you have to write a iqm parser for that, consider using: https://kaitai.io/ |
06:53:32 | sealmove | yaml is easier :> |
06:54:38 | FromGitter | <zacharycarter> meh - I don't want to introduce any new dependencies and I don't think writing an IQM parser is that difficult |
06:56:13 | sealmove | It doesn't introduce any dependancies. simply generates a parser based on a yaml description in the language of your choice (currently I am working on Nim support). But well, just trying to advertise KS because it's cool project. :> |
06:56:34 | FromGitter | <zacharycarter> ah |
06:56:45 | FromGitter | <zacharycarter> that does sound neat - so wait, you can already generate parsers for Nim? |
06:56:57 | sealmove | no :( but soon!! wait for it |
06:57:15 | FromGitter | <zacharycarter> oh cool |
07:00:00 | * | gmpreussner quit (Quit: kthxbye) |
07:01:06 | * | owl_000 joined #nim |
07:03:17 | sealmove | Nim will hit the dashboard soon: https://ci.kaitai.io/ |
07:03:26 | sealmove | Some code has already been merged |
07:03:53 | sealmove | Also very happy that it will hit it with version 1 :) |
07:04:48 | * | gmpreussner joined #nim |
07:05:34 | FromGitter | <zacharycarter> niceeee |
07:20:01 | Zevv | oi sealmove, what's your project? |
07:21:13 | sealmove | nothing yet, but I am seriously considering writing that shell, because I am not satisfied with any shell (unlike general purpose programming languages land where Nim is perfect :)) |
07:22:29 | * | Vladar joined #nim |
07:22:34 | sealmove | btw fun fact, the guy who wrote Kaitai Struct is a maintainer of one of the best bash tutorials: http://mywiki.wooledge.org/BashGuide |
07:26:41 | Zevv | IIRC varriount was also doing shell stuff |
07:26:59 | Zevv | ah yes https://github.com/Varriount/commandant |
07:28:37 | * | thomasross quit (Remote host closed the connection) |
07:29:05 | * | thomasross joined #nim |
07:31:26 | sealmove | 2 months ago, this is fresh |
07:31:32 | Zevv | :) |
07:33:33 | Zevv | Every repo 60 days stale deserves an obituary! |
07:34:57 | Zevv | I have this cronjob committing something every two days, it keeps the vultures away |
07:36:07 | * | thomasross quit (Remote host closed the connection) |
07:36:30 | * | thomasross joined #nim |
07:40:07 | sealmove | :D |
08:01:58 | * | asymptotically joined #nim |
08:03:37 | * | navinmistry joined #nim |
08:05:53 | * | navinmis_ joined #nim |
08:09:03 | * | navinmistry quit (Ping timeout: 245 seconds) |
08:09:15 | * | nsf quit (Quit: WeeChat 2.5) |
08:09:30 | * | ng0 joined #nim |
08:12:58 | sealmove | For options, can't you just do something on the lines of `var x: Option[int] = 5`? Do you actually have to write var x: Option[int] = some(5)? |
08:15:47 | Zevv | leorize: what is the expected behaviour of nim.nvim on a new file that has not hit disk yet? |
08:15:53 | Araq | you write var x = some(5) |
08:16:19 | Zevv | leorize: not this I guess? https://asciinema.org/a/ApdZ2d9SzGfxWlLhRITF6DPsN :) |
08:16:19 | leorize | Zevv: it depends |
08:16:53 | leorize | hmm |
08:19:03 | * | navinmis_ quit (Ping timeout: 245 seconds) |
08:20:07 | sealmove | can I have Option[seq[int]]? (optional seq) |
08:21:07 | Zevv | I don't see why not? |
08:21:58 | FromGitter | <zetashift> Anybody know how to get the length of a list: https://nim-lang.org/docs/lists.html#DoublyLinkedList ? |
08:22:01 | * | ng0 quit (Remote host closed the connection) |
08:22:12 | sealmove | so then to get the value you do `get(myOptionalSeq)[index]` I guess |
08:22:46 | Zevv | zetashift: iterate and count |
08:23:07 | FromGitter | <zetashift> ah cool, thought the stdlib might have some proc I was not seeing |
08:23:25 | * | ng0 joined #nim |
08:24:02 | Zevv | If you need to know the number of elements often, you might not have picked the optimal data structure for the task |
08:27:32 | Araq | sealmove: usually 0-length seqs do fine, no need to make it optional |
08:28:08 | FromGitter | <zetashift> yea but seq's didn't work in this case so I'm just trying this out. |
08:28:36 | * | navinmistry joined #nim |
08:28:49 | sealmove | Araq: oh useful advice |
08:38:21 | leorize | @zetashift: what's your use case? |
08:38:59 | leorize | Zevv: what version of neovim are you on? |
08:39:13 | Zevv | NVIM v0.3.4 |
08:43:40 | * | navinmistry quit (Remote host closed the connection) |
08:45:50 | * | navinmistry joined #nim |
08:47:04 | leorize | can you reproduce the bug, then after the first error message was shown, send me the actual function content. You can get this via :function {<number>} |
08:47:58 | * | navinmistry quit (Remote host closed the connection) |
08:48:45 | * | Trustable joined #nim |
08:50:00 | * | navinmistry joined #nim |
08:54:23 | * | navinmistry quit (Ping timeout: 246 seconds) |
08:54:25 | * | navinmis_ joined #nim |
08:55:47 | * | navinmistry joined #nim |
08:56:54 | Zevv | well that was an interesting session: https://asciinema.org/a/cScSr6C9kFGquBJPvtOx4UASc |
08:57:10 | Zevv | I could just have sent you the function output in an ix snippet I guess :) |
08:57:45 | * | navinmistry quit (Remote host closed the connection) |
08:58:07 | * | navinmistry joined #nim |
08:58:26 | * | navinmis_ quit (Ping timeout: 240 seconds) |
08:58:27 | Zevv | http://ix.io/1XdF |
09:01:46 | * | navinmistry quit (Remote host closed the connection) |
09:02:00 | sealmove | I have to close stream manually always? |
09:03:36 | FromGitter | <zetashift> @leorize dungeon generation, but seq's should work, I think I have a looping logic error in my code. |
09:04:38 | FromGitter | <zetashift> The dungeon generation uses Python so I'm trying to keep it as Nim-ish as possible(even learned about bit fields!) |
09:05:35 | leorize | Zevv: update your neovim :P |
09:05:39 | leorize | this is certainly a neovim bug |
09:05:44 | Zevv | sir yes sir |
09:06:29 | Zevv | ~NVIM v0.3.8 |
09:06:32 | Zevv | still |
09:06:45 | * | navinmistry joined #nim |
09:08:40 | leorize | alright, try this: |
09:09:00 | Zevv | impornvim: /home/travis/build/neovim/bot-ci/build/neovim/src/nvim/eval/executor.c:119: eexe_mod_op: Assertion `false' failed. |
09:09:04 | Zevv | Bwah that's with latest |
09:09:18 | leorize | add 'echom string(a:data[0])' to autoload/nim/suggest/utils.vim:30 |
09:09:41 | leorize | also 'echom a:stream' after |
09:09:53 | leorize | then send me the output of ':messages' |
09:09:54 | * | navinmistry quit (Remote host closed the connection) |
09:10:13 | leorize | when it errors, of course |
09:10:44 | leorize | Zevv: yea I never understand how neovim just crashes like that in certain setups... |
09:11:01 | leorize | maybe you can ask around in #neovim? |
09:11:07 | leorize | c |
09:11:09 | leorize | could be a bug |
09:11:23 | Zevv | yeah probably. It died on me in production the other day and I was pretty nastily pissed about that |
09:11:31 | Zevv | I take crashes from a lot of things, but not from my editor |
09:12:12 | Zevv | I probably did the wrong thing: http://ix.io/1XdH |
09:12:16 | Zevv | I'll ask in neovim |
09:12:20 | Zevv | thanks anyway! |
09:12:52 | * | Zevv goes back to mending his wardrobe |
09:13:02 | sealmove | hey guys, how do I set the path in VSCode? I can run nim from the integrated terminal but I get a warning message that nim is not in my path, and I guess as a result the vscode nim plugin can't use it. |
09:13:56 | leorize | Zevv: well guess that's a motivation for me to work on vim8 support :P |
09:14:10 | Zevv | \o/ |
09:14:58 | FromDiscord | <Kiloneie> @sealmove have you ran finish.exe from nim's folder ? |
09:16:02 | FromDiscord | <Kiloneie> i have a video setting up Nim and Vs Code for Nim 1.0 |
09:16:04 | sealmove | Kiloneie: I am on Linux |
09:16:08 | FromDiscord | <Kiloneie> ah |
09:16:28 | FromDiscord | <Kiloneie> i don't know much about that, but you need to somehow add nim to your path |
09:16:44 | sealmove | that's exactly my question :P how? |
09:16:54 | FromDiscord | <Kiloneie> https://nim-lang.org/install_unix.html |
09:17:07 | narimiran | sealmove: i think you need to add nim to /etc/profile for vscode to see it |
09:17:08 | FromDiscord | <Kiloneie> the information is here, i sadly don't have linux here |
09:17:27 | sealmove | but of course I have nim in my shell path |
09:17:35 | narimiran | sealmove: i have a simple script in /etc/profile.d |
09:17:48 | sealmove | but VSCode seems to use paths from elsewhere |
09:17:57 | * | nsf joined #nim |
09:18:14 | sealmove | narimiran: what does it do? |
09:19:21 | narimiran | PATH=/home/miran/nim-lang/Nim/bin:/home/miran/.nimble/bin:$PATH ; export PATH |
09:20:22 | FromGitter | <zetashift> there is no way to set nim executable path in the VSCode settings.json it should be indeed in your path |
09:20:41 | sealmove | ok programming question :P I've made an object type that have a field which is a FileStream. Is it possible to make a destructor that closes the stream automatically? Will this work with GC? |
09:21:17 | * | krux02 joined #nim |
09:22:23 | sealmove | ok I guess VSCode only looks for path in bash, zsh etc, and not the hipster shell I'm currently using. |
09:22:47 | FromGitter | <alehander42> Araq |
09:22:53 | FromGitter | <alehander42> do you know why can .gensym. |
09:23:19 | FromGitter | <alehander42> produce an error for redefinition |
09:23:26 | FromGitter | <alehander42> i plan to try to manually generate an ident |
09:24:33 | narimiran | sealmove: fish? |
09:25:02 | sealmove | elvish |
09:25:05 | FromGitter | <zetashift> Anybody know what I'm doing wrong here? https://play.nim-lang.org/#ix=1XdM |
09:26:08 | narimiran | for starters, you don't need line 2 :) |
09:26:41 | FromGitter | <zetashift> ah I wasnt sure about that |
09:27:08 | narimiran | what is `self.cellWalls.key`? |
09:27:46 | sealmove | `self` is valid? |
09:27:55 | sealmove | I think it is experimental feature? |
09:28:07 | FromGitter | <zetashift> yea it's godot-nim and it uses self to refer to the current node |
09:28:08 | narimiran | if you want to keep the track of (un)visited stuff, i would go with a set, net seq |
09:28:20 | FromGitter | <zetashift> cellWalls is a table where the keys are vectors |
09:28:43 | sealmove | https://nim-lang.org/docs/manual_experimental.html#automatic-self-insertions |
09:29:22 | planetis[m] | hi |
09:30:08 | sealmove | hey |
09:31:09 | planetis[m] | cant wait for October |
09:31:28 | FromDiscord | <as1ndu> Whats in October? |
09:31:44 | planetis[m] | Hacktoberfest ofc! |
09:31:44 | sealmove | zetashift: are `+` and `in` correctly overloaded for Vector2? |
09:32:25 | icyphox | we need nim in gsoc |
09:32:33 | narimiran | can you try to put parentheses here: `if (cell + n) in unvisited`? |
09:34:15 | planetis[m] | sealmove: works fine with gc destructors |
09:34:58 | planetis[m] | just write a =destroy function and write ``if stream != nil: close(stream)`` |
09:36:10 | sealmove | great, thanks |
09:36:45 | * | SebastianM joined #nim |
09:37:41 | FromGitter | <zetashift> @sealmove yes and I got it working using a mixture of Ordered and HashSets, thanks narimiran! |
09:38:12 | * | SebastianM quit (Client Quit) |
09:38:51 | leorize | you don't need gc destructors to use destructors |
09:39:10 | * | SebastianM joined #nim |
09:39:59 | * | SebastianM` joined #nim |
09:40:29 | * | SebastianM` quit (Client Quit) |
09:40:29 | * | dddddd joined #nim |
09:42:17 | * | Sebastia` joined #nim |
09:42:32 | * | Sebastia` quit (Client Quit) |
09:42:47 | * | SebastianM quit (Remote host closed the connection) |
09:45:53 | * | SebastianM joined #nim |
09:47:31 | * | navinmistry joined #nim |
09:48:39 | * | SebastianM quit (Client Quit) |
09:49:43 | * | SebastianM joined #nim |
09:49:57 | * | SebastianM quit (Client Quit) |
10:11:25 | * | Hideki_ joined #nim |
10:15:36 | * | Hideki_ quit (Ping timeout: 240 seconds) |
10:16:11 | * | traviss quit (Ping timeout: 265 seconds) |
10:21:51 | * | clyybber joined #nim |
10:22:58 | sealmove | how do I get rid of unsureAsgnRef error? |
10:23:09 | sealmove | when using options + cast? |
10:24:09 | * | endragor quit (Remote host closed the connection) |
10:25:15 | FromGitter | <alehander42> why do you need to cast |
10:27:12 | leorize | the `cast` is definitely your problem :P |
10:28:56 | clyybber | rayman22201: Btw, why does this andrewbriggs downvote every PR you send out on github? |
10:29:10 | sealmove | ok let me explain |
10:29:50 | sealmove | i have an initializer proc. my object has a bunch of fields plus some extra fields that reference the previous fields. |
10:30:52 | * | navinmistry quit (Remote host closed the connection) |
10:31:22 | sealmove | https://play.nim-lang.org/#ix=1Xe5 |
10:32:15 | * | navinmistry joined #nim |
10:32:37 | sealmove | https://play.nim-lang.org/#ix=1Xe7 |
10:32:52 | sealmove | the reference may cast the field to a different type |
10:33:43 | sealmove | in general i need a way to access the underlying bytes of `result` and do low-level things with them (I read them from a stream) |
10:33:43 | FromGitter | <alehander42> but why would it cast it |
10:33:48 | FromGitter | <alehander42> doesnt sound typesafe |
10:34:16 | FromGitter | <alehander42> hm, what is result |
10:34:18 | FromGitter | <alehander42> MyObj |
10:34:19 | FromGitter | <alehander42> ? |
10:34:33 | sealmove | result could be another type |
10:34:56 | FromGitter | <alehander42> ok, so i guess you can always cast it as a byte array or something like that |
10:35:33 | sealmove | here is the full code.. if it helps: https://play.nim-lang.org/#ix=1Xea |
10:37:01 | FromGitter | <alehander42> but hm |
10:37:19 | sealmove | always reading as byte array would be ugly, currently I use procs from stream library like readUInt32 etc |
10:37:42 | FromGitter | <alehander42> there is a small thing |
10:37:57 | FromGitter | <alehander42> docs cant be casted to |
10:37:59 | FromGitter | <alehander42> uint32 |
10:38:01 | FromGitter | <alehander42> i mean |
10:38:04 | FromGitter | <alehander42> i see what you do |
10:38:07 | FromGitter | <alehander42> you replace its bytes |
10:38:12 | FromGitter | <alehander42> but seq can be 8 bytes |
10:38:15 | FromGitter | <alehander42> and uint32 4 |
10:39:14 | sealmove | which line? |
10:39:16 | FromGitter | <alehander42> ah wait |
10:39:24 | FromGitter | <alehander42> i thought you set root.foo = |
10:39:25 | FromGitter | <alehander42> sorry |
10:39:27 | FromGitter | <alehander42> didnt get it |
10:43:52 | FromGitter | <alehander42> not sure how to reproduce it , sorry, where does the unsureAsgnRef problem happens |
10:46:01 | sealmove | line 48 |
10:46:07 | * | Metrime joined #nim |
10:49:12 | sealmove | I think I should just re-read from stream though |
10:49:21 | sealmove | casting from another variable seems worse |
10:49:43 | narimiran | gah, i know i'm old when i start typing forum reply and before sending it i just say "naaah, it isn't worth it" and just close the tab.... |
10:51:01 | * | navinmistry quit (Remote host closed the connection) |
10:51:59 | * | navinmistry joined #nim |
10:54:42 | FromGitter | <alehander42> good for you :P |
10:54:46 | * | Metrime quit (Quit: Konversation terminated!) |
10:55:39 | narimiran | ...and for everybody else who now don't have to read my rants :D |
10:56:04 | narimiran | but disappointing to see my youth gone :) |
10:56:31 | * | endragor joined #nim |
10:57:26 | FromGitter | <alehander42> sealmove do you get /home/al/nim/lib/system/gc.nim(250) unsureAsgnRef โ /home/al/nim/lib/system/gc.nim(183) incRef โ SIGSEGV: Illegal storage access. |
10:57:43 | FromGitter | <alehander42> narimiran, oh reminds me of my julia forum long posts |
10:57:56 | FromGitter | <alehander42> i should've been shorter and more to the point there |
10:57:59 | sealmove | alehander42: yes exactly this error |
10:58:11 | FromGitter | <alehander42> sealmove, well it just means that |
10:58:12 | FromGitter | <alehander42> hm |
10:58:51 | * | traviss joined #nim |
11:00:01 | FromGitter | <alehander42> yeah so the problem is |
11:00:21 | FromGitter | <alehander42> result.someInt |
11:00:27 | FromGitter | <alehander42> should be a valid pointer |
11:00:35 | FromGitter | <alehander42> because basically that's what you make nim beleive |
11:00:43 | FromGitter | <alehander42> so the gc tries to dereference this value |
11:01:01 | FromGitter | <alehander42> c.refcount = c.refcount +% rcIncrement |
11:01:07 | FromGitter | <alehander42> where c = result.someInt |
11:01:42 | * | endragor quit (Ping timeout: 245 seconds) |
11:01:46 | FromGitter | <alehander42> ok, its not exactly this |
11:01:49 | sealmove | is result.someInt not a valid pointer? why? |
11:01:53 | FromGitter | <alehander42> but its a pointer based on that |
11:01:58 | FromGitter | <alehander42> well, is it |
11:02:03 | FromGitter | <alehander42> i cant debug your program |
11:02:11 | FromGitter | <alehander42> but thats how i can reproduce it |
11:02:22 | FromGitter | <alehander42> if i cast a int which is not valid pointer |
11:03:55 | sealmove | i see, thanks! |
11:03:56 | FromGitter | <alehander42> the bigger problem is |
11:04:01 | FromGitter | <alehander42> it cant be valid |
11:04:03 | FromGitter | <alehander42> possibly |
11:04:16 | FromGitter | <alehander42> because someInt is not 64bit |
11:04:28 | FromGitter | <alehander42> and at least on some arch like mine, pointers are 64bit |
11:17:54 | * | Hideki_ joined #nim |
11:24:21 | * | navinmistry quit (Remote host closed the connection) |
11:24:32 | * | navinmistry joined #nim |
11:26:32 | dom96 | So this is fun https://twitter.com/d0m96/status/1177907262104522753 |
11:26:42 | dom96 | My Nim program suddenly started to repro a macOS bug |
11:26:46 | dom96 | Guess it's time to upgrade |
11:29:42 | * | Hideki_ quit (Remote host closed the connection) |
11:30:45 | * | Hideki_ joined #nim |
11:35:44 | * | Hideki_ quit (Ping timeout: 276 seconds) |
11:52:47 | FromGitter | <alehander42> is there a lib |
11:52:52 | FromGitter | <alehander42> for git diff parsing |
12:07:14 | * | navinmistry quit (Remote host closed the connection) |
12:11:10 | * | Hideki_ joined #nim |
12:11:34 | FromGitter | <alehander42> i can parse it for my needs |
12:11:34 | FromGitter | <alehander42> for now |
12:16:02 | * | Hideki_ quit (Ping timeout: 276 seconds) |
12:21:46 | Zevv | parsing a diff, and then what? |
12:24:12 | * | nif quit (Quit: ...) |
12:24:35 | * | nif joined #nim |
12:30:19 | * | nif quit (Quit: ...) |
12:30:29 | * | nif joined #nim |
12:42:14 | FromGitter | <alehander42> ok it works |
12:42:20 | FromGitter | <alehander42> well, i was doing a prototype for wok |
12:42:23 | FromGitter | <alehander42> work |
12:42:42 | * | NimBot joined #nim |
12:42:49 | FromGitter | <alehander42> so i can just iterate and check for 1-2 string matches |
12:43:07 | FromGitter | <alehander42> while passing -U:hugenumber to get a whole file context diff |
12:45:16 | planetis[m] | sealmove, why don't you use inheritance everything seems to inherit from DefaultEndianExprIsBe, no? also you cast from an object type to a one with different layout |
12:46:07 | * | Hideki_ joined #nim |
12:47:45 | sealmove | the other types don't inherit anything from DefaultEndianExprIsBe, they are simply contained within it. |
12:48:04 | sealmove | yeah, the cast is completely wrong, I found a better way to do it. |
12:49:03 | sealmove | (i want to have an explicit tree structure, not inherit stuff) |
12:51:57 | planetis[m] | right :) you are doing pretty complex stuff, what are these for, making anything in particular? |
12:52:16 | * | endragor joined #nim |
12:53:44 | * | LargeEpsilon joined #nim |
12:56:26 | * | Hideki_ quit (Ping timeout: 240 seconds) |
12:58:53 | * | Trustable quit (Remote host closed the connection) |
12:59:56 | * | navinmistry joined #nim |
13:00:14 | * | endragor quit (Ping timeout: 276 seconds) |
13:00:17 | FromDiscord | <Shield> websocket keeps closing and kills my bot, heartbeats work fine, anybody can help? |
13:01:00 | FromDiscord | <Shield> I get 'Exception message: Connection was closed before full request has been made Exception type: [ProtocolError]' |
13:01:56 | planetis[m] | why every vector lib in nim does ``sqrt(x*x+y*y)`` and not ``hypot(x, y)`` is it better? |
13:04:47 | * | navinmistry quit (Ping timeout: 276 seconds) |
13:05:26 | * | daddoo joined #nim |
13:05:27 | * | owl_000 quit (Ping timeout: 245 seconds) |
13:07:49 | * | Vladar quit (Remote host closed the connection) |
13:12:14 | * | gangstacat quit (Quit: ฤis!) |
13:14:25 | * | Hideki_ joined #nim |
13:15:47 | * | Hideki_ quit (Remote host closed the connection) |
13:15:52 | * | Vladar joined #nim |
13:15:55 | * | gangstacat joined #nim |
13:17:27 | sealmove | planetis: working on a Nim backend for Kaitai Struct: https://kaitai.io |
13:20:14 | sealmove | so the code you saw is also auto-generated with scala |
13:21:40 | dom96 | hah, I found the problem. Even kernel panics are caused by doing the wrong thing. I was starting a new async proc for each network message I was receiving, and this async proc was scheduling more and more events causing more and more traffic. Still, if this got into the wrong hands it could be a pretty good way to kill people's macs |
13:26:17 | * | Hideki_ joined #nim |
13:31:26 | * | Hideki_ quit (Ping timeout: 276 seconds) |
13:39:57 | dom96 | ooh, GitHub tweeted about Nim v1 |
13:39:59 | dom96 | Awesome |
13:50:12 | lqdev[m] | dom96: did you just say kernel panic? show me how |
13:50:16 | lqdev[m] | I want to experience it on my own computer |
13:50:29 | dom96 | not really a panic tbh |
13:50:35 | dom96 | it killed the network stack |
13:50:48 | dom96 | can't show the code, it's proprietary :P |
13:51:14 | Zevv | dom96: seriously, you killed the network stack beyond recovery from userspace? |
13:51:45 | * | mibr quit (Ping timeout: 265 seconds) |
13:55:16 | dom96 | yep |
13:57:57 | dom96 | Zevv, https://twitter.com/d0m96/status/1177902838451716096 |
13:58:48 | Zevv | ha fun stuff! |
14:00:37 | * | endragor joined #nim |
14:00:58 | sealmove | guys, do you think I should use g++ backend instead of gcc? |
14:01:09 | sealmove | i never cared but now it's code in production running on travis... |
14:01:17 | sealmove | so maybe it's more important. any suggestions? |
14:04:59 | clyybber | sealmove: It doesn't matter unless you use the cpp backend |
14:05:09 | * | exelotl joined #nim |
14:05:46 | sealmove | i meant c vs cpp backend |
14:06:27 | FromDiscord | <mratsim> if you use a lot of exceptions, you probably should use C++ |
14:06:31 | * | Hideki_ joined #nim |
14:06:59 | FromDiscord | <Rika> why so? |
14:07:26 | FromDiscord | <mratsim> because it will use use C++ native zero-cost exceptions with the dwarf table magic |
14:07:51 | FromDiscord | <mratsim> in C, Nim has its own implementation |
14:10:13 | sealmove | For now I don't use many exceptions but maybe I will later. So I guess the only reason to go with c instead of cpp is c interoperability? Otherwise cpp is superior? |
14:13:53 | disruptek | the c backend is far better tested and exceptions work as expected. i wouldn't use cpp unless you need to run cpp code. |
14:15:23 | FromDiscord | <mratsim> cpp is now part of the test suite though. |
14:16:30 | sealmove | i see, thanks guys |
14:16:31 | FromDiscord | <mratsim> One issue I've had is when compiling C code (not wrapping) in C++ mode, sometimes the C++ compiler complains because the C code was using C only capabilities like VLAs or C99 constructs |
14:17:07 | * | Hideki_ quit (Ping timeout: 245 seconds) |
14:18:57 | * | LargeEpsilon quit (Ping timeout: 240 seconds) |
14:19:20 | Zevv | Yeah I had a similar issue when trying to compile C++ with a C compiler, it complained because C++ code was using things like classes and templates |
14:19:26 | Zevv | :) |
14:20:59 | disruptek | weird. |
14:21:25 | disruptek | boy you play with some crazy tools over there, Zevv. ๐ |
14:22:23 | Zevv | well, I do my best. I lose a finger or a eye every now and then, but everything for science, right |
14:29:09 | * | clyybber quit (Quit: WeeChat 2.6) |
14:33:17 | planetis[m] | what was the reasoning for deprecating basic2d? I mean besides needing maintainance (obvious), it is more documentation than any other vector lib in nimble. |
14:34:20 | planetis[m] | *it has |
14:35:17 | * | traviss quit (Quit: Leaving) |
14:37:20 | sealmove | how to add a ci job for nim? >_< https://github.com/kaitai-io/ci_targets https://github.com/kaitai-io/ci_targets/blob/master/.travis.yml |
14:38:42 | * | owl_000 joined #nim |
14:50:26 | * | solitudesf joined #nim |
14:50:30 | * | Hideki_ joined #nim |
14:54:37 | * | Hideki_ quit (Ping timeout: 240 seconds) |
15:04:04 | shashlick | Check out the choosenim Travis |
15:05:17 | shashlick | Nimble actually |
15:05:21 | shashlick | https://github.com/nim-lang/nimble/pull/714/files |
15:05:30 | shashlick | That pull request has Windows enabled too |
15:07:17 | * | theelous3 joined #nim |
15:12:03 | * | owl_000 quit (Ping timeout: 240 seconds) |
15:12:26 | FromDiscord | <Kiloneie> What does the echo procedure do in the background to make int +/*- float operations work, but not when using variables of type int and float ? |
15:13:54 | FromDiscord | <Rika> is there a guide for test writing |
15:14:08 | sealmove | Rika: for the Nim project specifically? |
15:14:56 | * | navinmistry joined #nim |
15:15:23 | FromDiscord | <Rika> uh no generic test writing for any project in nim |
15:18:49 | FromDiscord | <Kiloneie> What voodoo happens in the fourth line ? https://play.nim-lang.org/#ix=1Xg2 |
15:19:28 | * | navinmistry quit (Ping timeout: 245 seconds) |
15:19:42 | FromGitter | <alehander42> i daydreamed again about having a toy lang framework |
15:19:43 | FromGitter | <alehander42> https://gist.github.com/alehander42/d207c2f9a681e7c1e37c64b9576c2de7 |
15:20:13 | FromGitter | <alehander42> i really feel like if we had something like that, it might be simpler to pull out indepent impl-s of smaller/newer langs |
15:21:14 | FromDiscord | <Rika> @Kiloneie it seems like its more of how literals work rather than how echo works |
15:21:40 | FromDiscord | <Rika> @Kiloneie |
15:21:40 | FromDiscord | <Rika> https://cdn.discordapp.com/attachments/371759389889003532/627525338607386645/unknown.png |
15:22:25 | FromDiscord | <Kiloneie> i gotta explain this, if my watcher tries to echo it without variables, they will wonder what the hell is going on... i do too |
15:22:51 | FromDiscord | <exelotl> @Rika if you make a new package with `nimble init` it should generate a 'test' folder for you with a simple example |
15:23:37 | FromDiscord | <Kiloneie> i don't get it, since if echo is made using untyped, it should work with variables as well... |
15:23:55 | FromDiscord | <Rika> @exelotl ah thanks, didn't realize |
15:24:19 | FromDiscord | <exelotl> np :) |
15:26:09 | FromDiscord | <Kiloneie> Well till someone explains me this voodoo, i will have to jump over it for my video <.< |
15:26:56 | * | nsf quit (Quit: WeeChat 2.5) |
15:28:04 | FromDiscord | <Rika> im looking into it |
15:29:35 | sealmove | Rika: There is the unittest module |
15:30:27 | sealmove | Sadly if you use unittest you have to write everything on 1 file |
15:31:15 | * | filcuc joined #nim |
15:31:51 | * | LargeEpsilon joined #nim |
15:32:09 | filcuc | i'm developing a qtcreator plugin for nim that uses nimsuggest and i use the --refresh options. I see a continous creation/deletion of temp_$random_number.nims files in the project root dir |
15:32:32 | FromDiscord | <exelotl> sealmove: not really, if you run `nimble test` and there are multiple files in the tests directory, it will run all of them |
15:32:39 | filcuc | or could be causes by nimble --task command? |
15:32:43 | sealmove | help? :? https://travis-ci.org/sealmove/ci_targets/jobs/590819104 |
15:32:44 | filcuc | caused |
15:32:47 | Araq | alehander42: modern languages are complex beasts and "simple" doesn't cut it. it's not accidentical complexity either |
15:33:19 | Araq | filcuc: nimsuggest doesn't create .nims files, something else must be going on |
15:33:19 | filcuc | yes |
15:33:35 | filcuc | Araq: got it is the "nimble tasks" |
15:33:57 | filcuc | Araq: catched with inotifywait |
15:34:01 | Araq | alehander42: take 'closures' for example. spent in total probably 6 months on it |
15:34:39 | Araq | there is nothing "simple" about it, it's just that every language has it and nobody thinks about it |
15:34:59 | Araq | the interaction between generics and subtyping also leads to complexity |
15:35:22 | Araq | and again, nothing that programmers think about, but that doesn't make it "simple" |
15:36:30 | FromDiscord | <Kiloneie> @Araq Can you explain me why the fourth line works but not the 5th ? https://play.nim-lang.org/#ix=1Xg2 |
15:37:00 | narimiran | because there is a difference between variables and literals |
15:37:36 | filcuc | dom96: can you give a workaround for these file creation |
15:39:00 | filcuc | or is there a way to call nimble tasks from a different directory? |
15:39:10 | Araq | you think like "3 + 4 is an expression and it has a type, I can encode it in a language agnostic AST and then translate X to Y to Z", but more realistic is obj.field.array[if cond: i else: j+4] = f(typeof g()) |
15:39:10 | filcuc | in order to create these files somewhere else |
15:40:37 | FromDiscord | <Kiloneie> Thanks narimiran, went to google and found my answers... constants wii |
15:41:00 | Araq | and obj.field might mean obj[].field, stuff is only simple when you look at silly FP 'fib' examples all day long |
15:41:05 | FromDiscord | <Kiloneie> i didn't know constants were also called literals |
15:48:50 | filcuc | dom96: ping |
15:49:34 | FromGitter | <alehander42> Araq, i agree but thats not what i am proposing |
15:49:41 | * | endragor quit (Remote host closed the connection) |
15:50:12 | FromGitter | <alehander42> I am aware one would need to mostly write down all the semantic checking manually |
15:51:29 | FromGitter | <alehander42> But still there are several things :there are other not so original parts of compilers which can beach reused more :llvm already proves it for some backend passes |
15:52:25 | FromGitter | <alehander42> And if you write down a independent implof a language, you dont havr to design it again, you can look at how it is designed and just try to implement that |
15:59:50 | filcuc | Araq: personal question (you know those who do, do the other complain). Don't you think that the language has too much freedom (partial case insensitive, multiple syntax for calling a function, multiple way to return a function value, multiple memory managers) |
16:00:53 | FromGitter | <alehander42> And there is nothing automatic here :you specify how you check dot access and how is it converted to e.g. IR and what code is generated, it just adds some convention and something like a big Lib of helpers to leave only the actual language logic and not the "here it's this algorithm to build a tree, here this one to generate our own custom backend builder, here is our own custom debug info and custom hash logic" etc |
16:02:08 | FromGitter | <alehander42> Those make perfect sense in an actual impl, but i am aiming for the prototype and reimpl of small lang |
16:02:15 | FromGitter | <alehander42> UzecZe |
16:02:23 | FromGitter | <alehander42> Usecase |
16:05:00 | FromGitter | <alehander42> Tl dr, this is mostly an idea, i dont have much time for it, i hoped zevv would build it |
16:05:14 | FromGitter | <alehander42> (sorry zevv i am a free loader |
16:06:56 | * | traviss joined #nim |
16:07:12 | * | Traviss__ joined #nim |
16:09:46 | * | uu91 joined #nim |
16:14:39 | * | rockcavera quit (Remote host closed the connection) |
16:19:21 | Zevv | need what? |
16:19:50 | disruptek | alehander42 wants you to whip up a lisp for him. |
16:20:17 | Zevv | is a forth or a basic ok? |
16:20:35 | disruptek | i doubt it. this is a road that only leads to lisp. |
16:20:35 | Zevv | those are from the 70's as well |
16:20:56 | disruptek | i don't think it's vintage he's after, sadly. |
16:21:19 | FromGitter | <alehander42> Oh no all lang are fine |
16:21:28 | FromGitter | <alehander42> Forth is a good example thanks |
16:21:32 | Zevv | hm ok, i can make that, but he has to provide the eval and apply |
16:22:10 | disruptek | hah |
16:22:18 | Zevv | but seriously, what is it you need, i missed the beginning |
16:22:44 | disruptek | he wants an irc client with scrollback. seems that you need one too. ๐ |
16:23:03 | Zevv | I have that. but I'm lazy |
16:23:33 | Zevv | sorry, Im a bit of a freeloader |
16:26:14 | * | rockcavera joined #nim |
16:27:27 | Zevv | I read back. He wants a pony with free lunches |
16:28:01 | disruptek | sounds about right. |
16:28:39 | disruptek | i can provide a dog with a saddle if you can handle the shipping. |
16:30:48 | Zevv | it better be gold |
16:31:07 | FromDiscord | <treeform> disruptek, here are the APIs I use: https://github.com/treeform/googleapi/tree/master/src/googleapi |
16:31:22 | disruptek | which one first? |
16:31:57 | FromDiscord | <treeform> For my blog I use the drive API to get document JSON objects. Lets go with that one. |
16:32:12 | disruptek | and you have signing somewhere? |
16:32:29 | FromDiscord | <treeform> oops sorry not drive, its document API, but I use the drive API to get the list |
16:32:37 | FromDiscord | <treeform> https://github.com/treeform/googleapi/blob/master/src/googleapi/documents.nim#L7 |
16:32:39 | disruptek | or if you have a spec i can impl it. |
16:33:00 | FromDiscord | <treeform> Here is how I do the signing: https://github.com/treeform/googleapi/blob/master/src/googleapi/connection.nim#L36 |
16:33:27 | FromDiscord | <treeform> Its kind of complex and you need to keep refreshing the token when it gets stale... |
16:34:10 | disruptek | that's okay, this looks pretty easy compared to amazon's. |
16:34:20 | disruptek | you may have just saved christmas. |
16:34:25 | FromDiscord | <treeform> It requires another library jwt that has the "meat" |
16:34:42 | FromDiscord | <treeform> and that requires openSSL lib of the right version some times |
16:35:07 | FromDiscord | <treeform> https://github.com/treeform/jwt |
16:35:16 | disruptek | do you have tests or a link to some sample values? |
16:35:20 | disruptek | something i can publish? |
16:35:36 | Zevv | alehander42: its a nice thought that something like this would exist indeed. Its one of those problems you meet a number of times in your career, and each time it is just too much work to get it all the way right. some kind of toolkit of libs would also be a good start, it doesnt need to generate your lang end to end, but having the proper legoes that fit eachother could really ease the task |
16:35:55 | FromDiscord | <treeform> disruptek, I don't want to publish my private API key? |
16:36:15 | FromDiscord | <treeform> disruptek, is that what you are asking? |
16:36:17 | disruptek | i know, just wondering how you built this? just guessing? |
16:37:00 | disruptek | eg. https://github.com/disruptek/sigv4/blob/master/sigv4.nim#L249 |
16:37:14 | FromDiscord | <treeform> disruptek, I build it by getting a google account, and creating a service account which gives you a json blog you use, then hitting endpoints I need till it worked. |
16:38:03 | FromDiscord | <treeform> disruptek, the JWT lib has the tests like this: https://github.com/treeform/jwt |
16:38:17 | disruptek | yeah, i use google; i was just hoping to be able to provide tests that confirm that signing works as i do with amazon. no biggie. we should have all google services working by the end of the day. ๐ |
16:38:38 | FromDiscord | <treeform> I think you will find that at the end of the readme |
16:39:04 | disruptek | yeah, that should be enough to satisfy a signing test. |
16:39:20 | FromDiscord | <treeform> its not quite as good as your aws thing |
16:39:58 | disruptek | why not? |
16:40:34 | disruptek | should be just as good, i think. why did you have to fork from yuriy's stuff? |
16:40:35 | rayman22201 | @clyybber andrewbriggs is a troll that has decided to personally attack me. Long story... Please just ignore him. I'm sorry for any inconveniences from him... |
16:41:37 | FromDiscord | <treeform> disruptek, I think there was some thing I needed to edit |
16:42:13 | disruptek | it looks like you are behind his branch. i should use your branch, right? |
16:42:24 | FromDiscord | <treeform> disruptek, some stupid windows issue: https://github.com/yglukhov/nim-jwt/compare/master...treeform:master |
16:42:50 | FromDiscord | <treeform> Also added windows DLLs which are very hard to find or build. |
16:43:04 | narimiran | rayman22201: heh, i was wondering what was going on there |
16:44:25 | FromDiscord | <treeform> disruptek, I don't know up to you. If you are not on windows it probably does not matter. |
16:44:37 | disruptek | treeform: GoogleExcpetion* = object of Exception ... spelling? |
16:45:05 | disruptek | eh it doesn't matter, but there's no harm in using your branch if you are okay with maintaining it. all the apis will rely upon that code. |
16:45:09 | FromDiscord | <treeform> disruptek, yglukhov is also a fork, this is the original: https://github.com/ekarlso/nim-jwt |
16:45:23 | disruptek | right, but i don't want to go all the way back to that. |
16:45:45 | rayman22201 | So annoying. He has been harrassing me for years. Sorry :-/ |
16:45:55 | FromDiscord | <treeform> disruptek, sorry about the spelling |
16:46:18 | disruptek | just thought you might want to adjust it in your code. |
16:46:32 | FromDiscord | <treeform> disruptek, yeah ill fix it really quick |
16:47:25 | FromDiscord | <treeform> disruptek, I wish there was just a pure nim way to sign JWT. I the openSSL dependency has been a pain. |
16:48:11 | planetis[m] | can someone explain me whats wrong with basic2d module, would it be hard to maintain it? |
16:49:07 | disruptek | well, i'll just simplify this for the generated apis and once we know it works, we could experiment with other options as they become available. |
16:50:23 | disruptek | wanna make a release of your jwt branch? |
16:51:17 | FromDiscord | <treeform> disruptek, what do you mean by release? Like a github one? |
16:51:35 | disruptek | sure; just something i can put a dependency on. |
16:52:38 | FromDiscord | <Rika> in the doc for unittest it mentions something called `testament` |
16:52:51 | FromDiscord | <treeform> disruptek, never done this before |
16:53:05 | FromDiscord | <treeform> disruptek, is this good? https://github.com/treeform/jwt/releases/tag/0.0.1 |
16:53:22 | disruptek | looks great, thanks. |
16:55:09 | * | rockcavera quit (Remote host closed the connection) |
16:57:42 | FromDiscord | <treeform> @Rika `testament` is tool to run compiler tests for nim |
16:58:21 | FromDiscord | <treeform> @Rika you don't need it if you are not writing compiler or standard library changes |
17:02:31 | sealmove | guys, do you know proper way to set PATH in travis? https://travis-ci.org/sealmove/ci_targets/jobs/590848061 |
17:03:27 | sealmove | `echo "export PATH=~/.nimble/bin:$PATH" >> ~/.profile` didn't work |
17:04:45 | * | endragor joined #nim |
17:05:19 | FromDiscord | <Rika> @treeform sounds like something to indicate in the docs for unittest |
17:06:06 | narimiran | but that's just not true |
17:06:28 | narimiran | since recently, you can use testament not only for compiler and stdlib |
17:07:02 | narimiran | the reason why testament is mentioned in unittest docs is to draw your attention to it |
17:10:02 | * | endragor quit (Ping timeout: 240 seconds) |
17:10:03 | FromDiscord | <Rika> who is right here ;n; |
17:10:18 | disruptek | narimiran |
17:10:31 | narimiran | yay, i win! :D |
17:10:51 | disruptek | <-- the final arbiter of truth. |
17:13:48 | * | mibr joined #nim |
17:19:40 | FromDiscord | <treeform> narimiran, wins |
17:30:10 | * | clyybber joined #nim |
17:32:06 | Araq | filcuc: no, I don't think that and I haven't seen the flexibility cause bugs. |
17:32:38 | * | aEverr quit (Ping timeout: 265 seconds) |
17:32:39 | Araq | which is an objective criterion. |
17:33:06 | * | Hideki_ joined #nim |
17:33:16 | Araq | syntax which causes bugs was removed like '.. <' instead of '..<' |
17:33:16 | * | aEverr joined #nim |
17:34:02 | clyybber | Araq: Hi, I did the injectdestructors refactoring without the pExpr/pStmt split |
17:35:18 | clyybber | Am still waiting for cooldomes feedback, since he had some problems which only surfaced in his own code; |
17:35:23 | shashlick | @filcuc those files are created by nimble |
17:35:27 | shashlick | What's your concern |
17:37:56 | Araq | clyybber: ok |
17:39:57 | * | filcuc quit (Ping timeout: 240 seconds) |
17:48:03 | FromGitter | <alehander42> Zevv thats ehat i want yeah |
17:48:17 | FromGitter | <alehander42> Basically like rails for front-ends |
17:48:21 | * | filcuc joined #nim |
17:48:21 | FromGitter | <alehander42> Of compilers |
17:48:32 | clyybber | Araq: Also https://github.com/nim-lang/Nim/pull/12268 can now be merged, GULPF has merged the PR and published a new version on nimble so the tests are now green. |
17:49:02 | Araq | alehander42: flex + bison + LLVM IR, done |
17:49:09 | Araq | ;-) |
17:49:11 | FromGitter | <alehander42> You write down your compiler yourself it just gives you stuff for free |
17:50:13 | FromGitter | <alehander42> Well, I'd argue it's something similar but with more |
17:50:14 | FromGitter | <alehander42> Ah |
17:50:30 | FromGitter | <alehander42> I need to write a simple example project to demonstrate |
17:50:42 | FromGitter | <alehander42> It's just hard to explain without example |
17:50:59 | Araq | flex + bison + Ocaml's sum types + LLVM IR ? |
17:51:42 | Araq | I can see it working if you don't base it on pegs (sorry Zevv !) |
17:52:17 | Araq | but you need to watch out that "extensibility" doesn't mean I get to do string comparisons for node kinds |
17:52:58 | Araq | the ideal AST is not extensible, the ideal is that you can enumerate every case to ensure you covered it all |
17:53:29 | Zevv | Oh, sure, that's not what pegs are good for IMHO. |
17:54:55 | Zevv | alehander42: I kind of feel where you're going with this, but my cynism kicks in here: this stuff is the pot of gold tens of thousands of CS people have been dreaming of for ages. *something* must be pretty hard here. |
17:54:59 | Araq | alehander42: the x[].f example wasn't random, it shows how language specific constructs end up in the AST even in place where you didn't anticipate it |
17:56:34 | Araq | or maybe consider how we map Nim to JS, the value types are actually quite hard to emulate (and there are still bugs left) |
17:57:26 | Araq | here is what you do: "gah, this concrete problem is hard (mapping Nim to JS) so instead I'll think about it more abstractly where it's still easy" |
17:57:39 | FromGitter | <alehander42> Yes maybe i need to say |
17:57:44 | FromGitter | <alehander42> Type providers |
17:57:46 | Araq | and that's why I'm not buying it. |
17:58:06 | FromGitter | <alehander42> Like my point is you still write your compiler |
17:58:12 | FromGitter | <alehander42> Its nothing like py2nim |
17:58:16 | Araq | so Nim->JS is hard but you take X->Y and claim it can be solved, easily. |
17:58:34 | FromGitter | <alehander42> Just a set of helper libraries and some scaffolding |
17:58:41 | FromGitter | <alehander42> No |
17:59:07 | FromGitter | <alehander42> I specifically talk about small core languages and compiling them to native code here |
17:59:13 | FromGitter | <alehander42> Its really nothing special |
17:59:23 | FromGitter | <alehander42> Just a toolkit plus some convention |
17:59:40 | Araq | ok, what's this "small core". FP? imperative? |
17:59:56 | Zevv | and it's always *just* a bit too small |
18:01:20 | FromGitter | <alehander42> Whatever |
18:01:26 | * | clyybber quit (Quit: WeeChat 2.6) |
18:01:33 | FromGitter | <alehander42> Scheme Nim go |
18:01:40 | FromGitter | <alehander42> You write your own language |
18:01:47 | * | nsf joined #nim |
18:01:48 | FromGitter | <alehander42> Nothing automatic and stuff |
18:02:04 | * | Hideki_ quit (Remote host closed the connection) |
18:02:04 | FromGitter | <alehander42> I will give an exam please project these days to show the structure |
18:02:07 | * | filcuc quit (Ping timeout: 265 seconds) |
18:02:17 | * | LargeEpsilon quit (Ping timeout: 240 seconds) |
18:02:17 | FromGitter | <alehander42> You are thinking of the x2y |
18:02:27 | FromGitter | <alehander42> Projects but its a different idea |
18:02:36 | Araq | ok, I'm listening |
18:02:51 | disruptek | yeah it's easy as long as you don't want to do anything useful. |
18:03:03 | FromGitter | <alehander42> Cheers from plovdiv |
18:03:08 | FromGitter | <alehander42> Bb |
18:03:12 | Zevv | plovdiv? |
18:03:20 | * | Hideki_ joined #nim |
18:04:12 | FromDiscord | <treeform> if you are compiling from X to Y you should compile to "mal" - Make a Lisp, it has interpreter in every other language: https://github.com/kanaka/mal |
18:04:44 | FromDiscord | <treeform> it has an interpreter even using make files |
18:04:44 | disruptek | lol |
18:05:11 | FromDiscord | <treeform> there is even a nim version, so you can write nim to mal to nim ๐ https://github.com/kanaka/mal/tree/master/nim |
18:05:45 | Araq | type T = array[5, T] |
18:05:58 | Zevv | (sorry, makefiles?) |
18:06:14 | Araq | that uses 2 features of a language, type aliases and the 'array' type constructor |
18:06:23 | Araq | and it's not even a valid program |
18:06:38 | Araq | yet you need to detect it to produce a good error message |
18:06:51 | Araq | that's how hard programming languages really are. |
18:07:17 | Araq | that's why it takes a decade to create every single one of them, roughly |
18:07:50 | FromDiscord | <treeform> Zevv, https://github.com/kanaka/mal/blob/master/make/step9_try.mk make has a built in scripting language, you can use it to write an interpreter. |
18:07:53 | Zevv | Languages come in level of complexities. |
18:08:08 | * | Trustable joined #nim |
18:08:20 | * | Hideki_ quit (Ping timeout: 276 seconds) |
18:08:50 | Araq | !eval type T = array[5, T] |
18:08:52 | NimBot | Compile failed: /usercode/in.nim(1, 6) Error: illegal recursion in type 'T' |
18:09:13 | * | Araq cheers |
18:09:54 | sealmove | All GP languages roughly have the same set of problems to solve. I don't think GP language differ a lot in complexity compared to each other. |
18:10:30 | Araq | sealmove: no, you got that wrong, Nim is special because it offers you 'result' :P |
18:10:32 | Zevv | I feel that typing adds a *lot* to the complexity. Lua for example is pretty generic and complete, but the lack of typing makes the implementation pretty consice |
18:10:33 | disruptek | how do you figure that? |
18:10:59 | disruptek | tell me how fortran is equally complex to rust. |
18:11:16 | FromDiscord | <DeltaPHC> Dynamic typing pushes the complexity of type checking onto the developer :P |
18:11:28 | Zevv | Indeed! so the compiler can be more simple. |
18:11:41 | FromDiscord | <DeltaPHC> But then the developer can get it wrong |
18:11:48 | Araq | Zevv: that's correct. DT is a great simplifier. |
18:12:05 | Zevv | But DT is what brought me here |
18:12:07 | Araq | if you want a simple language, make it dynamically typed |
18:12:26 | * | daddoo quit (Quit: Leaving) |
18:13:41 | Zevv | My forth has only one type, but is it static or dynamic? :) |
18:15:23 | FromDiscord | <treeform> you need two types some sort of composition type and some sort of terminal type? |
18:15:37 | FromDiscord | <treeform> like cons cell and symbol in lisp? |
18:17:16 | Araq | Zevv: one type == dynamic. |
18:17:36 | Zevv | no wonder it's so small then! |
18:17:41 | Araq | yup |
18:17:46 | Zevv | :) |
18:18:17 | Araq | C's precursor, BCPL also had only one type |
18:18:46 | Zevv | but would you argue that was a dynamic language? |
18:19:14 | FromDiscord | <DeltaPHC> Has it ever been considered for Nim to have some kind of extensible type system? Perhaps like how some languages can treat types as values at compile time |
18:19:17 | Araq | yeah. dynamic typing means "one type" |
18:19:41 | Araq | Zevv: there is no "argument" here, every type theorist agrees. |
18:19:54 | Zevv | I trust you |
18:20:06 | FromDiscord | <treeform> Araq, I think BCPL had pointers? |
18:20:17 | Araq | no, it had 'words'. |
18:20:25 | Araq | you can deref any word |
18:20:39 | FromDiscord | <treeform> yeah I guess 1 type you could use both ways |
18:20:47 | Araq | memory is an array of words. |
18:22:03 | Trustable | FYI: Geany 1.36 is released including rudimentary Nim support :) https://github.com/geany/geany/releases/tag/1.36.0 |
18:22:11 | Araq | "dynamic typing" makes no sense really, types are always static by definition. |
18:24:19 | Araq | but that's smart-assing |
18:26:39 | Zevv | (everybody agrees in silence) |
18:27:02 | FromDiscord | <demotomohiro> I'm trying to implement "If on Windows, path and base do not agree on the drive letter, return `path` as is" in os.relativePath. |
18:27:02 | FromDiscord | <demotomohiro> But there are many way to specify a root of path like "c:\", "\\server\share\", "\\.\c:\", "\\.\UNC\server\share\", "\\.\volume{...}", etc on windows. |
18:27:02 | FromDiscord | <demotomohiro> Should it support paths with "\\.\" or "\\?\" prefix on windows? |
18:29:08 | Araq | well we have file normalization that you can try |
18:29:16 | Araq | pathnorm module or similar |
18:29:24 | Araq | a recent addition |
18:32:25 | FromDiscord | <demotomohiro> does that normalization normalize path like "\\.\c:\foo" to "c:\foo"? |
18:33:32 | Araq | maybe. |
18:34:09 | Araq | I doubt it though because I never understood \\ |
18:36:08 | FromDiscord | <demotomohiro> This is page about File path formats on Windows systems |
18:36:08 | FromDiscord | <demotomohiro> https://docs.microsoft.com/en-us/dotnet/standard/io/file-path-formats |
18:37:04 | FromGitter | <zacharycarter> (https://files.gitter.im/nim-lang/Nim/SeVo/image.png) |
18:37:09 | * | Hideki_ joined #nim |
18:37:32 | sealmove | wow Geany supports Nim? |
18:38:05 | FromDiscord | <demotomohiro> C drive can be "c:\", "\\.\c:\" or "\\?\c:\". |
18:40:14 | FromDiscord | <demotomohiro> There is `PathIsSameRootW` windows API, but it returns wrong result when I use "\\.\" prefix. |
18:41:29 | FromDiscord | <demotomohiro> Maybe most of peope don't use path "\\.\" prefix? |
18:42:46 | FromDiscord | <demotomohiro> Maybe DOS device paths are added to windows recenty and not much used. |
18:43:16 | * | actuallybatman joined #nim |
18:45:13 | FromGitter | <zacharycarter> I guess my iqm model loader worked :) |
18:45:17 | Araq | demotomohiro: it helps to think in the terms "worse or better" rather than "right or wrong" |
18:48:18 | FromGitter | <awr1> what's the problem with npeg? is it that it only takes in strings as input? |
18:50:37 | * | Hideki_ quit (Ping timeout: 240 seconds) |
18:50:41 | disruptek | where to begin? |
18:50:55 | FromGitter | <awr1> i haven't used npeg that much so forgive me |
18:53:02 | Araq | most peg implementations are slower than DFAs |
18:53:46 | Araq | and pegs encourage you to conflate the lexing and the parsing step and I don't like that |
18:54:48 | FromGitter | <awr1> well that's kinda what i was referring to, npeg takes in a string and not, for instance, a seq of lexed tokens |
18:55:09 | FromDiscord | <demotomohiro> @Araq |
18:55:09 | FromDiscord | <demotomohiro> `relativePath(r"c:\hoge", r"d:\piyo")` still returns ..\..\c:\hoge in latest devel. |
18:55:09 | FromDiscord | <demotomohiro> So, just checking drive latter make it better. |
18:55:53 | Araq | indeed :-) |
18:58:53 | FromDiscord | <Kiloneie> Here i go again: https://youtu.be/aa5WKYzqZI4 |
19:00:08 | FromDiscord | <treeform> @Kiloneie at this rate you will have 100s of hours of lessons ๐ |
19:00:40 | FromDiscord | <Kiloneie> Thank you ๐ |
19:00:59 | * | sealmove quit (Quit: WeeChat 2.6) |
19:01:12 | FromDiscord | <Kiloneie> i got lazy though, this was made in 3.5 hours, compared to insane amount that went into the intro, and about 8-10 hours on the second one, i got better, so i go lazy D: |
19:01:25 | FromDiscord | <Kiloneie> should make the next one 10 minutes long. |
19:01:43 | FromDiscord | <treeform> You might just be getting better at videos |
19:01:56 | FromDiscord | <Kiloneie> yeah writting them and recording editing |
19:02:08 | FromDiscord | <Kiloneie> today i also fixed waveform problems finally <.< |
19:02:21 | FromDiscord | <Kiloneie> editing based on listening sucks hard |
19:05:07 | shashlick | Everyone - what's your top irritation with your editor |
19:05:08 | FromDiscord | <Kiloneie> Tomorrow i gotta make something more interesting, a calculator hopefully, last few videos were just learning about programming, not much actual applications |
19:05:35 | FromDiscord | <Kiloneie> i don't think i have an irritation with VS Code... |
19:06:10 | FromDiscord | <Kiloneie> it's just... great :), although when a problem occurs besides telling me explanation from nim's compiler it can't offer any solutions... i guess that one |
19:06:10 | Araq | shashlick: auto-complete without me using an explicit control-space |
19:06:24 | FromDiscord | <Kiloneie> omg you are right |
19:06:28 | FromDiscord | <treeform> shashlick, I also don't really have an irritation with VS Code... |
19:06:58 | FromDiscord | <Kiloneie> you write a type section and you wanna go to the next line but it will autocomplete instead D: |
19:07:17 | disruptek | not enough bugs. |
19:07:30 | FromDiscord | <treeform> shashlick, before VS code was was really irritated and wrote my own editor that i used for 5 years. Now I use VS code. |
19:07:44 | FromDiscord | <Kiloneie> xD maniac |
19:07:45 | shashlick | Sounds fair |
19:08:03 | shashlick | I cannot accept 1gb+ ram usage |
19:08:11 | FromDiscord | <treeform> yeah that suxs |
19:08:21 | FromDiscord | <treeform> I used sublime for a bit |
19:08:29 | shashlick | I intend adding lsp support to feud |
19:08:33 | disruptek | nvim: 300m |
19:08:38 | FromDiscord | <treeform> I have ton of editor ideas though... |
19:08:49 | shashlick | I want to make the best editor in Nim |
19:09:01 | shashlick | Now that I'm unblocked, I'll be going all in |
19:09:03 | FromDiscord | <treeform> this is 10 years old but ideas are still cool: https://www.youtube.com/watch?v=PsPX0nElJ0k |
19:09:04 | disruptek | editor doesn't support STOMP. ๐ |
19:09:17 | FromDiscord | <treeform> shashlick, can you get on discord we can maybe talk or PM? |
19:09:23 | FromDiscord | <treeform> talk with voice |
19:09:36 | FromDiscord | <Kiloneie> but aporia was full Nim IDE... |
19:09:50 | FromDiscord | <Kiloneie> which i only read about o,o |
19:09:59 | shashlick | Sure @treeform, I can create an account |
19:10:03 | * | mibr quit (Ping timeout: 246 seconds) |
19:10:07 | * | navinmistry joined #nim |
19:10:08 | shashlick | What's your time zone |
19:10:18 | shashlick | Not about to right now |
19:10:24 | FromDiscord | <treeform> America/Los_Angeles |
19:10:49 | shashlick | Ok 2 hours behind, makes it easy |
19:11:17 | FromDiscord | <Kiloneie> that video seems interesting |
19:12:26 | FromDiscord | <treeform> This is great too: https://kakoune.org/why-kakoune/why-kakoune.html |
19:12:36 | FromDiscord | <Kiloneie> omg someone make this IDE |
19:14:28 | * | navinmistry quit (Ping timeout: 245 seconds) |
19:18:01 | FromDiscord | <Kiloneie> there are so many awesome software coming out in the last few years |
19:18:21 | FromGitter | <genotrance> I'd try kakoune if it wasn't Linux only |
19:19:11 | shashlick | @treeform l'll ping you later to talk |
19:19:17 | FromDiscord | <treeform> I like the idea of "reversing" the vi commands, the after reading that the vi commands feel kind of backwards |
19:19:17 | shashlick | What editor did you make |
19:19:38 | FromDiscord | <treeform> https://github.com/treeform/asterisk |
19:20:57 | FromGitter | <zacharycarter> ooph coffeescript |
19:20:58 | FromGitter | <zacharycarter> :P |
19:21:48 | FromDiscord | <treeform> zacharycarter, I did a ton of coffeescript, too bad its basically dead at this point. |
19:22:01 | FromDiscord | <treeform> I hate everything js now |
19:23:35 | FromGitter | <zacharycarter> well - besides the fact that your projects with it die with it |
19:23:40 | FromGitter | <zacharycarter> I don't think cofeescript dying is a bad thing :P |
19:23:44 | FromGitter | <zacharycarter> it was pretty awful IMO |
19:23:56 | FromGitter | <zacharycarter> and yes - I agree, the modern web is a shit show |
19:24:17 | disruptek | huh, i liked it. |
19:24:26 | FromGitter | <zacharycarter> weirdo |
19:24:39 | disruptek | i mean, it had flaws, sure, but to me it was a net win. |
19:24:52 | FromDiscord | <treeform> I like coffeescript too, it allowed me to write "python" on the web |
19:25:04 | FromDiscord | <treeform> yeah it had flaws |
19:25:16 | FromDiscord | <treeform> main JS flaws though |
19:25:19 | FromGitter | <zacharycarter> it just didn't fix many things that were wrong with JS |
19:25:21 | FromDiscord | <treeform> mainly JS flaws though |
19:25:22 | disruptek | kinda pointless these days, but it was more valuable years ago. |
19:25:25 | FromGitter | <zacharycarter> nothing really has |
19:25:35 | FromGitter | <zacharycarter> because you can't fix something that is inherently broken |
19:25:53 | FromGitter | <zacharycarter> you can only replace it with something that isn't |
19:25:55 | Araq | shashlick: look at NimScript for my attempt at solving the problem |
19:25:57 | FromDiscord | <treeform> wasm soon โข |
19:25:59 | Araq | er |
19:26:03 | Araq | lol, NimEdit. |
19:26:27 | shashlick | I will - need to look at aporia and Nim edit |
19:27:00 | Araq | you need "terminal" integration |
19:27:03 | shashlick | Treeform - what os is your main driver |
19:27:05 | Araq | and doing that is hard |
19:27:18 | Araq | you can steal NimEdit's code to do it |
19:27:18 | FromDiscord | <Kiloneie> wait wait, you scrapped aporia because it wasn't up to what competition had, and decided to remake it as NimEdit ? |
19:27:24 | FromDiscord | <treeform> My editors main feature - it was for web dev. Is that you could host the backend part of the editor on any server, and edit stuff through any computer - like a chromebook, but still have nice fonts and mouse. |
19:27:38 | Araq | Kiloneie: no. |
19:28:11 | FromDiscord | <treeform> shashlick, home: Windows, work macOS. |
19:28:14 | shashlick | My idea for that is remote editing |
19:28:15 | FromGitter | <zacharycarter> I feel like building an IDE for Nim is putting the proverbial cart before the horse |
19:28:17 | Zevv | awr1: interesting point - at this time NPeg takes an sequence of Char, I'll investigate to see if it would be feasible to have it eat a sequence of whatever T. Then you could pass it a token stream and only use the grammars to define - well - the grammar |
19:28:35 | FromDiscord | <treeform> shashlick, I used Chrome OS for a year. |
19:28:36 | FromGitter | <zacharycarter> and IDEs in general stink |
19:29:09 | Araq | I wrote NimEdit to tinker with immediate mode UIs and to see if I could implement my ideas, a GTK based solution couldn't do that |
19:29:20 | FromDiscord | <Kiloneie> make what that video earlier showed as a concept, i will throw money at you if you do, once i acquire some xD... |
19:29:30 | shashlick | How did Nim edit deal with terminal |
19:29:30 | FromDiscord | <treeform> Araq, do you use Visual Code now? |
19:29:33 | FromDiscord | <Kiloneie> That's cool |
19:29:34 | Araq | yes |
19:29:45 | FromDiscord | <treeform> Visual Code is just winning and winning |
19:29:52 | FromDiscord | <treeform> it has its flaws but we all use it ... |
19:29:55 | FromDiscord | <Kiloneie> so when was NimEdit made, before or after Aporia ? |
19:30:43 | FromGitter | <zacharycarter> github has the answer |
19:31:23 | FromDiscord | <treeform> I think they both stopped evolving in 2018? |
19:32:02 | shashlick | Nimedit was later |
19:32:05 | FromGitter | <alehander42> Araq, sorry |
19:32:09 | FromGitter | <alehander42> i confused you i think |
19:32:27 | FromGitter | <alehander42> in my proposed `Lang` |
19:32:39 | FromGitter | <alehander42> you still do the same: you write code and implement a compiler |
19:33:00 | FromGitter | <alehander42> of course, it's not trivial |
19:33:06 | FromGitter | <alehander42> and you have to support the nuances |
19:33:09 | FromGitter | <alehander42> of your language |
19:33:10 | shashlick | @treeform - feud is Windows only right now, but porting to Linux and osx wouldn't be too bad since I use scintilla |
19:33:34 | FromGitter | <alehander42> all i am saying is, you receive some convention, generators and helper libs |
19:33:52 | FromGitter | <zacharycarter> https://gist.github.com/zacharycarter/d41365c3c196b0c1558446e63ad794d5 |
19:34:05 | FromGitter | <zacharycarter> driver code for the screenshot I posted earlier |
19:34:36 | FromGitter | <zacharycarter> still need to work on lighting / deferred rendering |
19:34:42 | FromGitter | <zacharycarter> as well as entities and physics |
19:34:43 | Araq | shashlick: for NimEdit I had a killer feature in mind |
19:34:49 | FromGitter | <zacharycarter> but I should be able to start on my golf game next week :) |
19:35:36 | Araq | syntax agnostic editing, "need to write C# for work? don't show the curlies and render it like Nim/Python". You like curlies? Render the Nim code with {} |
19:36:18 | Araq | Prefer 'end if' instead? another syntax theme in your editor |
19:36:59 | Araq | you can't do that with Scintilla or other prebuild editor components |
19:37:11 | Araq | you need to write your own editor for this |
19:37:16 | Araq | and so that's what I did |
19:37:25 | FromGitter | <alehander42> i think its doable with plugins in today's editors |
19:37:29 | FromDiscord | <Kiloneie> that sounds fun |
19:37:32 | FromGitter | <alehander42> i did something similar as a plugin |
19:37:33 | FromGitter | <alehander42> for sulbime |
19:37:58 | FromGitter | <alehander42> not exactly plugin maybe, but it was doable |
19:38:00 | shashlick | Sounds fun but scintilla allows me to build a ux for the near term |
19:38:16 | FromDiscord | <Kiloneie> Anyone heard of this ? apparently a Visual Studio Code fork or something... https://theia-ide.org/ |
19:38:19 | Araq | you need to be able to show fake tokens that don't really exist, I doubted that plugins can do that |
19:38:26 | FromGitter | <alehander42> you can create another "view" and run a watch which constantly updated all the views to the same "module" |
19:38:37 | FromGitter | <alehander42> well, maybe not in the same file i agree |
19:38:49 | FromGitter | <alehander42> but i imagined you can replace it with a "fake" file |
19:39:22 | shashlick | Only challenge is that scintilla maintains the editor buffer, i'd rather Nim maintained state |
19:39:45 | FromGitter | <alehander42> i actually had such a library, that renders the same "tree" with different user-defined bidirectional grammars |
19:39:56 | FromGitter | <alehander42> but never put it in an editor |
19:40:04 | FromGitter | <alehander42> it was buggy :( :D |
19:40:21 | FromGitter | <alehander42> but wasnt that nimedit thing an extension of nim syntax skins? |
19:41:11 | Araq | syntax skins are worse because then you end up with a mess ;P |
19:41:12 | FromGitter | <alehander42> the cool thing was that the user could define the syntaxes he wants with simple pseudo code like https://github.com/alehander42/hivemind/blob/master/syntaxes/pythonic.syntax |
19:41:31 | FromGitter | <alehander42> (this file is a grammar which should work both for parsing and printing ast) |
19:41:41 | FromGitter | <alehander42> but the whole thing was very messy as well :P |
19:43:03 | shashlick | Do you prefer using the mouse or keyboard shortcuts |
19:43:29 | FromGitter | <alehander42> shashlick, how similar is feud to nimedit |
19:43:37 | FromDiscord | <treeform> Both? |
19:43:38 | FromDiscord | <Kiloneie> Why not both ? |
19:43:45 | FromGitter | <alehander42> keyboard |
19:44:09 | FromDiscord | <Kiloneie> till you learn the shortcuts, you will definitely love mouse clicking |
19:44:42 | FromGitter | <alehander42> you mostly use 2-3 programs imo, its better to learn shortcuts |
19:45:24 | FromDiscord | <Kiloneie> one can always have a toggle button to hide any and all shortcut buttons |
19:46:39 | * | filcuc joined #nim |
19:46:56 | FromGitter | <awr1> my "irritating problem" in emacs is that flycheck and autocompletion don't work |
19:47:00 | FromGitter | <zacharycarter> https://imgur.com/a/cNROkhT |
19:47:01 | * | endragor joined #nim |
19:47:05 | FromGitter | <awr1> but i've grown to not really depend on them |
19:47:28 | shashlick | Feud doesn't have any buttons |
19:47:47 | shashlick | Nothing to click really |
19:48:08 | shashlick | Idea is to try a cli interface with GUI performance |
19:48:46 | FromGitter | <awr1> what is feud |
19:48:48 | FromGitter | <awr1> also nice @zacharycarter |
19:48:56 | FromGitter | <awr1> ohhh wait nvm |
19:49:00 | FromGitter | <awr1> i remember what feud is |
19:49:04 | shashlick | Feud uses scintilla and a plug-in system where even the ui is a plug-in |
19:49:20 | shashlick | So allows any sort of extensibility |
19:49:47 | shashlick | And since it is Nim, super fast to add functionality |
19:50:02 | filcuc | shashlick: the files created by nimble bother me because i've a filesystemwatcher watching the nimble project directory |
19:50:21 | filcuc | shashlick: and the watcher gets triggered everytime i execute "nimble tasks" |
19:50:32 | shashlick | I'm able to use it full time with just a couple months of work |
19:50:40 | FromGitter | <awr1> i had a pie-in-the-sky idea in my head for a long time for a modern spacemacs-like editor built in nim |
19:50:50 | filcuc | shashlick: this in turn causes a project rescan in my plugin |
19:50:51 | FromGitter | <awr1> but i don't really have any time to work on such a thing |
19:51:17 | * | endragor quit (Ping timeout: 240 seconds) |
19:51:32 | shashlick | @filcuc I understand but we have to run nimble files in the project dir since all files are relative to that path |
19:51:39 | filcuc | shashlick: i would like to know if there's a way to create them in a different directory...perhaps by executing nimble from a different directory |
19:51:53 | FromGitter | <zacharycarter> @awr1 thanks |
19:51:57 | FromGitter | <zacharycarter> that's all with opengl |
19:52:15 | shashlick | Not currently |
19:52:20 | filcuc | shashlick: maybe by providing a directory argument |
19:52:22 | FromGitter | <zacharycarter> so basically two days worth of coding |
19:53:23 | shashlick | @zacharycarter - the feud plug-in system is back online |
19:56:54 | * | LargeEpsilon joined #nim |
19:59:06 | FromGitter | <zacharycarter> nice - what'd you do? |
19:59:22 | disruptek | treeform: couldn't use your jwt to build on linux. |
20:00:11 | * | endragor joined #nim |
20:02:00 | FromGitter | <zacharycarter> shashlick: ? |
20:04:27 | * | endragor quit (Ping timeout: 240 seconds) |
20:09:21 | shashlick | https://github.com/nim-lang/Nim/issues/12286 |
20:12:04 | disruptek | that comment is interesting but not all that helpful. |
20:12:23 | disruptek | i'm still surprised that this isn't more common. |
20:16:01 | FromDiscord | <kodkuce> 1 question tought? how does nimble know what to download form, am guessing it dosent search whole github/gitlab for stuff? |
20:16:55 | disruptek | here's a question for you, shashlick: are you able to confirm that it's actually the GC_ALL_INTERIOR_POINTERS codepath that breaks you? it seems like `no`. |
20:19:05 | FromGitter | <zacharycarter> so short answer is boehm? |
20:19:49 | disruptek | just wondering if turning it on also provokes the crash; ie. it's due to a side-effect of invoking the function. |
20:19:50 | FromGitter | <zacharycarter> glad you got it figured out - but this should have always worked ;P |
20:20:46 | FromGitter | <alehander42> Araq, ill think a bit more about my example project until monday, and ill show a toy example |
20:21:16 | FromGitter | <alehander42> while waiting for people to bikeshed on https://github.com/nim-lang/RFCs/pull/169 |
20:21:26 | FromGitter | <alehander42> no bikeshedding at all people |
20:23:47 | disruptek | i really don't like `?a` because it doesn't real well aloud, to me. |
20:23:55 | disruptek | ^read well, either. |
20:24:38 | disruptek | i'd say `nilable` is the most obvious. |
20:35:16 | * | navinmistry joined #nim |
20:36:03 | * | narimiran quit (Ping timeout: 240 seconds) |
20:36:33 | * | exelotl quit (Read error: Connection reset by peer) |
20:38:23 | dom96 | filcuc, these .nims files are created because Nimble uses `nim e` to evaluate them, and in order to preserve the import paths this file needs to be placed beside the .nimble file. |
20:38:32 | dom96 | I really dislike this too. |
20:38:37 | dom96 | I'm afraid there isn't a workaround though |
20:39:02 | dom96 | Best we can do for the future is enable `nim e` to take a file via stdin |
20:39:32 | dom96 | please create an issue for this so that I can track who else considers this a problem :) |
20:39:44 | * | navinmistry quit (Ping timeout: 252 seconds) |
20:41:52 | FromGitter | <awr1> commented @alehander42 |
20:42:23 | FromGitter | <alehander42> disruptek `nilable` is a good one , i admit |
20:42:33 | FromGitter | <alehander42> but you know, i see a very simple problem with it |
20:42:36 | FromGitter | <alehander42> it's long to type |
20:42:40 | FromGitter | <awr1> i suggested `bin T` |
20:42:45 | FromGitter | <awr1> or `could T` |
20:43:21 | FromGitter | <alehander42> and whenever you have something that is long to type, and you type it often, people instead alias and add a common prefix, e.g. โ people would just write NValue = nilable Value โ and use NValue |
20:43:36 | FromGitter | <awr1> the reason i said `can nil` in the past was b/c of orthagonality but if we really want to throw `not nil` out the window |
20:43:47 | FromGitter | <alehander42> so thats why i prefer to make it easy to just use directly: but thats just a subjective thesis maybe wrong |
20:43:58 | FromGitter | <alehander42> @awr1 yes, those are shorter |
20:44:23 | FromGitter | <alehander42> what does `bin` mean here |
20:44:32 | FromGitter | <awr1> bin as a receptacle |
20:44:42 | FromGitter | <awr1> it could contain something, it could not contain something |
20:45:06 | FromGitter | <alehander42> hm, good one |
20:45:20 | FromGitter | <alehander42> but seems not so obvious to me |
20:45:30 | FromGitter | <alehander42> and you can confuse it with binary |
20:45:57 | FromGitter | <alehander42> i think `maybe`was your idea? |
20:46:02 | FromGitter | <awr1> ya |
20:46:25 | FromGitter | <awr1> or `plug T`, since it's a pointer and it "links" to something, could be plugged or unplugged |
20:49:12 | * | LargeEpsilon quit (Ping timeout: 245 seconds) |
20:49:25 | FromGitter | <awr1> i also suggested `box T`, which is similar to rust. but rust uses optional for nils, not necessarily Box<T> |
20:49:41 | FromGitter | <awr1> Naming things, the hardest thing in computer science |
20:50:51 | FromGitter | <alehander42> i answered there as well |
20:51:05 | FromGitter | <alehander42> `plug` is creative as well |
20:51:26 | FromGitter | <alehander42> but i think its too creative maybe, very hard to guess how its different than just ref |
20:51:54 | FromGitter | <alehander42> i think `maybe` and `nilable` are the closest to obvious and |
20:52:13 | FromGitter | <alehander42> even that `nilable` is a bit more exact than `nil` |
20:52:27 | FromGitter | <alehander42> but `maybe` sounds a bit like option |
20:52:53 | FromGitter | <alehander42> disruptek its true `?` isnt obvious to pronounce, but people can easily say "maybe" or "nilable" after they see it 1-2 times |
20:53:16 | FromGitter | <alehander42> and we already have it in two other langs, so i dont think thats critical, but its a valid thing to say |
20:55:11 | disruptek | nilable is stunningly obvious. if it's too long to type, how about `nilly`? |
20:56:19 | FromGitter | <spielerei> trying to understand this syntax: next*: <//>(ref DoublyLinkedNodeObj[T]) |
20:56:38 | disruptek | it's a holdover from newruntime. |
20:56:39 | FromGitter | <spielerei> where is it documented: the <//>(...) part |
20:56:53 | disruptek | it means `owned`. you can ignore it. |
20:57:07 | * | Vladar quit (Remote host closed the connection) |
20:57:30 | FromGitter | <spielerei> ty |
20:57:44 | disruptek | basically just a shim to represent `owned` in a compiler than might not know how to parse that keyword. |
20:59:09 | FromGitter | <awr1> introducing the all new keyword for nim, `schrรถdinger T` |
20:59:21 | disruptek | i think nim is expressive and succinct enough that we don't need to drop characters here and there just to reduce the column count. |
20:59:28 | disruptek | it's just not the priority. |
21:02:02 | disruptek | type MaybeNode = holds Node # ie. nilable ref |
21:02:53 | filcuc | dom96: thank you |
21:02:54 | disruptek | type MaybeNode = may ref Node |
21:03:41 | disruptek | # ie. one month out of the year it refers to a Node |
21:05:39 | * | beatmox quit (Remote host closed the connection) |
21:06:10 | * | beatmox joined #nim |
21:07:32 | * | solitudesf quit (Ping timeout: 245 seconds) |
21:08:35 | FromGitter | <alehander42> disruptek, you might be right, thats just my opinion |
21:08:52 | FromGitter | <alex65536> Hello, I have a question |
21:08:54 | filcuc | dom96: https://github.com/nim-lang/nimble/issues/720 |
21:08:58 | filcuc | dom96: thank you |
21:09:07 | FromGitter | <alex65536> I have a matrix class with seq[seq[float]] inside |
21:09:12 | Araq | 'may ref T'? |
21:09:19 | disruptek | yeah. |
21:09:37 | Araq | hmm that's something that will grow on me, I think |
21:09:55 | FromGitter | <alehander42> the problem is not in type sections: its not a problem to type it there, but in normal code, e.g. in proc declarations: โ imo it's a smell to have to do `MaybeNode = may ..` , its better to just use `may Obj` or `?Obj` everywhere |
21:09:55 | disruptek | it's short and it reads well. |
21:10:11 | FromGitter | <alehander42> does it sound well in english? |
21:10:17 | Araq | it also fits the rest of the language |
21:10:19 | FromGitter | <alehander42> i am bad at that stuff |
21:10:41 | Araq | alex65536: we're listening even if it might not look this way |
21:10:50 | disruptek | i'm biased; ask dom. |
21:11:03 | FromGitter | <alex65536> And I want to return a row from it with operator `[]` |
21:11:16 | Araq | proc foobar(x: may T; y: may S): may Q |
21:11:25 | FromGitter | <alehander42> `maybe Object` sounds as very correct english to me, but `may Object` sounds as something wrong |
21:11:25 | FromGitter | <alex65536> If the matrix is non-const, I just |
21:11:29 | FromGitter | <alehander42> but maybe my english is wrong |
21:11:33 | * | Trustable quit (Remote host closed the connection) |
21:11:54 | Araq | what about this: |
21:12:12 | Araq | proc foobar(x: nil T; y: nil S): nil Q |
21:12:16 | FromGitter | <alex65536> do `proc [](a: var Matrix, i: Natural): var seq[float]` |
21:13:02 | disruptek | to me, it's like you're painting the type with a nil brush. |
21:13:12 | FromGitter | <alehander42> well, this is the default idea i think `nil` |
21:13:28 | FromGitter | <alex65536> When I'm trying to the same thing without `var` to handle the case when the matrix is constant, it seems that the row is copied |
21:13:29 | disruptek | but the type isn't nil per se; it's merely nil-able. could be nil. |
21:13:35 | FromGitter | <alehander42> but i agree a bit that `nil A` in literal sense suggests "nil values from A" |
21:13:36 | Araq | I think I like it best, so it's a 'nil ref T' |
21:13:47 | FromGitter | <alex65536> Is there any way to prevent this? |
21:14:04 | FromGitter | <alehander42> and nilable/maybe/? is better in "value from A which might be nil" |
21:14:05 | Araq | proc `[]`(a: Matrix, i: Natural): lent seq[float] |
21:14:26 | Araq | alex65536: or make the accessor a template |
21:14:33 | Araq | then you don't need both variants |
21:14:48 | FromGitter | <alex65536> Thanks :) |
21:14:50 | disruptek | proc foo(x: may ref T; y: may ref S): may ref T |
21:14:59 | FromGitter | <alex65536> And what does `lent` do? |
21:15:00 | disruptek | ie. x may refer to a T |
21:15:12 | disruptek | the implication is that it may also be nil. |
21:15:24 | Araq | alex65536: it gives you an immutable view into the data |
21:15:32 | * | asymptotically quit (Quit: Leaving) |
21:15:37 | Araq | just like C++'s 'const& T' |
21:16:00 | FromGitter | <alex65536> Nice, thank you :) |
21:17:25 | disruptek | i guess it's not backwards compat, which kills it. |
21:18:16 | disruptek | of course, nilable isn't, either, right? |
21:19:04 | FromGitter | <alehander42> disruptek ``may refer |
21:19:06 | FromGitter | <alehander42> very smart |
21:20:06 | FromGitter | <alehander42> hm, i dont think thats a limitation |
21:20:16 | disruptek | not according to your spec. surprised me. |
21:20:16 | FromGitter | <alehander42> i just think `?Value` |
21:20:18 | FromGitter | <alehander42> is very good |
21:20:28 | FromGitter | <alehander42> it asks a question |
21:20:32 | FromGitter | <alehander42> and questions are part of life |
21:20:54 | disruptek | it's not crazy, but i think it's easy to overlook. |
21:21:02 | FromGitter | <alehander42> iirc i didnt mention backward compat there |
21:21:21 | FromGitter | <alehander42> but my impression was it isnt an issue for those `newident` ref T |
21:21:22 | FromGitter | <alehander42> ideas |
21:21:37 | Araq | I still like 'nil ref T' best |
21:21:42 | disruptek | no, but if `ref T` is not nilable, that's an issue. |
21:21:46 | FromGitter | <alehander42> except if somebody had written his own macro which is called nilable |
21:22:32 | Araq | or *maybe*: 'nilable ref T' |
21:22:51 | disruptek | aaaaand we're full circle. |
21:22:59 | Araq | but if it should be short than 'nilable' we might as well use 'nil' instead of 'may' |
21:23:04 | Araq | *shorter |
21:23:56 | disruptek | i think the concept it conveys is that it "may refer to" versus "it's a nil ref", and that's why i prefer "may". |
21:24:57 | FromGitter | <alehander42> i still think `?` is even shorter |
21:25:06 | FromDiscord | <DeltaPHC> `mayhaps ref T` :P |
21:25:29 | disruptek | can ref T |
21:26:02 | FromGitter | <alehander42> i think we need a twitter vote |
21:27:05 | * | Hideki_ joined #nim |
21:27:17 | FromDiscord | <DeltaPHC> Well, official language decisions should be made in the RFC process, not on Twitter, lol |
21:27:28 | disruptek | maybe what you really want is a word that denotes that it's not nilable, so that the code is backward compatible. |
21:27:38 | disruptek | ie. is ref T |
21:28:24 | Araq | disruptek: no you don't, we had that 'ref T not nil', it never worked well |
21:28:54 | FromGitter | <alehander42> DeltaPHC, you're right, i was kinda joking |
21:28:56 | Araq | but maybe I'm wrong |
21:29:02 | FromGitter | <alehander42> but was I |
21:29:10 | Araq | and only the implementation bugs made it unusable |
21:29:31 | * | sagax quit (Read error: Connection reset by peer) |
21:29:41 | FromDiscord | <exelotl> oh yeah about the RFC process, how do we move forward with https://github.com/nim-lang/Nim/issues/12216 ? |
21:29:45 | FromGitter | <alehander42> i think we should try to find out |
21:30:01 | FromGitter | <alehander42> if nilable or not-nilable refs would be more often the best fit for a ref |
21:30:15 | FromGitter | <alehander42> like, which one should be used more often |
21:30:34 | FromGitter | <alehander42> i know that nilable should probably be only used for recursive types |
21:30:34 | FromDiscord | <DeltaPHC> From a correctness perspective, the default should be to have references never be nil |
21:30:41 | disruptek | so you said that a nilable ref type is a different type from a non-nilable ref. |
21:30:51 | disruptek | is that still true? |
21:31:01 | Araq | exelotl: you implement it? |
21:33:02 | * | sagax joined #nim |
21:33:03 | FromGitter | <alehander42> but this means `option refs` should be good enough, so people like me stop using `nilable refs` as `option` as well |
21:33:34 | disruptek | i just hate having to check for nil all the time and i wish i could dispatch on nilable versions of types to prevent that. |
21:33:52 | disruptek | but i understand that might not make sense from any perspective other than that of this user. |
21:34:47 | FromGitter | <alehander42> i made a macro to overload on case object cases |
21:34:54 | FromGitter | <alehander42> it makes sense to me disruptek |
21:35:01 | FromGitter | <alehander42> you're beautiful |
21:35:19 | Araq | er... |
21:35:27 | disruptek | i know it, but it's still nice to hear every once in awhile. |
21:35:33 | FromDiscord | <DeltaPHC> Well, the idea is that if non-nilable is the default, any refs you pass around would be guaranteed to be initialized to something. You wouldn't be able to declare and pass around a ref without first setting it to something |
21:35:37 | disruptek | ๐ |
21:36:14 | disruptek | yeah, i get the idea. we still have to deal with code from people like alehander42 though. ๐ |
21:37:29 | disruptek | i'm still surprised you don't mind breaking existing `ref` semantics. |
21:37:46 | FromGitter | <alehander42> DeltaHPC yes |
21:37:51 | FromGitter | <alehander42> PHC* |
21:38:13 | FromGitter | <alehander42> disruptek yeah, i have a great idea for `Option` |
21:38:47 | disruptek | maybe ?Foo should be Option syntax. |
21:39:08 | disruptek | that makes much better sense to me. |
21:39:15 | FromDiscord | <DeltaPHC> I'm guessing that the default semantics won't change until 2.0 or something |
21:39:29 | FromDiscord | <DeltaPHC> because backwards compatibility |
21:39:32 | FromGitter | <alehander42> DeltaPHC but we would produce warnings at first |
21:40:40 | FromGitter | <alehander42> disruptek i dont think so, because `?` is used for nulable types in other langs |
21:41:10 | FromGitter | <alehander42> and Maybe is often similar to Option |
21:41:12 | FromGitter | <alehander42> iirc |
21:41:41 | disruptek | then you may as well use ? because you won't want to use it for anything else. |
21:41:47 | FromDiscord | <DeltaPHC> I mean, I have no problem just writing `Option[T]` like it is currently |
21:42:16 | disruptek | i was thinking more like ? could be a deref operator for an Option value. |
21:43:29 | disruptek | let foo: string = ?optional or "default" |
21:43:37 | Araq | I think we'll let the community vote on the syntax |
21:43:46 | Araq | but the implementation can already start |
21:43:54 | FromGitter | <alehander42> but it's hard to make a poll in github |
21:44:06 | * | Hideki_ quit (Remote host closed the connection) |
21:44:32 | FromGitter | <alehander42> disruptek ah something like the elvis operator |
21:44:38 | FromGitter | <alehander42> i meant something else tho |
21:44:47 | disruptek | yeah. |
21:44:49 | FromGitter | <alehander42> what if we do the flow typing narrowing |
21:44:52 | FromGitter | <alehander42> of the type of `a` |
21:44:54 | zedeus | disruptek: PMunch's library does that |
21:44:55 | FromGitter | <alehander42> for options as well |
21:44:55 | zedeus | https://github.com/PMunch/nim-optionsutils |
21:44:58 | FromGitter | <alehander42> not only for ref |
21:45:04 | disruptek | yeah, there's one out there already. |
21:45:06 | FromGitter | <alehander42> e.g. โ if a.isSome: โ just use a |
21:45:12 | FromGitter | <alehander42> dont do b = a.get |
21:45:20 | * | Hideki_ joined #nim |
21:47:01 | FromGitter | <alehander42> but this would require something like Option having a {.narrow: isSome, get.} pragma |
21:47:04 | * | Hideki_ quit (Remote host closed the connection) |
21:47:06 | FromGitter | <alehander42> but it might be too out there |
21:47:20 | * | Hideki_ joined #nim |
21:47:51 | FromGitter | <alehander42> Araq, what should be the first thing in impl? reordering where the cfg is built? |
21:51:12 | shashlick | @disruptek - sorry was napping :) |
21:51:43 | disruptek | just thinking you could throw a 1 in there and see if your code still crashes. |
21:51:55 | shashlick | I can try it out |
21:52:35 | shashlick | I have tried without it and it works fine |
21:53:51 | * | daddoo joined #nim |
21:53:51 | disruptek | right, but maybe the issue really has nothing to do with the flag itself but more to do with when/how it's installed. |
21:55:59 | shashlick | Ok well I have no way to try right now, will tomorrow evening |
21:56:16 | disruptek | goin' for maximal suspense, huh? |
21:56:33 | FromGitter | <alehander42> hm, crystal uses `?` as well |
21:57:17 | * | Hideki_ quit (Remote host closed the connection) |
21:57:40 | shashlick | At the beach ๐ |
21:57:45 | shashlick | https://github.com/ivmai/bdwgc/blob/ddd788fc3c3701405efde47c3f540bdf01c878dd/misc.c#L2433 |
21:57:53 | FromGitter | <alehander42> and kotlin |
21:58:05 | shashlick | Looks like setting this before init is appropriate |
21:59:14 | disruptek | well, we'll see. if i'm wrong, that's good. better if i'm right. |
21:59:21 | * | Hideki_ joined #nim |
21:59:56 | FromGitter | <alehander42> but python's mypy didn't choose `?`: they did choose non-nullable by default and `Optional` https://github.com/python/mypy/issues/73 |
21:59:58 | Araq | alehander42: I'm not sure tbh. |
22:00:32 | Araq | it belongs into sempass2 |
22:00:40 | Araq | which doesn't use a CFG |
22:00:55 | Araq | most of this stuff is already implemented in sempass2 |
22:01:03 | * | endragor joined #nim |
22:01:07 | Araq | are we certain we need a CFG for this? |
22:02:06 | shashlick | But interior pointers is enabled by default |
22:02:28 | shashlick | Turning it off generally for Nim feels wrong |
22:02:46 | shashlick | Might make sense as an optimization for a specific app |
22:02:47 | Araq | shashlick: we can use a --define for this |
22:02:54 | disruptek | crashes feel worse. |
22:02:54 | shashlick | https://github.com/ivmai/bdwgc/blob/40fcb59ed30f55076b5e6bbfca798ad0cad0302c/README.md#general-description |
22:03:06 | shashlick | See 4th paragraph |
22:03:47 | * | Hideki_ quit (Ping timeout: 245 seconds) |
22:05:16 | Araq | but I need to sleep now, good night |
22:05:35 | shashlick | I'd understand if we have a define to turn it off if someone wants it |
22:05:43 | * | endragor quit (Ping timeout: 265 seconds) |
22:05:59 | shashlick | But more importantly, we need to understand why we end up with interior pointers in the first place |
22:06:16 | shashlick | I'll do your test disruptek |
22:06:41 | disruptek | i know. wish we had a repro that ran on linux. |
22:13:12 | * | nsf quit (Quit: WeeChat 2.5) |
22:14:17 | shashlick | It should compile on Linux |
22:14:30 | shashlick | Except for the window plugin |
22:14:35 | shashlick | I think |
22:15:02 | shashlick | Which can be disabled with the allowed.ini |
22:15:07 | shashlick | Haven't tried though |
22:16:18 | FromGitter | <alehander42> Araq, i already wrote a seemingly working impl of similar behav with AST |
22:17:12 | FromGitter | <alehander42> so i think its doable, but i thought in cfg there are less cases to analyze |
22:17:19 | FromGitter | <alehander42> i am not sure, you use cfg more |
22:17:29 | FromGitter | <alehander42> good night |
22:19:01 | * | Serrellanos joined #nim |
22:21:02 | * | Serrellanos quit (Client Quit) |
22:24:46 | * | daddoo quit (Quit: Leaving) |
22:32:38 | * | endragor joined #nim |
22:35:49 | * | Hideki_ joined #nim |
22:37:15 | * | endragor quit (Ping timeout: 240 seconds) |
22:47:17 | * | Hideki_ quit (Ping timeout: 240 seconds) |
22:49:32 | * | Hideki_ joined #nim |
23:00:44 | * | filcuc quit (Quit: Konversation terminated!) |
23:03:54 | * | oprypin quit (Quit: Bye) |
23:04:03 | * | oprypin joined #nim |
23:04:40 | disruptek | shashlick: problem is, i can't build winim. |
23:09:23 | disruptek | treeform: pushed a GCP with signing; give it a shot. works for me with the json-based call format, but we need to decide how to handle empty strings for parameters (omit them?). |
23:10:18 | * | krux02 quit (Remote host closed the connection) |
23:14:50 | * | oprypin quit (Quit: Bye) |
23:16:04 | * | oprypin joined #nim |
23:16:34 | shashlick | Only window should need winim right? |
23:16:41 | disruptek | got me. |
23:17:18 | disruptek | i guess, yes. |
23:20:56 | shashlick | Remote is also not building |
23:21:19 | shashlick | But you just need two plugins and feud itself |
23:21:37 | disruptek | okay. |
23:25:01 | disruptek | this is in my wrappers/scintilla.nim >> {.passC: \"-DGTK".} |
23:26:33 | disruptek | i guess it's not pulling in win32/scintilla stuff so i get a missing Scintilla_RegisterClasses symbol. can i omit that somehow? |