00:01:53 | * | oculux joined #nim |
00:02:07 | * | xace quit (Ping timeout: 240 seconds) |
00:03:47 | * | oculuxe quit (Ping timeout: 244 seconds) |
00:04:25 | * | xace joined #nim |
00:09:44 | * | noeontheend joined #nim |
00:15:52 | * | oculuxe joined #nim |
00:17:44 | * | oculux quit (Ping timeout: 244 seconds) |
00:18:38 | * | arecacea1 quit (Remote host closed the connection) |
00:18:59 | * | arecacea1 joined #nim |
00:24:26 | * | sz0 joined #nim |
00:31:54 | * | oculux joined #nim |
00:34:33 | * | oculuxe quit (Ping timeout: 252 seconds) |
00:40:03 | * | noeontheend quit (Ping timeout: 245 seconds) |
00:45:52 | * | lritter quit (Ping timeout: 245 seconds) |
00:52:05 | * | smitop joined #nim |
01:34:37 | * | xace quit (Ping timeout: 245 seconds) |
01:36:07 | * | vlad1777d quit (Ping timeout: 240 seconds) |
02:05:55 | * | vegax87 quit (Ping timeout: 258 seconds) |
02:11:18 | * | vegax87 joined #nim |
02:20:12 | * | abm quit (Ping timeout: 250 seconds) |
02:47:56 | * | Snircle quit (Quit: Textual IRC Client: www.textualapp.com) |
02:53:28 | * | noeontheend joined #nim |
02:53:30 | FromGitter | <Varriount> Hm... What should I call my AWS signature module... |
02:54:30 | * | rnrwashere joined #nim |
02:54:56 | FromGitter | <deech> Just a thought, AFAICT the only difference between the `{.compileTime.}` pragma and a `static:` block is that the latter introduces a scope so for example the following is an error: ⏎ ⏎ ```static proc foo() = discard ⏎ static: ⏎ foo() ⏎ static let x = foo()``` ⏎ ⏎ If there is even a little support for this I'll turn it into an RFC. The other, maybe better, solution is to simply do away global compile |
02:54:56 | FromGitter | ... time scope. [https://gitter.im/nim-lang/Nim?at=5c832b00f895944c08640795] |
02:58:20 | FromGitter | <Varriount> deech: To me, the most concerning thing is that it add more complexity |
02:58:48 | * | xace joined #nim |
02:59:12 | * | rnrwashere quit (Ping timeout: 252 seconds) |
03:01:08 | FromGitter | <deech> @Varriount The compileTime pragma is currently responsible for a fair bit of complexity and still doesn't work right. |
03:02:39 | * | banc quit (Quit: Bye) |
03:07:04 | FromGitter | <deech> I suppose this also works: ⏎ ⏎ ```const foo = proc() = discard ⏎ static: ⏎ foo()``` ⏎ ⏎ So maybe nothing is needed after all, I don't see any other use for `{.compileTime.}`. [https://gitter.im/nim-lang/Nim?at=5c832dd8e527821f0a29d1f5] |
03:08:47 | * | ikan-keli_2 quit (Ping timeout: 240 seconds) |
03:23:49 | * | banc joined #nim |
03:36:17 | FromGitter | <syhpoon> Hey guys, ⏎ I have a beginner question. ⏎ ⏎ Coming from Go background, I'm trying to create a simple tool, which needs to communicate over the network. ⏎ So let's say I need to write a function, say, `ping`, which must ping a given node. ... [https://gitter.im/nim-lang/Nim?at=5c8334b1c8e5bc51620e9b3e] |
03:37:08 | FromGitter | <Varriount> @syhpoon There are a couple of ways you could do this in Nim |
03:37:50 | FromGitter | <Varriount> You could have a structure with procedural types (see the streams module) or use generics |
03:38:14 | FromGitter | <Varriount> You can use inheritance and methods too |
03:42:57 | FromGitter | <syhpoon> Thanks @Varriount ! ⏎ ⏎ Do I understand correctly, that methods approach would use dynamic dispatch? |
03:48:41 | FromGitter | <Varriount> Yes |
03:49:48 | * | cgfuh quit (Quit: WeeChat 2.3) |
03:52:51 | FromGitter | <syhpoon> ok, thanks! I'll try to read more about `streams` module approach |
04:00:25 | * | leorize joined #nim |
04:10:40 | * | smitop quit (Quit: Connection closed for inactivity) |
04:11:47 | * | noeontheend quit (Ping timeout: 240 seconds) |
04:18:34 | * | chimez joined #nim |
04:29:29 | FromGitter | <Varriount> @syhpoon For methods, a central dispatch procedure is generate for each possible method |
04:30:09 | FromGitter | <Varriount> For example, say you have types foo and bar. Both are related via a parent class, and both implement the "look" method. |
04:31:15 | FromGitter | <Varriount> Behind the scenes, a "look" procedure is generated that essentially goes, "If this is a reference to a Foo object, call foo_look, elif this is a reference to a Bar object, call bar_look". |
04:31:47 | * | chemist69 quit (Ping timeout: 240 seconds) |
04:32:10 | FromGitter | <Varriount> In contrast, using a structure of procedures is a bit more direct - the correct procedure is stored in the reference, no need for calculation. |
04:34:02 | * | chemist69 joined #nim |
04:46:38 | FromGitter | <gogolxdong> Hi, @shashlick , your build doesn't run on my machine, I built feud on my own machine , still got window.nim(38, 21) Error: type mismatch: got <LRESULT> but expected 'int' |
04:47:01 | * | ikan-keli_ joined #nim |
04:52:28 | FromGitter | <syhpoon> @Varriount thank you! this is useful info. Actually I'm currently looking at generics and they may be all I need, going to try some simple example to figure out |
04:59:32 | * | chimez quit (Quit: chimez) |
05:18:51 | * | nsf joined #nim |
05:28:29 | * | rnrwashere joined #nim |
05:31:00 | * | leorize quit (Ping timeout: 258 seconds) |
05:31:38 | * | leorize joined #nim |
05:56:17 | * | narimiran joined #nim |
05:56:27 | * | narimiran quit (Remote host closed the connection) |
05:57:04 | * | narimiran joined #nim |
05:57:50 | * | narimiran quit (Remote host closed the connection) |
05:58:24 | * | narimiran joined #nim |
06:34:19 | * | vlad1777d joined #nim |
07:00:09 | * | rnrwashere quit (Remote host closed the connection) |
07:00:43 | * | rnrwashere joined #nim |
07:00:49 | * | rnrwashere quit (Remote host closed the connection) |
07:01:02 | * | rnrwashere joined #nim |
07:20:28 | * | Trustable joined #nim |
07:30:55 | Araq | https://godbolt.org/z/31HC17 |
07:31:15 | Araq | https://godbolt.org/z/Rt7lG2 |
07:32:35 | Araq | thank god for "predictable" performance. |
07:42:05 | * | kapil____ joined #nim |
08:00:00 | * | gmpreussner quit (Quit: kthxbye) |
08:03:59 | * | rnrwashere quit (Remote host closed the connection) |
08:04:25 | * | gmpreussner joined #nim |
08:07:52 | * | Trustable quit (Remote host closed the connection) |
08:16:13 | * | Trustable joined #nim |
08:25:42 | * | mr_yogurt_ is now known as mr_yogurt |
08:46:52 | * | jjido joined #nim |
09:02:48 | * | Trustable quit (Remote host closed the connection) |
09:04:39 | * | Trustable joined #nim |
09:26:01 | * | ng0 joined #nim |
09:40:22 | * | jjido quit (Quit: My MacBook has gone to sleep. ZZZzzz…) |
09:48:48 | * | vlad1777d quit (Ping timeout: 245 seconds) |
09:55:30 | * | jjido joined #nim |
10:14:28 | * | jjido quit (Quit: My MacBook has gone to sleep. ZZZzzz…) |
10:17:23 | * | jjido joined #nim |
10:47:32 | * | sealmove joined #nim |
10:51:14 | * | lf-araujo joined #nim |
10:57:42 | * | narimiran quit (Ping timeout: 252 seconds) |
11:16:07 | * | jjido quit (Quit: My MacBook has gone to sleep. ZZZzzz…) |
11:27:05 | * | vlad1777d joined #nim |
11:34:14 | * | stefanos82 joined #nim |
11:38:47 | * | lf-araujo quit (Remote host closed the connection) |
11:46:24 | dom96 | yay, macros to the rescue |
11:54:31 | dom96 | It's the weekend, you guys should all be hacking on Nim projects! Where is everyone? |
11:54:39 | Zevv | I'm hacking on a Nim project |
11:55:02 | * | vlad1777d quit (Ping timeout: 245 seconds) |
11:55:19 | dom96 | Cool, what is it? |
11:55:31 | * | dom96 is working on a Prometheus library |
11:55:33 | Zevv | NimPEGS, revamped |
11:55:42 | Zevv | what's premetheus? |
11:56:22 | Zevv | s/e/o/ |
11:56:25 | dom96 | https://prometheus.io/ |
11:56:56 | Zevv | so, like rrdtool on steroids? |
11:58:06 | dom96 | yep |
11:58:20 | * | nsf quit (Quit: WeeChat 2.4) |
11:59:35 | * | dddddd joined #nim |
12:11:03 | Zevv | sweet |
12:21:14 | * | Vladar joined #nim |
12:22:45 | * | Snircle joined #nim |
12:28:15 | * | vlad1777d joined #nim |
12:28:32 | * | smitop joined #nim |
12:50:20 | * | lritter joined #nim |
12:58:08 | FromGitter | <liquid600pgm> there I am! today I'm gonna be working on more of rod |
12:58:36 | FromGitter | <liquid600pgm> I'll be implementing flow control today |
13:02:08 | Zevv | my new peg is also running a VM, maybe we can share code :) |
13:03:03 | FromGitter | <liquid600pgm> sure thing! here's a tip for the VM: add the `{.computedGoto.}` pragma to your VM execution loop |
13:03:25 | Zevv | I'll remember that. But first I'll try to get something to run :) |
13:03:32 | FromGitter | <liquid600pgm> sure |
13:03:48 | Zevv | and only *then* will I implement a register allocator |
13:03:55 | Zevv | Naaah, forget it :) |
13:05:04 | * | xet7 quit (Quit: Leaving) |
13:06:26 | FromGitter | <liquid600pgm> I just did a `wc -l` on rod's `src` folder, and... I'm sort of surprised ⏎ ⏎ ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=5c83ba52c8e5bc516211b781] |
13:06:53 | FromGitter | <liquid600pgm> the scanner is the biggest element, somehow |
13:07:35 | FromGitter | <liquid600pgm> soon enough that'll probably change so that the parser/compiler is the biggest |
13:08:26 | sealmove | Is there similar work like https://github.com/jangko/nim-noise? |
13:11:17 | * | vlad1777d quit (Ping timeout: 245 seconds) |
13:36:33 | * | Snircle quit (Quit: Textual IRC Client: www.textualapp.com) |
13:57:53 | * | nsf joined #nim |
14:17:25 | sealmove | what's the state of ffi support in nimvm? |
14:45:34 | Zevv | Hmm, the 'r' for raw string literals also works with capital R: R"foo". Is that a feature or a bug? |
14:49:52 | * | narimiran joined #nim |
14:53:05 | FromGitter | <liquid600pgm> it's probably a feature, but I can't be certain |
15:01:01 | Zevv | it's taking away my consistent sweet syntax |
15:01:53 | Zevv | I can do P"foo" for literal strings, S"abcd" for sets, but not R"az" for ranges |
15:02:19 | FromGitter | <liquid600pgm> use operators: `"a".."z"` |
15:03:11 | Zevv | sweet |
15:03:13 | Zevv | thanks |
15:05:29 | FromGitter | <liquid600pgm> if you use macros, you can probably create sets of runes like `-{"a".."z"}` |
15:05:34 | Zevv | yeah, that doesnt go |
15:05:47 | Zevv | I'll keep R("09") for now :) |
15:06:35 | FromGitter | <liquid600pgm> I was thinking about creating my own PEGs, with syntax like this: ⏎ ⏎ ```grammar MyGrammar:``` [https://gitter.im/nim-lang/Nim?at=5c83d67bbf7990126e766434] |
15:06:47 | FromGitter | <liquid600pgm> dammit, gitter |
15:07:06 | FromGitter | <liquid600pgm> I'm so used to Discord disabling automatic message sending when you begin a code block |
15:07:21 | * | nsf quit (Quit: WeeChat 2.4) |
15:07:29 | Zevv | hehe |
15:08:27 | Zevv | my first implementation is basically functional. I chose not to use macros for now: patterns are handled in the SNOBOL way and are first class nim citizes. This allows for construction of grammars from native code, which adds *tons* of flexibility |
15:09:01 | Zevv | This now works: http://paste.debian.net/1072476/ |
15:11:39 | FromGitter | <liquid600pgm> I was thinking about creating my own PEGs, with macro-powered syntax like this: ⏎ ⏎ ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=5c83d7abd3b35423cb8efa5a] |
15:16:30 | * | vlad1777d joined #nim |
15:24:49 | Zevv | That seems quite feasible. My current plan is to have the grammar construction like above, and then implement various macros or parsers to create grammar from DSLs like that |
15:37:23 | Zevv | but first, captures. most important |
16:02:16 | * | noeontheend joined #nim |
16:08:46 | * | smitop quit (Quit: Connection closed for inactivity) |
16:32:11 | FromGitter | <Bennyelg> any guide of assigning vscode & nim + nim suggest if it's not working by default enabling nim package ? |
16:50:03 | * | banc quit (Ping timeout: 245 seconds) |
16:56:29 | shashlick | @gogolxdong even the exe doesn't run? What error do you see |
16:57:24 | * | banc joined #nim |
17:01:34 | sealmove | I realized something surprising |
17:08:00 | sealmove | It's hard to explain but I'll try: In a nim repl (for example nim secret) you can use very few imported procs. However you can wrap the repl around a preprocess, and use clever macros to match string to proc calls. Then you can call any proc since it will be called from a regular nim program! |
17:08:14 | sealmove | preprocessor* |
17:08:23 | sealmove | strings* |
17:15:55 | sealmove | With the repl api you have 2 "worlds", 1. what you do with the string that you get from stdin before you pass it the compiler2. what the compiler does with the passed string |
17:16:56 | sealmove | in world 1 you can do anything, so it's just a matter of translating world 2 -> world 1 at lexical level |
17:18:38 | sealmove | I am probably not making any sense :S, sorry it's hard to explain |
17:32:12 | * | nsf joined #nim |
17:32:26 | * | sealmove quit (Quit: WeeChat 2.4) |
17:38:28 | * | ainvar_de joined #nim |
17:47:16 | * | ainvar_de quit (Quit: Page closed) |
17:53:15 | * | abm joined #nim |
17:53:43 | Zevv | liquid600pgm: in case you're interested, here is some first work: https://github.com/zevv/npeg |
18:04:12 | * | noeontheend quit (Ping timeout: 245 seconds) |
18:06:18 | FromGitter | <liquid600pgm> neat! |
18:08:50 | FromGitter | <liquid600pgm> I'm thinking about writing a lightweight Nim IDE for the terminal, making use of nimsuggest |
18:09:14 | FromGitter | <liquid600pgm> that could be a pretty neat project to work on |
18:10:20 | Zevv | so much to do, eh? :) |
18:10:30 | FromGitter | <liquid600pgm> yeah |
18:10:53 | FromGitter | <liquid600pgm> I have so many ideas for potential projects, time is what limits me the most |
18:11:04 | narimiran | while you're at it, can you also fix nimsuggest's memory leaks? ;) |
18:12:04 | FromGitter | <liquid600pgm> does it really leak a lot of memory? |
18:14:52 | narimiran | give me 10 minutes and i'll show you 3.5G or RAM used by it |
18:16:31 | FromGitter | <liquid600pgm> strange, I'm using it constantly (in VSCodium) and its RAM usage is about 50MB (depends on what I'm doing at the certain moment), I recall it being 53MB about 5 minutes ago and now it dropped to 43.5 |
18:20:12 | shashlick | liquid600pgm: check out snip then |
18:20:32 | shashlick | https://github.com/genotrance/snip/ |
18:20:40 | shashlick | Cli editor written in Nim |
18:20:41 | FromGitter | <liquid600pgm> found it already |
18:21:19 | shashlick | I use it all the time to test snippets |
18:21:23 | shashlick | Needs some love |
18:22:13 | shashlick | Any opinions on it |
18:24:05 | FromGitter | <liquid600pgm> I just ran it and boy does it feel unstable |
18:24:14 | FromGitter | <liquid600pgm> for some reason it doesn't play well with my terminal |
18:24:41 | FromGitter | <liquid600pgm> it constantly shows an invalid token error and I'm unable to do anything |
18:27:29 | shashlick | Are you on Linux or windows |
18:28:23 | shashlick | I avoided ncurses to keep it light so ui and keys are hard to get right |
18:28:36 | shashlick | Let me know and I can fix some bugs |
18:28:58 | shashlick | I know there are Linux bugs for sure |
18:29:06 | FromGitter | <liquid600pgm> I'm on Linux |
18:29:41 | shashlick | Will be cool if you are interested in working together on it |
18:30:29 | FromGitter | <liquid600pgm> I could help, but I want to finish my projects in the meantime, so not now |
18:31:32 | shashlick | Ok feel free when you can |
18:31:38 | shashlick | I'll look at the Linux bugs |
18:48:23 | FromGitter | <liquid600pgm> it seems snip doesn't properly dispose its nimsuggest instance |
18:49:00 | FromGitter | <liquid600pgm> I had 2 nimsuggest instances running in the background for some reason, even though I exited snip about 10 minutes ago |
18:50:32 | FromGitter | <deech> Dumb question: is there a Nimscript available function that adds to an existing env variable, eg. adding a directory to `PATH`? |
18:54:42 | * | sealmove joined #nim |
19:07:58 | * | abm quit (Ping timeout: 255 seconds) |
19:15:04 | * | abm joined #nim |
19:17:23 | FromGitter | <deech> I don't seem to be able to set an environment variable in a `nimble` task, am I missing something? ⏎ ⏎ ```false ⏎ # <-- note empty line``` [https://gitter.im/nim-lang/Nim?at=5c841143b4b6ef7bc8820c04] |
19:21:48 | * | Vladar quit (Remote host closed the connection) |
19:22:29 | FromGitter | <deech> I'll just open an issue. |
19:25:30 | shashlick | Snip doesn't use Nimsuggest yet |
19:26:00 | shashlick | I'd rather incorporate nimlsp |
19:26:41 | shashlick | deech check vmops.nim |
19:27:33 | * | abm quit (Ping timeout: 252 seconds) |
19:44:09 | * | abm joined #nim |
19:49:56 | federico3 | https://github.com/ba0f3/uibuilder.nim nice |
20:00:00 | * | rnrwashere joined #nim |
20:15:48 | * | spymasterd[m] quit (Ping timeout: 252 seconds) |
20:15:58 | * | spymasterd[m] joined #nim |
20:26:09 | FromGitter | <Clyybber> Araq: Hey, recent changes seemed to have fixed the bug I was encountering. |
20:27:00 | FromGitter | <liquid600pgm> @shashlick: hmm, strange that there were stray Nimsuggest instances running in the background |
20:37:03 | FromGitter | <deech> shashlick: `{get,put}Env` from `os` don't work because they start with: ⏎ ⏎ ```proc getEnv(...):... ⏎ when nimvm: ⏎ discard "built into the compiler"``` [https://gitter.im/nim-lang/Nim?at=5c8423efd1e7281f09010f51] |
20:37:05 | * | abm quit (Quit: Leaving) |
20:39:49 | FromGitter | <BaldEagleX02> Is there someone working on Nim debug support in VS Code? |
20:40:33 | FromGitter | <BaldEagleX02> As far as I have seen in the official Nim plugin for VS Code |
20:41:29 | FromGitter | <BaldEagleX02> It seems that the developer is working on it but he has not released anything yet |
20:46:03 | * | JStoker quit (Ping timeout: 252 seconds) |
20:48:55 | * | JStoker joined #nim |
21:03:23 | * | banc quit (Ping timeout: 245 seconds) |
21:08:23 | * | stefanos82 quit (Remote host closed the connection) |
21:10:30 | * | banc joined #nim |
21:14:08 | shashlick | deech: https://github.com/nim-lang/Nim/blob/master/compiler/vmops.nim |
21:14:45 | shashlick | That's how they work in the vm |
21:15:57 | shashlick | This is how they work in nimscript |
21:16:00 | shashlick | https://github.com/nim-lang/Nim/blob/master/lib/system/nimscript.nim |
21:18:38 | * | nsf quit (Quit: WeeChat 2.4) |
21:22:03 | shashlick | By the way, your issue is against nimble which builds its own Nim vm |
21:25:48 | * | jjido joined #nim |
21:29:16 | * | narimiran quit (Ping timeout: 255 seconds) |
21:44:09 | FromGitter | <deech> When something is imported at the toplevel but only used in `static` block is there any way to keep it from polluting the namespace of non-static code, eg. is there some equivalent of: ⏎ ⏎ ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=5c8433a91fae6423ca5bdd35] |
21:45:00 | FromGitter | <liquid600pgm> from what I remember, scoped imports are not implemented yet |
21:46:42 | FromGitter | <deech> @liquid600pgm This would be imports for a specific compiler phase not scope although I guess if there's such a thing as static scope that would work ... |
21:48:09 | * | rnrwashere quit (Remote host closed the connection) |
21:50:11 | * | rnrwashere joined #nim |
21:56:14 | * | rnrwashere quit (Remote host closed the connection) |
21:59:48 | * | rnrwashere joined #nim |
22:00:23 | shashlick | deech: nimble does have getenv so it should work |
22:00:26 | shashlick | https://github.com/nim-lang/nimble/blob/master/src/nimblepkg/nimscriptsupport.nim |
22:00:57 | * | lf-araujo joined #nim |
22:01:33 | * | Trustable quit (Remote host closed the connection) |
22:01:33 | shashlick | But putenv isn't there |
22:01:48 | lf-araujo | Hi all, I wanted nim compiler to run tests in a /tests directory automatically, is there a way to do this? Can anyone point me to the proper documentation? Thanks |
22:04:12 | FromGitter | <Clyybber> `nimble test` shoud do that I think |
22:05:01 | FromGitter | <deech> @shashlick: Interesting. I tried swapping `putEnv` with `system.putEnv` with the same result. |
22:05:47 | shashlick | It won't work |
22:05:53 | shashlick | See my comment in the issue |
22:06:05 | * | rnrwashere quit (Remote host closed the connection) |
22:06:42 | shashlick | https://github.com/nim-lang/nimble/issues/617#issuecomment-471226458 |
22:08:14 | FromGitter | <deech> Oh nice! Ok I get it now. But why don't I get some kind of `unknown identifier: system.putEnv` or something like that? It runs and doesn't do anything. |
22:09:38 | shashlick | Oh that's fun |
22:09:45 | shashlick | No idea on that though |
22:16:33 | * | rnrwashere joined #nim |
22:55:45 | * | lf-araujo_ joined #nim |
22:56:27 | * | lf-araujo quit (Ping timeout: 240 seconds) |
22:56:27 | * | lf-araujo_ is now known as lf-araujo |
23:12:02 | * | rnrwashere quit (Remote host closed the connection) |
23:13:46 | * | rnrwashere joined #nim |
23:19:02 | * | lritter quit (Ping timeout: 250 seconds) |
23:20:40 | * | rnrwashere quit (Remote host closed the connection) |
23:48:38 | * | sealmove quit (Quit: WeeChat 2.4) |
23:55:58 | * | lf-araujo_ joined #nim |
23:56:17 | * | MD87 quit (Excess Flood) |
23:56:38 | * | MD87 joined #nim |
23:57:05 | * | lf-araujo quit (Ping timeout: 246 seconds) |
23:57:06 | * | lf-araujo_ is now known as lf-araujo |