<< 04-11-2019 >>

00:01:30*disbot quit (Remote host closed the connection)
00:02:00*disbot joined #nim
00:02:26*disbot quit (Remote host closed the connection)
00:02:58*disbot joined #nim
00:04:50*disbot quit (Remote host closed the connection)
00:13:52*disbot joined #nim
00:37:32*abm quit (Quit: Leaving)
00:48:40*Jjp137 quit (Quit: Leaving)
00:49:34*Jjp137 joined #nim
01:07:29*kevin joined #nim
01:07:53*kevin is now known as Guest28716
01:12:02*theelous3 quit (Ping timeout: 240 seconds)
01:12:14FromDiscord<mratsim> Latest "blog post" on Picasso and multithreading: https://github.com/nim-lang/RFCs/issues/160#issuecomment-549199561
01:43:23*theelous3_ joined #nim
01:45:40*exelotl quit (Ping timeout: 264 seconds)
02:02:34*kevin joined #nim
02:02:35*kevin is now known as Guest76029
02:03:04*Guest28716 quit (Quit: leaving)
02:04:21*Guest76029 quit (Client Quit)
02:05:41*kevin- joined #nim
02:07:28kevin-👑
02:12:04kevin-hello
02:14:56kevin-is it Emacs nim-mode is best Nim's editor ?
02:15:18FromDiscord<Rika> Depends on what you want
02:20:41kevin-ok thanks, we have vscode also :D
02:22:02kevin-how can we grow up a nim user group at my country ?
02:22:48kevin-need to register with nim-lang.org first ?
02:34:10yumaikasSo, I have a question: Is there a recommended way to do a single-threaded TUI that doesn't block on only keyboard input?
02:36:12leorizekevin-: I'd say nim.nvim gives you the best Nim experience :P
02:36:25leorizeassuming that you are familiar with neovim
02:36:51kevin-thanks for your suggestion
02:39:30*rockcavera quit (Remote host closed the connection)
02:40:18leorizeyumaikas: stdin can be asynchronous, if that's what you want
02:42:14yumaikasThat *might* be what I want? Bascially, I'd kinda like to be able to have the ability to listen on stdin, as well being able to set timers
02:43:25yumaikasSo that I can do stuff like animate timers for a TUI terminal game
02:45:08leorizesounds like that'd work
02:46:03yumaikasleorize: How would I wait on multiple async things at once? In go, I'd use select, but I'm not familiar with what I should be looking for in nim
02:46:04*kevin- quit (Remote host closed the connection)
02:46:32leorizejust poll()
02:46:44leorizeyou can check if a Future has finished with the finished() proc
02:46:50*kevin joined #nim
02:47:07*kevin is now known as Guest29993
02:48:21leorizeso I guess something like: while true: (poll(); if fut1.finished: doSmt; if fut2.finished: doOtherThings)
02:48:55*Guest29993 is now known as kevin-
02:49:04yumaikasThat actually sounds kinda interesting, tbh
02:49:39yumaikasSo, this is all in asyncdispatch then
02:49:57yumaikasAnd it has timers....
02:51:05leorizeand if you don't need to do anything in-between the poll()s, you can do poll(-1) and it will wait until at least one future is finished before returning
02:53:19yumaikasSeems pretty legit. I suppose it probably doesn't work on JS targets (I know of other things, like requestAnimationFrame and timers to achieve something similar, just thinking atm)
03:08:41*lritter quit (Ping timeout: 265 seconds)
03:09:06*disbot quit (Remote host closed the connection)
03:09:10*lritter joined #nim
03:12:23FromDiscord<citycide> how would one go about debugging a compile error that occurs on something like a raspberry pi zero?
03:12:45leorizeread the error message?
03:12:46disruptekvery slowly.
03:13:05FromDiscord<Rika> leorize, best to assume the error message isnt helpful
03:13:09*disbot joined #nim
03:13:12FromDiscord<citycide> leorize: yeah that's obvious
03:13:30leorizewell, what's the error then?
03:13:35FromDiscord<citycide> it's a value out of range error, but it's simple multiplication
03:13:54FromDiscord<citycide> error points here:
03:13:54FromDiscord<citycide> https://github.com/citycide/fugitive/blob/5e59a0b35ab457aa6fc19f79f88a1365d44acb12/src/fugitivepkg/common/humanize.nim#L9
03:13:58disruptekima guess the number isn't too small.
03:14:19FromDiscord<Rika> what's your days count
03:14:23FromDiscord<Rika> i mean years
03:14:39FromDiscord<citycide> it's essentially the number of seconds per year
03:14:47leorize!eval echo int32(365 * 24 * 60 * 60 * 60 * 1000)
03:14:49NimBotCompile failed: /usercode/in.nim(1, 11) Error: 1892160000000 can't be converted to int32
03:14:58leorize^ that might be your problem
03:15:07leorizeI'm not familiar with rpi architecture though
03:15:09disrupteknailed it.
03:15:48FromDiscord<Rika> !eval echo int64(365 * 24 * 60 * 60 * 60 * 1000)
03:15:50FromDiscord<Rika> aww
03:15:50NimBot1892160000000
03:15:55FromDiscord<Rika> oh just slow
03:16:28FromDiscord<Rika> sometimes i forget what int64.high is
03:16:35FromDiscord<Rika> !eval echo int64.high
03:16:37NimBot9223372036854775807
03:16:39disruptekall real programmers know the number of seconds in a day by heart.
03:17:23FromDiscord<citycide> realer programmers know the milliseconds/day
03:17:23FromDiscord<Rika> wait, why is second = 1000? shouldnt that be millisecond?
03:17:40FromDiscord<citycide> I believe I'm actually tracking the ms per those units
03:17:44FromDiscord<citycide> it's been a while 🙂
03:17:51FromDiscord<Rika> well you said seconds in a year
03:17:52FromDiscord<Rika> okay
03:18:51leorizecitycide: you should probably switch to int64 explicitly if you want it to work on rpi zero
03:19:30FromDiscord<citycide> leorize: figured, but how can I test?
03:19:54disruptekit will take about a year.
03:20:00leorizethe compiler should prevent this at compile time
03:20:09disruptekor, that.
03:20:22leorizeso it's probably be a bug that it didn't
03:21:34FromDiscord<Rika> isnt `int` always whatever the os uses? so on a normal 64bit pc, it would be `int64`, correct (i dont know)? then the rpi might be 32bit, which might use `int32` for `int`s
03:21:40FromDiscord<Rika> if im not a dumbass
03:22:01FromDiscord<citycide> @Rika I'm trying to search for that right now, I thought the same thing
03:22:09leorizeyes, but you can explicitly choose if int64 is used
03:22:26FromDiscord<Rika> yeah i know
03:22:42leorizeconstants have a special type of `int literal`, which can morph to int64 or int32, depending on the value
03:22:45FromDiscord<Rika> but rn he's looking for why it works on desktop pc but not rpi
03:22:50FromDiscord<Rika> ooh
03:22:56FromDiscord<Rika> ill be going now, have to do smth
03:22:57leorizesince that const is huge, it should have been transformed to int64 :/
03:23:46FromDiscord<citycide> hmm
03:24:50leorizecitycide: what's the full stacktrace leading to the crash?
03:25:25FromDiscord<citycide> I'm going off the issue someone filed which doesn't have much more than I've given:
03:25:25FromDiscord<citycide> https://github.com/citycide/fugitive/issues/2
03:25:54FromDiscord<citycide> I think that's all there is, given that the line in question is a `const`
03:26:24leorizehaving the reproduction steps would be useful
03:26:44leorizesince the rpi zero is 32bit, you can test this with a 32bit nim compiler
03:27:17*lritter quit (Ping timeout: 240 seconds)
03:27:24FromDiscord<citycide> well luckily that's all choosenim can install on Windows, so let's give it a shot haha
03:27:28FromDiscord<citycide> will report back
03:28:03leorizelast time I checked nim compiled a 64bit exe on windows :P
03:28:58FromDiscord<citycide> I think it's based on gcc being install already or not
03:29:21FromDiscord<citycide> https://github.com/dom96/choosenim/issues/128#issuecomment-514338375
03:32:46FromDiscord<citycide> so this seems obvious now that an int64 can't be represented in a x32 environment, yeah? compiling with 32-bit nim results in the same error
03:35:31leorizeint64 is available on 32bit nim fwiw
03:35:54leorizethe problem is that the compiler didn't convert it correctly
03:36:24leorizeyou can try "fixing" it by adding u64 postfix to the `second` label
03:36:27leorizeconst*
03:36:48leorizebut an overflow like that shouldn't happen during compile time
03:36:48FromDiscord<citycide> I'm not so sure. a simple file with only `echo int64.high` fails to compile with 32-bit nim
03:37:53leorizeif int64 couldn't be used, the type wouldn't be there to begin with
03:38:46FromDiscord<Rika> that doesnt sound reasonable to me
03:39:37disruptekyou can't handle the truth!
03:43:16leorizecitycide: I've just tested and an int64.high does compile on my windows with 32bit nim
03:44:09FromDiscord<citycide> well then
03:44:50leorizelooks like it's a problem with consts
03:44:52FromDiscord<citycide> are you able to check if that `const` section of units compiles?
03:45:06leorizeit doesn't
03:45:21leorizeyou can fix that by postfixing `i64` to `second`
03:45:46leorizebut this looks like a potential bug?
03:48:43leorizecan you file an issue with that `const` section?
03:53:51*pbb quit (Quit: http://quassel-irc.org - Chat comfortably. Anywhere.)
03:54:14*pbb joined #nim
03:59:00*dddddd quit (Remote host closed the connection)
04:11:32shashlickbig update to the `local deps mode` proposal for nimble - https://gist.github.com/genotrance/ee2ce321a56c95df2d4bb7ce4bd6b5ab
04:12:40disruptek🤔
04:13:49shashlickbetter call this an RFC
04:15:28FromDiscord<citycide> leorize: sure
04:16:25disruptekshashlick: so `develop` defaults to localeps?
04:17:00shashlickonly if the package is preconfigured that way
04:17:05shashlickelse default behavior
04:17:37disrupteki guess that section is confusing; under Command-line behavior outside any Nimble project.
04:19:35disruptekdo we have to check deps/* or deps/empty.txt in order is it enough to simply have that `deps` directory? i think that's confusing, too, unless it truly requires that the object exist in git.
04:20:15shashlickjust that the directory exists for `local deps mode` but that section is how to make it persist
04:20:24disruptekokay.
04:21:16disrupteki think you should just make it clear that nimble looks for the directory. people understand the concept of adding it to vcs, but you don't need vcs to achieve localdeps.
04:21:19shashlicki think we are getting closer, let's see
04:21:29shashlickwill do
04:21:42shashlickkeep 'em coming, i'll clarify
04:21:52disruptekit's pretty good, i think.
04:22:49disruptekyou've done a good job of touching on the major use-cases, too.
04:26:34disruptekwhat's involved in this change?
04:27:41shashlickit's not really too bad - basically detect dir and set nimbleDir
04:27:53shashlickadd some messages to note mode
04:27:53*kevin- quit (Ping timeout: 276 seconds)
04:28:10disruptekso, just to make sure i've got this right, there's no way to `nimble install` binaries into a $prj/deps because nimble will complain, right?
04:28:12shashlickwhere there are exceptions, which are noted, detect and notify
04:28:49shashlickhmm - well, we could do that i guess, that will remove that exception as well
04:28:54shashlickbut what's the point right
04:29:10shashlicknimble will build first anyway and the binary will be right there
04:29:27disruptekconsistency and because if you don't use user deps, you might want install to do installish things.
04:29:58disruptekwhen i build some projects that have multiple binaries, they get built alongside their sources, which isn't necessarily their installation directory.
04:30:57shashlickhow is install dir specified?
04:31:48disruptekwhat do you mean?
04:33:00shashlickwell, how does nimble know that the binary is compiled in one place but placed elsewhere on install
04:33:20shashlickthe way i understand it, nimble compiles wherever the binary is then links it into ~/.nimble/bin
04:33:28shashlickso the binary stays where it is
04:33:42shashlickor wherever it is configured to build via a nims or cfg
04:33:59disruptekthat's fine. i didn't even realize they were just linked.
04:34:10disrupteki figured araq would never have gone for that.
04:34:37disruptekbut that linking is an install-only step that is missing from local deps.
04:34:46disruptekmay as well remove that exception and make it work the same.
04:36:14shashlickso we should copy the files as well?
04:36:22disruptekthe point remains that i don't want to have to go spelunking in my trees in order to find my binaries.
04:36:32disrupteki happen to like symlinks.
04:37:17disrupteki'd just like to have them in deps/bin or whatever, if i do an install.
04:37:23shashlickthen it makes for even fewer exceptions
04:38:17disruptekthe word revert makes it sound like it changes the environment beyond the execution of the command.
04:38:24disruptekmaybe it's just me.
04:39:02shashlickthat's fair
04:40:53disruptekis there any reason to link the project into its own deps dir?
04:41:56shashlickshould we omit the project files in nimble install
04:42:05shashlickand limit to binaries
04:42:22shashlicki don't see any reason for that or the link since these are only relevant for the project itself
04:42:32shashlickand its files are already there
04:42:38shashlickin fact, we could even run into issues
04:42:53disrupteki'm worried about whether the compiler will need them when that change goes through.
04:43:07disruptekie. if we fix nimblePath.
04:43:47shashlickwell but the compiler is going to compile that project with its deps in that folder
04:44:09disruptekso how does it get that path?
04:44:09shashlickit doesn't need the project in the deps folder confusing anything
04:44:27disruptekokay; if you're confident.
04:45:05disruptekthen i don't think we need the project files; just binaries.
04:45:13shashlickactually, it might be a mess
04:45:14disruptekand those can just be linked into place.
04:45:21shashlickcause the binaries are linked from bin into pkgs/xyz
04:45:44shashlickso we will have to copy binaries but skip the project files
04:45:58shashlickunless we change the code altogether to link to the main project dir and not the pkgs/project
04:46:45disruptekless exceptions.
04:48:05shashlicklet's see what others say
04:48:10shashlicki'll think more about it
04:50:19*nsf joined #nim
04:52:28shashlickokay gonna chill now, l8r
04:52:34disrupteknight
04:53:02shashlickthanks for taking the time, always appreciated
04:53:17disruptekhappy if i can help.
04:56:28*chemist69 quit (Ping timeout: 264 seconds)
04:58:00*chemist69 joined #nim
05:22:12*fishybird joined #nim
05:22:40fishybirdhello, I'm new to nim!
05:23:30fishybirdI'm trying to write an object and change it's values with a procedure and I'm having some trouble. Is this the right place to get help?
05:30:19*uu91 quit (Remote host closed the connection)
05:30:49*uu91 joined #nim
05:43:37*MightyJoe quit (Ping timeout: 240 seconds)
05:46:01*cyraxjoe joined #nim
05:48:02*theelous3_ quit (Ping timeout: 268 seconds)
05:52:18*kevin- joined #nim
05:52:49*kevin- quit (Remote host closed the connection)
05:53:59*kevin- joined #nim
06:03:05*kevin- quit (Remote host closed the connection)
06:05:56*kevin- joined #nim
06:06:26*narimiran joined #nim
06:06:30kevin-👑️
06:06:49*narimiran quit (Remote host closed the connection)
06:07:27*narimiran joined #nim
06:07:39*fishybird quit (Remote host closed the connection)
06:08:09FromGitter<Vindaar> @fishybird: Hey! It sure is the right place!
06:09:59FromGitter<Vindaar> if you want to change the values of an object you have to use a `var` argument in the proc. E.g. `proc set(x: var MyObj, val: float)` etc. Note that if the `MyObj` type is a `ref object` you can change it even if it's not given as `var`
06:28:11*kevin- left #nim ("Using Circe, the loveliest of all IRC clients")
06:33:29Zevvshashlick: the value of system global is that libraries can and will be shipped by linux distributions. `apt-get install nim-jester`.
06:38:32Araqis that really a thing?
06:39:04leorizeyes, it's frequently used for python modules
06:39:24Araqbut Python is different...
06:39:34Araqit doesn't produce binaries, for example.
06:39:55leorizein a way, you can say C libraries are distributed in the same way
06:40:05leorizejust that they don't have a package manager
06:40:21Araqand why would I ever use 'apt-get install nim-jester'? it would be some random outdated version
06:41:04Araqhardly what I want for my Nim project
06:41:44leorizeit works for C programmers so... :p
06:41:54Araqha ha ha ha
06:42:04leorizeone of the possible usage is for compiler-dependant stuff
06:42:06Araq./configure is all I say
06:43:42*solitudesf joined #nim
06:45:59ZevvAraq: it is very common, the package maintainers take the responsibiltity to make sure libs and compiler versions match. usually
06:46:13Zevvand it works just fine. usually
06:46:19GordonBGoodAraq: I see your recent PR's and raise you a new one: https://github.com/nim-lang/Nim/issues/12588
06:46:47Zevvfor python, perl, lua, and other languages. until you start mixing with the languages package manager, and all hell breaks loose.
06:47:06Zevvtehen you get abhorrations like pyenv or whtever its called
06:47:42GordonBGoodI spent some time yesterday, and think I've narrowed it down to the injection of `=destroy` calls for seq where it isn't picking up that seqsv2 have their own custom "hooks"
06:47:59GordonBGoodprobably related to some legacy treatment for seq's
06:48:23GordonBGoodI'd like to fix it myself, but I know you will know exactly where to look?
06:49:17GordonBGoodThe issue is pretty clear on where I think the problem is, but then I could be wrong ;)
06:50:57Araq# [ may custom "hooks" somehow disables the proper destruction of the inner object?
06:51:24Araqwell yes, that's the design, the compiler cannot guess your destruction logic when you decided to customize it
06:51:59GordonBGoodAraq: on TestObj, the custome hooks are mostly just to see if and when they are triggered, so not necessary to destroy the inner seq...
06:52:20Araqok
06:52:25GordonBGoodWhen I comment out the custom hooks - no mem leak; with the custom hook - mem leak
06:53:04Araqwhich ones?
06:53:13Araqthis bug report is a mess, sorry to say it
06:53:16Araq TestObj = object
06:53:16Araq# big: MySeq[byte] # custom MySeq works;
06:53:16Araq big: seq[byte] # regular seq doesn't, even for seqsv2!
06:53:27Araq^ is this the actual bug?
06:53:34GordonBGoodAs you can see in the issue code, I even created my own emulation of MySeq, and they work in the same situation, so it isn't related to objects in general, only seqsv2
06:53:42Araqaha
06:54:06Araqif you report bugs, don't report the whatifs in the same code snippet
06:54:20Araqcreate multiple code snippets please
06:54:27GordonBGoodThe mess is related to trying to save you some time in not having to check some things I already checked...
06:54:38GordonBGoodAh, sorry, next time
06:54:45AraqI know but it doesn't help as much as you think ;-)
06:55:10Araqok, so builtin =destroy for seqs is buggy
06:55:25GordonBGoodNo, I suppose not, but just trying to narrow it down in every way I could think of
06:56:06GordonBGoodJust delete all the "MySeq" stuff; I'll do it now for you if you would like...
06:56:27Araqlook at ccgexprs.nim, line 2025
06:56:39Araqsee if your code triggers this
06:56:40GordonBGoodYes, `=destroy` for seqs is buggy, but seemingly just in this one unique way
06:58:06Araqalso the destructors we generated for 'ref' are buggy
06:58:23Araqright? they need to nil out the 'var ref T' parameter in the end
07:01:25GordonBGoodI'm looking at ccgexprs.nim line 2025 and more exactly lines 2036-2041 treating seq's in the proc "genDestroy"; I'm guessing this is erroneously triggered; how do I trace this?
07:01:52GordonBGoodThe test code doesn't use any `ref`'s does it?
07:02:34GordonBGoodnew seqsv2 aren't ref's or ptr's on the outside
07:03:03GordonBGoodAnd the test code uses an object "TestObj" to show the problem
07:03:10Araqsure
07:03:58Araq"how do I trace this?" add a 'writeStackTrace()' call and run 'koch temp'
07:04:08GordonBGoodI haven't seen any problems with substituting our ref counted refs for legacy ref's in --gc:destructors, at least as yet
07:04:48GordonBGoodOk, proceeding with writeStackTrace and koch, give me a few
07:06:58*solitudesf quit (Ping timeout: 265 seconds)
07:08:04AraqI also want my '.cursor' pragma back...
07:18:12GordonBGoodAraq: yes,. genDestroy is being called, and getting to the part for "tySequence" at line 2036; it is called from genMagicExpr
07:19:20GordonBGoodwhich is called from "expr"
07:26:07Araqok, well
07:28:02GordonBGoodThere are two potential places for the genMagicExpr call from expr, so I'm adding writeStackTrace to see which applies...
07:29:17AraqI'm not sure the bug is in this place
07:30:19GordonBGoodOkay, it kind of makes sense that a destructor is being generated when it should be calling the custom one that already exists, but you are the man
07:33:05GordonBGoodToo many "writeStackTrace()" calls, need to put a condition on calling, but don't know what condition to use
07:40:48*leorize quit (Ping timeout: 260 seconds)
07:42:55*leorize joined #nim
07:54:20planetis[m]hi guys, I released eminim v0.3 https://github.com/b3liever/eminim (a JSON unmarshaling macro). It now reuses generated 'load' procs for (ref) objects and the generated code size is smaller.
07:55:19planetis[m]krux02: good morning, do you thing from this state of the macro, graphs can be supported?
07:55:20*kevin- joined #nim
08:00:00*gmpreussner quit (Quit: kthxbye)
08:00:21*PMunch joined #nim
08:02:20PMunchThanks to whoever gilded my latest article on Reddit :)
08:03:39GordonBGoodAraq: if it helps, if just a direct seq is used (not inside an object with a custom `=destroy`) and even manually calling `=destroy` on it, there is no call to genDestroy and no memory leak
08:04:38*gmpreussner joined #nim
08:06:33*krux02 joined #nim
08:15:07shashlick@Zevv @leorize I've kept system globals aside since it's not just a global flag, it means nimble needs to be able to load from multiple nimble dirs. And that's a different design
08:15:28shashlickWe can discuss that later
08:16:42Zevvsure, and the question also is if you even want to go there
08:17:17shashlickI'm kind of in the same mindset as @Araq
08:17:46shashlickWill be some random old version of stuff
08:18:14shashlickWe barely have an up to date Nim let alone packages
08:18:30shashlickIf someone wants to pick it up sure
08:21:22*ng0 joined #nim
08:23:42shashlickBut if we did go for it, it would make most sense to have global deps and user deps coexist with user deps taking precedence
08:23:55shashlickLocal deps however would be isolated
08:25:09shashlickIn some sense, it feels like `-u | --user` is really better off being called `-g | --global`
08:27:41shashlickBut ya, if you like the stability that the system package manager brings with the older combo of Nim and packages and don't want to mix in user deps chaos in, maybe it should be seen as a different type of isolation
08:28:36shashlickWas thinking we could repurpose -g but doesn't seem appropriate yet
08:30:14ZevvI think the Nim case is different though, regarding to distro-provided libs - there's no need for runtime or compile time libs, so distros can just ship nimble-built applications wihtout providing any dependencies, so I don't thing the system-wide global thing would really apply. Maybe we should involve the current debian nim package maintainer?
08:30:24FromDiscord<Lantos> guys generally in nim snake or camel case?
08:30:47narimirancamelCase
08:37:55shashlickI don't think we need to solve it now since the -u flag is still perhaps intuitive
08:38:10shashlickBut ya, more eyes are better
08:38:55Zevvright
08:39:06*Vladar joined #nim
08:40:35*floppydh joined #nim
08:43:33shashlickJust linked the global issue as well to the gist so maybe those folks also contribute
08:43:47shashlickBoth these issues are 4-5 years old though
08:44:00shashlickWonder who of those folks are still active
08:44:40shashlick@Zevv @leorize any other feedback on this overall? Appreciate your insights and consensus as well
08:45:53*Guest6 joined #nim
08:46:29*Guest6 left #nim (#nim)
08:47:41*mofeng joined #nim
08:52:43mofenghi
08:53:14mofengCould I translate nim doc to other languages?
08:56:26FromGitter<gogolxdong> which language?
08:57:38Zevvshashlick: what is the consensus now on how to initialize local deps mode? Create directory manually?
08:59:30mofengI could not find Chinese doc on the nim-lang.org
09:00:42mofengSorry, I find a site nim-cn.com
09:00:52*fredrik92 is now known as couven92
09:01:22*nf_xp joined #nim
09:02:31*nf_xp quit (Remote host closed the connection)
09:13:44*mofeng quit (Quit: My iMac has gone to sleep. ZZZzzz…)
09:30:04*tklohna joined #nim
09:35:05*letto quit (Quit: Konversation terminated!)
09:36:33*letto joined #nim
09:44:30*clyybber joined #nim
10:08:41*solitudesf joined #nim
10:08:52PMunchHmm, cross-compiling with "nim c --cpu:amd64 --os:windows --gcc.exe:x86_64-w64-mingw32-gcc --gcc.linkerexe:x86_64-w64-mingw32-gcc offset.nim" yields sizeof(culong) as 4
10:21:00clyybberAraq: Hey, are types bigger than int16 supposed to work as case discriminators in a variant object?
10:22:50clyybberI think not, but neither the spec or the error messages are clear.
10:23:47AraqI fixed the error message for Nim devel
10:25:40*lritter joined #nim
10:27:35clyybberAraq: I'm afraid not
10:27:40clyybberIt doesn't trigger
10:31:26Araqthe discs need to be inside a range like 0..0xffff or similar
10:32:57Araqah the logic is still wrong
10:33:08Araqlook at semtypes.nim line 641 for the idea
10:35:04clyybberI get the idea, not exactly what is wrong though.
10:35:09leorizePMunch: iirc sizeof is now handled by the compiler
10:35:21leorizeif it mismatches gcc, then you might want to file a bug
10:35:26clyybberAraq: I'm also baffled by this https://github.com/nim-lang/Nim/blob/devel/compiler/semobjconstr.nim#L264
10:35:45clyybberBecause this error message at least seems to be redundant if your fix worked
10:37:11clyybberAnd it also only triggers for the selectedBrench != -1 case, which doesn't make sense
10:37:12Araqmy fix needs 'if' instead of 'elif' :-)
10:37:37AraqI dunno about the line #L264, I didn't write it
10:38:20clyybberOh, I wasn't aware. Ok. I'll fix it in my defaultfields PR then :)
10:45:55FromGitter<zacharycarter> so for cross-platform non-blocking UDP sockets, is the solution still to go with something like enet?
10:46:22*kevin- quit (Remote host closed the connection)
10:47:51*tklohna quit (Ping timeout: 265 seconds)
10:48:41FromGitter<alehander42> hm, do people use selenium directly from nim
10:49:07FromGitter<alehander42> i probably need to use the electron node-based on anyway, but still wondering if for other usecases nim drivers are ok
11:10:38zedeusdom made one, https://github.com/dom96/webdriver
11:11:48FromGitter<alehander42> yes, i wondered if it is used
11:13:47narimiranquick poll: how many of you (excluding Status employees) are still using some pre-1.0 version of Nim? (v0.20, v0.19, etc.) which version and why?
11:28:49*rockcavera joined #nim
11:33:02PMunchleorize, yeah I was more surprised that the data-type culong was only 4 bytes on Windows 64-bit
11:34:58PMunchnarimiran, I've always been at or close to latest version. In my experience the changes are pretty simple to adapt for, and any performance hit with identical code is probably going to be fixed before that performance is needed anyways :)
11:50:46narimiranPMunch: i have a *feeling* a large majority of people who are around IRC/Gitter frequently are close to the latest, but i'd like to know if that really is the case or not
11:52:46*nif quit (Quit: ...)
11:52:58*nif_ joined #nim
11:56:12FromDiscord<Rika> heya, is there a version of nimltk that's updated for 1.0?
11:56:25FromDiscord<Rika> a different project, perhaps?
11:56:41FromDiscord<Rika> if none, what's the substitute for the seemingly deprecated `queues` module
11:57:33Araqnarimiran, then don't ask on IRC, dude. :-)
11:57:56AraqRika: heapqueue.nim ?
11:58:22FromDiscord<Rika> okay, thanks
12:02:28*dv^_^ quit (Ping timeout: 264 seconds)
12:03:48*dv^_^ joined #nim
12:06:44clyybberAraq: Having low(T) == 0 in your fix is also wrong I think. Because for int16 this isn't 0. But anyways I removed that in my defaultfields branch since it isnt needed.
12:06:55clyybberBut the lengthOrd error triggers for int16 too
12:07:01clyybberFor some reason..
12:07:03Araqit's not wrong
12:07:09Araqlow(T) == 0 is *required*
12:07:18clyybberNot with defaultfields at least.
12:07:34Araqthe C backend simply assumes it as it generates lookup tables
12:07:48Araqand doesn't concern itself with the offset corrections
12:08:14Araqand even if it would, all the other code that uses RTTI doesn't do it either
12:08:51clyybberHmm. Ok.
12:09:01clyybberBut mustnt the size be less than 65536 ?
12:09:16clyybberInstead of 32768?
12:09:26clyybbersorry, the lengthOrd
12:10:45clyybberSo 0x0000FFFF instead of 0x00007FFF
12:10:52Araq32K is already too much, as I said
12:11:07Araqthe compiler generates lookup tables that big
12:11:20clyybberAh
12:11:32clyybberThats why you have the low condition?
12:11:36Araqyes
12:11:42clyybberSo we only support a half of int16 so to say
12:12:04Araqyeah and that's too big already
12:16:20clyybberAnd there is no way of lifting that restriction?
12:17:05Araqthe new RTTI implementation doesn't have it
12:17:25Araqbut it doesn't support everything that the old one does
12:17:50AraqRTTI is kinda obsolete in Nim ever since macros.getType arrived
12:18:10FromDiscord<mratsim> @Rika, contrary to what araq said the replacement to queues is not heapqueues but deques when you use them with just popFirst and addlast
12:18:43FromDiscord<Rika> well i just used a seq because i noticed it didnt use anything like such methods you mentioned
12:20:12clyybberAraq: To what lengths/size does the new RTTI support it?
12:22:53Araqclyybber, it produces case statements instead of lookup arrays
12:23:40clyybberAh, nice. Is that faster or slower?
12:31:49*tklohna joined #nim
12:32:04AraqI don't know
12:38:45*nsf quit (Quit: WeeChat 2.6)
12:58:16clyybberAraq: So the conditions should have and not optTinyRTTI appended
13:02:10*sentreen_ quit (Ping timeout: 268 seconds)
13:02:39*sentreen_ joined #nim
13:06:26*Vladar quit (Quit: Leaving)
13:14:51*rockcavera quit (Remote host closed the connection)
13:17:09*Kaivo joined #nim
13:18:17*seerix quit (Ping timeout: 276 seconds)
13:28:02FromGitter<kaushalmodi> hello, I am stumbling at a basic Nim syntax problem.. is there a way to force-end a when clause?
13:28:07FromGitter<kaushalmodi> e.g. ⏎ ⏎ ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=5dc027660725f61e9c80c98e]
13:28:40FromGitter<kaushalmodi> above, I am trying to use when/else just to change the proc signature.. the rest of the proc docstring + body stays the exact same
13:29:54FromGitter<kaushalmodi> seems like I would need to copy-paste the whole proc docstring + body in the when and else clauses even if I want to change just the signature?
13:30:07clyybberYeah, I think so.
13:30:33clyybberAraq: Why does tinyRtti not support embedded objects?
13:30:54FromGitter<alehander42> you might be able to define something like a template so you can seq[retZip(S, T)]
13:31:01FromGitter<alehander42> and redefine only retZip in when
13:31:08FromGitter<alehander42> but probably this has other issues
13:31:21FromGitter<kaushalmodi> oh, I can define a zipreturn type in when/else
13:31:26FromGitter<kaushalmodi> shouldn't need a template
13:31:35FromGitter<alehander42> well, you need S and T ..
13:31:39FromGitter<alehander42> but yeah
13:31:42FromGitter<alehander42> it can be just generic indeed
13:31:46FromGitter<kaushalmodi> right
13:32:53FromGitter<kaushalmodi> umm. but that will make the generated docs look quirky :/
13:33:27FromGitter<kaushalmodi> reference to why I am doing this: https://github.com/nim-lang/Nim/pull/12575#issuecomment-549280698
13:37:36shashlick@Zevv - make the directory or set it in the nimble file
13:38:14ZevvHm why not pick just one?
13:41:31Araqclyybber, I think the frontend shouldn't be concerned with upcoming Nim backend improvments
13:41:43Araqso no 'optTinyRtti' for me
13:42:06PMunchkaushalmodi, you could just do it inline: https://play.nim-lang.org/#ix=20MM
13:42:34shashlickMkdir can be for local only experimenting, without needing to check in
13:42:54shashlick.nimble is already the way to configure nimble
13:43:15shashlickYou can check in the dir but it's probably not the cleanest way
13:44:00shashlickJust providing alternatives
13:44:18PMunchThe problem is that the line within the zip procedure is not a complete statement as it ends with `=`. I guess you could call it a limitation of AST based meta-programming
13:46:07FromGitter<kaushalmodi> PMunch: OK, but the docs will look really ugly
13:46:35FromGitter<kaushalmodi> I was thinking of: ⏎ ⏎ ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=5dc02bbb6570b076740f71bf]
13:46:45FromGitter<kaushalmodi> looks a *tiny* bit better
13:49:50narimirani would create `zipImpl` proc, and then have different `zip` procs (based on the version) call it
13:50:08PMunchkaushelmodi: http://ix.io/20MO/nim
13:50:09disbothttps://play.nim-lang.org/#ix=20MO 😏
13:50:12narimiranthat way, i think, the docs would stay nice and tidy
13:50:54narimiranyes, something along the lines of what PMunch just did
13:51:08PMunchNot quite
13:51:28PMunchThere's only one zip there, it just pases the return type into a template. But the docs look nice :)
13:51:32narimirandisruptek: is disbot your bot? what does it do, other than create duplicate links? :P
13:51:43FromGitter<alehander42> hm, sounds ok
13:52:16PMunchProblem with zipImpl is that you would have to duplicate the body of the proc
13:52:30disrupteknothing yet.
13:52:55PMunchnarimiran, I was a tad confused there for a second, thought someone hade come up with the exact same solution as me and we had somehow ended up with the same ix.io link :)
13:53:06disrupteklol
13:53:10narimiranPMunch: same here
13:53:26PMunchDoes it just grab any ix.io link? Or just ix.io/ID/nim?
13:53:37narimiranbut it is not just copy/paste, it gives you playground link, which is kinda nice
13:53:48narimiranPMunch: i was about to ask exactly that
13:54:04PMunchYeah that's what made me realise it was a bot
13:54:13PMunch(plus of course the nick when I read that)
13:54:14disruptekit will ignore something that's ix.io/foo/{not nim here}
13:54:27*rockcavera joined #nim
13:54:33narimiranhttp://ix.io/20MP
13:54:34disbothttps://play.nim-lang.org/#ix=20MP 😏
13:54:36disruptekbut it rewrites links that lack a lang-specifier with the assumption that they are likely nim.
13:54:41PMunchAh, so if I ix.io paste an error messoge it will create a playground link..
13:55:15PMunchhttp://ix.io/20MQ
13:55:16disbothttps://play.nim-lang.org/#ix=20MQ 😏
13:55:30PMunchNot quite what I wanted to do..
13:55:49disruptekit doesn't download the paste and try to determine if it's nim syntax.
13:55:55disruptekyet. 😁
13:57:12narimiranbtw, disruptek, links to source from devel docs should now be ok
13:58:36disruptekyeah, i saw that. thanks.
14:04:26PMunchOooh, that would be a cool feature in the playground..
14:04:27PMunchHmm
14:04:59PMunchClick on a procedure to go to the docs
14:06:11FromGitter<kaushalmodi> PMunch: I think playground should create share links like https://ix.io/LINK/nim
14:06:31PMunchWhy?
14:06:41PMunchIsn't it better to have them link back to the playground?
14:06:41FromGitter<kaushalmodi> that would also may be increase the popularity of nim when they see the links flying around on social media
14:06:56FromGitter<kaushalmodi> ok, not what I meant
14:07:16FromGitter<kaushalmodi> hmm, you are right, the share link pointing to Nim Playground is good/correct
14:07:36FromGitter<kaushalmodi> thinking of a way so that we see more of https://ix.io/LINK/nim than https://ix.io/LINK
14:07:56FromGitter<kaushalmodi> then the disbot should autocreate playground links only for https://ix.io/LINK/nim
14:08:06PMunchWhere do you keep seeing ix.io/LINK?
14:08:45FromGitter<kaushalmodi> I see those in the IRC usually
14:09:00FromGitter<alehander42> i admit that maybe not exposing the ix.io links might be good
14:09:16FromGitter<alehander42> after all, the playground has functionality for making edits and sharing them
14:09:52PMunchThose might be from me :P I have a keyboard shortcut that copies my current selection to ix.io and puts the link in my clipboard
14:11:33disruptekbtw, i have an ix paster in https://github.com/disruptek/xs which is pretty feature-complete on linux. if you want xclip and syntax-sensing, etc.
14:15:41disrupteknarimiran: i see that add is omitted in sorta, but why? because it's not additive?
14:17:52*abm joined #nim
14:19:24disruptekmaybe it should just error.
14:20:33narimirandisruptek: because it doesn't do what people expect and it just creates confusion
14:22:18clyybberAraq: What does not work with the new RTTI yet? (And why do embedded objects not work with it?)
14:22:43Araqas you noticed embedded objects do not work yet
14:22:53Araqbut that's rather simple to fix, I think.
14:24:23Araqsystem.getTypeInfo doesn't work
14:24:44Araqnor the typeinfo module or anything that builds on it, marshal.nim
14:25:02Araqsystem.repr
14:25:08Araqsystem.deepCopy
14:25:48disrupteknarimiran: does your table support duplicate keys?
14:27:33narimirandisruptek: no, i prefer my tables to be sane
14:27:48Araqpfff :P
14:28:28disruptekmaybe you should add that to the readme by way of explanation. i still think an `add` proc that errors would be more friendly to consumers.
14:30:39clyybberdisruptek: Btw, we now got clarification: As descriminators the only supported types are those that have low(T) == 0 and len(T) =< 7FFF
14:30:55disruptekwow.
14:31:17clyybberBut with the new RTTI we can have anything
14:31:45disruptekgood, 'cause 0 is kinda a wart.
14:33:26Araqbut how is the new RTTI gonna support the old cruft
14:33:36Araqcurrently my answer is: not at all
14:33:49Araqbut people love repr() ... :-/
14:35:25clyybberAraq: Wouldn't it be possible to patch the old RTTI to at least support low != 0?
14:35:54clyybberJust `- lowOrd` before calculating the offsets??
14:37:08Araqpatch sysstr.nim, deepcopy.nim, channels.nim, typeinfo.nim
14:37:14Araqand maybe more
14:37:22Araqfor this to work
14:38:22AraqI said it before, this whole "enums with holes" business is stupid, give the compiler freedom in the representation
14:40:13*rockcavera quit (Ping timeout: 268 seconds)
14:41:19*rockcavera joined #nim
14:47:04FromGitter<Varriount> Araq: repr could generate it's implementation at compile time?
14:50:51*dddddd joined #nim
14:52:56Araqit's not that easy, Nim has inheritance so you don't know the complete types at compile-time
14:53:19Araqso you have to generate methods I guess
14:54:16FromGitter<alehander42> dont forget we need some runtime info for debugging purposes
14:54:44Araqthat's the debugger's problem, no?
14:55:07Araqbut it's related
14:55:26FromGitter<alehander42> well, what i mean is e.g. the debugger needs some info sometimes to give better high level introspection
14:55:36FromGitter<alehander42> e.g. enum names etc
14:56:28Araqenum names are simple but how to you tell your debugger "oh, this blob over there has at offset 0 a type info structure decribing the type, the field names and their type etc etc"
14:57:30FromGitter<alehander42> well, at least gdb already can introspect directly into the c structure fields/types anyway
14:57:42disruptekit's really not about nim, it's about trying to represent external values without indirection.
14:57:55FromGitter<alehander42> i am talking about nim-specific things
14:58:42disrupteksorry, i was scrolled up. i was referring to the enums whine.
14:58:48FromGitter<alehander42> like variant fields for each discriminator, enum names etc : like, this is already working, just saying that its another application of rtti
14:59:14Araqalehander42: it's not Nim specific, C++ has the very same problem
14:59:35FromGitter<alehander42> and the typeinfo thing : your tooling like gdb scripts etc can just know where this typeinfo is saved
14:59:39Araqthe world doesn't end with C where everybody is happy with void* and no debugging support for these.
15:00:42FromGitter<alehander42> i agree, just saying that i am talking about things where the typical c intro doesnt work
15:01:10Araqwell I don't know the details of DWARF nor GDB so I cannot answer
15:01:40FromGitter<alehander42> which reminds me
15:02:23*Vladar joined #nim
15:02:25Araqbut I don't want the solution to be: emit even more C code just so that my debugger can work
15:02:36disruptekclyybber: ah you fixed it; nice! 👏
15:02:40Araqwrong level of abstraction
15:02:42FromGitter<alehander42> we worked on a bit crazy idea which can enable one to see the macro "expansion" stack of his code on runtime: e.g. in gdb or in a stacktrace
15:02:57FromGitter<alehander42> (and the expansions themselves)
15:03:08FromGitter<alehander42> would something like this have a chance to land upstream in a debug mode
15:04:36AraqI will never fight anything that improves the debugging experience but patching DWARF debug info directly should work out better in the long run
15:05:11FromGitter<alehander42> well, for this particular thing, i am not sure, because its kinda backend-independent
15:05:18Araqconsider that envP_->foobar vs foobar cannot be captured by producing even more C code
15:05:30*GordonBGood quit (Ping timeout: 268 seconds)
15:05:39FromGitter<alehander42> so tying it to dwarf itself doesnt make sense to me (but it can just be a data structure saved in the binary ofc)
15:06:02AraqI don't care that foobar was captured inside a closure, I want my debugger to tell me its value
15:06:03FromGitter<alehander42> otherwise i agree about the C generation thing
15:06:43Araqpreferably by hovering my mouse over foobar because it's 2019 and delphi could do that in 1990
15:06:53FromGitter<alehander42> i actually think rtti shouldnt be needed for non-debugging code but maybe i am missing something
15:08:06FromGitter<alehander42> i am not sure about the envP-_->foobar vs foobar thing
15:08:22FromGitter<alehander42> thats actually easy to catch for the debugger, as it sees the c data structures anyway
15:08:30FromGitter<alehander42> but it can abstract over it of course
15:10:17FromGitter<alehander42> the macro expansion idea is more about seeing e.g. you're in "testTemplate > this test template line > checkTemlate > thisExpansionLine > e == 2" , not only the call stack
15:10:40FromGitter<alehander42> and to be able to see the original macro/template code and the expansions of it in the same time
15:14:56Araqnot sure that belongs into a debugger and not into an IDE
15:19:29clyybberAraq: How is this supposed to work then? https://github.com/Clyybber/Nim/blob/patch-2/tests/objvariant/tfloatrangeobj.nim
15:19:57Araqclyybber, not at all, it's silly
15:20:36*floppydh quit (Quit: WeeChat 2.6)
15:24:41clyybberAraq: Not with the new RTTI :p
15:25:10clyybberAraq: Wouldn't it be more wise to use the case statement approach of the new RTTI for the old RTTI too?
15:26:04AraqI'd rather see the effort spend on --gc:destructors
15:26:51Araqwe need to focus on the important things.
15:27:12clyybberFine with that too, but then I don't understand why we don't release those improvements with --gc:destructors
15:27:50clyybber(referring to your previous statement, where you said you don't want the optTinyRtti condition)
15:31:52clyybberBecause then I can test these cases.
15:46:12*PMunch quit (Quit: Leaving)
15:56:16FromGitter<AmberSaber> Can you provide documentation for language specifications in pdf format
15:57:06FromGitter<AmberSaber> Can you provide documentation for language specifications in pdf format
16:06:17disrupteknarimiran: https://github.com/nim-lang/Nim/pull/12592 -- changelog?
16:06:44narimirandisruptek: you're right, changelog entry is needed for that
16:10:01*nsf joined #nim
16:10:35FromGitter<kaushalmodi> @PMunch: Thanks for that idea on `defZip` template; I have used that in my PR
16:12:37leorize@AmberSaber: go to https://nim-lang.org/docs/manual.html, then print the page to pdf
16:13:07*theelous3 joined #nim
16:21:03narimiran@yglukhov are you around?
16:35:08*leorize quit (Ping timeout: 260 seconds)
16:37:00FromGitter<yglukhov> narimiran: hey, whats up
16:37:41*leorize joined #nim
16:37:53narimirani've seen you're the last one who merged some things in "fowlmouth/nake", so i was wondering if you could merge https://github.com/fowlmouth/nake/pull/70
16:38:20narimiranwe are testing "nake" as part of important_packages, and this is stopping one PR
16:38:34FromGitter<yglukhov> done
16:38:37narimiranthanks
16:46:21shashlick@narimiran what was the problem with adding nimterop to important packages?
16:47:20narimiranshashlick: i don't remember exactly, but probably something windows-related, maybe some C lib missing?
16:56:09FromGitter<kaushalmodi> shashlick: Today I faced a strange compilation issue with nimterop, but found a workaround
16:56:28FromGitter<kaushalmodi> a colleague uses Nim exclusively for work stuff so he does not have ~/.nimble dir
16:57:35FromGitter<kaushalmodi> when he compiled the nim wrapper containing the cImport statements, the error he got was something along the lines of "unable to find nimterop/plugin"
16:58:01FromGitter<kaushalmodi> for work, I have a separate --NimblePath which I pass to the nim binary
16:58:32FromGitter<kaushalmodi> so the command is `nim cpp --NimblePath:/local/nimble/ wrapper_containing_cimport.nim`
16:58:57*tklohna quit (Ping timeout: 246 seconds)
16:59:45FromGitter<kaushalmodi> the failure was caused by the nimterop/getters/loadPlugin proc
16:59:57FromGitter<kaushalmodi> .. by the nim exec that's run in another subprocess
17:00:12FromGitter<kaushalmodi> that nim process does not "see" the --NimblePath I passed originally
17:00:46FromGitter<kaushalmodi> so the workaround was: ⏎ ⏎ ```NIMBLE_DIR=/local/nimble/ nim cpp --NimblePath:/local/nimble/ ..``` [https://gitter.im/nim-lang/Nim?at=5dc0593ea9f0dc24852bc9d8]
17:01:28FromGitter<kaushalmodi> The `NIMBLE_DIR` env var is effective in passing the custom nimble dir path to the nim run in a subprocess inside `loadPlugin`
17:01:43FromGitter<kaushalmodi> shashlick: Hope all of the above makes sense
17:02:40AraqThere's always a lighthouse. There's always a man. There's always a city.
17:02:54Araqso ... rubber duck time
17:03:11Araq--gc:destructors leaks memory for exceptions, so far, so bad
17:03:39Araqbut also for 'nim cpp' the 'try except' statement doesn't work, what's up with that?
17:04:05Araqthe produced C++ code looks ok
17:05:34Araqany ideas?
17:11:21*oculuxe joined #nim
17:12:57*oculux quit (Ping timeout: 240 seconds)
17:14:49shashlick@kaushalmodi ya I'm not sure how to get that info from Nim and propagate it to the child processes
17:15:13*NimBot joined #nim
17:16:09FromGitter<alehander42> Araq well some example is needed
17:20:02shashlick@Araq can we find out what flags were passed to Nim at compile time?
17:26:00*jwm2241 joined #nim
17:27:15Araqwhen compileOption() but only for some stuff
17:34:50disruptekAraq: cpp exceptions don't compile or they don't catch or they just segfault?
17:34:57disruptekhttps://github.com/nim-lang/Nim/issues/11081 🙄
17:35:35Araqnothing like that, they misbehave
17:35:47Araqand the program does work without --gc:destructors
17:35:56disruptekcontrol-flow misbehavior?
17:35:57Araqso it's not some reported bug :P
17:36:13Araqyeah, control-flow misbehaviour indeed
17:36:29disruptekah, so it's a feature. 🤭
17:45:28FromGitter<alehander42> well, is the c++ code misbehaving
17:45:36FromGitter<alehander42> or is nim generating weird c++ code
17:45:40*Trustable joined #nim
17:45:55FromGitter<alehander42> is the problem in the (correct c++) or in the (correct nim) camp
17:46:00*nsf quit (Quit: WeeChat 2.6)
17:56:36Araqnote that the c backend doesn't work either, but it "only" leaks memory
17:56:39Araqso weird
17:56:46Araqin the meantime we got outplace: https://github.com/nim-lang/Nim/pull/12593
17:57:00AraqNim is awesome.
17:58:26Araqbbl
17:59:58FromGitter<kaushalmodi> shashlick: I have tried to summarize the issue in https://github.com/nimterop/nimterop/issues/151
18:00:43federico3is there a benefit in using outplace instead of doing a copy explicitely?
18:05:36clyybberMethod like chaining I suppose.
18:05:45clyybberNot sure if that works in this implementation though.
18:07:04shashlick@kaushalmodi - thanks!
18:12:47*fredrik92 joined #nim
18:13:14*couven92 quit (Disconnected by services)
18:13:18*fredrik92 is now known as couven92
18:13:42*fredrik92 joined #nim
18:16:31FromDiscord<mratsim> it probably need some arrow sugar `<<<<`(sort(x))
18:18:55FromGitter<alehander42> is there an example
18:18:57FromGitter<alehander42> with index > 1
18:18:59clyybbermratsim: I mean something like someVar.outplace(sort).echo
18:21:10FromGitter<alehander42> i'd maybe expect outplace to take a function and return something which can be called, but it probably requires a lambda
18:21:11FromGitter<alehander42> which is slow
18:21:16FromGitter<alehander42> so nice
18:32:49*clyybber quit (Ping timeout: 265 seconds)
18:44:00FromDiscord<itmuckel> Hey guys! Is "Nim in Action" outdated by now or is it still usable for version 1.0.2?
18:44:25FromDiscord<itmuckel> I'd like to read something more in-depth than the tutorial on the web page. 🙂
18:45:16narimiranstill usable
18:45:46*clyybber joined #nim
18:47:14clyybberAraq: https://github.com/nim-lang/Nim/pull/12591 is ready
18:47:40*clyybber quit (Client Quit)
18:47:59FromDiscord<itmuckel> Okay, then I'll give it a try.
18:57:03FromDiscord<kodkuce> choosenim works right?
18:57:17disruptekit works; whether it works right is open to interpretation.
18:58:36FromDiscord<kodkuce> 🙂
19:04:00blackbeard420does jester read the entire request body into memory or is there a way to stream the request body
19:13:25*solitudesf quit (Read error: Connection reset by peer)
19:13:53*solitudesf joined #nim
19:15:31FromDiscord<treeform> I don't know about jester, but with HTTP lib you can.
19:15:41FromDiscord<treeform> I use that for my websocket library.
19:15:50FromDiscord<treeform> You just need to get at the underlaying socket.
19:16:03disruptekhttpclient exposes a stream interface.
19:17:13FromDiscord<mratsim> @itmuckel, nim in action code examples are part of Nim anti-regression suite
19:17:37*solitudesf quit (Client Quit)
19:17:56*solitudesf joined #nim
19:19:15FromDiscord<exelotl> Main difference is that strings/seqs/tables could be nil, back when Nim in action was written
19:19:39FromGitter<brentp> @mratsim, I've been using arraymancer to do PCA for dim-reduction and then a NN to assign unlabeled samples to a cluster: http://home.chpc.utah.edu/~u6000771/somalier-ancestry.html
19:19:59FromGitter<brentp> seems like openblas is much much faster than default.
19:22:00*nsf joined #nim
19:22:06Araqmaybe it's CPU specific
19:22:38FromDiscord<mratsim> nice 🙂
19:22:47FromDiscord<mratsim> faster than default what?
19:22:50lmariscalAnyone in here that is interested in vulkan that could give me feedback please?
19:22:52lmariscalhttps://github.com/nimgl/vulkan
19:23:11FromDiscord<mratsim> ping @krux02 ^
19:23:43FromDiscord<mratsim> I'm interested in Vulkan but only Vulkan-Compute
19:23:49FromDiscord<mratsim> 😄
19:24:27FromDiscord<mratsim> @brentp, if you were talking about the default blas, it's bacause the default blas on Linux distribution is just a reference triple for-loop implementation
19:25:15FromDiscord<mratsim> it's also not multithreaded AFAIK (though in the netlib organisation that manage BLAS they give an example on how to naively multithread matrix multiplication)
19:26:08FromGitter<brentp> really!? wow. didn't know that.
19:27:10FromGitter<brentp> just happend to try openblas, because that's what's on alpine where i build static binaries
19:29:58*nixfreak joined #nim
19:30:43*clyybber joined #nim
19:31:29clyybberlmariscal: Uh, I also have vulkan bindings :p
19:32:11lmariscalclyyber nimious/vulkan?
19:32:42clyybberNope vulkanim
19:32:48clyybberclyybber/vulkanim
19:33:35lmariscaloh nice, it is more of an assignment I had in university than the bindings themselves
19:33:41clyybberI took a bit of a different approach with regards to loading vulkan procs at runtime
19:34:07nixfreaknoobie tryingt to learn http://dpaste.com/2Y3BPWF
19:34:20clyybberlmariscal: Heh, I see you also made some glfw bindings
19:34:22nixfreakhow do you do nested elif statements
19:34:34clyybberlmariscal: Which I also made :p
19:34:39*tklohna joined #nim
19:34:47clyybberDo you autogenerate them too?
19:34:51lmariscalclyybber imgui, opengl, glfw, vulkan and soon stb
19:34:58lmariscalclyybber yeah I made the generators
19:35:16clyybberCool, I too autogenerate them, only reasonable way with vulkan
19:35:22lmariscalbut I am aiming for an ecosystem than independent bindings
19:36:04clyybberI see
19:36:58lmariscalI liek your approach with macros to load at runtime
19:39:26Araqnixfreak: use indentation, read a tutorial
19:41:03Araqmratsim: hmm so the "reference triple for-loop implementation" is slow but if I do it in C but with 'restrict' C is "as fast as Fortran"
19:41:11Araq:P
19:45:01*GordonBGood joined #nim
19:47:02clyybberlmariscal: I'm implementing default field values and when thats done I won't need those sType things and you can get rid of your constructors :)
19:48:21lmariscalohh, that sounds fancy, really would like to see
19:50:54clyybberAraq: Can you merge this: https://github.com/nim-lang/Nim/pull/12591
19:57:21Araqdone.
19:58:16clyybberThanks :)
20:06:01Araqclyybber: I want .cursor back :-(
20:06:49*pbb quit (Quit: http://quassel-irc.org - Chat comfortably. Anywhere.)
20:07:07Araqrefcounting is incomplete without it and hacks with 'ptr' lose too much information in the long run
20:07:08*pbb joined #nim
20:07:08*pbb quit (Client Quit)
20:07:23*pbb joined #nim
20:16:36*nsf quit (Quit: WeeChat 2.6)
20:17:32*tklohna quit (Ping timeout: 276 seconds)
20:26:37FromGitter<mratsim> @Araq it's more like without restrict I can be as fast as fortran
20:27:14FromGitter<mratsim> You still need to work on the algorithm but you won't have to fight the compiler
20:27:36clyybberAraq: Oh in what context exactly?
20:27:38FromGitter<mratsim> *cough* genericReset
20:28:05*tklohna joined #nim
20:28:35Araq--gc:destructors doesn't have GenericReset
20:28:43Araqnor problems with 7MB sized stacks
20:29:54Araqnor thread local heaps, the future is pretty sweet
20:29:59disruptek7mb oughta be enough for anyone.
20:35:21Araqalso duplicated zeroMem calls should be optimized away by the C compiler...
20:41:30FromGitter<mratsim> Well we didn't know where to put the objects so we just used stack objects
20:41:50FromGitter<mratsim> Not my fault we have like 10x crypto signature that takes lot of space :p
20:42:26clyybbermratsim: You mean alloca'd ref objects?
20:43:03Araqno, they didn't use 'ref' and so it ended up on the stack
20:43:30clyybberAh, and thats different now with --gc:destructors??
20:43:48Araqno...
20:44:12clyybberAh, good.
20:44:24clyybberI was getting worried we end up a java
20:46:26*paxis joined #nim
20:48:16*paxis quit (Max SendQ exceeded)
20:49:10*paxis joined #nim
20:51:45*GordonBGood_ joined #nim
20:52:17*GordonBGood quit (Ping timeout: 240 seconds)
20:56:23*clyybber quit (Read error: Connection reset by peer)
20:56:29*clyybber1 joined #nim
20:59:51*tklohna quit (Ping timeout: 252 seconds)
21:03:46nixfreakIs there a casting called strToInt ?
21:03:52*Trustable quit (Remote host closed the connection)
21:04:22nixfreakhow would you convert string to int ? or how can I use readLine using int ?
21:04:27FromGitter<dawkot> Hi, sounds like a really dumb question but how do you get http header values in `asynchttpserver`?
21:05:47FromGitter<dawkot> nixfreak, there is `parseInt` in `strutils`
21:05:51FromGitter<kaushalmodi> nimfreak: See strutils.parseInt
21:06:29FromGitter<kaushalmodi> also see https://scripter.co/notes/nim/#representing-one-type-in-another
21:06:38nixfreakthanks
21:11:16*rayman22201 quit (Quit: Connection closed for inactivity)
21:24:45*narimiran quit (Ping timeout: 268 seconds)
21:29:51*Vladar quit (Quit: Leaving)
21:38:04dom96hello all
21:38:10clyybber1Heyo
21:38:42*clyybber1 quit (Quit: WeeChat 2.6)
21:38:51*clyybber joined #nim
21:43:21*couven92 quit (Read error: Connection reset by peer)
21:43:44*couven92 joined #nim
21:50:37*clyybber quit (Quit: WeeChat 2.6)
21:56:19*mincopy joined #nim
21:56:54*mincopy left #nim (#nim)
22:00:22*cyraxjoe quit (Read error: Connection reset by peer)
22:01:13zedeussup
22:02:15*cyraxjoe joined #nim
22:04:41*cyraxjoe quit (Read error: Connection reset by peer)
22:06:32*cyraxjoe joined #nim
22:17:21*couven92 quit (Read error: Connection reset by peer)
22:17:44*couven92 joined #nim
22:26:36nixfreakIs this the only way to reverse a string ? https://nim-lang.org/docs/unicode.html#reversed%2Cstring
22:26:54nixfreakby asserting it ?
22:28:16*solitudesf quit (Ping timeout: 268 seconds)
22:32:48FromDiscord<kodkuce> nixfreak: i can check exercism and see my soltuon xD
22:33:31FromGitter<kaushalmodi> nixfreak: asserting does not reverse the string there
22:33:41FromGitter<kaushalmodi> It's .. asserting that the reversing happened
22:34:13FromDiscord<kodkuce> nixfreak: i just did a for loop to reverse it
22:34:20FromDiscord<kodkuce> probbaly not efficient
22:34:33FromGitter<kaushalmodi> In Nim docs, the special docstrings called runnableExamples serve the purpose of documentation and tests
22:34:37FromGitter<kaushalmodi> It's pretty awesome
22:34:56*leorize quit (Ping timeout: 260 seconds)
22:35:25FromGitter<kaushalmodi> To answer your question, you can do `let reversedStr = origStr.reversed()`
22:36:53nixfreakstring.reversed() ?
22:38:07FromGitter<kaushalmodi> Yes, `stringVar.reversed` is the same as `reversed(stringVar)`
22:39:24*MightyJoe joined #nim
22:39:49FromGitter<kaushalmodi> I'd suggest going through *and trying out the examples* from https://narimiran.github.io/nim-basics/
22:40:24FromGitter<kaushalmodi> And then https://nim-lang.github.io/Nim/tut1
22:40:26*cyraxjoe quit (Ping timeout: 240 seconds)
22:41:49nixfreakok thanks
22:45:04*cyraxjoe joined #nim
22:46:16*MightyJoe quit (Ping timeout: 240 seconds)
22:49:09FromGitter<mratsim> @brentp, I think it's index_select for https://github.com/mratsim/Arraymancer/issues/400. Will cook up some example
22:49:27FromGitter<mratsim> I really need a doc framework
22:51:22FromGitter<mratsim> https://github.com/mratsim/Arraymancer/blob/a555fae806c5f795d4f664ca1eefd945d413933b/src/tensor/shapeshifting.nim#L303
22:51:30FromGitter<mratsim> Actually it might not be that
22:51:58FromGitter<mratsim> I probably need to add a masked indexing
23:00:24*nixfreak quit (Remote host closed the connection)
23:05:47*mwbrown quit (Excess Flood)
23:06:08*mwbrown joined #nim
23:09:27*letto quit (Quit: Konversation terminated!)
23:10:21*seni joined #nim
23:11:08*letto joined #nim
23:13:54*lritter quit (Ping timeout: 268 seconds)
23:14:32*leorize joined #nim
23:48:22*disbot quit (Remote host closed the connection)
23:49:34*disbot joined #nim
23:53:12*disbot quit (Remote host closed the connection)
23:53:50*disbot joined #nim
23:55:05*rayman22201 joined #nim