<< 18-04-2018 >>

00:04:05*smt quit (Ping timeout: 240 seconds)
00:10:24user1101why release v1.0 when we can wait a bit longer and release nim with destructors? That way Nim might get the "GC-free" cred from the get-go, and not suffer the same fate as D
00:25:36*krux02 quit (Remote host closed the connection)
00:35:05FromGitter<AxDSan> how would you go around creating bindings from something to Nim?
00:35:10FromGitter<AxDSan> is there like a golden rule?
00:37:22shashlickWhat are you looking to wrap
00:38:51FromGitter<AxDSan> Python to Nim?
00:40:36FromGitter<AxDSan> well... it's actually https://www.frida.re/
00:41:16FromGitter<AxDSan> seems interesting https://gist.github.com/oleavr/e6af8791adbef8fbde06 right?
00:41:27FromDiscord<treeform> 1.0 is just a number
01:16:41*xkapastel joined #nim
01:25:42FromGitter<phrmoy> well, will there be breaking changes from 1.0 onwards?
01:26:08FromGitter<phrmoy> Because that's what we would expect from 1.0, other than just being number ^^
01:26:52FromGitter<phrmoy> and how's using Discord compared to Slack?
01:38:24*floppydh quit (Remote host closed the connection)
01:39:13*floppydh joined #nim
01:56:21*chemist69 quit (Ping timeout: 256 seconds)
02:03:29*dddddd quit (Read error: Connection reset by peer)
02:05:38*S1tiSchu joined #nim
02:07:08*SitiSchu quit (Ping timeout: 265 seconds)
02:09:17FromGitter<gogolxdong> How to create `command DescribeInstances :` using macro? I tried template but it convert `:` to `,`
02:25:23FromDiscord<2vg> shashlick: Does your mofuw benchmarking code use the routes macro ?
02:25:51shashlickI just tested your hello world
02:26:31FromDiscord<2vg> routes macro has a pattern matching process.
02:26:31FromDiscord<2vg> plaintext benchmark requires another optimal code.
02:27:19shashlickCan you send me what you'd like tested, I can try that
02:29:32FromDiscord<2vg> try this code: https://ghostbin.com/paste/pcj6n
02:29:51FromDiscord<2vg> The benchmark URL is / plaintext
02:30:00FromDiscord<2vg> * /plaintext
02:44:29shashlick2vg: it does better than before, but slower than httpbeast still - https://clbin.com/PN09L
02:44:36shashlickdom96: ^^
02:45:35FromDiscord<treeform> https://ldjam.com/ Ludum Dare is this weekend, for do people want to make nim games?
02:52:01FromDiscord<2vg> shashlick: great.
02:52:01FromDiscord<2vg> but, here, the difference between mofuw and httpbeast may be due to the following reason.
02:52:01FromDiscord<2vg> The size of response (mofuw has a Date header and a Server header, not only an increase in the amount of transfer, but also a delay to obtain time)
02:57:36shashlickya I noticed that in the code
02:57:42shashlickjust commented on the PR as well
03:11:22*user1101 quit (Quit: user1101)
03:34:05*Pwntus quit (Ping timeout: 240 seconds)
03:37:25*Pwntus joined #nim
03:54:07*Lord_Nightmare2 joined #nim
03:57:21*Lord_Nightmare quit (Ping timeout: 264 seconds)
03:57:21*Lord_Nightmare2 is now known as Lord_Nightmare
04:26:45*user1101 joined #nim
04:45:56*user1101 quit (Quit: user1101)
04:51:45TangerHey folks! When writing tests for a project that will involve more than 1 source file, is it recommended to write tests in a `when isMainModule` block or to have a separate tests directory?
04:52:21FromDiscord<treeform> I almost always use a separate tests directory
04:55:33*Lord_Nightmare quit (Ping timeout: 264 seconds)
04:59:09*Lord_Nightmare joined #nim
05:16:31*nsf joined #nim
05:17:47*r3d9u11 joined #nim
05:31:21*Lord_Nightmare quit (Quit: ZNC - http://znc.in)
05:31:41*Lord_Nightmare2 joined #nim
05:32:35*Lord_Nightmare2 is now known as Lord_Nightmare
05:36:58*shashlick quit (Ping timeout: 240 seconds)
05:43:12FromGitter<gogolxdong> 'yield' cannot be used within 'try' in a non-inlined iterator
05:44:32*shashlick joined #nim
05:47:51TangerThanks treeform, that's what I'm more inclined to use. Keeps it all in one place
05:55:20*shashlick quit (Ping timeout: 256 seconds)
05:55:43*shashlick joined #nim
05:56:24FromGitter<gogolxdong> 'yield' only allowed in an iterator in code `var content =await client.getContent(url)`
06:02:19*r3d9u11 quit (Remote host closed the connection)
06:04:20*xet7 joined #nim
06:08:37*DarkArctic quit (Ping timeout: 246 seconds)
06:17:54*DarkArctic joined #nim
06:27:26*PMunch joined #nim
06:56:16*xet7_ joined #nim
06:56:51*xet7 is now known as Guest72873
06:57:04*xet7_ is now known as xet7
06:57:41*Guest72873 quit (Ping timeout: 256 seconds)
07:20:39*Arrrr joined #nim
07:20:39*Arrrr quit (Changing host)
07:20:39*Arrrr joined #nim
07:30:43*Zevv left #nim (#nim)
07:48:45*rokups joined #nim
08:02:22FromGitter<mratsim> @user1101: The tests to confirm that everything works fine GC-free seq and strings would be too long.
08:02:37*leru joined #nim
08:04:47*leru quit (Remote host closed the connection)
08:06:24*max3 quit (Quit: Connection closed for inactivity)
08:06:55*abeaumont quit (Ping timeout: 246 seconds)
08:07:03*smt joined #nim
08:23:00FromGitter<mratsim> Mindblown: https://forum.nim-lang.org/t/3757/2#23421
08:35:26*SunDwarf quit (Ping timeout: 276 seconds)
08:41:20*SunDwarf joined #nim
08:44:22*couven92 joined #nim
08:45:34*couven92 quit (Read error: Connection reset by peer)
08:46:02*couven92 joined #nim
09:02:51*xet7 quit (Read error: Connection timed out)
09:03:26*xet7 joined #nim
09:09:40TangerAm I crazy in thinking that I read somewhere that you could put constraints on types and raise a compilation error if a variable doesn't meet those constraints?
09:13:58TangerNevermind, it was concepts, haha
09:43:51*abeaumont joined #nim
10:11:54*vantage joined #nim
10:12:03vantageyo
10:27:25*xet7 quit (Read error: Connection timed out)
10:27:55*xet7 joined #nim
10:30:21*Vladar joined #nim
10:42:51*Arrrr quit (Ping timeout: 240 seconds)
11:21:19*Arrrr joined #nim
11:35:31FromGitter<zetashift> heya vantage
11:35:44FromGitter<zetashift> @treeform I'm planning to enter LDjam with Nim
11:36:05FromGitter<zetashift> not sure what to use, I'm currently messing around with godot-nim
11:36:20*user1101 joined #nim
11:37:25FromDiscord<geckojsc> Oh nice
11:38:25ArrrrSomeone who published his game on steam opensourced the game engine he used
11:38:55PMunchzetashift, oh cool. I did a weekend game jam with just Nim, SDL, and my gamelib stuff
11:40:31Araqmratsim: GC-free seqs and strings too long?
11:40:34Araqwhat does that mean?
11:41:03FromGitter<krux02> PMunch: I hope that my Opengl Sandbox will be the perfect game jam library for the future
11:41:04FromGitter<zetashift> yea impbox right?
11:41:40FromGitter<zetashift> his engine was a pico8-ish type of engine, he also entered in the previous jam with Nim
11:42:06FromGitter<krux02> I like the ideo of pico, it is minimal and yet productive.
11:42:18FromGitter<allochi_twitter> The PICO-8 engin in Nim, I tried it, it is fun
11:42:22FromGitter<krux02> My Game library will also be minimal in a certain sense
11:42:37FromGitter<allochi_twitter> I tried both PICO-8 and PICO-8 in Nim :)
11:42:49ArrrrLink?
11:43:05FromGitter<krux02> it will not throw complex data structures at you or other complicated stuff, but it will require you to write your own shaders (which will be trivial)
11:43:14FromGitter<allochi_twitter> https://github.com/ftsf/nico
11:43:25FromGitter<allochi_twitter> it’s called NICO
11:43:46ArrrrAh, yes, I was talking about this. I thought pico was ported to nim
11:43:51FromGitter<zetashift> @krux02 game library as in SDL and raylib?
11:43:52FromGitter<allochi_twitter> Oh, there is also a youtube building a space shooter with it
11:44:10FromGitter<krux02> well, when programming a CPU is easy, then why should it be hard to program a GPU
11:44:13FromGitter<allochi_twitter> I think it was with it
11:44:16FromGitter<krux02> I don't know raylib
11:44:33FromGitter<allochi_twitter> @krux02 I’m install Arch ;)
11:44:51FromGitter<allochi_twitter> On a VM though
11:46:02FromGitter<krux02> yes like raylib, but instead DrawCube DrawCubeWires etc one has to write that on your own
11:47:22FromGitter<krux02> I will provede a libraray with vertex data of primitive objects such as cubes, but one has to write the shader for the cube manually.
11:47:31FromGitter<mratsim> @Araq to properly test the new runtime on all supported environments, would require a long period of time. (3 months? 6 months?)
11:48:40FromGitter<krux02> for everybody who didn.t notice it when I announced it yesterday evening, I finished my ast pattern matching library
11:48:42FromGitter<krux02> https://github.com/krux02/ast-pattern-matching
11:50:05Araqmratsim: well I need to finish the implementation but testing is rather easy, it's not platform specific, once it's green on travis and appveyor it'll be good enough for most people
12:01:23FromGitter<allochi_twitter> regarding building games NICO check this youtube https://www.youtube.com/watch?v=EwM1Z3WdqjM
12:06:40PMunchkrux02, link?
12:07:27PMunchhttps://github.com/krux02/opengl-sandbox
12:07:29PMunchThat thing?
12:09:24PMunchI focused more on game utility functions than actual rendering and such: https://github.com/PMunch/SDLGamelib/tree/master/gamelib
12:09:53PMunchMuch of it doesn't even use SDL at all, so I've been considering to strip out the SDL parts or make it optional
12:10:32FromGitter<krux02> PMunch, yes
12:11:18FromGitter<krux02> PMunch, it is nice if you just integrate SDL well and don't redefine SDL stuff just to strip it out.
12:14:40Araqany news on GCC-3 ?
12:15:09FromGitter<krux02> nope
12:15:22PMunchkrux02, oh yeah that wasn't my plan. I was thinking about stripping out the SDL-specific stuff into it's own library, or hide it behind a compile-time switch
12:15:23FromGitter<krux02> I tried to install gcc-3 locally on arch, did not work out
12:15:45Araqmaybe there is still a mingw lying around that is based on gcc-3
12:15:49FromGitter<krux02> it compiled for hours and then it failed, and thangs to the defalt setting of yaourt it cleaned up everything afterwards
12:15:55PMunchThat way it can be used without using SDL, but you could still use it with SDL if you'd like
12:15:59FromGitter<krux02> yaourt sucks
12:16:05Araqthat would be the best option in fact, as then I can keep supporting it
12:16:34*dddddd joined #nim
12:18:27FromGitter<krux02> Araq: can you merge this: https://github.com/nim-lang/packages/pull/705
12:19:36Araqlol
12:19:46Araq"thangs to the defalt setting of yaourt it cleaned up everything afterwards"
12:20:10Araqyeah, these transaction based package managers are a bit detached from reality.
12:20:33Araqwell you all know my opinion on package managers...
12:20:53FromGitter<krux02> well can't do with them and not without them?
12:21:01Araqyes.
12:23:49FromGitter<krux02> well good package managers are rare. Dependencies are not easy.
12:25:38FromGitter<krux02> the words package manager/built tool is sbt.
12:26:01FromGitter<krux02> strictly it is just a built tool that uses another package manager for it's packages, but the built files are horrible
12:26:09*byte512 quit (Ping timeout: 264 seconds)
12:26:30FromGitter<krux02> they invented their own declarative language with their own assignment operatiors and everything to define project settings
12:26:40FromGitter<krux02> and then they advertise that everything is scala
12:26:49FromGitter<zetashift> sbt is horrible ><, Scala guys are working to fix and Mill looks promosing
12:26:59FromGitter<zetashift> promising*
12:27:13FromGitter<krux02> I hate sbt since scala 2.7
12:27:26FromGitter<krux02> before that I didn't know scala
12:27:36Araqinteresting I thought sbt would be good
12:27:46FromGitter<krux02> no it is horrible
12:27:47Araqbecause it's a Scala DSL ;-)
12:27:56Araqand we're doing something similar with Nimble...
12:27:57FromGitter<zetashift> https://github.com/lihaoyi/mill
12:28:15FromGitter<krux02> every time I wanted to configuer something I was like: In scala it would be easy, but how do I do this in this good damn syntax
12:28:29FromGitter<krux02> and then the tutorials avoided pertty good to explain the right things
12:29:27FromGitter<krux02> well the only good thing about sbt is that no configuartion at all is alreday working pretty well
12:29:58*vantage quit (Quit: Yaaic - Yet another Android IRC client - http://www.yaaic.org)
12:30:07*vantage joined #nim
12:30:23FromGitter<krux02> but as soon as you have to edit an sbt file, it's pure horror of frustration and being blocked entirely because it is just super confusing how it works
12:31:03Araqtemplate `--`*(key, val: untyped) =
12:31:03Araq ## A shortcut for ``switch(astToStr(key), astToStr(val))``.
12:31:03Araq switch(astToStr(key), strip astToStr(val))
12:31:16Araq--checks: off
12:31:34Araqthis is NimScript, the one thing that is kinda special
12:31:50Araqand people already struggled with it :-)
12:31:59Araqgood we didn't do more of these.
12:32:50FromGitter<data-man> Why not take gcc 3 from the releases's archive?
12:33:04vantagei like it, since its similar to the command line api
12:33:28*byte512 joined #nim
12:34:46FromGitter<krux02> Araq: the closer the build tool is to simple nim programming, the better. Don't add special stuff, special operators, or in general special
12:35:12FromGitter<krux02> make it that you don't need to explain things and really thing about if you really need to add a new operator
12:35:54FromGitter<krux02> and it should be clear what the goal of such a build scrip is.
12:36:05FromGitter<krux02> That was one of my main problems in CMAKE
12:36:23FromGitter<krux02> I just had no idea what this CMAKE file was supposed to do in order to build the project
12:36:32FromGitter<krux02> because building the project is clearly not what CMAKE does
12:36:45FromGitter<krux02> it generates build files that build the project
12:36:57FromGitter<krux02> and to do that it needs to set values
12:37:03FromGitter<data-man> Just use Tup.
12:37:10FromGitter<krux02> and then magic happens
12:38:38FromGitter<data-man> And Fossil instead of Git :-D
12:38:50FromGitter<krux02> what is fossil?
12:39:05Araqdata-man we would need fossil-hub first though
12:39:28Araqfossil is version management from the SQLite author(s)
12:39:41FromGitter<data-man> @krux02: Version Control System sqlite-based fossil-scm.org
12:40:01FromGitter<krux02> is that good or bad?
12:40:12Araqkrux02: never used it, looks good on paper
12:40:45FromGitter<krux02> yea you never know the disadvantages of a technology until you use it
12:40:50*smt` joined #nim
12:41:57FromGitter<mratsim> “fight with it” —> fixed for you
12:42:48Araqevery tool that builds a makefile is fundamentally broken. the 'make' algorithm is perhaps 100 lines of code, you gain nothing by not implementing it on your own.
12:43:31FromGitter<data-man> There is hosting for Fossil repos http://chiselapp.com
12:43:31*sendell joined #nim
12:43:35*smt quit (Ping timeout: 256 seconds)
12:46:18Araqbut does VSCode have fossil integration?
12:46:50FromGitter<alehander42> @krux02 ast_pattern_matching looks great
12:47:14FromGitter<data-man> https://sqlite.org/whynotgit.html - Why SQLite Does Not Use Git
12:47:33FromGitter<alehander42> still, I played with its internals and it seems very veryNimNode
12:47:39FromGitter<alehander42> which is very concerning
12:47:52FromGitter<krux02> Araq: I agree on that make algorithm. It is super trivial.
12:48:20vantagealeh why concerning?
12:48:21FromGitter<data-man> @Araq: https://github.com/darkmusic/fossil-vscode
12:48:43FromGitter<alehander42> replacing NimNode with more general stuff wouldn't be too hard, but it also expects `children` etc and assumes all those special int/string mappings to newLit etc
12:48:44*xkapastel quit (Quit: Connection closed for inactivity)
12:49:00FromGitter<alehander42> that's great, but it makes it very unsuitable for other types
12:49:01dom96Dissertation demo finished. Whew.
12:49:29dom96In case you guys want to see: https://picheta.me/obfuscator (UI shamelessly based on the playground :))
12:49:44PMunchdom96, dissertation demo? Are you soon done with your studies?
12:49:46FromGitter<alehander42> ( @vantage it's a great lib, I just wanted to convert it for all kinds of types :D )
12:49:57FromGitter<krux02> Well I am a bit tired of learning git. And it works for me. I don't want to learn another tool.
12:50:08*byte512 quit (Ping timeout: 256 seconds)
12:50:10dom96PMunch: yep, 2 exams and a dissertation hand in are left
12:50:25PMunchCool! Good luck!
12:50:36dom96Thanks :)
12:51:33FromGitter<krux02> well yea it does obfuscate
12:51:41vantagewhy are macros in nim
12:52:00*byte512 joined #nim
12:52:03vantagewhy are macro errors in nim text based
12:52:12FromGitter<krux02> vantage: to get people interested in the language, such as me :P
12:52:32vantagewhy arent they something like MacroError
12:52:55vantagekrux i made a typo
12:52:56FromGitter<krux02> vantage: macroerror would not be better at all
12:53:11vantagewhats the reasoning?
12:53:45vantagewouldnt it be better to have error messages standardised?
12:54:00FromGitter<alehander42> @dom96 well done! is it somehow reversible? (you have "comments" in the name of example , I thought they are just removed)
12:54:01FromGitter<krux02> macroError would not add any information to the error it would just put the prefix Macro to the error that would not help at all
12:54:29*xet7 quit (Read error: Connection timed out)
12:54:33FromGitter<alehander42> @vantage those are on compile time, so they usually fail immediately to the top, it wouldn't make a lot of sense to use exceptions for them
12:54:36dom96alehander42: all obfuscation is reversible with enough time :)
12:54:41FromGitter<krux02> vantage: well it is a very good advantage of the macros package to provide custom error messages
12:54:45FromGitter<alehander42> you can still use exceptions internally in the macros
12:55:04*xet7 joined #nim
12:56:05dom96alehander42: Maybe i'm not sure what you mean, the comments are indeed removed.
12:56:15vantageim mentioning this cause i realised that macro errors dont give a similar error message to compile and runtime
12:56:39FromGitter<krux02> I would even say to call an error macroerror harmful. It is like the c++ error "error using const ..."
12:56:41FromGitter<alehander42> @krux02 I think your matching API can still be usable for all other object types without many(maybe any changes), if it adds some hooks, e.g. `matchInt NimNode, newLit` `matchIdent NimNode, ident`
12:56:45dom96vantage: You can raise exceptions at compile-time too IIRC
12:56:49vantagei cant just ctrl click the error to jump to it
12:56:51dom96and you'll get a stack trace
12:57:18FromGitter<krux02> @alehander42 yes I think so, too. I even thought about supporting somthing like that.
12:58:41FromGitter<alehander42> and maybe `matchUnnamedArgs NimNode, children` so you can still have nkStuff(a, b, c) which wouldn't make a lot of sense for many other types
12:59:08FromGitter<alehander42> which would usually use `myDisc(a: stuff, b: b)`
12:59:22vantagethere are some other things, i wish i could add a noob mode to nim. things newbies do which are common errors, explained in plain english
13:01:12FromGitter<krux02> vantage: I thought about (only thoght I won't do it) writing a book: "simple nim" that explains an easy subset of nim that people can get productive with fast, without learning everything. A bit oriented towards little schemer
13:01:31*SenasOzys quit (Ping timeout: 268 seconds)
13:02:21FromGitter<krux02> @alehander42 at the moment I have no interest to extend the ast matching library further. That is why i have released it as version 1.0.0. I just want to focus on something else now. But your can create a PR that implements what you want.
13:02:24vantageyeah nim doesnt have a steep learning curve, but the hill is very high... so...
13:02:44FromGitter<krux02> If it works and does not cause too many conflicts I might merge it.
13:04:19FromGitter<alehander42> @krux02 sounds great, I'll first write some example tests demonstrating what would my goal be, and if it seems good, I'll make a PR when I have time
13:08:59FromGitter<krux02> @alehander42 Don't be afraid that I might point you out on your mistakes, expect it. ;)
13:15:42FromGitter<alehander42> <3 can't wait
13:22:51*smt` quit (Read error: Connection reset by peer)
13:22:58*Arrrr quit (Read error: Connection reset by peer)
13:24:26dom96hrm, wasn't there a flag that let's you enable nil exceptions in Nim?
13:26:15*smt joined #nim
13:26:32PMunchdom96, you thinking of this: https://nim-lang.org/docs/segfaults.html ?
13:26:49dom96looks like it, cool :)
13:30:06PMunchYeah, just discovered it yesterday by accident :P
13:30:22PMunchWas looking through modules in the stdlib and wondered what "segfaults" would be about :P
13:30:39PMunch"include segfaults" sounds like a recipe for disaster
13:31:51dom96hah true
13:31:59dom96that should be a --define
13:33:43Araqno way. it should be a module
13:33:53Araqand actually it shouldn't exist.
13:34:29dom96also, does this only turn SIGSEGV into an exception?
13:34:40dom96isn't SIGSEGV possible for a lot more than just nil accesses?
13:35:22Araqyeah, there is some logic to detect true 'nil' accesses
13:35:29Araqinvolved.
13:35:42dom96okay cool
13:35:46dom96But why shouldn't it exist?
13:35:51dom96and why not behind a define?
13:36:22Araqbecause if your software quality is so poor it has nil access bugs you should fix that, not patch over it
13:36:52vantagearaq what about external code?
13:37:08Araqand yeah I know I get part of the blame for this by not designing 'nil' properly
13:37:39Araqvantage: external code that has serious bugs needs to be fixed or abandoned.
13:38:49FromGitter<alehander42> I think some kind of improved flow-based nil checking like https://github.com/nim-lang/Nim/issues/7248 would be also very good
13:39:52FromGitter<alehander42> but I am not sure how hard(or easy) would it be to implement that at least for some classes of nil accesses/constructs
13:42:47dom96compile-time nil checks would certainly help
13:43:25federico3that segfaults module is underrated
13:43:49*SenasOzys joined #nim
13:44:40vantagefeder underrated means its better than people give it credit for
13:46:31dom96Here is the context of why I asked: https://github.com/dom96/jester/issues/139
13:48:06Araqmassive slow down? got some numbers to share?
13:49:25Araqbtw how hard is it to make 'await' a standalone template?
13:49:45Araqquite some work, right?
13:51:15dom96I don't have numbers, I'm guessing
13:52:50Araqit's probably hard to measure, another successfully predicted branch
13:56:19*couven92 quit (Quit: Client disconnecting)
13:59:07dom96so you think I should add that?
13:59:46Araqassert req != nil
14:00:00Araqyou can use an assertion for it
14:00:13dom96sure, that's what I suggested to do
14:00:22Araqoh ok.
14:00:25dom96i.e. check it in debug mode
14:00:41Araqyeah it's just for development
14:00:52dom96and only there because of possible performance issues
14:01:32AraqI wouldn't argue performance I would argue defensive programming is wrong.
14:05:51dom96well anyway, we need better async stack traces
14:13:47shashlickaraq: tissue is working pretty nicely, check out comment on https://github.com/nim-lang/nim/issues/1500 which was automatically posted
14:13:57shashlickhttps://github.com/genotrance/tissue
14:14:37Araqnice :-)
14:15:09*leru joined #nim
14:15:45shashlicklet me know if any feedback - i have found some which no longer crash, 1154 was closed, note posted to 741
14:16:41Araqwell these that do no longer crash should make it to the test suite anyway
14:18:01shashlickoh ya, sure
14:18:29AraqI'd like PRs like "closes #123"
14:21:33FromGitter<krux02> Araq: gitter actually embeds that name and I get a link to "Closures do not work yet" issue
14:24:33shashlickhttps://github.com/nim-lang/nim/issues/1145 still crashes - stack overflow
14:27:35Araqтуплес счоулд нот бе рецурсиве
14:27:46Araqtuples should not be recursive
14:31:59FromGitter<alehander42> wow araq careful with that poweruser alphabet
14:33:30shashlickaraq: question - to add test cases, how do you test issues which crashed in the past but give an error during compile after fix?
14:34:06Araqhmm this ant is 4 times bigger than most
14:35:04shashlicke.g. https://github.com/nim-lang/nim/issues/2383
14:35:28Araqshashlick: tests/errmsgs/ shows how to test for error messages
14:35:53shashlickneat
14:37:58Araqhmm this ant could invade the smaller ant colony. I wonder what would happen.
14:38:16Araqtime for an experiment.
14:39:34Araqthe small ants are all dead.
14:40:02*PMunch quit (Quit: Leaving)
14:43:21*miran joined #nim
14:45:58shashlickAraq: so adding a discard at the top of file will make sure testament will mark that failed compile as a passed test?
14:48:44*BitPuffin joined #nim
14:50:14Araqif the discard has the proper format, yes
14:50:27Araqyou can test it via
14:50:33Araqtt cat errmsgs
14:50:47Araqwhere tt should be your alias for tests/testament/tester
14:51:11Araqeverybody should have this alias :P
14:51:26shashlickokay so I still need a separate file for each test case, hope that's okay with appveyor
14:51:59Araqboth CIs are equally unreliable IME
14:52:06Araq:-)
14:52:43Araqbut hey, they are free, can't complain
14:59:48FromGitter<data-man> @shashlick: You can get PR instead of issue. ⏎ ⏎ > Note: In the past, pull requests and issues were more closely aligned than they are now. As far as the API is concerned, every pull request is an issue, but not every issue is a pull request. ⏎ > This endpoint may also return pull requests in the response. If an issue is a pull request, the object will include a pull_request key.
14:59:48FromGitter... [https://gitter.im/nim-lang/Nim?at=5ad75d646d7e07082b09f1b2]
15:00:17*leru quit (Remote host closed the connection)
15:00:40FromGitter<data-man> Just tiny hint. :)
15:00:46*leru joined #nim
15:02:04*nsf quit (Quit: WeeChat 2.0.1)
15:02:13*nut joined #nim
15:02:28nutvscode on mac - does someone else get this error - Activating extension 'kosz78.nim' failed: Path must be a string. Received undefined.
15:03:04Araqno.
15:03:18Yardaniconut, do you have Nim in your path? or IDK what it's called in macos :)
15:04:14dom96That PATH is the PATH on all operating systems
15:05:08nutyes. echo $PATH => /usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:~/nim/bin:~/.nimble/bin
15:05:11Araqbtw how do I get different color schemes to work on VSCode on OSX?
15:05:22YardanicoAraq, they worked for me before
15:05:30nut`nim --version` on terminal works for me
15:05:42Yardaniconut, do you have nimsuggest in your path?
15:05:49Araqnut: the terminal has its own idea of PATH
15:05:56shashlickdata-man - ya I filter PRs out
15:06:00nutYardanico: yes
15:06:25nutAraq: where else can I test whether my path is correct?
15:08:44nutnim/bin folder is added to my /etc/paths
15:10:58Araqnut: that seems correct
15:11:23dom96nut: Seems like you should create an issue on kosz78's repo
15:11:47dom96This one https://github.com/pragmagic/vscode-nim/
15:11:53nutI am not on github :(
15:12:41nutIn the extension, is there no setting to add the path to the binaries?
15:13:38Araqalso edit your .bashrc maybe
15:29:41*xet7 quit (Read error: Connection timed out)
15:30:25*xet7 joined #nim
15:35:12mirani want to pass a range to a proc that will be used in a for loop, e.g. `for i in myRange`, how do i do that?
15:35:36mirani have tried `myRange: range`, but that is an invalid type
15:37:18mirani guess i could pass separately start, end, and step....
15:37:45FromGitter<alehander42> HSlice ?
15:38:36FromGitter<alehander42> https://nim-lang.org/docs/system.html#Slice
15:41:06dom96In case we want yet another IM service, I made this: https://nim.zulipchat.com/
15:42:42dom96It's threaded-by-default which is kinda nice
15:43:13FromGitter<krux02> hmm: why is callsite deprecated?
15:43:51shashlickis there an easy command line to create a PR on github
15:44:07FromGitter<krux02> shashlick: probably
15:44:09Araqshashlick: nimble has code to do exactly that
15:44:19FromGitter<alehander42> @shashlick I don't know but I found it very easy to write such a function for gitlab api
15:44:36shashlickso there's no easy "git abc def" command line for it?
15:44:36Araqkrux02: I don't like it and it makes the compiler's internals more messy
15:45:02FromGitter<krux02> Araq: and what if I want to get the lineinfo of the macro invocation?
15:45:28Araqkrux02: instantiationInfo() ?
15:45:38FromGitter<alehander42> it seems hub is popular, but I don't know if it works for that @shashlick
15:45:49FromGitter<krux02> ok, that might work
15:46:00FromGitter<krux02> then it can stay deprecated.
15:46:18shashlickok
15:47:39FromGitter<genotrance> PR test case for #1154 - https://github.com/nim-lang/Nim/pull/7648
15:51:32*xet7 quit (Read error: Connection timed out)
15:51:54*xet7 joined #nim
15:54:17Araqnice.
15:54:43*xkapastel joined #nim
15:58:54*nut_ joined #nim
15:58:59nut_The issue was apparently fixed in 2017 https://github.com/pragmagic/vscode-nim/pull/52 Hmmm..
15:59:55*nut quit (Ping timeout: 260 seconds)
16:02:43shashlickhttps://github.com/nim-lang/Nim/pull/7649 for #2416
16:03:20shashlickhow easy is it to integrate nim test execution on a private server with github
16:08:24*SenasOzys quit (Ping timeout: 276 seconds)
16:10:02*xet7 quit (Read error: Connection timed out)
16:10:25*xet7 joined #nim
16:11:01*SenasOzys joined #nim
16:15:05*nut_ quit (Ping timeout: 260 seconds)
16:18:04*sendell quit (Remote host closed the connection)
16:22:18*nsf joined #nim
16:23:48euantorprobably easy if you run Jenkins on a private server
16:23:53euantorTHough I've never done it
16:26:19*nut joined #nim
16:26:22dom96Surely there are better ways than Jenkins
16:26:39FromGitter<krux02> when I use the fmt macro from strformat how do I add a newLine to the end?
16:26:41dom96Jenkins is synonymous with bloatware to me
16:26:53FromGitter<alehander42> you use `&"stuff"`
16:27:03dom96yes, or fmt("\n")
16:27:07dom96or "\n".fmt
16:27:33nutAraq: dom96: Fixed the vscode plugin issue. IDK for what reason, the plugin does not search the PATH for `nim` binary, but it searches for a `symlink to the nim binary`, so I created symlinks and added them to path, and now it works.
16:27:42FromGitter<krux02> @alehander42 the point of fmt is to not use & constantly
16:28:04FromGitter<alehander42> well I hate fmt
16:28:08FromGitter<krux02> and when I need to do "&" constantly again for newline then fmt is pretty pointless
16:28:09FromGitter<alehander42> with a passion
16:28:25FromGitter<krux02> why?
16:28:31FromGitter<krux02> I wrote something like it on my own
16:28:44FromGitter<krux02> but much shorter
16:29:20FromGitter<alehander42> :D I was being dramatic
16:29:24FromGitter<alehander42> I love `&`/fmt
16:29:29FromGitter<alehander42> I just prefer `&` than fmt
16:29:50Araqfmt "\n"
16:29:55FromGitter<alehander42> for my personal needs I often need this \\n thing
16:30:05FromGitter<krux02> http://ix.io/1878
16:30:06FromGitter<alehander42> and `&` is shorter
16:30:08FromGitter<krux02> that is my version
16:30:18FromGitter<alehander42> and this `fmt "\n" vs fmt"\n"` is pure nightmare :D
16:30:53FromGitter<alehander42> but otherwise I love the interpolation thing, use it all the time
16:30:56FromGitter<krux02> yes that is very surprising
16:31:12Araqlol omg
16:31:12FromGitter<krux02> that fmt"\n" is different from fmt "\n"
16:31:21Araqthat is how the language is defined
16:31:27Araqit's not even a 'fmt' thing
16:31:35FromGitter<krux02> yea
16:31:39Araqone is a raw string litearl, the other a command call
16:32:08shashlickkicked off a full test on my server to see how fast it is
16:32:21AraqI personally find fmt"\n" stupid, it means fmt doesn't only parse {} but also backslashes
16:32:24FromGitter<alehander42> i know but come on, this particular edge case is not perfect for reading
16:32:25FromGitter<krux02> javascript people also complain about how bad javascript is by pointing out their NaN values they got :shrug:
16:33:10FromGitter<alehander42> overally I am cautious with command calls, they're nice in moderation, but have many gotchas
16:33:37Araqwhich gotchas? never found one, they grew on me
16:33:56Araqand the more I use them, the more I appreciate them
16:36:30*nut quit (Quit: Page closed)
16:36:31shashlickso test ran in 19 minutes on my server, appveyor and travis takes 45+ minutes
16:37:23FromGitter<alehander42> `check a 2, 4`
16:37:28FromGitter<alehander42> that's a gotcha
16:37:45Araqhow so?
16:38:06FromGitter<alehander42> well one could easily expect this is
16:38:10Araqit's check(a(2), 4)
16:38:13FromGitter<alehander42> `check(a(2, 4))`
16:38:32FromGitter<alehander42> no, wait
16:38:39Araqnah, command call expressions only take a single argument
16:39:22FromGitter<alehander42> well yeah, that was surprising for me cause I was used to ruby's no `(` args
16:39:29FromGitter<alehander42> and even if i know the rule
16:39:43*Vantage_ joined #nim
16:39:47FromGitter<alehander42> still it's easier to visually parse when there is max one command call on a line
16:40:35Vantage_Why are identifiers defined the way they are, with only allowing one underscore after the first letter?
16:40:47FromGitter<alehander42> especially as echo can take many args
16:41:09Araqbecause underscores are separators, they better separate something
16:41:24FromGitter<alehander42> so actually I always thought commands can have >1 arg
16:41:39FromGitter<alehander42> cause echo is usually a command
16:42:17Araqa command statement can take more than one argument :-)
16:43:31FromGitter<alehander42> now, I can see how that makes sense
16:43:45Araqyay :-)
16:43:59Araqquite some discussions went into this feature...
16:44:49FromGitter<alehander42> but still I think my heuristic is good for me: use only one command call on a line
16:45:07FromGitter<alehander42> yeah, it seems tricky :D
16:46:59FromGitter<alehander42> did you plan on supporting named args :D
16:48:22*Pwntus quit (Changing host)
16:48:22*Pwntus joined #nim
16:50:25FromGitter<krux02> how do I get the first value of a set?
16:50:36FromGitter<krux02> I know I have a set with one element, how do I get it?
16:52:40mirankrux02: you still think we don't need `pop` for sets? ;)
16:53:16mirani did an ugly hack for that: `for n in mySet: let a = n; break` or something like that
16:53:41FromGitter<krux02> miran: pop is mutating the set
16:53:48FromGitter<krux02> I don't want to mutate a set
16:53:48dom96Hrm, that sounds like a wrong approach to using sets
16:53:53miranso is `incl`
16:54:15FromGitter<krux02> incl?
16:54:22*xet7 quit (Read error: Connection timed out)
16:54:27dom96You should be mainly testing if your set contains a certain value
16:54:29FromGitter<krux02> dom96: what is a wrong aproach to use sets
16:54:35miranoh, you just want to get the value, not remove it?
16:54:44miranmaybe something like `peek` in deques?
16:54:52FromGitter<krux02> no, I have a situation where I know my set contans one value
16:54:55FromGitter<krux02> and I want that value
16:55:04*xet7 joined #nim
16:55:40dom96https://en.wikipedia.org/wiki/Set_(abstract_data_type)
16:55:59FromGitter<krux02> I don't need a link that tells me what a set is
16:56:07FromGitter<krux02> I want that value that is in my set
16:56:27mirandom96: see the "additional operations" - we need (some of) these!
16:56:37FromGitter<krux02> I know what a set is, and that a set does not have an order
16:57:00FromGitter<krux02> so indexing does not really make that much sense.
16:57:07dom96krux02: what are you storing in your set?
16:57:18FromGitter<krux02> NimNodeKind
16:57:43Vantage_krux convert to array or seq then get the first element
16:58:31FromGitter<krux02> well I think really the best solution here is the iterators approach
16:58:45dom96So you want to get this NimNodeKind
16:58:49dom96Then what will you do with it?
16:58:55FromGitter<krux02> print it
16:58:57miranVantage_: you can iterate through set elements, no need to convert to seq/array
16:59:12FromGitter<Vindaar> The `items` iterator does the following: ⏎ ⏎ ```for h in 0..high(s.data): ⏎ if isFilled(s.data[h].hcode): yield s.data[h].key``` ⏎ ⏎ So I guess a s.data[0] should work? [https://gitter.im/nim-lang/Nim?at=5ad77960102fac7b7b26ee3e]
16:59:19dom96Why don't you just print the set?
16:59:21miranyou iterate and stop immediately after the first one
16:59:21FromGitter<krux02> I want a different message when the set is empty, when the set has one value and for evenything else
16:59:43dom96iterating through a set to do this sounds like a hack to me
16:59:58dom96Possibly a sign that you're using a set for something you're not supposed to be
16:59:58miranit is a hack!!
17:00:04FromGitter<krux02> dom96: yes but still the best solution
17:00:13miranno, i use it exactly for what it is
17:00:22dom96Maybe you should use a seq instead?
17:00:30FromGitter<krux02> dom96: nope, I am using a set for exactly what it is supposed to do
17:00:40*Sembei quit (Read error: Connection reset by peer)
17:01:00FromGitter<krux02> I special case on the empty set, but apart from that. Just a normal set
17:01:22FromGitter<krux02> dom96: nope I should not
17:01:25dom96what are you using it for?
17:01:31FromGitter<krux02> a set is what I want
17:01:43FromGitter<krux02> because I use the `in` test a lot on it
17:01:43*Sembei joined #nim
17:01:55FromGitter<krux02> it is just for printing where I want to have it look nice
17:02:41FromGitter<krux02> just be warned, I have to leave very very soon
17:03:48FromGitter<krux02> dom96: I have a special type MatchingError. and one member is expectedKind
17:03:52FromGitter<krux02> that member is a set
17:04:15FromGitter<krux02> most of the time that set is just a single element
17:04:31euantorRegarding Jenkins dom96 - probably because it’s Java
17:04:53FromGitter<krux02> and for that case I want to make the string representation nicer, so that it doesn't print the {} and has a sentence that fits a singular kind.
17:05:12euantorWe use it at work and it does what it needs to. There are probably better options, but we’ve looked at some such as JetBrains TeamCity
17:05:51dom96Okay, perhaps we do need a `pick` then
17:06:18FromGitter<krux02> and why call it pick?
17:06:22FromGitter<krux02> and nod `[]`?
17:06:59dom96*shrug*
17:07:02dom96that's what WP calls it
17:07:56miranyeah, we need both `pick` and `pop`!
17:07:59FromGitter<krux02> yea but we are not WP, and it is already bad enough that `card` is not called `len`
17:10:30FromGitter<krux02> well I have to go, I think I go with the iterator solution for now
17:35:58FromDiscord<claude> anyone know how to add source hyperlinks to documentation? i don't know what to do with `--docSeeSrcURl`
17:37:35Vantage_iterating sounds best
17:37:52Vantage_maybe make a proc getsinglevalue()
17:38:41shashlickplanning on automating test case creation also in tissue
17:40:51Vantage_claude http://docutils.sourceforge.net/docs/user/rst/quickref.html#internal-hyperlink-targets
17:42:04FromDiscord<claude> no i mean the `nim doc` switch that adds links to source automatically
17:49:24dom96claude: google can often help: https://github.com/nim-lang/Nim/issues/7150 :)
17:51:19Vantage_https://nim-lang.org/docs/docgen.html#related-options-see-source-switch
17:52:52FromDiscord<claude> yes i was stuck with the docgen guide thats why i asked
17:55:58FromDiscord<claude> and nothing im trying is working
17:56:28FromDiscord<claude> my command: `nim doc2 "--docSeeSrcUrl:https://github.com/<author>/<repo>/blob/`git log -n 1 --format=%H` " --project websocket` (yes i replaced the <author> and <repo>)
17:56:32*guibar joined #nim
17:56:51dom96All I can advise is to look at what `koch docs` does, it will be calling `nim doc2` with a --docSeeSrcUrl
17:58:24Vantage_claude wrong app
17:58:38Vantage_claude nimweb
17:58:45Vantage_inside tools
17:58:59Vantage_or nvm
18:01:37*guibar quit (Quit: Konversation terminated!)
18:01:49*Vantage_ quit (Quit: Page closed)
18:10:23*Vantage_ joined #nim
18:10:31*vantage quit (Quit: Yaaic - Yet another Android IRC client - http://www.yaaic.org)
18:10:55Vantage_is there a macro like python's f-string
18:10:57Vantage_in nim
18:11:24Demos[m]yep
18:11:25Demos[m]strfmt
18:11:30Demos[m]I think it's called
18:11:31FromGitter<alehander42> `&`
18:11:38Demos[m]it's a package on nimble
18:11:58Vantage_dank
18:11:59FromGitter<alehander42> yes , but strfmt is an older solution
18:12:04FromGitter<alehander42> please don't use it
18:12:11FromGitter<alehander42> now we have strformat module in the stdlib
18:12:14Vantage_so what use now
18:12:31FromGitter<alehander42> so you can use `fmt"my value {2 + 2}"`
18:12:39FromGitter<alehander42> or `&"my value {2 + 2}"`
18:12:46Vantage_why not the package maintainer mark his package obsolete?
18:12:52FromGitter<alehander42> (most of the time `&` and `fmt` are interchangable)
18:13:27FromGitter<alehander42> well, stdlib support is pretty new
18:13:44Demos[m]oh oops
18:13:47FromGitter<alehander42> the repo is last updated 5 months ago, so it was still useful then
18:14:51*SenasOzys quit (Ping timeout: 240 seconds)
18:26:41*SenasOzys joined #nim
18:27:11Vantage_thanks
18:29:14*SenasOzys_ joined #nim
18:29:53*SenasOzys quit (Read error: Connection reset by peer)
18:30:58*nsf quit (Quit: WeeChat 2.0.1)
18:33:54*krux02 joined #nim
18:36:02*Vantage_ quit (Quit: Page closed)
18:41:09*krux02 quit (Ping timeout: 264 seconds)
18:46:06*S1tiSchu quit (Read error: Connection reset by peer)
18:51:52*guibar joined #nim
18:52:41*guibar quit (Client Quit)
18:53:14*guibar joined #nim
18:54:33*guibar quit (Client Quit)
18:58:42FromGitter<krux02> dom96: I think it's rude to just escape user names without asking, and it is even more rude to declare an issue that mentions it as Low Priority, so please remove that Low Priority tag.
19:00:36*xet7 quit (Read error: Connection timed out)
19:01:25*xet7 joined #nim
19:06:16FromGitter<alehander42> @krux02 I added as an issue my PR suggestion
19:08:06*leru quit (Quit: Konversation terminated!)
19:09:29*PMunch joined #nim
19:10:43*Senketsu quit (Quit: Lost terminal)
19:11:45FromGitter<dandevelo> Is there any way to access private (non-exported) fields for a structure from another file?
19:12:42FromGitter<dandevelo> Reason behind this: I declare structures in a types.nim file but I implement methods on that structure in another file
19:27:09PMunchHmm, what was the case with static arguments to macros?
19:27:27PMunchI'm trying to parse one untyped argument and a sequence of strings
19:28:35PMunchAnd static[seq[string]] works fine if I call it with a sequence literal, but not if I try to call it from another macro where I generate the sequence
19:34:50Araqkrux02: on the positive side, this made me change my mind about escape
19:35:00AraqI now agree with you it should be deprecated.
19:36:43*couven92 joined #nim
19:36:46FromGitter<krux02> Araq: good to hear.
19:40:30*rokups quit (Quit: Connection closed for inactivity)
19:40:33FromGitter<GULPF> @Araq does that mean that I can do what I describe here? https://github.com/nim-lang/Nim/pull/7570#issuecomment-380918245
19:41:09*byte512 quit (Ping timeout: 264 seconds)
19:41:55*byte512 joined #nim
19:50:02*rauss quit (Read error: Connection reset by peer)
19:50:38*rauss joined #nim
19:50:46PMunchAny input on the static issue?
19:52:55FromDiscord<treeform> Wow my phone thing git merged
19:53:02FromDiscord<treeform> Php*
19:59:48*nsf joined #nim
20:07:32*rauss quit (Read error: Connection reset by peer)
20:08:08*rauss joined #nim
20:09:37*miran quit (Quit: Konversation terminated!)
20:15:48planetis[m]for the += operators to work with my container type, the get proc need to return var T, right?
20:18:05FromGitter<krux02> += should not be defined on a container type
20:18:48FromGitter<krux02> += could as well be elementwise `+=`
20:19:15*Vantage joined #nim
20:19:16planetis[m]I have a matrix
20:19:31FromGitter<krux02> just look at nim-glm
20:19:38FromGitter<krux02> I implemented that
20:19:44planetis[m]ok, and the m[0, 1] += 1 doesn't work
20:19:49FromGitter<krux02> first parameter of `+=` needs to be var
20:19:59planetis[m]ok thanks
20:20:20FromGitter<krux02> m[0,1] needs to return a `var T`
20:20:45FromGitter<krux02> and then on that `var T` you can call the `+=` operator that has `var T` as first argument
20:21:45planetis[m]so I need both a `[]` that returns T and one that returns var T
20:22:02FromGitter<krux02> yes
20:22:14FromGitter<krux02> one takes a var matrix as arugment and the other one just a matrix
20:22:53FromGitter<krux02> for nim glm I also implemented all swizzle operations
20:22:56FromDiscord<treeform> Wow my php thing got merged!
20:23:09planetis[m]great many thanks krux02!
20:23:12FromGitter<krux02> v.xzwy = v2.xxyy
20:23:35FromGitter<krux02> np
20:23:56planetis[m]is that graphics stuff?
20:24:33planetis[m]oh I am doing numerical computations
20:24:43planetis[m]and need eigenvectors
20:25:08planetis[m]neo is nice but it links with lapack
20:32:45*SenasOzys_ quit (Ping timeout: 264 seconds)
20:34:34FromDiscord<geckojsc> hey, I asked this the other day but I'm still not really sure
20:34:40FromDiscord<geckojsc> how would you translate typedef uintptr_t GPU_TextureHandle; to nim ?
20:35:21dom96krux02: rude? It's not a critical bug, the Nimble file generated is valid Nim code.
20:37:01PMunchgeckojsc, type uintptr_t = GPU_TextureHandle?
20:37:06FromGitter<krux02> dom96: How do you feel when in an automatically generated e-mail your name is written wrong?
20:38:48FromDiscord<geckojsc> well, I mean for the purposes of library bindings, something like type TextureHandle = <something>
20:39:06FromDiscord<geckojsc> I noticed the standard library does things like type cuint* {.importc: "unsigned int", nodecl.} = uint32
20:39:19FromDiscord<geckojsc> so it just guesses that cuint is the same as uint32?
20:39:23*xet7 quit (Read error: Connection timed out)
20:39:57FromDiscord<geckojsc> I'm not really sure what's going on, or how I can tell the language what a uintptr_t is in a cross-platform manner
20:40:03*xet7 joined #nim
20:40:04dom96krux02: I can't say. Can't recall that ever happening to me.
20:42:48AraqGULPF yeah
20:42:51FromGitter<krux02> dom96: You don't concider it a critical bug. But I think you wouldn't be very happy either when I call you Dominik Pi0x630x68eta
20:43:46FromGitter<krux02> And it would make you even more unhappy if that is the way your name gets inserted automatically everywhere.
20:43:53*SenasOzys_ joined #nim
20:43:59Araqkrux02: rude or not, you might as well use this time to fix it
20:44:14dom96Sorry, but there are far more critical issues in the Nimble repo
20:44:19Araqshouldn't take long to make a PR
20:44:28dom96Issues that actually break functionality
20:49:19*timotheecour joined #nim
20:49:49Araqhey timotheecour welcome
20:49:50*timotheecour quit (Client Quit)
20:49:57Araqoh well.
20:54:27VantageBTW why's it called nim?
20:54:46PMunchVantage, comes from Nimrod
20:55:02PMunchIt was actually called Nimrod up until 0.10 IIRC
20:55:05VantageI know that but why
20:55:12Vantagewhy why why
20:55:21Vantagedoes it mean dumb
20:55:26PMunchAh no
20:55:28VantageWhy the crown
20:55:30PMunchCommon misconception
20:55:35PMunchNimrod was a biblical king
20:55:43PMunchKnown for his skill in hunting
20:55:43Vantagenimrodius
20:56:10Vantagewhy not mention this in the manual?
20:56:24PMunchThe term "nimrod" meaning idiot actually comes from bugs bunny ironically calling the hunter for "Nimrod"
20:56:29VantageOr maybe I should just make a PR
20:56:46PMunchThis reference was lost on the young audience and everyone just assumed he was calling him an idiot
20:56:50Vantageoh. that actually makes sense now
20:56:52Vantagelol
20:56:54Vantagebaaad
20:57:05PMunchSo the crown is from king Nimrod
20:57:11Vantagesarcasmn
20:57:19AraqPMunch, never heard it explain so well before :-)
20:57:26Araq*it being explained
20:57:31Vantagethe greatest chasm of them all
20:57:51*Vladar quit (Quit: Leaving)
20:57:52VantageBugs Bunny was being sarcastic.
20:58:04Vantagewas that the first type I heard sarcasm
20:58:11PMunchNot sure where the honey badger comes from though
20:58:25PMunchHaha, thanks Araq :)
20:58:32Vantagehoney badger?
20:58:52Araqhoney badgers don't give a shit and eat snakes
20:59:02AraqPython = snake
20:59:15Vantageoh gawd
20:59:17Vantagenooo
20:59:24Araqlol
20:59:34Araqthe honey badger is not official, relax
20:59:59VantageI like it
21:00:21dom96I still think Lion makes more sense
21:00:53Vantagewhy?
21:01:00dom96Because a lion is the king of the jungle
21:01:13Vantagethanks for explaining btw PMunch
21:01:22dom96and the honey badger is Bitcoin's mascot
21:01:23PMunchVantage, no problem :)
21:02:36Vantageis there a "What happens when you call nim" section in the manual?
21:02:47PMunchVantage, behold the honey badger: https://github.com/nim-lang/assets/blob/master/Art/mascot.svg
21:02:50VantageLike what config files can I use
21:03:18PMunchHe really has that "don't give a shit and eat snakes" look to him :P
21:03:37PMunchVantage, this thing: https://nim-lang.org/docs/nimc.html ?
21:03:51VantageIf he was tearing into a snake then that'd be better
21:04:21PMunchOh well, I'm off to bed
21:04:28*PMunch quit (Quit: leaving)
21:08:30*girvo quit (Quit: Ping timeout (120 seconds))
21:08:56*girvo joined #nim
21:16:03shashlickis the honey badger on the website?
21:16:28*nsf quit (Quit: WeeChat 2.0.1)
21:20:38VantageIt would be nice to know which settings in nim compile are on by default and which aren't
21:27:54Araqthey are all on except --threads, experimental, ssl
21:35:14Vantageok :)
21:40:53*jrbrt joined #nim
21:42:23*rockcavera quit (Ping timeout: 256 seconds)
21:43:58shashlickwhen you pass an object to a proc, can you ensure a copy is made so that the proc can be spawn()'d?
21:44:04*jrbrt quit (Client Quit)
21:48:04shashlicklooks like it is done by default per the manual
21:48:42shashlickhttps://nim-lang.org/docs/manual.html#type-bound-operations-deepcopy
21:48:48*couven92 quit (Quit: Client Disconnecting)
21:48:51shashlickbut I don't understand the proc signature requirement
21:53:25*xet7 quit (Read error: Connection timed out)
21:53:54Araqyou don't have to do anything
21:53:55*xet7 joined #nim
21:54:04Araqonly if you want to override the =deepCopy behaviour
21:55:37*rockcavera joined #nim
21:58:05FromGitter<krux02> shashlick: when you pass stuff to other threads, it is copied. This is also required, because ref types are collected by the GC and the GC is thread local. Meaning ref objects are in a way owned by the thread.
21:59:29FromGitter<krux02> when you pass pointers to other threads, it does not deep copy. So when you want to prevent a deep copy (for some reason) convert the ref type to a ptr type
22:00:07FromGitter<krux02> but you should be aware that the ptr won't keep the object alive when the original therad doesn't have refs to that object anymore.
22:02:48Araqyou can use protect() dispose() on these casted pointers though
22:03:25Araqso that the GC that is responsible knows external threads keep it alive
22:08:59*themagician quit ()
22:14:43shashlickcool thanks guys
22:15:39FromGitter<krux02> did not know that. but doesnt that make the pointers essentially to shared pointers?
22:15:56FromGitter<krux02> wich synchronization
22:24:16Araqkrux02: it's still not a shared pointer
22:24:40Araqprotect() just marks the thing as a fake root so the GC won't collect it
22:24:50Araqdispose() disables it as a fake root
22:25:13Araqyou still need to watch out you don't convert it to 'ref'
22:29:40*xet7 quit (Read error: Connection timed out)
22:30:26*xet7 joined #nim
22:48:08FromGitter<zacharycarter> dom96: is the VPS docker-enabled? the new playground version I'm building uses dind but it needs to be passed the location of the docker daemon in order to work, so the VPS has to have docker available as well
22:48:25FromGitter<zacharycarter> if we can't make that work - I'm thinking about turning the compile procedure into a lambda job and hosting it on AWS
22:48:41FromGitter<zacharycarter> and then the process running on the VPS could just call it
22:48:47FromGitter<zacharycarter> but it'd be sweet if the VPS had docker support
22:49:04dom96zacharycarter: I don't see why it wouldn't
22:49:34*xet7 quit (Read error: Connection timed out)
22:49:55*xet7 joined #nim
22:49:55dom96Please don't overcomplicate it though. Docker within docker sounds like it will cause trouble.
22:50:19dom96also, are we sure that running arbitrary code in a docker container is secure?
22:50:33FromGitter<zacharycarter> well that's what the playground does today
22:50:42FromGitter<zacharycarter> or did until docker crapped out on the machine
22:51:02FromGitter<zacharycarter> I mean docker is nice because it containerizes your app and eases deployment
22:51:30*Vantage quit (Read error: Connection reset by peer)
22:51:37dom96When it craps out it doesn't exactly inspire confidence
22:51:44FromGitter<zacharycarter> I don't have to fuck with systemd - I can just ship a docker-compose.yaml that spins up my nim process along with an nginx instance that reverse proxies it
22:51:59FromGitter<zacharycarter> well I don't have any idea why it crapped out :/ I didn't exactly maintain the droplet all that well
22:52:14FromGitter<zacharycarter> all I had was a cron job to clean up the temp files that the nim process created for compiling each request
22:52:43FromGitter<zacharycarter> I don't mind hosting this on my own infrastructure - so that we don't have to worry about my stuff bringing down the VPS
22:52:58FromGitter<zacharycarter> but if that's the case - I'm going to do things with docker and ease deployment so I don't have to work with systemd etc
22:53:17FromGitter<zacharycarter> I just don't have the time / bandwidth to maintain and monitor this thing
22:53:27FromGitter<zacharycarter> well monitor it - I can maintain it / improve it
22:53:30FromGitter<zacharycarter> but I'm not a sysadmin
22:54:20dom96Once you set up systemd/nginx there isn't a lot to do
22:54:34dom96or am I missing something?
22:58:52FromGitter<Varriount> @zacharycarter I like systemd
22:59:09FromGitter<Varriount> Much better than init, anyway
22:59:23FromGitter<zacharycarter> I'm not trying to poo all over systemd
23:00:08FromGitter<zacharycarter> but no - there's more to the playground than that
23:00:31FromGitter<zacharycarter> the playground needs FS access and a tmp directory to store files in - I have not explored ephemeral FS yet
23:00:37FromGitter<zacharycarter> so that needs to be managed too
23:00:55FromGitter<zacharycarter> with docker - it's much easier, as the container FS is ephemeral already
23:01:18FromGitter<zacharycarter> not to mention, again, I can spin up all of this in a container with one command, and restrict network / FS access from the container to the host machine
23:01:42FromGitter<zacharycarter> which is why people have tried to write compiler bombs, etc... on the playground and never cause any real damage
23:02:19FromGitter<zacharycarter> they kill their own process and that's pretty much it
23:02:28dom96I'm not saying you shouldn't use docker at all
23:02:37dom96It's necessary for a sandbox
23:02:45FromGitter<zacharycarter> you can also harden docker, and I believe docker to already be pretty secure - https://docs.docker.com/engine/security/security/#conclusions
23:03:49dom96I just don't think you should bundle the actual backend in a docker container
23:04:21FromGitter<zacharycarter> why not?
23:04:37FromGitter<zacharycarter> again - I could just turn it into a FaaS
23:04:49FromGitter<zacharycarter> and then we don't have to worry about any of it
23:04:57dom96because it's a complex architecture
23:05:36FromGitter<zacharycarter> in what capacity?
23:06:23FromGitter<zacharycarter> like - I think docker is simplifying things
23:06:39FromGitter<zacharycarter> but I feel like you're viewing it as making things more complex - or maybe just less secure?
23:07:05FromGitter<zacharycarter> I can definitely just deliver a binary - but I feel like docker helps with testing on a local machine
23:07:10FromGitter<zacharycarter> docker helps with deployment
23:07:12dom96I'm just worried because you mentioned it crapping out. If you add another layer of docker into this then the odds of that happening again sounds even more likely
23:07:24FromGitter<zacharycarter> I think the odds will be less likely tbh
23:07:49FromGitter<zacharycarter> because the filesystem manipulation / etc that the process actually performs will be containerized
23:08:02dom96It's your project so it's your choice
23:08:08dom96I have no experience with docker
23:08:15FromGitter<zacharycarter> I think the only way it craps out - is if the docker daemon running on the host isn't responsive
23:08:35FromGitter<zacharycarter> well you have a wonderful world to explore IMO :)
23:08:42dom96definitely
23:08:50FromGitter<zacharycarter> docker is the tits
23:09:13FromGitter<zacharycarter> you install docker - and then never have to install any program on your machine again, without trying it out first
23:09:22FromGitter<zacharycarter> in a containerized environment
23:09:58FromGitter<zacharycarter> you can spin up a db, a web app, a backend service and a web proxy with one command and two yaml files
23:10:06FromGitter<zacharycarter> and again - it's all containerized
23:10:30FromGitter<zacharycarter> and then you can add something like - Nomad, or Kubernetes or Apache Mesos on top of all this
23:10:42FromGitter<zacharycarter> and then when your docker container running the nim playground goes down
23:10:48FromGitter<zacharycarter> it just spins up another
23:11:14FromGitter<zacharycarter> it can horizontally auto scale based on cluster metrics
23:11:14FromGitter<zacharycarter> etc
23:11:16dom96okay, well, at the minute the playground is down
23:11:23dom96So let's get it up again
23:11:30FromGitter<zacharycarter> yeah I know - that's why I'm working on this new version
23:11:35dom96People do depend on it now
23:11:35FromGitter<zacharycarter> because the old version was a PITA to maintain
23:11:53FromGitter<zacharycarter> and I can't readily fix the old playground without destroying the droplet
23:12:11FromGitter<zacharycarter> because I don't know how to get docker working on it again - I spent a few hours on Monday evening or whatever day it went down, trying to figure it out
23:12:41dom96so what's the hold up on the new version?
23:14:22FromGitter<zacharycarter> nothing atm - it's just I only got the host and child docker processes to communicate with each other the other night, so now I'm in the middle of moving the code over and getting everything working - I'm pretty sure I'm almost there, I'd say like 80%
23:14:45FromGitter<zacharycarter> but I wanted to check on the docker thing to make sure I wasn't going down a path I shouldn't be
23:14:51dom96okay, so you just need time.
23:14:59FromGitter<zacharycarter> yeah - def by the end of the week I'll be done
23:15:47FromGitter<zacharycarter> job's driving me insane right now AND I'm waiting to hear back from the game dev opportunity so I'm a bit frazzled but I'm nearing the finish line too
23:15:56*BitPuffin quit (Remote host closed the connection)
23:16:25FromGitter<zacharycarter> I also started another branch for the project and I'm looking into addressing some of the feature requests that our BDFL and others have made
23:17:38FromGitter<zacharycarter> I'd like to eventually arrive at something that looks more like - https://webassembly.studio/ - minus the project selection GUI - than what we have today
23:18:08FromGitter<zacharycarter> and I talked to the author of that project about adding Nim support and he told me what needed to be done, so that's on my todo list as well in the next couple of weeks
23:18:54FromGitter<zacharycarter> they're using the VSCode editor which I think makes sense for the playground too
23:20:03*wishi_ quit (Remote host closed the connection)
23:20:04*byte512 quit (Ping timeout: 246 seconds)
23:20:06dom96btw I reused your site a bit to make a web front end for my dissertation project, hope you don't mind :) https://picheta.me/obfuscator
23:20:17federico3dom96: docker is not necessary for sandboxing (on the contrary...)
23:20:59FromGitter<zacharycarter> not at all :)
23:21:20FromGitter<zacharycarter> isn't containerization different from sandboxing?
23:21:23*byte512 joined #nim
23:21:33federico3it is
23:22:16*wishi joined #nim
23:25:46dom96'night
23:29:43FromGitter<zacharycarter> I don't pretend to be an infrastructure person / sysadmin but as a software dev I feel like docker / other container solutions are a godsend
23:37:56*xet7 quit (Read error: Connection timed out)
23:38:24*xet7 joined #nim
23:50:58*user1101_ joined #nim
23:52:40*user1101_ quit (Client Quit)
23:53:01*user1101 quit (Ping timeout: 256 seconds)
23:54:20*user1101 joined #nim
23:56:25*user1101 quit (Read error: Connection reset by peer)
23:58:19*user1101 joined #nim