<< 19-10-2019 >>

00:02:13*neptune42 joined #nim
00:02:13*snooptek quit (Remote host closed the connection)
00:06:12*neptune42 left #nim (#nim)
00:10:13*al_ quit (Quit: al_)
00:16:46*fanta1 quit (Quit: fanta1)
00:21:41*Jjp137 quit (Read error: Connection reset by peer)
00:29:41*Jjp137 joined #nim
00:38:06*Hideki_ joined #nim
00:40:17*go|dfish quit (Ping timeout: 240 seconds)
00:45:27*snooptek joined #nim
00:45:43FromGitter<Varriount> disruptek: I have now starred your OpenAPI repo
00:45:58disruptekoh shoot
00:46:08FromGitter<Varriount> It looks really cool. :D
00:46:32disrupteklet me know if you still feel that way after you try to use it.
00:47:30FromGitter<Varriount> "The quality of OpenAPI definitions in the wild appears to vary, uh, wildly." <- I have noticed this
00:47:57disruptekyeah, but more and more are being created by software, so that's good.
00:48:07disruptekof course, not all software is as flawless as mine.
00:48:31FromGitter<Varriount> I tried running a Python OpenAPI code generator through the API of an open source project I use at work, and it... sorta worked
00:48:54*Hideki_ quit (Remote host closed the connection)
00:49:40disruptekHideki there did an openapi generator for nim that uses java and, i guess handlebars or similar, to write pretty nicely organized apis.
00:50:04disrupteknot to my taste, but if what you want is nice looking code, i think that's a superior solution at present.
00:50:24*Hideki_ joined #nim
00:50:45FromGitter<Varriount> Not enough that I was willing to use the generated code though - in the end I just used aiohttp to make the requests.
00:51:03disruptekahh.
00:52:11FromGitter<Varriount> Honestly, the hardest part about the API I was using was the fact that the responses used XML for certain data descriptions, and that the API was underdocumented.
00:52:53disruptekmy stuff doesn't do any response parsing and i think it doesn't even create the types currently.
00:53:18disrupteki started off ambitious and ended up rubbish, to paraphrase a certain pokey car show.
00:53:29FromGitter<Varriount> Perhaps that's a good thing?
00:53:29disruptekbut, i will finish it eventually.
00:53:34*Hideki_ quit (Remote host closed the connection)
00:53:51*Hideki_ joined #nim
00:54:19disruptekit's hard to parse and render 3000 apis to the same standard of quality; garbage in, mostly useful garbage out.
00:54:45FromGitter<Varriount> It would be nice if there was a magical way for a library that makes/listens for HTTP requests to just "plug into" whatever networking library the user of the library is using.
00:55:11*Hideki_ quit (Remote host closed the connection)
00:55:21disruptekyeah, it seemed stupid not to splice the rest package off from openapi, but i'm disappointed it doesn't actually do anything, really.
00:55:46*Hideki_ joined #nim
00:55:48disrupteki need to put more work into it and figure out how to surface it a bit better so it's less paint and has more body over the existing transport.
00:56:07disruptekalso need to figure out js transport so this code can run in the browser, too.
00:56:40disruptekbut anyway, that rest package openapi uses could be that pluggable layer.
00:57:37disrupteki guess i want something like superagent for js or requests for python, but with more of a middleware feel the way nim can provide.
00:57:44*Hideki_ quit (Remote host closed the connection)
00:58:00*Hideki_ joined #nim
01:01:36*Romanson joined #nim
01:11:20disruptekhttps://play.nim-lang.org/#ix=1Z8l is https://github.com/nim-lang/Nim/issues/10938
01:13:32*nif quit (Quit: ...)
01:13:49*nif joined #nim
01:26:57*oculuxe quit (Ping timeout: 240 seconds)
01:27:45*oculux joined #nim
02:15:24*Willyboar quit ()
02:35:29*Hideki_ quit (Remote host closed the connection)
02:35:48*Hideki_ joined #nim
02:36:18*Hideki_ quit (Remote host closed the connection)
02:38:34*Hideki_ joined #nim
02:40:34*Hideki_ quit (Remote host closed the connection)
02:40:51*Hideki_ joined #nim
02:51:42*Hideki_ quit (Remote host closed the connection)
02:52:20*Hideki_ joined #nim
02:56:33*Hideki_ quit (Ping timeout: 250 seconds)
03:11:13*Romanson quit (Quit: Connection closed for inactivity)
03:23:13*chemist69 quit (Ping timeout: 245 seconds)
03:25:18*chemist69 joined #nim
03:46:59*Hideki_ joined #nim
03:57:16*Hideki_ quit (Ping timeout: 240 seconds)
04:28:06*traviss quit (Quit: Leaving)
04:45:37*NicQ joined #nim
04:47:47*theelous3_ joined #nim
04:50:26*theelous3 quit (Ping timeout: 240 seconds)
04:55:28*NicQ quit (Read error: Connection reset by peer)
04:56:20*NicQ joined #nim
05:10:01*dddddd quit (Remote host closed the connection)
05:24:37*PrimHelios joined #nim
05:25:26PrimHelioshow should I write unit tests for macros? It's my first time with them and I'm not sure how I should test to make sure they work
05:31:32*go|dfish joined #nim
05:32:42*NicQ quit (Ping timeout: 265 seconds)
05:33:01*solitudesf joined #nim
05:33:13*NicQ joined #nim
05:36:24*NicQ quit (Read error: Connection reset by peer)
05:37:10FromGitter<Varriount> PrimHelios: I would focus more on integration tests
05:37:21*NicQ joined #nim
05:37:46FromGitter<Varriount> Unit tests for macros only really work when the macro is complicated enough to be broken into multiple procedures.
05:41:58*go|dfish quit (Ping timeout: 268 seconds)
05:46:43*NicQ quit (Ping timeout: 265 seconds)
05:49:05AraqPrimHelios: you test them like anything else really, you test to invoke the macro and that it produces something sane
05:54:41*Hideki_ joined #nim
05:55:04*narimiran joined #nim
05:59:14*Hideki_ quit (Ping timeout: 268 seconds)
06:01:38*sagax quit (Read error: Connection reset by peer)
06:12:49*theelous3_ quit (Ping timeout: 265 seconds)
06:24:05*sagax joined #nim
06:26:50*solitudesf quit (Ping timeout: 265 seconds)
06:28:27*tiorock joined #nim
06:28:28*tiorock quit (Changing host)
06:28:28*tiorock joined #nim
06:28:28*rockcavera is now known as Guest27894
06:28:28*Guest27894 quit (Killed (card.freenode.net (Nickname regained by services)))
06:28:28*tiorock is now known as rockcavera
06:28:43*PrimHelios quit (Quit: Leaving)
06:41:48*nsf joined #nim
06:43:13*tiorock joined #nim
06:43:13*tiorock quit (Changing host)
06:43:13*tiorock joined #nim
06:43:13*rockcavera quit (Killed (cherryh.freenode.net (Nickname regained by services)))
06:43:13*tiorock is now known as rockcavera
06:48:54*lritter joined #nim
06:56:56*oculux quit (Quit: blah)
06:57:15*oculux joined #nim
07:00:00*gmpreussner quit (Quit: kthxbye)
07:05:02*gmpreussner joined #nim
07:21:31*fanta1 joined #nim
07:44:44*fanta1 quit (Quit: fanta1)
07:45:48*kungtotte quit (Quit: WeeChat 2.6)
07:53:07*fanta1 joined #nim
08:00:57*couven92 joined #nim
08:03:02*gmpreussner quit (Quit: kthxbye)
08:03:19*gmpreussner joined #nim
08:04:51*go|dfish joined #nim
08:04:56*fanta1 quit (Quit: fanta1)
08:19:35*tiorock joined #nim
08:19:35*rockcavera is now known as Guest5430
08:19:35*tiorock is now known as rockcavera
08:21:23*Guest5430 quit (Ping timeout: 265 seconds)
08:38:21Zevvis there a shortcut to do a recursive copylineinfo?
08:38:39*NimBot joined #nim
08:58:02*go|dfish quit (Ping timeout: 240 seconds)
08:58:56*Hideki_ joined #nim
09:08:40*Vladar joined #nim
09:11:42*Trustable joined #nim
09:43:44*PMunch joined #nim
09:47:13*fredrik92 joined #nim
09:47:46*couven92 quit (Disconnected by services)
09:47:55*fredrik92 is now known as couven92
09:48:11*fredrik92 joined #nim
09:53:01*Hideki_ quit (Remote host closed the connection)
09:53:38*Hideki_ joined #nim
09:57:48*Hideki_ quit (Ping timeout: 245 seconds)
10:26:46*Hideki_ joined #nim
10:31:48*Hideki_ quit (Ping timeout: 268 seconds)
10:39:00FromDiscord<Chiqqum_Ngbata> Is it possible to do optional tuple destruct?
10:39:05FromDiscord<Chiqqum_Ngbata> (a, b, c = 0) = d
10:42:22Araqthere is only '_'
10:42:30Araqlet (a, b, _) = d
10:45:15*Vladar quit (Ping timeout: 240 seconds)
10:45:50*crem quit (Ping timeout: 252 seconds)
10:46:18Zevvis it possible to skip a few stack frames in the trace when raising an expection? I now get a trace from some technical implemnetation, while the source of the error lies higher up.
10:47:14*crem joined #nim
10:49:03Araqthere is an API to do that
10:49:15FromDiscord<Chiqqum_Ngbata> Can I do default args with template?
10:50:49*PMunch quit (Remote host closed the connection)
10:51:32FromDiscord<Chiqqum_Ngbata> Seems I can, scratch that
10:51:48ZevvAraq: where would I find that, approximately?
10:54:07Araqasyncfutures.nim line 299 following
10:54:23Araqit does some nice stack trace hacks
10:54:44Araqhowever, I dunno if you can use that to influence the exception's stack trace
10:55:46Araq trace: seq[StackTraceEntry]
10:55:46Araq # system.nim doesn't make it public...
10:56:32AraqI'm beginning to think that "information hiding" is wrong as often as not hiding stuff
10:56:35*PMunch joined #nim
10:56:42Zevvhehe
10:56:44Zevvthanks anyway
11:04:53*Hideki_ joined #nim
11:08:00PMunchChiqqum_Ngbata, yes, but Nim also supports default args
11:09:13*clyybber joined #nim
11:13:37Araqgah, we need command line arguments that make sense
11:14:55Araq --seqs:v2 --gc:markAndSweep
11:15:50*go|dfish joined #nim
11:15:51Araq--runtimeTypeInfo:v2
11:17:46ZevvI feel the whole command line parsing could use some proper structuring - probably data driven so that relations between options can be checked early, --help outputs relevant stuff and help is generated from the code. But thats quite an undertaking
11:18:20AraqI consider it to be perfectly fine
11:18:39Araqbut --newruntime conflates 3 different notions
11:18:51Araqand needs to be changed
11:18:51ZevvI see
11:19:29Araq--newruntime is effectively: --seqs:v2 --runtimeTypeInfo:v2 --ownedRefs:on
11:19:52clyybberAnd --gc:destructors
11:19:59clyybberRight?
11:20:02*Hideki_ quit (Ping timeout: 240 seconds)
11:20:04Araqthat's --seqs:v2
11:20:20clyybberAnd why do you want to remove --newruntime?
11:20:25Araqdestructors are always enabled
11:20:48Araqit's just that the old strings and seqs don't use them
11:21:30Araqclyybber, I want everything from --newruntime except --ownedRefs:on ;-)
11:21:46clyybberYou gave up on owned refs?
11:22:52Araqas I said, we have 2 competing designs, owned refs are still in the game.
11:23:40Araqand currently neither design works with async and both designs have some unforeseen complications...
11:24:16clyybberMaybe we should look at pony
11:24:19Araqso I'm trying to hack something together that works and hacking works better with a plethora of compiler options :P
11:24:22FromDiscord<Chiqqum_Ngbata> Is it not ok to pass empty array arg to template?
11:24:58Araqclyybber, pony is even more complex though
11:25:41clyybberHmm, I don't think its that complex. It's really simple once you get the hang of it IMO
11:26:13clyybberBut I guess it doesn't have to be done in the core language
11:26:31clyybberI thought of doing an actor framework for nim which steals the ideas of pony.
11:27:36clyybberIn macro
11:27:57Araqthe actors model is silent about Future/FlowVars
11:28:21Araqand without them all you have is some bullshit message passing system where everything is hard to do
11:28:51clyybberPony really isn't that hard to use in practice. But of course the actor model isn't a good fit for everything.
11:29:27clyybberBut with project picasso it would fit right in. And it would be really cool if it can be implemented with macros.
11:30:29Araqbtw feel free to fix some --newruntime bugs
11:30:42Araqwith your refactoring some of these should be simpler
11:30:46clyybberI currently feel very free to get default fields to work :)
11:31:01clyybberBut sure, I'll look at them afterwards
11:31:05Araqalso fine, did you read what I said?
11:31:10clyybberNope
11:31:32clyybberWhen? I can search on the logs
11:31:33AraqNim pretty much forces you to use MyObject(kind: x) nowadays
11:31:46Araqand that's when you can set the default values
11:32:12clyybberYou mean making it a transformation in sem?
11:32:12Araqon object construction with a discriminator that is at least known at runtime
11:32:36Araqso you need to generate a 'switch' statement after object construction
11:32:51Araqunless you have the value ready at compile-time
11:33:08clyybberAh sure. I'm doing that already
11:33:22clyybberWell not the compile-time optimization, but I can do that
11:35:00*D4663R joined #nim
11:35:37Araqnot that important, clang/gcc can fold the switch
11:35:42clyybberThe problem I'm dealing with is that I need to generate a field access for the loc of an object not the node, meaning that I need a version of genRecordField that takes a loc instead of e: PNode. It's easy to do really, but with generating case statements it means that I essentially need to copy all their code too, and make it so that they use the patched genRecordField..
11:36:17Araqmake it an AST to AST transformation
11:36:25Araqand just use all of the existing codegen
11:36:38clyybberYeah thats the problem. I can't
11:36:43clyybberI get an infinite loop then
11:36:48clyybber*recursion
11:36:57Araqhmmm why?
11:38:02clyybberBecause when I encounter `someproc(MyObject(v: 1))` the lode of the location of MyObject is the constrcutor itself, meaning that codegen will generate it again and again and again
11:38:21clyybberBecause I generate a `MyObject(v: 1).field = defaultvalue`
11:39:07Araqnah
11:39:39AraqMyObject(v: 1) --- transform into --> let o: MyObject; o.v = 1; o.field = defaultValue
11:40:36Araqbut maybe it's harder than it looks indeed
11:40:40clyybberOk, but we needn't do that in codegen anymore, right?
11:41:02AraqI suppose ideally it's in transf.nim
11:46:08clyybberAraq: Do you think that logic: https://github.com/nim-lang/Nim/blob/832b0a0232e610c1935aaf6ce0b45f69199f8a19/compiler/ccgexprs.nim#L1344 can be replicated in transf.nim?
11:46:31*Hideki_ joined #nim
11:46:52clyybberI guess so
11:47:12Araqyeah
11:47:37Araqhowever, maybe it's time to bite the bullet and to rewrite the C codegen to be AST based
11:49:06Araqbut that's of course months of work
11:50:04clyybberIt also can pretty much be only done by you, because you are most familiar with the code
11:50:14clyybberAnd it will take ages for someone not as familiar to do it
11:50:47Araqothers know it quite well too
11:51:04Araqbut if we find some incremental approach to this
11:51:39Araqso that you can e.g. make 'switch' codegen AST based, check it in, see if the tests are still green, repeat until no "rope" is left
11:51:50Araqthen it would be much easier
11:52:00clyybberI feel like maybe its best to implement a general `=default` with which default fields could be implemented
11:52:24Araqsounds like a bad idea
11:52:40clyybberWhy?
11:52:53Araqtype based hooks are a last resort in language design
11:53:12AraqNim already has 3, cooldome wants =check
11:53:14Araqyou want =default
11:53:18Araqand I want =trace
11:53:34clyybberYeah and they all serve a purpose and help to simplify everything else
11:53:47FromDiscord<Chiqqum_Ngbata> https://github.com/nim-lang/Nim/issues/2459 damn
11:53:55clyybberI think its rather elegant to unify many conecpts into a few fundamental ones
11:56:05Araqfield: int = 4 is the natural syntax
11:56:26Araqwhy change it? the implementation is as hard as it is with =default
11:56:48FromGitter<zetashift> "to rewrite the C codegen to be AST based" I thought Nim compilation already went like Nim -> AST -> C?
11:57:00clyybberI don't want to change the syntax, just make field: int = 4 transform to a `=default` implementation
11:57:02Araqif it helps your thinking, do the implementation as if it were =default
11:57:16Araqah
11:57:25Araqso we don't disagree
11:57:27clyybberSure, the implementation won't be simpler, but it would be more general
11:57:31clyybberAraq: Yeah
11:57:39Araqok.
11:57:55clyybberBut we can do that `=default` in the future maybe.
11:58:09Araqwe also need =trace very soon, I bet...
11:58:22clyybberWhat would =trace be? A debugging thing?
11:58:42Araq=trace teaches the GC how to traverse custom objects
11:59:26FromGitter<dumjyl> an `=default` would be nice for `range`/`distinct` types for which there isn't a natural syntax in a type section.
11:59:32clyybberYeah
12:00:29Araqzetashift: yes, but the C codegen does some optimizations that are not on the AST level, but could be and then the JS backend would benefit too, for example
12:01:59Araqbbl
12:02:13clyybberYeah I would love that. And maybe make the code backends only handle a small subset of the nim AST
12:02:25clyybberAn even smaller subset, I should say
12:03:10*D4663R left #nim ("WeeChat 2.6")
12:03:21Araqthat's problematic as the Nim ast doesn't contain much you want to ignore in a backend
12:03:51*go|dfish quit (Ping timeout: 250 seconds)
12:04:05Araqok, so you have to ignore type sections and most proc declarations, big deal. everything else is relevant
12:07:19clyybberYeah, I guess we already do that to an extent.
12:14:12*Vladar joined #nim
12:25:17*willyboar joined #nim
12:27:48*ronny left #nim ("User left")
12:28:18*ng0 joined #nim
12:29:17clyybberAraq: How does one deal with the result variable? Will there already be a constructor?
12:31:57*dddddd joined #nim
12:35:36*daddoo joined #nim
12:48:11*solitudesf joined #nim
12:49:09*Hideki_ quit (Ping timeout: 265 seconds)
12:52:38*Kaivo quit (Quit: WeeChat 2.6)
13:07:41*sealmove joined #nim
13:43:45*sealmove quit (Quit: WeeChat 2.6)
13:53:27*clyybber quit (Ping timeout: 268 seconds)
13:55:43*Vladar quit (Quit: Leaving)
14:07:53*kobi7 joined #nim
14:07:57kobi7Howdy!
14:08:13kobi7quick question for the knowledgeable! :-)
14:09:04kobi7when using regex replacef, how can I access the captures? I want to do the replacing but also "record" the replaced strings.
14:10:03disruptekuse a different proc.
14:10:46disruptekie. perform a match to record your captures, then replace them.
14:11:33FromDiscord<Chiqqum_Ngbata> I wonder why, when I have an argument type of openArray, the library I'm binding with complains that it's receiving too many arguments (to the bound function)
14:11:58disruptekis it a C lib or nim?
14:12:16kobi7thanks, disruptek that's a good idea
14:12:38FromDiscord<Chiqqum_Ngbata> C
14:15:07Araqkobi7, nre has a replace that takes a callback iirc
14:16:07kobi7Araq: cool, i'll check this now
14:17:43*clyybber joined #nim
14:17:44*clyybber quit (Client Quit)
14:17:57*clyybber joined #nim
14:18:31Araqclyybber, there is logic in the backend to init 'result'
14:20:04clyybberUgh, so I can't do it in transf
14:20:17clyybberWhy don't we put that logic in transf too?
14:20:27*go|dfish joined #nim
14:21:17Araqbe my guest ;-)
14:22:44*nsf quit (Quit: WeeChat 2.6)
14:23:12*stefantalpalaru joined #nim
14:23:57clyybberWith the greatest of pleasure :)
14:25:20*PMunch quit (Remote host closed the connection)
14:25:56stefantalpalaruAny Windows users relying on the Visual Studio toolchain? How do you tell Nimble to use that, when installing a package which needs to compile a bundled C library? Does `defined(vcc)` work inside a *.nimble file?
14:27:34stefantalpalaruAlso, how do you call `nmake` from the command prompt instead of the IDE?
14:28:36*go|dfish quit (Ping timeout: 268 seconds)
14:30:00*theelous3 joined #nim
14:34:19stefantalpalaruFound the answer to the last question: https://docs.microsoft.com/en-us/cpp/build/building-on-the-command-line?view=vs-2019
14:38:55AraqI use 'nim --cc:vcc' in order to use Visual Studio
14:39:11Araqand Nimble now supports --passNim iirc
14:39:29Araqnimble c --passNim:cc=vcc maybe?
14:39:36stefantalpalaruLet me try that.
14:40:01kobi7Thanks a lot Araq, I think it works.
14:40:09kobi7(will test now :)
14:41:22kobi7btw, nre seems nicer to work with, api wise.
14:41:55disruptekit's better, but don't compliment him on it -- it makes him suspicious.
14:42:07Araqmany agree with you, kobi7
14:42:11disrupteki figured you wanted to use `re` since you were using `replacef`.
14:42:32Araqdisruptek, I think kobi7 really means 'nre' is better ;-)
14:42:57disruptekthat was my interpretation as well. 😁
14:43:03Araqgood that we have both... better if we could unify them somehow
14:43:28disruptekwhy is that?
14:44:32clyybberDo nre or re use the pcre library?
14:44:40disruptekthey both do.
14:44:52clyybberHow can they be so different then?
14:44:56clyybberArent they just wrappers?
14:45:01Zevvyes
14:45:07Zevvone is 'raw' the other is more 'nim like'
14:45:41clyybberNre is more nim like I suppose?
14:45:54clyybberSo kill re? Whats good about re that isn't there in nre?
14:46:12disruptekit's a little more complete because it captures, so to speak, more of pcre.
14:47:39*zyklon quit (Quit: Konversation terminated!)
14:47:58*zyklon joined #nim
14:48:48disrupteki think `re` should be moved to nimble.
14:49:59ZevvI think Nim needs a native regexp engine that does not depend on a C library. PCRE is overkill for a lot of use cases, maybe we can find a decent regexp implementation and do a 'naive' nim port of it
14:50:22disrupteki nominate zevv.
14:50:36Araqnitely has a native Nim regex engine
14:50:46Araqpart of "Important packages", I hope
14:51:03ZevvAh look, so there is something already!
14:51:05FromDiscord<exelotl> Yeah I was gonna say why aren't we using nim-regex
14:53:24clyybberI guess because ppl will still want PCRE?
14:53:31stefantalpalaruWhy keep making it a ghetto with pure Nim libraries, instead of relying on battle-tested external C libraries?
14:53:55disruptekpure libraries are more portable.
14:53:58Zevvbecause you a) you need to shipp your app with the C library, which is especially a pain when you wnat to be portable
14:54:09Zevvb) doesn't work on non-C backends
14:54:11stefantalpalaruAnd breaking backwards compatibility by removing stdlib modules is a cardinal sin.
14:54:18disruptekb) see a.
14:54:35Zevvstefantalpalaru: nope, that's why you call it '2.0'
14:54:40clyybberstefantalpalaru: Not if you deprecate them and move them to a nimble package
14:55:07Zevvand people realize a mistakes happened; throwing stuff out and deprecated is the sane way out
14:55:22disrupteki think the worse sin is having two stdlib modules that do the same thing, of which one is overly complex and not as idiomatic.
14:56:08*stefan_ joined #nim
14:56:25ZevvI can blow the dust off https://github.com/zevv/nimpat/blob/master/nimpat.nim. It's lua patterns, lightweight regexps in about 400 LOC
14:56:30disruptekthat said, i think we need a seventh strformat lib in stdlib.
14:56:42Zevvwe only have six?
14:56:54disruptekyeah, it's kinda slim pickins in here.
14:57:19FromDiscord<exelotl> Oh cool! Lua patterns are nice
14:57:51clyybberLua is nice
14:57:55Zevvnot sure if it still works with recent nim tho
14:58:39*stefan_ quit (Client Quit)
14:58:41*stefantalpalaru quit (Ping timeout: 265 seconds)
14:58:57*stefan_ joined #nim
14:59:02*stefan_ is now known as stefantalpalaru
14:59:42Zevvnope
14:59:43stefantalpalaruNim will never be more portable than C. Why let that false goal undermine its biggest strength - easy wrapping of C libraries?
14:59:54disruptekyou'll get araq's vote if you rebase it on strscans.
15:00:13shashlickNimpcre compiles in pcre if you want
15:00:20disruptekno one said you couldn't keep using pcre.
15:01:16clyybberstefantalpalaru: The biggest strength is not wrapping C libraries, otherwise we wouldn't need Nim at all.
15:01:26clyybberAnd it may be more portable with llvm.
15:02:16disruptekthis.
15:02:17stefantalpalaruLet's agree that you're wrong on all accounts ;-)
15:03:07clyybberlol
15:03:12FromDiscord<Rika> lmao
15:03:15*Hideki_ joined #nim
15:04:07clyybberstefantalpalaru: Btw nim *is* already more portable than C because C cant compile to js :P
15:05:20stefantalpalaruDude... it all started with Emscripten.
15:05:37disruptekyeah, because _that_ works well.
15:05:52clyybberWell, and that plays into my previous point. That when Nim uses LLVM it could be more portable
15:06:03stefantalpalaruNim is not, nor will it ever be more portable than C. If you don't understand that, you don't understand C.
15:06:04disruptekit does and it is.
15:06:20clyybberstefantalpalaru: And then you dont understand GPUs
15:06:21FromDiscord<Rika> what the hell is this argument
15:06:33clyybberGood luck having all those pointers on the GPU
15:06:36stefantalpalaruLLVM is the opposite of portability, because it locks you into a single toolchain.
15:06:39FromDiscord<Rika> can we give supporting evidence on both sides
15:07:08clyybberstefantalpalaru: It doesn't lock us, Nim already has multiple backends
15:07:13disruptekC is apparently not part of his C toolchain.
15:07:31stefantalpalaruBoth OpenCL and CUDA are slightly restricted versions of C and C++. This is not by chance.
15:07:36*Hideki_ quit (Ping timeout: 240 seconds)
15:07:46clyybberOpenCL is not *slightly* restricted C
15:07:57clyybberits C but castrated
15:08:04disruptekoh how rude.
15:08:12clyybberIn a good way :)
15:08:22clyybberIt sings high tones
15:08:22*kobi7 quit (Read error: Connection reset by peer)
15:08:49disruptekthe angelic voice of opencl.
15:10:35FromDiscord<Stuffe> does anyone know how to get a template to "return" a pointer?
15:10:39FromDiscord<Stuffe> Im trying this:
15:10:39FromDiscord<Stuffe> template get(syntax: syntax, path: seq[int]): addr syntax =
15:10:53FromDiscord<Stuffe> But I get the error: Error: expression has no address; maybe use 'unsafeAddr'
15:11:04clyybberStuffe: The return type should be ptr syntax
15:11:21FromDiscord<Stuffe> Ah works
15:11:22FromDiscord<Stuffe> Thank you
15:11:25clyybbernp
15:15:22*uvegbot joined #nim
15:16:41*zyklon quit (Ping timeout: 250 seconds)
15:21:25FromDiscord<krab4t> any good GUI frameworks for Nim? 🙂
15:32:13FromDiscord<Karl Marx> https://github.com/trustable-code/NiGui
15:35:50*alexander92 quit (Read error: Connection reset by peer)
15:39:49*alexander92 joined #nim
15:41:11*Trustable quit (Remote host closed the connection)
15:42:21*Trustable joined #nim
15:42:51*daddoo quit (Quit: Leaving)
15:42:59*go|dfish joined #nim
15:52:10clyybberkrab4t: https://github.com/treeform/fidget, https://github.com/yglukhov/nimx
15:58:34FromDiscord<Karl Marx> Wow I like fidget a lot
15:58:38FromDiscord<Karl Marx> I might try it
15:58:41FromDiscord<Karl Marx> Looks super nice
16:02:03*go|dfish quit (Ping timeout: 240 seconds)
16:04:18stefantalpalaruComplete failure when trying to define "vcc" in a *.nimble file: https://github.com/nim-lang/nimble/issues/726
16:04:47*narimiran quit (Ping timeout: 276 seconds)
16:04:50*lbartoletti joined #nim
16:04:54*lbart quit (Ping timeout: 265 seconds)
16:10:58FromDiscord<Rika> im definitely doing something wrong here, i would like to know what stupid thing im doing here https://play.nim-lang.org/#ix=1Zdn
16:12:31disruptekthe first `image` needs to be `backticked` and made into its own identifier.
16:12:44disrupteki mean, the one in the smth definition.
16:13:09disruptekwhich is, i guess, the second one. oh well.
16:14:18FromDiscord<Rika> oh i see
16:14:29FromDiscord<Rika> i guess its becayse hteyre named differently internally
16:15:31disruptekit's because otherwise it gets generated, after which your `test` doesn't match.
16:15:39*thomasross quit (Ping timeout: 240 seconds)
16:16:06disruptekhttps://play.nim-lang.org/#ix=1Zdu
16:16:19disruptek(see debug output)
16:17:52shashlickare macros not called in top down order?
16:18:00FromDiscord<treeform> is there a nim version defined? Can I do `when nimVersion > 1.0.0: ... ` else do the old thing?
16:18:19disruptekNimVersion, NimMajor, NimMinor, NimPatch... all consts.
16:18:26disruptekfirst is a string, the others are ints.
16:19:04disruptekshashlick: you mean outer into inner?
16:19:48FromDiscord<treeform> oh thanks!
16:19:52shashlickprobably
16:19:57shashlickwell i am calling a macro from a macro
16:20:03shashlickbut it seems to be done in reverse order
16:20:21disrupteki likely needs to evaluate one before the other.
16:21:34shashlickso i'm trying to figure out how to do this
16:21:45shashlickI'm trying to reuse cOverride to now override in place
16:21:57shashlickbut i need to use cPlugin to achieve that
16:22:04shashlickwhich means you need to run cOverride before cPlugin
16:22:14shashlickbut that means you are forced to run a cPlugin even if you don't want to
16:22:28disruptekit sounds like you need a Third Way.
16:22:41shashlickso i was trying to implicitly call cPlugin if a cOverride was specified
16:22:52shashlickin cImport
16:23:11shashlickbut it gets processed before cOverride which was declared earlier
16:23:31shashlickone option is to introduce a types section in cPlugin but it will mean yet another different way to do overrides
16:23:41shashlicki'd rather just use cOverride since it is otherwise useless
16:24:04shashlickor mandate that cOverride needs an explicit cPlugin with nothing
16:24:16shashlickor disallow cOverride + cPlugin renaming of symbols
16:24:29shashlicktis a mess
16:24:35disruptekmaybe your abstraction is to handle calling cOverride automatically and not call it manually.
16:25:36shashlickthen where should the override definitions go
16:26:24disruptekcOverride will still define them, but you will actually invoke it in different places. you merely need to remember whether it has been mixed in or not.
16:26:56disrupteki guess maybe you don't have a concept of state yet?
16:27:13disruptekhmm, but you must.
16:28:01shashlickthe one that mixes it in is cPlugin
16:28:17shashlickand the one that uses it is cImport
16:29:03disrupteki smell an architectural change comin'.
16:29:17shashlickgosh, you'd think things would get easier in life
16:32:04shashlicki guess i have to break out cPlugin into a proc and macro
16:33:02disruptekhey, if it makes you feel better, i just finished a rearch in golden and i can see another one towards generics on my horizon.
16:33:31shashlickyou're never good enough in the past
16:35:30disrupteksoftware wants to grow; it's our job to stunt it as best we can. 😀
16:36:07shashlickmakes sense
16:36:30disruptekyou win if you can remove more than you add.
16:39:55Araqexactly. Now let's please remove symlinks from every OS and never look back. :P
16:40:10disruptekpffbt
16:40:34disruptekwe develop for the platform we have, not a theoretical ideal that doesn't exist.
16:41:44jkenfinally got imgui rendering and updating with sdl2 and opengl :D
16:42:00shashlickokay figured it out
16:42:00disrupteki was never able to get it to output my framerate.
16:42:00*lbartoletti_ joined #nim
16:42:07*lbartoletti quit (Ping timeout: 265 seconds)
16:42:19Araqthat's true but computing is too important, don't keep the artifical complexity in it
16:42:43disrupteki mean, see if you can sell a fs w/o symlinks.
16:43:13disrupteki even use them for simple storage of strings. maybe i'm crazy.
16:48:00AraqOberon doesn't have symlinks
16:48:14disruptekspeaking of difficult to sell.
16:49:56FromDiscord<treeform> Some one uses Oberon? What about SkyOS or ManuetOS?
16:50:26Araqno but I recently read https://inf.ethz.ch/personal/wirth/ProjectOberon1992.pdf
16:50:56Araqit's an impressive design
16:52:18FromDiscord<treeform> Niklaus Wirth, Pascal guy? cool.
16:52:42FromDiscord<treeform> Which parts did you find impressive?
16:54:15Araqthe "I can select text everywhere" design, the fact that it uses a single programming language for everything, the linker/loader unification
16:54:18disruptekthe page count.
17:01:02*couven92 quit (Quit: Disconnecting)
17:02:11shashlickgot it working
17:02:24shashlickanyone wants to test a real cOverride?
17:03:02FromDiscord<treeform> what problems does cOverride solve for me?
17:04:05*lbartoletti joined #nim
17:04:36FromGitter<zetashift> I never knew Oberon also was used in an OS. Also damn: "Mastering the Oberon user interface, both the purely textual and also the so called Gadgets System (under S3), is absolutely non-trivial" from the OS's wiki
17:05:08shashlick@treeform - while wrapping, if nimterop misses certain stuff and you manually want to declare those
17:05:21shashlickif the override contains symbols yet to be defined by cImport, it doesn't work
17:05:55shashlickso the new cOverride overrides the symbols in place rather than at the top
17:05:59shashlickso it will be contextual
17:06:26*lbartoletti_ quit (Ping timeout: 240 seconds)
17:07:11FromDiscord<treeform> shashlick, I see, sorry I don't have these kinds of problems.
17:07:42shashlickcool
17:20:41*Trustable quit (Remote host closed the connection)
17:25:46*nsf joined #nim
17:29:15Araqtreeform: your UI project is superb
17:30:17Araqplease keep me in the loop about its progress
17:31:02FromDiscord<Kiloneie> After 4 days of no video, heres another(i got bored, played games instead D: sue me). https://youtu.be/kogpTd0IlAw
17:32:06FromDiscord<Kiloneie> Also had to rethink how to make my videos, i started writting longer and longer scripts that i followed less and less, except for blocks of text i needed to say D:
17:32:45*demonttazz joined #nim
18:08:13*solitudesf- joined #nim
18:11:03*solitudesf quit (Ping timeout: 265 seconds)
18:12:16*lritter quit (Ping timeout: 240 seconds)
18:13:29*nsf quit (Quit: WeeChat 2.6)
18:24:11*kungtotte joined #nim
18:25:46FromDiscord<sealmove> Use bullet points?
18:29:25FromDiscord<Kiloneie> Yeah, that's the idea
18:29:45FromDiscord<Kiloneie> i started writting big scripts because i couldn't talk as freely before.
18:31:19*solitudesf joined #nim
18:31:24FromDiscord<sealmove> Treeform: what's your github account?
18:34:19*clyybber quit (Quit: WeeChat 2.6)
18:34:56*solitudesf- quit (Ping timeout: 276 seconds)
18:39:09FromDiscord<Kiloneie> probably treeform ? i gogled treeform and hisaccount was first to show with his avatar
18:47:51disruptekAraq: did you come up with a solution for --gc:destructors?
18:51:58FromDiscord<sealmove> Ah right, found it
18:54:57FromDiscord<sealmove> Wow fidget is indeed beautiful
19:04:56*Hideki_ joined #nim
19:09:48*Hideki_ quit (Ping timeout: 268 seconds)
19:13:47*krux02 joined #nim
19:25:55*Vladar joined #nim
19:27:06Araqdisruptek, https://github.com/nim-lang/Nim/pull/12467
19:27:45disruptekbut what does it all mean? 😉
19:29:27disrupteki see options to turn stuff on, but i was under the impression you weren't sure gc:destructors was gonna work.
19:33:45Araqno, it'll work but my patch was all wrong
19:34:16Araqalso I'm doing too many things at once, so now it's time for some discipline: First sort out the compiler options (done).
19:35:02disrupteknice.
19:35:32AraqThen patch the GCs to support the new strings and seqs. (WIP)
19:36:26AraqThen add the new dispose() API.
19:37:20*nsf joined #nim
19:37:58rayman22201Then document all of it (I hope :-P)
19:39:40Araqit would be easier if we had a good, simple async benchmark
19:40:02Araqbut working with the GC tests is also fine, so whatever
19:46:26*daddoo joined #nim
20:35:07*demonttazz quit (Remote host closed the connection)
20:36:46*nsf quit (Quit: WeeChat 2.6)
20:40:44planetis[m]hey can i ask something slightly offtopic?
20:41:39planetis[m]People who fork repos in github in numbers, like 10-20 a month, what's their deal?
20:44:10FromGitter<iffy> I have a string (var x = newString(len)) and want to do stdin.readChars(x, len); how do I get an openArray[char] from my string x?
20:46:10planetis[m]are they trying to take ownership of projects if a creator deletes the original?
20:46:44rayman22201on github you have to create fork to make a PR. maybe they are making a lot of PRs? They could also be creating backups, yes.
20:47:07FromGitter<iffy> oh, nm, I need to do stdin.readChars(x, 0, len)
20:54:04Araqplanetis[m]: I do it so that the code is save from github's "nuke repository" feature
20:54:10Araq*safe
20:57:01planetis[m]cool no problem
20:57:31planetis[m]but i've seen people claiming to know many languages and all they have are forks
20:57:50federico3some seem to be bot
20:58:16planetis[m]and one of them follows me and clones my repos and that annoys me
20:58:27federico3some might want to attack careless users that might pick the fork
20:58:35planetis[m]yeah must likely a bot
20:59:11planetis[m]*most
21:00:46disruptekthere isn't a lot of code i worry about losing, but yeah, i do it on repos that seem abandoned.
21:00:58disruptekand, to irritate other users, of course.
21:02:11planetis[m]lol
21:03:04disrupteki was worried we would never meet, otherwise.
21:05:12dom96anyone used any good ORMs in Nim lately?
21:06:52dom96norm is looking pretty good
21:08:11planetis[m]disruptek: was that a joke?
21:08:57planetis[m]cause I got chilled
21:10:07disruptekyou're kidding, right?
21:10:12disrupteka hottie like you?
21:10:30disrupteki only fish on gitlab. github is full of neckbeards.
21:10:55FromDiscord<exelotl> ಠ_ಠ
21:11:27disruptekpresent company excluded, of course.
21:11:47planetis[m]oh stop it, im blushing
21:24:31*teimosso joined #nim
21:31:31daddoois anybody around to discuss a possible bug in 1.0.0, or would I do better during the week?
21:31:53daddoo(I'm very hesitant to call it a "bug", but I'm not sure what else to call it at this point)
21:32:10Yardanicowell you can go ahead and ask here
21:32:43daddoookay, let me get the sample code up on pastebin ... people will have to excuse it, it's part of a work in progress, and I'm a noob at the language
21:32:59YardanicoYou can also use https://play.nim-lang.org/
21:33:08Yardanico(there's a share to ix button in the bottom left here)
21:33:47daddoois that preferred?
21:34:08Yardanicowell, it doesn't matter, but generally I would recommend you to use any paste service except pastebin :)
21:35:21daddoookay, I got no output on play, it doesn't compile on my machine here
21:35:36Yardanicowell just share it anyway :)
21:36:04daddoookay, I just did that ... the button is sitting and spinning
21:36:37*vegax87 joined #nim
21:36:45Yardanicowell try https://paste.debian.net/ then :)
21:37:15daddoowhy that over regular pastebin?
21:38:36YardanicoBecause it has ads, premium accounts and generally people use other services over it (like transfer.sh, ix.io, gists or other websites)
21:38:57daddoookay, let me put it up there
21:40:04daddoookay, here's the URL, good for 24 hours: https://paste.debian.net/hidden/97b43b56/
21:40:18daddooI left some notes in the top of the file (blocked by #[ ]#
21:40:19daddoo)
21:40:35Yardanicoand what nim version do you have?
21:40:40daddoo1.0.0
21:41:00daddooif I generate that table using "let" or "var", it's fine, but it doesn't make it thru the build as a "const".
21:41:02Yardanicoah nvm, yeah, I can get the same error on playground
21:41:34daddoogood (I think)
21:41:42*Vladar quit (Quit: Leaving)
21:42:00YardanicoBasically it probably doesn't compile because "const" means that the expression must be calculated at compile-time, but you can't do that if your const variable contains references to procedures
21:42:06Araqit's a bug (yay)
21:42:08planetis[m]btw I found a cool usecase for distinct in my linear algebra package. I define row and column vector types as distinct matrix and then will have broadcasting support, so cool.
21:42:21AraqNodeProc = proc(value: int) {.nimcall.} # workaround
21:42:44daddooI figured that was the case, Yardanico - but I'm concerned that compiler didn't catch it before trying to build the generated code
21:43:04daddoothanks, Araq - I'll have to plug that into my real project
21:43:17Yardanicodaddoo: yeah if Nim code you're trying to compile shows a C compiler error - it's always considered a bug :)
21:43:36Yardanicoideally the compiler should catch all of these before calling the C compiler
21:43:41daddoosure
21:44:25daddooyeah, generating bad intermediate-language code is considered user-hostile
21:44:58disrupteka little gift for you, shashlick: https://github.com/disruptek/bump
21:45:03planetis[m]and can be better vectorized than implementing it like other n-d array libs do
21:45:46shashlicknifty!
21:46:09disruptekit's a start. enjoy.
21:48:20daddoothanks for your time, Yardanico
21:51:54disruptekokay, i guess it works, shashlick. added a dry-run feature and bumped it.
21:56:53*clyybber joined #nim
21:57:39dom96I'm so disappointed. The only Nim oauth library appears to be really badly designed.
21:58:43disruptekhey, i spent a long time documenting how not to write such a library.
21:59:50*krux02 quit (Remote host closed the connection)
22:03:29disruptekman, i shoulda written bump ages ago.
22:07:54dom96When you use `waitFor` in an async proc, and write your own httpserver using raw sockets, and don't use the uri module. That's about where I think I need to draw the line and just write this myself.
22:07:58ZevvI once knew this guy, he was *sooo* lazy, he made this script to automate editing one file, and pushing a tag
22:09:03shashlickhe was less lazy than those who asked for such a tool
22:09:26Zevvha. and now merge it into nimble!
22:09:44Zevvwe need pluggable subcommands!
22:11:07dom96wat
22:21:32*daddoo quit (Quit: Leaving)
22:23:09disruptektotes worth it.
22:23:13*teimosso quit (Quit: teimosso)
22:23:57disrupteki realized that libgit2 would be a worse dependency than just using a subprocess, so...
22:25:14disruptekmost of stdlib doesn't use the Uri module, afaik.
22:27:33disruptekso do you wanna wait another couple weeks or do you want to solve the ioselector cleanup issue right now, dom96?
22:27:50disruptekwe've already decided that this isn't nim 1.0.
22:27:55disruptekso we can make changes.
22:28:01disruptekor do you want me to fork ioselectors?
22:28:47dom96We?
22:28:54dom96That definitely doesn't include me
22:29:01dom96I've said my thoughts in the issue already
22:29:03disruptekyou're the one that made the commit.
22:29:48disrupteki guess what i'm saying is, i didn't wait two weeks to hear that the problem is that the current code doesn't work.
22:29:56disrupteki believe that was established when the issue was created.
22:30:01disruptekhow do you want it fixed?
22:30:41dom96I think we're talking about different things
22:30:47dom96send me a link to what you're talking about please
22:30:51disruptekalright.
22:31:13disruptekhttps://github.com/nim-lang/Nim/issues/12354
22:32:18disruptekwe can fix it!
22:32:21disruptekwe have the technology!
22:32:54dom96okay, so we are talking about the same thing
22:33:06dom96Quoting myself: "I think we're left with only one option: deprecate registerProcess and introduce a new proc that isn't discardable."
22:33:46disruptekwhy can't we just do the work to make `close` not suck?
22:33:55disruptekis that really the interface you want?
22:35:26disruptekwhat use do the registrations have if the selector is closed?
22:37:17disruptekwell, please consider it and holla back.
22:37:36disrupteki got another nimble subcommand to impl. bbl.
22:39:22dom96what subcommands are you implementing? :)
22:40:23dom96I explained the problem that I foresee in the issue. Your response doesn't really encourage further discussion.
22:40:47disruptekwell, your explanation assumes that we lack the capacity for forethought, which is not the case for all participants.
22:41:18disruptekbut, it's cool. if you are happy with the code as it is, i'm fine with it.
22:41:40disrupteki really have plenty of my own bugs to fix, tbh.
22:44:56*ng0 quit (Ping timeout: 260 seconds)
22:45:39*solitudesf quit (Ping timeout: 246 seconds)
22:50:16dom96I'm not happy with how the code is
22:50:34dom96Once again, I would like the current proc to be deprecated and one that isn't discardable to be implemented
22:51:46*ng0 joined #nim
22:55:17*vegax87 quit (Quit: Leaving)
23:06:39*Hideki_ joined #nim
23:10:56*Hideki_ quit (Ping timeout: 240 seconds)
23:48:31dom96yay, a maintained JWT library
23:48:33dom96Thx yglukhov
23:51:28*Jjp137 quit (Read error: Connection reset by peer)
23:54:25*Jjp137 joined #nim
23:56:41dom96oh boy, that sure pulled in a lot of dependencies, all of bear-ssl was compiled in D: