<< 31-01-2018 >>

00:03:15*yglukhov quit (Remote host closed the connection)
00:03:49*yglukhov joined #nim
00:08:18*yglukhov quit (Ping timeout: 240 seconds)
00:24:11ipjkBecause it creates seprate blocks.
00:25:34*radagast quit (Remote host closed the connection)
00:26:06*radagast joined #nim
00:27:50FromGitter<Quelklef> That explains why it's not complaining about redefinitions now, but how does the block return `returnproc`?
00:28:03FromGitter<Quelklef> *how does it return `returnproc` from inside the block?
00:29:12*devdri quit ()
00:31:20*yglukhov joined #nim
00:35:45*yglukhov quit (Ping timeout: 248 seconds)
00:47:07ipjkI figured it out
00:48:32ipjkQuelklef: https://pastebin.com/HWciiuvu
00:48:53FromGitter<Quelklef> oh, awesome! thanks1
00:49:35FromGitter<Quelklef> any idea why it works?
00:49:46ipjkI'm not sure, but I think it was converted to something like; proc () = echo "World"()
00:49:58FromGitter<Quelklef> Wait, not working for multi-lined procs D:
00:50:07FromGitter<Quelklef> I should have specified
00:50:19ipjkThis makes it into (proc () = echo "World")()
00:51:12FromGitter<Quelklef> but what it was complaining about was redefinitions
00:53:10ipjkYou mean multi-line, like this?
00:53:10ipjkhttps://pastebin.com/F418RJF6
00:54:12FromGitter<Quelklef> Wait, why was it not working for me then...?
00:54:39ipjkDid you put the first echo on the same line as proc () =?
00:55:29FromGitter<Quelklef> no, indentation is fine
00:56:05FromGitter<Quelklef> my usecase has also changed slightly, so I'm gonna stick with the `block` solution. Thanks, though!
00:56:16ipjkNo worries, was fun.
01:00:40*ipjk quit (Read error: Connection reset by peer)
01:05:51FromGitter<zacharycarter> Cleaned up the Nim playground, added a cron job to take care of the cause of it going down
01:06:00FromGitter<zacharycarter> hopefully it's no longer an issue
01:06:48*yglukhov joined #nim
01:10:57*yglukhov quit (Ping timeout: 240 seconds)
01:24:58*vivus quit (Quit: Leaving)
01:25:43*xkapastel joined #nim
01:29:10skrylari wonder if those playground servers actually help language adoption
01:31:09FromGitter<honewatson> @zacharycarter thanks!
01:47:58FromGitter<zacharycarter> np
01:48:36FromGitter<zacharycarter> off topic - but does anyone here have any experience with blockchain?
01:48:57FromGitter<zacharycarter> or know a lot about it?
01:50:17FromGitter<Quelklef> you're not making a NimCoin, are you?
01:51:03*icebattle quit (Quit: leaving)
01:51:25*obadz quit (Quit: WeeChat 1.9.1)
01:51:26FromGitter<zacharycarter> no
01:51:54FromGitter<Quelklef> phew
01:52:12FromGitter<zacharycarter> I'm more interested in record storage
01:53:06FromGitter<zacharycarter> I work for carfax (no idea if you've heard of the company or not) but we have lots of data about cars. We have a hackathon coming up and I was curious about maybe storing vehicle records in a blockchain
01:53:51FromGitter<Quelklef> That.... Sounds interesting
01:54:13FromGitter<zacharycarter> one complexity right off the bat is that our records aren't immutable
01:54:26FromGitter<zacharycarter> so I'd probably have to use something like ethereum's smart contracts
01:54:49FromGitter<zacharycarter> but I really have no idea how I'd get started / how I'd approach it, that's why I was asking really
01:55:02FromGitter<Quelklef> already sounds like you know more than I do about this, don't think I can help : P
01:55:52FromGitter<zacharycarter> another idea I have for the hackathon is to leverage ML in some capacity using our data
01:57:44FromGitter<zacharycarter> the first idea that came to mind, and the one I'm planning on going with, unless another pops up is - building a recommendation engine that pairs a consumer to dealerships based on search history, etc... and one that takes into consideration, historical dealer inventory, and best matches a car to a dealer
02:01:04FromGitter<Quelklef> sounds rather pragmatic for a hackathon
02:03:18FromGitter<zacharycarter> well I don't really have any barnburners to show off at the moment
02:04:24FromGitter<zacharycarter> our company has embarrassingly done squat with ML so far
02:04:32FromGitter<zacharycarter> so I figure any step in that direction is a good one
02:05:02FromGitter<Quelklef> Oh my, it took me until now to realize you're saying "machine learning"
02:05:07FromGitter<Quelklef> Yeah, that sounds like an interesting idea
02:05:09FromGitter<Quelklef> in that case
02:05:30FromGitter<zacharycarter> haha :P my bad
02:06:27FromGitter<Quelklef> I thought you meant the programming language, oops
02:06:38FromGitter<Quelklef> I was like "why does your company care so much about using a specific lang..."
02:08:18*couven92 quit (Ping timeout: 240 seconds)
02:20:44yunfanhey, do you have FUSE relevant library ?
02:25:16*S1t1Schu joined #nim
02:28:49*S1tiSchu quit (Ping timeout: 248 seconds)
02:31:54*chemist69 quit (Ping timeout: 252 seconds)
02:46:16*chemist69 joined #nim
02:51:57*radagast quit (Quit: radagast)
02:52:13*radagast joined #nim
02:52:58*yglukhov joined #nim
02:53:55radagastJust Microsoft things http://imgshare.free.fr/uploads/28bfd33c7f.png
02:55:38FromGitter<Quelklef> surprisingly wholesome
02:55:42FromGitter<Quelklef> 👍
02:57:37*yglukhov quit (Ping timeout: 248 seconds)
03:03:20skrylarzacharycarter: i have some knowledge about it
03:05:00skrylarBlockchains are just a modern buzzword for transaction logs (cf. classical RDBMS books, https://teachyourselfcs.com/ has some recommendations)
03:05:31skrylarIf you want a reference for a mutable record set, see Namecoin. If you want to see consensus without hashing or proofs, see Tindermint.
03:07:50yunfanskrylar: you are right, but these buzzword take us much peers than transaction does
03:08:02FromGitter<honewatson> > Blockchains are just a modern buzzword for transaction logs - nice definition
03:08:11yunfanin p2p domain, there's a cold bootup problem, isnt it?
03:09:09skrylarhonewatson: 'tis okay. all this "noSQL" stuff is just an object database that lisp/smalltalkers used :B
03:09:23skrylarkind of funny how we're reinventing what already existed, was claimed is unusable, but with a new PR team is the bees knees
03:10:41skrylaryunfan, depends on the scope of the p2p system
03:10:54skrylarthe real research is the proof of work and stake systems
03:18:38yunfanskrylar: tell me a success p2p network founded recently ?
03:39:44shashlickzacharycarter: interesting, I just spent the evening discussing blockchain and it's applications
03:52:48FromGitter<jamesalbert> I'm having an issue with websocket.nim, I've been tweeking it for the past few days with no luck. It's all described here https://github.com/niv/websocket.nim/issues/27 If someone could take a look, I have a feeling it's a bug in either websocket.nim or the net module, but I'm not sure.
03:54:32FromGitter<jamesalbert> I'm mostly looking for confirmation from somebody, I'm able to connect with every other websocket library and it looks like they're all sending the same request
04:01:07*dddddd quit (Remote host closed the connection)
04:05:25skrylarsometimes i wonder if you could use ML to optimize code instead of the big piles of passes
04:05:31skrylarmy guess is "yes but it's not worth it"
04:09:26FromGitter<jamesalbert> rule #1 of optimization club: you do not optimize.
04:11:49skrylarhave been working with hidden markov models lately and they have a sequence-to-sequence setup, was pondering about "code to code" using that
04:16:23FromGitter<jamesalbert> brings me back to college days, oh how I failed those courses :)
04:16:44skrylari do okay at ML, just takes a lot of staring and errors
04:19:38FromGitter<jamesalbert> Yeah, a little not-hotdog clone is the closest I've come to doing anything ML
04:21:05FromGitter<jamesalbert> you don't by chance have any extensive knowledge of websockets, do you? ;)
04:22:09FromGitter<Yardanico> It seems pineapple fund wasn't fake - https://www.fsf.org/news/free-software-foundation-receives-1-million-donation-from-pineapple-fund
04:22:38FromGitter<Yardanico> https://pineapplefund.org/
04:34:12*Snircle quit (Quit: Textual IRC Client: www.textualapp.com)
04:35:09skrylarjamesalbert: i've never used a websocket
04:46:59FromGitter<jamesalbert> it's all good, I can't seem to connect to this host using nim
04:48:04FromGitter<jamesalbert> python, bash connects fine, but not websocket
04:52:00*yglukhov joined #nim
04:56:05*yglukhov quit (Ping timeout: 240 seconds)
05:12:49*tinAndi joined #nim
05:18:18*tinAndi quit (Ping timeout: 240 seconds)
05:33:02*radagast quit (Quit: radagast)
05:38:38FromGitter<Varriount> @jamesalbert Have you inspected the packets being sent?
05:51:20*yglukhov joined #nim
05:55:48*yglukhov quit (Ping timeout: 240 seconds)
06:04:22*gokr joined #nim
06:25:11*cyraxjoe joined #nim
06:25:18*nsf joined #nim
06:38:47*yglukhov joined #nim
06:43:31*yglukhov quit (Ping timeout: 256 seconds)
06:51:10Araqjamesalbert: websockets don't work for me either -.-
07:43:48*c0ntribut0r quit (Ping timeout: 240 seconds)
07:44:55*c0ntribut0r joined #nim
07:45:28*xkapastel quit (Quit: Connection closed for inactivity)
08:00:41*c0ntribut0r quit (Read error: Connection reset by peer)
08:02:20*c0ntribut0r joined #nim
08:02:56*PMunch joined #nim
08:14:23*Vladar joined #nim
08:16:37*devdri joined #nim
08:17:15*devdri quit (Client Quit)
08:19:43*PMunch quit (Quit: Leaving)
08:21:19*PMunch joined #nim
08:25:29*yglukhov joined #nim
08:29:35*yglukhov quit (Ping timeout: 240 seconds)
08:41:48FromGitter<honewatson> @Araq Is there a Nim Software Foundation? Maybe you could get million to pay core team salaries from the pineapple fund?
08:42:35FromGitter<honewatson> theres still $50 million elft
08:45:50FromGitter<Bennyelg> :D
08:46:56PMunchI wonder how they choose how much the different causes get
08:50:10Araqno Foundation. seems to be much work to set one up.
08:57:44yunfanshould fsf spent the money now or hold for a while ?
08:57:50yunfanwaiting for the price rising :D
09:00:52FromGitter<andreaferretti> @Araq My worry - and I think other users will agree - is that when v1 is out most work will be done in the new runtime/v2 thing
09:01:11FromGitter<andreaferretti> While the very reason people are waiting for a v1 is to have a stable environment for a while
09:01:44FromGitter<andreaferretti> There should be at least a few years where v1 is promoted and made as stable as possible
09:01:44Araqwith the trunk based model bugfixes automatically land in 1.0.x too
09:02:15FromGitter<andreaferretti> Yes, but it's a trust issue - why bother writing libraries and contributing to the ecosystem using a GC
09:02:31FromGitter<andreaferretti> knowing that it all will need to be reworked with the new model
09:02:51FromGitter<andreaferretti> v1 is about the promise that work done today will not be wasted
09:03:08FromGitter<andreaferretti> starting v2 as soon as v1 is out is the opposite of that
09:03:29*gmpreussner quit (Ping timeout: 248 seconds)
09:03:55PMunchHow much of a rewrite would it be anyways?
09:04:07PMunchI saw you guys talking about it when I was on briefly yesterday
09:04:13FromGitter<alehander42> would there be a need to rework? I think most v1 code should be able to run correctly on v2, otherwise you're just writing a new language
09:04:59PMunchThat's the impression I've gotten as well
09:05:07FromGitter<andreaferretti> even if it does - which is unclear today given that the destructors thing is not well specified yet
09:05:12*gmpreussner joined #nim
09:05:18FromGitter<andreaferretti> it may have performance implications
09:05:34FromGitter<andreaferretti> just to give an example, I read from the RFC
09:05:49FromGitter<alehander42> if it's mostly "v2 is even faster if you write v2-aware code", that should be fine
09:05:56FromGitter<andreaferretti> `Since these additions introduce many more try statements, it's wise to base this work on the C++ codegen, not the pure C codegen. Otherwise it seems unrealistic to get competitive performance.`
09:06:04PMunchv2s GC changes will be mostly under the hood and apart from performance heuristics changing (which only really matters in high-performance applications) there shouldn't be many changes
09:06:11FromGitter<andreaferretti> Just this is not a change to be made lightly
09:06:29FromGitter<andreaferretti> Losing the C codegen is a big change for compatibility
09:06:50PMunchYeah I saw that as well, which is a bit disconcerting..
09:08:19miran_nice points, @andreaferretti!
09:10:09GitDisc<bahm> List comprehension is in the future module but not listed on the roadmap; is it still planned? If so, what needs to be done and how can I contribute? If not, what is an elegant alternative?
09:10:37Araqbahm: for loops as expressions would be better
09:11:14miran_as i said yesterday, after the release of v1.0, the focus should be on (bug fixes for) v1; working on v2 should be postponed and/or not a priority.
09:11:46Araqandreaferretti: I could only repeat my arguments. v2 is vaporware moreso than v1 is but we need to be allowed to do experiments
09:11:59FromGitter<andreaferretti> of course experimenting is good
09:12:10miran_otherwise, the current "i won't use nim until it hits v1" will be just transformed to "i won't use nim v1, i heard v2 is in the works, i'll wait for it"
09:12:36FromGitter<andreaferretti> it's just that the way things are phrased today it looks like the future of Nim is already tied to the destructor model
09:12:45PMunchSo what we should do is just stop talking about v2? :P
09:12:48FromGitter<andreaferretti> which means not experimenting
09:12:49Araqusers who don't want to use Nim always have good reasons for that
09:12:57FromGitter<andreaferretti> agreed
09:13:10Araqregardless of whether we have a plan for the future or not.
09:13:11FromGitter<andreaferretti> the problem is users that *do* want to use Nim :-)
09:13:20FromGitter<alehander42> after all I think Araq can do whatever he wants, that's his language, working on v2 seems cool, and it shouldn't scare people as far as v2 is compatible with v1
09:13:23miran_PMunch: or just focus the work on improving 1.x
09:13:41FromGitter<andreaferretti> Of course Araq can do whatever he likes
09:13:54AraqI don't understand why a clear vision for Nim can hurt it.
09:13:59PMunchYeah, but we already agreed that we should be allowed to experiment with "upcoming" features
09:14:10FromGitter<andreaferretti> It's just that all this focus on the new model right before hitting v1 is demoralizing
09:14:19miran_+1
09:14:21FromGitter<alehander42> but I think it should be mostly compatible(in some aspects) and we need people to work on v1 (I guess they can be also hired with bountysource?)
09:14:56Araq"all this focus" is mean. easily 80% of my time is spent on the hard bugfixes.
09:14:57miran_@alehander42: compatible new features should/could be part of 1.x
09:15:47FromGitter<andreaferretti> also, it seems like an admission of failure
09:15:55FromGitter<andreaferretti> yeah, we're going out with the v1 model
09:16:02FromGitter<andreaferretti> but it was not that good after all
09:16:08PMunchwasn't there some old computer comany that went out of business because the announced something like "The next version will be much faster than this one, and it's coming early next year!" so no-one bought their current product and they went out of business before they were able to release their next machine?
09:16:09FromGitter<andreaferretti> let us work something better in the meantime
09:16:12FromGitter<alehander42> of course, what I mean is "v2" doesn't have to mean "something scary which replaces v1" but "evolved version of v1"
09:16:25FromGitter<andreaferretti> not exactly encouraging
09:16:34PMunchThat's the danger of being a bit too open with your roadmap :P
09:16:54Araqthat's just the danger of a never ending release process.
09:17:22miran_PMunch: i see the danger of a roadmap which looks like: now: 1.0, next: 2.0
09:17:25Araqby the time v1 is out not even Araq wants it anymore, congratulations.
09:17:30FromGitter<alehander42> well, that can be also "v1 works quite well, but v2 should be even better at X and and at Y while still compatible", it's honestly a marketing problem, not a tech one
09:17:57PMunchAraq, that's true. And I support the way you work now. But for someone who haven't tried Nim before coming in here and hearing talk about a v2 before a v1 has even come out it might seem a bit unstable even in it's upcoming v1 version
09:18:25FromGitter<andreaferretti> the thing is, one would expect v2 to be marketed a few YEARS after v1 is out, it has been tried extensively and problems with it are clear
09:18:33miran_i don't see the danger of having: 1.0, 1.0.x (bugfixes), 1.1 (new features), 1.1.1 (bugfixes), 1.2, ..., 2.0 (lots of new and breaking stuff)
09:18:55PMunchmiran_, and I think that is "the plan"
09:19:46FromGitter<andreaferretti> @PMunch if that was the plan, the roadmap for v1.1 would be more clear than the on for v2
09:20:14miran_"one would expect v2 to be marketed a few YEARS after v1 is out, it has been tried extensively and problems with it are clear" --> this!!!
09:20:17PMunchI think people are just misunderstanding what the talk about v2 is. It's not the next version, it's just an umbrella for the stuff that won't be added to v1 (feature creep) but will probably, possibly, or maybe added to a future version (but not backported).
09:20:38AraqI don't see a need for a plan v1.1
09:20:50miran_Araq: that's a shame
09:20:54PMunchandreaferretti, problem is that the plan for v1.1 is probably "fix the bugs that crop up with v1"
09:21:04Araqv1.1 will add features. it's semantic versioning :-)
09:21:04FromGitter<andreaferretti> that is 1.0.x
09:21:22PMunchBy the nature of it there are no new and super-exiting features with a x.1 release
09:21:29PMunchOh right
09:21:41AraqI can tell you which features already. well no.
09:21:45PMunchI've gotten too used to calling Nim versions without the first number :P
09:21:59AraqI can tell you which will be in v2 and then can be made available for v1.1
09:22:12Araqthe ones that work and doesn't break things. ;-)
09:22:20PMunchExactly
09:22:34miran_Araq: so basically what you call "v2" is "devel"?
09:22:43PMunchKinda
09:22:49Araqor .experimental
09:22:53miran_and some of that "devel" will be in 1.1 or 1.2, and some will be in 2.0?
09:23:28PMunchv2 (as I understand it) is everything that works and makes the language better but can't be back-ported for compatability reasons
09:23:37Araqstuff is added to 2.0.x and made available to 1.1.x based on community feedback
09:24:01miran_if that's the case, calling it some other name than "v2" would be much clearer and would reduce the confusion
09:24:06Araqstuff is removed from 2.0.x should it not work.
09:24:16Araqyeah that's a very good point.
09:25:43Araqand if v2 ends up as "useful subset of Nim without GC and depending on the C++ backend"
09:26:43Araqthat's a good result for me. libraries can be written to be compatible with it or not. it splits the package landscape though. tough.
09:26:57*yglukhov joined #nim
09:27:32FromGitter<alehander42> those libs would be still compatible with normal Nim?
09:29:01FromGitter<alehander42> then it doesn't seem as such a big problem to me, it's a bit like rust without stdlib/C without glibc: e.g. if you write something specific as a kernel / optimized server etc, you know how to deal with it
09:29:41Araqwell the library problem is a big one. libraries are more important than language features.
09:30:09Araqa Nim without stdlib is useful enough for me, but I doubt it will "sell"
09:30:43euantorThere are already packages that don't work as it stands - look at the issues reported yesterday with glfw causing problems
09:30:58euantorNo matter what happens, you'll have unmaintained and broken libraries
09:31:11*yglukhov quit (Ping timeout: 248 seconds)
09:31:54Araqwiser is to make "v2" support all of Nim with different performance characteristics.
09:32:13Araq(ref becomes atomic RC'ing plus a cycle collector?)
09:32:56*floppydh joined #nim
09:33:04Araqeuantor: they are unmaintained because Nim is a moving target.
09:33:55Araqof course this problem will always be with us
09:34:01euantorpeople also get busy and stop maintaining packages. It happens in other "stable" languages too so it's going to happen no matter what
09:34:11Araqof course.
09:36:42Araq"now that v1 is released all our efforts are spent on bug fixes"
09:36:56PMunchHmm, maybe I should go through my packages and test if they still work :P
09:37:00AraqI can understand why people love that
09:37:14*yglukhov joined #nim
09:37:28Araqbut it's more like "now that v1 is released we can have some holidays" :-)
09:38:15Araqand what do you do when you have holidays? work on experimental risky features, what else...
09:38:19*yglukhov quit (Remote host closed the connection)
09:38:23Araq;-)
09:38:34*yglukhov joined #nim
09:39:03euantorI haven't yet had a release break anything beyond repair, so I'm happy with the direction things are heading so far :)
09:40:13GitDisc<bahm> I'm not sure I understand the full extent of the changes planned for v2, but it sounds like the design goals are different enough to warrant forking the project and calling it something else (Nim++ ^^). Of course, that's only really true if both v1 and v2 continue to be maintained/developed as with Python 2/3.
09:41:03PMunchOh please, let's not do a Python 2/3 thing..
09:41:53AraqC++11, C++14, C++17, Python 2/3, Java 8.
09:42:05PMunchIt would be a shame to lose the C backend though..
09:42:14FromGitter<andreaferretti> of course each language has versions
09:42:20FromGitter<gogolxdong> Did you release 1.0?
09:42:33FromGitter<andreaferretti> it's just that... well, usually they take some more time before announcing a new one :-)
09:43:13FromGitter<amvtek> Hi Guys, just my own 2 cents for this v2 discussion thing.
09:45:40*c0ntribut0r quit (Ping timeout: 252 seconds)
09:45:57PMunchgogolxdong, not yet
09:46:36FromGitter<amvtek> 1) Call v2 --> experimental so as not to decrease v1 value.
09:46:52*c0ntribut0r joined #nim
09:47:22FromGitter<amvtek> 1) Keep the C backend
09:51:14arnetheduckthere's https://github.com/nim-lang/Nim/pull/5698 ;)
09:51:34FromGitter<amvtek> Right now, it looks to me we focus the effort on equalling competitor language (eg Rust) without explaining to the uninitiateds where we may already be better.
09:51:36arnetheduckis there a summary of the drop-c-backend discussion somewhere?
09:52:28PMuncharnetheduck, I don't think it's about dropping C per. se
09:53:18PMunchBut Araq has stated that with the new no-GC stuff planned for v2(so still far off) might make the C-backend underperform because it uses try-catch much more often
09:53:49Araqyeah, it's about C++'s "zero cost" exception handling
09:54:00Araqwe can get the same with the LLVM backend.
09:54:47FromGitter<amvtek> I see lot of value in what Nim is putting together, but as a new comer I have difficulties appreciating where it stands out.
09:55:34PMunchamvtek, for me what got me was probably the macro system
09:56:27PMunchTo be able to easily wrap complex functionality into easily used interfaces is a very powerful idea
09:56:28arnetheduckI've been meaning to ask that btw.. is exceptions really the way to go? was thinking about implementing dwarf excepts for nlvm, but that's still far from zero cost (binary sizes, missed optimizations etc)
09:57:00PMunchPlus being able to write something with flexibility and ease (as with a scripting language) but still reap the benefit of a compiled language
09:57:36FromGitter<amvtek> We need to take what currently exists and decide which features are putting the language apart from the rest.
09:57:36PMunchHow does C++ make "zero-cost" exceptions anyways?
09:58:28arnetheduckthey're not zero cost.. they just cost a little less on the common, non-exception path
09:58:56Araqa "little"? setjmp needs to copy all register contents
09:59:09arnetheduckyeah, there's that
09:59:28Araqplus we need to make locals "volatile" because C is braindead
09:59:59arnetheduckthat too
10:00:31AraqI'm currently avoiding 'try' statements as they are so expensive
10:00:33FromGitter<amvtek> As for me my top 3 are 1. portability (C backend! and also Javascript) 2. Type system 3. Built in Async
10:01:23Araqarnetheduck: Microsoft did large scale benchmarks.
10:01:51Araqexceptions implemented as 'if (error) goto returnBlock' vs
10:02:05Araqexceptions as C++ does it.
10:02:28AraqC++-style was 5-10% faster
10:02:50Araqdue to better icache behaviour
10:03:10Araqeven faster is of course 'quit' based error handling
10:03:27livcdI am surprised there's no malware written in Nim floating around. I bet it's a matter of time to see Mirai rewritten in Nim
10:03:32Araqbut nobody votes for that one.
10:03:33arnetheduckthat's interesting.. ultimately, I would get rid of them for readability reasons however.. you never know what error you're gonna get which is surprising
10:04:10FromGitter<amvtek> Where I believe the language is great but I am unsure how it stands compare to the competition is : 1. Memory safety (per thread heap), 2. GC approach 3. Macro system
10:04:41arnetheduckreadability = ability to reason about the code
10:04:54Araqthey are tracked though.
10:05:07Araqread the docs and see what what can throw
10:05:27Araqor use proc main() {.raises: [].} and see where you get
10:05:44FromGitter<amvtek> 1) Memory safety (? what are the plus or minus compare to Rust)
10:06:37Araqmore of a theoretical concern right now. Nim has loopholes, we know how to fix them, we will fix them.
10:07:00Araqbut the crashes I spend the nights with are all caused by something else
10:07:24FromGitter<amvtek> 1) GC approach (? plus or minus compare to Golang, D and maybe Erlang)
10:08:17FromGitter<amvtek> Macro system (? plus or minus compare to Rust & Lisp)
10:08:50AraqGC approach. many dislike the thread local heaps but it's a reasonable compromise.
10:09:32*skelett quit (Ping timeout: 256 seconds)
10:09:59Araqv2/experimental will be much better at memory sharing.
10:10:06arnetheduckand regarding if (error)... most embedded c++ development is done without exceptions, because of the bloat they cause
10:10:42Araqmacro system better than anything else IMHO with more improvements yet to come. (semityped parameters)
10:10:57arnetheduckmoving to c++ to use exceptions seems.. funny ;)
10:11:25arnetheduckyou could probably generate c code with zero cost exceptions as well
10:11:32Araqhow so?
10:12:40Araqarnetheduck: as I said, "even faster is of course 'quit' based error handling"
10:13:31FromGitter<amvtek> We shall clarify where we are different, where we believe we stand out and maybe vote on what are the preferred features
10:15:59*yglukhov quit (Remote host closed the connection)
10:16:34*yglukhov joined #nim
10:16:44*skelett joined #nim
10:16:44*c0ntribut0r quit (Read error: Connection reset by peer)
10:17:00*c0ntribut0r joined #nim
10:19:38Araqnot sure about that. these comparisons miss the point.
10:20:52*yglukhov quit (Ping timeout: 256 seconds)
10:32:02*mfx joined #nim
10:33:40arnetheduckcan do `quit` for a subset of things, but you won't do that for parsing of integers from the network for example
10:34:47*yglukhov joined #nim
10:35:13arnetheduckyou'll need some way to convey errors that can be handled.. and what do you pick, in a language that has exceptions and already uses them in std lib?
10:36:53*radagast joined #nim
10:38:13FromGitter<tim-st> anyone got this error before: `???(???, 0) Error: identifier expected, but found ''` ?
10:38:46PMunchHmm, on the machine level why isn't a raise just implemented as a goto and catch populates a region predetermined for errors?
10:38:56PMunchOr rather for error handling
10:41:04arnetheduckthat's what it is.. it's the part that establishes where the goto should go to that differs.. with setjmp, you prepare it on try entry, with dwarf, you essentially walk a stack (similar to a backtrace) based on some static data stashed away elsewhere
10:42:02arnetheduckit gets complicated because exceptions may traverse multiple functions or be nested etc, which makes for a very complex jump graph
10:42:32PMunchHmm, that makes sense..
10:42:38arnetheduckhard for the compiler to reason about when it's generating code, and hard for the programmer to reason about when they're reading
10:45:48arnetheduckAraq, do you have a link to that MS study?
10:46:09*mfx quit (Quit: Leaving)
10:52:52arnetheduckhttp://llvm.org/docs/CodingStandards.html#do-not-use-rtti-or-exceptions - even compiler devs shun them
10:53:42*endragor joined #nim
10:57:01FromGitter<tim-st> I found the line now I wrote `var number: uint8: 1` instead of `var number: uint8 = 1` and the compiler couldnt trace the line
10:58:23FromGitter<tim-st> https://play.nim-lang.org/?gist=e548c8a6e6720e17c983c27ed46c6d96
11:00:32*arnetheduck quit (Ping timeout: 256 seconds)
11:05:24*arnetheduck joined #nim
11:05:30PMunchHuh, that is a really strange bug tim-st :P
11:06:07PMunchBy the way, you can use var number = 1'u8 as another option
11:06:45Araqhttp://joeduffyblog.com/2016/02/07/the-error-model/
11:14:49FromGitter<matrixbot> `ratherAnonymous` what's the most recent verion of nim as of now?
11:15:03FromGitter<matrixbot> `ratherAnonymous` An article says "The library requires Nim version 0.18.0 or newer, which you can get here: https://nim-lang.org/install.html"
11:15:29dom96andreaferretti's fears reflect mine
11:15:32FromGitter<matrixbot> `ratherAnonymous` I compiled it from github, but my version is 0.17.3
11:16:00dom96a trunk-based development model will make people fear the incoming v2 version even more
11:16:19dom96ratherAnonymous: 0.17.3 is effectively 0.18.0
11:16:28FromGitter<tim-st> @Araq is this not an error? Companies will keep their hands away from nimlang, if they know, that in some cases it takes the developer 15minutes to find out the line where the error came from
11:17:56*tinAndi joined #nim
11:18:40*c0ntribut0r quit (Ping timeout: 256 seconds)
11:19:35*c0ntribut0r joined #nim
11:21:53Araq„The result was the best possible configuration of the above code quality attributes:
11:21:54AraqNo calling convention impact.
11:21:54AraqNo peanut butter associated with wrapping return values and caller branching.
11:21:55AraqAll throwing functions were known in the type system, enabling more flexible code motion.
11:21:57AraqAll throwing functions were known in the type system, giving us novel EH optimizations, like turning try/finally blocks into straightline code when the try could not throw.
11:21:59AraqA nice accident of our model was that we could have compiled it with either return codes or exceptions. Thanks to this, we actually did the experiment, to see what the impact was to our system’s size and speed. The exceptions-based system ended up being roughly 7% smaller and 4% faster on some key benchmarks.
11:22:01AraqAt the end, what we ended up with was the most robust error model I’ve ever used, and certainly the most performant one.“
11:22:03Araq"http://joeduffyblog.com/2015/12/19/safe-native-code/
11:22:53Araqtim-st: yes, Nim is doomed. because once in your lifetime it reported question marks for an obscure rare error
11:23:18*tinAndi quit (Ping timeout: 240 seconds)
11:23:56FromGitter<tim-st> Ok, but without reading this article, I know that an algorithm exists (the same that I used for error tracking) to find out the line, but it's true that it's rare (I got this error for the first time)
11:24:25Araqtim-st: the articles are in response to arnetheduck's question.
11:24:33FromGitter<tim-st> ok^^
11:24:35Araqand have nothing to do with your bad error message.
11:24:45Araqwhich should be easy to fix anyway
11:27:16FromGitter<mratsim> I think Crystal, D and Nim need to release a common PR: "GC is not slow (if done right)": every comment on the quora thread is about GC: https://news.ycombinator.com/item?id=16270841
11:29:04Araqyes, it is not slow. it uses more memory though and turns bugs into logical memory leaks.
11:29:44Araqand nobody ever did any study on this.
11:29:56Araqmaybe these are easier to fix than crashes, maybe not.
11:30:27FromGitter<matrixbot> `ratherAnonymous` D didn't replace c++ cause noone wants to rewrite all the libraries.
11:30:42FromGitter<matrixbot> `ratherAnonymous` Nim can acces those libraries -> nim will replace C++
11:30:45FromGitter<matrixbot> `ratherAnonymous` :D
11:38:21radagastD has FFI too, you know
11:39:27radagastAnyways. It appears that proc remove() for SinglyLinkedList is missing from the lists module https://nim-lang.org/docs/lists.html#remove,DoublyLinkedList[T],DoublyLinkedNode[T]
11:39:36radagastIs it intentional?
11:47:26FromGitter<matrixbot> `ratherAnonymous` HELP: I'm trying to download a nimble package, but I get the following error Hint: Nimble does its best to find Nim's standard library, sometimes this fails. You can set the environment variable NIM_LIB_PREFIX to where Nim's `lib` directory is located as a workaround. See https://github.com/nim-lang/nimble#troubleshooting for more info.
11:47:50FromGitter<matrixbot> `ratherAnonymous` I set the environment variable to this "export NIM_LIB_PREFIX=$PATH:$HOME/Nim/lib/"
11:48:38FromGitter<matrixbot> `ratherAnonymous` but I still get the same message
11:51:18Araqradagast: isn't it called 'delete' instead?
11:52:44PMunchratherAnonymous, try with "export NIM_LIB_PREFIX=$HOME/Nim/lib"
11:53:10PMunchDon't think it searches multiple paths as it's only looking for the stdlib
11:53:52FromGitter<matrixbot> `ratherAnonymous` I never had to fiddle with environment variables yet.
11:54:04FromGitter<matrixbot> `ratherAnonymous` GNU+Linux always took care of that. lol
11:54:21radagastAraq: I may be looking at the wrong module but delete is for seqs, doesn't seem to exist in the module lists
11:55:09PMunchWhy have you cloned Nim yourself by the way?
11:55:26Araqradagast: https://github.com/nim-lang/Nim/blob/master/lib/pure/collections/lists.nim#L262
11:55:29Araqit exists.
11:55:38Araqbut there is also compiler/lists
11:55:47Araqwhich is what the compiler uses
11:56:50radagast> https://github.com/nim-lang/Nim/blob/master/lib/pure/collections/lists.nim#L262
11:56:56radagastAccepts doublylinkedlists
11:57:07radagastnot slists
12:00:17FromGitter<matrixbot> `ratherAnonymous` On my system nimble still doesn't manage to find "system.nim" in the lib directory of the git-repository I checked out. ⏎ I now used: export NIM_LIB_PREFIX=$HOME/Nim/lib/
12:02:09*yglukhov quit (Remote host closed the connection)
12:02:21*Snircle joined #nim
12:02:29FromGitter<matrixbot> `ratherAnonymous` [user@user lib]$ nimble install godot ⏎ ⏎ ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=5a71b055e217167e2c23b421]
12:02:44*yglukhov joined #nim
12:03:39*yglukhov quit (Remote host closed the connection)
12:03:51*yglukhov joined #nim
12:12:29FromGitter<dom96> ratherAnonymous: `which nim`?
12:12:33Araqinstall nimble via 'koch nimble'?
12:12:54FromGitter<dom96> Nice to see my brand new error message works well though :)
12:13:10Araqradagast: maybe because singly linked list don't support O(1) removal.
12:14:17FromGitter<dom96> my bet is that you have installed Nim into /usr/bin (or at least have done so previously)
12:16:58FromGitter<matrixbot> `ratherAnonymous` I'm basically following the instructions from this site: http://howistart.org/posts/nim/1/index.html
12:16:59*dddddd joined #nim
12:19:57radagastAraq: In https://github.com/nim-lang/Nim/blob/master/lib/pure/collections/lists.nim#L262, why aren't we adding `return` to the end of each if statement prevent further condition checking?
12:22:57FromGitter<matrixbot> `ratherAnonymous` I fixed my problem. I have no clue, what I did
12:23:01FromGitter<matrixbot> `ratherAnonymous` sorry for bothering you
12:23:01FromGitter<matrixbot> `ratherAnonymous` wtf
12:25:00*BitPuffin joined #nim
12:32:44*arnetheduck quit (Quit: Leaving)
12:32:58*arnetheduck joined #nim
12:37:05Araqradagast: because that would be wrong?
12:37:15Araqthe node can the first and last at the same time
12:45:49*dmi0 joined #nim
12:49:19*leorize joined #nim
12:56:58arnetheduckAraq, thanks.. looks like an interesting read
13:03:04*yglukhov quit (Remote host closed the connection)
13:03:41*yglukhov joined #nim
13:07:55*yglukhov quit (Ping timeout: 256 seconds)
13:19:27*fvs left #nim ("ERC (IRC client for Emacs 25.3.1)")
13:20:57*Yardanico joined #nim
13:21:30leorizehi
13:21:52Yardanicohello
13:23:02leorizei'm porting Nim to Haiku
13:23:17leorizehowever, I'm hitting a small issue with tests/dll/client
13:24:05Yardanicoah, so you want to add Haiku as a first-class OS for nim?
13:24:09Yardanicolike linux/macos/windows?
13:24:26YardanicoI'm just asking because it should already work
13:24:54leorizeI'm afraid I don't have much time to keep haiku being a first-class OS
13:25:12Yardanicowell I mean it's already is
13:25:20Yardanicohttps://github.com/nim-lang/Nim/search?utf8=%E2%9C%93&q=haiku&type=
13:25:39euantorPosting the issue you're hitting and any erro message(s) might help
13:25:50Yardanicomaybe you're using haiku with gcc 2?
13:25:53leorizethe support is quite outdated comparing to what we support nowadays
13:25:59YardanicoOH
13:26:02leorizei'm using x86_64
13:26:03Yardanico(sorry for caps)
13:26:43leorizeDebugging shows that the test crashed due to NimTV_ being set to null
13:28:17leorizeI traced using the C sources and found that initThreadVarsEmulation is a no-op unless you don't use nim rtl
13:28:59leorizewhich leads to the embedded NimTV_ GetThreadLocalVars to return NULL
13:29:25leorizecausing crash in initStackBottomWith()
13:32:41leorizeis initThreadVarsEmulation supposed to be run by libnimrtl?
13:33:14Araqgood question.
13:34:10Araqcan't you give Haiku real thread local storage?
13:37:08leorizeI think we do have tls support
13:37:35Araqso don't enable the TLS emulation
13:37:58leorizeexcept passing tlsEmulation:off doesn't change the results
13:40:18leorizeoops, I forgot to remove the old files before re-running the tests
13:41:19leorizetks for help
13:43:18*yglukhov joined #nim
13:56:03*leorize quit (Quit: WeeChat 2.0.1)
14:31:07*Jesin quit (Quit: Leaving)
14:59:13*dmi0 quit (Remote host closed the connection)
15:21:18*c0ntribut0r quit (Ping timeout: 240 seconds)
15:21:53*c0ntribut0r joined #nim
15:22:04*Snircle quit (Quit: Textual IRC Client: www.textualapp.com)
15:24:46*Jesin joined #nim
15:29:04*Jesin quit (Remote host closed the connection)
15:30:31FromGitter<mratsim> Did someone use Halide lang for image processing? How was your experience? I'm considering writing a wrapper for it as an alternative to OpenCV.
15:30:55*c0ntribut0r quit (Ping timeout: 260 seconds)
15:31:59*endragor quit (Remote host closed the connection)
15:32:18*c0ntribut0r joined #nim
15:36:07*endragor joined #nim
15:37:27*nsf quit (Quit: WeeChat 2.0.1)
15:40:27*endragor quit (Ping timeout: 240 seconds)
15:45:12*solitudesf joined #nim
15:46:48*arnetheduck quit (Ping timeout: 240 seconds)
15:54:21*Jesin joined #nim
16:01:27*c0ntribut0r quit (Read error: Connection reset by peer)
16:02:57*c0ntribut0r joined #nim
16:02:58*floppydh quit (Quit: WeeChat 2.0.1)
16:06:52*PMunch quit (Quit: Leaving)
16:14:29trincyoloHi all, I'm working with someone else's NIM server and attempting to dockerise it. It all works except of the last stage: running the binary. So I just `exec` into the container and run it with `./binary` and it works. It should work ... was just wondering if this is something nim specific
16:15:22Yardanicotrincyolo, well it shouldn't be nim specific
16:15:38Yardanicobecause nim produces normal binaries
16:15:50Yardanico(well, because gcc does)
16:16:21trincyolookay thanks. docker just hangs at `Attaching to my_nim_bin
16:17:26Yardanicotrincyolo, I thin this is docker related, search for in on google, there seems to be a lot of people facing the same issue
16:18:24Yardanico*think
16:19:23trincyolothanks I am. it's just strange that my 7 other docker-compose containers don't have the issue
16:21:16*c0ntribut0r quit (Ping timeout: 256 seconds)
16:24:36*c0ntribut0r joined #nim
16:28:45*miran joined #nim
16:34:39Yardanicohooray - little, but useful! https://github.com/nim-lang/Nim/commit/60c7bbc8b7e75951b952a34051a8445592a68fc4
16:37:52*yglukhov quit (Remote host closed the connection)
16:38:00Yardanico(it now works in vscode with nim plugin if you're wondering)
16:41:10*c0ntribut0r quit (Ping timeout: 240 seconds)
16:41:43*xkapastel joined #nim
16:42:28*c0ntribut0r joined #nim
16:43:44*yglukhov joined #nim
16:48:09*yglukhov quit (Ping timeout: 256 seconds)
16:48:48*Trustable joined #nim
17:05:50*tinAndi joined #nim
17:11:18*tinAndi quit (Ping timeout: 240 seconds)
17:13:27FromGitter<tim-st> Nice!
17:17:04FromGitter<tim-st> When I increment a `var int` inside try except once and on the second increment it excepts, will the variable be incremented by one if passed as argument and the exception is caught?
17:19:08FromGitter<tim-st> https://play.nim-lang.org/?gist=b9c86211532c5e894f69cda0d2dace98
17:22:13miranit seems that it will be increased
17:22:35mirani've run it with: `var i = 2; skip("bla'", i); echo i`
17:23:04Yardanicowell it would be hard to rollback every operation otherwise
17:24:19FromGitter<tim-st> ok, thanks!
17:24:26miranbtw, you are aware that in the example`index+1` and `index+2` are *two* numbers apart?
17:25:17FromGitter<tim-st> Just saw, there is a bug thanks!
17:25:28FromGitter<tim-st> the second one must be +1 too
17:25:42miran;)
17:32:06*yglukhov joined #nim
17:34:12*PMunch joined #nim
17:36:33*yglukhov quit (Ping timeout: 248 seconds)
17:55:39*tinAndi joined #nim
17:57:25*yglukhov joined #nim
17:58:55*fvs joined #nim
18:01:03*tinAndi quit (Ping timeout: 248 seconds)
18:06:08*gokr left #nim (#nim)
18:07:28*yglukhov quit (Read error: Connection reset by peer)
18:08:04*yglukhov joined #nim
18:13:16*smt joined #nim
18:14:47*Trustable quit (Remote host closed the connection)
18:25:07*devdri joined #nim
18:27:49*devdri quit (Client Quit)
18:37:29*fvs left #nim ("ERC (IRC client for Emacs 25.3.1)")
18:46:52*nsf joined #nim
19:00:58*vest joined #nim
19:01:48GitDisc<treeform> Hey dom, you recently changed newSelector*[T] to have the [T], but I don't know what I should stuck into the T to make it work? Do you have an example?
19:02:57vestwhat is the "nim way" of creating a copy of a tuple? I have a type defined which declares my tuple's fields and I'd like to create a copy of a var of that type such that the new var when modified will not modify the original
19:06:29Yardanicotreeform: it means that newSelector is generic
19:08:35GitDisc<treeform> yes but what do I give it to make it work newSelector[int] newSelector[Socket] newSelector[SelectKey] ... I am just confused?
19:08:50PMunchSomething like that yes
19:08:58GitDisc<treeform> newSelector[KPoll] ?
19:09:08GitDisc<treeform> I am not sure what generic would make it work?
19:09:22PMunchBut if it's on the form newSelector[T](input: T) then it should be able to automatically detect it if you do newSelector("Hello world")
19:09:29PMunchAs it knows that "Hello world" is a string
19:10:14GitDisc<treeform> I did not know that. I have a some code that uses newSelector, but now it does not work. I am just trying to fix it.
19:11:21GitDisc<treeform> this is the commit that made the changes: https://github.com/nim-lang/Nim/pull/6585
19:11:33PMunchAnd what does your code look like?
19:12:20GitDisc<treeform> https://gist.github.com/treeform/636248572f783c128b7bf41fd50b1198
19:12:21PMunchWait, according to that it was always [T]
19:13:23PMunchJust change it to newSelector[TheType]()
19:13:33GitDisc<treeform> it looks like its supposed to be [int]
19:13:48GitDisc<treeform> the tests use int: https://github.com/nim-lang/Nim/blob/85ac3130aa80e784fcd84c5a38122c61f4a8860d/tests/async/tioselectors.nim#L36
19:15:25*vest quit (Quit: Page closed)
19:15:48dom96treeform: if you want to highlight me then use my full name, 'dom' isn't enough
19:16:16GitDisc<treeform> Its fine I was stuck, but when i ask for help, i get unstuck!
19:16:23GitDisc<treeform> works every time 😃
19:16:29dom96The T is custom user data IIRC
19:16:38dom96So 'void' might work if you don't need it
19:16:42GitDisc<treeform> It looks like passing [int] works?
19:16:50dom96you can pass whatever you want
19:16:50GitDisc<treeform> oh void i'll try that
19:16:53dom96it's your own data
19:16:59dom96that you will get back in poll
19:17:30GitDisc<treeform> does not look like void works
19:17:53dom96that should be fixed
19:18:07dom96but putting some dummy type like 'int' is fine too
19:18:18*yglukhov quit (Remote host closed the connection)
19:18:34GitDisc<treeform> yeah i think so
19:18:47GitDisc<treeform> i think the issue is that `registerHandle` takes 3 values and you can't pass in type void?
19:19:00GitDisc<treeform> you probably need a 2nd registerHandle that takes only 2 to and makes void work?
19:19:02*yglukhov joined #nim
19:19:18dom96yeah, maybe
19:19:42dom96I bet you'll end up needing this T eventually anyway :)
19:20:04GitDisc<treeform> you are probably right
19:20:48dom96In case you need more examples, take a look at my HTTP server https://github.com/dom96/httpbeast
19:22:57GitDisc<treeform> I see thanks. I could not find examples on the newSelector[T] everyone used old newSelector() on the web. i will use yours.
19:26:06dom96what are you working on? :)
19:30:04*yglukhov quit (Remote host closed the connection)
19:31:55*icebattle joined #nim
19:35:43PMunchHmm, re(r"\s*\".*\"\s*") complains that: "(74, 52) Error: invalid character constant"
19:37:31dom96you need to escape the "
19:37:34dom96by doubling it
19:37:38dom96that's how raw strings work
19:37:53dom96but that's redundant, re"..." is the same as re(r"...")
19:38:16PMunchThat was a simplification, I'm passing that r"" around a bit
19:38:38GitDisc<treeform> dom96, I am working on internal data science tools.
19:39:22dom96huh, and you're using selectors?
19:39:44PMunchAh, that worked dom96. My Vim Nim colour coding isn't quite correct :P
19:39:52PMunchSo it looked like a valid string in the editor
19:39:57GitDisc<treeform> i am trying to use websockets, so that it can crunch numbers and return the result to an js front end.
19:40:10GitDisc<treeform> i am trying to use websockets, so that it can crunch numbers and return the result to a js front end.
19:41:43GitDisc<treeform> so far I been using polling were I hit the endpoint and "go are you ready yet?" but if I do that too much Chrome throttles and some pops up "this tab is bad, lets kill it"
19:42:38skrylarthe last i ever derped with websockets is back when Seaside was new and they had that Comet module everyone was all proud of
19:43:10skrylaris it really that big of a pain in the ass?
19:43:53GitDisc<treeform> I love websockets. REST should die.
19:44:59skrylari don't see much wrong with rest
19:46:54*solitudesf quit (Ping timeout: 268 seconds)
19:47:00skrylarPlumber was an interesting case for RPC. You shove text down a special text pipe and listeners do regex matches on it. And that's how Plan9 did inter process communication. Seemed to work well and was extremely straight forward. rest over HTTP/1.1 is just slightly more crufty than that
19:47:41*solitudesf joined #nim
19:47:56skrylarREST HTTP/1.1, STOMP and Beanstalk are probably some of the simplest ways of brokering requests /shrug
19:49:32PMunchHmm, is there a generic way to write a "combine" proc for something like: (((string, string), string), string)
19:50:08PMunchAnd by generic I mean should handle (string, string), ((string, string), string), (((string, string), string), string) etc.
19:52:04skrylarsounds like some of the append/glue functions from haskell
19:54:12skrylarPMunch, if its all at compile time, you can probably get away with a function for the tuples and another for single values, and then do it recursively
19:54:23skrylarwell probably runtime too
20:00:40PMunchHmm, that might work
20:03:03PMunchYup
20:03:13*yglukhov joined #nim
20:03:16PMunchproc combine(t: tuple[f1, f2: string]): string = t.f1 & t.f2
20:03:22PMunchproc combine[T](t: tuple[f1: T, f2: string]): string = t.f1.combine() & t.f2
20:03:27PMunchWorks like a charm
20:06:41*Yardanico quit (Remote host closed the connection)
20:10:30skrylarthe downside is that implementation is going to have the painter's problem
20:10:44skrylarex. concatting to a concat instead of building up a buffer
20:11:01PMunchYeah, it'll be fine for this though
20:17:47*ipjk joined #nim
20:29:39*yglukhov quit (Remote host closed the connection)
20:32:32skrylarwonder if there is a super gc someone published
20:32:48skrylari've seen claims that its 'solved' now, something about generational gcs apparently
20:34:07*yglukhov joined #nim
20:34:45Araq"solved" in what sense?
20:35:36AraqI've worked with a hard realtime Gc with pause times in the nano seconds.
20:35:56Araqwas a commercial JVM.
20:36:11skrylarhttps://www.eidos.ic.i.u-tokyo.ac.jp/~tau/lecture/programming_languages/presentations/2017/papers/ismm17-main18.pdf hmmm
20:36:42Araqminimum RAM requirements were 20MB, too much for tiny micro controllers
20:37:18Araqplus it only solves pause times, not provable bounded memory usages which are as important.
20:37:35Araqa most impressible deadend if you ask me.
20:37:55skrylarthe best way to manage garbage is not to have garbage, of course
20:38:23Araqit's not the "best" vs "worse", you can't prove this shit.
20:38:37Araqit's "tedious, slow development" vs "impossible"
20:39:16skrylarat the moment i'm just looking at the incremental ones
20:39:50skrylarfro mprior tinkering with lisps it seems that having a GC allows you to do some more aggressive things with codegen, but then you end up paying for the collection /somewhere/
20:39:55*Jesin quit (Ping timeout: 256 seconds)
20:39:59Araqit also didn't sell well tbh. people don't need hard realtime GCs. if you do hard realtime, it's all about provably correct stuff.
20:40:44skrylaryea tech is hard to sell
20:42:10skrylarhacking on a toy VM at the moment, fishing around to deal with threads
20:42:23skrylarseemingly everyone just throws their hands up and goes the global interpreter lock metho
20:43:22Araqgc:v2 is an incremental M&S GC for Nim
20:43:37skrylarincrementals are pretty good
20:43:57Araqit's actually all kind of stupid :-)
20:43:59skrylarhaven't decided on stop-the-thread or separate heaps
20:44:19Araqlol I've grown to dislike GCs
20:44:34*BitPuffin quit (Remote host closed the connection)
20:45:07Araqincremental GC: "we don't pause the mutator for long but also cannot free anything until we marked the full heap"
20:45:15Araq- "yeah, I'll pass"
20:45:56*skrylar_ joined #nim
20:46:42Araqgenerational GC: "let's assume your objects die young..." - "I just optimized my code to avoid temporary allocations..."
20:47:25Araqrefcounting GC: "you don't have cycles in there now, do you?" - "but, OOP!"
20:48:36Araqcopying GC: "you don't use large objects, right? these will be expensive to copy for me, introducing all the problems I thought I could avoid"
20:49:11Araq- "er, I optimized my data for the caches, only large array are left in my code"
20:50:14dom96hah
20:50:18dom96This should be a blog post
20:50:33dom96Bonus points if you could draw different GC types as little cute characters
20:52:49*skrylar_ quit (Ping timeout: 248 seconds)
20:53:07*Jesin joined #nim
20:54:08*c0ntribut0r quit (Ping timeout: 276 seconds)
20:55:29Araqmaybe it should be a comic strip
20:56:33*yglukhov quit (Remote host closed the connection)
21:05:24GitDisc<treeform> I would love to see GC blog post.
21:09:01*yglukhov joined #nim
21:14:13*nsf quit (Quit: WeeChat 2.0.1)
21:19:08PMunchYeah, just a GC blogpost would be really neat
21:19:17*Trustable joined #nim
21:21:04*devdri joined #nim
21:23:25shashlickhey guys, know it's just been a day but am curious what we need to do to close on the branching vs trunking topic
21:24:19PMunchThey talked about it earlier today as well shashlick
21:28:10PMunchWoo, my combinatorial parser appears to sorta kinda work
21:30:43*miran quit (Quit: Konversation terminated!)
21:30:51shashlicki went thru that, only thing I saw was the concern that v2 will be distracting and that there's no clear roadmap for 1.1
21:31:05*Vladar quit (Quit: Leaving)
21:32:42shashlickI don't agree with v2 being a distraction, someone needs to think about the future and it might as well be the creator of Nim. almost everyone else can focus on 1.x and bugfixes
21:37:43*PMunch quit (Quit: leaving)
21:47:55*Trustable quit (Remote host closed the connection)
22:18:57GitDisc<treeform> when i do `let things = foo.bar.baz.things` where things is a seq, will it copy it or just alias it? I just don't want to type `foo.bar.baz.things` how would i do it?
22:19:19GitDisc<treeform> You know without any performance issues?
22:20:48*dddddd quit (Ping timeout: 240 seconds)
22:23:00*dddddd joined #nim
22:26:51*solitudesf quit (Ping timeout: 246 seconds)
22:29:48Araqcurrently the 'let' does not copy
22:30:24GitDisc<treeform> but it might in the future?
22:31:34dom96You can use a `template things = foo.bar.baz.things` if you want to guarantee it won't be copied
22:32:43*Snircle joined #nim
22:38:15GitDisc<treeform> oh
22:38:25GitDisc<treeform> thanks
22:40:04FromGitter<honewatson> anyone know of a file watcher for nim?
22:40:43FromGitter<honewatson> watch for file changes >> run command
22:41:18FromGitter<Quelklef> no idea but google turned up: https://github.com/3dicc/Urhonimo/blob/master/modules/io/filewatcher.nim
22:41:35FromGitter<Quelklef> Oh, hey, there's https://nim-lang.org/docs/fsmonitor.html
22:43:21FromGitter<honewatson> thanks I was searching with nimble
22:45:05FromGitter<honewatson> hmmm fsmonitor only works in linux where as I need cross platform and the other requires the Urho3D game engine as a dependency
22:46:00dom96honewatson: you could give wrapping the windows file watching API a go
22:47:08dom96then extend fsmonitor to support it
22:47:13dom96I can give you pointers if you'd like
22:48:41GitDisc<treeform> What is the best way to have shared cache between multiple threads (and cores) in nim?
22:49:29GitDisc<treeform> i am fine with using locks and never freeing it...
22:50:36AraqSharedTable[]
22:52:00GitDisc<treeform> did not know what was there
22:52:01GitDisc<treeform> looking
22:58:20FromGitter<honewatson> thanks @dom96 windows is not a strong point for me that is why I would prefer something out of the box. fsmonitor.nim doesn't appear to be in the stdlib any more
22:58:32*MJCaley joined #nim
23:02:57dom96I guess somebody removed it without creating a Nimble package for it :\
23:02:59*FromGitter quit (Remote host closed the connection)
23:02:59*oprypin quit (Quit: Bye)
23:03:09shashlickwhat's SharedTable? I don't see it in the docs
23:03:17*FromGitter joined #nim
23:03:21*oprypin joined #nim
23:11:41GitDisc<treeform> it looks like its a table that does not use GCed things so that it can be passed between threads
23:11:49FromGitter<honewatson> Ruby had a killer app in Rails which raised the profile so I think if we could create a killer app for Nim with documentation/promotion that could really help promote nim
23:16:21*Jesin quit (Quit: Leaving)
23:19:49shashlickSharedTable will be awesome if I could find it :(
23:21:55skrylarback
23:22:55skrylardom96, Araq: as i was discussing briefly in meatspace, it's not so much that one GC rules all situations (they can't), but there are situations they are useful. in the current experiments i'm doing, it's mostly about livecoding
23:23:13GitDisc<treeform> shashlick https://github.com/nim-lang/Nim/blob/d1e10f9aa3e033414fb924e4f90736e46fde8256/lib/pure/collections/sharedtables.nim
23:23:18shashlickhttps://nim-lang.org/docs/sharedtables.html does not exist but import sharedtables works - will look at the code
23:23:53skrylaralthough it does seem that weak/strong refs and some simple ARCs are a lot easier to codegen and use less memory (although spend a lot of time doing atomic inc/dec)
23:23:54dom96honewatson: of course, but the question is what should the killer app be and who will commit their valuable time to developing it?
23:24:09skrylarST-80 doesn't have strong/weak refs, so blegh. although i suspect it could be made to do so
23:28:18FromGitter<honewatson> @dom96 I have some ideas and some ambition but of course I cannot do it on my own so I would need to think about how to document and promote the concepts.
23:28:57*devdri quit ()
23:30:15*yglukhov quit (Remote host closed the connection)
23:30:55skrylarI'm toying around with taking the v1 approach of a GC per "thread," then making the base unit a fiber (ex. goroutine stuff), but then 1) making sure finalizers are always run, which then in turn means "big stuff" like arrays can just use shared space
23:34:25shashlicksharedstring and sharedtables solve so many headaches
23:42:05*yglukhov joined #nim
23:44:27skrylarkiller apps are.. hmm
23:45:02skrylaram lately thinking success is more about cultivating supporting resources than anything else
23:45:22skrylarSqueak demonstrates just having a killer app (Seaside) is not enough if your offering has too many other defects
23:46:10*yglukhov quit (Ping timeout: 240 seconds)
23:46:35skrylarfrom my experience i never know if the version of nim i'm using is going to work one day to the next, because there keeps being talk of pulling the GC or somethingerother
23:53:40FromGitter<honewatson> yeah cultivating support resources are critical
23:54:35FromGitter<honewatson> there is no leverage or scalability in being available in chat to answer queries. Its critical to have good documentation with stable features and stable api
23:54:46FromGitter<honewatson> I don't know what squeak is by the way
23:55:56FromGitter<honewatson> ok its a version of small talk.
23:56:10FromGitter<honewatson> the splash page looks like something out of the early naughties
23:57:10FromGitter<honewatson> seaside doesn't offer any specific benefit
23:57:15FromGitter<honewatson> its to generic
23:57:36FromGitter<honewatson> 'Sophisticated web creations' what does that even mean?
23:58:04*yglukhov joined #nim
23:58:20FromGitter<honewatson> so I think the USP of a killer app needs to be very well defined. Presentation is critical as well as documentation.
23:58:46*zahary_ quit (Quit: Connection closed for inactivity)