<< 12-12-2018 >>

00:17:47*NimBot joined #nim
00:21:06*d10n-work joined #nim
00:34:47*fthe quit (Remote host closed the connection)
00:35:11*fthe joined #nim
00:53:35FromDiscord_<deech> Why isn't Travis picking up the test file I added as part of my PR? Doing `./koch tests` worked fine locally. https://github.com/nim-lang/Nim/pull/9934#issuecomment-446417859
00:57:18*fthe quit (Ping timeout: 272 seconds)
00:57:21*zachk quit (Quit: Leaving)
00:57:32*shpx quit (Excess Flood)
01:21:01*Tanger quit (Remote host closed the connection)
01:21:36*Tyresc quit (Quit: WeeChat 2.3-dev)
01:27:31*Snircle_ quit (Quit: Textual IRC Client: www.textualapp.com)
01:32:39shashlick@deech: I don't think that's what the file declaration is for - let me check
01:34:42shashlickaah maybe not
01:41:01*shpx joined #nim
01:51:57*biscarch joined #nim
01:54:09*biscarch left #nim (#nim)
02:00:06*kapil____ joined #nim
02:15:02*dddddd quit (Remote host closed the connection)
02:50:56FromGitter<gogolxdong> md5 module doesn't play with js
03:08:45*banc quit (Quit: Bye)
03:22:49*fthe joined #nim
03:25:23*banc joined #nim
03:35:08FromGitter<gogolxdong> How to import from CryptoJS like var CryptoJS{.importc.}:JsObject
03:37:06FromGitter<gogolxdong> as example demonstrates `var hash = CryptoJS.MD5('message');`
03:41:36FromGitter<zacharycarter> are you using the nodejs backend?
03:41:42FromGitter<zacharycarter> @gogolxdong ?
03:43:04FromGitter<gogolxdong> javascript
03:44:07FromGitter<zacharycarter> something like - ⏎ ⏎ ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=5c10840711bb5b25049f2f68]
03:44:16FromGitter<zacharycarter> and you need to import jsffi
03:47:58*whaletechno joined #nim
03:52:22FromGitter<gogolxdong> require is not defined though imported jsffi, `Uncaught ReferenceError: require is not defined at cmp.js:1572`
03:53:04FromGitter<zacharycarter> heh - yeah and now you're going to get into bundling if you want to use it :P
03:53:15FromGitter<zacharycarter> or you'll need to compile for NodeJS and then you can't use this in the browser
03:53:47FromGitter<zacharycarter> you can do this if you want
03:54:12FromGitter<zacharycarter> `proc md5(message: string): cstring {.importcpp: "crypto.MD5(#)".}`
03:54:27FromGitter<zacharycarter> but you'll have to be sure that `crypto` is a variable that exists in the global JS namespace
03:54:53FromGitter<gogolxdong> let me try
03:55:11FromGitter<zacharycarter> meaning you'll need to import a script tag
03:55:19FromGitter<zacharycarter> err import it via a script tag in HTML
03:55:34FromGitter<zacharycarter> and if it doesn't create some crypto variable - you'll need to call whatever main hook the library has that returns it
03:57:24FromGitter<gogolxdong> `proc md5(message: string): cstring {.importcpp: "CyptoJS.MD5(#)".}` ⏎ ⏎ ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=5c10872480986419d5796394]
03:57:57FromGitter<gogolxdong> core.js `var CryptoJS = CryptoJS || (function (Math, undefined) {...`
04:01:13FromGitter<zacharycarter> try changing message from string ot cstring
04:01:15FromGitter<zacharycarter> to*
04:03:43FromGitter<gogolxdong> works, then why `var CyptoJS{.importc.}:JsObject` doesn't work?
04:05:30FromGitter<zacharycarter> try putting a nodecl in there
04:05:44FromGitter<zacharycarter> other than that - not sure
04:07:59FromGitter<gogolxdong> works too, great
04:08:50FromGitter<gogolxdong> Are you mainly working on Graphics programming now?
04:09:08FromGitter<zacharycarter> yeah - but I'm exploring other languages besides Nim currently
04:09:18FromGitter<zacharycarter> looking at Zig and Kit and Chicken Scheme
04:09:39FromGitter<zacharycarter> and if none of those work out - I guess Rust
04:10:11FromGitter<zacharycarter> although so far, once I got beyond shared lib linking woes with kit - my experience has been rather pleasant
04:10:39FromGitter<gogolxdong> we have an expert working on Vulkan
04:11:03FromGitter<zacharycarter> Nim's perfectly capable for graphics programming - that's been proven
04:11:43FromGitter<zacharycarter> but I find myself fighting the GC these days to do anything outside of a single threaded process that doesn't support any kind of plugin system / hot loading of shared libs
04:12:04FromGitter<zacharycarter> it makes game development painful to a degree - so much re-compilation all the time, especially when you're trying to figure things out
04:12:51FromGitter<zacharycarter> I know that destructors / hcr are on the way - but I'm not looking to write a large codebase only to have to refactor it extensively six months from now
04:13:33FromGitter<zacharycarter> not for the reasons above anyway
04:14:07FromGitter<zacharycarter> the thought has crossed my mind to just use C and then use Nim as a scripting language
04:14:14FromGitter<zacharycarter> that might be an option
04:14:25FromGitter<gogolxdong> haha
04:14:48FromGitter<gogolxdong> if you want to build things from ground up.
04:15:12FromGitter<zacharycarter> well no - you could just compile the Nim code into a shared / static lib
04:15:18FromGitter<zacharycarter> and then consume it that way from your C program
04:15:24FromGitter<zacharycarter> and reload the lib when the nim code changes
04:15:41FromGitter<zacharycarter> the reason you can't do this with Nim today - or at least you're limited in the capacity - is because of Nim's GC
04:16:19FromGitter<zacharycarter> that's why there's the `useNimRtl` compiler flag
04:16:41FromGitter<zacharycarter> but this flag breaks any code that uses the GC during compile time - which some of the stdlib does
04:16:56FromGitter<zacharycarter> meaning you'd be re-authoring portions of the stdlib to make all of this work
04:17:22FromGitter<zacharycarter> now if you just have your game code written in Nim and the rest of your code in C/C++
04:17:46FromGitter<zacharycarter> you'd only have one instance of the Nim GC - assuming you didn't have any other shared libs in your project that were also authored in Nim
04:17:54FromGitter<zacharycarter> even then - you might be okay - I'm not sure
04:18:45FromGitter<zacharycarter> I'm enjoying kit so far though - I can just import a header file, link to the shared library and start calling functions
04:19:01FromGitter<zacharycarter> I don't have to write any binding / wrapper code
04:19:41FromGitter<gogolxdong> will check into kit
04:20:12FromGitter<zacharycarter> be forewarned, it's less mature than Nim and Zig :P
04:20:22FromGitter<zacharycarter> still neat to play with, and see how far you can push it
04:20:40FromGitter<zacharycarter> oh and yay - zig is finally done building, an hour later lol
04:20:45FromGitter<gogolxdong> Is that Sprite kit?
04:20:51FromGitter<zacharycarter> no
04:22:03FromGitter<zacharycarter> @zacharycarter ⏎ https://www.kitlang.org/https://ziglang.org/https://www.call-cc.org/ ⏎ these are the languages I'm looking at right now [https://gitter.im/nim-lang/Nim?at=5c108ceb8336e22a7d1c0f13]
04:22:19FromGitter<gogolxdong> A game development specific domain programming language?
04:23:10FromGitter<zacharycarter> well it's a systems programming language with a focus on game development
04:23:24FromGitter<zacharycarter> or it was designed with a focus on that
04:23:33FromGitter<gogolxdong> compiled to c only for now.
04:23:36FromGitter<zacharycarter> but for instance - this is a runnable kit program: ⏎ ⏎ ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=5c108d48178d7860a1c26267]
04:23:45FromGitter<zacharycarter> I'm okay with that - compiling to C means the code is more portable
04:23:56FromGitter<zacharycarter> Zig doesn't compile to C and it doesn't depend on libc and it only runs on a handful of systems atm
04:24:01FromGitter<gogolxdong> might need js too
04:24:19FromGitter<zacharycarter> maybe - although I think WASM would be a better target
04:24:37FromGitter<zacharycarter> but then you get into the LLVM thing
04:24:39FromGitter<gogolxdong> hope kit and Nim will have.
04:24:46FromGitter<zacharycarter> I'm not too concerned with wasm / the web
04:24:56FromGitter<zacharycarter> my main focus is desktop development
04:25:43FromGitter<gogolxdong> the trend we are moving to.
04:26:05FromGitter<gogolxdong> GUI vs Web UI
04:26:31FromGitter<zacharycarter> maybe
04:26:42FromGitter<zacharycarter> wasm still has a long way to go
04:27:07FromGitter<zacharycarter> https://hacks.mozilla.org/2018/10/webassemblys-post-mvp-future/
04:27:08FromGitter<gogolxdong> they coexist for a long time regarding most of current application.
04:27:53FromGitter<zacharycarter> well - I think everyone would pick writing a GUI with web technologies any day of the week, if there wasn't the performance concern
04:28:03FromGitter<zacharycarter> and it didn't mean shipping google chrome with your app
04:30:06*shpx quit (Quit: Textual IRC Client: www.textualapp.com)
04:30:41FromGitter<gogolxdong> you mean GUI contains Web UI?
04:31:28FromGitter<zacharycarter> or a GUI built with a web ui
04:31:32FromGitter<zacharycarter> like electron
04:32:11FromGitter<gogolxdong> I see, I meant desktop development then.
04:32:35FromGitter<zacharycarter> ah okay - I see what you mean
04:32:59FromGitter<gogolxdong> anything involved in web is super limited.
04:33:49FromGitter<gogolxdong> web sucks :)
04:33:53FromGitter<zacharycarter> I agree :)
04:43:00*fthe quit (Ping timeout: 244 seconds)
04:50:56*nsf joined #nim
04:56:10*lritter quit (Ping timeout: 246 seconds)
04:56:55*endragor joined #nim
04:56:59*lritter joined #nim
05:11:09FromGitter<AchalaSB> Is there any ipfs package in Nim lang?
05:17:37*ftsf quit (Read error: Connection reset by peer)
05:17:59*ftsf joined #nim
05:19:53*junland quit (Quit: Disconnected.)
05:20:00*junland joined #nim
05:29:46FromGitter<gogolxdong> we are writing our own.
05:32:00FromGitter<gogolxdong> as well as some improvements , but it's basically consist of Merkle DAG, Kademlia P2P, Bitswap which you can write by yourself.
05:34:52FromGitter<gogolxdong> IPFS concept is brilliant but it moves slowly, we are after is called sharing storage.
05:35:43FromGitter<AchalaSB> Ok. Will try to write by own.
05:36:02FromGitter<AchalaSB> And what about web3 provider?
05:39:07*kapil____ quit (Quit: Connection closed for inactivity)
05:58:48*narimiran joined #nim
06:55:37bozaloshtshIs it possible for nimble to take extra commandline arguemnts (other than the task name)?
06:56:05bozaloshtshto do things like nimble build -d:featureSwitch
06:56:27bozaloshtshscanning nimble's source, it seems not.
06:56:53bozaloshtshso if not, is it planned? or should I stop holding out and start using nake again.
06:57:34leorizebozaloshtsh: it's possible
06:57:56leorizenimble passes the flags directly to the Nim compiler
07:04:52bozaloshtshleorize: but can I do when defined(x) from my project.nimble?
07:07:02Araqyes you can
07:08:20bozaloshtshAraq: what would be the correct way to define x then? passing -d:x to nimble build isn't doing it.
07:09:02Araqtbh I'm surprised -d doesn't work.
07:09:19Araqmaybe try --define:x too
07:11:26bozaloshtshstill has no effect on the nimscript evaluation.
07:11:52*krux02 joined #nim
07:14:26*ftsf quit (Quit: Leaving)
07:14:54*narimiran quit (Ping timeout: 244 seconds)
07:16:16bozaloshtshI guess I can work around this by defining variables above the task definitions and using those as "switches"
07:38:26*stefanos82 joined #nim
08:07:24FromGitter<timotheecour> hi @araq i have 2 green PR’s (#9925 ; #9938) ; and for #9927 I’m wondering if you could help with the TODO I wrote regarding `popInfoContext`
08:08:37leorizeAraq: ^
08:27:41*dom96_w joined #nim
08:29:38*dom96_w quit (Client Quit)
08:33:59*dom96_w joined #nim
08:35:02*dom96_w quit (Client Quit)
08:47:16FromGitter<mratsim> @bozaloshtsh @Araq switch(“define”,”x”) in Nimble. but that applies to the nim project, not to the nimble file
08:50:44*d10n-work quit (Quit: Connection closed for inactivity)
09:01:30FromGitter<gogolxdong> Can I define proc `vstyle{}`(styles:varargs[string]):VStyle and use it like vstyle{"cssFloat:left"}
09:03:25FromGitter<gogolxdong> error:undeclared identifier:{}
09:13:32Araqwhat's wrong with (), vstyle("a:b", "c:d") works
09:14:04*floppydh joined #nim
09:15:42Araqtimotheecour: link please?
09:21:04*dddddd joined #nim
09:23:24*AndreasO joined #nim
09:27:06*AndreasO quit (Remote host closed the connection)
09:28:52*PMunch joined #nim
09:31:47FromGitter<gogolxdong> ```code paste, see link``` ⏎ ⏎ Error: undeclared identifier: 'vstyle' [https://gitter.im/nim-lang/Nim?at=5c10d583178d7860a1c41b23]
09:32:32*lritter quit (Ping timeout: 250 seconds)
09:37:16Araqwell iirc my style macro only works in a buildHtml environment
09:41:06FromGitter<alehander42> the style proc works everywhere
09:41:42FromGitter<alehander42> @gogolxdong if you want vstyle("..", "..") you just need to overload vstyle itself
09:41:57FromGitter<alehander42> proc vstyle(styles: varargs[string]): ..
09:43:51FromGitter<alehander42> for `{}` I think you can define a singleton vstyle variable and overload `{}` for it's type
09:44:17FromGitter<alehander42> but overally you define `operatorname`(left: Left, right: Right)
09:44:31FromGitter<alehander42> not proc `left operatorname`
09:45:15FromGitter<alehander42> (`vstyle()` as proc vstyle(<args stuff>) would be simplest I think)
09:47:48FromGitter<gogolxdong> ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=5c10d94326de6f0822c0b329]
09:49:29FromGitter<alehander42> you don't really need the additional \` around vstyles
09:49:36FromGitter<alehander42> vstyle
09:49:40FromGitter<alehander42> it's a normal name
09:49:41FromGitter<gogolxdong> you are right.
09:49:50FromGitter<alehander42> does it work now?
09:49:59FromGitter<gogolxdong> sure
09:50:41FromGitter<alehander42> great :D
09:53:34FromGitter<gogolxdong> It saves lots of explicit `kstring`.
09:56:02FromGitter<alehander42> ah, I just have a `j` template for cstring (and would do a `k` for kstrings if I need it), so I write j"lalalala" or k"lalala"
09:56:39FromGitter<alehander42> (`j` because I mostly use cstrings on the JS backend, so like "javascript cstring")
09:58:58FromGitter<gogolxdong> yeah, it's good. want to achieve native css style like vstyle(margin:20px, cssFloat:left)
10:06:34FromGitter<gogolxdong> Have you used karax?@alehander42
10:08:40FromGitter<alehander42> yes, a lot
10:09:34FromGitter<gogolxdong> Can you implement ripple effects like Google Material Design?
10:11:46FromGitter<gogolxdong> and how do you extract styles that can be reused.
10:12:32FromGitter<alehander42> Ive never used Google material design, sorry
10:13:12FromGitter<alehander42> But karax styles are just values of the VStyle , you can reuse or combine them any way you need
10:17:11FromGitter<alehander42> e.g. sometimes I have functions which generate parametrized styles based on their args
10:18:01FromGitter<gogolxdong> sounds cool
10:21:16FromGitter<gogolxdong> I'm trying to cover what we have done in Vue.js, because I'm not sure what issue comes up at what time. Does your case cover all your requirements?
10:22:30FromGitter<alehander42> it does, but I haven't used vue.js, so it's hard for me to compare them: I only had one trouble with the diff algorithm at one point, but I couldn't reproduce it in a small example
10:23:12FromGitter<alehander42> otherwise it works great, but frameworks like react/vue seem to have some additional things, so I have to look at their feature lists
10:30:17FromGitter<gogolxdong> I think I've covered one third at least, and the code is approximately one twentieth .
10:31:38FromGitter<timotheecour> @Araq *<Araq>* @timotheecour: link please? ⏎ Here: https://github.com/nim-lang/Nim/pull/9927#issuecomment-446537506
10:33:57FromGitter<alehander42> @gogolxdong what do you want to build with karax
10:38:09FromGitter<gogolxdong> our frontend, a cloud management platform
10:44:47FromGitter<alehander42> nice: well what is the best thing your team liked about vue? (what would be most probable to miss in other lib)
10:58:49FromGitter<gogolxdong> they only used Vue.js .
10:59:01FromGitter<gogolxdong> I'm not frontend dev :)
11:03:19FromGitter<gogolxdong> We tried to build with Karax almost ten months ago, didn't have sufficient knowledge about Nim neither Karax back then, after ran into some issues we cannot solve, we used plan B which uses Vue.js.
11:05:15Araqhave I told you about my karax plan?
11:08:36FromGitter<gogolxdong> Not sure which part, you can tell me more.
11:12:21*dom96_w joined #nim
11:20:42*kapil____ joined #nim
11:24:04Araqwe need a VNode that says "just take the real DOM node from over there"
11:25:21*pbodev1 joined #nim
11:37:39*AndreasO joined #nim
11:39:02*dom96_w quit (Read error: Connection reset by peer)
11:39:31*dom96_w joined #nim
11:40:01*AndreasO quit (Remote host closed the connection)
11:45:19ZevvAraq: sorry for the confusion about the asyncHttpServer. It is probably me misunderstanding things
11:46:41*dom96_w quit (Read error: Connection reset by peer)
11:46:53*dom96_w joined #nim
11:46:58*dom96_w quit (Client Quit)
11:48:04*Vladar joined #nim
12:00:57FromGitter<alehander42> Araq, can't we just add such a VNode currently
12:02:29Araqcan we?
12:03:20Araqthe idea is that we can keep the state in the input fields etc by telling Karax to always use "this one over here", no DOM diffing required
12:05:37FromGitter<zah> I recently used Karax as well and was a bit confused about how to handle a part of the DOM that requires manual manipulation (e.g. having a canvas that you draw to for example, or just a third party charting library). I came up with a solution, but it seemed a bit hacky
12:06:41FromGitter<zah> The mediaplayer example is something close, but not quite
12:09:20FromGitter<zah> In the rest of the React-like frameworks, you have hooks that allow you to execute code over the real nodes once the VDOM elements are rendered. Here is an example: ⏎ https://mithril.js.org/lifecycle-methods.html
12:12:25FromGitter<gogolxdong> VNode has a field named dom*:Node
12:14:30*fthe joined #nim
12:15:01*Snircle joined #nim
12:17:35FromGitter<gogolxdong> Do you have an idea of writing such VNode?
12:21:17FromGitter<zah> The typical pattern in other framework is that you'll create a placeholder VNode and you'll use some "init" procedure to convert the real DOM node into something richer (e.g. there are numerous charing libraries, text editors and so on which are instantiated over a placeholder node).
12:25:52FromGitter<zah> My "hacky" way to simulate this involved creating a global component instance that I referenced in a render proc. Once it has been shown on the screen, I was able to use `component.dom` from the rest of the program to manipulate it
12:27:32*abm joined #nim
12:32:24Araqzah, I think by now I tried every component implementation out there, the results are always confusing and hacky. Fundamentally this thing operates on a "let's redraw everything" assumption that simply bites with stateful components. We talked about this before
12:33:23Araqand that's not my egocentric opinion, Elm bans components too
12:35:19Araqbut we have a nice VNode vs Node distinction and Nodes have state so if my idea works out we can get the best of both worlds with little added complexity
12:38:26*fthe quit (Ping timeout: 250 seconds)
12:42:24*ng0 joined #nim
12:42:50FromGitter<zah> Well, there are surprises in any framework, but the lifecycle hooks solve this problem to a large extent for me. If Elm is banning stateful components, there must be another mechanism in place to achieve the same. You can use a library such as ChartJS as a representative example: ⏎ https://www.chartjs.org/ ⏎ ⏎ It seems to be supported by Elm, although it's hard for me to tell what mechanism is being used by quickly
12:42:50FromGitter... browsing the code ⏎ https://github.com/suzuki-shin/elm-chartjs [https://gitter.im/nim-lang/Nim?at=5c1102498d4f3a2a7cadf187]
12:43:36FromGitter<zah> But what you describe can also work as long as my taking care of managing the DOM sub-tree
12:45:29Araqechartstest.nim shows how to do that
12:46:18AraqsetForeignNodeId "echartSection"
12:46:18Araq # crucial part
12:47:12Araqand in VComponent we have the traditional life cycle hooks but I never really used them for anything
12:52:39FromGitter<zah> This reliance on IDs gets a little bit in the way when I have multiple charts on the page. Now I have to maintain my own "registry" with the known displayed charts
12:54:24FromGitter<zah> Otherwise, `setForeignNodeId` seems to be an alternative to the hack I used. ⏎ What are the names of the lifecycle hooks, so I can look them up (or an example that uses them)?
12:55:40Araqwell that's my idea, an alternative setForeignNodeId
12:57:25Araqlook at vdom.newComponent
12:57:26FromGitter<zah> Oh, I've actually seen these `onAttach` and `onDetach` methods. Makes me wonder now what was wrong with them and why I didn't use them
12:57:48FromGitter<zah> Will try again
12:59:43FromGitter<Vindaar> I've been building a plotting tool for my data in the last few weeks using karax where I also use `setForeignNodeId` to display a plotly graph. Works fine for me at the moment
13:29:33FromGitter<gogolxdong> When will this idea work out?
13:39:39*kapil____ quit (Quit: Connection closed for inactivity)
14:04:38Araqnow
14:04:43AraqI pushed Karax v1.0
14:06:13FromGitter<gogolxdong> Great!
14:07:08FromGitter<mratsim> wow so fast :P
14:07:15FromGitter<mratsim> Nim coming soon™
14:09:00FromGitter<narimiran> time to change the second sentence in its readme ("The API is reasonably stable and version 1 should arrive anytime soon now.") :)
14:13:06*kapil____ joined #nim
14:14:47edcragghello, what's the type `<seq[bool]>`? i can only think it's... a reference to a seq of bools?
14:15:36Araqit's a seq of bool, ignore the angle brackets
14:16:06edcraggok, thanks :)
14:18:26FromGitter<gogolxdong> myAwesomeComponent haha
14:19:14Araqtell me if it works out in practice. if so I'll document it
14:20:14FromGitter<gogolxdong> sure
14:25:28*endragor quit (Remote host closed the connection)
14:51:17*stephenwithav joined #nim
15:20:09*nsf quit (Quit: WeeChat 2.3)
15:21:36*vlad1777d quit (Ping timeout: 244 seconds)
15:27:07*nc-x joined #nim
15:30:04nc-xAraq: https://github.com/nim-lang/Nim/pull/9943 are nim strings supposed to be nimCopy'ed in js codegen? Because if not, then I have a better fix.
15:31:30FromGitter<alehander42> i wanted to demonstrate the issue when something needs copy, strings are just an example
15:31:47*krux02 quit (Ping timeout: 240 seconds)
15:32:20FromGitter<alehander42> but i don't know how this part of jsgen works well at all, so probably there are much better fixes!(for this and the other test fails)
15:32:58nc-xThis https://github.com/nc-x/Nim/commit/041512fe053fd115c79333e167d7071856a0c17e fixes the issue in your test
15:33:36Araqnc-x, I don't remember. it's likely strings are covered by nimCopy too
15:34:47*nc-x quit (Quit: Page closed)
15:35:17FromGitter<alehander42> well, they are basically arrays: I think they should be handled in the same way seq-s are
15:35:18*dom96_w joined #nim
15:35:25dom96_whttps://github.com/nim-lang/Nim/pull/9888 :/
15:38:51*snowolf quit (Ping timeout: 260 seconds)
15:39:12Araqa stdlib must be allowed to live too
15:39:21FromGitter<arnetheduck> ugh. more stdlib code, not less - specially for something which is basically just a user-land format :/
15:40:04FromGitter<arnetheduck> by adding to it, you make it die
15:40:27*krux02 joined #nim
15:40:32Araqif we never add anything to it, it seems to be even more dead
15:40:58FromGitter<arnetheduck> yeah, half of it is because it's not receiving maintenance as the language evolves
15:41:14FromGitter<alehander42> yeah @nc-x it has the same problem for seq-s
15:41:17FromGitter<alehander42> with your fix
15:41:29FromGitter<mratsim> So add something that is supposed to stay stable with language evolution.
15:41:33FromGitter<alehander42> so the problem is with the nimCopy generation
15:43:03AraqPython has diffutils in its stdlib too.
15:43:35Araqin fact, Python has a stdlib that works quite like Nim's. it has cruft, it has useful stuff and it has broken stuff
15:44:01FromGitter<arnetheduck> yeah, and then they gained a package manager and have been moving away from that idea ever since (for good reason)
15:44:59Araqthe security problems of these ecosystems makes me hesitate to embrace this idea
15:44:59FromGitter<arnetheduck> point is, if nim core developers don't use package management / nimble, pm and nimble will remain second-thoughts instead of making up the whole
15:45:54*snowolf joined #nim
15:46:39*nc-x joined #nim
15:47:54FromGitter<mratsim> Python stdlib is quite nice tbh, you can do a lot with just it.
15:47:54dom96_wAgree with arnetheduck
15:48:08dom96_wwe have nowhere near the manpower to maintain these little modules
15:48:19dom96_wand putting them in the stdlib means we are expected to ensure these modules work
15:48:45FromGitter<mratsim> but do we need to maintain math? or json?
15:48:56dom96_wIt doesn't help that you are merging modules which are simply not ready to be included. Nowadays I expect new modules to at least be documented well.
15:49:08FromGitter<mratsim> that should be the first criteria for inclusion. Something stable.
15:49:15dom96_wand to follow the code style guidelines
15:49:40nc-x@alehander42 adding tySequence into my fix fixes the sequence issue. The problem right now as far as I understand it is that https://github.com/nim-lang/Nim/blob/9f453592a40b6db4ab6715fe2f29ca573bb89148/compiler/jsgen.nim#L930 if this fails then we return false, which means that a nimCopy is generated. If it returns true, then it is direct assignment. Now the thing to think is whether a direct assignment is correct or nimCopy. Because if d
15:49:47nc-xcorrect then my fix should be correct
15:50:22Araqwell I can move it from std to some hidden dir so that testament and unittest can use it
15:51:02dom96_wyes. Do that.
15:51:07nc-x<The bot snipped of my msg> Because if direct assignment is correct then my fix should be correct
15:51:10FromGitter<alehander42> @nc-x you're right, but I think that nimCopy is correct
15:51:30FromGitter<alehander42> because seq and string are copied by value, not by ref
15:52:10FromGitter<mratsim> @Araq @dom96 it shouldn’t be hidden, like testament, otherwise you prevent the community from forking and improving it or building on top.
15:52:27Araqdom96_w, the little modules are as hard to maintain when they are under github/araq or github/krux02
15:53:16Araqmratsim: that's the two "philosophies" about how to write a stdlib at work
15:53:36Araqmy philosophy was "It's useful already and people can contribute"
15:53:52FromGitter<alehander42> @nc-x so the bug is that the generated nimCopy doesn't always change `dest` which doesn't make sense to me
15:53:55Araqthe other philosphy is "it is not perfect, so don't include it"
15:54:34dom96_wIt's not about perfection, it's about meeting a minimal standard
15:54:56FromGitter<mratsim> let’s define a standard then
15:55:00Araqwhich standard?
15:55:25FromGitter<mratsim> ==> RFC “ A standard for inclusion in the stdlib"
15:57:05nc-x@alehander42 Sorry I am a bit new to understand properly. But this gives same output on js and windows with my fix https://pastebin.com/w1EFYRpi
15:57:15nc-xOr are you talking about something else.
15:58:24FromGitter<arnetheduck> so put crap in a crap folder that's not expected to be maintained in backwards compatible fashion, so that the rest of us know which parts to rely upon and which are crap
15:59:01Araqfor you everything is crap anyway.
15:59:10*narimiran joined #nim
16:00:18FromGitter<alehander42> @nc-x so what is the output for you?
16:00:22FromGitter<alehander42> from your example
16:00:23FromGitter<arnetheduck> depends on the context - if I want to deliver a working application, then yes, the bar is different compared to a throwaway script or a one-pager..
16:00:48Araqwell here is the thing:
16:01:02Araqcode starts as "crap" and then it's getting used and fixed
16:01:24Araqat some point we can move the file around from junk/ to std/
16:01:41Araqbut that means people need to adjust their import statements
16:01:52FromGitter<alehander42> @nc-x try to compare it to the output for the C backend :)
16:01:58Araqwhich doesn't really work as well as you think it would
16:02:35FromGitter<arnetheduck> it works exactly as I said it would: you manage expectations that way, and in the junk folder, anything goes, including changing the api or moving it elsewhere
16:03:09FromGitter<arnetheduck> normally, this is why the outside-of-stdlib phase is so important, so you can settle on somthing that's well made and useful without impacting the core that people rely upon
16:04:18FromGitter<arnetheduck> if the PM is not well developed enough that you trust it yourself, the junk folder is a way to achieve a similar effect
16:04:44Araqhttps://dlang.org/phobos/std_experimental_checkedint.html
16:05:22Araqwe can follow these guys and see when checkedint can moved out of "experimental"
16:05:48Araqor their allocator
16:07:10FromGitter<arnetheduck> so? clearly it's not passing the usefulness test sufficiently then, or people would be vocal about marking it not-crap
16:07:51Araqwell allocator was written by Alexandrescu.
16:08:24*Perkol joined #nim
16:08:35Araqand he simply followed some policies.
16:09:31Araqthe "experimental" doesn't mean anything about its code quality
16:09:35FromGitter<alehander42> I think this is different: we already have `{.experimental.}` etc for "alpha" features
16:09:46FromGitter<alehander42> isn't it equivalent to the D experimental thing
16:10:01Araqwell yes, we have that for Nim language.
16:10:05nc-x@alehander42 output https://pastebin.com/H1jGe7B3
16:10:12Araqbut we don't have a policy like that for the Nim stdlib.
16:10:25Araqwe can do the same as D.
16:10:42FromGitter<arnetheduck> here's a bold suggestion: move the whole stdlib into crap and then let stuff trickle back in slowly
16:11:00dom96_whah
16:11:17FromGitter<alehander42> @nc-x sorry, I might have misguided you : your example does work ok indeed, but you're not really testing what we want to test
16:11:41FromGitter<alehander42> you assign m1 to m2: they are both ref, so naturally their fields will point to the same seq(as m1 and m2 point to the same obj)
16:11:49Araqarnetheduck: more useful would then be a rocksolid-stable category
16:12:38FromGitter<arnetheduck> name it as you like.. though we already have core, pure, std, gonna be hard to find a good one :)
16:13:25FromGitter<alehander42> @nc-x https://gist.github.com/alehander42/3543b6a3c5d4f3a484eb155e8516d011
16:13:43FromGitter<alehander42> now try this one on the C backend and then on your patch
16:14:33FromGitter<arnetheduck> `stable` is not bad though.. again, it's about communication and managing expectations, so that people that want to build on top know what to expect and adapt to that -but it's just as much about maintaining an experimentation zone where you can be free about improving without breaking the world for everyone
16:16:50dom96_wmaybe instead of putting the modules in folder we could just add a pragma to mark the stability of modules?
16:16:53dom96_wRust offers this
16:16:55FromGitter<arnetheduck> the easier way to do that (for me, as a "user") is to keep experimental stuff outside the main repo, but that requires that everyone dogfoods the package manager, core devs included.. (becuase then the choice belongs to me, to either lock at a particular version or follow the experiments as they happen)
16:16:58dom96_w*in a folder
16:17:03*PMunch quit (Remote host closed the connection)
16:18:08FromGitter<alehander42> @nc-x I also see know your fix from yesterday: my fixes come because of similar issues with strings: are you sure proc-s don't require copying too?
16:18:28FromGitter<arnetheduck> our `ad2` decision was in large parts motivated by this: a desire not to break the world for a lot of people (and deal with the communications churn/friction this would cause), as we work on improving it for our use case
16:18:56nc-x@alehander42 Ah! your example makes it clear. Regarding yesterday's fix, I have no idea :)
16:18:56Zevvlike gestreamer plugins: "the good, the bad and the ugly".
16:19:11AraqI fully support your ad2 move, but async is much harder to get right than a textdiff proc
16:19:15FromGitter<alehander42> you're probably right about procs tho: it doesn't make sense to not share the proc (and i don't think one can really mutate it)
16:19:46Araqand even if we get it wrong, we can add a .deprecated to the proc and write a new, better one
16:20:24Araqwe already have all these tools for smooth migration paths and yet we pretend we don't and "argh, must get it correct this time..."
16:24:08*nc-x quit (Quit: Page closed)
16:24:30AraqZevv, like every plugin system ever.
16:25:33ZevvI heard you adore plugins
16:26:17Araqit's like package management. It works when everybody plays nice and aheres to a long list of rules; aka never.
16:26:30Zevvuhu
16:26:43Zevvvery true
16:30:29*endragor joined #nim
16:34:09FromGitter<mratsim> Archlinux package management works for me™
16:34:47*endragor quit (Ping timeout: 240 seconds)
16:47:53FromGitter<alehander42> @Araq I tried to add a discard locally as a fix for https://github.com/nim-lang/Nim/pull/9779
16:48:14FromGitter<alehander42> but whatever I do, an equivalent empty line with line info doesn't appear in the final c code
16:50:29FromGitter<alehander42> hm that's because discard empty is not generated, so I need to add discard 0
16:55:19*floppydh quit (Quit: WeeChat 2.3)
16:59:21Araqtada, it's in experimental/ now. Not sure anymore what any of this has to do with software quality but I need to work on more important things now
17:01:22FromGitter<mratsim> lol - experimental related: https://forum.nim-lang.org/t/4466
17:03:31*dom96_w quit (Quit: My MacBook has gone to sleep. ZZZzzz…)
17:04:54*dom96_w joined #nim
17:16:41shashlickwhat's the real difference between a useful module being in nim-lang/Nim, vs. in nim-lang/module and pulled into Nim in CI test and packaging?
17:17:01shashlickeffectively, everything useful will be maintained, others will die over time
17:17:29shashlicki'm fine with either approach but I feel the stdlib should be allowed to grow - either as a built-in or external package
17:18:11shashlickthat's the real attraction for any language that you can build anything easily
17:22:18Araqshashlick, diff.nim is useful for testament and unittest and if these would rely on a nimble package we would get a nice mutual dependency between Nim and Nimble
17:22:35Araqwhich we had before and was painful
17:23:27*jjido joined #nim
17:23:37shashlickhaving everything in the same repo perhaps has lower overhead compared to having separate ones that need to be brought together for test/delivery
17:23:45shashlickthough circular dependencies are even more fun
17:24:02shashlickregardless, what's the primary concern with expanding the stdlib?
17:24:11Araqin the long run probably we can't fight some 'nimble install ' commands in travis
17:24:32Araqshashlick, "bad stuff happened"
17:26:20shashlickexamples would help but i don't think there's any choice - the library is just as important to nim's evolution as the compiler
17:26:39shashlickif nimble packages are second tier citizens then that's just as much of a problem
17:27:15Araqthey are not second tier citizens, I created plenty of Nimble packages myself
17:27:27Araqwhich I also maintain.
17:28:06Araqit's true that I'm not too happy with Nimble but I use it and play by our dogfoot rules
17:29:03shashlickok so is the general strategy now
17:29:03shashlick- add any new cool libs as nimble packages which are tested separately
17:29:05shashlick- only add to stdlib if Nim itself depends on it
17:30:58*endragor joined #nim
17:35:07*endragor quit (Ping timeout: 240 seconds)
17:37:47Araqnow that you said, I think so, yes
17:38:32ZevvAlso meaning that stuff will be moved out of the stdlib actively?
17:46:33*Trustable joined #nim
17:52:06*dom96_w quit (Quit: My MacBook has gone to sleep. ZZZzzz…)
17:57:09*Tyresc joined #nim
18:00:59*Desetude joined #nim
18:01:03*Desetude left #nim (#nim)
18:04:02*couven92 quit (Read error: Connection reset by peer)
18:05:21*nsf joined #nim
18:08:01*dom96_w joined #nim
18:13:57FromGitter<arnetheduck> shashlick, there's no process for removing dead and obsolete stuff from the stdlib - that's the biggest difference imo
18:14:38FromGitter<arnetheduck> there's also an expectation that the stdlib will be maintained alongside the rest of the language, and be relatively stable, as far as api goes
18:16:33FromGitter<arnetheduck> outside packages solve both, neatly.. useful stuff gets maintained, and api changes can be introduced freely - the cost of freezing deps is low compared to freezing *all* of nim+stdlib (because the lib is a smaller unit)
18:17:01AraqZevv, in the past we moved modules out of the stdlib into Nimble packages, and there are still things that should be moved
18:17:30FromGitter<arnetheduck> also, "useful for Nim" is "useful for the compiler" or "useful for the compiler and all tools and ..."
18:17:35FromGitter<arnetheduck> ?
18:18:02narimiranwhat is the criteria for "should be moved"?
18:18:27shashlickI agree that we should move things out then those pieces can evolve with more freedom and ownership
18:18:42shashlickI'd argue anything not needed by the compiler
18:19:17shashlickEven testament could be moved out in theory
18:19:22Zevvall the networking
18:25:13FromGitter<mratsim> there’s a difference between compiler, stdlib and nimble. ⏎ ⏎ Stdlib should be about: ⏎ ⏎ 1) Things that are not expected to change API-wise because the proper API has won (example math) ... [https://gitter.im/nim-lang/Nim?at=5c11528980986419d57e8274]
18:28:34FromGitter<arnetheduck> 4 is controversial indeed.. what you expect from the language depends on your context.. why json and not cbor, protobuf, xml, csv and all the others? what all of them have in common is that they're end-user formats that come and go - they're not based on some higher mathematical truth
18:29:25FromGitter<mratsim> popularity contest ;)
18:29:49FromGitter<mratsim> all languages have it, and people now expects it
18:30:10FromGitter<mratsim> csv is there as well
18:30:15narimiranyup, if json and csv were not part of stdlib i would be very surprised
18:30:16ZevvNot Lua - they ship without any batteries
18:30:21FromGitter<arnetheduck> yeah, that's why we have an ftp implementation in stdlib, as well as an html parser for who-knows-which-version of html
18:30:32FromGitter<mratsim> xml probably would have been there in 2003, but it was removed from Nim stdlib 2 months ago
18:30:47FromGitter<mratsim> html was removed 2 months ago along ith xmh
18:30:49FromGitter<mratsim> xml
18:31:07FromGitter<mratsim> are you aware of this @arnetheduck https://github.com/nim-lang/graveyard
18:32:11FromGitter<arnetheduck> oh, I was looking at my 0.19 checkout
18:32:26FromGitter<arnetheduck> graveyard looks good, yay!
18:39:17Araqhttps://docs.python.org/3/library/ftplib.html Python has FTP in its stdlib
18:39:26FromGitter<timotheecour> @araq > *<Araq>* shashlick, "bad stuff happened" ⏎ ⏎ Do you have a link or more details? IMO it’s unavoidable to have nimble packages being used as dependencies for nim tools (including testament), that’s basic dogfooding and code reuse. So we might as well fix all the “bad stuff” that happened and embrace nimble.
18:39:52Araqin its version 3.7, they had plenty of opportunity to remove it
18:40:26Araqand yet they didn't. Maybe because FTP is still a useful thing to have
18:40:35FromGitter<timotheecour> There is no cyclic dependency: c sources => nim compiler => koch => (nim compiler bootstrapped, nimble, tools)
18:41:06Araqtimotheecour: there is, Nimble depends on Nim, Nim's repo depends on Nimble
18:41:37AraqNim itself doesn't, but for some Nim tools we need to install NImble packages
18:42:21FromGitter<timotheecour> yes, that’s exactly what I’m saying, there is no cyclic dep. koch installs nimble, then nimble can install nimble packages.
18:42:46Araqbbl
18:42:58FromGitter<timotheecour> in fact koch already does install nimble; it just doesn’t call nimble install (yet)
18:46:32FromGitter<timotheecour> we’re already solving a more complex problem since a while ago (bootstrapping nim compiler, allowing to write nim in nim), this is an easier problem.
18:53:42*Vladar quit (Remote host closed the connection)
18:55:55*dom96_w quit (Quit: My MacBook has gone to sleep. ZZZzzz…)
19:07:07shashlicki'm good with moving some candidates out into standalone repos and pulling them in for CI and packaging
19:07:26shashlickwe could develop some tools in the process to simplify the process as we go along
19:08:07shashlickbut before that, we need to clean up the nimble database infrastructure since a single json file doesn't scale too well
19:10:07FromGitter<timotheecour> nimble supports custom json file specifying where to find packages, doesnt it? so that could potentially be used if, say, we want to use mirrors for extra stability for those supported packages
19:11:00shashlicki'd rather move to a database to store that info centrally, perhaps even taken over by nimble.directory
19:11:03FromGitter<timotheecour> other than that could you elaborate on "a single json file doesn't scale too well” ?
19:11:10shashlickand nimble can download an sqlite file or something
19:11:28*shadowbane quit (Ping timeout: 250 seconds)
19:12:16FromGitter<timotheecour> if you’re worried about “scale” as in efficiency, I doubt it’ll ever be an issue (the numbers of packages are tiny in that regard)
19:12:41FromGitter<kaushalmodi> hello all!
19:12:54FromGitter<kaushalmodi> Just jumping into this conversation that I see going on ..
19:13:09FromGitter<kaushalmodi> I agree with shashlick (about please break up nimble JSON)
19:13:15FromGitter<kaushalmodi> @timotheecour ref: https://github.com/nim-lang/packages/issues/777
19:14:07shashlickwell, we can still have json in the backend if required but need a cleaner api to submit packages
19:17:50*shadowbane joined #nim
19:17:50*shadowbane quit (Client Quit)
19:18:05*shadowbane joined #nim
19:20:11FromGitter<timotheecour> Okok, no problem with https://github.com/nim-lang/packages/issues/777 ; but that doesn’t justify using sqlite as the “authoritative” source; using either a single json or 1 json per package seems simpler.
19:20:31FromGitter<kaushalmodi> ok, I missed the sqlite part
19:20:41FromGitter<kaushalmodi> +1 for 1 json per package
19:21:10FromGitter<kaushalmodi> but -1 for a single humongous json that we have for all packages (like we do now)
19:21:57*kapil____ quit (Quit: Connection closed for inactivity)
19:23:38FromGitter<timotheecour> the humongous json could be auto-generated (ie, either not checked in, or checked in but updated after each commit using a git commit hook), from individual mypkg.json files in that repo btw, so it’ll make migration easy
19:24:06FromGitter<timotheecour> (ie existing tools that depend on that single json file would continue to work)
19:24:57*Perkol quit (Ping timeout: 244 seconds)
19:27:02shashlickwell big question with 1 json per package is how nimble will refresh
19:27:20shashlickwill it sit and download every single json? how will it know how to update
19:27:32FromGitter<timotheecour> see https://github.com/nim-lang/packages/issues/777#issuecomment-446712863
19:28:00FromGitter<timotheecour> nimble refresh just downloads the (now auto-generated) single json file
19:28:17FromGitter<timotheecour> that file is auto generated after each commit
19:28:57shashlicksounds fair
19:29:05shashlickbut we still need a cleaner method to add packages
19:29:34Zevvanything good to be learned from pip, cpan, rocks, gems, npm, etc?
19:29:35shashlicknimble publish doesn't work most of the time
19:29:40FromGitter<timotheecour> just add mypkg.json and be done?
19:30:46shashlicknimble publish is good enough if it works
19:30:57shashlickseparate files will make PR acceptance easier
19:31:11FromGitter<timotheecour> ok so problem solved then.
19:31:32shashlickone other issue with nimble is that releases are tied to nim even though your package manager can be allowed to evolve separately
19:31:39*PMunch joined #nim
19:33:24FromGitter<timotheecour> not sure what u mean? if Nim tools depend on a list of supported packages, all that’s needed is to add a proper version, eg: “testament: requires mypkg1 == 0.3.2"
19:34:13shashlickno i mean nimble only revs when nim posts a new release
19:34:24shashlickso bug fixes and improvements don't reach the community for months
19:35:42shashlickthis is probably because nimble builds nim in to parse nimble files and requires the entire library available to run
19:38:01FromGitter<timotheecour> sorry, didn’t have my coffe, still not sure I follow, do u have a concrete example? bug fixes for what don’t reach the community? I haven’t experienced what you’re describing
19:39:55shashlicksay for example that you run into the before install issue I had for nimgen packages - https://github.com/nim-lang/nimble/issues/280
19:40:32shashlickif it gets fixed in a week, no one benefits from it until the next release obviously
19:40:55shashlickbut since the release is in sync with Nim itself, it will be months before that fix goes out
19:41:59shashlickfurther, existing installs of 0.19.0 are left out
19:43:47FromGitter<timotheecour> ok so u mean `bugs with nimble` (that was unclear till now); in that case, isn’t all that’s needed is (like any other nimble package), `nimble develop nimble` ?
19:44:19FromGitter<timotheecour> eg: ⏎ `git clone https://github.com/nim-lang/nimble && cd nimble && nimble develop`
19:46:26FromGitter<timotheecour> or maybe even: `./koch tools` (see `proc bundleNimbleSrc(latest: bool)`)
19:47:42FromDiscord_<Virepri> time to feel fuckin stupid again! https://twitch.tv/Virepri
19:49:13*zachk joined #nim
19:50:43*zachk quit (Changing host)
19:50:43*zachk joined #nim
19:54:24shashlickYou can pip install -u
19:54:36shashlick Can't expect people to upgrade that way
19:55:45shashlickIt has to be a tested and supported upgrade path
20:00:00Araqshashlick, you're correct but IMO we would be better served by Nimble part of the Nim repo and more frequent Nim releases
20:00:08Araqthe existing split is a PITA
20:00:50Araqand Nimble is full of 'when NimCompilerApiVersion == 2' so that this thing continues to work with older Nims etc
20:01:50FromGitter<kaushalmodi> Araq: Hello!
20:02:06Araqhi
20:02:19FromGitter<kaushalmodi> I am bugged by a failure since the os/ospath got merged
20:02:25FromGitter<kaushalmodi> log: https://travis-ci.org/kaushalmodi/hello_musl/jobs/467154650#L719
20:02:38FromGitter<kaushalmodi> interestingly I cannot recreate that error on my machine
20:02:54Araqsystem.nim(376, 50) Warning: unknown magic 'Destroy' might crash the compiler [UnknownMagic]
20:03:06Araq^ your Nim library is not correct
20:03:30Araqyour compiling a new stdlib with an older compiler that doesn't know the Destroy magic, for exampel
20:04:23FromGitter<kaushalmodi> hmm, I wonder how that could happen.. I even deleted the Travis cache so that it builds from c sources from scratch
20:04:26*krux02 quit (Remote host closed the connection)
20:04:47FromGitter<kaushalmodi> so that warning, and the following error related to Stat are related?
20:05:48shashlickAraq: why does nimble build nim in? why not use the installed Nim to execute the file as a script rather than parse it
20:06:13FromGitter<zacharycarter> needs the vm for nimscript?
20:06:14FromGitter<kaushalmodi> Araq: and I am not even caching csources: https://github.com/kaushalmodi/hello_musl/blob/5fe2adcc620fb2c2ecaaf8bb9a1fc4650c9d3654/.travis.yml#L51-L62
20:06:15shashlickbuilding the nim compiler into tools gets difficult
20:06:36FromGitter<zacharycarter> I'm just guessing
20:06:51shashlick@zacharycarter: its easier to just nim e script.nims instead of merging cfg and nims into a nimble file
20:07:05*nsf quit (Quit: WeeChat 2.3)
20:07:06FromGitter<zacharycarter> well nimble has some custom nimscript definitions
20:07:18FromGitter<zacharycarter> beyond what the VM provides ootb
20:07:43FromGitter<zacharycarter> like tasks - etc
20:07:58shashlickanyway, i think it just complicates things - other package managers aren't tied to the release of the language
20:08:23*Trustable quit (Remote host closed the connection)
20:08:23shashlickwhile we are talking about spinning out stdlib stuff, nimble and other tools also fall into the same thing
20:11:29*pbodev1 quit (Ping timeout: 268 seconds)
20:11:31*lritter joined #nim
20:14:23FromGitter<kaushalmodi> Araq: So on my system (RHEL 6.8, 64-bit) where I just rebuild Nim from devel, that hello_musl project builds fine: ⏎ ⏎ ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=5c116c1ef4880a60a26b6af5]
20:17:59FromGitter<arnetheduck> a smaller standard library makes it easier to release a new nim version.. together with semantic versioning, it's also fairly easy to manage compatibility with community packages.. likewise, just because packages are in separate repos doesn't mean they cannot be simultaneously released with a new nim version, or gated to certain nim versions
20:18:22FromGitter<kaushalmodi> ok.. a bit of mystery clears.. looks like the Nim build process itself fails because of the presence of config.nims in that hello_musl project: https://travis-ci.org/kaushalmodi/hello_musl/jobs/467154650#L673
20:18:23FromGitter<timotheecour> @shashlick ⏎ ⏎ > *<shashlick>* You can pip install -u ⏎ ⏎ we could add support for `nimble update` , following what `brew update` does; maybe: ... [https://gitter.im/nim-lang/Nim?at=5c116d0fe4787d16e3886109]
20:20:41FromGitter<kaushalmodi> Araq: summary of this issue, with this config.nims (https://github.com/kaushalmodi/hello_musl/blob/master/config.nims) present in Nim's search path, `sh build.sh` from csources/ fails.
20:23:38Araqkaushalmodi: There is a PR addressing these config.nims bugs
20:24:05Araqshashlick, we discussed running 'nim e' but it's not clear this could work out
20:27:44FromGitter<kaushalmodi> Araq: Thanks. I believe you are referring to https://github.com/nim-lang/Nim/pull/9945; hope that that fixes this.
20:28:15Araqarnetheduck: I don't believe in semantic versioning. For a start, it completely ignores the problem that bugfixes can cause regressions. Secondly, it is expensive. Thirdly it cannot ever work reliably because of the immediate combinatorial explosion.
20:28:19FromGitter<timotheecour> ya I’m also curious why it couldn’t work out ; it’s weird that `nims` differs from `nimble` ; ideally a nimble file would just be a regular `nims` file that (maybe) has `import nimble_tools` to make `task` work
20:29:12shashlickAraq: I'm sure there were good reasons but it paints us in a corner
20:29:24shashlickeither compiler is forced to move faster or tools slow down
20:29:44FromGitter<arnetheduck> you don't have to believe in it - it's a communications tool for humans - it's enough that I and the person releasing the package believe and understand the ideas behind it, and act accordingly
20:30:10Araqyou claim "it works with version libA v2.0.x, libB v1.0.x" but to claim that you need to test N*M combinations
20:30:16FromGitter<arnetheduck> it tends to be better than nothing
20:30:30Araqand I don't believe in it because every package manager I've ever used had these problems.
20:31:01ldleworkare we talking about Nix
20:31:07shashlickwell if every library is in a separate repo, it can be tested with multiple versions of compiler in a separate CI setup
20:32:13shashlickN * M is done on a per package basis - travis is free that way
20:32:59shashlicki'm happily testing all nimgen wrappers on win/lin/osx times 0.18.0, 0.19.0 and devel every day
20:33:16Araqtravis doesn't cost money.
20:33:31Araqit does consume energy though.
20:34:01FromGitter<arnetheduck> well, it describes an intent.. of course a bugfix will change actual semantics of a function, but generally not the intended semantics - and of course some people will fuck up the versioning, but generally, and with the help of tooling like abi checkers, you're able to categorize updates into "this will improve things without my action", "this will improve things if I opt to use the new stuff" and "this needs a lot
20:34:01FromGitter... of work", each representing an order of magnitude in the effort needed
20:34:02shashlickwell stability is super expensive
20:34:32shashlickbut stability is highly valued too
20:34:55xaceas im developing a program, i leave some procedures which will be defined in the future. the thing is they are left unused and the compiler shows a hint that its unused. is there a pragma to disable the hint for that specific proc?
20:35:08Araqarnetheduck: you're describing patches for a process that IMHO does not work well.
20:35:08shashlickstability is also admittedly boring and routine but that's the cost of becoming mainstream
20:35:27FromGitter<arnetheduck> it gives library authors a free and well understood communications channel to their user base
20:35:34AraqGoogle praises its monorepo for a reason.
20:35:43xace(a pragma that disables the unused proc hint)
20:36:26shashlickxace: https://nim-lang.org/docs/manual.html#pragmas-used-pragma
20:37:18xaceshashlick: thanks
20:37:29Araqif you want stability, nail down your dependencies precisely to the point where they might be considered part of your source tree
20:37:35FromGitter<arnetheduck> google can also coerce everyone in their microcosm to comply
20:37:54ldleworkor use a good package manager like nix
20:37:58ldleworkor guix
20:38:04Araqsemantic versioning is all about making everybody comply.
20:38:05ldleworklol monorepo
20:38:09shashlickmy main concern with a giant repo is that you cannot carve out access permissions as granularly with github
20:38:19shashlickif i am only allowed to work on httpclient.nim, it's not possible
20:38:24FromGitter<arnetheduck> er, lock down versions that's what a package manager does, generally
20:38:41Araqyes, I know.
20:38:56Araqbut lock down is the opposite of "version > 1.0 < 1.6"
20:39:44FromGitter<arnetheduck> lock down is the dumb version of that.. then developers noticed that the process can be made more smooth with a bit of trust and communication
20:40:24Araqno, that is wrong. The math doesn't work out.
20:41:49shashlickso looks like we still aren't sure of offloading stdlib into separate repos
20:43:21shashlickpython has everything in one repo looks like - https://github.com/python/cpython/tree/master/Lib
20:43:48*rayman22201 joined #nim
20:43:50Araqno, we will do that. but I fundamentally disagree with this idea that a complex dependency graph by different authors will give us stable software.
20:44:09FromGitter<timotheecour> development speed of individual packages would be really slowed down if they were part of a monorepo, especially if merging PR’s for these would be same as merging PR’s for Nim repo
20:44:31Araqok, but now you are talking about "development speed"
20:44:59Araqpreviously the topic was more focussed on stability
20:45:12shashlicki like separate for ownership, freedom and speed
20:45:39shashlickstability is still the responsibility of that repo owner and there should be a CI that tests across nim versions regularly
20:46:08Araqand also across the versions of every dependency the package has?
20:46:16FromGitter<timotheecour> stability is achieved by locking down version (either with a range or with a specific tag), speed is achieved by evolving HEAD freely, independently of fact that a Nim tool may depend on mypkg 1.2.3
20:47:00FromDiscord_<Virepri> `nim_AoC_2018.nim(6, 5) Error: type mismatch: got <seq[proc (): string{.gcsafe, locks: <unknown>.}]> but expected 'seq[proc (): string{.locks: 0.}]'`
20:47:02FromDiscord_<Virepri> I have
20:47:08FromDiscord_<Virepri> no fuckin clue where to even start with fixing this
20:47:57shashlickAraq: well, it is easier to start with packages that don't have too many dependencies
20:48:07FromGitter<timotheecour> again, a Nim tool (binary or library) (say nimfind or testament) can depend on locked down versions of packages p1,p2,p3 and expose a stable API, even though packages p1,p2,p3 can evolve independently and make breaking changes in subsequent verions.
20:48:28shashlickonce those easy ones are stripped out, we can evaluate complicated dependencies later and see if they can be simplified
20:48:39shashlickbut that shouldn't stop the process today
20:49:25shashlickfinally, a Nim release will pull a specific version of a package and test that vertically
20:49:41FromGitter<timotheecour> speed of depelopment (for that package, including breaking ones) and stabilty (for clients of a locked down version of that package) are both essential and can both achievable via semver
20:49:48shashlickthat will restrict random combinations of packages
20:50:27shashlickwe are still talking about nim standard lib which will be pulled in via nimble by koch
20:50:35FromGitter<kaushalmodi> Araq: Thanks. I finally got that hello_musl Travis to pass after a long streak of fails: https://travis-ci.org/kaushalmodi/hello_musl/builds. The "fix" was to move the repo's config.nims out of the way when building Nim: https://github.com/kaushalmodi/hello_musl/commit/03ce6418c6a7b749ba8bfd3a36bd99f3f487285b
20:50:39FromGitter<mratsim> @virepri, gist of the code
20:50:47shashlicknot 3rd party packages
20:51:07FromGitter<mratsim> I don’t understand why we have .nimble, .nims and .cfg for config btw
20:51:16Araqshashlick, what you are saying is "having lots of depdendencies does not work well"
20:51:16shashlicki agree @mratsim
20:51:40FromGitter<kaushalmodi> I agree @mratsim this feels like dejavu
20:51:50shashlicksuper easy would have been a .nimble which has the cfg portion as structured comments and nims portion
20:52:00*rayman22201 quit ()
20:52:02FromGitter<timotheecour> I think we could start (today) experimenting with depending on nimble pkgs from nim tools, as an experiment (say, controlled by a flag if we’re unsure it’ll work), and see whether any of those issues are real.
20:52:10Araq.nims is the new config system, cfg is the odl config system and .nimble is for Nimble
20:52:29AraqI agree it's not optimal but I don't know what's hard to understand about it
20:52:30FromDiscord_<Virepri> ok so
20:52:35shashlickAraq: what i'm saying is have the same stdlib experience as today but have it distributed but brought together by nimble
20:52:39FromDiscord_<Virepri> I narrowed it down to algorithms.sort that's fucking me up
20:52:47Araqwhat's next? "Why do we have bikes, cars AND airplanes?"
20:52:50shashlickwe are not enabling millions of version combinations
20:53:56FromGitter<mratsim> among .nimble, .nims and .cfg, which one allow me to fly? :P
20:54:08FromGitter<kaushalmodi> .nims
20:54:20shashlickin retrospect, i think user permissions are the main advantage of separate repos, speed is effectively the same
20:54:40shashlicktesting and packaging is effectively the same
20:55:19*narimiran quit (Remote host closed the connection)
20:55:59FromGitter<timotheecour> > speed is effectively the same ⏎ ⏎ speed is essentially not the same in practice, when all PR’s are controlled by a single owner
20:56:26shashlickmeaning issues and PRs are cleaner in a separate repo?
20:56:35FromGitter<timotheecour> obviously.
20:57:16FromGitter<timotheecour> HEAD of mypkg.nim can evolve more freely in mypkg.nim without breaking Nim that would only depend on mypkg.nim 1.2.3
20:57:20shashlickof course then user management starts becoming a deal too - like I don't have access to nimble but to nim
20:58:21shashlickwell, I think devel should pull the latest tag from such repos
20:58:26shashlickcause that is the same experience as today
20:58:49shashlickbut when you post v0.20.0 or whatever, it is one snapshot of the ecosystem
20:58:57FromGitter<timotheecour> instead of discussing theory forever, I suggest we experiment with this (and I can volunteer a PR that adds a nimble dependency from a koch tool)
20:59:07Araqso ... I am running Ubuntu 16.04 LTS, trying to install KDE.
20:59:11Araqit says
20:59:29Araq"kde-core (>=5:47) but it is not installable"
20:59:50*druonysus joined #nim
21:00:17FromGitter<sotrhRaven> Araq
21:00:19Araqit's not a theory that this doesn't work.
21:00:35Araqit fails in practice. Every day.
21:00:48FromGitter<sotrhRaven> Why are you still on 16.04
21:01:00FromGitter<timotheecour> brew works for me. Sometimes it breaks. And it gets fixed quickly.
21:02:14ldleworkuse nix
21:02:17AraqI found a couple of packages that simply don't work in brew. And btw I don't try to break these things.
21:02:27ldleworkuse whatever combination of deps for any other combination of deps you want
21:02:40ldleworkin a cryptographically ensured reproducable way
21:02:46FromGitter<timotheecour> and it has far more complex setup (different languages, build tools) than our setup (single language, single build tool); and it uses semver ; eg https://formulae.brew.sh/formula/
21:02:47FromGitter<sotrhRaven> Every package/dependency manager has its issues. I don't think any one has it perfect.
21:03:00ldleworksome are fundamentally better designed than others
21:03:52ldleworktry to find some broken packages in nixpkgs, such that, the brokeness is with the packaging and not the actual software
21:04:28FromGitter<mratsim> Package managers break when other package managers get in play (like `pip` for Python or `cabal` or cpan or cran for Perl and R)
21:04:28FromGitter<timotheecour> > I found a couple of packages that simply don't work in brew ⏎ ⏎ have you reported a bug ? did it not get fixed? Every single issue I sent was fixed fairly quickly (some by me)
21:04:30ldleworkeverything is built automatically, and since the reproducability is higher than any other system, that means something for whether those packages will work on your laptop
21:04:32ldleworkor server
21:04:55ldleworkmratsim, that's why nixpkgs packages python, haskel, node, and so on packages themselves
21:04:58FromGitter<mratsim> I find pacman in Archlinux perfect
21:05:04ldleworklol no
21:05:14Araqldlework, if I understand you correctly 'nix' does away with the semver and uses "reproducible builds"
21:05:30ldleworkyeah, each dep is a sha
21:05:35ldleworkcontent sha
21:05:42Araqyup, that works.
21:05:47ldleworkyeah
21:05:53Araqwhy? because math, that's why.
21:05:56ldlework<3
21:05:57FromGitter<sotrhRaven> Nix is good
21:06:10FromGitter<timotheecour> there are definitely some things we can learn from brew. It learned from mistakes from prior package managers (eg macports, or other apt)
21:06:11ldleworkif you sandbox it
21:06:15ldleworkso nothing can use the internet
21:06:23ldleworkthe reproducability goes off the charts
21:06:28ldleworkpacman has nothing on it
21:07:05FromGitter<sotrhRaven> Nix is written Haskell?
21:07:21FromGitter<mratsim> We were talking about development speed as well
21:07:28FromGitter<mratsim> and maintenance cost
21:07:28ldleworkC++ I think
21:07:52FromGitter<sotrhRaven> Yep c++
21:08:12AraqI claim maintenance cost is unreasonable for semver.
21:08:24FromGitter<arnetheduck> there are two steps to package management - semver does one of them, locking the other... semver is about version discovery: which versions are likely to work with which other versions.. this is the communications part.. once you've done that, you lock down and test your stuff, using nix-style hashes or whatever other maths you choose. then the next time around, you use the first part again - the fuzzy trusty part
21:08:24FromGitter... - to help you find a matching set of packages that work together.. nowhere in this process is there an N*M for you, as a package consumer
21:09:00ldleworkis semver actually useful?
21:09:09FromGitter<arnetheduck> you only test one version of each package you depend on, but to find that version, you use these communications tools that help you narrow down the scope of where you have to look
21:09:57FromGitter<arnetheduck> what's the maintenance cost of semver? I don't understand.. "nothing" is the equivalent of doing a major semver upgrade every time
21:10:05ldleworkis bisecting that hard?
21:10:07AraqI just use 'git master' for all packages and create PRs to make it compatible with each other :P
21:10:11ldleworkisn't bisecting the worst case
21:10:16ldleworkdon't consumer of libs have some context?
21:10:28ldleworkwouldn't it be like araq says, start at Master, if that doesn't work
21:10:31FromGitter<mratsim> @Araq that works until you want a stable version and a devel version
21:10:31ldleworkuse latest release
21:10:36ldleworkif that doesn't work, go back a few versions?
21:10:51ldleworkblindly depending on semver to cover the interoperability of all software seems...
21:10:56ldleworkidealistic
21:11:14FromGitter<mratsim> welcome to dynamic languages
21:11:14AraqI mean I use master for this "exploration" phase
21:11:19ldleworksame
21:11:28ldleworkwhat does dynamic have to do with anything
21:11:32ldleworkthis is about contracts
21:11:42ldleworkinteroperability
21:11:46ldleworkit's not even about software
21:11:48FromGitter<mratsim> Try to ship Python
21:12:00FromGitter<mratsim> we need dockers or virtualenv
21:12:02*Sembei joined #nim
21:12:04ldleworki have like 50 different subtley different python installs on NixOS
21:12:13ldleworkeach package that uses Python can specify EXACTLY what it needs
21:12:13Araq^^ :D
21:12:23ldleworkif two packages specify the same things
21:12:26ldleworkthey share a python
21:12:31ldleworkit works marvelously and NEVER breaks
21:12:32FromGitter<timotheecour> @araq `brew` doesn’t have this combinatorial explosion problem. brew is designed so that you can `brew install foo` at all times (and, rarely, something might break, it gets fixed quickly) ⏎ Each formula (foo.rb) in homebrew-core is updated regularly to a git tag of upstream package foo in a way that works with rest of packages in brew ecosystem.
21:13:10FromGitter<mratsim> well, ship that to a user then
21:13:30ldleworkin NixOS "nix-env install foo" the equivalent is consider basically what you do as a newbie to try things out
21:13:38ldleworkand then you quickly NEVER install packages interactively
21:13:51ldleworkand then, further, you basically try to NEVER install packages on your system
21:14:06ldlework(but you still do of course, its just you'd prefer not to)
21:14:21ldleworkbut installing packages on your system doesn't matter for the same reasons it would on arch
21:14:23*Pisuke quit (Ping timeout: 268 seconds)
21:14:25ldlework(dep interactions)
21:14:29ldleworkthose don't happen on NixOS
21:14:50ldleworksimply because it's easy to delete a shell.nix file than something from your actual system configuration
21:15:26FromGitter<arnetheduck> btw Idlework, do you use NixOS on a day-to-day system?
21:15:30ldleworkyup
21:15:37ldleworkand since i know my system will never break
21:15:44FromGitter<arnetheduck> gnome?
21:15:47ldleworkand if my laptop fails and I have to get a new one
21:16:00FromGitter<sotrhRaven> I may have try it again it's been a while
21:16:00ldleworkthat it will be a matter of hours until I have the -same exact- system running on a new laptop
21:16:07ldleworkI can make huge investments into my workstation environment
21:16:11ldleworkcustomizations and automations
21:16:18ldleworkbecause I know once it works I never have to touch it again
21:16:25ldleworkon a new laptop I wont "have to rememeber" anything
21:16:39ldleworkso i have for example 100% global realtime theming :)
21:16:41ldleworklet me get a video
21:17:03ldleworkhttp://ldlework.com/projects/cards/la-karda/
21:17:06ldleworkoops
21:17:09ldleworkhttps://www.youtube.com/watch?v=sVHlYcKVerE
21:17:13ldleworkhttps://www.youtube.com/watch?v=1hJQWxx3dqA
21:17:21ldleworkthe second one is most recent
21:17:31ldleworkwhere even my wm reacts to the theme
21:17:36FromGitter<sotrhRaven> Cool
21:17:38Araqthis is becoming #nim-offtopic
21:17:42ldleworkyeah
21:18:07ldleworkwell it is an example of what you can get on with, once package management is not something you have to think about all the time and reproducability is Reproducability
21:18:08FromGitter<sotrhRaven> What de are there? That looks like i3.
21:18:09ldleworklast thing I'll say
21:18:19ldleworkthere is a Nix equivalent for Emacs called straight.el
21:18:21ldleworkwhich I also use
21:18:22FromGitter<arnetheduck> reminds me of enlightenment :)
21:18:22FromGitter<timotheecour> I think what’s missing is the equivalent of `homebrew-core` mono-repo that specifies a set of git tags for each package that work well together so that `nimble install foo` would work for all `foo`
21:18:41ldleworkso OSes are not the only thing that are adopting pure package management
21:18:46Araqthat's the missing "lockfiles" feature of Nimble, yeah
21:18:50*ldlework fingers nimble
21:20:56FromGitter<timotheecour> (not sure if you were replying to me regarding lockfiles?) lockfiles feature is needed but for other reasons : speed (so that nimble install won’t rebuild dependencies when safe to do so)
21:21:27AraqI think lockfiles are about reproducible builds
21:22:05FromGitter<timotheecour> all we need is a mono-repo for ecosystem of nimble packages that are co-installable; some of these packages (like llvm@6 in brew), will have different versions co-installable; that’s a separate topic we can discuss
21:22:41ldleworkdon't put the packages into a monorepo
21:22:46ldleworkput the packaging into a monorepo
21:22:53ldleworkif you can't do that, make nimble better
21:23:12FromGitter<timotheecour> so we can largely avoid that combinatorial explosion : note that “dub” (in D) HAS this combinatorial explosion issue and it breaks often; brew does NOT.
21:23:41Araqok, and Nimble does have it too.
21:24:11FromGitter<timotheecour> > don't put the packages into a monorepo ⏎ ⏎ the monorepo will not have the packages, only the package versions
21:24:29ldleworkit's not really a "monorepo" then
21:24:35ldleworkit is just a repo for tracking packaging
21:24:44ldleworknixpkgs, nimpkgs
21:24:59Araqbtw assuming brew works really well, it takes them about 15 maintainers
21:25:02Araqhttps://github.com/Homebrew/brew#who-are-you
21:25:22*jjido quit (Ping timeout: 250 seconds)
21:25:37FromGitter<timotheecour> it’s a monorepo: u make a PR to change version foo in a single repo, eg: https://github.com/Homebrew/homebrew-core/pull/35043/files
21:26:24ldleworkyeah but the monorepo doesn't represent what could be separate repos
21:26:32ldleworklike, you said, it isn't a mono repo of all the package sources
21:26:34Araqdo we want a system with 15 maintainers whose whole job is to keep nimble packages working?
21:26:46ldleworkits just a repo containing files that describe packages
21:26:52ldleworkand where to get package sources
21:27:02FromGitter<timotheecour> it has lots of maintainers but they’re solving a much more complex problem that we’re facing, as i said: we have 1 language and 1 build tool to support; they have a zoo of different languages / build tools
21:27:09FromGitter<timotheecour> (and many many more packages)
21:27:20kungtotteIsn't that what Nimble already is? A repo to describe packages and where to get them.
21:28:04ldleworkalso https://www.youtube.com/watch?v=1hJQWxx3dqA
21:28:22ldleworkkungtotte: yes, i'm balking at the misuse of monorepo
21:28:39ldleworkalso http://blog.appliedcompscilab.com/monotonic_versioning_manifesto/
21:28:43ldleworkfor a third option
21:29:06FromGitter<timotheecour> no, nimble (as of today) doesn’t guarantee packages can be co-installed
21:30:05AraqI would simply use dates for the version, this way I can assume that gcc-2018-04 works with nim-2018-06 (or not... :-)
21:30:30ldleworkjust use a content sha
21:30:38ldleworkthen make a system for labels to shas
21:30:43Araqthe content sha has no timestamp
21:30:46ldleworkso you can refer t o329423 as nim-2018, etc
21:30:46shashlickOk so bringing all this to some conclusion - what are the near term decisions?
21:31:09shashlickDo we want to spin packages out and pull in with nimble or not
21:31:20shashlickThose with zero dependencies for starters
21:31:33FromGitter<timotheecour> date doesn’t work if you have a bugfix 2.7.2 => 2.7.3 on branch 2.x.x even though latest is 3.x.x
21:31:53ldleworkanother thing that the nix system has is overrides
21:32:02ldleworkso let's say you have a system of content pinning
21:32:14ldleworkand in nimble foo v2.5 is set to use bar v1.1
21:32:30ldleworkbut darn you'd really like to use foo2.5 with bar0.8
21:32:42ldleworkand you happen to know, in a semver interoperability sense that that works
21:32:52ldleworkwell in nix you can just override this one detail
21:32:59ldleworkif it builds good for you
21:33:12Araqtimotheecour: then you use different names for different product (lines) :-)
21:34:14Araqand it works for the C++ standard because they don't have multiple branches.
21:34:16FromGitter<timotheecour> my proposal is we should start this monorepo (exact same concept as https://github.com/Homebrew/homebrew-core) of packge references (starting from a small number,eg jester,nim-regex,cligen etc, growing over time) ; eg call it nimble-core
21:34:52AraqI will regret this but ... wanna write an RFC? :D
21:35:03FromGitter<timotheecour> I expect it to be incredibly simpler than homebrew-core due to our more controlled setup
21:35:28FromGitter<timotheecour> sure.
21:35:37Araqgood, thanks.
21:35:59ldleworknews.ycombinator.com/nim-adopts-brew-packaging-strategy
21:36:06FromGitter<timotheecour> Btw: it’s very related (maybe not identical) to https://github.com/nim-lang/Nim/issues/8638
21:36:16ldleworkthat's gonna be a good day :)
21:36:33*omenar joined #nim
21:36:42Araqshashlick, well I think we'll just continue with moving packages out of Nim and ideally we can then later move even packages that Nim's tooling depends on
21:37:28FromGitter<timotheecour> awesome.
21:38:01Araqand when something breaks I can say "I told you" and feel good
21:38:16Araqwin-win situation.
21:38:32FromGitter<timotheecour> sounds good to me; and yes, it’ll break, and get fixed.
21:39:12FromGitter<arnetheduck> how's 19.2 doing btw? :)
21:39:50FromGitter<timotheecour> ok for https://github.com/nim-lang/Nim/pull/9925 @araq what name should I use then? `getCurrentCompiler`?
21:39:53FromGitter<mratsim> I used to see miran backports on many of my issues last month but now it’s pretty quiet
21:40:35FromGitter<timotheecour> (`selfExe` just doesn’t match the rest of stdlib naming scheme)
21:41:12Calinoufile size can also be a concern, but Qt apps are still fairly large for the most part so it's not exclusive to Electron
21:41:22Calinouwow, I scrolled way up and didn't realize that
21:41:33CalinouI wish Quassel displayed something like Discord when you scrolled up :P
21:42:59Araqmratsim: I've been waiting for kaushalmodi to return and take a look at my nightlies travis build setup...
21:43:36FromGitter<kaushalmodi> Araq: And I have returned.. today
21:43:42FromGitter<kaushalmodi> :)
21:44:17Araqtimotheecour: maybe even 'getCurrentNimCompiler'
21:44:34Araqor getCurrentNimExe
21:44:39FromGitter<timotheecour> ok
21:46:14FromGitter<timotheecour> for https://github.com/nim-lang/Nim/pull/9927 : I’m all for `quote do` when feasible, but there are valid use cases for `parseStmt` ; eg: `nimterop` relies on that; or any time you need a human provided string (I have use cases for that)
21:47:22AraqI still don't see why we need pushinfoContext here. Nor why we suddenly need a new way to render trees in an error message
21:47:54Araqyou ask me how to do it, I don't know, I look up how it's done elsewhere in the compiler and that's my answer
21:48:10Araqprobably "blah blah: " & renderTree(n)
21:48:20FromGitter<timotheecour> i need a way to show the expression that failed ; otherwise what u currenlyy get is a completely useless error msg when parseStmt(s) fails (when s is generated)
21:48:33Araqand yeah, I know these multiline error messages are bad for tooling, that's a different issue though
21:54:23FromGitter<timotheecour> > renderTree(n) ⏎ ⏎ will try, thanks!
21:54:32Araqshashlick, oh and dom96 himself likes Nimble to use 'nim e' instead, so, it's worth thinking about it
21:54:53*stefanos82 quit (Remote host closed the connection)
21:56:08shashlickI'm sure there were some road blocks forcing this path
21:56:17shashlickWould be good to get context
21:57:39Araqwell Nim is written in Nim and Nimble is written in Nim and usually "use via library" is much better than "use via IPC"
21:58:12Araqand to be fair, the compiler-as-an-API thing got better and better, not worse
21:58:40Araqbut with our split Nimble needs to be able to build against old compiler API versions
21:59:42Araqand a compiler API is hard to get right and I would enjoy the freedom to break it again
21:59:49FromGitter<timotheecour> and, same can be said about tools that depend on compilerapi, eg nimfind, nimsuggest (and maybe one day, nimdoc ); these have same requirement on depending on nim compiler as a library
22:00:04shashlickSo today nimble and c2nim are the two consumers I know of
22:00:21shashlickOh ya those too
22:00:31Araqnimsuggest, nimfind, nimpretty, nawabs, nimedit
22:00:50Araqwould be further examples
22:00:52shashlickBut only nimble bundles in the full compiler, others just use portions? Is that right?
22:01:14Araqusually all these tools use the VM but not the C codegen
22:01:44shashlickI see, so solving this for nimble doesn't really go far enough
22:02:24shashlickIs it the best use of time, or should I look into splitting out stdlib instead
22:02:38Araqyes it would because your concern is the coupling of Nimble and Nim releases
22:02:40FromGitter<timotheecour> so the answer to `nimble updates are too slow coz tied to nim releases` is perhaps adding a `nimble update` (to self update either from latest nimble or latest stable nimble)
22:03:26shashlickWell how about this - compiler api should be self contained, not require any lib files like nimble does
22:04:14shashlickThen it's irrelevant what nimble and Nim executables are put together
22:04:16FromGitter<arnetheduck> btw, you can still have a monorepo and multiple packages (assuming nimble or whatever supports this well) - you can even version them together if that's easier for you - but it gives you the flexibility to make more granular should you want to, and it gives a clean way to move packages out as well - just update the reference to a new location when you no longer want to maintain together, and you're done..
22:05:36shashlickOf course compiling nimble on the fly will link with the installed Nim
22:05:59shashlickBut you could make nimble with musl and make binary releases instead
22:06:12dom96The ideal is that Nimble can call `nim foobar ...` to get whatever functionality it needs for nimscript evaluation
22:06:21dom96nimble depending on the compiler is a pain
22:06:47shashlickWhat was the main motivation dom96?
22:06:56dom96motivation of what?
22:07:06shashlickFor pulling the vm in?
22:07:28shashlickRather - why did nim e not work
22:07:45Araqpre-install hooks?
22:08:17Araqpost-install hooks, all these things your own .nimble files use?
22:08:38dom96I never looked into it too deeply, Araq implemented nimscript support initially :P
22:08:52shashlickWell why couldn't they just be a nims file?
22:08:56AraqI also kept it working
22:09:51FromGitter<timotheecour> ya, ideally a nimble file would just be a nims file with a `import nimble_tools` (or similar concept)
22:10:14shashlickWell we need a migration path for existing packages
22:10:23FromGitter<timotheecour> that could be done transparently
22:10:37dom96well no, you should be able to tell the compiler "hey, import this implicitly"
22:10:46dom96or you know... just prepend "import ..." before eval
22:10:47FromGitter<timotheecour> without having to change any nimble file (just change nimble repo )
22:10:48Araqyeah, don't break the packages, patch the .nimble file in a buffer and hand that to 'nim e' instead
22:11:15shashlickSo is it as simple as loading the nimble file, removing out non nimscript, prepend some other stuff then running Nim e?
22:11:30Araqwe don't know
22:11:39Araqit's possible that it can work out
22:11:56shashlickOk I'll experiment on it
22:12:04dom96yeah, please do try it
22:12:23FromGitter<timotheecour> +1
22:12:33shashlickTwo more real action items are splitting packages.json and identifying packages to spin out
22:12:42Araqwell it's not the most pressing thing you can do
22:13:23shashlickSo spun out packages are still to be treated as stdlib and pulled into the CI and packaging
22:13:34Araqas I said, you can also spend the effort in more frequent Nim releases that bundle Nimble
22:13:37dom96splitting packages.json?
22:13:45FromGitter<arnetheduck> all such things are so much easier in a declarative world - the way to add procedural support to that is through controlled extension points - gives you the best of both worlds
22:14:24FromGitter<timotheecour> @dom96 Splitting => https://github.com/nim-lang/packages/issues/777#issuecomment-446712863
22:14:25Araqarnetheduck, no they don't, declarative+procedural support is terrible
22:15:03Araqfor example, that's what travis does and it's undebuggable
22:15:06FromGitter<arnetheduck> why is that? you get your basic functionality served to you with tools, helpers and everything else, the rest is plugins
22:15:22FromGitter<arnetheduck> why is travis undebuggable?
22:15:29*PMunch quit (Remote host closed the connection)
22:15:34Araqtravis' linter cannot even give line numbers because it's just a YAML file
22:15:47Araqand by the time they do the linting they lost the line information
22:15:54FromGitter<arnetheduck> you can easily turn a declarative config file into a procedural one - not so, the other way around
22:15:55FromGitter<timotheecour> that’s the old nim.cfg vs config.nims debate again.. separate issue.
22:20:02Araqthe other way round is trivial, you add 'echo' statements to your nimscript
22:20:22Araqwhich is exactly why one is debuggable and the other isn't.
22:22:26dom96huh, it's never the travis file that is in need of debugging
22:22:35dom96it's the commands that it runs, which are procedural...
22:22:47Araqhahahaha
22:23:07Araqyeah right. same for SQL queries or regexes.
22:23:16*enigmeta_ joined #nim
22:23:29*msmorgan_ joined #nim
22:24:43*snowolf_ joined #nim
22:26:58Araqbut even that were true, the mixture ensures I cannot run the Bash fragments on any local machine to debug it
22:29:12*reveres joined #nim
22:29:12*Miguelngel[m]1 joined #nim
22:29:15*zacharycarter[m4 joined #nim
22:29:15*sg-james[m]1 joined #nim
22:29:16*zielmicha[m]2 joined #nim
22:29:20*toofly[m]1 joined #nim
22:29:26*enigmeta quit (Ping timeout: 250 seconds)
22:29:26*msmorgan quit (Ping timeout: 250 seconds)
22:29:28*Demos[m] quit (Ping timeout: 250 seconds)
22:29:45*revere quit (Ping timeout: 250 seconds)
22:29:45*toofly[m] quit (Ping timeout: 250 seconds)
22:29:45*sg-james[m] quit (Ping timeout: 250 seconds)
22:29:45*zielmicha[m] quit (Ping timeout: 250 seconds)
22:29:45*Miguelngel[m] quit (Ping timeout: 250 seconds)
22:29:45*zacharycarter[m] quit (Ping timeout: 250 seconds)
22:29:45*ArchieT[m] quit (Ping timeout: 250 seconds)
22:29:45*FromGitter quit (Ping timeout: 250 seconds)
22:29:45*snowolf quit (Ping timeout: 250 seconds)
22:29:45*gh0st[m] quit (Ping timeout: 250 seconds)
22:29:45*reveres is now known as revere
22:29:45*msmorgan_ is now known as msmorgan
22:29:45*enigmeta_ is now known as enigmeta
22:30:11*ArchieT[m] joined #nim
22:30:29*FromGitter joined #nim
22:30:32*gh0st[m] joined #nim
22:31:09*Demos[m] joined #nim
22:34:54*omenar quit (Remote host closed the connection)
22:35:25*fthe joined #nim
22:35:28*omenar joined #nim
22:36:01*omenar quit (Read error: No route to host)
22:39:16shashlickOk so any votes on a module or group of modules we could spin out to a separate repo?
22:39:37dom96Please elaborate
22:40:02FromGitter<timotheecour> maybe the newly added lib/diff.nim ?
22:40:51dom96oh, you want to move stdlib modules into nimble
22:40:58shashlickYa
22:40:58dom96nre please
22:41:03shashlickHow about http*
22:41:11dom96either that or re
22:41:41dom96What's wrong with httpclient?
22:41:52dom96or rather, why do you want it out of the stdlib?
22:42:18shashlickWell it will still be part of stdlib, but just maintained in a separate repo
22:42:47dom96What's the motivation for that?
22:43:00shashlickWill get pulled into Nim via nimble
22:43:15shashlickAnd user experience will be identical to today
22:43:45FromGitter<timotheecour> `Will get pulled into Nim via nimble` => at a specific version 1.2.3
22:43:52shashlickBasically separate repo means new contributor can be given access just to that repo
22:43:54Calinoudom96: Travis advises putting your logic into a dedicated script file if it grows too big
22:44:00shashlickSeparate issues and PR's
22:44:08Calinouit's what I do in most of my projects, this way you also get syntax highlighting, shellcheck, etc
22:45:00FromGitter<timotheecour> simplest might be to start with tools instead of stdlib packages
22:45:11dom96shashlick: I don't understand why you're focusing on specific modules. Either move the whole stdlib or nothing.
22:45:16FromGitter<timotheecour> `./koch tools` would then nimble install them.
22:46:18dom96In any case, I don't think it's a good idea
22:46:23shashlickCause expertise are not universal
22:46:29dom96The benefits don't outweigh the pain
22:46:35dom96Moving tools I am 100% behind though
22:46:40shashlickI can contribute to http stuff but not regex
22:46:59FromGitter<timotheecour> right, let’s focus on tools for now since it’s not controversial
22:47:13shashlickOk that's fine with me
22:47:53dom96oh, tools are controversial too
22:48:16FromGitter<timotheecour> So the only change is: ⏎ everything identical until `./koch tools` ; that command then builds nimble; then calls nimble `install nimfind` (u could start with that)
22:48:18dom96In fact, if it wasn't for me Nimble would probably be in the Nim repo too :P
22:49:59FromGitter<arnetheduck> shashlick, I think the contributor thing is a little weak as far as reasons go - ie monorepo makes version management a lot easier overall.. in fact, I'd think that git gives you enough equipment to be very liberal with your access mgmt - vast majority of developers are honest and you can always roll back any damage and revoke access
22:52:19dom96After using phabricator for a while I'm actually rather disappointed with GitHub
22:52:29dom96It really doesn't scale well for repos as large as Nim
22:53:34dom96Ideally we should get notifications for things we actually have knowledge about and can contribute to. Right now I get notifications for any issue on any random repo I am watching.
22:54:35FromDiscord_<Virepri> ok here's a doosy
22:55:00FromDiscord_<Virepri> Why is it that when I assign to a (initialized) table, I get a key error?
22:55:03FromDiscord_<Virepri> it just makes no sense, man
22:55:16FromGitter<zetashift> example>
22:55:30FromGitter<zetashift> only github notifications I get is from Arraymancer :P
22:55:34FromDiscord_<Virepri> `potVertCols[id] = initIntSet()`
22:55:44FromDiscord_<Virepri> this is causing a KeyError
22:55:55FromDiscord_<Virepri> even though I'm assigning to it 🤔
22:56:23dom96Virepri: gist your code
22:56:42FromGitter<zetashift> does it work with potVertCols.add(key, val): https://nim-lang.org/docs/tables.html#add%2CTable%5BA%2CB%5D%2CA%2CB ?
22:57:28FromDiscord_<Virepri> correction: attempting to deep copy an intset into the slot is causing problems
22:57:38FromDiscord_<Virepri> ewen though I've already assigned to it.
22:57:43FromDiscord_<Virepri> even though I've already assigned to it.
23:00:10FromGitter<mratsim> @zetashift Sorry :P I work on it by batches :P
23:00:28FromGitter<mratsim> probably a couple updates during the weekend as I want to release a new version
23:00:32FromGitter<zetashift> it was a compliment! I love it
23:01:03FromGitter<mratsim> then I will change the backend and break backward compatibility so it will be silent for at least 2 months or so I guess.
23:01:34FromGitter<zetashift> Are you gonna switch the backend to laser?
23:01:39FromGitter<mratsim> yes
23:01:50FromGitter<zetashift> Noice
23:02:15FromGitter<mratsim> but I have lots of optimisations to do. I can’t trust anything to be implemented fast. Even math.h
23:02:57FromGitter<mratsim> exp and log can be improved 10x.
23:04:09FromGitter<mratsim> But right now I’m trying to get my Shakespeare neural net to learn :P
23:04:30FromGitter<mratsim> seems like everyone is struggling even on the mainstream NN packages.
23:06:05*abm quit (Ping timeout: 244 seconds)
23:07:50shashlick@arnetheduck: I agree, if it isn't really valuable then we can drop it
23:08:39shashlickBut I'm also not a fan of being too conservative of what belongs in the stdlib
23:12:53*abm joined #nim
23:16:07*fthe quit (Ping timeout: 240 seconds)
23:24:20*fthe joined #nim
23:28:24*fthe quit (Remote host closed the connection)
23:29:57*ng0 quit (Quit: Alexa, when is the end of world?)
23:40:37*martin2 joined #nim