00:44:17 | * | dddddd quit (Remote host closed the connection) |
02:01:58 | * | sbdchd joined #nim |
02:20:39 | * | sbdchd quit (Remote host closed the connection) |
02:28:47 | FromDiscord | <Kayaba> nasusiro dom96 Ara-q also created America and capitalism and actually good socialized healthcare and stopped slavery |
02:28:54 | FromDiscord | <Kayaba> He didn't just create Nim |
02:29:34 | FromDiscord | <Kayaba> Though he did admit Nim was transpiled... |
02:29:34 | FromDiscord | <Kayaba> |
02:29:34 | FromDiscord | <Kayaba> I should just start writing "The bullshit history of Nim" instead of texting here at this point. |
02:55:54 | * | endragor joined #nim |
03:08:06 | Demos[m] | is that vtbl feature coming along? |
03:11:15 | FromGitter | <gogolxdong> How to change a string value to its enum name? |
03:16:35 | FromGitter | <kaushalmodi> @gogolxdong Have a look at strutils.parseEnum: https://nim-lang.org/docs/strutils.html#parseEnum,string |
03:26:21 | FromGitter | <gogolxdong> yes, good to know, it works ,I tried bindSym ,it works too, is that right? |
03:46:51 | * | Hotkeys joined #nim |
04:24:43 | * | xkapastel quit (Quit: Connection closed for inactivity) |
04:27:11 | FromGitter | <codenoid> how i can do this in nim https://stackoverflow.com/questions/50960344/disable-mouse-click-and-change-pointer-icon |
04:28:38 | * | thomasross joined #nim |
04:28:58 | * | arecaceae quit (Remote host closed the connection) |
04:29:22 | * | arecaceae joined #nim |
04:37:07 | * | gsingh93_ quit (Quit: Connection closed for inactivity) |
04:53:50 | * | Vladar joined #nim |
04:57:28 | FromGitter | <Varriount> @codenoid Same way as how you would do it in C - write or wrap a library to interface with the desktop environment. |
05:22:24 | * | nsf joined #nim |
05:43:18 | * | zahary joined #nim |
05:46:09 | * | rauss quit (Ping timeout: 248 seconds) |
05:48:46 | * | jjido joined #nim |
06:01:26 | * | jjido quit (Quit: My MacBook has gone to sleep. ZZZzzz…) |
06:20:16 | * | jjido joined #nim |
06:26:54 | * | jjido quit (Quit: My MacBook has gone to sleep. ZZZzzz…) |
06:55:25 | * | mgdelacroix quit (Read error: Connection reset by peer) |
07:00:46 | * | msmorgan quit (Ping timeout: 260 seconds) |
07:01:43 | * | mgdelacroix joined #nim |
07:02:31 | * | mgdelacroix quit (Max SendQ exceeded) |
07:09:19 | * | yglukhov[i] joined #nim |
07:09:27 | * | yglukhov[i] quit (Remote host closed the connection) |
07:10:04 | * | yglukhov[i] joined #nim |
07:12:43 | * | mgdelacroix joined #nim |
07:12:54 | * | yglukhov_ joined #nim |
07:14:34 | * | yglukhov[i] quit (Ping timeout: 260 seconds) |
07:14:58 | * | msmorgan joined #nim |
07:18:37 | * | PMunch joined #nim |
07:47:26 | * | cspar joined #nim |
07:48:20 | * | yglukhov_ quit (Remote host closed the connection) |
07:48:59 | FromGitter | <mratsim> Nim squad, assemble! https://www.reddit.com/r/programming/comments/8snyn3/the_state_of_type_hints_in_python/ |
07:49:11 | * | Vladar quit (Quit: Leaving) |
08:04:02 | PMunch | mratsim, did you see this: https://instagram-engineering.com/let-your-code-type-hint-itself-introducing-open-source-monkeytype-a855c7284881 |
08:06:56 | PMunch | "Types are great, let's hack them into Python by force!" |
08:07:03 | * | yglukhov[i] joined #nim |
08:07:17 | FromGitter | <mratsim> No, but the people at Ethereum have something similar, when running their test suite it adds a comment about types in their code. |
08:08:18 | PMunch | What do you mean, in what language? |
08:12:22 | FromGitter | <mratsim> Python |
08:12:43 | FromGitter | <mratsim> @PMunch: https://www.reddit.com/r/programming/comments/8snyn3/the_state_of_type_hints_in_python/e11dw9r/ |
08:16:54 | PMunch | Hmm, what was that UI library by trustetcode(?) called? |
08:17:08 | PMunch | Ah NiGui |
08:18:12 | FromGitter | <mratsim> ok, adding it and IUP |
08:18:31 | PMunch | Oh yeah IUP |
08:21:55 | FromGitter | <mratsim> btw, do you plan to use webview with gene? |
08:22:57 | PMunch | Well the idea is to make it extensible |
08:23:28 | PMunch | So anyone can add a new target without adding it directly to the main project |
08:24:00 | PMunch | Hmm, would be interesting to try webview with Karax |
08:24:13 | FromGitter | <mratsim> Ok, that’s because I had troubles yesterday with Cocoa web view: https://github.com/oskca/webview/issues/4 |
08:24:31 | FromGitter | <mratsim> I wanted to use Webview + Karax ;) |
08:24:45 | PMunch | Not a huge fan of this web-page-as-an-app trend, but it's got some merit to it |
08:25:18 | FromGitter | <mratsim> Well, for me I have 2 potential project and one absolutely require JS |
08:25:31 | FromGitter | <mratsim> 1 is for a UI for a Go Database program, can be done in anything |
08:26:17 | FromGitter | <mratsim> The other is an UI for Arraymancer for plots/data analysis, I absolutely need D3.JS https://github.com/d3/d3/wiki/gallery |
08:27:00 | PMunch | Oooh, that looks nice |
08:27:29 | livcd | What does the Go database program do and why Go ? :) |
08:27:32 | PMunch | Well genui already supports Karax which is JS |
08:27:49 | PMunch | Not sure how hard it will be to wrap that in webview, but probably fairly trivial |
08:27:54 | PMunch | livcd, Go the game, not the language |
08:28:02 | FromGitter | <mratsim> I have about 100k+ go games (because i was a competitive Go player) |
08:28:05 | ldlework | <3 Baduk |
08:28:40 | FromGitter | <mratsim> but the most of the current programs are unmaintaned or outdated (Python 2 …) |
08:28:47 | * | dddddd joined #nim |
08:28:51 | FromGitter | <mratsim> or Delphi* :P |
08:29:16 | FromGitter | <mratsim> I’d like something open-source that runs on everything. |
08:30:19 | FromGitter | <mratsim> Besides the UI, the main issue I have is 2D pattern search in 100k+ games, that can happen at any point of the game (about 200 moves) |
08:30:47 | FromGitter | <mratsim> I tried to look for spatio-temporal indexing for databases but came-up empty :/ |
08:30:54 | PMunch | 2D pattern search? |
08:31:00 | FromGitter | <mratsim> yes |
08:31:08 | PMunch | As in looking for a pattern of pieces? |
08:31:19 | dom96 | mratsim: You don't need JS for D3.js, just use Nim :) |
08:31:40 | FromGitter | <mratsim> @dom96 I’m all ears |
08:32:27 | FromGitter | <mratsim> @PMunch, for example: https://senseis.xmp.net/?CornerShapes, and those can be mirrored or rotated |
08:33:41 | FromGitter | <mratsim> I’ve been looking into R-Tree (supported by SQLite), Kd-Trees, Z-order curve, Hilbert curve (both can transform N dimensions into a 1-d index and are used in Amazon Aurora and Google G2) |
08:33:52 | FromGitter | <mratsim> but I’m still fumbling on the temporal part. |
08:33:58 | dom96 | mratsim: 1. Wrap D3.js in Nim 2. Use the wrapper. 3. ???? 4. Profit |
08:34:05 | FromGitter | <mratsim> lol |
08:34:15 | PMunch | Aaah I see |
08:36:19 | PMunch | mratsim, did you see my PM on Gitter? |
08:36:34 | PMunch | Hmm, I feel like this should be a solved problem.. |
08:37:04 | FromGitter | <mratsim> no I don’t see your PM |
08:37:25 | PMunch | I mean the Russians had an insane volume of Chess games recorded, someone must've tried to solve this at some point |
08:37:35 | FromGitter | <mratsim> ah, I resterted gitter and now I see |
08:39:38 | * | noonien joined #nim |
08:44:46 | FromGitter | <tim-st> when I define `type t1 = wrapObject` and `type t2 = wrapObject` can I make it that my procs only make one of them? |
08:44:57 | FromGitter | <tim-st> *match |
08:46:26 | FromGitter | <ephja> type hints in a dynamic language. brilliant |
08:46:51 | FromGitter | <tim-st> what do you mean? |
08:47:38 | FromGitter | <tim-st> yes, it is from a dynamic language |
08:48:25 | FromGitter | <tim-st> In worst case I make a new type and add an enum with specific type only to make it differ, but can this be easier? |
08:49:06 | FromGitter | <tim-st> like `type t1 = object -> o: wrapObject; id: Enum` |
09:02:29 | * | zahary quit (Quit: Leaving.) |
09:14:25 | * | zahary joined #nim |
09:16:17 | dom96 | amazed that this works without any compiler crashes https://www.reddit.com/r/programming/comments/8si75b/how_an_engineering_company_chose_to_migrate_to_d/e11fm3q/ |
09:16:35 | dom96 | I guess you guys have been stressing static[N] for a while :) |
09:16:54 | * | Arrrr joined #nim |
09:17:16 | FromGitter | <mratsim> more than stressing |
09:17:54 | FromGitter | <mratsim> I’ve been building recursive static types: https://github.com/status-im/nim-stint/blob/master/stint/private/datatypes.nim |
09:18:25 | FromGitter | <mratsim> Uint256 is build upon 2xUint128 which is built upon 4xUint64 |
09:18:43 | FromGitter | <mratsim> 256, 128, etc is a static parameter |
09:18:54 | FromGitter | <mratsim> we tried with up to 2048 without any issue |
09:25:07 | dom96 | nice |
09:25:48 | FromGitter | <mratsim> There will be an article about it, maybe in July because I think it’s a very nice piece of tech |
09:26:09 | FromGitter | <mratsim> and speed-wise the library is within 10% of the fastest C++ + Assembly library we could find |
09:26:18 | FromGitter | <mratsim> but it’s portable ;) |
09:26:38 | FromGitter | <mratsim> And we have compile-tim evaluation of Uint of arbitrary size which is nifty |
09:39:02 | * | floppydh joined #nim |
09:39:27 | Araq | mratsim: awesome, just awesome. |
09:40:11 | FromGitter | <mratsim> ^^ |
09:40:59 | * | yglukhov[i] quit () |
09:42:06 | FromGitter | <mratsim> It uses your ForLoopStmt macro as well: https://github.com/status-im/nim-stint/blob/master/stint/private/as_words.nim#L164 |
09:42:43 | FromGitter | <mratsim> and usage: https://github.com/status-im/nim-stint/blob/master/stint/private/uint_bitwise_ops.nim#L13 |
09:42:58 | * | yglukhov[i] joined #nim |
09:42:58 | Araq | you need to add {.experimental: "forloopmacros".} to this soon |
09:43:18 | Araq | as new features should start in the .experimental state |
09:43:32 | Araq | (new policy...) |
09:43:53 | Araq | that doesn't mean I'll remove it again, I won't. |
09:45:23 | FromGitter | <tim-st> Does somebody knows an anwer to my question above? maybe with Concept -> self of wrapObject and self.typeName.asString == "NimTypName" ? |
09:51:27 | * | xkapastel joined #nim |
09:53:55 | FromGitter | <mratsim> @tim-st, ephja was not referring to your comment, but to my article about type hints in python |
09:55:18 | FromGitter | <mratsim> I don’t really understand your question: ⏎ ⏎ > when I define `type t1 = wrapObject` and `type t2 = wrapObject` can I make it that my procs only make one of them? ⏎ ⏎ re you looking for distinct types? [https://gitter.im/nim-lang/Nim?at=5b2b7606d2abe466887c1804] |
09:55:24 | FromGitter | <mratsim> are* |
09:55:40 | FromGitter | <mratsim> type t1 = distinct wrapObject |
10:00:13 | * | Vladar joined #nim |
10:03:11 | FromGitter | <tim-st> @mratsim oh, ok^^, thanks for the answer. I get objects from a dynamic language and only at runtime the type is known, so at nim side I can only define the most general type `wrapObject`. now when I define the equivalent nim types, I do: `type A = wrapObject` <- because I cannot define the generic object better. I also do `type B = wrapObject` and `type C = wrapObject`. Now this works good. But the problem is, that on |
10:03:11 | FromGitter | ... nim side all procs match for the types `A` , `B` and `C` because they are defined all on `wrapObject` like proc test(a: A) = shoudnt match test(b) but it does, so I thought a Concept could check on nim side if the type name of nim type fits |
10:03:21 | FromGitter | <tim-st> distinct doesnt work here, I tried |
10:05:44 | FromGitter | <tim-st> also in my quote "make" should be replaced by "match" |
10:07:17 | FromGitter | <tim-st> the problem is only about matching proc signatures. It's not a big problem, but for now too many procs do match for all types, and when a dev calls the proc on the wrong type it's only seen at runtime that the proc doesnt match |
10:11:32 | FromGitter | <tim-st> https://gist.github.com/tim-st/c5e2144d7c621d94996e777d54a7e890 |
10:16:26 | FromGitter | <tim-st> well distinct goes in the right direction but I get an error about nonFinal or something so I cannot use it; I think concept could fix it |
10:20:46 | FromGitter | <Yardanico> @notTita are you around here somewhere? |
10:21:48 | FromGitter | <tim-st> Maybe getting this into real nim code would exactly the fix: |
10:28:42 | FromGitter | <andreaferretti> I have the following in my nimble file |
10:28:55 | FromGitter | <andreaferretti> ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=5b2b7de6d2abe466887c2d38] |
10:29:11 | FromGitter | <andreaferretti> it makes nimble crash on my MacOS with the message |
10:29:34 | FromGitter | <andreaferretti> `Error: unhandled exception: VM is not built with 'gorge' support [ERecoverableError]` |
10:29:46 | FromGitter | <andreaferretti> this happens since a few days |
10:30:10 | FromGitter | <andreaferretti> In theory `when defined(nimdistros)` should be false on a mac |
10:30:24 | FromGitter | <andreaferretti> Does anyone know why this can happen? |
10:32:02 | Araq | andreaferretti: I need to fix Nimble .... |
10:32:11 | Araq | nimble needs to be compiled with -d:nimcore |
10:32:20 | FromGitter | <andreaferretti> I see this happen with nim as well |
10:32:29 | FromGitter | <andreaferretti> ```when defined(nimdistros): ⏎ echo "hi"``` [https://gitter.im/nim-lang/Nim?at=5b2b7ebdfc606203806ede1e] |
10:32:47 | FromGitter | <andreaferretti> If I run just `nim e foo.nims` |
10:33:00 | FromGitter | <tim-st> Wow I got it working: https://gist.github.com/tim-st/8e416d2054346b898afd412d55483407 |
10:33:09 | Araq | https://github.com/nim-lang/Nim/blob/devel/compiler/nim.cfg#L8 |
10:33:21 | FromGitter | <andreaferretti> it seems to be true on a mac |
10:35:24 | FromGitter | <andreaferretti> It is just a matter of adding this flag in nimble? |
10:35:36 | Yardanico | to nimble .cfg probably |
10:38:57 | FromGitter | <tim-st> Can I turn off compiler type checks for a small code range? |
10:43:27 | FromGitter | <mratsim> congrats, seems like a super concept hack the c.type.name part lol |
10:43:57 | FromGitter | <mratsim> but no you can’t turn type checks off, if you want to erase types, use inheritance, or concepts or object variants |
10:45:03 | FromGitter | <tim-st> Everything works, but now at creating of these alias types at the newT() procs it fails :( |
10:45:22 | FromGitter | <tim-st> I tried ` {.push checks: off.}` but nothing happens |
10:45:47 | FromGitter | <tim-st> *not |
10:46:12 | FromGitter | <tim-st> although of cource I can prove nothing bad happens there |
10:46:53 | FromGitter | <mratsim> checks is about overflow, bounds/index checks |
10:47:11 | FromGitter | <tim-st> hm, ok, I need to hack my hack^^ |
10:47:57 | FromGitter | <tim-st> Ah, I have a solution: I use and not type name in [..] where these are the concurren types :) |
10:48:15 | FromGitter | <tim-st> Now I made pythons lib type safe |
10:49:42 | FromGitter | <mratsim> you should generate that with a template probably to avoid copy-pasting everywhere |
10:50:20 | FromGitter | <tim-st> yes, you're right, thanks! |
10:55:35 | * | rauss joined #nim |
10:59:13 | * | elrood joined #nim |
11:06:44 | * | Hotkeys quit (Quit: Connection closed for inactivity) |
11:06:49 | * | themagician joined #nim |
11:17:13 | Yardanico | dom96, I'm trying to remove my post on forum and it says "You cannot delete this post", what can be the reason of this? |
11:19:14 | FromGitter | <mratsim> I’d like to delete the “Hey Mom” forum post as well ... |
11:21:17 | * | zahary quit (Quit: Leaving.) |
11:21:17 | Yardanico | https://forum.nim-lang.org/t/191 this is history :) |
11:21:55 | * | bevo quit (Ping timeout: 260 seconds) |
11:22:07 | * | zahary joined #nim |
11:25:00 | Arrrr | Nobody could predict the shitstorm and butthurt that decision would produce eventually |
11:25:48 | Arrrr | !echo NimVersion |
11:26:02 | * | yglukhov[i] quit (Ping timeout: 245 seconds) |
11:27:26 | * | yglukhov[i] joined #nim |
11:27:50 | Yardanico | !eval echo NimVersion |
11:27:52 | NimBot | 0.18.0 |
11:41:39 | FromGitter | <bevo009> You guys seen this? https://www.spiria.com/en/blog/web-applications/webassembly-nim |
11:43:07 | * | Bevo joined #nim |
11:44:14 | PMunch | Yeah I read that the other day |
11:44:21 | PMunch | Goes the route through C though |
12:02:13 | FromGitter | <tim-st> is it intended that primitive alias type get an own typename and object get not? https://gist.github.com/tim-st/00388cc9b325674f8532a74cb8d339a5 |
12:02:25 | * | birdspider joined #nim |
12:03:40 | FromGitter | <kaushalmodi> Can the bot also do a nightly devel build? :) Then we could have "!evalDevel" (or may be "!evilDevil", or may be just "!evil") |
12:04:22 | * | PMunch quit (Ping timeout: 268 seconds) |
12:06:51 | FromGitter | <mratsim> @kaushalmodi the repo is here: https://github.com/zacharycarter/nim-playground |
12:07:27 | * | PMunch joined #nim |
12:08:18 | FromGitter | <alehander42> or you can just call it !evalNightly |
12:08:50 | FromGitter | <mratsim> !IFeellucky |
12:09:21 | FromGitter | <kaushalmodi> @mratsim oh, so the "!eval" keyword uses Nim Playground? |
12:10:09 | FromGitter | <mratsim> Yes, unless it changed recently |
12:11:16 | FromGitter | <kaushalmodi> Answering to self.. yes.. see `evalCode` in https://github.com/nim-lang/nimbot/blob/master/src/playground.nim |
12:14:39 | FromGitter | <alehander42> is UniqueInteger different than distinct int |
12:16:27 | FromGitter | <ephja> @alehander42 it's a type alias |
12:16:50 | FromGitter | <tim-st> the string output, yes. I think that's expected, at least that's why people use the module `typetraits`, I want this for the object type, too |
12:17:13 | FromGitter | <tim-st> but there it doesnt work, that's not consistent |
12:17:34 | * | nsf quit (Quit: WeeChat 2.1) |
12:19:30 | FromGitter | <ephja> inconsistent* |
12:20:26 | FromGitter | <tim-st> that's the same |
12:37:55 | Araq | my all-time favorite word, "inconsistent" |
12:46:48 | Araq | andreaferretti: does -d:nimcore make any difference? |
12:59:59 | FromGitter | <Varriount> @kaushalmodi Interestingly enough, the Windows 10 command prompt has at least some support for virtual terminal color codes. |
13:01:14 | FromGitter | <kaushalmodi> I know, but looks like Nim supports only legacy windows console API. Supporting Windows 10 would need a dedicated Windows 10 dev :) |
13:03:36 | FromGitter | <mratsim> https://medium.com/@cscalfani/goodbye-object-oriented-programming-a59cda4c0e53 |
13:03:44 | FromGitter | <Varriount> Well, terminal.nim appears to use this: https://docs.microsoft.com/en-us/windows/console/setconsolemode in conjunction with ENABLE_VIRTUAL_TERMINAL_INPUT |
13:04:30 | FromGitter | <mratsim> > The problem with object-oriented languages is they’ve got all this implicit environment that they carry around with them. You wanted a banana but what you got was a gorilla holding the banana and the entire jungle. |
13:23:07 | FromGitter | <andreaferretti> @Araq you are right, it was enough to put `-d:nimcore` |
13:23:14 | FromGitter | <andreaferretti> I tested by putting it in koch |
13:23:33 | Araq | ok, thanks |
13:23:35 | FromGitter | <andreaferretti> but maybe it makes more sense to put into some nimble configuration |
13:23:45 | Araq | but then why did Nim have the same problem? |
13:23:49 | Araq | it's in Nim's config... |
13:24:00 | FromGitter | <andreaferretti> it didn't, my fault |
13:24:05 | Araq | ok |
13:24:06 | * | endragor quit (Remote host closed the connection) |
13:37:17 | FromGitter | <Varriount> @kaushalmodi It appears that some of the terminal code enables vt100 escapes: https://github.com/nim-lang/Nim/blob/devel/lib/pure/terminal.nim#L858 |
13:40:21 | FromGitter | <kaushalmodi> Yes, I see. That's only if the true color is enabled, right? And that only supports setting the true colors, not the styles. |
13:51:12 | * | zahary quit (Quit: Leaving.) |
13:57:26 | * | birdspider quit (Quit: Leaving) |
14:15:44 | * | PMunch quit (Quit: Leaving) |
14:23:08 | FromGitter | <mratsim> @dom96, this one is for you: https://www.reddit.com/r/programming/comments/8snyn3/the_state_of_type_hints_in_python/e11oiif/ |
14:29:54 | * | zahary joined #nim |
14:30:52 | FromGitter | <mratsim> Today I Learned that Nim was a braces language: https://www.reddit.com/r/programming/comments/8snyn3/the_state_of_type_hints_in_python/e11onxc/ |
14:32:28 | FromGitter | <tim-st> Well, this is exactly what I told before: If you put non standard nim examples on the nim start page, people even think nim is a "braces language" |
14:33:05 | FromGitter | <tim-st> I mean this `for line in stdin.lines:` |
14:33:28 | FromGitter | <tim-st> when I first saw this I decided to not install nim |
14:33:40 | FromGitter | <ephja> huh |
14:33:46 | FromGitter | <mratsim> there is no braces? |
14:34:23 | FromGitter | <mratsim> Where I find a lot of braces is for the pragma for C/C++ in the Features page |
14:34:50 | FromGitter | <tim-st> yes, braces is in fact very weird, but I think many python people like to see easy python like code on the first view, especially no namespaces should be "just there" |
14:34:57 | FromGitter | <tim-st> "stdin.lines" |
14:35:39 | FromGitter | <mratsim> this is method call syntax, not braces though |
14:36:15 | FromGitter | <tim-st> I know, maybe it was the json thing |
14:36:31 | FromGitter | <ephja> the "namespace" being the global "stdin" File instance or what? |
14:36:33 | Yardanico | well, people should already know what "stdin" is |
14:36:37 | FromGitter | <tim-st> the json syntax looks offensive, I agree |
14:36:48 | FromGitter | <mratsim> I think it’s the pragma at the bottom of this page: https://nim-lang.org/features.html |
14:37:43 | FromGitter | <tim-st> I think these are good examples. but not as first examples. Maybe as 5. example |
14:38:04 | FromGitter | <tim-st> the first three should show how easy nim is without pragma thinks and stuff |
14:38:12 | FromGitter | <tim-st> *things |
14:40:24 | FromGitter | <mratsim> depends on the audience |
14:40:40 | FromGitter | <mratsim> Nim also targets people looking for a better C or C++ |
14:46:50 | * | sz0 joined #nim |
14:47:06 | * | zahary quit (Quit: Leaving.) |
14:58:42 | Araq | the "Easy C, C++ and Objective C wrapping" example could be improved |
14:59:01 | Araq | it actually looks quite tedious and can be simplified quite a bit |
14:59:11 | FromGitter | <mratsim> ^ |
14:59:19 | FromGitter | <mratsim> maybe pick something else than SFML |
14:59:32 | FromGitter | <mratsim> though it’s bonus point for game devs |
15:00:51 | * | Trustable joined #nim |
15:02:35 | FromGitter | <mratsim> an image or a sound library instead? |
15:04:43 | Araq | graphics.nim |
15:05:35 | * | cspar quit (Ping timeout: 240 seconds) |
15:07:32 | * | yglukhov[i] quit (Ping timeout: 276 seconds) |
15:11:32 | * | PMunch joined #nim |
15:13:10 | * | yglukhov[i] joined #nim |
15:13:45 | * | nsf joined #nim |
15:21:10 | * | tsoernes joined #nim |
15:22:22 | tsoernes | What's the equivalent of Python's namedtuple? I know regular tuples can be given field descriptors/names in nim, but I'm looking to create a tuple constructor with fixed names |
15:23:39 | Araq | I don't know what Python's namedtuple is |
15:24:41 | tsoernes | "Point = namedtuple('Point', 'x, y'); p = Point(1, 2); print(point)" >>> Point(x=1, y=2) |
15:25:03 | tsoernes | can be accessed "p.x" or "p[0]" |
15:25:31 | FromGitter | <kaushalmodi> tsoernes: How is that different from Nim tuples with named fields? |
15:26:18 | tsoernes | You have to specify the field names on instantiation |
15:26:26 | Araq | [0m[1mlib/pure/times.nim(794, 29) [0m[31mError: [0mundeclared identifier: 'CTime' |
15:26:26 | Araq | [0mError: call to nim compiler failed |
15:26:26 | Araq | [31mError: [0mexecution of an external program failed: './tools/niminst/niminst --var:version=0.18.1 --var:mingw=none csource --main:compiler/nim.nim compiler/installer.ini' |
15:26:40 | Araq | I love Ansi Escape sequences. |
15:27:00 | FromGitter | <kaushalmodi> Araq: heh |
15:27:03 | Araq | They keep ruining my outputs. |
15:27:19 | FromGitter | <kaushalmodi> there can be a switch for nocolor |
15:27:36 | Araq | there is a switch for nocolor |
15:27:38 | FromGitter | <kaushalmodi> that renders styledEcho to behave just like echo |
15:27:51 | FromGitter | <kaushalmodi> oh, then terminal.nim should start respecting that? |
15:27:57 | Araq | yeah, I need to update my .travis |
15:28:10 | Araq | well no, --colors:off is a Nim compiler switch |
15:28:33 | Araq | not a terminal.nim thing |
15:29:21 | FromGitter | <kaushalmodi> ah, OK. I thought you were referring to the current changes in terminal.nim |
15:30:08 | Araq | anyhow it's so annoying. now every tool needs to grow a --colors:auto|on|off switch, it's the typical Unix crap. forcing this friction onto every program I write. |
15:30:14 | FromGitter | <kaushalmodi> tsoernes: You don't need to specify fields on instantiation (but doing so is a good practice). https://scripter.co/notes/nim/#named-tuples |
15:30:42 | FromGitter | <kaushalmodi> *specify field names |
15:31:18 | Araq | is it signal handler safe? do I check for istty(stdout)? is it a deamon or not? do I use stdout or stderr? |
15:31:39 | tsoernes | thanks, that's what I was looking for. |
15:33:02 | Araq | it's pointless features forced down my throat. Contrast this with C++'s design where I can occasionally really ignore a feature's existence. Not that I like C++ but the Unix fans surely have the objectively worse design |
15:33:38 | FromGitter | <tim-st> Araq: is it possible in nim to get the type alias name? |
15:37:46 | Araq | and then they dance around and spread FUD about how exceptions are bad and that an assignment that actually respects an object's invariants leads to "subtle" code. Hey, your favourite OS embraces asyncronous exceptions. they are called signals and are much worse than regular exceptions. |
15:39:13 | Araq | tim-st: I don't know. use a 'distinct' type if the type distinction is so important for you. |
15:39:56 | FromGitter | <tim-st> the whole problem is, that the distinct type doesnt work for nonFinal types, that why I do this "quirky" thing |
15:40:34 | FromGitter | <tim-st> In fact as I have shown before if I only have the alias name I solved that distinct also works for nonFinal |
15:40:57 | FromGitter | <tim-st> but alias name only works for primitive don't know why... |
15:41:19 | Araq | the compiler needs to resolve object type aliases early because you know |
15:41:29 | Araq | the compiler needs to determine if obj.foo is valid |
15:41:44 | FromGitter | <tim-st> ah, ok, hm... |
15:41:53 | Araq | probably it's easy to fix but then I need to ensure these aliases are always respected everywhere |
15:41:59 | Araq | and that's a pita |
15:42:07 | FromGitter | <tim-st> ok, thanks |
15:44:53 | tsoernes | Any better way to define matrices? This is pretty verbose "var neighs1: array[rows, array[cols, array[7, array[2, int]]]]" |
15:45:48 | * | lain0n joined #nim |
15:52:56 | FromGitter | <mratsim> @tsoernes, use Arraymancer (disclaimer I’m the author) |
15:54:06 | FromGitter | <mratsim> https://mratsim.github.io/Arraymancer/tuto.first_steps.html |
16:21:03 | FromGitter | <kaushalmodi> How can I package an optional related .nim file in a nimble package. The main nimble file does not need that extra.nim, but a user might import it. That extra.nim is useless by itself, so not worth a separate package.. |
16:22:21 | FromGitter | <kaushalmodi> Right now, nimble gives a warning for keeping that extra.nim in the nimble structure. I can also not skip it, but I want `nimble install` to install it. |
16:22:30 | FromGitter | <kaushalmodi> s/but/because |
16:24:42 | FromGitter | <mratsim> @kaushalmodi like here: https://github.com/status-im/nim-stint/tree/master/stint |
16:24:51 | * | rauss quit (Ping timeout: 240 seconds) |
16:25:00 | FromGitter | <mratsim> lenient_stint is optional and can be imported with `import stint/lenient_stint |
16:25:38 | FromGitter | <mratsim> basically root/packagename/optionalpackages.nim |
16:25:54 | FromGitter | <mratsim> and you have a root/packagename.nim |
16:26:35 | FromGitter | <mratsim> alternatively you have a `root/src/packagename.nim` and `root/src/packagename/optionalpkg.nim ` |
16:27:55 | FromGitter | <kaushalmodi> @mratsim Thanks! I will follow that |
16:28:08 | * | rauss joined #nim |
16:28:14 | FromGitter | <kaushalmodi> The nimble README suggests putting everything in an `src/` dir |
16:28:21 | FromGitter | <kaushalmodi> so things were getting quite messy |
16:28:51 | * | lain0n quit (Quit: Leaving) |
16:30:22 | * | zahary joined #nim |
16:31:25 | * | floppydh quit (Quit: WeeChat 2.1) |
16:34:02 | FromGitter | <kaushalmodi> @mratsim Confirming that that structure works. Thanks! |
16:34:24 | FromGitter | <mratsim> It took me a year to get it right ;) |
16:35:54 | * | nsf quit (Quit: WeeChat 2.1) |
16:39:29 | * | tsaka__ joined #nim |
16:40:10 | tsaka__ | How can you get the nim compiler to output a file with extension so that compiled files can be ignored with gitignore? |
16:42:26 | * | yglukhov[i] quit (Remote host closed the connection) |
16:49:36 | * | drs joined #nim |
16:53:29 | * | yglukhov[i] joined #nim |
16:55:55 | * | sz0 quit (Quit: Connection closed for inactivity) |
16:58:31 | * | yglukhov[i] quit (Ping timeout: 268 seconds) |
16:59:03 | FromGitter | <Quelklef> @Varriount ooh yikes hi I'm a little late but what do you think of Lilt? It still needs work but I never really found a use for it a kind of dropped it :/ |
17:11:05 | * | tsaka__ quit (Ping timeout: 245 seconds) |
17:12:12 | FromGitter | <Quelklef> What's the reason for giving command calls, `()` calls, infix calls, prefix calls, and accQuoted calls each their own AST node? |
17:12:32 | FromGitter | <Quelklef> I know it'd help with error messages and such but is there any, I guess, functional reason? |
17:13:58 | FromGitter | <Quelklef> I'd have expected them all to be syntactic sugar for some overarching "call node" |
17:15:41 | FromGitter | <kaushalmodi> If I need the compiled C to contain `#include "foo.h"`, what do I need to put in the Nim code? |
17:17:03 | FromGitter | <kaushalmodi> For example: this does not create `#include "emacs-module.h"` in the generated C files: https://github.com/yuutayamada/nim-emacs-module/blob/master/emacs_module.nim |
17:18:14 | FromGitter | <kaushalmodi> Looking at its .nimble, it was probably created when nim 0.14.x was out.. looking at that code, does something need to be changed for it to work on nim 0.18.1 (devel) |
17:22:19 | FromGitter | <Quelklef> why exactly are you trying to do this? |
17:23:15 | FromGitter | <kaushalmodi> @Quelklef I am trying to use the Emacs Dynamic Modules.. It's a learning exercise.. with this working, I can call procs defined in Nim from Emacs. |
17:23:53 | FromGitter | <kaushalmodi> References: http://diobla.info/blog-archive/modules-tut.html, https://mrosset.github.io/emacs-module/ |
17:28:17 | * | yglukhov[i] joined #nim |
17:28:57 | * | rockcavera quit (Ping timeout: 245 seconds) |
17:33:27 | * | yglukhov[i] quit (Remote host closed the connection) |
17:33:39 | * | yglukhov[i] joined #nim |
17:43:33 | * | rockcavera joined #nim |
17:44:16 | * | drs left #nim (#nim) |
17:49:11 | * | noonien quit (Quit: Connection closed for inactivity) |
17:56:11 | Araq | Quelklef: good question. The idea is that in DSLs you can distinguish between these different syntaxes |
17:57:23 | * | yglukhov[i] quit (Remote host closed the connection) |
18:00:38 | * | tsaka__ joined #nim |
18:00:39 | FromGitter | <Quelklef> Ah, cool! |
18:06:19 | FromGitter | <kaushalmodi> Araq: I finally got that Nim emacs module compiling.. though on v0.18.0. Here is the diff of the generated .c: https://gist.github.com/kaushalmodi/77697e1f345d5ba5adb399fdbd0aaff5 |
18:06:45 | FromGitter | <kaushalmodi> Note that the #includes and much more goes missing in the devel version compile. |
18:07:04 | FromGitter | <kaushalmodi> Should I open an issue to track this? |
18:07:16 | * | yglukhov[i] joined #nim |
18:09:46 | Araq | no, you're holding it wrong. |
18:10:01 | Araq | 0.18 with --deadCodeElim:on will produce something quite similar, I bet |
18:10:07 | FromGitter | <kaushalmodi> ? |
18:10:15 | Araq | you need to use the pragmas differently |
18:10:29 | Araq | Nim is allowed to optimize away anything you don't use |
18:11:50 | * | yglukhov[i] quit (Ping timeout: 255 seconds) |
18:12:11 | FromGitter | <kaushalmodi> Sorry, I am out of depth when it comes to C code. I was hoping to use that library to use Nim written procs in Emacs. Can you hint to the changes needed in https://github.com/yuutayamada/nim-emacs-module/blob/master/emacs_module.nim and https://github.com/yuutayamada/nim-emacs-module/blob/master/emextra.nim? Or, are the needed changes too involved? |
18:13:21 | shashlick | dom96: moderated forum posts show up in the RSS feed - is this intentional? |
18:16:29 | FromGitter | <kaushalmodi> Araq: Or on the flip side, any way to disable dead code elimination on devel? I see that `--deadCodeElim:off` doesn't work on devel |
18:16:53 | Yardanico | no |
18:16:59 | Yardanico | it should and will be always enabled. |
18:17:08 | Yardanico | (well, that's Araq's opinion but I agree with him) |
18:17:22 | Yardanico | why would you ever want to disable dead code elimination? |
18:17:49 | * | Trustable quit (Remote host closed the connection) |
18:18:15 | FromGitter | <kaushalmodi> OK, then I will need help to fix the nim-emacs-module library to work on nim devel, else I would be stuck using 0.18.0 for that :( |
18:19:01 | FromGitter | <kaushalmodi> Yardanico: See https://gitter.im/nim-lang/Nim?at=5b2be91b960fcd4eb9175615 for why I asked for disabling dead code elim |
18:19:35 | Yardanico | I see that, but that happens because you don't use the types exported by that .nim file |
18:20:10 | * | craigger quit (Quit: bye) |
18:20:51 | Araq | kaushalmodi: the huge .emit looks suspicous, other parts look good |
18:21:09 | Araq | can't be hard to fix |
18:22:24 | * | craigger joined #nim |
18:22:49 | FromGitter | <kaushalmodi> Yardanico: ⏎ ⏎ > I see that, but that happens because you don't use the types exported by that .nim file ⏎ ⏎ I wish I knew how to fix that :) [https://gitter.im/nim-lang/Nim?at=5b2becf9960fcd4eb9176210] |
18:27:09 | Yardanico | You would ALWAYS include these headers (at global level), not in the type section |
18:27:50 | Yardanico | hm |
18:29:47 | FromGitter | <kaushalmodi> Yardanico: What about these missing functions starting here? How do I retain those?: https://gist.github.com/kaushalmodi/77697e1f345d5ba5adb399fdbd0aaff5#file-diff_nim_0_18_0__devel-diff-L196 |
18:31:06 | Yardanico | why would you keep them if you don't use them? |
18:31:09 | Yardanico | I don't really get it |
18:31:21 | Yardanico | I understand that you want to have types and headers anyway |
18:31:56 | * | bozaloshtsh joined #nim |
18:32:55 | FromGitter | <kaushalmodi> With those functions removed, that C file fails compilation: ⏎ ⏎ ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=5b2bef575862c35f47bbc9de] |
18:35:05 | bozaloshtsh | When I try compiling the program "import typeinfo" with --debugger:native, I get "error: unknown type name 'TNimType'" |
18:35:20 | FromGitter | <kaushalmodi> I don't understand this 100%, but dead code elimination should not make the C code not compile at all |
18:35:39 | * | lainon joined #nim |
18:40:56 | FromGitter | <kaushalmodi> Yardanico: ⏎ ⏎ > You would ALWAYS include these headers (at global level), not in the type section ⏎ ⏎ How do I do that? `{. header: <emacs-module.h> .}` ? [https://gitter.im/nim-lang/Nim?at=5b2bf1375862c35f47bbcf72] |
18:41:05 | Yardanico | I'll try to do that now |
18:41:55 | FromGitter | <kaushalmodi> Yardanico: If you like to reproduce this compile error (does not need Emacs to be installed), see https://github.com/kaushalmodi/nim-emacs-module#usage |
18:43:35 | * | lompik joined #nim |
18:44:32 | * | ketralnis quit (Quit: Coyote finally caught me) |
18:45:54 | FromGitter | <kaushalmodi> nope.. gives this error: "Error: attempting to call undeclared routine: 'header'" |
18:46:53 | Yardanico | well, you can just do {.emit: "c code".} |
18:47:07 | Yardanico | so you can emit the #include statements |
18:51:49 | FromGitter | <kaushalmodi> looks like I need to add the emit pragma in all the Nim files.. a sample.nim imports the emacs_module.nim, then I need to add the emit in both. Even then, I am stuck with that same compile error: ⏎ ⏎ > Error: execution of an external compiler program 'gcc -c -w -I../include/emacs25/ -std=gnu99 -fPIC -I/home/kmodi/stow/pkgs/nim/devel/lib -o /home/kmodi/stow/pub_dotfiles/e |
18:51:49 | FromGitter | ... macs/dot-emacs.d/misc/nim-emacs-module/test/nimcache/emacs_module_sample.o /home/kmodi/stow/pub_dotfiles/emacs/dot-emacs.d/misc/nim-emacs-module/test/nimcache/emacs_module_sample.c' failed with exit code: 1 ⏎ ⏎ /home/kmodi/stow/pub_dotfiles/emacs/dot-emacs.d/misc/nim-emacs-module/test/nimcache/emacs_module_sample.c: In function ‘emacs_module_init’: ... [https://gitter.im/nim-lang/Nim?at=5b2bf3c5479ca26689735c10] |
18:53:15 | FromGitter | <kaushalmodi> This is the function in that to-be-compiled sample.so that I would want to call from Emacs |
18:53:33 | FromGitter | <kaushalmodi> So there is no caller of that function yet |
18:53:47 | Yardanico | did you do {.exportc.} ? |
18:55:36 | FromGitter | <kaushalmodi> In sample.nim, I have: ⏎ ⏎ ```emacs.defun(mod_test_return_t, 1): ⏎ env.intern(env, "t".cstring)``` [https://gitter.im/nim-lang/Nim?at=5b2bf4a8aeb8fa0c0734b7e5] |
18:56:02 | FromGitter | <kaushalmodi> In that package's, emextra.nim, I have: ⏎ ⏎ ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=5b2bf4c27da8cd7c8c614b4b] |
18:57:07 | FromGitter | <Yardanico> can you try to add {.exportc.} pragma to fsym? |
18:58:42 | FromGitter | <kaushalmodi> I believe it should look like this? ⏎ ⏎ ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=5b2bf5625862c35f47bbda70] |
18:58:52 | FromGitter | <Yardanico> well, I'm just experimenting |
18:59:03 | FromGitter | <kaushalmodi> no it doesn't |
18:59:09 | FromGitter | <Yardanico> @kaushalmodi and did you know that you can actually specify template arguments? |
18:59:29 | FromGitter | <Yardanico> So you don't need to put argument types in docs :) |
18:59:47 | FromGitter | <kaushalmodi> I am not the original author of this library.. I don't understand the Nim<->C interface in this lib |
19:00:13 | FromGitter | <kaushalmodi> I'm just trying to revive https://github.com/yuutayamada/nim-emacs-module on Nim devel |
19:00:34 | FromGitter | <Yardanico> ok, another attempt - add .stdcall,exportc,dynlib. pragmas |
19:01:02 | FromGitter | <Yardanico> and are you compiling with --app:lib if you want to create a .so file? |
19:05:38 | FromGitter | <kaushalmodi> Yes, I am using --app:lib. I tried what you said, but the same error. |
19:05:45 | FromGitter | <kaushalmodi> ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=5b2bf709467bd7268c27f537] |
19:09:15 | * | lompik quit (Ping timeout: 268 seconds) |
19:10:21 | FromGitter | <kaushalmodi> Yardanico: While it still fails.. the diff of the exported C seems to be improved than before: https://gist.github.com/cda626a8896c5628f12c36f2e387fdeb |
19:11:05 | * | lainon quit (Ping timeout: 245 seconds) |
19:11:25 | FromGitter | <kaushalmodi> The includes now appear without using emit pragmas |
19:12:54 | FromGitter | <kaushalmodi> May be this gives you a hint of the issue (before: 0.18.0; after: devel): ⏎ ⏎ ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=5b2bf8b65862c35f47bbe77d] |
19:13:12 | FromGitter | <kaushalmodi> Note that the `nimEmacs_sample_mod_test_return_t` symbol is lost |
19:14:05 | FromGitter | <tim-st> Can nimble also support libs written with nimpy -> require python ? |
19:14:58 | Yardanico | well, it supports nimscript |
19:15:20 | Yardanico | so if you can check that python is installed via nimscript, you can do that with nimble |
19:16:27 | * | Vladar quit (Quit: Leaving) |
19:18:09 | FromGitter | <tim-st> Ok, thanks, and I wondered what people think about it. wrapping some big python libs is quite easy and if they import c libs it's not much slower than wrapping the c libs, but it's seems much less pure nim, so I wasnt sure if it's ok to have in nimble |
19:19:23 | FromGitter | <tim-st> maybe with prefix `nimpy` so people see it directly |
19:23:05 | shashlick | @tim-st: i was kind of thinking in similar lines |
19:23:31 | shashlick | to write a tool that converts python wrappers of C code to be called by nim directly |
19:25:53 | shashlick | i did something similar with nimkerberos which wraps the C code of the winkerberos python module |
19:26:29 | shashlick | but of course, it just exposes the C, rather another tool that can convert the python portions into pure nim which calls into the C through the nim wrapper |
19:28:27 | FromGitter | <tim-st> I just thought the python ecosystem is so huge that it often makes more sense to wrap these libs especially if the integration is natively. If there later exists a pure nim package the code can be replaced quite easy. I implemented the python nlp system spacy, and everything works fine, and in python I know that know memory leaks appear, in c i dont know |
19:31:22 | * | pigmej quit (Ping timeout: 260 seconds) |
19:31:26 | FromGitter | <tim-st> (this means wrapping c, not nims code^^) |
19:33:49 | FromGitter | <rayman22201> Hi! I have some random questions. First. Does anybody know if there was progress with this thread? https://forum.nim-lang.org/t/3886 ⏎ I am just really curious if there is a way to make Nim put a struct def in the RO section of a binary. |
19:35:06 | * | pigmej joined #nim |
19:36:59 | * | Arrrr quit (Remote host closed the connection) |
19:37:23 | * | vegax87 quit (Ping timeout: 276 seconds) |
19:44:44 | FromGitter | <Varriount> @Quelklef I was going to use it for a parser, but the documentation is a bit lacking... Also, I don't know how to do things like "I need to match this rule or that rule". |
19:45:50 | FromGitter | <Quelklef> @Varriount If you're still interested, I'd be happy to work with you and work on it. Especially since with an actual use case, it'll be much more directed development |
19:46:05 | FromGitter | <Quelklef> I admit the documentation is iffy, it's my first "real" project with real docs :P |
19:48:14 | * | nsf joined #nim |
19:48:22 | FromGitter | <rayman22201> lol. Crickets on that one. Second question. Mainly directed at @Araq: On the github issue for the new deterministic runtime, you talk about improving the C++ target support because of exception handling performance. I'm all for that, because it's good to have all the targets well tested and supported, but why can't the Nim home-rolled exception handling be made fast, by doing the "zero-cost" exception thing that |
19:48:22 | FromGitter | ... LLVM does? This is may be a stupid question, but I don't know a lot about how exception handling systems are implemented. ⏎ see: http://llvm.org/docs/ExceptionHandling.html |
19:52:16 | FromGitter | <kaushalmodi> Yardanico: Finally this worked! ⏎ ⏎ ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=5b2c01f06ceffe4eba264bd5] |
19:52:31 | FromGitter | <kaushalmodi> the `exportc` placement is order dependent! |
19:52:50 | FromGitter | <kaushalmodi> earlier I was putting it after that `extern`, and that did not work |
19:53:31 | FromGitter | <Yardanico> well, can you run the module from emacs tho? |
19:54:47 | FromGitter | <kaushalmodi> hmm.. haven't reached there yet.. give me a min :) |
19:55:38 | FromGitter | <kaushalmodi> works! ⏎ ⏎ ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=5b2c02ba0168e70c08e1ae96] |
19:58:46 | * | vegax87 joined #nim |
20:09:09 | * | jjido joined #nim |
20:14:23 | * | Bevoss joined #nim |
20:15:58 | Araq | rayman22201: pure C has no option to support zero-cost exception handling, that's a C++ invention. |
20:16:37 | Araq | we could map exceptions to propagating 'if' statements though and that would likely be better than the current setjmp based implementation |
20:17:01 | Araq | that's a planned AST to AST pass, scheduled for v1.x |
20:18:14 | Araq | exportc is not order dependent, you need to export what should be visible by other C code. |
20:18:29 | Araq | and it only applies to procs really. |
20:19:34 | * | cspar joined #nim |
20:24:06 | shashlick | who are the moderators for the forum? |
20:24:58 | FromGitter | <kaushalmodi> Araq: here is partial Nim snippet: ⏎ ⏎ ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=5b2c099ad2abe466887ddbf3] |
20:26:13 | Yardanico | shashlick, Araq and dom96 are admins afaik |
20:26:21 | Yardanico | well, AFAIK moderator = admin on the forum |
20:26:26 | Yardanico | but I might be wrong :) |
20:26:36 | Yardanico | maybe Varriount is a moderator too |
20:27:52 | FromGitter | <rayman22201> @Araq, couldn't you emulate zero-cost exception handling effectively by building the exception tables at compile time and using gotos? That's what it seems like LLVM is doing at the IR level. A nested if AST pass sounds much easier to implement, and more has more idiomatic Nim flavor. "mmmm delicious TM". |
20:28:37 | Demos[m] | I'm getting a lot of errors from system modues when I run nim doc2 |
20:29:23 | FromGitter | <ephja> you should release 2.0 before 2025 because AI will write all our software by then, surely ;) |
20:30:30 | FromGitter | <rayman22201> all hail our new robot overlords? |
20:33:25 | FromGitter | <ephja> Nim 2.0 ... AGI ... YotLD |
20:34:10 | Yardanico | Demos[m], I don't get any errors |
20:34:12 | Yardanico | just some warnings |
20:46:19 | Araq | rayman22201: these tables would need to be indexed by the 'pc' register or some equivalent which is not available in C |
20:48:27 | Araq | C is not really much of low level language, its benefits over the JVM are mostly the support for packed data structures (array of structs of arrays without pointer indirections) and the lack of RTTI |
20:51:49 | FromGitter | <rayman22201> inline asm for all the architectures! Should be no problem a weekend project :-P |
20:52:15 | Yardanico | all? |
20:52:30 | Yardanico | nim is made to be very portable |
20:53:22 | shashlick | some moderated messages on the forum, need to get published |
20:54:45 | FromGitter | <rayman22201> @Yardanico, Nim wouldn't be so portable if you had to implement an index to a table in the pc or segment register. Which is the point @Araq is making. |
20:55:09 | Yardanico | well, I'm talking about the same when you mention asm :) |
20:55:41 | FromGitter | <rayman22201> That was sarcasm. It was a bad joke. |
20:55:46 | Yardanico | ok, my bad |
20:57:30 | * | data-man joined #nim |
20:59:51 | Araq | shashlick: thanks, fixed |
21:03:38 | FromGitter | <rayman22201> As soon as @Araq explained the need to keep an index I realized it would be infeasible. (Unless you have the resources / years of work of a big project like LLVM or GCC). It's also not really in the spirit of Nim. Makes me a sad panda because I like the C target, and I would like Nim to continue to be very fast, but I understand the issue. The nested IF statement pass sounds interesting. It's a very clever idea |
21:03:38 | FromGitter | ... actually. I'm curious to see how it will compare performance wise. It will definitely be better than setjmp/longjmp. Time will tell! |
21:10:57 | shashlick | struggling to understand this thread: https://forum.nim-lang.org/t/3961, bet Nim supports all they are asking for but not sure |
21:12:05 | dom96 | Ugh, so somebody removing their repo has caused all the package repo PRs to start failing :( |
21:12:22 | dom96 | I'll need to figure out a way to only test the changes |
21:12:30 | dom96 | Anyone know if travis supports that? |
21:14:43 | Yardanico | shashlick, well, in my opinion it's not really worth to answer all these questions if the person didn't try to read the manual and code something in the language |
21:14:53 | FromGitter | <zetashift> @shashlick he wants some mixture of C# and Python and JS. I don't think he needs Nim/ expected C# with Python syntax |
21:15:01 | Araq | dom96: you don't want to hear it but ... |
21:15:28 | Yardanico | how can he compare C# and JS with Nim? C# is run via a VM (.NET framework and .net core), JS is run via a VM too |
21:15:34 | Yardanico | and nim is compiled to machine code |
21:16:15 | Araq | I think turning packages.json into a directory with one file per nimble package entry would be valuable in itself and also make this 'diff' thing easier to do |
21:16:26 | FromGitter | <zetashift> I think he's comparing the design choices(e.g. OOP support/single inheritance) vs nim's procedural approach |
21:16:39 | FromGitter | <zetashift> not the implementation stuff |
21:16:57 | Yardanico | Araq, oh, yeah, packages.json will need to be split into different files anyway at some point |
21:17:36 | Araq | Yardanico, shashlick just show him Nim's forum, frontend and backend in the same language, leveraging DSLs everywhere (Karax, Jester). that's impossible with C# |
21:18:24 | Araq | in fact, eventually it could also use Ormin for the zero overhead superb SQL query creation |
21:18:29 | FromGitter | <zetashift> I think he'll just jump from question to question |
21:18:35 | Araq | that had to be built into C# |
21:19:16 | dom96 | I'm happy to delete that thread btw guys |
21:19:16 | Araq | and not into Nim, because Nim focuses on the principles and C# on programming hypes. |
21:19:45 | dom96 | Seems like a trolling session starting |
21:20:34 | FromGitter | <Yardanico> https://github.com/pragmagic/godot-nim/issues/17#issuecomment-399244808 |
21:20:49 | FromGitter | <zetashift> just show him the nim-way of his unformatted code and let it be an example for future seekers? |
21:21:06 | FromGitter | <zetashift> python + c# = f# thoooo |
21:23:55 | dom96 | Ugh, seriously. Why delete a perfectly good repo? |
21:24:03 | dom96 | This is why we need a package directory |
21:36:29 | * | nsf quit (Quit: WeeChat 2.1) |
21:40:59 | Araq | dom96: true but you could also register a github nick that forks every registered Nimble package :-) |
21:41:06 | Araq | automatically. |
21:41:19 | dom96 | hrm, not a bad idea |
21:41:39 | dom96 | it would be a pain to keep these forks updated though |
21:45:51 | FromGitter | <kayabaNerve> Has nimble.io been registered? |
21:46:15 | dom96 | yes |
21:46:19 | FromGitter | <kayabaNerve> Great |
21:46:42 | dom96 | Not by us :P |
21:47:00 | FromGitter | <kayabaNerve> God damn it |
21:47:10 | FromGitter | <kayabaNerve> Has it been registered? Yes. By us? No |
21:47:20 | FromGitter | <kayabaNerve> We were so close |
21:47:30 | FromGitter | <kayabaNerve> We could just mirror what NPM does |
21:47:44 | FromGitter | <kayabaNerve> I mean, I don't like all of NPM but is the biggest code package manager ever built |
21:47:56 | FromGitter | <kayabaNerve> Unless you want to consider apt-get *-dev. No idea then... |
21:56:55 | * | elrood quit (Quit: Leaving) |
22:10:41 | FromDiscord | <treeform> Araq, not sure if this is bike shedding or real nimpretty bug: https://gist.github.com/treeform/c0a3a0f5606d8e3ce5a06584017cfb0e |
22:11:13 | FromDiscord | <treeform> The thing does not realize that the list is already wrapped and it wraps it its own way which looks odd. |
22:12:22 | Araq | line wrapping is a tough problem and the current implementation is |
22:12:36 | Araq | "I'm gonna wrap it so you aware it needs wrapping" |
22:12:53 | Araq | in other words, it's mostly a hint that you should reformat the code |
22:12:54 | FromDiscord | <treeform> ok, yeah other line wrapping issue: |
22:12:55 | FromDiscord | <treeform> https://gist.github.com/treeform/a6f2cac5a145c0df9afb298333d2655d |
22:13:08 | FromDiscord | <treeform> I see. |
22:14:45 | FromDiscord | <treeform> Good news though it does not produce compiler errors now, and my tests pass. So I am 98% confident it got it right. |
22:15:12 | Araq | your other gist looks fine to me |
22:15:48 | Araq | once nimsuggest integration arrives I'll use it regularly |
22:15:54 | Araq | er |
22:15:59 | FromDiscord | <treeform> it should probably drop the whole peekToken( down to next line... |
22:16:01 | Araq | I mean VSCode integration. |
22:16:52 | Araq | treeform: that's easy to change but in general we need a much more powerful algorithm for wrapping |
22:17:01 | Araq | I left a link in the sources about how to do it |
22:17:12 | FromDiscord | <treeform> yeah got it. I will not report line wrapping for now. |
22:17:28 | FromDiscord | <treeform> Its working, I will try to use it. |
22:17:42 | Araq | cool, thanks |
22:18:02 | FromDiscord | <treeform> you have a day were you run this over the whole standard library? |
22:18:08 | FromDiscord | <treeform> and there will be tons of changes? |
22:19:41 | FromDiscord | <treeform> like most of the standard library uses proc (,,,) not proc (;;;) for example. |
22:25:58 | FromGitter | <ephja> I've always been breaking before brackets if necessary, but I dunno if I mind breaking as late as possible (possibly in-between brackets) the way nimpretty does it |
22:26:20 | * | Bevoss quit (Ping timeout: 260 seconds) |
22:29:09 | Araq | treeform: maybe. I need to work on more important things though. |
22:30:27 | * | jjido quit (Quit: My MacBook has gone to sleep. ZZZzzz…) |
22:30:47 | Araq | also the ; vs , implementation will probably be changed |
22:31:37 | * | yglukhov[i] joined #nim |
22:31:43 | * | yglukhov[i] quit (Remote host closed the connection) |
22:32:19 | * | yglukhov[i] joined #nim |
22:32:51 | * | zahary quit (Ping timeout: 240 seconds) |
22:34:38 | * | zahary1 joined #nim |
22:35:08 | FromDiscord | <treeform> how can some thing be more important then nimpretty |
22:36:27 | * | yglukhov[i] quit (Ping timeout: 240 seconds) |
22:42:24 | * | PMunch quit (Quit: leaving) |
22:44:57 | * | yglukhov[i] joined #nim |
22:49:22 | * | yglukhov[i] quit (Ping timeout: 245 seconds) |
22:52:57 | * | yglukhov[i] joined #nim |
22:57:17 | * | yglukhov[i] quit (Ping timeout: 245 seconds) |
23:18:18 | * | lainon joined #nim |
23:20:47 | * | tsoernes quit (Remote host closed the connection) |
23:32:15 | tsaka__ | how can I add "--define:blas=openblas" to nim.cfg? |
23:51:33 | FromGitter | <kayabaNerve> Just like that :thinking: |
23:52:04 | * | zahary1 quit (Quit: Leaving.) |