00:01:16 | FromGitter | <awr1> you can also use `patchFiles`. BUT be careful, please |
00:02:58 | FromGitter | <awr1> since you're *generating* nim code you can adopt's nim philosophy of "well, the output codegen doesn't need to be perfectly human-readable" |
00:03:08 | FromGitter | <awr1> so maybe you can forego using `[]`. |
00:03:27 | * | actuallybatman joined #nim |
00:03:28 | FromGitter | <awr1> make your own procedure, `get()` or something. |
00:08:28 | * | actuallybatman quit (Ping timeout: 272 seconds) |
00:13:46 | * | actuallybatman joined #nim |
00:20:20 | * | sentreen quit (Ping timeout: 244 seconds) |
00:29:31 | FromGitter | <kayabaNerve> `CustomSeq = distinct seq` ? |
00:30:53 | * | laaron quit (Quit: ZNC 1.7.1 - https://znc.in) |
00:31:19 | * | laaron joined #nim |
00:34:14 | * | sentreen joined #nim |
00:51:43 | FromGitter | <Obround> Ok... |
00:52:56 | FromGitter | <Obround> @kayabaNerve -- That might work... |
01:48:32 | * | ng0_ joined #nim |
01:50:58 | * | nif quit (Quit: ...) |
01:51:07 | * | nif_ joined #nim |
01:51:32 | * | ng0 quit (Ping timeout: 260 seconds) |
01:56:55 | * | nif_ quit (Quit: ...) |
01:57:44 | * | nif joined #nim |
02:25:15 | * | dddddd quit (Remote host closed the connection) |
02:26:21 | * | endragor joined #nim |
02:51:50 | * | rayman22201 quit (Quit: Connection closed for inactivity) |
03:12:10 | * | vivus joined #nim |
03:27:35 | * | rockcavera quit (Remote host closed the connection) |
03:39:25 | * | fjellfras joined #nim |
03:41:36 | * | NimBot joined #nim |
03:52:15 | FromDiscord_ | <HurstWriter> I want to confirm my understanding. |
03:52:15 | FromDiscord_ | <HurstWriter> |
03:52:15 | FromDiscord_ | <HurstWriter> ``` |
03:52:15 | FromDiscord_ | <HurstWriter> loadExtensions() |
03:52:15 | FromDiscord_ | <HurstWriter> # glClearColor(0.0, 0.0, 0.0, 1.0) # Set background color to black and opaque |
03:52:15 | FromDiscord_ | <HurstWriter> ``` |
03:52:16 | FromDiscord_ | <HurstWriter> |
03:52:18 | FromDiscord_ | <HurstWriter> won't compile until I uncomment the `glClearColor(...)` because of dead code elimination |
03:53:03 | FromDiscord_ | <HurstWriter> this is the sdl2 opengl example, with everything commented out below `loadExtensions() ` for context |
03:54:25 | * | chemist69 quit (Ping timeout: 250 seconds) |
03:56:27 | * | chemist69 joined #nim |
03:58:51 | * | laaron quit (Quit: ZNC 1.7.1 - https://znc.in) |
04:03:36 | * | laaron joined #nim |
04:11:43 | * | laaron quit (Remote host closed the connection) |
04:14:07 | leorize | uhmm dead code elimination doesn't have any effect on this... |
04:14:39 | leorize | it's only to remove unneeded functions from the C output produced be the compiler |
04:15:09 | * | laaron joined #nim |
04:16:29 | leorize | Zevv, disruptek, narimiran: anyone willing to test my refactoring of nim.nvim? It should work, hopefully :P |
04:21:52 | * | laaron quit (Quit: ZNC 1.7.1 - https://znc.in) |
04:22:19 | * | laaron joined #nim |
04:25:43 | * | laaron quit (Remote host closed the connection) |
04:26:09 | * | laaron joined #nim |
04:26:30 | FromGitter | <zacharycarter> anyone know how to get nimgen to work in cpp mode? |
04:29:08 | * | gangstacat quit (Quit: Ĝis!) |
04:40:34 | * | nsf joined #nim |
04:49:34 | * | arecaceae quit (Remote host closed the connection) |
04:49:58 | * | arecaceae joined #nim |
04:52:23 | FromGitter | <zacharycarter> Never mind. |
05:24:12 | * | vivus quit (Remote host closed the connection) |
05:28:26 | Zevv | leorize: you lied to me. YOu have *three* users, not two! |
05:28:48 | Zevv | will update and test later today! |
05:32:47 | * | solitudesf joined #nim |
05:34:21 | FromDiscord_ | <Shield> zacharycarter do you have by chance the 32bit binaries of bgfx? |
05:36:46 | leorize | Zevv: it's in the refactoring branch :P |
05:54:02 | FromGitter | <kdheepak> Hi all, I have a Javascript function that I get using require. But `require` in Nim returns a `JsObject`. How do I cast that to a function? |
06:04:24 | FromGitter | <kdheepak> How do you cast to a jsobject to a proc in nim's javascript target |
06:04:46 | * | LargeEpsilon joined #nim |
06:11:33 | * | laaron quit (Quit: ZNC 1.7.1 - https://znc.in) |
06:12:38 | FromGitter | <kdheepak> https://nim-lang.org/docs/jsffi.html#to%2CJsObject%2Ctypedesc |
06:12:43 | FromGitter | <kdheepak> I think this is the answer. |
06:16:41 | * | narimiran joined #nim |
06:16:56 | * | laaron joined #nim |
06:17:58 | * | PMunch joined #nim |
06:18:36 | * | btop joined #nim |
06:29:16 | FromGitter | <zacharycarter> Shield: I can build some for you, but do you need them for Windows or some other os? |
06:29:38 | FromGitter | <zacharycarter> because I really only have access to Windows and WSL atm |
06:33:41 | * | terps joined #nim |
06:39:49 | * | terps quit (Ping timeout: 252 seconds) |
06:42:42 | * | skelett quit (Quit: WeeChat 2.4) |
06:53:11 | * | krux02 joined #nim |
06:58:56 | * | laaron- joined #nim |
07:00:00 | * | gmpreussner quit (Quit: kthxbye) |
07:00:57 | * | laaron quit (Remote host closed the connection) |
07:04:57 | * | gmpreussner joined #nim |
07:11:40 | * | ng0_ is now known as ng0 |
07:15:02 | * | LargeEpsilon quit (Read error: Connection reset by peer) |
07:16:04 | FromDiscord_ | <Shield> just windows, I'd like to try your bindings but couldn't compile it myself |
07:19:23 | * | solitudesf quit (Ping timeout: 268 seconds) |
07:34:45 | FromGitter | <kdheepak> Anyone have any example of using fetch / async using nim's javascript target? |
07:42:16 | * | MrAxilus[m] joined #nim |
07:45:40 | FromGitter | <kdheepak> Nim's await does not work for me in Javascript |
07:46:17 | FromGitter | <kdheepak> ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=5d5cf6c9fa99e74f6a65f647] |
07:54:19 | * | btop quit (Ping timeout: 246 seconds) |
08:03:04 | FromGitter | <kdheepak> I don't know how to get data from a Future object in the javascript target |
08:03:57 | FromGitter | <kdheepak> This example: https://github.com/nim-lang/Nim/blob/devel/tests/js/tasync.nim is not super helpful |
08:26:05 | * | floppydh joined #nim |
08:44:21 | * | terps joined #nim |
08:46:01 | PMunch | I assume you've read the actual documentation for it kdheepak? https://nim-lang.org/docs/asyncjs.html |
08:53:19 | Zevv | leorize: could you please drop the 'nimsuggest instance terminated' message on nvim exit? |
08:57:58 | * | actuallybatman quit (Ping timeout: 245 seconds) |
09:31:34 | PMunch | Hmm, kdheepak. I'm looking at asyncjs and I'm as lost as you are.. |
09:31:46 | PMunch | So await is only available inside a procedure marked with async |
09:32:31 | PMunch | But there doesn't appear to be any way to call an async procedure and wait for it in a synchronous procedure.. |
09:39:42 | * | LargeEpsilon joined #nim |
09:42:16 | * | clyybber joined #nim |
09:43:55 | clyybber | Araq: Hey, do you have an idea why 32bit fails on https://github.com/nim-lang/Nim/pull/11926 ? |
09:58:33 | * | shomodj joined #nim |
10:01:35 | * | shomodj_ joined #nim |
10:05:07 | * | Vladar joined #nim |
10:05:12 | * | shomodj quit (Ping timeout: 244 seconds) |
10:05:23 | FromDiscord_ | <Kiloneie> What are Nim's greatest weaknesses, besides not being 1.0 and small community ? |
10:13:35 | * | terps quit (Ping timeout: 250 seconds) |
10:18:10 | narimiran | no big sponsor behind it |
10:19:29 | FromDiscord_ | <Kiloneie> i wrote, anything else besides, noone knows about it because big moneys thrown at everyone's faces ? |
10:20:38 | FromDiscord_ | <Kiloneie> Nim vs C, just use Nim, as it's the much safer and readable language, compared to Python, also much safer, less bug prone as it doesn't let you do stupid things, and is way faster |
10:21:00 | FromDiscord_ | <Kiloneie> That i know, theres multiple inheritance it can't do, but besides that... what ? |
10:21:08 | CcxWrk | The library situation is not great, but that comes with small community. |
10:22:03 | FromDiscord_ | <Kiloneie> Okay, let's say that documentation, standard library, 1.0, community is all resolved in like 5 years or whatever, is there any reason to use some other language over it ? |
10:22:18 | CcxWrk | Personally I'd probably go with OCaml over Nim for a lot of things because of that, even though both have significantly smaller binding coverage than say Python. |
10:22:45 | CcxWrk | Oh sure. |
10:23:34 | CcxWrk | For one, you may want to use the language the operating system interface is written in. C on UNIXy systems, C++ on Windows, it's complicated on Android. |
10:23:50 | CcxWrk | The translation is always somewhat lossy. |
10:24:27 | FromDiscord_ | <Kiloneie> Wouldn't you just do Nim code, then stuff Nim can't do for making an OS, go look at the code it generated in C, and finish from there ? |
10:24:38 | FromDiscord_ | <Kiloneie> i mean, wouldn't it be better than pure C ? |
10:25:26 | FromDiscord_ | <Kiloneie> And yes Android is a mess, that OS doesn't know what it is or wants. |
10:25:27 | CcxWrk | You may want a language with better security guarantees (say Monte or Pony), you may want language from completely different paradigm (Prolog is invaluable to me), there is a plenty of reasons. |
10:26:07 | FromDiscord_ | <Kiloneie> Basically it's mostly subjective. |
10:26:21 | CcxWrk | It can be objective but project-specific. |
10:26:37 | CcxWrk | Do you need formal proof of code correctness? Go with Ada/SPARK. And so on. |
10:27:48 | FromDiscord_ | <Kiloneie> For hobbyists and beginners, a language like Nim would cover most things. I think it makes a very good language for beginners,(yes i know documentation is a must there, so are tutorials) |
10:28:04 | FromDiscord_ | <Kiloneie> for some specific things like you mentioned, there are better alternatives |
10:29:21 | CcxWrk | Kiloneie: I mostly agree with http://norvig.com/21-days.html you need to learn quite a few approaches different languages take to get understanding of the problem domain. |
10:29:46 | FromDiscord_ | <Kiloneie> I will take a look |
10:30:34 | CcxWrk | For total beginners I mostly suggest AWK via the book. Very limited feature set so not too many things to keep in mind. In general languages with few features are good starters. Pascal was designed for that too. |
10:30:49 | * | LargeEpsilon quit (Ping timeout: 252 seconds) |
10:31:41 | CcxWrk | I'd call Nim more of a pragmatic choice than a learning one. Still way better than C++ or Haskell that try to cram in everything and a kitchen sink. But still there'll be a lot of gotchas for inexperienced. |
10:33:15 | CcxWrk | The advantage of Python and other languages with interactive interpreter is very easy way to see what's going on and experiment. (Partially true in Forth too) |
10:34:27 | CcxWrk | If you want a better Python I'll point you to Icon or rather the modern version called Unicon. Nim feels more of a ML crossed with C with a little sprinkles of Python syntax on top to me. |
10:37:57 | FromDiscord_ | <Kiloneie> Idk my first language was Game Maker's GML, it was very easy, and you made games, really great for beginners, but once you started making games larger than pacman, let's say how i wanted to make a space game, where you construct your own space ship from modules, micro the inside of the ship like in FTL game, and it's dynamic typing becomes a huge pain in the ass, and typing every function by it's name like, object_index, sprite_index, x, |
10:38:50 | FromDiscord_ | <Kiloneie> And yes python's interactive mode is great, but Nim's compiler is actually so fast, you can do that method of learning almost in the same manner ? |
10:39:24 | dom96 | I would challenge the notion about whether you actually want a language with "better security guarantees" |
10:39:36 | dom96 | You should be more specific when making these claims :) |
10:40:13 | CcxWrk | Oh sure, it's a complex topic. I was trying to point out you the answers are complex too. :) |
10:41:22 | CcxWrk | Kiloneie: I'd disagree on that. There's big power to the introspection and in Python's case built-in help/docstrings. |
10:42:50 | * | fjellfras quit (Quit: Leaving) |
10:42:52 | FromDiscord_ | <Kiloneie> This introductionary video of mine is bugging me how to correctly introduce Nim, i did first program setup and hello world synopsis in like 30 minutes, intro video... ugh... This is why i am asking all these questions. |
10:42:52 | FromDiscord_ | <Kiloneie> |
10:42:53 | FromDiscord_ | <Kiloneie> And sure, i never found writting and executing code line by line much appealing to me, besides.... command prompt stuff ?. |
10:43:20 | FromDiscord_ | <Kiloneie> Do you guys want to read my synopsis for my 2 videos ? im kinda lost on the first one. |
10:44:34 | CcxWrk | Even command line can be fun if you have "turtle" or for the old foggies "robot Karel" alongside it. |
10:48:31 | CcxWrk | dom96: That said, I don't think there is any way to restrict ambient authority in Nim, is there? It'd be amusing to see a tamed version of the language though I don't think it fits it too well. |
10:49:02 | dom96 | no idea what ambient authority is :O |
10:51:02 | CcxWrk | Something a piece of code can do without it being explicitly passed in. It's a general concept and looks bit different on language, OS and hardware levels. |
10:51:28 | * | Vladar quit (Remote host closed the connection) |
10:51:52 | * | Vladar joined #nim |
10:53:26 | CcxWrk | Probably the most familiar would be the tamings of JavaScript (Google Caja, Secure EcmaScript, Jessie), but there has been quite a few projects on producing variants of languages with such guarantees. |
10:54:12 | Araq | .tags: [] mechanism :P |
10:56:43 | CcxWrk | Yeah, that's an opt-in though (and I'm not sure if sufficient). I was talking about languages with "no escape hatches" policy. |
11:00:40 | * | shomodj joined #nim |
11:00:58 | CcxWrk | You also have to eliminate globals among other things. But yeah, effect tracking possibly within linear typing system seems to be one of possible ways to isolate authority. Less popular than the object-oriented and message-passing ones currently. So that could actually work I think. |
11:01:04 | FromGitter | <alehander42> PMunch, i worked on asyncjs |
11:01:09 | FromGitter | <alehander42> what are you trying to do |
11:02:56 | * | terps joined #nim |
11:03:11 | FromGitter | <alehander42> sorry, this is not really possible iirc |
11:03:20 | FromGitter | <alehander42> await is forbidden out of async in javascript |
11:03:32 | FromGitter | <alehander42> except for top level: i think latest browser/node versions or flags support it |
11:03:48 | FromGitter | <alehander42> typically on top level i can discard myAsync() in node |
11:03:55 | FromGitter | <alehander42> and the script seems to await the end of it |
11:04:04 | * | shomodj_ quit (Ping timeout: 248 seconds) |
11:04:22 | FromGitter | <alehander42> but if you want to await inside synchronous procedure, i guess one would need to make it also asynchronous |
11:04:59 | FromGitter | <alehander42> i am afraid we are limited by javascript/node async semantics here as its practical to map to them |
11:05:46 | PMunch | But doesn't that mean that either everything is async, or that nothing is? |
11:06:34 | FromGitter | <alehander42> basically if you need to somewhere await stuff, yeah, its "callstack" probably needs to be async |
11:06:53 | FromGitter | <alehander42> https://stackoverflow.com/questions/47227550/using-await-inside-non-async-function |
11:07:27 | disruptek | leorize: i'm not getting instant checking in the new nim.nvim; do i now need to toggle that somewhere? |
11:08:04 | disruptek | maybe i never did. 😉 |
11:08:37 | FromGitter | <alehander42> thats a known thing iirc https://journal.stuffwithstuff.com/2015/02/01/what-color-is-your-function/ |
11:08:46 | FromGitter | <alehander42> ", you’re right back to realizing color is still there, bleeding all over your codebase." |
11:10:10 | clyybber | Araq: Hey, you there? |
11:11:44 | krux02 | I am here |
11:11:54 | krux02 | clyybber: if that helps |
11:12:05 | * | LargeEpsilon joined #nim |
11:12:20 | clyybber | I don't know, do you know how https://github.com/nim-lang/Nim/pull/11926 could fail 32bit tests? |
11:12:36 | PMunch | alehander42, ah I see.. Maybe some details about this shoud be added the the asyncjs documentation? |
11:13:18 | clyybber | krux02: AFAICT I don't use 64bit exclusive things |
11:13:37 | FromGitter | <alehander42> PMunch, you're right, it's not obvious |
11:13:47 | FromGitter | <alehander42> especially if people know waitFor |
11:14:32 | PMunch | Yeah I just started looking into it because @kdheepak asked about it, and by reading through the docs and writing out some examples I really couldn't get an idea of what I did wrong.. |
11:14:49 | FromGitter | <alehander42> yes, maybe the error should also include it |
11:14:59 | FromGitter | <alehander42> we can define await globally in jsffi |
11:15:22 | FromGitter | <alehander42> with a error template that says "you can only await inside {.async.} in the javascript backend" |
11:15:32 | FromDiscord_ | <Kiloneie> This is my synopsis for my Nim introductionary video, can you give me your thoughts ? https://justpaste.it/6ltqe |
11:15:45 | disruptek | you simply need to keep in mind that when you are in an async context, you use `await`, because it's async-aware. that's the case in any backend, not just js. |
11:16:13 | FromGitter | <alehander42> yeah, that's true |
11:16:28 | FromDiscord_ | <Kiloneie> And this is snyopsis for video #2 your first program Hello world: https://justpaste.it/5f63f |
11:16:47 | FromGitter | <alehander42> but you can still give some kind of a hint like "you need to use this in async" |
11:17:27 | FromGitter | <alehander42> even, i'd argue for the asyncdispatch, such a hint should include a "if you want to await it in a sync function, you can use waitFor" |
11:17:40 | * | endragor quit (Remote host closed the connection) |
11:18:12 | FromGitter | <alehander42> and for the javascript backend: "there is no way to wait for it in sync code except on top level" |
11:18:56 | PMunch | Yeah, that would be nice |
11:19:17 | PMunch | Can you get the result of an async procedure at the top level? |
11:21:37 | disruptek | of course, using `waitFor`. |
11:21:48 | PMunch | Not in JS |
11:21:54 | PMunch | waitFor doesn't exist there |
11:22:18 | disruptek | that makes me sad. |
11:22:32 | PMunch | JavaScript makes everyone sad |
11:22:52 | FromGitter | <alehander42> you can |
11:22:56 | FromGitter | <alehander42> but with `then()` |
11:23:16 | FromGitter | <alehander42> oh .. let's not jump on the "javascript sad" bandwagon |
11:23:21 | PMunch | Haha :P |
11:23:28 | Araq | clyybber: pong |
11:23:30 | FromGitter | <alehander42> wasm is here, people are free to make a nim backend :P |
11:23:39 | Araq | alehander42: tested the new karax? |
11:23:46 | FromGitter | <alehander42> ugh sorry, didnt find the time |
11:23:46 | PMunch | New Karax? |
11:24:08 | PMunch | Nim can still do WASM through C and Emscripten right? |
11:29:43 | * | nif quit (Quit: ...) |
11:29:50 | disruptek | yes, but the ideal future of nim->wasm is probably nim->llvm backend->wasm. |
11:29:52 | * | nif joined #nim |
11:31:11 | clyybber | Araq: Hi |
11:31:13 | PMunch | Yeah I guess that makes sense. the same way we now du Nim -> C -> Binary |
11:31:28 | clyybber | Araq: Any idea why https://github.com/nim-lang/Nim/pull/11926 is failing only on 32bit? |
11:32:07 | Araq | no but you also broke https://ci.appveyor.com/project/dom96/nim/builds/26830991/job/80xbxg3qff7jvuf9/tests |
11:32:35 | clyybber | Huh, what the hell |
11:34:06 | * | theelous3 joined #nim |
11:35:08 | clyybber | How can I tell nimble to use nim_temp when doing nimble test? |
11:35:47 | clyybber | Nevermind |
11:42:01 | clyybber | Araq: Is a nkStmtList with no sons legal? |
11:48:24 | * | laaron- quit (Quit: ZNC 1.7.1 - https://znc.in) |
11:48:31 | PMunch | Hmm, FOSDEM call for participation is out: https://fosdem.org/2020/news/2019-08-13-call-for-participation/ |
11:48:42 | Araq | clyybber: not really but the sons.len can be 0 |
11:48:51 | * | laaron joined #nim |
11:49:58 | PMunch | So, the big question, can we fill 7-8 hours with Nim talks and apply for a devroom? |
11:50:46 | FromGitter | <alehander42> BrusselsNimConf2020 |
11:51:36 | FromGitter | <alehander42> i think its possible, but i doubt this is the only req |
11:52:11 | PMunch | https://submission.fosdem.org/submission/devroom |
11:52:15 | PMunch | Not too far from it |
11:52:24 | FromGitter | <alehander42> i think something like a "newer system langs" devroom would be way easier, but .. i doubt the diplomacy is there |
11:52:39 | PMunch | Yeah, I've been thinking about that as an alternative |
11:52:58 | PMunch | Or just a "Newer languages" room, doesn't have to be system langs |
11:53:07 | FromGitter | <alehander42> yeah |
11:53:50 | PMunch | But which langs.. |
11:54:03 | clyybber | Araq: Ok, pushed a fix, maybe it magically fixes the 32 bit tests too. |
11:55:32 | FromGitter | <alehander42> nim, zig, crystal, pony, scopes? maybe julia? probably many |
11:55:35 | narimiran | v-lang, of course :D this would generate everybody's interest :D |
11:56:09 | * | nif quit (Quit: ...) |
11:56:19 | * | nif_ joined #nim |
11:56:24 | narimiran | or, we just claim there will be v-lang talk, but then when the time comes.... :D |
11:56:48 | FromGitter | <alehander42> if they have enough progress, i'd welcome them with open arms |
11:57:54 | PMunch | I'm talking to a guy who's active in the V community right now actually |
11:58:10 | PMunch | Would definitely be interesting to hear a talk about it |
12:01:25 | FromGitter | <zetashift> @Kiloneie on the first one there a bit of repetition but looks nice otherwise, the second one is good too but I'd recommend also saying that `nim c -r foo.nim` compiles in debug mode |
12:04:12 | narimiran | @Kiloneie do you plan a long video series about programming in nim? what it will be about? will you make some project or go through various topics or something else? |
12:05:32 | leorize | Zevv: I don't know when nvim exit... but I can omit that message for error code 0 (which I'm going to) |
12:08:01 | leorize | narimiran: since you probably didn't check the log, can you please try to pull the "refactoring" branch of nim.nvim? |
12:08:23 | leorize | I've done some cleanup / optimization, and hopefully everything still works |
12:08:44 | narimiran | leorize: you're right, i didn't check the logs. yeah, i could do that |
12:08:47 | leorize | disruptek: the plugin never supported automated linting :P |
12:09:15 | leorize | narimiran: you need to get an IRC bouncer :P |
12:10:06 | narimiran | naaah, i'm fine the way the things are currently. sometimes i'm offline and that's it :) |
12:10:18 | PMunch | leorize, just leave him a message with MemoServ :) |
12:13:36 | PMunch | Okay, I'm taking some innitative on this as I think it would be really cool. I'm inviting anyone who's interested to join me over in #fosdem19newerlangs to discuss the creation of a newer languages Developer room. And I'm pinging people in other newer languages channels to see if they want to join. |
12:20:04 | FromGitter | <alehander42> PMunch awesome |
12:22:19 | * | solitudesf joined #nim |
12:26:14 | FromGitter | <zacharycarter> I see Rust is missing from your list @alehander42 :P |
12:26:38 | PMunch | I think Rust has it's own room |
12:26:44 | PMunch | Or at least they did last year I think |
12:27:33 | FromGitter | <zacharycarter> The main languages in that list that are interesting to me are Scopes and Nim |
12:27:34 | * | MrAxilus[m] left #nim ("User left") |
12:27:40 | * | MrAxilus[m] joined #nim |
12:27:45 | * | MrAxilus[m] left #nim ("User left") |
12:28:14 | FromGitter | <arnetheduck> nim->llvm->wasm already exists / works, but the support stuff around it is missing - on the top of my list is something that generates a javascript api from the wasm code - something like https://github.com/rustwasm/wasm-bindgen |
12:28:34 | FromGitter | <alehander42> @zacharycarter they probably have their own room : ) |
12:28:45 | FromGitter | <zacharycarter> yeah true |
12:28:47 | FromGitter | <alehander42> they're on a next level of popularity |
12:29:19 | FromGitter | <zacharycarter> Scopes seems to have a much much smaller community than Nim does |
12:29:23 | FromGitter | <alehander42> overally, i feel this is for languages without bigger backing, like kotlin , rust etc |
12:29:29 | FromGitter | <alehander42> hm thats true |
12:29:47 | FromGitter | <arnetheduck> in another discussion the other day I made the point that it would make sense for nim to drop its javascript backend completely and refocus on wasm instead - assuming nim is released in a year or two, js will be mostly obsolete as a way to compile "other" languages for the web or node |
12:29:59 | FromGitter | <alehander42> i just found it interesting before |
12:30:01 | FromGitter | <alehander42> @arnetheduck booo |
12:30:08 | FromGitter | <zacharycarter> it is interesting |
12:30:40 | clyybber | arnetheduck: I agree |
12:30:45 | FromGitter | <zacharycarter> +1 |
12:30:48 | FromGitter | <arnetheduck> @alehander42 look around - javascript projects are busy moving to typescript and don't realise they've been obsoleted already by wasm |
12:31:17 | FromGitter | <alehander42> i am all for a very good nim wasm backend |
12:31:19 | FromGitter | <zacharycarter> although I think Nim should first focus on stability |
12:31:25 | FromGitter | <alehander42> and i hope a lot of resources should be put in that |
12:31:25 | FromGitter | <zacharycarter> and fixing what's broken |
12:31:41 | FromGitter | <alehander42> but it doesnt make sense to deprecate the javascript backend in the next 5-ish years |
12:31:47 | FromGitter | <alehander42> imho |
12:31:53 | FromGitter | <zacharycarter> as well as making experimental features that are planned as keepers, non-experimental |
12:31:56 | FromGitter | <arnetheduck> why on earth would you moved to a typed language and compile to javascript of all things? makes no sense.. js backend represents a maintenance burden and a mindshare sink for nim, and it's not like nim as too many resources |
12:32:22 | * | Kaivo joined #nim |
12:32:30 | FromGitter | <alehander42> @arnetheduck sorry, but wasm is still in its infancy for webdev |
12:32:47 | * | cgfuh joined #nim |
12:33:45 | FromGitter | <arnetheduck> today yes. in a year or two which is the earliest point that nim has a chance of being stable? |
12:35:35 | FromGitter | <alehander42> javascript still would be everywhere |
12:35:43 | livcd | arnetheduck: do you think wasm will be usable in 1-2 years ? |
12:35:44 | FromGitter | <alehander42> this transition would take ~a decade |
12:35:46 | FromGitter | <alehander42> at least |
12:35:51 | FromGitter | <alehander42> imo |
12:36:22 | * | rockcavera joined #nim |
12:36:30 | FromGitter | <arnetheduck> if the nim js backend was a high-quality, fully working environment that supported "most" of nim, it would be a different matter - but it's not - it has severe and quite arbitrary limitations that need significant work to resolve. |
12:36:48 | disruptek | this. wasm doesn't just let us sidestep that. |
12:36:54 | disruptek | it's far more performant and capable. |
12:37:02 | disruptek | what would you rather write wasm in? |
12:37:20 | FromGitter | <arnetheduck> @livcd given that the big-3 browsers have implemented it *already*, I'm not sure what you mean by "usable" |
12:37:45 | FromGitter | <alehander42> however 95% of the code / libs/ api-s out there expect a javascript base |
12:37:47 | FromGitter | <arnetheduck> it's also usable in nodejs which is the other "big" js environments, so I don't really see what the use case is |
12:37:55 | FromGitter | <alehander42> lets just ignore all nuance |
12:37:58 | FromGitter | <alehander42> and the ecosystem |
12:38:02 | dom96 | PMunch: yay, thank you for keeping a look out on this. That devroom sounds like an awesome idea. |
12:38:18 | dom96 | Guessing FOSDEM people might be concerned about bias in you choosing Nim talks though :P |
12:38:31 | FromGitter | <arnetheduck> @alehander42 agree - that's why a bindgen is needed, so that the wasm code can be accessed conveniently from nim, *as if* you were using the js backend |
12:38:46 | FromGitter | <alehander42> the nim javascript backend is fine imo: it has stdlib limitations which dont really bother its usage as people just dont .. need those modules |
12:38:56 | FromGitter | <arnetheduck> it's just a matter of replacing some of the "internal" implementation details with a backend that is far more suitable for nim |
12:39:09 | * | terps quit (Ping timeout: 252 seconds) |
12:39:27 | livcd | arnetheduck: available on all devices |
12:39:34 | livcd | can you use wasm with iOS safari ? |
12:39:36 | FromGitter | <arnetheduck> *accessed conveniently from js |
12:40:20 | dom96 | arnetheduck: no way on the proposition to drop JS |
12:40:25 | FromGitter | <alehander42> is interopping with javascript code easy in today's wasm? can you access the DOM, interop with react/etc similar |
12:40:34 | dom96 | The JS backend works well enough for most use cases |
12:40:43 | FromGitter | <alehander42> this is really not that easy to pull out |
12:40:46 | FromGitter | <arnetheduck> @alehander42 yup - but you need a bindgen |
12:40:48 | FromGitter | <alehander42> pull off* |
12:40:48 | dom96 | we've got a SPA framework written in it and a forum that uses it |
12:40:57 | dom96 | we should enable WASM on a per-proc basis |
12:41:19 | dom96 | (that would be a pretty killer feature as DOM access is still a problem for WASM AFAIK) |
12:41:20 | livcd | are there applications in the wild that are only wasm? |
12:41:42 | FromGitter | <alehander42> lets first have a good nim wasm backend |
12:41:49 | FromGitter | <alehander42> and worry about the javascript one after that |
12:42:00 | PMunch | dom96, that's partially why I want to invite all the languages now, before we create the application |
12:42:04 | FromGitter | <arnetheduck> funny enough and for natural reasons, the ones that are most interested in wasm are game devs, a group that nim supposedly targets specifically |
12:42:32 | FromGitter | <alehander42> but you are creating an artifficial "us against them" here |
12:42:46 | dom96 | PMunch: Makes sense. Let me know if there is anything I can do to support your efforts |
12:42:57 | FromGitter | <arnetheduck> @livcd: https://blogs.unity3d.com/2018/08/15/webassembly-is-here/ |
12:43:24 | FromGitter | <alehander42> i want both backends for now |
12:43:59 | dom96 | there is nothing to argue for here |
12:44:19 | dom96 | both backends will remain for the foreseeable future, wasm is nowhere near ready for us to just drop the js backend |
12:44:38 | dom96 | if a wasm backend matures we may think about deprecating the JS backend |
12:45:46 | FromGitter | <arnetheduck> yes, we anticipated this would be the reaction :) |
12:47:39 | dom96 | I don't understand how you can consider just dropping the JS backend right now as something viable |
12:47:52 | FromGitter | <alehander42> you knew how unreasonable your idea was from the beginning :P |
12:48:08 | dom96 | Do you simply not care about the current users of Nim? |
12:48:08 | livcd | arnetheduck: why "we" ? |
12:48:20 | FromGitter | <alehander42> @arnetheduck i know you're trying the "let's push for X that is aligned with only my project's interest" but come on |
12:48:58 | FromGitter | <arnetheduck> but the writing is on the wall, and I'd encourage you to evaluate the proposal based on its technical merits: which output nim most naturally maps to, where nim gets the most bang for the maintenance buck, etc and you'll quickly see that there's a lot more opportunity for reuse if the friction between the backend and the language is smaller |
12:49:11 | disruptek | exactly. |
12:49:15 | disruptek | llvm has other benefits. |
12:49:25 | FromGitter | <arnetheduck> @alehander42 no, mostly I'm arguing it from the point of view of someone that *has* written a backend for nim |
12:49:39 | disruptek | it's just a technically superior backend format. |
12:49:58 | FromGitter | <alehander42> but you're creating an artificial "javascript vs wasm" |
12:50:02 | FromGitter | <alehander42> nothing stops a nim wasm backend |
12:50:13 | disruptek | nothing stops a js backend. go nuts. |
12:50:28 | FromGitter | <alehander42> disruptek, eh? |
12:50:30 | disruptek | nim->llvm also enables graalvm. |
12:50:43 | disruptek | no one said js backend had to be dropped. |
12:50:47 | FromGitter | <arnetheduck> no, I'm pointing out that you can access nim code from javascript *better* if nim is compiled to wasm and a js interface is automatically generated - from a purely technical point of view |
12:51:02 | FromGitter | <alehander42> disruptek, well that was exactly what it was said |
12:51:21 | dom96 | disruptek: literally what was said |
12:51:43 | disruptek | well, lemme see a quote. i saw some "writing on the wall" type stuff, which is accurate, imo. |
12:52:13 | * | gangstacat joined #nim |
12:52:18 | FromGitter | <arnetheduck> I'm not saying that nim code should not be usable from javascript - I'm saying that in 2019, it doesn't technically make sense to generate javascript code from a statically typed language - it's... uh.. "inefficient" |
12:52:37 | clyybber | you can skip the quotes |
12:52:38 | FromGitter | <alehander42> @arnetheduck and i am talking to you as somebody who created several dsl-s which do something similar : generating automatically a javascript interface : this sucks to be used / debugged / analyzed |
12:52:39 | dom96 | Sure, I agree with that. |
12:52:53 | FromGitter | <alehander42> unless you actually use more wasm-based stuff |
12:53:17 | FromGitter | <alehander42> if you just work on a typical web frontend: today, not in "whenever wasm ecosystem is there" day |
12:53:21 | dom96 | WASM is great and I want us to adopt it |
12:53:22 | dom96 | I want Nim to have a WASM backend |
12:53:24 | dom96 | and I want to use it |
12:53:26 | FromGitter | <alehander42> this is not a better way |
12:53:29 | Araq | all my attempts to access the DOM failed with the emscripten/wasm route |
12:53:30 | FromGitter | <arnetheduck> you could have your forum and your dsl and all that, and more nim features working with more performance for free this way |
12:53:52 | Araq | that was roughly a year ago |
12:53:55 | Araq | maybe it's better now |
12:54:00 | disruptek | why don't we just drop this wasm discussion and focus on llvm? that's a much more powerful intermediate that gives us wasm for free. |
12:54:08 | FromGitter | <arnetheduck> @livcd "we" as in status (because we develop a lot of nim code) |
12:54:16 | Araq | but then wasm needs threading and eventually most of posix |
12:54:22 | * | nif_ quit (Quit: ...) |
12:54:29 | Araq | it's a decade away from that IMO |
12:54:41 | * | nif joined #nim |
12:54:49 | disruptek | wasm has threading, iirc. |
12:54:57 | Araq | and I often wonder if a x86 emulator wouldn't do better instead of reinventing everything |
12:54:57 | FromGitter | <arnetheduck> @Araq nah, not really. WASM is an evolution of asm.js which has been around for that decade that you're talking about |
12:55:10 | Araq | asm.js is terrrible |
12:55:17 | Araq | and wasm shares some its design flaws |
12:55:33 | FromGitter | <arnetheduck> compared to javascript? :) |
12:55:53 | disruptek | maybe araq just doesn't want to target the web at all. |
12:55:54 | Araq | yes, even compared to JS. |
12:56:03 | clyybber | Araq: Is there some caveat to closures on 32bit? |
12:56:27 | Araq | disruptek: I spent a significant amount of research on this topic a year ago, "doesn't want to" is unfair |
12:56:37 | dom96 | "you could have your forum and your dsl and all that, and more nim features working with more performance for free this way" |
12:56:38 | disruptek | what's your proposal? |
12:56:40 | FromGitter | <alehander42> @arnetheduck i think the wrong fallacy in your thesis is that "if we dont drop the javascript backend, the wasm resources will have no resources" which i dont see as valid |
12:56:45 | dom96 | If I can have that, then sure, drop the JS backend |
12:56:49 | dom96 | But right now that isn't the case |
12:56:53 | FromGitter | <alehander42> (the quotes mean my understanding of it, not a quote) |
12:56:54 | dom96 | So talk of dropping JS is unrealistic |
12:57:13 | disruptek | js doesn't need to be dropped, but putting more effort into llvm support would be huge. |
12:57:34 | FromGitter | <alehander42> but there is barely new effort being put in the javascript backend |
12:57:44 | dom96 | disruptek: Araq wrote an SPA framework and most of the JS backend, I think that proves his want to target the web |
12:57:49 | FromGitter | <alehander42> this has totally nothing to do with the llvm one |
12:58:09 | disruptek | it has everything to do with it. |
12:58:14 | clyybber | llvm->wasm |
12:58:36 | FromGitter | <alehander42> disruptek what i mean is that the javascript backend doesnt take any resources from working on the llvm one |
12:58:37 | FromGitter | <arnetheduck> @alehander42 my thesis is "the js backend slows down other nim development because of maintenance and constraints on core nim developmet" - this should be unsurprising to anyone doing software development, that lots of code ossifies feature and stability development |
12:58:43 | disruptek | also llvm->graalvm, which means interop with anything that targets jvm. |
12:59:00 | FromGitter | <alehander42> @arnetheduck and what are examples of those constraints? |
12:59:11 | disruptek | bbl |
12:59:13 | FromGitter | <arnetheduck> simple: you change the AST, you must update the JS backend |
12:59:23 | FromGitter | <arnetheduck> you add a feature, you must consider the JS backend |
12:59:49 | FromGitter | <alehander42> which often takes 5 minutes |
12:59:51 | FromGitter | <arnetheduck> you have additional options in the std lib (when js) that receive less testing and contribute to complexity of understanding |
12:59:58 | FromGitter | <alehander42> at least i've never had the impression |
13:00:02 | FromGitter | <alehander42> that this is a bottleneck |
13:00:06 | FromGitter | <alehander42> in development |
13:00:17 | Araq | We drop the JS backend, we lose users. |
13:00:19 | dom96 | this is what's great about the JS backend: it evolves with the language |
13:00:20 | clyybber | disruptek: JVM interop would be killer |
13:00:29 | dom96 | I don't know of a single language that has a native JS backend |
13:00:30 | Araq | that's always the side of the coin that you never mention! |
13:00:34 | dom96 | except Nim |
13:00:57 | FromGitter | <alehander42> dom96 many "kinda" do: scala.js clojurescript, unofficial projects for several others |
13:01:23 | FromGitter | <alehander42> but less well than nim imo |
13:01:24 | FromGitter | <arnetheduck> of course it's not a bottleneck individually - 5 minutes here and there however adds up - it's a cost - with constrained resources, you focus on where you have the best returns |
13:01:45 | dom96 | alehander42: are these part of the Scala/Clojure compiler? |
13:02:01 | FromGitter | <alehander42> not sure, probably not |
13:02:02 | clyybber | Can someone with a 32bit machine help me test something? |
13:02:06 | FromGitter | <arnetheduck> dom96 uhhh, typescript is kind of.. major in this regard? |
13:02:36 | dom96 | arnetheduck: Typescript is exclusively translated to JS, no? |
13:02:51 | FromGitter | <alehander42> @arnetheduck also, if your thesis was true, typescript would've started targetting wasm very aggresively like yesterday |
13:02:56 | FromGitter | <arnetheduck> I wouldn't be surprised if they're busy adding a wasm backend :) |
13:03:33 | dom96 | Typescript is not the same at all. I can't write a native application that runs on my server in typescript and also target the web browser with it, can I? |
13:03:50 | Araq | dom96: probably you can with Node.JS |
13:03:57 | dom96 | Araq: keyword being "native" |
13:04:03 | FromGitter | <arnetheduck> @alehander42 see "assemblyscript" |
13:04:03 | Araq | *shrug* |
13:04:41 | FromGitter | <alehander42> @arnetheduck eh that's not by the typescript folks |
13:04:47 | FromGitter | <alehander42> we also have similar projects for nim |
13:04:54 | FromGitter | <alehander42> see: we're done :) |
13:05:40 | FromGitter | <alehander42> basically, i see it like "let's see an amazing wasm backend: if its so amazing, the decision to drop javascript would be easy ;)" |
13:05:52 | * | cgfuh quit (Quit: WeeChat 2.5) |
13:06:42 | livcd | dom96: haxe ? :D |
13:07:22 | dom96 | livcd: Possibly, but AFAIK Haxe has dozens of backends and each are of differing quality |
13:07:30 | dom96 | Nim put a lot of focus on the JS backend |
13:07:41 | dom96 | And it shows in the quality |
13:08:54 | FromGitter | <arnetheduck> anyway, all this was just one of the things that came out of a free thinking session about what it would take to make nim both awesome and reach a stable and releasable point.. "sunk cost" is generally a poor argument of keeping something. |
13:09:14 | FromGitter | <alehander42> but it has nothing to do with sunk cost imo |
13:09:56 | FromGitter | <alehander42> but with "this is what works great now, when the amazing new thing actually starts existitng, lets compare" |
13:09:57 | * | terps joined #nim |
13:10:06 | FromGitter | <alehander42> also "if the nim js backend was a high-quality, fully working environment that supported "most" of nim" |
13:10:12 | FromGitter | <alehander42> sorry, but this is also not tecnically a good arg |
13:10:20 | FromGitter | <alehander42> i feel you havent really *used* that backend |
13:10:31 | FromGitter | <alehander42> most core stuff that isnt supported |
13:10:39 | FromGitter | <alehander42> isnt really needed for software targetting it |
13:10:48 | FromGitter | <arnetheduck> @alehander42 would you develop a js backend today, knowing that emscripten already works for nim+c and a wasm backend exists? |
13:11:37 | FromGitter | <alehander42> i agree : its not perfect, a wasm backend would be great, but honestly i think with a bit of work it can rival typescript on most fronts .. now, i dont say it *needs* to do it, just that its already ~= to it for me |
13:12:42 | FromGitter | <alehander42> @arnetheduck sorry, but this comparison seems as a fallacy to me again |
13:12:46 | FromGitter | <arnetheduck> and to reiterate, I know that it's blasphemy to suggest removing it today, but think of it from this perspective: starting today, where would you spend resources? look at the technical merits of the different solutions. |
13:13:12 | FromGitter | <alehander42> to "maintain" the js backend, we need much less resources than to take the "wasm" backend to actually useful level |
13:13:18 | FromGitter | <alehander42> right now |
13:14:06 | FromGitter | <alehander42> so the smartest thing for me is to keep it and work a lot on a wasm backend |
13:14:28 | FromGitter | <alehander42> in the same time |
13:14:41 | * | shomodj quit (Quit: My MacBook has gone to sleep. ZZZzzz…) |
13:15:24 | FromGitter | <arnetheduck> and fwiw, even if you remove js backend today and focus on something else, all the javascript-using nim code keeps working. you just keep using nim 0.20 and you're fine. |
13:16:03 | FromGitter | <alehander42> and if you dont .. |
13:16:10 | FromGitter | <alehander42> you can still work on a wasm/llvm backend .. |
13:16:22 | FromGitter | <alehander42> you just .. work on it. |
13:16:27 | FromGitter | <alehander42> and you're fine : ) |
13:16:58 | clyybber | Araq: I'll be on vacation for a few days and don't have a 32bit machine handy, so I can't investigate those failures. Also I have no idea where they could come from. Maybe you are better equipped to find out. |
13:17:07 | FromDiscord_ | <strexicious> Are tuple elements tightly packed in memory? |
13:17:14 | FromGitter | <arnetheduck> yup, that's what I'm doing :) I'm not making PR's to remove JS either :) |
13:17:44 | FromDiscord_ | <strexicious> I need a `seq[(float, float, uint)]` but consecutive in memory. |
13:18:32 | FromGitter | <alehander42> @arnetheduck sorry for my sarcastic tone, totally uncalled for |
13:19:07 | FromGitter | <alehander42> yeah, i have to try something with it in my free time |
13:19:27 | * | shomodj joined #nim |
13:19:29 | FromGitter | <arnetheduck> but I also take note of the state of the nim issues tracker and allow myself to think creatively about ways to.. optimize it ;) |
13:19:33 | FromGitter | <alehander42> check if i can use it for something in electron :P |
13:20:08 | clyybber | strexicious: Use a packed object |
13:20:50 | narimiran | @arnetheduck btw, are you (status) still using nim 0.19? if so: (when) do you plan to switch to 0.20/1.0? |
13:22:08 | Araq | clyybber: it would help to split the bugfix and the refactoring |
13:22:37 | Araq | so that we can see what causes the test suite regression |
13:23:22 | clyybber | Araq: The bugfix is just adding sink to `@` |
13:23:45 | clyybber | In the refactoring I did some other bugfixes, but those were not reported. |
13:23:47 | FromDiscord_ | <strexicious> Thanks clyybber |
13:23:57 | Araq | what kind of bugfixes? |
13:24:32 | clyybber | Sometimes we didn't move into result, even though we could. |
13:25:09 | clyybber | It is visible in the before/after transformation of getEnv |
13:26:48 | clyybber | Araq: The 32bit failures only appeared after https://github.com/nim-lang/Nim/pull/11926/commits/938217ff69470b681d2492e1962d440aa2ccad39 |
13:27:01 | FromGitter | <arnetheduck> @narimiran we're still on 0.19.6, I'm not sure what issues remain at this point but I guess one crucial point is that we've made ourselves less dependent on the exact nim version so upgrading to 0.20 isn't.. critical. |
13:27:14 | shashlick | @Clyybber why not use dockcross |
13:27:20 | shashlick | See nightlies |
13:27:47 | FromGitter | <arnetheduck> we try to solve as many problems as possible in libraries instead, it's more flexible from a release coordination point of view |
13:28:17 | Araq | https://ci.appveyor.com/project/dom96/nim/builds/26851519/job/wcxechrgp0fcaodg/tests dom96, I broke jester |
13:29:13 | FromGitter | <arnetheduck> another way to look at it: 0.19.6 was too good :) |
13:29:15 | clyybber | shashlick: Is it like a VM? |
13:35:45 | * | clyybber quit (Quit: WeeChat 2.5) |
13:37:34 | * | MarderIII joined #nim |
13:44:02 | * | dddddd joined #nim |
13:51:56 | shashlick | What os are you on |
13:54:06 | FromGitter | <iffy> I've built some improvements to db_sqlite into my application that I'd like to contribute back. I'm not seeing any sqlite tests in the Nim repo, though. Should I contribute these changes to the stdlib or as an installable module? |
13:54:25 | livcd | someone just posted this https://github.com/sunjohanday/xander |
13:57:04 | Araq | iffy while you're at it also contribute tests please :-) |
13:58:05 | FromGitter | <iffy> Happy to, Araq! But I don't know if it should be to the Nim repo or a nimble package |
13:58:55 | Araq | well it's in the Nim repo |
13:59:25 | FromGitter | <iffy> I'm remembering the history of sqlite in Python. We always installed pysqlite because the stdlib didn't have all the features we wanted |
13:59:59 | shashlick | Araq - when you use wrapped libs, do you configure / cmake / make or download dlls |
14:01:51 | * | terps quit (Ping timeout: 264 seconds) |
14:05:05 | * | PMunch quit (Remote host closed the connection) |
14:10:07 | * | MarderIII is now known as warkruid |
14:10:30 | * | terps joined #nim |
14:10:36 | * | warkruid quit (Quit: Leaving) |
14:10:57 | * | MarderIII joined #nim |
14:11:11 | * | MarderIII is now known as warkruid |
14:15:49 | * | deansher quit (Ping timeout: 250 seconds) |
14:15:49 | * | dvn quit (Ping timeout: 250 seconds) |
14:16:02 | * | deansher joined #nim |
14:16:16 | * | euantor quit (Ping timeout: 250 seconds) |
14:18:20 | Araq | shashlick: depends, most of the DLLs are from a trusted source |
14:18:44 | * | Mister_Magister quit (Ping timeout: 248 seconds) |
14:19:43 | * | Cadey quit (Ping timeout: 250 seconds) |
14:21:17 | * | drewr quit (Ping timeout: 245 seconds) |
14:21:33 | FromGitter | <iffy> Should I be working off of `devel` branch or `master`? I can't get `koch` to build in `devel` |
14:21:35 | * | floppydh quit (Quit: WeeChat 2.5) |
14:21:55 | * | Cadey joined #nim |
14:22:55 | narimiran | @iffy devel |
14:23:15 | narimiran | master is effectively dead |
14:23:52 | * | Mister_Magister joined #nim |
14:23:59 | FromGitter | <iffy> k, how do I overcome this: https://github.com/nim-lang/Nim/issues/11454 The workaround leads me to a different error: `lib/system.nim(3990, 10) Error: type mismatch: got <string, nil>` |
14:24:03 | * | terps quit (Ping timeout: 264 seconds) |
14:24:22 | narimiran | iffy are you using nim 0.20.x? |
14:24:51 | FromGitter | <iffy> I have 0.20.x installed via choosenim, but I just cloned the Nim git repo to do some work in there |
14:25:20 | FromGitter | <iffy> I don't think I'm using my 0.20.x nim to build it. I'm copying and pasting from the README |
14:25:34 | * | euantor joined #nim |
14:26:33 | * | endragor joined #nim |
14:26:54 | narimiran | after you cloned the repo, are you on 'devel' branch before doing the stuff mentioned in the readme? |
14:27:20 | FromGitter | <iffy> yep |
14:27:49 | FromGitter | <iffy> I'm deleting and trying again |
14:27:51 | narimiran | also, maybe there is some clash between choosenim's stuff and this git stuff (i think i had some problem when i was still using choosenim) |
14:28:13 | FromGitter | <iffy> I'm suspecting that, too... but I wish I could know for sure |
14:28:26 | * | laaron quit (Quit: ZNC 1.7.1 - https://znc.in) |
14:29:12 | * | dvn joined #nim |
14:29:23 | dom96 | best way to check would be to remove ~/.nimble/bin from your PATH |
14:29:24 | dom96 | I don't see any other way that choosenim's installation could interfere |
14:30:05 | FromGitter | <iffy> ah, wait a second ... I cloned from my fork the first time. This time I cloned from the real repo |
14:30:10 | FromGitter | <iffy> `````` |
14:30:12 | * | laaron joined #nim |
14:30:13 | FromGitter | <iffy> ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=5d5d55757d3c16364115c7b6] |
14:30:16 | FromGitter | <iffy> bah |
14:30:27 | FromGitter | <iffy> ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=5d5d5583c8a85a44c23cc71f] |
14:30:46 | FromGitter | <iffy> results in |
14:30:50 | FromGitter | <iffy> ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=5d5d559ac8a85a44c23cc75a] |
14:30:56 | narimiran | why are your csources v0.19? |
14:31:12 | FromGitter | <iffy> I was trying the workaround in https://github.com/nim-lang/Nim/issues/11454 |
14:31:25 | FromGitter | <iffy> okay, let me try the README as is and literally copy and paste |
14:31:50 | narimiran | that issue is about bootstrap nim v0.19 from (outdated and abandoned) master. |
14:32:34 | leorize[m] | nowadays I install ndb whenever I need sqlite in Nim :p |
14:33:10 | narimiran | if you are on linux/mac, you only need to do `sh build_all.sh` (step 2 in the readme) after cloning, no need for any other manual stuff |
14:33:44 | FromGitter | <iffy> leorize: oh, those binding changes in ndb are exactly the ones I was going to contribute back! |
14:35:03 | FromGitter | <iffy> (but I didn't know about ndb) |
14:35:54 | * | laaron quit (Quit: ZNC 1.7.1 - https://znc.in) |
14:36:58 | * | laaron joined #nim |
14:37:03 | Araq | iffy then better use ndb |
14:38:40 | * | drewr joined #nim |
14:40:03 | FromGitter | <iffy> Should the stdlib db_sqlite somehow point people to ndb? Or should the issues ndb fixes be merged back into stdlib? |
14:42:34 | * | terps joined #nim |
14:42:56 | FromGitter | <iffy> nm, just found your comment: https://github.com/nim-lang/Nim/issues/9453#issuecomment-435482881 |
14:43:56 | * | nsf quit (Quit: WeeChat 2.5) |
14:53:00 | Araq | stdlib should point to ndb and ndb needs to be in important_packages if it isn't already |
14:53:15 | Araq | course it isn't... |
14:53:19 | * | Araq sighs |
14:55:26 | * | laaron quit (Quit: ZNC 1.7.1 - https://znc.in) |
14:56:04 | * | laaron joined #nim |
14:56:14 | * | shomodj quit (Quit: My MacBook has gone to sleep. ZZZzzz…) |
15:02:42 | narimiran | ok ok, i know what i need to do |
15:02:51 | * | shomodj joined #nim |
15:03:18 | narimiran | btw, "Latest supported Nim version is 0.19" from ndb's readme |
15:03:51 | * | laaron quit (Quit: ZNC 1.7.1 - https://znc.in) |
15:04:43 | * | drewr quit (Remote host closed the connection) |
15:05:10 | * | laaron joined #nim |
15:07:27 | * | laaron quit (Remote host closed the connection) |
15:09:15 | * | laaron joined #nim |
15:11:43 | * | ZORR0W quit (Ping timeout: 250 seconds) |
15:15:03 | * | terps quit (Ping timeout: 264 seconds) |
15:18:16 | FromGitter | <awr1> RE the JS stuff: asmjs has its problems, but i think its authors would probably admit that considering its javascript trying to encode quasi-bytecode/JIT directives |
15:18:20 | FromGitter | <kdheepak> @PMunch and @alehander42 thanks for looking into this and providing some feedback. |
15:18:43 | * | laaron quit (Remote host closed the connection) |
15:19:12 | FromGitter | <kdheepak> I did make some progress on that though. It turns out the `Future` object returned by a `async` colored function in Javascript is just a `Promise`. |
15:19:38 | disruptek | colored functions. yay! |
15:19:40 | FromGitter | <kdheepak> So I was able to `cast` it to a `JsObject` and then use `callbacks to update a global variable. |
15:19:47 | FromGitter | <awr1> in some sense nim is "weird" by a similar token because it targets languages that was originally designed for human readability |
15:20:23 | FromGitter | <kdheepak> Something like `p.then( callback )` |
15:20:53 | FromGitter | <awr1> but i can guess one can respond with "well, stroustrup made cfront, didn't he?" |
15:21:03 | FromGitter | <kdheepak> But yeah, figuring that out look a while. |
15:21:13 | * | laaron joined #nim |
15:21:33 | FromGitter | <kdheepak> Once I did that I was able to "mix colors". |
15:21:52 | FromGitter | <kdheepak> Essentially everything get triggered by callbacks. |
15:23:08 | * | drewr joined #nim |
15:25:21 | * | btop joined #nim |
16:03:30 | * | Yardanico joined #nim |
16:03:35 | * | Yardanico quit (Client Quit) |
16:04:18 | * | Yardanico joined #nim |
16:05:55 | dom96 | kdheepak: can you document this in our docs or on some article somewhere? :) |
16:11:57 | FromGitter | <kdheepak> I'll make a blog post! |
16:12:22 | FromGitter | <kdheepak> I already have a couple unfinished drafts of blog posts related to nim that I've been meaning to get out. |
16:13:22 | FromGitter | <kdheepak> @dom96 and others, do you think `castT (x)` and `x.to(T)` should do the same thing in the javascript target? |
16:13:32 | FromGitter | <kdheepak> where `x` is a JsObject. |
16:13:43 | FromGitter | <kdheepak> and `T` in a Nim Type. |
16:15:51 | FromGitter | <alehander42> Don't they :o |
16:16:15 | * | nif quit (Quit: ...) |
16:16:24 | * | nif joined #nim |
16:17:04 | FromGitter | <alehander42> If then is standard for Javascript we can add an overload for it in jsffi |
16:18:00 | shashlick | is osx like linux in /usr/lib and /usr/include or like windows with putting dlls in same dir or path, or some third way |
16:19:55 | FromGitter | <kdheepak> @alehander42 huh I was wrong, they are doing the same thing. |
16:20:18 | * | zyklon joined #nim |
16:20:37 | FromGitter | <alehander42> Yep iirc |
16:21:02 | FromGitter | <alehander42> But good idea, to note they should be the same |
16:24:05 | * | uvegbot quit (Ping timeout: 250 seconds) |
16:31:33 | FromGitter | <kdheepak> Is there a way to echo a `JsObject`? I get an error: ⏎ ⏎ ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=5d5d71e5c508da44c35963c6] |
16:36:41 | FromGitter | <alehander42> Yes |
16:36:54 | FromGitter | <alehander42> Define $ for it |
16:37:13 | FromGitter | <alehander42> And make it use e. G. Json stringifyfro |
16:37:21 | FromGitter | <alehander42> Stringify |
16:37:34 | FromGitter | <alehander42> Other probably better options is to import jsconsole |
16:37:39 | FromGitter | <alehander42> And use log |
16:40:27 | FromGitter | <vitreo12> Hello guys! Are there any reasons why this code doesn't work? ⏎ ⏎ `````` [https://gitter.im/nim-lang/Nim?at=5d5d73fb8e8dde63d81262e5] |
16:41:09 | FromGitter | <kdheepak> @alehander42 thanks for the answer. My ideal solution would be to use `echo x` and have that translate to `console.table(x)`. |
16:41:58 | FromGitter | <kdheepak> @vitreo12 if you edit your chat message here in gitter, people on other messaging platforms will not be able to see the edit. |
16:42:22 | FromGitter | <vitreo12> Ah, I'll just re-send it then. Sorry, first time using gitter :) |
16:42:41 | FromGitter | <kdheepak> Yup :) I understand, been there. |
16:42:41 | FromGitter | <vitreo12> Edited message from before: ⏎ ⏎ Are there any reasons why this code doesn't work? ⏎ (from nim's forum, https://forum.nim-lang.org/t/5111) ⏎ ... [https://gitter.im/nim-lang/Nim?at=5d5d748125764a3642d5b9c7] |
16:42:56 | * | endragor quit (Remote host closed the connection) |
16:43:23 | FromGitter | <vitreo12> While, at the same time, these two work: ⏎ ⏎ ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=5d5d74abc508da44c359772a] |
16:44:17 | * | shomodj quit (Quit: My MacBook has gone to sleep. ZZZzzz…) |
16:46:56 | FromGitter | <kdheepak> @alehander42 is there a way to override the code that `echo` generates when passed a `JsObject`? |
16:54:33 | * | wildtrees joined #nim |
16:55:24 | * | wildtrees quit (Remote host closed the connection) |
16:55:53 | * | wildtrees joined #nim |
16:56:57 | FromGitter | <alehander42> You can try to overload echo |
16:57:14 | FromGitter | <alehander42> But I think just using directly the function you want is better |
16:57:32 | FromGitter | <alehander42> Stuff like echo works well when you can define $ |
16:57:39 | FromGitter | <alehander42> For a type |
16:57:44 | FromGitter | <alehander42> A |
16:59:16 | * | go|dfish quit (Ping timeout: 246 seconds) |
17:00:58 | * | go|dfish joined #nim |
17:01:18 | * | warkruid quit (Ping timeout: 245 seconds) |
17:04:47 | FromGitter | <kdheepak> Okay thanks! |
17:04:56 | FromGitter | <kdheepak> I'll just use console.table directly. |
17:06:17 | * | nsf joined #nim |
17:10:14 | * | gangstacat quit (Quit: Ĝis!) |
17:12:44 | * | gangstacat joined #nim |
17:14:21 | FromGitter | <kdheepak> @alehander42 I'm looking for a less tedious way to create a JsObject on the fly. Any suggestions? Currently, if I want the Javascript code to be `{ color: 0xff0000 }` I need to create a Nim type called Color that has an attribute int, etc. Then let's say I want to in another part of the code to generate Javascript code to be ` { color: 0xff00ff, angle: 30 } `, I need to create another Nim type called ColorAndAngle that |
17:14:21 | FromGitter | ... has attributes int and float, create an instance of it, etc. |
17:15:27 | FromGitter | <kdheepak> This is painful because the API that I'm working with always all these different objects to be passed in, and has sane defaults for keys that don't exist, that I don't want to reimplement in Nim. |
17:17:15 | * | warkruid joined #nim |
17:21:26 | * | warkruid quit (Client Quit) |
17:22:48 | FromGitter | <kdheepak> Even tuple's don't work. |
17:23:03 | * | seni joined #nim |
17:23:33 | FromGitter | <kdheepak> ``` var temp: tuple[color: int] = (1, ) ⏎ console.log(temp)``` ⏎ ⏎ results in `Object { Field0: 1 }` [https://gitter.im/nim-lang/Nim?at=5d5d7e15c508da44c359b734] |
17:27:47 | FromGitter | <kdheepak> Maybe the solution is to write some macro / proc around this? ⏎ ⏎ ``` var temp = newJsObject() ⏎ temp["color"] = 0xffff00``` [https://gitter.im/nim-lang/Nim?at=5d5d7f1325764a3642d60565] |
17:28:24 | * | shomodj joined #nim |
17:35:01 | * | seni quit (Quit: Leaving) |
17:42:30 | shashlick | macros 101 - how do I get the value in a variable passed to a macro - strVal gives me the variable's name instead of the value it contains |
17:43:51 | * | LargeEpsilon quit (Ping timeout: 252 seconds) |
17:44:14 | * | joki1337 joined #nim |
17:44:34 | * | joki1337 quit (Client Quit) |
17:45:44 | FromGitter | <zacharycarter> can only do this if the value is known at compile time |
17:50:13 | enthus1ast | is there a proc that correctly escapes a file system path? |
17:50:40 | shashlick | quoteShell perhaps? |
17:50:42 | enthus1ast | quoteShell() seems not to work properly |
17:53:27 | enthus1ast | NORMAL: test/Peter, Test Q. - Some Name - foo.ext |
17:53:34 | enthus1ast | QUOTED: 'test/Peter, Test Q. - Some Name - foo.ext' |
17:53:50 | enthus1ast | maybe i should just quote the filename withouth the path |
17:55:31 | * | terps joined #nim |
18:00:02 | * | btop quit (Ping timeout: 245 seconds) |
18:02:41 | enthus1ast | but are you aware of a function that do a "real" shell escape like "foo\ baa\ baz" ? |
18:04:33 | * | shomodj quit (Quit: My MacBook has gone to sleep. ZZZzzz…) |
18:04:49 | FromGitter | <kdheepak> I'm trying to write a very simple macro and am getting compile errors: ⏎ ⏎ ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=5d5d87c1d45f7c26fa0d71b0] |
18:05:04 | FromGitter | <kdheepak> Can someone direct me in what I'm missing? |
18:07:39 | * | terps quit (Ping timeout: 250 seconds) |
18:12:22 | FromGitter | <Araq> the macro is ok, but now how you use it |
18:13:02 | FromGitter | <awr1> works fine |
18:13:04 | FromGitter | <awr1> https://play.nim-lang.org/#ix=1SXR |
18:13:07 | FromGitter | <awr1> what version of nim? |
18:13:59 | Araq | btw for easy JS object construction, use the jsffi module |
18:16:09 | FromGitter | <kdheepak> @araq which function from the jsffi module? I've even looked through the source and haven't found one that simplifies this process. |
18:16:28 | FromGitter | <kdheepak> I was using the macro like so: ` discard myMacro {color: 0xffff00}` |
18:17:10 | FromGitter | <kdheepak> Ah discard was the problem. |
18:18:53 | Araq | let obj = JsAssoc[cstring, int]{ a: 22, b: 55 } |
18:18:56 | enthus1ast | Araq: was there a change recently, that when compiled with "nim c -r foo.nim" the modules are not compiled when they're not changed? Because since my last nim update, i must compile with "nim c -r -f foo.nim" when import a template (onionhammer/nim-template) |
18:19:26 | Araq | enthus1ast: only if you messed up your config |
18:20:00 | Araq | this feature was recently introduced yes, but it should be disabled |
18:20:31 | enthus1ast | nim.cfg ? |
18:20:50 | Araq | yeah |
18:21:03 | Araq | --incremental:on/off or maybe --symbolfiles |
18:22:31 | * | sagax joined #nim |
18:22:45 | enthus1ast | neither is in my config |
18:25:22 | FromGitter | <kdheepak> @Araq thanks for the reply. What if I want `obj = { a: 22, b: 5.0, c: "hello world" }`? i.e. different types. |
18:25:37 | FromGitter | <kdheepak> My understanding is that there's no way to instantiate that with JsAssoc |
18:25:41 | FromGitter | <kdheepak> right? |
18:27:56 | * | actuallybatman joined #nim |
18:28:39 | Araq | different types? |
18:29:24 | enthus1ast | Araq: none of the switches fixes this issue |
18:30:16 | FromGitter | <kdheepak> > *<Araq>* different types? ⏎ ⏎ Yeah, if the values are int, float and string |
18:36:50 | * | terps joined #nim |
18:36:58 | Araq | type TestObject = object |
18:36:58 | Araq | a: int |
18:36:58 | Araq | b: cstring |
18:37:00 | Araq | let obj = TestObject{ a: 1, b: „str“ } |
18:37:51 | Araq | enthus1ast: must be something else then. maybe it's just in your head and it works like before |
18:38:01 | Araq | and you're editing the wrong files :P |
18:38:51 | enthus1ast | this could of course be, but it started after i pulled recently |
18:39:43 | enthus1ast | maybe i should compare my config with the current one in the main repo |
18:45:53 | FromGitter | <kdheepak> @Araq that example you said didn't work. I'm getting an error from jsffi.nim ⏎ ⏎ ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=5d5d91612cdb146ad613e96a] |
18:46:54 | Araq | well I took it from the 'tjsffi.nim' test which is green |
18:50:23 | * | spip37 joined #nim |
18:51:06 | FromGitter | <kdheepak> Thanks for that. That example pointed me in the right direction. |
18:51:53 | FromGitter | <kdheepak> I copied over the macro from jsffi that overloads `{}` and made some edits: ⏎ ⏎ ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=5d5d92c9fa99e74f6a6a3d99] |
18:52:00 | FromGitter | <kdheepak> This does what I want I think. |
18:52:08 | FromGitter | <kdheepak> Now to test it in my codebase. |
19:05:57 | FromGitter | <alehander42> You don't need this, you can just use JsObject{a:2} |
19:06:47 | FromGitter | <alehander42> I think |
19:16:55 | * | terps quit (Ping timeout: 276 seconds) |
19:26:28 | * | PrimHelios_ quit (Ping timeout: 264 seconds) |
19:45:01 | * | nsf quit (Quit: WeeChat 2.5) |
19:46:39 | * | btop joined #nim |
19:47:12 | * | PrimHelios joined #nim |
19:55:09 | FromDiscord_ | <Shield> does the compiler give any warnings if you don't define move and sink procs or does it do it automatically? |
19:56:20 | FromGitter | <kdheepak> @alehander42 That works!! |
19:56:33 | FromGitter | <kdheepak> How do you emit the `this` keyword? |
19:56:48 | FromGitter | <kdheepak> I have a function that requires the `this` to be passed in as an argument? |
19:56:58 | FromGitter | <kdheepak> I don't think I can use `bindMethod` for this. |
20:07:18 | * | Vladar quit (Remote host closed the connection) |
20:08:04 | * | actuallybatman quit (Ping timeout: 248 seconds) |
20:08:25 | * | actuallybatman joined #nim |
20:22:33 | * | btop quit (Ping timeout: 268 seconds) |
20:54:06 | * | abm joined #nim |
20:54:07 | * | narimiran quit (Ping timeout: 246 seconds) |
20:55:45 | * | btop joined #nim |
20:58:18 | * | shomodj joined #nim |
21:06:01 | * | actuallybatman quit (Ping timeout: 246 seconds) |
21:12:55 | * | actuallybatman joined #nim |
21:13:54 | * | spip37 quit (Remote host closed the connection) |
21:18:25 | * | actuallybatman quit (Ping timeout: 244 seconds) |
21:30:32 | * | actuallybatman joined #nim |
21:40:50 | FromDiscord_ | <Kiloneie> I have a question, i am planning on making my own website via WordPress to host my Written Tutorials to accompany my Video ones(once they come out), is it dumb to use my channel name "www.kiloneie.com" or should i, CAN i use "www.NimForBeginners.com" / "www.LearnNim.com" something like that ? |
21:41:36 | FromDiscord_ | <Kiloneie> Which included getting WordPress Premium for extra stuff, and ads bla bla. |
21:55:34 | FromDiscord_ | <Kiloneie> Actually i am gonna use Wix, lol WordPress is expensive for what it offers. |
21:56:18 | * | solitudesf quit (Ping timeout: 272 seconds) |
22:06:34 | * | actuallybatman quit (Ping timeout: 276 seconds) |
22:15:20 | dom96 | Looks like compile-times could be what will break Rust's adoption: https://raphlinus.github.io/rust/2019/08/21/rust-bloat.html |
22:17:39 | * | actuallybatman joined #nim |
22:25:52 | * | krux02 quit (Remote host closed the connection) |
22:41:04 | * | shomodj quit (Quit: My MacBook has gone to sleep. ZZZzzz…) |
22:50:52 | * | btop quit (Ping timeout: 245 seconds) |
23:08:23 | FromGitter | <Varriount> kiloneie: I'd use www.kiloneie.com - that way you can use it for personal/professional stuff as well. |
23:18:58 | * | rayman22201 joined #nim |
23:19:01 | * | actuallybatman quit (Ping timeout: 246 seconds) |
23:19:07 | FromDiscord_ | <Shield> @zacharycarter |
23:33:46 | * | btop joined #nim |
23:38:52 | * | btop quit (Ping timeout: 276 seconds) |
23:46:39 | * | wildtrees quit (Quit: Leaving) |