00:10:32 | FromDiscord | <Nilts> In karax, how would I link a number input to a variable? So changing the input will change the var |
00:17:38 | FromDiscord | <Nilts> Json in nim js is a pain, how would i make it easier? |
00:21:11 | * | azimut quit (Ping timeout: 255 seconds) |
00:54:18 | * | azimut joined #nim |
01:04:08 | FromDiscord | <auxym> jsony? |
01:08:16 | FromDiscord | <Nilts> In reply to @auxym "jsony?": it supports nim js? |
01:09:32 | FromDiscord | <Elegantbeef> What's your issue with Json in Nim's js backend? |
01:09:42 | FromDiscord | <auxym> I missed that part but... I think? |
01:11:33 | FromDiscord | <AlexandrosKap> sent a code paste, see https://play.nim-lang.org/#ix=4nBf |
01:15:17 | FromDiscord | <Elegantbeef> Automate which part? |
01:18:05 | FromDiscord | <AlexandrosKap> The part that creates the object with every field having the value of the onEase function |
01:19:49 | FromDiscord | <Elegantbeef> sent a code paste, see https://play.nim-lang.org/#ix=4nBi |
01:19:57 | FromDiscord | <Elegantbeef> then you can just do `ease(position)` |
01:20:18 | FromDiscord | <Elegantbeef> To do more one could use a macro |
01:22:07 | FromDiscord | <Elegantbeef> For instance |
01:22:10 | FromDiscord | <Elegantbeef> sent a code paste, see https://play.nim-lang.org/#ix=4nBj |
01:24:00 | FromDiscord | <AlexandrosKap> I dont know how macros work but this might be helpful đ Thanks! |
01:24:28 | FromDiscord | <Elegantbeef> Macros take in code as data they can then use that code to generate code |
01:25:06 | FromDiscord | <Elegantbeef> So what we're doing here is passing in `result.position` for instance extracting `position` then emitting `onEase(result.position, a.position, b.position, time)` |
01:25:33 | FromDiscord | <Elegantbeef> The nice thing is you can technically make that generic just a `V: object` and it'll work on all objects |
01:30:02 | FromDiscord | <AlexandrosKap> In reply to @Elegantbeef "The nice thing is": Didnt know that. Nice because [T: SomeNumber, V: GRect2[T]] is hard to read |
01:30:30 | FromDiscord | <Elegantbeef> This does mean you get a ominous error if it fails |
01:30:38 | FromDiscord | <Nilts> In reply to @Elegantbeef "What's your issue with": All the results are of type JsObject, and i have to make convertors to turn them into cstring, float, int, etc. |
01:30:47 | FromDiscord | <Elegantbeef> It'll be a mismatch error likely |
01:31:06 | FromDiscord | <Elegantbeef> What? |
01:31:28 | FromDiscord | <Elegantbeef> Json doesnt return JsObject |
01:38:19 | FromDiscord | <Nilts> In reply to @Elegantbeef "Json doesnt return JsObject": in nim js? The json object from jsfetch |
01:39:38 | FromDiscord | <Elegantbeef> I do not know what's intended, can you not just get the string from the response convert to a nim string then parse it |
01:40:30 | FromDiscord | <Elegantbeef> > Note that despite the method being named json(), the result is not JSON but is instead the result of taking JSON as input and parsing it to produce a JavaScript object. |
01:40:39 | FromDiscord | <Elegantbeef> This means you can just cast the result to the type you think it is if you really must |
01:50:58 | FromDiscord | <huantian> I wonder if there's a way to check if the JS object (that's parsed JSON) is of the same type as the Nim object definition |
01:51:24 | FromDiscord | <huantian> just to ensure that the parsed json is correct |
01:51:30 | FromDiscord | <Elegantbeef> JS doesnt have type information |
01:51:48 | FromDiscord | <Elegantbeef> So aside from checking all fields no there isnt |
01:52:00 | FromDiscord | <Elegantbeef> Just get the response as as a string and parsing seems more sensible |
01:52:08 | FromDiscord | <huantian> I mean ig for basic datatypes checking all fields is better than nothing |
01:52:34 | FromDiscord | <huantian> In reply to @Elegantbeef "Just get the response": well if you're compiling to js, wouldn't it be better to use the built-in js JSON parser, than to use a Nim one compiled to JS/ |
01:52:55 | FromDiscord | <Elegantbeef> `requires "isNumber", "isString"` |
01:52:57 | FromDiscord | <Elegantbeef> It would be better if you do not care about static typing |
01:53:07 | FromDiscord | <Elegantbeef> If you care about static typing, which you probably do when using Nim.... |
01:53:49 | FromDiscord | <huantian> then perhaps it would be a good idea to make a JS object to Nim object converter |
01:55:12 | FromDiscord | <Elegantbeef> Isnt there `to` in jsffi? |
01:55:15 | FromDiscord | <Elegantbeef> Does that not check |
01:55:51 | FromDiscord | <huantian> does it? if it does that sounds like the ideal option |
01:56:47 | FromDiscord | <huantian> you could just do |
01:57:17 | FromDiscord | <huantian> `fetch("url").await.json.await.to(YourType)` |
01:57:41 | FromDiscord | <huantian> (edit) "`fetch("url").await.json.await.to(YourType)`" => "`fetch("url").await.json().await.to(YourType)`" |
01:58:34 | FromDiscord | <huantian> sent a code paste, see https://play.nim-lang.org/#ix=4nBk |
01:58:44 | FromDiscord | <huantian> I don't understand how js works lmao |
01:58:57 | FromDiscord | <Elegantbeef> Matrix moment |
01:59:33 | FromDiscord | <Elegantbeef> Yea it doesnt check, one needs to check if each field exists and if it matches the signature of that field's type |
02:00:33 | FromDiscord | <Elegantbeef> Which basically entails making a json parser đ |
02:01:25 | FromDiscord | <huantian> maybe you could make a JSObject to JsonNode converter |
02:01:38 | FromDiscord | <Elegantbeef> Too much overhead |
02:01:54 | FromDiscord | <huantian> but still less extra code than including all of `std/json` |
02:02:35 | FromDiscord | <Elegantbeef> There should be a checked `JSObject` to Nim `object` |
02:03:10 | FromDiscord | <huantian> that shouldn't be too hard to make |
02:03:17 | FromDiscord | <huantian> just loop through all the fields! |
02:03:18 | FromDiscord | <Elegantbeef> Atleast i imagine if you cannot return a type you'd like an exception raised |
02:03:32 | FromDiscord | <Elegantbeef> Yea i mean it's just `disreuptek/assume.typeit` |
02:03:48 | FromDiscord | <Elegantbeef> Or however you spell that dog's name |
02:04:57 | FromDiscord | <Elegantbeef> Just remember you have to include `isNumber`, `isString`, `isFloat` and friends đ |
02:44:17 | * | azimut quit (Ping timeout: 255 seconds) |
02:44:24 | * | azimut_ joined #nim |
03:35:28 | * | arkurious quit (Quit: Leaving) |
03:44:04 | * | dropkick joined #nim |
03:46:17 | FromDiscord | <PunchCake> how do i compile nim into a .so file? |
03:47:50 | FromDiscord | <PunchCake> (on windows) |
03:48:03 | FromDiscord | <PunchCake> its probably a dll tho |
03:49:04 | FromDiscord | <Elegantbeef> `--app:lib` |
04:05:30 | FromDiscord | <PunchCake> huh |
04:05:49 | FromDiscord | <PunchCake> i think the compiler removed my whole ass code and left me with an empty dll |
04:07:31 | FromDiscord | <PunchCake> when i import the dll it says my function is not found in python very strange |
04:09:15 | FromDiscord | <Elegantbeef> `exportc` |
04:10:34 | FromDiscord | <PunchCake> In reply to @Elegantbeef "`exportc`": whats that |
04:15:49 | FromDiscord | <PunchCake> sent a code paste, see https://play.nim-lang.org/#ix=4nBF |
04:23:42 | FromDiscord | <Rika> yup thats mostly right |
04:23:50 | FromDiscord | <Rika> maybe better to use `cint` instead of `int` |
04:27:06 | FromDiscord | <PunchCake> In reply to @Rika "maybe better to use": eh im doing the wrapping in python |
04:27:09 | FromDiscord | <Elegantbeef> Probably better to use `int32` or `int64` |
04:27:22 | FromDiscord | <PunchCake> sent a code paste, see https://play.nim-lang.org/#ix=4nBG |
04:27:30 | FromDiscord | <PunchCake> (edit) "https://play.nim-lang.org/#ix=4nBG" => "https://play.nim-lang.org/#ix=4nBH" |
04:27:38 | FromDiscord | <Rika> `ctypes.c_int` is cint in nim i would be led to assume? |
04:27:42 | FromDiscord | <Rika> (edit) "cint" => "`cint`" |
04:27:54 | FromDiscord | <PunchCake> yep its a C integer |
04:27:57 | FromDiscord | <PunchCake> the same as good ol C |
04:28:29 | FromDiscord | <PunchCake> idk if there is a better way to make bindings or should i just cdll load it |
04:28:31 | FromDiscord | <Rika> and `int` in nim is not the same as `int` in c |
04:29:00 | FromDiscord | <PunchCake> oof alright |
04:29:08 | FromDiscord | <Rika> hence `cint` |
04:30:01 | FromDiscord | <PunchCake> is it better to just use nimpy? |
04:30:17 | FromDiscord | <PunchCake> the thing is nimpy wont work when im using async |
04:30:54 | FromDiscord | <Rika> idk, idk how this regular way would work with async either |
04:31:17 | FromDiscord | <PunchCake> In reply to @Rika "idk, idk how this": so if i would wanna use async what are my options? |
04:33:57 | FromDiscord | <ringabout> `sameConstant` consumes 7% execution time in VM. https://media.discordapp.net/attachments/371759389889003532/1073461797291573320/image.png |
04:34:31 | FromDiscord | <ringabout> sent a code paste, see https://play.nim-lang.org/#ix=4nBJ |
04:39:41 | FromDiscord | <ringabout> `sameConstant` is called 627323 times, that's ridiculous! |
04:40:23 | FromDiscord | <ringabout> With https://github.com/nim-lang/Nim/pull/21316; it doesn't have any affects on simple programs anymore. |
04:40:43 | FromDiscord | <ringabout> https://media.discordapp.net/attachments/371759389889003532/1073463500984299601/image.png |
04:50:30 | FromDiscord | <ringabout> It's time to benchmark `nimscript` vs Python. |
04:56:12 | FromDiscord | <ringabout> I can reproduce 10% performance boost on average nimscript program. |
04:56:14 | FromDiscord | <Rika> In reply to @PunchCake "so if i would": Itâs a difficult thing to do |
04:56:40 | FromDiscord | <PunchCake> In reply to @Rika "Itâs a difficult thing": Yeah i guess so |
05:08:46 | FromDiscord | <huantian> you might have some luck looking into how you'd do it in C, and recreating it in nim |
05:11:08 | FromDiscord | <PunchCake> In reply to @huantian "you might have some": No its just making use of python futures |
05:11:11 | FromDiscord | <PunchCake> I think |
05:11:34 | FromDiscord | <PunchCake> But its way way too much of a hastle than its worth im better off just using threads |
05:18:55 | * | dropkick quit (Ping timeout: 248 seconds) |
05:19:53 | FromDiscord | <ringabout> Enabling `nimPreviewSlimSystem` for nimscript reduces the time of `hello world` program to half. |
05:21:41 | FromDiscord | <ringabout> Python: 0.031s vs nimscript: 0.047s |
05:22:27 | FromDiscord | <ringabout> (edit) "0.031s" => "0.012s" |
05:25:14 | FromDiscord | <ringabout> The nimscript should have generated some kind of bytecodes to saves the time of parsing and semchecking. |
05:26:34 | FromDiscord | <ringabout> The parser consumes 20% time https://media.discordapp.net/attachments/371759389889003532/1073475041678868540/image.png |
05:55:33 | FromDiscord | <emanresu3> sent a code paste, see https://play.nim-lang.org/#ix=4nBS |
06:00:09 | FromDiscord | <ringabout> In reply to @emanresu3 "How do you measuring": Firstly, you need to use `-d:nimPreviewSlimSystem`. `nim e -d:nimPreviewSlimSystem hello.nims` |
06:01:37 | FromDiscord | <ringabout> In your case, you should also use the devel compiler, which should support `-d:nimPreviewSlimSystem`. |
06:02:28 | FromDiscord | <emanresu3> I'll try that, but still python is running at 0.030s |
06:04:08 | FromDiscord | <ringabout> Yeah, thats' expected, the architect differences. |
06:05:18 | FromDiscord | <pyolyokh> ringabout has a 4x speed difference and emanresu3 has an 8x difference, and ringabout just said that the new changes double NimScript's performance |
06:05:19 | FromDiscord | <ringabout> I don't know whether you can see the edit on the discord, I have changed it to `Python: 0.012s vs nimscript: 0.047s`. |
06:05:24 | FromDiscord | <pyolyokh> so that math checks out |
06:06:50 | FromDiscord | <pyolyokh> since Python's performance is comically bad it's still not good for NimScript to be slower, but it's probably in the last-decade Python position of "literally nobody has ever seriously tried to make this fast" |
06:08:24 | * | rockcavera quit (Read error: Connection reset by peer) |
06:08:35 | FromDiscord | <pyolyokh> lots of low-hanging fruit, to say that in a positive way. |
06:08:44 | * | rockcavera joined #nim |
06:08:44 | * | rockcavera quit (Changing host) |
06:08:44 | * | rockcavera joined #nim |
06:32:56 | FromDiscord | <planetis> Thanks for all your hard work ringabout, these numbers are quite good already |
06:34:54 | FromDiscord | <planetis> I guess that benefits const evaluation as well? |
06:39:00 | FromDiscord | <ringabout> My pleasure. Yeah, VM benefits from it as well. |
07:20:56 | FromDiscord | <Gumbercules> Implemented https://onrendering.com/data/papers/cbt/ConcurrentBinaryTrees.pdf using my engine (which relies on a modified version of `sokol_gfx.h` that has support for compute shaders and indirect drawing) https://media.discordapp.net/attachments/371759389889003532/1073503819159326720/fps_camera_demo.gif |
07:22:18 | FromDiscord | <planetis> In reply to @ringabout "I don't know whether": Could part of the slow down be, reading the nim.cfg files as well? |
07:27:41 | FromDiscord | <ringabout> I didn't see that in the profiler. I think, in general, it should generate byte codes to speedup. `getNullValue` can consume lots of time too. Macros evaluation should be separated from VM engine so it could possibly use more compact data types instead of PNode. |
07:29:03 | FromDiscord | <Elegantbeef> Well the Vm shouldnt use Pnodes to hold data |
07:30:28 | FromDiscord | <ringabout> Yeah, eventually it will be sorted out. |
07:38:52 | * | tiorock joined #nim |
07:38:52 | * | tiorock quit (Changing host) |
07:38:52 | * | tiorock joined #nim |
07:38:52 | * | rockcavera is now known as Guest296 |
07:38:52 | * | Guest296 quit (Killed (cadmium.libera.chat (Nickname regained by services))) |
07:38:52 | * | tiorock is now known as rockcavera |
07:41:43 | FromDiscord | <pyolyokh> I have src/program.nim and src/unicode/split.nim , and `nimble run program` works if the first has `import unicode/split`, but complains that it can't find `import pkg/unicode/split` , which I want just to emphasize that this isn't std/unicodeâ”I've never actually used pkg/ before, am I missing something with it? |
07:47:09 | FromDiscord | <Phil> Unicode is a folder on your project? |
07:47:42 | FromDiscord | <Phil> Because PKG is for nimble package, not Imports inside your project |
07:47:43 | FromDiscord | <pyolyokh> yes, src/unicode/split.nim |
07:48:05 | FromDiscord | <Phil> So e.g. you'd use it for PKG/jsony |
07:48:13 | FromDiscord | <Phil> Ignore the caps, I am on phone |
07:48:59 | FromDiscord | <Phil> For local imports use ./ , ../ or similar |
07:50:51 | * | rockcavera quit (Remote host closed the connection) |
07:52:39 | FromDiscord | <pyolyokh> yeah. `nim -p:. r src/program` works, so a nim.cfg would do, but `./unicode/split` is just as clearâ”`import pkg/illwill` works, so I see that now, but it's not convenient when I haven't installed the module I'm working on |
07:53:17 | FromDiscord | <pyolyokh> I read " its semantics are: Use the search path to look for module name but ignore the standard library locations. In other words, it is the opposite of std." with too much emphasis. |
07:53:31 | FromDiscord | <Phil> Could you rephrase that? I'm failing to parse it đ
|
07:53:48 | FromDiscord | <pyolyokh> rephrase what? |
07:54:46 | FromDiscord | <Phil> The first entry. So compiling works now and ./ Is valid for local imports but something about it demands packages be installed? |
07:54:58 | FromDiscord | <Phil> (edit) "entry." => "message." |
07:55:32 | FromDiscord | <pyolyokh> if my package is named jsony, then `import pkg/jsony/unicode/split` does not find the file as jsony isn't under ~/.nimble/pkg/ or whatever |
07:56:43 | FromDiscord | <Elegantbeef> `nimble develop` inside your package can resolve that |
07:57:29 | FromDiscord | <Elegantbeef> But i think you're supposed to use relative paths |
07:57:31 | FromDiscord | <Phil> Oh you want to use your package in a second project? |
07:57:44 | FromDiscord | <pyolyokh> that means if someone just clones the repo and tries to build it, that it'll fail without that step. Just not worth the hassle vs. ./ |
07:57:45 | FromDiscord | <Phil> Or do you just want to avoid relative paths? |
07:58:09 | FromDiscord | <pyolyokh> all that I want to do is emphasize that I'm not importing a standard library |
08:00:08 | FromDiscord | <Phil> Ohhh now I understand, you were more summarizing your thoughts in the first message that I didn't understand |
08:00:28 | FromDiscord | <Phil> Alrighty, my bad |
08:01:55 | FromDiscord | <Phil> Adding modules that get imported by default via that one compiler flag is always such a tempting option, I have to keep reminding myself it's not worth the hassle unless I really need a module everywhere |
08:06:23 | FromDiscord | <Elegantbeef> To me it's only really sensible for using term rewriting macros |
08:06:24 | FromDiscord | <Elegantbeef> The worlds best linter |
11:16:39 | FromDiscord | <Phil> @Yandall if you're still looking for another project, I got another one that would be useful for the prologue framework đ |
11:17:05 | FromDiscord | <Phil> (edit) "@Yandall if you're still looking for another project, I got another ... one" added "small-ish" |
11:34:46 | FromDiscord | <emanresu3> why doesn't nim have step slicing (like `A[0..10|2]`) like arraymancer? |
11:51:34 | * | arkurious joined #nim |
12:12:51 | FromDiscord | <ShalokShalom> emanresu3: Do you like to publish the composition operator now? |
12:13:09 | FromDiscord | <ShalokShalom> Or maybe even combine the two operators |
12:13:18 | FromDiscord | <ShalokShalom> Into one library |
12:15:39 | * | jmdaemon quit (Ping timeout: 248 seconds) |
12:25:48 | FromDiscord | <emanresu3> Hi shalok, sure let's do it now |
12:27:18 | FromDiscord | <emanresu3> It think they should be separate, they're small but maybe one is looking for only one of those operators |
12:35:16 | FromDiscord | <frobnicate> what's the diff between `std/parsexml` and `std/xmlparser`? |
12:47:26 | FromDiscord | <emanresu3> xmlparser parses and gives you a tree representation XML tree representation from an xml file, stream or string. parsexml is lower level and lets you decide how to parse and what to do while parsing, it's more verbose and difficult to read but more powerful |
12:59:32 | FromDiscord | <frobnicate> I just need to parse an xsl doc and look for text nodes |
13:01:44 | FromDiscord | <Ntsékees> I think I've heard that Nim had a functionality to execute arbitrary Nim code at compile time; is that the case? |
13:02:42 | FromDiscord | <Ntsékees> At least there's stuff like staticRead for loading a file at compile time. |
13:04:35 | FromDiscord | <NtsĂ©kees> I haven't yet checked whether the regexp library is const-compatible (for compiling regexps at compile-time) but if it isn't compatible, maybe something like âcompevalâ could still allow execute regexp-compiling code at compile time? |
13:05:16 | FromDiscord | <frobnicate> In reply to @Ntsékees "I think I've heard": anything you put in a `static:` block happens at compile time, you also have stuff like `when` |
13:06:02 | FromDiscord | <Ntsékees> Okay. I'll check later today if that works with regexp pre-compilation. |
13:45:13 | FromDiscord | <bondurant> I'm having a doubt which programming language is faster C++ or NIM ? |
13:55:15 | FromDiscord | <ShalokShalom> Both about similar |
14:00:41 | * | Zevv quit (Remote host closed the connection) |
14:00:46 | FromDiscord | <m4ul3r> one is easier to read (biased) |
14:01:06 | * | azimut joined #nim |
14:01:32 | * | azimut_ quit (Ping timeout: 255 seconds) |
14:02:20 | FromDiscord | <Gabben> sent a code paste, see https://play.nim-lang.org/#ix=4nDT |
14:05:03 | FromDiscord | <planetis> sent a code paste, see https://play.nim-lang.org/#ix=4nDW |
14:06:44 | FromDiscord | <Ntsékees> sent a code paste, see https://play.nim-lang.org/#ix=4nDX |
14:07:12 | FromDiscord | <Ntsékees> Hmm what is the correct way to declare static variables and then using them outside of the static block? |
14:07:26 | FromDiscord | <Ntsékees> (edit) "variables" => "constants" |
14:07:51 | FromDiscord | <Ntsékees> I guess in this case I could get rid of static |
14:07:56 | FromDiscord | <Ntsékees> since I use only const variables |
14:11:03 | FromDiscord | <Gabben> In reply to @planetis "Could be that doesn't": Fails too đ |
14:13:15 | FromDiscord | <frobnicate> sent a code paste, see https://play.nim-lang.org/#ix=4nE0 |
14:13:17 | FromDiscord | <frobnicate> And yeah const is already compile time |
14:13:48 | FromDiscord | <Ntsékees> `const` alone does the trick for me |
14:15:17 | FromDiscord | <frobnicate> I'm also pretty sure that once variables leave a block they get destroyed, so you can make a variable above your static, set the value in static and use it after |
14:15:21 | FromDiscord | <frobnicate> I think |
14:15:49 | FromDiscord | <Ntsékees> I suppose that's how `static` is to be used |
14:16:04 | * | dropkick joined #nim |
14:22:35 | FromDiscord | <Ntsékees> Nim complains that `assert` cannot evaluate at compile time a function argument, even though I tagged the function as `{.compTime.}`. Is there a way to do an assertion when the function is used at runtime, and do a compilation error when the function is called at comptime? |
14:23:48 | FromDiscord | <Ntsékees> (edit) "comptime?" => "comptime (on const arguments)?" |
14:24:41 | FromDiscord | <auxym> I'm not sure I can parse that question |
14:25:08 | * | rockcavera joined #nim |
14:25:39 | FromDiscord | <Ntsékees> sent a code paste, see https://paste.rs/nfL |
14:27:06 | FromDiscord | <Gabben> In reply to @Ntsékees "Nim complains that `assert`": Show example |
14:27:09 | FromDiscord | <Ntsékees> In reply to @auxym "I'm not sure I": I have a function that should be callable at compilation time, with two arguments, `i` and `j`, and I would like to make sure that `i < j`; however, apparently using `assert` at compilation time is not allowed on a variable parameter. |
14:27:56 | FromDiscord | <Ntsékees> sent a code paste, see https://play.nim-lang.org/#ix=4nE8 |
14:28:06 | FromDiscord | <Ntsékees> > Error: cannot evaluate at compile time: i |
14:29:03 | FromDiscord | <Ntsékees> (edit) "https://play.nim-lang.org/#ix=4nE8" => "https://play.nim-lang.org/#ix=4nE9" |
14:29:19 | FromDiscord | <Gabben> sent a code paste, see https://play.nim-lang.org/#ix=4nEa |
14:30:52 | FromDiscord | <auxym> In reply to @Ntsékees "I have a function": use `static[uint]` as a type for i/j |
14:31:37 | FromDiscord | <auxym> FYI the only thing {.compiletime.} does is make sure the function is only called at compile-time, the compiler errors out if there's a runtime call |
14:31:50 | FromDiscord | <Ntsékees> would this still allow calling the function at runtime? |
14:32:44 | FromDiscord | <auxym> only if i/j are known at CT (eg if they are consts) |
14:33:16 | FromDiscord | <auxym> otherwise you'll to create a runtime overload with non-static params |
14:45:59 | FromDiscord | <Phil> sent a code paste, see https://play.nim-lang.org/#ix=4nEj |
15:02:48 | FromDiscord | <Ntsékees> Stuff like `const pattern_1 = re"(?<![A-Za-zı])([A-Z])"` causes an internal error, that disappears when using `let` instead of `const` |
15:03:06 | FromDiscord | <Ntsékees> weirdly, I've used `re` in const expressions elsewhere without issue |
15:03:23 | FromDiscord | <Ntsékees> (edit) "error," => "error of the compiler," |
15:03:29 | FromDiscord | <Ntsékees> (edit) "of" => "in" |
15:08:03 | FromDiscord | <Ntsékees> `const SPACE_RE = re(r"\s")` works without issue |
15:11:39 | FromDiscord | <Ntsékees> sent a code paste, see https://play.nim-lang.org/#ix=4nEB |
15:11:45 | FromDiscord | <Ntsékees> heh, bugs aren't meant to look sensical |
15:12:20 | FromDiscord | <ringabout> In reply to @Ntsékees "heh, bugs aren't meant": What's the error message? |
15:12:28 | FromDiscord | <Ntsékees> > Error: internal error: /home/runner/work/nightlies/nightlies/nim-1.6.10/compiler/vmgen.nim(1691, 23) |
15:13:35 | FromDiscord | <ringabout> What's the library you are using? regex or re or nre? |
15:14:28 | FromDiscord | <Ntsékees> `regex` |
15:15:13 | FromDiscord | <Ntsékees> (because I needed a pure Nim library not dynamically loading a libpcre) |
15:15:40 | FromDiscord | <Dudugz> In Nim isn't ``byte`` type an integer from range 0 to 255?â”â”``byte(25) shl 8`` (25 << 8) gives 0 but the expected would be 6400, with ``int`` works. |
15:17:14 | FromDiscord | <ringabout> sent a code paste, see https://play.nim-lang.org/#ix=4nEG |
15:17:39 | Amun-Ra | Dudugz: why 6400 would be expected? |
15:17:55 | FromDiscord | <Ntsékees> sent a code paste, see https://play.nim-lang.org/#ix=4nEH |
15:18:28 | FromDiscord | <ringabout> The snippet works for me |
15:18:29 | FromDiscord | <Ntsékees> hopefully these can be copy-pasted faithfully |
15:19:10 | FromDiscord | <ringabout> Right? |
15:19:11 | FromDiscord | <ringabout> sent a code paste, see https://play.nim-lang.org/#ix=4nEL |
15:19:14 | FromDiscord | <Ntsékees> I'm using v1.16.10 |
15:20:04 | FromDiscord | <ringabout> 1.6.10 I suppose |
15:20:13 | FromDiscord | <ringabout> regex: 0.20.0 |
15:20:25 | FromDiscord | <Dudugz> In reply to @Amun-Ra "Dudugz: why 6400 would": Bitwise operation, 25 << 8 = 6400, not zero, but I think I understand, it assumes the return value needs to be a ``byte`` so it would be the same as: (25 << 8) & 255 |
15:21:09 | FromDiscord | <Ntsékees> In reply to @ringabout "1.6.10 I suppose": 1.6.10, oopsie. |
15:21:26 | Amun-Ra | Dudugz: you have 8-bit long unsigned integer and shift the bits inside the range of those 8 bits |
15:21:40 | FromDiscord | <Ntsékees> (edit) "In reply to @ringabout "1.6.10 I suppose": 1.6.10, oopsie. ... " added "(nim compiler version)" |
15:22:07 | Amun-Ra | Dudugz: shl does not perform auto promotion to wider types |
15:22:20 | FromDiscord | <Dudugz> Yea, i got it |
15:22:22 | FromDiscord | <Ntsékees> sent a code paste, see https://play.nim-lang.org/#ix=4nEN |
15:22:32 | FromDiscord | <NtsĂ©kees> I guess something else causes the issue? đ€ |
15:22:37 | Amun-Ra | Dudugz: tbh nothing in Nim does that |
15:23:24 | Amun-Ra | 255'u8 + 1'u8 etc. |
15:23:54 | FromDiscord | <ringabout> In reply to @Ntsékees "I guess something else": Are you sure that the program is identical, or you might clear the nimcache? |
15:27:25 | FromDiscord | <Ntsékees> the bug seems to have disappeared even from its orginal position in the code |
15:27:39 | FromDiscord | <Ntsékees> maybe something with the cache was responsible |
15:27:54 | FromDiscord | <NtsĂ©kees> đ€· |
15:27:57 | FromDiscord | <NtsĂ©kees> (edit) "đ€·" => "đ€·." |
15:35:33 | FromDiscord | <Nerve> I'm on Linux using `-d:mingw` to try to build for Windows. However, I'm using nimja templates, which are fetched from the project directory structure. So I get this error:â”`/home/me/.nimble/pkgs/nimja-0.8.6/nimja/sharedhelper.nim(9, 15) Error: cannot open file: \home\me\project\templates\a_template.nimja`â”It's trying to use Windows backslashes to access the templates. How do I get around this? |
15:37:14 | * | jmdaemon joined #nim |
15:58:01 | FromDiscord | <ringabout> Sounds like an old bug |
15:58:50 | FromDiscord | <ringabout> In reply to @Nerve "I'm on Linux using": See also https://github.com/nim-lang/Nim/issues/19558 |
16:22:47 | * | oprypin quit (Remote host closed the connection) |
16:22:55 | FromDiscord | <enthus1ast> is it safe (or sane) to store a Lock in the object i wanna lock? |
16:22:55 | FromDiscord | <enthus1ast> the obj is a ref |
16:23:17 | FromDiscord | <enthus1ast> so procs/threds that access the obj access the object to lock it |
16:23:24 | FromDiscord | <enthus1ast> threads |
16:30:31 | FromDiscord | <Yandall> In reply to @Isofruit "<@376485432805949443> if you're still": Hi Phil. Tell more about it |
16:30:59 | FromDiscord | <enthus1ast> ok i do it, and it seems to work soooo |
16:31:05 | FromDiscord | <enthus1ast> maybe its safe \:) |
17:09:19 | FromDiscord | <jtv> Yeah, it's fine, is very common. |
17:09:55 | FromDiscord | <jtv> If you might change out the reference (i.e., people have reference to a reference from some other object), then it's not the right place đ |
17:18:02 | FromDiscord | <Phil> In reply to @Yandall "Hi Phil. Tell more": You might've seen it already in webdev.â”There's a framework called prologue which supports serving openapi.json files.â”The problem currently is you need to write that openapi.json by hand yourself, even though it could at least partially be generated from a prologue object that all routes have already been added to. |
17:19:01 | * | PMunch joined #nim |
17:19:20 | FromDiscord | <Phil> An alternative approach would be to provide templates or macros that add routes that should be used instead of prologues `addRoute` procs.â”Those would still register them to a prologue object like the `addRoute` proc and likely should use them under the hood, but also read in doc-comments on the route-handler proc to be made part of the written openapi.json file |
17:20:22 | FromDiscord | <Phil> Actually, I take back what I said, this is actually somewhat large/complicated and I didn't fully think it through |
17:21:52 | FromDiscord | <Phil> Basically the problem would be "How can I generate an openapi.json file for a prologue application?" |
17:22:11 | FromDiscord | <Phil> (edit) "application?"" => "application, either at runtime or compiletime?"" |
17:22:23 | FromDiscord | <Phil> (edit) "compiletime?"" => "compiletime or as part of a separate repository?"" |
17:23:33 | * | oprypin joined #nim |
17:25:40 | FromDiscord | <Yandall> In reply to @Isofruit "Actually, I take back": Yeah. That seems complicate, and I don't know a lot about prologue |
17:25:51 | FromDiscord | <rakgew> automatic openapi for prologue? that would be amazing!! |
17:27:29 | FromDiscord | <Yandall> And I started a nim project so I dont have a lot of time |
17:27:41 | FromDiscord | <Phil> In reply to @Yandall "Yeah. That seems complicate,": You actually don't need to, prologue itself isn't the complicated part as it's a comparatively slim framework.â”The real kicker would be how do you get the doc-comments of the route-handler procs for writing into the openapi.json file |
17:28:00 | FromDiscord | <Phil> (edit) "framework.â”The" => "framework and you really only need to check out one object definition and like 6-12 procs.â”The" |
17:29:04 | FromDiscord | <Phil> Ah then don't let me keep you đ !â”Just thought that maybe you didn't have one yet and might want one đ |
17:39:54 | * | beholders_eye joined #nim |
17:42:44 | FromDiscord | <Ntsékees> I have found a Nim bug with compTime functions |
17:43:47 | FromDiscord | <Ntsékees> https://media.discordapp.net/attachments/371759389889003532/1073660566981312632/test.nim |
17:45:19 | FromDiscord | <NtsĂ©kees> There are 4 copies of the same function:â”âą two of them are comptime, the two others are runtime.â”âą two of them are defined ahead/above of the call site, the two others have instead a forward declaration and their body is defined after the call site. |
17:45:42 | FromDiscord | <Ntsékees> With the two functions defined ahead, everything goes fine. |
17:46:15 | FromDiscord | <Ntsékees> With the two functions defined below the call site (with foreward declaration), things behave differently: |
17:46:43 | FromDiscord | <ringabout> Yeah, `compileTime` has bugs. |
17:46:50 | FromDiscord | <NtsĂ©kees> with the runtime version, I cannot use `const`, but `let` works. (maybe it's intentional)â”with the comptime version, the function silently fails. |
17:47:14 | FromDiscord | <Ntsékees> (without any error) |
17:48:03 | FromDiscord | <Ntsékees> Somehow, the compilator fails to fetch the body of that function. |
17:48:15 | FromDiscord | <Ntsékees> At least that's what it seems to occur. |
17:49:47 | * | beholders_eye quit (Ping timeout: 265 seconds) |
17:50:20 | FromDiscord | <Ntsékees> That annoys me a bit since I like to order my function definitions the opposite way compilators prefer, i.e. putting subordinate functions below the ones which depend on them / call them. |
17:50:52 | FromDiscord | <Ntsékees> (in other words, having the functions called first at the top) |
17:57:16 | * | jmdaemon quit (Ping timeout: 252 seconds) |
18:04:48 | FromDiscord | <Ntsékees> I'll try to file a bug report when I get the time. |
18:04:53 | * | crem1 quit (Ping timeout: 246 seconds) |
18:05:47 | FromDiscord | <jmgomez> what do you mean with compile time functions anyways? Are you referring to the pragma? |
18:06:02 | FromDiscord | <Ntsékees> yes (see the attached test code) |
18:06:30 | FromDiscord | <Ntsékees> https://discord.com/channels/371759389889003530/371759389889003532/1073660567069413489 |
18:06:30 | FromDiscord | <jmgomez> does it make a difference to remove it? You dont need it on functions |
18:06:57 | * | crem1 joined #nim |
18:07:12 | FromDiscord | <Ntsékees> I was getting complaints when I tried to use the runtime version (without {.compTime.}) within a const expression |
18:08:08 | FromDiscord | <Nerve> When I build on Windows I am getting a big fat nothing for output or behavior from a program that's working great on Linux. Has anyone experienced this before? I parse options to start and I've getting 0 output from trying to print the parsed options. |
18:08:24 | FromDiscord | <Nerve> (edit) "I've" => "I'm" |
18:08:32 | FromDiscord | <Nerve> (edit) "0" => "no" |
18:12:53 | FromDiscord | <Nerve> I'm supposed to be printing usage and help strings but I'm getting none of that |
18:17:09 | FromDiscord | <Nerve> Oh got it, never mind. I didn't statically link the DLL I include in the project. However, in order to throw the missing DLL warning, you apparently need to be in a vanilla command prompt; PowerShell and VSCode PowerShell just silently exit with no output. |
18:18:04 | FromDiscord | <Yandall> sent a code paste, see https://play.nim-lang.org/#ix=4nGd |
18:18:31 | FromDiscord | <Yandall> (edit) "https://play.nim-lang.org/#ix=4nGd" => "https://play.nim-lang.org/#ix=4nGe" |
18:18:59 | FromDiscord | <Yandall> (edit) "https://play.nim-lang.org/#ix=4nGe" => "https://play.nim-lang.org/#ix=4nGg" |
18:19:24 | FromDiscord | <Yandall> (edit) "https://play.nim-lang.org/#ix=4nGg" => "https://play.nim-lang.org/#ix=4nGh" |
18:22:15 | * | jmdaemon joined #nim |
18:24:49 | FromDiscord | <Phil> In reply to @Yandall "What is the best": You mean waiting for multiple futures to complete in nim? |
18:24:50 | FromDiscord | <eyes> @Yandall https://nim-by-example.github.io/concurrency/ |
18:25:23 | FromDiscord | <Yandall> In reply to @Isofruit "You mean waiting for": Yeah, exactly |
18:25:25 | FromDiscord | <eyes> you can create a sequence of ``future`` objects, idk if thats the best way though |
18:26:24 | FromDiscord | <Yandall> In reply to @eyes "<@376485432805949443> https://nim-by-example.github": So should I make a function that returns my values and use `waitFor` to await all the results? |
18:26:59 | FromDiscord | <Phil> In reply to @Yandall "Yeah, exactly": You can follow the example eyes posted, you can also look into the `all` proc of std/asyncdispatch for combining futures.â”Note that you can only use await in async procs, nowhere else.â”And you MUST use `waitFor` on the "root" level, so the final promise that gets spit out from the root async proc must be waitFor'd |
18:27:48 | FromDiscord | <Phil> waitFor is basically await but blocks the thread, without it the async code will not run (kinda like not having a subscriber on an rxjs observable) |
18:28:00 | FromDiscord | <Phil> (edit) "thread," => "thread while the actual await does not," |
18:28:14 | FromDiscord | <Phil> (edit) "run" => "actually execute" |
18:28:32 | FromDiscord | <Phil> In reply to @Yandall "So should I make": Yeah, pretty much |
18:28:38 | * | PMunch_ joined #nim |
18:28:53 | FromDiscord | <Phil> Note that the waitFor is blocking as stated, so you might want to do it after you start any other async operations |
18:29:10 | FromDiscord | <Yandall> Got it. Thanks |
18:31:08 | * | PMunch quit (Ping timeout: 246 seconds) |
18:31:31 | FromDiscord | <Yandall> A future object is similar to a rxjs observable? or a javascript promise? |
18:36:43 | FromDiscord | <jmgomez> They all three represent the same concept but I would say observable is close because futures are composables |
18:37:22 | FromDiscord | <jmgomez> IIRC `waitFor` is not available in js. Not sure how do you suppose to freeze the event loop? |
18:37:23 | FromDiscord | <MetuMortis> In reply to @Yandall "A future object is": I was asking that lol |
18:37:37 | FromDiscord | <MetuMortis> In reply to @jmgomez "IIRC `waitFor` is not": there is `await` |
18:38:03 | FromDiscord | <jmgomez> Yeah, I know |
18:38:22 | FromDiscord | <jmgomez> I ment that waitFor has not sense in js |
18:39:03 | FromDiscord | <huantian> In reply to @Isofruit "You can follow the": yeah asyncfuture's all is probably what you want |
18:41:42 | * | beholders_eye joined #nim |
18:51:27 | FromDiscord | <eyes> hey lads how do I deal with nil? I need to be able to define an "undefined" type but nil is not of the same time of what I am looking for |
18:51:45 | FromDiscord | <eyes> sent a code paste, see https://play.nim-lang.org/#ix=4nGt |
18:52:07 | FromDiscord | <eyes> but something of type ``DateTime`` cannot be nil |
18:52:18 | FromDiscord | <Phil> In reply to @jmgomez "They all three represent": I'd say a promise is closer because a Future represents one value, not a stream of values, no? |
18:52:20 | FromDiscord | <eyes> i could use like a time with year 0 day 0 as "nil" but that seems a bit jank |
18:53:03 | FromDiscord | <Phil> Observable is stream of value over time.â”Promise is one value that will be there in the future.â”Future afaik is the same in that it represents one value that will be there at some point in the future. |
18:55:35 | * | PMunch_ quit (Quit: Leaving) |
18:55:44 | FromDiscord | <huantian> you want `Option` |
18:55:47 | FromDiscord | <huantian> from `std/options` |
18:56:26 | FromDiscord | <jmgomez> That's true. Although you can make Future behaves like observable pretty easy. Promises arent that easy to compose (at least last time I checked) |
18:56:28 | FromDiscord | <Phil> Please always use option when dealing with nil |
18:56:46 | FromDiscord | <Phil> In reply to @jmgomez "That's true. Although you": By compose you mean combining multiple promises? |
18:57:32 | FromDiscord | <jmgomez> like promise.map(changeValue).flatMap(promiseOfPromiseChangeValue).do(yourThing) |
18:58:07 | FromDiscord | <huantian> how functional of you |
18:58:07 | FromDiscord | <jmgomez> probably things changed since they introduced async/await in js? |
18:58:33 | FromDiscord | <Phil> No clue, I write my JS in angular and that uses observables like it's a fetish, together with an async pipe in templates |
18:58:57 | FromDiscord | <Phil> So your actual code is just map here, tap there, take 1 over there, switchMap/filter and what have you |
19:44:32 | * | crem1 quit (Ping timeout: 248 seconds) |
19:46:43 | * | crem1 joined #nim |
20:36:23 | FromDiscord | <NtsĂ©kees> How do one use the Javascript backend's generated JS in a web page?â”I've a Nim-generated JS that runs fine on Node.js (generated with `-d:nodejs`), but it doesn't work on HTML: the fact the nodejs IO functions are not available causes an exception, and when I remove the âmainâ (executed) code (with e.g. `when not defined(nodejs)`) so that only the (not called) functions are left, the generated JS becomes almost empty. |
20:36:42 | FromDiscord | <Ntsékees> Maybe a pragma avoiding removal of dead code could do the trick |
20:39:14 | FromDiscord | <Elegantbeef> `{.exportc.}` on unused code |
20:39:23 | FromDiscord | <Ntsékees> {.used.} maybe |
20:39:39 | FromDiscord | <Ntsékees> I'll try both |
20:39:42 | FromDiscord | <Elegantbeef> Nope used just tells nim the procedure is used and not to warn about unused |
20:39:50 | FromDiscord | <Ntsékees> OK |
20:40:20 | FromDiscord | <NtsĂ©kees> duh, my function already has {.exportc.} đ€ |
20:42:02 | FromDiscord | <Elegantbeef> Unless it's generic you're lying |
20:42:24 | FromDiscord | <Elegantbeef> sent a code paste, see https://play.nim-lang.org/#ix=4nGO |
20:42:32 | FromDiscord | <Elegantbeef> with `nim js -d:danger my.nim` |
20:43:55 | FromDiscord | <Ntsékees> I've just tested wth a very simple `func myfunc(i: int): int {.exportc.} = return ii` and it does work fine⊠|
20:44:21 | FromDiscord | <Ntsékees> so the issue is elsewhere |
20:45:01 | FromDiscord | <Elegantbeef> Is the procedure a generic? |
20:45:10 | FromDiscord | <Ntsékees> nope |
20:45:37 | FromDiscord | <Elegantbeef> Well unless you'd lie to me it should work |
20:46:04 | FromDiscord | <Elegantbeef> Are you sure you didnt accidentally put it inside a `when defined(nodejs)`? |
20:51:17 | FromDiscord | <System64 ~ Flandre Scarlet> Does someone knows how to install GTK for Owlkettle please? |
20:51:40 | FromDiscord | <NtsĂ©kees> My code: https://github.com/toaq/chuotiai/blob/master/nimtoaq/deran%C4%B1_from_latin.nimâ”The JS I get: https://github.com/toaq/chuotiai/blob/master/nimtoaq/deran%C4%B1_from_latin.js |
20:52:19 | FromDiscord | <Ntsékees> Nothing change if I remove the whole `when`-block |
20:52:23 | FromDiscord | <Ntsékees> (edit) "change" => "changes" |
20:52:37 | FromDiscord | <NtsĂ©kees> that's weird đ€ |
20:55:22 | * | derpydoo joined #nim |
20:57:28 | FromDiscord | <Ntsékees> lol, it seems the export `` has something to do with this |
20:57:44 | FromDiscord | <Ntsékees> when I remove it my main function suddenly appears in the JS |
20:59:18 | FromDiscord | <Nerve> Is there any way in docopt to add descriptions for anything other than options, such as commands and positional args? Does it just ignore sections not labeled `Usage:` and `Options:`? |
21:01:52 | FromDiscord | <NtsĂ©kees> @ElegantBeef: OK I solved this by doing both of the following:â”âą remove the export asterisk ``â”âą remove the forward declaration of my function |
21:02:03 | FromDiscord | <Ntsékees> no idea why the second point was needed |
21:02:59 | FromDiscord | <Ntsékees> (edit) "remove" => "removing" | "remove" => "removing" |
21:03:21 | FromDiscord | <Elegantbeef> Was the forward declare not exported? |
21:04:12 | FromDiscord | <Ntsékees> I had removed `` from both but it seemed not enough |
21:04:46 | FromDiscord | <Ntsékees> maybe `` was actually not even culprit |
21:10:48 | FromDiscord | <Ntsékees> hmm it does seem to cause troubles |
21:11:30 | FromDiscord | <guttural666> tried V today, which seems amazing, but without comptime reflection I really get mad |
21:17:08 | * | azimut quit (Ping timeout: 255 seconds) |
21:18:05 | * | rockcavera quit (Remote host closed the connection) |
21:18:53 | FromDiscord | <Ntsékees> the V language? |
21:19:54 | FromDiscord | <System64 ~ Flandre Scarlet> In reply to @guttural666 "tried V today, which": Oh, nice lang |
21:33:57 | FromDiscord | <System64 ~ Flandre Scarlet> sent a code paste, see https://play.nim-lang.org/#ix=4nHi |
21:34:37 | FromDiscord | <Elegantbeef> Nimble needs libcrypto i assume |
21:34:54 | FromDiscord | <System64 ~ Flandre Scarlet> How do I install that on MSys2? |
21:35:39 | FromDiscord | <Elegantbeef> No clue |
21:37:47 | FromDiscord | <Phil> sent a code paste, see https://play.nim-lang.org/#ix=4nHj |
21:37:53 | FromDiscord | <Phil> Quick google |
21:38:29 | FromDiscord | <Phil> (edit) "Quick google" => "Did a quick wild google, maybe that one helps?" |
21:47:17 | * | derpydoo quit (Quit: derpydoo) |
21:49:16 | FromDiscord | <guttural666> In reply to @System64 "Oh, nice lang": it is. but as soon as I have to explain to the compiler what I have just wrote I get mad |
21:56:05 | FromDiscord | <System64 ~ Flandre Scarlet> In reply to @Isofruit "> > ": I need to install open ssl so? |
21:56:58 | FromDiscord | <Phil> In reply to @System64 "I need to install": I assume the libcrypto dll you need is part of openssl |
22:05:58 | FromDiscord | <System64 ~ Flandre Scarlet> In reply to @Isofruit "I assume the libcrypto": still doesn't workâ”Bruh all of this because of GTK4 |
22:06:31 | FromDiscord | <Phil> I mean, it's more that windows has a pretty shit way of installing packages |
22:06:40 | FromDiscord | <System64 ~ Flandre Scarlet> Yeah |
22:06:58 | FromDiscord | <System64 ~ Flandre Scarlet> I tried installing GTK, I don't understand how |
22:08:12 | FromDiscord | <Phil> In the end, all that's missing is a way for your project to find the dll file of libcrypto.â”There's possibly dll file downloader sites out there to use.â”Maybe windows has some kind of replacement for proper package management, I think there was chocolatey or sth? |
22:08:36 | FromDiscord | <System64 ~ Flandre Scarlet> yeah there is chocolatey |
22:08:38 | FromDiscord | <Phil> If you have the dll file, all that's needed is for it to be directly on your path |
22:09:31 | FromDiscord | <System64 ~ Flandre Scarlet> sent a code paste, see https://play.nim-lang.org/#ix=4nHr |
22:10:24 | FromDiscord | <Phil> You sure you have openssl installed? |
22:10:34 | FromDiscord | <System64 ~ Flandre Scarlet> Yeah |
22:12:32 | FromDiscord | <Phil> Is it on your path? |
22:12:59 | FromDiscord | <System64 ~ Flandre Scarlet> Alright I put it in the same dir as the binary, it works |
22:13:26 | FromDiscord | <System64 ~ Flandre Scarlet> sent a code paste, see https://play.nim-lang.org/#ix=4nHt |
22:13:38 | FromDiscord | <Phil> nim -v is saying what? |
22:13:40 | FromDiscord | <Phil> I'm assuming 1.4 |
22:13:52 | FromDiscord | <System64 ~ Flandre Scarlet> yeah it is 1.4 |
22:13:57 | FromDiscord | <System64 ~ Flandre Scarlet> 1.4.6 |
22:14:48 | FromDiscord | <Phil> In that case, for the sake of your sanity, have you already installed choosenim? |
22:15:12 | FromDiscord | <System64 ~ Flandre Scarlet> Is it availlable for msys2? |
22:15:12 | FromDiscord | <Phil> choosenim is so that you can quickly and easily swap out nim installations, so jump from 1.4 to 1.6 or 2.0 in the future |
22:15:29 | FromDiscord | <Phil> It's available for Windows, I have no clue what msys2 is, I just google windows |
22:15:31 | FromDiscord | <Phil> https://github.com/dom96/choosenim/releases |
22:15:48 | FromDiscord | <Phil> The install instructions: https://github.com/dom96/choosenim#windows |
22:17:04 | FromDiscord | <Phil> With choosenim you can literally just do `choosenim 1.6.10`and it'll install it for you |
22:17:31 | FromDiscord | <Phil> Or `choosenim devel` if you're feeling adventurous and want to check out the current devel version of the compiler |
22:19:41 | FromDiscord | <System64 ~ Flandre Scarlet> Doesn't work on msys2â”Well, it works but not on the msys2 one |
22:20:28 | FromDiscord | <Phil> What exactly is msys? |
22:20:43 | FromDiscord | <System64 ~ Flandre Scarlet> it kinda emulates a linux environement |
22:20:47 | FromDiscord | <System64 ~ Flandre Scarlet> Unix |
22:20:54 | FromDiscord | <Phil> Isn't that WSL? |
22:21:02 | FromDiscord | <Elegantbeef> No |
22:21:09 | FromDiscord | <System64 ~ Flandre Scarlet> No, WSL is fully Linux |
22:21:20 | FromDiscord | <System64 ~ Flandre Scarlet> oh god I'm losing my sanity |
22:21:44 | FromDiscord | <Elegantbeef> Welcome to using windows |
22:21:58 | FromDiscord | <System64 ~ Flandre Scarlet> Microsoft is retarded |
22:21:59 | FromDiscord | <Phil> Can you do a manual installation of 1.6.10? |
22:22:09 | FromDiscord | <System64 ~ Flandre Scarlet> How to do that? |
22:22:11 | FromDiscord | <Phil> There's zip files on the main page to download |
22:22:18 | FromDiscord | <System64 ~ Flandre Scarlet> Oh, let's try this |
22:22:29 | FromDiscord | <Phil> > The installation using the provided zip files should be fairly straightforward. Simply extract the files into the desired installation directory, and run finish.exe. |
22:22:52 | FromDiscord | <Phil> I can confirm there's a finish.exe in that archive at least |
22:23:13 | FromDiscord | <System64 ~ Flandre Scarlet> Oh god Windows defender |
22:23:24 | FromDiscord | <Elegantbeef> Windows is malware |
22:23:55 | FromDiscord | <Phil> Windows just likes to protect you. From yourself. And from what you want to do. And knows better than you. Always. |
22:24:23 | FromDiscord | <Phil> It also really likes to treat you like a moron. |
22:24:31 | FromDiscord | <Phil> And then fleece you for data |
22:36:51 | FromDiscord | <System64 ~ Flandre Scarlet> AAAAAH I'm losing my sanity |
22:37:16 | FromDiscord | <Phil> Can't get windows defender to not senselessly flag nim binaries? |
22:37:34 | FromDiscord | <System64 ~ Flandre Scarlet> No it's not that |
22:38:20 | FromDiscord | <System64 ~ Flandre Scarlet> sent a code paste, see https://play.nim-lang.org/#ix=4nHx |
22:41:36 | FromDiscord | <Phil> Do we have any other windows users in the community beef? |
22:41:58 | FromDiscord | <Elegantbeef> Treeform, gumber, ringabout, .... |
22:42:52 | FromDiscord | <Phil> @Gumbercules any suggestions how to "properly" install nim 1.6.10 under windows msys2? |
22:43:06 | FromDiscord | <System64 ~ Flandre Scarlet> Or GTK4 |
22:43:29 | FromDiscord | <Phil> Did you want to just have gtk4 installed or did you want to use owlkettle? |
22:43:54 | FromDiscord | <Phil> Because you have gtk4 installed, owlkettle just requires a higher nim version than you currently have |
22:44:01 | FromDiscord | <System64 ~ Flandre Scarlet> I want to use Owlkettle but it needs GTK4 |
22:44:10 | FromDiscord | <System64 ~ Flandre Scarlet> In reply to @Isofruit "Because you have gtk4": I have nim 1.6.x |
22:44:22 | FromDiscord | <System64 ~ Flandre Scarlet> but GTK4 isn't installed properly |
22:44:25 | FromDiscord | <Phil> Then why is it picking up your nim version as 1.4? Is msys somehow weird? |
22:44:32 | FromDiscord | <System64 ~ Flandre Scarlet> yeah |
22:45:37 | FromDiscord | <Gumbercules> In reply to @Isofruit "<@204328759715692544> any suggestions how": not really - I just followed the instructions on here: https://nim-lang.org/install_windows.html |
22:46:07 | FromDiscord | <Phil> Then I don't get why msys apparently randomly decided that nim should be 1.4 |
22:46:14 | FromDiscord | <Gumbercules> that seems to set up msys2 on your path |
22:46:30 | FromDiscord | <Gumbercules> I have no idea - do you have multiple Nim installs in your system path? |
22:46:52 | FromDiscord | <Gumbercules> I just install msys2 / mingw somewhere and make sure its on my path then checkout and build Nim from source usually |
22:48:02 | FromDiscord | <System64 ~ Flandre Scarlet> I only have one |
22:48:09 | FromDiscord | <System64 ~ Flandre Scarlet> + the MSys2 one |
22:48:43 | FromDiscord | <Gumbercules> well msys2 should install mingw |
22:49:13 | FromDiscord | <System64 ~ Flandre Scarlet> yeah but it says incompatible pointer size or smth |
22:49:39 | FromDiscord | <Elegantbeef> I'd assume also guzba |
22:50:47 | FromDiscord | <System64 ~ Flandre Scarlet> guzba? |
22:56:46 | FromDiscord | <Phil> I think that was a continuation of the list of windows users |
23:00:40 | FromDiscord | <Elegantbeef> Yea matrix be slow |
23:08:30 | FromDiscord | <Dudugz> Does anyone know if there is any project that started to make a Luau binding for Nim? I'm going to use it in a project, otherwise I'll have to develop it myself.â”â”https://github.com/Roblox/luau |
23:14:21 | FromDiscord | <ted__> sent a code paste, see https://play.nim-lang.org/#ix=4nHF |
23:15:06 | FromDiscord | <ted__> (edit) "https://play.nim-lang.org/#ix=4nHF" => "https://play.nim-lang.org/#ix=4nHH" |
23:17:39 | FromDiscord | <Hourglass [She/Her]> In reply to @Isofruit "<@204328759715692544> any suggestions how": Wouldn't clang be an option? |
23:21:25 | FromDiscord | <Phil> I was asking other people because I can't provide support for System64 about that question myself:â”I wouldn't know |
23:55:42 | FromDiscord | <tfp> how far are we from cyclic imports working? |
23:55:46 | FromDiscord | <tfp> is there a tracking bug |
23:56:53 | * | derpydoo joined #nim |