00:01:44 | FromDiscord | <pmunch> Then simply put the JSON in there and it should work.. |
00:02:38 | FromDiscord | <System64 ~ Flandre Scarlet> Play I have the JSON |
00:02:50 | * | jmdaemon joined #nim |
00:02:51 | FromDiscord | <Evrensel Kişilik> oh damn |
00:02:58 | FromDiscord | <Evrensel Kişilik> still couldn't solve 😭 |
00:03:08 | FromDiscord | <Evrensel Kişilik> where are deeeevss??? |
00:03:32 | FromDiscord | <Evrensel Kişilik> im just your debugger hero im not familiar with Nim 😱 |
00:03:52 | FromDiscord | <Elegantbeef> What? |
00:04:05 | FromDiscord | <Evrensel Kişilik> In reply to @Elegantbeef "What?": beeeeef help this person |
00:04:06 | FromDiscord | <Evrensel Kişilik> pls |
00:04:19 | FromDiscord | <Evrensel Kişilik> be a delicious beef |
00:04:22 | FromDiscord | <Elegantbeef> The author of the tool they're using is helping |
00:04:29 | FromDiscord | <Elegantbeef> Why would i attempt to help |
00:05:11 | FromDiscord | <Evrensel Kişilik> i knew you are not a kobe beef |
00:05:32 | FromDiscord | <pmunch> Because this author is going to sleep now \:P |
00:05:46 | FromDiscord | <Evrensel Kişilik> who is that |
00:05:47 | FromDiscord | <System64 ~ Flandre Scarlet> Progress https://media.discordapp.net/attachments/371759389889003532/949095275203543080/unknown.png |
00:05:58 | FromDiscord | <Elegantbeef> Damn it pmunch, tagging me in now |
00:07:00 | FromDiscord | <pmunch> Hooray! Now you should just have to figure out how to link the DLL. That is the missing symbol error |
00:07:12 | FromDiscord | <pmunch> Good night |
00:07:25 | FromDiscord | <System64 ~ Flandre Scarlet> In reply to @pmunch "Hooray! Now you should": Undefined reference to something : My WORST ENNEMY in programming |
00:07:43 | FromDiscord | <Evrensel Kişilik> In reply to @System64 "Progress": isn't there a Nim thing like a header after creating binding? |
00:07:49 | FromDiscord | <Evrensel Kişilik> you are using C header |
00:08:03 | FromDiscord | <System64 ~ Flandre Scarlet> and I did it! |
00:08:19 | FromDiscord | <System64 ~ Flandre Scarlet> let's create a window now |
00:08:24 | FromDiscord | <demotomohiro> Did you link all libraries your C library depends? |
00:08:30 | FromDiscord | <Evrensel Kişilik> In reply to @System64 "and I did it!": congratulations |
00:08:32 | FromDiscord | <System64 ~ Flandre Scarlet> yeah |
00:08:35 | FromDiscord | <System64 ~ Flandre Scarlet> thanks! |
00:11:30 | FromDiscord | <demotomohiro> In reply to @Evrensel Kişilik "you are using C": I think nim files that contains type, const definitions and procedure declaresions with `importc` pragma is similar to C's header file. |
00:12:00 | FromDiscord | <System64 ~ Flandre Scarlet> OMFG! https://media.discordapp.net/attachments/371759389889003532/949096841822216192/unknown.png |
00:12:03 | FromDiscord | <System64 ~ Flandre Scarlet> IT WORKS! |
00:12:12 | FromDiscord | <Evrensel Kişilik> 😱 |
00:12:14 | FromDiscord | <Evrensel Kişilik> all i can say |
00:12:16 | FromDiscord | <demotomohiro> Congrats! |
00:12:17 | FromDiscord | <Evrensel Kişilik> MEOW |
00:12:27 | FromDiscord | <System64 ~ Flandre Scarlet> Thanks! |
00:13:46 | FromDiscord | <Evrensel Kişilik> i want to write a driver for my mouse |
00:13:57 | FromDiscord | <Evrensel Kişilik> because Logitech's software is actually a garbage |
00:14:31 | FromDiscord | <System64 ~ Flandre Scarlet> But OOF it says errors https://media.discordapp.net/attachments/371759389889003532/949097471546634320/unknown.png |
00:14:43 | FromDiscord | <Evrensel Kişilik> In reply to @System64 "But OOF it says": 😭 |
00:14:49 | FromDiscord | <Elegantbeef> Make sure you have your editor setup properly |
00:14:58 | FromDiscord | <System64 ~ Flandre Scarlet> In reply to @Elegantbeef "Make sure you have": yeah |
00:15:01 | FromDiscord | <System64 ~ Flandre Scarlet> It is |
00:15:04 | FromDiscord | <Evrensel Kişilik> you could finish the game in Godot in this time |
00:15:10 | FromDiscord | <Elegantbeef> You set a project file? |
00:15:26 | FromDiscord | <System64 ~ Flandre Scarlet> In reply to @Elegantbeef "You set a project": wdym? |
00:15:47 | FromDiscord | <Evrensel Kişilik> what is the error? |
00:16:02 | FromDiscord | <Elegantbeef> inside your workspace settins you should have `nim.project: ["testTileEngine.nim"]` |
00:16:06 | FromDiscord | <System64 ~ Flandre Scarlet> false positive |
00:16:14 | FromDiscord | <System64 ~ Flandre Scarlet> In reply to @Elegantbeef "inside your workspace settins": Ah, I don't :/ |
00:16:58 | FromDiscord | <Elegantbeef> That should fix it, assuming you're using saem's extension |
00:17:00 | FromDiscord | <Evrensel Kişilik> OMG |
00:17:01 | FromDiscord | <Evrensel Kişilik> https://store.azeron.eu/ |
00:17:04 | FromDiscord | <Evrensel Kişilik> what is this? |
00:17:47 | FromDiscord | <Elegantbeef> 3D printed concept hardware |
00:18:04 | FromDiscord | <Evrensel Kişilik> In reply to @Elegantbeef "3D printed concept hardware": it says it is a keyboard |
00:18:06 | FromDiscord | <Evrensel Kişilik> 😱 |
00:18:16 | FromDiscord | <Elegantbeef> keypad\ |
00:18:19 | FromDiscord | <System64 ~ Flandre Scarlet> In reply to @Elegantbeef "That should fix it,": How can I do this? |
00:19:05 | FromDiscord | <Elegantbeef> `ctrl + shift + p` workspace settings, add it |
00:20:18 | FromDiscord | <Evrensel Kişilik> umm i think he means adding `"nim.project": ["testTileEngine.nim"]` to `.code-workspace` file in your project directory |
00:20:50 | FromDiscord | <Elegantbeef> Yes, like i explained how to do it |
00:35:40 | FromDiscord | <Patitotective> sent a code paste, see https://play.nim-lang.org/#ix=3Rik |
00:36:27 | FromDiscord | <Patitotective> (edit) "https://play.nim-lang.org/#ix=3Rik" => "https://play.nim-lang.org/#ix=3Ril" |
00:37:00 | FromDiscord | <Patitotective> Or should I have two `foo` procs, one for `varargs[string]` and the other for `openArray[string]`? 😕 |
00:37:28 | FromDiscord | <System64 ~ Flandre Scarlet> In reply to @Elegantbeef "Yes, like i explained": Well I don't really understand |
00:39:03 | FromDiscord | <demotomohiro> What happens when you pass `seq[string]` to `varargs[string]`? |
00:39:57 | * | ltriant quit (Ping timeout: 256 seconds) |
00:40:20 | FromDiscord | <Patitotective> In reply to @demotomohiro "What happens when you": :o |
00:40:51 | FromDiscord | <Evrensel Kişilik> In reply to @System64 "Well I don't really": did you do Ctrl + Shift + P and Save Workspace As? |
00:40:53 | FromDiscord | <huantian> In reply to @Evrensel Kişilik "umm i think he": I always liked `.vscode/settings.json` |
00:41:19 | FromDiscord | <Evrensel Kişilik> In reply to @huantian "I always liked `.vscode/settings.json`": oh it affects only that directory |
00:41:21 | FromDiscord | <System64 ~ Flandre Scarlet> In reply to @Evrensel Kişilik "did you do Ctrl": done |
00:41:31 | FromDiscord | <Evrensel Kişilik> but workspaces can include more than one directory |
00:41:37 | FromDiscord | <demotomohiro> In reply to @Patitotective "How do I convert": Nim manual says:↵A varargs parameter is an openarray parameter that additionally allows to pass a variable number of arguments to a procedure. The compiler converts the list of arguments to an array implicitly:↵https://nim-lang.org/docs/manual.html#types-varargs |
00:42:13 | FromDiscord | <Evrensel Kişilik> In reply to @System64 "done": ok then open `[workspace_name].code-workspace` file |
00:42:19 | FromDiscord | <Patitotective> In reply to @demotomohiro "Nim manual says: A": hehe i was doing something wrong thanks 🙃 |
00:42:34 | FromDiscord | <System64 ~ Flandre Scarlet> In reply to @Evrensel Kişilik "ok then open `[workspace_name].code-workspace`": done |
00:42:39 | FromDiscord | <cvv.tracy> How to start a procedure in a new thread? |
00:43:05 | FromDiscord | <Evrensel Kişilik> In reply to @System64 "done": ok now add `"nim.project": ["testTileEngine.nim"]` to `"settings"` key |
00:43:18 | FromDiscord | <Evrensel Kişilik> https://media.discordapp.net/attachments/371759389889003532/949104714333696051/unknown.png |
00:43:19 | FromDiscord | <Evrensel Kişilik> like this |
00:43:35 | FromDiscord | <System64 ~ Flandre Scarlet> done |
00:43:45 | FromDiscord | <Evrensel Kişilik> In reply to @System64 "done": sooo ok better restart it |
00:43:45 | FromDiscord | <Evrensel Kişilik> lol |
00:45:07 | FromDiscord | <System64 ~ Flandre Scarlet> well no error it seems, but no suggestions |
00:46:09 | FromDiscord | <Evrensel Kişilik> what should be done? |
00:47:12 | FromDiscord | <System64 ~ Flandre Scarlet> Loading :/ https://media.discordapp.net/attachments/371759389889003532/949105697105256508/unknown.png |
00:50:10 | FromDiscord | <Evrensel Kişilik> In reply to @System64 "Loading :/": oh what theme is that? |
00:50:33 | FromDiscord | <System64 ~ Flandre Scarlet> In reply to @Evrensel Kişilik "oh what theme is": Dracula + Remilia Scarlet as background |
00:50:48 | FromDiscord | <System64 ~ Flandre Scarlet> This is the background I use https://media.discordapp.net/attachments/371759389889003532/949106603305611325/48212642_p0.png |
00:51:18 | FromDiscord | <System64 ~ Flandre Scarlet> yeah I know it is badass |
00:51:28 | FromDiscord | <cvv.tracy> how do i multithread broaaaa |
00:51:39 | FromDiscord | <huantian> broaaaaaa? |
00:51:45 | FromDiscord | <cvv.tracy> didnt mean to put a |
00:51:48 | FromDiscord | <cvv.tracy> just meant bro |
00:52:14 | FromDiscord | <Elegantbeef> Depends what you're doing, there are taskpools, weave, then the stdlib threads |
00:52:29 | FromDiscord | <demotomohiro> In reply to @cvv.tracy "how do i multithread": https://nim-lang.org/docs/threads.html |
00:52:50 | FromDiscord | <Elegantbeef> sent a code paste, see https://play.nim-lang.org/#ix=3Rim |
00:52:53 | FromDiscord | <cvv.tracy> oh alr |
00:52:55 | FromDiscord | <cvv.tracy> thanks |
00:53:25 | FromDiscord | <Evrensel Kişilik> In reply to @System64 "Dracula + Remilia Scarlet": this is my VSCode https://media.discordapp.net/attachments/371759389889003532/949107260372697099/unknown.png |
00:53:32 | FromDiscord | <Evrensel Kişilik> what are you using for changing background? |
00:53:36 | FromDiscord | <cvv.tracy> sent a code paste, see https://play.nim-lang.org/#ix=3Rin |
00:53:42 | FromDiscord | <System64 ~ Flandre Scarlet> In reply to @Evrensel Kişilik "what are you using": Backgrounds, and you? |
00:53:59 | FromDiscord | <Evrensel Kişilik> In reply to @System64 "Backgrounds, and you?": backgrounds? 😱 im just using Doki Theme for VSCode |
00:54:02 | FromDiscord | <demotomohiro> In reply to @cvv.tracy "oh alr": As @Elegantbeef said, higher level multithreading library might better. |
00:54:11 | FromDiscord | <huantian> why do yall change your vscode background lmao↵is it not distracting |
00:54:24 | FromDiscord | <Elegantbeef> use a tuple for parameters and then you do `Thread[(Arg1, Arg2, aRg3)]` and do `createThread(thread, (10, 20, 30))` for instance |
00:54:34 | FromDiscord | <System64 ~ Flandre Scarlet> In reply to @Evrensel Kişilik "backgrounds? 😱 im just": https://marketplace.visualstudio.com/items?itemName=shalldie.background |
00:54:52 | FromDiscord | <Evrensel Kişilik> In reply to @System64 "https://marketplace.visualstudio.com/items?itemName": oh damn |
00:54:54 | FromDiscord | <Evrensel Kişilik> looooks good |
00:55:52 | FromDiscord | <System64 ~ Flandre Scarlet> yeah! |
00:57:08 | FromDiscord | <Evrensel Kişilik> did you upgrade to new version of VSCode? |
00:57:30 | FromDiscord | <Evrensel Kişilik> https://media.discordapp.net/attachments/371759389889003532/949108286534332506/unknown.png |
01:01:53 | FromDiscord | <System64 ~ Flandre Scarlet> I think it's updated automatically |
01:19:09 | FromDiscord | <mattrb> Is there a way to define a proc that accepts and calls operators like `+`, `/`, etc, or is that something I need a template for? |
01:19:41 | FromDiscord | <mattrb> I'm currently just using `template binaryOp(operator: untyped): untyped`, but I'm wondering if there's a way to do it without templates |
01:19:59 | FromDiscord | <mattrb> I can't seem to get the compiler to be happy about calling `+` a proc :p |
01:20:27 | FromDiscord | <mattrb> I found a post on the forum that seems vaguely related that implies it's not possible, but I figure it doesn't hurt to confirm here |
01:22:11 | FromDiscord | <Elegantbeef> think it's still right, though i'd do `template binaryOp(operator: proc)` |
01:22:27 | * | vicfred quit (Quit: Leaving) |
01:22:55 | FromDiscord | <System64 ~ Flandre Scarlet> How can I link to a dll already? |
01:23:28 | FromDiscord | <Elegantbeef> sent a code paste, see https://play.nim-lang.org/#ix=3Riq |
01:23:29 | FromDiscord | <Elegantbeef> Though it's not the most eloquent |
01:23:46 | FromDiscord | <Elegantbeef> `in` in this case is the module name |
01:25:01 | NimEventer | New question by itil memek cantik: Must have Nim function default argument as a mutable variable, see https://stackoverflow.com/questions/71345632/must-have-nim-function-default-argument-as-a-mutable-variable |
01:25:19 | FromDiscord | <mattrb> Thank you! |
01:25:20 | FromDiscord | <demotomohiro> In reply to @System64 "How can I link": Do you mean you want to link a libray to exising dll? I don't think it is possible without rebuilding the dll. |
01:25:42 | FromDiscord | <System64 ~ Flandre Scarlet> In reply to @demotomohiro "Do you mean you": It is but I forgot the command |
01:26:47 | FromDiscord | <Elegantbeef> https://nim-lang.org/docs/nimc.html#dynliboverride ? |
01:27:08 | FromDiscord | <System64 ~ Flandre Scarlet> I think it was with --passL |
01:27:09 | FromDiscord | <Elegantbeef> Oh do you mean the version numbering? |
01:27:36 | FromDiscord | <System64 ~ Flandre Scarlet> No, linking to DLL |
01:31:32 | FromDiscord | <System64 ~ Flandre Scarlet> In reply to @Elegantbeef "Oh do you mean": I have undefined references to... |
01:32:36 | * | jmdaemon quit (Ping timeout: 240 seconds) |
01:33:14 | FromDiscord | <demotomohiro> Just adding libraries to `--passL` to fix undefined reference error doesn't work? |
01:33:47 | FromDiscord | <System64 ~ Flandre Scarlet> In reply to @demotomohiro "Just adding libraries to": https://media.discordapp.net/attachments/371759389889003532/949117420675674232/unknown.png |
01:35:55 | FromDiscord | <demotomohiro> In reply to @System64 "": https://docs.microsoft.com/en-us/troubleshoot/windows-client/deployment/dynamic-link-library#load-time-dynamic-linking |
01:36:36 | FromDiscord | <demotomohiro> You need to pass `tileengine.lib` or `-ltiteengine`. |
01:37:33 | FromDiscord | <demotomohiro> On windows, .dll is not a file to pass linker. You pass .lib to linker. |
01:40:46 | FromDiscord | <System64 ~ Flandre Scarlet> In reply to @demotomohiro "On windows, *.dll is": it's static link then |
01:41:31 | * | jmdaemon joined #nim |
01:42:41 | FromDiscord | <System64 ~ Flandre Scarlet> okay so I don't understand |
01:43:35 | FromDiscord | <demotomohiro> There are 2 types of .lib file.↵.lib files for static linking and for Load-time dynamic linking. |
01:43:58 | FromDiscord | <System64 ~ Flandre Scarlet> okay now it's fixed |
01:44:22 | FromDiscord | <demotomohiro> There are 2 types of .lib file.↵.lib files for static linking and for Load-time dynamic linking.↵How static/dynamic lib works on linux and windows is different. |
01:44:53 | FromDiscord | <System64 ~ Flandre Scarlet> Windows is weir |
01:44:53 | FromDiscord | <System64 ~ Flandre Scarlet> (edit) "weir" => "weird" |
01:46:05 | FromDiscord | <System64 ~ Flandre Scarlet> sent a code paste, see https://play.nim-lang.org/#ix=3Riv |
01:47:13 | FromDiscord | <Elegantbeef> In what way? |
01:49:20 | FromDiscord | <System64 ~ Flandre Scarlet> like encapsulation or that kind of stuff |
01:50:01 | FromDiscord | <Elegantbeef> You make modules that hold the logic you want |
01:50:15 | FromDiscord | <Elegantbeef> Nothing here makes sense to wrap with an object |
01:50:59 | FromDiscord | <System64 ~ Flandre Scarlet> ah alright↵'cause I was thinking to that :↵https://github.com/megamarc/PyTilengine/blob/master/src/tilengine.py |
01:51:41 | FromDiscord | <demotomohiro> `createWindow`, don't take `TLN_ENGINE` and `processWindow` doesn't take window object. That looks hard to make OOP. |
01:51:54 | FromDiscord | <Elegantbeef> Well Nim isnt python, you can make the flags enums in Nim |
01:52:40 | FromDiscord | <Elegantbeef> sent a code paste, see https://play.nim-lang.org/#ix=3Rix |
01:52:55 | FromDiscord | <Elegantbeef> then you can take in `set[WindowFlags]` and do `cast[cint](flags)` |
01:53:08 | FromDiscord | <Elegantbeef> It's more idiomatic |
01:53:39 | FromDiscord | <System64 ~ Flandre Scarlet> oof seems more complex |
01:54:08 | FromDiscord | <Elegantbeef> Sets are better than `int` |
01:54:44 | FromDiscord | <Elegantbeef> No one wants to do `FullScreen or Vsync or S1` we want `{Fullscreen, Vsync, S1}` or even `{FullScreen .. S1}` |
01:55:40 | FromDiscord | <System64 ~ Flandre Scarlet> ah yeah, sounds cool! |
01:59:13 | FromDiscord | <huantian> In reply to @System64 "ah alright 'cause I": smh they aren't even using IntEnum! |
02:02:02 | FromDiscord | <System64 ~ Flandre Scarlet> In reply to @Elegantbeef "No one wants to": https://media.discordapp.net/attachments/371759389889003532/949124528519393330/unknown.png |
02:07:05 | FromDiscord | <Patitotective> How can I make `varargs` to require at least one element? |
02:07:38 | FromDiscord | <Elegantbeef> `assert myArgs.len > 0` |
02:07:57 | FromDiscord | <System64 ~ Flandre Scarlet> The sets method doesn't really work |
02:08:03 | FromDiscord | <Elegantbeef> It does |
02:08:09 | FromDiscord | <System64 ~ Flandre Scarlet> I have an error |
02:08:16 | FromDiscord | <Elegantbeef> Well fix it 😛 |
02:08:20 | FromDiscord | <Rika> what is it |
02:08:26 | FromDiscord | <Rika> beef wtf smh rude |
02:10:29 | FromDiscord | <System64 ~ Flandre Scarlet> ah maybe I didn't tell what type was the set |
02:11:47 | FromDiscord | <System64 ~ Flandre Scarlet> and yeah it was that |
02:11:50 | FromDiscord | <System64 ~ Flandre Scarlet> I'm dumb lol |
02:13:31 | FromDiscord | <System64 ~ Flandre Scarlet> but is ``cast[cint](flags)`` doing a bitwise OR operation? |
02:13:51 | FromDiscord | <Rika> no |
02:14:00 | FromDiscord | <Rika> its doing a cast of the bitset to an integer |
02:14:07 | FromDiscord | <Rika> the or operation is putting elements into the set |
02:14:26 | FromDiscord | <System64 ~ Flandre Scarlet> I need to do an or operation through all elements |
02:14:41 | FromDiscord | <Rika> just put all elements into the set then |
02:14:55 | FromDiscord | <System64 ~ Flandre Scarlet> this is what I did |
02:15:06 | FromDiscord | <demotomohiro> https://nim-lang.org/docs/manual.html#set-type-bit-fields |
02:15:29 | FromDiscord | <Rika> what is the problem then |
02:15:40 | FromDiscord | <Rika> what does your enum look like |
02:15:59 | FromDiscord | <Rika> your enum values should correspond to the exponent of 2 you would `or` an integer with |
02:16:01 | FromDiscord | <System64 ~ Flandre Scarlet> sent a code paste, see https://play.nim-lang.org/#ix=3Riz |
02:16:18 | FromDiscord | <Rika> so enum val 1 would be `0b1` or'ed |
02:16:36 | FromDiscord | <Rika> 1 will be `0b10` or'ed |
02:16:43 | FromDiscord | <Rika> 0 would be 0b1 i think |
02:16:52 | FromDiscord | <Rika> then 2 will be 100 etc |
02:17:19 | FromDiscord | <Rika> sent a code paste, see https://paste.rs/em6 |
02:17:45 | FromDiscord | <Rika> ~~i think its dumb to mix integers with a bitset... oh well that's their fault~~ |
02:19:18 | FromDiscord | <Rika> you can probably still use a set here, but it wont be as simple to do `cast` to convert between int and set anymore |
02:19:30 | FromDiscord | <Rika> i still recommend the set but eh |
02:19:45 | FromDiscord | <System64 ~ Flandre Scarlet> Okay fixed |
02:19:57 | * | jmdaemon quit (Ping timeout: 240 seconds) |
02:20:10 | FromDiscord | <System64 ~ Flandre Scarlet> sent a code paste, see https://play.nim-lang.org/#ix=3RiA |
02:20:17 | FromDiscord | <Rika> that works i guess |
02:20:20 | FromDiscord | <demotomohiro> sent a code paste, see https://play.nim-lang.org/#ix=3RiB |
02:20:43 | FromDiscord | <System64 ~ Flandre Scarlet> sent a code paste, see https://play.nim-lang.org/#ix=3RiC |
02:21:00 | FromDiscord | <Rika> sent a code paste, see https://paste.rs/NQw |
02:21:10 | FromDiscord | <Rika> well, i think THAT specific case would |
02:21:18 | FromDiscord | <Rika> but when you add S3 it would break |
02:22:57 | FromDiscord | <System64 ~ Flandre Scarlet> the For loops are beautiful |
02:25:18 | FromDiscord | <Elegantbeef> `sizeof(cint)` might be wrong |
02:27:04 | FromDiscord | <demotomohiro> Nim's `set[EnumType]` works like bit flags in C. |
02:27:05 | FromDiscord | <demotomohiro> https://play.nim-lang.org/#ix=3RiF |
02:27:37 | FromDiscord | <Traveler> sent a long message, see https://paste.rs/EBC |
02:27:56 | FromDiscord | <Traveler> both conversions for b an d c don't run |
02:28:19 | FromDiscord | <Traveler> (edit) "long message," => "code paste," | "http://ix.io/3RiH" => "https://play.nim-lang.org/#ix=3RiG" |
02:28:36 | * | ltriant joined #nim |
02:29:04 | FromDiscord | <Elegantbeef> `sizeof(TestSet)` is 1 so it really doesnt matter to use cint |
02:29:17 | FromDiscord | <Rika> In reply to @demotomohiro "Nim's `set[EnumType]` works like": yes and a portion of the api they are trying to recreate has an integer in the middle of the bitset |
02:30:48 | FromDiscord | <Traveler> Fixed it. PyObjects have a to method 😄 |
02:32:40 | FromDiscord | <System64 ~ Flandre Scarlet> so I can't have "none" twice? https://media.discordapp.net/attachments/371759389889003532/949132239449509908/unknown.png |
02:33:29 | FromDiscord | <Elegantbeef> `BlendFlags {.pure.}` or use overloadable enums |
02:35:09 | FromDiscord | <System64 ~ Flandre Scarlet> WTF is that https://media.discordapp.net/attachments/371759389889003532/949132863553560686/unknown.png |
02:35:26 | FromDiscord | <Rika> a union |
02:35:34 | FromDiscord | <System64 ~ Flandre Scarlet> I don't know what it is |
02:35:51 | FromDiscord | <Elegantbeef> A type that can be two types but has no type information |
02:36:12 | FromDiscord | <System64 ~ Flandre Scarlet> and is it possible to translate that to nim? |
02:36:13 | FromDiscord | <demotomohiro> I think you can use this: https://nim-lang.org/docs/manual.html#foreign-function-interface-union-pragma |
02:40:05 | FromDiscord | <System64 ~ Flandre Scarlet> sent a code paste, see https://play.nim-lang.org/#ix=3RiK |
02:40:51 | FromDiscord | <Elegantbeef> sent a code paste, see https://play.nim-lang.org/#ix=3RiL |
02:41:07 | FromDiscord | <Elegantbeef> Nim doesnt have anonymous object syntax |
02:41:09 | * | arkurious quit (Quit: Leaving) |
02:41:33 | FromDiscord | <Elegantbeef> you could also do `a: tuple[index: uint16, flags: uint16]` |
02:41:46 | FromDiscord | <System64 ~ Flandre Scarlet> tuples can work too yeah |
02:46:42 | FromDiscord | <System64 ~ Flandre Scarlet> and is it possible to limit the size of a string? |
02:47:01 | FromDiscord | <Rika> no |
02:47:28 | FromDiscord | <Rika> i mean i guess if you want to treat `array[N, char]` as a string (even then, its cursed since its essentially a cstring |
02:47:35 | FromDiscord | <Rika> unless you also manually manage capacity |
02:47:38 | FromDiscord | <Rika> at length |
02:47:40 | FromDiscord | <Rika> (edit) removed "at" |
02:47:50 | FromDiscord | <System64 ~ Flandre Scarlet> I can do that during treatments yeah |
02:47:55 | FromDiscord | <Rika> at that point you've adhoc'ed a string |
02:48:09 | FromDiscord | <Rika> maybe just check the length |
02:48:17 | FromDiscord | <Rika> and limit it if its over |
02:48:25 | FromDiscord | <retkid> is there a partial read function in the stdlib?↵↵I only need to read the header |
02:48:44 | FromDiscord | <retkid> (edit) "is there a partial read function in the stdlib?↵↵I only need to read the header ... " added "of a file" |
02:48:48 | FromDiscord | <Rika> https://nim-lang.org/docs/io.html#readBytes%2CFile%2CopenArray%5B%5D%2CNatural%2CNatural |
02:49:20 | FromDiscord | <retkid> this returns a byte sequence like (00, AA, FF)? |
02:49:26 | FromDiscord | <retkid> or the characters |
02:49:45 | FromDiscord | <Rika> bytes for readbytes chars for readchars |
02:49:48 | FromDiscord | <Rika> lol |
02:50:06 | FromDiscord | <retkid> AH |
02:50:08 | FromDiscord | <retkid> thank you <3 |
02:50:10 | FromDiscord | <Rika> lol |
02:55:26 | FromDiscord | <Patitotective> In reply to @Elegantbeef "`assert myArgs.len > 0`": but will it fix ambiguity errors? |
02:56:19 | FromDiscord | <retkid> SO i give it a file and an empty sequence of int8 |
02:56:31 | FromDiscord | <retkid> start and a total number of bytes |
02:57:35 | FromDiscord | <Elegantbeef> It will not |
03:00:45 | FromDiscord | <retkid> NGL |
03:01:02 | FromDiscord | <retkid> its kinda strange that you provide the function with a list of the same size as you want to read |
03:01:15 | FromDiscord | <retkid> it doesn't make much sense to me, why cant it just do that in the procs |
03:01:22 | FromDiscord | <Elegantbeef> What? |
03:01:23 | FromDiscord | <retkid> but im sure theres a good reason |
03:01:28 | FromDiscord | <retkid> lemme show youuu |
03:01:33 | FromDiscord | <Elegantbeef> Those are the low level read operations |
03:01:47 | FromDiscord | <retkid> sent a code paste, see https://play.nim-lang.org/#ix=3RiO |
03:01:50 | FromDiscord | <retkid> it works fine |
03:02:04 | FromDiscord | <retkid> but its just a bit strange i gotta put a mutable array in to get an output |
03:02:33 | FromDiscord | <Elegantbeef> you dont have to |
03:02:50 | FromDiscord | <Elegantbeef> God damn it |
03:02:53 | FromDiscord | <Elegantbeef> sent a code paste, see https://play.nim-lang.org/#ix=3RiP |
03:02:58 | FromDiscord | <retkid> it needs to be mutable |
03:03:36 | FromDiscord | <Elegantbeef> There no mutable array |
03:03:38 | FromDiscord | <Elegantbeef> sent a code paste, see https://play.nim-lang.org/#ix=3RiQ |
03:04:37 | FromDiscord | <retkid> where is read from? |
03:04:46 | FromDiscord | <Elegantbeef> Whatever the function for reading is |
03:04:58 | FromDiscord | <retkid> ah |
03:06:05 | FromDiscord | <retkid> There should be some kinda data type right, where you have an int linked with an arbitrary type, and you can like, assign it to anything |
03:06:09 | FromDiscord | <retkid> like [3] = "X" |
03:06:14 | FromDiscord | <retkid> like i dunno we can call it a table |
03:06:39 | FromDiscord | <Elegantbeef> That doesnt make much sense generally since you dont have the type information to make a type, but yes you can use a union |
03:07:33 | FromDiscord | <Rika> what? |
03:07:37 | FromDiscord | <Rika> im not sure what you're thinking |
03:08:28 | FromDiscord | <Elegantbeef> From why i understood it seemed they wanted a type that you can link an int to and just assign it to anything |
03:09:12 | FromDiscord | <Rika> ? a global table/array |
03:09:41 | FromDiscord | <Elegantbeef> Perhaps i dont know wasnt clear what they were saying |
03:09:44 | FromDiscord | <Elegantbeef> Atleast not clear to me |
03:16:06 | * | jmdaemon joined #nim |
04:06:02 | * | supakeen quit (Quit: WeeChat 3.4) |
04:06:32 | * | supakeen joined #nim |
04:20:46 | * | Gustavo6046 quit (Ping timeout: 245 seconds) |
04:24:59 | * | Gustavo6046 joined #nim |
04:31:09 | * | rockcavera quit (Remote host closed the connection) |
04:59:09 | * | slowButPresent quit (Quit: leaving) |
05:09:16 | FromDiscord | <surajvb> IMG-20220304-WA0006.jpg https://media.discordapp.net/attachments/371759389889003532/949171648878239744/IMG-20220304-WA0006.jpg |
05:09:19 | FromDiscord | <surajvb> It would be nice if we can resolve this issue while accessing nim-lang.org |
05:10:22 | FromDiscord | <Elegantbeef> https://github.com/nim-lang/website/issues |
05:13:05 | FromDiscord | <Rika> i am not getting the cert issue |
05:13:10 | FromDiscord | <Rika> it may be a geo thing |
05:53:37 | FromDiscord | <demotomohiro> I also dont get that error. |
06:01:55 | FromDiscord | <Rika> ~~we're both in japan so it still doesnt tell if its a location thing or not lol~~ |
06:02:06 | FromDiscord | <Elegantbeef> Fine in Canada here |
06:02:19 | FromDiscord | <Elegantbeef> That's like the entire globe |
06:02:24 | FromDiscord | <Elegantbeef> eh |
06:03:55 | FromDiscord | <Rika> strange then |
06:04:00 | FromDiscord | <Rika> might be their browser then |
06:04:26 | FromDiscord | <Elegantbeef> Could also possibly locally expired certs on their PC, no? |
06:05:47 | * | ltriant quit (Ping timeout: 256 seconds) |
06:27:45 | FromDiscord | <pmunch> @System64 ~ Flandre Scarlet\: Futhark should've wrapped your union as well. It knows how to handle them |
06:34:17 | * | ltriant joined #nim |
07:11:51 | * | jjido joined #nim |
07:25:07 | * | ltriant quit (Ping timeout: 256 seconds) |
07:29:20 | * | PMunch joined #nim |
07:58:26 | PMunch | Damn, Futhark to the rescue once again. The librdkafka bindings where missing some of the newer procedures, replaced the import rdkafka with four lines of Futhark imports and voila! |
08:02:38 | FromDiscord | <dilawar (Dilawar Singh)> Is there a libray that can help in locating various executable in Win32 platform e.g. if I say `locateExe("msbuild.exe")`, it can return the path of `MSBuild.exe`. Optionally I can pass list of directories to search into recursively? |
08:03:03 | FromDiscord | <Elegantbeef> https://nim-lang.org/docs/os.html#findExe%2Cstring%2Cbool%2CopenArray%5Bstring%5D |
08:07:23 | FromDiscord | <dilawar (Dilawar Singh)> It searches in `PATH`. Unfortunately, `choco install foo` may not add foo to `PATH`on Win32. I need to pass some locations to search into. Something like `cmake`'s `find_executable` https://cmake.org/cmake/help/v3.8/command/find_program.html?highlight=i |
08:09:02 | * | ltriant joined #nim |
08:10:24 | FromDiscord | <Rika> Well where should it search if not the PATH ? |
08:12:05 | * | Gustavo6046 quit (Quit: Leaving) |
08:15:40 | * | ltriant quit (Ping timeout: 272 seconds) |
08:15:53 | FromDiscord | <Elegantbeef> Recursively search the entire drive 😛 |
08:16:52 | * | jjido quit (Quit: My MacBook Air has gone to sleep. ZZZzzz…) |
08:20:30 | FromDiscord | <dilawar (Dilawar Singh)> I may have to before declaring failure in CI pipeline 🤔. `walkDirRec` looks promising. |
08:21:58 | FromDiscord | <dilawar (Dilawar Singh)> I hope people at chocolatey and Microsoft pay attention to `PATH`. But thats what it is. They sometimes put the executable into versioned folder that changes after every update!↵(@Rika) |
08:24:26 | FromDiscord | <Elegantbeef> MS be like "what's a path" |
08:24:33 | FromDiscord | <Elegantbeef> There's a few stones outside, use that |
08:31:36 | * | acidsys quit (Excess Flood) |
08:32:08 | * | acidsys joined #nim |
08:37:08 | PMunch | Haha :P |
08:37:46 | PMunch | I guess they would put it in the path, but then again since you don't often use the terminal in Windows they might just add an icon to the start menu and call it the day |
08:45:05 | * | ltriant joined #nim |
08:49:49 | * | ltriant quit (Ping timeout: 256 seconds) |
09:47:49 | * | om3ga quit (Ping timeout: 240 seconds) |
10:20:15 | FromDiscord | <fbpyr> [dilawar (Dilawar Singh)](https://matrix.to/#/@dilawar-599aa234d73408ce4f7246bd:gitter.im)\: did chocolatey no add it's bin path to `PATH`? it looks like it did over here. |
10:21:55 | FromDiscord | <System64 ~ Flandre Scarlet> In reply to @pmunch "<@380360389377916939>\: Futhark should've wrapped": Ah alright↵But is it possible to share my library with others? |
10:22:55 | PMunch | You can share the futhark_<hash>.nim file |
10:23:34 | PMunch | I've seen people add that to their repo and then use `when defined(useFuthark): <futhark stuff> else: import futhark_<hash>.nim` |
10:24:10 | PMunch | That way people can build against the actual C library, or trust that your bindings are for the same version and use those |
10:25:30 | FromDiscord | <System64 ~ Flandre Scarlet> ah alright |
10:25:36 | FromDiscord | <System64 ~ Flandre Scarlet> and can I rename the file? |
10:26:11 | PMunch | Sure, as long as you manually `import` it you can name it whatever you want |
10:26:25 | FromDiscord | <System64 ~ Flandre Scarlet> Oh alright, it's nice |
10:26:29 | PMunch | The hash is just there so that I can check whether the cache exists or not |
10:27:12 | PMunch | I basically just hash all the arguments you pass in and use that, this way if you change anything in the `importc` block it will detect if it needs to build a new file or just use the old one |
10:27:32 | FromDiscord | <System64 ~ Flandre Scarlet> ah I understand now↵But now I try to make the interaction with the library higher level |
10:30:03 | FromDiscord | <System64 ~ Flandre Scarlet> Btw does Nim supports something like Class method? |
10:30:16 | PMunch | Class method? |
10:30:17 | FromDiscord | <Elegantbeef> Oh pmunch you might be interested, started toying with macros that use distinct Nimnodes to expand functionality. Quite nice so far https://github.com/beef331/micros/blob/master/tests/test1.nim |
10:30:36 | FromDiscord | <Elegantbeef> No Nim doesnt have Classes, if you want a type bound procedure you do `proc myProcName(_: typedesc[MyType])` |
10:31:22 | FromDiscord | <Elegantbeef> `proc doThing(_: typedesc[int]) = echo "hello"` is invokable `int.doThing()` |
10:31:50 | FromDiscord | <System64 ~ Flandre Scarlet> In reply to @Elegantbeef "No Nim doesnt have": Ah alright so I can do myObject.doSomething()? |
10:32:17 | FromDiscord | <Elegantbeef> Nim allows you to do `doSomething(myObject)` or `doSomething(myObject)` with all procedures |
10:32:38 | FromDiscord | <Elegantbeef> It's called "Method Call Syntax" in the manual and "Uniform Function Calling Syntax" everywhere else |
10:32:45 | FromDiscord | <Elegantbeef> Damn it i'm tired |
10:32:46 | FromDiscord | <enthus1ast> myObject.doSomething() beef means ;) |
10:32:54 | FromDiscord | <Elegantbeef> Thanks |
10:33:06 | FromDiscord | <System64 ~ Flandre Scarlet> aah alright, thanks |
10:33:17 | FromDiscord | <Elegantbeef> I say tired but i was just typing and not proofreading, but tired is easier |
10:34:14 | FromDiscord | <Elegantbeef> Also that's not a Class method in other languages, that'd be a member function |
10:34:23 | FromDiscord | <Elegantbeef> Or instance function |
10:34:36 | FromDiscord | <Elegantbeef> Atleast in C#/Java i guess |
10:34:44 | FromDiscord | <Elegantbeef> Anyway i go sleep now |
10:35:29 | FromDiscord | <System64 ~ Flandre Scarlet> and does it have the Self keywordN |
10:35:31 | FromDiscord | <System64 ~ Flandre Scarlet> (edit) "keywordN" => "keyword?" |
10:39:34 | FromDiscord | <Rika> there is no concept of "self" or "this" in nim, you can just call the first param. that |
10:40:34 | FromDiscord | <Rika> so idk `proc takeString(self: StringyThing): string = return self.thingyString` |
10:41:06 | FromDiscord | <Rika> called `aStringyThing.takeString()` or the other variants as eluded to above |
10:41:13 | FromDiscord | <Rika> its just a parameter name |
10:44:49 | FromDiscord | <System64 ~ Flandre Scarlet> In reply to @Rika "so idk `proc takeString(self:": Ah alright so I have to pass the first parameter anyway then? |
10:44:54 | * | Guest2 joined #nim |
10:45:13 | FromDiscord | <Rika> yeah there is no concept of classes and procs bound to types here |
10:45:26 | FromDiscord | <Rika> its a strange language if you consider that |
10:45:46 | FromDiscord | <System64 ~ Flandre Scarlet> Ah I see↵so doing myObject.doSomething() is useless, right? |
10:45:47 | * | Guest2 quit (Client Quit) |
10:45:54 | FromDiscord | <Rika> why would it be? |
10:46:05 | FromDiscord | <Rika> i mean sure it could be useless if you make the proc useless but huh? |
10:46:35 | FromDiscord | <System64 ~ Flandre Scarlet> it would be↵↵myObject.doSomething(myObject, a, b, c) |
10:49:12 | FromDiscord | <Rika> ? no, when you do `myObject.doSomething()` it is equivalent to `doSomething(myObject)` so myObject is the first param |
10:50:15 | FromDiscord | <System64 ~ Flandre Scarlet> ah alright |
10:53:28 | FromDiscord | <Rika> 👌 |
10:55:33 | FromDiscord | <System64 ~ Flandre Scarlet> sent a code paste, see https://paste.rs/Jz2 |
10:56:14 | FromDiscord | <Rika> in this case, it is `discard TLN_ENGINE.deleteEngine()`, and `self` is a type not an object |
10:56:25 | FromDiscord | <Rika> i think what you want is `self: TLN_ENGINE` |
10:57:47 | FromDiscord | <System64 ~ Flandre Scarlet> TLN_Engine is a struct in C, so it's an object on nim↵But I want this proc to be called only on a TLN_Engine object |
10:58:45 | FromDiscord | <Rika> so do you want `self` to be the struct, or the type of the struct |
10:59:00 | FromDiscord | <Rika> In reply to @Rika "i think what you": do you want to access the fields of the struct? if so, you want this |
10:59:16 | FromDiscord | <demotomohiro> sent a code paste, see https://paste.rs/Rnr |
10:59:22 | FromDiscord | <System64 ~ Flandre Scarlet> ah wait |
10:59:28 | FromDiscord | <System64 ~ Flandre Scarlet> TLN_Engine is a pointer |
10:59:32 | FromDiscord | <System64 ~ Flandre Scarlet> (edit) "TLN_Engine is a pointer ... " added "to a struct" |
10:59:40 | FromDiscord | <Rika> yes okay |
10:59:46 | FromDiscord | <Rika> my question still applies |
11:00:01 | FromDiscord | <System64 ~ Flandre Scarlet> I don't want to access the fields |
11:00:15 | FromDiscord | <Rika> ok wait let me read up on the context |
11:00:36 | FromDiscord | <demotomohiro> How `TLN_ENGINE` is defined in your Nim code? |
11:00:41 | FromDiscord | <Rika> sent a code paste, see https://play.nim-lang.org/#ix=3RjV |
11:01:15 | FromDiscord | <Rika> In reply to @System64 "I don't want to": do you need the pointer of the struct as a value in the proc |
11:01:28 | FromDiscord | <Rika> if you need to pass the value, use `self: TLN_Engine` |
11:02:10 | * | ltriant joined #nim |
11:03:45 | FromDiscord | <System64 ~ Flandre Scarlet> ah thanks, it works |
11:08:23 | * | ltriant quit (Ping timeout: 256 seconds) |
11:33:51 | FromDiscord | <System64 ~ Flandre Scarlet> sent a code paste, see https://paste.rs/QpU |
11:43:40 | * | ltriant joined #nim |
11:43:50 | FromDiscord | <System64 ~ Flandre Scarlet> I should be able to access the fields https://media.discordapp.net/attachments/371759389889003532/949270944743047229/unknown.png |
11:48:28 | NimEventer | New thread by Mardiyah: To prepend binary operation like binary append, see https://forum.nim-lang.org/t/8974 |
11:58:02 | FromDiscord | <demotomohiro> In reply to @System64 "I should be able": How type of `color` is defined? |
11:58:29 | NimEventer | New thread by Drkameleon: ReadLineFromStdin & Windows, see https://forum.nim-lang.org/t/8975 |
11:58:38 | FromDiscord | <System64 ~ Flandre Scarlet> sent a code paste, see https://play.nim-lang.org/#ix=3Rk0 |
11:59:31 | FromDiscord | <vindaar> @System64 ~ Flandre Scarlet\: you write `color.r` instead of `self.r` etc. |
11:59:42 | FromDiscord | <System64 ~ Flandre Scarlet> ah yeah I'm dumb lol |
12:00:05 | FromDiscord | <System64 ~ Flandre Scarlet> but thanks |
12:02:10 | PMunch | @Elegantbeef, that sounds like it would require a lot of casting back and forth though |
12:02:14 | PMunch | I considered it for macroutils |
12:05:43 | PMunch | @System64_~_Flandre_Scarlet, why have you marked your object as pure? |
12:06:02 | * | supakeen quit (Quit: WeeChat 3.4) |
12:06:32 | * | supakeen joined #nim |
12:10:03 | FromDiscord | <demotomohiro> It seems using pure pragma to object type without inheritable pragma do nothing.↵Non-inheritable object types dont have runtime type info.↵https://internet-of-tomohiro.netlify.app/nim/faq.en.html#type-how-pure-pragma-dotpuredot-work-to-object-typeqmark |
12:12:26 | FromDiscord | <demotomohiro> But Nim in future version can add runtime type info to Non-inheritable object types? |
12:12:39 | FromDiscord | <Rika> can but i doubt they will |
12:18:52 | FromDiscord | <System64 ~ Flandre Scarlet> In reply to @PMunch "@System64_~_Flandre_Scarlet, why have you": To avoid variable name conflict |
12:19:24 | FromDiscord | <System64 ~ Flandre Scarlet> In reply to @System64 "so I can't have": To avoid this problem |
12:19:27 | PMunch | @demotomohiro, exactly `pure` is only used for `inheritable` to remove the runtime type information from the object |
12:19:51 | PMunch | @System64_~_Flandre_Scarlet, that pragma doesn't do anything at all |
12:20:06 | PMunch | (when not combined with `{.inheritable.}` |
12:20:08 | PMunch | ) |
12:20:09 | FromDiscord | <System64 ~ Flandre Scarlet> In reply to @PMunch "@System64_~_Flandre_Scarlet, that pragma doesn't": Ah! And why does it work with enums? |
12:20:39 | PMunch | Because enums are something else than objects, and the `pure` pragma for enums is different from the one for objects |
12:20:45 | PMunch | They really shouldn't be called the same.. |
12:21:30 | FromDiscord | <System64 ~ Flandre Scarlet> Woops, that's confusing! |
12:21:58 | FromDiscord | <demotomohiro> Yes. they should be different name. |
12:22:47 | PMunch | Haha, yeah you're the second person in just a week or so which have tried to use pure in this way |
12:27:33 | FromDiscord | <fbpyr> hmm.. 🤔↵trying to port a tiny (14sloc) C++ hello world plugin to nim\: https://play.nim-lang.org/#ix=3Rk7↵how would I import ControllerFactory from the header file?↵nim compiler complains about `undeclared identifier: 'ControllerFactory'` |
12:29:28 | PMunch | @fbpyr, you seem to have a misunderstanding in how wrapping works |
12:30:57 | FromDiscord | <demotomohiro> You need to define `ControllerFactory` type in Nim code somehow. |
12:31:00 | PMunch | Nowhere in your code do you define ControllerFactory, which is what the error message is about. That `importc` tells Nim that the procedure `plugin_x64_init` is called `ControllerFactory` in the C++ code. |
12:32:08 | PMunch | If you define `type ControllerFactory = distinct object` and then just do `{.importc, header: "CwAPI3D.h".}` on the procedure (assuming it is called `plugin_x64_init` in the C code) it should work. |
12:32:20 | FromDiscord | <demotomohiro> This section in Nim manual would help you: https://nim-lang.org/docs/manual.html#implementation-specific-pragmas-importcpp-pragma |
12:32:25 | FromDiscord | <fbpyr> yes the error is very clear. I was under the impression maybe that .importc. would somehow introduce it, but it already felt like I was an import.. |
12:32:41 | FromDiscord | <fbpyr> ah thanks for the pointer!! 😌 |
12:33:17 | PMunch | Ah wait, since you actually try to use aFactory you need to have the type definition for it in Nim. |
12:33:26 | PMunch | So you can't just call it a distinct object |
12:34:45 | PMunch | Nah importc only tells Nim how to import the current symbol. So e.g. you could do `proc init(aFactory: ptr ControllerFactory): bool {.importc: "plugin_x64_init".}` to have it be called `init` in Nim code, but still resolve to `plugin_x64_init` in C code. |
12:35:54 | FromDiscord | <fbpyr> I see - I will try that and read up in the importcpp pragma.. |
12:36:43 | FromDiscord | <fbpyr> my understanding was, that the function in cpp was called `plugin_x64_init` as the expected name for the entrypoint of the plugin. |
12:38:23 | FromDiscord | <fbpyr> bummer, that c2nim had troubles with the snippet, when I tried it.. |
12:41:01 | * | jmdaemon quit (Ping timeout: 256 seconds) |
12:42:10 | FromDiscord | <fbpyr> thx for the explanation - now I understand the .importc pragma a little better. ↵yes then what I had in the snippet just makes no sense.. |
13:12:31 | PMunch | If the function in C++ is called plugin_x64_init then you can simply do `proc plugin_x64_init(args): returntype {.importc.}` |
13:13:11 | PMunch | But you can't do e.g. `proc pluginx64Init(args): returntype {.importc.}`, it has to be verbatim otherwise you need to give a string value to `importc` |
13:17:36 | FromDiscord | <fbpyr> in their example the plugin\_x64\_init seems to be the entry point. the `ControllerFactory` is leading to a class called `ICwAPI3DControllerFactory` so I assume I have to somehow introduce it to nim.. it seems like there is also a way way nimterop, but ideally I would love to understand the basics first.. |
13:19:48 | FromDiscord | <fbpyr> aha so the returntype of bool would need the `{.importc.}` |
13:20:04 | PMunch | If you figure out how C++ <=> Nim interop should work you could make a PR to Futhark so you never have to think about it again :P |
13:20:34 | PMunch | @fbpyr, no the pragma is attached to the proc, not the returntype |
13:20:52 | PMunch | I just typed returntype because I couldn't remember what the actual return type was :P |
13:20:57 | FromDiscord | <fbpyr> oh ok. |
13:21:18 | FromDiscord | <fbpyr> ok, was simple bool.. |
13:26:01 | * | slowButPresent joined #nim |
13:31:48 | * | PMunch quit (Quit: Leaving) |
13:52:37 | FromDiscord | <fbpyr> ..so after reading the `ImportCpp pragma` I am using the ControllerFactory via `importcpp`\:↵https://play.nim-lang.org/#ix=3Rkt↵now compiler errors at line 15 with `Error: attempting to call undeclared routine: 'getUtilityController'`↵does that mean I would need to introduce each class method individually, additionally to the class itself? 🤔 |
13:55:34 | FromDiscord | <demotomohiro> If you want to use it, Nim need to know about class method. |
13:58:09 | FromDiscord | <fbpyr> I see, so it does not come with the class.. 🙁 |
13:58:41 | FromDiscord | <fbpyr> I hoped it would get the class with its methods.. 😉 |
14:00:37 | FromDiscord | <demotomohiro> Nim compiler doesn't try to read C/C++ files and understand C/C++ code. You need to tell Nim about types/constants/functions in C/C++ library so that Nim can generate C or C++ code that correctly use the library. |
14:02:57 | FromDiscord | <demotomohiro> It seems nimterop or futhark read and understand C code and generates Nim type definitions and procedure declarations with proper pragma. |
14:03:27 | FromDiscord | <System64 ~ Flandre Scarlet> In reply to @demotomohiro "It seems nimterop or": And it works well! |
14:03:54 | FromDiscord | <System64 ~ Flandre Scarlet> Btw, is it a good start? https://media.discordapp.net/attachments/371759389889003532/949306195590660126/tilengine.nim |
14:09:21 | FromDiscord | <fbpyr> thank you @demotomohiro . I guess I should check out nimterop then.. 🙂 |
14:14:47 | FromDiscord | <demotomohiro> @System64 ~ Flandre Scarlet you should use `cint` instead of `int` if it is passed to C function.↵https://internet-of-tomohiro.netlify.app/nim/faq.en.html#type-what-is-the-difference-between-cintslashcfloat-and-intslashfloatqmark |
14:16:09 | FromDiscord | <demotomohiro> !eval echo sizeof(int), ", ", sizeof(cint) |
14:16:12 | NimBot | 8, 4 |
14:16:51 | * | arkurious joined #nim |
14:17:35 | FromDiscord | <demotomohiro> That means sizeof(int) in Nim and sizeof(int) in C is different in NimBot's machine. |
14:17:47 | FromDiscord | <System64 ~ Flandre Scarlet> Ah I see! good to know |
14:17:53 | FromDiscord | <System64 ~ Flandre Scarlet> and is there C variants for uint8? |
14:18:31 | FromDiscord | <demotomohiro> `uint8_t`? |
14:18:56 | FromDiscord | <System64 ~ Flandre Scarlet> it's the C version of uint8_t? |
14:19:10 | FromDiscord | <System64 ~ Flandre Scarlet> !eval echo sizeof(uint8), ", ", sizeof(uint8_t) |
14:19:12 | NimBot | Compile failed: /usercode/in.nim(1, 34) Error: undeclared identifier: 'uint8_t' |
14:20:34 | FromDiscord | <demotomohiro> `uint8_t` is a type in C, not Nim. Nim has uint8. |
14:21:23 | FromDiscord | <System64 ~ Flandre Scarlet> In reply to @demotomohiro "`uint8_t` is a type": and the size is the same? |
14:21:34 | Amun-Ra | yes |
14:21:39 | FromDiscord | <System64 ~ Flandre Scarlet> ah alright |
14:21:53 | FromDiscord | <System64 ~ Flandre Scarlet> only ints are differents it seems |
14:22:10 | Amun-Ra | only those without fixed width |
14:22:11 | FromDiscord | <System64 ~ Flandre Scarlet> !eval echo sizeof(short), ", ", sizeof(cshort) |
14:22:13 | NimBot | Compile failed: /usercode/in.nim(1, 13) Error: undeclared identifier: 'short' |
14:22:23 | FromDiscord | <System64 ~ Flandre Scarlet> ah wait |
14:22:32 | FromDiscord | <System64 ~ Flandre Scarlet> !eval echo sizeof(int16), ", ", sizeof(cshort) |
14:22:35 | NimBot | 2, 2 |
14:23:19 | FromDiscord | <System64 ~ Flandre Scarlet> ah alright, shorts have the same size |
14:23:22 | Amun-Ra | it's not that those have different size, it's just they are not interchangeable when doing interop |
14:24:30 | FromDiscord | <System64 ~ Flandre Scarlet> Ah alright |
14:24:51 | FromDiscord | <System64 ~ Flandre Scarlet> sent a code paste, see https://play.nim-lang.org/#ix=3RkF |
14:25:17 | Amun-Ra | it's be done automagically |
14:25:27 | FromDiscord | <System64 ~ Flandre Scarlet> ah alright |
14:25:46 | Amun-Ra | you have to use `$` when returning cstring to nim string |
14:25:58 | FromDiscord | <System64 ~ Flandre Scarlet> good to know |
14:26:42 | FromDiscord | <System64 ~ Flandre Scarlet> Fixed I think https://media.discordapp.net/attachments/371759389889003532/949311928671547442/tilengine.nim |
14:33:18 | FromDiscord | <demotomohiro> I hope it works. I'm sleepy. Good night. |
14:36:35 | FromDiscord | <System64 ~ Flandre Scarlet> Good night and it runs at least |
14:36:58 | FromDiscord | <System64 ~ Flandre Scarlet> is it possible to divide the module in submodules but keeping one file? |
14:49:19 | FromDiscord | <retkid> whats the ultimate for iterable object |
14:49:30 | FromDiscord | <retkid> (edit) "whats the ultimate ... for" added "generic" |
14:49:47 | FromDiscord | <retkid> just any object with a type i can iterate over |
14:49:52 | FromDiscord | <retkid> seq or array, closed or open |
14:50:01 | FromDiscord | <retkid> (edit) |
14:50:48 | FromDiscord | <retkid> Iterable[T] |
14:51:04 | NimEventer | New thread by Drkameleon: Error: unhandled exception: index 2 not in 0 .. 1 [IndexDefect], see https://forum.nim-lang.org/t/8976 |
14:51:54 | * | oisota6 joined #nim |
14:52:50 | * | flynn4 joined #nim |
14:53:01 | * | greyrat_ joined #nim |
14:54:10 | * | [RMS] joined #nim |
14:55:36 | * | lumidify_ joined #nim |
14:59:52 | * | greyrat quit (*.net *.split) |
14:59:52 | * | lumidify quit (*.net *.split) |
14:59:52 | * | flynn quit (*.net *.split) |
14:59:52 | * | xet7 quit (*.net *.split) |
14:59:52 | * | oisota quit (*.net *.split) |
14:59:52 | * | arkanoid quit (*.net *.split) |
14:59:52 | * | [R] quit (*.net *.split) |
14:59:53 | * | oisota6 is now known as oisota |
14:59:57 | * | flynn4 is now known as flynn |
15:00:39 | * | arkanoid joined #nim |
15:06:53 | * | xet7 joined #nim |
15:18:55 | FromDiscord | <System64 ~ Flandre Scarlet> Should I turn my objects into reference type? |
15:24:35 | * | neurocyte0917090 joined #nim |
15:30:10 | FromDiscord | <auxym> problably not, unless you need reference semantics: multiple references to a single object |
15:45:22 | FromDiscord | <System64 ~ Flandre Scarlet> In reply to @auxym "problably not, unless you": But if I have to pass an object to a function? |
15:45:41 | FromDiscord | <System64 ~ Flandre Scarlet> it would be slower to pass it as value than as ref |
15:46:26 | * | kayabaNerve_ joined #nim |
15:46:46 | FromDiscord | <auxym> nim optimizes this automatically: is the object is "large enough", nim passes it as a reference. If it's small, the cost of a copy is smaller than a dereference so it is passed by value (copy) |
15:47:06 | FromDiscord | <auxym> (var arguments are always passed by ref, somewhat obviously) |
15:47:47 | FromDiscord | <System64 ~ Flandre Scarlet> Aaah alright, so I'll let Nim doing this for me |
15:47:59 | FromDiscord | <System64 ~ Flandre Scarlet> still pretty clever |
15:48:33 | FromDiscord | <System64 ~ Flandre Scarlet> since if I had to write C code, I'd pass every struct by pointer |
15:49:39 | NimEventer | New question by itil memek cantik: Nim&#39;s way to clear empty character variable, see https://stackoverflow.com/questions/71353852/nim39s-way-to-clear-empty-character-variable |
16:19:28 | * | TechAspirer joined #nim |
16:21:45 | * | kayabaNerve_ quit (Ping timeout: 252 seconds) |
16:35:19 | NimEventer | New thread by Mardiyah: Nim's way to clear empty character variable, see https://forum.nim-lang.org/t/8977 |
16:36:16 | * | vicfred joined #nim |
16:37:52 | NimEventer | New post on r/nim by Familiar_Ad_8919: what exactly does this error mean?, see https://reddit.com/r/nim/comments/t6mzwv/what_exactly_does_this_error_mean/ |
16:40:22 | * | icebattle quit (Ping timeout: 250 seconds) |
16:41:02 | * | TechAspirer quit (Ping timeout: 260 seconds) |
16:42:48 | * | Gustavo6046 joined #nim |
16:52:12 | * | icebattle joined #nim |
17:40:21 | * | jjido joined #nim |
17:57:46 | * | jjido quit (Quit: My MacBook Air has gone to sleep. ZZZzzz…) |
17:58:40 | FromDiscord | <haoliang> why IndexDefect was designed to be `defect`? i used to use `try: dict[key] except IndexError:` pattern, i was thought that pattern is common. |
18:02:31 | FromDiscord | <michaelb> In reply to @haoliang "why IndexDefect was designed": `IndexError` is documented as deprecated, not sure how recent that is |
18:02:42 | FromDiscord | <michaelb> https://nim-lang.org/1.6.4/system.html#IndexError |
18:04:24 | FromDiscord | <michaelb> seems in 1.4 `IndexError` was a simple alias for `IndexError`, which was not great since "defect" in Nim is supposed to means an uncatchable error |
18:04:32 | FromDiscord | <michaelb> (edit) "means" => "mean" |
18:04:58 | FromDiscord | <michaelb> and therefore referring to it as `IndexError` could give a wrong impression those reading the code |
18:05:17 | FromDiscord | <michaelb> (edit) "and therefore referring to it as `IndexError` could give a wrong impression ... thosesome" added "to" | "the" => "some" | "those readingsomecode ... " added "using that alias" |
18:06:18 | FromDiscord | <michaelb> (edit) "`IndexError`," => "`IndexDefect`," |
18:06:54 | FromDiscord | <auxym> In reply to @haoliang "why IndexDefect was designed": what is `dict`? If it's a `Table`, then an unknown key should raise `KeyError`, not `IndexError`. `KeyError` is catchable. |
18:07:17 | FromDiscord | <auxym> https://nim-lang.org/docs/tables.html#%5B%5D%2CTable%5BA%2CB%5D%2CA |
18:09:49 | * | rockcavera joined #nim |
18:09:49 | * | rockcavera quit (Changing host) |
18:09:49 | * | rockcavera joined #nim |
18:12:39 | FromDiscord | <haoliang> In reply to @auxym "what is `dict`? If": good point, i am trying to find that use case back |
18:19:28 | FromDiscord | <haoliang> sent a code paste, see https://play.nim-lang.org/#ix=3RlC |
18:19:35 | FromDiscord | <haoliang> (edit) |
18:23:52 | FromDiscord | <dom96> why don't you do a length check? |
18:24:32 | FromDiscord | <System64 ~ Flandre Scarlet> Why??? https://media.discordapp.net/attachments/371759389889003532/949371784371793970/unknown.png |
18:24:56 | FromDiscord | <haoliang> i sure can, but i prefer this way |
18:26:00 | * | vicfred quit (Quit: Leaving) |
18:29:26 | FromDiscord | <konsumlamm> In reply to @System64 "Why???": i think you meant to write `spriteData.y`? i.e. lowercase s |
18:30:31 | FromDiscord | <System64 ~ Flandre Scarlet> oooh god I'm dumb lol |
18:31:10 | FromDiscord | <System64 ~ Flandre Scarlet> okay pointer problem now https://media.discordapp.net/attachments/371759389889003532/949373453092413510/unknown.png |
18:33:12 | FromDiscord | <haoliang> sent a code paste, see https://play.nim-lang.org/#ix=3RlE |
18:33:16 | * | jjido joined #nim |
18:45:34 | FromDiscord | <Waldecir Santos> Is the result of a proc always `var/immutable` or do I need to add var ? |
18:50:23 | FromDiscord | <konsumlamm> what? |
18:50:39 | FromDiscord | <konsumlamm> the result of a proc isn't a variable in the first place |
18:51:42 | FromDiscord | <System64 ~ Flandre Scarlet> @konsumlamm is my error normal? I converted to pointer |
18:52:20 | FromDiscord | <Waldecir Santos> In reply to @konsumlamm "the result of a": I mean if a proc returns a object, this object is immutable ? |
18:52:41 | FromDiscord | <konsumlamm> immutability is not a property of a value but of a variable |
18:52:47 | FromDiscord | <konsumlamm> in Nim |
18:53:00 | FromDiscord | <konsumlamm> In reply to @System64 "<@!312654963694108674> is my error": idk, i've never worked with `pointer` |
18:53:10 | * | jmdaemon joined #nim |
18:56:12 | * | vicfred joined #nim |
18:59:34 | FromDiscord | <hmmm> sent a code paste, see https://play.nim-lang.org/#ix=3RlL |
19:00:09 | FromDiscord | <Waldecir Santos> You can probably overload `` for it, but no we don't have it right now |
19:00:13 | FromDiscord | <Elegantbeef> `import std/strutils; let x = repeat("A", 10)` |
19:00:21 | FromDiscord | <Waldecir Santos> (edit) "``" => "``` `" |
19:00:27 | FromDiscord | <hmmm> ty wakd and ty beefzor |
19:02:15 | FromDiscord | <Waldecir Santos> I'm trying to "chain" calls but the second call keep saying that the value is immutable, but works if I create a var first, not sure what to do to make proc return an "var/muttable" object |
19:03:02 | FromDiscord | <Elegantbeef> You can either use `sugar.dup` or if the proc takes a `var T` return a `var T` |
19:03:58 | FromDiscord | <Elegantbeef> For the dup method |
19:04:01 | FromDiscord | <Elegantbeef> sent a code paste, see https://play.nim-lang.org/#ix=3RlO |
19:04:11 | FromDiscord | <Waldecir Santos> you mean `proc myproc(obj; var Obj[T[) var Obj[t]` adding var to the return ? |
19:04:24 | * | jjido quit (Quit: My MacBook Air has gone to sleep. ZZZzzz…) |
19:04:29 | FromDiscord | <Waldecir Santos> (edit) "Obj[T[)" => "Obj[T]):" | "Obj[t]`" => "Obj[t] =`" |
19:05:42 | FromDiscord | <Elegantbeef> sent a code paste, see https://play.nim-lang.org/#ix=3RlP |
19:06:15 | FromDiscord | <Elegantbeef> In Nim `var T` is a mutable reference that is ensured does not outlive the place of borrow |
19:06:19 | FromDiscord | <Waldecir Santos> Oh nice so `var` is valid in the return portion, not sure why this is failing for me, let me play with your example thank you ! |
19:06:36 | FromDiscord | <Elegantbeef> The borrow site has to come from a parameter |
19:06:59 | FromDiscord | <Elegantbeef> sent a code paste, see https://play.nim-lang.org/#ix=3RlQ |
19:09:24 | FromDiscord | <Waldecir Santos> So it cannot be an object, it needs to be a property of an object, right ? |
19:09:35 | FromDiscord | <Elegantbeef> It can be an object |
19:10:46 | FromDiscord | <Elegantbeef> sent a code paste, see https://play.nim-lang.org/#ix=3RlS |
19:10:58 | FromDiscord | <Waldecir Santos> Got it, let me play around with your example , thank you ! |
19:14:09 | FromDiscord | <System64 ~ Flandre Scarlet> sent a code paste, see https://play.nim-lang.org/#ix=3RlT |
19:14:16 | FromDiscord | <Elegantbeef> `s.addr` |
19:23:36 | FromDiscord | <System64 ~ Flandre Scarlet> ah thanks |
19:24:34 | FromDiscord | <System64 ~ Flandre Scarlet> sent a code paste, see https://play.nim-lang.org/#ix=3RlX |
19:26:39 | FromDiscord | <Elegantbeef> Not in that case since you're taking a pointer to the stack |
19:27:09 | FromDiscord | <System64 ~ Flandre Scarlet> In reply to @Elegantbeef "Not in that case": ah alright so I'm still safe I guess? |
19:27:15 | * | xet7 quit (Quit: Leaving) |
19:27:46 | FromDiscord | <Waldecir Santos> I think I've found the issue @ElegantBeef https://nim-lang.github.io/Nim/var_t_return.html this is exactly what I'm trying to do, the first call creates the chain-able object and it creates this error `Error: 'qs``gensym1' escapes its stack frame; context:` there is anyway around this ? |
19:28:45 | * | xet7 joined #nim |
19:30:12 | FromDiscord | <Waldecir Santos> seems like I'll need to use ptr instead of var and that is scary https://forum.nim-lang.org/t/7561 |
19:34:19 | FromDiscord | <System64 ~ Flandre Scarlet> and is the GC watch the stack too? |
19:37:43 | FromDiscord | <auxym> no. the stack is popped when the proc returns, no need to GC it |
19:38:16 | FromDiscord | <System64 ~ Flandre Scarlet> sent a code paste, see https://play.nim-lang.org/#ix=3RlY |
19:38:31 | FromDiscord | <System64 ~ Flandre Scarlet> I create an object in the stack and pass a pointer to it |
19:38:39 | FromDiscord | <System64 ~ Flandre Scarlet> (edit) "it" => "another function" |
19:39:01 | FromDiscord | <auxym> yes, there is a problem. Unless TLN_SpriteData is `ref`, but then you need to `new` it |
19:39:10 | FromDiscord | <auxym> so it gets allocated on the heap |
19:39:31 | FromDiscord | <System64 ~ Flandre Scarlet> But Elegant said there is no problem |
19:40:52 | FromDiscord | <auxym> depends, what does TLN_CreateSpriteset do? Do it keep the pointer around or just does something with it and is done when it returns? |
19:41:09 | FromDiscord | <auxym> and we don't know if TLN_SpriteData is ref or value |
19:41:34 | FromDiscord | <auxym> if it's ref it's OK |
19:41:51 | * | pro joined #nim |
19:43:46 | FromDiscord | <auxym> (but you need to call new on it, otherwise it's nil) |
19:45:02 | FromDiscord | <auxym> I think what @ElegantBeef was saying: as long as you're in that proc, the pointer will not be null. But when the proc returns, it definitely will be null. |
19:48:59 | * | vicfred quit (Quit: Leaving) |
19:54:10 | FromDiscord | <System64 ~ Flandre Scarlet> In reply to @auxym "and we don't know": It's a réf but I convert a nim Sprite Data to Tilengine Sprite Data, so it's not thé same spriteData |
20:01:38 | * | pro quit (Quit: pro) |
20:29:29 | * | Gustavo6046 quit (Read error: Connection reset by peer) |
20:34:01 | * | Gustavo6046 joined #nim |
20:38:46 | FromDiscord | <exelotl> anyone know what might cause this? https://media.discordapp.net/attachments/371759389889003532/949405566130880552/unknown.png |
20:40:14 | FromDiscord | <exelotl> I can't pass a proc to `toScene` because there's some ambiguity over the lock level... |
20:41:51 | FromDiscord | <exelotl> oh nvm, figured it out |
20:42:14 | FromDiscord | <exelotl> I was exporting the same proc from another file too so there was actual ambiguity |
20:56:42 | * | Gustavo6046 quit (Read error: Connection reset by peer) |
20:58:36 | * | Gustavo6046 joined #nim |
21:18:57 | * | ltriant quit (Ping timeout: 256 seconds) |
21:19:13 | FromDiscord | <michaelb> what's the favored/best way to allocate simd aligned memory, that you can read from and write to, and/or hand-off to a wrapped C/C++ lib for it to manipulate |
21:20:46 | FromDiscord | <michaelb> (edit) "what's the favored/best way to allocate simd aligned memory, that you can read ... frombytes" added "bytes" | "bytesfrom and write ... to," added "bytes" |
21:33:03 | FromDiscord | <Elegantbeef> @exelotl\: do you have a min repro? |
21:33:40 | FromDiscord | <Elegantbeef> @Waldecir Santos\: like i said the var has to derive from the parameters |
21:34:29 | FromDiscord | <Elegantbeef> No a pointer to the stack will never be nil, the issue is that the pointer after the proc is returned is unsafe↵(@auxym) |
21:34:40 | FromDiscord | <Elegantbeef> So depending on the logic of the code it's a very bad thing |
21:42:15 | * | wyrd quit (Ping timeout: 240 seconds) |
21:49:24 | * | wyrd joined #nim |
21:49:38 | FromDiscord | <Mysterysib> Hi, how can I go about defining a dynamic type? (although I know the data types of what I store in it, I don't know the number - that is determined by the program's returns from other functions) |
21:50:17 | FromDiscord | <Mysterysib> I thought of something like this: `type↵ Log = object↵ version : string↵ DataSequence = seq(string)` but that gives me the error `initialization not allowed here` |
21:50:31 | FromDiscord | <Mysterysib> because of the sequence |
21:50:38 | FromDiscord | <Elegantbeef> `seq[string]` |
21:51:17 | FromDiscord | <Mysterysib> I get the same error |
21:51:40 | FromDiscord | <Elegantbeef> `: seq[string]` |
21:52:18 | FromDiscord | <Mysterysib> Ohhhh, that was inattentive of me haha. Thanks sm |
21:57:48 | * | ltriant joined #nim |
22:00:30 | FromDiscord | <System64 ~ Flandre Scarlet> I never had this before, what's that? https://media.discordapp.net/attachments/371759389889003532/949426131549974568/unknown.png |
22:02:15 | FromDiscord | <Elegantbeef> `rgb: uint, uint8` |
22:03:04 | FromDiscord | <System64 ~ Flandre Scarlet> In reply to @Elegantbeef "`rgb: uint, uint8`": yeah, I transtype |
22:03:07 | FromDiscord | <System64 ~ Flandre Scarlet> (edit) "transtype" => "cast" |
22:03:23 | FromDiscord | <System64 ~ Flandre Scarlet> here it works fine https://media.discordapp.net/attachments/371759389889003532/949426855801405540/unknown.png |
22:05:28 | FromDiscord | <Generic> does it not work in a generic function or template? |
22:06:14 | FromDiscord | <System64 ~ Flandre Scarlet> I dunno, but it's the only place where it doesn't work |
22:07:03 | FromDiscord | <Generic> does casting with uint8(x) work? |
22:07:33 | FromDiscord | <Elegantbeef> no that's not casting |
22:07:36 | FromDiscord | <Elegantbeef> look at your proc def |
22:07:49 | FromDiscord | <Elegantbeef> image.png https://media.discordapp.net/attachments/371759389889003532/949427974829121596/image.png |
22:07:57 | FromDiscord | <System64 ~ Flandre Scarlet> ah yeah woops |
22:08:00 | FromDiscord | <Elegantbeef> you're declaring `uint8` as a variable |
22:09:58 | FromDiscord | <System64 ~ Flandre Scarlet> yeah fixed now, thanks |
22:32:26 | * | jmdaemon quit (Ping timeout: 260 seconds) |
22:33:12 | * | ltriant quit (Ping timeout: 272 seconds) |
22:50:45 | FromDiscord | <exelotl> In reply to @Elegantbeef "<@90614688374624256>\: do you have": I defined a proc in one module {.exportc.}'d it, {.importc.}'d it in another module, and then imported both modules |
22:51:12 | FromDiscord | <exelotl> so as far as Nim's concerned it was 2 different procs |
22:52:11 | FromDiscord | <exelotl> attaching the export marker to the importc'd proc was my mistake, it compiled fine after I removed that |
23:00:00 | * | xaltsc quit (Remote host closed the connection) |
23:00:58 | * | jmdaemon joined #nim |
23:17:39 | FromDiscord | <System64 ~ Flandre Scarlet> !eval echo sizeof(bool), ", ", sizeof(cbool) |
23:17:40 | NimBot | Compile failed: /usercode/in.nim(1, 33) Error: undeclared identifier: 'cbool' |
23:17:46 | FromDiscord | <System64 ~ Flandre Scarlet> ah alright |
23:21:41 | * | TechAspirer joined #nim |
23:50:33 | * | ltriant joined #nim |
23:54:41 | NimEventer | New thread by Haoliang: Any particular reason on deprecating IndexError?, see https://forum.nim-lang.org/t/8978 |
23:54:57 | * | ltriant quit (Ping timeout: 240 seconds) |