<< 06-06-2019 >>

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:14skrylar[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:44shashlick@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:35leorizeshashlick: with 0.20 csources, you can now build for all os/arch with make and enjoy parallelization :D
03:22:51shashlickshould we update CIs?
03:23:54leorizeI've covered everything except appveyor
03:24:30leorizethat 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:06leorizecan you update appveyor? :) %NUMBER_OF_PROCESSORS% should be used for make's -j parameter
03:26:51shashlickdoes the makefile make it into the xz file as well?
03:27:34leorizebuild.sh does that?
03:28:11leorizeoh, then idk
03:30:05shashlickideally the same makefile also builds nim - just builds koch if it is there and then koch boot and tools
03:30:32shashlickthe all a person would have to do is make and it would make csources and nim for the average downloader
03:50:37sealmoveguys I am making a hex editor, it's almost ready, I am so hyped :)
03:55:46sealmovesneak-peek https://asciinema.org/a/guTVkURUY3Cl95fNllflDczzR
03:56:58leorizekitty user :)
03:57:48sealmovehow do you know!?
03:58:12sealmoveah, asciinema has it as metadata
03:58:58leorizeI like kitty, but it doesn't support iosevka so I dropped it :p
03:58:59sealmovewell, I only use kitty because it renders images nicely, so it's easy to enable that feature in ranger
03:59:35leorizebuild a rival to alacritty in Nim :D
03:59:58*nsf joined #nim
04:00:20sealmovef*ck yeah!
04:04:35sealmoveBut 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:24sealmoveThen there is hexyl, but it's only a hex dumper, not editor.
04:40:27*brainproxy quit (Ping timeout: 248 seconds)
05:06:49rayman22201I briefly tried to contribute to alacritty... Cool project, but it was one of the reasons I gave up Rust for Nim lmao
05:13:10sealmoveWhat was the reason?
05:13:33rayman22201The Crate system
05:13:59rayman22201The crate system + cross platform development
05:14:14rayman22201I was trying to get windows support to work
05:19:18sealmoveIf 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:10rayman22201No. (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:35rayman22201And there were many implicit defaults that I found odd
05:38:01sealmoveSo basically you are saying the problem is that crates are inconsistent with one another?
05:39:04sealmoveWhile languages like C# and Nim have more consistency because there are guys (guy? :P) making calls?
05:39:18rayman22201yes, but I did not like the configuration system itself for crates.
05:39:54rayman22201Crates 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:10rayman22201Like say, which windows kernel version you using...
05:41:09rayman22201I don't need a whole yaml file + pragmas, I need typesafe ifdef...
05:41:59rayman22201Note: this was ~2 years ago. Things may have changed / gotten better since then.
05:42:31sealmoveI see, so basically hard to hack/adjust crates
05:42:36rayman22201Also, having "sub-crates" was a PITA.
05:42:52rayman22201dependencies in the same repo basically.
05:43:47rayman22201The 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:40rayman22201Rust relies soooo heavily on Crates, that you are forced into it, even if you don't want it.
05:45:03sealmoveWell it forces you to do tons of things
05:45:17sealmoveTo work in a very particular way
05:45:20rayman22201I think it over-complicated the architecture of alacritty from an early state, and it was unnecessary complexity.
05:46:06rayman22201But even hello world forced me to make a Crate (which had even more boilerplate back then). I find that absurd...
05:46:37rayman22201Yeah. Nim let me just "get shit done"...
05:46:58sealmoveYes 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:47rayman22201Yeah, I understand the reasoning. But It should be something that a project grows into, not is forced into from the beginning.
05:49:46sealmoveConsistency vs simplicity
05:50:07sealmoveRust doesn't trust programmers at all :>
05:50:18rayman22201Exactly. lol
05:50:49rayman22201It's not like I don't "feel safe" when using Nim. lol
05:51:11rayman22201But I also don't feel like the compiler treats me like an idiot.
05:51:42rayman22201Rust just always thinks you are a terrible programmer. I am terrible sometimes, but as much as Rust thinks lol.
05:52:07sealmoveYeah I think that's the gist of it
05:52:33sealmoveProducts like Rust and Go are aimed for noobs
05:52:52sealmoveAnd they just get in the way of a normal person, lol
05:53:18sealmoveI understand big companies like Mozilla and Go want to feel protected from stupidity
05:53:47sealmoveBut come on... tools shouldn't replace knowledge/skill
05:54:08rayman22201Well, from a business standpoint, it makes sense. It's cheaper to hire crappy programmers and give them safety scissors.
05:54:32AraqI doubt it.
05:54:46Araqcrappy programmers always do more harm than good
05:55:11rayman22201Lol. I agree. Java already tried this strategy, and look at all the terrible Java code in the world these days :-P
05:55:16Araqbut yeah, you cannot hire only PhDs to do the programming
05:55:22rayman22201too bad the business people didn't seem to get the message.
05:55:32rayman22201Since they keep trying.
05:56:12rayman22201Also true. We can't yet clone Araq or make AraqML :-P
05:56:26sealmoveWell, 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:57rayman22201It's all marketing. It's one of the best marketing I've ever seen for a programming language.
05:58:37Araqnah, I'm sorry, Rust is to be respected.
05:59:01AraqThey solved many many problems.
05:59:31AraqAnd even if you disagree with their answers, it asked the right question
06:00:15rayman22201ok ok. I'll admit that I'm over-exaggerating. I agree with you on that point Araq.
06:00:25rayman22201They did ask the right questions.
06:01:01rayman22201And they opened the door to allow other newer languages to flourish.
06:04:01Araqnow ... where is my =move implementation?
06:04:13Araqclybber?
06:08:50*leorize quit (Remote host closed the connection)
06:15:38skrylar[m]rust is still that way
06:16:11skrylar[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:29FromGitter<xmonader> how is rust for noobs? :D
07:25:03FromGitter<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:40FromDiscord_<sealmove> xmonader: Because it doesn't trust you to do things your way.
08:46:09FromGitter<xmonader> It's more of helping you avoiding common problems, that kept happening over the years no?
08:46:40FromDiscord_<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:31FromDiscord_<sealmove> It mostly inexperienced programmer and gets in the way of experienced ones.
08:47:40FromDiscord_<sealmove> mostly helps*
08:47:55FromGitter<arnetheduck> rust and well-written c++ code are nearly identical.. the experienced programmers probably don't notice the difference ;)
08:48:16FromGitter<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:09FromGitter<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:20FromGitter<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:06FromDiscord_<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:39FromGitter<arnetheduck> well yeah, that escape hatch is needed - compilers are not omniscient and haven't beaten turing on undecidability yet so..
08:55:02FromDiscord_<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:25FromGitter<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:31FromGitter<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:39FromDiscord_<sealmove> Yes, if you want 100% guarantees, it's a good choice, but it's too niche.
08:58:23FromDiscord_<sealmove> The added complexity is not worth it most cases.
09:00:03FromGitter<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:47ehmryif rust, why not ada/spark then? I've never seen a successful rust compile, but I know that ada works
09:04:32ehmryit 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:34Araqfad 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:17federico3ehmry: care to expand on "we've had better high-assurance stuff than rust"?
09:09:21ehmryada
09:09:39FromGitter<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:43ehmryada had a spec before a compiler, rust has compilers but no spec
09:10:22Araqand 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:24FromGitter<xmonader> June is here and V lang is going to render all languages obsolete :D
09:17:07livcdwell the site is down
09:17:45*laaron quit (Remote host closed the connection)
09:18:03FromGitter<xmonader> @livcd nim's?
09:19:28*laaron joined #nim
09:23:43livcdvlang
09:26:55Zevvhttps://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:05FromGitter<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:51FromDiscord_<sealmove> What about Rust as a compile target?
09:37:15FromDiscord_<sealmove> Nim could compile to Rust to ensure guarantees.
09:37:43FromGitter<xmonader> or Nim can get the move semantics :D
09:38:31FromDiscord_<sealmove> Just saying, maybe Rust is an interesting target for compiling to.
09:38:48Araqthe 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:19Araqand so we can either compiler to unsafe Rust or we need lifetime annotations on our own
09:39:29Araqwhich kind of defeats the purpose
09:41:16Araqall that it would accomplish is slower compile-times
09:41:58Araqin 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:52FromDiscord_<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:19AraqI'm such it's possible to generate it for Nim for many many cases.
09:43:36Araqbut I don't know if the last missing 20% would kill it
09:43:48Araq*sure
09:47:10FromDiscord_<sealmove> Hmm, little confused about Nim->Go. Nim can use Go's GC, no?
09:47:26Araqtrue but I don't know how it works :P
09:48:51Araqcompiling 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:31FromGitter<xmonader> @Araq you mean go assembler itself right?
09:51:58FromGitter<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:09FromGitter<alehander42> i am feeling that you're missing on the point of rust
09:52:56FromGitter<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:58FromGitter<alehander42> it's a bit like "why cant we compile ruby to C++ easily"
09:54:05AraqI wouldn't say that.
09:54:27FromGitter<alehander42> well that's how i see it, should've add IMHO
09:54:30*CcxWrk joined #nim
09:54:31AraqBefore Rust came along not many could imagine it's possible at all.
09:54:48Araqso now that we know Rust can do it, people can think about inferring more and more lifetimes
09:54:52FromGitter<alehander42> ok, but it still sounds hard to infer them
09:55:09FromGitter<alehander42> oh yes, but my point is that this is the *hard* problem
09:55:20AraqI think the bigger problem is that even if you infer them all
09:55:25FromGitter<alehander42> not something that would be easy to just get for free while compiling to rus
09:55:31Araqin the end it's more restrictive than not having them.
09:55:53*xet7 quit (Read error: Connection reset by peer)
09:56:11FromGitter<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:43FromDiscord_<sealmove> It wasn't me that mentioned Ada/spark
09:56:49FromGitter<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:01FromGitter<alehander42> seems still reasonable
09:57:03FromGitter<alehander42> oh sorry
09:57:36*xet7 joined #nim
09:57:49FromDiscord_<sealmove> But I get your point. If you can infer lifetimes, why even bother compiling to Rust...
09:58:07FromGitter<alehander42> honestly i can imagine something like an interactive(refactor-like) system which suggests different restrictions and the programmer refining using it
09:58:15FromGitter<alehander42> but i guess this will backfire a lot
09:58:20FromGitter<alehander42> sealmove exactly!
09:58:27AraqHaskell is pretty good at type inference
09:58:40*nc-x joined #nim
09:58:46Araqstill working with it is completely different than working with Python.
09:58:49nc-xdoesn't scopes infer lifetimes or something like that
09:58:56nc-x?
09:59:12stefanos82Araq: 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:16FromGitter<alehander42> yeah they had that "sidebands" idea, but not sure if related
09:59:38FromDiscord_<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:39Araqand 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:13nc-xScopes: Compile-time resource management using view propagation, an annotation-free variation of borrow checking.
10:00:14FromGitter<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:43FromGitter<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:50Araqstefanos82, that would be awesome indeed :-)
10:00:57nc-xAnyways how long for the release?
10:01:29Araqnc-x, we have Scope's author here in #nim, @lritter iirc
10:02:39narimirannc-x: by my calculation, it will take around 3 more hours for nightlies to test everything
10:02:39nc-xyes i remember he gave some explanation regarding the view progagation recently
10:02:48nc-xnarimiran: okay
10:03:22Araqthe problem with lifetimes is that they fail to model a heap.
10:03:33nc-xbut 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:58FromGitter<alehander42> Araq, is there an alternative mechanism that can model them
10:04:06nc-xor make travis somehow prioritize win/linux/mac to be built first bcos they are most common platforms
10:04:07narimirannc-x: there's some work done by leorize[m] to use azure pipelines, which should speed up things quite a bit
10:04:14Araqhaven't found any, I keep looking, alehander
10:04:33dom96Nim->Go? Please no
10:04:34nc-xor if nim repo is green, then nightlies should not run tests but directly build
10:04:50dom96It's tough enough to convince Go fans of Nim at my workplace as it is
10:04:55FromGitter<alehander42> i also think nim should have its own good concurrency story
10:05:04FromGitter<alehander42> and no need of go tooling/tech dependence
10:05:05nc-xnarimiran: yeah. azure offers parallel builds up to 10 iirc, so it should be a huge improvement.
10:05:20narimirannc-x: exactly. plus it is faster in general
10:05:32Araqmy idea is instead of using labels as lifetimes we use more general locations to describe what's going on
10:05:32dom96alehander42: Nim does have a good concurrency story
10:05:34dom96alehander42: async/await is concurrency
10:05:38FromGitter<alehander42> Araq, but what's the biggest weakness of lifetimes for heaps: what is a usecase where they fail a lot
10:06:33FromGitter<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:43leorize[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:00narimiran"only"
10:07:00dom96alehander42: Those are pretty much fixed with my latest PR
10:07:08FromGitter<alehander42> ah great
10:07:12nc-xIMO, we should not commit to using a single CI service
10:07:25Araqyou 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:30nc-xlets have travis for linux, appveyor for windows, azure for mac or something like that
10:07:33dom96Which isn't in 0.20.0, but 0.20.2 will surely not be far behind
10:07:46Araqyou can count on 0.20.2 :-/
10:07:53nc-xthen it will be faster. plus if any one of them go down, then things won't stop here.
10:08:06federico3dom96: I wouldn't call it good
10:08:18narimirannc-x: based on the speed differences, maybe azure can do half of everything, and travis and appveyor do 1/4 each
10:08:23Araqnc-x, I completely agree but switching the CIs is not something we do before a release
10:08:25FromGitter<alehander42> Araq isn't this more about being hard to analyze collections
10:08:36FromGitter<alehander42> but that's related to heap overally probably yeah
10:08:44leorize[m]get tid of appveyor all together :p that's the biggest bottleneck
10:08:46nc-xAraq, narimiran: yeah
10:08:51dom96federico3: Why not?
10:08:58leorize[m]one job at a time is terrible
10:09:44narimiranleorize[m]: yeah, ok, we can polish the details (azure 2/3, travis 1/3?) so we can have more concurrent/parallel tests
10:10:51leorize[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:56federico3so much pain for CI
10:13:32dom96alehander42: 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:05narimiranwhile 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:46narimiran"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:24FromGitter<xmonader> but they have a much smaller core language @narimiran
10:27:45narimirani wasn't 100% serious ;)
10:28:41FromGitter<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:59narimiranthanks :)
10:29:39narimirani 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:52leorizewhen can I expect nim 0.20? :p
10:30:00narimiranleorize: today :)
10:30:36leorizeI 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:20Araqwhat? are you saying Haiku is always one version behind?
10:31:37leorizeI'm busy :p
10:31:52stefanos82question: is there a particular reason "megatest" use a single core during execution?
10:31:57narimiranat least it is not like bleeding-edge Archlinux, which as of today will be 5 versions behind
10:31:58leorizehaven't got the time to test it
10:32:15leorizenote: rust is up-to-date there :P
10:34:33krux02stefanos82, 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:59krux02parallelizing a compiler is hard. calling a compiler multiple times in parallel is easy.
10:35:15stefanos82krux02: I thought megatest would also execute concurrent / parallel tests within it
10:35:44stefanos82that's the impression I originally had to be honest with you
10:35:51krux02the point of megatest is to join a lot of test to reduce the overhead, not to make anything parallel.
10:36:32krux02calling 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:00krux02when you join all the test files, you still need to process system.nim (and other dependencies) just once
10:37:34krux02so instead of compiling system.nim 500 times it now just compiles it one time.
10:38:09stefanos82krux02: 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:25krux02stefanos82, btw, are you stefantalpalaru on github?
10:38:31stefanos82nope
10:38:35krux02ok
10:39:26krux02with parallelism I have one guide I alwas follow. First check if you can optimize anything else. Then do that.
10:39:38krux02Parallelism creates complexity and is error prone.
10:39:52krux02and it doesn't promise too much scale.
10:40:29krux02a theoretical maximum of 8 times faster on 8 cores, but only when there is absolutely no overhead.
10:41:08Araqit's not that error prone, parallelism is quite easy, concurrency is the hard thing
10:41:45stefanos82often people confuse these two terms
10:41:59Araqhowever, it can still be tedious
10:42:48stefanos82in my opinion, to remedy this situation with concurrency demands a complete redesign of CPUs
10:42:56krux02I don't distinguish them that much as other people. But parallelism is about performance and concurrency is about control flow
10:43:13krux02stefanos82, we already have GPUs
10:43:19stefanos82krux02: true
10:43:45krux02it just needs to be simpler to program for GPUs.
10:44:25krux02then we are at my Rendering DSL again.
10:47:28stefanos82too 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:44krux02nim used to compile to PHP
10:47:49*dddddd joined #nim
10:48:00krux02(as an option)
10:48:49stefanos82to me Nim is an important language that I need to keep an eye on it
10:50:03stefanos82what V language claims to achieve, is what I wanted Nim to do
10:50:05*seni joined #nim
10:50:20stefanos82but I think Nim is getting there already
10:52:28leorize[m]Araq: has the =move went live or I'd have to wait for 0.21?
10:52:45stefanos82my dream would be to see Nim's execution time reaching microseconds and milliseconds at most
10:52:49stefanos82that would be mind blowing!
11:01:40*nc-x joined #nim
11:01:58nc-xleorize: wait for 0.21
11:02:50stefanos82guys, is this behavior normal? http://paste.debian.net/1086533/
11:03:00stefanos82I tested the example from the official website
11:03:32stefanos82my version is git hash: 8443392db5babc4b08db7f021e6dcd6cfa26a969
11:03:44ehmrystefanos82: commas?
11:04:28nc-xstefanos82: you forgot the comma
11:04:54nc-xbetween the two Person(..) objects
11:05:15nc-xinside people
11:06:49stefanos82lol darn it
11:06:52stefanos82good catch folks
11:07:11*nc-x quit (Quit: Page closed)
11:08:57Araqleorize[m], no =move for 0.20, sorry
11:09:07Araqbut we have a good spec now... *cough*
11:14:49leorize[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:18lqdev[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:25FromGitter<kaushalmodi> From a Twitter conversation, someone is wishing that Nim had ADT.
12:00:53FromGitter<kaushalmodi> What's ADT? Abstract Data Type?
12:01:12*NimBot joined #nim
12:01:37FromGitter<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:11FromGitter<xmonader> @kaushalmodi I do wish so too!
12:02:41FromGitter<kaushalmodi> Coming from a non CS background, what's an ADT all about?
12:03:15FromGitter<kaushalmodi> I read online that an ADT has that type specific functions.. but we have that almost everywhere in Nim.
12:03:16FromGitter<xmonader> it's algebraic not abstract
12:03:34*nc-x joined #nim
12:03:58FromGitter<xmonader> roughly it's about having some types like ⏎ type PaymentType = CreditCard Number | PayOnDelivery
12:04:33FromGitter<kaushalmodi> Ok, I ended up on https://en.m.wikipedia.org/wiki/Abstract_data_type
12:04:55nc-xnarimiran, 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:40FromGitter<xmonader> https://en.m.wikipedia.org/wiki/Algebraic_data_type u need this one
12:05:59FromGitter<xmonader> I know variant exists in nim, but it's just ugly to use.
12:06:50FromGitter<kaushalmodi> Would concept fit the bill (not that I have used it): https://nim-lang.github.io/Nim/manual_experimental.html#concepts
12:07:19FromGitter<kaushalmodi> From the looks, it seems like it constraints the value of a data type using some user provided logic.
12:09:19FromGitter<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:43FromGitter<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:00leorizekaushalmodi: iirc gara has more features than patty, but I'm not sure since I never saw a need for pattern matching :p
12:14:16FromGitter<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:57leorizeafaict, these types are just your normal case object without the kind field
12:16:55FromGitter<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:45FromGitter<kaushalmodi> leorize: neither have I needed pattern matching. I've heard of gara, will mention that too.
12:18:14leorize@xmonader: with a bit of macro magic that kind of syntax is also possible with Nim
12:18:30*lritter joined #nim
12:20:37FromGitter<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:10leorizeyou can just not qualify the enums...
12:21:41FromGitter<xmonader> are you talking about pure?
12:21:52leorizewell but doesn't appear to be too hard to emulate that syntax
12:22:11leorize@xmonader: you never have to qualify enums...
12:22:44FromGitter<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:28leorizedo you feel like writing a macro? :) I'm pretty sure this is possible with some macro magic
12:25:11FromGitter<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:32FromGitter<xmonader> nah, too many edge cases and my macro powers aren't that good in nim
12:26:23leorizein Nim use abbrev in the beginning
12:27:15FromGitter<xmonader> or use {.pure.} ?
12:28:40leorizepure will be deprecated IIRC
12:30:03leorizethere'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:46FromGitter<xmonader> patty sounds to have that macro @leorize !! yay ⏎ https://github.com/andreaferretti/patty/blob/master/README.md#constructing-variant-objects
12:33:44leorizetold you it's possible :P
12:35:03*deech quit (Ping timeout: 245 seconds)
12:44:34*zahary joined #nim
12:51:33FromGitter<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:08FromGitter<xmonader> i like that! @arnetheduck
12:59:15FromGitter<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:20FromGitter<alehander42> are there any apps comparing exceptions/results for the same code
13:00:29FromGitter<alehander42> this woudl really help to compare, otherwise good lib
13:00:59*brainproxy joined #nim
13:01:49Araq'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:00FromGitter<xmonader> Well, many others design their libs with that as alternative to exceptions. And everyone is taking them seriously :)
13:08:41leorizecertainly not nim users, most libs are designed with exceptions :)
13:08:55Araqso where are these new languages where '+' returns an Option[int]?
13:10:05Araqall 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:57livcdwhoa a i was just searching for a very generic thing and google gave me a github repo for a project in nim
13:11:19leorizeyou've been using google for too long :p
13:11:27FromGitter<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:38FromGitter<arnetheduck> @alehander42 https://en.cppreference.com/w/cpp/experimental/fs/copy - have your pick :)
13:11:51livcdleorize: i was searching for "text expander for windows"
13:12:13livcdand got https://github.com/ajusa/sanictype as a first hit
13:12:55leorizeyea, you've been using google for too long :p
13:13:05leorizehttps://www.startpage.com/do/metasearch.pl?query=text%20expander%20for%20windows
13:13:18leorize^ that's what normal people see
13:13:35leorizeI mean people that don't use google as much :p
13:14:22Araqpersonalized searches rule :-)
13:15:33FromGitter<xmonader> also another question, does nim `forces` you to handle exceptions in the calling blocks?
13:15:52Araquse .raises: [] and the compiler does force you to handle it
13:16:41leorizeAraq: does that work for `block:` statements?
13:17:00FromGitter<xmonader> It sounds like a sane default maybe .noraises. should be provided instead
13:17:16Araqthat has been proposed indeed.
13:17:50*apodo joined #nim
13:19:08FromGitter<xmonader> much safer :)
13:19:19Araqby what measure?
13:20:09Araqforcing me to ignore errors in order to comply to .noraises is not 'safer'
13:21:42FromGitter<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:44livcdwhat happened to ryukoo
13:22:00narimiranlivcd: that's what i'm wondering too
13:23:22livcdwell he is active on gitlab
13:23:40FromGitter<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:16Araqhere is what happens in reality:
13:24:25Araqyou forget to catch the exception
13:24:39Araqthe program dies a bit too early with a quite instructive error message
13:25:20Araqhere is the gain of the idea: code size reduction by a factor of 2.
13:25:27Araqeasily.
13:25:38Araqcost vs benefit analysis, it's a thing.
13:25:47disruptekseems a little unfair to claim that .raises. is broken on Monday and then claim that .raises. solves anything on Tuesday.
13:26:42Araqdisruptek, .raises does solve the problem that programmers think they have, but it doesn't solve the *real* problem
13:27:05livcdnarimiran: https://gitlab.com/ryukoposting/northstar
13:27:30disrupteki 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:31narimiranlivcd: ok, still using nim, i was afraid he maybe stopped....
13:28:34Araqdisruptek, I don't like exceptions but so far I'm still looking for convincing arguments against them
13:29:19disruptekit 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:44Araq"blah, blah, hidden control flow" doesn't cut it when the proposed alternative introduce just as many different control flow paths
13:30:13Araqbut this time "hidden" in all the boilerplate
13:30:46Araqit'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:48disruptekexception 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:33leorizethe last thing I ever want to do is to handle IOError from `echo`
13:38:12dsuchstefanos82: 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:35stefanos82I guess dsuch
13:38:45stefanos82we are waiting for the official release by the end of June
13:39:39Araqdisruptek, boilerplate has costs too, more work to refactor, more code to read, more code that can have bugs
13:39:59disruptekAraq: and what's bad about Go's version, if you can remind me succinctly?
13:40:49dsuchstefanos82: 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:03disruptekdsuch: outrageous claims.
13:41:12leorizevlang seems to pack with so many features it's too good to be true
13:41:18narimirandsuch: hype-based development
13:41:31stefanos82dsuch: no, it's a one man's project
13:41:31Araqcan we have the vlang discussions in #nim-offtopic please?
13:42:13dsuchAraq: I did not realize such a channel existed and that it would be preferred
13:42:36dsuchThanks anyway disruptek et al.
13:42:37Araqdisruptek, what's good about it? Go has panic/recover which is an exception system
13:42:55*dsuch left #nim (#nim)
13:43:12Araqit merely uses it less frequently. which means that you can write your 'close' not in a 'defer' environment... er.. ooops
13:43:13disruptekthe error passing through multipart return values.
13:44:38Araqfor 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:08disrupteki agree.
13:45:36*envoyt quit (Ping timeout: 248 seconds)
13:46:02lqdev[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:33Araqwe need to make the .unwrap("good error message") be the default
13:46:33disruptekso why not just have every function measure success or failure, and maybe, (just maybe) have them flag the nature of the failure.
13:47:55lqdev[m]for me the whole idea of safety through constant `.unwrap()` calls everywhere in your codebase is far from preferable
13:48:16lqdev[m]it just adds a ton of noise and makes code unreadable
13:48:37disruptekit's a logical construct, not a literal one. just imagine that it's there.
13:49:10FromGitter<alehander42> but i am not sure why is it improtant to deal with a+b
13:49:15FromGitter<alehander42> this is an exceptional case
13:49:21FromGitter<alehander42> thats where exceptions would shine
13:49:26federico3I'd love a go2nim translator
13:49:27FromGitter<alehander42> and you can still have error enums
13:49:31FromGitter<alehander42> for the more usual cases
13:49:34lqdev[m]exceptions are a good tradeoff between readability and safety, imo
13:49:39federico3there's plenty of stuff that could be converted
13:49:40FromGitter<alehander42> basically use both
13:50:08Araqalehander42: my 'echo' statements can fail. rarely. it's an exceptional case
13:50:14FromGitter<alehander42> ok
13:50:39FromGitter<alehander42> so, again, exceptions can deal with such cases which are rarely handled: mostly on the top of a subsystem
13:50:51FromGitter<alehander42> and error enums with the other ones imo
13:50:59disruptekthe point that integer addition may fail is unassailable and useful as a measure of such a system.
13:51:13FromGitter<alehander42> (including bubbling errors automatically so you can still raise them thru the callstack with no try/catch)
13:51:22disruptekyou make it sound as though you support optional error handling.
13:51:25FromGitter<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:36shashlick@federico3 I could adapt nimterop to any language tree-sitter supports but Nim needs to add an importgo equivalent
14:08:55shashlickI 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:49shashlickNo doubt it is slower but moving should be easier since most of the code is in sh files rather than yml
14:10:40shashlickAlthough arm builds will require more work to ensure qemu is setup correctly
14:15:11leorizeshashlick: maybe you can offload a bit to circleci?
14:16:02leorizewith 36 cores, that thing crunch through the entire Nim CI procedure for Linux in 18mins
14:16:13leorizeor 20, I don't remember :p
14:19:14shashlickShould be doable but reason I've not optimized nightlies is that it happens every day once and doesn't gate anyone
14:19:34shashlickOf 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:52livcdwhere's yardanico ?
14:59:17*envoyt quit (Ping timeout: 252 seconds)
14:59:52FromGitter<kaushalmodi> narimiran: there's a typo in the v0.20.0 blog post
15:00:10FromGitter<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:12narimirankaushalmodi: where? give me the context
15:00:26FromGitter<kaushalmodi> the conversion is to uint16 but error says uint8
15:00:35narimiranright, nice catch
15:01:12leorizewell, 0.20 coming anytime soon? :p
15:01:31leorizefinally nim.nvim will work on stable
15:01:56FromGitter<kaushalmodi> leorize: it's already announced
15:02:10FromGitter<kaushalmodi> and the repo is tagged
15:02:20*apodo left #nim (#nim)
15:02:23Araqhmm 388 bugfixes
15:02:48Araqquite an achievement
15:03:29Araqah, it's only 387
15:03:55leorizewoo, got #7 on the commit chart
15:05:42FromGitter<kaushalmodi> heh, I am surprised to be even there.. number 27 :P
15:07:27narimirankaushalmodi: fixed
15:07:30leorizenim.nvim readme updated :D
15:08:00narimirancelebration time
15:08:12narimiran(until you fuckers report the first regression)
15:08:23FromGitter<kaushalmodi> narimiran: cool
15:08:41FromGitter<kaushalmodi> this has been bugging me: https://github.com/nim-lang/Nim/issues/10800
15:09:00FromGitter<kaushalmodi> as I import `os` in my `config.nims` I cannot run `koch docs` on my machine
15:09:07narimiranso literally i cannot have one minute of celebration? :(
15:09:13FromGitter<kaushalmodi> hehe
15:09:19FromGitter<kaushalmodi> it's not a 0.20 regression
15:09:34dom96Araq: Just call it 400 :)
15:09:45FromGitter<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:43FromGitter<kaushalmodi> :) today's for celebration!
15:10:53leorizeon HN yet? :p
15:11:16narimiranleorize: tomorrow morning would be a better timing i think, but whatever
15:11:32FromGitter<kaushalmodi> it's not even on twitter yet
15:11:39federico3blog post?
15:11:49leorizeblog post is up
15:11:49FromGitter<kaushalmodi> this announcement should be a pinned tweet IMO
15:11:57FromGitter<kaushalmodi> the current pinned tweet is too old
15:12:22Zevvcongrats an happy 0.20 day everybody
15:12:45*jasper_ joined #nim
15:12:56*envoyt joined #nim
15:13:41narimiranZevv: thanks, cheers! :)
15:13:51dom96Tweeted
15:13:54shashlickcongratulations!
15:13:57Zevvis the "no breaking guarentee" for the core language only, or also for the stdlib?
15:14:08dom96Zevv read on :)
15:14:08federico3the naming convention of the xz tarball has changed
15:14:25FromGitter<xmonader> congrats on the release and all the hard work
15:14:27federico3this time it's nim_0.20.0-linux_x64
15:14:29Zevvdom96: yeah right sorry about that :)
15:14:38dom96pinned tweet too
15:15:03narimiranfederico3: that's binary, source should be the same as before, no?
15:15:45leorizeread 1/3 of the page and the `shr` change is nowhere to be seen :p
15:16:01FromGitter<kaushalmodi> shouldn't the version number be mentioned somewhere on the install pages like: https://nim-lang.org/install_unix.html
15:16:05Zevvleorize: read on :)
15:16:09dom96leorize: I even bolded it for you
15:16:35narimirandom96: i think the bold was removed at the end, sorry :)
15:16:40dom96:'(
15:16:47narimiranbut it is the first thing in the changelog
15:16:50FromGitter<kaushalmodi> but it's the first point in changelog
15:17:01leorizecan an we have example as well? so that it'd stand out a bit
15:17:46Zevvgiven the number of fixes 0.19 must have been severely broken :)
15:17:47narimirani guess we can copy the examples from https://nim-lang.org/docs/system.html#shr%2Cint%2CSomeInteger
15:20:54leorizenarimiran: why does the doc for shr still recommends `ashr`?
15:20:57FromGitter<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:34PMunchCongrats on 0.20.0
15:30:00leorize!eval echo NimVersion
15:30:04NimBot0.19.6
15:30:09leorizePMunch: ^
15:34:02PMunchOoh, good point
15:35:16PMunchhttps://hub.docker.com/r/nimlang/nim/tags
15:35:29PMunchHmm, this is still on 0.19.6, which is what the playground uses
15:35:42leorizeI thought those are unofficial?
15:36:21PMunchYeah I think so
15:36:32PMunchMaybe I'll just roll my own..
15:38:08leorizePMunch: https://github.com/moigagoo/nimage
15:41:15PMunchHmm, yeah I really should make a staged one
15:41:32PMunchSo 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:22nc-x@KaushalModi https://github.com/nim-lang/Nim/pull/11418
15:42:35leorizehttps://old.reddit.com/r/programming/comments/bxhw0c/nim_version_0200_is_released/
15:42:38leorizefor upvoting :p
15:42:55nc-xCongrats on 0.20 everyone!!!
15:43:18nc-xsomebody also needs to post on nim forum regarding the release.
15:43:33leorizeyou have an account, right? :p
15:43:44nc-xnope
15:43:49nc-x;D
15:48:34FromGitter<kaushalmodi> nc-x: thanks!!!
15:49:39federico3https://lobste.rs/s/7h70w1/nim_0_20_0_has_been_released
15:51:10dom96hah, funny, Crystal release just yesterday as well
15:51:33dom96can we get more upvotes? ;)
15:51:43FromGitter<xmonader> and clojure too :D
15:51:49narimiranyeah, and ocaml is bringing new release too
15:52:04leorizecrystal website looks rather nice though
15:52:18dom96I prefer Nim's, but I am pretty biased :P
15:52:23FromGitter<xmonader> can someone comment on the sshr operator history question on reddit?
15:52:34leorizethere's already `ashr`
15:52:48leorizethe shr change is to conform with other languages, and to get rid of ashr
15:52:50dom96looks like def- beat me to HN heh
15:52:58dom96Thank you for including "1.0 RC" in there
15:53:18leorizexmonader: someone asked the same on the forum :p see the rant about shr
15:53:53FromGitter<xmonader> 1) 0 RC 1 is soo clickbaity i wish I included it in the title
15:54:19dom96it's not click bait when it's true :)
15:54:45def-dom96: seemed like an important point
15:54:51FromGitter<xmonader> true, maybe there's another word for what i meant it in English :)
15:56:22leorize@xmonader: https://forum.nim-lang.org/t/4891#30623
15:57:11FromGitter<xmonader> thank you!
15:57:43leorizehttps://news.ycombinator.com/item?id=20115532
15:59:00dom96Don
15:59:05dom96*Don't link to HN directly
15:59:20leorizewhy?
15:59:32dom96If people upvote by going straight to that link the thread will get banned
15:59:48leorizeoh, never know about that, sorry
15:59:59FromGitter<xmonader> Really? wow. How the rust folks do it :D ؟
16:00:24*nc-x quit (Quit: Page closed)
16:00:25FromGitter<kaushalmodi> https://hn.algolia.com/?query=nim&sort=byPopularity&prefix&page=0&dateRange=pastWeek&type=story
16:00:43leorizethey don't have to, the word "rust" is a HN buzzword now
16:01:32dom96Anyway, Nim is on the front page now so need for links ;)
16:01:57FromGitter<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:10FromGitter<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:53PMunchWoo, my nimsuggest changes have also been merged :) So now nim-lsp doesn't depend on devel any longer
16:03:33dom96kaushalmodi: lol
16:14:49stefanos82dom96: I didn't know about that thing
16:15:02stefanos82how come a link gets banned by accessing it directly?
16:16:03narimiranvote 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:16FromGitter<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:24leorizelooks like Nim is doing well on HN :)
16:43:48leorizexmonader: your target was linux :p
16:44:15leorizewhich is just the worst target ever
16:44:18*terorie joined #nim
16:44:22FromGitter<xmonader> yeah and ssl was the dependency :D it's safe to assume most of developers are using linux
16:44:39FromGitter<xmonader> I never developed on other platform.
16:44:44leorizewell, once we have native nim modules for everything (like go), we can relax and have deps free exec
16:45:22leorizefor now, we're as deps free as any C program out there
16:45:49FromGitter<xmonader> but we are mentioning that as a nim feature, which aren't free really as what people expect
16:46:57FromGitter<jrfondren> did you expect to not have SSL as a dependency?
16:47:38FromGitter<xmonader> i expected easily built statically linked binary :)
16:47:42FromGitter<jrfondren> I read that as, "oh, it's not a scripting language".
16:47:55FromDiscord_<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:02leorizeAraq: ^
16:48:07FromGitter<jrfondren> static linking is possible, but it's not as easy as it could be yeah.
16:48:57FromDiscord_<DeltaPHC> Personally I use mingw-w64 8.2.0 with Nim and it works fine
16:49:21FromGitter<xmonader> @kaushalmodi where's the link to the experiment we had with static linking nim to ssl?
16:50:00FromGitter<xmonader> found it nvm https://github.com/kaushalmodi/hello_musl
16:50:24FromGitter<jrfondren> what's the musl for? to get DNS resolution without dynamic linking?
16:51:10leorizelibc-independance
16:51:16AraqDeltaPHC: we can switch to 8.2.0 after extensive testing
16:51:23Araqbut yeah, we should
16:51:33*nsf joined #nim
16:53:02leorizesomeone opened the style-insensitivity can of worms on HN :p
16:54:21PMunchHmm, 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:33FromGitter<xmonader> no with async no.
16:55:00leorizeno idea how the http timeout thing works
16:56:24Araqleorize, 'nim --styleCheck:warning' is a thing
16:56:25FromGitter<xmonader> @PMunch https://nim-lang.org/docs/asyncnet.html#recv%2CAsyncSocket%2Cint no overloaded version for recv with timeout
16:57:14PMunchxmonader, 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:35leorizeAraq: was it documented as a new feature for 0.20?
16:57:41*nc-x joined #nim
16:58:14Araqleorize, I think I forgot to mention it :P
16:58:32leorizenarimiran: quick :p ^
16:59:01narimiranleorize: other, more important, worries currently
16:59:16nc-xI just remembered. Apart from newruntime, the hotcodereloading also did not have a mention in the blog post?
16:59:27leorizehcr is experimental rn
16:59:35leorizethere aren't any docs yet iirc
17:00:38FromGitter<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:05nc-xleorize: I think they deserved a mention atleast near the top
17:02:29nc-xAlso can anybody verify the nim stdlib docs don't have the search on mobile
17:02:49leorizenewruntime can be held off a bit
17:02:55nc-xeg. here https://nim-lang.org/docs/algorithm.html
17:03:00FromGitter<jrfondren> @nc-x, they don't have the search on mobile.
17:03:07leorizeAraq has just redesigned the thing before 0.20 :p
17:03:22Araqguys, can't you test this stuff *before* we release...
17:03:34dom96xmonader: not sure what you mean
17:03:45Araqalways the same shit, .0 is crap, .2 is workable
17:04:19nc-xI think the docs can be updated without a new release
17:04:44leorizewell not having search on mobile is not the end of the world
17:04:45FromGitter<xmonader> @dom96 asycnet.recv doesn't allow timeout param. is it meant to be used with `withTimeout` or something else?
17:05:06Araqnc-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:46leorizenow that's not a nice thing
17:06:01nc-xbroken nimble?
17:07:14leorizebut nimble CI is green?
17:07:55dom96xmonader: yes, it's meant to be used with that
17:07:58narimiranleorize: don't ask....
17:08:17Araqit's our overly complicated testing + Nimble bundling setup :P
17:08:58Araqif only Nimble were part of Nim ... so much friction just because it's in its own repo, it's ridiculous
17:09:42dom96Nah, this is a simple case of: it should have been tested
17:10:13dom96anyone extracting one of the tarballs and testing would have caught this
17:10:25Araqit was tested. automatically. it also was tested that 'koch nimble' works.
17:10:37Araqwe trust our automation :P
17:10:49*nc-x quit (Ping timeout: 256 seconds)
17:11:34leorizenew 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:29SerenitorI'm trying to get my code compiled on 0.20.0, last time it compiled was on 0.18.0
17:19:36Serenitorseems like there's quite a lot to fix
17:19:41Serenitoron thing is that I can no longer set a string to nil?
17:19:56leorizeyea, looks like you missed out 0.19
17:21:02narimiranSerenitor: that was gone in 0.19 too. see 0.19 release notes on how to keep compiling that code
17:21:41Serenitorwill 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:57rayman22201Congrats on the new release! I'm always sleeping when the fun stuff happens.
17:33:24leorizedom96: maybe it's time to update the topic?
17:45:17*couven92 joined #nim
17:45:18*couven92 quit (Client Quit)
17:56:31FromGitter<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:55leorizebrentp: -d:release now enables some checks
17:57:03leorizeuse -d:danger for no checks
17:57:06narimiranbrentp: try with -d:danger
17:57:42FromGitter<brentp> aye. that does it. thanks @leorize and @narimiran
17:58:34leorizebrentp: you can try tracking down the hotspot then use {.checks.} pragma to selectively disable runtime checks
17:58:44FromGitter<brentp> where can I see more about this? I can probably .push on some stuff in hot paths
17:59:57leorizehttps://nim-lang.org/docs/manual.html#pragmas-compilation-option-pragmas
18:00:31narimiranif anybody wants to join the discussion.... quite a lot comments here https://news.ycombinator.com/item?id=20115532
18:01:14leorizewelp, dropped to bottom of first page
18:01:26leorizebut US is waking up, so we might see some bounce back
18:14:08PMunchxmonader, 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:10sealmoveguys I got an error (I know the cause) but got this error:
18:22:14sealmovemain.nim(176, 6) Error: internal error: genLiteral(nkHiddenCallConv)
18:22:15sealmoveNo stack traceback available
18:22:17sealmoveTo create a stacktrace, rerun compilation with ./koch temp c <file>
18:22:59sealmoveIs this normal?
18:23:37sealmoveI mean for nim compiler to terminate like this. "internal error" sound severe :P
18:23:50narimiranwell, 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:02sealmoveyes that's why I am asking
18:30:05leorizenarimiran: how's the nimble issue going?
18:30:25narimiranthe fix is in devel
18:30:39narimiranbut now i hear somebody having a different problem on windows....
18:31:24narimiranbtw, 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:42sealmoveI think it's a bug in `converter`
18:38:41*Serentty joined #nim
18:40:31sealmovehttps://termbin.com/af6v
18:41:14sealmovebtw does this error mean *compiler crushed* ?
18:41:35leorizeyea, an ICE means the compiler crashed
18:41:43SerenttyOkay, 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:56leorizesealmove: you should file an issue on github
18:42:11sealmoveyes, I'll do that
18:43:04narimiranSerentty: not today, not today.... :)
18:45:03kungtotteI hope it's about case insensitivity, we sure don't get enough discussions about that
18:45:27SerenttyWhat's today?
18:45:36narimiran0.20 release day
18:46:46SerenttyAnd 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:23SerenttyOh 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:10leorizeI think the forum is a better ground for long discussion, although it's fine here
18:50:28SerenttyOkay, 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:28Serenttytop 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:52narimiranthere's already open issue about that name
18:50:55Serentty*accurately describe
18:51:45lqdev[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:52FromGitter<jrfondren> who approaches anything dealing with Unicode and says, "I bet this has no caveats." ?
18:52:01lqdev[m]I only need to do this on linux to get the available audio backends
18:52:06leorizelqdev[m]: it's libpulse
18:52:16*lritter quit (Remote host closed the connection)
18:52:40leorizethe "proper" way to detect pulse is `pulseaudio --version`
18:52:50leorizebut you'll end up using libpulse anyway, so...
18:53:13lqdev[m]nope, still errors
18:53:26leorizethen maybe you don't have pulseaudio instaled?
18:53:33lqdev[m]aah
18:53:49lqdev[m]makes sense
18:54:40lqdev[m]I do, `pulseaudio --version` works
18:55:07leorizeif you're on debian-based distro, you'd need libpulse-dev or similar for pkg-config to detect libpulse
18:55:23skrylar[m]oh boy unicode
18:55:23lqdev[m]how do I check JACK and ALSA? I guess `pkg-config` is my only option?
18:55:24skrylar[m]i sure don't have enough nightmares writing code for that \o/
18:57:30leorizelqdev[m]: alsa is built-in for all linux, but since you'll likely ending up using alsa-lib, check for libalsa
18:57:53Serenttynamiran: 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:05narimiranSerentty: you're right, it is not. i thought about this one: https://github.com/nim-lang/Nim/issues/7740
18:59:56skrylar[m]actually
19:00:14skrylar[m]would the old `when compiles` work with using gulp to check pkgconfig?
19:01:21SerenttyCan I open an issue then?
19:01:32leorizeSerentty: sure, on the nim-lang/rfcs repo please
19:01:49leorizeskrylar[m]: you mean checking if pkgconfig exists?
19:05:53*Trustable joined #nim
19:12:06lqdev[m]how does CMake's find_package actually find a package?
19:12:40lqdev[m]I'm looking at this and thinking how it actually works https://github.com/andrewrk/libsoundio/blob/master/CMakeLists.txt#L47
19:13:19leorizethose packages install .cmake files in specific locations
19:13:28leorizecmake have a list of them and just look up based on that
19:13:51lqdev[m]aah, so it's no use for me then
19:15:21dom96100 points, 3 hours, off the front page
19:15:25dom96Yep, we've been dragged down
19:15:48dom96Either by HN's automatic brigading algorithm or because one of the HN mods decided to do it
19:15:52dom96it's likely the former
19:15:58dom96def-, maybe you could email HN?
19:15:59narimiranyay
19:16:36dom96narimiran: why is https://nim-lang.github.io/Nim/httpclient a valid path? Why does it work without the .html?
19:17:23leorizedom96: github magic
19:18:33dom96That's bad practice, you shouldn't have the same content duplicated across two different paths like that
19:19:52leorizeyou'd have to complain with github :p
19:25:36FromGitter<kaushalmodi> I want to parse the timezone from a date string
19:25:43FromGitter<kaushalmodi> I tried: ⏎ ⏎ ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=5cf968b6702b7e5e763e7212]
19:25:59FromGitter<kaushalmodi> but it is printing ⏎ ⏎ ```2019-06-06T14:17:43-04:00 ⏎ LOCAL``` [https://gitter.im/nim-lang/Nim?at=5cf968c76fc5846bab733494]
19:26:08FromGitter<kaushalmodi> so the original timezone is lost
19:26:37FromGitter<kaushalmodi> if I look at the `parse` signature https://nim-lang.github.io/Nim/times.html#parse%2Cstring%2CTimeFormat%2CTimezone%2CDateTimeLocale
19:26:51skrylar[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:05FromGitter<kaushalmodi> I see that the `zone` arg defaults to local() ..
19:27:15leorizeskrylar[m]: just use staticExecEx :p
19:27:23FromGitter<kaushalmodi> the problem is that I need to parse the original zone from the `dtStr`.. how do I do that?
19:27:35skrylar[m]leorize: le shrug. it's not me who needs it :b
19:28:01FromGitter<kaushalmodi> @GULPF ^
19:28:11skrylar[m]altho thunderstrike is at the point now where i have to go dig up gtk3 and winapis to do anything more
19:30:05AraqSerentty, what do you suggest we use instead?
19:30:18Araqwe need a better short, sexy term then
19:30:26Araqand Rune is what Plan 9 used btw ;-)
19:30:56FromDiscord_<DeltaPHC> `Codepoint` isn't as short or sexy, but it's quite accurate :P
19:31:20skrylar[m]thats what i used
19:31:46skrylar[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:01skrylar[m]the grapheme was mostly used in a code point interator
19:34:19dom96I emailed HN
19:35:19SerenttyAraq: 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:20Serenttyprogrammers 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:43SerenttyA 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:57dom96Araq, You might want to reply here: https://news.ycombinator.com/item?id=20117175 :)
19:38:04dom96And talk about what you're working on
19:38:18dom96(AndyKelley is the person behind Zig)
19:38:57FromDiscord_<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:01SerenttyThat's actually a pretty good point I think.
19:41:26SerenttyOkay, here's what I wrote on GitHub.
19:41:27Serenttyhttps://github.com/nim-lang/RFCs/issues/151
19:49:00*lritter joined #nim
20:00:44*clyybber joined #nim
20:05:58dom96narimiran: some praise for your changes: https://www.reddit.com/r/programming/comments/bxhw0c/nim_version_0200_is_released/eq7i855/. Nice :D
20:06:05dom96I must admit, it has grown on me
20:08:29ZevvSame here. Although I still find bullet #1 from "Elegant" a bit patronizing and not right
20:08:57narimiranyaaay :)
20:09:44dom96Zevv, agreed
20:10:17dom96Please PR it if you can make it sound better: https://github.com/nim-lang/website/blob/master/jekyll/index.html#L40
20:10:37shashlickbtw, i was unable to get jekyll serve working on ubuntu yesterday
20:10:54narimiranshashlick: it works for me on manjaro
20:11:02shashlickKey related_posts cannot be set in the drop.
20:11:06shashlickon ubuntu
20:11:15dom96did you install the Gemlock'ed deps?
20:11:28narimiranshashlick: `bundle exec jekyll serve`, or some other command?
20:12:55shashlickhttp://ix.io/1L6f
20:13:14narimiranbtw, 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:42Zevvdom96: 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:00shashlickmeh i give up, later
20:21:26dom96Zevv, nice, thank you for providing feedback. I wish I had more time to do that :)
20:23:07FromGitter<xmonader> @PMunch that indeed was the note i was referring to https://nim-lang.org/docs/httpclient.html#timeouts
20:24:07Serenitoris there anything new in regards to embedding nim script?
20:24:14SerenitorI 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:34Serenitor*set this up
20:25:01FromGitter<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:37AraqSerenitor, look at the tcompilerapi test for the API
20:27:40*narimiran_ joined #nim
20:28:43Serenitorok thanks for the hint
20:29:18Araqalso about Rune16, that's pretty easy to change we can keep the Rune16 as a deprecated alias
20:29:30Araqhowever, that is exactly what needs to stop IMO.
20:29:44Araqpointless renaming and redefinitions
20:30:04*narimiran quit (Ping timeout: 258 seconds)
20:30:42Cadeycongrats on 0.20.0!
20:31:10PMunchnarimiran_, https://old.reddit.com/r/programming/comments/bxhw0c/nim_version_0200_is_released/eq7i855/
20:31:19PMunchReddit appears to like the new website :)
20:31:39narimiran_PMunch: ...and i like reddit today :)
20:31:42Zevvwoohoo, arm builds in the nightlies \o/ when was that done?
20:32:08FromDiscord_<lmariscal> Araq, I agree but to be honest Rune doesn't express a lot in its own
20:32:59ZevvI 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:10SerenttyI 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:54FromDiscord_<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:36FromDiscord_<DeltaPHC> Because after 1.0, it's going to stick around for a very very long time
20:35:58FromGitter<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:40lqdev[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:12clyybberI agree, I like Rune, its short and expressive
20:37:15Serentty<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:20FromDiscord_<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:18rayman22201https://memegenerator.net/img/instances/78250574/are-you-ready-to-bikeshed.jpg
20:39:35*rayman22201 can't help myself
20:39:54FromDiscord_<DeltaPHC> Personally I'm not too hung up about Rune, but I do understand the point being made
20:40:44FromDiscord_<lmariscal> Same here, but because Rune has already been stablished, you have to outweigh the negatives of changing it a this stage
20:40:44Serentty<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:09SerenttyI meant to ping lqdev.
20:41:24Araqas I said, it's not even my invention, I took it from Plan 9
20:41:41lqdev[m]then `char` should be renamed too, if it "can be a character but doesn't have to be"
20:41:45AraqI think we simply need to ensure it's documented well
20:41:51FromDiscord_<lmariscal> ^^
20:41:56Araqbtw we updated to Unicode 12.0
20:42:03Araqis that in the changelog?
20:42:06PMunch!eval echo NimVersion
20:42:10NimBot0.19.6
20:42:14PMunch:(
20:42:27PMunchIt should auto-update whenever the docker images update
20:42:28Serenttylqdev: To be honest, I would support that as well.
20:42:33FromDiscord_<lmariscal> Nope, not in the changelog
20:44:00*narimiran_ is now known as narimiran
20:44:24FromGitter<GULPF> @kaushalmodi re timezone parsing: there's no way to do that in the times module
20:44:49AraqGUPLF: what do *you* think about breaking compiler fixes?
20:46:24FromDiscord_<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:58SerenttyAnyway, 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:24SerenttySo, forget about the rune thing. The name is fine I suppose. Rune16 is the bigger problem.
20:49:04Araq Rune16* = distinct int16 ## \
20:49:04Araq ## Type that can hold a single UTF-16 encoded character.
20:49:04Araq ##
20:49:04Araq ## A single Rune16 may not be enough to hold an arbitrary Unicode code point.
20:49:13narimiranSerentty: count the amount of usages of Rune16 in unicode.nim ;) :P
20:50:36Araqit's not even used... wtf
20:50:48Araqbut exported, yay
20:51:01FromGitter<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:27Araqthat's not how it works
20:51:43FromDiscord_<lmariscal> GULPF that's why LTS versions exist
20:52:00Araqthe 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:17Araqthe point is that we backport bugfixes to 1.0.x for years to come
20:52:29Araqwe did that with 0.19.x
20:52:40Araqand now the 0.19.x line is dead
20:52:53Araq0.20.x will live much longer
20:53:09shashlick@Zevv arm builds have been around for more than a month
20:53:13SerenttyWell, “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:20FromGitter<kaushalmodi> @GULPF Oh, I just posted https://forum.nim-lang.org/t/4912 with all details
20:53:21shashlickCurious on your feedback
20:53:37Araqalso, I have a pretty good overview about what is broken in the compiler
20:53:40FromGitter<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:01AraqI went over the full list of bugs multiple times
20:54:12FromGitter<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:17Araqand there are mostly 3 different pain points, all taking weeks to fix
20:54:23Araqor months.
20:54:59Araqhowever, 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:58FromGitter<kaushalmodi> @GULPF So I cannot even make this work: http://ix.io/1L6u/nim
20:56:31dom96ooh, we can get a sponsor button on GitHub now
20:56:32*dom96 adds
20:57:02Araqarnetheduck: 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:37FromGitter<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:51FromGitter<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:17Araqbtw Rune16 is used exactly 0 times in Nim's stdlib
20:59:41AraqI think we can savely deprecate this for v1, rules exist to be broken
21:00:51AraqGULPF: for a stable ecosystem packages should support v1.0 and not "devel only"
21:01:13FromGitter<alehander42> nice
21:01:16FromGitter<alehander42> congrats
21:01:17FromGitter<alehander42> 1) 20!
21:02:04SerenttyOkay, 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:18FromGitter<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:02Araqthe conclusion was made, 'shr' changed to be type-based
21:03:10FromGitter<alehander42> btw why
21:03:17FromGitter<alehander42> no hot code reloading and new runtime
21:03:19FromGitter<alehander42> in the blog
21:04:00*narimiran quit (Ping timeout: 248 seconds)
21:04:02FromGitter<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:18Araqwell it should be uint16, yeah
21:04:35FromGitter<arnetheduck> so maybe get rid of op-based then, just creates two ways to do the same..
21:04:57FromGitter<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:13SerenttyI personally prefer separate types for signedness, because otherwise it's really easy to misinterpret one as the other.
21:06:11AraqI'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:30Araqand so it's a failed experiment ;-)
21:06:30FromGitter<GULPF> @kaushalmodi https://github.com/GULPF/timezones/blob/0c5f270c81b798d16b4dc690bbfc0c22fcfa37ea/timezones.nim#L101
21:06:42SerenttyFor UTF-32, signedness intentionally doesn't matter, but it does for UTF-16, yeah.
21:06:52FromGitter<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:04FromGitter<kaushalmodi> @GULPF Thanks! I will install `timezones` then
21:07:33FromGitter<arnetheduck> there are some benefits to op-based - it's easier to create a compiler for example because computers are op-based
21:08:18Araqit's good for an IR
21:08:25Araqbut pretty bad for humans
21:08:44SerenttyAraq: Ah, so has your opinion on unsigned types changed since the posts from a few years ago that I read?
21:09:14FromGitter<arnetheduck> yeah, that sums it up pretty neatly
21:09:15*envoyt quit (Ping timeout: 248 seconds)
21:09:53Araqnot really, Serentty. For example 'len' should really return a signed number because then stuff like len - 4 > y works
21:10:11dom96There we go: https://nim-lang.org/blog/2019/06/06/version-0200-released.html#installing-0200
21:10:17*envoyt joined #nim
21:10:19dom96Hope that makes sense
21:10:21Araqhowever, unsigned is acceptable if you remove the minus operator from it
21:10:54Araqunsigned simply has no minus operation, too error prone, you always need to use i+4 < len instead of i < len-4
21:11:21Araqbut I have yet to see anybody propose this solution :P
21:12:42FromGitter<arnetheduck> we've proposed it, for the ethereum 2 specification :) it's happening there
21:13:03Araqwow
21:14:13FromGitter<kaushalmodi> @GULPF got it working.. thanks!!
21:14:17FromGitter<kaushalmodi> ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=5cf98229faac64393450567f]
21:15:15dom96arnetheduck: Araq: nice, I like that solution
21:15:34dom96We gonna get Ethereum contracts written in Nim?
21:15:42FromGitter<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:41FromGitter<arnetheduck> dom96, possibly - we're having a community call about it on friday
21:16:43skrylar[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:53dom96arnetheduck: anything we can do to help?
21:17:39Araqalehander42: I think we should write separate articles about the new runtime and hot code reloading
21:17:58Araqand before that I need to try hot code reloading too, never used it
21:18:15Araqdon't have time to develop games in Nim...
21:18:28dom96I'm developing a game in Nim :P
21:18:37FromGitter<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:50dom96But it runs in the browser so not sure how much this new runtime would help me
21:19:00dom96what would help me is reducing the overhead of all these string conversions :/
21:19:16dom96I might have to end up writing JS string utils
21:19:16clyybberwebAssembly would help you :P
21:19:19Araqdom96, I simply use a different coding style in karax for that
21:19:27Araqit works
21:19:27FromGitter<xmonader> would hot code reloading mean I can register/unregister plugins in the runtime without having to recompile the app?
21:19:35clyybberyes
21:19:41clyybberwell, you recompile it
21:19:48Araqclyybber! where is my =move?
21:19:48dom96Araq, 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:09Araqdom96, kstring is a slim abstraction for that
21:20:11clyybberAraq: just started working on it again :#
21:20:28Araqcome on, it's easy, writing the spec was the hard part
21:20:36Araq;-)
21:20:40clyybberyeah, :)
21:20:42FromGitter<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:47skrylar[m]how does a 5..0 counter work with no minus operator :f
21:21:20clyybberwith signed integers?
21:22:04*couven92 joined #nim
21:22:07FromGitter<xmonader> @Clyybber ybber how is that `hot reload` if i need to recompile it?
21:22:13dom96Araq, Maybe that should be its own Nimble package? :)
21:22:18FromDiscord_<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:24FromGitter<jrfondren> you still need to compile the thing you're loading.
21:22:36FromGitter<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:52skrylar[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:56FromGitter<xmonader> yeah I'll compile all of my plugins into .so and then can load/unload them in the app entry point
21:22:58Araqwrite a new system.nim
21:23:04FromGitter<xmonader> e.g webserver adding modules to it
21:23:23clyybberxmonader: It reloads modules while the program is running?
21:23:42dom96arnetheduck: do you have an idea of what you want out of system?
21:23:48clyybberThats the definition of HCR in my book
21:23:48FromGitter<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:18FromGitter<arnetheduck> it's easier to enumerate what I want *in* system :)
21:24:31FromGitter<xmonader> @clybber which book is that?
21:24:35dom96then yeah, you probably want your own system :
21:24:36dom96:)
21:24:56*alexander92 joined #nim
21:26:20Araqyup, write your own system.nim. Best reason to do it: It's never been done before.
21:26:57Araqif that's not fun then I don't know what is. :-)
21:27:11alexander92i planned to do something like that(maybe) for my kernel
21:27:25alexander92but i decided to just use c until i actually get an idea what i need
21:27:44clyybberxmonader: my book :p
21:28:15clyybberas in my opinion
21:28:36FromGitter<xmonader> Aha, not native speaker sometimes I take things literally. Sorry.
21:28:43PMunchCan a macro have a default parameter?
21:28:47clyybbernp :), not a native speaker either
21:29:20PMunchOr rather, how do I check if the parameter is set or not
21:29:53alexander92i think i used nil sometimes PMunch
21:30:09alexander92but not sure if thats smart
21:30:17PMunchHmm, it just tells me it's not able to infer the type..
21:31:21PMunchAy, I think I got it working :)
21:31:38PMunchJust as I realized that I don't need this..
21:32:46*jasper_ quit (Quit: Page closed)
21:40:28deechAraq, 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:53AraqI won't tell because you'll laugh
21:40:59deechOk good.
21:41:17Araqbut I know you're working on this and in my mind it ships with v1
21:41:33deechAwesome, appreciate it.
21:41:57Araqhowever, please also update the spec while you're at it
21:42:14deechAh, ok. I forgot about that. I did update the manual.
21:42:22Araqthe manual is the spec.
21:42:26Araq:-)
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:46alexander92hm Araq why is your name with `@` in irc
21:46:54alexander92ah this is some admin stuff
21:46:59alexander92right
21:47:39*abm quit (Ping timeout: 248 seconds)
21:48:01PMunchHmm, this RPN calculator thing I've been toying with is actually becoming pretty neat
21:49:00alexander92this is how your new language starts
21:49:22PMunchOh, it's already started :P
21:49:24alexander92you need just a http and GET operators
21:49:38alexander92and it will suddenly become a backend hotness
21:49:52PMunchI have commands, which play back what you store in them. And it has goto, loop counters, and logic operators :)
21:50:14alexander92so you're turing complete already
21:50:21PMunchThe whole thing is built with only two data-types though, float and "label" which is just a string without spaces
21:50:40alexander92i think you need a term rewriting mechanism
21:50:48PMunchTerm rewriting?
21:50:49alexander92and you'll be able to metaprogram your own calculator
21:51:47alexander92https://homepages.cwi.nl/~daybuild/daily-books/learning-about/term-rewriting/term-rewriting.html
21:52:36alexander92afaik just a way to define rules how an expression is rewritten into a new expression
21:52:45*Summertime quit (Quit: Sunsetting.)
21:52:50PMunchWell you can write a command that creates a new command already
21:52:54PMunchI think..
21:52:58PMunchI haven't actually tried that :P
21:53:33alexander92so you can a 2 + sum2(1) define
21:53:45alexander922 sum2 #
21:53:51alexander92yeah i remember you had something like that
21:54:15alexander92but i am thinking more of symbolical rewriting
21:54:33alexander92where your calculator can somehow work with symbols and e.g. transform relations
21:54:35PMunchHmm, that didn't quite work..
21:54:40alexander92(a+b)^2 == (a+b)*(a+b)
21:54:44alexander92stuff like this
21:54:51alexander92but this is extremely unneeded :P
21:55:19*Summertime joined #nim
21:55:23PMunchAaah
21:56:50PMunchHmm, it didn't like making commands within commands
21:56:56PMunchI'll have to look into that tomorrow
21:56:59dom96PMunch, sounds a lot like my stack-based lang: https://github.com/dom96/nael :)
21:58:18PMunchWell look at you mr. fancy-pants with your many types
21:58:35alexander92full blown language
21:59:02alexander92if you dont have generic types in your calculator
21:59:09PMunchYeah, I basically wanted to just make a more powerful calculator, without any mental overhead
21:59:12alexander92are you really doing stuff right
21:59:29deechAraq,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:31alexander92(but very nice seriously)
21:59:51deech'static[string]', where should I go looking for that? `proc matches` in sigmatch.nim?
22:00:06PMunchHmm, can I detect if the user is typing into a terminal or if this is input being piped to it in Nim?
22:00:26PMunchWell, since you can in C, obviously you can in Nim
22:01:50alexander92hm cant bash build_all.sh
22:01:51PMunchAha, terminal.isAtty
22:02:56disrupteki really don't understand these new object variants.
22:03:20disruptekwhy do i need to provide compile-time values for the case branches?
22:06:59skrylar[m]to avoid errors at runtime i guess
22:07:57disruptekuhhh
22:10:14PMunchhttp://ix.io/1L6T
22:10:15PMunchHmm
22:10:22sealmoveThis is briefly explained in the Manual. It's lets the compiler make better guarantees and optimizations.
22:11:08disruptekthe variants section doesn't appear to have changed much, if at all. where is this covered in the manual?
22:11:55PMunchHmm, that might break nimlsp as well..
22:12:33sealmove"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:42sealmovehttps://nim-lang.org/docs/manual.html#statements-and-expressions-case-statement
22:13:18sealmovealso I just found a relevant bug
22:13:29disruptekthis is a mess.
22:13:46sealmoveif you use a converted for these constant expressions, and a range, then it crashes
22:14:01sealmovehttps://github.com/nim-lang/Nim/issues/11422
22:14:05sealmoveconverter*
22:14:48PMunchHmm, it works somewhere..
22:14:49sealmoveI guess because it has to convert all the intermediate values some how, and this senario is not covered
22:15:15disruptekpretty 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:38PMunchhttp://ix.io/1L6W
22:17:42PMunchThat doesn't work
22:19:38disruptekwow, you need to create the objects with constants, too. madness.
22:20:21sealmovelol that's obvious. you either havs CT values or not.
22:21:24disruptekso 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:37disruptekbut despite the case statement asserting equality, i cannot use the variable itself.
22:22:26disruptek"Often an object hierarchy is overkill in certain situations where simple variant types are needed."
22:22:36PMunchNice, now my calculator can run statements I pipe into it as well :)
22:22:37disruptekoften, it seems, you will hate yourself for choosing variant types.
22:23:08sealmoveit takes some practice to know when you can/use use them over objects
22:23:18FromGitter<jrfondren> https://github.com/nim-lang/Nim/issues/11143 <- Nim doesn't use case control-flow for inference on variants
22:23:21sealmovecan/should *
22:24:01*sealmove quit (Quit: WeeChat 2.4)
22:24:12disruptekjrfondren: i thought that's what the rewrite was supposed to fix. i'm the dummy for not following it more closely.
22:24:37FromGitter<jrfondren> aye I didn't notice it was supposed to be fixed
22:25:28*alexander92 quit (Ping timeout: 245 seconds)
22:26:13disruptekfool 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:04Araqwhy is #11143 still open?
22:36:09AraqI 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)