00:00:06 | * | ghost64 quit (Quit: See you!) |
00:01:12 | * | ghost64 joined #nim |
00:01:31 | shashlick | I'm here |
00:01:36 | shashlick | Still 6pm here |
00:04:35 | Araq | https://github.com/nim-lang/Nim/blob/devel/compiler/scriptconfig.nim#L41 you need to do something like this |
00:05:50 | shashlick | I'm familiar with that file, but how do I restrict it to nimscript only and not compile time |
00:06:39 | Araq | register this stuff in a helper proc that you call from main.nim |
00:07:16 | Araq | context: commandEval() |
00:08:03 | shashlick | Ok I'll take a deeper look |
00:08:37 | shashlick | I presume you are talking about adding this to Nim proper and not custom fork or compiling in compiler |
00:10:26 | * | zachk quit (Changing host) |
00:10:26 | * | zachk joined #nim |
00:12:06 | Araq | yeah, however |
00:12:53 | Araq | notice that exposing 'stdin' will be harder than specializing stdin.readLine as a single operation, proc readAllFromStdin or something |
00:14:57 | Araq | but I guess you can 'cast' the 'File' to an int64 and use the intVal field internally |
00:16:14 | shashlick | So adding to setupVM won't expose stuff to macros and other compile time stuff? |
00:16:57 | Araq | I don't remember |
00:17:09 | Araq | I think setupVM is what everything can use :-/ |
00:23:16 | shashlick | Ok I'll experiment and keep you posted |
00:27:21 | FromGitter | <zacharycarter> I'm eager to see whatever you come up with - not entirely sure what your goal(s) is but any VM stuff interests me |
00:36:29 | Araq | what do you wanna know? use a register based VM with "super instructions". best design for performance and comparable in complexity to the terrible "stack based" VMs |
00:41:11 | * | kapil____ quit (Quit: Connection closed for inactivity) |
00:41:21 | FromGitter | <zacharycarter> mm just the topic interests me |
00:42:19 | FromGitter | <zacharycarter> I've read through Nim's VM code a bit and extended it to support a few things |
00:42:44 | FromGitter | <zacharycarter> kind of like how nimble does - so that I could write my own syntax for config files - but this was a silly experiment |
00:43:19 | FromGitter | <zacharycarter> I didn't try to actually make it support any more of the stdlib, which would have been a better use of my time - but I'm sure much more difficult as well |
00:51:19 | Araq | not really difficult, but tedious and in the end that BDFL asshole may reject it |
00:56:56 | FromGitter | <timotheecour> Woohoo! https://github.com/nim-lang/Nim/pull/10150 `enable FFI at CT` works ! |
01:03:23 | Araq | wow, impressively clean patch :-) |
01:03:59 | Araq | too bad the stdlib is littered with 'var THIS_IS_A_CONST {.importc.}: cint' hacks |
01:07:50 | Araq | hmm go to sleep or try out my little alternative exception handling codegen strategy |
01:17:04 | FromGitter | <Clyybber> @timotheecour Congratulations, good job and a happy new year :D |
01:25:31 | rayman22201 | very cool new years gift timotheecour! |
01:25:57 | rayman22201 | happy new years to those who rotated into the new year already :-) |
01:38:28 | FromGitter | <zacharycarter> @timotheecour nice! |
02:01:21 | shashlick | Brilliant! |
02:01:31 | shashlick | Happy new year folks |
02:04:38 | FromGitter | <arnetheduck> 4 hours to go from where I'm looking, but likewise - HNY! |
02:17:17 | FromGitter | <timotheecour> thanks! happy new year ya'll! meilleurs voeux |
02:26:35 | * | zachk quit (Quit: Leaving) |
02:40:25 | FromGitter | <zacharycarter> didn't realize I could do this |
02:40:31 | FromGitter | <zacharycarter> but this is pretty sweet - ⏎ ⏎ ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=5c2ad31fbabbc178b20b46d1] |
03:00:34 | * | banc quit (Quit: Bye) |
03:16:21 | * | banc joined #nim |
03:19:15 | * | glassofethanol joined #nim |
03:19:24 | glassofethanol | Happy new year! |
03:19:34 | * | glassofethanol left #nim (#nim) |
03:22:26 | * | xace quit (Read error: Connection reset by peer) |
03:22:43 | * | xace joined #nim |
03:26:07 | * | kapil____ joined #nim |
03:28:55 | * | vlad1777d joined #nim |
03:55:31 | FromDiscord_ | <citycide> Araq, slashlick: > what's your github account again? genocide ? |
03:55:31 | FromDiscord_ | <citycide> |
03:55:31 | FromDiscord_ | <citycide> That sounds like a mashup of myself & geno :) |
04:23:20 | * | thumbs_scum quit (Ping timeout: 272 seconds) |
04:28:03 | FromDiscord_ | <aolko> hey there |
04:28:31 | FromDiscord_ | <aolko> i've been told nim is more `developer friendly` than rust |
04:28:42 | FromDiscord_ | <aolko> so i've decided to check |
04:28:59 | FromDiscord_ | <aolko> how bad is the windows tooling btw? |
04:30:14 | FromDiscord_ | <aolko> also how low is the entry level? |
04:32:01 | Calinou | happy new year! |
04:32:32 | FromDiscord_ | <aolko> and yes hny 2019 |
04:34:49 | rayman22201 | aolko windows support is pretty good. The BFDL Araq uses windows as his primary machine and visual studio code is well supported. |
04:35:14 | FromDiscord_ | <aolko> how about intellij plugins? |
04:35:47 | shashlick | @citycide: :) |
04:36:20 | shashlick | @aolko Nim works very well cross platform |
04:36:43 | FromDiscord_ | <aolko> suprisingly, didn't found anything |
04:36:47 | FromDiscord_ | <aolko> surprisingly, didn't found anything |
04:37:01 | FromDiscord_ | <aolko> at least on the website |
04:37:07 | rayman22201 | intellij is not popular in the community so I don't think there is good support for it. |
04:37:10 | shashlick | I've not heard of anyone using intellij |
04:37:40 | FromDiscord_ | <aolko> but i work in jetbrains ides, vscode just doesn't have those sweet features |
04:38:36 | rayman22201 | contributions welcome lol. There is active work on getting good language server protocol support. |
04:39:01 | rayman22201 | then you could just use an intellij lsp plugin |
04:39:16 | FromDiscord_ | <aolko> anywho, what's with nim's arrays, why they are so whacked? |
04:39:25 | FromDiscord_ | <aolko> (compared to ruby and php) |
04:39:40 | shashlick | Looks like there was something earlier |
04:39:42 | shashlick | https://plugins.jetbrains.com/plugin/7829-nim-language-support |
04:39:46 | rayman22201 | ruby and php are the "whacked" ones imo lol |
04:39:52 | shashlick | No idea if it works though |
04:40:18 | shashlick | What is the issue with Nim arrays |
04:40:21 | FromDiscord_ | <aolko> no, as a php webdev i can tell you, it's arrays are the best ones, they are also universal |
04:40:36 | rayman22201 | what is your issue with Nim arrays? |
04:40:52 | FromDiscord_ | <aolko> also, `last update: Sep 26, 2015`, ouch |
04:41:25 | FromDiscord_ | <aolko> why splitting them in "tuples" and "sequences"? |
04:41:45 | rayman22201 | neither of those are arrays. Those are different data structures. |
04:42:25 | FromDiscord_ | <aolko> oh, makes it worse tho |
04:42:34 | shashlick | Note that Nim is a compiled language, not interpreted like ruby and php |
04:42:50 | rayman22201 | Nim is closer to C++ than those languages. It is statically typed and compiled. |
04:42:54 | FromDiscord_ | <aolko> crystal tends to disagree, while borrowing ruby's arrays |
04:43:50 | rayman22201 | Nim outperforms Crystal. That "universality" has costs. |
04:44:05 | FromDiscord_ | <aolko> having these arrays would be great - `["ones","that" => "can",["fit","multiple","types" => "yknow"]]` |
04:44:22 | FromDiscord_ | <aolko> having these arrays would be great - `["ones","that" => "can",["fit","multiple","types" => "yknow"],123]` |
04:44:53 | shashlick | You pay a heavy cost for duck typing |
04:45:05 | rayman22201 | yup. That has major runtime costs |
04:45:19 | FromDiscord_ | <aolko> i can only heavily shrug, besides sugar would be neat |
04:45:50 | FromDiscord_ | <aolko> even python has braces, as a pip package |
04:45:56 | rayman22201 | Nim can do similar things with variant types, which are checked at compile time and compile down to C enums. |
04:46:03 | rayman22201 | Rust does not have this |
04:46:12 | FromDiscord_ | <aolko> see: https://pypi.org/project/brackets/ |
04:46:57 | FromDiscord_ | <aolko> it would be fitting that this would be a part of `sugar` package |
04:47:11 | shashlick | Anything is possible with Nim macros |
04:47:11 | rayman22201 | It's way too expensive. We don't want. |
04:47:22 | rayman22201 | You can totally make a macro to do it though |
04:47:24 | shashlick | Someone should be motivated to build it |
04:47:41 | shashlick | I do miss the super flexible python dictionaries |
04:47:43 | FromDiscord_ | <aolko> you may not want that, understandably, unfamiliar people might |
04:47:50 | FromDiscord_ | <aolko> and newbies too |
04:48:14 | FromDiscord_ | <aolko> i have no clue on haw to make such macros...or any nim macros |
04:48:15 | shashlick | But I really like the performance |
04:48:18 | FromDiscord_ | <aolko> how* |
04:48:20 | rayman22201 | newbies should learn the costs of their "sugar". not just take it for granted. but that's just my opinion |
04:48:27 | shashlick | That's why I ditched python |
04:48:53 | FromDiscord_ | <aolko> (meanwhile delphi is very newbie friendly and very performant) |
04:49:07 | rayman22201 | lol. Delphi is not performant |
04:49:10 | shashlick | Plus the fact that so many of my bugs get detected at compile time |
04:49:18 | FromDiscord_ | <aolko> it is, worked with it |
04:49:24 | rayman22201 | so did I |
04:49:26 | shashlick | Nim does have some Delphi legacy |
04:49:54 | rayman22201 | Nim was originally written in Pascal, so we know all about that style of language. |
04:49:56 | shashlick | https://github.com/nim-lang/pas2nim |
04:50:09 | FromDiscord_ | <aolko> can it do VCL? |
04:50:27 | FromDiscord_ | <aolko> oh, it can't |
04:50:35 | FromDiscord_ | <aolko> ouch |
04:50:53 | * | vlad1777d quit (Ping timeout: 245 seconds) |
04:51:39 | rayman22201 | weird thing to say. You can probably make bindings for it. |
04:51:50 | rayman22201 | It's a small community, so it probably hasn't been done yet. |
04:52:09 | FromDiscord_ | <aolko> not as small as rust's |
04:52:17 | * | Tyresc quit (Quit: WeeChat 2.4-dev) |
04:52:26 | rayman22201 | what? It's much smaller than Rust |
04:52:34 | FromDiscord_ | <aolko> ouch |
04:53:09 | rayman22201 | ouch? |
04:53:23 | FromDiscord_ | <aolko> oof with taste, if you will |
04:54:05 | rayman22201 | popularity is not the judge of good programming languages. |
04:54:32 | FromDiscord_ | <aolko> i know, yet the bigger community is, the more tutorials and outreach people get |
04:54:48 | FromDiscord_ | <aolko> the more researched the language becomes |
04:54:56 | rayman22201 | That just takes time, and we have no big corporate backing |
04:55:02 | rayman22201 | I point you here: https://forum.nim-lang.org/t/4510 |
04:55:03 | FromDiscord_ | <aolko> the more ordinary tasks it get used for |
04:55:52 | FromDiscord_ | <aolko> https://i.imgur.com/b33TR86.png |
04:55:55 | rayman22201 | If you are looking to troll, then we don't have anything to discuss. If you are looking for a legitimate discussion of the pros and cons of our langage, I will do my best to help. |
04:56:19 | FromDiscord_ | <aolko> not trolling, 100% genuine, you detector is broken, abort abort |
04:56:24 | FromDiscord_ | <aolko> your* |
04:57:14 | FromDiscord_ | <aolko> i'm just poking around, wondering if i will regret learning nim from someone from here |
04:57:21 | * | dddddd quit (Remote host closed the connection) |
04:58:02 | FromDiscord_ | <aolko> nim by example, as they say, starting with writing sugar macros |
05:01:47 | rayman22201 | The best way to do the hash table / "array" thing you are describing would be something with variant types. Or something like the jsonobject from jsffi: https://nim-lang.org/docs/jsffi.html |
05:02:16 | shashlick | Check out tables, is a good start |
05:02:31 | shashlick | If you need more sugar, we can certainly look into it |
05:03:22 | shashlick | Most of the time, you will get questions about your design if you ask for things common in interpreted languages though |
05:03:47 | shashlick | Point is interesting though, a data structure that is more flexible |
05:06:01 | FromDiscord_ | <aolko> tl;dr i need arrays from php in nim, or at least from ruby, that's split them in two - arrays and hashes |
05:06:13 | rayman22201 | Variant types aren't flexible enough? Whenever I have ever used "tagged hash maps" or dynamically typed languages like that (and I have used everything from lisp to php to python), that structure ends up being a stringly typed mess that causes more bugs than it solves. I want a strictly typed language for a reason... so I can describe my probrem domain with the types. |
05:08:14 | shashlick | You could have an array of pointers |
05:08:18 | rayman22201 | In those languages, the implementation is always a hash table behind the scenes. It's never actually an array. When you are doing array[0] in php it's really using "0" as the key to a hash map. |
05:08:25 | shashlick | And cast back and forth |
05:08:38 | FromDiscord_ | <aolko> ¯\_(ツ)_/¯ |
05:10:09 | rayman22201 | table is definitely what you want then: https://nim-lang.org/docs/tables.html |
05:13:05 | rayman22201 | Along with this: https://nim-lang.org/docs/manual.html#types-object-variants |
05:13:49 | FromDiscord_ | <aolko> iirc tables are from lua |
05:14:21 | FromGitter | <sotrhRaven> First troll of the year. |
05:14:30 | rayman22201 | table is what Nim calls hash map. I think lua does the same |
05:15:08 | FromDiscord_ | <aolko> people and their faulty troll detectors, *sigh* |
05:15:47 | FromDiscord_ | <aolko> rayman22201, okay, that's one bit of an array, now it needs to be merged |
05:17:27 | rayman22201 | You do come off a bit harsh. Just saying... I don't come into your home and tell you that your oven is awful and that you should use an over that works like my oven. |
05:18:01 | rayman22201 | You would "merge" it, but using a variant type as the value of your hashmap |
05:18:52 | rayman22201 | Nim is about Algebraic Data Types. Again, closer to Rust, Ada, or Haskell |
05:20:46 | FromDiscord_ | <aolko> yes, pardon me, i'm just still hot from rust arguing |
05:22:22 | rayman22201 | I can appreciate that. Nobody likes the Rust evangilist strike force... I've met religious fanatics that are less stubborn... |
05:22:30 | * | Senketsu quit (Quit: Leaving) |
05:23:10 | shashlick | So static languages are more strict with types |
05:23:40 | FromDiscord_ | <Generic> the things is, in dynamic programming languages you usually already have some kind of typing implicitely in your mind |
05:23:42 | FromDiscord_ | <aolko> i just want that sugar macros with all the familiar things i know and like |
05:24:18 | FromDiscord_ | <Generic> you know, this function takes numbers, this function takes a table with that key of that type |
05:25:20 | FromDiscord_ | <Generic> in a programming language with static types you have to formulate these types for the compiler |
05:25:41 | FromDiscord_ | <Generic> and you're going to be rewarded by far better performance |
05:26:21 | FromDiscord_ | <aolko> sure but what if i want the types to be figured out by the compiler, besides in nim those are optional |
05:26:35 | FromDiscord_ | <Generic> they aren't |
05:26:35 | shashlick | Types are mandatory in Nim |
05:26:53 | FromDiscord_ | <Generic> if you provide a value, the compiler figures out which type it has |
05:27:32 | FromDiscord_ | <Generic> it just saves you typing and it looks cleaner |
05:27:38 | rayman22201 | Types are required in Nim. Nim has a smart compiler that can figure out the types automically sometimes. |
05:27:57 | FromDiscord_ | <aolko> https://learnxinyminutes.com/docs/nim/ cheatsheet says you can declare value w/o types |
05:28:37 | FromDiscord_ | <Generic> that doesn't mean it has no type, it just advises the compiler to infer it |
05:28:54 | rayman22201 | But you have to give types in other places such as function arguments |
05:29:09 | FromDiscord_ | <aolko> well, that's probably going to be a second macro, if it can be done w/it |
05:29:38 | FromDiscord_ | <Generic> as I said above, you usually know what arguments you expect to be given to a function |
05:29:52 | rayman22201 | Here is project that does runtime variant types (what you are asking for) https://github.com/yglukhov/variant |
05:29:58 | FromDiscord_ | <Generic> screw usually, always! |
05:30:12 | * | Ven`` joined #nim |
05:30:20 | FromDiscord_ | <Generic> if you don't know what kind of data you're function is working on, you're unable to write it at all |
05:31:28 | FromDiscord_ | <aolko> okay, can that variant be "embedded" more tightly? |
05:31:42 | FromDiscord_ | <aolko> w/o having to call it every time |
05:31:43 | rayman22201 | I can't vouch for the quality of that project. It hasn't been updated super recently. Yglukhov produces good code generally though. |
05:31:59 | FromDiscord_ | <Generic> no, and that's good that way |
05:32:48 | rayman22201 | You could write a macro to do a lot of the boilerplate for you. Tables + runtime variants + macros, would give you what you want aolko |
05:32:57 | FromDiscord_ | <aolko> `var v = newVariant(5) (int)` < `var v = 5 (int)` |
05:33:04 | FromDiscord_ | <Generic> maybe give us a small daily live example and we show you how to think with explicit types? |
05:33:16 | FromDiscord_ | <aolko> or just `v = 5` (python/ruby style) |
05:33:56 | FromDiscord_ | <aolko> which live example? |
05:34:42 | FromDiscord_ | <Generic> I don't try to think of something that's not possible with explicit types, instead just think of some programming problem |
05:34:45 | FromDiscord_ | <aolko> as of sugar you can look at moonscript and coffeescript, besides ruby |
05:34:55 | FromDiscord_ | <aolko> as of sugar you can look at moonscript and coffeescript, besides ruby and crystal |
05:35:34 | FromDiscord_ | <Generic> Nim isn't a scripting language, it only has a pythonesque syntax, but otherwise it's closest relatives are Pascal, C++ and maybe Lisp |
05:35:38 | FromDiscord_ | <aolko> okay, how about this one https://github.com/aLingua/pphp/blob/master/spec/syntax.md |
05:36:44 | * | Ven`` quit (Ping timeout: 246 seconds) |
05:37:02 | FromDiscord_ | <aolko> i need a toolbox for that tho, which is custom grammar notation (PEG-like), parsergen, compiler and all that in nim |
05:37:42 | FromDiscord_ | <aolko> sure it's now a webbrowser or a game, but that's one hot project |
05:37:53 | FromDiscord_ | <aolko> not* |
05:38:20 | rayman22201 | Nim has a Peg parser, and all that |
05:38:44 | rayman22201 | https://nim-lang.org/docs/pegs.html |
05:38:51 | FromDiscord_ | <aolko> yes, yet the toolbox should be useable by everyone |
05:39:07 | FromDiscord_ | <aolko> even noobs |
05:39:22 | FromDiscord_ | <aolko> to improve and hack in the language |
05:40:15 | FromDiscord_ | <aolko> that means, very sugary, very simple syntax in each and every part of the toolbox and lots of comments |
05:40:51 | FromDiscord_ | <aolko> as of notation, why peg like, i think peg can be further simplified |
05:41:05 | rayman22201 | I find Nim's syntax very simple, but I also come from years of C++ lol |
05:41:15 | FromDiscord_ | <Generic> me too |
05:41:21 | FromDiscord_ | <aolko> see:http://cjheath.github.io/treetop/ |
05:41:38 | FromDiscord_ | <aolko> a bit simplier than peg notation |
05:43:00 | FromDiscord_ | <Generic> afaik the parser of Nim is hadnwritten |
05:43:26 | rayman22201 | https://nim-lang.org/docs/pegs.html#eventParser.t%2Cuntyped%2Cuntyped |
05:43:41 | rayman22201 | That seems pretty clear imo |
05:44:15 | rayman22201 | But also, yes, the Nim parser itself is handwritten and has lots of performance optimizations |
05:44:32 | FromDiscord_ | <aolko> granted, not as simple as https://hastebin.com/ejuwolekez.nginx, let's admit |
05:46:25 | rayman22201 | True. This is going to sound like I'm trolling, but you could probably make a macro to make Nim's Peg module look like that though. Nim's macros are on par with Lisp macros in power. |
05:47:09 | rayman22201 | The thing is, we generally don't go that far, because we want to see the inner workings to have more control over performance etc... |
05:47:30 | FromDiscord_ | <aolko> wait, this one is not for nim macro, this is a separate notation, need a parsergen and a compiler tho |
05:48:03 | rayman22201 | I'm saying you could use a nim macro to simplify the syntax of the Nim parser gen |
05:48:38 | rayman22201 | If you want to see a full compiler though, you can see the Nim compiler itself. Nim is written in Nim. |
05:49:13 | FromDiscord_ | <aolko> ...without going for nim internals? |
05:49:33 | FromDiscord_ | <aolko> just starting from scratch, except the parser, due to parsergen |
05:50:31 | rayman22201 | Nim compiler maybe a bad example. too complex. Karax is a good example of Nim macros being used to make simple and powerful DSLs: https://github.com/pragmagic/karax |
05:50:59 | FromDiscord_ | <aolko> not a dsl either, sorry |
05:51:23 | FromDiscord_ | <Generic> the Nim compiler actually doesn't use many macros |
05:51:58 | FromDiscord_ | <Generic> nim macros still have to follow nim syntax rules |
05:52:04 | FromDiscord_ | <aolko> nim is just a platform for said language, it does not extend nim in any way |
05:52:06 | rayman22201 | I think maybe I don't understand your question aolko. |
05:52:23 | FromDiscord_ | <aolko> it's like crystal, it was written on ruby |
05:52:32 | FromDiscord_ | <aolko> then it got rewritten in crystal |
05:52:49 | FromDiscord_ | <aolko> same here, this pphp is getting written in nim |
05:53:00 | FromDiscord_ | <aolko> possibly to be rewritten in itself |
05:53:09 | FromDiscord_ | <aolko> bootstrapping, y know |
05:54:36 | FromDiscord_ | <Generic> sorry, I think, I also don't quite understand what want to know |
05:54:51 | rayman22201 | Something like this? https://min-lang.org/ |
05:55:26 | rayman22201 | Min is a dynamic scripting language that was written in Nim as the underlying runtime. |
05:55:48 | FromDiscord_ | <aolko> eh kinda |
05:56:03 | FromDiscord_ | <aolko> @Generic okay, step-by step |
05:56:10 | FromDiscord_ | <aolko> we grab nim, right |
05:56:44 | FromDiscord_ | <aolko> we use a parsergen to make a parser for our custom peg-like notation |
05:56:56 | FromDiscord_ | <aolko> then we write the interpreter in nim |
05:57:09 | FromDiscord_ | <aolko> then maybe a compiler...still in nim |
05:57:18 | FromDiscord_ | <aolko> then we have pphp |
05:57:32 | FromDiscord_ | <aolko> then we probably rewrite pphp in pphp |
05:57:41 | FromDiscord_ | <aolko> kinda like that |
05:58:20 | FromDiscord_ | <aolko> but given the fact pphp, is a web language we might not need a compiler |
05:58:35 | FromDiscord_ | <aolko> instead we'll need some sort of a server, like apache |
05:58:38 | FromDiscord_ | <Generic> so you're goal is to bootstrap pphp's developement by writing an interpreter for it in Nim? |
05:58:41 | FromDiscord_ | <aolko> so there's that |
05:58:57 | rayman22201 | I think I follow now. Honest question, if you want to bootstrap eventually, why not use a language you are more familiar with as a starting point? |
05:59:04 | FromDiscord_ | <aolko> yes, if pphp existed beforehand |
05:59:11 | FromDiscord_ | <aolko> it does not exist yet |
05:59:16 | FromDiscord_ | <Generic> pphp is going to be an interpreted programming language? |
05:59:28 | FromDiscord_ | <aolko> web one, better php |
05:59:34 | FromDiscord_ | <aolko> web one, better/simpler php |
06:00:09 | FromDiscord_ | <aolko> because: |
06:00:09 | FromDiscord_ | <aolko> ruby and python are p bad at being a language platforms |
06:00:17 | FromDiscord_ | <aolko> and i don't know haskell |
06:00:26 | FromDiscord_ | <Generic> if that's the case it's not really possible somewhen write the interpreter in that language |
06:00:45 | rayman22201 | lol. Haskell is good at what you are trying to do, this is true. But Haskell is also.... Haskell.... |
06:00:51 | FromDiscord_ | <aolko> then it will remain in nim, w/o further bootstrapping |
06:01:16 | FromDiscord_ | <aolko> haskell is weird, never got it |
06:01:29 | FromDiscord_ | <aolko> so the next best thing is nim |
06:01:47 | rayman22201 | Haskell is weird. I agree. I even kind of like Haskell, but it is definitely weird. |
06:01:48 | FromDiscord_ | <Generic> you can't write an interpreter in the same interpreter language, without keeping the old interpreter |
06:01:48 | FromDiscord_ | <Generic> that interprets the new interpreter |
06:01:49 | FromDiscord_ | <Generic> the next best thing would be Ocaml |
06:02:07 | FromDiscord_ | <aolko> excuse me, i have a violent allergies to brackets |
06:02:45 | rayman22201 | Nim does use brackets for generics. That may bother you also :-P |
06:02:57 | FromDiscord_ | <aolko> regular ones, not curly ones |
06:03:14 | rayman22201 | true that. Nim is also alergic to curly braces |
06:03:32 | FromDiscord_ | <Generic> they are used in the language |
06:04:03 | FromDiscord_ | <Generic> for term rewriting macros |
06:04:05 | * | kapil____ quit (Quit: Connection closed for inactivity) |
06:04:05 | rayman22201 | True. |
06:04:07 | FromDiscord_ | <aolko> anyway, how do i start with the peg-like notation? |
06:04:30 | FromDiscord_ | <Generic> do you experience with any strongly typed programming language? |
06:04:41 | FromDiscord_ | <Generic> C++, Java, Typesrcipt? |
06:04:52 | FromDiscord_ | <aolko> no, golo>java, no |
06:05:43 | rayman22201 | but back to your question. Min-lang is actually pretty similar to what you are trying to do. It is definitely possible to do what you are trying to do in Nim. |
06:06:01 | FromDiscord_ | <aolko> and i know that |
06:06:07 | rayman22201 | The pegs link I sent you is a good starting point |
06:06:30 | FromDiscord_ | <aolko> but the end result is the hastebin link i sent |
06:06:52 | FromDiscord_ | <Generic> although a hand written parser would be much more performant 😃 |
06:08:10 | FromDiscord_ | <Generic> ok, that's coming from the person who wrote nothing more than a S-exp parser in his life |
06:08:35 | rayman22201 | You aren't going to get something as clean as that paste-bin peg syntax without doing quite a bit of work. It's not built in. |
06:09:01 | FromDiscord_ | <aolko> not denying that |
06:09:39 | FromDiscord_ | <Generic> the thing is, probably nobody has used he peg module yet to something at this scale |
06:10:06 | FromDiscord_ | <aolko> it's peg-***like***, not peg |
06:10:24 | FromDiscord_ | <Generic> if you write your own macro to generate the parser it probably takes the same time as writing a handwritten parser |
06:10:53 | FromDiscord_ | <Generic> although it's going be less easy to maintain |
06:11:41 | rayman22201 | Wait, so you have a language, pphp, but you also have your own "peg like" grammar to describe the language? |
06:12:30 | FromDiscord_ | <aolko> no, first goes the egg, then the chicken |
06:12:46 | FromDiscord_ | <Generic> if the language is php like, it should probably have very fast startup times? |
06:12:56 | FromDiscord_ | <aolko> we have a custom notation ***of pphp*** that describes it's grammar |
06:13:08 | FromDiscord_ | <aolko> parsergen shall start from here |
06:13:17 | FromDiscord_ | <aolko> i.e. grab that notation |
06:13:51 | FromDiscord_ | <aolko> if you've seen the spec it's a cross of ruby and php |
06:14:54 | FromDiscord_ | <Generic> in theory it's possible to write a parser that takes such a grammar file and generates an appropriate parser |
06:15:16 | FromDiscord_ | <aolko> yup |
06:15:18 | FromDiscord_ | <Generic> but again, esp. if you want very fast startup times, you probably even want to generate an AST while parsing |
06:15:45 | FromDiscord_ | <aolko> that includes the ast and whatever is required |
06:16:16 | FromDiscord_ | <Generic> I'm repeating myself, but a handwritten parser is the way to go |
06:16:28 | FromDiscord_ | <Generic> handwritten doesn't mean it has to be ugly |
06:16:54 | FromDiscord_ | <Generic> this isn't C nor C++ |
06:16:58 | FromDiscord_ | <aolko> and it also means i will not be able to doit on my own |
06:17:28 | FromDiscord_ | <aolko> entirely at least |
06:17:37 | rayman22201 | It's a pretty ambitious project to use as your first project in a language you have never used before. |
06:17:58 | FromDiscord_ | <aolko> duh, i said before it's ***hot*** |
06:18:06 | rayman22201 | lol |
06:18:22 | FromDiscord_ | <aolko> and i kinda want to replace php |
06:18:33 | FromDiscord_ | <aolko> getting sick and tired of that oop |
06:18:35 | FromDiscord_ | <Generic> https://en.wikipedia.org/wiki/Recursive_descent_parser#C_implementation |
06:19:36 | rayman22201 | I get that. Good goals. But I would do a few smaller things in the language first to get a feel for the language first. |
06:19:47 | FromDiscord_ | <aolko> no time sadly |
06:20:01 | FromDiscord_ | <aolko> no time to waste on little things |
06:20:27 | FromDiscord_ | <Generic> if you're thinking that way, you're probably going to get anywhere |
06:20:36 | FromDiscord_ | <Generic> *nowhere |
06:21:42 | FromDiscord_ | <aolko> pardon but please spare me that, just want to carry on with the goal |
06:21:50 | rayman22201 | To give an analogy: You are asking to write a AAA video game like Crysis when you don't even really know how to make openGL calls yet... It's kind of tough |
06:22:35 | FromDiscord_ | <aolko> *you actually have a perfect cryengine for that* |
06:22:42 | rayman22201 | They write books on how to write compilers and interpeters. It's not something you just jump into |
06:23:10 | FromDiscord_ | <aolko> that's why i said i won't be able to do that entirely on my own |
06:23:21 | rayman22201 | exactly. You are basically asking how to write the equivalent of cryengine. |
06:23:54 | * | kapil____ joined #nim |
06:25:23 | FromDiscord_ | <aolko> ehhhh, wouldn't really say that, if you have such tools available - sure, let's get those running, if you don't let's make a barebones required versions of those |
06:25:42 | FromDiscord_ | <aolko> if nim'd had teetop analogue/port, i'd use that |
06:25:48 | FromDiscord_ | <aolko> maybe |
06:26:40 | rayman22201 | The closest thing to treetop is the Nim Pegs module. |
06:27:07 | FromDiscord_ | <aolko> yet grammar it offers is just raw peg |
06:27:12 | FromDiscord_ | <aolko> which sucks a lot |
06:27:23 | FromDiscord_ | <Generic> yeah, but that's the best there is |
06:27:29 | rayman22201 | That's the state of Nim atm |
06:27:36 | FromDiscord_ | <Generic> than don't use Nim |
06:27:37 | rayman22201 | again, contributions welcome. |
06:28:04 | FromDiscord_ | <aolko> sure let me get my delphi running |
06:28:54 | rayman22201 | lol. cool. go for it. |
06:29:20 | FromDiscord_ | <aolko> i hope nim's sources are heavily commented |
06:29:35 | FromDiscord_ | <Generic> you mean the compiler sources? |
06:29:47 | FromDiscord_ | <aolko> all of them, even grammar |
06:30:16 | rayman22201 | Nim is pretty comprehensible imo but it's big. |
06:30:20 | FromDiscord_ | <Generic> they probably shoudnl't be that interesting too you, since you're writing an interpreted language |
06:30:26 | rayman22201 | check out Min. seriously |
06:30:30 | rayman22201 | it's a good example for you |
06:30:55 | FromDiscord_ | <aolko> min is meh, i'd say it's far from where i'm heading |
06:31:20 | rayman22201 | Ignore all the functional programming crap. Just look at the parser. It's a good example of a handwritten parser in nim |
06:31:40 | rayman22201 | You have to separate the useful parts from the not useful parts. |
06:31:56 | FromDiscord_ | <Generic> if you want something more basic, look at the standard library json parser |
06:33:28 | FromDiscord_ | <aolko> even in the parser there's lot's of crap, references on top of references, geez |
06:33:57 | FromDiscord_ | <Generic> complexity goes in many directions |
06:34:01 | FromDiscord_ | <aolko> and just a couple of comments like `##this is a variable, lol` |
06:34:14 | FromDiscord_ | <Generic> than look at the json parser or the xml parser |
06:35:41 | Araq | actually the parser has #| comments that give the parsed syntax in ABNF and there is no need for comments because it's not for teaching you the basics of parsers, there are books for that. |
06:35:52 | FromDiscord_ | <aolko> better but still not yet as obvious |
06:38:26 | Araq | seriously, go read a book. |
06:38:44 | rayman22201 | You may appreciate something like ANTLR aolko |
06:39:02 | rayman22201 | https://www.antlr.org/ |
06:39:04 | FromDiscord_ | <aolko> no i didn't and i tried to |
06:41:06 | rayman22201 | look, you are asking for something very hard, and you don't seem to want to put the work into properly doing it. There is no language that I know of that is going to be both high performance / basis for a platform, and "fit your exact definition of easy" to make parsers. |
06:41:38 | rayman22201 | We are giving you some starting points, but we aren't going to teach you how to write a compiler. |
06:43:02 | FromDiscord_ | <aolko> may i ask who's willing to? I need cut-to-the-chase no-bs tl-dr explanation on ***howto*** so it can be implemented in practice afterwards |
06:43:13 | Araq | Hint: Parsing is the easy part in a compiler. ;-) |
06:43:42 | FromDiscord_ | <aolko> don't need one, it's interp language |
06:44:14 | FromDiscord_ | <Generic> that only makes it a bit easier |
06:44:24 | rayman22201 | Are you asking for volunteers, or are you asking for someone to hire? We are already volunteering our time to a language... Nim... and our time is valuable. If you want to hire somebody, make a bounty on bounty source or post an ad on the forum. |
06:44:36 | FromDiscord_ | <aolko> it's an open source project |
06:44:48 | rayman22201 | so is Nim |
06:44:49 | FromDiscord_ | <aolko> no payments for hiring |
06:46:31 | FromDiscord_ | <aolko> if i'd wanted to commission myself a language, i'd done that long ago |
06:47:45 | FromDiscord_ | <Generic> I actually also wanted to write my own programming languages in my most frustrated days of C++ |
06:47:56 | FromDiscord_ | <Generic> but then I learned about Nim 😃 |
06:48:01 | rayman22201 | Why would you think this is a good place to recruit people? Again. Everyone here already has found a language we like... If we didn't we wouldn't be here. |
06:48:31 | FromDiscord_ | <aolko> because it will be done ***in nim*** |
06:48:39 | rayman22201 | We already think Nim is a better Php, and a better Python, and a better Javascript, and a better C++ |
06:49:19 | rayman22201 | I'd rather just contribute to Nim and make Nim better. |
06:51:25 | rayman22201 | It's a small community. Make a forum post. Maybe somebody will be interested. I wouldn't hold my breath though. You should be more upfront with your intentions though. If you want to recruit somebody, say so, don't come in pretending that you are trying to do a project yourself. |
06:51:57 | FromDiscord_ | <Generic> without an understanding of idiomatic Nim and the theory behind interpreters, your pphp interpreter in Nim will end up similar like my failed programming languages |
06:52:15 | FromDiscord_ | <aolko> i'm not pretending, i've outright said that i won't be able todo it all by myself |
06:53:01 | FromDiscord_ | <Generic> then you're not ready to take this task |
06:53:25 | FromDiscord_ | <Generic> even if other people do some work, you still have to grasp how and what they are doing |
06:53:37 | FromGitter | <alehander42> aolko, why don't you sit down and study a bit indeed, I am sick of this |
06:54:03 | FromDiscord_ | <aolko> I need cut-to-the-chase no-bs tl-dr explanation on howto so it can be implemented in practice afterwards |
06:54:23 | FromDiscord_ | <Generic> there is nothing like that |
06:54:39 | FromGitter | <alehander42> if you can't learn how to write a simple language with today's internet resources, sorry, but you are not really good enough to create one |
06:55:13 | FromGitter | <alehander42> go, read e.g. http://craftinginterpreters.com/ |
06:55:17 | FromGitter | <alehander42> and then come back |
06:55:20 | FromDiscord_ | <aolko> in turn you are not good enough to tell people that they are not good enough for anything |
06:55:37 | FromGitter | <alehander42> oh, I know your case, please don't get me started |
06:56:00 | FromGitter | <alehander42> how many years does it take to stop being lazy and sit down and read at least a simple compiler text? |
06:56:29 | Araq | https://techxplore.com/news/2018-10-artificial-intelligenceparking-car-neurons.html offtopic but I'm sure #nim appreciates it |
06:56:43 | rayman22201 | alright. No need for personal attacks. Aolko, I don't think we can help you in the way that you are looking for. Good luck to you. |
06:56:48 | FromDiscord_ | <aolko> how many years it will take to dunk the head in a bucket of water and actually get anything? |
06:57:27 | FromDiscord_ | <aolko> because that's what those huge manuals/books are, a bucket of water |
06:57:35 | rayman22201 | @namiran will love that for sure Araq. |
06:57:53 | FromDiscord_ | <Generic> I was in a similar situation like that not to long ago |
06:58:05 | FromGitter | <alehander42> @aolko there are hundreds of simpler manuals/texts/blogs/etc. langdev is probably one of the *most* researched/blogged/teached areas ever |
06:58:15 | FromDiscord_ | <Generic> I wanted to write a JIT compiler backend for a console emulator |
06:58:33 | FromDiscord_ | <Generic> it took me four attempts to get it right |
06:59:06 | FromDiscord_ | <Generic> it's embarassing how much time you can spend in reading processor manuals |
06:59:18 | FromDiscord_ | <aolko> those tiny manuals are fixed on concrete examples. "Make a lisp". Nope. "Make a compiler in js". Nope. "Make a basic interpreter". Nope again. |
06:59:59 | FromDiscord_ | <Generic> than why don't look the implementation of other interpreted languages? |
07:00:07 | FromDiscord_ | <aolko> i need a manual that is chained to that very case |
07:00:09 | FromGitter | <alehander42> but this is how you learn, aolko. and |
07:00:24 | FromGitter | <alehander42> there is not a simpler way |
07:00:40 | FromDiscord_ | <Generic> there is no manual, if there were one, someone would have already written exactly that software you want to write! |
07:00:43 | FromGitter | <alehander42> there is no magical tutorial that solves your own design case |
07:00:54 | FromDiscord_ | <aolko> `than why don't look the implementation of other interpreted languages?` because those are huge uncommented steaming pile of hot garbage |
07:01:26 | FromDiscord_ | <aolko> look at ruby's parser for example https://github.com/ruby/ruby/blob/trunk/parse.y |
07:01:42 | FromDiscord_ | <aolko> the only thing i learned from there's it's damn huge |
07:01:56 | FromGitter | <alehander42> and please, stop being arrogant, you don't really know much about the field, calling other language pile of hot garbage just of pure ignorance is not nice. |
07:02:11 | Araq | read the book about "compiler construction in Oberon" |
07:02:26 | FromGitter | <alehander42> it's trivial to tweak a small language from another tutorial, once you know how it works, to do what you want to do |
07:02:26 | * | FromGitter quit (Read error: Connection reset by peer) |
07:02:40 | rayman22201 | Nobody has a manual for "the exact thing you want". Extrapolating principles and patterns from a concrete example is one of the core tenants of learning and engineering. |
07:02:45 | * | FromGitter joined #nim |
07:03:11 | FromDiscord_ | <aolko> alright, plan b, explain the material like you would to a drunk 5 y/o |
07:03:51 | rayman22201 | http://craftinginterpreters.com/ is exactly that |
07:04:24 | FromDiscord_ | <aolko> it's unfinished |
07:04:30 | FromGitter | <alehander42> it doesn't matter |
07:04:37 | FromGitter | <alehander42> it has all you need for your prototype |
07:04:50 | FromDiscord_ | <Generic> that's sometimes simply not possible |
07:04:50 | FromDiscord_ | <Generic> or it is, the first layer which allows you to go deeper and deepr |
07:05:24 | FromDiscord_ | <aolko> besides it uses things that are thrown away in peg grammars |
07:05:33 | FromDiscord_ | <aolko> the need for scanning etc |
07:06:16 | FromGitter | <alehander42> aolko, most real languages use handwritten parsers |
07:06:32 | FromGitter | <alehander42> but again, this doesn't matter: you can skip the parser part and just use a parser generator |
07:06:47 | * | thumbs_scum joined #nim |
07:06:48 | Araq | https://github.com/lua/lua/blob/master/lparser.c#L945 |
07:08:43 | * | narimiran joined #nim |
07:09:38 | * | narimiran quit (Remote host closed the connection) |
07:11:10 | * | narimiran joined #nim |
07:19:03 | * | sz0 joined #nim |
07:25:03 | FromGitter | <alehander42> aolko: another relatively eli5 one: https://ruslanspivak.com/lsbasi-part1/ |
07:52:07 | * | xace quit (Remote host closed the connection) |
08:34:04 | * | kapil____ quit (Quit: Connection closed for inactivity) |
08:34:17 | * | xet7 joined #nim |
08:41:03 | * | ChristianWitts joined #nim |
08:43:11 | narimiran | anybody wants to take a shot at benchmarking nim vs cpp, rust and dlang? https://atilanevesoncode.wordpress.com/2018/12/31/comparing-pythagorean-triples-in-c-d-and-rust/ |
08:46:42 | Araq | be my guest but anything you measure is implementation artifacts, on paper all of them are on par with value semantics, LLVM based backends etc yada yada |
09:27:21 | * | sz0 quit (Quit: Connection closed for inactivity) |
09:35:42 | * | gangstacat joined #nim |
09:40:45 | * | Vladar joined #nim |
09:41:19 | * | Pisuke joined #nim |
09:41:26 | * | MyMind quit (Ping timeout: 268 seconds) |
09:43:50 | * | stefanos82 joined #nim |
10:09:49 | Araq | yay my new year's hack, works |
10:10:29 | Araq | blog post worthy stuff, an alternative to exceptions in a 20 line compiler diff |
10:10:47 | narimiran | wow, nice |
10:12:23 | Araq | it's ridiculously simple, probably why this solution has been overlooked for so long |
10:13:53 | Araq | it's also wrong of course, but my bet is we'll be surprised how far this idea can be taken |
10:25:44 | FromGitter | <alehander42> what does it look like? |
10:28:49 | * | nsf joined #nim |
10:41:39 | * | vlad1777d joined #nim |
10:48:27 | * | ChristianWitts quit (Ping timeout: 240 seconds) |
11:09:59 | Araq | I won't spoil the content of my blog post |
11:19:58 | FromDiscord_ | <exelotl> Nim 0.20 will have a battle royale mode |
11:48:41 | Araq | choosenim supplies 0.19.0 ? |
11:48:45 | Araq | can we fix that? |
11:49:51 | * | kapil____ joined #nim |
11:54:04 | * | dddddd joined #nim |
11:55:32 | narimiran | Araq: even if we discard that, choosenim really needs a version bump |
11:57:12 | narimiran | ping dom96 ^ |
12:01:05 | * | nc-x joined #nim |
12:01:42 | nc-x | Whats with tests/stdlib/tmath.nim? It keeps randomly failing on CI. |
12:02:00 | nc-x | But passes locally. |
12:03:52 | nc-x | For eg https://ci.appveyor.com/project/dom96/nim/builds/21316407/tests |
12:04:02 | * | nc-x quit (Client Quit) |
12:08:54 | narimiran | nc-x: i just skimmed over your #10151, so i'm wondering why we have twice 'is deprecated' here: "the '.this' pragma is deprecated is deprecated" ? |
12:09:32 | narimiran | (line 1104 of compiler/pragmas.nim) |
12:11:54 | dom96 | <Araq> choosenim supplies 0.19.0 ? |
12:11:56 | dom96 | It doesn't? |
12:12:18 | narimiran | dom96: see the comment here: https://forum.nim-lang.org/t/4512#28211 |
12:12:30 | narimiran | (and please delete mine after it, i cannot delete it!?) |
12:12:49 | * | nc-x joined #nim |
12:12:56 | nc-x | narimiran: oops |
12:14:57 | Araq | dom96: ok, my bad, sorry |
12:15:31 | nc-x | fixed now |
12:15:49 | dom96 | I don't see why that user had 0.19.0 install |
12:16:12 | dom96 | oh, probably because they already have choosenim... |
12:17:02 | narimiran | nc-x: great. since Araq has already given you his comment, i think this is safe to merge (any new thoughts Araq? https://github.com/nim-lang/Nim/pull/10151) |
12:17:35 | Araq | nc-x: I dunno, tfloatmod also fails in C++ mode even though targets lists "C++" explicitly |
12:19:00 | dom96 | Araq: This is why we include instructions on how to update in the release notes. It would be helpful to include that in your forum post too |
12:19:34 | dom96 | (I already edited it to include a link) |
12:20:38 | Araq | ok ty |
12:22:13 | dom96 | Time to compose a tweet about the release |
12:22:48 | narimiran | dom96: i can do that, so you can have more time for releasing new choosenim ;) |
12:23:28 | narimiran | btw, i'm waiting with reddit/HN post about the release — lots of people will be hangover today |
12:23:34 | dom96 | That would take far longer than composing a tweet :P |
12:23:51 | narimiran | dom96: i can compose it very very slowly :P |
12:24:07 | dom96 | Loving this forum bug where it shows all threads from last year as "Dec 2018" :D |
12:24:48 | dom96 | But okay, go for it, here is a template for you: https://twitter.com/nim_lang/status/1045305715361865728 :) |
12:25:24 | dom96 | There may or may not be a correlation between the amount of emojis you use and the amount of likes the tweet gets :D |
12:25:41 | dom96 | So why do we need a new choosenim release? |
12:28:27 | narimiran | this is "nimpretty release", so it would be nice to have "Add nimpretty to the list of installed tools.", among others |
12:29:23 | dom96 | It seems I'm still waiting on this https://github.com/dom96/choosenim/pull/63 :/ |
12:29:53 | narimiran | yeah, that would indeed be nice |
12:30:19 | dom96 | I'll see what I can do, but no promises. I've got other stuff I want to work on (last day of holidays D:) |
12:30:28 | Araq | dom96: merge and touch it, it's what I do too |
12:30:55 | Araq | you know the saying, "If you want something done, do it yourself" |
12:36:46 | * | natrys joined #nim |
12:39:09 | * | Perkol joined #nim |
12:39:45 | Perkol | How do I send request in httpclient without cookies |
12:39:47 | Perkol | ? |
12:44:39 | FromGitter | <dom96> Without? |
12:44:55 | FromGitter | <dom96> It doesn't send cookies unless you specify them |
12:45:13 | FromGitter | <dom96> Araq: heh yeah. I'd need to break out my Windows PC for that though |
12:47:22 | narimiran | nc-x: iirc #10151 was passing CI before your force-push. right? |
12:50:35 | nc-x | narimiran: yes |
12:50:58 | narimiran | merged |
12:53:09 | * | narimiran quit (Quit: Leaving) |
12:59:04 | * | stefantalpalaru joined #nim |
13:00:00 | * | Perkol quit (Remote host closed the connection) |
13:00:12 | stefantalpalaru | Someone please update the csources to 0.19.2 - https://github.com/nim-lang/csources. Bonus points for automating it as part of the release process. |
13:00:36 | Araq | stefantalpalaru: why is it required? |
13:01:04 | Araq | I deliberately left it out, old C sources can build 0.19.2 just fine |
13:06:23 | Araq | in fact we should ensure the C sources are never touched anymore, then the code can be audited for that unrealistic "Thompson hack" |
13:10:25 | stefantalpalaru | My Gentoo ebuild bootstraps the compiler from the same csources version. Why sabotage this kind of automation? |
13:11:28 | * | nc-x quit (Quit: Page closed) |
13:16:10 | * | krux02 joined #nim |
13:40:08 | * | kidandcat[m] joined #nim |
13:55:41 | * | natrys quit (Quit: natrys) |
14:01:00 | * | Ven`` joined #nim |
14:19:00 | * | Tyresc joined #nim |
14:24:28 | thumbs_scum | why not automate sabotage? |
14:27:34 | * | Ven`` quit (Ping timeout: 268 seconds) |
14:31:43 | Zevv | actually *implementing* a thompson hack would be pretty slick |
14:32:08 | Zevv | a thompson easter egg, just because you can |
14:32:08 | * | Ven`` joined #nim |
14:43:55 | FromGitter | <sheerluck> @Araq @stefantalpalaru it would be nice to have csources-0.19.2 bc this: https://dumpz.org/cxRdBPqT8NfP |
14:46:41 | stefantalpalaru | I'm doing it with a CSOURCES_VERSION variable, but it's an avoidable complication keeping track of two different versions for one package. Avoidable complexity is the root of all evil. |
14:51:29 | dom96 | huh, we always host C sources on the website... https://nim-lang.org/download/nim-0.19.2.tar.xz |
14:51:35 | dom96 | Why not use that? |
14:51:47 | Araq | keep the CSOURCES_VERSION on 0.19.0 for good? |
14:52:03 | Araq | what never changes doesn't have to be "automated" |
14:54:14 | stefantalpalaru | How long until you are forced to update the csources because the compiler uses some new language feature? |
15:08:47 | stefantalpalaru | @dom96 - thanks, I'll switch to that archive with bundled csources. |
15:08:48 | * | kapil____ quit (Quit: Connection closed for inactivity) |
15:12:05 | * | krux02 quit (Ping timeout: 250 seconds) |
15:13:07 | stefantalpalaru | `koch test` is broken because it looks for tester.nim in testament/ instead of tests/ |
15:20:54 | leorize | stefantalpalaru: it's not broken |
15:21:10 | leorize | the archive just doesn't have testament included |
15:24:59 | stefantalpalaru | That's the spirit! Now let's get someone to fix this "feature" in a 0.19.3 release. |
15:26:24 | * | nc-x joined #nim |
15:26:27 | leorize | I believe the devs consider testament a development-only thing |
15:26:42 | leorize | so it makes sense that it's not in the "release" archive |
15:26:51 | nc-x | stefantalpalaru: why do you think this should be fixed? testament is for developers of the language not users of the language. |
15:27:28 | stefantalpalaru | Are you seriously asking why I want to be able to run the test suite in an official release of the compiler? |
15:27:34 | nc-x | Yes |
15:27:49 | nc-x | The release is tested on the CIs before being released |
15:27:58 | nc-x | why should the tester be included then? |
15:28:00 | stefantalpalaru | Obviously not. |
15:29:19 | * | xace joined #nim |
15:30:15 | leorize | stefantalpalaru: can you move the nim config folder in your ebuild to /etc? |
15:30:19 | stefantalpalaru | Whoever cherry-picked commits missed the tester.nim move, probably by not running the test suite from the resulting package. This means that you've published a partially broken release. This is not something to hand-wave if you care about software quality. |
15:30:47 | leorize | https://github.com/nim-lang/Nim/tree/v0.19.2 |
15:30:57 | stefantalpalaru | @leorize, I can, if it's still picked up in there. |
15:30:59 | leorize | ^ what if I told you, it was moved long ago? |
15:31:46 | leorize | stefantalpalaru: it should be put in /etc/nim |
15:32:29 | leorize | also, can you left the $lib/compiler portion out of the config? it should be used as `import compiler/<module>`, not `import <compiler module>` |
15:32:37 | leorize | it conflicts with the options module |
15:33:33 | stefantalpalaru | Running the testsuite with koch is part of the official documentation, not some developer-only detail: https://github.com/nim-lang/Nim/#koch |
15:35:09 | nc-x | stefantalpalaru: As can be seen in the link by leorize, the CIs run and are green, so it is very well tested. |
15:35:25 | nc-x | `koch is the build tool used to build various parts of Nim and to generate documentation and the website, among other things. ` |
15:35:38 | nc-x | Where does it mention that koch should be used by `users` of the language? |
15:35:40 | dom96 | The CI doesn't execute `koch tests` |
15:35:41 | dom96 | https://github.com/nim-lang/Nim/blob/v0.19.2/.travis.yml#L46 |
15:36:15 | thumbs_scum | koch pronounced like crotch? |
15:36:35 | nc-x | dom96: Ah, okay... |
15:37:03 | dom96 | But yeah, the test suite isn't intended to be run by users or packagers |
15:37:41 | * | nc-x quit (Quit: Page closed) |
15:38:14 | stefantalpalaru | Absurd. |
15:43:46 | leorize | stefantalpalaru: you are right, someone didn't backport the commit that ship testament in release tarball https://github.com/nim-lang/Nim/commit/00f84d3d22cdeed7b4a2060e6307e3a742729055 |
15:44:02 | leorize | well, mainly because Araq didn't tag it |
15:44:30 | thumbs_scum | so its a new testament? |
15:48:29 | stefantalpalaru | The bigger problem is that those green CI tests are not testing the resulting archive. What happens in compiler/installer.ini is completely untested. |
15:55:50 | stefantalpalaru | I'd insert archive creation and archive unpacking in .travis.yml followed by a "cd" to run all the tests in what the end user receives. |
15:59:52 | FromGitter | <dom96> AFAIK that's the responsibility of the new nightlies repo. Yes, it's still quite immature. Please make issues on it. |
16:06:41 | * | nsf quit (Quit: WeeChat 2.3) |
16:08:30 | Araq | no idea why the move to testament/ got backported incompletely. |
16:13:14 | Araq | "I'd insert archive creation and archive unpacking in .travis.yml followed by a "cd" to run all the tests in what the end user receives." |
16:13:28 | Araq | we used to do that but travis timed out with that ;-) |
16:14:20 | Zevv | I'm trying to figure out why the `==` proc is listed 27 times in the exports section of the nativesockets docs. I was able to go deep enough to see this seems to happens in the sem pass, but I'm getting lost here. |
16:15:01 | Araq | he he |
16:16:04 | Zevv | The PNode going into the sem pass has == only once, but it comes out 27 times. I'll file an issue and go fix something easier :) |
16:16:35 | Araq | but the question remains, what does the Linux packager do with a package that has red tests. Not update it? |
16:17:06 | Araq | I bet every single release of GCC that I ever used had some red test for some platform. |
16:18:24 | Araq | Zevv: == is overloaded so it produces a nkSymChoice |
16:18:47 | Araq | my guess is that the '==' export list is accurate |
16:22:19 | Zevv | But it should only list the '==' from nativesocket, right? proc `==`(a, b: Port): bool. Now it links to other == implementations in system, options, winlean, etc |
16:25:51 | Araq | no, the code is: |
16:25:54 | Araq | import nativesockets, os, strutils, parseutils, times, sets, options |
16:25:54 | Araq | export Port, `$`, `==` |
16:26:09 | Araq | it's not export nativesockets.`==` |
16:26:24 | Zevv | Ah I see, thanks for pointing that out |
16:47:22 | thumbs_scum | Happy Same Week everybody! |
17:03:30 | FromGitter | <arnetheduck> packagers (and users of certain distros) run on an entirely different set of hardware (when was the last time anyone ran test suite on `ppc64` and reported back results? it's an "officially supported platform"), software (c compiler, glibc and all other nim dependencies) etc than travis - of course the test suite is valuable outside of core development |
17:07:47 | * | Ven` joined #nim |
17:10:05 | Araq | arnetheduck: don't avoid the question. What do you do when tests are red/broken? |
17:13:11 | * | Ven` quit (Quit: My MacBook has gone to sleep. ZZZzzz…) |
17:24:48 | * | kapil____ joined #nim |
17:26:43 | shashlick | @dom96 - sorry about the choosenim pr - will try and finish it soon |
17:30:56 | * | nsf joined #nim |
17:51:54 | * | narimiran joined #nim |
17:56:39 | dom96 | We should probably remove ppc64 from our officially supported list |
17:56:48 | dom96 | we used to run tests on it for every commit but no longer do |
17:57:40 | stefantalpalaru | segfault while compiling aporia-0.4.2 with nim-0.19.2: https://gist.github.com/stefantalpalaru/9d57b57e984a734edb9f947fcce29f37 |
17:58:06 | stefantalpalaru | glib2 is the latest from https://github.com/nim-lang/gtk2 |
17:58:37 | narimiran | i haven't been online this afternoon. now i see in the irc logs some mesages from stefantalpalaru that something (testament) is missing from 0.19.2, and leorize has found https://github.com/nim-lang/Nim/commit/00f84d3d22cdeed7b4a2060e6307e3a742729055 which should have been backported. |
18:00:04 | * | OrganicAnywhere joined #nim |
18:00:56 | narimiran | should i backport it now, if there will be 0.19.4 one day? |
18:01:17 | * | rect0x51 joined #nim |
18:02:29 | shashlick | while @kaushalmodi is away, i need some clear direction on the goals of nightlies |
18:05:07 | rect0x51 | hey everyone, for bux fixes: do I use devel branch directly or a different branch? |
18:05:33 | shashlick | presume you have your own fork |
18:05:33 | OrganicAnywhere | I tried to download choosenim-0.3.2_windows_i386.exe from dom's github and it got stopped after my computer detected a trojan. Does anyone know what happened? |
18:05:52 | shashlick | create a separate branch - that way, while the PR is getting reviewed/approved, you can continue to work on other stuff |
18:06:22 | narimiran | rect0x51: what shashlick said: pull devel, create a branch, make bugfixes, submit PR |
18:06:37 | narimiran | OrganicAnywhere: false positive, probably |
18:09:09 | rect0x51 | In documentation I read I should rebase my branch. What really confuses me is... is you rebase a branch to devel, doesn't that branch become devel? Sorry if it's stupid question, I am new to git/github. |
18:10:04 | rect0x51 | I probably worry more than I should, but I really want to understand how it works and make proper PRs. |
18:10:15 | narimiran | rect0x51: 1. fork nim-lang/Nim, so now you have your own rect0x51/Nim repo |
18:10:36 | narimiran | 2. clone your repo, so now you have local copy of it |
18:11:09 | OrganicAnywhere | I googled the file name, "Zpevdo.A" and others have received this file when downloading other, non-nim related stuff. |
18:11:29 | narimiran | 3. (if not already on `devel` branch: `git checkout devel`) |
18:11:52 | stefantalpalaru | that Aporia segfault doesn't appear with Nim HEAD |
18:11:59 | narimiran | 4. `git checkout -b myFixBranch` |
18:12:02 | dom96 | OrganicAnywhere: It's not a virus. Anti-viruses look for embedded binaries and flag it up as a virus |
18:12:14 | rect0x51 | Ok, let me describe what I've done so far. I forked Nim, cloned my fork (which adds a remote to my fork implicitly), add the upstream remote. Now I want to start working on a bugfix, what do I do? Also when/how often (if at all) should I rebase my local branch to the upstream devel to keep up to date? |
18:12:22 | * | Cthalupa quit (Ping timeout: 272 seconds) |
18:12:44 | narimiran | 5. do your fixes, commit the changes, push it to your own repo — once you do, you'll see "make a pull request" on github |
18:13:33 | * | Cthalupa joined #nim |
18:13:46 | rect0x51 | narimiran: basically what I am struggling with is how to "keep my fork up to date with upstream", but I am not sure if that's even needed. |
18:13:46 | narimiran | rect0x51: you did all the right steps. now you can start working on bugfixes and stop worrying :) |
18:14:14 | dom96 | stefantalpalaru: does it happen with 0.19.0? |
18:15:42 | narimiran | rect0x51: you'll be fine without updating most (>95%) of the time. before starting a new bugfix, pull the latest devel and branch from it. rinse and repeat |
18:16:04 | OrganicAnywhere | dom96, what is it then? I'm inclined to think it's a false positive but it's detecting a file that is not the file I'm downloading and others hav detected it as well. |
18:16:24 | rect0x51 | narimiran: awesome, that's what I wanted to know, thanks! |
18:16:41 | narimiran | rect0x51: no problem, now i'm waiting for your PRs :) |
18:17:01 | dom96 | OrganicAnywhere: submit it to virustotal, that should show you how other anti viruses are detecting it |
18:17:22 | dom96 | if it makes you uncomfortable just don't use it and install Nim the traditional way |
18:17:35 | rect0x51 | narimiran: you will have to wait a bit, I want to go through every Nim doc first (manual, GC, internals etc), then I have to start understanding the codebase somehow (newbie here) |
18:17:38 | OrganicAnywhere | Alright, thank you :) |
18:18:19 | rect0x51 | but I am really determined to work on Nim, and as a uni student I have some spare time, haha |
18:19:01 | dom96 | rect0x51: start by fixing bugs in the stdlib and/or bugs marked "Easy" |
18:19:26 | rect0x51 | @dom96: sure, don't worry, I don't plan to start big |
18:19:35 | dom96 | By far the best way to fix bugs is to fix the bugs that affect you, so write some software in Nim and you'll surely run into something that can be improved |
18:20:17 | rect0x51 | aha, sounds like good advice. now i have to think of some interesting project (having serious trouble with that in general) |
18:22:02 | dom96 | https://github.com/nim-lang/needed-libraries/issues ;) |
18:22:51 | rect0x51 | ohh hadn't came across this page, excellent! |
18:24:35 | * | OrganicAnywhere quit (Quit: Leaving) |
18:24:37 | dom96 | So awesome https://twitter.com/wilfredspringer/status/1079842955005972481 |
18:26:07 | shashlick | @dom96: i'm working on nightlies right now, i'll update the choosenim PR later today if I get a chance |
18:26:24 | shashlick | but am still a bit unclear if you wanted to remove the github fallback |
18:27:10 | stefantalpalaru | dom96: that Aporia segfault does not appear with nim-0.19.0 |
18:29:17 | rect0x51 | I think I'd love to work on tooling (linting etc). What is Nim's biggest need regarding tooling atm? |
18:29:51 | shashlick | i'd think getting nimlsp working in more editors would be awesome |
18:29:59 | * | kidandcat[m] left #nim ("User left") |
18:30:07 | shashlick | also work on nimble and choosenim will also be appreciated |
18:31:15 | narimiran | rect0x51: 0.19.2 has lots of nimpretty improvements, but there are still some open issues: https://github.com/nim-lang/Nim/issues?q=is%3Aopen+is%3Aissue+label%3Animpretty |
18:31:52 | narimiran | but nimble and choosenim would be great too, i agree |
18:33:54 | rect0x51 | nimsuggest basically gives you more hints than nimcheck? |
18:39:38 | rect0x51 | ah, it provides autocompletion and stuff too, nvm |
18:40:18 | rect0x51 | I've been using vim ALE which uses nim check, but I guess a solution like nimsuggest is more "Nim specialized". |
18:41:21 | shashlick | Check out nimlsp which leverages nimsuggest and provides a standard language server instead of the specialized nimsuggest protocol |
18:41:30 | shashlick | Works with vim apparently |
18:44:02 | * | thomasross quit (Read error: Connection reset by peer) |
18:44:11 | * | thomasross_ joined #nim |
18:44:11 | * | thomasross_ is now known as thomasross |
18:48:07 | FromGitter | <arnetheduck> Araq - you either fix it or manage expectations - the point I'm making is that the test suite is useful outside of development - making sure it works well is a good investment - it gives people that care about making nim work an opportunity to know something is wrong and eventually fix it |
18:49:07 | rect0x51 | nimlsp surely is vital. irrelevant... but I found some weird behaviour while using nimgrep, though I'm skeptical about how useful nimgrep is (grep does the trick just fine) |
18:49:43 | Zevv | rect0x51: If you did not start from latest devel, of you have a devel-based branch lying around for some time, you can always fetch latest devel and rebase on that. Basically, this rewrites your local history and replays your commits on top of latest devel. |
18:50:29 | FromGitter | <arnetheduck> managing expectations is a service to the people using nim - if you call something "officially supported" for example, make sure there's a clear definition of what that entails, so I can take that information with me when I have to make a call about where I can apply nim |
18:50:36 | rect0x51 | Zevv: yes, I figured that out after hours of reading about git. thanks anyway. |
18:52:02 | rect0x51 | Zevv: it seems I should rebase before starting and after finishing, right? |
18:52:14 | narimiran | rect0x51: just before starting |
18:52:42 | narimiran | and only if after finishing there is some merge conflict, you can do rebase. otherwise, you'll be fine. |
18:52:59 | rect0x51 | ok I think I get it |
18:55:55 | shashlick | I use nimgrep all the time now |
18:57:21 | rect0x51 | shashlick: can you describe when/how it is useful? I tried to find the location of a string literal and it didn't work. |
18:58:18 | Zevv | it knows how to work with Nim's case and _ agnostic identifiers |
18:58:30 | Zevv | you can grep for foo_bar and match fooBar |
18:58:31 | shashlick | rect0x51: this is how I use it - `alias ng="nimgrep --recursive --ext:$1 $2 $3 $4 $5 $6 $7 $8 $9"` |
18:58:50 | shashlick | now I can `ng nim abc` and it searches only nim files for the string I search for |
18:58:58 | rect0x51 | Zevv: yeah I read about that, but it seems non-robust, is what I am saying. |
18:59:02 | shashlick | i'm usually only looking in nim or h files |
19:03:23 | rect0x51 | ok let me put that in context. I did nimgrep --recursive "'case' objects" and it returned 0 matches, while grep -RI "'case' objects" returns a match. |
19:04:06 | rect0x51 | Am I missing something? |
19:04:49 | * | zachk joined #nim |
19:04:49 | Zevv | hehe funny |
19:04:56 | Zevv | something with the quotes I guess |
19:05:18 | rect0x51 | maybe, but probably not, I tried many thing, some of them didn't have quotes |
19:05:23 | shashlick | you need to escape quotes and stuff |
19:05:59 | rect0x51 | same thing with "iterator does not work" |
19:06:24 | rect0x51 | nimgrep --recursive "iterator does not work" 0 matches |
19:07:09 | Zevv | "case..objects" matches, but "case. objects" does not |
19:07:48 | * | zachk quit (Changing host) |
19:07:48 | * | zachk joined #nim |
19:08:00 | Zevv | escape the space: "'case'\ objects" |
19:08:05 | Zevv | not intuitive no |
19:08:11 | rect0x51 | ohhh ok that explains a lot |
19:08:46 | rect0x51 | ok I have a bug, not sure if it's my terminal or whatever but... |
19:09:04 | rect0x51 | it's really weird |
19:12:03 | rect0x51 | https://asciinema.org/a/N1uu1xazY1cpvZp1rryUKEkyy |
19:12:40 | rect0x51 | :S |
19:23:05 | dom96 | You're grepping through binaries |
19:23:19 | FromGitter | <arnetheduck> dom96 - instead of removing, an option is to rephrase the section into something like: "we regularly run tests on platforms x. we make an effort to support y as secondary platoforms. z generally work and we encourage contributions"... then tie that to a release policy where tests must be green on primary platforms and an rc period can be used to collect test results on secondary ones - and make an informed choice |
19:23:19 | FromGitter | ... about whether to proceed with the release or not.. also, if there are more frequent releases, the "cost" of `devel` breaking / not having green tests goes down, because there's less incentive to actually use it |
19:24:13 | rect0x51 | @dom96: I see... is there an option to ignore binaries (like grep -I)? |
19:27:53 | Araq | --ext:nim |
19:28:30 | Araq | everything is binary, it's a digital computer, the filtering is done by file extensions |
19:28:55 | rect0x51 | Araq: :D |
19:32:02 | * | dddddd quit (Read error: Connection reset by peer) |
19:32:24 | rect0x51 | nimble install nimlsp doesn't found the package |
19:32:49 | rect0x51 | doesn't find* |
19:33:33 | narimiran | rect0x51: nimble install https://github.com/PMunch/nimlsp |
19:33:52 | rect0x51 | narimiran: ty |
19:37:42 | FromGitter | <arnetheduck> in part, this is also why at status, we prefer to fork the parts of stdlib that we use extensively.. this has several advantages: ⏎ ⏎ 1) there is less PR churn between us and upstream which benefits efficiency of both camps - we can develop the code to a higher quality before suggesting its inclusion in mainline - we free up the time of Araq and Arne and whoever else is reviewing ⏎ 2) we avoid depending on |
19:37:42 | FromGitter | ... nim (languague) releases to advance features which can be achieved in libraries - people wanting to use our stuff (including us) can do so earlier without having to follow `devel` ⏎ 3) we don't have to consider breaking the world as much - people can pin specific versions of the package in their dep list which lowers the ... [https://gitter.im/nim-lang/Nim?at=5c2bc186ab910e7d3a081086] |
19:39:42 | Araq | arnetheduck: I agree with you completely. but I don't understand why you bring it up? |
19:41:09 | FromGitter | <arnetheduck> because I emphasize with stefantalpalaru about that it's vital for 0.19.2 to come with a good option for running the test suite, and to show examples of where that's useful |
19:42:06 | FromGitter | <arnetheduck> also to show the reasoning that goes into choosing different development styles - devel vs releases, point releases etc - how we think about things as consumers of the language |
19:42:47 | narimiran | speaking of which: https://irclogs.nim-lang.org/01-01-2019.html#17:58:37 |
19:42:58 | Araq | that we broke testament is unfortunate but it doesn't warrant any immediate action, IMO |
19:43:35 | Araq | especially since I don't understand why packagers want to run the tests. The way I see it there are only two options. |
19:43:37 | * | kapil____ quit (Quit: Connection closed for inactivity) |
19:44:11 | Araq | a) you don't update the package. But then the *real* users of Nim might want to upgrade anyway because they want to test *their* own code with 0.19.2 and don't care about the test suite. |
19:44:31 | Araq | b) you do update the package anyway. But then, why run Nim's tests? |
19:46:40 | Araq | and maybe c) you wanna run the tests to see what it's broken on your platform in order to decide whether to update the package or not. But then, running the tests still works afaik, only 'koch tests' is broken |
19:48:32 | Araq | and I don't know why this decision should be taken away from the user anyway. |
19:49:34 | shashlick | Araq: winrelease is breaking on nightly |
19:50:10 | shashlick | https://api.travis-ci.org/v3/job/474151232/log.txt |
19:51:04 | * | nsf quit (Quit: WeeChat 2.3) |
19:51:38 | FromGitter | <arnetheduck> well, the whole point with distros is that they do the work of arriving at a set of packages that work well together, while at the same time catering to different audiences. for example, debian enables `pie` on all their executables as a security feature - in `nlvm` that doesn't work because it's set to generate `non-pie` code.. that's something I wouldn't know, unless someone ran the test suite on debian - it's |
19:51:38 | FromGitter | ... pretty subtle. then you have the economy of the distro: the cost of verifying whether a package and version will work depends on how complicated it is to automate - so the chances of someone wanting to do that work depend on how willing upstream is to keep certain things stable / predictable - such as how to match ni ... [https://gitter.im/nim-lang/Nim?at=5c2bc4c937975e7ca95acc43] |
19:54:38 | FromGitter | <arnetheduck> so indeed, yeah, c) - some distros cater to users that appreciate that distros do this testing for them - it's a feature that its "taken away from the user".. others let users in to the process - like gentoo which has the option to run the test suite as part of the upgrade (in a uniform way, across packages) |
19:58:10 | FromGitter | <arnetheduck> what that does is tell them "will this release of nim work well with the particular mix of stuff I have on my system already?" - for distros like fedora or debian, it's fine that the test run is done once by the distro packager - the user has no great advantage once the packager has run the tests, to rerun them.. |
19:59:07 | Araq | fair enough I guess. It's linux, after all. |
19:59:56 | rect0x51 | I am using the devel build and nimble instal <link to nimlsp> fails with "nimlsppkg/Nim/nimsuggest/nimsuggest.nim(13, 10) Error: nimcore MUST be defined for Nim's core tooling" |
20:00:22 | shashlick | Araq: I don't see where web/upload/download is created - how is winrelease typically called? |
20:00:42 | Araq | tools/winrelease |
20:01:26 | rect0x51 | do I have to tweak something in Nim/config/nim.cfg to make it install? |
20:01:53 | shashlick | winrelease imports koch and koch doesn't create web/upload/download either |
20:02:22 | Araq | rect0x51: compile with -d:nimcore as a workaround |
20:02:37 | Araq | shashlick: probably I simply have these dirs on my machine |
20:02:49 | shashlick | am adding fixes to travis for now, will improve this once it works |
20:04:03 | FromGitter | <arnetheduck> that said, for something like nim that isn't a pure dependency for end-user features (unlike gcc or libc where users generally don't care about the exact version, as long as it works), the value of being in a distro isn't that high - specially if there's a simple way to set up a local isolated environment (aka choosenim) |
20:05:31 | FromGitter | <arnetheduck> I suspect for example very few people consume `rust` or `node` through their package manager, simply because the experience of an isolated install via `rustup` or `npm` is so good |
20:06:40 | Araq | and yeah, just to make this clear. Unfortunately 0.19.2 was built manually because nightlies still wasn't ready and I delayed this release for too long already |
20:07:34 | shashlick | Araq: so nightlies is only building and packaging, it does no tests |
20:08:02 | Araq | it needs to do 'koch testinstall' but there are also better options |
20:08:06 | shashlick | i presume the testing still relies on nim-lang/nim CI regardless of devel or version-0-19 branch |
20:08:32 | Araq | like really downloading the zips, building them, running the tests with an almost empty PATH |
20:17:32 | * | vlad1777d quit (Ping timeout: 250 seconds) |
20:18:49 | stefantalpalaru | Please reopen this issue, since it applies to 0.19.2: https://github.com/nim-lang/Nim/issues/9889 |
20:20:38 | stefantalpalaru | Might want to also add a test case for it. |
20:29:31 | narimiran | stefantalpalaru: there are plenty of fixes which are not in 0.19.2 |
20:30:47 | stefantalpalaru | Fascinating, but this one is for a newly introduced bug. See the linked issue. |
20:32:53 | Zevv | When addind examples to stdlib documentation, are runnableExamples prefered over 'normal' examples? |
20:33:23 | narimiran | Zevv: yes |
20:34:21 | Zevv | Ok. I find the 'doAssert' notation a bit noisy, though, but I'll get used to that |
20:35:07 | FromGitter | <arnetheduck> @Araq what's the story with gcv2 btw? why is it a dead end? |
20:41:16 | * | narimiran quit (Quit: Leaving) |
20:43:14 | * | vlad1777d joined #nim |
20:45:31 | Araq | not a deadend, but also not something I intend to work on |
20:47:15 | * | stefantalpalaru left #nim (#nim) |
20:53:57 | rayman22201 | offtopic but interesting for compiler optimization perhaps: https://www.ps.uni-saarland.de/~sdschn/LVC.html |
20:58:32 | * | aziz joined #nim |
20:58:49 | * | aziz quit (Client Quit) |
20:59:38 | shashlick | Araq: got windows working somewhat on nightlies but build times out |
20:59:47 | shashlick | https://travis-ci.org/nim-lang/nightlies/jobs/474171958 |
21:01:06 | * | stefantalpalaru joined #nim |
21:07:23 | * | stefantalpalaru quit (Changing host) |
21:07:23 | * | stefantalpalaru joined #nim |
21:09:48 | Araq | rayman22201: interesting indeed |
21:15:57 | Araq | shashlick: I need to think about it |
21:16:15 | Araq | by its nature it's a long process |
21:17:20 | shashlick | Do we need to do docs? |
21:17:31 | shashlick | Didn't think we need that for packaging |
21:20:05 | FromGitter | <arnetheduck> btw Araq, any decisions on https://github.com/nim-lang/Nim/issues/9017? would be really nice to have the information about matching nim & nimble versions in the git repo, but if that's a problem, we'll implement some ugly workaround |
21:23:26 | * | krux02 joined #nim |
21:32:06 | Araq | shashlick: the zips include the *.html docs |
21:32:07 | * | dddddd joined #nim |
21:33:16 | Araq | arnetheduck: your ugly workaround will be as ugly as git commit hashes in koch.nim |
21:33:25 | Araq | :-) |
21:33:28 | * | xet7 quit (Remote host closed the connection) |
21:34:25 | FromGitter | <arnetheduck> not really, because it's part of your release process .. you have to do the work anyway, it's a matter of writing it down in a reproducible way |
21:34:27 | stefantalpalaru | I vote for a Git submodule for Nimble. |
21:34:57 | Araq | I wrote it down, it's in koch.nim, we ship the latest stable Nimble release |
21:35:47 | FromGitter | <arnetheduck> I can't reproduce that. I'd have to know the exact time you ran the release process and get the latest stable release at that time. |
21:36:57 | FromGitter | <arnetheduck> the latest current stable release likely does not work with nim 0.17, agree? |
21:37:37 | Araq | agreed but why does it matter, the tar.xz contains nimble's source code in dist/ |
21:37:56 | * | Lroy joined #nim |
21:38:30 | Araq | you don't have to know anything the tarball contains the C sources, the Nim sources, the Nimble sources... |
21:39:16 | FromGitter | <arnetheduck> because git is more convenient than tarballs to build from - it allows testing patches, fixes, backports, bisecting, all kinds of things |
21:39:44 | FromGitter | <timotheecour> I agree with @arnetheduck |
21:39:45 | shashlick | Araq: I think winrelease builds nim and docs again |
21:39:46 | Araq | and if you don't trust the tarball there is little reason to trust anything, I could have inject a Thompson hack in 2010 |
21:40:07 | FromGitter | <arnetheduck> it's not that I don't trust the tarball, it's that the feature set it offers is limited compared to git |
21:40:38 | FromGitter | <arnetheduck> the trust situation is similar:ish |
21:41:10 | Araq | here is what you do: |
21:41:22 | Araq | - start with the tarball. Gives you a Nim. |
21:41:35 | Araq | - use github and the Nim to get newer Nims |
21:42:07 | Araq | everything else is a never ending exercise in masochism. |
21:42:37 | Araq | where you dream up always more complex situations in how the build may fail |
21:44:14 | FromGitter | <arnetheduck> I don't have trouble getting *a* nim.. I'm having trouble knowing which nimble that goes with it - which nimble was used to produce the nim 0.19.2 release for example.. |
21:44:50 | Araq | 0.19.2 has a release date, nimble's tags have dates. |
21:46:46 | FromGitter | <arnetheduck> well yeah, that's the kind of ugly workaround we can do - it doesn't qualify as reproducible by most metrics though because there's an approximation in there |
21:47:27 | FromGitter | <arnetheduck> there's nothing in `nim` that binds the `nim` tag to a `nimble` tag beyond an external, casual relationship |
21:49:28 | FromGitter | <timotheecour> @arnetheduck it’s related to https://github.com/nim-lang/Nim/issues/9129 |
21:50:13 | Araq | would it help if the tar.xz had a generated file 'used_commits.txt' ? |
21:50:29 | FromGitter | <timotheecour> (either using a git submodule or adding a git hash in version control would be fine) |
21:50:40 | FromGitter | <arnetheduck> for example, if someone hijacks the nimble repo, it's easy to subvert (like happened recently with a node module).. you can stick your head in the sand and pretend these things don't happen, but unfortunately, it's the kind of stuff we have to realistically deal with as it happens on a regular basis in the real world: https://discuss.status.im/t/wallet-dependency-compromised |
21:52:59 | Araq | git commits in a git repo don't work if they are not automated. and if they are, why are they in the github repo? |
21:53:10 | FromGitter | <arnetheduck> in an ideal world, we don't want to touch the tarball at all - it's just another complication - if we can stay 100% git, it makes it more easy for us to solve our problem, to contribute to nim, etc - git already does the secure code management to a sufficient degree - with the tarball, we'd have to do hashes and all that stuff |
21:53:44 | FromGitter | <arnetheduck> ...by hand |
21:53:58 | Araq | I mean seriously, what are we discussing here? I screwed up the [backport] for some testament commit |
21:54:18 | Araq | and now I'm to be trusted with maintaining nimble commit hashes in koch.nim? |
21:54:22 | Araq | manually? |
21:54:26 | Araq | seriously?! |
21:55:41 | FromGitter | <arnetheduck> well, that's why git submodules are easier in a way - in your `release.sh 0.19.2`, which does *all* the steps, you include a step that records what was built and save that to git.. no manual steps involved |
21:56:06 | Araq | as I said, the tar.xz can get a gitcommits.txt |
21:56:11 | Araq | that would make sense. |
21:57:54 | Araq | or a tar.xz that doesn't strip the .git directories |
21:58:44 | FromGitter | <timotheecour> does this help? https://blog.abelotech.com/posts/how-download-github-tarball-using-curl-wget/ ⏎ ⏎ eg: https://github.com/<username>/<repository>/tarball/<version> ⏎ => allows getting tarball from specific hash [https://gitter.im/nim-lang/Nim?at=5c2be29492cf4d22422c2605] |
22:00:47 | FromGitter | <timotheecour> (and there’s also git archive, https://alvinalexander.com/git/git-export-project-archive-cvs-svn-export, but 1st link seems fin) |
22:00:50 | FromGitter | <arnetheduck> well, it's an improvement - we would then: download the tarball, parse gitcommits.txt to find the nimble hash, throw away the tarball, use git to checkout that nimble version. keep in mind that the assumption is that we already know which `nim` hash corresponds to the nim release |
22:01:18 | Araq | I don't know why you throw away the tarball |
22:02:32 | FromGitter | <arnetheduck> because it's not useful for the aforementioned reasons: it doesn't support patches and branches |
22:05:28 | Araq | ah I finally got it, you have the same problem that I have with nimble |
22:06:33 | Araq | throwing away the .git directory is always a bad idea. |
22:08:45 | FromGitter | <timotheecour> Ya for many reasons (eg if we want to temporarily edit a file , u don’t have git to help you see what you changed; it also makes certain things less efficient (instead of `git checkout`, you have to update entire source tree when changing version of a nimble package) |
22:10:18 | FromGitter | <arnetheduck> well, we have many problems with nimble - that's one of them - but regardless, the point is that we *can* do all these complicated workarounds, like not use `build_all.sh`to build *a* nim or not use `koch tools` to build the right nimble version.. but that makes the zero-to-hero workflow longer / more complicated, if you want to stay within the git world and not bother with complications like tarballs |
22:14:20 | Araq | there is no "git world without tarballs". in other cases you have a bunch of C++ files and are supposed to already have a C++ compiler or you go and download a clang.exe to kick off the process |
22:15:23 | stefantalpalaru | 'there is no "git world without tarballs".' - why not, when everything we work with is already in Git repositories? |
22:15:43 | Araq | not to mention that you need to have a git.exe to start with. And you also have to trust it enough. Maybe that git.exe injects a Thompson hack... |
22:16:09 | Araq | or maybe the Linux OS you run changes how git.exe runs and injects a Thompson hack |
22:21:40 | * | Lroy quit (Quit: Leaving) |
22:29:47 | * | Ven`` quit (Ping timeout: 240 seconds) |
22:31:08 | rect0x51 | I don't understand what nimlsp does compared to nimsuggest... isn't simsuggest already a LSP? |
22:31:11 | FromGitter | <arnetheduck> divide and conquer. `nimble` is our most pressing issue right now because it actually breaks our build, and we'd like to take it out of the equation. |
22:36:56 | * | stefanos82 quit (Remote host closed the connection) |
22:42:45 | * | vlad1777d quit (Ping timeout: 268 seconds) |
22:47:50 | FromGitter | <timotheecour> see https://forum.nim-lang.org/t/4517#28229 [help needed] nim version of: COMPARING PYTHAGOREAN TRIPLES IN C++, D, AND RUST |
22:49:32 | FromGitter | <arnetheduck> for example, here's how we do the CI: https://github.com/status-im/nimbus/blob/master/.travis.yml#L36 - check out a specific `nim` hash, build it using the documented workflow for building nim & tools, run our tests. we don't have to worry about gcc, git etc because they (can) come from a locked-down distro (for example docker). there are two moving parts in that setup really - `build_all.sh` that gets a random |
22:49:33 | FromGitter | ... `csources` and `koch tools` which gets a random nimble... our options are: ⏎ a) upstream fixes this so the `nim` hash also covers `nimble` and `csources` in terms of reproducibility ⏎ b) we have to do a workaround - save good `nim`, `nimble` and `csources` hashes somewhere, replace `build_all.sh` and `koch tools` wit ... [https://gitter.im/nim-lang/Nim?at=5c2bee7cbabbc178b211eadb] |
23:07:18 | shashlick | Araq: will winrelease not work with Nim built from csources? |
23:07:44 | shashlick | Cause it rebuilds Koch, Nim and docs |
23:08:02 | shashlick | Figured I'd call it directly after building csources but it fails |
23:08:15 | * | vlad1777d joined #nim |
23:09:03 | Araq | koch boot -d:release is required |
23:10:09 | Araq | rect0x51: nimsuggest uses its own protocol because it predates the LSP |
23:10:41 | * | Vladar quit (Remote host closed the connection) |
23:11:58 | rect0x51 | Araq: I still didn't manage to install nimlsp. The command you suggested seems to install dependancies only (-d option of nimble install), I tried running nimble install <github link to nimlsp> and after, but I get the same error about nimcore. |
23:12:24 | Araq | --define:nimcore |
23:12:38 | Araq | add it to some config if the command line fails you |
23:13:08 | rect0x51 | --define doesn't exist |
23:15:29 | rect0x51 | (and -d is depsOnly) anywho, I don't know how to define nimcore, or what that even means... |
23:16:08 | shashlick | Araq: you don't need koch csource -d:release for windows right? |
23:18:20 | Araq | shashlick: true but then also ensure we don't have a build/ dir in the zip. would be confusing otherwise |
23:18:37 | Araq | arnetheduck: Will have a look at it tomorrow and come up with a solution |
23:19:36 | shashlick | okay i'll get the build working but then need your help to ensure what is built is what is expected |
23:22:54 | * | krux02 quit (Remote host closed the connection) |
23:23:00 | rect0x51 | I guess I should give up and just build from source |
23:24:58 | FromGitter | <arnetheduck> much appreciated - and like I said, we can work around it if it's too much of a bother - a key reason we're doing all this is because we want to be able to provide "simple" instructions to build nimbus exactly like we do it in our daily development workflow , CI etc - this is very attractive to contributors and people we cooperate with that are not into nim yet - because we dogfood the process, we have less to worry |
23:24:59 | FromGitter | ... about in terms of annoyances they'll encounter along the way |
23:26:17 | FromGitter | <arnetheduck> another q: found a mem leak in gc1 - worthwhile to report? |
23:31:57 | * | vlad1777d quit (Ping timeout: 244 seconds) |
23:34:13 | Araq | there are no memory leaks known |
23:34:57 | Araq | and usually it only looks like a GC bug, usually it's a codegen or stdlib bug |
23:36:37 | Araq | but there are no codegen bugs known either that can cause memory leaks or stdlib bugs |
23:36:58 | Araq | so definitely worthwhile to report |
23:38:57 | FromGitter | <arnetheduck> ok. it's a codegen bug I think - it generates a `copyStringRC1` where it shouldn't (at least I think it shouldn't, if I understand it right) |
23:43:26 | FromGitter | <kaushalmodi> shashlick: about nightlies, I think the goal is to just build Nim distributables on each platform, and test that archive on the same platform using "koch testinstall" (that was failing the last time I tried) |
23:44:19 | FromGitter | <kaushalmodi> The stretch goal, I think.. @Araq correct me if wrong, is to also build the nim binaries for each major OS flavor/bits combo and deploy those. |
23:44:50 | rect0x51 | ... nimlsp doesn't get build with nimble, after defining nimcore I get "Error: undeclared identifier: 'Channel". I think I overestimated the state of the project, it seems heavily WIP. |
23:45:19 | Araq | no, you're missing its config somehow, --threads:on --d:nimcore |
23:46:26 | rect0x51 | but shouldn't it be easy to build (with just "nimble install")? |
23:46:33 | Araq | kaushalmodi: maybe, eventually. |
23:46:34 | shashlick | thanks @kaushalmodi |
23:46:37 | shashlick | i have some fixes |
23:46:42 | shashlick | but i think there's still some ways to go |
23:47:10 | Araq | rect0x51: I don't know the state of the project and PMunch is not in #nim right now |
23:47:25 | shashlick | @kaushalmodi: looks like windows has passed for 0.19.2 - https://travis-ci.org/nim-lang/nightlies/builds/474220119 |
23:47:49 | rect0x51 | ok, I guess I'll have to talk with someone who actually works on it. |
23:58:19 | shashlick | Araq, kaushalmodi - nightlies build has passed |