<< 22-09-2018 >>

00:04:23FromDiscord<exelotl> So I have this awkward chicken and egg situation. Macro generates procedures, each proc refers to an index in a constant array, but the number of items in the array depends on how many times the macro was called
00:06:39*SenasOzys__ joined #nim
00:06:41FromDiscord<Shield> exelotl, you're still using an array of procs to deal with dynamic dispatch?
00:08:07FromDiscord<exelotl> Well, that's my plan but I'm struggling to find a way to make it work currently x)
00:12:06FromDiscord<Shield> turns out, an array of callbacks is twice as slow as a switch statement (which is a little bit faster than a chain of ifs when you have a lot of elements), better stick to nim's dynamic dispatch or generate your own as a switch statement if you want speed
00:15:53*darithorn joined #nim
00:16:07FromDiscord<exelotl> Oh I see. I'll have to look into that, cheers
00:17:02*Aniar27 joined #nim
00:19:37FromDiscord<exelotl> I did take a look at the compiled C for methods when there are lots of subclasses, and yep I'm very convinced it doesn't scale well
00:20:18*Aniar27 quit (Remote host closed the connection)
00:23:26*stefanos82 quit (Quit: Quitting for now...)
00:25:03FromGitter<rayman22201> @exelotl https://gist.github.com/rayman22201/ffa0a3274800d4cefc11f1d3a25368a9
00:25:38FromGitter<rayman22201> Shield is right, you should use switch statements, but you can do computations / keep counts in macros, in case you ever need that feature.
00:25:42FromDiscord<Shield> always benchmark, you'd be surprised, the compiler can't optimize a callback nor inline it, while for switchs and ifs it can, some optimizations are black magic tier
00:29:21FromGitter<rayman22201> You are correct Shield. I agree with you about callbacks. I was just making point about exelotl's original question about counting inside a macro. A different kind of black magic :-P
00:35:30*darithorn quit (Quit: WeeChat 2.2)
01:21:09FromGitter<kayabaNerve> That troll issue from earlier? Only thumbs up was himself. My favorite line was: ⏎ `5 results for 'sanity checks' (extremely ableist and derogatory to non-sane aneurotypical persons (like me))`
01:22:27FromGitter<rayman22201> lol. At least they are honest?
01:23:04FromGitter<kayabaNerve> Lol. I'm not trying to create the environment he's saying exists in his troll and blame him for any neuro stuff. I just think it's hilarious we have a ridiculous issue based on the premise random numbers was purposefully designed to promote Nazism within the Nim compiler, and the writer is admitting to being "aneurotypical".
01:23:47*krux02 quit (Remote host closed the connection)
01:27:23FromGitter<kayabaNerve> And then Linux is... something. I like their new code of conduct's content, but I felt it was rushed and the process should've been better. I also think that the... alt-left crowd is blowing it out of proportion *and actually violating it by launching personal attacks against those that disagree*. I fully support inclusion, but can we all relax a bit here? ⏎ ⏎ Code is code. People shouldn't be insulted by
01:27:23FromGitter... things that can be construed one way unless the author meant it to be taken that way. What's next, a RISC-V fork that uses 7 bit bytes (no 14, no 88, no 0 because everyone is something...) and only runs software that never ever prints the letters HH next to each other?
01:28:50FromGitter<barcharcraz> There is no alt-left
01:32:15FromGitter<rayman22201> Trolling is trolling, no matter the politics. It's never the right way to enact positive change, but that is modern society / the internet for you....
01:38:13*beowulf19 joined #nim
01:40:33FromGitter<kayabaNerve> @barcharcraz Every side has its extremes. Call it what you will. I don't mean communism, but rather radical feminism (make men pay reparations), people can identify as paperclips... The sort of crap that makes it look like everyone who X (gay, feminist, transgender) is mentally ill.
01:41:47FromDiscord<Shield> i hope nim will stay safe from this bullshit
01:43:22*beowulf19 quit (Ping timeout: 246 seconds)
01:44:29*daddesio7 joined #nim
01:45:21*daddesio7 quit (Killed (Sigyn (Spam is off topic on freenode.)))
01:53:09*ShadowKyogre16 joined #nim
01:54:49*ShadowKyogre16 quit (Killed (Sigyn (Spam is off topic on freenode.)))
01:59:37FromGitter<barcharcraz> Ok there is no movement identified as the alt-left. The alt right is a movement with real members and organization.
02:03:47FromGitter<kayabaNerve> The alt-right is a label applied to groups with certain beliefs. It's not a single organization with a specified structure. ⏎ ⏎ Alt-left is a term mostly used by alt-right people to defend themselves by saying the other side has the same issues (deflection). I don't mind the term because it does point out that there are some leftists who are just as bad as the people in the alt-right, and people understand what
02:03:48FromGitter... I'm saying. When I say radical leftist, people think I mean Socialist/Communist, not social advocates who advocate lunacy (88 is not an acceptable number for use in programming).
02:15:00FromDiscord<deech> Stupid and dumb are pretty inflammatory. Might be worth addressing those if there are indeed 24 references to them ...
02:28:55*mcc joined #nim
02:35:36*dddddd quit (Remote host closed the connection)
02:45:44FromGitter<kayabaNerve> deech Sounds like a dumb idea
02:46:34FromGitter<kayabaNerve> Joking. That said, I'm guessing it's in the manner of: "X and Y can be done. X is done because Y is stupid because it's more complicated and slower." That isn't a problem at all IMO.
02:47:02c15ade4> i hope nim will stay safe from this bullshit -> Well you guys are are the ones talking about it, just close nonsense issues and move on
02:48:15c15ade4that issue reads like a false flag troll type of situation anyway.
02:56:15*leorize quit (Ping timeout: 252 seconds)
02:58:52*leorize joined #nim
02:59:49FromDiscord<Shield> it is, just take a close look to his avatar
03:06:54*darithorn joined #nim
03:11:53c15ade4"guys/girls" * ;)
03:12:37c15ade4The real danger is when it is a real troll on either side trying to go undetected
04:00:36*darithorn quit (Quit: WeeChat 2.2)
05:03:17*kapil___ joined #nim
05:08:58*skrylar joined #nim
05:08:58*skrylar quit (Client Quit)
05:09:55*taaperotassu11 joined #nim
05:12:24*taaperotassu11 quit (Remote host closed the connection)
05:22:18*Cthalupa quit (Ping timeout: 272 seconds)
05:24:29*Cthalupa joined #nim
05:31:11*SenasOzys__ quit (Ping timeout: 260 seconds)
05:31:26*SenasOzys quit (Read error: Connection reset by peer)
05:35:12*SenasOzys joined #nim
05:35:50*miran joined #nim
05:35:52*SenasOzys__ joined #nim
05:45:55*wildlander quit (Quit: Konversation terminated!)
05:46:58*jcase9 joined #nim
05:47:52*mchang_28 joined #nim
05:49:29*jcase9 quit (Remote host closed the connection)
05:50:27*mchang_28 quit (Remote host closed the connection)
06:14:55*stefanos82 joined #nim
06:35:25*Ven`` joined #nim
06:39:38*Ven`` quit (Ping timeout: 245 seconds)
06:45:17*xet7 joined #nim
06:48:55*Ven`` joined #nim
06:50:26*trCody joined #nim
06:51:01*TheLemonMan joined #nim
06:55:19*trCody quit (Remote host closed the connection)
06:56:09*Ven`` quit (Quit: My MacBook has gone to sleep. ZZZzzz…)
06:56:28*Ven`` joined #nim
06:57:46*ftsf quit (Ping timeout: 244 seconds)
06:59:02*vBm17 joined #nim
07:00:09*vBm17 quit (Remote host closed the connection)
07:05:19*Ven`` quit (Quit: My MacBook has gone to sleep. ZZZzzz…)
07:05:22*ftsf joined #nim
07:09:15*rockcavera quit (Read error: Connection reset by peer)
07:10:16*rockcavera joined #nim
07:10:16*rockcavera quit (Changing host)
07:10:16*rockcavera joined #nim
07:23:11*Cthalupa quit (Ping timeout: 260 seconds)
07:24:10*Cthalupa joined #nim
07:24:18*Ven`` joined #nim
07:28:50*Ven`` quit (Ping timeout: 252 seconds)
07:31:13*Trustable joined #nim
07:31:22*Trustable quit (Remote host closed the connection)
07:32:08*rockcavera quit (Remote host closed the connection)
07:32:09*Trustable joined #nim
07:32:24*rockcavera joined #nim
07:32:24*rockcavera quit (Changing host)
07:32:24*rockcavera joined #nim
07:33:58*Ven`` joined #nim
07:34:30*krux02 joined #nim
07:34:33*mcc quit (Quit: Connection closed for inactivity)
07:45:59*rockcavera quit (Read error: Connection reset by peer)
07:46:45*rockcavera joined #nim
07:50:47*rockcavera quit (Read error: Connection reset by peer)
07:51:07*rockcavera joined #nim
07:51:07*rockcavera quit (Changing host)
07:51:07*rockcavera joined #nim
08:01:18*Ven`` quit (Quit: My MacBook has gone to sleep. ZZZzzz…)
08:03:57*gmpreussner_ joined #nim
08:04:10*gmpreussner quit (Ping timeout: 246 seconds)
08:22:12*Ven`` joined #nim
08:26:29*chke12 joined #nim
08:26:37*chke12 quit (Remote host closed the connection)
08:57:54FromGitter<tim-st> `set[T]` doesn't has the `len` alias for `card`, should it get it too like `HashSet[T]` got it?
08:59:22FromGitter<tim-st> also I often try to call `add` on a set/HashSet which doesn't work then I see it's `incl` here
09:01:08*leorize quit (Quit: WeeChat 2.2)
09:12:49Araq`len` needs to count the bits and we don't want to encourage that
09:13:05Araq`add` is append in Nim, not incl
09:17:06miranAraq: i don't get your first point, if we make `len` to be just an alias for `card`. it is already there, we just add another name, no?
09:18:34TheLemonManAraq, wild idea: a `reset` procedure for closure iterators that works only if the current state is -1 (aka the iterator has been completely consumed)
09:22:46*stefanos82 quit (Quit: Quitting for now...)
09:24:31dom96hey guys
09:25:25dom96Brilliant article: https://t.co/SD1pqhqwu2
09:29:18*ftsf quit (Ping timeout: 272 seconds)
09:32:27FromGitter<tim-st> yes, `card` is already there, so it would be the same like for HashSet, I think when I add an element to a set it has the same effect as when I include an element in a set in general
09:33:18FromGitter<tim-st> I just saw the syntax `someSet != {}` and thought why not test the length and saw only card is there
09:33:44Araqsets are kinda special, someSet != {} is faster than len == 0
09:33:49Araqwell actually, no.
09:34:02Araqlen == 0 should become isEmpty
09:34:21Araqbut it would be yet-another-thing in system.nim ...
09:34:40FromGitter<tim-st> yeah, I assumed it's special in a bitset so I asked here, maybe it's ok to not have it, not sure what's better
09:36:32AraqisEmpty is important for Nim's future though, should write a blog post...
09:48:17dom96This mentions Nim: https://packnback.github.io/blog/programming_languages/
09:48:37dom96It's interesting to see how it compares to other languages according to the author
09:49:46*leru joined #nim
09:52:23*enthus1ast_ joined #nim
09:52:36*enthus1ast quit (Ping timeout: 252 seconds)
09:52:41livcdthat's weird it says 3.5perf for Go, 4 for Java and 4.5 for Nim
09:52:54*enthus1ast_ left #nim (#nim)
09:53:11*enthus1ast joined #nim
09:53:42dom96yeah, it's pretty subjective I guess
09:54:12enthus1astcan someone opensource its irc bouncer for me? :)
09:59:45*chemist69 joined #nim
10:01:14*erikig joined #nim
10:01:31chemist69Good morning. Is there any resolution to the cross-compiling isssue https://github.com/nim-lang/Nim/issues/8081?
10:01:58chemist69Cross-compilation is a quite important feature of Nim to me.
10:05:08dom96should be easy to workaround, no?
10:07:12chemist69I have not found a way so far.
10:07:41dom96ln -s /usr/bin/gcc /usr/bin/gcc.exe?
10:07:44dom96something like that
10:08:39chemist69Oh, you mean on my system? I had not thought of that. That should indeed work.
10:08:48TheLemonManshould be easy to fix, using system.{hostOS,hostCPU} for the host part could make it work
10:11:07*erikig quit (Ping timeout: 256 seconds)
10:12:40FromGitter<Bennyelg> ```One problem is that if the creator lost interest the project would grind to a total halt, which may be a reason for the lack of adoption```
10:12:46FromGitter<Bennyelg> what the hell is he talking about?
10:13:39TheLemonMandom96, ping
10:13:56dom96Just ask. I'm here
10:14:23dom96Bennyelg: He's talking about Araq giving up
10:14:44FromGitter<Bennyelg> Dosen't seems to be that Araq is giving up
10:14:47TheLemonMandid you have a look at #3075? I'd send a patch but I don't know how .async. is supposed to work with nested procedures
10:14:49FromGitter<Bennyelg> does he ?
10:16:25FromGitter<Bennyelg> @dom96
10:16:51dom96Of course, Araq isn't giving up
10:17:08dom96He's saying "If he does give up, Nim will be dead"
10:17:18dom96Which isn't necessarily true
10:17:29*tankf33der joined #nim
10:17:38dom96And Araq has been passionate about Nim for a long time now
10:17:39tankf33dero/
10:17:42dom96It's unlikely he'll give up
10:18:10dom96TheLemonMan: Only skimmed it
10:18:49dom96The semantics should be the same as normal async procs
10:19:02dom96I think the {.async.} pragma should just skip nested procs
10:24:44*dddddd joined #nim
10:27:30*chemist69 quit (Ping timeout: 264 seconds)
10:29:23FromGitter<Bennyelg> @dom96 is organization such google / facebook was backing up nim
10:29:37dom96That would be nice
10:29:42FromGitter<Bennyelg> nim were ruled in plenty of areas / backend system and more
10:29:54AraqStatus is backing up Nim and we're hiring fwiw
10:30:15FromGitter<Bennyelg> @Araq yea it's a huge start throw the future
10:30:17FromGitter<Bennyelg> So sad people are adopting Go.
10:30:33FromGitter<Bennyelg> Go is one of the most idiot languages created (my opinion )
10:30:37dom96Yeah, and I work at Facebook now so we'll see what I can achieve :)
10:30:50FromGitter<Bennyelg> @dom96 Cool
10:31:03FromGitter<gogolxdong> proud of you.
10:31:13Araqdom96, that didn't work well for D-lang, afaict :-)
10:31:15TheLemonManif the inner procedures should not interact with the parent futures/whatever then skipping those in the macro makes sense
10:31:35dom96Araq: Yeah, but D lang didn't/doesn't have as great of interop with C++ as we do
10:31:53AraqI don't know
10:32:08TheLemonMantheir C++ interop is quite nice I'd say
10:34:18*Ven`` quit (Quit: My MacBook has gone to sleep. ZZZzzz…)
10:37:19Araq"No artifacts were published. Make sure you have specified correct artifacts filter"
10:40:40dom96yeah, well, I don't have high hopes so I'm not promising anything. But I will certainly try to introduce it to my colleagues :)
10:42:12TheLemonManwith Nim they'll be able to do more unethical things in less time!
10:43:10FromDiscord<Shield> i'd like some help, which library do i need to use to make an overlay tool which controls mouse movement? basically I want to make a tool where you can edit bezier curves and make the mouse snap to the curve to draw smooth lines (the drawing is handled by a paint program)
10:43:14c15ade4TheLemonMan: you haven't seen the RFC for the new ethics system
10:43:42TheLemonManholy fuck, nowadays there's a RFC for everything
10:44:14c15ade4Oh, I haven't seen it either
10:44:22c15ade4:P
10:44:46dom96Shield: that's quite involved. But you'll need either some GUI framework (Qt/GTK) or draw using SDL2/SFML/OpenGL
10:45:24FromGitter<gogolxdong> yes, it's hard to do that in big company unless you become Boss.
10:45:50enthus1astif you are admin its also easy
10:45:53enthus1ast;)
10:46:39c15ade4I think facebook and google are more likely to fire you for sneaking a non approved language than a smaller company
10:46:45enthus1astsome kfc infrastructure runs on nim but i think they don't know :)
10:46:52c15ade4lol
10:47:10TheLemonManKFC?
10:47:13enthus1astyeah
10:47:13FromGitter<Bennyelg> lol
10:47:25c15ade4brb going to buy some chicken
10:47:27FromGitter<Bennyelg> I loved KFC till I became planed based diet eater
10:47:28TheLemonManthat's why it tastes like shit!
10:48:26c15ade4TheLemonMan: nono, the delicious parts are nim, the bad parts are probably java
10:49:06enthus1astbut only in europe can't speak about US or worldwide
10:49:25FromDiscord<Shield> I already use sdl2 and sfml and can learn QT, i guess my problem is how to make it an overlay to another app and letting inputs go through
10:50:05enthus1astShield on windows i've done something like this with windows draw functions and a global hook
10:50:49*poppyschmo9 joined #nim
10:50:54*poppyschmo9 quit (Remote host closed the connection)
10:51:07FromDiscord<Shield> which library did you use?
10:51:11enthus1astnone
10:51:43dom96Facebook has a great culture when it comes to these things
10:52:24dom96https://news.ycombinator.com/item?id=18045464
10:52:28dom96Anyone want to try this in Nim?
10:52:33dom96I'll be boarding a plane soon
10:52:37FromDiscord<Shield> how do you access windows draw functions from nim?
10:55:39dom96same as you access all other FFI functions
10:55:41dom96see winlean.nim
10:56:59FromDiscord<Shield> i'll try it, thanks
10:58:15enthus1astShield when you draw directly your application must draw all the time cause its get overdrawn by other applications, for me back then it was not a real issue since i've made some overlay for a game
11:01:39enthus1astShield and there is an example for a windows low level hook https://gist.github.com/enthus1ast/8485cd4612cc7d797f3ab4fd3ed4862c
11:06:01*Cthalupa quit (Ping timeout: 260 seconds)
11:06:22c15ade4does the nim memory allocator use malloc?
11:07:00*Cthalupa joined #nim
11:08:30*xet7 quit (Remote host closed the connection)
11:10:07c15ade4if I wrote a library with nim, set gc to stack or off, calls into the lib entry points would be fine?
11:10:14c15ade4no leaks at all?
11:11:04*enthus1ast_ joined #nim
11:13:27*enthus1ast quit (Ping timeout: 252 seconds)
11:13:55*enthus1ast_ left #nim (#nim)
11:14:13*enthus1ast joined #nim
11:16:31*Cthalupa quit (Ping timeout: 260 seconds)
11:18:05*Cthalupa joined #nim
11:21:19krux02c15ade4, the memory allocator is thread local
11:21:52krux02so when you alloc memory it is not just a plain wrapper to malloc
11:26:37FromDiscord<Shield> winlean doesn't seem to expose drawing functions
11:27:08enthus1astmaybe winim does?
11:28:05livcdI just got this in my rss: https://totallywearingpants.com/posts/nim-underdog/
11:28:57enthus1astShield https://github.com/khchen/winim/blob/3172812051c95bfdd30815d879b65d8017a48527/examples/hellowin.nim
11:30:33*kapil___ quit (Quit: Connection closed for inactivity)
11:31:39*vivus joined #nim
11:32:32FromDiscord<Shield> works, thanks
11:41:36FromGitter<mratsim> @livcd: https://news.ycombinator.com/item?id=18045259
11:44:12FromGitter<mratsim> apparently we are cooler than Go people :P: https://www.reddit.com/r/programming/comments/9hyj8m/a_programming_language_underdog/e6fivq6/
11:44:43FromGitter<mratsim> And Araq is open to discussion :thinking_face: :D
11:48:18*Trustable quit (Remote host closed the connection)
11:48:57*leru_ joined #nim
11:49:51FromGitter<Bennyelg> In did fantastic sumup https://totallywearingpants.com/posts/nim-underdog/
11:49:58*Ven`` joined #nim
11:51:44*leru quit (Ping timeout: 252 seconds)
11:52:53Araqso ... who will be my appveyor hero?
11:53:01Araqcan't get artifacts to upload
11:55:19*nc-x joined #nim
11:56:20*xet7 joined #nim
12:00:31*tankf33der left #nim (#nim)
12:01:37*nc-x quit (Ping timeout: 256 seconds)
12:06:13livcdshevy's comments are strange
12:06:23livcdsome are good and some are just trolling
12:10:01*stefanos82 joined #nim
12:10:29FromGitter<mratsim> @Araq ask @arnetheduck he seems to be on a CI journey :P
12:12:27*notbot[m] joined #nim
12:14:53notbot[m]Hey guys. I just started looking into Nim again after considering it years ago (and getting (temporarily?) waylaid by Rust).
12:14:54notbot[m]Is it just me, or has Nim become a lot less Pascalish and a lot more Pythonic?
12:15:35notbot[m]My main go-to language is python, so that'd be a good thing, But... how did that happen? Is the language syntax still in flux?
12:18:04*enthus1ast quit (Ping timeout: 240 seconds)
12:19:11krux02Nim isn't trying to be Python
12:19:21krux02Nim is just trying to be painless
12:19:39notbot[m]Not what I mean. I mean, didn't it have := as an assignment operator, and things like that?
12:19:51krux02not in the time I am here
12:20:00krux02but there is ``let x : int = 123``
12:20:12krux02but no ``:=`` as a builtin operator
12:20:13krux02that was go
12:21:15notbot[m]Now I feel like I'm going mad :) Not sure if it was just AGES ago, or if I'm thinking of some other language that was nascent at the time :)
12:22:00*SenasOzys quit (Ping timeout: 252 seconds)
12:22:08*SenasOzys__ quit (Ping timeout: 245 seconds)
12:22:41notbot[m]Another question: how new is nimble? Seems like there aren't many packages for it yet. Is that a number of language users problem, or just a new-package-manager-give-it-time problem?
12:23:03*nsf joined #nim
12:23:09krux02it is a small language problem.
12:23:32notbot[m]OK, thanks
12:24:02krux02you have to start somewhere.
12:24:56krux02but to be honest it is not about quantity, it is about quality.
12:25:48krux02the question is what packages are you looking for?
12:25:54notbot[m]It's no criticism :) I like a lot of nim's choices. It just means I have to be careful about what I use it for until it's more popular.
12:26:08notbot[m]Didn't see much in the way of ORMs, for instance.
12:26:19krux02there is
12:26:25krux02I think
12:26:25notbot[m]Oh?
12:26:28stefanos82karax
12:26:47notbot[m]I know there's one... not sure if that's the one I looked at.
12:27:03stefanos82wait...karax is for SPA
12:27:11krux02but it depends on what you expect from an "ORM" in Nim, because Nim isn't focused on object oriented principles
12:27:33stefanos82I meant Ormin
12:27:38stefanos82https://github.com/Araq/ormin
12:28:24notbot[m]Yeah, that's good. I don't think OOP is the be-all-and-end-all that most people think it is. OOP is essentially just "functions with a default first argument", which is another way of saying, "functions with limited first arguments" ;)
12:29:07krux02don't forget the dynamic dispatch and the inheritance based polymorphism.
12:29:40krux02My personal recommendation is, don't use inheritance, composition is better in most cases.
12:29:44notbot[m]Yeah, that's the one I looked at. It seems cool, but lower level than I was hoping for. Certainly not as well thought out and polished as something like SQLAlchemy.
12:29:45notbot[m]Which again, is fine... might even write one... just trying to get a handle on what I'm dealing with here :)
12:29:56livcdWhat would you talk about when it comes to Nim to people that never heard of Nim ?
12:30:23krux02notbot[m], the idea of Nim isn't to give you a super advanced framework with everything integrated.
12:30:49krux02It is more like a tool that is very bendable and you can adjust it to do all your needs.
12:31:01krux02For example it is easy to write macros.
12:31:15krux02very little friction in that area to get started.
12:31:40notbot[m]Yeah. Composition = better. I also like D-like "aftermarket" overloading of datatypes (which Rust can't really do, except in the same module that defines the type). I **think** nim does that, from what I've seen, right?
12:31:41notbot[m]i.e., I think you can write a library that augments functionality from other libraries (for example, adding a to_json() function for another library's types), right?
12:32:16krux02you overload functions/procedures, not datatypes
12:32:42notbot[m]Semantics.
12:33:12krux02but yes, you can just add a ``proc to_json(self: SomeType): string`` and then call it with ``myvalue.toJson``
12:33:50krux02it is certainly bad style to chage snake_case to camelCase on the fly, but possible.
12:34:39notbot[m]Cool. And it doesn't matter where SomeType is defined? Does SomeType even have to be written in nim, or can it be imported from JNI/C/C++/whatever too?
12:35:16notbot[m]i.e., SomeType is just data, and you're overloading the FUNCTION alone, as you say, right?
12:35:16krux02well you need a declaration in Nim, but you can hack it to be a type defined in C/C++/Javascript
12:35:42krux02yes you just overload the function alone
12:35:56krux02you don't modify a class and insert a method or something.
12:36:09krux02you just add another overload to the function
12:36:18notbot[m]Cool. Between those extension functions and AST macros alone, it should be a VERY capable language. Love the C++ and JNI compatibility etc. too, though
12:36:37krux02JNI?
12:36:42krux02you mean java?
12:36:57krux02did someone write a java interface that I don't know?
12:37:18notbot[m]Yeah, saw a library for that which looks pretty natural. https://github.com/yglukhov/jnim
12:37:37krux02ah
12:37:38krux02ok
12:37:39notbot[m]Not sure why the library looks like a person, but nevermind ;)
12:37:43krux02I didn't use it
12:38:04krux02looks like a person?
12:38:38notbot[m]kidding. It's showing the repo owner's photo in matrix.
12:38:43*SenasOzys__ joined #nim
12:38:50*SenasOzys joined #nim
12:39:10*Vladar joined #nim
12:39:14notbot[m]Forgot others are just using plain IRC :)
12:39:42krux02yea I am using IRC
12:40:00krux02mut matrix is nice, it shows me your username as your username with a tag that it is from matrix
12:40:18krux02other bridges just show the botname there
12:40:29krux02but ok
12:41:03krux02have you looked at the emit statement in Nim?
13:13:09Araqnotbot[m], Nim never had :=
13:13:32Araqand the syntax didn't change much
13:14:08*brett1911 joined #nim
13:15:27stefanos82hey, Nim is #1 in HN :D
13:15:33stefanos82https://totallywearingpants.com/posts/nim-underdog/
13:15:49*brett1911 quit (Killed (Sigyn (Spam is off topic on freenode.)))
13:27:52*wh0pie joined #nim
13:29:48stefanos82dom96: great job for sharing the link mate ^_^
13:30:24FromGitter<mratsim> and on reddit
13:31:11*wh0pie quit (Remote host closed the connection)
13:31:16notbot[m]Hadn't head of reason. The website had me until 'npm install' ;)
13:40:50*abeaumont joined #nim
13:47:37FromGitter<Bennyelg> @dom96 I hope you are planing on writing "Advanced concepts in Nim" book
13:48:32notbot[m]yglukhov: Any examples for 'android'? And can it access bluetooth etc.?
13:49:01*kapil___ joined #nim
13:49:31*jmcgnh21 joined #nim
13:56:34*jmcgnh21 quit (Ping timeout: 272 seconds)
14:13:20stefanos82@Bennyelg: In my humble opinion, we need such kind of book, but as part of official docs so we can help with examples, typos, and bug fixes.
14:20:37FromGitter<mratsim> advanced concepts are likely to be broken every month or so :P
14:22:54*leorize joined #nim
14:23:00*wildlander joined #nim
14:23:11stefanos82thus my suggestion
14:23:26stefanos82it should be community's responsibility to keep the docs up to date ;) :P
14:24:05FromGitter<mratsim> As long as community == evryone but me, fine ;)
14:24:33stefanos82this is applicable to everyone
14:26:39*u0_a204 joined #nim
14:27:26*stout joined #nim
14:30:58*u0_a204 left #nim (#nim)
14:31:01TheLemonManmratsim is above the law, he doesn't want none of your dirty boring concepts!
14:32:58*stout quit (Remote host closed the connection)
14:38:04*Xen010 joined #nim
14:41:49FromGitter<Clyybber> Araq This should be closed, right? https://github.com/nim-lang/Nim/issues/7010
14:42:07*SenasOzys quit (Ping timeout: 240 seconds)
14:42:09*Xen010 quit (Killed (Unit193 (Spam is not permitted on freenode.)))
14:42:27*SenasOzys__ quit (Ping timeout: 252 seconds)
14:42:56TheLemonMandone!
14:43:04FromGitter<Clyybber> Nice
14:49:54stefanos82TheLemonMan: so @mratsim is this man? https://i.imgflip.com/22e0rv.jpg
14:54:33federico3https://totallywearingpants.com/posts/nim-underdog/
14:55:10*SenasOzys joined #nim
14:55:15*SenasOzys__ joined #nim
14:59:13miranam i the only one here who didn't post a link to that article (or HN discussion of it)? :P :D
15:00:24TheLemonManmiran, hey have you read https://totallywearingpants.com/posts/nim-underdog/ ?
15:01:00TheLemonManand if you need some hateful comments you're free to choose between reddit and HN
15:01:32stefanos82federico3: lol, I shared it too and afterwards I realized it was shared on HN by dom96
15:02:13TheLemonManlobste.rs is more...moderate for the lack of a better term, so it doesn't really count
15:15:27miranTheLemonMan: thanks for the link, i'll definitely take a look! btw, there is a HN disussion about nim: https://news.ycombinator.com/item?id=18045259
15:21:07FromGitter<mratsim> I sense a troll disturbance in the Force
15:37:48FromDiscord<exelotl> Is there a way to do 'extern const' in Nim? I want to have an array that everything can refer to but I don't know the value of that array until the end of the main file
15:41:39*rainey joined #nim
15:41:57Araqyou can hack it via var x {.compileTime.}; ... ; const c = x but maybe the compiler is too picky about it
15:42:01TheLemonManwild guess, declare it as a compilervar and fill it later?
15:42:31*rainey quit (Killed (Sigyn (Spam is off topic on freenode.)))
15:44:33FromDiscord<exelotl> Thanks I'll give that a try :)
15:44:36FromDiscord<exelotl> TheLemonMan: what do you mean compilervar?
15:45:13TheLemonManI meant compileTime, there are too many pragmas
15:46:35Araqwe have a 'pragma' pragma for that
15:48:15FromGitter<mratsim> you should rename that ouroboros
15:48:37TheLemonManRFC: drop everything but the .emit. pragma
15:49:22FromGitter<mratsim> and {.asm: “”.}
15:51:42TheLemonManand let's add {.rust: "".}
15:58:02FromGitter<mratsim> {.zig: “”.}
16:01:14*PMunch joined #nim
16:04:01*MyMind joined #nim
16:05:09FromGitter<zacharycarter> zig does look interesting
16:05:19FromGitter<zacharycarter> but I've never played with it or found a compelling reason to
16:05:51*Sembei quit (Ping timeout: 252 seconds)
16:08:02*PMunch quit (Ping timeout: 252 seconds)
16:09:45*wollw21 joined #nim
16:09:55*wollw21 quit (Remote host closed the connection)
16:10:31*springermac2 joined #nim
16:11:18FromGitter<Bennyelg> zig synax : Oo ⏎ ⏎ ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=5ba669a6d655361f763a1c24]
16:11:39FromGitter<Bennyelg> I never saw something worse than that.
16:14:26TheLemonManI double dog dare you to write that in brainfuck then
16:15:17*springermac2 quit (Remote host closed the connection)
16:15:27*tholin28 joined #nim
16:15:40miranyglukhov[m]: nimpy uses system python? can i specify another one?
16:17:07*tholin28 quit (K-Lined)
16:17:28TheLemonManmiran, hijack the LD_LIBRARY path
16:18:57miranTheLemonMan: i need to use conda's python, which has all libraries i would like to use. i didn't see `LD_LIBRARY` in nimpy's source?
16:19:29TheLemonManmiran, it uses loadLib under the hood (that, in turn, uses dlopen)
16:21:00*PMunch joined #nim
16:21:10miranTheLemonMan: i'll open an issue
16:25:26notbot[m]miran: knowing nothing about nimpy, I assume it would use whatever virtualenv is setup on the python side.
16:26:04mirannotbot[m]: if i do `which python`, it shows the path to conda's python
16:26:44TheLemonMantry with LD_DEBUG=all ./my_nimpy_program
16:27:26*rockcavera quit (Remote host closed the connection)
16:33:13FromGitter<mratsim> I would be surprised if it doesn’t load your virtualenv python
16:33:36FromGitter<mratsim> Always relevant: https://xkcd.com/1987/
16:34:13notbot[m]Eh. Python is only messed on on messed up operating systems :)
16:34:56FromGitter<zacharycarter> what operating system isn't messed up?
16:35:05FromGitter<zacharycarter> they're all terrible
16:35:43FromGitter<mratsim> I like Arch, Python is actually sane there
16:35:43notbot[m]works fine on linux
16:36:07FromGitter<zacharycarter> I still think python is a mess
16:36:10FromGitter<zacharycarter> no matter what OS you're on
16:36:28notbot[m]Think I found the mac user ;)
16:36:30FromGitter<zacharycarter> even the version incompatibilities are enough to turn me off
16:36:34TheLemonManone could detect the "right" libpython directory by calling the 'python' binary during the startup
16:36:35mirannotbot[m]: i'm on linux, btw. (and it doesn't work)
16:36:45TheLemonManbut that feels.. dirty?
16:36:54notbot[m]try virtualenv. distros are a different issue, though.
16:38:38miranhttp://ix.io/1nhw/ this prints system's python at my end
16:39:10*Ven`` quit (Quit: My MacBook has gone to sleep. ZZZzzz…)
16:39:25notbot[m]what does ldd say?
16:41:21TheLemonManhmm, are you running the nim program in the activated virtualenv?
16:41:29miranTheLemonMan: nope
16:41:53TheLemonMantry that, the activation routine appends the right paths to PATH and LD_LIBRARY_PATH
16:43:01notbot[m]yeah, you have to actually activate the env (i.e., source yourvirtualenvdir/bin/activate; ./path/to/your/nimexe
16:43:59mirani'm having some problems with fish shell and activating env, let me try to fix this
16:53:49*opi_ quit (Ping timeout: 250 seconds)
16:56:04*Ven`` joined #nim
17:00:36*Ven`` quit (Client Quit)
17:01:55*opi_ joined #nim
17:11:40miranok, so here's the thing. it seems nimpy will use conda's python only if there is active virtualenv. if the base/root env is active — no luck there
17:12:37AraqPython is ok on Windows...
17:13:34TheLemonManehh... how is dlopen supposed to know about your custom virtualenv heh
17:14:23miranTheLemonMan: i still don't understand why `(foo)` env is recognized, but `(base)` is not?
17:15:09TheLemonMancheck if it modifies the LD_LIBRARY_PATH as needed
17:15:28Araqhmm we need a new tag... "sophistry"
17:15:31*Menche joined #nim
17:15:59Araqthat I can put on RFCs...
17:16:23Araq"[RFC] The Nim compiler does not write the program for me"
17:18:20miranno wait, nimpy still uses system's python, but it can import libraries from a virtualenv! my head starts to hurt! :D
17:18:31FromGitter<mratsim> Obligatory CommitStrip @Araq: https://www.commitstrip.com/en/2016/08/25/a-very-comprehensive-and-precise-spec/
17:19:18Araqso true
17:27:28TheLemonManAraq, isn't genAssignment a bit too eager with calling genRefAssign? If `src` is not allocated on the heap it's gonna crash and burn
17:28:01TheLemonManI'm trying to understand who's wrong: the transf pass or the codegen
17:28:04Araqwhat do you mean?
17:29:45TheLemonManif you have a genAssignment(dst=string on heap, src=string literal) the codegen's gonna emit a asgnRefNoCycle
17:30:30Araqsrc=string literal is impossible by design
17:30:50Araqwell "impossible" in quotes as it seems to be the bug you're hunting
17:31:12TheLemonManthe literal comes from a literal sequence of strings heh
17:42:12miran@mratsim: https://news.ycombinator.com/item?id=18046096
17:44:49FromGitter<citycide> karax hates me in particular
17:45:09FromGitter<citycide> shouldn't a render proc re-run when its parameters change?
17:49:27*bradparker27 joined #nim
17:53:32*bradparker27 quit (Remote host closed the connection)
17:54:46Araqthat's not how Karax works
17:55:40*Jesin quit (Quit: Leaving)
17:59:53*Ofkfa joined #nim
18:01:33FromGitter<citycide> well it's strange, I've got a `State` ref object and a render proc that accepts it and uses some of its properties, but I'm failing to re-render when those properties change
18:05:25*Ofkfa quit (Ping timeout: 256 seconds)
18:06:50Araqit's not strange, it's not how Karax works, Karax re-renders on events, not on property changes
18:07:54*rockcavera joined #nim
18:08:28*Jonta17 joined #nim
18:09:01*bsc joined #nim
18:10:56*Jonta17 quit (Remote host closed the connection)
18:11:27*bsc quit (Remote host closed the connection)
18:11:52FromGitter<citycide> bad term, just mean I'm struggling to make it re-render. I suppose I assumed there was a sort of dep tracking involved but I understand
18:13:17FromGitter<citycide> I'm also at the tail end of a ~1500+ line karax app so I'm getting edgy :)
18:17:32Araqkarax.redraw exists iirc
18:18:06Araqit's usually a code smell but if it helps to ship your app... ;-)
18:20:54FromGitter<citycide> heh. ideally I'd like to avoid those in the interest of help karax grow, this will be open sourced soon
18:22:50FromGitter<citycide> ... I mean there's probably a lot there already
18:26:40TheLemonManAraq, give a look at #8998 when you have a minute, it should be easy to review
18:34:59AraqTheLemonMan, oh yeah I've seen it, it's a completely strange solution
18:35:42Araqfirstly, I don't really know what 'typed' means as a return type.
18:36:23Araqsecondly, templates and macros are the same thing
18:38:30FromGitter<Clyybber> are? or arent?
18:38:37TheLemonMansomewhere in the compiler we skip another pass of semantic analisys, that's the best hand-wavy explanation I have
18:40:56Araqyes sure so fix the compiler :P
18:41:19AraqClyybber. are. only how the body is interpreted differs
18:49:05FromGitter<Clyybber> Oh, interesting
18:51:55stefanos82Araq: wait...what?
18:52:25stefanos82no wonder why I get confused with these two
18:52:45Araqstefanos82: I mean that template foo(params) is the same as macro foo(params)
18:52:58Araqfrom a caller's perspective
18:53:09stefanos82I just learned something new
18:53:14stefanos82very cool!
18:57:03FromGitter<Clyybber> Araq Is https://github.com/nim-lang/Nim/pull/8489 going to get merged soon?
18:57:55Araqyeah
18:58:06Araqbut after 0.19 is out
19:24:40*Trustable joined #nim
19:29:49*yawniek1 joined #nim
19:33:03*yawniek1 quit (Remote host closed the connection)
19:33:59*Reepicheep_ joined #nim
19:38:09*kapil___ quit (Quit: Connection closed for inactivity)
19:38:36*Reepicheep_ quit (Remote host closed the connection)
19:41:22*Jesin joined #nim
19:46:03*rockcavera quit (Remote host closed the connection)
19:46:30*vegax87 quit (Changing host)
19:46:30*vegax87 joined #nim
19:46:30*vegax87 quit (Changing host)
19:46:30*vegax87 joined #nim
19:56:38*Vladar quit (Remote host closed the connection)
20:00:39*trert joined #nim
20:00:44*brainproxy quit (Quit: WeeChat 2.2)
20:13:01*tonic23 joined #nim
20:14:41*tonic23 quit (Killed (Sigyn (Spam is off topic on freenode.)))
20:16:53*trert quit (Ping timeout: 256 seconds)
20:18:27*vivus quit (Remote host closed the connection)
20:34:51cavariuxOh, I thought 1.0 would be after 0.18
20:39:34*Jesin quit (Quit: Leaving)
20:40:56*miran quit (Quit: Konversation terminated!)
20:48:30*SenasOzys__ quit (Quit: Leaving)
20:52:41FromGitter<arnetheduck> cavariux, 1.0 is certainly coming after 0.18, just not necessarily directly after ;)
20:53:33cavariuxarnetheduck, haha can't beat that logic
20:54:19*dide932423 joined #nim
20:54:34*dide932423 quit (Client Quit)
20:57:26*Jesin joined #nim
21:04:19FromGitter<arnetheduck> with a `SomeSignedInt`, is there an easy way to cast it to a `SomeUnsignedInt` of the same size?
21:26:35*omenar joined #nim
21:29:24*nsf quit (Quit: WeeChat 2.2)
21:40:04*krux02 quit (Remote host closed the connection)
21:42:15FromGitter<kaushalmodi> ugh, *that guy* is back as a girl this time: https://github.com/nim-lang/Nim/issues/9038
21:44:14FromGitter<kaushalmodi> .. and is getting his/her team of trolls along with this time
21:48:22*Trustable quit (Remote host closed the connection)
21:48:41FromGitter<kaushalmodi> let's just not add comments *or reactions* to that thread this time .. and leave it open :D
21:50:44TheLemonMankaushalmodi, it's only gonna get worse https://github.com/crystal-lang/crystal/issues?q=is%3Aissue+is%3Aclosed
21:52:34FromGitter<Clyybber> @kaushalmodi Ugh, I commented before I saw your message/plan. Sry
21:53:01TheLemonManAraq, wrt #8998 we completely skip the template evaluation + semantic check by using a macro, check out opcIndCall in vm.nim and how it handles skTemplate calls
21:53:06FromGitter<kaushalmodi> That's what. Closing such issues will fuel the fire.
21:53:30FromGitter<kaushalmodi> Leave such issues open and give zero feedback and reaction
21:53:42TheLemonManthe end result is what we want there: the body is wrapped in something and feed into getAst
21:54:24FromGitter<Clyybber> @kaushalmodi On to deleting my comment
21:54:52TheLemonManand since we've already type-checked the body (since the param is `typed`) and we're going to analyse the macro output I think we're fine with that change
21:54:56FromGitter<Clyybber> Fuck ⏎ too late
21:56:54FromGitter<kaushalmodi> @Clyybber No worries. It's difficult to spread this message to everyone anyways. Someone will always reply even if everyone on this IRC/Gitter sticks to no-reply rule.
21:57:11FromGitter<kaushalmodi> But a social experiment.. let's not close it.. let's see what happens.
21:57:12TheLemonManreport their profile to GH
21:57:29FromGitter<kaushalmodi> Yes, reporting the profile should definitely be done.
21:58:07*TheLemonMan quit (Quit: "It's now safe to turn off your computer.")
21:58:25FromGitter<Clyybber> Why do the crystal devs take this seriously?
21:58:41FromGitter<Clyybber> Is it not obvious to them that this is a troll
21:58:47FromGitter<Clyybber> ?
21:59:42FromGitter<kaushalmodi> They don't have me to warn to not react to those issues :P
22:01:32FromDiscord<Shield> can you use a template to unroll a for loop
22:25:34*Echoz20 joined #nim
22:33:04*Echoz20 quit (Ping timeout: 240 seconds)
22:33:57*mystica55527 joined #nim
22:41:21*mystica55527 quit (Ping timeout: 260 seconds)
22:59:10*xet7 quit (Remote host closed the connection)
22:59:46stefanos82I have a suspicion that some smart ass is playing with ML and taking advantage of github's API to automate trolling
23:00:37*kpavic23 joined #nim
23:05:16*kpavic23 quit (Ping timeout: 260 seconds)
23:06:27*leru_ quit (Ping timeout: 240 seconds)
23:11:41*MyMind quit (Ping timeout: 260 seconds)
23:14:20*MyMind joined #nim
23:24:05*Ven`` joined #nim
23:25:24*omenar quit (Remote host closed the connection)
23:25:45*opi_ quit (Ping timeout: 252 seconds)
23:27:55*stefanos82 quit (Quit: Quitting for now...)
23:28:34*opi_ joined #nim
23:29:06*Ven`` quit (Ping timeout: 272 seconds)
23:31:08PMunch@Shield, you never got a reply. You probably could use a template for that, but Nim also has an unroll pragma. The C compiler will however unroll a loop for you if it sees it fit
23:33:12*opi_ quit (Ping timeout: 252 seconds)
23:33:42*opi_ joined #nim
23:38:04*opi_ quit (Ping timeout: 240 seconds)
23:39:37FromGitter<dm1try> maybe experimental "forLoopMacro"^ can be used, somewhere I read about it :)
23:43:25*opi_ joined #nim
23:47:51*opi_ quit (Ping timeout: 260 seconds)
23:50:29FromDiscord<Shield> I managed to do it with a macro and parseStmt, it seems that I can't do it with a template, I'm fairly new to metaprogramming