<< 22-01-2020 >>

00:14:27*Pqzcih5 quit (Remote host closed the connection)
00:14:46*Hideki_ joined #nim
00:18:00opalby default, does nim compile or transpile? i see on the homepage it can transpile to c/cxx/js
00:22:22*krux02 quit (Remote host closed the connection)
00:35:13*jjido quit (Quit: Textual IRC Client: www.textualapp.com)
00:39:24stefantalpalaruThe latter.
00:39:28*Hideki_ quit (Ping timeout: 260 seconds)
00:49:13nisstyrethere is no difference between "compile" and "transpile" IMHO
00:49:26shashlickIt's a useless distinction
00:49:54shashlickBy this definition, it is the former
00:49:57shashlickhttps://en.m.wikipedia.org/wiki/Source-to-source_compiler
00:50:17nisstyreYeah, I agree
00:50:32shashlickNim offers far more capability than c/c++ or Javascript
00:51:36opal<nisstyre> there is no difference between "compile" and "transpile" IMHO
00:51:41opalsorry to say but your opinion is wrong
00:51:46opalit isnt a "useless distinction"
00:51:50opalits a clear semantical one
00:52:00opalyou nor i write LLVM intermediate bytecode
00:52:04nisstyreopal: ok the difference is not important, I will acknowledge there can be some differences (depending on your definition of a transpiler)
00:52:21nisstyrebut I've never seen an agreed on definition of what "transpile" really means
00:52:29nisstyrealways something about high level and low level languages
00:52:29opalmy definition is the same as the accepted definition
00:52:49nisstyrebut those concepts are problematic to clearly define
00:53:30nisstyreI think this is a good overview of the problem http://composition.al/blog/2017/07/30/what-do-people-mean-when-they-say-transpiler/
00:53:51shashlickWhat's the purpose of your original question
00:53:58opali wasnt interested in restarting this topic that i had not even a month ago in any case, so im glad to drop it
00:54:00opalthe answer was good enough
00:55:02opalthanks stefantalpalaru
00:55:58shashlickBrilliant
01:01:29*ng0 quit (Ping timeout: 268 seconds)
01:07:38*lritter quit (Ping timeout: 258 seconds)
01:14:18FromGitter<iffy> I just finished the first version of this library for accessing the OS keyring on macOS/Windows/Linux: https://github.com/iffy/nim-keyring/ Feedback and guinea pigs welcome :)
01:32:32shashlickVery timely - I need this!
01:40:52FromGitter<gogolxdong> What does it do?
02:11:48*EastByte quit (Ping timeout: 248 seconds)
02:14:34*EastByte joined #nim
02:18:43FromGitter<deech> @iffy Looks great! Nice and simple.
02:20:57FromGitter<iffy> @gogolxdong It lets you store things in the OS keyring (like passwords). For instance, for macOS: https://support.apple.com/guide/keychain-access/what-is-keychain-access-kyca1083/mac
02:31:11*cgfuh quit (Quit: WeeChat 2.6)
02:32:01*BourneToBe joined #nim
02:49:00FromGitter<Varriount> Sadly, Windows doesn't really have an equivalent
02:49:43FromGitter<Varriount> I know it has credential management, but that API doesn't have the same security behavior as OSX or Linux
02:54:50*lmariscal06 quit (Quit: Ping timeout (120 seconds))
02:55:03*sammich quit (Remote host closed the connection)
02:56:02*a_b_m quit (Quit: Leaving)
02:56:04*opal quit (Ping timeout: 240 seconds)
02:56:24*leorize quit (Ping timeout: 240 seconds)
03:07:35FromGitter<iffy> @Varriount What does it lack?
03:07:53FromGitter<iffy> Also, does anyone have an example of installing Nim on Windows with GitHub Actions?
03:10:33*opal joined #nim
03:12:26*lmariscal06 joined #nim
03:13:48*leorize joined #nim
03:34:47*BourneToBe quit (Quit: BourneToBe)
03:42:09FromGitter<Varriount> @iffy Primarily a way to allow a user to sent an application access to credentials
03:43:06disruptekiffy: tell me about your dbus-using pw manager.
03:51:32*muffindrake quit (Ping timeout: 252 seconds)
03:53:46*muffindrake joined #nim
03:55:10*endragor joined #nim
04:25:29*nsf joined #nim
04:26:08*BourneToBe joined #nim
04:38:01*marmotini_ joined #nim
04:42:18disruptekZevv: maybe we should formalize your mem stats api a bit and use it elsewhere. we could build the instrumentation for golden into the compiler itself.
04:53:08*ptdel quit (Quit: https://quassel-irc.org - Chat comfortably. Anywhere.)
05:10:01*endragor_ joined #nim
05:10:26*endragor quit (Read error: Connection reset by peer)
05:11:11*oculuxe joined #nim
05:11:40*oculux quit (Ping timeout: 268 seconds)
05:41:11*NimBot joined #nim
05:51:47*BourneToBe quit (Quit: BourneToBe)
06:15:21*xet7 quit (Read error: Connection reset by peer)
06:15:50*xet7 joined #nim
06:16:34Zevvwhat would you need? due to lack of info I can only come up with alloc counts, not with total sizes
06:17:51*arecaceae quit (Remote host closed the connection)
06:17:52ZevvI could pass every [[dr]e]alloc() including pointers and sizes, then golden can keep track of the bookkeeping, but it is a bit of a burden and can of course not be done with any constructs that require heap memory
06:17:56Zevvbecause of reasons
06:18:17*arecaceae joined #nim
06:19:24disrupteki'm staggered that you don't have size info.
06:20:36Zevvdidnt mean to stagger you :(
06:21:50Zevvthink C malloc api level.
06:22:55disruptekmaybe what we really want is some data nodes mixed into the ast; then we will consume them there. then we don't worry about api or the alloc impl.
06:23:07Zevvbut like I sait earlier: the stats are there only for a handful of unit tests now. We can build that to whatever is needed, the good thing is that with te rework all allocs come through one place only now
06:23:14disruptekbreadcrumbs that we can do whatever we want with.
06:23:30Zevvelaborate
06:24:21disruptekwhat we want is some data to get collected at runtime; we'll consume it at runtime, also.
06:24:55disruptekbut the machinery to create this can be done at compile-time.
06:25:31disruptekwe create nodes in the ast that are just data; they reflect some metadata that we know some tooling may want to mess with.
06:25:50disruptekthen we can plug in handlers for those nodes, etc.
06:27:06Zevvall possible I guess,but the ent result you are aiming for?
06:28:02disruptekhave you done any ios coding?
06:28:13disruptekobjective c in apple's world, at all?
06:28:55disrupteki guess i want a live profiler.
06:31:16disrupteki think it's pretty doable.
06:32:28TangerHuh, ptrace isn't part of the stdlib
06:36:39Zevvdisruptek: I have perf on linux. profiles right into kernel space
06:37:02disruptekthis is kinda what i had in mind: https://asciinema.org/a/25394
06:37:22Zevvall this stuff we build in needs to be maintaines. d
06:37:22Zevvit needs to cooperate with otjr stuff
06:37:27Zevvit will rot andd start smelling
06:37:42Zevvtyping while walkigng, sorry
06:38:22disruptekahah. i was thinking... On The Job...Retarded? stuff...
06:38:33Zevvall of the above
06:39:58disruptekthe best way to maintain it is to make it indispensable.
06:41:10disruptekwe should get netflix to show up at fosdem and do a talk on their bpf stuff.
06:41:25disruptekthat's something i'm super interested in.
06:42:30*xet7 quit (Read error: Connection reset by peer)
06:42:41*xet7 joined #nim
06:43:51*xet7 quit (Remote host closed the connection)
06:44:51*xet7 joined #nim
06:48:07Zevvfun but overrated
06:48:09*Jjp137 quit (Read error: Connection reset by peer)
06:49:49Zevvdo you use perf?
06:50:04Zevvif not, spend a day on it, it goes deep
06:51:20*dddddd joined #nim
06:51:48Zevvbuilt in tools are one trick ponies. you cant easily interface with those, or script them
06:52:17Zevvnice profiling ui you have there. now let me use this on me embedded headless system
07:00:14*Jjp137 joined #nim
07:06:10FromGitter<garuse> Hi all! I want to create a static binary web server that will serve big logs. However it looks like Jester does not support compression. Is there a documented way to achieve this?
07:09:38Tangergaruse: Jester doesn't support compression? In what way? As in it has no functionality to decompress files?
07:09:53TangerOr it won't let you handle content types differently?
07:12:48ZevvMy guess is that he means the jester does not allow gzip content-encodign
07:13:46FromGitter<garuse> no api to compress the pages before sending them
07:24:58FromGitter<matrixbot> `curioussav` Why not just rely on nginx for that
07:25:21ZevvIt should be fairly trivial to handle that yourself, but I guess the answer would be "no, no documented way"
07:25:51FromGitter<garuse> Jester doc (README) has only very simple examples not even showing how to send custom headers
07:27:28*PMunch joined #nim
07:29:04FromGitter<garuse> also I cannot find any compression standard compression lib here https://nim-lang.org/docs/lib.html.
07:31:00*Guest44431 is now known as dadada
07:31:19*marmotini_ quit (Remote host closed the connection)
07:31:27Yardanicothere's https://github.com/nim-lang/zip
07:34:06PMunchHmm, Araq, I remember you mentioning that some work was being done to be able to use FFI during compile-time. Is this still being worked on?
07:34:43dadadaCould this have a place in Nim? I just learned about it, and kind of dig it. https://en.wikipedia.org/wiki/Language_Integrated_Query
07:35:15Yardanicowell, with macros or templates you can do similar stuff :)
07:36:09Yardanicoor https://github.com/zero-functional/zero-functional (it implements same stuff as in sequtils like mapIt, but more efficiently if you use a lot of the calls)
07:36:09PMunchUgh, used LINQ to actually do some SQL stuff and it was horribly inefficient..
07:36:22livcdperf wise ?
07:36:54Yardanicohttps://github.com/Araq/ormin/blob/master/examples/chat/server.nim#L26
07:37:22FromGitter<nhanb> Hi everyone! I'm (trying to) write a web based desktop app, basically a nim server serving an SPA written with karax. Is `asynchttpserver` appropriate for my use case? The docs say asynchttpserver isn't production-ready but I'm not sure if it's just performance-wise.
07:38:16PMunchlivcd, yeah perf wise
07:38:30PMunchIt essentially didn't do much in the way of query optimisation
07:38:32Yardanico@nhanb well, for your usecase it'll be more than enough I think
07:38:57PMunchYeah it should be plenty fine
07:40:15PMunchNot sure what that line refers to, asynchttpserver has been used on the forums and the playground along with other sites for quite a while
07:40:25FromGitter<nhanb> Sweet, thanks @Yardanico @PMunch !
07:40:38PMunch(although I think a lot of Jester projects have migrated to httpbeast at this point after it became the default)
07:41:13PMunchBy the way, Jester might be easier to work with
07:41:20FromGitter<nhanb> Not supporting Windows is a dealbreaker for me though
07:41:29livcdyeah httpbeast does not support windows
07:41:45Yardanicocan't you use jester with asynchttpserver?
07:41:51dadadaPMunch: I like the idea of using the same declarative syntax for all types of queries (databases, collection of objects, networks, ...), optimization is something I wouldn't blame on the higher level syntax that LINQ offers ... it seems like it does improve code readability
07:42:00PMunchAaah, didn't know it doesn't support windows
07:42:11PMunchGuess that's not that big an issue for most server installs
07:42:19PMunchYardanico, yes you can
07:42:38dadadarandom comments on sites like stackoverflow lead me to investigate LINQ, in those comments it seems that many have grown fond of it
07:42:59PMunchdadada, oh yea I don't have anything against that kind of syntax (horrible as it might be to use, LINQ is a mess..)
07:43:15Yardanicowell, I don't think it would really improve readability in Nim when you already have inline for, things like "collect" macro or can make your own DSL :)
07:43:27dadadaPMunch: can you go into some details on why it is a mess?
07:43:31PMunchI spent the better part of a day trying to figure out a LINQ query that took me 10 minutes to write in SQL
07:43:33FromGitter<nhanb> Huh I didn't know you could use jester on top of asynchttpserver
07:43:34dadadaI mean you started, but more :-)
07:43:47Yardanico@nhanb jester was using asynchttpserver before httpbeast was created :)
07:43:51Yardanicoby default that is
07:44:07dadadaPMunch: do you have that LINQ query at hand and can private message it to me?
07:44:26PMunchAnd by the end of the day the LINQ query for super inefficient while the SQL query was loads faster
07:44:34PMunchHmm, maybe, just a sec
07:47:48*Vladar joined #nim
07:48:00ZevvPMunch: I believe CT FFI is functional in a PR somewhere
07:48:22PMunchZevv, oh really?
07:48:30Zevvtimotheecour iirc
07:48:38Yardanicowhat about https://github.com/nim-lang/Nim/pull/10150
07:48:40disbotFFI at CT ; snippet at 12https://play.nim-lang.org/#ix=282x
07:48:41PMunchdadada, can't seem to find the LINQ query, only the SQL I ended up with
07:49:05Yardanicohttps://github.com/nim-lang/Nim/pull/12877 is merged too
07:49:07disbotVM: support importc var, ptr/pointer types, cast int <=> ptr/pointer ; snippet at 12https://play.nim-lang.org/#ix=282y
07:49:09FromGitter<nhanb> TIL jester picks either of the servers under the hood depending on OS, that's cool
07:49:20Zevvhttps://github.com/nim-lang/Nim/pull/10150
07:49:21disbotFFI at CT ; snippet at 12https://play.nim-lang.org/#ix=282x
07:50:34PMunchnhanb, the beauty of compile-time evaluation :)
07:54:41dadadadoes anyone here have experience with F#? it looks like a decent language by a first glance on its syntax ...
07:54:51PMunchdadada, I guess it's partially down to me not getting used to the syntax. It's just hard to use, and read, which is never a good thing..
07:54:55Yardanicodadada: .NET :(
07:55:23PMunchdadada, we have a company here that uses it exclusively, and people here at work have started talking about starting to use it as well
07:55:50PMunchBut yeah it's .NET, which depending on your perspective is either a huge pluss, or a huge minus
07:57:23PMunchI really liked Clojure, but the fact that in runs on the JVM means it can't be used for certain things
07:57:37dadadaPMunch: I saw short examples of LINQ on wikipedia and found them very readable, of course that can be deceiving
07:58:17PMunchMost short things are fine, like select five of these and do some simple stuff with it
07:59:40PMunchAnd to be fair, this is the query I was trying to replicate: http://ix.io/282A
08:00:00*gmpreussner quit (Quit: kthxbye)
08:04:11*solitudesf joined #nim
08:04:54*gmpreussner joined #nim
08:08:02*dddddd quit (Ping timeout: 268 seconds)
08:15:35*jwm224 quit (Ping timeout: 272 seconds)
08:17:28*jwm224 joined #nim
08:20:36FromDiscord<citycide> dadada: I love F#. dotnet is also becoming a fantastic platform with Core. My biggest complaints were always boilerplate and ridiculously verbose configurations and those are essentially a non-issue for me now
08:21:09*dddddd joined #nim
08:22:12FromDiscord<citycide> I do wish I could compile F# to native more similarly to Nim, but that leaves things for Nim to do instead
08:30:13dadadaPMunch: that was a complicated query :D the consensus on stackexchange seems to be that when you get used to LINQ, it is good, of course its unfortunate that the syntax is so close to SQL yet differently structured, it would be great if we had standards for structured queries that all followed the same left-to-right patterns, from a programmer's life perspective you continuously have to relearn the same
08:30:19dadadathings, and when context switching between languages you get slowed down ... think about the lost productivity world wide over the span of decades
08:33:53dadadacitycide: when glancing at F# examples it does kind of resemble Nim (and hence python) code, compiling to native would be a huge plus, who knows maybe F# will be freed from its cage one day
08:56:22*floppydh joined #nim
09:02:40Araqfwiw I like Nim's syntax better as F# departs moreso from the "traditional" expression syntax
09:04:40Araqwhat do you miss in Nim that F# offers?
09:16:40FromGitter<garuse> i was trying to use zip/zlib but I get this: Error: unhandled exception: zlib version mismatch! [ZlibStreamError]
09:22:35PMunchIsn't F# purely functional?
09:24:23PMunchAnd dadada, that's pretty much exactly what annoys me with LINQ. Granted I have only used it for database stuff (apart from a `First` here or there or similar simple things), and trying to write a LINQ query when I have the SQL solution in my head really bothers me..
09:42:29Araqgaruse: I don't know, maybe our zlib wrapper is outdated
09:45:08*oculux joined #nim
09:45:27*oculuxe quit (Ping timeout: 265 seconds)
09:50:46AraqPMunch, what software do you use for your slides?
09:51:58PMunchNormally just LibreOffice
09:52:12FromGitter<alehander92> Araq
09:52:29PMunchAlthough I have done some in Inkscape with the JessyInk plug-in
09:52:31FromGitter<alehander92> is there a standard format in which the cfg is emitted
09:52:47FromGitter<alehander92> like, can i easily dump the cfg for "most" functions while compiling in a file
09:53:02FromGitter<alehander92> wondering if i can add it as a view in our viewer
09:53:35dadadatried OnlyOffice the other day, it's open source as well, but using the Microsoft office document formats as a basis, the UI is very clean and easy to get ... I'd tentatively recommend at least trying it
09:58:18Araqalehander92: well we emit it as a list of instructions, asm-like
09:58:50*kahiru left #nim ("http://quassel-irc.org - Chat comfortably. Anywhere.")
10:01:56FromGitter<alehander92> but can one emit it for ~all functions
10:04:45Araq -d:toDebug=always
10:05:11Araqbut it's the usual thing, if your time has no value, look at "all" the functions
10:06:51FromGitter<alehander92> i was wondering about passing that info to a ide-like tool , not to look at them manually
10:07:30FromGitter<alehander92> of course, otherwise filtering makes more sense
10:07:41Araqsame thing though, better ask for specific information
10:07:49FromGitter<alehander92> and recompile each time?
10:07:59Araqrather than dumping everything to your poor IDE.
10:08:09Araqrecompiles must be fast, we need IC
10:08:28AraqI'm so sick and tired of this batch processing shit
10:09:15FromGitter<alehander92> hm, it's a valid suggestion
10:09:24FromGitter<alehander92> i'd love to see IC as well
10:09:58FromGitter<alehander92> dont get me wrong, i already do something like this for ast-s, as i can use the nim parser as a lib(or plugin)
10:10:30FromGitter<alehander92> so, hm, in this case, can one hint to the compiler to stop after producing its cfg dumps
10:11:10AraqI don't want to look at the CFG in my IDE though
10:11:18Araqit's incomprehensible
10:12:12Araqcurrently about 3 people do understand it
10:12:33Araqso it's a feature for 3 people on the planet :P
10:13:33FromGitter<alehander92> yes, but you can see a visual graph of it :D :D
10:13:59FromGitter<alehander92> no, i agree, but sometimes i like to think of fun features
10:14:34FromGitter<alehander92> just wanted to research how feasible would that be in principle
10:18:21Araqok, well. in principle it's really nice
10:19:01Araqvisual graph of a CFG that doesn't lose information (our does lose almost everything that is not relevant for the analysis we need to do)
10:27:47FromDiscord<Tak> When a seq resizes, does it re-size the whole array into a new contiguous array or does it assign a new array and add a ptr to link between them?
10:28:27FromGitter<alehander92> Araq hm, so does the dump-ed cfg not show it
10:28:42FromGitter<alehander92> yeah it had mostly joins/forks and similar right
10:45:10lqdev[m]@Tak it allocates a new array, copies the existing data there, and frees the old array
10:45:34lqdev[m]there are no links because it would negatively impact performance
10:46:42FromDiscord<Tak> Cool thanks!
11:18:27dadadasay I'd like to add support to Nim for a syntax like in the first example in https://en.wikipedia.org/wiki/Language_Integrated_Query#Language_extensions
11:19:02dadadadoes Nim's macro system have the flexibility for that, or would I need to meddle with Nim's core?
11:19:32dadadathis is the code I mean:
11:19:33dadadavar results = from c in SomeCollection where c.SomeProperty < 10 select new {c.SomeProperty, c.OtherProperty};
11:20:24lqdev[m]dadada: pretty sure that would parse correctly
11:22:01lqdev[m]yeah, it does. mostly https://play.nim-lang.org/#ix=282Y
11:22:16lqdev[m]because `from` is a keyword
11:22:31lqdev[m]but designing such a thing is indeed possible
11:23:14lqdev[m]the hardest part would be actually parsing the query from the existing AST
11:27:21*m4r35n357 quit (Quit: Ex-Chat)
11:38:04*cgfuh joined #nim
11:55:56dadadacan the code be preprocessed in a way to distinguish "... = from ..." from "from module", so you could mark the "= from" as not being the keyword
11:57:03dadadaobviously I could write my own preprocessor to call before Nim, something you'd want to avoid
12:11:43Araqdadada, maybe check out Ormin's solution for this problem
12:13:49FromGitter<Vindaar> @narimiran: Ok, so I just checked the azure_pipelines file and which other packages are tested. Do I understand correctly that the only packages with dependencies we test are those that are provided by the `dlls.zip` from the nim download page?
12:14:57*Hideki_ joined #nim
12:18:07*nsf quit (Quit: WeeChat 2.7)
12:22:42dadadawhy can't macros call c functions?
12:23:46dadadaOrmin is nice
12:24:28Zevvdadada: because macro's run at compile time, and there is no CT FFI in Nim
12:32:25lqdev[m]probably not, but `From != from` so maybe you can use PascalCase for keywords to make it compatible
12:32:37lqdev[m]or maybe even UPPERCASE to mimic SQL
12:33:01PMunchZevv, "yet"
12:33:12ZevvWell, I was not wrong
12:33:34Zevvno one said it will even make it into the compiler afaik
12:37:21*Hideki_ quit (Remote host closed the connection)
12:38:16*Hideki_ joined #nim
12:42:48*Hideki_ quit (Ping timeout: 260 seconds)
12:44:05FromGitter<iffy> disruptek: The linux dbus-using pw manager uses the Secret Service DBUS API for storing passwords. It's what libsecret does, but without using libsecret because I couldn't figure out how to get libsecret to work. It seemed simpler to just use Dbus instead of using a library that uses Dbus.
13:14:46*gangstacat quit (Quit: Ĝis!)
13:19:03*endragor_ quit (Remote host closed the connection)
13:22:19*gangstacat joined #nim
13:27:26*Pqzcih5 joined #nim
13:36:56FromDiscord<Rika> anyone know a lib that gives a similar functionality to reactivex?
14:01:17YardanicoA guy in telegram found yet another compiler crash with config files :)
14:01:21Yardanico-d: ssl, release
14:01:24Yardanicocompiler crashes
14:01:54Yardanicoah nvm, not on devel
14:02:32*nsf joined #nim
14:05:44leorize@iffy: you are the first to ever say that :P
14:06:10leorizeif libsecret supports gintrospection then you might be able to get it to work with gintro
14:17:58*lritter joined #nim
14:21:06FromDiscord<Clyybber> Zevv: It made it into the compiler : )
14:21:21FromDiscord<Clyybber> you just have to build the compiler with -d:libFFi or something like tha
14:26:20Zevvoh look at that! There is sooo many stuf happening that never makes it into the docs
14:29:21*ljoonal quit (Remote host closed the connection)
14:31:50shashlickhttps://stackoverflow.com/questions/59843577/go-like-parallelism-in-nim
14:32:18PMunchRika, you should be able to wrap it if it runs on C++
14:32:52PMunchClyybber, oh so you can get this feature right now? Interesting!
14:34:00leorizestill gated behind a flag when you build the compiler at compile-time though :P
14:34:17leorizenot even the official distribution enables it, so I wouldn't count on it being available
14:34:25PMunchTrue, but still
14:34:56*ljoonal joined #nim
14:35:01*abm joined #nim
14:35:22PMunchHmm, I'm spoiled by the JSON implementation in Nim..
14:35:41dadadaI had this idea how commonly seen code where you have an if-else and the code blocks are almost the same except for a small detail could be simplified with automatically provided context references similar to how Nim provides a result variable https://pastebin.com/M1dNJ08X
14:35:57PMunchI mean there are long article on how to create JSON objects in C#, and I only need a simple object with two fields..
14:36:29dadadaI know somebody else has probably thought about this before... not claiming this is genius or anything...
14:37:18PMunchI've been annoyed by that issue before, not really thought about how to solve it though
14:39:52PMunchA simple template can do something similar: https://play.nim-lang.org/#ix=283I
14:40:07PMunchThe syntax might be a tad hard to read though..
14:43:32*sagax quit (Quit: Konversation terminated!)
14:45:30FromDiscord<Rika> PMunch, i find it odd that no one has made one yet though
14:46:10dadadaPMunch: I like the template solution, too
14:47:08leorizecan someone on OSX check if SOCK_CLOEXEC exists?
14:47:19leorizeit should be in <sys/socket.h>
14:47:59dadadaPMunch: don't understand Nim enough yet, it looks like your template copies a, b by value?
14:48:59dadadain my example we needed to operate on the original it.ri it.le
14:50:17leorizehttps://play.nim-lang.org/#ix=283M
14:50:22leorizefixed it :P
14:52:05leorizePMunch: btw, do you think it's possible to implement project-agnostic support to nimsuggest (ie. no longer requiring project file)?
14:52:25PMunchleorize, ah indeed that is a better solution :)
14:52:39PMunchWhat do you mean?
14:53:03leorizebasically make it so that you don't have to pass a project file into nimsuggest
14:53:20leorizeI've added auto detection, though I don't know how to run multiple projects in nimsuggest :P
14:53:25leorizefigured that you might know
14:53:41PMunchdadada, with leorizes modification it should now behave as you'd expect: https://play.nim-lang.org/#ix=283N
14:54:23*ptdel joined #nim
14:55:37dadadaty leorize, PMunch
14:55:45PMunchHmm, I just rely on some sketchy logic in nimlsp to determine the project :P
14:55:58PMunchIt keeps one instance for each project you have open
14:56:27leorizeyou can use the one provided by the compiler now :P battle tested with nim.nvim
14:56:40PMunchdadada, no problem, once you master the power of meta-programming you will see all of these things as trivially solved and be super annoyed every time you encounter them in a language that doesnt' have it :P
14:56:56PMunchOh there is a built in way to do that now?
14:57:28*nsf quit (Quit: WeeChat 2.7)
14:57:57dadadabuilt in way for context?
14:58:01leorizePMunch: there has always been, I just make it work on real projects :P https://github.com/nim-lang/Nim/pull/12404
14:58:03disbotcompiler/options: improve project file detection
14:58:27dadadaI dig metaprogramming
14:59:06dadadastill would be nice if not everyone had to invent his own withContext templates, no matter how easy it is
14:59:16PMunchdadada, nah built in way to detect the main project file of a given nim file
14:59:42PMunchdadada, yeah I feel that there is a place for all these random templates we end up writing to solve these things
14:59:46PMunchMaybe in "sugar"?
15:00:09*dddddd quit (Ping timeout: 268 seconds)
15:00:11Araqthere is considerable overlap between 'withX' and destructors
15:00:14*sagax joined #nim
15:00:19Araqand we have destructors now.
15:00:52PMunchAraq, this was a different problem than what is solved with your typical `withX` template
15:01:11PMunchSee dadada's initial paste: https://pastebin.com/M1dNJ08X
15:01:29PMunchMaybe `withContext` wasn't the best name for it though
15:01:46dadadawhere I have since discovered bad English, sry
15:02:10PMunchNo worries, strikingly few here have English as their first language (myself included)
15:02:29dadadawell I thought, seeing that the result-function variable is standard part of the language, that maybe we could find a notation that is similarly convenient
15:02:35FromDiscord<Rika> PMunch, reactivex only has C++ 😦
15:02:50PMunchRika, so? Nim compiles to C++ as well
15:03:10FromDiscord<Rika> but i dont wanna use cpp xd
15:03:17dadadanot claiming that I found it, but this type of problem has irked me in many different languages, the same was true for result variables that you needed to create by hand
15:03:29PMunchYeah, result is pretty neat
15:03:47PMunchThe syntax to introduce result though is a bit less clear..
15:04:00PMunchs/result/context
15:04:27PMunchOh well, I'm off now, TTYL
15:04:28*PMunch quit (Quit: Leaving)
15:05:10dadadamy idea was whatever is the last used variable in the one-lined if-else is automatically becoming context for the indented block within that if-else
15:05:27dadadafor anyone that hasn't seen the pastebin
15:07:38dadadaof course there may be code where there's the choice between more than only two contexts, so something more generalized might be great, but it should be short and easy to read for simple two-contexts cases as those will be the most common ones
15:07:43shashlickrunning into a tough issue - importing libcurl so it pulls in procs with CDECL
15:08:31shashlickalso pulling in some curl specific code which complains that those CDECL procs conflict with the ones defined in easy.h
15:09:34FromGitter<alehander92> dadada great to think out of the box
15:09:44FromGitter<alehander92> but this particular example seems very worrying to me
15:10:01FromGitter<alehander92> very hard to conceptualize
15:10:22FromGitter<alehander92> its much easier when you hit this case to offload this snippet to a new function and use result there
15:11:09dadadaalehander92: I must disagree on the much easier part, if it was that easy, people would already be doing it
15:11:16FromGitter<alehander92> imo using many well named small `func`-s is a very good idea especially if they can be easily inlined
15:11:45FromGitter<alehander92> but refactoring code into smaller functions is being done very often
15:12:49dadadaalehander92: as you see from the example I've given in the pastebin, that was code from Nim's doc, and I think this kind of copy-paste programming is commonly done precisely because creating a new function everytime you hit on something like that is not commonly done, because it's not intuitive, for example, how would you name that new function?
15:12:57*dddddd joined #nim
15:14:02FromGitter<alehander92> hm, but i think i see what you mean on second read
15:14:03dadadaalehander92: yes, it is a good practice and done very often, agreed, but creating small functions for things that you might only use one time in your whole codebase is still something by far not everybody is doing, see the examples that can be seen in Nim's own docs
15:14:16FromGitter<alehander92> yes, i was wrong about funcs, here you need to use a template
15:14:23FromGitter<alehander92> but what i am trying to say is
15:14:32FromGitter<alehander92> yeah, maybe in this case you can design a custom abstraction
15:14:44FromGitter<alehander92> but then you hit a slightly different situation
15:14:52FromGitter<alehander92> and then you can design a next or stronger version of this abstraction etc
15:15:15FromGitter<alehander92> while you can already do just template/func abstraction which is much more obvious to an outside programmer imo
15:16:21FromGitter<alehander92> about the name: if i knew what algo this is, probably there would be an ok name for it
15:16:59FromGitter<alehander92> but maybe you mean something else: maybe what you want is something like @timotheecour 's byRef
15:17:00dadadamaybe he needs to get inside :D I see what you mean, with that sort of argument we can't innovate too much, we need to keep with expectations, instead of raising them higher
15:17:09dadadas/he/he or she/
15:17:19dadadas/with/within/
15:17:38dadadaty alehander92 , I'll check it out!
15:17:42FromGitter<alehander92> and `byRef a = if c > 0: it.le else: it.ri # do stuff with a now `
15:17:46FromDiscord<Rika> hmm
15:17:50FromGitter<alehander92> which is again more general
15:17:59FromGitter<alehander92> i dont remember the syntax, and i think it was just a rfc/pr
15:18:13FromDiscord<Rika> i'll try just implementing observable/observer myself in nim
15:18:40FromGitter<alehander92> dadada, dont get me wrong, i love abstractions and writing macro dsl-s, just trying to brainstorm whats the most balanced general+simple approach
15:19:01dadadaalehander92: maybe byRef could be made part of standard Nim
15:19:39dadadaif it is what I think it to, it would be super handy
15:19:40FromGitter<alehander92> https://github.com/nim-lang/Nim/pull/11824
15:19:43FromGitter<alehander92> it seems close!
15:19:43disbot[feature] ref syntax for lvalue expressions: `byRef: myref=x[1].foo[2]` ; snippet at 12https://play.nim-lang.org/#ix=283U
15:20:38shashlickMan I have a 1 in 10 chance of getting any help here, seems like I'm always working on some left field stuff with Nim
15:22:18FromGitter<alehander92> dadada yeah it seems close to your pain point to me
15:22:39FromGitter<alehander92> just didnt want to make it hard-tied to a construct like if
15:24:43*icebattle joined #nim
15:26:08FromGitter<zetashift> @shashlick you are dealing with some hard stuff :(
15:28:13dadadaalehander92: one disadvantage I can see is that with byRef (now apparently byAddr) you have to define a name for your "context", which is not a big deal, but it does go against he idea of programming by convention
15:28:45dadadas/he/the
15:29:51dadadaindeed it is good that you can make a special name for it, since if you have multiple layers of context, you'd need it anyway
15:35:50FromGitter<alehander92> yes, i think there is a balance
15:36:06FromGitter<alehander92> because convention comes with implicitness
15:36:12FromGitter<alehander92> which can be quickly overwhelming
15:36:35FromGitter<alehander92> you might like `using` tho
15:36:57FromGitter<alehander92> and `{this: self.}` (but i am not sure the last one survived)
15:37:01dadadamy thought process is this: the solution will only be good enough if code like the one I found inside Nim's official docs changes to that new solution
15:37:48dadadawhich means that in 99% of all cases Nim programmers would never create such repetitive code again, because it's dead simple not to
15:38:30FromGitter<alehander92> yes, and i think byAddr is much easier to reason for it
15:38:52dadadawhoever wrote the https://nim-lang.org/docs/tut2.html#generics code didn't think that there was a more idiomatic solution at the time, so he ended up with that if-else and repetition
15:39:05FromGitter<alehander92> because overally what you intend is "make the same thing but with different variables depending on stuff"
15:39:30FromGitter<alehander92> this condition might be `case` or pattern matching or `while` or something else
15:39:46FromGitter<alehander92> so its much easier to use orthogonal features
15:41:09FromGitter<alehander92> like assignment + normal flow constructs (with just making assignment a bit more general)
15:45:08dadadaalehander92: byAddr could create a default variable name as well
15:45:26dadadaor a variation of byAddr
15:46:12FromGitter<alehander92> but the difference is `result` exists in a function and there can be hardly other `result`-s there: all code is in mostly a single function (ok, you can probably access result in closures..which is confusing :()
15:46:45dadadaif the default was context, you could still use specialContext or subContext in a byAddr or withAddr that is nestest
15:46:48dadadanestet
15:47:50FromGitter<alehander92> and how does it work with case/pattern matching/other possible conditionals
15:51:50*icebattl1 joined #nim
15:56:09dadadaalehander92: https://pastebin.com/RzGXEkfH
15:56:39dadadacorrect me if I used byAddr wrongly
16:04:12*nsf joined #nim
16:04:34dadadaalehander92: updated https://pastebin.com/5Wa6SCBU with PMunch withContext, too
16:10:30FromDiscord<Tak> Of course you have method syntax for fake a method for an object. Is there a way to bring its contents into scope so you don't have to qualify if everytime you reference a variable? i.e instead of Object.Variable just Variable
16:10:38FromDiscord<Tak> Of course you have method syntax for faking a method for an object. Is there a way to bring its contents into scope so you don't have to qualify if everytime you reference a variable? i.e instead of Object.Variable just Variable
16:13:38dadadanot that I know, but interesting concept, could maybe be something analogous to PMunch's withContext, withScope ... I have no idea how to implement that or if it's possible, just wanted to let you know that I support the idea
16:13:48FromGitter<alehander92> Tak dadada yes there was
16:13:53FromGitter<alehander92> `{.this: self.}`
16:14:02FromGitter<alehander92> ahh sorry
16:14:12FromGitter<alehander92> if you want to do it not in method but when using the instance
16:15:04FromGitter<alehander92> you can use https://github.com/citycide/cascade
16:18:06FromGitter<alehander92> you can also write your own macro to do something like `bringInScope <instance>`
16:18:24FromGitter<alehander92> if you dont want to use them only in the indented block/scope of cascade
16:19:14FromDiscord<Tak> So the pragma brings it into scope for the whole procedure definition and then the cascade macro lets you make a block to reference it in code? So I can replicate the pragma but outside the proc definition?
16:19:52FromGitter<alehander92> no, sorry `{.this: self.}` is deprecated
16:19:57FromGitter<alehander92> and it was a bit different
16:20:32FromGitter<alehander92> but you can replicate something like `bringInScope <instance>` to procude just `var fieldName = instance.fieldName; var fieldName2 = .. etc`
16:20:54FromDiscord<Tak> Yeah that makes sense, and that would be 0 overhead as its all compile time right?
16:21:40FromGitter<alehander92> you can use `fieldPairs` or something like that for iteration on fields
16:22:27FromGitter<alehander92> well, keep in mind that maybe you'd want to use `byAddr` as well in such a macro actually
16:22:39FromGitter<alehander92> or to make it produce `template fieldName = instance.fieldName; etc`
16:22:51FromGitter<alehander92> otherwise yes, if its a macro/template it happens on CT
16:23:00FromDiscord<Tak> Hmm okay lots to look into, appreciate the help 🙂 thanks
16:23:04FromGitter<alehander92> the runtime cost remains the runtime cost of the *generated code*
16:23:09FromGitter<alehander92> what i mean is
16:23:19FromGitter<alehander92> imagine if you have object with field1: int = 0
16:23:39FromGitter<alehander92> if you generate ⏎ `bringInScope a; field1 = 2`
16:24:09FromGitter<alehander92> you want this assignment to change `a.field1` thats why you need to make sure `field1` always changes the actual `a.field1`
16:24:14FromGitter<Vindaar> yeah, I'd also just use a template. Something like this: ⏎ https://play.nim-lang.org/#ix=284h
16:24:27FromGitter<alehander92> and `var field1 = a.field1` copies the variable into new location!
16:25:01FromGitter<alehander92> dadada, yes, good summary!
16:25:26FromGitter<alehander92> its a valid idea , just not my personal preference but others might like it
16:25:55FromDiscord<Tak> Yeah I see, thanks for the help guys, reminds me a bit of using RecordWildCards in Haskell to scrap some of the boiler plate, that's really the intent for me :
16:25:57FromDiscord<Tak> :p
16:31:28*Trustable joined #nim
16:34:28*EastByte quit (Quit: WeeChat 2.6)
16:35:41*EastByte joined #nim
16:37:06*narimiran joined #nim
16:46:05*abm quit (Quit: Leaving)
16:55:53*jholland__ joined #nim
17:04:57*icebattle quit (Quit: leaving)
17:36:13*dddddd quit (Ping timeout: 265 seconds)
17:37:25FromGitter<kaushalmodi> narimiran: why don't you like auto-checking examples in doc strings? :) https://github.com/nim-lang/Nim/pull/13227#issuecomment-577297160
17:37:27disbotFix typo and improve in code-block of 'lib/pure/parseutils.nim'
17:38:40FromGitter<kaushalmodi> ^ The runnableExamples simply needs to be put at the end of the proc doc string.. I am surprised that you are against using runnableExamples
17:38:41*bozaloshtsh_ quit (Quit: ZNC 1.7.5 - https://znc.in)
17:39:03*bozaloshtsh joined #nim
17:39:03*bozaloshtsh quit (Changing host)
17:39:03*bozaloshtsh joined #nim
17:40:37*ptdel quit (Ping timeout: 260 seconds)
17:42:10narimirani'm not. don't put words in my mouth
17:43:20leorizenote that the compiler can now test Nim code blocks
17:43:34leorizeI think you need to put an annotation in the block, but it can do testing now
17:48:05*bozaloshtsh quit (Quit: ZNC 1.7.5 - https://znc.in)
17:48:25*bozaloshtsh joined #nim
17:48:25*bozaloshtsh quit (Changing host)
17:48:25*bozaloshtsh joined #nim
17:48:53FromGitter<kaushalmodi> leorize: I replied in that thread that if the doc string example is preferred, `:test:` should be added
17:49:01*dddddd joined #nim
17:49:22FromGitter<kaushalmodi> The initial PR did not do auto-checking so I was surprised that the OP was asked to revert to that version
17:52:05leorizenarimiran: did you encounter any bad indents from nim.nvim? :p
17:52:23leorizeI was working on the compiler the other day and spotted a few
17:53:02leorizebut since you probably work with much more code than I do, I was wondering if there's any other bad indents that I haven't fixed
18:09:52dadadaI added one more idea for context dependend variable use and control structures to the summary, it can be found at the bottom
18:09:55dadadahttps://pastebin.com/Ztdb5U3i
18:11:14*Jjp137 quit (Read error: Connection reset by peer)
18:11:45dadadaalehander92: what do you think about the way?
18:11:47dadada:D
18:12:46disruptekhearts and minds, people; hearts and minds!
18:16:00*jxy quit (Quit: leaving)
18:18:40leorizedadada: please no :P
18:18:44dadadadisruptek: I feel this is sarcasm and you want to ridicule me. You are insinuating that I lack either one of the two, or that I should use one of them more... (btw. I'm not really offended, I only fake being offended to troll you (and because I admit it, it doesn't make me real troll :D ) I do prefer arguments though...), ok, did you even refer to the pastebin or were you triggered something else? please take
18:18:50dadadait lightheartedly ... I'm in a chatty mood
18:19:06leorizedadada: don't worry about disruptek, he doesn't mean anything
18:19:33leorizeoh wait i got trolled :P
18:19:41disruptek~disruptek
18:19:41disbotdisruptek: 11a sexy fella with magic hands. -- disruptek
18:19:42disbotdisruptek: 11don't listen to him
18:19:42disbotdisruptek: 11an unsafe nil deref
18:20:20leorizeI don't think we got byAddr in stdlib yet
18:20:29dadadaleorize: it's not like I can force you into anything :D I still prefer arguments to thumbs down like (sarcasm or not) comments
18:20:43dadadaand I don't want to force you into anything either
18:21:12dadadaleorize: from the github issue it looks like it's is a matter of time now
18:23:11*jxy joined #nim
18:27:23*natrys joined #nim
18:28:19Zevvsharts of kinds people, parts of blinds!
18:30:13dadadaShakespear lives!
18:30:20disruptekZevv: headless instrumentation is a separate problem.
18:32:59*Jjp137 joined #nim
18:41:22narimiranleorize: i haven't updated nim.nvim in quite a while, sorry :) will get back to you tomorrow....
18:54:01disruptek--experimental:compiletimeFFI
18:58:25*Yardanico quit (Quit: https://quassel-irc.org - Chat comfortably. Anywhere.)
18:59:02*Yardanico joined #nim
19:00:38*marmotini_ joined #nim
19:07:12*floppydh quit (Quit: WeeChat 2.7)
19:18:31disrupteki think nimph should just add `requires ...` statements automatically.
19:18:58disruptekthen i don't have to worry about dev/test deps, etc.
19:19:43dadadaskip forward to "Inline Testing" - the testing feature of Pyret looks nice https://therenegadecoder.com/code/the-coolest-programming-language-features/
19:25:17disruptekno, i don't want to have to read tests when i'm reading impl.
19:25:27*theelous3 joined #nim
19:59:10*cron joined #nim
20:03:26*tane joined #nim
20:04:06*nsf quit (Quit: WeeChat 2.7)
20:06:36*krux02 joined #nim
20:26:56*marmotini_ quit (Remote host closed the connection)
20:27:57*marmotini_ joined #nim
20:48:44*marmotini_ quit (Read error: Connection reset by peer)
21:02:45FromGitter<kaushalmodi> dadada: In Nim , the equivalent is `runnableExamples:`
21:03:02FromGitter<kaushalmodi> It serves as "inline test" + "doc"
21:03:37FromGitter<kaushalmodi> https://github.com/kaushalmodi/elnim/blob/319abb71fccc7711c7ef858795ddb3297fa59eb9/src/elnim.nim#L30-L44
21:04:19FromGitter<kaushalmodi> https://nim-lang.github.io/Nim/system.html#runnableExamples%2Cuntyped
21:13:13*narimiran quit (Ping timeout: 258 seconds)
21:15:39*Vladar quit (Quit: Leaving)
21:31:53*icebattl1 quit (Quit: leaving)
21:32:16*icebattle joined #nim
21:33:25*Trustable quit (Remote host closed the connection)
21:35:29*tane quit (Quit: Leaving)
21:44:32FromGitter<alehander92> dadada this is just the motto of disruptek
21:45:00FromGitter<alehander92> you shouldnt take most things here too seriously :P
21:46:02FromGitter<alehander92> `way` is interesting .. but i kinda feel like it is just a very roundabout way to define a template
21:46:08FromGitter<alehander92> anonymous template*
21:46:18FromGitter<alehander92> but i like the lang design experimentation!
21:51:17*natrys quit (Ping timeout: 268 seconds)
22:03:43*natrys joined #nim
22:03:45*natrys quit (Client Quit)
22:13:47*solitudesf quit (Remote host closed the connection)
22:14:10*solitudesf joined #nim
22:19:44*solitudesf quit (Remote host closed the connection)
22:20:36*solitudesf joined #nim
22:24:29dadadaalehander92: it's impossible that any of todays languages higher level languages has implemented all the best features, there were only a couple of decades of language evolution in CompScience, just imagine what the most popular high level language in say 2500 might look like.
22:25:58dadadathat's why I like those who try to push the envelope
22:28:42dadadaNim is a great fusion of many language concepts ... those AST macros will probably become a standard features of all higher level langs sooner or later, it just makes too much sense
22:30:51FromDiscord<exelotl> is there a way to make a template that I can invoke like `t(foo)` in such a way that it generates `var foo = "foo"`
22:31:14FromDiscord<exelotl> i.e. putting an identifier into a string
22:31:28disruptekastToStr?
22:32:27*ptdel joined #nim
22:32:35*ltriant joined #nim
22:32:47FromGitter<alehander92> dadada oh absolutely
22:32:57FromDiscord<exelotl> oh that works
22:32:59FromGitter<alehander92> and i like experiments, agreed that one should do more like those !
22:33:01FromDiscord<exelotl> thx disruptek
22:33:03disruptekif you only care about the identifier name, you could just pull it out of the ast.
22:33:46FromGitter<alehander92> macros do seem to feature in some modern languages, like crystal and rust and julia
22:33:49FromGitter<alehander92> elixir
22:34:03FromGitter<alehander92> but not all of those are ast, iirc rust are mayb template-like + token ones
22:34:03*opal quit (Remote host closed the connection)
22:34:06Zevv[Q] What are the arc limitations keeping the nim compiler itself being compiled with arc?
22:34:18*opal joined #nim
22:34:32FromGitter<alehander92> but maybe more generally compile time code is getting popular (c++ zig too)
22:35:10disruptekZevv: koch boot --gc:arc
22:35:26Zevvyeah of course, and the first one I hit is a vm cast somewhre
22:35:30FromGitter<alehander92> maybe it is shy
22:35:39Zevvjust wondering if that is the tip of a huuuge iceberg
22:35:55Zevvor if the expected amount of issues is overseeable and worth fixable
22:36:23disrupteki have no idea.
22:36:46disruptekgotta walk before we run.
22:37:43disruptekwhere are we on the async situation? are we waiting for closure cursors or what?
22:37:54Zevvwell - apart from two casts it compiles
22:38:21disruptekjust comment them out; i'm sure they don't matter.
22:38:25ZevvI did
22:38:28Zevvand it runs
22:38:30disruptek👍
22:38:30ZevvI compiled hello world
22:39:18Zevvoh no dang, again too soon. I compiled main.nim not nim.nim :)
22:39:22Zevvlets try again
22:39:39Zevvcodegen errors, woohoo
22:39:47FromGitter<alehander92> but compiler doesnt use async :P
22:39:49FromGitter<alehander92> iirc
22:40:02disruptekwho is using custom tags with success?
22:40:05Araqoh interesting
22:40:18AraqI never tried the Nim compiler with --gc:arc
22:40:32disruptekalso, can anyone confirm that pragma() macro /doesn't/ yield pragmas that lack arguments?
22:40:35ZevvI had to take two `slots: cast[pointer](regs),` out for it to compile
22:40:48Zevvnow I get ` error: conversion to non-scalar type requested
22:40:48Zevv 5756 | colontmpD__60 = (NimStringV2)0;
22:40:49Zevv`
22:41:07Zevvbut it gets much further then I'd expect it to
22:41:11FromGitter<alehander92> disruptek hmm
22:41:22FromGitter<alehander92> what do you mean by custom tag
22:41:25FromGitter<alehander92> effect tags?
22:41:28disruptekyes.
22:41:41disrupteki want to use them but i cannot figure out how.
22:42:22disruptekand, yes, i know how to use them syntactically.
22:43:11FromGitter<alehander92> i am not sure i do
22:43:18FromGitter<alehander92> can you give an example of a usecase
22:43:22disrupteksure.
22:43:30FromGitter<alehander92> because i wanted to maybe use them
22:43:43FromGitter<alehander92> and i do for one case but i feel i dont really use them well
22:43:49disrupteki just want to bubble up the requirement that libgit is initialized so that i can do that once in a parent proc.
22:44:29disrupteki cannot seem to produce output from .effects. either.
22:44:33disrupteknot sure what to expect, there.
22:45:21Zevv-std=gnu++11 \o/
22:46:52FromGitter<alehander92> can you give a small example
22:46:53FromGitter<alehander92> disruptek
22:46:58FromGitter<alehander92> or is it a part of a big project
22:47:18disruptek!repo gittyup
22:47:19disbothttps://github.com/disruptek/gittyup -- 9gittyup: 11higher-level git bindings that build upon nimgit2 15 0⭐ 0🍴
22:47:36disruptektrying to automate `withGit` template.
22:48:14disruptekcannot seem to make a pragma macro work, either.
22:48:31disruptekbatting 1000, lemme tell you.
22:50:48FromDiscord<Recruit_main_70007> is it worth it updating nim manually, or i can just wait for major release to appear in the web, will it come with the compilers needed?
22:51:04FromDiscord<Recruit_main_70007> (updating it manually that is)
22:51:14disruptekif you have to ask, don't worry about updating manually.
22:52:52FromDiscord<Recruit_main_70007> thats what i thought, are you releasing the newer version in the web soon?
22:53:04disruptek1.0.6 should be out soon, yes.
22:53:10FromDiscord<Recruit_main_70007> cool
22:53:24Araq1.0.6 is boring though, we're waiting for 1.2
22:54:03FromDiscord<Recruit_main_70007> well, you have to count to 5 before reaching 10
22:55:03FromDiscord<Recruit_main_70007> awesome job guys, dont let Nim die like Boo, all the languages i like tend to stop getting updates
22:56:51*dadada quit (Ping timeout: 240 seconds)
22:58:38*dadada joined #nim
22:59:00*dadada is now known as Guest94638
23:00:41FromGitter<kaushalmodi> Recruit_main_70007 ⏎ ⏎ > all the languages i like tend to stop getting updates ⏎ ⏎ Then you are risky to Nim! [https://gitter.im/nim-lang/Nim?at=5e28d4183fd0cc7cfe1bca64]
23:00:41*kungtotte quit (Read error: Connection reset by peer)
23:01:34*kungtotte joined #nim
23:03:19FromDiscord<Recruit_main_70007> nah, i trust you, this is too good to die
23:06:45Araqhttps://github.com/nim-lang/Nim/pull/13232/files yay.
23:06:48disbotfix #9634 retry c_fgets on EINTR : debugging a nim program does not crash on `execCmdEx` / `readLine` ; snippet at 12https://play.nim-lang.org/#ix=286c
23:06:49*solitudesf quit (Ping timeout: 265 seconds)
23:07:21*dawkot joined #nim
23:08:22Araqmakes me wonder what else from "Unix hater's handbook" is still relevant in 2020
23:20:50*NimBot joined #nim
23:21:24*FromDiscord joined #nim
23:24:32FromGitter<timotheecour> @araq ya, this is one of the nastier parts of signals / global state
23:31:18*krux02 quit (Remote host closed the connection)
23:45:56*FromDiscord_ joined #nim
23:48:01*Araq quit (Ping timeout: 268 seconds)
23:49:33*FromDiscord quit (Ping timeout: 260 seconds)
23:53:08FromDiscord_<Tak> If I have an object variant with either an int or a byte for example, is there a way I can write a function that returns either of them i.e instead of going Object.intVal or Object.byteVal, I can just go Object.getVal and it dispatches over both? I am getting an error about no defined return type
23:53:18FromDiscord_<Tak> Or is this a macro type job?
23:53:57*Araq joined #nim
23:54:38FromDiscord_<Tak> Perhaps via iterating over the object and taking the val part?