<< 24-09-2018 >>

00:00:23FromGitter<zacharycarter> and hopefully, I can come up with a nice interface to plug-in whatever state management library you'd like to use
00:00:41FromGitter<zacharycarter> although having worked with redux and alt and some of the more popular ones - I think mobx is the best out there atm
00:00:47FromGitter<zacharycarter> if you even need such a thing
00:05:13FromGitter<zacharycarter> My goal is to port all the hyperHTML examples to the new library, as well as re-author the playground's frontend using them - although the backend needs work too. Hopefully that will provide enough of an introduction to their usage. I'm still battling with work to get them in production - I had a setback on Friday in a 1 on 1 w/ my manager.
00:05:22FromGitter<zacharycarter> I'm once again very close to quitting :P
00:10:45*opi_ quit (Ping timeout: 252 seconds)
00:11:43FromGitter<zacharycarter> I wonder if we could look at support for Nim & http://4coder.net/
00:14:30*opi_ joined #nim
00:32:04*opi_ quit (Ping timeout: 240 seconds)
00:36:38*PrimHelios joined #nim
00:42:31*shpx joined #nim
01:01:08*SenasOzys quit (Remote host closed the connection)
01:16:25*SenasOzys joined #nim
01:17:02*SenasOzys quit (Remote host closed the connection)
01:17:54*SenasOzys joined #nim
01:28:25*shpx quit (Quit: Textual IRC Client: www.textualapp.com)
01:33:02FromGitter<gogolxdong> setback on what
01:35:00FromGitter<zacharycarter> @gogolxdong my manager had a one on one meeting w/ me and talked about Nim not being viable for writing a component library w/ due to the lack of Nim programmers at our company / available in the recruiting pool. I don't understand where these requirements that we produce a re-usable component library came from - but it seems to be an excuse to continue to prevent Nim from entering our language ecosystem.
01:36:28c15ade4I would say recruiting pool is a very real issue - though nim isn't particularly hard to learn
01:36:51FromGitter<zacharycarter> I'm at my wit's end regarding this situation - I'm relied on to produce more than 75% of our solution's code
01:36:58FromGitter<zacharycarter> out of a two-person team
01:37:33FromGitter<zacharycarter> not to mention I am the person who suggests 90% of our product solutioning and architecture - not that any of it is that brilliant
01:37:58FromGitter<zacharycarter> it's just the other person I work with, only wants to write JS / ECMAScript and CSS - and doesn't care to learn anything else
01:39:22FromGitter<arnetheduck> @zacharycarter could have been visual basic 😛
01:39:24FromGitter<zacharycarter> and we own a full-stack product - so I've been responsible for writing everything beyond the ajax calls - and even those (plus the tests, because the guy I work with doesn't know how to mock a resources in a test / what an integration test is)
01:39:50FromGitter<zacharycarter> @arnetheduck at this point - I'm strongly considering following suit of that article I posted earlier - and just becoming a pro MS Excel game dev
01:40:31FromGitter<gogolxdong> I can image that, I train my students to use Nim.
01:41:30FromGitter<zacharycarter> https://www.gamasutra.com/blogs/CBel/20180213/308549/3D_engine_entirely_made_of_MS_Excel_formulae__Enjoy_this_Doomxls_file_.php
01:42:54*rockcavera joined #nim
01:43:18FromGitter<zacharycarter> it seems about as useful :P but seriously - I cannot stand the prejudicial nature of most of my co-workers. if it doesn't have enterprise backing, or isn't built by Netflix, then it isn't worth exploring :/
01:43:55FromGitter<zacharycarter> @gogolxdong I wish I had gone to your school :P
01:44:02FromGitter<zacharycarter> or had studied computer science haha
01:44:03FromGitter<gogolxdong> we are a three people developping team, neither any of that brilliant.
01:44:39FromGitter<gogolxdong> my student = my employee
01:45:07FromGitter<gogolxdong> I was a teacher, so called them students.
01:45:13FromGitter<zacharycarter> well - I can, with confidence, state that most of my co-workers known bullshit about computer science
01:45:43FromGitter<zacharycarter> most of them don't know what a pointer is - if I'm lucky, I'm working with someone that understands the benefits of type-safety
01:45:57FromGitter<zacharycarter> and isn't just coming from a JS programming / boot-camp background
01:46:27FromGitter<zacharycarter> and if they are coming from a comp-sci background, they're probably strict OOP | Java adherents and think anything that isn't OOP / the Spring framework - is shit.
01:46:52FromGitter<zacharycarter> It's tough convincing an audience like that to want to do anything else
01:47:09FromGitter<zacharycarter> even if their software is constantly crashing / running OOM etc
01:47:32FromGitter<zacharycarter> and they spend 90% of their FE dev teams time optimizing away react / the fact they pass JSON between all their backend services
01:48:01FromGitter<zacharycarter> I can't fix stupid across a company though - I'm just a product dev...
01:48:18FromGitter<zacharycarter> any time I raise issue - I tend to become a problem that they want to hide / not listen to
01:57:33FromGitter<gogolxdong> It was a setback as I kept want to quit time over time for about three or four months when I was working on the idea of Boss who want to build their own cloud based on Openstack, set up the enviroment from known little of Openstack to a delivered one, I am so lucky to survive that I had my chance to enroll students to build up a dev team which I can spread Nim.
01:58:55FromGitter<zacharycarter> I've been with my company - carfax - for six years now, and I've suggested / introduced several new technologies without ever being given the credit or nod
01:59:28FromGitter<zacharycarter> it usually goes like this - I present a new idea or tech in front of a group of peers, and I get a lot of questions / rebuttal about why we should learn something new or change
01:59:46FromGitter<zacharycarter> and then fast-forward several months and some team is using that tech and evangalizing it
02:02:08FromGitter<zacharycarter> and Nim I've been talking about for two years now, but we have typescript instead that no one knows - so I'm close to giving up. It seems Rust will win over Nim if Carfax ever even values a system programming language.
02:02:47FromGitter<zacharycarter> We are using Go right now on our team, because I didn't want to use Java and some other teams were already using Go.
02:03:35FromGitter<arnetheduck> well.. in all honesty, rust does have a more vibrant community around it with more ready-to-be-used code generally of higher quality than that of nim..
02:03:43FromGitter<zacharycarter> But I wouldn't be surprised to see that go away in favor of some JVM language - and even if it doesn't - Go still kinda sucks due to its lack of not being a better C.
02:04:25*dddddd quit (Remote host closed the connection)
02:05:26*jeyr joined #nim
02:05:34FromGitter<zacharycarter> I don't disagree with you on that point at all - but when the people evangelizing Rust at your work haven't written a line of code in it - it's frustrating.
02:06:42*jeyr quit (Client Quit)
02:08:17FromGitter<zacharycarter> https://gist.github.com/zacharycarter/b02970cfe51f9b346ff9ebf5b2a7e5e0
02:10:43FromGitter<bung87> I’d say it’s a bad idea for let your mates using one minority language
02:11:20FromGitter<zacharycarter> when you have a two-person dev team - does it matter?
02:12:20FromGitter<bung87> hmm that could make sense if he as some background.
02:12:28FromGitter<bung87> has
02:12:36FromGitter<zacharycarter> also - people treat programming languages like they are some concrete barrier to writing software. I've ported thousands of lines of code to Nim in a few days - it's not that difficult to go from A to B if you have to.
02:13:01FromGitter<zacharycarter> well - his only background is in JS / CSS / HTML - but we hire "programmers" like this at our company
02:13:11FromGitter<zacharycarter> and then let the influence how software is written
02:14:35FromGitter<bung87> well well ,only the js skills he has can be called “programming"
02:15:11FromGitter<zacharycarter> I guess - but he has a comp-sci degree supposedly and doesn't understand why static typing is beneficial
02:15:17FromGitter<zacharycarter> so I question all of it :P
02:15:58FromGitter<zacharycarter> it's not like he had an opinion on static vs dynamic typing
02:16:08FromGitter<zacharycarter> he just legitimately didn't understand what static typing was
02:16:16FromGitter<bung87> he should learn more than one language, with different type .
02:16:41FromGitter<zacharycarter> when I tried to explain meta-programming to him, he thought it was was me re-writing the compiler
02:17:20FromGitter<zacharycarter> well I agree - but this is what I have to work with - I can't make him do that, but my bosses / management don't seem to care that I understand these things and he doesn't
02:17:28FromGitter<zacharycarter> they just want us to spit out product
02:17:50FromGitter<zacharycarter> so I'm finding a way out
02:18:36FromGitter<zacharycarter> my first step is no longer agreeing to pickup all the slack I have been
02:18:47*ftsf joined #nim
02:18:49FromGitter<zacharycarter> so that conversation happens tomorrow - should be fun :)
02:18:52FromGitter<bung87> ah , maybe he doest has so much passion in programming as you.
02:19:09FromGitter<zacharycarter> no one I work with does - or comes close
02:19:28FromGitter<zacharycarter> I'm the rare exception - I'm probably one of the only programmers at my job that has a personal github that has more than 10 commits
02:21:11*tay_ joined #nim
02:22:10*krux02 quit (Remote host closed the connection)
02:22:17FromGitter<bung87> that’s normal thing, they don’t even star repository, not curious about new technic that other people have done.
02:23:11FromGitter<zacharycarter> yeah - to lots of people programming / IT is just a job - they don't care about it outside of office hours
02:23:38FromGitter<zacharycarter> I love programming - it's my passion, hobby and job - yet I struggle to find like minded peers.
02:24:50*tay_ quit (Client Quit)
02:28:08FromGitter<bung87> yeah people are different.
02:30:03FromGitter<arnetheduck> any decent option parsing libs in nim that can be recommended? ie something akin to python argparse maybe?
02:31:21FromGitter<bung87> https://github.com/docopt/docopt.nim
02:32:22FromGitter<arnetheduck> @bung87 thanks, checking
02:33:50FromGitter<zacharycarter> @arnetheduck https://github.com/c-blake/cligen
02:33:52FromGitter<zacharycarter> amazing
02:34:43FromGitter<bung87> yeah check cligen first
02:34:57FromGitter<kaushalmodi> cligen is awesome, very active and responsive dev too
02:35:15FromGitter<gogolxdong> I think people who uses Nim at this early stage works for passion mostly. Passion is a good weapon to clean up all the barriers to make what you want come true.
02:35:30FromGitter<kaushalmodi> From want I learn today, docopt dev has stopped using Nim? (I could be wrong).
02:35:49FromGitter<zacharycarter> yeah - I think he's moved to Crystal
02:36:22FromGitter<zacharycarter> but I don't think he's written Nim for a while
02:36:59FromGitter<zacharycarter> he and https://github.com/fowlmouth are Nim contributors that I've relied on a lot for bindings to libraries I've needed in gamdev pursuits
02:37:18FromGitter<zacharycarter> but are both no longer (unfortunately) writing Nim code / bindings
02:38:00FromGitter<zacharycarter> I'm more curious as to what happened to foulmouth - mostly because his name on github is - Billingsly Wetherfordshire ⏎ ⏎ 1) which is outrageously awesome
02:38:30FromGitter<zacharycarter> / can't be real
02:43:43FromGitter<bung87> seems crystal more popular than Nim, the stars of Nim looks like more like a library.
02:45:33FromGitter<zacharycarter> yeah - and Crystal has no windows support
02:45:44FromGitter<zacharycarter> or at least very lacking windows support
02:46:34*kraftbj joined #nim
02:46:42FromGitter<bung87> maybe they just want use it in backend programming.
02:46:49FromGitter<zacharycarter> https://github.com/crystal-lang/crystal/issues/5430
02:46:53FromGitter<zacharycarter> I don't think so
02:47:17FromGitter<zacharycarter> they're aiming for full windows support it appears
02:47:50FromGitter<zacharycarter> they have a ways to go though
02:48:21FromGitter<zacharycarter> I think they had / have had better marketing with Nim
02:48:39FromGitter<zacharycarter> I also think that's where Nim should spend some of its newly acquired budget - is in the marketing department
02:48:45FromGitter<zacharycarter> any would help
02:49:12*kraftbj quit (Remote host closed the connection)
02:50:27FromGitter<bung87> Nim just needs more developers for currently I think.
02:50:41FromGitter<zacharycarter> that's true as well
02:51:24FromGitter<bung87> compiler,core,std,tools,gc….
02:51:39FromGitter<zacharycarter> well - this has been the case for a while :P
02:52:16FromGitter<zacharycarter> but I think with the newly acquired funding - and hopefully more to follow - Nim is poised to gain further traction than it already has
02:53:09FromGitter<zacharycarter> I think one of Nim's challenges has been trying to keep the language relatively simple (so that it can be developed on - and not require a huge development staff) - while also allowing for a large set of features
02:53:47FromGitter<zacharycarter> but I'm sure at some point, trying to maintain that balance becomes problematic / somewhat impossible
02:55:20FromGitter<bung87> since Nim targets different backends that make it more huge.
02:55:21FromGitter<zacharycarter> but Nim also has some extremely smart people behind it (obviously) so I have faith in the language moving forward in a positive direction
02:56:23FromGitter<zacharycarter> yeah - but that's also one of the driving design philosophies behind the language - if Nim didn't have support for the various backends it does - it wouldn't be as attractive
02:56:53FromGitter<zacharycarter> I'm using Nim for (hopefully) JS at work and in my personal time - the C target for game dev
02:57:28FromGitter<zacharycarter> and I'm not using Rust - because I don't want another language that feels like I'm coding in C++ again
02:57:35FromGitter<zacharycarter> I'd rather just use C++
02:59:22FromGitter<bung87> I just worried about Nim has few developers
02:59:38FromGitter<zacharycarter> well - it's had as few developers as it has ever had
02:59:46FromGitter<zacharycarter> if that makes you feel any more comfortable :)
03:00:32FromGitter<zacharycarter> err more contributors
03:00:33FromGitter<zacharycarter> sorry
03:01:01FromGitter<bung87> I like Nim language design ,even its site and forum design.
03:01:16FromGitter<bung87> and the logo.
03:01:22FromGitter<zacharycarter> https://github.com/nim-lang/Nim/graphs/contributors
03:02:58FromGitter<zacharycarter> I just wouldn't be worried about your concerns too much - yes they are legitimate, but they are being alleviated over time
03:03:07FromGitter<zacharycarter> Nim's been around for 10ish years now
03:03:30FromGitter<zacharycarter> and the contributor department has always been slim - but I think there are more people paying attention the language than ever before
03:03:34FromGitter<bung87> well I see the recently commits ’s contributor can be count by one hand
03:03:39FromGitter<zacharycarter> so it can't get any worse than it's already been
03:04:54FromGitter<bung87> I generally not use it in company’s products.
03:06:04FromGitter<bung87> prefer using typescript as front-end and python as backend.
03:06:41FromGitter<zacharycarter> I don't think you've raised any valid reasons NOT to use Nim vs TypeScript or Python in your backend
03:07:01FromGitter<zacharycarter> I know Nim's async module has had its issues as of late regarding mem leaks
03:07:07FromGitter<zacharycarter> but assuming those get resolved
03:07:31FromGitter<zacharycarter> I'd rather gain from Nim's performance than use Python on my backend
03:07:38FromGitter<zacharycarter> as well as static-typing
03:08:06FromGitter<bung87> well, reason just simple, if I just got a python lib right by my hand… what else I would want..
03:08:12FromGitter<zacharycarter> and Typescript IMO sucks - not a fan of all of the OOP style it forces upon me
03:09:22FromGitter<zacharycarter> Sure - if Nim can't do X, Y or Z I'm going to reach for something else - but if it can - I'm going to attempt to use it if I have the opportunity
03:09:42FromGitter<bung87> I just dont want face js’s traps made by its bad language design.
03:09:44FromGitter<zacharycarter> beyond DB ORM and enterprise APIs - I'm not finding a lot that Nim can't do
03:10:13FromGitter<zacharycarter> I think Nim is very well designed - and the areas that its struggling with are going through RFC's constantly
03:10:41FromGitter<zacharycarter> so I think Nim has a bright future - it just takes time and eventual consensus amongst users
03:11:16FromGitter<bung87> well, I can just solve my problems in other languages , save my time and see what I can do it in Nim.
03:11:35FromGitter<zacharycarter> true - there are easier routes
03:11:42FromGitter<zacharycarter> and safer ones
03:12:33FromGitter<zacharycarter> but for instance - I can take the task of declaring web components - and streamline it with Nim with a custom DLS via macros
03:12:43FromGitter<zacharycarter> that's something I can't do in TypeScript
03:12:47FromGitter<bung87> yeah cuz I dont think take paid time to do these things,will make my boss happy :)
03:13:24FromGitter<zacharycarter> well if you write a library that saves co-workers a certain percentage of time - maybe it will
03:14:17FromGitter<zacharycarter> maybe being able to use one language on both the front and back ends of your stack and reducing tech-sprawl will make your boss happy
03:14:18FromGitter<zacharycarter> who knows
03:16:08FromGitter<bung87> that reminds me of the last project my mates seems not happy to co-work with me , so I did more work alone, make things transparent to him.
03:21:06FromGitter<bung87> generally I use different languages in FE and BE,since they have different ecosystems, I just prefer quick one
03:22:04FromGitter<kaushalmodi> Question about the --gcc.exe and --gcc.linkerexe switches ..
03:22:14FromGitter<kaushalmodi> I couldn't find the documentation for those anywhere
03:22:21FromGitter<kaushalmodi> not even in `nim --fullhelp` (devel)
03:22:39FromGitter<bung87> Nim compiler manual?
03:22:54FromGitter<kaushalmodi> this is the only reference: https://nim-lang.org/docs/nimc.html#cross-compilation
03:23:10FromGitter<kaushalmodi> .. but shouldn't `nim --fullhelp` have this?
03:23:37FromGitter<kaushalmodi> to check if a switch containing `foo` is valid, I typically do `nim --fullhelp | rg foo`
03:26:05FromGitter<bung87> maybe the document reference explain enough
03:28:45FromGitter<zacharycarter> should be easy to make it include it - https://github.com/nim-lang/Nim/blob/devel/compiler/commands.nim#L79
03:29:09FromGitter<zacharycarter> https://github.com/nim-lang/Nim/blob/devel/compiler/commands.nim#L58
03:31:20FromGitter<kaushalmodi> oh! those switches are hard-coded!
03:31:23FromGitter<kaushalmodi> https://github.com/nim-lang/Nim/blob/devel/doc/advopt.txt
03:31:32FromGitter<zacharycarter> yup
03:31:55FromGitter<kaushalmodi> who knows what else we are missing in there then
03:32:31FromGitter<zacharycarter> good point
03:34:10FromGitter<zacharycarter> although I have a feeling (maybe) those define what is allowed to be supplied as options to the CLI
03:34:41FromGitter<zacharycarter> so it may be more of a egg / chicken scenario than you're thinking of
03:35:08FromGitter<kaushalmodi> so where is "--gcc.exe" defined
03:35:14FromGitter<zacharycarter> yeah I just thought that
03:35:19FromGitter<kaushalmodi> (not a question to you.. in general)
03:35:22FromGitter<zacharycarter> haha since you originally stated that
03:35:24FromGitter<zacharycarter> hrm
03:35:59FromGitter<kaushalmodi> it probably dynamically recognized?
03:36:05FromGitter<kaushalmodi> --clang.exe, ..
03:36:12FromGitter<zacharycarter> could be
03:36:41FromGitter<kaushalmodi> but still, I couldn't find reference to even "linkerexe"
03:36:41FromGitter<zacharycarter> https://github.com/nim-lang/Nim/blob/devel/tools/finish.nim#L80-L84
03:37:15FromGitter<zacharycarter> that's not right
03:37:16FromGitter<zacharycarter> hrm
03:37:38FromGitter<kaushalmodi> this? https://github.com/nim-lang/Nim/blob/fedd695d76e621bfbbaca4bbc8f66996a0a732a4/compiler/extccomp.nim#L666
03:37:48FromGitter<kaushalmodi> (blindly grepping through things)
03:38:01FromGitter<zacharycarter> yeah
03:38:07FromGitter<zacharycarter> that looks right
03:39:18FromGitter<kaushalmodi> ok.. found all other extra switches in this family of switches
03:39:25FromGitter<kaushalmodi> ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=5ba85c6dbe4f300626db7639]
03:39:28FromGitter<zacharycarter> maybe all these should be documented as well? - https://github.com/nim-lang/Nim/blob/devel/compiler/extccomp.nim#L342-L356
03:39:33FromGitter<kaushalmodi> these should be documented though
03:39:34FromGitter<kaushalmodi> hehe
03:40:02FromGitter<kaushalmodi> (grepped `'getConfigVar.*"\.'`)
03:40:04FromGitter<zacharycarter> anywho - bedtime :P have a good one!
03:40:15FromGitter<kaushalmodi> (i am on est too :P)
03:40:20FromGitter<kaushalmodi> good night :)
03:40:49FromGitter<bung87> good night!
03:40:57FromGitter<zacharycarter> haha yeah - getting late :P have a good one you guys, talk soon!
03:46:30FromGitter<kaushalmodi> I have opened this issue to track the documentation of these compiler switches: https://github.com/nim-lang/Nim/issues/9056
03:53:55FromGitter<lotzz_gitlab> i was on the discord, but more people seem to be here
03:54:14FromGitter<kayabaNerve> They should be bridged
03:54:47FromGitter<lotzz_gitlab> i have no idea how you would do that
04:24:44*miran joined #nim
04:31:13*ludwig joined #nim
05:10:01FromGitter<codenoid> good noon all
05:10:05FromGitter<codenoid>
05:18:15*leru joined #nim
05:25:13*nsf joined #nim
05:25:16*leorize quit (Ping timeout: 260 seconds)
05:39:45*ludwig quit (Ping timeout: 252 seconds)
05:50:42FromGitter<kaushalmodi> New blog post: https://scripter.co/nim-deploying-static-binaries/
05:51:05*leorize joined #nim
05:58:10*xet7 joined #nim
06:09:52*wildsnake joined #nim
06:10:11*miran quit (Ping timeout: 260 seconds)
06:12:25*wildsnake quit (Remote host closed the connection)
06:22:29FromGitter<DanielSokil> Does Nim have support or bindings for algorithms such as PBKDF2, bcrypt, scrypt, and crypt ($2y$, $5$, $6$)? ⏎ Can't seem to find much besides this: https://nim-lang.org/docs/lib.html#pure-libraries-cryptography-and-hashing
06:23:42*Perkol joined #nim
06:58:20FromGitter<gogolxdong> are you switching your time zone@codenoid
06:59:14FromGitter<gogolxdong> recall you said good morning at the time.
07:11:43FromGitter<codenoid> i was in mars atm
07:18:07*joshbaptiste quit (Ping timeout: 240 seconds)
07:29:06*kapil___ joined #nim
07:34:11*leru quit (Ping timeout: 260 seconds)
07:38:55*Guest21351 joined #nim
07:46:06*Guest21351 quit (Ping timeout: 264 seconds)
07:52:44*floppydh joined #nim
08:03:12*leru joined #nim
08:03:47*gmpreussner quit (Ping timeout: 240 seconds)
08:03:48*gmpreussner_ joined #nim
08:06:48*Donjuanal2 joined #nim
08:07:23*ftsf quit (Quit: Leaving)
08:11:34*Donjuanal2 quit (Remote host closed the connection)
08:20:48notbot[m]@freenode_jonathon:matrix.org: you may be interested in https://github.com/lee-b/nimrun
08:24:51*Thom111 joined #nim
08:26:21*chemist69 joined #nim
08:27:44chemist69Good morning, I have a (probably) dumb question (please be patient with me, I have a non-CS background).
08:28:09chemist69When I define a `ref object` (whose instances are located on the stack) and within that `ref object` I define a member type that is usually located on the stack, like e.g. a Table ( not a TableRef). Where is that inner type located? Thanks for your help! example gist: https://gist.github.com/apahl/6c87070db4996a66cd09a67d3c1527c3
08:28:39chemist69sorry I meant `ref object`is located usually on the HEAP.
08:28:56chemist69Geez.
08:28:59*Thom111 quit (Remote host closed the connection)
08:32:43*mikroflops18 joined #nim
08:39:03*jpaetzel21 joined #nim
08:39:55*jpaetzel21 quit (Killed (Sigyn (Spam is off topic on freenode.)))
08:41:30*joshbaptiste joined #nim
08:42:02*mikroflops18 quit (Ping timeout: 244 seconds)
08:43:14Araqeverything embedded in a heap object is also on the heap
08:44:32chemist69Thanks Araq for the clear answer.
08:49:02chemist69despite mymeese-up question ;-)
08:49:30chemist69*messed-up* I swear, I'm not doing this on purpose!
08:51:15*Perkol quit (Quit: Leaving)
09:02:41*leorize quit (Ping timeout: 252 seconds)
09:07:13FromGitter<mratsim> https://medium.com/@giovanni_94706/introducing-nimtorch-b8b0fa749464
09:10:23*GrisKo19 joined #nim
09:15:09*GrisKo19 quit (Remote host closed the connection)
09:19:42FromGitter<Bennyelg> @mratsim 👍
09:27:02Araqdoes anybody use 'import system except foo, bar' ?
09:27:16Araqaka an explicit 'import system except...' statement?
09:27:19FromGitter<Bennyelg> when using nre
09:28:16FromGitter<mratsim> I did use it to solve conflicts in the past, maybe due to `$` or `!=` or `>`
09:29:12FromGitter<xmonader> I've a question, to reexpose functions/types from another package in your package what would you do? ⏎ ⏎ for instance redisparser has some functions i want to reexpose for whoever import my redisclient package?
09:30:31FromGitter<mratsim> import foo ⏎ export FooType
09:33:58AraqI'm talking about 'import *system* except'
09:34:10Araqbut ok, never mind, it continues to work
09:40:12*kullervo3 joined #nim
09:40:37*krux02 joined #nim
09:44:25*kullervo3 quit (Remote host closed the connection)
09:55:13c15ade4Araq: one good thing about nimble, you can probably do a script to check every package on there for feature use
09:57:12*PMunch joined #nim
09:57:17c15ade4actually
09:57:19c15ade4https://github.com/search?utf8=%E2%9C%93&q=import+%2B+except+extension%3Anim+language%3ANim&type=Code
10:00:32FromGitter<narimiran> speaking of import, will `from foo import bar as baz` become possible?
10:02:58*PMunch quit (Ping timeout: 246 seconds)
10:02:59*leorize joined #nim
10:03:58Araqno, I dislike symbol aliasing
10:04:46FromGitter<narimiran> ok, thanks. i've seen an issue asking this, didn't know what's the status of it
10:05:59FromGitter<narimiran> @mratsim maybe wait a bit until the last nim article cools of, but this should be posted to HN/reddit
10:06:31FromGitter<mratsim> It’s on reddit already, not on HN though
10:07:32FromGitter<narimiran> now i see it. it is not on r/programming yet. and maybe better to stay so, before we are (again) accused of nim-brigading :D
10:13:50*couven92 joined #nim
10:14:52FromGitter<mratsim> We have a rusty umbrella though :P
10:16:02*PMunch joined #nim
10:20:46*Vladar joined #nim
10:48:51*coderphive13 joined #nim
10:53:40*coderphive13 quit (Remote host closed the connection)
10:58:05*PrimHelios quit (Quit: Leaving)
11:01:13*stefanos82 joined #nim
11:17:29*juba_11 joined #nim
11:19:16*juba_11 quit (Remote host closed the connection)
11:28:20FromGitter<kaushalmodi> Araq: import .. except is used when using strutils and unicode
11:28:45Araqit's not about 'import .. except'
11:28:55Araqit was about 'import system except'
11:28:58FromGitter<kaushalmodi> Wait.. let me reread
11:29:07Araqnaming the special 'system' module here
11:29:29FromGitter<kaushalmodi> Got it. I thought *system* was just an example :)
11:29:31Araqbut it's ok, it continues to live for a little longer until I decide this feature is not worth its costs :P
11:36:04*SenasOzys quit (Ping timeout: 240 seconds)
11:44:56*Vladar quit (Remote host closed the connection)
11:48:29*dddddd joined #nim
11:54:04*SenasOzys joined #nim
11:58:02*enthus1ast_ left #nim (#nim)
11:58:21*enthus1ast joined #nim
11:58:44*Arrrr joined #nim
12:00:37enthus1astif i target the js platform and export functions to be called by js, then i must call procs like this foo(obj, param1, paramN), how can i transform it that this became valid: obj.foo(param1, paramN)?
12:01:55enthus1astmust i construct a new object where the functions are attributes?
12:09:01*kobi7 joined #nim
12:09:07kobi7hi!
12:09:22kobi7what is the delegate syntax in nim?
12:11:09PMunchkobi7, what are you trying to do?
12:11:17enthus1asti had to look up the definition of "delegate syntax" but it sounds a little like nim's concepts
12:14:05enthus1astor type :)
12:14:34kobi7let x = proc(a,b : c) ... something like that
12:14:37kobi7brb
12:19:01FromGitter<kaushalmodi> Looking at the example in http://www.tutorialsteacher.com/csharp/csharp-delegates, Nim does that automatically.
12:19:21krux02narimiran: you can use templates and macros to get something like symbol aliasing, but I guess it would be hacky, you probably shoudn't use it, but it could work.
12:19:24FromGitter<kaushalmodi> You don't need a delegate syntax in Nim (from what I understand in that example).
12:20:13PMunchYeah, kobi7 you can simply do let x = proc(a,b: int): int = a+b
12:20:26FromGitter<kaushalmodi> kobi7: based on the type of a proc argument, if a proc with that signature is defined, that proc is used automatically.
12:20:28PMunchThen you can call that with: x(5,7)
12:22:04FromGitter<narimiran> krux02: nah, i'm fine the way it is now :)
12:26:43kobi7PMunch, and all, ok thanks. couldn't find in the docs and wasn't sure it would be working right
12:27:06kobi7yeah, i meant an anonymous function
12:27:34FromGitter<alehander42> hey , I finished a first version of my pattern matching lib
12:27:35FromGitter<alehander42> https://github.com/alehander42/gara
12:27:51FromGitter<alehander42> i'd like some feedback if anybody is interested in the topic
12:28:21kobi7when I define an array, do I have to specify the size? what if it's a concept I'm defining, or don't know the size beforehand? (just want it limited)
12:29:11enthus1astfor an arry you need the size, if this is not known at compile time use a sequence (seq)
12:30:06kobi7what if I want a sequence that can't be added to, like an array is?
12:30:24kobi7(can't be enlarged)
12:30:51kobi7Alehander, looks really cool. in the example, what does that mean? (a: 4, b: 4)
12:33:07FromGitter<alehander42> good question, that's a shorter syntax for `TypeName(a: 4, b: 4)`
12:33:51FromGitter<alehander42> in nim code, often you know the type of the value which you match, so it wouldn't make sense to always have 3-4 branches with `SameOldTypeName(..)`
12:34:15FromGitter<alehander42> there is a section for each type of pattern down in the README
12:35:11kobi7so it matches an object where field a is 4, and field b is 4, but the match is against array 'a'
12:36:02*sheepman5 joined #nim
12:36:10kobi7* is rest?
12:36:12FromGitter<narimiran> @alehander42 thanks for providing the examples (this often is missing in nim libraries), but what i would also like to see are the 'results' of such examples. e.g. in the first example, what would match that `@[_, *(a: 4, b: 4) @others]`. the same goes for the examples in objects, subpatterns, capturing, etc.
12:36:27FromGitter<alehander42> ahh I have to add the beginning of the example
12:36:34kobi7other than that, looks very nice!
12:36:34FromGitter<alehander42> it really doesn't seem obvious that way, a second
12:36:52FromGitter<alehander42> @narimiran very good idea, I'll do it
12:36:55krux02(a: 4, b: 4) is just a tuple with a and b as members
12:36:58krux02there is no name
12:37:29kobi7krux02: i mean that afterwards, it checks others == a[ 1 .. ^1]
12:37:54kobi7so a is some sequence, where does the tuple come in?
12:38:34kobi7is it an array with two objects, disregarding the first?
12:39:38*tzui joined #nim
12:40:19FromGitter<narimiran> @alehander42 great! because these examples are nice to see the syntax/DSL, but i am still not sure how to use it on my own and 'what is what' exactly ;)
12:40:20krux02kobi: acutally you can create an array that starts at index 1
12:40:40krux02array[1..8, int] is an array that starts at index 1, not at index 0
12:41:31kobi7looks useful.
12:42:14kobi7do you know what a decision table is? I've yet to see a way to convert that 2d info to 1d code
12:42:54kobi7let's say mimic, not convert
12:43:31kobi7a macro for that could be awesome, topic kind of related
12:43:38FromGitter<narimiran> nested if-elif?
12:44:20*sheepman5 quit (Ping timeout: 252 seconds)
12:44:29krux02memory is always linear
12:44:48krux02to fake 2D memory, there are space filling curves
12:45:00krux02I think it is used for texture memory on the GPU
12:45:35krux02kobi7, I know what a decision table is. But I don't know how you mean with 2D info.
12:45:57krux02but normally I work with decision trees.
12:46:36*omenar joined #nim
12:47:00*alexandrus joined #nim
12:49:21FromGitter<alehander42> @kobi7 https://github.com/alehander42/gara#objects that should be a better explanation
12:49:24krux02narimiran: yes a decision tree is practically a nested if elif construct. But normally that term is used in machine learning when the decision tree is stored as a constructed that is generated by some learning algorithm.
12:50:05krux02and the result it is something like: It's a mouse, it's an elephant, it's a tree, or something like that.
12:53:12krux02alehander42: I think if I release a new version of ast-pattern-matching I would change the meaning of the backtick operator.
12:54:02krux02A backtick is used in scala to match a value literally, and that would work in nim equally well.
12:54:39FromGitter<narimiran> krux02: yeah, i've done some simple decision trees. but i'm not sure i understand what exactly is kobi7 asking ;)
12:55:07krux02me neither
12:55:19FromGitter<narimiran> *simple models with DT
12:55:38krux02DT?
12:56:25FromGitter<alehander42> @krux02 that might make sense, I didn't want to use it with a 3rd different meaning
12:56:31FromGitter<alehander42> ah gitter drops all messages when you're in bad network
12:57:15krux02irc: just doesn't send you then messages :P
12:57:25kobi7alehander42, now I understand the example. thanks
12:58:10FromGitter<narimiran> krux02: DT = decision tree
12:58:20krux02ah
12:58:21krux02ok
12:58:24kobi7krux02: by 2d info, i meant that it's a table, and visually parsable, whereas nested ifs are more complex to get right for us mere mortals :-)
12:58:54krux02a table, like with plates glasses and bottles?
12:58:59krux02more context pleas
12:59:12kobi7if there was a textual representation of that, that with a macro gets transformed to nested ifs or a switch case, that could be really nice
12:59:38krux02i have no idea what you are talking about.
12:59:52krux02a macro doesn't magically convert stuff
12:59:59krux02a macro does things when you invoke it.
13:00:08FromGitter<narimiran> kobi7: but the rows in that table (dataframe) are variables, and columns are conditions, right?
13:00:11kobi7https://en.wikipedia.org/wiki/Decision_table#Example
13:00:48kobi7yes, because of the truth/false values, it gets annoying to do that by hand. some people use excel just to verify their logic
13:01:12*manjaro-user_ joined #nim
13:01:19krux02so you want a macro that generates the decision logic when you pass it a decision table in ast form?
13:01:43FromGitter<narimiran> if you write/sketch that table as a tree, you can easily recreate that with 'programming logic'
13:02:01kobi7anyway, i'm just talking about it because of the pattern matching library. some programming fields have complex logic...
13:02:13krux02this isn't complex.
13:02:31FromGitter<narimiran> if it is both warm and sunny: you don't need a coat. if it is warm and raining: umbrella. etc etc.
13:02:36krux02you can write a macro to do it for your, or you do it at runtime and store the result in a variable with a {.global.} tag.
13:03:51krux02I think it's a good exercise to start working with macros.
13:03:59kobi7krux02: it can be complex, depending on how many variables. and then you forget one condition, and meet the situation at runtime
13:04:06krux02it is a not too complicated topic, but there is no solution to pick it.
13:04:29krux02kobi7, write a macro for it.
13:04:35kobi7krux02: but what syntax would you use for that?
13:04:53krux02that is what you have to figure out, because you want to use it eventually
13:05:25krux02you can try different representations and see how their ast looks like
13:05:39kobi7if u do yyyynnnn stuff, later the table grows. it's good documentation, but annoying to do textually
13:05:48krux02and then based on whats easiest to process, and how well it repersents your decision table you make a decision
13:06:00FromGitter<narimiran> kobi7, each row of the table is a tuple, and based on the fields of that tuple — you have different outcome
13:07:03krux02the yyyynnnn part doesn't contain information
13:07:07krux02therefore I would omit it
13:07:49krux02I just think it is weird that on wikipedia it is yyyynnnn and then yynnyynn instead of nnyynnyy
13:10:23FromGitter<bung87> seems memfiles much faster than using a big table?
13:12:27kobi7krux02: there was some "research" on this, https://alarmingdevelopment.org/?p=39
13:12:43kobi7and also a product called logicgem from an unrelated company
13:13:42kobi7I just think it's excellent documentation to see the actions based on conditions, so visually. but there isn't really a mapping, unless you basically draw it in ascii
13:14:25kobi7just a glass elevator thing. doesn't matter
13:14:47krux02kobi7, I don't know what subtext is and the link to the zip is broken
13:15:07kobi7it's 12 years old...
13:15:29kobi7maybe this works? http://www.subtext-lang.org/demo1.html
13:16:39kobi7sorry i meant this one: https://vimeo.com/140738254
13:18:52kobi7procedural languages simply create smaller functions, to help with complexity. it's not very important. jwas just reminded of that.
13:19:08kobi7cu
13:19:10*kobi7 quit (Quit: Leaving)
13:21:16krux02well I do disagree that all these foldings do help
13:21:23*manjaro-user_ quit (Quit: Konversation terminated!)
13:21:37krux02well maybe in a certain way, but I am way to focused on text navigation that this change would confuse be
13:21:43krux02but apart from that he has a point.
13:22:03krux02but on the other hand I do think that you should undersdand boolean logic
13:22:16krux02for example when I have conditionals I always know how to convert them
13:22:43krux02¬(a∨b) = ¬a∧¬b
13:23:07krux02¬(a∨b) = ¬a∧¬b
13:23:36krux02¬(a∧b) = ¬a∨¬b
13:24:08krux02a→B = ¬a ∨ b
13:24:58krux02I learned that at university, when a programmer is not able to do it, well yea decision trees might become very messy
13:26:17krux02(a∨b)∧c = a∧c ∨ a∧c
13:26:34krux02sorry I mean: (a∨b)∧c = a∧c ∨ b∧c
13:27:07krux02with these simple rules expression trees can be shortened.
13:34:31*Vladar joined #nim
13:38:45*noonien joined #nim
13:44:48*opi_ joined #nim
13:45:28FromDiscord<0xAC44> I have an array[0..31, char] given to me from an SDL event, and I need to append it to a string. How would I do that? (And actually, exactly what does array[0..31, char] mean? I'm just getting started with nim)
13:47:19*opi_ quit (Client Quit)
13:47:23krux02that is a type
13:47:29krux02it is an array of 32 characters
13:47:50krux02you can cast the addres from it to ``cstring``
13:47:58krux02and that is convertible to string
13:48:05*krux02 quit (Remote host closed the connection)
13:48:22FromDiscord<0xAC44> That works! Thanks.
13:50:41*omenar quit (Remote host closed the connection)
13:51:31*elrood joined #nim
13:54:27*opi_ joined #nim
13:55:06*slothtrop joined #nim
13:55:44*opi_ quit (Client Quit)
13:56:00FromGitter<zacharycarter> yay - more people writing game stuff w/ Nim :D
13:57:14FromDiscord<0xAC44> Not quite - I'm trying to write a toy digital audio workstation
13:57:33FromGitter<zacharycarter> even cooler :D
13:58:28*PrimHelios joined #nim
13:58:34FromGitter<tim-st> 0xAC44: here is the best solution for this (see "Update"): https://forum.nim-lang.org/t/4127#25706
13:59:23*opi_ joined #nim
13:59:42FromDiscord<0xAC44> Thanks! Better use that instead of "text.add (addr tevt.text).cstring", then?
14:00:04*PrimHelios quit (Client Quit)
14:00:38FromGitter<tim-st> yes, why convert to cstring?
14:03:27FromDiscord<0xAC44> I think I didn't pay attention to the difference between cast and conversion on my first quick tutorial read. I'll have to make a second pass
14:06:32*abm joined #nim
14:06:38FromGitter<mratsim> cast is reinterpreting the memory blob
14:07:41FromGitter<mratsim> if you’re working with memory blob I suggest you check https://github.com/status-im/nim-byteutils
14:08:06FromGitter<mratsim> Also this but it’s much more involved and less self-documented: https://github.com/status-im/nim-ranges
14:09:12FromGitter<mratsim> but basically just use openarray\[char\] and toOpenArray (requires devel) https://github.com/nim-lang/Nim/blob/a892d519a60e08212ea05e99bb9f858e6673ee6b/lib/system.nim#L4242-L4252
14:09:45FromGitter<mratsim> openarray are Nim builtin type for pointer + len and are compatible with seq (and maybe strings? but just use seq bytes)
14:10:24*daniel_sg joined #nim
14:11:09FromGitter<mratsim> otherwise you can cast\ptr UnchecheckArray\[bytes\ (foo[0].unsafeAddr) @0xAC44, that we gives you array-like semantics on a pointer so you won’t have to implement pointer arithmetics, just index as natural.
14:11:21FromGitter<mratsim> sorry byte not bytes*
14:12:14*daniel_sg quit (Remote host closed the connection)
14:20:04FromGitter<narimiran> yes, openArray is compatible with strings too
14:20:06*norok2 quit (Quit: Konversation terminated!)
14:33:28*nsf quit (Quit: WeeChat 2.2)
14:36:54FromGitter<alehander42> @narimiran i've added some comments in the examples, but I guess I should sit down and right some more obvious examples later
14:38:38FromGitter<alehander42> @krux02 btw I wondered about the if guard: for now I use `pattern and condition` as that's not ambigious in my dsl (instead of `pattern if condition`)
14:38:54FromGitter<alehander42> is there a plan to add support for this kind of if to the parser
14:41:06FromGitter<mratsim> i.e. lots of people coming from ruby are asking this
15:00:41*miran joined #nim
15:02:56*SenasOzys quit (Ping timeout: 252 seconds)
15:06:44*SenasOzys joined #nim
15:07:27FromGitter<kaushalmodi> Which modules can be imported in nimscripts?
15:08:01FromGitter<kaushalmodi> The doc says that: ⏎ ⏎ > However, at least the following modules are available: ⏎ ⏎ > strutils ... [https://gitter.im/nim-lang/Nim?at=5ba8fdd1b4990c30ee00e846]
15:08:15FromGitter<kaushalmodi> But actually macros can be imported too (at least on devel)
15:08:34FromGitter<kaushalmodi> are there other importable modules that should be listed there?
15:09:03FromGitter<kaushalmodi> quoted above from https://nim-lang.org/docs/nims.html
15:15:58*flaviu joined #nim
15:16:19*floppydh quit (Quit: WeeChat 2.2)
15:20:32*SenasOzys quit (Ping timeout: 252 seconds)
15:23:37enthus1astafaik modules which do importc are not available
15:25:02*SenasOzys joined #nim
15:27:26FromGitter<kaushalmodi> hmm, ok. Need to find out that list programmatically then
15:27:47FromGitter<kaushalmodi> Just thought that macros was a bit too important to be left out from that list
15:27:54FromGitter<kaushalmodi> So I just submitted a tiny PR for that
15:30:59FromGitter<citycide> @alehander42 gara looks great so far, well done
15:32:17*mapet25 joined #nim
15:34:02*xeetzer joined #nim
15:36:35*xeetzer quit (Remote host closed the connection)
15:37:09*mapet25 quit (Remote host closed the connection)
15:50:33FromGitter<mratsim> @kaushalmodi I think GULPF has a PR to allow more modules in NimScript, it was pretty details iirc
15:57:47enthus1asti don't understand the use case of gara, why is this superior to case/if?
16:02:44*Trustable joined #nim
16:06:57FromGitter<zacharycarter> less verbosity - captures, etc...
16:07:10FromGitter<zacharycarter> I think pattern matching has proved useful as a number of languages feature it
16:07:33*darithorn joined #nim
16:09:29*SenasOzys quit (Ping timeout: 252 seconds)
16:12:08*chemist69 quit (Quit: WeeChat 1.9.1)
16:17:36*SenasOzys joined #nim
16:21:31*PMunch quit (Ping timeout: 260 seconds)
16:25:00FromGitter<iffy> Any built-in way to parse URL query strings (into a tuple, for instance)?
16:25:25FromGitter<mratsim> use strscans: https://nim-lang.org/docs/strscans.html
16:25:35enthus1astjester has a query parser
16:26:38enthus1asthttps://github.com/dom96/jester/blob/master/jester/private/utils.nim#L23
16:26:38FromGitter<mratsim> there is this too apparently, never used it (and I’m not a Nim net specialist): https://nim-lang.org/docs/uri.html#parseUri,string,Uri
16:27:21enthus1astafaik uri has no query parser yet
16:38:09*PMunch joined #nim
16:39:41FromGitter<tim-st> `parseUri` raises on input `%` so needs try except
16:43:55FromGitter<iffy> @mratsim Does strscans handle repeating patterns?
16:44:55FromGitter<iffy> oh, I just need to keep reading to the /etc/passwd example, I think
16:49:05*Arrrr quit (Quit: Arrrr)
16:51:04*Pisuke quit (Ping timeout: 246 seconds)
16:51:09*MyMind joined #nim
17:01:07FromGitter<iffy> woah, I can write grammars like that!? That is cool
17:03:17FromGitter<alehander42> @citycide thank you, if you have any features you want to see, please let me know
17:04:23FromGitter<dm1try> @iffy stdlib has `cgi` module ⏎ ⏎ ```import cgi ⏎ for key, value in "key=value&key2=value2".decode_data: ⏎ echo key, value``` [https://gitter.im/nim-lang/Nim?at=5ba919177dca3065034ad4ad]
17:05:45FromGitter<iffy> oh, that's much easier (though I'm glad I know about strscans now)
17:06:09enthus1astdmltry thank you did not know
17:11:53enthus1astthats even better than the jester parser cause its perfectly legal to have a key multiple times
17:18:00FromGitter<bung87> I finally found seq assign and clear table is most slow parts in my program.
17:20:12mirananybody here to take a look at one simple macro and see if this could be done better?
17:21:20FromGitter<alehander42> yep
17:22:25mirani've tried to see if i could do this: https://forum.nim-lang.org/t/4224 with macros. here is my solution: http://ix.io/1nru/
17:23:46miranmy questions: should macros be used for stuff like this, or are templates good enough (or better) solution?
17:31:50FromGitter<dm1try> miran maybe `quote` can be used instead of building ast manually in this case
17:32:55FromGitter<kaushalmodi> How do you set define switch in config.nims?
17:33:05FromGitter<kaushalmodi> `switch("define", "foo")` does not work
17:33:58miran@dm1try oh, i always forget there exists `quote`!
17:36:27miranbut this was built with the help of `dumpAstGen`, so it was not manually, but semi-automatically :)
17:39:35FromGitter<dm1try> got it =)
17:45:19*flaviu quit (Remote host closed the connection)
17:45:41*flaviu joined #nim
17:46:07FromGitter<Clyybber> @Araq @TheLemonMan I think we forgot to close this: https://github.com/nim-lang/Nim/issues/6434 ?
17:50:44*Sentreen quit (Quit: WeeChat 1.6)
17:53:02FromGitter<Clyybber> Thx LemonMan
17:53:47FromGitter<Clyybber> Oh wait... you closed this 2 hours ago?
17:54:11FromGitter<Clyybber> Github doesn't seem to update its issue status very often...
17:54:12FromGitter<Clyybber> wierd
17:54:13miran@dm1try: using `quote` feels like cheating! "if `a`: `b` else: `c`" :)
17:57:26FromGitter<alehander42> @narimiran well basically if you can do it with a template, do it, otherwise use a macro, but yeah, use `quote` a lot
17:58:56miran@alehander42 thanks! does the macro solve the template problem mentioned in that forum thread ("both statements are evaluated regardless of the condition")?
18:00:38FromGitter<dm1try> miran, yep) simple things should be simple. actually I like the sugar that you proposed more than any solution in the related thread :)
18:01:19miranthanks @dmitry! i might post it on the forum then :)
18:01:35*nimrod joined #nim
18:02:45*nimrod left #nim (#nim)
18:02:47*bobe17 joined #nim
18:03:37*bobe17 quit (Remote host closed the connection)
18:03:56FromGitter<arnetheduck> with the new non-nil strings and seq, is there even a point calling `newSeq` and friends on a variable?
18:04:26mirani think i can answer my own question. false branch is not executed. i've tried with having two functions which have echo inside of them (only the true-branch one did echo)
18:05:13miran@arnetheduck maybe just to provide the length? (instead of the default zero)
18:05:23FromGitter<Clyybber> Yeah I thought so too
18:05:30FromGitter<Clyybber> but then one could also use setLen
18:05:49FromGitter<alehander42> @Araq do you think it would make sense to have something like typesection macros similar to the forloop ones: basically with the ability to inject some code in the type section and after the type section
18:06:14FromGitter<Clyybber> @arnetheduck Maybe to have control over when the seq actually gets initalized. So to fine tune performance possibly?
18:06:15FromGitter<alehander42> i was wondering if there is a way to transform patty's variant macro
18:06:23FromGitter<alehander42> in a way that you can use it inside a type section
18:10:05*Sentreen joined #nim
18:10:05*alexandrus quit (Read error: Connection reset by peer)
18:10:53*dorelix joined #nim
18:11:53*Sammitch6 joined #nim
18:12:45*Sammitch6 quit (Killed (Sigyn (Spam is off topic on freenode.)))
18:16:43FromGitter<arnetheduck> @Clyybber no different from setLen
18:39:34*nsf joined #nim
18:43:37*Jesin quit (Quit: Leaving)
18:44:05FromGitter<vivekimsit> how to represent very large number?
18:45:02FromGitter<vivekimsit> example: https://github.com/sindresorhus/pretty-bytes/blob/master/test.js#L24
18:54:58*PrimHelios joined #nim
18:55:20*Jesin joined #nim
18:55:33*PrimHelios quit (Client Quit)
18:57:35*stefanos82 quit (Quit: Quitting for now...)
19:06:59FromGitter<zacharycarter> anyone hiring Nim programmers? :P
19:07:23FromGitter<kayabaNerve> @zacharycarter Willing to take $0?
19:08:04FromGitter<zacharycarter> haha - if it includes free food & lodging - sure :P
19:09:49FromGitter<kayabaNerve> I can move some stuff out my Mom's garage. She always parks in the driveway...
19:10:05FromGitter<kayabaNerve> This is looking to be a quality job offering :thinking:
19:15:50FromGitter<zacharycarter> lol
19:25:04*leru quit (Ping timeout: 246 seconds)
19:29:40*kungtotte joined #nim
19:32:11FromGitter<zacharycarter> The arguments for not using Nim were - this doesn't feel like a "Nim" project it feels more like a "TypeScript" project
19:32:11FromGitter<zacharycarter> and
19:32:21FromGitter<zacharycarter> "Someone else would have to learn Nim to work on this project."
19:32:26FromGitter<zacharycarter> but they won't have to learn TypeScript
19:32:33FromGitter<zacharycarter> and our team is literally two developers
19:32:36FromGitter<Clyybber> fucking typescript
19:32:39FromGitter<zacharycarter> fucking carfax
19:32:50FromGitter<zacharycarter> can't find a new job fast enough
19:33:03FromGitter<Clyybber> haha good luck
19:33:32FromGitter<zacharycarter> it's bullshit - I was the first one to talk about frontend MVC (angular 1 at work), I was the first person to talk about bower / grunt / gulp - I was the first one to introduce golang and kubernetes to our teams
19:33:46FromGitter<zacharycarter> and I got to work on ZERO of these technologies - even though we have used / presently use every one of them
19:34:09FromGitter<zacharycarter> so I'm sure Nim will explode here in a few months, and I won't be working on any projects that are using it
19:37:46*leru joined #nim
19:41:48FromGitter<kayabaNerve> @zacharycarter RIP
19:42:02FromGitter<kayabaNerve> I would use TypeScript over Nim for networking any day of the week though.
19:42:41FromGitter<kayabaNerve> Nim has performance benefits but it's also unstable. It's not like it's unusable; I use Nim every day. I just wouldn't make a web backend out of it until 1.0
19:42:53FromGitter<kayabaNerve> As soon as Nim hits 1.0, Nim > Typescript
19:42:54FromGitter<zacharycarter> this is a web frontend
19:43:04FromGitter<kayabaNerve> `nim js`?
19:43:06FromGitter<zacharycarter> yup
19:43:24FromGitter<kayabaNerve> You sound like TypeScript beat you up when you were a child
19:43:45FromGitter<zacharycarter> Well - I'm not a fan of the OOP rigidness TS introduces
19:43:59FromGitter<zacharycarter> also - I'd rather program in Nim and build something that can add to the Nim ecosystem
19:44:03FromGitter<kayabaNerve> You just wanted to make a website but Daddy TS came in with his belt in his hands, making a smacking noise...
19:44:04FromGitter<zacharycarter> rather than just build another typescript project
19:44:06FromGitter<zacharycarter> which I've done 100x
19:44:12FromGitter<kayabaNerve> Jokes aside, I don't like the idea of Nim JS
19:44:12FromGitter<zacharycarter> pretty uch
19:44:18FromGitter<zacharycarter> why not?
19:44:26FromGitter<kayabaNerve> It loses the performance benefits
19:44:36FromGitter<zacharycarter> yeah - but I mean vs what?
19:44:46FromGitter<zacharycarter> it's not like TypeScript is going to outperform Nim's JS targe4t
19:44:48FromGitter<kayabaNerve> Nim isn't at 1.0 and I don't trust the generated JS to be as good as the generated C
19:44:50FromGitter<zacharycarter> target*
19:44:58FromGitter<zacharycarter> ah - well that's a fair criticism I think
19:45:00FromGitter<kayabaNerve> Not performance wise ofc; intent wise
19:45:03FromGitter<zacharycarter> right
19:45:20kungtotteI don't think anybody in JS-land should be talking about things being unstable or a moving target :P
19:45:27FromGitter<kayabaNerve> I feel like Nim is designed to be C/C++, but because it supports backends, JS became a thing, but I honestly have concerns over the quality of the generated JS
19:45:33FromGitter<zacharycarter> well - I've had fairly good luck with it, and I'd rather use Nim everywhere at work vs the six plus othe rlanguages that we have on our plate atm
19:45:53FromGitter<kayabaNerve> kungtotte: NPM makes sure you get the proper version; I don't think the concern is that your code will break but rather no one will use it.
19:46:01FromGitter<zacharycarter> especially when my co-worker barely understands the concept of type safety
19:46:06FromGitter<kayabaNerve> *NPM being relevant for the Node community.
19:46:10Araqthe JS performance is good and the move semantics are implemented as an AST to AST transformation
19:46:22*heatm1s3r14 joined #nim
19:46:24FromGitter<kayabaNerve> JS between versions is pretty stable. The issue is libs die every single week.
19:46:29Araqso the JS backend will benefit from these too without any special patches
19:46:32FromGitter<kayabaNerve> Araq Thanks for the reassurance.
19:46:43*heatm1s3r14 quit (K-Lined)
19:46:46FromGitter<kayabaNerve> Have you guys heard of Deno?
19:46:50FromGitter<zacharycarter> nope
19:47:01FromGitter<kayabaNerve> One of the original NodeJS guys is redoing it with TypeScript
19:47:18FromGitter<kayabaNerve> No NPM; no guarantees on compatibility; 'better' JS engine; TS only...
19:47:19Araqthat said, Karax's "kstring" abstraction is essential for good JS/native performance
19:47:19FromGitter<zacharycarter> heh
19:47:26FromGitter<kayabaNerve> *compatibility with Node.
19:47:35Araqso learn from Karax :P
19:48:30FromGitter<zacharycarter> https://github.com/mozilla/sccache
19:49:33FromGitter<kayabaNerve> @zacharycarter Your team will stop using other languages if the languages die off.
19:49:45FromGitter<kayabaNerve> Just DDoS every site behind every language they're already using.
19:49:51FromGitter<zacharycarter> :P
19:50:06FromGitter<kayabaNerve> See how good Go is when you can't access the official site, package managers, GitHub projects, or... STACK OVERFLOW GO
19:50:27FromGitter<zacharycarter> Most of my co-workers program in Java / Spring Boot
19:50:32FromGitter<zacharycarter> and think it's the holy grail
19:50:36FromGitter<kayabaNerve> God damn why
19:50:44FromGitter<zacharycarter> because I work in a hell hole
19:51:01FromGitter<kayabaNerve> Work for me
19:51:03kungtotteCould always be worse. You could all be writing Perl.
19:51:22FromGitter<kayabaNerve> It's not a hell hole. It's an UNPAID hell hole. Big difference
19:51:26FromGitter<zacharycarter> lol
19:51:34FromGitter<zacharycarter> I could just quit carfax and then show up to work every day
19:51:37FromGitter<zacharycarter> and have the same reality
19:51:47FromGitter<zacharycarter> and not move to Texas :P
19:52:04FromGitter<zacharycarter> anyway - I'm going to go home and lament my job situation / look for a new one - be back online in a bit
19:52:10FromGitter<kayabaNerve> Cya
19:53:04FromGitter<vivekimsit> I think my message got lost :)
19:55:19*SenasOzys quit (Remote host closed the connection)
19:55:46*SenasOzys joined #nim
19:55:56FromGitter<vivekimsit> I am trying to `nimble publish`
19:56:12FromGitter<vivekimsit> but getting the following error: ⏎ ⏎ `Error: unhandled exception: Connection was closed before full request has been made [ProtocolError]`
20:09:45*dorelix quit (Remote host closed the connection)
20:11:53*jiffe23 joined #nim
20:16:03*jiffe23 quit (Remote host closed the connection)
20:27:47*Jesin quit (Quit: Leaving)
20:30:45*Jesin joined #nim
20:37:12planetis[m]hi?
20:37:38planetis[m]nice works
20:38:11*kapil___ quit (Quit: Connection closed for inactivity)
20:39:51FromGitter<codenoid> good noon all
20:39:51FromGitter<codenoid>
20:40:32*NimBot joined #nim
20:40:54FromGitter<vivekimsit> hi
20:41:07planetis[m]sup i made a interface macro
20:44:18FromGitter<abijahm> hello people i cannot create a simpler example but in the following example ⏎ calling close on line 40 it calls the close on line 81 which takes no parameters the problem disappears when i remove the exportc pragma ⏎ ⏎ ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=5ba94ca2cdc50131724996be]
20:46:21*miran quit (Ping timeout: 260 seconds)
21:01:07*Trustable quit (Remote host closed the connection)
21:01:45FromGitter<dm1try> @abijahm so simplified example will be: ⏎ ⏎ ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=5ba950b9fe37781110f09742]
21:02:15FromGitter<dm1try> take a look on nim opened issues or fire another one =)
21:02:51*opi_ quit (Ping timeout: 252 seconds)
21:04:53*opi_ joined #nim
21:08:13*PMunch quit (Remote host closed the connection)
21:09:24*nerobro20 joined #nim
21:09:48*SenasOzys quit (Ping timeout: 252 seconds)
21:10:50*SenasOzys joined #nim
21:11:53*nerobro20 quit (Remote host closed the connection)
21:15:31*nsf quit (Quit: WeeChat 2.2)
21:18:48*opi_ quit (Ping timeout: 252 seconds)
21:22:26*opi_ joined #nim
21:34:56*jxy quit (Remote host closed the connection)
21:52:34cavariuxhas there been any manuals/tutorials on how to manualy manage memory without gc in nim?
21:53:04*opi_ quit (Ping timeout: 240 seconds)
21:53:37*opi_ joined #nim
21:54:38*Vladar quit (Remote host closed the connection)
21:56:52AlexMaxcavariux: What do you want to know?
21:58:00cavariuxAlexMax mostly if it's safe to use the stl with gc turned off and if I need to clean any of standard types
21:58:06*opi_ quit (Ping timeout: 260 seconds)
21:59:26AlexMaxI don't think you can 'clean up' after nim
22:00:20Araqstl with gc turned off works, but what works better is --gc:regions (documentation pending though)
22:00:54AlexMaxnim does give you alloc, realloc and dealloc, but I wouldn't use those to touch anything nim, only when you're messing with imported C stuff
22:01:52AlexMaxNim has a nice document that describes how the GC works
22:01:55AlexMaxhttps://nim-lang.org/docs/gc.html
22:02:20AraqAlexMax, yeah but since then we've got more options...
22:02:35cavariuxoh, thanks AlexMax and Araq will check the doc and try to see what regions is
22:02:48AlexMaxIf anything I say conflicts with what Araq says, ignore me, because Araq is the lead developer of the language :P
22:03:04AlexMaxAnd he'd know better than me
22:03:17Araqand thread local heaps, threads with GC safety effect and regions work really well
22:03:33Araqsadly, it's all a secret... :-/
22:04:02cavariuxwhat do you mean with secret haha?
22:04:37AraqI never wrote about it and it turned out these features combined are a superpower
22:05:50cavariuxtbh I don't understand gc because I have always worked with c/c++ but could I trust nim in efficiency and safety with regions enabled?
22:07:28Araqhuh, tough question, yes if you adhere to a few simple rules
22:08:30Araqand the rules cover "don't run out of memory" moreso than "don't crash"
22:11:22cavariuxokay thanks Araq
22:12:11*jxy joined #nim
22:13:16*leru quit (Ping timeout: 260 seconds)
22:13:16FromGitter<zacharycarter> I guess the positive news out of all this bs at work is - I get to publish the port of hyperHTML / the ES2015/6 DSL I'm working on, under my own github and not carfax's org
22:19:23*opi_ joined #nim
22:23:34*opi_ quit (Ping timeout: 240 seconds)
22:43:03FromGitter<gogolxdong> they will regret
22:48:38*dzan6 joined #nim
22:51:15FromGitter<zacharycarter> https://github.com/zacharycarter/litz
22:51:27FromGitter<zacharycarter> please don't try to compile / work on this yet - it's just me putting up the repo
22:51:38FromGitter<zacharycarter> it's still heavily WIP and needs a README reflecting so
22:52:40*dzan6 quit (Remote host closed the connection)
22:52:57*shashlick_ joined #nim
22:54:41*opi_ joined #nim
22:54:47*xet7 quit (Quit: Leaving)
22:55:41*xace_ joined #nim
22:55:51*regtools_ joined #nim
22:55:55*darithorn1 joined #nim
22:56:06FromGitter<zacharycarter> https://github.com/zacharycarter/nes
22:56:08FromGitter<zacharycarter> as well
22:56:15*onionhammer1 joined #nim
22:56:23*darithorn1 quit (Client Quit)
22:56:40*darithorn1 joined #nim
22:59:21*opi_ quit (Ping timeout: 260 seconds)
22:59:33*darithorn1 quit (Client Quit)
23:00:14*elrood quit (Quit: Leaving)
23:00:51*darithorn quit (*.net *.split)
23:00:51*deepend quit (*.net *.split)
23:00:52*xace quit (*.net *.split)
23:00:52*shadowbane quit (*.net *.split)
23:00:52*shashlick quit (*.net *.split)
23:00:52*onionhammer quit (*.net *.split)
23:00:52*regtools quit (*.net *.split)
23:01:29*shadowbane joined #nim
23:02:44FromGitter<zacharycarter> @kaushalmodi thank you!
23:03:14FromGitter<zacharycarter> <3 - very greatly appreciated
23:03:23*deepend joined #nim
23:04:11*nif quit (Ping timeout: 252 seconds)
23:04:36*darithorn_ joined #nim
23:05:19FromGitter<kaushalmodi> No problem! I'm just spreading the word, your work. I see that you're very passionate about programming. I hope that someone from my followers takes a peek at your code, and give you a ping.
23:05:20*deepend quit (Client Quit)
23:05:58*nif joined #nim
23:07:04*darithorn_ quit (Client Quit)
23:07:26*darithorn_ joined #nim
23:07:31*darithorn_ quit (Client Quit)
23:07:38*deepend joined #nim
23:08:16*darithorn joined #nim
23:09:18FromGitter<zacharycarter> :) I really appreciate it - hopefully in the future I can pay it forward to you or another Nim community member
23:12:05FromGitter<zacharycarter> Brian Ketelsen retweeting your tweets also really helps out :P
23:17:11*skellock joined #nim
23:25:40*opi_ joined #nim
23:27:08*Kassandry0 joined #nim
23:27:44*PrimHelios joined #nim
23:27:46*PrimHelios quit (Client Quit)
23:28:00*Kassandry0 quit (Remote host closed the connection)
23:29:27skellockso, that blog post i wrote the on friday had 31,000 views over the weekend. crazytown.
23:30:15*opi_ quit (Ping timeout: 250 seconds)
23:30:26skellockand 0 death threats.
23:32:42FromGitter<zacharycarter> good news all around!
23:32:54FromGitter<zacharycarter> I'm always behind zero death threats
23:33:57FromGitter<zacharycarter> this is why I get myself in trouble at work - ⏎ ⏎ ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=5ba97465eba8e60bc63d5693]
23:34:02FromGitter<zacharycarter> but seriously - what am I supposed to say?
23:34:14FromGitter<zacharycarter> my manager just effed me in the A and I'm going to take it silently?
23:40:57FromGitter<gogolxdong> fire you manager.
23:42:51FromGitter<zacharycarter> I think my entire organization needs a refresh
23:43:15FromGitter<zacharycarter> basically they're telling me - in not so many words - that my six years of experience / knowledge gained from working there is less valuable than new hires they can potentially recruit
23:45:18FromGitter<zacharycarter> I'm internalizing it thusly - I mean, if they prefer candidates / employees who don't understand what type-safety is, what a pointer is, how to gain performance benefits from native code - then fine, they can dwell in their own mediocrity in terms of producing good software.
23:45:42FromGitter<zacharycarter> not that I produce anything better - but I feel like I have ideas and values that are constantly dismissed because they require actual change and thinking about improvement
23:48:26FromGitter<zacharycarter> like the fact that all of carfax's service to service communication is still carried out over HTTP / JSON
23:48:35FromGitter<zacharycarter> this is backend services talking to other backend services
23:48:45FromGitter<zacharycarter> and then they will spend 3+ months optimizing a react frontend
23:48:49FromGitter<zacharycarter> just totally clueless
23:51:20*PrimHelios joined #nim
23:56:12*noonien quit (Quit: Connection closed for inactivity)
23:57:42FromGitter<kayabaNerve> Wtf
23:57:49FromGitter<kayabaNerve> HTTP/JSON backend services?