00:05:15 | * | envoyt quit (Ping timeout: 248 seconds) |
00:05:37 | * | envoyt joined #nim |
00:19:44 | * | Jjp137 quit (Ping timeout: 248 seconds) |
00:22:12 | * | Jjp137 joined #nim |
00:29:04 | * | stefantalpalaru quit (Quit: stefantalpalaru) |
00:35:42 | * | deech quit (Ping timeout: 272 seconds) |
00:46:03 | * | deech joined #nim |
00:51:13 | * | oprypin_ is now known as oprypin |
01:12:27 | * | sealmove joined #nim |
01:20:19 | * | deech_ joined #nim |
01:29:34 | * | c3v0axz quit (Ping timeout: 246 seconds) |
01:30:18 | * | c3v0axz joined #nim |
01:36:14 | skrylar[m] | alright, its up on github for snooping https://github.com/Skrylar/thunderstrike |
01:39:13 | * | Snircle quit (Quit: Textual IRC Client: www.textualapp.com) |
01:42:41 | * | deech quit (Ping timeout: 258 seconds) |
01:45:31 | * | envoyt quit (Ping timeout: 248 seconds) |
01:55:32 | * | Snircle joined #nim |
02:02:30 | * | Snircle quit (Remote host closed the connection) |
02:11:39 | * | theelous3_ quit (Ping timeout: 248 seconds) |
02:23:08 | * | envoyt joined #nim |
02:30:23 | * | dddddd quit (Remote host closed the connection) |
02:32:39 | * | Amun_Ra joined #nim |
02:35:19 | * | deech_ quit (Ping timeout: 252 seconds) |
02:35:35 | * | laaron- quit (Remote host closed the connection) |
02:37:31 | * | leorize quit (Ping timeout: 256 seconds) |
02:37:53 | * | laaron joined #nim |
02:38:49 | * | leorize joined #nim |
02:47:44 | shashlick | @Araq @narimiram - nightlies passed on devel, need to backport the fixes into version-0-20. https://travis-ci.org/genotrance/nightlies |
03:02:03 | * | tiorock joined #nim |
03:02:03 | * | tiorock quit (Changing host) |
03:02:03 | * | tiorock joined #nim |
03:02:03 | * | rockcavera quit (Killed (verne.freenode.net (Nickname regained by services))) |
03:02:03 | * | tiorock is now known as rockcavera |
03:11:41 | * | chemist69 quit (Ping timeout: 258 seconds) |
03:13:37 | * | chemist69 joined #nim |
03:21:35 | leorize | shashlick: with 0.20 csources, you can now build for all os/arch with make and enjoy parallelization :D |
03:22:51 | shashlick | should we update CIs? |
03:23:54 | leorize | I've covered everything except appveyor |
03:24:30 | leorize | that should bring down csources build time to <30s (from exp. on azure) |
03:24:58 | * | I_Right_I quit (Remote host closed the connection) |
03:25:06 | leorize | can you update appveyor? :) %NUMBER_OF_PROCESSORS% should be used for make's -j parameter |
03:26:51 | shashlick | does the makefile make it into the xz file as well? |
03:27:34 | leorize | build.sh does that? |
03:28:11 | leorize | oh, then idk |
03:30:05 | shashlick | ideally the same makefile also builds nim - just builds koch if it is there and then koch boot and tools |
03:30:32 | shashlick | the all a person would have to do is make and it would make csources and nim for the average downloader |
03:50:37 | sealmove | guys I am making a hex editor, it's almost ready, I am so hyped :) |
03:55:46 | sealmove | sneak-peek https://asciinema.org/a/guTVkURUY3Cl95fNllflDczzR |
03:56:58 | leorize | kitty user :) |
03:57:48 | sealmove | how do you know!? |
03:58:12 | sealmove | ah, asciinema has it as metadata |
03:58:58 | leorize | I like kitty, but it doesn't support iosevka so I dropped it :p |
03:58:59 | sealmove | well, I only use kitty because it renders images nicely, so it's easy to enable that feature in ranger |
03:59:35 | leorize | build a rival to alacritty in Nim :D |
03:59:58 | * | nsf joined #nim |
04:00:20 | sealmove | f*ck yeah! |
04:04:35 | sealmove | But first is the hex editor. I didn't find any nice one, except r2, but oh well, you have to navigate in it to reach the hex editing mode and even then the defaults are weird (for example the offset might not be at 0). |
04:05:24 | sealmove | Then there is hexyl, but it's only a hex dumper, not editor. |
04:40:27 | * | brainproxy quit (Ping timeout: 248 seconds) |
05:06:49 | rayman22201 | I briefly tried to contribute to alacritty... Cool project, but it was one of the reasons I gave up Rust for Nim lmao |
05:13:10 | sealmove | What was the reason? |
05:13:33 | rayman22201 | The Crate system |
05:13:59 | rayman22201 | The crate system + cross platform development |
05:14:14 | rayman22201 | I was trying to get windows support to work |
05:19:18 | sealmove | If I understand correctly, the problem is that Rust's standard library is too small and crates vary in quality/stability? |
05:20:28 | * | leorize quit (Quit: WeeChat 2.3) |
05:24:39 | * | narimiran joined #nim |
05:27:10 | rayman22201 | No. (Though that was more true back when I used it. There are many more crates these days.) The problem I had was that configuring crates to deal with cross-platform use was very complicated and error prone. |
05:27:35 | rayman22201 | And there were many implicit defaults that I found odd |
05:38:01 | sealmove | So basically you are saying the problem is that crates are inconsistent with one another? |
05:39:04 | sealmove | While languages like C# and Nim have more consistency because there are guys (guy? :P) making calls? |
05:39:18 | rayman22201 | yes, but I did not like the configuration system itself for crates. |
05:39:54 | rayman22201 | Crates are very consistent and very opinionated. Too much so. If you have to make anything that they haven't accounted for, then you are screwed. |
05:40:10 | rayman22201 | Like say, which windows kernel version you using... |
05:41:09 | rayman22201 | I don't need a whole yaml file + pragmas, I need typesafe ifdef... |
05:41:59 | rayman22201 | Note: this was ~2 years ago. Things may have changed / gotten better since then. |
05:42:31 | sealmove | I see, so basically hard to hack/adjust crates |
05:42:36 | rayman22201 | Also, having "sub-crates" was a PITA. |
05:42:52 | rayman22201 | dependencies in the same repo basically. |
05:43:47 | rayman22201 | The story isn't much better in Nim land in this regard, but I also don't feel forced into making "sub-nimble" packages either, so it doesn't bother me as much. |
05:44:40 | rayman22201 | Rust relies soooo heavily on Crates, that you are forced into it, even if you don't want it. |
05:45:03 | sealmove | Well it forces you to do tons of things |
05:45:17 | sealmove | To work in a very particular way |
05:45:20 | rayman22201 | I think it over-complicated the architecture of alacritty from an early state, and it was unnecessary complexity. |
05:46:06 | rayman22201 | But even hello world forced me to make a Crate (which had even more boilerplate back then). I find that absurd... |
05:46:37 | rayman22201 | Yeah. Nim let me just "get shit done"... |
05:46:58 | sealmove | Yes I feel the same way. It feels overarchitectured, though coming from Mozilla I can see their reasons. For really large projects it having such a rigid workflow is probably good. |
05:47:47 | rayman22201 | Yeah, I understand the reasoning. But It should be something that a project grows into, not is forced into from the beginning. |
05:49:46 | sealmove | Consistency vs simplicity |
05:50:07 | sealmove | Rust doesn't trust programmers at all :> |
05:50:18 | rayman22201 | Exactly. lol |
05:50:49 | rayman22201 | It's not like I don't "feel safe" when using Nim. lol |
05:51:11 | rayman22201 | But I also don't feel like the compiler treats me like an idiot. |
05:51:42 | rayman22201 | Rust just always thinks you are a terrible programmer. I am terrible sometimes, but as much as Rust thinks lol. |
05:52:07 | sealmove | Yeah I think that's the gist of it |
05:52:33 | sealmove | Products like Rust and Go are aimed for noobs |
05:52:52 | sealmove | And they just get in the way of a normal person, lol |
05:53:18 | sealmove | I understand big companies like Mozilla and Go want to feel protected from stupidity |
05:53:47 | sealmove | But come on... tools shouldn't replace knowledge/skill |
05:54:08 | rayman22201 | Well, from a business standpoint, it makes sense. It's cheaper to hire crappy programmers and give them safety scissors. |
05:54:32 | Araq | I doubt it. |
05:54:46 | Araq | crappy programmers always do more harm than good |
05:55:11 | rayman22201 | Lol. I agree. Java already tried this strategy, and look at all the terrible Java code in the world these days :-P |
05:55:16 | Araq | but yeah, you cannot hire only PhDs to do the programming |
05:55:22 | rayman22201 | too bad the business people didn't seem to get the message. |
05:55:32 | rayman22201 | Since they keep trying. |
05:56:12 | rayman22201 | Also true. We can't yet clone Araq or make AraqML :-P |
05:56:26 | sealmove | Well, at the very least this makes Rust a very unfun language imo. I don't get why people get hyped with it, maybe it's marketing. |
05:56:37 | * | leorize joined #nim |
05:56:57 | rayman22201 | It's all marketing. It's one of the best marketing I've ever seen for a programming language. |
05:58:37 | Araq | nah, I'm sorry, Rust is to be respected. |
05:59:01 | Araq | They solved many many problems. |
05:59:31 | Araq | And even if you disagree with their answers, it asked the right question |
06:00:15 | rayman22201 | ok ok. I'll admit that I'm over-exaggerating. I agree with you on that point Araq. |
06:00:25 | rayman22201 | They did ask the right questions. |
06:01:01 | rayman22201 | And they opened the door to allow other newer languages to flourish. |
06:04:01 | Araq | now ... where is my =move implementation? |
06:04:13 | Araq | clybber? |
06:08:50 | * | leorize quit (Remote host closed the connection) |
06:15:38 | skrylar[m] | rust is still that way |
06:16:11 | skrylar[m] | or i should say cargo is still that way |
06:17:18 | * | leorize joined #nim |
06:33:16 | * | PMunch joined #nim |
07:00:00 | * | gmpreussner quit (Quit: kthxbye) |
07:04:30 | * | gmpreussner joined #nim |
07:04:36 | * | laaron quit (Remote host closed the connection) |
07:05:41 | * | krux02 joined #nim |
07:06:29 | * | Amun_Ra quit (Quit: brb) |
07:07:45 | * | laaron joined #nim |
07:10:28 | * | Amun_Ra joined #nim |
07:14:25 | * | Vladar joined #nim |
07:24:29 | FromGitter | <xmonader> how is rust for noobs? :D |
07:25:03 | FromGitter | <xmonader> I agree on Go being simple, too simple language, but rust? |
07:29:18 | * | leorize quit (Quit: WeeChat 2.3) |
07:37:10 | * | laaron quit (Remote host closed the connection) |
07:38:42 | * | laaron joined #nim |
07:56:19 | * | floppydh joined #nim |
08:08:47 | * | Tongir joined #nim |
08:40:40 | FromDiscord_ | <sealmove> xmonader: Because it doesn't trust you to do things your way. |
08:46:09 | FromGitter | <xmonader> It's more of helping you avoiding common problems, that kept happening over the years no? |
08:46:40 | FromDiscord_ | <sealmove> If you are experienced, you trust yourself and don't want the language to make decisions for you. That's why C++ people won't pick it. |
08:47:31 | FromDiscord_ | <sealmove> It mostly inexperienced programmer and gets in the way of experienced ones. |
08:47:40 | FromDiscord_ | <sealmove> mostly helps* |
08:47:55 | FromGitter | <arnetheduck> rust and well-written c++ code are nearly identical.. the experienced programmers probably don't notice the difference ;) |
08:48:16 | FromGitter | <xmonader> C++ is dumpster for all features, and yet is isn't it offering ways to mimic move semantics now? and bunch of 1000 types of pointers |
08:49:09 | FromGitter | <arnetheduck> well, the experienced c++ will avoid the old features, and indeed use moves and all that stuff to never allocate memory, to have the compiler deal with ownership and resource mgmt etc |
08:51:20 | FromGitter | <arnetheduck> likewise with threading, et al.. sure, it's hard to reach that level of proficiency because of all the baggage, but once you manage to slim it down, it' |
08:52:06 | FromDiscord_ | <sealmove> The real burden is... Trying to do low level things yourself. It's nearly impossible to implement a nontrivial data structure in Rust, so you always get it from a crate. The actual implementation is a unsafe Rust {} |
08:53:39 | FromGitter | <arnetheduck> well yeah, that escape hatch is needed - compilers are not omniscient and haven't beaten turing on undecidability yet so.. |
08:55:02 | FromDiscord_ | <sealmove> So I think it defeats the purpose. Because if you can write good unsafe Rust then you don't need protection while writing simpler code. That's why I said it's for less experienced people. |
08:55:25 | FromGitter | <arnetheduck> the selling point is that those parts of your code are easy to find simply becuase of how they stand out - the search space for those classes of bugs is dramatically reduced.. I'd say that's the driving reason for its popularity - we see that a lot in spaces like crypto and networking where security demands are high |
08:57:31 | FromGitter | <arnetheduck> nope, you can be as good as you like, but I'll trust the compiler (or really, the theory behind it) more than your attempt to be faithful to the principles that you need to follow.. humans are not that great at the kind of attention to detail, but they are great at overestimating their own capabilities... "can't be wrong" beats "shouldn't be wrong in my opinion" |
08:57:39 | FromDiscord_ | <sealmove> Yes, if you want 100% guarantees, it's a good choice, but it's too niche. |
08:58:23 | FromDiscord_ | <sealmove> The added complexity is not worth it most cases. |
09:00:03 | FromGitter | <arnetheduck> would actually be nice to have some nice first-class support for bridging nim and rust, to gain access to all that code that adheres to the stricter guidelines that the language requires, and where the developer has been forced to thing up-front about a whole bunch of stuff |
09:01:47 | ehmry | if rust, why not ada/spark then? I've never seen a successful rust compile, but I know that ada works |
09:04:32 | ehmry | it seems like people choose rust because its a fad, not because of assurance, we've had better high-assurance stuff than rust for while now |
09:08:34 | Araq | fad is one aspect, the other is that Ada is much better for embedded devices with less memory and worse for when you can afford a heap |
09:09:17 | federico3 | ehmry: care to expand on "we've had better high-assurance stuff than rust"? |
09:09:21 | ehmry | ada |
09:09:39 | FromGitter | <xmonader> because rust checks other boxes too, like being bit modernish and some fancy fp styles. I'd pick a lisp without gc, that what inspired rust after all no? |
09:09:43 | ehmry | ada had a spec before a compiler, rust has compilers but no spec |
09:10:22 | Araq | and Ada has like the worst marketing of all time, for instance, Ada has 2 stacks, this means you can return variable-length data *from* a function without touching the heap, it's gold for the "allocations are slow" crowd. unfortunately they don't know it |
09:14:24 | FromGitter | <xmonader> June is here and V lang is going to render all languages obsolete :D |
09:17:07 | livcd | well the site is down |
09:17:45 | * | laaron quit (Remote host closed the connection) |
09:18:03 | FromGitter | <xmonader> @livcd nim's? |
09:19:28 | * | laaron joined #nim |
09:23:43 | livcd | vlang |
09:26:55 | Zevv | https://github.com/vlang/v/blob/master/examples/tetris/tetris.v first time I see some actual code |
09:27:44 | * | PMunch quit (Remote host closed the connection) |
09:30:05 | FromGitter | <xmonader> definitely better syntax than go, yet no enums :( |
09:30:07 | * | Tongir quit (Ping timeout: 246 seconds) |
09:33:09 | * | abm joined #nim |
09:33:13 | * | stefanos82 joined #nim |
09:34:06 | * | PMunch joined #nim |
09:36:51 | FromDiscord_ | <sealmove> What about Rust as a compile target? |
09:37:15 | FromDiscord_ | <sealmove> Nim could compile to Rust to ensure guarantees. |
09:37:43 | FromGitter | <xmonader> or Nim can get the move semantics :D |
09:38:31 | FromDiscord_ | <sealmove> Just saying, maybe Rust is an interesting target for compiling to. |
09:38:48 | Araq | the only guarantee that Rust offers and Nim doesn't is the guarded pointers. which can't Rust infer all the time, so guess what, Nim couldn't infer it either |
09:39:19 | Araq | and so we can either compiler to unsafe Rust or we need lifetime annotations on our own |
09:39:29 | Araq | which kind of defeats the purpose |
09:41:16 | Araq | all that it would accomplish is slower compile-times |
09:41:58 | Araq | in contrast to that Go is actually an interesting compiler target, we offload the task of having to write a multi-threaded GC to somebody else |
09:42:52 | FromDiscord_ | <sealmove> Are you sure it's impossible to generate lifetime annotations without the source language having it? |
09:42:55 | * | al_ joined #nim |
09:43:19 | Araq | I'm such it's possible to generate it for Nim for many many cases. |
09:43:36 | Araq | but I don't know if the last missing 20% would kill it |
09:43:48 | Araq | *sure |
09:47:10 | FromDiscord_ | <sealmove> Hmm, little confused about Nim->Go. Nim can use Go's GC, no? |
09:47:26 | Araq | true but I don't know how it works :P |
09:48:51 | Araq | compiling to X usually means you get good interop with X if you do it properly, so you could easily use Go libs |
09:50:15 | * | CcxWrk quit (Remote host closed the connection) |
09:50:31 | FromGitter | <xmonader> @Araq you mean go assembler itself right? |
09:51:58 | FromGitter | <alehander42> sealmove but that's the whole point: you have to add your lifetime anntoations so the compiler can know what to do |
09:52:09 | FromGitter | <alehander42> i am feeling that you're missing on the point of rust |
09:52:56 | FromGitter | <alehander42> if it was easy to generate somehow all of that invariants correctly based on normal code, somebody would've created such a language/type engine already |
09:53:58 | FromGitter | <alehander42> it's a bit like "why cant we compile ruby to C++ easily" |
09:54:05 | Araq | I wouldn't say that. |
09:54:27 | FromGitter | <alehander42> well that's how i see it, should've add IMHO |
09:54:30 | * | CcxWrk joined #nim |
09:54:31 | Araq | Before Rust came along not many could imagine it's possible at all. |
09:54:48 | Araq | so now that we know Rust can do it, people can think about inferring more and more lifetimes |
09:54:52 | FromGitter | <alehander42> ok, but it still sounds hard to infer them |
09:55:09 | FromGitter | <alehander42> oh yes, but my point is that this is the *hard* problem |
09:55:20 | Araq | I think the bigger problem is that even if you infer them all |
09:55:25 | FromGitter | <alehander42> not something that would be easy to just get for free while compiling to rus |
09:55:31 | Araq | in the end it's more restrictive than not having them. |
09:55:53 | * | xet7 quit (Read error: Connection reset by peer) |
09:56:11 | FromGitter | <alehander42> otherwise sealmove you're right that more attention should be given to ada spark and other similar systems, but yeah the marketing here works |
09:56:43 | FromDiscord_ | <sealmove> It wasn't me that mentioned Ada/spark |
09:56:49 | FromGitter | <alehander42> well yes, that's why an ability to set some of them explicitly and write unsafe blocks somewhere for 1 5% of your code |
09:57:01 | FromGitter | <alehander42> seems still reasonable |
09:57:03 | FromGitter | <alehander42> oh sorry |
09:57:36 | * | xet7 joined #nim |
09:57:49 | FromDiscord_ | <sealmove> But I get your point. If you can infer lifetimes, why even bother compiling to Rust... |
09:58:07 | FromGitter | <alehander42> honestly i can imagine something like an interactive(refactor-like) system which suggests different restrictions and the programmer refining using it |
09:58:15 | FromGitter | <alehander42> but i guess this will backfire a lot |
09:58:20 | FromGitter | <alehander42> sealmove exactly! |
09:58:27 | Araq | Haskell is pretty good at type inference |
09:58:40 | * | nc-x joined #nim |
09:58:46 | Araq | still working with it is completely different than working with Python. |
09:58:49 | nc-x | doesn't scopes infer lifetimes or something like that |
09:58:56 | nc-x | ? |
09:59:12 | stefanos82 | Araq: I hope one day to have "The Design and Evolution of Nim Language" into my hands signed by you. I have so many things to learn about decision-making during the design and implementation of a programming language. |
09:59:16 | FromGitter | <alehander42> yeah they had that "sidebands" idea, but not sure if related |
09:59:38 | FromDiscord_ | <sealmove> There is another thing though. Rust has strong macros. The syntax is a nightmare but it's possible to write a language in Rust macros. |
09:59:39 | Araq | and I'm not saying that Haskell is bad, I'm saying people don't move from Python to Haskell just because it can infer "all the important things" |
10:00:13 | nc-x | Scopes: Compile-time resource management using view propagation, an annotation-free variation of borrow checking. |
10:00:14 | FromGitter | <alehander42> Araq, the other thing i wonder is if it's easy to have a language both good for low system programming with lifetime-like infereence moves etc and for high level gc-based stuff |
10:00:43 | FromGitter | <alehander42> basically nim is going in this path, and i am still not sure how well would different libs/parts of the lang coexist |
10:00:50 | Araq | stefanos82, that would be awesome indeed :-) |
10:00:57 | nc-x | Anyways how long for the release? |
10:01:29 | Araq | nc-x, we have Scope's author here in #nim, @lritter iirc |
10:02:39 | narimiran | nc-x: by my calculation, it will take around 3 more hours for nightlies to test everything |
10:02:39 | nc-x | yes i remember he gave some explanation regarding the view progagation recently |
10:02:48 | nc-x | narimiran: okay |
10:03:22 | Araq | the problem with lifetimes is that they fail to model a heap. |
10:03:33 | nc-x | but imo the nightlies travis script needs to be split up to use different CI services. currently it takes too long for them to build. |
10:03:58 | FromGitter | <alehander42> Araq, is there an alternative mechanism that can model them |
10:04:06 | nc-x | or make travis somehow prioritize win/linux/mac to be built first bcos they are most common platforms |
10:04:07 | narimiran | nc-x: there's some work done by leorize[m] to use azure pipelines, which should speed up things quite a bit |
10:04:14 | Araq | haven't found any, I keep looking, alehander |
10:04:33 | dom96 | Nim->Go? Please no |
10:04:34 | nc-x | or if nim repo is green, then nightlies should not run tests but directly build |
10:04:50 | dom96 | It's tough enough to convince Go fans of Nim at my workplace as it is |
10:04:55 | FromGitter | <alehander42> i also think nim should have its own good concurrency story |
10:05:04 | FromGitter | <alehander42> and no need of go tooling/tech dependence |
10:05:05 | nc-x | narimiran: yeah. azure offers parallel builds up to 10 iirc, so it should be a huge improvement. |
10:05:20 | narimiran | nc-x: exactly. plus it is faster in general |
10:05:32 | Araq | my idea is instead of using labels as lifetimes we use more general locations to describe what's going on |
10:05:32 | dom96 | alehander42: Nim does have a good concurrency story |
10:05:34 | dom96 | alehander42: async/await is concurrency |
10:05:38 | FromGitter | <alehander42> Araq, but what's the biggest weakness of lifetimes for heaps: what is a usecase where they fail a lot |
10:06:33 | FromGitter | <alehander42> @dom96 yes, that's the one (but still i remember it had some leaks etc , or this was a jester specific issu) |
10:06:43 | leorize[m] | narimiran, nc-x: well, seeing how supporting the entire CI set requires at least 4 jobs. This would effectively means only 2.5 pr/commit can be built at one time (haven't tried) |
10:07:00 | narimiran | "only" |
10:07:00 | dom96 | alehander42: Those are pretty much fixed with my latest PR |
10:07:08 | FromGitter | <alehander42> ah great |
10:07:12 | nc-x | IMO, we should not commit to using a single CI service |
10:07:25 | Araq | you have an array of items, you delete one entry inside it, not all of them. Ensure that afterwards you don't access this element any longer. |
10:07:30 | nc-x | lets have travis for linux, appveyor for windows, azure for mac or something like that |
10:07:33 | dom96 | Which isn't in 0.20.0, but 0.20.2 will surely not be far behind |
10:07:46 | Araq | you can count on 0.20.2 :-/ |
10:07:53 | nc-x | then it will be faster. plus if any one of them go down, then things won't stop here. |
10:08:06 | federico3 | dom96: I wouldn't call it good |
10:08:18 | narimiran | nc-x: based on the speed differences, maybe azure can do half of everything, and travis and appveyor do 1/4 each |
10:08:23 | Araq | nc-x, I completely agree but switching the CIs is not something we do before a release |
10:08:25 | FromGitter | <alehander42> Araq isn't this more about being hard to analyze collections |
10:08:36 | FromGitter | <alehander42> but that's related to heap overally probably yeah |
10:08:44 | leorize[m] | get tid of appveyor all together :p that's the biggest bottleneck |
10:08:46 | nc-x | Araq, narimiran: yeah |
10:08:51 | dom96 | federico3: Why not? |
10:08:58 | leorize[m] | one job at a time is terrible |
10:09:44 | narimiran | leorize[m]: yeah, ok, we can polish the details (azure 2/3, travis 1/3?) so we can have more concurrent/parallel tests |
10:10:51 | leorize[m] | sure, and if I can implement job splitting, it's possible to crunch through the entire Nim's test suite in 10m or less |
10:12:56 | federico3 | so much pain for CI |
10:13:32 | dom96 | alehander42: The main cause of leaks (I hope) is stuck futures, I was able to confirm it in a game I'm developing so this should extend to other projects as well |
10:14:02 | * | nc-x quit (Quit: Page closed) |
10:17:41 | * | leorize joined #nim |
10:22:05 | narimiran | while we wait for new nim, here is new crystal release: https://crystal-lang.org/2019/06/05/crystal-0.29.0-released.html |
10:22:46 | narimiran | "There were 116 commits since 0.28.0 by 24 contributors." vs. >1000 commits for Nim new version ---> we should release more often :) |
10:27:24 | FromGitter | <xmonader> but they have a much smaller core language @narimiran |
10:27:45 | narimiran | i wasn't 100% serious ;) |
10:28:41 | FromGitter | <xmonader> xD :D I like what you did so far on the docs, can you maybe start some work on `effective nim` like effective go somehow? |
10:28:59 | narimiran | thanks :) |
10:29:39 | narimiran | i have an idea to make the sequel to 'Nim Basics', but i haven't started working on it and i don't know when/if i will |
10:29:52 | leorize | when can I expect nim 0.20? :p |
10:30:00 | narimiran | leorize: today :) |
10:30:36 | leorize | I should merge the nim 0.19.6 pr to haikuports then |
10:30:41 | * | laaron quit (Quit: ZNC 1.7.1 - https://znc.in) |
10:30:54 | * | laaron joined #nim |
10:31:20 | Araq | what? are you saying Haiku is always one version behind? |
10:31:37 | leorize | I'm busy :p |
10:31:52 | stefanos82 | question: is there a particular reason "megatest" use a single core during execution? |
10:31:57 | narimiran | at least it is not like bleeding-edge Archlinux, which as of today will be 5 versions behind |
10:31:58 | leorize | haven't got the time to test it |
10:32:15 | leorize | note: rust is up-to-date there :P |
10:34:33 | krux02 | stefanos82, well the compiler always uses just one core, The parallelism comes when multiple instances of the C compiler are invoked to compile the generated C files. |
10:34:59 | krux02 | parallelizing a compiler is hard. calling a compiler multiple times in parallel is easy. |
10:35:15 | stefanos82 | krux02: I thought megatest would also execute concurrent / parallel tests within it |
10:35:44 | stefanos82 | that's the impression I originally had to be honest with you |
10:35:51 | krux02 | the point of megatest is to join a lot of test to reduce the overhead, not to make anything parallel. |
10:36:32 | krux02 | calling the compiler on a small file requires to process system with all its dependencies, this is often multiple times the size of the testfile itself. |
10:37:00 | krux02 | when you join all the test files, you still need to process system.nim (and other dependencies) just once |
10:37:34 | krux02 | so instead of compiling system.nim 500 times it now just compiles it one time. |
10:38:09 | stefanos82 | krux02: what I mean is that I thought part of inner tests were also testing concurrency and parallelism, much like we have under tests for some cases |
10:38:25 | krux02 | stefanos82, btw, are you stefantalpalaru on github? |
10:38:31 | stefanos82 | nope |
10:38:35 | krux02 | ok |
10:39:26 | krux02 | with parallelism I have one guide I alwas follow. First check if you can optimize anything else. Then do that. |
10:39:38 | krux02 | Parallelism creates complexity and is error prone. |
10:39:52 | krux02 | and it doesn't promise too much scale. |
10:40:29 | krux02 | a theoretical maximum of 8 times faster on 8 cores, but only when there is absolutely no overhead. |
10:41:08 | Araq | it's not that error prone, parallelism is quite easy, concurrency is the hard thing |
10:41:45 | stefanos82 | often people confuse these two terms |
10:41:59 | Araq | however, it can still be tedious |
10:42:48 | stefanos82 | in my opinion, to remedy this situation with concurrency demands a complete redesign of CPUs |
10:42:56 | krux02 | I don't distinguish them that much as other people. But parallelism is about performance and concurrency is about control flow |
10:43:13 | krux02 | stefanos82, we already have GPUs |
10:43:19 | stefanos82 | krux02: true |
10:43:45 | krux02 | it just needs to be simpler to program for GPUs. |
10:44:25 | krux02 | then we are at my Rendering DSL again. |
10:47:28 | stefanos82 | too bad I don't have an actual use of Nim's important usage. I got stuck with PHP and WordPress...don't ask! -_- |
10:47:44 | krux02 | nim used to compile to PHP |
10:47:49 | * | dddddd joined #nim |
10:48:00 | krux02 | (as an option) |
10:48:49 | stefanos82 | to me Nim is an important language that I need to keep an eye on it |
10:50:03 | stefanos82 | what V language claims to achieve, is what I wanted Nim to do |
10:50:05 | * | seni joined #nim |
10:50:20 | stefanos82 | but I think Nim is getting there already |
10:52:28 | leorize[m] | Araq: has the =move went live or I'd have to wait for 0.21? |
10:52:45 | stefanos82 | my dream would be to see Nim's execution time reaching microseconds and milliseconds at most |
10:52:49 | stefanos82 | that would be mind blowing! |
11:01:40 | * | nc-x joined #nim |
11:01:58 | nc-x | leorize: wait for 0.21 |
11:02:50 | stefanos82 | guys, is this behavior normal? http://paste.debian.net/1086533/ |
11:03:00 | stefanos82 | I tested the example from the official website |
11:03:32 | stefanos82 | my version is git hash: 8443392db5babc4b08db7f021e6dcd6cfa26a969 |
11:03:44 | ehmry | stefanos82: commas? |
11:04:28 | nc-x | stefanos82: you forgot the comma |
11:04:54 | nc-x | between the two Person(..) objects |
11:05:15 | nc-x | inside people |
11:06:49 | stefanos82 | lol darn it |
11:06:52 | stefanos82 | good catch folks |
11:07:11 | * | nc-x quit (Quit: Page closed) |
11:08:57 | Araq | leorize[m], no =move for 0.20, sorry |
11:09:07 | Araq | but we have a good spec now... *cough* |
11:14:49 | leorize[m] | shashlick: I've just looked at nightlies, you can skip brew update for shorter build time |
11:18:15 | * | deech joined #nim |
11:35:50 | * | nsf quit (Quit: WeeChat 2.4) |
11:42:18 | lqdev[m] | shashlick: is nimterop capable of cImporting single-header libraries? |
11:45:32 | * | manniq31 joined #nim |
11:46:21 | * | manniq31 quit (Client Quit) |
11:57:24 | * | Kaivo quit (Quit: WeeChat 2.4) |
11:59:31 | * | AndChat|624225 joined #nim |
12:00:25 | FromGitter | <kaushalmodi> From a Twitter conversation, someone is wishing that Nim had ADT. |
12:00:53 | FromGitter | <kaushalmodi> What's ADT? Abstract Data Type? |
12:01:12 | * | NimBot joined #nim |
12:01:37 | FromGitter | <kaushalmodi> Wouldn't JsonNode, etc be abstract data type? I don't get that buzz word. |
12:02:08 | * | envoyt quit (Ping timeout: 248 seconds) |
12:02:11 | FromGitter | <xmonader> @kaushalmodi I do wish so too! |
12:02:41 | FromGitter | <kaushalmodi> Coming from a non CS background, what's an ADT all about? |
12:03:15 | FromGitter | <kaushalmodi> I read online that an ADT has that type specific functions.. but we have that almost everywhere in Nim. |
12:03:16 | FromGitter | <xmonader> it's algebraic not abstract |
12:03:34 | * | nc-x joined #nim |
12:03:58 | FromGitter | <xmonader> roughly it's about having some types like ⏎ type PaymentType = CreditCard Number | PayOnDelivery |
12:04:33 | FromGitter | <kaushalmodi> Ok, I ended up on https://en.m.wikipedia.org/wiki/Abstract_data_type |
12:04:55 | nc-x | narimiran, Araq: why does the blog post say nothing about the newruntime - its current state, new spec, and the future plans? imo it should be part of it. It is of interest to a lot of people. |
12:05:40 | FromGitter | <xmonader> https://en.m.wikipedia.org/wiki/Algebraic_data_type u need this one |
12:05:59 | FromGitter | <xmonader> I know variant exists in nim, but it's just ugly to use. |
12:06:50 | FromGitter | <kaushalmodi> Would concept fit the bill (not that I have used it): https://nim-lang.github.io/Nim/manual_experimental.html#concepts |
12:07:19 | FromGitter | <kaushalmodi> From the looks, it seems like it constraints the value of a data type using some user provided logic. |
12:09:19 | FromGitter | <kaushalmodi> Well, if you or anyone wants to further this discussion on ADT, here's the thread on Twitter: https://twitter.com/mmstick/status/1136439753971134464?s=09 |
12:10:43 | FromGitter | <xmonader> concepts looks like interfaces, or typeclasses in Haskell, the example for comparable is like `Eq` |
12:11:37 | * | nc-x quit (Ping timeout: 256 seconds) |
12:12:00 | leorize | kaushalmodi: iirc gara has more features than patty, but I'm not sure since I never saw a need for pattern matching :p |
12:14:16 | FromGitter | <xmonader> in short, you can describe sum types using enums, do enums take params? ⏎ ⏎ and product types can be represented with tuples or records or at least that's how i do it |
12:15:57 | leorize | afaict, these types are just your normal case object without the kind field |
12:16:55 | FromGitter | <xmonader> @kaushalmodi https://github.com/xmonader/nim-redisparser/blob/master/src/redisparser.nim#L6 from line 6 to 54 in haskell u would do something like this https://github.com/informatikr/hedis/blob/master/src/Database/Redis/Types.hs#L52 |
12:17:45 | FromGitter | <kaushalmodi> leorize: neither have I needed pattern matching. I've heard of gara, will mention that too. |
12:18:14 | leorize | @xmonader: with a bit of macro magic that kind of syntax is also possible with Nim |
12:18:30 | * | lritter joined #nim |
12:20:37 | FromGitter | <xmonader> it will make our lives easier, i faced the same thing for my beconde library so instead of doing ⏎ ⏎ ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=5cf905156f530d3b6147a01c] |
12:21:10 | leorize | you can just not qualify the enums... |
12:21:41 | FromGitter | <xmonader> are you talking about pure? |
12:21:52 | leorize | well but doesn't appear to be too hard to emulate that syntax |
12:22:11 | leorize | @xmonader: you never have to qualify enums... |
12:22:44 | FromGitter | <xmonader> well, leorize then after than you will have boilerplate for $ , == and hash while in haskell u can always do deriving Show, Eq for such |
12:24:28 | leorize | do you feel like writing a macro? :) I'm pretty sure this is possible with some macro magic |
12:25:11 | FromGitter | <xmonader> ah I know, because I didn't settle on enum style yet, in pascal u usually have some type abbrev in the beginning and in some languages that forces qualified name like python or C# .. i like to use fullnames most of the time |
12:25:32 | FromGitter | <xmonader> nah, too many edge cases and my macro powers aren't that good in nim |
12:26:23 | leorize | in Nim use abbrev in the beginning |
12:27:15 | FromGitter | <xmonader> or use {.pure.} ? |
12:28:40 | leorize | pure will be deprecated IIRC |
12:30:03 | leorize | there'll be a kind of qualification required if collide for enums like the one for modules iirc (not sure if Araq implemented that yet) |
12:32:46 | FromGitter | <xmonader> patty sounds to have that macro @leorize !! yay ⏎ https://github.com/andreaferretti/patty/blob/master/README.md#constructing-variant-objects |
12:33:44 | leorize | told you it's possible :P |
12:35:03 | * | deech quit (Ping timeout: 245 seconds) |
12:44:34 | * | zahary joined #nim |
12:51:33 | FromGitter | <arnetheduck> patty would work well with https://github.com/arnetheduck/nim-result :) |
12:52:00 | * | xet7_ joined #nim |
12:52:21 | * | xet7_ quit (Remote host closed the connection) |
12:52:45 | * | xet7_ joined #nim |
12:55:03 | * | xet7 quit (Ping timeout: 245 seconds) |
12:55:19 | * | xet7_ is now known as xet7 |
12:56:58 | * | AndChat|624225 quit (Ping timeout: 258 seconds) |
12:58:08 | FromGitter | <xmonader> i like that! @arnetheduck |
12:59:15 | FromGitter | <xmonader> I know Araq hates options/eithers, and I'm sure the stdlib won't utilize that in favor for exeptions |
12:59:43 | * | Snircle joined #nim |
13:00:20 | FromGitter | <alehander42> are there any apps comparing exceptions/results for the same code |
13:00:29 | FromGitter | <alehander42> this woudl really help to compare, otherwise good lib |
13:00:59 | * | brainproxy joined #nim |
13:01:49 | Araq | 'hate' is a strong word, but if you try to sell them as an "alternative" to exceptions than I still cannot take you seriously |
13:07:00 | FromGitter | <xmonader> Well, many others design their libs with that as alternative to exceptions. And everyone is taking them seriously :) |
13:08:41 | leorize | certainly not nim users, most libs are designed with exceptions :) |
13:08:55 | Araq | so where are these new languages where '+' returns an Option[int]? |
13:10:05 | Araq | all they do is to map IO errors into Either monads and delude themselves into thinking that the design "scales". It doesn't which is why array index out of bounds traps in Rust, it doesn't return an Option[ElementType] |
13:10:57 | livcd | whoa a i was just searching for a very generic thing and google gave me a github repo for a project in nim |
13:11:19 | leorize | you've been using google for too long :p |
13:11:27 | FromGitter | <xmonader> @Araq won't that be fixed with dependable types? so instead of array[5] you have type ArrayOf5 ? |
13:11:34 | * | envoyt joined #nim |
13:11:38 | FromGitter | <arnetheduck> @alehander42 https://en.cppreference.com/w/cpp/experimental/fs/copy - have your pick :) |
13:11:51 | livcd | leorize: i was searching for "text expander for windows" |
13:12:13 | livcd | and got https://github.com/ajusa/sanictype as a first hit |
13:12:55 | leorize | yea, you've been using google for too long :p |
13:13:05 | leorize | https://www.startpage.com/do/metasearch.pl?query=text%20expander%20for%20windows |
13:13:18 | leorize | ^ that's what normal people see |
13:13:35 | leorize | I mean people that don't use google as much :p |
13:14:22 | Araq | personalized searches rule :-) |
13:15:33 | FromGitter | <xmonader> also another question, does nim `forces` you to handle exceptions in the calling blocks? |
13:15:52 | Araq | use .raises: [] and the compiler does force you to handle it |
13:16:41 | leorize | Araq: does that work for `block:` statements? |
13:17:00 | FromGitter | <xmonader> It sounds like a sane default maybe .noraises. should be provided instead |
13:17:16 | Araq | that has been proposed indeed. |
13:17:50 | * | apodo joined #nim |
13:19:08 | FromGitter | <xmonader> much safer :) |
13:19:19 | Araq | by what measure? |
13:20:09 | Araq | forcing me to ignore errors in order to comply to .noraises is not 'safer' |
13:21:42 | FromGitter | <xmonader> It's the programmer choice to ignore it, but what i expect from the language is to tell me there's something i need to handle (which is only activated with raises) |
13:21:44 | livcd | what happened to ryukoo |
13:22:00 | narimiran | livcd: that's what i'm wondering too |
13:23:22 | livcd | well he is active on gitlab |
13:23:40 | FromGitter | <xmonader> the case with `Result` type is when you match against it right there you will handle the code for Error (or ignore it) but with exceptions it may go unnoticed unless you control the library you're using to `force` raises. |
13:24:07 | * | Araq sighs |
13:24:16 | Araq | here is what happens in reality: |
13:24:25 | Araq | you forget to catch the exception |
13:24:39 | Araq | the program dies a bit too early with a quite instructive error message |
13:25:20 | Araq | here is the gain of the idea: code size reduction by a factor of 2. |
13:25:27 | Araq | easily. |
13:25:38 | Araq | cost vs benefit analysis, it's a thing. |
13:25:47 | disruptek | seems a little unfair to claim that .raises. is broken on Monday and then claim that .raises. solves anything on Tuesday. |
13:26:42 | Araq | disruptek, .raises does solve the problem that programmers think they have, but it doesn't solve the *real* problem |
13:27:05 | livcd | narimiran: https://gitlab.com/ryukoposting/northstar |
13:27:30 | disruptek | i guess i'm the one that claims that .raises. is broken, and you claim that it works fine, it's just semantically off-point, right? |
13:27:31 | narimiran | livcd: ok, still using nim, i was afraid he maybe stopped.... |
13:28:34 | Araq | disruptek, I don't like exceptions but so far I'm still looking for convincing arguments against them |
13:29:19 | disruptek | it does seem that there should be a better way. the whole concept lacks a certain elegance, doesn't it? |
13:29:24 | * | theelous3_ joined #nim |
13:29:44 | Araq | "blah, blah, hidden control flow" doesn't cut it when the proposed alternative introduce just as many different control flow paths |
13:30:13 | Araq | but this time "hidden" in all the boilerplate |
13:30:46 | Araq | it's like getters and setters in Java, it's not that you have write them all the time, you also need to actively ignore them in every code base |
13:32:48 | disruptek | exception handling boilerplate isn't the deficiency, i think -- it conveys the intent of the programmer both to the compiler and other programmers. that part isn't such a wart, in my opinion. it's the almost arbitrary control flow that seems most painful. and it's much harder to reason about, both for the compiler and the programmer. |
13:37:33 | leorize | the last thing I ever want to do is to handle IOError from `echo` |
13:38:12 | dsuch | stefanos82: Having just learned of its existence by following a link of yours, is that honestly the whole of it? https://vlang.io/docs |
13:38:35 | stefanos82 | I guess dsuch |
13:38:45 | stefanos82 | we are waiting for the official release by the end of June |
13:39:39 | Araq | disruptek, boilerplate has costs too, more work to refactor, more code to read, more code that can have bugs |
13:39:59 | disruptek | Araq: and what's bad about Go's version, if you can remind me succinctly? |
13:40:49 | dsuch | stefanos82: Is that a language by Microsoft, Google or Apple? I just see a bunch of basic todos all throughout that page and I wonder how come this repository has 3k+ stars |
13:41:03 | disruptek | dsuch: outrageous claims. |
13:41:12 | leorize | vlang seems to pack with so many features it's too good to be true |
13:41:18 | narimiran | dsuch: hype-based development |
13:41:31 | stefanos82 | dsuch: no, it's a one man's project |
13:41:31 | Araq | can we have the vlang discussions in #nim-offtopic please? |
13:42:13 | dsuch | Araq: I did not realize such a channel existed and that it would be preferred |
13:42:36 | dsuch | Thanks anyway disruptek et al. |
13:42:37 | Araq | disruptek, what's good about it? Go has panic/recover which is an exception system |
13:42:55 | * | dsuch left #nim (#nim) |
13:43:12 | Araq | it merely uses it less frequently. which means that you can write your 'close' not in a 'defer' environment... er.. ooops |
13:43:13 | disruptek | the error passing through multipart return values. |
13:44:38 | Araq | for me an exception system models that every function can fail. Yes, you don't like that because math is different. But programmnig is not math, in programming even integer additions can fail. |
13:45:08 | disruptek | i agree. |
13:45:36 | * | envoyt quit (Ping timeout: 248 seconds) |
13:46:02 | lqdev[m] | we need to make a language that's safe no matter what you try to do: `(2 + 2).unwrap("Couldn't add 2 + 2")` |
13:46:02 | * | envoyt joined #nim |
13:46:33 | Araq | we need to make the .unwrap("good error message") be the default |
13:46:33 | disruptek | so why not just have every function measure success or failure, and maybe, (just maybe) have them flag the nature of the failure. |
13:47:55 | lqdev[m] | for me the whole idea of safety through constant `.unwrap()` calls everywhere in your codebase is far from preferable |
13:48:16 | lqdev[m] | it just adds a ton of noise and makes code unreadable |
13:48:37 | disruptek | it's a logical construct, not a literal one. just imagine that it's there. |
13:49:10 | FromGitter | <alehander42> but i am not sure why is it improtant to deal with a+b |
13:49:15 | FromGitter | <alehander42> this is an exceptional case |
13:49:21 | FromGitter | <alehander42> thats where exceptions would shine |
13:49:26 | federico3 | I'd love a go2nim translator |
13:49:27 | FromGitter | <alehander42> and you can still have error enums |
13:49:31 | FromGitter | <alehander42> for the more usual cases |
13:49:34 | lqdev[m] | exceptions are a good tradeoff between readability and safety, imo |
13:49:39 | federico3 | there's plenty of stuff that could be converted |
13:49:40 | FromGitter | <alehander42> basically use both |
13:50:08 | Araq | alehander42: my 'echo' statements can fail. rarely. it's an exceptional case |
13:50:14 | FromGitter | <alehander42> ok |
13:50:39 | FromGitter | <alehander42> so, again, exceptions can deal with such cases which are rarely handled: mostly on the top of a subsystem |
13:50:51 | FromGitter | <alehander42> and error enums with the other ones imo |
13:50:59 | disruptek | the point that integer addition may fail is unassailable and useful as a measure of such a system. |
13:51:13 | FromGitter | <alehander42> (including bubbling errors automatically so you can still raise them thru the callstack with no try/catch) |
13:51:22 | disruptek | you make it sound as though you support optional error handling. |
13:51:25 | FromGitter | <alehander42> (e.g. callwhichcanerr?(e)) |
13:53:48 | * | zahary quit (Ping timeout: 245 seconds) |
13:55:40 | * | PMunch quit (Remote host closed the connection) |
13:55:57 | * | zahary joined #nim |
13:58:01 | * | aredirect joined #nim |
14:00:27 | * | zahary quit (Ping timeout: 248 seconds) |
14:02:55 | * | brainproxy quit (Quit: WeeChat 2.4) |
14:07:36 | shashlick | @federico3 I could adapt nimterop to any language tree-sitter supports but Nim needs to add an importgo equivalent |
14:08:55 | shashlick | I know I missed the CI conversation but Travis for nightlies shares the same 5 build slots as our main devel CI along with every other repo in nim-lang |
14:09:49 | shashlick | No doubt it is slower but moving should be easier since most of the code is in sh files rather than yml |
14:10:40 | shashlick | Although arm builds will require more work to ensure qemu is setup correctly |
14:15:11 | leorize | shashlick: maybe you can offload a bit to circleci? |
14:16:02 | leorize | with 36 cores, that thing crunch through the entire Nim CI procedure for Linux in 18mins |
14:16:13 | leorize | or 20, I don't remember :p |
14:19:14 | shashlick | Should be doable but reason I've not optimized nightlies is that it happens every day once and doesn't gate anyone |
14:19:34 | shashlick | Of course except when you want to make a release! |
14:28:00 | * | aredirect quit (Quit: Leaving) |
14:31:04 | * | envoyt quit (Ping timeout: 272 seconds) |
14:31:27 | * | envoyt joined #nim |
14:32:06 | * | ajsopry joined #nim |
14:33:55 | * | ajsopry left #nim (#nim) |
14:48:49 | * | al_ quit (Quit: al_) |
14:58:52 | livcd | where's yardanico ? |
14:59:17 | * | envoyt quit (Ping timeout: 252 seconds) |
14:59:52 | FromGitter | <kaushalmodi> narimiran: there's a typo in the v0.20.0 blog post |
15:00:10 | FromGitter | <kaushalmodi> ```# v0.20: ⏎ const b = uint16(-1) ⏎ # Error: -1 can't be converted to uint8``` [https://gitter.im/nim-lang/Nim?at=5cf92a7af3a60a79a4641aba] |
15:00:12 | narimiran | kaushalmodi: where? give me the context |
15:00:26 | FromGitter | <kaushalmodi> the conversion is to uint16 but error says uint8 |
15:00:35 | narimiran | right, nice catch |
15:01:12 | leorize | well, 0.20 coming anytime soon? :p |
15:01:31 | leorize | finally nim.nvim will work on stable |
15:01:56 | FromGitter | <kaushalmodi> leorize: it's already announced |
15:02:10 | FromGitter | <kaushalmodi> and the repo is tagged |
15:02:20 | * | apodo left #nim (#nim) |
15:02:23 | Araq | hmm 388 bugfixes |
15:02:48 | Araq | quite an achievement |
15:03:29 | Araq | ah, it's only 387 |
15:03:55 | leorize | woo, got #7 on the commit chart |
15:05:42 | FromGitter | <kaushalmodi> heh, I am surprised to be even there.. number 27 :P |
15:07:27 | narimiran | kaushalmodi: fixed |
15:07:30 | leorize | nim.nvim readme updated :D |
15:08:00 | narimiran | celebration time |
15:08:12 | narimiran | (until you fuckers report the first regression) |
15:08:23 | FromGitter | <kaushalmodi> narimiran: cool |
15:08:41 | FromGitter | <kaushalmodi> this has been bugging me: https://github.com/nim-lang/Nim/issues/10800 |
15:09:00 | FromGitter | <kaushalmodi> as I import `os` in my `config.nims` I cannot run `koch docs` on my machine |
15:09:07 | narimiran | so literally i cannot have one minute of celebration? :( |
15:09:13 | FromGitter | <kaushalmodi> hehe |
15:09:19 | FromGitter | <kaushalmodi> it's not a 0.20 regression |
15:09:34 | dom96 | Araq: Just call it 400 :) |
15:09:45 | FromGitter | <kaushalmodi> it's been there.. I just tested if it still errored on 0.20.0 too.. and it does |
15:10:11 | * | narimiran la-la-la don't hear you |
15:10:43 | FromGitter | <kaushalmodi> :) today's for celebration! |
15:10:53 | leorize | on HN yet? :p |
15:11:16 | narimiran | leorize: tomorrow morning would be a better timing i think, but whatever |
15:11:32 | FromGitter | <kaushalmodi> it's not even on twitter yet |
15:11:39 | federico3 | blog post? |
15:11:49 | leorize | blog post is up |
15:11:49 | FromGitter | <kaushalmodi> this announcement should be a pinned tweet IMO |
15:11:57 | FromGitter | <kaushalmodi> the current pinned tweet is too old |
15:12:22 | Zevv | congrats an happy 0.20 day everybody |
15:12:45 | * | jasper_ joined #nim |
15:12:56 | * | envoyt joined #nim |
15:13:41 | narimiran | Zevv: thanks, cheers! :) |
15:13:51 | dom96 | Tweeted |
15:13:54 | shashlick | congratulations! |
15:13:57 | Zevv | is the "no breaking guarentee" for the core language only, or also for the stdlib? |
15:14:08 | dom96 | Zevv read on :) |
15:14:08 | federico3 | the naming convention of the xz tarball has changed |
15:14:25 | FromGitter | <xmonader> congrats on the release and all the hard work |
15:14:27 | federico3 | this time it's nim_0.20.0-linux_x64 |
15:14:29 | Zevv | dom96: yeah right sorry about that :) |
15:14:38 | dom96 | pinned tweet too |
15:15:03 | narimiran | federico3: that's binary, source should be the same as before, no? |
15:15:45 | leorize | read 1/3 of the page and the `shr` change is nowhere to be seen :p |
15:16:01 | FromGitter | <kaushalmodi> shouldn't the version number be mentioned somewhere on the install pages like: https://nim-lang.org/install_unix.html |
15:16:05 | Zevv | leorize: read on :) |
15:16:09 | dom96 | leorize: I even bolded it for you |
15:16:35 | narimiran | dom96: i think the bold was removed at the end, sorry :) |
15:16:40 | dom96 | :'( |
15:16:47 | narimiran | but it is the first thing in the changelog |
15:16:50 | FromGitter | <kaushalmodi> but it's the first point in changelog |
15:17:01 | leorize | can an we have example as well? so that it'd stand out a bit |
15:17:46 | Zevv | given the number of fixes 0.19 must have been severely broken :) |
15:17:47 | narimiran | i guess we can copy the examples from https://nim-lang.org/docs/system.html#shr%2Cint%2CSomeInteger |
15:20:54 | leorize | narimiran: why does the doc for shr still recommends `ashr`? |
15:20:57 | FromGitter | <xmonader> i love this one ⏎ ⏎ ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=5cf92f59e41fe15e752198cd] |
15:22:52 | * | PMunch joined #nim |
15:24:34 | PMunch | Congrats on 0.20.0 |
15:30:00 | leorize | !eval echo NimVersion |
15:30:04 | NimBot | 0.19.6 |
15:30:09 | leorize | PMunch: ^ |
15:34:02 | PMunch | Ooh, good point |
15:35:16 | PMunch | https://hub.docker.com/r/nimlang/nim/tags |
15:35:29 | PMunch | Hmm, this is still on 0.19.6, which is what the playground uses |
15:35:42 | leorize | I thought those are unofficial? |
15:36:21 | PMunch | Yeah I think so |
15:36:32 | PMunch | Maybe I'll just roll my own.. |
15:38:08 | leorize | PMunch: https://github.com/moigagoo/nimage |
15:41:15 | PMunch | Hmm, yeah I really should make a staged one |
15:41:32 | PMunch | So it builds it in one container then copies only the finished stuff into the final container |
15:42:09 | * | nc-x joined #nim |
15:42:22 | nc-x | @KaushalModi https://github.com/nim-lang/Nim/pull/11418 |
15:42:35 | leorize | https://old.reddit.com/r/programming/comments/bxhw0c/nim_version_0200_is_released/ |
15:42:38 | leorize | for upvoting :p |
15:42:55 | nc-x | Congrats on 0.20 everyone!!! |
15:43:18 | nc-x | somebody also needs to post on nim forum regarding the release. |
15:43:33 | leorize | you have an account, right? :p |
15:43:44 | nc-x | nope |
15:43:49 | nc-x | ;D |
15:48:34 | FromGitter | <kaushalmodi> nc-x: thanks!!! |
15:49:39 | federico3 | https://lobste.rs/s/7h70w1/nim_0_20_0_has_been_released |
15:51:10 | dom96 | hah, funny, Crystal release just yesterday as well |
15:51:33 | dom96 | can we get more upvotes? ;) |
15:51:43 | FromGitter | <xmonader> and clojure too :D |
15:51:49 | narimiran | yeah, and ocaml is bringing new release too |
15:52:04 | leorize | crystal website looks rather nice though |
15:52:18 | dom96 | I prefer Nim's, but I am pretty biased :P |
15:52:23 | FromGitter | <xmonader> can someone comment on the sshr operator history question on reddit? |
15:52:34 | leorize | there's already `ashr` |
15:52:48 | leorize | the shr change is to conform with other languages, and to get rid of ashr |
15:52:50 | dom96 | looks like def- beat me to HN heh |
15:52:58 | dom96 | Thank you for including "1.0 RC" in there |
15:53:18 | leorize | xmonader: someone asked the same on the forum :p see the rant about shr |
15:53:53 | FromGitter | <xmonader> 1) 0 RC 1 is soo clickbaity i wish I included it in the title |
15:54:19 | dom96 | it's not click bait when it's true :) |
15:54:45 | def- | dom96: seemed like an important point |
15:54:51 | FromGitter | <xmonader> true, maybe there's another word for what i meant it in English :) |
15:56:22 | leorize | @xmonader: https://forum.nim-lang.org/t/4891#30623 |
15:57:11 | FromGitter | <xmonader> thank you! |
15:57:43 | leorize | https://news.ycombinator.com/item?id=20115532 |
15:59:00 | dom96 | Don |
15:59:05 | dom96 | *Don't link to HN directly |
15:59:20 | leorize | why? |
15:59:32 | dom96 | If people upvote by going straight to that link the thread will get banned |
15:59:48 | leorize | oh, never know about that, sorry |
15:59:59 | FromGitter | <xmonader> Really? wow. How the rust folks do it :D ؟ |
16:00:24 | * | nc-x quit (Quit: Page closed) |
16:00:25 | FromGitter | <kaushalmodi> https://hn.algolia.com/?query=nim&sort=byPopularity&prefix&page=0&dateRange=pastWeek&type=story |
16:00:43 | leorize | they don't have to, the word "rust" is a HN buzzword now |
16:01:32 | dom96 | Anyway, Nim is on the front page now so need for links ;) |
16:01:57 | FromGitter | <kaushalmodi> also "Medium sucks" is a buzz word on HN.. I must have come across 4-5 articles singing the same song and they are show up top on HN |
16:02:10 | FromGitter | <kaushalmodi> it's a fact that Medium sucks; people should now stop writing about that |
16:02:40 | * | envoyt quit (Ping timeout: 248 seconds) |
16:02:53 | PMunch | Woo, my nimsuggest changes have also been merged :) So now nim-lsp doesn't depend on devel any longer |
16:03:33 | dom96 | kaushalmodi: lol |
16:14:49 | stefanos82 | dom96: I didn't know about that thing |
16:15:02 | stefanos82 | how come a link gets banned by accessing it directly? |
16:16:03 | narimiran | vote manipulation prevention |
16:17:52 | * | envoyt joined #nim |
16:28:56 | * | floppydh quit (Quit: WeeChat 2.4) |
16:36:27 | * | Kaivo joined #nim |
16:43:16 | FromGitter | <xmonader> ```code paste, see link``` ⏎ ⏎ I went through lots of trouble to generate dep free executable. [https://gitter.im/nim-lang/Nim?at=5cf942a44dfb4240048df2d5] |
16:43:24 | leorize | looks like Nim is doing well on HN :) |
16:43:48 | leorize | xmonader: your target was linux :p |
16:44:15 | leorize | which is just the worst target ever |
16:44:18 | * | terorie joined #nim |
16:44:22 | FromGitter | <xmonader> yeah and ssl was the dependency :D it's safe to assume most of developers are using linux |
16:44:39 | FromGitter | <xmonader> I never developed on other platform. |
16:44:44 | leorize | well, once we have native nim modules for everything (like go), we can relax and have deps free exec |
16:45:22 | leorize | for now, we're as deps free as any C program out there |
16:45:49 | FromGitter | <xmonader> but we are mentioning that as a nim feature, which aren't free really as what people expect |
16:46:57 | FromGitter | <jrfondren> did you expect to not have SSL as a dependency? |
16:47:38 | FromGitter | <xmonader> i expected easily built statically linked binary :) |
16:47:42 | FromGitter | <jrfondren> I read that as, "oh, it's not a scripting language". |
16:47:55 | FromDiscord_ | <DeltaPHC> Has there been any desire to update the version of MinGW linked on the install_windows.html page? 6.3.0 is a tad old by now :P |
16:47:58 | * | krux02 quit (Remote host closed the connection) |
16:48:02 | leorize | Araq: ^ |
16:48:07 | FromGitter | <jrfondren> static linking is possible, but it's not as easy as it could be yeah. |
16:48:57 | FromDiscord_ | <DeltaPHC> Personally I use mingw-w64 8.2.0 with Nim and it works fine |
16:49:21 | FromGitter | <xmonader> @kaushalmodi where's the link to the experiment we had with static linking nim to ssl? |
16:50:00 | FromGitter | <xmonader> found it nvm https://github.com/kaushalmodi/hello_musl |
16:50:24 | FromGitter | <jrfondren> what's the musl for? to get DNS resolution without dynamic linking? |
16:51:10 | leorize | libc-independance |
16:51:16 | Araq | DeltaPHC: we can switch to 8.2.0 after extensive testing |
16:51:23 | Araq | but yeah, we should |
16:51:33 | * | nsf joined #nim |
16:53:02 | leorize | someone opened the style-insensitivity can of worms on HN :p |
16:54:21 | PMunch | Hmm, can you use https://nim-lang.org/docs/asyncdispatch.html#withTimeout%2CFuture[T]%2Cint with an async http request to give it a timeout? |
16:54:33 | FromGitter | <xmonader> no with async no. |
16:55:00 | leorize | no idea how the http timeout thing works |
16:56:24 | Araq | leorize, 'nim --styleCheck:warning' is a thing |
16:56:25 | FromGitter | <xmonader> @PMunch https://nim-lang.org/docs/asyncnet.html#recv%2CAsyncSocket%2Cint no overloaded version for recv with timeout |
16:57:14 | PMunch | xmonader, yeah it doesn't have a timeout there. But it returns a future so withTimeout from asyncdispatch should be able to do it right? |
16:57:35 | leorize | Araq: was it documented as a new feature for 0.20? |
16:57:41 | * | nc-x joined #nim |
16:58:14 | Araq | leorize, I think I forgot to mention it :P |
16:58:32 | leorize | narimiran: quick :p ^ |
16:59:01 | narimiran | leorize: other, more important, worries currently |
16:59:16 | nc-x | I just remembered. Apart from newruntime, the hotcodereloading also did not have a mention in the blog post? |
16:59:27 | leorize | hcr is experimental rn |
16:59:35 | leorize | there aren't any docs yet iirc |
17:00:38 | FromGitter | <xmonader> @dom96 is that how it meant to be timeout async recv? because afaik there was some note it's not implemented somewhere |
17:02:05 | nc-x | leorize: I think they deserved a mention atleast near the top |
17:02:29 | nc-x | Also can anybody verify the nim stdlib docs don't have the search on mobile |
17:02:49 | leorize | newruntime can be held off a bit |
17:02:55 | nc-x | eg. here https://nim-lang.org/docs/algorithm.html |
17:03:00 | FromGitter | <jrfondren> @nc-x, they don't have the search on mobile. |
17:03:07 | leorize | Araq has just redesigned the thing before 0.20 :p |
17:03:22 | Araq | guys, can't you test this stuff *before* we release... |
17:03:34 | dom96 | xmonader: not sure what you mean |
17:03:45 | Araq | always the same shit, .0 is crap, .2 is workable |
17:04:19 | nc-x | I think the docs can be updated without a new release |
17:04:44 | leorize | well not having search on mobile is not the end of the world |
17:04:45 | FromGitter | <xmonader> @dom96 asycnet.recv doesn't allow timeout param. is it meant to be used with `withTimeout` or something else? |
17:05:06 | Araq | nc-x, that's not the only problem, we also ship with a broken nimble |
17:05:20 | * | shadowbane quit (Remote host closed the connection) |
17:05:41 | * | Serenitor joined #nim |
17:05:46 | leorize | now that's not a nice thing |
17:06:01 | nc-x | broken nimble? |
17:07:14 | leorize | but nimble CI is green? |
17:07:55 | dom96 | xmonader: yes, it's meant to be used with that |
17:07:58 | narimiran | leorize: don't ask.... |
17:08:17 | Araq | it's our overly complicated testing + Nimble bundling setup :P |
17:08:58 | Araq | if only Nimble were part of Nim ... so much friction just because it's in its own repo, it's ridiculous |
17:09:42 | dom96 | Nah, this is a simple case of: it should have been tested |
17:10:13 | dom96 | anyone extracting one of the tarballs and testing would have caught this |
17:10:25 | Araq | it was tested. automatically. it also was tested that 'koch nimble' works. |
17:10:37 | Araq | we trust our automation :P |
17:10:49 | * | nc-x quit (Ping timeout: 256 seconds) |
17:11:34 | leorize | new CI pipelines: package nim then extract & test :p |
17:15:44 | * | fredrik92 joined #nim |
17:16:43 | * | couven92 quit (Disconnected by services) |
17:16:56 | * | fredrik92 is now known as couven92 |
17:19:29 | Serenitor | I'm trying to get my code compiled on 0.20.0, last time it compiled was on 0.18.0 |
17:19:36 | Serenitor | seems like there's quite a lot to fix |
17:19:41 | Serenitor | on thing is that I can no longer set a string to nil? |
17:19:56 | leorize | yea, looks like you missed out 0.19 |
17:21:02 | narimiran | Serenitor: that was gone in 0.19 too. see 0.19 release notes on how to keep compiling that code |
17:21:41 | Serenitor | will do, thanks |
17:25:36 | * | couven92 quit (Read error: Connection reset by peer) |
17:29:27 | * | leorize quit (Remote host closed the connection) |
17:29:53 | * | leorize joined #nim |
17:32:57 | rayman22201 | Congrats on the new release! I'm always sleeping when the fun stuff happens. |
17:33:24 | leorize | dom96: maybe it's time to update the topic? |
17:45:17 | * | couven92 joined #nim |
17:45:18 | * | couven92 quit (Client Quit) |
17:56:31 | FromGitter | <brentp> I am seeing a 2x slowdown in some of my code between 0.19.9 (5b1bc29e8ad61973fa543a146cf19506d4d7f72c)and 0.20.0 (7a670a6bc929ee497dfd119b4a502b5b1ee139b8) anyone else finding this? |
17:56:55 | leorize | brentp: -d:release now enables some checks |
17:57:03 | leorize | use -d:danger for no checks |
17:57:06 | narimiran | brentp: try with -d:danger |
17:57:42 | FromGitter | <brentp> aye. that does it. thanks @leorize and @narimiran |
17:58:34 | leorize | brentp: you can try tracking down the hotspot then use {.checks.} pragma to selectively disable runtime checks |
17:58:44 | FromGitter | <brentp> where can I see more about this? I can probably .push on some stuff in hot paths |
17:59:57 | leorize | https://nim-lang.org/docs/manual.html#pragmas-compilation-option-pragmas |
18:00:31 | narimiran | if anybody wants to join the discussion.... quite a lot comments here https://news.ycombinator.com/item?id=20115532 |
18:01:14 | leorize | welp, dropped to bottom of first page |
18:01:26 | leorize | but US is waking up, so we might see some bounce back |
18:14:08 | PMunch | xmonader, dom96, since async recv is supposed to be used with withTimeout then maybe this section should be updated: https://nim-lang.org/docs/httpclient.html#timeouts |
18:22:10 | sealmove | guys I got an error (I know the cause) but got this error: |
18:22:14 | sealmove | main.nim(176, 6) Error: internal error: genLiteral(nkHiddenCallConv) |
18:22:15 | sealmove | No stack traceback available |
18:22:17 | sealmove | To create a stacktrace, rerun compilation with ./koch temp c <file> |
18:22:59 | sealmove | Is this normal? |
18:23:37 | sealmove | I mean for nim compiler to terminate like this. "internal error" sound severe :P |
18:23:50 | narimiran | well, it happens sometimes, if that's what you're asking. you might want to open an issue (or see if it is already open for a similar situation) |
18:24:02 | sealmove | yes that's why I am asking |
18:30:05 | leorize | narimiran: how's the nimble issue going? |
18:30:25 | narimiran | the fix is in devel |
18:30:39 | narimiran | but now i hear somebody having a different problem on windows.... |
18:31:24 | narimiran | btw, in the mean time: those using `choosenim` can use `choosenim update devel`, `choosenim devel` to get a working nimble version |
18:33:49 | * | krux02 joined #nim |
18:37:42 | sealmove | I think it's a bug in `converter` |
18:38:41 | * | Serentty joined #nim |
18:40:31 | sealmove | https://termbin.com/af6v |
18:41:14 | sealmove | btw does this error mean *compiler crushed* ? |
18:41:35 | leorize | yea, an ICE means the compiler crashed |
18:41:43 | Serentty | Okay, so I saw that Nim is approaching stabilization, and I figured I would come on here to bikeshed something that has been bothering me for a while. |
18:41:56 | leorize | sealmove: you should file an issue on github |
18:42:11 | sealmove | yes, I'll do that |
18:43:04 | narimiran | Serentty: not today, not today.... :) |
18:45:03 | kungtotte | I hope it's about case insensitivity, we sure don't get enough discussions about that |
18:45:27 | Serentty | What's today? |
18:45:36 | narimiran | 0.20 release day |
18:46:46 | Serentty | And I do think that this is fairly important, since it's about Unicode ergonomics, which is something that causes ripple effects leading to shoddy software when programming languages make irreversible decisions that they come to regret. |
18:47:23 | Serentty | Oh don't worry, it's not about case insensitivity. Although I do think that that opens a whole Unicode can of worms that would be better left unopened, this is about something else. |
18:49:10 | leorize | I think the forum is a better ground for long discussion, although it's fine here |
18:50:28 | Serentty | Okay, so here's my bikesheddy (but still, I believe, important) thing. The name “rune” for a Unicode code point is, I believe, even more misleading than “character”, despite the fact that it was probably chosen to avoid such connotations. The name “rune” implies something more like a grapheme cluster, and doesn't accurate describe things like whitespace, control characters, combining characters, and countless other |
18:50:28 | Serentty | top of that, there's also “Rune16”, which could be a surrogate half, which is pretty far from what “rune” implies. I think the current naming makes it all to easy to assume that a “rune” is something that it is not. |
18:50:52 | narimiran | there's already open issue about that name |
18:50:55 | Serentty | *accurately describe |
18:51:45 | lqdev[m] | is there a way of checking if a package is available during compile time? I know `pkg-config` is an option but can't find a way to check if PulseAudio is present (`pkg-config pulse` always errors) |
18:51:52 | FromGitter | <jrfondren> who approaches anything dealing with Unicode and says, "I bet this has no caveats." ? |
18:52:01 | lqdev[m] | I only need to do this on linux to get the available audio backends |
18:52:06 | leorize | lqdev[m]: it's libpulse |
18:52:16 | * | lritter quit (Remote host closed the connection) |
18:52:40 | leorize | the "proper" way to detect pulse is `pulseaudio --version` |
18:52:50 | leorize | but you'll end up using libpulse anyway, so... |
18:53:13 | lqdev[m] | nope, still errors |
18:53:26 | leorize | then maybe you don't have pulseaudio instaled? |
18:53:33 | lqdev[m] | aah |
18:53:49 | lqdev[m] | makes sense |
18:54:40 | lqdev[m] | I do, `pulseaudio --version` works |
18:55:07 | leorize | if you're on debian-based distro, you'd need libpulse-dev or similar for pkg-config to detect libpulse |
18:55:23 | skrylar[m] | oh boy unicode |
18:55:23 | lqdev[m] | how do I check JACK and ALSA? I guess `pkg-config` is my only option? |
18:55:24 | skrylar[m] | i sure don't have enough nightmares writing code for that \o/ |
18:57:30 | leorize | lqdev[m]: alsa is built-in for all linux, but since you'll likely ending up using alsa-lib, check for libalsa |
18:57:53 | Serentty | namiran: I searched the issues on GitHub, but I couldn't find it as there are all sorts of other issues that mention runes but are unrelated. |
18:59:05 | narimiran | Serentty: you're right, it is not. i thought about this one: https://github.com/nim-lang/Nim/issues/7740 |
18:59:56 | skrylar[m] | actually |
19:00:14 | skrylar[m] | would the old `when compiles` work with using gulp to check pkgconfig? |
19:01:21 | Serentty | Can I open an issue then? |
19:01:32 | leorize | Serentty: sure, on the nim-lang/rfcs repo please |
19:01:49 | leorize | skrylar[m]: you mean checking if pkgconfig exists? |
19:05:53 | * | Trustable joined #nim |
19:12:06 | lqdev[m] | how does CMake's find_package actually find a package? |
19:12:40 | lqdev[m] | I'm looking at this and thinking how it actually works https://github.com/andrewrk/libsoundio/blob/master/CMakeLists.txt#L47 |
19:13:19 | leorize | those packages install .cmake files in specific locations |
19:13:28 | leorize | cmake have a list of them and just look up based on that |
19:13:51 | lqdev[m] | aah, so it's no use for me then |
19:15:21 | dom96 | 100 points, 3 hours, off the front page |
19:15:25 | dom96 | Yep, we've been dragged down |
19:15:48 | dom96 | Either by HN's automatic brigading algorithm or because one of the HN mods decided to do it |
19:15:52 | dom96 | it's likely the former |
19:15:58 | dom96 | def-, maybe you could email HN? |
19:15:59 | narimiran | yay |
19:16:36 | dom96 | narimiran: why is https://nim-lang.github.io/Nim/httpclient a valid path? Why does it work without the .html? |
19:17:23 | leorize | dom96: github magic |
19:18:33 | dom96 | That's bad practice, you shouldn't have the same content duplicated across two different paths like that |
19:19:52 | leorize | you'd have to complain with github :p |
19:25:36 | FromGitter | <kaushalmodi> I want to parse the timezone from a date string |
19:25:43 | FromGitter | <kaushalmodi> I tried: ⏎ ⏎ ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=5cf968b6702b7e5e763e7212] |
19:25:59 | FromGitter | <kaushalmodi> but it is printing ⏎ ⏎ ```2019-06-06T14:17:43-04:00 ⏎ LOCAL``` [https://gitter.im/nim-lang/Nim?at=5cf968c76fc5846bab733494] |
19:26:08 | FromGitter | <kaushalmodi> so the original timezone is lost |
19:26:37 | FromGitter | <kaushalmodi> if I look at the `parse` signature https://nim-lang.github.io/Nim/times.html#parse%2Cstring%2CTimeFormat%2CTimezone%2CDateTimeLocale |
19:26:51 | skrylar[m] | leorize: no i mean if the package can't be found in pkg-config it should fail, which means the `when compiles` fails, which should disable the block that says to set up that audio backend |
19:27:05 | FromGitter | <kaushalmodi> I see that the `zone` arg defaults to local() .. |
19:27:15 | leorize | skrylar[m]: just use staticExecEx :p |
19:27:23 | FromGitter | <kaushalmodi> the problem is that I need to parse the original zone from the `dtStr`.. how do I do that? |
19:27:35 | skrylar[m] | leorize: le shrug. it's not me who needs it :b |
19:28:01 | FromGitter | <kaushalmodi> @GULPF ^ |
19:28:11 | skrylar[m] | altho thunderstrike is at the point now where i have to go dig up gtk3 and winapis to do anything more |
19:30:05 | Araq | Serentty, what do you suggest we use instead? |
19:30:18 | Araq | we need a better short, sexy term then |
19:30:26 | Araq | and Rune is what Plan 9 used btw ;-) |
19:30:56 | FromDiscord_ | <DeltaPHC> `Codepoint` isn't as short or sexy, but it's quite accurate :P |
19:31:20 | skrylar[m] | thats what i used |
19:31:46 | skrylar[m] | well and a grapheme type which was a seq32 of code points (because the stream-safe encoding has a max of 30 diacritics) |
19:32:01 | skrylar[m] | the grapheme was mostly used in a code point interator |
19:34:19 | dom96 | I emailed HN |
19:35:19 | Serentty | Araq: I was writing out a long post on GitHub. I don't have an easy answer to this. The name “code point” is the most intuitive at describing what it is to someone who already knows about Unicode, but to someone who doesn't, it's much less so. Either way, programmers have to learn something new. If “code point” is chosen, many programmers have to go look up the official Unicode terminology. If some other name is chosen, |
19:35:20 | Serentty | programmers have to learn the correspondences between what the programming language calls something and what Unicode calls it. I personally lean towards going with the official Unicode terminology, but I don't know of any programming language that has done that before, so it would certainly be a bold move. |
19:36:43 | Serentty | A much easier and more obvious decision, in my opinion, is to at least change the name of `Rune16` to `CodeUnit16` or something similar, because it absolutely does *not* represent anything similar to what `Rune` represents. |
19:37:47 | * | nsf quit (Quit: WeeChat 2.4) |
19:37:57 | dom96 | Araq, You might want to reply here: https://news.ycombinator.com/item?id=20117175 :) |
19:38:04 | dom96 | And talk about what you're working on |
19:38:18 | dom96 | (AndyKelley is the person behind Zig) |
19:38:57 | FromDiscord_ | <DeltaPHC> IMO, choosing the more technically correct name (Codepoint or CodeUnit) falls in line with the fact that, for example, Nim calls it "procedures" instead of going with 'functions' like any other language. Or how it's called a Seq instead of a Vector, which is technically more of a math term, etc etc |
19:39:40 | * | Vladar quit (Remote host closed the connection) |
19:40:01 | Serentty | That's actually a pretty good point I think. |
19:41:26 | Serentty | Okay, here's what I wrote on GitHub. |
19:41:27 | Serentty | https://github.com/nim-lang/RFCs/issues/151 |
19:49:00 | * | lritter joined #nim |
20:00:44 | * | clyybber joined #nim |
20:05:58 | dom96 | narimiran: some praise for your changes: https://www.reddit.com/r/programming/comments/bxhw0c/nim_version_0200_is_released/eq7i855/. Nice :D |
20:06:05 | dom96 | I must admit, it has grown on me |
20:08:29 | Zevv | Same here. Although I still find bullet #1 from "Elegant" a bit patronizing and not right |
20:08:57 | narimiran | yaaay :) |
20:09:44 | dom96 | Zevv, agreed |
20:10:17 | dom96 | Please PR it if you can make it sound better: https://github.com/nim-lang/website/blob/master/jekyll/index.html#L40 |
20:10:37 | shashlick | btw, i was unable to get jekyll serve working on ubuntu yesterday |
20:10:54 | narimiran | shashlick: it works for me on manjaro |
20:11:02 | shashlick | Key related_posts cannot be set in the drop. |
20:11:06 | shashlick | on ubuntu |
20:11:15 | dom96 | did you install the Gemlock'ed deps? |
20:11:28 | narimiran | shashlick: `bundle exec jekyll serve`, or some other command? |
20:12:55 | shashlick | http://ix.io/1L6f |
20:13:14 | narimiran | btw, if the only criticism is just one bullet point, then we managed to improve the new website quite a lot from the initial version :)) |
20:13:42 | Zevv | dom96: I already gave my input to Narmiran. A lot made it into the final version, but not that :) |
20:14:15 | * | deech joined #nim |
20:16:00 | shashlick | meh i give up, later |
20:21:26 | dom96 | Zevv, nice, thank you for providing feedback. I wish I had more time to do that :) |
20:23:07 | FromGitter | <xmonader> @PMunch that indeed was the note i was referring to https://nim-lang.org/docs/httpclient.html#timeouts |
20:24:07 | Serenitor | is there anything new in regards to embedding nim script? |
20:24:14 | Serenitor | I see the the compiler and vm code has been cleaned up a lot. but there aren't any new helper functions to set this by any chance? |
20:24:34 | Serenitor | *set this up |
20:25:01 | FromGitter | <xmonader> also i think programming languages and compilers should have their own news websites for fruitful discussions , it's unfair lots of effort don't go to the frontage because of a new js framework |
20:27:37 | Araq | Serenitor, look at the tcompilerapi test for the API |
20:27:40 | * | narimiran_ joined #nim |
20:28:43 | Serenitor | ok thanks for the hint |
20:29:18 | Araq | also about Rune16, that's pretty easy to change we can keep the Rune16 as a deprecated alias |
20:29:30 | Araq | however, that is exactly what needs to stop IMO. |
20:29:44 | Araq | pointless renaming and redefinitions |
20:30:04 | * | narimiran quit (Ping timeout: 258 seconds) |
20:30:42 | Cadey | congrats on 0.20.0! |
20:31:10 | PMunch | narimiran_, https://old.reddit.com/r/programming/comments/bxhw0c/nim_version_0200_is_released/eq7i855/ |
20:31:19 | PMunch | Reddit appears to like the new website :) |
20:31:39 | narimiran_ | PMunch: ...and i like reddit today :) |
20:31:42 | Zevv | woohoo, arm builds in the nightlies \o/ when was that done? |
20:32:08 | FromDiscord_ | <lmariscal> Araq, I agree but to be honest Rune doesn't express a lot in its own |
20:32:59 | Zevv | I don't really see the problem. If the documents state that "Rune" is nims name for a unicode point, then what's the deal? |
20:34:10 | Serentty | I mostly agree about renaming and redefinitions, but that's why I support just going with the Unicode terminology of trying to come up with some clever name that people will still disagree over. |
20:34:54 | FromDiscord_ | <DeltaPHC> It's not a big deal in the grand scheme of things, but the rationale in this case is to not get stuck with a potentially regrettable name when we're close to 1.0 stabilization |
20:35:36 | FromDiscord_ | <DeltaPHC> Because after 1.0, it's going to stick around for a very very long time |
20:35:58 | FromGitter | <GULPF> part of getting close to 1.0 is not renaming things every week imo. Nim has been "close" to 1.0 for several years now |
20:36:40 | lqdev[m] | I don't see anything wrong with the current name. It's shorter than "Codepoint", and for me its name resembles some "complex" character (which is exactly what UTF-8 is, encoding for characters more complex than ASCII) |
20:37:12 | clyybber | I agree, I like Rune, its short and expressive |
20:37:15 | Serentty | <Zevv "I don't really see the problem. "> Zevv: Because the usual meaning of the word is something much more like “glyph”, and having such a name gives the impression that it's actually a type for grapheme clusters. Not everyone is going to read the documentation for every type, especially if the name seems “obvious”. |
20:38:20 | FromDiscord_ | <DeltaPHC> You could also make the argument that a name like "Rune" -isn't- obvious, and so they'll look at the docs and see that it's unambiguously a codepoint |
20:39:18 | rayman22201 | https://memegenerator.net/img/instances/78250574/are-you-ready-to-bikeshed.jpg |
20:39:35 | * | rayman22201 can't help myself |
20:39:54 | FromDiscord_ | <DeltaPHC> Personally I'm not too hung up about Rune, but I do understand the point being made |
20:40:44 | FromDiscord_ | <lmariscal> Same here, but because Rune has already been stablished, you have to outweigh the negatives of changing it a this stage |
20:40:44 | Serentty | <clyybber "I agree, I like Rune, its short "> lqdev: That's exactly my point. It gives that impression, but the impression is wrong. It doesn't have to be a character at all. |
20:41:09 | Serentty | I meant to ping lqdev. |
20:41:24 | Araq | as I said, it's not even my invention, I took it from Plan 9 |
20:41:41 | lqdev[m] | then `char` should be renamed too, if it "can be a character but doesn't have to be" |
20:41:45 | Araq | I think we simply need to ensure it's documented well |
20:41:51 | FromDiscord_ | <lmariscal> ^^ |
20:41:56 | Araq | btw we updated to Unicode 12.0 |
20:42:03 | Araq | is that in the changelog? |
20:42:06 | PMunch | !eval echo NimVersion |
20:42:10 | NimBot | 0.19.6 |
20:42:14 | PMunch | :( |
20:42:27 | PMunch | It should auto-update whenever the docker images update |
20:42:28 | Serentty | lqdev: To be honest, I would support that as well. |
20:42:33 | FromDiscord_ | <lmariscal> Nope, not in the changelog |
20:44:00 | * | narimiran_ is now known as narimiran |
20:44:24 | FromGitter | <GULPF> @kaushalmodi re timezone parsing: there's no way to do that in the times module |
20:44:49 | Araq | GUPLF: what do *you* think about breaking compiler fixes? |
20:46:24 | FromDiscord_ | <DeltaPHC> If the biggest criticism is that Rune is named badly (as opposed to how the module implements unicode), then I'd say that things aren't too bad :P |
20:46:58 | Serentty | Anyway, I'm more concerned about Rune16, since it doesn't mean a code point at all, when “rune” is being established as meaning a code point. I'd be satisfied if the “rune” name were kept, but used consistently to refer to full code points and not just UTF-16 code units, which should have a much clearer name since confusing code points with code units continues to cause all sorts of bugs with non-BMP characters. |
20:47:40 | * | cavariux joined #nim |
20:48:24 | Serentty | So, forget about the rune thing. The name is fine I suppose. Rune16 is the bigger problem. |
20:49:04 | Araq | Rune16* = distinct int16 ## \ |
20:49:04 | Araq | ## Type that can hold a single UTF-16 encoded character. |
20:49:04 | Araq | ## |
20:49:04 | Araq | ## A single Rune16 may not be enough to hold an arbitrary Unicode code point. |
20:49:13 | narimiran | Serentty: count the amount of usages of Rune16 in unicode.nim ;) :P |
20:50:36 | Araq | it's not even used... wtf |
20:50:48 | Araq | but exported, yay |
20:51:01 | FromGitter | <GULPF> Araq: I think it's unrealistic to assume that everything can be fixed before v1.0, so there needs to be a way to release breaking changes in the future as well. But the promise of v1.0 stability doesn't mean much if v1.1 is released a couple of months later with a bunch of breaking changes. |
20:51:27 | Araq | that's not how it works |
20:51:43 | FromDiscord_ | <lmariscal> GULPF that's why LTS versions exist |
20:52:00 | Araq | the point is not that we delay 1.1 or 2.0 simply to be more "stable" than we are |
20:52:05 | * | krux02 quit (Remote host closed the connection) |
20:52:17 | Araq | the point is that we backport bugfixes to 1.0.x for years to come |
20:52:29 | Araq | we did that with 0.19.x |
20:52:40 | Araq | and now the 0.19.x line is dead |
20:52:53 | Araq | 0.20.x will live much longer |
20:53:09 | shashlick | @Zevv arm builds have been around for more than a month |
20:53:13 | Serentty | Well, “can hold a single UTF-16 encoded character” is just as inaccurate as saying that byte can hold a single UTF-8 character. And I still think it's a bad idea to use the same name for code points and code units when this exact confusion is the most common source of bugs related to surrogates. |
20:53:20 | FromGitter | <kaushalmodi> @GULPF Oh, I just posted https://forum.nim-lang.org/t/4912 with all details |
20:53:21 | shashlick | Curious on your feedback |
20:53:37 | Araq | also, I have a pretty good overview about what is broken in the compiler |
20:53:40 | FromGitter | <arnetheduck> we were just discussing if it's possible to get some more backports on 0.19.x branch while we wait for 0.20 to stabilize... |
20:54:01 | Araq | I went over the full list of bugs multiple times |
20:54:12 | FromGitter | <kaushalmodi> @GULPF I thought of using `newTimeZone` to first derive my own time zone but it doesn't work as the procs in args need to be gcsafe |
20:54:17 | Araq | and there are mostly 3 different pain points, all taking weeks to fix |
20:54:23 | Araq | or months. |
20:54:59 | Araq | however, it can also be documented as a list or errata like (v1 is known to depart from the spec in a,b,c,d ways) |
20:55:58 | FromGitter | <kaushalmodi> @GULPF So I cannot even make this work: http://ix.io/1L6u/nim |
20:56:31 | dom96 | ooh, we can get a sponsor button on GitHub now |
20:56:32 | * | dom96 adds |
20:57:02 | Araq | arnetheduck: well ok, we can think about a 0.19.8, but it should die soon or else we rebrand 0.19 as v1 |
20:58:19 | * | andremedeiros quit (Quit: WeeChat 2.4) |
20:58:37 | FromGitter | <GULPF> I think a long lived 1.0.x branch + breaking releases on v1.x/v2 like you say will be good, but I think some people are expecting a stable ecosystem and not only a stable 1.0.x. |
20:58:51 | FromGitter | <arnetheduck> @Araq cool - we'll ask for it only if it's important.. we have a pretty important release coming out in october that we don't want to upset too much so.. |
20:59:17 | Araq | btw Rune16 is used exactly 0 times in Nim's stdlib |
20:59:41 | Araq | I think we can savely deprecate this for v1, rules exist to be broken |
21:00:51 | Araq | GULPF: for a stable ecosystem packages should support v1.0 and not "devel only" |
21:01:13 | FromGitter | <alehander42> nice |
21:01:16 | FromGitter | <alehander42> congrats |
21:01:17 | FromGitter | <alehander42> 1) 20! |
21:02:04 | Serentty | Okay, so then instead of renaming it, it could just be removed, with int16 becoming the recommended type to hold a single UTF-16 code unit? I would be fine with that. |
21:02:18 | FromGitter | <arnetheduck> one fairly core thing to consider for deprecations could be to come to a conclusion about type-based signed/unsigned vs operation-based.. ie `+%` and friends |
21:03:02 | Araq | the conclusion was made, 'shr' changed to be type-based |
21:03:10 | FromGitter | <alehander42> btw why |
21:03:17 | FromGitter | <alehander42> no hot code reloading and new runtime |
21:03:19 | FromGitter | <alehander42> in the blog |
21:04:00 | * | narimiran quit (Ping timeout: 248 seconds) |
21:04:02 | FromGitter | <arnetheduck> `int16` seems like a tricky type to use for utf-16, given that it's a bit-based thing / kind-of-unsigned.. |
21:04:18 | Araq | well it should be uint16, yeah |
21:04:35 | FromGitter | <arnetheduck> so maybe get rid of op-based then, just creates two ways to do the same.. |
21:04:57 | FromGitter | <GULPF> @kaushalmodi: newTimezone accepts closures, so you can make your `newTimezone` example work that way. My `timezones` package have a proc for doing the offset string -> Timezone conversion I think |
21:05:13 | Serentty | I personally prefer separate types for signedness, because otherwise it's really easy to misinterpret one as the other. |
21:06:11 | Araq | I'm still a bit torn but the fact is that not even Araq-himself could implement MD5 with signed ints and unsigned operators |
21:06:30 | Araq | and so it's a failed experiment ;-) |
21:06:30 | FromGitter | <GULPF> @kaushalmodi https://github.com/GULPF/timezones/blob/0c5f270c81b798d16b4dc690bbfc0c22fcfa37ea/timezones.nim#L101 |
21:06:42 | Serentty | For UTF-32, signedness intentionally doesn't matter, but it does for UTF-16, yeah. |
21:06:52 | FromGitter | <arnetheduck> it's kind of useful that `%` works as expected for unsigned ints |
21:06:53 | * | Trustable quit (Remote host closed the connection) |
21:07:04 | FromGitter | <kaushalmodi> @GULPF Thanks! I will install `timezones` then |
21:07:33 | FromGitter | <arnetheduck> there are some benefits to op-based - it's easier to create a compiler for example because computers are op-based |
21:08:18 | Araq | it's good for an IR |
21:08:25 | Araq | but pretty bad for humans |
21:08:44 | Serentty | Araq: Ah, so has your opinion on unsigned types changed since the posts from a few years ago that I read? |
21:09:14 | FromGitter | <arnetheduck> yeah, that sums it up pretty neatly |
21:09:15 | * | envoyt quit (Ping timeout: 248 seconds) |
21:09:53 | Araq | not really, Serentty. For example 'len' should really return a signed number because then stuff like len - 4 > y works |
21:10:11 | dom96 | There we go: https://nim-lang.org/blog/2019/06/06/version-0200-released.html#installing-0200 |
21:10:17 | * | envoyt joined #nim |
21:10:19 | dom96 | Hope that makes sense |
21:10:21 | Araq | however, unsigned is acceptable if you remove the minus operator from it |
21:10:54 | Araq | unsigned simply has no minus operation, too error prone, you always need to use i+4 < len instead of i < len-4 |
21:11:21 | Araq | but I have yet to see anybody propose this solution :P |
21:12:42 | FromGitter | <arnetheduck> we've proposed it, for the ethereum 2 specification :) it's happening there |
21:13:03 | Araq | wow |
21:14:13 | FromGitter | <kaushalmodi> @GULPF got it working.. thanks!! |
21:14:17 | FromGitter | <kaushalmodi> ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=5cf98229faac64393450567f] |
21:15:15 | dom96 | arnetheduck: Araq: nice, I like that solution |
21:15:34 | dom96 | We gonna get Ethereum contracts written in Nim? |
21:15:42 | FromGitter | <arnetheduck> it's been a long road there however, most of the spec people are python devs armed with `BigInt`.. even sha256 hashes are signed numbers in their world |
21:16:41 | FromGitter | <arnetheduck> dom96, possibly - we're having a community call about it on friday |
21:16:43 | skrylar[m] | maybe etherium 2 won't have the bug that the developers tampered with history for personal gain thus ruining the whole thesis of etherium in the first place :^) |
21:16:53 | dom96 | arnetheduck: anything we can do to help? |
21:17:39 | Araq | alehander42: I think we should write separate articles about the new runtime and hot code reloading |
21:17:58 | Araq | and before that I need to try hot code reloading too, never used it |
21:18:15 | Araq | don't have time to develop games in Nim... |
21:18:28 | dom96 | I'm developing a game in Nim :P |
21:18:37 | FromGitter | <arnetheduck> but this is outside of contracts - it's about verifiability in the spec for the state machine that governs consensus.. life is easier if you can take underflows out of the equation when using unsigned arithmetic.. where possible we're going for saturation as well |
21:18:50 | dom96 | But it runs in the browser so not sure how much this new runtime would help me |
21:19:00 | dom96 | what would help me is reducing the overhead of all these string conversions :/ |
21:19:16 | dom96 | I might have to end up writing JS string utils |
21:19:16 | clyybber | webAssembly would help you :P |
21:19:19 | Araq | dom96, I simply use a different coding style in karax for that |
21:19:27 | Araq | it works |
21:19:27 | FromGitter | <xmonader> would hot code reloading mean I can register/unregister plugins in the runtime without having to recompile the app? |
21:19:35 | clyybber | yes |
21:19:41 | clyybber | well, you recompile it |
21:19:48 | Araq | clyybber! where is my =move? |
21:19:48 | dom96 | Araq, the whole idea is that I want to reuse code on the front end and the back end (it's a multiplayer game with both client and server simulating the world) |
21:20:09 | Araq | dom96, kstring is a slim abstraction for that |
21:20:11 | clyybber | Araq: just started working on it again :# |
21:20:28 | Araq | come on, it's easy, writing the spec was the hard part |
21:20:36 | Araq | ;-) |
21:20:40 | clyybber | yeah, :) |
21:20:42 | FromGitter | <arnetheduck> I've been thinking that it would make some sense to refactor the primitives in system.nim a bit and put all of them in their own file, with functions covering overflow-exception, saturation and wrapping variations, then mapping `+` to the right one depending on compiler options and that stuff.. would be nice if the `--checks:on/off` could be moved to the std lib a bit more instead of sitting in the compiler |
21:20:47 | skrylar[m] | how does a 5..0 counter work with no minus operator :f |
21:21:20 | clyybber | with signed integers? |
21:22:04 | * | couven92 joined #nim |
21:22:07 | FromGitter | <xmonader> @Clyybber ybber how is that `hot reload` if i need to recompile it? |
21:22:13 | dom96 | Araq, Maybe that should be its own Nimble package? :) |
21:22:18 | FromDiscord_ | <DeltaPHC> Vladar: Looks like you might wanna push out a bugfix for sdl2_nim. The integer conversion error means it doesn't compile by default on the Nim 0.20.0 release |
21:22:24 | FromGitter | <jrfondren> you still need to compile the thing you're loading. |
21:22:36 | FromGitter | <arnetheduck> @dom96 well, one of the things we have to consider is whether to write a new `system.nim` completely for contracts/wasm or go with the present one, which has a bit too much stuff for that environment |
21:22:52 | skrylar[m] | i suppose the nice thing is with distinct types you can make super paranoid counters that do all of this (or atomics too, fun times.) |
21:22:56 | FromGitter | <xmonader> yeah I'll compile all of my plugins into .so and then can load/unload them in the app entry point |
21:22:58 | Araq | write a new system.nim |
21:23:04 | FromGitter | <xmonader> e.g webserver adding modules to it |
21:23:23 | clyybber | xmonader: It reloads modules while the program is running? |
21:23:42 | dom96 | arnetheduck: do you have an idea of what you want out of system? |
21:23:48 | clyybber | Thats the definition of HCR in my book |
21:23:48 | FromGitter | <xmonader> or the idea i had long time ago, something like ansible in nim, and separate compiles of plugins without actually having to update the binary itself |
21:24:18 | FromGitter | <arnetheduck> it's easier to enumerate what I want *in* system :) |
21:24:31 | FromGitter | <xmonader> @clybber which book is that? |
21:24:35 | dom96 | then yeah, you probably want your own system : |
21:24:36 | dom96 | :) |
21:24:56 | * | alexander92 joined #nim |
21:26:20 | Araq | yup, write your own system.nim. Best reason to do it: It's never been done before. |
21:26:57 | Araq | if that's not fun then I don't know what is. :-) |
21:27:11 | alexander92 | i planned to do something like that(maybe) for my kernel |
21:27:25 | alexander92 | but i decided to just use c until i actually get an idea what i need |
21:27:44 | clyybber | xmonader: my book :p |
21:28:15 | clyybber | as in my opinion |
21:28:36 | FromGitter | <xmonader> Aha, not native speaker sometimes I take things literally. Sorry. |
21:28:43 | PMunch | Can a macro have a default parameter? |
21:28:47 | clyybber | np :), not a native speaker either |
21:29:20 | PMunch | Or rather, how do I check if the parameter is set or not |
21:29:53 | alexander92 | i think i used nil sometimes PMunch |
21:30:09 | alexander92 | but not sure if thats smart |
21:30:17 | PMunch | Hmm, it just tells me it's not able to infer the type.. |
21:31:21 | PMunch | Ay, I think I got it working :) |
21:31:38 | PMunch | Just as I realized that I don't need this.. |
21:32:46 | * | jasper_ quit (Quit: Page closed) |
21:40:28 | deech | Araq, just saw the release announcement and didn't know it was a 1.0 candidate. I'm working on https://github.com/nim-lang/Nim/pull/11341 which I think should be in place for 1.0. It basically fixes a lot of the compile/runtime interaction issues with assignments and operands. It's not quite ready yet, what is your 1.0 timeline? |
21:40:53 | Araq | I won't tell because you'll laugh |
21:40:59 | deech | Ok good. |
21:41:17 | Araq | but I know you're working on this and in my mind it ships with v1 |
21:41:33 | deech | Awesome, appreciate it. |
21:41:57 | Araq | however, please also update the spec while you're at it |
21:42:14 | deech | Ah, ok. I forgot about that. I did update the manual. |
21:42:22 | Araq | the manual is the spec. |
21:42:26 | Araq | :-) |
21:44:15 | * | a_b_m joined #nim |
21:45:11 | * | envoyt quit (Ping timeout: 252 seconds) |
21:45:59 | * | alexander92 is now known as rename |
21:46:13 | * | rename is now known as alexander92 |
21:46:46 | alexander92 | hm Araq why is your name with `@` in irc |
21:46:54 | alexander92 | ah this is some admin stuff |
21:46:59 | alexander92 | right |
21:47:39 | * | abm quit (Ping timeout: 248 seconds) |
21:48:01 | PMunch | Hmm, this RPN calculator thing I've been toying with is actually becoming pretty neat |
21:49:00 | alexander92 | this is how your new language starts |
21:49:22 | PMunch | Oh, it's already started :P |
21:49:24 | alexander92 | you need just a http and GET operators |
21:49:38 | alexander92 | and it will suddenly become a backend hotness |
21:49:52 | PMunch | I have commands, which play back what you store in them. And it has goto, loop counters, and logic operators :) |
21:50:14 | alexander92 | so you're turing complete already |
21:50:21 | PMunch | The whole thing is built with only two data-types though, float and "label" which is just a string without spaces |
21:50:40 | alexander92 | i think you need a term rewriting mechanism |
21:50:48 | PMunch | Term rewriting? |
21:50:49 | alexander92 | and you'll be able to metaprogram your own calculator |
21:51:47 | alexander92 | https://homepages.cwi.nl/~daybuild/daily-books/learning-about/term-rewriting/term-rewriting.html |
21:52:36 | alexander92 | afaik just a way to define rules how an expression is rewritten into a new expression |
21:52:45 | * | Summertime quit (Quit: Sunsetting.) |
21:52:50 | PMunch | Well you can write a command that creates a new command already |
21:52:54 | PMunch | I think.. |
21:52:58 | PMunch | I haven't actually tried that :P |
21:53:33 | alexander92 | so you can a 2 + sum2(1) define |
21:53:45 | alexander92 | 2 sum2 # |
21:53:51 | alexander92 | yeah i remember you had something like that |
21:54:15 | alexander92 | but i am thinking more of symbolical rewriting |
21:54:33 | alexander92 | where your calculator can somehow work with symbols and e.g. transform relations |
21:54:35 | PMunch | Hmm, that didn't quite work.. |
21:54:40 | alexander92 | (a+b)^2 == (a+b)*(a+b) |
21:54:44 | alexander92 | stuff like this |
21:54:51 | alexander92 | but this is extremely unneeded :P |
21:55:19 | * | Summertime joined #nim |
21:55:23 | PMunch | Aaah |
21:56:50 | PMunch | Hmm, it didn't like making commands within commands |
21:56:56 | PMunch | I'll have to look into that tomorrow |
21:56:59 | dom96 | PMunch, sounds a lot like my stack-based lang: https://github.com/dom96/nael :) |
21:58:18 | PMunch | Well look at you mr. fancy-pants with your many types |
21:58:35 | alexander92 | full blown language |
21:59:02 | alexander92 | if you dont have generic types in your calculator |
21:59:09 | PMunch | Yeah, I basically wanted to just make a more powerful calculator, without any mental overhead |
21:59:12 | alexander92 | are you really doing stuff right |
21:59:29 | deech | Araq,currently the type checker allows a compile time type like, 'let x {.compileTime.} = "abc"' to be passed to a proc like 'proc f (a:string) ...', I would like this to only be allowed if either 'f' is '{.compileTime.}' or 'a' is a |
21:59:31 | alexander92 | (but very nice seriously) |
21:59:51 | deech | 'static[string]', where should I go looking for that? `proc matches` in sigmatch.nim? |
22:00:06 | PMunch | Hmm, can I detect if the user is typing into a terminal or if this is input being piped to it in Nim? |
22:00:26 | PMunch | Well, since you can in C, obviously you can in Nim |
22:01:50 | alexander92 | hm cant bash build_all.sh |
22:01:51 | PMunch | Aha, terminal.isAtty |
22:02:56 | disruptek | i really don't understand these new object variants. |
22:03:20 | disruptek | why do i need to provide compile-time values for the case branches? |
22:06:59 | skrylar[m] | to avoid errors at runtime i guess |
22:07:57 | disruptek | uhhh |
22:10:14 | PMunch | http://ix.io/1L6T |
22:10:15 | PMunch | Hmm |
22:10:22 | sealmove | This is briefly explained in the Manual. It's lets the compiler make better guarantees and optimizations. |
22:11:08 | disruptek | the variants section doesn't appear to have changed much, if at all. where is this covered in the manual? |
22:11:55 | PMunch | Hmm, that might break nimlsp as well.. |
22:12:33 | sealmove | "Because case statements are checked for exhaustiveness during semantic analysis, the value in every of branch must be a constant expression. This restriction also allows the compiler to generate more performant code." |
22:12:42 | sealmove | https://nim-lang.org/docs/manual.html#statements-and-expressions-case-statement |
22:13:18 | sealmove | also I just found a relevant bug |
22:13:29 | disruptek | this is a mess. |
22:13:46 | sealmove | if you use a converted for these constant expressions, and a range, then it crashes |
22:14:01 | sealmove | https://github.com/nim-lang/Nim/issues/11422 |
22:14:05 | sealmove | converter* |
22:14:48 | PMunch | Hmm, it works somewhere.. |
22:14:49 | sealmove | I guess because it has to convert all the intermediate values some how, and this senario is not covered |
22:15:15 | disruptek | pretty sure this is broken; i've got a discriminant that contributes nothing to the object, but somehow it's demanding that i add a field that, again, is not defined for this variant. |
22:17:38 | PMunch | http://ix.io/1L6W |
22:17:42 | PMunch | That doesn't work |
22:19:38 | disruptek | wow, you need to create the objects with constants, too. madness. |
22:20:21 | sealmove | lol that's obvious. you either havs CT values or not. |
22:21:24 | disruptek | so i parse a discriminator, then have a tree/case where i compare that value to a constant which, duh, i use to construct the object. |
22:21:37 | disruptek | but despite the case statement asserting equality, i cannot use the variable itself. |
22:22:26 | disruptek | "Often an object hierarchy is overkill in certain situations where simple variant types are needed." |
22:22:36 | PMunch | Nice, now my calculator can run statements I pipe into it as well :) |
22:22:37 | disruptek | often, it seems, you will hate yourself for choosing variant types. |
22:23:08 | sealmove | it takes some practice to know when you can/use use them over objects |
22:23:18 | FromGitter | <jrfondren> https://github.com/nim-lang/Nim/issues/11143 <- Nim doesn't use case control-flow for inference on variants |
22:23:21 | sealmove | can/should * |
22:24:01 | * | sealmove quit (Quit: WeeChat 2.4) |
22:24:12 | disruptek | jrfondren: i thought that's what the rewrite was supposed to fix. i'm the dummy for not following it more closely. |
22:24:37 | FromGitter | <jrfondren> aye I didn't notice it was supposed to be fixed |
22:25:28 | * | alexander92 quit (Ping timeout: 245 seconds) |
22:26:13 | disruptek | fool me once, shame on you, fool me twice, shame on me. |
22:26:42 | * | PMunch quit (Remote host closed the connection) |
22:27:39 | * | couven92 quit (Quit: Client Disconnecting) |
22:32:07 | * | deech quit (Ping timeout: 252 seconds) |
22:36:04 | Araq | why is #11143 still open? |
22:36:09 | Araq | I thought it was fixed... |
22:41:28 | * | deech joined #nim |
22:46:38 | * | I_Right_I joined #nim |
22:56:15 | * | clyybber quit (Quit: WeeChat 2.4) |
22:58:23 | * | lritter quit (Quit: Leaving) |
23:01:22 | * | luis_ joined #nim |
23:06:03 | * | a_b_m quit (Ping timeout: 248 seconds) |
23:08:56 | * | laaron quit (Quit: ZNC 1.7.1 - https://znc.in) |
23:08:57 | * | laaron- joined #nim |
23:10:35 | * | laaron- quit (Remote host closed the connection) |
23:10:56 | * | laaron joined #nim |
23:17:52 | * | luis_ quit (Remote host closed the connection) |
23:26:43 | * | a_b_m joined #nim |
23:34:44 | * | I_Right_I quit (Remote host closed the connection) |
23:57:17 | * | a_b_m quit (Quit: Leaving) |