00:05:30 | * | dddddd quit (Ping timeout: 246 seconds) |
00:08:33 | * | dddddd joined #nim |
00:12:14 | * | krux02_ quit (Remote host closed the connection) |
00:14:04 | * | wildtrees quit (Quit: Leaving) |
00:31:01 | * | fov60 joined #nim |
00:31:41 | * | m712 quit (Quit: bye-nyan!) |
00:47:23 | * | ryukoposting quit (Quit: WeeChat 1.6) |
00:52:41 | fov60 | yo is there a way to import nil and as? |
00:53:21 | disruptek | import foo as bar except nil |
00:55:35 | disruptek | from foo as bar import nil |
00:56:05 | disruptek | can't say i'm sure what you're after, honestly. what are you trying to do? |
00:56:52 | fov60 | yeah that's what i was trying to do, but turns out I didn't even need it *smh* |
00:58:38 | disruptek | true; it's rarely needed. |
00:59:21 | disruptek | i wonder why my machine isn't slow due to this json fragment behavior. |
01:17:43 | FromGitter | <mratsim> json fragment? |
01:18:43 | disruptek | it's really due to a split on whitespace across a 360mb logfile, i guess. but each line is json that needs parsing. and for federico, it was super slow. but, fast for me. |
01:19:20 | disruptek | https://github.com/nim-lang/Nim/commit/2f10f5fac3c676daf34179e93ff5fdc26c98b72c |
01:34:14 | * | sealmove joined #nim |
01:49:10 | FromGitter | <gogolxdong> https://github.com/nim-lang-cn/db-analyzer/ the first project of Chinese nim-lang community |
01:51:25 | FromGitter | <gogolxdong> We aim to build a production level web server to beat Spring of Java and fasthttp of Go. |
01:54:29 | FromGitter | <gogolxdong> 3X than fasthttp ,4X than Netty ,20X than Spring |
02:00:11 | * | mal`` quit (Quit: Leaving) |
02:05:11 | * | mal`` joined #nim |
02:13:54 | sealmove | good luck :-) |
02:17:39 | * | mal`` quit (Ping timeout: 240 seconds) |
02:22:43 | FromGitter | <zacharycarter> +1 - netty is pretty fast |
02:23:12 | * | fov60 left #nim ("WeeChat 2.5") |
02:23:32 | FromGitter | <zacharycarter> @Varriount thanks bud <3 |
02:24:10 | * | mal`` joined #nim |
02:25:19 | * | dddddd quit (Remote host closed the connection) |
02:30:17 | * | btop joined #nim |
02:41:52 | * | shashlick joined #nim |
02:52:19 | sealmove | probably stupid question but does "owned" keyword make sense for seqs? |
03:06:01 | leorize | no |
03:11:38 | sealmove | by the way leorize, I have an issue with Nim... regarding namespaces. Say I have 3 types, then I have to make procs like getA, getB, getC. It would be nice to have something like A.get, B.get, C.get where A, B, C are not object but are typedesc. Is this possible? |
03:12:03 | leorize | totally |
03:12:14 | FromGitter | <zacharycarter> lmao - was checking out the Chinese Nim website and used google translate (at least I hope this is a google translation issue) |
03:12:28 | FromGitter | <zacharycarter> on the community page I saw this - `"Nim Development Concentration Camp" QQ group` |
03:12:47 | sealmove | help? :D what would a proc signature look like? |
03:13:10 | leorize | proc get(_: typedesc[A], <args here>) |
03:13:23 | sealmove | ah I see, this is great :) |
03:17:06 | sealmove | I am making a Nim backend for the Kaitai Struct compiler |
03:17:26 | sealmove | It's in Scala for which I have mixed feelings |
03:21:26 | sealmove | But anyway this is my first compiler project :), and it involved Nim! (even if it's just generating Nim code with Scala) |
03:22:49 | shashlick | what's the cheapest osx setup i can get to do some nim testing |
03:22:50 | leorize | g'luck :) |
03:23:20 | FromGitter | <mratsim> Travis CI? :P |
03:23:35 | shashlick | it never gives me complete logs |
03:23:42 | leorize | azure pipelines |
03:26:43 | leorize | here's a CI pipeline for Nim if you're interested: https://github.com/alaviss/Nim/blob/azure-pipelines/azure-pipelines.yml |
03:26:59 | * | chemist69_ joined #nim |
03:28:44 | * | laaron quit (Remote host closed the connection) |
03:29:43 | * | chemist69 quit (Ping timeout: 246 seconds) |
03:30:36 | * | laaron joined #nim |
03:34:34 | * | rockcavera quit (Read error: Connection reset by peer) |
03:34:54 | * | rockcavera joined #nim |
03:34:54 | * | rockcavera quit (Changing host) |
03:34:54 | * | rockcavera joined #nim |
03:38:53 | * | deansher quit (Read error: Connection reset by peer) |
03:38:55 | * | msmorgan quit (Ping timeout: 276 seconds) |
03:40:09 | * | deansher joined #nim |
03:41:59 | * | nuxdie quit (Read error: Connection reset by peer) |
03:44:36 | * | nuxdie joined #nim |
03:44:50 | * | deansher quit (Ping timeout: 276 seconds) |
03:45:32 | * | msmorgan joined #nim |
03:46:19 | * | deansher joined #nim |
03:47:39 | sealmove | if I pass an owned ref as a parameter, then the proc that received it becomes the new owner? |
03:47:52 | sealmove | (is this the old "sink"?) |
03:49:48 | leorize | it works like sink |
03:49:54 | leorize | still distinct from sink though |
03:50:18 | leorize | but yes, the proc that receive it will be the new owner |
03:57:30 | shashlick | Thanks @leorize - will try at some point |
03:57:49 | shashlick | for the near term, I need to figure out that | tee solution and upload to a paste service if build fails |
03:58:39 | leorize | well, put every single command in a shell script |
03:58:52 | leorize | ./script.sh 2>&1 | tee build.log |
03:59:06 | leorize | then use curl to upload it to ix.io if build fails |
04:00:29 | shashlick | tee can append to the log too right? |
04:00:40 | shashlick | anyway I just have a nimble test command that is failing so it's easy that way |
04:00:43 | leorize | yea, `tee -a` |
04:03:02 | * | cgfuh quit (Ping timeout: 276 seconds) |
04:26:30 | FromGitter | <gogolxdong> Is the Concentration translation the funny thing? |
04:27:33 | * | btop quit (Ping timeout: 245 seconds) |
04:27:45 | FromGitter | <zacharycarter> concentration camp is the funny thing |
04:28:13 | FromGitter | <zacharycarter> that's what labor / death camps were referred to as in the west during WWII |
04:28:33 | FromGitter | <zacharycarter> like Auschwitz = concentration camp |
04:29:02 | FromGitter | <zacharycarter> but I' |
04:36:24 | * | btop joined #nim |
04:52:15 | * | nsf joined #nim |
04:56:04 | * | rockcavera quit (Remote host closed the connection) |
04:58:13 | * | fjellfras joined #nim |
05:16:46 | * | narimiran joined #nim |
05:17:59 | * | juturnas quit (Remote host closed the connection) |
05:18:11 | * | fjellfras quit (Quit: Leaving) |
05:23:41 | * | absolutejam4 joined #nim |
05:38:48 | * | leorize quit (Ping timeout: 260 seconds) |
05:41:50 | FromGitter | <gogolxdong> yeah,I thought the translation wouldn't be the meaning I thought as you said.We will change if it is not proper. |
05:46:30 | FromGitter | <zacharycarter> what are you trying to say there? some type of Nim developer group? |
05:54:49 | * | laaron quit (Remote host closed the connection) |
05:54:56 | FromGitter | <gogolxdong> just a community name. |
05:57:23 | * | laaron joined #nim |
06:01:42 | FromGitter | <zacharycarter> `发展小组` might be better - google translate says in simplified Chinese this means 'Development Group' |
06:01:49 | FromGitter | <zacharycarter> but I'll let you tell me :) |
06:02:17 | FromGitter | <zacharycarter> or maybe `开发者小组` which google says = `Developer Group` |
06:02:59 | owl_000 | wnim gui for windows. latest release (today) significantly reduces compilation time. previously `wnim` includes almost all the modules. now user can import widget by widget. |
06:04:09 | Araq | owl_000: great news! |
06:05:21 | FromGitter | <gogolxdong> yes, 开发组 means Development Group |
06:06:30 | owl_000 | oviously, it is the most feature rich gui for nim. |
06:10:10 | * | solitudesf joined #nim |
06:11:16 | owl_000 | one curious question-> when i compile, the output shows `hint: someModule [processing]`, what is the compiler actually doing. |
06:12:55 | * | laaron quit (Remote host closed the connection) |
06:16:23 | * | laaron joined #nim |
06:20:04 | Araq | it compiles the module |
06:27:56 | * | m712 joined #nim |
06:32:11 | * | alexander92 joined #nim |
06:33:38 | * | absolutejam4 quit (Ping timeout: 240 seconds) |
06:36:23 | * | PMunch joined #nim |
06:55:19 | * | laaron quit (Remote host closed the connection) |
06:56:44 | * | PMunch quit (Remote host closed the connection) |
06:57:06 | * | m712 quit (Ping timeout: 246 seconds) |
06:57:33 | * | PMunch joined #nim |
06:58:36 | * | Kaivo quit (Read error: Connection reset by peer) |
06:58:42 | * | laaron joined #nim |
06:58:59 | * | m712 joined #nim |
06:59:36 | * | Kaivo joined #nim |
07:00:00 | * | gmpreussner quit (Quit: kthxbye) |
07:04:45 | * | gmpreussner joined #nim |
07:05:43 | * | ng0 joined #nim |
07:06:15 | * | krux02 joined #nim |
07:06:42 | * | btop quit (Ping timeout: 245 seconds) |
07:19:00 | * | sealmove quit (Quit: WeeChat 2.5) |
07:21:06 | * | absolutejam4 joined #nim |
07:22:52 | * | arecaceae quit (Remote host closed the connection) |
07:23:11 | * | arecaceae joined #nim |
07:27:20 | * | floppydh joined #nim |
07:33:45 | * | sealmove joined #nim |
07:34:43 | * | btop joined #nim |
07:39:27 | * | btop quit (Ping timeout: 246 seconds) |
07:57:21 | * | gangstacat joined #nim |
08:00:24 | sealmove | Still trying to wrap my head around Nim's structural typing. In C, if the field of a structure is a non-primative type, you have to refer to it with a point. In Nim you could either write `fieldName: A` or `fieldName: ref A` or maybe `fieldName: owned A`. I am having trouble understanding the differenc between `fieldName: A` and `fieldName: owned A`... Is it the same thing? |
08:01:23 | Araq | 'owned A' is WIP |
08:01:34 | PMunch | The difference between fieldName: A and fieldName: ref A has to do with how it is stored in memory and how it is passed around |
08:01:36 | Araq | and makes no sense without the 'ref' |
08:01:59 | PMunch | owned A is something that is used with `newruntime` |
08:02:16 | PMunch | Couldn't A be a type that is a ref in that case Araq? |
08:02:16 | Araq | neither C nor Nim have "structural" typing for objects, they use nominal typing |
08:02:36 | Araq | PMunch, sure but fromt the context I figured it doesn't |
08:03:14 | PMunch | sealmove, https://peterme.net/nim-types-originally-a-reddit-reply.html if you want a deeper explanation of ref vs. non-ref |
08:06:38 | sealmove | Thanks. If I would make the vast simplification: Use `fieldName: A` if data won't change much, use `fieldName: owned ref A` if data is going to move around, would that make somewhat sense? |
08:07:14 | * | absolutejam4 quit (Ping timeout: 240 seconds) |
08:07:27 | sealmove | (my bad, structural vs nominal is different from what I had in mind) |
08:07:28 | PMunch | `owned` should only be used when you are using `newruntime` |
08:07:57 | Araq | sealmove, you can't simplify it, it's the core of "systems programming" |
08:08:18 | PMunch | And it doesn't really have to do with how often you want to change something, more about how you want to change them |
08:08:20 | Araq | pointers vs values is essential |
08:09:03 | sealmove | PMunch, I am thinking of how to model structure of file formats. I think they are trees (for example png has fields which have fields). |
08:09:27 | * | btop joined #nim |
08:10:33 | sealmove | Java does it with nested classes |
08:11:42 | euantor | Araq: If you're around, regarding https://github.com/nim-lang/Nim/pull/12105 - is the plan to merge that and then look at https://github.com/nim-lang/Nim/pull/12137 ? The second one fixes a couple of the OpenBSD CI errors that are repeated for several tests (all the `pthread` errors and the `time_t` error) |
08:11:54 | sealmove | example: https://pastebin.com/iyZDGrSW |
08:12:11 | Araq | I registered at sourcehut and enabled github integration |
08:12:34 | Araq | but https://github.com/nim-lang/Nim/pull/12105 still lists "2 checks", not 3 |
08:12:41 | sealmove | owned refs kind of blur the line between pointers and values, no? |
08:12:58 | Araq | no, they do not |
08:13:05 | * | absolutejam4 joined #nim |
08:13:10 | euantor | Oh, that's weird |
08:13:12 | PMunch | sealmove, just forget about owned |
08:13:24 | euantor | Did you enable it for both PRs and commits? |
08:13:28 | PMunch | At least for now |
08:13:46 | Araq | euantor, I think I did, yes |
08:13:55 | PMunch | Did you read the article I linked you? I feel anything I would write here would mostly just be a repeat of that.. |
08:14:16 | * | btop quit (Ping timeout: 246 seconds) |
08:14:30 | Araq | sealmove, or actually, maybe they do that a bit |
08:15:08 | euantor | Might be worth dropping a message in #sr.ht if it stil ldoesn't work. The page should look similar to this: https://usercontent.irccloud-cdn.com/file/j3ie6k64/Capture.PNG |
08:15:35 | sealmove | PMunch, I will read for sure, seems very interesting article, thanks for posting |
08:16:00 | Araq | euantor, it does look like that |
08:16:38 | euantor | Hmmm. It should be working then. I've never tested the PR integration myself, perhaps it only works for new PRs or something? |
08:17:04 | euantor | I'll drop drew a message in the IRC channel and see if he can have a look |
08:17:59 | PMunch | sealmove, I wrote it originally as a reply to a Reddit question that was essentially the same thing you're asking about now :) |
08:18:16 | PMunch | You can click through from the article to Reddit to see the original question and the following discussion |
08:18:29 | * | actuallybatman quit (Ping timeout: 276 seconds) |
08:19:22 | euantor | Also, I assume there are two new WebHooks created on the repository in GitHub for `pull_request` and `push` pointing to `dispatch.sr.ht`? |
08:20:00 | euantor | https://www.irccloud.com/pastebin/QWILhCwH/ |
08:20:13 | euantor | That explains it. I'll push an empty commit and see if it triggers |
08:23:01 | * | ng0 quit (Quit: Alexa, when is the end of world?) |
08:23:24 | euantor | That seems to have done the trick: https://builds.sr.ht/~araq/job/88649 |
08:26:33 | * | gangstacat quit (Quit: Ĝis!) |
08:27:30 | sealmove | I still can't see how value-based semantics can lead to faster code. I suspect it has to do with compiler optimizations and will leave it to that (too advanced for me probably) |
08:28:04 | sealmove | The fact that it's safer I understand |
08:29:51 | * | gangstacat joined #nim |
08:34:17 | Araq | sealmove, hardware caches play a big role for this |
08:34:45 | Araq | plus it's easier to reason about, much easier. both for compilers as well as for human beings |
08:35:51 | sealmove | This make sense, it's also my intuition |
08:40:00 | * | absolutejam4 quit (Ping timeout: 246 seconds) |
08:44:50 | * | absolutejam4 joined #nim |
08:46:04 | * | Vladar joined #nim |
08:46:31 | PMunch | sealmove, essentially it "costs" the computer some time to follow a pointer, especially when it's not something that hasn't been used in a while since it's out of the cache. The stack memory around your call is more likely to be in cache. So value-based types can be faster simply because they are more often cached, and you don't have to follow a pointer to get to them. |
08:47:36 | PMunch | That being said if you want to pass a value-based object into a function it will have to be copied (I think Nim does some trickery here and actually passes it as a pointer to the previous stack frame, but I'm not entirely sure). |
08:47:37 | * | dddddd joined #nim |
08:47:52 | PMunch | But in general value-based objects will lead to more copying of memory, which might in turn be slower. |
08:47:59 | PMunch | But it's very dependent on workload |
08:51:48 | Araq | Nim uses pointers for parameter passing if benefitial |
08:52:51 | Araq | but copying can be an issue if you use too many value types and the values get bigger and bigger |
08:53:27 | PMunch | What is the maths on "beneficial"? |
08:53:39 | PMunch | Is it just anything bigger than a pointer? |
08:53:44 | Zevv | 3 * sizeof(float) |
08:53:49 | Zevv | or something funny like that |
08:54:18 | Araq | I remember changing it to 4 * sizeof(float) |
08:54:23 | Zevv | :) |
08:55:20 | Araq | we could make it a command line option so people can tinker with it and see if it makes a difference |
08:56:16 | PMunch | Hmm, why sizeof(float)? |
08:56:28 | PMunch | And having it as a switch could be interesting |
09:00:16 | euantor | OpenBSD CI is working, though the build is still failing as expected: https://builds.sr.ht/~araq/job/88649 :) |
09:00:55 | euantor | It doesn't send any emails on failure though, you have to add that to the job - I wasn't sure if that would be desired or not? |
09:01:26 | Araq | if I don't get an email, it doesn't exist |
09:01:48 | euantor | ok, what email do you want it sending to? |
09:02:21 | Araq | mine |
09:02:33 | euantor | If you don't want it exposed in the build file for some reason, it can be added as a build secret and then referenced |
09:02:56 | euantor | Docs: https://man.sr.ht/builds.sr.ht/triggers.md |
09:07:16 | Araq | euantor, any insights what it implies for our CI times? |
09:07:28 | Araq | how long does a build take? |
09:08:07 | euantor | It took 42 minutes for the last build |
09:08:31 | euantor | Travis and APpVeyor are stil lrunning |
09:08:38 | euantor | So it's faster than those at least |
09:09:20 | livcd | i just saw Araq fixed something for json |
09:12:45 | Araq | livcd, opinions are welcome |
09:13:00 | Araq | it does fix the performance problem by an API addition |
09:13:08 | Araq | and usually we don't do that :P |
09:13:28 | PMunch | Hmm, there are some weird issues on devel at the moment |
09:14:50 | PMunch | My jsonschema module get's complaints about ambiguous calls between the forward declaration and the body it outputs. And in SDL I get an error about "named param already provided": http://ix.io/1UND |
09:19:54 | Araq | PMunch, report it properly please |
09:24:11 | PMunch | Oh I thought these issues were known |
09:27:14 | livcd | Araq: but this is only in devel right ? |
09:28:54 | Araq | livcd, it's not even merged |
09:33:00 | PMunch | https://github.com/nim-lang/Nim/issues/12174 https://github.com/nim-lang/Nim/issues/12175 |
09:33:15 | PMunch | Not the best issues, but at least they are logged now |
09:33:23 | PMunch | I'll add more details if I get time to investigate further |
09:34:05 | PMunch | Is there a simple way to auto-bisect the Nim compiler? |
09:34:40 | PMunch | Essentially write a small test, then run git bisect with a script that rebuilds the compilers and uses the test as it's check |
09:35:19 | Araq | PMunch, dunno I don't bisect, I know all the changes and the cause for this regression |
09:36:25 | PMunch | Could possibly be useful for others that aren't as up to date on development to find what causes an issue |
09:37:02 | Araq | it's causes by the changes to compiler/sigmatch.nim |
09:39:32 | * | ng0 joined #nim |
09:44:22 | Araq | narimiran, https://github.com/nim-lang/Nim/issues/12170 how can 'yaml' be an important package and yet fail? |
09:48:42 | narimiran | 'yaml' tests are bad and don't catch stuff like that? |
09:49:20 | Araq | possible :-) |
09:55:33 | * | laaron quit (Remote host closed the connection) |
09:58:18 | * | laaron joined #nim |
10:11:29 | * | abm joined #nim |
10:21:52 | Araq | PMunch, how does this nimlsp setup work? |
10:21:57 | Araq | import "../../../Nim/nimsuggest/nimsuggest.nim" |
10:21:57 | Araq | import messageenums |
10:21:57 | Araq | import strutils |
10:21:57 | Araq | import compiler / ast |
10:22:01 | Araq | ^ ??? |
10:22:18 | Araq | ok, you used "./Nim" instead, but the same problem |
10:50:59 | FromGitter | <alehander42> gitter has threaded convos |
10:51:01 | FromGitter | <alehander42> now |
10:51:13 | FromGitter | <alehander42> i guess this totally wouldn't work with irc/etc |
10:52:38 | FromGitter | <kayabaNerve> Really? I don't see any GUI changes. |
10:52:49 | FromGitter | <alehander42> you https://next.gitter.im/ |
10:53:09 | FromGitter | <alehander42> just visit this and enable it from the swich |
10:53:20 | FromGitter | <alehander42> no idea if people who haven't enabled it see it |
10:53:32 | FromGitter | <alehander42> @kabayaNerve |
10:53:46 | FromGitter | <kayabaNerve> Thanks |
10:53:51 | FromGitter | <alehander42> ah ok |
10:54:07 | FromGitter | <kayabaNerve> Still some bugs, unfortunately :P Chat text is black and it doesn't enable a cursor when clicked. |
10:54:10 | FromGitter | <kayabaNerve> No, I enabled it. |
10:54:17 | Araq | still looking for feedback: https://github.com/nim-lang/Nim/pull/12165 |
10:54:23 | FromGitter | <alehander42> hm, for me a possible issue is that mentions |
10:54:24 | FromGitter | <alehander42> dont work |
10:54:29 | FromGitter | <alehander42> but not too important |
10:54:37 | FromGitter | <alehander42> more like, autocomplete for mentions |
10:55:00 | FromGitter | <kayabaNerve> Yep. Still in beta |
10:55:44 | FromGitter | <alehander42> hm, would tyhis work |
10:55:53 | FromGitter | <alehander42> for e.g. {},[],4,5 |
10:56:17 | * | oculux quit (Ping timeout: 245 seconds) |
10:56:34 | FromGitter | <alehander42> does parseJson finish when it can't consume a character, or only if it's whitespace? |
10:57:52 | Araq | it produces an error then |
10:58:25 | * | theelous3 joined #nim |
10:58:53 | * | oculux joined #nim |
11:00:42 | FromGitter | <alehander42> sounds logical |
11:16:49 | * | leorize joined #nim |
11:27:52 | * | ng0 quit (Ping timeout: 260 seconds) |
11:34:49 | * | theelous3 quit (Read error: Connection reset by peer) |
11:37:58 | livcd | Araq: i am going to try on my linux vm |
11:39:04 | * | couven92 joined #nim |
11:41:57 | * | ng0 joined #nim |
11:52:06 | Araq | livcd: and then what? |
11:58:44 | * | nif quit (Quit: ...) |
11:58:53 | * | nif joined #nim |
12:01:27 | PMunch | Araq, sorry I was off to lunch |
12:01:48 | * | nif quit (Client Quit) |
12:01:51 | PMunch | Did you figure out how it works? |
12:02:04 | * | nif joined #nim |
12:20:14 | Araq | PMunch: I'm quite sure you f*cked it up ;-) |
12:20:29 | PMunch | Haha, how so? |
12:20:35 | Araq | no offense implied, I fuck up too, all the time |
12:20:46 | PMunch | None taken, I fuck up plenty |
12:21:08 | Araq | well you use both the Nim compiler nimble package |
12:21:32 | Araq | have some custom stuff in nimlsppkg |
12:21:43 | Araq | and git submodules |
12:21:59 | Araq | and inconsistent import paths |
12:22:07 | Araq | ./Nim/ vs compiler/ast.nim |
12:23:03 | Araq | however the regression in jsonschema is my fault and I'm working on it |
12:23:51 | PMunch | Where do you see "compiler/ast.nim"? |
12:24:10 | PMunch | But yeah, the entire build system is a bit wonky |
12:28:03 | livcd | i thought you wanted some feedback :-) |
12:28:28 | Araq | livcd: about the solution, not how it runs on your machine |
12:28:39 | Araq | I know it's faster on your machine too |
12:28:45 | livcd | it's actually not |
12:28:55 | Araq | :D |
12:28:59 | Araq | in theory it's much faster |
12:29:04 | livcd | unless i fucked up |
12:29:11 | livcd | also not qualified to talk about the solution sorry |
12:29:27 | Araq | for x in parseJsonFragments(newFileStream("jomg.json")): |
12:29:27 | Araq | discard x |
12:29:37 | * | Araq renamed j to jomg.json |
12:29:45 | Araq | is the program to test |
12:29:57 | Araq | for me it's 3 times faster |
12:31:46 | livcd | ok fine i fucked up |
12:43:08 | disruptek | Araq: 2.0s -> 1.39s for me. |
12:48:50 | * | rockcavera joined #nim |
13:06:58 | Araq | disruptek: nice |
13:08:16 | Araq | Error: type mismatch: got <WrapsCancelParams, type WrapsCancelParams> |
13:08:17 | Araq | but expected one of: … |
13:08:39 | Araq | PMunch: ^ afaict the compiler is right and it shouldn't compile |
13:20:57 | PMunch | It has compiled fine since I wrote it without any issues.. |
13:22:08 | PMunch | Since like 0.19.0 or something like that |
13:22:59 | Araq | well see it for yourself, all candidates take a JsonNode as the first parameter and you don't give any |
13:23:28 | Araq | nim c src/jsonschema.nim |
13:25:10 | PMunch | Wait, where are you now |
13:26:30 | Araq | in your jsonschema |
13:26:56 | FromGitter | <alehander42> when you open your jsonschema and find araq inside |
13:28:20 | PMunch | Oh, that code haven't been run in a while |
13:28:29 | PMunch | The types have become distinct since then |
13:28:47 | PMunch | If you just do wcp.JsonNode.isValid instead it should work |
13:30:39 | Araq | well give me something easy to reproduce, nimlsp is too hard to setup |
13:31:07 | PMunch | Hmm, JsonSchema seems to work fine by itself.. |
13:31:21 | PMunch | So there has to be more to it that makes it fail.. |
13:31:33 | alexander92 | instantiation of something? |
13:32:49 | * | cgfuh joined #nim |
13:33:06 | PMunch | It's strange, but I have to look at it tomorrow. Have to leave early from work today |
13:33:08 | * | PMunch quit (Remote host closed the connection) |
13:48:04 | narimiran | anybody wants to add nim version to this benchmark? https://github.com/ixy-languages/ixy-languages |
13:48:36 | * | disruptek 🤣alehander42 |
13:50:10 | shashlick | @leorize - using tee now makes all tests pass for some reason, non-zero return code doesn't fail |
13:50:11 | * | nsf quit (Quit: WeeChat 2.5) |
13:50:37 | shashlick | https://travis-ci.org/nimterop/nimterop/jobs/583665049#L9564 |
13:51:08 | sealmove | Do you guys use "unittest" module (outside of Nim compiler project)? |
13:51:19 | disruptek | sealmove: i like it. |
13:51:27 | FromGitter | <kaushalmodi> sealmove: I like unittest too |
13:51:32 | shashlick | at least i get full logs now but a failure is successful |
13:53:00 | FromGitter | <kaushalmodi> If I remember correctly unittest does not use stderr |
13:57:54 | disruptek | "ixy.rs is not production-ready. Do not use it in critical environments. DMA may corrupt memory. |
13:58:13 | disruptek | uhhhh |
14:02:08 | FromGitter | <mratsim> rust is memory safe :p |
14:03:17 | disruptek | abstinence is safe. |
14:05:41 | Zevv | that's what she said |
14:08:38 | leorize | shashlick: that's weird |
14:08:58 | leorize | I think `tee`'s zero return value caused the prob |
14:09:12 | shashlick | meh, just my fault - i was usign set -e and travis couldn't capture all logs |
14:09:16 | shashlick | without it all problems are gone |
14:09:22 | leorize | couldn't you just read the travis log though? it seems to be quite adequete |
14:09:27 | shashlick | i could use set -o pipefail if i want to use tee |
14:09:37 | shashlick | travis logs were getting truncated due to set -e |
14:10:06 | leorize | https://api.travis-ci.org/v3/job/583665049/log.txt |
14:10:09 | leorize | seems full to me |
14:11:49 | shashlick | that one was full because i used tee and it returned 0 so build succeeded |
14:12:16 | shashlick | overall moral - don't use `set -e` with travis |
14:13:15 | leorize | I think they even advised against it :P |
14:15:49 | * | owl_000 quit (Ping timeout: 246 seconds) |
14:15:54 | shashlick | at least i can stop grumbling about travis now |
14:27:07 | * | btop joined #nim |
14:32:23 | * | btop quit (Ping timeout: 268 seconds) |
14:34:18 | * | owl_000 joined #nim |
14:37:53 | livcd | for me it's 5.05164909362793 vs 3.518282651901245 ./araq_fix |
14:48:58 | sealmove | Embarrassing question but when I run "nim c -r test tdefault_big_endian.nim" I get "Error: cannot open 'test.nim'". |
14:49:38 | sealmove | What am I missing? |
14:51:00 | disruptek | a slash between test and tdefault_big_endian.nim? |
14:52:49 | * | vegax87 quit (Ping timeout: 250 seconds) |
14:53:28 | * | drewr quit (Ping timeout: 264 seconds) |
14:55:48 | sealmove | but documentation shows "test" as an argument before the test file https://nim-lang.org/docs/unittest.html |
14:56:28 | * | fjellfras joined #nim |
14:57:30 | disruptek | in that example, test is a test.nim and the -r is running it with arguments "something" and "something else" which correspond to test names as declared `test "something": ...` and `test "something else": ...` in test.nim. |
14:58:07 | disruptek | i wish the compiler didn't add a .nim to try to find source. |
15:00:54 | shashlick | @disruptek - libevent wrapper - http://ix.io/1UP6/nim |
15:01:01 | sealmove | from the looks of it I would swear "test" is this example is not supposed to be a file (test.nim), but whatever |
15:01:07 | sealmove | in* |
15:01:18 | * | laaron quit (Quit: ZNC 1.7.1 - https://znc.in) |
15:01:21 | disruptek | i know, it's confusing for weak reasons. |
15:01:34 | disruptek | shashlick: sweet man, thank you! |
15:02:03 | shashlick | getHeader() is working pretty nicely - anyone has other good challenges for wrappers? not the C -> Nim portion but the part of getting the library built and ready for wrapping |
15:02:59 | shashlick | `nim c -d:eventGit -d:eventStatic event.nim` => will download and build library from git and then statically link to it |
15:03:18 | * | laaron joined #nim |
15:03:22 | disruptek | yeah, it's cool. |
15:03:25 | shashlick | put your -d: stuff in a .cfg file and `import event` and you are good to go |
15:04:48 | * | floppydh quit (Quit: WeeChat 2.5) |
15:07:04 | disruptek | you should really put that example on the main nimterop readme, no? |
15:09:06 | * | zyklon joined #nim |
15:11:08 | * | drewr joined #nim |
15:13:16 | * | uvegbot quit (Ping timeout: 264 seconds) |
15:14:15 | * | Tyresc joined #nim |
15:15:54 | * | laaron quit (Quit: ZNC 1.7.1 - https://znc.in) |
15:16:12 | * | laaron joined #nim |
15:18:53 | FromGitter | <awr1> @Araq i don't get why this is not a seperate test module |
15:19:02 | FromGitter | <awr1> https://github.com/nim-lang/Nim/blob/8c2e490a8cbf3de5a9d59b24ede7b9c01699caa3/lib/pure/json.nim#L1603 |
15:20:43 | alexander92 | sealmove, i use it too |
15:21:31 | alexander92 | you just compile and run tests |
15:21:45 | alexander92 | the example might be confusing, but you just nim c test.nim; ./test |
15:21:52 | alexander92 | (or use nim c -r test.nim) |
15:22:13 | alexander92 | (but i prefer to pre-build my tests..not sure if that is actually good) |
15:22:57 | * | absolutejam4 quit (Ping timeout: 268 seconds) |
15:23:06 | alexander92 | ah, i am not sure about the subtest cases filtering, i dont recall using it |
15:23:46 | sealmove | ok thanks :-) |
15:29:33 | FromGitter | <awr1> @zacharycarter that bit about the translation reminds of a screwup with a certain finnish dev studio |
15:30:10 | FromGitter | <awr1> for city skylines they had some kind of thing in the game where players could build universities and there was like some kind of research tree in the game |
15:30:40 | * | Hideki_ joined #nim |
15:31:09 | FromGitter | <awr1> and like the last research thing was intended to be like "the ultimate answer of reality" or something along the lines |
15:31:58 | FromGitter | <awr1> anyway after finnish to english translation it had become "the final solution" which of course was...concerning |
15:32:07 | FromGitter | <awr1> they promptly fixed it once they realized though |
15:37:16 | pbb | Hey, how can I parse an IEEE 754 float from an int? |
15:37:26 | pbb | In C I would just change the type |
15:39:43 | narimiran | pbb: can you show us some example of some input and desired output? |
15:40:14 | alexander92 | if it works in C, it should work in the same way for the nim c backend i guess? |
15:40:18 | alexander92 | (using cast ?) |
15:40:34 | FromGitter | <awr1> do not use cast if you're trying to truncate |
15:40:42 | FromGitter | <kaushalmodi> I curious to see what's special about IEEE 754 float |
15:40:51 | FromGitter | <kaushalmodi> yes, I wouldn't use cast as the first option |
15:41:01 | FromGitter | <kaushalmodi> usually `float(someIntVar)` works |
15:41:05 | FromGitter | <awr1> just use float() |
15:41:06 | FromGitter | <awr1> yeah |
15:41:15 | FromGitter | <awr1> `cast ()` is a bitwise cast |
15:41:51 | narimiran | yeah, the way the question was asked, i'm not sure if he wants `float(myInt)` or `cast[float](myInt)`, that's why i asked for a clarification |
15:42:17 | FromGitter | <awr1> i forget if C implicitly converts between the two |
15:44:26 | Araq | C does value conversions |
15:44:33 | Araq | float(myint) in Nim |
15:44:43 | Araq | C's cast sometimes doesn't cast :-) |
15:45:51 | alexander92 | ah |
15:46:18 | alexander92 | good |
15:46:40 | * | Hideki_ quit (Remote host closed the connection) |
15:46:48 | Araq | not really low level if you ask me, but whatever |
15:48:59 | alexander92 | maybe til |
15:49:49 | * | btop joined #nim |
15:50:00 | pbb | narimiran, alexander92: cast[float32](foo) worked fine |
15:54:15 | Araq | pbb, that's not what C does |
15:56:38 | pbb | Araq: what would be the nim equivalent to plain casting in C? |
15:57:04 | narimiran | pbb: once again, show us some example of what you're trying to achieve |
15:57:46 | narimiran | it is much easier to answer if we know exactly what you're trying to do (show input and output, don't use words for explanation) |
16:00:10 | * | rockcavera quit (Remote host closed the connection) |
16:00:22 | * | actuallybatman joined #nim |
16:01:35 | pbb | narimiran: https://termbin.com/811x5 |
16:01:41 | shashlick | @disruptek is still on a branch |
16:01:48 | shashlick | I'm closer to merging |
16:02:45 | shashlick | Check out the updated readme |
16:02:47 | pbb | narimiran: I have the int and I want the float. it should be the same in-memory representation. |
16:02:48 | shashlick | https://github.com/nimterop/nimterop/tree/v020 |
16:03:01 | narimiran | pbb: thanks. `cast[float32](myInt)` is really the way to go then |
16:03:16 | sealmove | suppose you have a type which has a field of ref to the same type (self-referencial type, a tree for example), and you have a proc that creates an object of this type and returns it. Is it possible to assign a pointer to itself for the self-referential field? |
16:03:17 | * | owl_000 quit (Quit: Leaving) |
16:03:19 | pbb | ok, as I said it seems to work |
16:03:23 | FromGitter | <zacharycarter> @awr1 lol |
16:04:12 | * | btop quit (Ping timeout: 245 seconds) |
16:05:05 | FromGitter | <awr1> @pbb: nim has no perfect "equivalent" to casting to C by design because the meaning of "cast' in C is ambiguous. |
16:05:07 | sealmove | for example if every node has a field called "root", then the actual root should have a pointer to itself |
16:05:27 | sealmove | how to do that? |
16:05:46 | FromGitter | <awr1> nim clarifies and destroys the ambiguity by saying that "casting" is a bit-a-bit copy into a new type |
16:06:14 | FromGitter | <awr1> and characterizes "conversion" as a transformation between two types that is not necessarily a bit-for-bit copy |
16:06:49 | pbb | awr1: is the in-memory representation of float32 in nim always the same? |
16:07:04 | pbb | awr1: or is it dependent on the platform so that I would want a conversion in some cases? |
16:07:45 | FromGitter | <awr1> `float32` is generally linked to `float` in C. there is a special `cfloat` type though to support the possibility of an edge case |
16:08:30 | FromGitter | <awr1> and, to my knowledge, `float` in C is specified to IEEE 754 |
16:08:54 | FromGitter | <awr1> just `float` (not `float32`!) in nim is slightly different |
16:09:30 | FromGitter | <awr1> b/c in 64-bit `float` is `float64` and in 32-bit `float` is `float32` |
16:10:46 | sealmove | https://pastebin.com/GSZDHB2g |
16:11:57 | FromGitter | <awr1> so in general, in-memory rep of float32 should be the same (so as long as the C spec is expected to behave), barring endianness concerns |
16:12:14 | FromGitter | <alehander42> sealmove, yes |
16:12:29 | FromGitter | <alehander42> it's not so pretty |
16:12:34 | FromGitter | <alehander42> but you just do it on two lines |
16:12:38 | FromGitter | <alehander42> result = Node(..) |
16:12:41 | FromGitter | <alehander42> result.root = result |
16:13:05 | sealmove | `result = Node(root: result, parent: nil)` ? |
16:13:17 | FromGitter | <alehander42> well, no, because result |
16:13:39 | FromGitter | <alehander42> is not still pointing to the new `Node()` |
16:13:45 | FromGitter | <alehander42> when you do `root: result` |
16:13:57 | sealmove | I see... |
16:14:00 | FromGitter | <alehander42> another option |
16:14:07 | FromGitter | <alehander42> is `new(result)` on the first line |
16:14:14 | FromGitter | <alehander42> and then just `Node(root: result, ..)` |
16:14:22 | FromGitter | <alehander42> on the second |
16:14:34 | FromGitter | <alehander42> wait, no |
16:14:51 | FromGitter | <alehander42> this is wrong, the first one is fine |
16:15:12 | FromGitter | <alehander42> the `result.root = result` thing |
16:15:34 | sealmove | result = new(Node); result.root = result? |
16:15:35 | * | couven92 quit (Remote host closed the connection) |
16:16:00 | FromGitter | <alehander42> no, result = Node(..other fields maybe?); result.root = result |
16:16:03 | * | couven92 joined #nim |
16:16:56 | sealmove | I see, thanks for help! |
16:17:11 | FromGitter | <alehander42> sorry for the confusion, np |
16:21:02 | * | Trustable joined #nim |
16:27:57 | * | Hideki_ joined #nim |
16:31:12 | FromGitter | <zacharycarter> ugh - the shadowmap example from bgfx is 3k lines long |
16:31:35 | FromGitter | <zacharycarter> need motivation to start haha |
16:31:47 | FromGitter | <zacharycarter> in other news, I found this today - https://github.com/exezin/exengine |
16:40:06 | * | couven92 quit (Read error: Connection reset by peer) |
16:43:21 | * | Hideki_ quit (Ping timeout: 246 seconds) |
16:46:16 | * | fjellfras quit (Quit: Leaving) |
16:52:45 | * | nsf joined #nim |
16:55:07 | * | rockcavera joined #nim |
16:57:31 | sealmove | zacherycarter: wow it looks nice |
16:58:26 | * | sealmove quit (Quit: WeeChat 2.5) |
17:05:08 | FromGitter | <awr1> the shadow mapping example i assume is CSM? |
17:05:36 | FromGitter | <zacharycarter> it has a few different implementations but directional light + csm is one of them |
17:05:39 | * | actuallybatman quit (Ping timeout: 240 seconds) |
17:05:52 | FromGitter | <zacharycarter> which is what I'd be using |
17:06:13 | FromGitter | <zacharycarter> I mean, truthfully, I wouldn't have to port 3k lines of code it's just digging through it and pulling out what I need |
17:06:28 | FromGitter | <zacharycarter> I probably will just wait till the weekend to do it |
17:07:12 | FromGitter | <zacharycarter> and then I'll need to refactor all of this into separate modules and start building a render pipeline |
17:07:13 | FromGitter | <awr1> i wish i had more time to work on my engine |
17:07:44 | FromGitter | <awr1> i've been busy with my last semester before i graduate and get my bachelors |
17:07:46 | FromGitter | <zacharycarter> I now wish I had written zengine with bgfx |
17:07:52 | FromGitter | <zacharycarter> instead of just OpenGL |
17:08:02 | FromGitter | <zacharycarter> it'd be worth resurrecting if I had |
17:08:20 | * | actuallybatman joined #nim |
17:08:22 | FromGitter | <zacharycarter> or maybe I should just bring it back anyway and replace all the opengl calls with bgfx calls |
17:08:28 | * | btop joined #nim |
17:09:54 | FromGitter | <zacharycarter> on the other hand, I probably already have most of what I was doing with zengine done, so I think I'll just continue down the path I am |
17:10:14 | FromGitter | <awr1> i've never used BGFX before |
17:10:38 | FromGitter | <awr1> i've looked a little at sokol_gfx though |
17:10:48 | FromGitter | <zacharycarter> sokol is nice |
17:11:27 | FromGitter | <zacharycarter> but the author is more focused on web than desktop |
17:11:42 | FromGitter | <zacharycarter> and I imagine the second version will focus on webgpu |
17:12:28 | FromGitter | <awr1> yeah i think i recall talking about it before with the author on twitter |
17:14:59 | * | blu joined #nim |
17:16:22 | blu | Does Nim's async support async operations that don't fit into the underlying IO system (epoll, uring, etc.)? Via a threadpool or some other means |
17:17:20 | * | actuallybatman quit (Ping timeout: 276 seconds) |
17:17:27 | * | Hideki_ joined #nim |
17:17:59 | * | btop quit (Ping timeout: 276 seconds) |
17:21:38 | * | Hideki_ quit (Ping timeout: 240 seconds) |
17:26:55 | FromGitter | <mratsim> import threadpool and use spawn/^ |
17:28:23 | * | shashlick quit (Ping timeout: 276 seconds) |
17:31:05 | dom96 | spawn with ^ will block |
17:31:38 | FromGitter | <mratsim> @awr1 I think Nimbus `float` is always `float64` |
17:31:39 | dom96 | you can do this as a workaround: https://github.com/dom96/nim-in-action-code/blob/master/Chapter3/ChatApp/src/client.nim#L40-L50 |
17:31:46 | FromGitter | <mratsim> Nim* |
17:32:04 | FromGitter | <awr1> :/ |
17:32:23 | FromGitter | <awr1> double precision is overrated tbh |
17:32:40 | dom96 | this needs to be done to get spawn in async https://github.com/nim-lang/Nim/pull/11724 |
17:32:50 | dom96 | blu, ^ |
17:33:08 | FromGitter | <mratsim> @pbb, casting int<->float works fine, tested here for a LUT table for fast exponentiation: https://github.com/numforge/laser/blob/master/laser/primitives/simd_math/exp_log_common.nim#L40-L43 |
17:33:09 | blu | dom96, thanks |
17:33:21 | blu | reading it over now |
17:34:56 | FromGitter | <kayabaNerve> Float operations that aren't a BigDecimal are pointless :P |
17:35:27 | FromGitter | <kayabaNerve> (in response to double precision is overrated; I fully understand the value of float and double, but in my work, I've always needed BigDecimal precision) |
17:35:38 | FromGitter | <awr1> i remember reading somewhere that NASA used single precision floats + fixed point on guidance computers in space and it sufficed for them |
17:35:48 | FromGitter | <kayabaNerve> I'd also hate using float when doubles are available. |
17:36:10 | FromGitter | <kayabaNerve> I mean, my float work means any float variances between any computer breaks everything. |
17:36:39 | FromGitter | <kayabaNerve> That said, I also don't use floats for that exact reason. I just use ints with a human readable repr of X decimals. |
17:36:40 | FromGitter | <mratsim> Apparently physics need float64, hence why Nvidia always sell consumer GPU with gimped float64 compute and Quadro with very high markup |
17:37:18 | FromGitter | <kayabaNerve> Anything with a fixed amount of decimals can be represented as an int. |
17:37:22 | FromGitter | <awr1> but maybe this is just b/c i come from game/GPU dev where basically nothing uses floats |
17:37:22 | FromGitter | <mratsim> for ML/Data science you need float32 for training the model and float16 for using the model |
17:37:27 | FromGitter | <awr1> save for delta time |
17:37:29 | FromGitter | <awr1> https://randomascii.wordpress.com/2012/02/13/dont-store-that-in-a-float/ |
17:37:33 | FromGitter | <awr1> *nothing use doubles |
17:38:06 | FromGitter | <mratsim> or you can use a mixed precision training with individual computation in float16 but accumulation across multiple computations in float32 |
17:42:33 | FromGitter | <awr1> fp16 has use in gamedev, i've seen it used for lighting purposes |
17:43:25 | FromGitter | <awr1> i have heard it once used for stuff like UV coords in vertex data but i dont think it's very common, as opposed to quantized unorm/snorm |
17:50:48 | Calinou | using doubles by default is a good idea, but floats should remain available for performance |
17:51:23 | * | Trustable quit (Remote host closed the connection) |
17:51:51 | FromGitter | <awr1> i have heard that it has lead to unnecessary performance issues in javascript |
17:51:55 | FromGitter | <awr1> who woulda thunk |
17:52:22 | FromGitter | <mratsim> in python they are fast because they are not boxed compared to integers :P |
17:55:46 | * | NimBot joined #nim |
18:04:43 | * | wildtrees joined #nim |
18:05:05 | FromGitter | <akavel> Hi! Is there a way to render Nim code from AST? In other words, to convert Nim AST "back" to Nim code? |
18:05:22 | disruptek | somenimnode.repr |
18:05:26 | * | wildtrees quit (Max SendQ exceeded) |
18:05:55 | FromGitter | <akavel> But this will dump the tree-like representation, no? |
18:06:01 | disruptek | nah. |
18:06:02 | * | wildtrees joined #nim |
18:06:16 | disruptek | you're thinking of treeRepr. |
18:06:34 | FromGitter | <akavel> ahhh, ok, awesome, I'll try it now... |
18:07:01 | FromGitter | <akavel> woohooo, yeah, thanks! :D :D <3 <3 <3 |
18:07:04 | FromGitter | <akavel> cool :D |
18:07:10 | disruptek | :-) |
18:07:26 | * | wildtrees quit (Max SendQ exceeded) |
18:08:11 | * | wildtrees joined #nim |
18:09:24 | * | wildtrees quit (Max SendQ exceeded) |
18:09:58 | oz | Hey, it looks like the Discord chat is out of sync with IRC and Gitter. |
18:10:00 | * | wildtrees joined #nim |
18:11:54 | * | wildtrees quit (Max SendQ exceeded) |
18:12:42 | * | wildtrees joined #nim |
18:14:18 | * | wildtrees quit (Max SendQ exceeded) |
18:14:47 | FromGitter | <zacharycarter> so is Godot nim dead? |
18:14:54 | * | wildtrees joined #nim |
18:15:15 | Calinou | looks like it, maybe endragor stopped working on their project |
18:16:06 | * | wildtrees quit (Max SendQ exceeded) |
18:16:16 | Araq | it's not dead, but somebody needs to fork it so that PRs can be applied |
18:16:20 | FromGitter | <zacharycarter> ah |
18:16:42 | Araq | we can add it to important_packages and ensure Nim doesn't break it |
18:16:44 | * | wildtrees joined #nim |
18:17:00 | FromGitter | <zacharycarter> meh |
18:17:05 | FromGitter | <zacharycarter> I was just curious |
18:18:04 | * | wildtrees quit (Max SendQ exceeded) |
18:18:41 | * | wildtrees joined #nim |
18:19:36 | * | wildtrees quit (Remote host closed the connection) |
18:21:35 | FromGitter | <mratsim> @akavel I use toStrLit |
18:35:52 | * | mal`` quit (Ping timeout: 245 seconds) |
18:40:54 | * | alexander92 quit (Ping timeout: 268 seconds) |
18:42:09 | * | sagax quit (Quit: Konversation terminated!) |
18:42:13 | * | laaron quit (Remote host closed the connection) |
18:42:26 | * | sagax joined #nim |
18:43:25 | * | mal`` joined #nim |
18:45:22 | * | laaron joined #nim |
18:47:46 | * | absolutejam4 joined #nim |
19:14:20 | * | Hideki_ joined #nim |
19:19:32 | * | Hideki_ quit (Ping timeout: 276 seconds) |
19:33:50 | * | laaron quit (Remote host closed the connection) |
19:35:45 | * | laaron joined #nim |
19:38:42 | * | actuallybatman joined #nim |
19:46:41 | Zevv | pff I hate this. I have this little macro helper proc that's clearly full of duplicated code, but still I can't get it any neater then this: http://ix.io/1UQH |
19:47:03 | Zevv | does anyone see the obvious thing I'm missing? |
19:47:44 | Zevv | it's not at all *important*, but it's just bugging me |
19:53:43 | FromGitter | <mratsim> foldIt? |
19:54:18 | Zevv | hmmm lemmesee |
20:00:57 | FromGitter | <brentp> what's wrong with this: ⏎ ⏎ ```type B* = distinct seq[uint64] ⏎ ⏎ proc `[]`*(x:B, i:SomeOrdinal): uint64 {.borrow.}``` ⏎ ⏎ ? [https://gitter.im/nim-lang/Nim?at=5d7952796e889c4bbddc8c0d] |
20:01:22 | FromGitter | <brentp> gives: ` Error: no symbol to borrow from found` |
20:02:01 | FromGitter | <brentp> `proc len*(x:B): int {.borrow.}` works as expected |
20:04:16 | FromGitter | <brentp> https://github.com/nim-lang/Nim/issues/3564 |
20:04:18 | Zevv | funny, you'd expect it to borrow from system.nim:1061 |
20:07:30 | FromGitter | <Varriount> Zevv: I guess `n.kind == nnkInfix and n[0].eqIdent("|")` could be turned into a proc/template? |
20:07:52 | FromGitter | <Varriount> But really, it's fairly good looking, for macro code |
20:08:08 | Zevv | "for macro code" :) |
20:08:15 | Zevv | different standards there of course, haha |
20:08:26 | FromGitter | <Varriount> And macro code usually looks like someone put a programming dictionary through a meat grinder. |
20:09:11 | FromGitter | <mratsim> @brentp borrow is broken with generics |
20:10:19 | FromGitter | <mratsim> https://github.com/nim-lang/Nim/issues/4121 |
20:10:48 | FromGitter | <brentp> yeah. seems so. |
20:10:50 | FromGitter | <mratsim> macro code is like dom manipulation at the beginning of JS |
20:11:02 | FromGitter | <Varriount> Zevv: Case in point: The Nim compiler |
20:11:19 | FromGitter | <mratsim> we avoid distinct and ranges in our codebase at this point |
20:11:25 | FromGitter | <Varriount> Or really any programming language compiler |
20:21:10 | * | nsf quit (Quit: WeeChat 2.5) |
20:27:36 | * | Hideki_ joined #nim |
20:32:31 | * | Hideki_ quit (Ping timeout: 268 seconds) |
20:37:31 | Araq | distinct and ranges are stable, *shrug* |
20:37:44 | Araq | .borrow is a bit weird but it was a bad idea to begin with |
20:40:36 | * | couven92 joined #nim |
20:42:47 | * | shashlick joined #nim |
20:43:20 | Cadey | i'm getting "Error: unhandled exception: passNimFlags is not accessible [FieldError]" in https://github.com/Xe/within-terraform/tree/master/dyson with docker build -t xena/dyson:0.1.0 . |
20:43:47 | * | narimiran quit (Ping timeout: 245 seconds) |
20:44:01 | Cadey | it gets that after failing to build the tempfile package |
20:44:30 | shashlick | Dang keep getting disconnected |
21:01:15 | Araq | Cadey: I dunno, but your exec "rm -rf " & folderName make me super nervous |
21:02:26 | Cadey | rmDir wasn't working the way i expected |
21:06:24 | Araq | it removes a directory plus its contents |
21:06:35 | Araq | just like 'rm -rf' |
21:06:58 | Cadey | i need to double check something, but it simply wasn't working |
21:06:59 | Cadey | sec |
21:07:54 | Cadey | now it works like i expect |
21:07:56 | Cadey | wtf |
21:08:11 | * | Vladar quit (Remote host closed the connection) |
21:11:57 | * | ng0 quit (Quit: Alexa, when is the end of world?) |
21:13:19 | disruptek | probably araq is crossing his fingers. |
21:13:34 | Cadey | thanks for catching that Araq |
21:13:52 | Araq | disruptek: what do you mean? |
21:14:51 | disruptek | i mean you have a habit of making things work via spooky action at a distance. |
21:16:16 | Araq | the machines feel my wrath |
21:17:00 | disruptek | could be. slow code seems to run faster on my box, so i have some experience with this. |
21:17:09 | Cadey | thanks for your magic Araq |
21:19:18 | Cadey | i need to figure out how to use nimscript embedded in a program |
21:21:55 | Cadey | nimscript in nimble is _so good_ |
21:23:08 | disruptek | why? |
21:24:29 | Cadey | it makes it simple to do basic building and deploying tasks in a way that's reasonably cross-platform |
21:28:04 | Cadey | for things like `npm install` or other errata |
21:28:34 | Cadey | not to mention things like the version and other metadata are _actual variables_ |
21:29:17 | Araq | :-) |
21:29:53 | Cadey | it's first-class too |
21:30:03 | Cadey | so it's _going to work_ without having to install extra stuff |
21:30:26 | * | btop joined #nim |
21:30:47 | Cadey | i kinda wish the package story for nimble was a bit more robust than "hope people's git repos don't go down" |
21:30:53 | Cadey | but that's a hard problem to solve in general |
21:32:40 | dom96 | all it takes is for someone to create a service that forks all repos periodically |
21:33:06 | dom96 | put it together with ipfs and you might not even need a server ;) |
21:36:52 | * | Hideki_ joined #nim |
21:38:26 | Araq | or: convince github that "delete repo" is an anti-feature |
21:41:41 | * | Hideki_ quit (Ping timeout: 265 seconds) |
21:46:50 | * | livcd quit (Remote host closed the connection) |
21:48:23 | * | solitudesf quit (Ping timeout: 276 seconds) |
21:49:39 | * | absolutejam4 quit (Ping timeout: 240 seconds) |
21:50:55 | * | absolutejam4 joined #nim |
21:52:17 | * | btop quit (Ping timeout: 276 seconds) |
21:59:46 | * | couven92 quit (Quit: Client Disconnecting) |
22:12:06 | * | absolutejam joined #nim |
22:14:03 | * | absolutejam4 quit (Ping timeout: 245 seconds) |
22:20:54 | FromGitter | <awr1> @mratsim fixing that issue is in fact a form of borrow checking |
22:20:56 | FromGitter | <awr1> :P |
22:21:14 | FromGitter | <mratsim> :D |
22:21:39 | shashlick | @Cadey - check out https://github.com/nim-lang/nimble/blob/master/src/nimblepkg/nimscriptwrapper.nim |
22:21:51 | FromGitter | <mratsim> @Araq they are stable but semcheck doesn’t like them |
22:22:16 | * | krux02 quit (Remote host closed the connection) |
22:22:26 | * | absolutejam1 joined #nim |
22:23:23 | FromGitter | <awr1> that reminds me i need to work on my nimscript RFC |
22:23:48 | shashlick | That's just calling `nim e`, if you prefer pulling the whole compiler in check out https://github.com/Serenitor/embeddedNimScript |
22:24:13 | FromGitter | <awr1> my RFC concerns that |
22:24:15 | * | absolutejam quit (Ping timeout: 246 seconds) |
22:24:18 | FromGitter | <awr1> i haven't finished it though |
22:24:55 | FromGitter | <awr1> i think the situation with embedding nimscript into anapplication could be a bit better |
22:28:48 | * | thomasross_ joined #nim |
22:28:48 | * | thomasross quit (Killed (niven.freenode.net (Nickname regained by services))) |
22:28:48 | * | thomasross_ is now known as thomasross |
22:36:22 | disruptek | sometimes, when building my code which hashes a simple enum for use as a table key, i get this error: Error: unhandled exception: /home/adavidoff/git/Nim/lib/pure/collections/hashcommon.nim(33, 9) `length > counter` [AssertionError] |
22:37:10 | disruptek | i will dig deeper tomorrow. :-/ |
22:40:37 | shashlick | @zacharycarter had done some work on embedded nimscript as well |
22:42:03 | FromGitter | <gogolxdong> How to generate a symbol in a proc to the top level of a module? |
22:46:33 | * | absolutejam1 quit (Ping timeout: 245 seconds) |
22:48:43 | * | solitudesf joined #nim |
22:53:13 | * | solitudesf quit (Ping timeout: 265 seconds) |
23:03:34 | FromGitter | <gogolxdong> generate a symbol and inject to the first level of the module |
23:06:40 | FromGitter | <gogolxdong> I'm trying to achieve this ⏎ ⏎ ```buildHtml tdiv:``` [https://gitter.im/nim-lang/Nim?at=5d797e0032e48c5df27bdbf1] |
23:08:03 | * | owl joined #nim |
23:08:43 | FromGitter | <gogolxdong> I'm trying to achieve this ⏎ ⏎ ```buildHtml tdiv: ⏎ input(value := localAreaName)``` ⏎ ⏎ := means declare a module level variable [https://gitter.im/nim-lang/Nim?at=5d797e7a460a6f5a1608d7ce] |
23:16:23 | * | fov60 joined #nim |
23:17:59 | fov60 | is there a way to get fields as a list? |
23:26:27 | * | abm quit (Quit: Leaving) |
23:33:39 | FromGitter | <ShieldHero> it looks like the discord bridge is down since sunday, did anybody notice? |
23:41:49 | FromGitter | <zetashift> godot-nim could be forked but what's wrong with making a separate branch for it? |
23:57:21 | * | Tyresc quit (Quit: WeeChat 2.5-dev) |
23:59:30 | FromGitter | <mratsim> @fov60, you can iterate on the fields but you can’t get them as a list in a runtime proc, in a macro yes |