<< 07-08-2019 >>

00:29:06*couven92 quit (Quit: Client Disconnecting)
00:41:22*theelous3 quit (Ping timeout: 246 seconds)
00:58:18*krux02_ quit (Remote host closed the connection)
01:02:44FromGitter<accidentalrebel> Good day. Is there an equivalent package like Python's request package https://pypi.org/project/requests/. I tried httpclient but could not send a post request to a ".cgi" file in a server.
01:02:59*NimBot joined #nim
01:03:22FromGitter<accidentalrebel> I know I could use "nimpy" to use the request package directly, but just want to know if there is a nim only alternative.
01:28:44*a__b__m quit (Quit: Leaving)
02:06:52*laaron quit (Remote host closed the connection)
02:11:01*laaron joined #nim
02:24:38*dddddd quit (Remote host closed the connection)
02:45:56*laaron quit (Remote host closed the connection)
02:48:08*laaron joined #nim
03:08:57*lritter quit (Ping timeout: 268 seconds)
03:09:11*lritter joined #nim
03:35:55*lritter quit (Quit: Leaving)
04:32:46*fjellfras joined #nim
04:36:35*nsf joined #nim
04:45:35*laaron quit (Quit: ZNC 1.7.1 - https://znc.in)
04:49:50*laaron joined #nim
05:05:06*laaron quit (Remote host closed the connection)
05:08:52*laaron joined #nim
05:26:58*solitudesf joined #nim
06:09:07*solitudesf quit (Ping timeout: 248 seconds)
06:19:35*laaron quit (Quit: ZNC 1.7.1 - https://znc.in)
06:20:31*laaron joined #nim
06:21:08FromGitter<mratsim> @accidentalrebel not my area of expertise but maybe search on nimble.repository
06:33:54*fjellfras quit (Ping timeout: 258 seconds)
06:39:21*fjellfras joined #nim
06:44:47*fjellfras quit (Ping timeout: 268 seconds)
06:59:35*krux02 joined #nim
06:59:35*krux02 quit (Read error: Connection reset by peer)
06:59:47*krux02 joined #nim
07:00:00*gmpreussner quit (Quit: kthxbye)
07:04:05*fjellfras joined #nim
07:04:36*gmpreussner joined #nim
07:15:39*fjellfras quit (Read error: Connection reset by peer)
07:15:41*fjellfras_ joined #nim
07:18:42*krux02 quit (Remote host closed the connection)
07:19:27*krux02 joined #nim
07:39:46*gokr joined #nim
08:16:37*laaron quit (Quit: ZNC 1.7.1 - https://znc.in)
08:17:39*laaron joined #nim
08:30:49shashlick@accidentalrebel - cgi shouldn't matter
08:30:59shashlickSimple example - https://github.com/genotrance/feud/blob/master/plugins/server/gist.nim#L109
08:33:56*endragor joined #nim
08:51:02*floppydh joined #nim
08:59:17*fjellfras_ quit (Remote host closed the connection)
08:59:43*fjellfras_ joined #nim
09:00:40*laaron quit (Quit: ZNC 1.7.1 - https://znc.in)
09:02:34*laaron joined #nim
09:07:26*laaron quit (Quit: ZNC 1.7.1 - https://znc.in)
09:11:27*Vladar joined #nim
09:15:07*laaron joined #nim
09:16:01*fredrik92 is now known as couven92
09:16:42*laaron quit (Client Quit)
09:18:20*fjellfras_ quit (Remote host closed the connection)
09:18:46*fjellfras_ joined #nim
09:19:31*laaron joined #nim
09:20:35*stefanos82 joined #nim
09:27:31*fjellfras_ quit (Ping timeout: 248 seconds)
09:32:43*dddddd joined #nim
09:39:51*fjellfras_ joined #nim
09:44:19*MarderIII joined #nim
10:18:44*fjellfras_ quit (Ping timeout: 272 seconds)
10:32:18*solitudesf joined #nim
10:34:11*MarderIII quit (Quit: Leaving)
10:56:21Araqping shashlick
11:01:22shashlickHey about to go on a road trip
11:07:22*ng0 joined #nim
11:14:54*batok joined #nim
11:15:34*krux02 quit (Remote host closed the connection)
11:15:44*krux02 joined #nim
11:16:31*krux02 quit (Remote host closed the connection)
11:16:42*krux02 joined #nim
11:16:46*krux02 quit (Remote host closed the connection)
11:19:20*krux02 joined #nim
11:30:29FromGitter<zetashift> have fun!
11:42:04Araqseriousy guys I need help
11:42:47Araqhttps://gist.github.com/Araq/247233557e62ba5b3ed5fe423b526b47
11:42:59Araqit fails quite determinstically
11:43:06Araqbut just 2 hours ago it worked
11:43:32Araqit would be *so* nice if Nimble wouldn't delete this file in TEMP
11:44:04Araqtransactions are overrated, let me have a look at what's going on!
11:45:20krux02hmm I can execute the nimble command
11:45:30*clyybber joined #nim
11:45:32krux02should I upgrade nimble? or nim?
11:46:20AraqI did 'koch nimble', so I'm using the official one
11:46:26Araqthat we ship with 0.20.2
11:48:22krux02Success: ormin installed successfully.
11:48:35krux02just did a frash build of nim and nimble
11:49:26Araqgit checkout araq-ic
11:49:29Araqand try the same please
11:52:01*Araq curses Nimble
11:53:02Araqdon't delete shit when stuff failed, TEMP does not mess your precious holy 'git status' ffs
11:53:27*theelous3 joined #nim
11:59:43Calinou@Kiloneie It seems like the godot-nim binding is no longer maintained, it won't work with Godot 3.1 or later: https://github.com/pragmagic/godot-nim/commits/master
12:00:03dom96Araq: pro tip: try using `nimble develop` and then you'll get the .nimble file
12:03:06disruptekyour problem is that you're using nimble. :-P
12:03:46FromGitter<zacharycarter> I wish Unity could support Nim as a language
12:04:53krux02zacharycarter: I think they supported Boo in the very beginning. Nobody cared. They dropped it. They learned their lesson: supporting unknown programming languages is a waste of money.
12:05:09FromGitter<zacharycarter> well - it doesn't need to be Nim specifically
12:05:19FromGitter<zacharycarter> they could just allow for native code in a shared library
12:05:23FromGitter<zacharycarter> and expose an API like Godot does
12:06:05FromGitter<zacharycarter> they already do this for plugins
12:06:14FromGitter<zacharycarter> but it'd be nice if they allowed it for game code as well
12:07:33CalinouWebAssembly?
12:07:51Calinouit's been proposed for Godot too, though you can already create a GDNative binding that will call a WebAssembly module using wasmer or similar
12:08:01Calinou(or any WebAssembly runtime, really)
12:08:13Calinoubasically a modern-day QVM :)
12:08:40FromGitter<zacharycarter> I'd be fine without WASM
12:09:15FromGitter<zacharycarter> I'd rather not have to target wasm via emscripten and go through all of that
12:12:03*abm joined #nim
12:12:42*Kaivo joined #nim
12:14:21FromGitter<zacharycarter> maybe the solution is just to resurrect urho3d bindings :P
12:14:35FromGitter<zacharycarter> not that that hasn't been suggested one billion times in here already
12:20:52krux02I don.t know urho3d and it doesn't look like a professional game engine to me.
12:21:22krux02I would rather try to focus on godot, as it really seems to have a bright future.
12:21:49Araqdom96, I suspect the download fails and cuts off the file, how would 'nimble develop' solve that?
12:22:02dom96Araq: it will clone to your CWD instead of temp
12:22:09dom96so you'll be able to inspect it
12:22:13FromGitter<arnetheduck> here's a nim program compiled to wasm that we produced yesterday - https://arnetheduck.github.io/state_sim/index.html - some fancy cryptography but no game stuff (no 3d etc).. long story short, nim GC isn't wasm/emscripten compatible
12:22:51Araqdom96, wow, 'nimble develop' fails with the same error o.O
12:22:55FromGitter<arnetheduck> other than that, it works surprisingly well
12:23:23FromGitter<arnetheduck> (as in, it's fast and gives the correct result)
12:23:41dom96Araq what does the .nimble file look like?
12:27:49Araqhttps://github.com/Araq/ormin/blob/master/ormin.nimble
12:28:34FromGitter<zacharycarter> I'm still waiting for some cool 3d game to be built with godot
12:28:49dom96Araq so it's a `nim e` issue?
12:31:41krux02Araq: sorry forgot to write. but even on your branch I can't reproduce your problem.
12:31:59*archuserau joined #nim
12:32:09archuserauHe,y Wht is this channel about?
12:33:08*laaron quit (Remote host closed the connection)
12:36:18*laaron joined #nim
12:37:31krux02archuserau, about a programming language called Nim
12:39:08archuserauTrue. I just got this channel from a website listing the best freenode channels.
12:39:49dom96ooh, that's cool. Can you link to that site?
12:40:20archuserauI have closed it now. Sorry.
12:40:36archuserauApparntly you guys are some of the friendliest on usenet.
12:41:42Araqer ... ok?
12:41:59archuserauSorry. On freenode.
12:42:02Araqlooks like we have no competition :D
12:42:10archuseraulol
12:42:16archuserauMy bad. Brainfart.
12:43:17Araqdom96, well probably it's my fault
12:43:29Araqbut it's tough to debug and that's what I'm complaining about
12:43:42dom96Araq I agree. Make an issue for this please
12:43:52dom96`nimble develop` is a fine workaround though
12:44:01AraqI mean, it only happens in a branch of mine, so surely it's my bug
12:44:12*vlad1777d joined #nim
12:45:25*vlad1777d quit (Remote host closed the connection)
12:47:16Araqdom96, 'nimble develop' crashes too
12:47:48dom96yes, but it doesn't hide the .nimble file from you...
12:48:01Araqthe .nimble file is fine, I didn't touch it
12:48:29Araqbtw since you're here
12:48:37Araqimble develop
12:48:37Araq Tip: 1 messages have been suppressed, use --verbose to show them.
12:48:48Araq^ 1 messages ?
12:49:00lqdev[m]is there a way of converting a nim-glm `Mat3f` to a `Mat3[float]`?
12:49:11dom96Araq are you complaining about the plural?
12:49:15Araqfirstly, it's "1 message", more importantly, don't hide the 1 message, it's as long as the hint
12:49:22*theelous3 quit (Ping timeout: 246 seconds)
12:49:33Araqnimble develop --verbose
12:49:34Araq Reading config file at C:\Users\rumpf\AppData\Roaming\nimble\nimble.ini
12:49:44*archuserau left #nim (#nim)
12:50:06Araq^ ok, config file reading, not helping me further
12:50:32lqdev[m]nevermind, `matrix.Mat3[:float]` seems to work
12:50:55*batok quit (Remote host closed the connection)
12:51:08lqdev[m]or not
12:51:38Araqkrux02, on my branch, recompile testament first
12:52:35dom96Araq sure, that sounds like an easy fix.
12:52:51dom96try --debug as well
12:52:57dom96it might print the `nim e` invokation
12:53:12Araqit doesn't
12:53:32*rockcavera quit (Read error: Connection reset by peer)
12:53:35Araqit did for 'install' and it looked like it passed a file that doesn't exist
12:53:42lqdev[m]I'm trying to do this: `tmouse = ctx.transform.Mat3[:float64] * vec3(mouse.xy, 0)` and I get the error `Error: type mismatch: got <Mat3f> but expected 'Mat3[system.float64]'`
12:53:49*rockcavera joined #nim
12:57:27*nif quit (Quit: ...)
12:57:36*nif joined #nim
12:58:26Araqok, master from nimble works
12:59:54lqdev[m]these kind of things happen when you need to interface with stuff made for C, I suppose
12:59:56FromGitter<zetashift> @Calinou https://github.com/pragmagic/godot-nim/pull/45 there is(well 2 actually) a PR to add 0.20 support, they can't merge it yet cause it breaks and the maintainer(s) need 0.18 compat for production use
13:00:19solitudesflqdev[m], if the layout is the same, cant you just cast it?
13:01:04lqdev[m]no, because Mat3f is `Mat3[float32]` and `Mat3[float]` is `Mat3[float64]` (on 64-bit systems)
13:01:18FromGitter<gogolxdong> @Araq https://nim-lang-cn.org/ is working in progressing, tutorial and manual as well.
13:01:43FromGitter<zetashift> everything you can do in GDScript(their scripting language) you can do in Nim but just a lil bit less smoothly
13:02:08Araqgogolxdong: if you could see my face now...
13:02:13*Araq is smiling
13:02:35FromGitter<gogolxdong> I can imagine that. :)
13:03:06Araqso yay, hours wasted with an outdated nimble we think is "stable"
13:03:17FromGitter<zetashift> I can't read/talk Chinese but that's awesome @liuxiaodong :D
13:03:32disrupteknothing works better than nimble.
13:03:44disruptekwhich is to say, nimble is worse than nothing. :-P
13:04:03Araqdisruptek, please be a little more constructive
13:04:21Araqfile bugs or give me the single biggest pain point so that we can improve it
13:04:42AraqI mean *your* single biggest point of pain.
13:04:57disrupteki don't have time to fix trivial bugs in nim, which i use; i can't be wasting hours of my life trying to fix software that i don't use.
13:05:07AraqI know my own problems with Nimble and I know its issue tracker.
13:05:15disruptekyou're right though; i haven't been constructive on nimble's issues.
13:05:34disrupteki gave up after i wrote some long comments about the state of nim tooling and was put in my place as a result.
13:07:43Araqpoint me to the comment or give a quick summary please
13:07:52FromGitter<gogolxdong> Thanks, there are many people who wants to do something for Nim in China from my point of view. More suprisingly, I was pulled into a QQ group which already has 130+ people who used or got interested in Nim. The website was built by one of them, we are working on translations.
13:08:11Araq"Nimble enforces package structure" <-- like so.
13:09:10*laaron quit (Remote host closed the connection)
13:09:37disrupteki wouldn't even want to waste your time with my thoughts.
13:11:03*laaron joined #nim
13:16:00*shomodj joined #nim
13:18:33Araqok
13:19:26disrupteki'm sorry to cast shade on nimble; it was disrespectful.
13:21:25*laaron quit (Quit: ZNC 1.7.1 - https://znc.in)
13:22:35*laaron joined #nim
13:22:36*laaron quit (Client Quit)
13:23:22*laaron joined #nim
13:26:51AraqI do "cast shade" on silly tools all the time but I usually give reasons for my rumblings
13:29:58disruptekfor me, the cure is worse than the disease and as it solves a problem i don't have and there doesn't seem to be any interest in solving problems i do have, i'm in a chicken and egg scenario. until i add the functionality i proposed, nimble is less asset and more liability, afaic.
13:30:55clyybberBut never actually telling what the concrete problems are isn't gonna help
13:31:17disrupteki have the same problems when i try to use it that you do.
13:31:53disruptekalso, i've written plenty on my particular need in an open issue about release tags.
13:32:34FromGitter<zacharycarter> https://min-lang.org/download/ uses https://github.com/h3rald/nifty
13:32:38disruptekbut, honestly, i would rather use a few lines of shell script to solve my need, since no one else seems to care.
13:32:53FromGitter<zacharycarter> but I don't really have much experience with either
13:33:33clyybberdisruptek: Yeah, often times git submodules do the job just fine.
13:33:49Araqdisruptek, ah I remember this discussion, ok
13:33:59Araqnow I know your stance
13:34:41disruptekit's nothing personal; i guess i was just teasing because, like you, i'm here hearing about these problems on a daily basis.
13:35:11disruptekbut, like you, i'm also here seeing the work shashlick et al put in. and it was wrong to suggest that those efforts are misplaced.
13:36:08Araqone day I'll patch Nimble and make .nimbleDir opt-in
13:36:23disrupteknifty looks interesting, thanks for the link.
13:37:10FromGitter<zacharycarter> np
13:37:27disrupteki'll try it and offer a real opinion.
13:41:47clyybberAraq: What is the join instruction for? Is it for joining branches made with fork? And if so, why does goto not suffice?
13:46:45Araqjoining doesn't 'goto' anywhere
13:47:03Araqif x: action fi <-- join is the 'fi'
13:48:23Araqyou fork the execution paths and later you have to join them again
13:48:38*nsf quit (Quit: WeeChat 2.4)
13:49:44disrupteknifty is basically a more restrictive version of shell script. i guess it's useful if you are using software to generate the project's config?
13:59:37*Tyresc joined #nim
14:04:42*laaron- joined #nim
14:05:11*laaron quit (Quit: ZNC 1.7.1 - https://znc.in)
14:06:00FromGitter<Vindaar> I played around with HCR again. Feels like walking through a minefield of bugs :P I should create some issues for this I guess, but it's hard to extract test cases that actually break every time. But if anyone is bored, I pushed the code here: https://github.com/vindaar/brokenrepl
14:08:08livcdhow will you cope with the new influx of chinese users :P
14:12:32*lritter joined #nim
14:14:17dom96disruptek: Araq: Can I get a link to that release tag issue?
14:15:27*endragor quit (Remote host closed the connection)
14:43:10clyybberAraq: Ah alright, thanks.
14:43:15*clyybber quit (Quit: WeeChat 2.5)
14:48:34*clyybber joined #nim
14:52:48*floppydh quit (Quit: WeeChat 2.5)
14:54:30*clyybber quit (Quit: WeeChat 2.5)
15:06:35*laaron- quit (Remote host closed the connection)
15:10:34*laaron joined #nim
15:15:13shashlickNimble has a long list of issues no doubt but drastic changes are not trivial since its been out for a long time
15:15:31shashlickNeed to improve without breaking everyone
15:16:13shashlickThe bigger thing is that package management is a hard problem in general
15:17:38*vlad1777d joined #nim
15:19:20shashlickAnd while I'd love to make changes, it does need a lot of work to understand, convince and implement
15:20:57Araqshashlick, I love your work on it and we're using it in testament, so let's improve it further
15:22:11shashlickAbsolutely
15:22:31*endragor joined #nim
15:22:57Araqmy biggest gripe with it is still by far the $nimbleDir setup
15:23:05FromGitter<zacharycarter> I know Nim doesn't have too many core developers - but is there a core dev working on the HCR stuff?
15:23:27Araqstuff is simple copied to some hidden directory and loses the .git dir
15:23:29FromGitter<zacharycarter> I also know the guy who implemented it originally did so for grant work, but are there other folks that know how it's implemented?
15:23:55leorizeI've zero idea how HCR worked
15:24:03leorizeand it's conflicting in weird ways on Haiku
15:24:19Araqzacharycarter: to the best of my knowledge nobody is currently working on it. I did review the code and know about 60% of it
15:24:37FromGitter<zacharycarter> gotcha
15:24:58Araqbut my priorities are IC and --newruntime (aside from the constant flow of bugfixes)
15:25:15FromGitter<zacharycarter> yeah - those trump it in importance I'd agree
15:25:25Araqand IMO HCR was too early, IC benefits every Nim user, not only game devs
15:25:52Araqthat said, I tinkered with it on my windows machine and I had no issues
15:26:06Araq(after I figured out how it works I reworked its documentation)
15:26:08FromGitter<zacharycarter> it does seem fine for trivial / toy examples
15:27:06*endragor quit (Ping timeout: 268 seconds)
15:27:16FromGitter<zacharycarter> but as soon as you start using more of the stdlib it seems to have issues - I encountered some related to accessing memory beyond the top of the stack
15:27:48FromGitter<zacharycarter> I was using the streams module and it seemed to have something to do with strings, but what exactly, I'm not sure
15:28:26shashlick@disruptek the issue you are talking about has no clear next steps. While there's a lot of discussing, there's no requirement yet.
15:28:31FromGitter<zacharycarter> I was just curious anyway - I think once someone does understand it fully and has time to commit to it, it will stabilize and become a wonderful feature
15:29:47shashlick@Araq - which issue is the nimbleDir one in issues?
15:31:38Araqzacharycarter: er, now that you said that, that might be easy
15:31:53Araqthe GC's botton/top of stack could be off
15:32:53shashlickKind of covered in your rfc but not exactly the same - https://github.com/nim-lang/nimble/issues/653
15:32:54Araqshashlick, https://github.com/nim-lang/nimble/issues/653 it's a bit outdated
15:33:09Araqsince then we also had an RFC about removing the notion of a "nimble dir" from the Nim compiler
15:34:18shashlickYes I saw that one as well
15:34:51FromGitter<zacharycarter> so - would you tweak that using `GC_step` and passing in a value for `stackSize`?
15:35:09shashlickI also read the lock file issue but that's still a big leap since I need to understand how other package managers do it before understanding how it should be done in nimble
15:35:22shashlickNimble is a full time job
15:35:25Araqzacharycarter: I doubt it, but something along these lines
15:35:41Araqshashlick, I'm still proud how my "nawabs" did lock files
15:35:51Araqand IMO it should be used for inspiration
15:35:55FromGitter<zacharycarter> gotcha - would be cool if that was all that was wrong, at least it would allow me to continue troubleshooting more HCR issues
15:36:10FromGitter<zacharycarter> or finding them rather
15:38:33Araqit's likely issue #1, most of the other stuff HCR does it pretty tame
15:38:51Araqas the codegen was quite prepared for it
15:39:41Araqbbl
15:41:45dom96Araq every time you say you have a problem with the $nimbleDir setup it's hard to understand which problem you are referring to
15:41:52dom96Do you simply hate that things are installed in
15:41:56dom96~/.nimble
15:42:15dom96or is it something more, I now see that it is based on your next messages
15:42:48dom96Also, you keep saying this is a problem, but we still don't have a solution as far as I know
15:43:14dom96shashlick afaik zah hired someone to work on lock files
15:43:39dom96but it would be nice if he confirmed it here or better yet by announcing it on the forums
15:44:03*vlad1777d quit (Ping timeout: 248 seconds)
15:48:07shashlickOk then I can take on a requirement if we can agree on a clear one
16:04:18*shomodj quit (Quit: My MacBook has gone to sleep. ZZZzzz…)
16:04:56disruptekmy monologues are in here: https://github.com/nim-lang/packages/issues/1051
16:06:30disrupteknow that i put hands to npeg, implementing a simple markup for tags, versions, or hashes seems even easier.
16:09:27Araqdom96, $nimbledir should be project-specific
16:10:10Araqand not in a hidden directory
16:10:45*nsf joined #nim
16:10:50Araqand nimble must not throw away the .git directory
16:11:29Araqand once you have this setup, lockfiles are easy, you simply track the working builds (= the commit hashes of all involved deps) in another git repo
16:12:07Araqand to "replay" a working build, you do 'git checkout $dependency $workinghash'
16:13:11Araqthere, solved. ok, so "lockfiles" don't work with the old $nimbledir setup, but it doesn't matter since the old setup lived without lockfiles for years anyway
16:13:27FromGitter<mratsim> I think this should be an option, some git history might be huge, i.e. opencv or sdl are obvious example.
16:13:58Araqthe SDL *nimble* package's history is not huge.
16:14:04disruptekit could be checked out to depth 1.
16:27:13shashlick@disruptek can you please comment on that issue? I'm asking for a clear requirement and even suggested one.
16:27:41disrupteksorry, what issue?
16:28:48ddddddtsoding is using nim on his wednesday twitch streams, starting today
16:30:30disruptekshashlick: wrt 1051, i'm not using nimble or nawabs anymore, so i don't have any new/relevant opinions beyond what i offered.
16:30:53krux02disruptek, what do you use instead?
16:30:59disruptekgit
16:31:00*seni joined #nim
16:31:35krux02interesting that nimble is completely obsolete by a tool that has nothing to do with nim.
16:31:41krux02at least for you
16:32:12disrupteki don't use choosenim, either.
16:32:15krux02do you use submodles, or subtrees, or do you just avoid all dependencies alltogether?
16:32:25krux02well I don't use choosenim either
16:32:29krux02I use git
16:32:54disrupteki don't have enough code for it to be an issue, and i've only recently started publishing libraries.
16:43:57*Trustable joined #nim
16:47:35*laaron quit (Quit: ZNC 1.7.1 - https://znc.in)
16:48:52*laaron joined #nim
16:49:11FromGitter<zacharycarter> with c2nim - how do you get it to bind to inline functions?
16:49:23FromGitter<zacharycarter> it is just implementing them with discard
16:49:29FromGitter<zacharycarter> but shouldn't it importc them?
16:50:18leorize[m]nim style insensitive identifiers are ridiculously easy to search if you have the right regex
16:50:37leorize[m]so probably we can make a regex generator that can generates regex for grep/perl/etc. and getaway with that criticism?
16:52:01FromGitter<zacharycarter> also - c2nim seems to be adding importcpp when I'm not running in cpp mode
16:52:02FromGitter<zacharycarter> ugh
16:52:15*fredrik92 joined #nim
16:53:50Araqleorize[m], we have --styleCheck:hint/error now and we always had 'nimgrep' with the -y option
16:54:42Araqand I will never use 'grep' again, so *shrug*
16:54:50Araqit's not a good tool anyway
16:56:46leorize[m]people are screaming that nimgrep is "yet another tool to learn"
16:57:12Araqwell nim is yet another language to learn
16:57:28Araqif you don't want to learn things, don't use new programming languages. simple.
16:58:56FromGitter<zacharycarter> does anyone know what nimtreesitter does?
16:59:07FromGitter<zacharycarter> I thought it was used for producing bindings? but I don't see how to use it to do so
16:59:37leorize[m]yea, ppl can't really run out of criticism
17:00:21FromGitter<SolitudeSF> nimtreesitter is binding for treesitter. nimterop is for procuding bindings.
17:01:05FromGitter<zacharycarter> ahh thanks
17:06:23FromGitter<zacharycarter> well nimterop isn't helping
17:08:12*zyklon joined #nim
17:08:15FromGitter<zacharycarter> ooo I think it may have worked
17:10:29FromGitter<mratsim> Does that deadlock for you with 16 as parameter ⏎ ⏎ ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=5d4b06047d56bc6080119306]
17:11:32*shomodj joined #nim
17:11:53FromGitter<zacharycarter> I guess? it certainly doesn't complete
17:11:57FromGitter<zacharycarter> and I see no output
17:12:40*uvegbot quit (Ping timeout: 264 seconds)
17:18:47*Trustable quit (Remote host closed the connection)
17:22:14FromGitter<Vindaar> same here. often even smaller numbers don't even work. ⏎ `threadpool` works fine for me only if I use it on procs that explicitly return `FlowVar` and I just split work of a for loop using `spawn`. ⏎ Works with @yglukhov's threadpool_simple though. Starting from 18 it crashes with a "cannot create thread [ResourceExhaustedError]" though
17:22:49Araqcan we please replace stdlib's threadpool with yuriy's?
17:25:19FromGitter<Vindaar> sounds fine to me
17:30:22Araqhttps://github.com/nim-lang/Nim/pull/11881 it's green! :D
17:38:48federico3whoa :D
17:40:10*scaryclam joined #nim
17:40:19*scaryclam left #nim (#nim)
17:45:58FromGitter<mratsim> I have a proof-of-concept parallel async/await for compute that is faster than OpenMP and Intel Threads Building Blocks. (and does not deadlock on Fibonacci). It's a port of the code for the paper from before your vacation.
18:00:04Araqok... where is it?
18:03:17*rockcavera quit (Read error: Connection reset by peer)
18:03:53shashlick@zacharycarter what's the issue?
18:03:59*rockcavera joined #nim
18:04:27*shomodj quit (Quit: My MacBook has gone to sleep. ZZZzzz…)
18:06:11shashlick@Araq I'll post an updated reply for your nimble RFC #653, I know it doesn't cover what was discussed in irc and some other details
18:06:50*couven92 quit (Disconnected by services)
18:06:55*fredrik92 is now known as couven92
18:07:07Araqsorry, but then why bother?
18:07:17*fredrik92 joined #nim
18:07:28shashlickIf we can get the requirement clear, I can start working on implementation
18:07:45shashlickWell, it basically mixed two issues
18:08:31shashlickOne is that nimble should not be so picky about content structure, retain git info, etc
18:08:46shashlickThe other was about packages being in the global namespace
18:09:04shashlickFixing the first issue shouldn't affect the second
18:09:33shashlickWe can get to the second later cause it didn't seem like a high priority
18:10:14*nsf quit (Quit: WeeChat 2.4)
18:11:51Araqassuming I understand you correctly, I agree
18:13:10shashlickOk then I'll clean up my reply to capture that detail
18:13:28shashlickI also have a minimal example for one version of that dll issue
18:16:35*laaron quit (Quit: ZNC 1.7.1 - https://znc.in)
18:17:20*laaron joined #nim
18:34:26FromGitter<zacharycarter> shashlick: well - atm I'm running into this error: C:\Users\carte\.choosenim\toolchains\nim-0.20.2\lib\core\macros.nim(1146, 27) Error: undeclared identifier: 'sexp_struct'
18:34:35rayman22201@Araq, the reason I didn't spend any time on porting Yuriy's threading library is because it seems like @mratsim has something much better in the works, and he has much more knowledge about this.
18:34:38FromGitter<zacharycarter> and that's defined in a header file that is included in the one I'm trying to `cImport`
18:39:28FromGitter<mratsim> @Araq it's here: https://github.com/mratsim/weave/blob/master/e04_channel_based_work_stealing/tests/spc.nim
18:40:06FromGitter<mratsim> @rayman22201 I actually don't know much, the best I know are my use cases
18:40:18FromGitter<mratsim> I'm still discovering
18:40:54FromGitter<mratsim> The version with futures is on my PC, will commit when I'm back
18:41:47rayman22201your use cases seem very widely applicable to me :-P
18:41:50FromGitter<mratsim> It's proof of concept because it's basically raw C translated to Nim so it would need a rework
18:41:59FromGitter<mratsim> Refactor*
18:42:27rayman22201I was only able to skim your research paper and code, but it looked very good.
18:42:55shashlickNeed more info @zacharycarter - what lib you wrapping
18:42:55FromGitter<mratsim> Including renaming to Flowvar and friends
18:43:49FromGitter<zacharycarter> shashlick: attempting to wrap - https://github.com/ashinn/chibi-scheme
18:43:57rayman22201Maybe it's still worth porting Yuriy's lib for v1.0, just to have something stable for the stdlib?
18:44:15Araqrayman22201, exactly
18:44:22rayman22201yeah. ok
18:44:25AraqencodeVInt(cast[int32](s.flags), result) # do you see the problem?
18:45:33Araqhint: TSymFlag* = enum # already 36 flags!
18:45:35*laaron quit (Quit: ZNC 1.7.1 - https://znc.in)
18:45:41Araqthese casts don't age well :P
18:46:36*laaron joined #nim
18:48:45shashlick@zacharycarter and can you share your wrapper code and os?
18:49:03FromGitter<zacharycarter> sure - it's not much though
18:50:07FromGitter<zacharycarter> https://gist.github.com/zacharycarter/ba60f6095082f9fe62ff5003b3aa7c46
18:50:09FromGitter<zacharycarter> windows 10
18:50:28*snifftek quit (Ping timeout: 245 seconds)
18:50:47FromGitter<mratsim> Note that GCC OpenMP is also broken on Fibonacci (but Clang's work)
18:54:07*kungtotte quit (Quit: WeeChat 2.5)
18:54:19*laaron quit (Remote host closed the connection)
18:54:55FromGitter<mratsim> It's broken because it uses a single task queue instead of one per thread. So it dies under contention. And some cores stay idle because they find no work or don't steal work as time advance
18:55:43*laaron joined #nim
18:56:48FromDiscord_<Shield> is there a macro or a template to make everything defined in a block public outside of the module? I didn't think typing a * would be a problem until I had to write it hundreds of times
18:58:21shashlick@zacharycarter - where is sexp defined?
18:58:36FromGitter<zacharycarter> I think in sexp.h in include
18:58:46FromGitter<zacharycarter> include/chibi
18:58:53Araqyou could do that with a macro, but it's a bad idea, better use a regex replace like 'proc\s+\w+' --> 'proc $1\*' with your editor
18:59:28FromGitter<zacharycarter> shaslick: don't worry about it please - I was just experimenting with trying to generate some bindings with nimterop
18:59:41FromGitter<zacharycarter> I think I have a solution anyway for what I am needing
19:00:18shashlickokay cool
19:01:16FromGitter<zacharycarter> thank you for your help though as usual :)
19:04:36shashlickno problem
19:05:50FromDiscord_<Shield> how would you do that for object fields?
19:08:58Araq\s+\w+: ?
19:09:09*snifftek joined #nim
19:09:50*kungtotte joined #nim
19:11:17shashlick@Araq - https://github.com/nim-lang/Nim/issues/11906
19:21:38Zevvdisruptek: shoe me
19:21:40Zevvshow
19:22:02disruptekwut
19:23:33Zevvyour markup thingy
19:25:01disruptekit's somewhere in https://github.com/nim-lang/packages/issues/1051
19:32:16shashlick@zacharycarter - what were your problems with using nimscript as an engine
19:32:49FromGitter<zacharycarter> basically reading from the registers and producing the tree structures the VM would understand
19:33:00FromGitter<zacharycarter> it required me to write a macro which I really didn't have time for
19:33:26FromGitter<zacharycarter> some scripting languages have built in facilities for this type of thing - wren which I'm playing with right now, makes it quite a bit easier
19:33:34shashlickdo you mean the pieces of nimLUA that interop your app's objects into the scripting language?
19:35:12FromGitter<zacharycarter> basically yes
19:35:15*rockcavera quit (Read error: Connection reset by peer)
19:35:26FromGitter<zacharycarter> nimLUA is kind of a bunch of macros that makes it stupid simple to do this with Lua
19:35:32FromGitter<zacharycarter> but you're also having to deal with Lua, which isn't idea
19:35:33*rockcavera joined #nim
19:35:34*rockcavera quit (Changing host)
19:35:34*rockcavera joined #nim
19:35:34FromGitter<zacharycarter> ideal*
19:37:03*vesper11 quit (Ping timeout: 258 seconds)
19:37:51FromGitter<zacharycarter> https://gist.github.com/zacharycarter/79e43187b327ef9debf715eb4cbe2092
19:37:59FromGitter<zacharycarter> here's an example of how to do this with Wren
19:40:48shashlickokay so do you have bandwidth to work on a libnim(script) package that imports the compiler package, sets up the VM and provides macros to interop with the main program
19:41:16shashlickthat way folks can simply do `nimble install libnimscript` and get a dll/so they can link against
19:41:31FromGitter<zacharycarter> not if I want to continue developing the game I'm working on
19:42:19FromGitter<zacharycarter> which I've already written a lot of code for
19:42:31FromGitter<zacharycarter> and I'm getting to the fun part of actually building a map editor
19:44:15shashlickbut you are okay using any other scripting lang for your game engine?
19:44:53shashlickreason i ask is cause i could do with this as well for my text editor but cannot stand the idea of using another language
19:44:57FromGitter<zacharycarter> as long as it gets the job done and there are convenience methods of storing data from C then I'm okay with it
19:45:18shashlickwhat's your main engine written in?
19:45:21FromGitter<zacharycarter> meh - it's just a scripting language, plenty of C apps use Lua / Scheme / other scripting langs for this type of thing
19:45:22FromGitter<zacharycarter> Nim
19:45:31FromGitter<zacharycarter> so I'm basically just embedding Wren in Nim
19:45:43FromGitter<zacharycarter> I mean hell - people probably use Python in Nim apps
19:45:54FromGitter<zacharycarter> I think using something like Lua / Wren / whatever is a much lesser evil
19:46:09shashlickwell, my thought is that nimscript still gives you macro powers
19:46:20shashlickother than ffi, you can do a lot of crazy things
19:46:44FromGitter<zacharycarter> I was playing around with lua this morning and was able to do -
19:47:23FromGitter<zacharycarter> (https://files.gitter.im/nim-lang/Nim/6X5k/lua.gif)
19:47:49FromGitter<zacharycarter> yeah - I mean that would be one plus of using Nimscript
19:48:07FromGitter<zacharycarter> spend some time working with the to / from PNode thing though and then let me know if you really want to write that macro :P
19:48:11FromGitter<zacharycarter> those macros rather
19:48:36FromGitter<zacharycarter> I could do the above with Nimscript too but I wouldn't be able to handle objects with a lot of fields without constructing a node hierarchy and parsing values from registers
19:48:48FromGitter<zacharycarter> so for objects that have like 20 fields
19:48:58*Jesin quit (Quit: Leaving)
19:49:20FromGitter<zacharycarter> maybe I'm not seeing the trees in the forest and there's an easier way
19:49:26disruptekclearly the problem domain is different, though, right?
19:49:31FromGitter<zacharycarter> but I know the nimLUA library makes it butt simple
19:49:45shashlickwhy cannot that code be leveraged
19:49:58FromGitter<zacharycarter> also currently embedding nimscript increases my compile times by quite a bit - which is understandable
19:50:05FromGitter<zacharycarter> the nimLUA code? because it's producing Lua
19:50:06disruptekbutt simple is harder than it sounds, for one thing.
19:50:32FromGitter<zacharycarter> well I'm sure he spent a lot of time writing the nimLUA library
19:50:39FromGitter<zacharycarter> but it's time he saved me - that's what's important to me :P
19:50:55shashlickthat's why i'm suggesting a libnimscript
19:51:10FromGitter<zacharycarter> I don't disagree that it would be a cool and good thing
19:51:21FromGitter<zacharycarter> it's just it's get something done or write a library
19:51:47FromGitter<zacharycarter> and I'm at this point a bit eager to get a game built
19:52:33*laaron quit (Quit: ZNC 1.7.1 - https://znc.in)
19:52:49shashlicksounds fair
19:53:03dom96if you're writing your engine in Nim then using nimscript should be trivial
19:53:08*laaron joined #nim
19:53:10dom96just import the compiler code
19:53:17FromGitter<zacharycarter> it's not using nimscript
19:53:20dom96there is no need for libnimscript
19:53:30FromGitter<zacharycarter> it's passing types between nimscript and nim
19:53:39FromGitter<zacharycarter> or objects of non primitive types
19:53:44shashlick@dom96 - importing compiler adds a lot to compile times
19:53:45FromGitter<zacharycarter> and having to write the get / setResult procs for them
19:54:14FromGitter<zacharycarter> like if I have a type defined that has a field holds another type that has 20 fields
19:54:25FromGitter<zacharycarter> constructing that PNode tree is not fun
19:54:55FromGitter<zacharycarter> nor is parsing the incoming values
19:54:57*Jesin joined #nim
19:55:08shashlickalso, importing compiler is not without issue, as we have seen with nimble
19:55:33FromDiscord_<Shield> anybody tried to use shared libraries for "scripting"? still figuring out how valve did it with the source engine
19:55:46shashlickideally, you can import compiler from the nim.exe that is running rather than a separate package
19:56:08FromGitter<zacharycarter> Shield: you can do this already with Nim but it's not without issues due to GC related stuff
19:56:17FromGitter<zacharycarter> but yeah - I mean it's basically just dlopen / close
19:56:55FromGitter<zacharycarter> hard to debug though
19:57:42shashlickbut you should be able to `koch libnim` and get a dll that can be dynamically linked against that can be posted for every nim release
19:58:20shashlickmain question is whether the stdlib can be embedded in the dll and accessed without having to write it out to the file system
19:58:37FromDiscord_<Shield> yeah, I remember hitting a hard wall with nimrtl
19:59:14FromDiscord_<Shield> so basically if you want to let people use nim for their mods everybody is forced to do manual memory management which kinda sucks
20:01:30FromGitter<zacharycarter> well - I guess until the new runtime is finished, that's the case - I'm not sure if that will help alleviate that issue
20:01:48FromGitter<zacharycarter> and I think if you really want to use it - you just have to ditch the stdlib right now
20:01:55FromGitter<zacharycarter> which yes, sucks
20:02:23FromGitter<zacharycarter> shashlick: isn't ^ going to present a problem
20:03:01FromGitter<zacharycarter> https://nim-lang.org/docs/nimc.html#dll-generation
20:03:51FromGitter<zacharycarter> I've never tried binding to a nim-produced DLL in a nim program before
20:04:11FromGitter<zacharycarter> but I imagine it'd have the same issues as dlopen / close with a nim produced dll has right now
20:04:54FromGitter<zacharycarter> I think the bigger issue than the shared lib thing, is the macros for moving objects of user defined types back and forth
20:05:32FromGitter<zacharycarter> yes - you take a compile time hit by embedding nimscript and an increased binary size I imagine, but you also aren't re-compiling your program that embeds nimscript that often when you add a scripting language
20:05:52FromGitter<zacharycarter> at least that's the whole idea behind adding a scripting language
20:06:08FromGitter<zacharycarter> if you are re-compiling a lot - just disable nimscript support and have some alternative runner code
20:09:54*huuskes quit (Quit: ZNC 1.7.2+deb3 - https://znc.in)
20:12:23shashlickthat's exactly the issue i'm facing with feud - multiple gc's, one from main exe and a variety from the dlls
20:12:23FromDiscord_<Shield> I'd like to avoid scripting languages, I also want to have multithreading, and that line about nimrtl and thread support makes things more depressing
20:12:24FromDiscord_<Shield> but seriously tho, if there is a way to do it while keeping simplicity, it'll be a blast
20:14:59shashlickunsure if libnimscript will have the same issue - in nimble, importing compiler probably meant it had a single gc
20:15:24shashlick@Shield - i've been pushing for the same
20:15:28shashlicki was able to manage with boehm
20:16:29FromDiscord_<Shield> I think I had a bit of success with gc regions, did you try that? I took a long pause so I've forgot most of the stuff I did
20:19:26shashlicki had boehm working fine for me in 0.19.6
20:19:34shashlickbut it broke in 0.20.x
20:19:39shashlicksee https://github.com/genotrance/feud
20:20:30shashlickmain exe with a bunch of dlls that get reloaded when source changes
20:20:38shashlickpredates hcr
20:20:43shashlicksee plugin.nim
20:24:30*clyybber joined #nim
20:27:14FromGitter<zacharycarter> well hopefully the stack top / bottom thing that was mentioned earlier is the problem with HCR and is relatively easy to solve
20:27:22FromGitter<zacharycarter> if that's the case we can all ditch our scripting languages :)
20:27:32FromGitter<zacharycarter> anyway - bedtime for me, will cya all tomorrow
20:29:14shashlickRpc too slow for games?
20:29:31FromGitter<zacharycarter> yeah
20:29:49*al_ joined #nim
20:31:00FromGitter<zacharycarter> well let me put it this way - it'd be a lot of work to implement and find out it's a bottleneck
20:31:16FromGitter<zacharycarter> IMO you'd be better off with an embedded scripting language - if you want such a thing
20:32:13FromGitter<zacharycarter> you could just write everything in Nim but then you need to recompile all code whenever a change is made - and recompiling when you're changing a single shader uniform value or something seems like it's avoidable
20:32:24*ng0 quit (Quit: Alexa, when is the end of world?)
20:33:58*clyybber quit (Quit: WeeChat 2.5)
20:34:24Cadeyjester route handlers are async right?
20:34:32CadeyIE: await works as i'd expect
20:35:07FromDiscord_<Shield> @shashlick interesting, did you figure out why it broke?
20:40:12*clyybber joined #nim
20:41:27shashlickI think I just got lucky in 0.19.6
20:41:40shashlickBut I'm waiting for Araq to help
20:41:52shashlickFrankly I ran into a variety of issues
20:42:07shashlickAnd I need to make minimal examples to help with debugging
20:43:01shashlickhttps://github.com/nim-lang/Nim/issues/11906 is the first
20:43:34Cadeyah yep cool
20:43:57shashlickOverall, using boehm isn't really a long term play since it's far from the tested config
20:44:12shashlickBut once you go away from boehm, the gc is in your face
20:46:13shashlickWell, let me refine that - boehm helped with sharing objects across threads
20:46:57shashlickBut I think using Nim dlls was just lucky, either that or boehm handled it in 0.19.6
20:48:17shashlickMy main exe and dlls have objects going back and forth and their contents get messed up randomly so I suspect it is the multiple gc's
20:49:28FromDiscord_<Shield> is there a way to make the exe expose gc functions to dlls so all the memory management happens within the exe itself?
20:50:05shashlickNot today at least
20:50:11shashlickThat's the idea with nimrtl
20:50:42shashlickBut again it isn't without issues because it isn't extensively used and tested
20:53:11*shomodj joined #nim
20:55:16FromDiscord_<Shield> instead of having the gc instance living in its own library, it can be in the main exe, the dll asks for the functions when it's initialized
20:56:16shashlickWhat's the difference
20:57:32*solitudesf quit (Ping timeout: 245 seconds)
21:10:50FromDiscord_<Shield> I thought it'll be cleaner
21:11:48FromDiscord_<Shield> markAndSweep in the issue you posted
21:14:12*Vladar quit (Remote host closed the connection)
21:14:50*vesper11 joined #nim
21:15:28*go|dfish quit (Ping timeout: 245 seconds)
21:17:02*go|dfish joined #nim
21:27:42*al_ quit (Quit: al_)
21:29:47*arecaceae quit (Remote host closed the connection)
21:30:36*arecaceae joined #nim
21:37:24*huuskes joined #nim
21:38:23*clyybber quit (Quit: WeeChat 2.5)
21:50:18*huuskes left #nim ("Konversation terminated!")
21:51:09shashlickWhat about markAndSweep?
22:10:14*gokr_ joined #nim
22:14:24*gokr quit (Ping timeout: 272 seconds)
22:17:38*deech joined #nim
22:18:50deechTook a while so I'd love a review on https://github.com/nim-lang/Nim/pull/11341.
22:19:27FromDiscord_<treeform> @Shield you want to use a scripting language for games? I will leave you with this: https://www.youtube.com/watch?v=y2Wmz15aXk0
22:25:42*laaron quit (Remote host closed the connection)
22:25:43*laaron- joined #nim
22:29:18FromDiscord_<Shield> @treeform no actually, I want to use shared libraries for plugins, because I hate all the stuff related to scripting languages, which are mentioned in the video
22:31:22FromDiscord_<Shield> if I ever wanted to use a scripting language it'll be for sandboxing, because there's no way to deal with unsafe code in shared libraries
22:36:24FromDiscord_<treeform> ok
22:37:12FromDiscord_<Shield> do you have a solution?
22:41:02*Jesin quit (Quit: Leaving)
22:42:29FromDiscord_<treeform> I think it's very hard to include some one else's code in your game.
22:43:08*Jesin joined #nim
22:45:21FromDiscord_<treeform> I did make a simple AI rule system that my players had fun with though:
22:45:21FromDiscord_<treeform> https://youtu.be/0PvFIOLdhPk?t=175
22:45:51*laaron joined #nim
22:46:27FromDiscord_<Shield> the source engine did it for a long time, and I believe other engines used shared libraries too, but sadly I couldn't find how they structured their code
22:46:48Araq# a compile time let/var param should not match an argument
22:46:48Araq # in a runtime proc unless that argument is static or we are
22:46:48Araq # currently in a static block
22:46:53Araq^ deech
22:46:55Araqwhy?
22:49:40*laaron- quit (Ping timeout: 260 seconds)
22:52:55*laaron quit (Remote host closed the connection)
22:54:59*shomodj quit (Quit: My MacBook has gone to sleep. ZZZzzz…)
22:57:39*gokr_ quit (Ping timeout: 248 seconds)
23:00:17*laaron joined #nim
23:07:45deechAraq, because one of the things this PR is trying to do is to draw a sharp distinction between compile time and run time evaluation where const is the only mechanism available to mediate between the two.
23:08:39deechAraq, the lack of such a distinction is causing a number of bugs.
23:13:34Araqspecial rules in overload resolution cause more bugs
23:14:07Araqand the distinction might be sophistry, consider this:
23:14:26Araqvar tab {.compileTime.}: ... # ok, macro can fill it
23:14:51AraquseAtRuntime(tab[i]) # ok, used at runtime so let the codegen emit it
23:16:04Araqfewer rules, fewer bugs and it works like many expect it to work
23:20:17*krux02_ joined #nim
23:22:46*stefanos82 quit (Quit: Quitting for now...)
23:23:55*krux02 quit (Ping timeout: 246 seconds)
23:27:53deechPreviously the lack of distinction was causing bugs like https://github.com/nim-lang/Nim/issues/9970.
23:29:36*couven92 quit (Quit: Client Disconnecting)
23:33:38*seni_ joined #nim
23:36:02*seni quit (Ping timeout: 244 seconds)
23:39:57FromGitter<zetashift> @treeform I don't really agree with that video about scripting languages. He says they're a disaster and an absolute no-go, which I think isn't fair and they do have their place
23:40:39FromGitter<zetashift> He looks at it in a very programmer-centric way, which isn't always the case in teams, but then again he shipped games and I didn't so what do I know
23:47:12*Tyresc quit (Quit: WeeChat 2.5-dev)
23:53:34FromDiscord_<Shield> he's also writing a compiled language, the game he's making currently has a console, I wonder if that's a simple command interpreter or actually a scripting language
23:58:45FromGitter<zetashift> There are so many langs being developed right now ;p