<< 01-10-2018 >>

00:24:22leorizeTortice: on which line?
00:26:07*stefanos82 quit (Quit: Quitting for now...)
00:28:42leorizeTortice: createThread takes a `var Thread`. You need a variable to store Thread[T] first
00:29:30leorizeand also, Thread[TArg] is a generic, it takes type name, not literal.
00:32:29FromGitter<kayabaNerve> Speaking of Threads, anyone here know about channels?
00:35:07FromGitter<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:53FromGitter<kayabaNerve> The second shouldn't be needed though.....
00:37:13shashlickI used channels in snip
00:37:17shashlickhttps://github.com/genotrance/snip/blob/master/src/snip/key.nim
00:43:10FromGitter<kayabaNerve> shashlick: You used a global though.
00:44:47FromGitter<kayabaNerve> NVM. I got it.
00:47:16*PrimHelios joined #nim
00:48:56*vlad1777d quit (Ping timeout: 252 seconds)
00:49:32shashlickWell 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:49FromGitter<zacharycarter> evening all
01:26:31FromGitter<kayabaNerve> Evening American
01:26:39FromGitter<zacharycarter> :P
01:26:54*tyler569 left #nim (#nim)
01:31:03FromGitter<zacharycarter> this website is pretty sweet - https://github.com/amiechen/stitches-template-generator - if you're using the tailwindcss framework
01:33:15FromGitter<zacharycarter> well - this is the website: https://stitches.hyperyolo.com/
01:34:43FromGitter<kayabaNerve> Holy
01:36:13FromGitter<zacharycarter> ?
01:36:34FromGitter<kayabaNerve> That's useful as hell
01:36:37FromGitter<zacharycarter> right?
01:36:43FromGitter<zacharycarter> well tailwindcss is really nice
01:36:45FromGitter<zacharycarter> IMO
01:36:47FromGitter<zacharycarter> all postcss
01:36:56FromGitter<zacharycarter> and that website makes building a HTML UI with it stupid easy
01:37:01FromGitter<kayabaNerve> @zacharycarter Build my site?
01:37:15FromGitter<zacharycarter> haha - let me finish mine first
01:37:19FromGitter<zacharycarter> also the new playground frontend
01:37:37FromGitter<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:50FromGitter<kayabaNerve> But I'll pay YOU in exposure
01:37:53FromGitter<zacharycarter> lol
01:38:08FromGitter<zacharycarter> yeah I LOVE web dev /sarcasm
01:39:42FromGitter<kayabaNerve> I see we have a verbal agreement.
01:39:46FromGitter<zacharycarter> hahaha
01:40:04FromGitter<kayabaNerve> I'll report you to the BBB for fraud if you don't follow through for free now
01:40:48FromGitter<zacharycarter> well good look with that haha - the BBB is turrible
01:41:08FromGitter<zacharycarter> they care about as much as the businesses that they get complaints about
01:43:37FromGitter<kayabaNerve> Side note: BBB is a centralized entity that means nothing and their rating system is flawed as hell
01:43:51FromGitter<kayabaNerve> Yeah. Just looking articles of whether or not you could literally buy the off
01:44:07FromGitter<kayabaNerve> There's a paid membership but no pay X to remove Y and get rating Z
01:45:21FromGitter<zacharycarter> yeah - you're pretty much screwed as a consumer from my experience, if you're treated wrong
01:45:34FromGitter<zacharycarter> your best option is just to not do business with whatever entity screwed you
01:46:03FromGitter<kayabaNerve> I don't bother to check or interact with the BBB
01:46:06FromGitter<kayabaNerve> Social Media FTW
01:47:42FromGitter<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:16FromGitter<dom96> @vivekimsit
02:14:39FromGitter<dom96> Nimble test only runs tests beginning with ‘t’ in file name
02:15:50FromGitter<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:40FromGitter<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:57FromGitter<zacharycarter> and apologies ahead of time if the answer is super obvious and I'm just being dense
02:23:50FromGitter<dom96> How else could it work? You want nimble to git pull every time you compile?
02:26:31FromGitter<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:17FromGitter<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:20FromGitter<dom96> If you want to depend on a local path then you currently need to configure nim to do that
02:27:29FromGitter<zacharycarter> okay
02:27:31FromGitter<dom96> I.e use —path
02:28:11FromGitter<zacharycarter> I think maybe this is something that nimble or something else could potentially support?
02:28:15*pullinghairoutwi joined #nim
02:29:04FromGitter<dom96> But only if they’re all distinct packages
02:29:09FromGitter<zacharycarter> they are
02:29:16FromGitter<dom96> You can also import with relative paths
02:29:24FromGitter<zacharycarter> yeah - but that's ugly
02:29:36FromGitter<zacharycarter> I want them to actually be nimble dependencies
02:29:49FromGitter<zacharycarter> I just want them to be local dependencies - while I'm developing them
02:30:24FromGitter<zacharycarter> I know nimble is not NPM - but NPM will allow you to specify local packages on your machine
02:30:31FromGitter<zacharycarter> which I've found to be a nice feature in the past
02:32:18FromGitter<dom96> Yes. Nimble will eventually support this use case
02:33:14FromGitter<zacharycarter> Yay!
02:33:18FromGitter<zacharycarter> that is awesome!
02:33:37FromGitter<zacharycarter> Nimble keeps getting better! and I keep finding less and less reason to use it
02:34:24FromGitter<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:26FromGitter<dom96> Great :)
02:36:43FromGitter<zacharycarter> @dom96 - you may like this tool - https://github.com/amiechen/stitches-template-generator
02:37:04FromGitter<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:46FromGitter<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:09FromGitter<kaushalmodi> The stitches site
03:03:59FromGitter<zacharycarter> it's not supposed to @kaushalmodi
03:04:08FromGitter<zacharycarter> at least I don't think it's intended to
03:04:41FromGitter<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:53FromGitter<zacharycarter> and then it spits out HTML / Functional CSS using the tailwind library
03:05:04FromGitter<zacharycarter> and you can also clone the repo itself - and change the templates to your liking
03:05:26FromGitter<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:48FromGitter<kayabaNerve> How can I do this: ⏎ ⏎ type top ⏎ proc `sub.handle` ⏎ ... [https://gitter.im/nim-lang/Nim?at=5bb1a9c45331811c2e2f7979]
05:00:33FromGitter<kayabaNerve> The last line only works with ` around sub.handle
05:00:43FromGitter<kayabaNerve> It doesn't trigger as a template
05:00:53FromGitter<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:00FromGitter<mratsim> @kayabaNerve uh, is that Klingon? :P no what are you trying to do?
07:14:08FromGitter<kayabaNerve> @mratsim I have a RPC class which is divided into modules
07:14:48FromGitter<kayabaNerve> `type RPC = ref object of RootObj` ⏎ ⏎ That said, the modules aren't actual objects.
07:15:17FromGitter<kayabaNerve> If they were, they couldn't access the data in the RPC without having a ref to the parent.
07:15:49FromGitter<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:04FromGitter<kayabaNerve> But an RPC type and a proc named: ⏎ ⏎ ````.module.handle```` [https://gitter.im/nim-lang/Nim?at=5bb1c9ef3844923661c8062d]
07:17:18FromGitter<kayabaNerve> (or really, ``` `module.handle` ```)
07:17:37FromGitter<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:03FromGitter<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:47FromGitter<mratsim> just use a module template that is a no-op
07:45:00FromGitter<mratsim> and define handle
07:45:23FromGitter<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:58FromGitter<kayabaNerve> @krux02 Yeah. I ended up changing it to just module() before @mratsim askked.
08:14:16FromGitter<kayabaNerve> @mratsim Interesting idea
08:14:35FromGitter<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:56FromGitter<narimiran> tell me what you think, if something needs to be added, etc.
08:15:15FromGitter<kayabaNerve> @mratsim I have multiple modules though.
08:16:30FromGitter<mratsim> maybe tou can do something with typedesc
08:16:33FromGitter<mratsim> you*
08:17:02FromGitter<mratsim> so that module returns a typedesc + something, and then handle accepts that typedesc = something
08:25:33FromGitter<codenoid> UwU should be for everyone
08:27:29FromGitter<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:00FromGitter<mratsim> typedesc are compile-time only, no perf issue
08:28:11FromGitter<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:53FromGitter<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:25ZevvAnd then what happened?
08:55:19*kr quit (Remote host closed the connection)
08:56:19PMunchkomuw, I think you're reading it wrong
08:57:01PMunchWith --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:00PMunchSo if you want to do that you need a machine or VM with Linux running.
08:58:06PMunchHowever 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:54PMunchThat's the second part of the "Cross compilation" section of the compiler guide you linked
08:58:58*Guest81972 joined #nim
08:59:07PMunch@komuw^
08:59:41Zevv"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:33FromGitter<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:27PMunchYes, it is output in the nimcache directory
09:09:15FromGitter<narimiran> @komuw try `~/.cache/nim`
09:09:38PMunchAaah, so that's where it is
09:09:55PMunchI know it had moved, but couldn't figure out where
09:10:33PMunchSo yeah either look in ~/.cache/nim or use --nimpath:<somepath> to create the files somewhere specific
09:13:17ZevvIt used to be ./nimcache
09:14:45FromGitter<narimiran> anybody has any comments on the hacktoberfest gist i posted earlier?
09:15:08FromGitter<komuw> thanks guys
09:18:20PMunchnarimiran, looks good
09:18:44PMunchI prefer my lists with capital letters though
09:19:12FromGitter<narimiran> thanks PMunch!
09:19:33FromGitter<narimiran> oh, i remember you changing the case in the lists in Nim Basics :D
09:19:58FromGitter<narimiran> i usually see lower-case in the wild, and it is my preference too
09:20:39*vlad1777d joined #nim
09:22:41PMunchIf you need any help, the Nim community is very welcoming.
09:24:03PMunch"Ask a question in Nim's IRC Channel on Freenode (#nim),"
09:24:31PMunch", Nim's room on Gitter or the Nim Telegram group and somebody will help you."
09:24:39PMunchJust some simple spelling things
09:24:59PMunch"For example, in the tables module what is missing is:"
09:25:31FromGitter<narimiran> thanks, will fix this ASAP
09:31:15FromGitter<narimiran> 'hacktoberfest AT nim'? is 'at' ok? is maybe 'with' better? or something else?
09:31:19*leru joined #nim
09:32:09PMunchYeah 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:38FromGitter<gogolxdong> Anyone can help me to build a text edit field with nimnuklear? Haven't got the point from the calculator demo.
10:01:13FromGitter<zacharycarter> I can try later toda
10:01:15FromGitter<zacharycarter> today*
10:01:34FromGitter<zacharycarter> I just finished working on the logo for my site - and I need to head to work shortly
10:01:35FromGitter<zacharycarter> https://codepen.io/zacharycarter/pen/BqNmwP
10:02:59FromGitter<Bennyelg> looks fantastic
10:03:27FromGitter<gogolxdong> cool
10:04:30FromGitter<zacharycarter> thank you!
10:04:53FromGitter<gogolxdong> relevant snippet as follows : ⏎ ⏎ ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=5bb1f145600c5f642337df7d]
10:05:42FromGitter<gogolxdong> I think key lies between these lines.
10:10:40FromGitter<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:47FromGitter<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:12Torticestill 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:59Torticeadding {.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:47FromDiscord_<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:10TorticeI'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:46FromDiscord_<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:13FromDiscord_<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:24FromDiscord_<Shield> createThread takes a thread var, a proc name, and the args, like createThread(t, some_func, (arg1 = 10, arg2 = 20...))
10:55:47FromDiscord_<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:25FromGitter<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:38Torticethanks
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:55FromDiscord_<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:02TorticeI'd be interested in hearing it
11:37:24FromGitter<mratsim> use async for your UI
11:38:46FromDiscord_<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:56FromDiscord_<Shield> yourFunc can be a closure iterator, or use pollingMainLoop with async functions like mratsim pointed
11:40:45FromDiscord_<Shield> instead of sleeping, just measure time and skip your logic whenever you don't want to update yet
11:42:11FromDiscord_<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:29TorticeIf I take the threaded/channel approach, should var t: Thread[tuple[Entry, Entry, string, Label]] work?
12:04:55Araqunlikely
12:05:15AraqEntry and Label are refs iirc and would be deepcopied to the thread
12:05:39Araqbut maybe, if the refs only wrap a 'ptr' it can work :-)
12:07:28*francisl quit (Quit: francisl)
12:07:44Torticealright, thanks and sorry for all the very dumb questions
12:08:45Araqcheckout tools\downloader.nim which uses a UI with an async downloader
12:08:58Araqit never got production ready but it's a start
12:09:19Araqit uses ui.pollingMainLoop
12:10:31elroodmeh, windowzers and their escaped first directory name characters..
12:12:06*cei joined #nim
12:12:44Araqhttps://stackoverflow.com/questions/17666316/is-there-a-posix-function-to-copy-a-file
12:13:39Araqstupid 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:48Araq:P
12:16:09elroodat least it's a kind of technically informed and insightful arrogance, if still fundamentally misguided in its conclusions
12:16:46AraqC: vs B: vs A: reflecting physical drives, some of which might be pluggable is also technically informed
12:17:12Araqand pretending you can "mount" them everywhere is a highly dubious abstraction
12:18:27Araqthe names could be longer than a single letter tough, but then Unix cannot use more than 3 letters either, usr, etc
12:19:06elroodto 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:37Araqvery true but 'ui' is not part of nim's core
12:20:48Araqand 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:20anamokhi
12:28:47PMunchHi
12:29:14*cei quit (Quit: ChatZilla 0.9.93 [Waterfox 56.2.3/20180912152046])
12:29:31anamokHow 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:47Yardanico## your doc comment
12:30:15Yardanicohttps://nim-lang.org/docs/docgen.html#introduction-documentation-comments
12:30:23*francisl joined #nim
12:30:23elroodAraq, 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:30anamokCould you send me a link to a project that uses it and I could see it in action?
12:30:46anamokOK, I see your link now
12:31:42Yardanicowell doc comments are used almost in every nim library :)
12:31:45Yardanicoand in stdlib as well
12:32:34FromGitter<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:21Araqhttps://nim-lang.org/docs/asyncnet.html is ok, though slightly hard to find :-)
12:34:13elroodneither hard to find nor sufficient, imho
12:34:41Araqit never is "sufficient", you can fill books about this topic alone
12:36:04Araqbut we should have an article about async linked directly from the website
12:36:27Torticecould I just use an asyncSleep?
12:37:25Torticenope, still blocks
12:37:26anamoknarimiran: thanks, very useful
12:42:21FromGitter<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:42FromGitter<Quelklef> Ah fuck that doesn't make sense because then it can't resolve the `f` cll
12:42:50FromGitter<Quelklef> I gotta use dynamic dispatch then
12:42:52FromGitter<Quelklef> thanks everyone
12:44:51FromGitter<alehander42> doesn't `X | Y` work here
12:45:34FromGitter<Quelklef> I don't think so, because `x` needs to have a concrete type, right
12:45:35FromGitter<Quelklef> ?
12:45:43FromGitter<Quelklef> It'll work for generic functions but not otherwise
12:46:26*floppydh quit (Read error: Connection reset by peer)
12:47:01FromGitter<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:33FromGitter<Quelklef> I don't know the type of `x` till runtime
12:47:33FromGitter<Quelklef> I think
12:47:35*floppydh joined #nim
12:47:38FromGitter<Quelklef> Wait, this might work...?
12:47:50FromGitter<Quelklef> What I'm trying to do is roughly something like:
12:48:26FromGitter<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:42FromGitter<zetashift> Why wouldn't you want to use a Variant btw curious about that
12:48:52FromGitter<Quelklef> Not really, but point being that I start with X values and then switch to Y values part the way through
12:49:07FromGitter<Quelklef> So the compiler cannot derive that it's one or the other
12:49:53FromGitter<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:15FromGitter<zetashift> ah okay I didn't know there was an overhead
12:50:15FromGitter<Quelklef> Are variants faster?
12:50:21FromGitter<Quelklef> I mean I imagine there is
12:50:41FromGitter<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:48kobi7Hi guys
12:55:09FromGitter<Quelklef> howdy
12:55:48kobi7I 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:26kobi7excuse me, only the subtypes
12:56:32FromGitter<Quelklef> You mean, like, do something based on what subtype it is?
12:57:09kobi7proc takesSome[T](val:T) where T inherits X
12:57:39*thomasross__ joined #nim
12:57:45kobi7is there syntax to support this?
12:57:59FromGitter<Quelklef> oh like `<T extends P>` in Java?
12:58:08kobi7yes, exactly
12:58:14FromGitter<Quelklef> I don't think thats supported
12:58:20Araqproc foo[T: P](x: T)
12:58:37kobi7Thank you, Araq!
12:58:41*thomasross_ quit (Remote host closed the connection)
12:58:46kobi7so just a colon?
12:58:53Araqyeah
12:58:54FromGitter<Quelklef> Oh, I thought that was only for typeclasses?
12:58:55FromGitter<Quelklef> cool
12:59:02kobi7cool, thanks
12:59:13Araqa type is also a typeclass in this context
12:59:39anamokIn 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:01Araqnah :-)
13:00:29Araq--skipTests would be cool to add
13:01:10anamokI 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:47FromGitter<narimiran> anamok: use the regular example `.. code-block:: nim` instead of `runnableExamples`?
13:01:59anamokok, thanks
13:02:09Araqoh yeah, good point
13:02:23Araqrunnable examples should be runnable.
13:02:46kobi7Araq, when I write T, can I specify it as a ref object, or a simple object (stack vs heap) ?
13:02:59Araqbtw Python's input() is readLineFromStdin
13:03:21Araqkobi7, that depends on your code
13:03:22kobi7like saying, acceptOnlyStructs(T:stackObj)
13:03:41Araqproc g[T: object](x: T)
13:03:50*francisl quit (Quit: francisl)
13:04:03kobi7I 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:12Nolan[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:11leorize`pointer`
13:58:01Nolan[m]OK, so `pointer` it is. Thanks, I thought pointers were "safe" and as such GC'd.
13:58:30leorizeonly `ref`s are
13:59:33Nolan[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:33FromGitter<Bennyelg> ```code paste, see link``` ⏎ ⏎ any familiar ? [https://gitter.im/nim-lang/Nim?at=5bb22cb91c100a4f29151b7b]
14:26:06FromGitter<Bennyelg> How Do I declare on proc and implement it later in the code ?
14:26:43FromDiscord_<Shield> forward declaration
14:27:02FromGitter<Bennyelg> Thanks
14:27:36FromDiscord_<Shield> "proc foo(args..) {pragmas..}"
14:28:03FromGitter<narimiran> @Bennyelg see here: https://narimiran.github.io/nim-basics/#_forward_declaration
14:49:16FromGitter<Bennyelg> 👍
14:51:17copygirlWould something like `Result[T, MyFirstError | MySecondError]` possible with Nim?
14:52:19*rnrwashere joined #nim
14:52:30copygirlIf 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:40Torticewould 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:01anamokI'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:27anamokIs it a bug?
15:10:33*rnrwashere joined #nim
15:14:24anamok`<span class="DecNumber">224459</span>` is inserted in the HTML
15:14:29*rnrwashere quit (Remote host closed the connection)
15:16:36FromDiscord_<Shield> works fine on nim 0.19.0
15:18:46mirananamok: this shouldn't happen :/
15:19:09FromDiscord_<Shield> hold on, it does happen with your exact case
15:19:33anamokit did :( Even if I rename the var variable.
15:21:28*elrood joined #nim
15:24:14anamokI copied the source here: https://pastebin.com/siYdqxCm
15:24:43mirananamok: how do you create docs?
15:24:46FromDiscord_<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:18miranif this can be reproduced for some other templates, this should definitely be reported
15:26:13FromDiscord_<Shield> yeah it is a problem with templates, I imagine it'll be the same for macros, it should be reported
15:26:49FromGitter<kaushalmodi> anamok: I confirm the bug
15:26:59FromGitter<kaushalmodi> Please open an issue for it
15:27:27FromGitter<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:54mirancan confirm, was able to recreate
15:30:30anamokok, will open an issue
15:30:32anamokthanks
15:34:22*adelrune left #nim (#nim)
15:39:30anamokthe ticket is here: https://github.com/nim-lang/Nim/issues/9143
15:39:53*rnrwashere joined #nim
15:44:37elroodholy 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:14miranelrood: link?
15:47:26FromGitter<kaushalmodi> elrood: https://github.com/nim-lang/Nim/blob/2e5c759736a9458b192a3beb2cf3a38b2f198887/.travis.yml#L55-L66 😎
15:47:48FromGitter<kaushalmodi> Each devel branch commit updates https://nim-lang.github.io/Nim/
15:48:02FromGitter<kaushalmodi> It's one of the lesser advertised recent features
15:48:58FromGitter<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:32FromGitter<kaushalmodi> From my checks *all* external/internal links (except the source/edit links) have been confirmed to be 100% working
15:50:16copygirlMhh, also, is it possible to constrict types in generic functions, and if so how?
15:51:01elroodyup, missed that. it works on local files, but i'll have a look
15:51:15copygirl`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:37FromGitter<kaushalmodi> miran: https://github.com/nim-lang/Nim/tree/gh-pages
15:51:49*a_chou joined #nim
15:51:51miranthanks
15:52:52copygirlOh 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:15anamokbye
16:05:42*anamok quit (Quit: Leaving)
16:09:53elroodkaushalmodi, 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:22FromGitter<kaushalmodi> elrood: why would it not be alright for me? :)
16:21:35FromGitter<kaushalmodi> we are both working to make the nim docs broken-link-free
16:21:37FromGitter<kaushalmodi> :)
16:22:57*darithorn joined #nim
16:23:12FromGitter<kaushalmodi> as an aside ptpb.pw is much *much* better than pastebin.. completely spam free
16:24:56FromGitter<kaushalmodi> elrood: So that does that 400 error mean? https://ptpb.pw/hczq/text#L-2272
16:25:19FromGitter<kaushalmodi> I can access it fine
16:26:15FromGitter<kaushalmodi> may be the nimble.directory server is misconfigured?
16:39:01elroodkaushalmodi, 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:04federico3kaushalmodi: 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:11FromGitter<kaushalmodi> federico3: what's the context?
16:47:32FromGitter<kaushalmodi> if that ptpb.pw link, it's the log created by elrood's script
16:47:39federico3nimble.directory
16:48:01FromGitter<kaushalmodi> see elrood's response above
16:48:13FromGitter<kaushalmodi> I don't understand "HEAD request" :P
16:48:28FromGitter<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:55elroodkaushalmodi, you're in good company, that server doesn't either ;P see https://en.wikipedia.org/wiki/Hypertext_Transfer_Protocol#Request_methods
16:51:03federico3hm, I guess it's missing in Jester
16:51:41FromGitter<kaushalmodi> elrood: :)
16:51:52*rnrwashere joined #nim
16:52:50*maedoxBb quit (Killed (Sigyn (Spam is off topic on freenode.)))
16:53:15FromGitter<kaushalmodi> nim forum gives a different error code
16:53:25FromGitter<kaushalmodi> ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=5bb25104271506518d9fc60a]
16:54:02FromGitter<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:26elroodfeel free to bug dom96 about it, i'm sure he'll be delighted
16:54:37FromGitter<dom96> Oh cool. We've got devel docs now?
16:54:38FromGitter<kaushalmodi> @dom96 ^
16:54:44FromGitter<kaushalmodi> now?!
16:54:50FromGitter<kaushalmodi> they have been there forever! :P
16:55:00FromGitter<kaushalmodi> forever meaning last month or so
16:55:01FromGitter<kaushalmodi> :)
16:55:10FromGitter<dom96> Huh
16:55:20elroodso, for a day? ;)
16:55:29FromGitter<dom96> We should point some nim-lang.org URL at them
16:55:45FromGitter<dom96> HEAD not working with jester is a known bug
16:56:01FromGitter<kaushalmodi> elrood: the gh-pages branch will only hold the last commit
16:56:14FromGitter<dom96> Shouldn't 502 though. That's odd.
16:56:31*rnrwashere quit (Ping timeout: 260 seconds)
16:56:31FromGitter<kaushalmodi> I intentionally make it not store older commits.. to prevent unnecessary bulk in the repo
16:56:48FromGitter<kaushalmodi> .. else over time gh-pages branch would bloat up the Nim repo
16:57:02*natrys joined #nim
16:57:12federico3kaushalmodi: where are they stored?
16:57:21FromGitter<kaushalmodi> so if you look at gh-pages commit history, it would always be around the time last commit to devel happened
16:57:27FromGitter<dom96> That's awesome. Great job @kaushalmodi
16:57:38FromGitter<kaushalmodi> federico3: gh-pages is in the same Nim repo
16:57:39FromGitter<dom96> Need to advertise it more ;)
16:57:54FromGitter<kaushalmodi> if you clone the Nim repo and checkout gh-pages, you get the docs latest as of then
16:57:55FromGitter<dom96> IMO the docs should have a version switcher
16:58:02FromGitter<kaushalmodi> (no need to do koch docs locally then)
16:58:16FromGitter<dom96> A little bit of Nim in the browser could have the logic for that
16:58:38FromGitter<dom96> Perfect hacktober opportunity ;)
16:58:38FromGitter<kaushalmodi> @dom96 about the version switcher, I agree, though only for the releases, right?
16:59:41federico3https://github.com/nim-lang/Nim/issues/2492 dom96 kaushalmodi like this?
17:00:23miranbtw, @dom96 have you seen my hacktoberfest article PR?
17:00:35FromGitter<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:01FromGitter<kaushalmodi> I like the idea of a `http://nim-lang.org/docs/devel` URL
17:01:23FromGitter<kaushalmodi> @dom96 it's super easy to set 200 redirect form that URL to `https://nim-lang.github.io/Nim`
17:02:12FromGitter<arnetheduck> likewise for `http://nim-lang.org/docs/0.19` - ie I'd hope that the switcher isn't too smart :)
17:03:10elroodkaushalmodi, 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:34federico3arnetheduck, kaushalmodi: shall we reopen the bug?
17:11:41FromGitter<kaushalmodi> federico3: yes, reopening that bug makes sense as it wasn't ever technically solved
17:12:09FromGitter<kaushalmodi> @dom96 : see about question about reopening that #2492 bug
17:12:44FromGitter<kaushalmodi> elrood: there are other ways to generate devel docs too (I have Netlify in mind)
17:13:02FromGitter<kaushalmodi> but not sure if Araq or dom96 would be open for that
17:13:46FromGitter<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:50FromGitter<dom96> Yes. That's the devel URL I had in mind.
17:14:00FromGitter<dom96> We already have docs in separate dirs
17:14:12FromGitter<dom96> They're just not under the 'docs' dir
17:15:05FromGitter<kaushalmodi> about the devel, you would need to set up 200 code redirect
17:15:26FromGitter<kaushalmodi> so that `http://nim-lang.org/docs/devel/*` mirrors `https://nim-lang.github.io/Nim/*`
17:15:38FromGitter<dom96> Hrm? Why reopen that?
17:16:04FromGitter<dom96> nim-lang.org/0.18.0/
17:16:22FromGitter<dom96> Yay. Permissions
17:16:27FromGitter<kaushalmodi> hehe
17:16:29FromGitter<kaushalmodi> yeah 403
17:16:49federico3and there is no way to discover versioned docs
17:17:08FromGitter<kaushalmodi> reopen so that https://nim-lang.org/docs/latest redirects to https://nim-lang.org/docs/0.19.0
17:17:30FromGitter<kaushalmodi> and similarly https://nim-lang.org/docs/0.18.0 and docs for other versions work too
17:17:47FromGitter<kaushalmodi> https://nim-lang.org/docs/ should list devel/, latest/, 0.19.0/, etc links
17:18:17FromGitter<kaushalmodi> looking at the URL, people should know what version docs they are readig
17:18:22FromGitter<kaushalmodi> s/readig/reading
17:18:58FromGitter<kaushalmodi> motivation: https://docs.python.org/3/tutorial/index.html
17:19:17FromGitter<kaushalmodi> see that dropdown on top-left
17:20:52federico3kaushalmodi: 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:03FromGitter<dom96> federico3: yes, that's why I think we need a visible switcher
17:28:51FromGitter<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:11FromGitter<kaushalmodi> dom96: why would old docs need to be updated
17:29:18FromGitter<dom96> to include the version switcher
17:29:19FromGitter<kaushalmodi> all docs are relatively linked
17:29:23FromGitter<kaushalmodi> ah
17:29:36FromGitter<kaushalmodi> may be JS can do some magic here?
17:29:40FromGitter<kaushalmodi> (I don't know JS)
17:30:00FromGitter<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:51FromGitter<dom96> yeah, JS can certainly do it
17:33:07FromGitter<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:42FromGitter<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:42FromGitter... [https://gitter.im/nim-lang/Nim?at=5bb25b2ae6090c0c3b4c9cbe]
17:37:26FromGitter<dom96> The C compilation is a no-op
17:37:33FromGitter<dom96> The Nim compiler still parses everything
17:37:37FromGitter<dom96> That part isn't incremental yet
17:38:41*papa_lazzarou quit (Remote host closed the connection)
17:40:05FromGitter<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:02FromGitter<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:58elroodpeople 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:18fvshowto> var a: char = ''
17:45:45*francisl quit (Quit: francisl)
17:46:52miranfvs: you can do just `var a: char`
17:47:12stefanos82elrood: 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:20Araqadam-r-kowalski: https://github.com/nim-lang/Nim/issues/7874
17:49:28Araqit's actively being worked on
17:50:28fvsmiran: thanks. pity :(
17:50:40miranfvs: why pity?
17:51:30fvsvar a: int = 1
17:54:01copygirlHey Araq, are there generic constraints? Or what are they called so I can look them up?
17:54:17miranfvs: well, you can do `var a: char = 'a'`
17:55:02miranjust as you can do `var a: int` and a will be 0
17:55:47copygirlFor example a function `proc doError[Err](..., proc (): Err) where Err: Exception
17:55:52fvsmakes sense now, thanks
17:56:00copygirlMh missed the ending backtick.
17:56:00miranwith `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:30Araqcopygirl, as you wrote it
17:56:51Araqproc doError[Err: CatchableError](...): proc (): Err
17:59:57FromGitter<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:57FromGitter... 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:24copygirlAraq: What is it called? Where can I look up more on it?
18:00:33Araq"generic constraints"
18:00:46Araqthough tbh I don't know if that's the heading the manual uses
18:00:57FromGitter<adam-r-kowalski> @Araq, I’m glad it’s being worked on
18:01:29FromGitter<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:30copygirlThanks!
18:01:52Araqadam: that's what Nim does under the hood then, yes
18:02:57elroodcompilation 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:22elroodand yes, nim could and should improve here, it's a relatively low-hanging fruit actually
18:04:57Araqit 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:01FromGitter<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:35miranonce 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:12elroodadam-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:54FromGitter<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:47FromGitter<kdheepak> Thanks @kaushalmodi will do.
18:19:06FromGitter<Vindaar> @miran: something like this? ⏎ ⏎ ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=5bb2651aa9be136b94de28e2]
18:20:44FromGitter<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:44FromGitter... 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:30miran@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:48mirani was reusing `ar` name, and it was unknown inside of the block
18:22:03FromGitter<Vindaar> I've never used that, but you just reminded me that this should actually be possible. Pretty neat! :)
18:23:18miran@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:00FromGitter<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:03stefanos82@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:32FromGitter<dom96> in ~/.choosenim/toolchains
18:41:40*SenasOzys__ quit (Ping timeout: 246 seconds)
18:43:08FromGitter<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:38FromGitter<kdheepak> This is what the isMainModule looks like. ⏎ ⏎ ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=5bb26adaae7be94016e76d36]
18:45:30FromGitter<dom96> `when isMainModule and appType != "lib":`
18:45:31FromGitter<dom96> Might work
18:46:03FromGitter<dom96> Strange that `appType` is a string
18:53:05*rnrwashere joined #nim
18:54:12*SenasOzys__ joined #nim
18:55:40FromGitter<arnetheduck> federico3 good archeology there, 2015! :)
18:56:40FromGitter<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:59FromGitter<kdheepak> That seems to work @dom96 Thanks!
18:57:12FromGitter<kaushalmodi> @arnetheduck it should redirect to a version specific page
18:57:22FromGitter<kaushalmodi> so user can bookmark that version-specific page
18:57:51*rnrwashere quit (Ping timeout: 260 seconds)
18:58:16FromGitter<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:19FromGitter<kaushalmodi> if someone wants to bookmark the url with "latest/" they can always edit the URL in bookmarks to do that
18:58:33FromGitter<kaushalmodi> I can see there are pros/cons to both URLs
18:58:44FromGitter<kaushalmodi> I might want to see exactly what I bookmarked
18:58:55FromGitter<kaushalmodi> and someone might want to see the latest of what they bookmarked
18:58:59FromGitter<kaushalmodi> there's no right or wrong
18:59:57FromGitter<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:13FromGitter<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:07FromGitter<kaushalmodi> https://docs.python.org/ redirects to https://docs.python.org/3/
19:01:30FromGitter<kaushalmodi> then when you click on "Library Reference", you get: https://docs.python.org/3/library/index.html
19:01:40FromGitter<arnetheduck> yeah, because py2 & 3 are different languages.. but it doesn't put you at `3.7`
19:01:44FromGitter<kaushalmodi> so if someone bookmarks that, they have frozen the URL to python3
19:02:32FromGitter<mratsim> @adam-r-kowalski I want to be able to do every data science related tasks in Nim.
19:02:33FromGitter<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:23FromGitter<kaushalmodi> I am not a web dev.. but looks like Python has a good doc URL model
19:03:38FromGitter<kaushalmodi> may be Nim uses that same model?
19:04:19FromGitter<mratsim> Python uses Sphinx which is RST based, which is also Nim default structured text format.
19:04:25FromGitter<dom96> Unless `latest` means `devel` it's not useful
19:04:35FromGitter<mratsim> I prefer markdown but well, we should take advantage of that
19:04:35FromGitter<dom96> https://nim-lang.org/docs/ is already `latest`
19:04:44FromGitter<dom96> And `devel` shouldn't redirect indeed.
19:05:19FromGitter<arnetheduck> `latest` usually means latest released version, whereas `devel` usually means.. uh.. `devel`
19:05:22FromGitter<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:35FromGitter<kaushalmodi> I don't think that has any bad SEO implication
19:05:44FromGitter<kaushalmodi> sorry, take that back
19:05:53FromGitter<kaushalmodi> I got confused in my suggestion :P
19:06:06FromGitter<arnetheduck> @kaushalmodi check out https://www.google.com/search?hl=en&q=cmake%20install
19:06:10FromGitter<kaushalmodi> I had suggested 200 redirects earlier, and that probably has bad SEO implication
19:06:37FromGitter<arnetheduck> first link is to cmake 3.0 - they're at 3.12 now...
19:07:12FromGitter<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:30FromGitter<kaushalmodi> and python is doing something right: https://www.google.com/search?q=python+library+reference
19:08:49FromGitter<dom96> Yeah, we probably should move our docs to a `docs` subdomain
19:08:57FromGitter<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:24FromGitter<kaushalmodi> from my brief static site gen experience, only 301 redirects are considered deprecated
19:09:38FromGitter<kaushalmodi> so they 301 redirect source URL will not be indexed
19:10:32Torticewhat'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:14FromGitter<dom96> alternative in what way?
19:12:28FromGitter<dom96> or for what?
19:12:32Torticenon blocking
19:12:41Torticenvm, that's really dumb
19:12:42Torticesorry
19:15:34*nsf joined #nim
19:16:30FromGitter<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:08miran@dom96: have you seen https://github.com/nim-lang/website/pull/107 ?
19:30:22FromGitter<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:42FromGitter<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:06Torticewhen I try making my proc async I get Error: internal error: environment misses: dir
19:34:08FromDiscord_<Shield> lol
19:34:33*rnrwashere quit (Remote host closed the connection)
19:39:13FromGitter<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:13FromGitter... 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:24FromGitter<kaushalmodi> @rayman22201 Can you open an issue so that we can track this?
19:40:34FromGitter<rayman22201> yeah
19:40:50FromGitter<kaushalmodi> need to also create a test case for this I'd believe
19:42:48FromGitter<rayman22201> another interesting problem. How do you create automated tests for a search function?
19:48:36Torticehttps://ptpb.pw/qUKL/nim Error: internal error: environment misses: dir
19:49:27FromGitter<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:42FromGitter<kaushalmodi> during test, you'd do the same and diff the expected vs generated index file
19:50:08FromGitter<kaushalmodi> See the nimdoc tester: https://github.com/nim-lang/Nim/blob/devel/nimdoc/tester.nim
19:50:38FromGitter<kaushalmodi> actually it does create the doc and index :P
19:51:09FromGitter<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:39FromGitter<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:34FromGitter<rayman22201> just testing the output of the index.html isn't enough
19:59:50FromGitter<Varriount> Oh, hi Ray.
20:00:02FromGitter<Varriount> Doing more search stuff?
20:03:20FromGitter<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:05FromGitter<rayman22201> software has no bugs if nobody uses it :-P
20:06:12FromGitter<Varriount> If nobody observes a bug, does it actually exist?
20:06:39FromGitter<Varriount> Schrodinger's Bug. 😋
20:12:50FromGitter<rayman22201> @kaushalmodi
20:12:51FromGitter<rayman22201> https://github.com/nim-lang/Nim/issues/9147
20:13:12FromGitter<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:13FromGitter<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:26FromGitter<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:34Araqrayman22201, we should consider to generate a different index for the search
20:27:47Araqthere is no reason the search must use theindex.html
20:28:01*junkmechanicFd quit (Remote host closed the connection)
20:28:11mastermhello. 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:16mastermwhere should I start poking?
20:29:27mastermI'm skimming through alloc.nim right now but it's quite a hefty file
20:30:38*rdorschyS joined #nim
20:31:47FromGitter<dom96> @arnetheduck stdlib conflict? lol
20:33:54Araqmasterm, gc_common.nim has deallocHeap, run this at process exit with an atexit handler (addQuitProc)
20:34:47AraqaddQuitProc 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:31mastermAraq: I'll try that, thanks!
20:38:14FromGitter<dom96> masterm: Demoscene? :D
20:39:39FromGitter<rayman22201> @araq I agree. That's probably a better solution for the long term. It's more work though
20:39:53mastermdom96: 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:19FromGitter<dom96> Awesome :D
20:41:30Araqrayman22201: not much, the index is generated from the produced .idx files
20:41:57FromGitter<kdheepak> I'm not able to build nim on Travis using mingw:
20:41:59FromGitter<kdheepak> https://travis-ci.com/kdheepak/travis-nim/jobs/149033457
20:42:16Araqtravis is Linux/OSX, mingw is Windows
20:42:55FromGitter<kdheepak> There's ways to cross compile for Windows from Linux.
20:43:06FromGitter<kdheepak> ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=5bb286daa9be136b94df0283]
20:43:30FromGitter<kdheepak> But I think maybe what you are saying is that I don't need to build Nim on Linux using mingw.
20:44:00FromGitter<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:20Araqyep
20:44:28jxywhat do you recommend to put the 'restrict' keyword for C backend? manually emit?
20:44:45FromGitter<kdheepak> Can I cross compile from Mac to target Windows and Linux? I'm guessing not.
20:46:26Araqjxy, patch the codegen, restrict is fine for Nim's 'openArray', 'seq', 'array'
20:48:38*miran quit (Ping timeout: 244 seconds)
20:50:51jxyAraq: but we still need -fno-strict-aliasing for other things?
20:52:44AraqI'm not quite sure.
20:53:24AraqI 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:22jxyC should be happy if all the pointers that are used for aliasing are declared char*
21:01:11FromGitter<kdheepak> Hmmm. I'm not able to install it on travis even when just using Linux.
21:01:12FromGitter<kdheepak> https://travis-ci.com/kdheepak/travis-nim/jobs/149037635
21:01:32FromGitter<kdheepak> I'm trying to use choosenim on linux travis and it is failing
21:04:09FromGitter<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:13Araqhttps://github.com/nim-lang/Nim/issues/9143#issuecomment-426015378
21:07:25AraqLemonBoy explaining how the compiler works, enjoy :-)
21:10:26Araqjxy, my Nim code isn't happy with 'ptr char' though :P
21:10:31Torticehere's a stupid question, what's the difference between transpilation and compilation if nim compiles to c/cpp/objc/js?
21:10:59Araqthere is no definition of "transpilation".
21:12:18Araqin the 90ies C++ was compiled to C and people called it a "preprocessor".
21:14:19elroodthe 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:49Araqthe other main difference is that "transpiler" is not in my dictionary
21:18:04Araqsomebody miswrote "translator" and the JavaScript kiddies thought it must have a meaning
21:19:01FromGitter<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:20Araqfollow Nim's own .travis file?
21:21:42FromGitter<kdheepak> Okay, will try thanks!
21:31:37FromGitter<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:14Torticewhat error is internal error: environment misses: dir?
21:41:22Araqit means you should write a bug report
21:41:49FromGitter<dom96> @kdheepak yes, update the distro
21:42:05FromGitter<dom96> choosenim needs a `--skip-tools` switch
21:42:05Torticebut 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:21Torticeare you okay with it anyway?
21:53:12FromGitter<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:47AraqTortice, if the example is in a single file it's good enough
21:54:03TorticeEven if there are a lot of imports?
21:54:14TorticeI get it from the glob package
21:54:21Araqonly stdlib imports are ok
21:54:35Araqkeep in mind somebody needs to turn it into a test case anyway
21:55:36mastermare 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:55Araqthat won't help you
21:59:18Araqyou're better off with --gc:regions then
22:01:40TorticeI 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:03mastermAraq: is there any place where I can read up on Nim's GC design and its various tweak options?
22:03:09mastermhttps://nim-lang.org/docs/gc.html found this so far. no mention of --gc:regions though
22:04:30Araqdocumention effort is ongoing, but here is a short summary:
22:05:30Tortice.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:34Araquse --gc:regions, don't use any 'ref', 'string', 'seq', 'closure' for stuff that is supposed to live long
22:05:57Araqand any code that uses these should be put into a
22:06:01AraqwithScratchRegion:
22:06:05Araq codeHere
22:06:07Araqsection
22:07:09Araqespecially consider that 'echo' calls '$' which allocates, so any 'echo' should be within a 'withScratchRegion' context
22:07:28Araqand that's it, 265K of RAM shouldn't be a problem
22:09:08*Ven`` joined #nim
22:10:11Araqyou can also try --os:standalone --define:StandaloneHeapSize=100000
22:10:42*Ven`` quit (Client Quit)
22:13:49mastermAraq: 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:59mastermtotal RAM can be assumed to be a few megabytes in usual conditions
22:15:24mastermbut 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:15AlexMaxhttps://github.com/nim-lang/opengl/issues/59
22:33:28AlexMaxFound an issue with opengl bindings
22:33:31AlexMax+ 0.19.0
22:35:15FromDiscord_<Shield> stmt expression is dropped
22:37:55AlexMaxhuh?
22:39:03FromDiscord_<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:38AlexMaxI'm reasonably sure that says "import"
22:41:52AlexMaxand poitns directly to the macro
22:43:04Araq'stmt' has been deprecated for years, use 'untyped' instead
22:43:19AlexMaxNot my library
22:43:36AlexMaxI'll keep that in mind though
22:43:59FromDiscord_<Shield> opengl.nim includes a bunch of other files so the error is actually pointing to another file
22:44:00AlexMaxthanks
22:44:25Araq nim c src\opengl.nim
22:44:29Araqworks for me
22:45:25AlexMaxOh dang
22:45:26FromDiscord_<Shield> found it, Araq already updated the library 3 months ago to change stmt with untyped, update yours
22:45:43AlexMaxnimble install opengl installs the last versioned released of the library
22:45:54AlexMaxMaybe releasing a new version would help?
22:46:35*deepend quit (Quit: bye)
22:46:37FromDiscord_<Shield> anyway, you can fix it by replacing stmt with untyped in opengl/private/errors.nim
22:46:53*deepend joined #nim
22:47:10AlexMaxIf it works for Araq, what actaully needs to be "fixed" is for me to depend on the latest master version of opengl
22:47:21AlexMaxAlthough cutting a new stable release might help too
22:47:26AlexMaxfrom the OpenGL side
22:47:39AraqI just updated its nimble file
22:48:48FromGitter<dom96> Araq: You need to tag as well
22:48:49*kaanejc quit (Remote host closed the connection)
22:49:19AlexMaxyeah, a new tag ought to ensure that nobody downloads the ancient version by accident
22:49:46AlexMaxthat's what I meant by "releasing a new version"
22:50:02Araqok done
22:51:29AlexMaxAllright, `import opengl` seems to work just fine now.
22:51:33AlexMaxThanks for your time.
22:51:34Araqbut 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:27Torticeinstead of glob, I could probably use walkDirRec, but can I filter by type?
22:52:27Araqprogramming is about automation
22:53:10*abm quit (Read error: Connection reset by peer)
22:57:38FromGitter<zacharycarter> Just want to say how thankful I am, that most of the Nim community is way-smarter than I am :D
22:57:56FromGitter<dom96> Araq: That would prevent distribution of Nimble packages outside of VCS'
22:59:04FromGitter<dom96> Soon all you will need to do is 1) Update .nimble file 2) run `nimble tag` (or `nimble release` or ...)
22:59:16AlexMax@dom96 Could the version field in the .nimble file perhaps be used as a method of last resort?
22:59:28FromGitter<zacharycarter> I think I understand Araq's point though - and this I think is the thing golang is going thorough now
22:59:31AlexMaxfind a tag, otherwise fall back to .nimble?
22:59:48FromGitter<zacharycarter> it's difficult to tie reproducible builds to VCS
22:59:50FromGitter<dom96> No, I won't be able to distribute your package without Git then
23:00:00FromGitter<zacharycarter> and that's why Golang went through this whole check in the vendor folder thing
23:00:16FromGitter<dom96> @zacharycarter It's not. Each commit has a unique hash associated with it.
23:01:05FromGitter<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:07FromGitter<dom96> That's another reason why the version should be in the .nimble file
23:01:10FromGitter<zacharycarter> maybe just to avoid future headaches for Nim?
23:01:35FromGitter<dom96> Golang's difficulty AFAIK is that they never created an official package manager
23:01:43FromGitter<dom96> and kept saying "this `go get` thing is good enough"
23:02:00FromGitter<dom96> But I didn't look closely enough at Go to be confident in my statement.
23:02:03FromGitter<zacharycarter> hrm - I thought it was more complex than that
23:02:07FromGitter<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:11FromGitter<zacharycarter> because they have like - dep, glide, etc.., these days
23:02:26FromGitter<kayabaNerve> Isn't that what Go does/did up until recently?
23:02:50FromGitter<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:57FromGitter<zacharycarter> and he's waging a war against the rest of the golang community
23:03:20FromGitter<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:32FromGitter<zacharycarter> but that's a good question @dom96 - what about the temporal nature of git repos?
23:03:38FromGitter<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:41FromGitter<zacharycarter> and tying the entire thing to SCM in the first place?
23:03:51AlexMax@dom96 As far as I know, vgo is the _actual_ future of package management in Go
23:03:55FromGitter<dom96> yes, that's a problem. We need a centralised repo for that reason.
23:04:08FromGitter<zacharycarter> gotcha
23:04:36FromGitter<dom96> Eventually Nimble will expect you to upload your package somewhere
23:04:45FromGitter<dom96> That will replace what `publish` does
23:04:47FromGitter<zacharycarter> let's just not let it turn into NPM
23:04:59AlexMaxThere's a _ton_ of documentation surrounding vgo
23:05:01AlexMaxhttps://github.com/golang/go/issues/24301
23:05:02FromGitter<zacharycarter> I know you won't
23:05:14FromGitter<zacharycarter> but I'm just saying
23:05:28AlexMaxrsc 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:41AlexMaxI'll be espeically interested to see if MVS turns out to be a good idea or an albatross
23:06:27FromGitter<dom96> It's definitely an interesting idea
23:06:34FromGitter<dom96> I considered adopting it for Nimble
23:06:51federico3kayabaNerve: that's why all other language historically provided their own package repository and it's also a reason for distributions to exist
23:07:06FromGitter<zacharycarter> let's just pull the C++ move
23:07:16FromGitter<zacharycarter> and say it's on you
23:07:19FromGitter<zacharycarter> :P
23:07:24AlexMaxgod
23:07:26FromGitter<zacharycarter> and then someone will invent NimMake
23:07:32FromGitter<zacharycarter> and we'll all /suicide
23:07:58AlexMaxWhen I say that CMake is the best cross-platform build tool for C++, something is seriously wrong
23:08:29AlexMax(it actually is, its windows tooling is really nice compared to the alternatives)
23:08:57FromGitter<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:16FromGitter<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:30AlexMaxat least it has a gui. (and it's not "for windows", it's written in Qt and works on Linux + mac too)
23:09:42FromGitter<zacharycarter> learning CMake probably took me as long as writing my first useful C++ program
23:09:54AlexMaxCMake makes it incredibly difficult to figure out what the "right way" to do things is
23:10:00FromGitter<zacharycarter> well - whatever I use the CLI tool because I'm a badass :P
23:10:12FromGitter<kayabaNerve> federico3 MIPS ASM had a package manager and repository?
23:10:14FromGitter<kayabaNerve> TIL
23:10:35AlexMaxThere'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:02AlexMaxBut when you find the happy path, it's....acceptable.
23:11:10FromGitter<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:18FromGitter<dom96> @zacharycarter btw I'm still waiting on you to move the playground to the new VPS
23:11:24FromGitter<dom96> AFAIK the VPS is just sitting doing nothing
23:12:09FromGitter<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:43FromGitter<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:17AlexMaxpart of the reason i wanted to try nim is because I was sick of messing with cmake stuff
23:13:58FromGitter<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:59AlexMax"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:29FromGitter<kayabaNerve> Wait, we care about devs on Windows?
23:16:02FromGitter<zacharycarter> of course we do
23:16:08AlexMaxI hate POSIX myopia
23:16:11FromGitter<kayabaNerve> I've been adding ⏎ when windows(): ⏎ {emit obscure ASM code that will cause errors with only unanswered SO questions}
23:16:25FromGitter<zacharycarter> we care about all terrible operating systems - because there isn't a decent one
23:16:42AlexMaxyospos
23:16:43FromGitter<kayabaNerve> Yeah. I'm on Windows myself :P
23:17:03FromGitter<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:06FromGitter<zacharycarter> and then I had to destroy him
23:17:16FromGitter<kayabaNerve> I was suggested to use View with WebView
23:17:24FromGitter<kayabaNerve> *Vue
23:17:25AlexMaxSeeing how free of POSIX-myopia Nim is is another major point in its favor
23:17:31FromGitter<zacharycarter> Vue is terrible - don't use it
23:17:38AlexMaxI guess it helps that its lead developer is on windows
23:17:51FromGitter<kayabaNerve> I really like how Nim has platform independent sockets
23:17:51FromGitter<zacharycarter> if you really want a fast VDOM renderer - use Marko
23:18:02AlexMaxwhat if i want a fast DOOM renderer?
23:18:05FromGitter<kayabaNerve> Like what the hell happened to all those C++ proposals for sockets
23:18:15FromGitter<zetashift> use eh.. idtech 1?
23:18:16FromGitter<kayabaNerve> AlexMax DosBox has good performance now a days
23:18:18FromGitter<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:29AlexMaxthat's a joke, I'm a doom nerd
23:18:32FromGitter<zacharycarter> idtech3 we all know dat's da best
23:18:40FromGitter<kayabaNerve> Wait. Can you code a website in the Doom engine?
23:18:44FromGitter<zacharycarter> sure
23:18:49FromGitter<kayabaNerve> Mod Doom to be a website
23:18:51AlexMaxDoom is incredibly fun to hack on
23:18:56FromGitter<dom96> @zacharycarter good question.
23:18:57FromGitter<kayabaNerve> What has the world become
23:18:59FromGitter<zetashift> probably can and then compile it to wasm?
23:19:03FromGitter<zacharycarter> quake even more so
23:19:12AlexMaxI highly highly highly recommend checking out https://github.com/chocolate-doom/chocolate-doom
23:19:18FromGitter<zetashift> I found that benchmerk picture of karax weird
23:19:26FromGitter<zetashift> mark*
23:19:40FromGitter<zacharycarter> @zetashift well it hasn't been updated since kaarax launched and it looked questionable to begin with
23:19:51FromGitter<zacharycarter> just like - where the fuq did you come up with this bar chart from?
23:20:09FromGitter<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:21FromGitter<zetashift> yea that's what I ment I haven't looked at it in a while
23:20:24FromGitter<zacharycarter> well - that's why my library exists now
23:20:40FromGitter<zacharycarter> if you're not Araq - you might believe in it... maybe...
23:20:55FromGitter<zetashift> So I can try your framework next !?
23:20:56FromGitter<zacharycarter> and the problem with web-dev has always been about controlling state management vs UI state
23:21:19FromGitter<kayabaNerve> WebView is quirky as hell btw
23:21:23FromGitter<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:32FromGitter<zetashift> I really liked the talk about elixir's liveview
23:21:35FromGitter<zacharycarter> and that's always a good thing
23:22:05FromGitter<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:13FromGitter<dom96> As far as I'm concerned Karax is all about allowing Nim to be used for even more things
23:22:14FromGitter<zetashift> is it the litz one?
23:22:23FromGitter<zacharycarter> https://github.com/zacharycarter/litz & https://github.com/zacharycarter/nes
23:22:36FromGitter<kayabaNerve> NES?
23:22:38FromGitter<dom96> Nim is meant to be the last language you'll ever need :P
23:22:51FromGitter<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:55FromGitter<zacharycarter> and that's why litz is superior IMO
23:23:03FromGitter<zacharycarter> @kayabaNerve Nim EC MAScript
23:23:21FromGitter<kayabaNerve> You're misleading as hell. I'll put away my SMB Catridge :(
23:23:25FromGitter<zacharycarter> :P
23:23:28FromGitter<dom96> Tl;DR about how it differs to Karax?
23:23:38FromGitter<zacharycarter> this is the best explanation
23:23:55FromGitter<zacharycarter> https://medium.com/@WebReflection/vanilla-dom-vs-hyperhtml-27e3c866acb5
23:24:29FromGitter<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:47FromGitter<zacharycarter> https://github.com/Polymer/lit-html - I'm sure they're not doing that for nothing
23:25:29AlexMaxyeah it's not like google ever puts a ton of work into a project and then abandons it a few years later
23:25:34AlexMax:P
23:25:47FromGitter<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:51FromGitter<zacharycarter> https://viperhtml.js.org/hyperhtml/examples/
23:25:52FromGitter<kayabaNerve> My Nim project recently hit 10k lines :D
23:25:57FromGitter<zetashift> nice!
23:26:13FromGitter<zacharycarter> that's a great website - showing you exactly the comparable b/w your favorite FE framework
23:26:18FromGitter<kayabaNerve> I'm quite happy about that. Hopefully I don't pull a Google like AlexMax said though
23:26:21FromGitter<zacharycarter> and how to accomplish the same thing w/ tagged template literals
23:26:26FromGitter<kayabaNerve> Nah. I'm devoted to it.
23:26:34FromGitter<zacharycarter> congrats @kayabaNerve ! that's awesome!
23:26:46FromGitter<kayabaNerve> Thanks. I think it's my biggest project ver.
23:27:10FromGitter<dom96> So the proposition is that you have an existing project that uses jQuery?
23:27:20FromGitter<kayabaNerve> This by Git contributions; I also have 34k deleted lines lol
23:27:26FromGitter<kayabaNerve> 1) 5 rewrites
23:27:26FromGitter<zacharycarter> @dom96 - no not at all
23:27:39FromGitter<dom96> Okay, please, TL;DR I don't want to read that full article :)
23:28:02FromGitter<zacharycarter> @dom96 - basically the hyperHTML / lit-html libraries use this new ES6 feature called tagged template literals
23:28:36FromGitter<zacharycarter> you can take a JS expression and wrap it in backticks - so like ``<h1>Hello, today is ${new Date().toString()}</h1>``
23:28:52FromGitter<zacharycarter> and if you surrounded that whole thing in backticks - it would turn into a interpolated string
23:28:58FromGitter<zetashift> I think it's like handling the view part without tying yourself to the React/Angular/Vue ecosystems?
23:29:13FromGitter<zacharycarter> now where the whole "tagging" comes in - is that you can bind a function to the evaluation of this template literal
23:29:33FromGitter<zacharycarter> so - hyperHTML / lit-html basically keep track of where these dynamic expressions are present
23:29:57FromGitter<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:02FromGitter<dom96> okay, and how does it know when to call these functions?
23:30:23FromGitter<zacharycarter> based on the expressions inside the template literal
23:30:28FromGitter<zacharycarter> so check out this example
23:30:42FromGitter<zacharycarter> which I think you'll be able to wrangle given your background :P
23:30:54FromGitter<zacharycarter> https://viperhtml.js.org/hyperhtml/examples/#!fw=React&example=Stateful%20Component
23:31:07FromGitter<zacharycarter> think if it as JS's built-in alternative to JSX
23:31:22FromGitter<zacharycarter> but obviously - there is a bit more to it than that
23:32:26FromGitter<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:52FromGitter<dom96> hrm, okay. Not really convincing me that it's better than React :P
23:33:02AlexMaxdoom via JS has already been done
23:33:47FromGitter<zetashift> doom via everything by now no?
23:34:19AlexMaxsomebody compiled....sdldoom I think...with emscripten
23:34:21AlexMaxand it works
23:34:35AlexMaxnow, porting doom to Nim...that would be neat
23:35:51AlexMaxNot It
23:36:22FromGitter<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:27FromGitter<kayabaNerve> AlexMax but not Doom on DOS 2.0
23:36:45FromGitter<zetashift> THEY NEED TO GO DEEPER
23:37:02FromGitter<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:22FromGitter<zacharycarter> @dom96 it's not `better than react` and I think that's what folks are missing
23:37:30FromGitter<zacharycarter> it's faster than VDOM in terms of dom diffing
23:37:54FromGitter<zacharycarter> and there are easy ways to manage state w/ web components
23:38:02FromGitter<dom96> I personally love JSX
23:38:03FromGitter<zacharycarter> react is also 25+kb in size
23:38:10FromGitter<zacharycarter> my library is <8kb
23:38:32FromGitter<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:35FromGitter<zacharycarter> well - with my library you can write HTMl / your ES2015/6 classes using a DSL via a Nim macro
23:39:01FromGitter<zetashift> clever use of the those tagged template literals
23:39:11FromGitter<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:24FromGitter<dom96> It's a shame that you've built another framework like this instead of using Karax :(
23:39:30FromGitter<zacharycarter> tagged template literals allow you to do that - without running through as many computations / comparisons
23:39:45FromGitter<zacharycarter> @dom96 karax isn't really in the same vein as this
23:39:45FromGitter<zetashift> @dom86 you could see it as healthy competition :P
23:39:48FromGitter<dom96> But if it made you happy, I can't complain
23:40:19FromGitter<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:37FromGitter<zacharycarter> like - if I'm pointing you to literal google forks of a popular framework
23:40:51FromGitter<zacharycarter> what else do I need to do - to be believed - that this is a viable approach?
23:41:01FromGitter<dom96> I understand how you feel
23:41:07FromGitter<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:13FromGitter<zacharycarter> full-stack and front-end
23:41:33FromGitter<zacharycarter> in an enterprise capacilty where we're deploying cloud-native apps
23:41:38FromGitter<dom96> Although I think you underestimate how much experience I have in this area too
23:41:40FromGitter<zetashift> Why not just make hyperhtml bindings btw?
23:42:53AlexMaxSo, I recall there was some fuss about 0.19.0 a few days ago having some...problems?
23:42:56FromGitter<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:06AlexMaxis 0.19.0 safe to download from https://nim-lang.org?
23:43:21FromGitter<zetashift> I had no trouble installing it on windows 64
23:43:29FromGitter<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:50FromGitter<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:10FromGitter<zacharycarter> if everyone wants to talk about karax and build things in it - fine
23:44:30FromGitter<zacharycarter> I've tried and have run into problems - which is why I'm experimenting with things and porting libraries to Nim
23:45:15FromGitter<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:25FromGitter<zacharycarter> gd - tonight has been frustrating - I'm going to bed
23:45:26FromGitter<zetashift> I also didn't get far with Karax sadly
23:45:42FromGitter<zetashift> d'aw don't go frustrated to bed, goodnight
23:49:13FromGitter<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:20FromGitter<zacharycarter> because that's not hacky as fuck at all
23:49:48FromGitter<zacharycarter> and we can keep ignoring things like this - and then shit on community members for trying to provide an alternative
23:49:57FromGitter<zacharycarter> and then question their approach all day long
23:50:07FromGitter<zacharycarter> IMO - it's stupid - and I'm getting very tired of it
23:50:32FromGitter<dom96> Sorry :/
23:50:37FromGitter<dom96> Please don't be frustrated
23:51:08FromGitter<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:43FromGitter<zetashift> Again competition is healthy tho
23:51:54Torticehttps://ptpb.pw/Niwe/nim suggestions? asyncCheck probably isn't the right thing, but waitFor blocks the ui
23:52:12FromGitter<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:49FromGitter<zacharycarter> @dom96 - I'll reach out to you tomorrow and I'll work with you on getting it to the new VPNS
23:53:15FromGitter<dom96> Tortice: Turn that into an {.async.} proc and use `await sleepAsync(...)`
23:54:28Torticewait() 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:44FromGitter<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:22Torticewait() 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:30Torticesorry, didn't mean to message twice
23:57:25FromGitter<dom96> @zacharycarter I may need some time to get back to you, but I'll do my best to be around.
23:57:38FromGitter<dom96> Tortice: You can, just use 'asyncCheck' inside your newButton proc
23:58:12FromGitter<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:46Torticethank you