00:24:22 | leorize | Tortice: on which line? |
00:26:07 | * | stefanos82 quit (Quit: Quitting for now...) |
00:28:42 | leorize | Tortice: createThread takes a `var Thread`. You need a variable to store Thread[T] first |
00:29:30 | leorize | and also, Thread[TArg] is a generic, it takes type name, not literal. |
00:32:29 | FromGitter | <kayabaNerve> Speaking of Threads, anyone here know about channels? |
00:35:07 | FromGitter | <kayabaNerve> I created a thread in func A, passed the pointer to spawned func B, passed the pointer to func C, and B/C are saying it's not ready. ⏎ ⏎ I also tried opening it in each individual thread. That didn't work either. |
00:35:53 | FromGitter | <kayabaNerve> The second shouldn't be needed though..... |
00:37:13 | shashlick | I used channels in snip |
00:37:17 | shashlick | https://github.com/genotrance/snip/blob/master/src/snip/key.nim |
00:43:10 | FromGitter | <kayabaNerve> shashlick: You used a global though. |
00:44:47 | FromGitter | <kayabaNerve> NVM. I got it. |
00:47:16 | * | PrimHelios joined #nim |
00:48:56 | * | vlad1777d quit (Ping timeout: 252 seconds) |
00:49:32 | shashlick | Well hope it helped ☺️ |
00:51:20 | * | PrimHelios quit (Client Quit) |
01:02:36 | * | smt quit (Read error: Connection reset by peer) |
01:11:11 | * | martingc joined #nim |
01:12:32 | * | martingc quit (Remote host closed the connection) |
01:13:41 | * | Tanger joined #nim |
01:23:45 | * | leorize quit (Quit: WeeChat 2.2) |
01:25:49 | FromGitter | <zacharycarter> evening all |
01:26:31 | FromGitter | <kayabaNerve> Evening American |
01:26:39 | FromGitter | <zacharycarter> :P |
01:26:54 | * | tyler569 left #nim (#nim) |
01:31:03 | FromGitter | <zacharycarter> this website is pretty sweet - https://github.com/amiechen/stitches-template-generator - if you're using the tailwindcss framework |
01:33:15 | FromGitter | <zacharycarter> well - this is the website: https://stitches.hyperyolo.com/ |
01:34:43 | FromGitter | <kayabaNerve> Holy |
01:36:13 | FromGitter | <zacharycarter> ? |
01:36:34 | FromGitter | <kayabaNerve> That's useful as hell |
01:36:37 | FromGitter | <zacharycarter> right? |
01:36:43 | FromGitter | <zacharycarter> well tailwindcss is really nice |
01:36:45 | FromGitter | <zacharycarter> IMO |
01:36:47 | FromGitter | <zacharycarter> all postcss |
01:36:56 | FromGitter | <zacharycarter> and that website makes building a HTML UI with it stupid easy |
01:37:01 | FromGitter | <kayabaNerve> @zacharycarter Build my site? |
01:37:15 | FromGitter | <zacharycarter> haha - let me finish mine first |
01:37:19 | FromGitter | <zacharycarter> also the new playground frontend |
01:37:37 | FromGitter | <kayabaNerve> It's so nice so you must like doing it which means you should pay me for the privilege of making mine /s |
01:37:50 | FromGitter | <kayabaNerve> But I'll pay YOU in exposure |
01:37:53 | FromGitter | <zacharycarter> lol |
01:38:08 | FromGitter | <zacharycarter> yeah I LOVE web dev /sarcasm |
01:39:42 | FromGitter | <kayabaNerve> I see we have a verbal agreement. |
01:39:46 | FromGitter | <zacharycarter> hahaha |
01:40:04 | FromGitter | <kayabaNerve> I'll report you to the BBB for fraud if you don't follow through for free now |
01:40:48 | FromGitter | <zacharycarter> well good look with that haha - the BBB is turrible |
01:41:08 | FromGitter | <zacharycarter> they care about as much as the businesses that they get complaints about |
01:43:37 | FromGitter | <kayabaNerve> Side note: BBB is a centralized entity that means nothing and their rating system is flawed as hell |
01:43:51 | FromGitter | <kayabaNerve> Yeah. Just looking articles of whether or not you could literally buy the off |
01:44:07 | FromGitter | <kayabaNerve> There's a paid membership but no pay X to remove Y and get rating Z |
01:45:21 | FromGitter | <zacharycarter> yeah - you're pretty much screwed as a consumer from my experience, if you're treated wrong |
01:45:34 | FromGitter | <zacharycarter> your best option is just to not do business with whatever entity screwed you |
01:46:03 | FromGitter | <kayabaNerve> I don't bother to check or interact with the BBB |
01:46:06 | FromGitter | <kayabaNerve> Social Media FTW |
01:47:42 | FromGitter | <zacharycarter> haha |
02:08:45 | * | erratic quit (Quit: this server has gone to sleep) |
02:11:24 | * | offby19 joined #nim |
02:13:16 | * | offby19 quit (Killed (Sigyn (Spam is off topic on freenode.))) |
02:14:16 | FromGitter | <dom96> @vivekimsit |
02:14:39 | FromGitter | <dom96> Nimble test only runs tests beginning with ‘t’ in file name |
02:15:50 | FromGitter | <zacharycarter> @dom96 - since you're here I figure I'll ask a question - can `nimble develop` work with packages that only exist on your machine? |
02:16:40 | FromGitter | <zacharycarter> and can you customize the path to the project? like if I have project A at `~/projects/A` and I want to use it in `~/projects/B` - is there a way to do this? |
02:16:57 | FromGitter | <zacharycarter> and apologies ahead of time if the answer is super obvious and I'm just being dense |
02:23:50 | FromGitter | <dom96> How else could it work? You want nimble to git pull every time you compile? |
02:26:31 | FromGitter | <zacharycarter> No... I don't really want nimble to do anything. But maybe if I explain my situation it might help illustrate my use-case. |
02:27:17 | FromGitter | <zacharycarter> I have several projects on my machine that are all under the same directory - and project B depends on project A, and project C depends on project B and A |
02:27:20 | FromGitter | <dom96> If you want to depend on a local path then you currently need to configure nim to do that |
02:27:29 | FromGitter | <zacharycarter> okay |
02:27:31 | FromGitter | <dom96> I.e use —path |
02:28:11 | FromGitter | <zacharycarter> I think maybe this is something that nimble or something else could potentially support? |
02:28:15 | * | pullinghairoutwi joined #nim |
02:29:04 | FromGitter | <dom96> But only if they’re all distinct packages |
02:29:09 | FromGitter | <zacharycarter> they are |
02:29:16 | FromGitter | <dom96> You can also import with relative paths |
02:29:24 | FromGitter | <zacharycarter> yeah - but that's ugly |
02:29:36 | FromGitter | <zacharycarter> I want them to actually be nimble dependencies |
02:29:49 | FromGitter | <zacharycarter> I just want them to be local dependencies - while I'm developing them |
02:30:24 | FromGitter | <zacharycarter> I know nimble is not NPM - but NPM will allow you to specify local packages on your machine |
02:30:31 | FromGitter | <zacharycarter> which I've found to be a nice feature in the past |
02:32:18 | FromGitter | <dom96> Yes. Nimble will eventually support this use case |
02:33:14 | FromGitter | <zacharycarter> Yay! |
02:33:18 | FromGitter | <zacharycarter> that is awesome! |
02:33:37 | FromGitter | <zacharycarter> Nimble keeps getting better! and I keep finding less and less reason to use it |
02:34:24 | FromGitter | <zacharycarter> I mean - I've always used it - there have just been things that have annoyed me lately, but I think you're doing awesome with it lately - every release I'm amazed at the new features and how easy things are to use - it's becoming a very ergonomic CLI tool |
02:36:26 | FromGitter | <dom96> Great :) |
02:36:43 | FromGitter | <zacharycarter> @dom96 - you may like this tool - https://github.com/amiechen/stitches-template-generator |
02:37:04 | FromGitter | <zacharycarter> it's built on top of this new CSS (post-css) framework I've been using - https://tailwindcss.com/) |
02:46:28 | * | erratic joined #nim |
02:51:43 | * | erratic quit (Ping timeout: 245 seconds) |
02:58:31 | * | pullinghairoutwi quit (Quit: http://www.kiwiirc.com/ - A hand crafted IRC client) |
03:02:46 | FromGitter | <kaushalmodi> @zacharycarter I'm not sure what that site advertises. But it's not responsive.. doesn't look good on mobile. |
03:02:57 | * | blackmajic9 joined #nim |
03:03:09 | FromGitter | <kaushalmodi> The stitches site |
03:03:59 | FromGitter | <zacharycarter> it's not supposed to @kaushalmodi |
03:04:08 | FromGitter | <zacharycarter> at least I don't think it's intended to |
03:04:41 | FromGitter | <zacharycarter> it's supposed to allow you to drag over elements from the collection on the left and arrange them in the empty area on the right of the web app |
03:04:53 | FromGitter | <zacharycarter> and then it spits out HTML / Functional CSS using the tailwind library |
03:05:04 | FromGitter | <zacharycarter> and you can also clone the repo itself - and change the templates to your liking |
03:05:26 | FromGitter | <zacharycarter> IMO - the author has done a great job of setting up defaults that are very attractive and great for a base set of styles |
03:06:31 | * | blackmajic9 quit (Remote host closed the connection) |
03:12:49 | * | Tuplanolla27 joined #nim |
03:16:23 | * | Tuplanolla27 quit (Remote host closed the connection) |
03:28:52 | * | Shapeshifter29 joined #nim |
03:29:56 | * | Shapeshifter29 quit (Remote host closed the connection) |
03:35:53 | * | erratic joined #nim |
03:49:34 | * | atdotde12 joined #nim |
03:49:37 | * | chemist69 quit (Ping timeout: 250 seconds) |
03:50:34 | * | atdotde12 quit (Remote host closed the connection) |
03:51:31 | * | chemist69 joined #nim |
04:02:12 | * | dddddd quit (Remote host closed the connection) |
04:21:09 | * | Whatevers joined #nim |
04:31:55 | * | Whatevers quit (Ping timeout: 256 seconds) |
04:59:48 | FromGitter | <kayabaNerve> How can I do this: ⏎ ⏎ type top ⏎ proc `sub.handle` ⏎ ... [https://gitter.im/nim-lang/Nim?at=5bb1a9c45331811c2e2f7979] |
05:00:33 | FromGitter | <kayabaNerve> The last line only works with ` around sub.handle |
05:00:43 | FromGitter | <kayabaNerve> It doesn't trigger as a template |
05:00:53 | FromGitter | <kayabaNerve> Is there no way to do it without a macro? |
05:10:48 | * | miran joined #nim |
05:11:59 | * | rnrwashere joined #nim |
05:14:21 | * | masayukig joined #nim |
05:15:11 | * | masayukig quit (Remote host closed the connection) |
05:17:48 | * | rnrwashere quit () |
05:27:30 | * | nsf joined #nim |
05:41:06 | * | tefter quit (Remote host closed the connection) |
05:47:55 | * | NimBot joined #nim |
05:51:22 | * | vespaper_ joined #nim |
05:53:37 | * | vespaper_ quit (Remote host closed the connection) |
06:06:53 | * | leorize joined #nim |
06:20:05 | * | limbo26 joined #nim |
06:25:34 | * | limbo26 quit (Remote host closed the connection) |
06:36:51 | * | miran quit (Ping timeout: 268 seconds) |
06:41:00 | * | zemm13 joined #nim |
06:41:25 | * | tdog joined #nim |
06:44:28 | * | farcaller17 joined #nim |
06:46:54 | * | zemm13 quit (Remote host closed the connection) |
06:50:01 | * | farcaller17 quit (Remote host closed the connection) |
06:57:00 | FromGitter | <mratsim> @kayabaNerve uh, is that Klingon? :P no what are you trying to do? |
07:14:08 | FromGitter | <kayabaNerve> @mratsim I have a RPC class which is divided into modules |
07:14:48 | FromGitter | <kayabaNerve> `type RPC = ref object of RootObj` ⏎ ⏎ That said, the modules aren't actual objects. |
07:15:17 | FromGitter | <kayabaNerve> If they were, they couldn't access the data in the RPC without having a ref to the parent. |
07:15:49 | FromGitter | <kayabaNerve> So I wanted to emulate it by not doing `rpc.module.handle`with the RPC type and a Module type |
07:16:19 | * | krux02 joined #nim |
07:17:04 | FromGitter | <kayabaNerve> But an RPC type and a proc named: ⏎ ⏎ ````.module.handle```` [https://gitter.im/nim-lang/Nim?at=5bb1c9ef3844923661c8062d] |
07:17:18 | FromGitter | <kayabaNerve> (or really, ``` `module.handle` ```) |
07:17:37 | FromGitter | <kayabaNerve> I tried with and without the first dot, as a proc and a template, and I couldn't get it to trigger. |
07:19:03 | FromGitter | <krux02> I think the only way to call something like that is to call it including the backticks |
07:30:15 | * | tzui joined #nim |
07:36:52 | * | smt joined #nim |
07:43:37 | * | ritchie_ quit (Remote host closed the connection) |
07:44:47 | FromGitter | <mratsim> just use a module template that is a no-op |
07:45:00 | FromGitter | <mratsim> and define handle |
07:45:23 | FromGitter | <mratsim> or module_handle |
07:46:12 | * | PMunch joined #nim |
07:53:30 | * | squidly21 joined #nim |
07:57:43 | * | squidly21 quit (Remote host closed the connection) |
07:59:28 | * | krux02 quit (Remote host closed the connection) |
07:59:31 | * | krux02_ joined #nim |
08:01:29 | * | spaces4 joined #nim |
08:03:28 | * | jesopo14 joined #nim |
08:03:44 | * | gmpreussner_ joined #nim |
08:05:01 | * | jesopo14 quit (Remote host closed the connection) |
08:05:02 | * | gmpreussner quit (Ping timeout: 268 seconds) |
08:05:50 | * | spaces4 quit (Remote host closed the connection) |
08:12:54 | * | floppydh joined #nim |
08:13:58 | FromGitter | <kayabaNerve> @krux02 Yeah. I ended up changing it to just module() before @mratsim askked. |
08:14:16 | FromGitter | <kayabaNerve> @mratsim Interesting idea |
08:14:35 | FromGitter | <narimiran> hi guys, @dom96 asked me to write a short article/introduction to Nim-Hacktober. here is the current version: https://gist.github.com/narimiran/88f2a5f80ae2beaaf549504cf37e0ec6 |
08:14:56 | FromGitter | <narimiran> tell me what you think, if something needs to be added, etc. |
08:15:15 | FromGitter | <kayabaNerve> @mratsim I have multiple modules though. |
08:16:30 | FromGitter | <mratsim> maybe tou can do something with typedesc |
08:16:33 | FromGitter | <mratsim> you* |
08:17:02 | FromGitter | <mratsim> so that module returns a typedesc + something, and then handle accepts that typedesc = something |
08:25:33 | FromGitter | <codenoid> UwU should be for everyone |
08:27:29 | FromGitter | <kayabaNerve> Yeah but then handle gets the TypeDesc @mratsim ⏎ ⏎ I'd have to create `distinct RPC`s and cast a bunch. Doesn't sound like the best performance :thinking: ⏎ ⏎ I've also found a solution lol. That said, thanks for the interesting ideas. [https://gitter.im/nim-lang/Nim?at=5bb1da71271506518d9ca81b] |
08:28:00 | FromGitter | <mratsim> typedesc are compile-time only, no perf issue |
08:28:11 | FromGitter | <mratsim> use template for the no-op stuff |
08:36:08 | * | Vladar joined #nim |
08:37:53 | * | smt` joined #nim |
08:40:50 | * | smt quit (Ping timeout: 252 seconds) |
08:43:05 | * | NimBot joined #nim |
08:43:27 | * | edcragg quit (Excess Flood) |
08:43:46 | * | edcragg joined #nim |
08:46:28 | * | edcragg quit (Excess Flood) |
08:46:52 | * | edcragg joined #nim |
08:48:45 | * | edcragg quit (Excess Flood) |
08:49:24 | * | edcragg joined #nim |
08:51:53 | FromGitter | <komuw> Hi guys, first time nim user here. ⏎ I'm trying to cross-compile(I'm on a mac and I'm failing). I've tried: ⏎ ⏎ 1) nim c --cpu:amd64 --os:linux --compileOnly main.nim ⏎ ... [https://gitter.im/nim-lang/Nim?at=5bb1e0295af485306843048c] |
08:52:21 | * | kr joined #nim |
08:52:25 | Zevv | And then what happened? |
08:55:19 | * | kr quit (Remote host closed the connection) |
08:56:19 | PMunch | komuw, I think you're reading it wrong |
08:57:01 | PMunch | With --compileOnly you will only compile to C, not fully into a binary, with --genScript you will also create a shell file that you can use to complete the C part of the compilation |
08:58:00 | PMunch | So if you want to do that you need a machine or VM with Linux running. |
08:58:06 | PMunch | However there is also the possibility to compile directly to a binary, but this of course requires a C compiler that can cross-compile the C code |
08:58:54 | PMunch | That's the second part of the "Cross compilation" section of the compiler guide you linked |
08:58:58 | * | Guest81972 joined #nim |
08:59:07 | PMunch | @komuw^ |
08:59:41 | Zevv | "compileOnly" compiles your nim to C, but after that you are responsible for compiling the C for your target |
09:03:57 | * | leorize quit (Ping timeout: 244 seconds) |
09:06:26 | * | Guest81972 quit (Remote host closed the connection) |
09:06:33 | FromGitter | <komuw> > "compileOnly" compiles your nim to C, but after that you are responsible for compiling the C for your target ⏎ @FromIRC shouldn't I get a C file as output in the current directory? however when I do `nim c --cpu:amd64 --os:linux --compileOnly main.nim` there's no output in current directory. ⏎ Is the C file outputted in another directory? |
09:08:27 | PMunch | Yes, it is output in the nimcache directory |
09:09:15 | FromGitter | <narimiran> @komuw try `~/.cache/nim` |
09:09:38 | PMunch | Aaah, so that's where it is |
09:09:55 | PMunch | I know it had moved, but couldn't figure out where |
09:10:33 | PMunch | So yeah either look in ~/.cache/nim or use --nimpath:<somepath> to create the files somewhere specific |
09:13:17 | Zevv | It used to be ./nimcache |
09:14:45 | FromGitter | <narimiran> anybody has any comments on the hacktoberfest gist i posted earlier? |
09:15:08 | FromGitter | <komuw> thanks guys |
09:18:20 | PMunch | narimiran, looks good |
09:18:44 | PMunch | I prefer my lists with capital letters though |
09:19:12 | FromGitter | <narimiran> thanks PMunch! |
09:19:33 | FromGitter | <narimiran> oh, i remember you changing the case in the lists in Nim Basics :D |
09:19:58 | FromGitter | <narimiran> i usually see lower-case in the wild, and it is my preference too |
09:20:39 | * | vlad1777d joined #nim |
09:22:41 | PMunch | If you need any help, the Nim community is very welcoming. |
09:24:03 | PMunch | "Ask a question in Nim's IRC Channel on Freenode (#nim)," |
09:24:31 | PMunch | ", Nim's room on Gitter or the Nim Telegram group and somebody will help you." |
09:24:39 | PMunch | Just some simple spelling things |
09:24:59 | PMunch | "For example, in the tables module what is missing is:" |
09:25:31 | FromGitter | <narimiran> thanks, will fix this ASAP |
09:31:15 | FromGitter | <narimiran> 'hacktoberfest AT nim'? is 'at' ok? is maybe 'with' better? or something else? |
09:31:19 | * | leru joined #nim |
09:32:09 | PMunch | Yeah with is probably better |
09:42:21 | * | floppydh quit (Remote host closed the connection) |
09:43:07 | * | floppydh joined #nim |
09:56:58 | * | leru quit (Remote host closed the connection) |
10:00:38 | FromGitter | <gogolxdong> Anyone can help me to build a text edit field with nimnuklear? Haven't got the point from the calculator demo. |
10:01:13 | FromGitter | <zacharycarter> I can try later toda |
10:01:15 | FromGitter | <zacharycarter> today* |
10:01:34 | FromGitter | <zacharycarter> I just finished working on the logo for my site - and I need to head to work shortly |
10:01:35 | FromGitter | <zacharycarter> https://codepen.io/zacharycarter/pen/BqNmwP |
10:02:59 | FromGitter | <Bennyelg> looks fantastic |
10:03:27 | FromGitter | <gogolxdong> cool |
10:04:30 | FromGitter | <zacharycarter> thank you! |
10:04:53 | FromGitter | <gogolxdong> relevant snippet as follows : ⏎ ⏎ ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=5bb1f145600c5f642337df7d] |
10:05:42 | FromGitter | <gogolxdong> I think key lies between these lines. |
10:10:40 | FromGitter | <zacharycarter> heading to work - be back online later |
10:12:21 | * | mitsuhikokf joined #nim |
10:19:50 | * | mitsuhikokf quit (Ping timeout: 252 seconds) |
10:21:41 | * | leorize joined #nim |
10:21:47 | FromGitter | <Bennyelg> Question: ⏎ Assuming I working with choosenim and fixed some bug on devel branch. ⏎ How I can create a pull-request the easiest way |
10:27:50 | * | nsf quit (Read error: No route to host) |
10:28:00 | * | nsf joined #nim |
10:33:12 | Tortice | still don't get threads - now I have expression 'dump()' is of type 'int literal(0)' and has to be discarded http://ix.io/1o0x |
10:33:59 | Tortice | adding {.discard.} causes a keyword error, and = discard causes expression expected but found keyword discard |
10:34:59 | * | dddddd joined #nim |
10:37:35 | * | elrood joined #nim |
10:37:47 | FromDiscord_ | <Shield> you sure you checked the docs? it seems that you're bruteforcing the problem, what you're doing will not work regardless |
10:41:10 | Tortice | I've looked at https://nim-lang.org/docs/threads.html#createThread%2CThread%5BTArg%5D%2Cproc%28TArg%29%2CTArg https://nim-lang.org/docs/threadpool.html#spawn%2Ctyped https://nim-lang.org/docs/asyncdispatch.html - I still don't understand, no |
10:50:46 | FromDiscord_ | <Shield> first of all, "var t: Thread[int]" shouldn't be in a function, you need that variable to be in the outerscoop so you can keep it, otherwise the thread you made is lost |
10:53:13 | FromDiscord_ | <Shield> see that [int] within thread? that's the arguments for the proc that is passed to createThread, it can take one value, when you want to pass multiple args, you need to use a tuple like Thread[tuple[arg1, arg2...:int]] |
10:54:24 | FromDiscord_ | <Shield> createThread takes a thread var, a proc name, and the args, like createThread(t, some_func, (arg1 = 10, arg2 = 20...)) |
10:55:47 | FromDiscord_ | <Shield> the problem here is, how can you run a function in the UI to check on the progress of the thread, you should look into that first, as for now you only create a thread and throw it in the void with no way to communicate with it |
10:56:39 | * | Vladar quit (Remote host closed the connection) |
10:59:25 | FromGitter | <kaushalmodi> @zacharycarter thanks for explaining that (about the stitches site). Then it makes sense that the site is not meant for mobile use. May be the author should have replaced the drag/drop interface with a simple text asking users to revisit the site on a desktop. |
11:01:38 | Tortice | thanks |
11:20:49 | * | vlad1777d quit (Remote host closed the connection) |
11:26:19 | * | marc-eti1nne joined #nim |
11:26:51 | * | marc-eti1nne quit (Remote host closed the connection) |
11:30:55 | FromDiscord_ | <Shield> @tortice there is a way for doing it without using threads |
11:31:59 | * | hendi quit (Ping timeout: 250 seconds) |
11:33:04 | * | tzui quit (Ping timeout: 240 seconds) |
11:35:02 | Tortice | I'd be interested in hearing it |
11:37:24 | FromGitter | <mratsim> use async for your UI |
11:38:46 | FromDiscord_ | <Shield> instead of calling main(), make your own custom loop, it should be like proc update()= while true : yourFunc(); discard rawui.mainStep(0); |
11:39:56 | FromDiscord_ | <Shield> yourFunc can be a closure iterator, or use pollingMainLoop with async functions like mratsim pointed |
11:40:45 | FromDiscord_ | <Shield> instead of sleeping, just measure time and skip your logic whenever you don't want to update yet |
11:42:11 | FromDiscord_ | <Shield> libui lack of docs is pretty bad, there should be an event that is triggered every update |
11:47:25 | * | francisl joined #nim |
11:48:07 | * | Sembei quit (Ping timeout: 240 seconds) |
11:48:12 | * | MyMind joined #nim |
11:49:35 | * | abm joined #nim |
11:55:07 | * | kapil____ joined #nim |
11:58:29 | Tortice | If I take the threaded/channel approach, should var t: Thread[tuple[Entry, Entry, string, Label]] work? |
12:04:55 | Araq | unlikely |
12:05:15 | Araq | Entry and Label are refs iirc and would be deepcopied to the thread |
12:05:39 | Araq | but maybe, if the refs only wrap a 'ptr' it can work :-) |
12:07:28 | * | francisl quit (Quit: francisl) |
12:07:44 | Tortice | alright, thanks and sorry for all the very dumb questions |
12:08:45 | Araq | checkout tools\downloader.nim which uses a UI with an async downloader |
12:08:58 | Araq | it never got production ready but it's a start |
12:09:19 | Araq | it uses ui.pollingMainLoop |
12:10:31 | elrood | meh, windowzers and their escaped first directory name characters.. |
12:12:06 | * | cei joined #nim |
12:12:44 | Araq | https://stackoverflow.com/questions/17666316/is-there-a-posix-function-to-copy-a-file |
12:13:39 | Araq | stupid Windows offering an API for what cannot be a "system call", which is a concept every programmer obviously should be familiar with because we hate any kind of progress. |
12:13:48 | Araq | :P |
12:16:09 | elrood | at least it's a kind of technically informed and insightful arrogance, if still fundamentally misguided in its conclusions |
12:16:46 | Araq | C: vs B: vs A: reflecting physical drives, some of which might be pluggable is also technically informed |
12:17:12 | Araq | and pretending you can "mount" them everywhere is a highly dubious abstraction |
12:18:27 | Araq | the names could be longer than a single letter tough, but then Unix cannot use more than 3 letters either, usr, etc |
12:19:06 | elrood | to get back on topic and away from flamewar-y and bikeshedding-prone terrain, we could use a comprehensive writeup of nim's async and threading concepts. info on that is pretty much all over the place in the docs currently and not very helpful |
12:20:37 | Araq | very true but 'ui' is not part of nim's core |
12:20:48 | Araq | and every UI library has its own ways of dealing with this issue |
12:28:02 | * | majorsecurityfh joined #nim |
12:28:17 | * | anamok joined #nim |
12:28:20 | anamok | hi |
12:28:47 | PMunch | Hi |
12:29:14 | * | cei quit (Quit: ChatZilla 0.9.93 [Waterfox 56.2.3/20180912152046]) |
12:29:31 | anamok | How to write docstrings in Nim? I'm looking for the Nim equivalent of Python's docstrings. I'm working on a small library and I'd like to add docs to my procs / funcs. |
12:29:47 | Yardanico | ## your doc comment |
12:30:15 | Yardanico | https://nim-lang.org/docs/docgen.html#introduction-documentation-comments |
12:30:23 | * | francisl joined #nim |
12:30:23 | elrood | Araq, not specifically for or limited to ui. i'd bet everybody who is trying to use async for the first time has to wade through other people's code and examples to get started instead of just needing to read the manual and being good to go |
12:30:30 | anamok | Could you send me a link to a project that uses it and I could see it in action? |
12:30:46 | anamok | OK, I see your link now |
12:31:42 | Yardanico | well doc comments are used almost in every nim library :) |
12:31:45 | Yardanico | and in stdlib as well |
12:32:34 | FromGitter | <narimiran> anamok: see here: https://github.com/narimiran/itertools/blob/master/src/itertools.nim `runnableExamples` are also part of the documentation, this is how the final thing looks: https://narimiran.github.io/itertools/ |
12:32:51 | * | majorsecurityfh quit (Remote host closed the connection) |
12:33:21 | Araq | https://nim-lang.org/docs/asyncnet.html is ok, though slightly hard to find :-) |
12:34:13 | elrood | neither hard to find nor sufficient, imho |
12:34:41 | Araq | it never is "sufficient", you can fill books about this topic alone |
12:36:04 | Araq | but we should have an article about async linked directly from the website |
12:36:27 | Tortice | could I just use an asyncSleep? |
12:37:25 | Tortice | nope, still blocks |
12:37:26 | anamok | narimiran: thanks, very useful |
12:42:21 | FromGitter | <Quelklef> Is there some way to tell they compiler, "hey, just trust me that the types will work out"? I want a value `v` that may be of type `X` or of type `Y`, but I'm only doing one operation `f` on it which is defined for both `X` and `Y`. I don't want to use variant types. |
12:42:42 | FromGitter | <Quelklef> Ah fuck that doesn't make sense because then it can't resolve the `f` cll |
12:42:50 | FromGitter | <Quelklef> I gotta use dynamic dispatch then |
12:42:52 | FromGitter | <Quelklef> thanks everyone |
12:44:51 | FromGitter | <alehander42> doesn't `X | Y` work here |
12:45:34 | FromGitter | <Quelklef> I don't think so, because `x` needs to have a concrete type, right |
12:45:35 | FromGitter | <Quelklef> ? |
12:45:43 | FromGitter | <Quelklef> It'll work for generic functions but not otherwise |
12:46:26 | * | floppydh quit (Read error: Connection reset by peer) |
12:47:01 | FromGitter | <alehander42> well, how do you define `x` if you don't know if it's gonna be X or Y ? I thought it's coming as an arg |
12:47:14 | * | floppydh joined #nim |
12:47:23 | * | floppydh quit (Client Quit) |
12:47:33 | FromGitter | <Quelklef> I don't know the type of `x` till runtime |
12:47:33 | FromGitter | <Quelklef> I think |
12:47:35 | * | floppydh joined #nim |
12:47:38 | FromGitter | <Quelklef> Wait, this might work...? |
12:47:50 | FromGitter | <Quelklef> What I'm trying to do is roughly something like: |
12:48:26 | FromGitter | <Quelklef> ```var i = 0 ⏎ while true: ⏎ let x = if i > 1000: someX() else: someY() ⏎ f(x) ⏎ i += 1``` [https://gitter.im/nim-lang/Nim?at=5bb2179ac7bf7c36629c29f3] |
12:48:42 | FromGitter | <zetashift> Why wouldn't you want to use a Variant btw curious about that |
12:48:52 | FromGitter | <Quelklef> Not really, but point being that I start with X values and then switch to Y values part the way through |
12:49:07 | FromGitter | <Quelklef> So the compiler cannot derive that it's one or the other |
12:49:53 | FromGitter | <Quelklef> @zetashift Efficiency reasons, though it looks like I'm going to have to take the overhead of either variant types or a type hierarchy either way. |
12:50:15 | FromGitter | <zetashift> ah okay I didn't know there was an overhead |
12:50:15 | FromGitter | <Quelklef> Are variants faster? |
12:50:21 | FromGitter | <Quelklef> I mean I imagine there is |
12:50:41 | FromGitter | <Quelklef> You gotta branch at runtime based on the variant field / based on the type |
12:50:54 | * | stefanos82 joined #nim |
12:54:43 | * | kobi7 joined #nim |
12:54:48 | kobi7 | Hi guys |
12:55:09 | FromGitter | <Quelklef> howdy |
12:55:48 | kobi7 | I have a proc that takes T as its parameter. What are the ways to specify T and its subtypes (children in the inheritance) |
12:56:26 | kobi7 | excuse me, only the subtypes |
12:56:32 | FromGitter | <Quelklef> You mean, like, do something based on what subtype it is? |
12:57:09 | kobi7 | proc takesSome[T](val:T) where T inherits X |
12:57:39 | * | thomasross__ joined #nim |
12:57:45 | kobi7 | is there syntax to support this? |
12:57:59 | FromGitter | <Quelklef> oh like `<T extends P>` in Java? |
12:58:08 | kobi7 | yes, exactly |
12:58:14 | FromGitter | <Quelklef> I don't think thats supported |
12:58:20 | Araq | proc foo[T: P](x: T) |
12:58:37 | kobi7 | Thank you, Araq! |
12:58:41 | * | thomasross_ quit (Remote host closed the connection) |
12:58:46 | kobi7 | so just a colon? |
12:58:53 | Araq | yeah |
12:58:54 | FromGitter | <Quelklef> Oh, I thought that was only for typeclasses? |
12:58:55 | FromGitter | <Quelklef> cool |
12:59:02 | kobi7 | cool, thanks |
12:59:13 | Araq | a type is also a typeclass in this context |
12:59:39 | anamok | In the doc you can use the macro runnableExamples . Is there a way to insert an example without running it while generating the doc? |
13:00:01 | Araq | nah :-) |
13:00:29 | Araq | --skipTests would be cool to add |
13:01:10 | anamok | I reinvented Python's input(), thus there the doc generation stops and asks a string from the user :) |
13:01:36 | * | Vladar joined #nim |
13:01:47 | FromGitter | <narimiran> anamok: use the regular example `.. code-block:: nim` instead of `runnableExamples`? |
13:01:59 | anamok | ok, thanks |
13:02:09 | Araq | oh yeah, good point |
13:02:23 | Araq | runnable examples should be runnable. |
13:02:46 | kobi7 | Araq, when I write T, can I specify it as a ref object, or a simple object (stack vs heap) ? |
13:02:59 | Araq | btw Python's input() is readLineFromStdin |
13:03:21 | Araq | kobi7, that depends on your code |
13:03:22 | kobi7 | like saying, acceptOnlyStructs(T:stackObj) |
13:03:41 | Araq | proc g[T: object](x: T) |
13:03:50 | * | francisl quit (Quit: francisl) |
13:04:03 | kobi7 | I understand. amazing, thanks |
13:12:54 | * | brainproxy quit (Quit: WeeChat 2.2) |
13:17:47 | * | francisl joined #nim |
13:18:44 | * | kobi7 quit (Quit: Leaving) |
13:28:45 | * | rnrwashere joined #nim |
13:30:19 | * | rnrwashere quit (Remote host closed the connection) |
13:35:09 | * | Whatevers joined #nim |
13:41:05 | * | elrood quit (Quit: Leaving) |
13:41:44 | * | nsf quit (Quit: WeeChat 2.2) |
13:51:15 | * | rnrwashere joined #nim |
13:52:33 | * | rnrwashere quit (Remote host closed the connection) |
13:53:29 | * | Whatevers quit (Ping timeout: 256 seconds) |
13:55:12 | Nolan[m] | What is the closest Nim type to C's `void *`? I have some code that works when compiled natively using `pointer` but it fails when I try compiling to webassembly. Throws an odd error that I'm trying to debug with the Emscripten folks, but SQLite's `mallocWithAlarm` function features prominantly, so I'm wondering if what I'm passing it isn't quite what it expects. |
13:57:11 | leorize | `pointer` |
13:58:01 | Nolan[m] | OK, so `pointer` it is. Thanks, I thought pointers were "safe" and as such GC'd. |
13:58:30 | leorize | only `ref`s are |
13:59:33 | Nolan[m] | Got it, thanks. |
14:00:31 | * | rnrwashere joined #nim |
14:02:48 | * | rnrwashere quit (Client Quit) |
14:03:18 | * | rnrwashere joined #nim |
14:08:31 | * | egrouseHr joined #nim |
14:12:27 | * | egrouseHr quit (Killed (Sigyn (Spam is off topic on freenode.))) |
14:16:07 | * | rnrwashere quit (Remote host closed the connection) |
14:18:33 | FromGitter | <Bennyelg> ```code paste, see link``` ⏎ ⏎ any familiar ? [https://gitter.im/nim-lang/Nim?at=5bb22cb91c100a4f29151b7b] |
14:26:06 | FromGitter | <Bennyelg> How Do I declare on proc and implement it later in the code ? |
14:26:43 | FromDiscord_ | <Shield> forward declaration |
14:27:02 | FromGitter | <Bennyelg> Thanks |
14:27:36 | FromDiscord_ | <Shield> "proc foo(args..) {pragmas..}" |
14:28:03 | FromGitter | <narimiran> @Bennyelg see here: https://narimiran.github.io/nim-basics/#_forward_declaration |
14:49:16 | FromGitter | <Bennyelg> 👍 |
14:51:17 | copygirl | Would something like `Result[T, MyFirstError | MySecondError]` possible with Nim? |
14:52:19 | * | rnrwashere joined #nim |
14:52:30 | copygirl | If I make myself a `Result[T,Err]` type that is. |
14:53:46 | * | rnrwashere quit (Remote host closed the connection) |
14:53:52 | * | rnrwashere joined #nim |
14:59:40 | Tortice | would addTimer() work without blocking? |
15:00:30 | * | rnrwashere quit (Remote host closed the connection) |
15:04:17 | * | PMunch quit (Quit: Leaving) |
15:06:32 | * | miran joined #nim |
15:08:01 | anamok | I'm advancing with the docs. However, I type this: https://i.imgur.com/c1Q7zO4.png , and I get this in the HTML: https://i.imgur.com/MjwaeCA.png . Sometimes the variables get a funny name. |
15:08:54 | * | Trustable joined #nim |
15:09:11 | * | derlafff quit (Ping timeout: 260 seconds) |
15:10:27 | anamok | Is it a bug? |
15:10:33 | * | rnrwashere joined #nim |
15:14:24 | anamok | `<span class="DecNumber">224459</span>` is inserted in the HTML |
15:14:29 | * | rnrwashere quit (Remote host closed the connection) |
15:16:36 | FromDiscord_ | <Shield> works fine on nim 0.19.0 |
15:18:46 | miran | anamok: this shouldn't happen :/ |
15:19:09 | FromDiscord_ | <Shield> hold on, it does happen with your exact case |
15:19:33 | anamok | it did :( Even if I rename the var variable. |
15:21:28 | * | elrood joined #nim |
15:24:14 | anamok | I copied the source here: https://pastebin.com/siYdqxCm |
15:24:43 | miran | anamok: how do you create docs? |
15:24:46 | FromDiscord_ | <Shield> it only happens with templates, make it a proc and it works fine, I guess because templates has to mangle variable names, it should leave the runnableexample untouched tho |
15:25:18 | miran | if this can be reproduced for some other templates, this should definitely be reported |
15:26:13 | FromDiscord_ | <Shield> yeah it is a problem with templates, I imagine it'll be the same for macros, it should be reported |
15:26:49 | FromGitter | <kaushalmodi> anamok: I confirm the bug |
15:26:59 | FromGitter | <kaushalmodi> Please open an issue for it |
15:27:27 | FromGitter | <kaushalmodi> miran: was able to simply create an example.nim with https://ptpb.pw/9N-t/nim, and run `nim doc example.nim` |
15:29:54 | miran | can confirm, was able to recreate |
15:30:30 | anamok | ok, will open an issue |
15:30:32 | anamok | thanks |
15:34:22 | * | adelrune left #nim (#nim) |
15:39:30 | anamok | the ticket is here: https://github.com/nim-lang/Nim/issues/9143 |
15:39:53 | * | rnrwashere joined #nim |
15:44:37 | elrood | holy cow, did a bot commit all of the generated html docs to Nim's repo in a87ca672? that's smart |
15:46:11 | * | rnrwashere quit (Remote host closed the connection) |
15:47:14 | miran | elrood: link? |
15:47:26 | FromGitter | <kaushalmodi> elrood: https://github.com/nim-lang/Nim/blob/2e5c759736a9458b192a3beb2cf3a38b2f198887/.travis.yml#L55-L66 😎 |
15:47:48 | FromGitter | <kaushalmodi> Each devel branch commit updates https://nim-lang.github.io/Nim/ |
15:48:02 | FromGitter | <kaushalmodi> It's one of the lesser advertised recent features |
15:48:58 | FromGitter | <kaushalmodi> elrood: You probably missed my earlier ping.. can you rerun your link validation script on https://nim-lang.github.io/Nim/ and report all the broken links? |
15:49:32 | FromGitter | <kaushalmodi> From my checks *all* external/internal links (except the source/edit links) have been confirmed to be 100% working |
15:50:16 | copygirl | Mhh, also, is it possible to constrict types in generic functions, and if so how? |
15:51:01 | elrood | yup, missed that. it works on local files, but i'll have a look |
15:51:15 | copygirl | `proc orRaise*[T,Err](res: Result[T,Err]): T = ...` should only work if Err is an Exception, right? I gotta look up what you can theoretically raise. |
15:51:37 | FromGitter | <kaushalmodi> miran: https://github.com/nim-lang/Nim/tree/gh-pages |
15:51:49 | * | a_chou joined #nim |
15:51:51 | miran | thanks |
15:52:52 | copygirl | Oh wow I just realized you can use try as an expression. |
15:59:22 | * | a_chou quit (Quit: a_chou) |
16:02:50 | * | francisl quit (Quit: francisl) |
16:05:15 | anamok | bye |
16:05:42 | * | anamok quit (Quit: Leaving) |
16:09:53 | elrood | kaushalmodi, took the liberty to let it run on a download from that gh-pages repo branch, if that's alright with you. external links seem to be fine now, merely nimble.directory didn't want to comply with a HEAD request. https://pastebin.com/Gftn4cnq |
16:17:34 | * | a_chou joined #nim |
16:18:21 | * | francisl joined #nim |
16:21:22 | FromGitter | <kaushalmodi> elrood: why would it not be alright for me? :) |
16:21:35 | FromGitter | <kaushalmodi> we are both working to make the nim docs broken-link-free |
16:21:37 | FromGitter | <kaushalmodi> :) |
16:22:57 | * | darithorn joined #nim |
16:23:12 | FromGitter | <kaushalmodi> as an aside ptpb.pw is much *much* better than pastebin.. completely spam free |
16:24:56 | FromGitter | <kaushalmodi> elrood: So that does that 400 error mean? https://ptpb.pw/hczq/text#L-2272 |
16:25:19 | FromGitter | <kaushalmodi> I can access it fine |
16:26:15 | FromGitter | <kaushalmodi> may be the nimble.directory server is misconfigured? |
16:39:01 | elrood | kaushalmodi, as said i'm using HEAD requests to ping the linked pages. the server for nimble.directory apparently isn't set up to handle those for some mysterious reason. try curl -I https://nimble.directory/ if you like to see the response. usual GET requests work fine |
16:39:04 | federico3 | kaushalmodi: uh? what URL were you scraping? |
16:44:43 | * | SenasOzys__ joined #nim |
16:45:00 | * | rockcavera quit (Remote host closed the connection) |
16:45:26 | * | SenasOzys quit (Ping timeout: 260 seconds) |
16:45:39 | * | rockcavera joined #nim |
16:47:11 | FromGitter | <kaushalmodi> federico3: what's the context? |
16:47:32 | FromGitter | <kaushalmodi> if that ptpb.pw link, it's the log created by elrood's script |
16:47:39 | federico3 | nimble.directory |
16:48:01 | FromGitter | <kaushalmodi> see elrood's response above |
16:48:13 | FromGitter | <kaushalmodi> I don't understand "HEAD request" :P |
16:48:28 | FromGitter | <kaushalmodi> maybe nimble.directory should respond to that? |
16:49:00 | * | druonysus joined #nim |
16:49:00 | * | druonysus quit (Changing host) |
16:49:00 | * | druonysus joined #nim |
16:50:30 | * | maedoxBb joined #nim |
16:50:55 | elrood | kaushalmodi, you're in good company, that server doesn't either ;P see https://en.wikipedia.org/wiki/Hypertext_Transfer_Protocol#Request_methods |
16:51:03 | federico3 | hm, I guess it's missing in Jester |
16:51:41 | FromGitter | <kaushalmodi> elrood: :) |
16:51:52 | * | rnrwashere joined #nim |
16:52:50 | * | maedoxBb quit (Killed (Sigyn (Spam is off topic on freenode.))) |
16:53:15 | FromGitter | <kaushalmodi> nim forum gives a different error code |
16:53:25 | FromGitter | <kaushalmodi> ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=5bb25104271506518d9fc60a] |
16:54:02 | FromGitter | <kaushalmodi> If I assume that that's using jester too, then that makes 2 sites not able to handle "curl -I" or HEAD |
16:54:26 | elrood | feel free to bug dom96 about it, i'm sure he'll be delighted |
16:54:37 | FromGitter | <dom96> Oh cool. We've got devel docs now? |
16:54:38 | FromGitter | <kaushalmodi> @dom96 ^ |
16:54:44 | FromGitter | <kaushalmodi> now?! |
16:54:50 | FromGitter | <kaushalmodi> they have been there forever! :P |
16:55:00 | FromGitter | <kaushalmodi> forever meaning last month or so |
16:55:01 | FromGitter | <kaushalmodi> :) |
16:55:10 | FromGitter | <dom96> Huh |
16:55:20 | elrood | so, for a day? ;) |
16:55:29 | FromGitter | <dom96> We should point some nim-lang.org URL at them |
16:55:45 | FromGitter | <dom96> HEAD not working with jester is a known bug |
16:56:01 | FromGitter | <kaushalmodi> elrood: the gh-pages branch will only hold the last commit |
16:56:14 | FromGitter | <dom96> Shouldn't 502 though. That's odd. |
16:56:31 | * | rnrwashere quit (Ping timeout: 260 seconds) |
16:56:31 | FromGitter | <kaushalmodi> I intentionally make it not store older commits.. to prevent unnecessary bulk in the repo |
16:56:48 | FromGitter | <kaushalmodi> .. else over time gh-pages branch would bloat up the Nim repo |
16:57:02 | * | natrys joined #nim |
16:57:12 | federico3 | kaushalmodi: where are they stored? |
16:57:21 | FromGitter | <kaushalmodi> so if you look at gh-pages commit history, it would always be around the time last commit to devel happened |
16:57:27 | FromGitter | <dom96> That's awesome. Great job @kaushalmodi |
16:57:38 | FromGitter | <kaushalmodi> federico3: gh-pages is in the same Nim repo |
16:57:39 | FromGitter | <dom96> Need to advertise it more ;) |
16:57:54 | FromGitter | <kaushalmodi> if you clone the Nim repo and checkout gh-pages, you get the docs latest as of then |
16:57:55 | FromGitter | <dom96> IMO the docs should have a version switcher |
16:58:02 | FromGitter | <kaushalmodi> (no need to do koch docs locally then) |
16:58:16 | FromGitter | <dom96> A little bit of Nim in the browser could have the logic for that |
16:58:38 | FromGitter | <dom96> Perfect hacktober opportunity ;) |
16:58:38 | FromGitter | <kaushalmodi> @dom96 about the version switcher, I agree, though only for the releases, right? |
16:59:41 | federico3 | https://github.com/nim-lang/Nim/issues/2492 dom96 kaushalmodi like this? |
17:00:23 | miran | btw, @dom96 have you seen my hacktoberfest article PR? |
17:00:35 | FromGitter | <arnetheduck> @kaushalmodi would be nice if each version had its own url as well, so that it can be bookmarked, along with a `latest` and `devel` version |
17:01:01 | FromGitter | <kaushalmodi> I like the idea of a `http://nim-lang.org/docs/devel` URL |
17:01:23 | FromGitter | <kaushalmodi> @dom96 it's super easy to set 200 redirect form that URL to `https://nim-lang.github.io/Nim` |
17:02:12 | FromGitter | <arnetheduck> likewise for `http://nim-lang.org/docs/0.19` - ie I'd hope that the switcher isn't too smart :) |
17:03:10 | elrood | kaushalmodi, good to know you keep not littering the repo in sight. still feels like a github repo isn't the perfect match for that and it's being abused a little here though |
17:04:34 | federico3 | arnetheduck, kaushalmodi: shall we reopen the bug? |
17:11:41 | FromGitter | <kaushalmodi> federico3: yes, reopening that bug makes sense as it wasn't ever technically solved |
17:12:09 | FromGitter | <kaushalmodi> @dom96 : see about question about reopening that #2492 bug |
17:12:44 | FromGitter | <kaushalmodi> elrood: there are other ways to generate devel docs too (I have Netlify in mind) |
17:13:02 | FromGitter | <kaushalmodi> but not sure if Araq or dom96 would be open for that |
17:13:46 | FromGitter | <kaushalmodi> I don't use gh-pages altogether for any of my websites.. I don't like the idea of committing HTML to git (be it manually or automatic) |
17:13:50 | FromGitter | <dom96> Yes. That's the devel URL I had in mind. |
17:14:00 | FromGitter | <dom96> We already have docs in separate dirs |
17:14:12 | FromGitter | <dom96> They're just not under the 'docs' dir |
17:15:05 | FromGitter | <kaushalmodi> about the devel, you would need to set up 200 code redirect |
17:15:26 | FromGitter | <kaushalmodi> so that `http://nim-lang.org/docs/devel/*` mirrors `https://nim-lang.github.io/Nim/*` |
17:15:38 | FromGitter | <dom96> Hrm? Why reopen that? |
17:16:04 | FromGitter | <dom96> nim-lang.org/0.18.0/ |
17:16:22 | FromGitter | <dom96> Yay. Permissions |
17:16:27 | FromGitter | <kaushalmodi> hehe |
17:16:29 | FromGitter | <kaushalmodi> yeah 403 |
17:16:49 | federico3 | and there is no way to discover versioned docs |
17:17:08 | FromGitter | <kaushalmodi> reopen so that https://nim-lang.org/docs/latest redirects to https://nim-lang.org/docs/0.19.0 |
17:17:30 | FromGitter | <kaushalmodi> and similarly https://nim-lang.org/docs/0.18.0 and docs for other versions work too |
17:17:47 | FromGitter | <kaushalmodi> https://nim-lang.org/docs/ should list devel/, latest/, 0.19.0/, etc links |
17:18:17 | FromGitter | <kaushalmodi> looking at the URL, people should know what version docs they are readig |
17:18:22 | FromGitter | <kaushalmodi> s/readig/reading |
17:18:58 | FromGitter | <kaushalmodi> motivation: https://docs.python.org/3/tutorial/index.html |
17:19:17 | FromGitter | <kaushalmodi> see that dropdown on top-left |
17:20:52 | federico3 | kaushalmodi: I added that to the bug |
17:22:14 | * | derlafff joined #nim |
17:23:01 | * | derlafff quit (Remote host closed the connection) |
17:23:15 | * | SenasOzys__ quit (Ping timeout: 252 seconds) |
17:23:53 | * | kapil____ quit (Quit: Connection closed for inactivity) |
17:23:56 | * | derlafff joined #nim |
17:24:50 | * | a_chou quit (Remote host closed the connection) |
17:25:09 | * | a_chou joined #nim |
17:26:36 | * | Guest75616 joined #nim |
17:28:03 | FromGitter | <dom96> federico3: yes, that's why I think we need a visible switcher |
17:28:51 | FromGitter | <dom96> it might in fact be better to create a simple Jester web app that injects the version switcher since old docs would otherwise need to be updated. |
17:29:11 | FromGitter | <kaushalmodi> dom96: why would old docs need to be updated |
17:29:18 | FromGitter | <dom96> to include the version switcher |
17:29:19 | FromGitter | <kaushalmodi> all docs are relatively linked |
17:29:23 | FromGitter | <kaushalmodi> ah |
17:29:36 | FromGitter | <kaushalmodi> may be JS can do some magic here? |
17:29:40 | FromGitter | <kaushalmodi> (I don't know JS) |
17:30:00 | FromGitter | <kaushalmodi> and it should may be fine to update old docs to just include the JS in the header |
17:32:13 | * | SenasOzys__ joined #nim |
17:32:51 | FromGitter | <dom96> yeah, JS can certainly do it |
17:33:07 | FromGitter | <dom96> We need to think about making it reusable for other Nim projects too |
17:33:15 | * | papa_lazzarou joined #nim |
17:34:13 | * | Guest75616 quit (Ping timeout: 268 seconds) |
17:36:42 | FromGitter | <adam-r-kowalski> Is the aim compiler incremental? I compiled and ran my code, then made no changes and compiled/ran again and it still says ⏎ ⏎ ```operation successful (12272 lines compiled; 0.427 sec total; 16.387MiB peakmem; Debug Build)``` ⏎ ⏎ why is it compiling over 10 thousand lines with no source changes? I would expect compiling the second time would be a no op once it determines nothing has changed |
17:36:42 | FromGitter | ... [https://gitter.im/nim-lang/Nim?at=5bb25b2ae6090c0c3b4c9cbe] |
17:37:26 | FromGitter | <dom96> The C compilation is a no-op |
17:37:33 | FromGitter | <dom96> The Nim compiler still parses everything |
17:37:37 | FromGitter | <dom96> That part isn't incremental yet |
17:38:41 | * | papa_lazzarou quit (Remote host closed the connection) |
17:40:05 | FromGitter | <adam-r-kowalski> I see, it just makes things a little tough to iterate with when I import a bigger library like arraymancer. It takes around 3 seconds every time I compile, which adds a lot to the development time relative to something like python |
17:41:02 | FromGitter | <kdheepak> Hi all. When I try to build a library using the following command, ⏎ ⏎ ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=5bb25c2ebbdc0b2505ce5413] |
17:41:35 | * | a_chou quit (Quit: a_chou) |
17:44:38 | * | fvs joined #nim |
17:44:58 | elrood | people who complain about 3s compilation times must never have had to work with a non-trivial c++ or scala codebase. i'm kinda jealous |
17:45:18 | fvs | howto> var a: char = '' |
17:45:45 | * | francisl quit (Quit: francisl) |
17:46:52 | miran | fvs: you can do just `var a: char` |
17:47:12 | stefanos82 | elrood: I don't have such experience, but from what I have seen myself through YouTube conf videos and heard from experienced folks, there are projects that take *days* to finish compilation procedure *if* you don't use programs such as ccache and the like |
17:49:20 | Araq | adam-r-kowalski: https://github.com/nim-lang/Nim/issues/7874 |
17:49:28 | Araq | it's actively being worked on |
17:50:28 | fvs | miran: thanks. pity :( |
17:50:40 | miran | fvs: why pity? |
17:51:30 | fvs | var a: int = 1 |
17:54:01 | copygirl | Hey Araq, are there generic constraints? Or what are they called so I can look them up? |
17:54:17 | miran | fvs: well, you can do `var a: char = 'a'` |
17:55:02 | miran | just as you can do `var a: int` and a will be 0 |
17:55:47 | copygirl | For example a function `proc doError[Err](..., proc (): Err) where Err: Exception |
17:55:52 | fvs | makes sense now, thanks |
17:56:00 | copygirl | Mh missed the ending backtick. |
17:56:00 | miran | with `var a: char` you just declare your variable, and you later fill it with a value. i don't see why it is a pity ;) |
17:56:30 | Araq | copygirl, as you wrote it |
17:56:51 | Araq | proc doError[Err: CatchableError](...): proc (): Err |
17:59:57 | FromGitter | <adam-r-kowalski> @elrood, 3-5s isn’t much, but this is with a completly empty project without my adding any of my own code. That means as it will grow it will start to increase. Additionally, since part of the reason to use this language is to have one language that you can both prototype and have the final product in, compilation times are important. Otherwise you might as well use a scripting language like python which |
17:59:57 | FromGitter | ... already has really fast tensors, and only once you have everything fleshed out move to nim/c++. In take case we aren’t gaining that much |
18:00:24 | copygirl | Araq: What is it called? Where can I look up more on it? |
18:00:33 | Araq | "generic constraints" |
18:00:46 | Araq | though tbh I don't know if that's the heading the manual uses |
18:00:57 | FromGitter | <adam-r-kowalski> @Araq, I’m glad it’s being worked on |
18:01:29 | FromGitter | <adam-r-kowalski> Is there a way that we could take a hash of the source files or something? and then if the hash hasn’t changed don’t even bother compiling? |
18:01:30 | copygirl | Thanks! |
18:01:52 | Araq | adam: that's what Nim does under the hood then, yes |
18:02:57 | elrood | compilation times are always important, of course. you've just been very lucky/spoiled if a few seconds feel like a lot to you. and that's not meant as an offense, i actually really envy you |
18:03:22 | elrood | and yes, nim could and should improve here, it's a relatively low-hanging fruit actually |
18:04:57 | Araq | it was painful to design but 'macrocache' works already and I think the basic design and implementation is sound, it only needs a ton of testing :-) |
18:05:01 | FromGitter | <adam-r-kowalski> @elrood, you’re coming of a bit pretentious there bud. You don’t know about me or the projects I’ve worked on. So trying to claim that i’m spoiled is being productive in any way. |
18:11:35 | miran | once i've seen somebody creating and populating a `const array` by using `block` or something similar and then it was for loop inside of it. anybody knows what i'm looking for? |
18:12:12 | elrood | adam-r-kowalski, subtleties get lost in translation i guess, i didn't mean that in a any offensive way as i've tried to state. a few seconds are just not a lot, relatively speaking, nim's compiler implementation already is among the faster ones as it is |
18:13:54 | FromGitter | <kaushalmodi> @kdheepak The cligen dev is super-responsive. You might want to open on issue on the cligen repo to get help with that. |
18:14:38 | * | GumbyPANoE joined #nim |
18:18:47 | FromGitter | <kdheepak> Thanks @kaushalmodi will do. |
18:19:06 | FromGitter | <Vindaar> @miran: something like this? ⏎ ⏎ ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=5bb2651aa9be136b94de28e2] |
18:20:44 | FromGitter | <adam-r-kowalski> @elrood, it’s all good, and I agree that it is very quick already, I think that this is something we need to address as a community. In a lot of areas such as data science, there are dominant languages such as python which interact with high performance c++ libraries while still providing you the immediate feedback of a repl. I think we need to think about where we want to sit on the spectrum. Are we a |
18:20:44 | FromGitter | ... replacement for c++/rust where you write the fast parts in these langauages, and utilize them from higher level languages while prototyping? Or are we going to become a tool that you can even use for data exploration and discovery, while allowing you to stay in the language as you need to transition to more large scale pro ... [https://gitter.im/nim-lang/Nim?at=5bb2657b137994395dc41a0d] |
18:21:23 | * | GumbyPANoE quit (Remote host closed the connection) |
18:21:30 | miran | @Vindaar: yup, that's it. i was halfway there. didn't know that i must declare `n` and then return it at the end |
18:21:48 | miran | i was reusing `ar` name, and it was unknown inside of the block |
18:22:03 | FromGitter | <Vindaar> I've never used that, but you just reminded me that this should actually be possible. Pretty neat! :) |
18:23:18 | miran | @Vindaar i have usually used a proc to do this. don't know which way would be preferred |
18:23:54 | * | jxy quit (Remote host closed the connection) |
18:30:00 | FromGitter | <dom96> @kdheepak DLLs don't have access to the cmd line args AFAIK |
18:31:49 | * | junland quit (Quit: Disconnected.) |
18:32:50 | * | junland joined #nim |
18:34:52 | * | jxy joined #nim |
18:38:03 | stefanos82 | @dom96, question: if I want to install 0.16.0 and 0.19.0, where would they reside? Inside .nimble/bin/ right next to each other? If yes, with what name each version? |
18:38:32 | FromGitter | <dom96> in ~/.choosenim/toolchains |
18:41:40 | * | SenasOzys__ quit (Ping timeout: 246 seconds) |
18:43:08 | FromGitter | <kdheepak> @dom96 thanks for the answer. I have the code in the `isMainModule`. Is there a way to tell nim not to run that if trying to build a library? |
18:43:38 | FromGitter | <kdheepak> This is what the isMainModule looks like. ⏎ ⏎ ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=5bb26adaae7be94016e76d36] |
18:45:30 | FromGitter | <dom96> `when isMainModule and appType != "lib":` |
18:45:31 | FromGitter | <dom96> Might work |
18:46:03 | FromGitter | <dom96> Strange that `appType` is a string |
18:53:05 | * | rnrwashere joined #nim |
18:54:12 | * | SenasOzys__ joined #nim |
18:55:40 | FromGitter | <arnetheduck> federico3 good archeology there, 2015! :) |
18:56:40 | FromGitter | <arnetheduck> @kaushalmodi think carefully about redirects.. one annoying thing about them is that that if you open `latest` and it redirects you, it's harder to bookmark |
18:56:59 | FromGitter | <kdheepak> That seems to work @dom96 Thanks! |
18:57:12 | FromGitter | <kaushalmodi> @arnetheduck it should redirect to a version specific page |
18:57:22 | FromGitter | <kaushalmodi> so user can bookmark that version-specific page |
18:57:51 | * | rnrwashere quit (Ping timeout: 260 seconds) |
18:58:16 | FromGitter | <arnetheduck> and I'm arguing it shouldn't - the word `latest` is anchored in the present and if I have a tab open, I don't want to become moored to the past :) |
18:58:19 | FromGitter | <kaushalmodi> if someone wants to bookmark the url with "latest/" they can always edit the URL in bookmarks to do that |
18:58:33 | FromGitter | <kaushalmodi> I can see there are pros/cons to both URLs |
18:58:44 | FromGitter | <kaushalmodi> I might want to see exactly what I bookmarked |
18:58:55 | FromGitter | <kaushalmodi> and someone might want to see the latest of what they bookmarked |
18:58:59 | FromGitter | <kaushalmodi> there's no right or wrong |
18:59:57 | FromGitter | <kaushalmodi> someone might come up with a little JS bookmarklet to bookmark the page but do `s/nn.nn.nn/latest/` in the URL before saving :P |
19:00:13 | FromGitter | <arnetheduck> ie see python docs - when you open docs.python.org, you land on `latest` and don't get redirected from there.. only when you explicitly choose a version does it infect the url |
19:01:07 | FromGitter | <kaushalmodi> https://docs.python.org/ redirects to https://docs.python.org/3/ |
19:01:30 | FromGitter | <kaushalmodi> then when you click on "Library Reference", you get: https://docs.python.org/3/library/index.html |
19:01:40 | FromGitter | <arnetheduck> yeah, because py2 & 3 are different languages.. but it doesn't put you at `3.7` |
19:01:44 | FromGitter | <kaushalmodi> so if someone bookmarks that, they have frozen the URL to python3 |
19:02:32 | FromGitter | <mratsim> @adam-r-kowalski I want to be able to do every data science related tasks in Nim. |
19:02:33 | FromGitter | <arnetheduck> it also has implications for search engines - ie if you do redirects, search engines will index specific versions which is extremely annoying.. `cmake` has this issue, meaning that you often get linked to some years-old version |
19:03:23 | FromGitter | <kaushalmodi> I am not a web dev.. but looks like Python has a good doc URL model |
19:03:38 | FromGitter | <kaushalmodi> may be Nim uses that same model? |
19:04:19 | FromGitter | <mratsim> Python uses Sphinx which is RST based, which is also Nim default structured text format. |
19:04:25 | FromGitter | <dom96> Unless `latest` means `devel` it's not useful |
19:04:35 | FromGitter | <mratsim> I prefer markdown but well, we should take advantage of that |
19:04:35 | FromGitter | <dom96> https://nim-lang.org/docs/ is already `latest` |
19:04:44 | FromGitter | <dom96> And `devel` shouldn't redirect indeed. |
19:05:19 | FromGitter | <arnetheduck> `latest` usually means latest released version, whereas `devel` usually means.. uh.. `devel` |
19:05:22 | FromGitter | <kaushalmodi> @dom96 My suggestion was to do 301 (permanent) redirects from https://nim-lang.org/docs/devel/ to the URL that travis deploys to |
19:05:35 | FromGitter | <kaushalmodi> I don't think that has any bad SEO implication |
19:05:44 | FromGitter | <kaushalmodi> sorry, take that back |
19:05:53 | FromGitter | <kaushalmodi> I got confused in my suggestion :P |
19:06:06 | FromGitter | <arnetheduck> @kaushalmodi check out https://www.google.com/search?hl=en&q=cmake%20install |
19:06:10 | FromGitter | <kaushalmodi> I had suggested 200 redirects earlier, and that probably has bad SEO implication |
19:06:37 | FromGitter | <arnetheduck> first link is to cmake 3.0 - they're at 3.12 now... |
19:07:12 | FromGitter | <kdheepak> When I create a shared library, and try to call the function exported from nim in Python, my python process just hangs. |
19:07:30 | FromGitter | <kaushalmodi> and python is doing something right: https://www.google.com/search?q=python+library+reference |
19:08:49 | FromGitter | <dom96> Yeah, we probably should move our docs to a `docs` subdomain |
19:08:57 | FromGitter | <arnetheduck> yeah, my guess would be that search engines treat redirects as deprecated url's basically, not to be indexed |
19:09:17 | * | Vladar quit (Remote host closed the connection) |
19:09:24 | FromGitter | <kaushalmodi> from my brief static site gen experience, only 301 redirects are considered deprecated |
19:09:38 | FromGitter | <kaushalmodi> so they 301 redirect source URL will not be indexed |
19:10:32 | Tortice | what's the alternative to waitFor(asyncSleep(ms))? |
19:10:47 | * | fvs left #nim ("ERC (IRC client for Emacs 26.1)") |
19:11:54 | * | goncaloqk joined #nim |
19:12:14 | FromGitter | <dom96> alternative in what way? |
19:12:28 | FromGitter | <dom96> or for what? |
19:12:32 | Tortice | non blocking |
19:12:41 | Tortice | nvm, that's really dumb |
19:12:42 | Tortice | sorry |
19:15:34 | * | nsf joined #nim |
19:16:30 | FromGitter | <dom96> `await` it :) |
19:16:33 | * | goncaloqk quit (Ping timeout: 252 seconds) |
19:20:02 | * | rnrwashere joined #nim |
19:25:10 | * | rnrwashere quit (Remote host closed the connection) |
19:26:40 | * | rnrwashere joined #nim |
19:28:08 | miran | @dom96: have you seen https://github.com/nim-lang/website/pull/107 ? |
19:30:22 | FromGitter | <dom96> Yes. I can’t review it right now. |
19:30:32 | * | arecaceae quit (Remote host closed the connection) |
19:30:50 | * | arecaceae joined #nim |
19:31:42 | FromGitter | <arnetheduck> haha: nim error message of the day: ` ... ../../.nimble/pkgs/ranges-0.0.1/ranges/typedranges.nim(71, 42) Error: illegal conversion from 'int' to 'int'` |
19:34:06 | Tortice | when I try making my proc async I get Error: internal error: environment misses: dir |
19:34:08 | FromDiscord_ | <Shield> lol |
19:34:33 | * | rnrwashere quit (Remote host closed the connection) |
19:39:13 | FromGitter | <rayman22201> @miran, @kaushalmodi, @araq I was looking at the "strutils" doc search bug that miran found from Saturday. It's an interesting bug. It is because of the mismatch that comes from using index.html as the database for the search. The html structure makes perfect sense for an index page, but ends up producing crap results on the search. For an example see here: https://nim-lang.org/docs/theindex.html#Levenshtein. the |
19:39:13 | FromGitter | ... search in dochack.js uses bullet lists as database entries, but "Levenshtein" isn't a bullet, it's a heading. I already had to put in a few parsing hacks for edge cases like this, but I'm trying to think of a way to fix it without doing a big refactor of the index.html page. |
19:40:24 | FromGitter | <kaushalmodi> @rayman22201 Can you open an issue so that we can track this? |
19:40:34 | FromGitter | <rayman22201> yeah |
19:40:50 | FromGitter | <kaushalmodi> need to also create a test case for this I'd believe |
19:42:48 | FromGitter | <rayman22201> another interesting problem. How do you create automated tests for a search function? |
19:48:36 | Tortice | https://ptpb.pw/qUKL/nim Error: internal error: environment misses: dir |
19:49:27 | FromGitter | <kaushalmodi> @rayman22201 Can you take a .nim file, generate the doc using `nim doc`, generate the index and save the expected index file? |
19:49:42 | FromGitter | <kaushalmodi> during test, you'd do the same and diff the expected vs generated index file |
19:50:08 | FromGitter | <kaushalmodi> See the nimdoc tester: https://github.com/nim-lang/Nim/blob/devel/nimdoc/tester.nim |
19:50:38 | FromGitter | <kaushalmodi> actually it does create the doc and index :P |
19:51:09 | FromGitter | <kaushalmodi> you just need to update/fix the testproject.nim and expected file in that test :) |
19:54:34 | * | tdog quit (Quit: WeeChat 1.5) |
19:54:39 | FromGitter | <rayman22201> The hard part is that I need a way to run dochack.js, input a search term, and ensure the correct search results are returned. |
19:54:55 | * | tdc joined #nim |
19:55:34 | FromGitter | <rayman22201> just testing the output of the index.html isn't enough |
19:59:50 | FromGitter | <Varriount> Oh, hi Ray. |
20:00:02 | FromGitter | <Varriount> Doing more search stuff? |
20:03:20 | FromGitter | <rayman22201> Hi @Varriount! More like doing my part to make sure the patch I submitted actually works now that people are actually using it lol |
20:04:05 | FromGitter | <rayman22201> software has no bugs if nobody uses it :-P |
20:06:12 | FromGitter | <Varriount> If nobody observes a bug, does it actually exist? |
20:06:39 | FromGitter | <Varriount> Schrodinger's Bug. 😋 |
20:12:50 | FromGitter | <rayman22201> @kaushalmodi |
20:12:51 | FromGitter | <rayman22201> https://github.com/nim-lang/Nim/issues/9147 |
20:13:12 | FromGitter | <rayman22201> I think the fix is going to be somewhere here: https://github.com/nim-lang/Nim/blob/c404163bbf39d8d8311c516d6e89d531ffea151c/lib/packages/docutils/rstgen.nim#L526 |
20:14:13 | FromGitter | <rayman22201> I need to keep more context so that we know what header goes to which bullet, and produce a better / more unique value for data-doc-search-tag |
20:17:26 | FromGitter | <rayman22201> we = the script. Really weird use of pronouns. sorry. lol |
20:18:39 | * | Trustable quit (Remote host closed the connection) |
20:24:46 | * | junkmechanicFd joined #nim |
20:26:37 | * | rnrwashere joined #nim |
20:27:34 | Araq | rayman22201, we should consider to generate a different index for the search |
20:27:47 | Araq | there is no reason the search must use theindex.html |
20:28:01 | * | junkmechanicFd quit (Remote host closed the connection) |
20:28:11 | masterm | hello. I'm trying to add support for cross-compiling to m68k Amiga (because reasons :P). one quirk of the Amiga platform is that the OS doesn't automatically free process' memory on exit, so I need to add a bit of logic to the standard library that explicitly deallocates all allocated pages on exit |
20:28:16 | masterm | where should I start poking? |
20:29:27 | masterm | I'm skimming through alloc.nim right now but it's quite a hefty file |
20:30:38 | * | rdorschyS joined #nim |
20:31:47 | FromGitter | <dom96> @arnetheduck stdlib conflict? lol |
20:33:54 | Araq | masterm, gc_common.nim has deallocHeap, run this at process exit with an atexit handler (addQuitProc) |
20:34:47 | Araq | addQuitProc proc () {.noconv.} = deallocHeap(runFinalizers = true, allowGcAfterwards = false) |
20:34:55 | * | rdorschyS quit (Remote host closed the connection) |
20:35:22 | * | rnrwashere quit (Remote host closed the connection) |
20:36:43 | * | sagax_ joined #nim |
20:37:31 | masterm | Araq: I'll try that, thanks! |
20:38:14 | FromGitter | <dom96> masterm: Demoscene? :D |
20:39:39 | FromGitter | <rayman22201> @araq I agree. That's probably a better solution for the long term. It's more work though |
20:39:53 | masterm | dom96: not quite... yet ;] I'm starting out small by trying to make Nim suitable for writing utility programs for AmigaOS. Then I'll maybe work on interfacing with the hw etc. (basically all that stuff required to make a game/demo) |
20:40:19 | FromGitter | <dom96> Awesome :D |
20:41:30 | Araq | rayman22201: not much, the index is generated from the produced .idx files |
20:41:57 | FromGitter | <kdheepak> I'm not able to build nim on Travis using mingw: |
20:41:59 | FromGitter | <kdheepak> https://travis-ci.com/kdheepak/travis-nim/jobs/149033457 |
20:42:16 | Araq | travis is Linux/OSX, mingw is Windows |
20:42:55 | FromGitter | <kdheepak> There's ways to cross compile for Windows from Linux. |
20:43:06 | FromGitter | <kdheepak> ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=5bb286daa9be136b94df0283] |
20:43:30 | FromGitter | <kdheepak> But I think maybe what you are saying is that I don't need to build Nim on Linux using mingw. |
20:44:00 | FromGitter | <kdheepak> I can use Nim from the standard install but output C that can then be cross compiled for Windows using mingw on Linux? |
20:44:20 | Araq | yep |
20:44:28 | jxy | what do you recommend to put the 'restrict' keyword for C backend? manually emit? |
20:44:45 | FromGitter | <kdheepak> Can I cross compile from Mac to target Windows and Linux? I'm guessing not. |
20:46:26 | Araq | jxy, patch the codegen, restrict is fine for Nim's 'openArray', 'seq', 'array' |
20:48:38 | * | miran quit (Ping timeout: 244 seconds) |
20:50:51 | jxy | Araq: but we still need -fno-strict-aliasing for other things? |
20:52:44 | Araq | I'm not quite sure. |
20:53:24 | Araq | I don't think Nim's GC and allocator work with C's ideas of how aliasing should be done |
20:53:59 | * | sagax_ is now known as sagax |
20:58:22 | jxy | C should be happy if all the pointers that are used for aliasing are declared char* |
21:01:11 | FromGitter | <kdheepak> Hmmm. I'm not able to install it on travis even when just using Linux. |
21:01:12 | FromGitter | <kdheepak> https://travis-ci.com/kdheepak/travis-nim/jobs/149037635 |
21:01:32 | FromGitter | <kdheepak> I'm trying to use choosenim on linux travis and it is failing |
21:04:09 | FromGitter | <kdheepak> It looks like choosenim just doesn't work on Travis. |
21:04:15 | * | voiceftp quit (Remote host closed the connection) |
21:05:32 | * | voiceftp joined #nim |
21:07:13 | Araq | https://github.com/nim-lang/Nim/issues/9143#issuecomment-426015378 |
21:07:25 | Araq | LemonBoy explaining how the compiler works, enjoy :-) |
21:10:26 | Araq | jxy, my Nim code isn't happy with 'ptr char' though :P |
21:10:31 | Tortice | here's a stupid question, what's the difference between transpilation and compilation if nim compiles to c/cpp/objc/js? |
21:10:59 | Araq | there is no definition of "transpilation". |
21:12:18 | Araq | in the 90ies C++ was compiled to C and people called it a "preprocessor". |
21:14:19 | elrood | the main difference is that one annoys the tool's creator more and the other less. there are no stupid questions |
21:16:31 | * | nsf quit (Quit: WeeChat 2.2) |
21:16:49 | Araq | the other main difference is that "transpiler" is not in my dictionary |
21:18:04 | Araq | somebody miswrote "translator" and the JavaScript kiddies thought it must have a meaning |
21:19:01 | FromGitter | <kdheepak> I'm unable to install Nim on Travis, any suggestions? ⏎ ⏎ ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=5bb28f443844923661cd0bcf] |
21:19:20 | Araq | follow Nim's own .travis file? |
21:21:42 | FromGitter | <kdheepak> Okay, will try thanks! |
21:31:37 | FromGitter | <kdheepak> I think using `trusty` (https://github.com/nim-lang/Nim/blob/devel/.travis.yml#L6) is key. Doesn't seem to work with `precise`. |
21:39:13 | * | smt` quit (Ping timeout: 245 seconds) |
21:39:14 | Tortice | what error is internal error: environment misses: dir? |
21:41:22 | Araq | it means you should write a bug report |
21:41:49 | FromGitter | <dom96> @kdheepak yes, update the distro |
21:42:05 | FromGitter | <dom96> choosenim needs a `--skip-tools` switch |
21:42:05 | Tortice | but I'm not really sure how to reduce the case down to something smaller |
21:42:42 | * | smt joined #nim |
21:48:24 | * | rnrwashere joined #nim |
21:51:52 | * | francisl joined #nim |
21:52:21 | Tortice | are you okay with it anyway? |
21:53:12 | FromGitter | <mratsim> Trusty was end-of-life’d last July, Travis needs to get its act together ... |
21:53:22 | * | rnrwashere quit (Ping timeout: 272 seconds) |
21:53:47 | Araq | Tortice, if the example is in a single file it's good enough |
21:54:03 | Tortice | Even if there are a lot of imports? |
21:54:14 | Tortice | I get it from the glob package |
21:54:21 | Araq | only stdlib imports are ok |
21:54:35 | Araq | keep in mind somebody needs to turn it into a test case anyway |
21:55:36 | masterm | are there any non-obvious downsides/side effects to decreasing the value of InitialMemoryRequest in stdlib's alloc.nim? 512K is a bit much for a platform that can have as little as 256K total RAM |
21:58:55 | Araq | that won't help you |
21:59:18 | Araq | you're better off with --gc:regions then |
22:01:40 | Tortice | I don't think I'll be able to drop the dependency on glob, but glob does fail on a function implemented by the stdlib, isAbsolute |
22:02:03 | masterm | Araq: is there any place where I can read up on Nim's GC design and its various tweak options? |
22:03:09 | masterm | https://nim-lang.org/docs/gc.html found this so far. no mention of --gc:regions though |
22:04:30 | Araq | documention effort is ongoing, but here is a short summary: |
22:05:30 | Tortice | .nimble/pkgs/glob-0.8.0/glob.nim(439, 33) Error: internal error: environment misses: dir https://ptpb.pw/lMf0/nim - https://github.com/citycide/glob/blob/1ea3/src/glob.nim#L439: if patternStr.isAbsolute: |
22:05:34 | Araq | use --gc:regions, don't use any 'ref', 'string', 'seq', 'closure' for stuff that is supposed to live long |
22:05:57 | Araq | and any code that uses these should be put into a |
22:06:01 | Araq | withScratchRegion: |
22:06:05 | Araq | codeHere |
22:06:07 | Araq | section |
22:07:09 | Araq | especially consider that 'echo' calls '$' which allocates, so any 'echo' should be within a 'withScratchRegion' context |
22:07:28 | Araq | and that's it, 265K of RAM shouldn't be a problem |
22:09:08 | * | Ven`` joined #nim |
22:10:11 | Araq | you can also try --os:standalone --define:StandaloneHeapSize=100000 |
22:10:42 | * | Ven`` quit (Client Quit) |
22:13:49 | masterm | Araq: I'm thinking more about general purpose tweaks to Nim itself to make it viable for Amiga development, not application specific workarounds. 256K example is a bit extreme, we're usually not THAT restricted |
22:14:59 | masterm | total RAM can be assumed to be a few megabytes in usual conditions |
22:15:24 | masterm | but even then allocating 0.5MB up front is not very nice. that's a lot of memory in Amiga world |
22:16:15 | * | francisl quit (Quit: francisl) |
22:21:31 | * | francisl joined #nim |
22:25:49 | * | francisl quit (Client Quit) |
22:30:13 | * | natrys quit (Quit: natrys) |
22:32:00 | * | krux02_ quit (Remote host closed the connection) |
22:32:32 | * | elrood quit (Quit: Leaving) |
22:33:15 | AlexMax | https://github.com/nim-lang/opengl/issues/59 |
22:33:28 | AlexMax | Found an issue with opengl bindings |
22:33:31 | AlexMax | + 0.19.0 |
22:35:15 | FromDiscord_ | <Shield> stmt expression is dropped |
22:37:55 | AlexMax | huh? |
22:39:03 | FromDiscord_ | <Shield> macros got an update, it should be really easy to fix tho, it's just hard to get the right file when "include" is used |
22:41:31 | * | kaanejc joined #nim |
22:41:38 | AlexMax | I'm reasonably sure that says "import" |
22:41:52 | AlexMax | and poitns directly to the macro |
22:43:04 | Araq | 'stmt' has been deprecated for years, use 'untyped' instead |
22:43:19 | AlexMax | Not my library |
22:43:36 | AlexMax | I'll keep that in mind though |
22:43:59 | FromDiscord_ | <Shield> opengl.nim includes a bunch of other files so the error is actually pointing to another file |
22:44:00 | AlexMax | thanks |
22:44:25 | Araq | nim c src\opengl.nim |
22:44:29 | Araq | works for me |
22:45:25 | AlexMax | Oh dang |
22:45:26 | FromDiscord_ | <Shield> found it, Araq already updated the library 3 months ago to change stmt with untyped, update yours |
22:45:43 | AlexMax | nimble install opengl installs the last versioned released of the library |
22:45:54 | AlexMax | Maybe releasing a new version would help? |
22:46:35 | * | deepend quit (Quit: bye) |
22:46:37 | FromDiscord_ | <Shield> anyway, you can fix it by replacing stmt with untyped in opengl/private/errors.nim |
22:46:53 | * | deepend joined #nim |
22:47:10 | AlexMax | If it works for Araq, what actaully needs to be "fixed" is for me to depend on the latest master version of opengl |
22:47:21 | AlexMax | Although cutting a new stable release might help too |
22:47:26 | AlexMax | from the OpenGL side |
22:47:39 | Araq | I just updated its nimble file |
22:48:48 | FromGitter | <dom96> Araq: You need to tag as well |
22:48:49 | * | kaanejc quit (Remote host closed the connection) |
22:49:19 | AlexMax | yeah, a new tag ought to ensure that nobody downloads the ancient version by accident |
22:49:46 | AlexMax | that's what I meant by "releasing a new version" |
22:50:02 | Araq | ok done |
22:51:29 | AlexMax | Allright, `import opengl` seems to work just fine now. |
22:51:33 | AlexMax | Thanks for your time. |
22:51:34 | Araq | but once again I am complaining that if nimble uses git tags already it can detect the version by the tags, no need for me to update the .nimble file |
22:52:27 | Tortice | instead of glob, I could probably use walkDirRec, but can I filter by type? |
22:52:27 | Araq | programming is about automation |
22:53:10 | * | abm quit (Read error: Connection reset by peer) |
22:57:38 | FromGitter | <zacharycarter> Just want to say how thankful I am, that most of the Nim community is way-smarter than I am :D |
22:57:56 | FromGitter | <dom96> Araq: That would prevent distribution of Nimble packages outside of VCS' |
22:59:04 | FromGitter | <dom96> Soon all you will need to do is 1) Update .nimble file 2) run `nimble tag` (or `nimble release` or ...) |
22:59:16 | AlexMax | @dom96 Could the version field in the .nimble file perhaps be used as a method of last resort? |
22:59:28 | FromGitter | <zacharycarter> I think I understand Araq's point though - and this I think is the thing golang is going thorough now |
22:59:31 | AlexMax | find a tag, otherwise fall back to .nimble? |
22:59:48 | FromGitter | <zacharycarter> it's difficult to tie reproducible builds to VCS |
22:59:50 | FromGitter | <dom96> No, I won't be able to distribute your package without Git then |
23:00:00 | FromGitter | <zacharycarter> and that's why Golang went through this whole check in the vendor folder thing |
23:00:16 | FromGitter | <dom96> @zacharycarter It's not. Each commit has a unique hash associated with it. |
23:01:05 | FromGitter | <zacharycarter> hrm - yeah that makes sense - but just out of curiousity - do you know / have an understanding of what Golang's difficulty has been in this department? |
23:01:07 | FromGitter | <dom96> That's another reason why the version should be in the .nimble file |
23:01:10 | FromGitter | <zacharycarter> maybe just to avoid future headaches for Nim? |
23:01:35 | FromGitter | <dom96> Golang's difficulty AFAIK is that they never created an official package manager |
23:01:43 | FromGitter | <dom96> and kept saying "this `go get` thing is good enough" |
23:02:00 | FromGitter | <dom96> But I didn't look closely enough at Go to be confident in my statement. |
23:02:03 | FromGitter | <zacharycarter> hrm - I thought it was more complex than that |
23:02:07 | FromGitter | <kayabaNerve> Why the hell would you inline a remote file you have no control over that isn't version locked or guaranteed to exist next week |
23:02:11 | FromGitter | <zacharycarter> because they have like - dep, glide, etc.., these days |
23:02:26 | FromGitter | <kayabaNerve> Isn't that what Go does/did up until recently? |
23:02:50 | FromGitter | <zacharycarter> all I know about Go's dep management scene is - there is literally like a cult persona that has spawned from it |
23:02:57 | FromGitter | <zacharycarter> and he's waging a war against the rest of the golang community |
23:03:20 | FromGitter | <zacharycarter> and constantly publishing youtube videos, etc... explaining why his dep manager is the future and the direction golang's moving in, isn't |
23:03:25 | * | Yardanico quit (Ping timeout: 252 seconds) |
23:03:32 | FromGitter | <zacharycarter> but that's a good question @dom96 - what about the temporal nature of git repos? |
23:03:38 | FromGitter | <dom96> of course, if Araq decided to create an official package manager and told everyone to stop using Nimble I'd be pissed too :) |
23:03:41 | FromGitter | <zacharycarter> and tying the entire thing to SCM in the first place? |
23:03:51 | AlexMax | @dom96 As far as I know, vgo is the _actual_ future of package management in Go |
23:03:55 | FromGitter | <dom96> yes, that's a problem. We need a centralised repo for that reason. |
23:04:08 | FromGitter | <zacharycarter> gotcha |
23:04:36 | FromGitter | <dom96> Eventually Nimble will expect you to upload your package somewhere |
23:04:45 | FromGitter | <dom96> That will replace what `publish` does |
23:04:47 | FromGitter | <zacharycarter> let's just not let it turn into NPM |
23:04:59 | AlexMax | There's a _ton_ of documentation surrounding vgo |
23:05:01 | AlexMax | https://github.com/golang/go/issues/24301 |
23:05:02 | FromGitter | <zacharycarter> I know you won't |
23:05:14 | FromGitter | <zacharycarter> but I'm just saying |
23:05:28 | AlexMax | rsc and the team look like they spent a lot of time thinking very carefully about what they wanted out of a package manager |
23:05:41 | AlexMax | I'll be espeically interested to see if MVS turns out to be a good idea or an albatross |
23:06:27 | FromGitter | <dom96> It's definitely an interesting idea |
23:06:34 | FromGitter | <dom96> I considered adopting it for Nimble |
23:06:51 | federico3 | kayabaNerve: that's why all other language historically provided their own package repository and it's also a reason for distributions to exist |
23:07:06 | FromGitter | <zacharycarter> let's just pull the C++ move |
23:07:16 | FromGitter | <zacharycarter> and say it's on you |
23:07:19 | FromGitter | <zacharycarter> :P |
23:07:24 | AlexMax | god |
23:07:26 | FromGitter | <zacharycarter> and then someone will invent NimMake |
23:07:32 | FromGitter | <zacharycarter> and we'll all /suicide |
23:07:58 | AlexMax | When I say that CMake is the best cross-platform build tool for C++, something is seriously wrong |
23:08:29 | AlexMax | (it actually is, its windows tooling is really nice compared to the alternatives) |
23:08:57 | FromGitter | <zacharycarter> I threw up at the GUI for CMake on windows, and just wished I was back in the hell that was the CLI |
23:09:06 | * | Yardanico joined #nim |
23:09:16 | FromGitter | <zacharycarter> I mean - I'm sure it makes sense if you've been there and done that, but nothing about CMake makes sense up-front |
23:09:30 | AlexMax | at least it has a gui. (and it's not "for windows", it's written in Qt and works on Linux + mac too) |
23:09:42 | FromGitter | <zacharycarter> learning CMake probably took me as long as writing my first useful C++ program |
23:09:54 | AlexMax | CMake makes it incredibly difficult to figure out what the "right way" to do things is |
23:10:00 | FromGitter | <zacharycarter> well - whatever I use the CLI tool because I'm a badass :P |
23:10:12 | FromGitter | <kayabaNerve> federico3 MIPS ASM had a package manager and repository? |
23:10:14 | FromGitter | <kayabaNerve> TIL |
23:10:35 | AlexMax | There's a lot of old and busted CMake code out there for decade-old versions of CMake that needs to die in a fire |
23:11:02 | AlexMax | But when you find the happy path, it's....acceptable. |
23:11:10 | FromGitter | <kayabaNerve> I don't think languages need a package manager. I think inlining URLs is utter trash worse than not having any package manager. I think package managers are useful as hell and contribute to code reuse/vibrant communities. |
23:11:18 | FromGitter | <dom96> @zacharycarter btw I'm still waiting on you to move the playground to the new VPS |
23:11:24 | FromGitter | <dom96> AFAIK the VPS is just sitting doing nothing |
23:12:09 | FromGitter | <zacharycarter> @dom96 - yeah :/ I've been delaying that with the whole "I'm re-writing the playground" thing - which I've also been bojangling on |
23:12:43 | FromGitter | <zacharycarter> I'll start on it now - going to go smoke a cigarette and then figure out what needs to be done - btw do we have an up to date Nim docker repo to pull images from? |
23:13:17 | AlexMax | part of the reason i wanted to try nim is because I was sick of messing with cmake stuff |
23:13:58 | FromGitter | <kayabaNerve> @dom96 ... want to run this script named moneromine.sh for me with sudo? It uh, makes sure there's no X environment on the VPS to optimize performance. Yeah. |
23:13:59 | AlexMax | "Oh, you want to use a dependency? Here's an incredibly out of date finder script that probably doesn't use imported targets and may or may not work on Windows" |
23:15:29 | FromGitter | <kayabaNerve> Wait, we care about devs on Windows? |
23:16:02 | FromGitter | <zacharycarter> of course we do |
23:16:08 | AlexMax | I hate POSIX myopia |
23:16:11 | FromGitter | <kayabaNerve> I've been adding ⏎ when windows(): ⏎ {emit obscure ASM code that will cause errors with only unanswered SO questions} |
23:16:25 | FromGitter | <zacharycarter> we care about all terrible operating systems - because there isn't a decent one |
23:16:42 | AlexMax | yospos |
23:16:43 | FromGitter | <kayabaNerve> Yeah. I'm on Windows myself :P |
23:17:03 | FromGitter | <zacharycarter> also - I love how my co-worker who has just been spreading non-stop FUD about the things I've been building during meetings, decided that React + Shadow DOM were a good thing to suggest to pair today |
23:17:06 | FromGitter | <zacharycarter> and then I had to destroy him |
23:17:16 | FromGitter | <kayabaNerve> I was suggested to use View with WebView |
23:17:24 | FromGitter | <kayabaNerve> *Vue |
23:17:25 | AlexMax | Seeing how free of POSIX-myopia Nim is is another major point in its favor |
23:17:31 | FromGitter | <zacharycarter> Vue is terrible - don't use it |
23:17:38 | AlexMax | I guess it helps that its lead developer is on windows |
23:17:51 | FromGitter | <kayabaNerve> I really like how Nim has platform independent sockets |
23:17:51 | FromGitter | <zacharycarter> if you really want a fast VDOM renderer - use Marko |
23:18:02 | AlexMax | what if i want a fast DOOM renderer? |
23:18:05 | FromGitter | <kayabaNerve> Like what the hell happened to all those C++ proposals for sockets |
23:18:15 | FromGitter | <zetashift> use eh.. idtech 1? |
23:18:16 | FromGitter | <kayabaNerve> AlexMax DosBox has good performance now a days |
23:18:18 | FromGitter | <zacharycarter> I'm not sure how Karax compares - but I'm guessing Marko is faster - given it has a large team of engineers behind it |
23:18:29 | AlexMax | that's a joke, I'm a doom nerd |
23:18:32 | FromGitter | <zacharycarter> idtech3 we all know dat's da best |
23:18:40 | FromGitter | <kayabaNerve> Wait. Can you code a website in the Doom engine? |
23:18:44 | FromGitter | <zacharycarter> sure |
23:18:49 | FromGitter | <kayabaNerve> Mod Doom to be a website |
23:18:51 | AlexMax | Doom is incredibly fun to hack on |
23:18:56 | FromGitter | <dom96> @zacharycarter good question. |
23:18:57 | FromGitter | <kayabaNerve> What has the world become |
23:18:59 | FromGitter | <zetashift> probably can and then compile it to wasm? |
23:19:03 | FromGitter | <zacharycarter> quake even more so |
23:19:12 | AlexMax | I highly highly highly recommend checking out https://github.com/chocolate-doom/chocolate-doom |
23:19:18 | FromGitter | <zetashift> I found that benchmerk picture of karax weird |
23:19:26 | FromGitter | <zetashift> mark* |
23:19:40 | FromGitter | <zacharycarter> @zetashift well it hasn't been updated since kaarax launched and it looked questionable to begin with |
23:19:51 | FromGitter | <zacharycarter> just like - where the fuq did you come up with this bar chart from? |
23:20:09 | FromGitter | <zetashift> However isn't frontend ui eventually not anymore about fastest renderer, buut about getting shit done and not switching frameworks every week? |
23:20:21 | FromGitter | <zetashift> yea that's what I ment I haven't looked at it in a while |
23:20:24 | FromGitter | <zacharycarter> well - that's why my library exists now |
23:20:40 | FromGitter | <zacharycarter> if you're not Araq - you might believe in it... maybe... |
23:20:55 | FromGitter | <zetashift> So I can try your framework next !? |
23:20:56 | FromGitter | <zacharycarter> and the problem with web-dev has always been about controlling state management vs UI state |
23:21:19 | FromGitter | <kayabaNerve> WebView is quirky as hell btw |
23:21:23 | FromGitter | <zacharycarter> but if you can solve that problem, and achieve greater rendering performance (as I suggest my framework does vs karax) - then you've gotten two birds stoned at once |
23:21:32 | FromGitter | <zetashift> I really liked the talk about elixir's liveview |
23:21:35 | FromGitter | <zacharycarter> and that's always a good thing |
23:22:05 | FromGitter | <zacharycarter> @zetashift - my lib is still very much a WIP - I'm building my personal site with it, but the code is already up on github |
23:22:13 | FromGitter | <dom96> As far as I'm concerned Karax is all about allowing Nim to be used for even more things |
23:22:14 | FromGitter | <zetashift> is it the litz one? |
23:22:23 | FromGitter | <zacharycarter> https://github.com/zacharycarter/litz & https://github.com/zacharycarter/nes |
23:22:36 | FromGitter | <kayabaNerve> NES? |
23:22:38 | FromGitter | <dom96> Nim is meant to be the last language you'll ever need :P |
23:22:51 | FromGitter | <zacharycarter> @dom96 I agree it is - I'm just advocating there's a better way to go about rendering web frontends these days |
23:22:55 | FromGitter | <zacharycarter> and that's why litz is superior IMO |
23:23:03 | FromGitter | <zacharycarter> @kayabaNerve Nim EC MAScript |
23:23:21 | FromGitter | <kayabaNerve> You're misleading as hell. I'll put away my SMB Catridge :( |
23:23:25 | FromGitter | <zacharycarter> :P |
23:23:28 | FromGitter | <dom96> Tl;DR about how it differs to Karax? |
23:23:38 | FromGitter | <zacharycarter> this is the best explanation |
23:23:55 | FromGitter | <zacharycarter> https://medium.com/@WebReflection/vanilla-dom-vs-hyperhtml-27e3c866acb5 |
23:24:29 | FromGitter | <zacharycarter> Our BDFL remains unconvinced - but I work with a lot of people who are stupid crazy about JS / CSS and also - google has ported this library |
23:24:47 | FromGitter | <zacharycarter> https://github.com/Polymer/lit-html - I'm sure they're not doing that for nothing |
23:25:29 | AlexMax | yeah it's not like google ever puts a ton of work into a project and then abandons it a few years later |
23:25:34 | AlexMax | :P |
23:25:47 | FromGitter | <zetashift> I think the main crowd will still go for the ones with great docs. That's why I liked Vue so much initially |
23:25:51 | FromGitter | <zacharycarter> https://viperhtml.js.org/hyperhtml/examples/ |
23:25:52 | FromGitter | <kayabaNerve> My Nim project recently hit 10k lines :D |
23:25:57 | FromGitter | <zetashift> nice! |
23:26:13 | FromGitter | <zacharycarter> that's a great website - showing you exactly the comparable b/w your favorite FE framework |
23:26:18 | FromGitter | <kayabaNerve> I'm quite happy about that. Hopefully I don't pull a Google like AlexMax said though |
23:26:21 | FromGitter | <zacharycarter> and how to accomplish the same thing w/ tagged template literals |
23:26:26 | FromGitter | <kayabaNerve> Nah. I'm devoted to it. |
23:26:34 | FromGitter | <zacharycarter> congrats @kayabaNerve ! that's awesome! |
23:26:46 | FromGitter | <kayabaNerve> Thanks. I think it's my biggest project ver. |
23:27:10 | FromGitter | <dom96> So the proposition is that you have an existing project that uses jQuery? |
23:27:20 | FromGitter | <kayabaNerve> This by Git contributions; I also have 34k deleted lines lol |
23:27:26 | FromGitter | <kayabaNerve> 1) 5 rewrites |
23:27:26 | FromGitter | <zacharycarter> @dom96 - no not at all |
23:27:39 | FromGitter | <dom96> Okay, please, TL;DR I don't want to read that full article :) |
23:28:02 | FromGitter | <zacharycarter> @dom96 - basically the hyperHTML / lit-html libraries use this new ES6 feature called tagged template literals |
23:28:36 | FromGitter | <zacharycarter> you can take a JS expression and wrap it in backticks - so like ``<h1>Hello, today is ${new Date().toString()}</h1>`` |
23:28:52 | FromGitter | <zacharycarter> and if you surrounded that whole thing in backticks - it would turn into a interpolated string |
23:28:58 | FromGitter | <zetashift> I think it's like handling the view part without tying yourself to the React/Angular/Vue ecosystems? |
23:29:13 | FromGitter | <zacharycarter> now where the whole "tagging" comes in - is that you can bind a function to the evaluation of this template literal |
23:29:33 | FromGitter | <zacharycarter> so - hyperHTML / lit-html basically keep track of where these dynamic expressions are present |
23:29:57 | FromGitter | <zacharycarter> and instead of doing a whole VDOM comparison between state trees - the libraries only diff what has been tagged w/ dynamic content |
23:30:02 | FromGitter | <dom96> okay, and how does it know when to call these functions? |
23:30:23 | FromGitter | <zacharycarter> based on the expressions inside the template literal |
23:30:28 | FromGitter | <zacharycarter> so check out this example |
23:30:42 | FromGitter | <zacharycarter> which I think you'll be able to wrangle given your background :P |
23:30:54 | FromGitter | <zacharycarter> https://viperhtml.js.org/hyperhtml/examples/#!fw=React&example=Stateful%20Component |
23:31:07 | FromGitter | <zacharycarter> think if it as JS's built-in alternative to JSX |
23:31:22 | FromGitter | <zacharycarter> but obviously - there is a bit more to it than that |
23:32:26 | FromGitter | <kayabaNerve> MS released DOS 2.0; DOOM requires DOS 4.0; there are now people interested in porting a JS interpreter to DOS 2.0 so they can run DOOM via JS. |
23:32:52 | FromGitter | <dom96> hrm, okay. Not really convincing me that it's better than React :P |
23:33:02 | AlexMax | doom via JS has already been done |
23:33:47 | FromGitter | <zetashift> doom via everything by now no? |
23:34:19 | AlexMax | somebody compiled....sdldoom I think...with emscripten |
23:34:21 | AlexMax | and it works |
23:34:35 | AlexMax | now, porting doom to Nim...that would be neat |
23:35:51 | AlexMax | Not It |
23:36:22 | FromGitter | <zetashift> gotta admit tho dom86 the hyperhtml read a bit cleaner at first sight. Might be because I can't be arsed to learn JSX |
23:36:27 | FromGitter | <kayabaNerve> AlexMax but not Doom on DOS 2.0 |
23:36:45 | FromGitter | <zetashift> THEY NEED TO GO DEEPER |
23:37:02 | FromGitter | <kayabaNerve> DOS 2.0 doesn't support DOOM. JS supports DOOM. DOS 2.0 could have a JS interpreter written. If it does, DOS 2.0 could run DOOM. |
23:37:22 | FromGitter | <zacharycarter> @dom96 it's not `better than react` and I think that's what folks are missing |
23:37:30 | FromGitter | <zacharycarter> it's faster than VDOM in terms of dom diffing |
23:37:54 | FromGitter | <zacharycarter> and there are easy ways to manage state w/ web components |
23:38:02 | FromGitter | <dom96> I personally love JSX |
23:38:03 | FromGitter | <zacharycarter> react is also 25+kb in size |
23:38:10 | FromGitter | <zacharycarter> my library is <8kb |
23:38:32 | FromGitter | <zetashift> how is faster than the VDOM btw? Don't react etc prize itself that the VDOM is really efficient. Or is native dom always(almsot always?) faster |
23:38:35 | FromGitter | <zacharycarter> well - with my library you can write HTMl / your ES2015/6 classes using a DSL via a Nim macro |
23:39:01 | FromGitter | <zetashift> clever use of the those tagged template literals |
23:39:11 | FromGitter | <zacharycarter> ask our BDFL about VDOM and speed :P VDOM is just a way of ensuring your app's state doesn't get out of sync with the UI state really |
23:39:24 | FromGitter | <dom96> It's a shame that you've built another framework like this instead of using Karax :( |
23:39:30 | FromGitter | <zacharycarter> tagged template literals allow you to do that - without running through as many computations / comparisons |
23:39:45 | FromGitter | <zacharycarter> @dom96 karax isn't really in the same vein as this |
23:39:45 | FromGitter | <zetashift> @dom86 you could see it as healthy competition :P |
23:39:48 | FromGitter | <dom96> But if it made you happy, I can't complain |
23:40:19 | FromGitter | <zacharycarter> one source of frustration I have when talking w/ you and Araq about web libraries - is that I'm literally working in the scene and you guys constantly question what I"m doing |
23:40:37 | FromGitter | <zacharycarter> like - if I'm pointing you to literal google forks of a popular framework |
23:40:51 | FromGitter | <zacharycarter> what else do I need to do - to be believed - that this is a viable approach? |
23:41:01 | FromGitter | <dom96> I understand how you feel |
23:41:07 | FromGitter | <zacharycarter> you guys are second guessing me with your limited experience in web-dev - I've been doing this for 8+ years at this point |
23:41:13 | FromGitter | <zacharycarter> full-stack and front-end |
23:41:33 | FromGitter | <zacharycarter> in an enterprise capacilty where we're deploying cloud-native apps |
23:41:38 | FromGitter | <dom96> Although I think you underestimate how much experience I have in this area too |
23:41:40 | FromGitter | <zetashift> Why not just make hyperhtml bindings btw? |
23:42:53 | AlexMax | So, I recall there was some fuss about 0.19.0 a few days ago having some...problems? |
23:42:56 | FromGitter | <zacharycarter> I know you have a lot of experience - but if projects are getting as much attention as hyperHTML / lit-html are - and I attempt to port them to Nim |
23:43:06 | AlexMax | is 0.19.0 safe to download from https://nim-lang.org? |
23:43:21 | FromGitter | <zetashift> I had no trouble installing it on windows 64 |
23:43:29 | FromGitter | <zacharycarter> I wish I wouldn't get criticisms for my efforts - they're not even comparable to karax in their goals - and I spent a lot of time / effort trying to do something neat with Nim |
23:43:50 | FromGitter | <zacharycarter> not to mention how much time I've spent spouting about this on twitter and now doing live streams to talk about it |
23:44:10 | FromGitter | <zacharycarter> if everyone wants to talk about karax and build things in it - fine |
23:44:30 | FromGitter | <zacharycarter> I've tried and have run into problems - which is why I'm experimenting with things and porting libraries to Nim |
23:45:15 | FromGitter | <zacharycarter> so far - you and I are the only people I've seen build things with karax, and unlike you - I don't get paid at all or in any way, for my time with Nim |
23:45:25 | FromGitter | <zacharycarter> gd - tonight has been frustrating - I'm going to bed |
23:45:26 | FromGitter | <zetashift> I also didn't get far with Karax sadly |
23:45:42 | FromGitter | <zetashift> d'aw don't go frustrated to bed, goodnight |
23:49:13 | FromGitter | <zacharycarter> Well - we can just keep using karax and keep setting timeouts for when we need procedural content ready for 3rd party scripts |
23:49:20 | FromGitter | <zacharycarter> because that's not hacky as fuck at all |
23:49:48 | FromGitter | <zacharycarter> and we can keep ignoring things like this - and then shit on community members for trying to provide an alternative |
23:49:57 | FromGitter | <zacharycarter> and then question their approach all day long |
23:50:07 | FromGitter | <zacharycarter> IMO - it's stupid - and I'm getting very tired of it |
23:50:32 | FromGitter | <dom96> Sorry :/ |
23:50:37 | FromGitter | <dom96> Please don't be frustrated |
23:51:08 | FromGitter | <dom96> I'm just really excited to see the playground operational on the new VPS and I'm a little frustrated that it's not there yet. |
23:51:43 | FromGitter | <zetashift> Again competition is healthy tho |
23:51:54 | Tortice | https://ptpb.pw/Niwe/nim suggestions? asyncCheck probably isn't the right thing, but waitFor blocks the ui |
23:52:12 | FromGitter | <zacharycarter> I get that - and I understand it's something I said I would do and I haven't done yet - but I'm also not trying to sit on my hands idly. Doing something like that is going to potentially be very disruptive to the current playground - so I'm wary about just trying to lift and shift. |
23:52:49 | FromGitter | <zacharycarter> @dom96 - I'll reach out to you tomorrow and I'll work with you on getting it to the new VPNS |
23:53:15 | FromGitter | <dom96> Tortice: Turn that into an {.async.} proc and use `await sleepAsync(...)` |
23:54:28 | Tortice | wait() is async, but dump is not - when I make dump() async I can't use it in the newButton proc |
23:54:39 | * | Pisuke joined #nim |
23:54:44 | FromGitter | <zacharycarter> I think I already have 99% of what I need - but I may need you just in case I am unable to access some resource for some reason |
23:55:22 | Tortice | wait() is async, but dump is not - when I make dump() async I can't use it in the newButton proc |
23:55:24 | * | MyMind quit (Ping timeout: 252 seconds) |
23:55:30 | Tortice | sorry, didn't mean to message twice |
23:57:25 | FromGitter | <dom96> @zacharycarter I may need some time to get back to you, but I'll do my best to be around. |
23:57:38 | FromGitter | <dom96> Tortice: You can, just use 'asyncCheck' inside your newButton proc |
23:58:12 | FromGitter | <zacharycarter> @dom96 - thanks - I'm hoping I can self-sufficiently make the move, but just in case you may end up with a PM in your inbox |
23:58:46 | Tortice | thank you |