00:07:29 | * | yglukhov[i] joined #nim |
00:12:06 | * | yglukhov[i] quit (Ping timeout: 272 seconds) |
00:24:11 | * | yglukhov[i] joined #nim |
00:28:34 | * | yglukhov[i] quit (Ping timeout: 256 seconds) |
00:29:45 | * | erratic quit (Quit: this server has gone to sleep) |
00:53:05 | * | erratic joined #nim |
00:53:46 | FromGitter | <kayabaNerve> vosper: nimcrypto is the superior lib but Na does try to keep things inside the library. I haven't used it but I can try to get a demo up for you if you want. |
00:59:10 | vosper | kayabaNerve: That would be helpful, thanks |
00:59:35 | * | vosper left #nim ("Textual IRC Client: www.textualapp.com") |
01:07:09 | * | jdhorwitz_ joined #nim |
01:16:53 | FromGitter | <kayabaNerve> vosper: Doesn't appear to work on devel 0_o I'm switching to 0.18 |
01:18:30 | FromGitter | <kayabaNerve> My VM is maxed out lol. |
01:48:28 | * | BitPuffin quit (Ping timeout: 260 seconds) |
01:53:09 | FromGitter | <kayabaNerve> vosper Done: https://gist.github.com/kayabaNerve/074a4528a8da0d63f835f63c9484ed56 |
01:53:16 | FromGitter | <kayabaNerve> Can someone on IRC tell me if he's still here lol |
01:53:41 | * | wildlander quit (Quit: Konversation terminated!) |
01:58:28 | FromGitter | <kayabaNerve> Oh. C seems to do better in the benchmarks for that gist. Just an FYI ;) |
02:39:57 | * | yglukhov[i] joined #nim |
02:44:21 | * | yglukhov[i] quit (Ping timeout: 240 seconds) |
02:55:56 | * | leorize joined #nim |
02:57:08 | * | data-man joined #nim |
03:05:27 | * | cspar quit (Ping timeout: 240 seconds) |
03:09:44 | * | sielicki joined #nim |
03:09:56 | * | sielicki quit (Remote host closed the connection) |
03:11:49 | * | cspar joined #nim |
03:21:02 | * | jdhorwitz_ quit (Quit: Connection closed for inactivity) |
03:24:58 | * | ftsf quit (Ping timeout: 244 seconds) |
03:25:28 | * | nullrouted joined #nim |
03:27:16 | * | nullrouted quit (Remote host closed the connection) |
03:58:55 | * | dddddd quit (Remote host closed the connection) |
04:06:03 | * | endragor joined #nim |
04:27:11 | * | ftsf joined #nim |
04:37:28 | * | leorize quit (Ping timeout: 256 seconds) |
04:43:01 | * | stefanos82 joined #nim |
05:08:44 | * | nsf joined #nim |
05:45:57 | * | miran joined #nim |
05:51:50 | * | leorize joined #nim |
06:23:59 | * | arecaceae quit (Remote host closed the connection) |
06:24:18 | * | arecaceae joined #nim |
06:24:35 | * | xet7 joined #nim |
06:24:56 | * | Trustable joined #nim |
06:36:47 | * | p3pp3rb0x joined #nim |
06:37:03 | * | p3pp3rb0x quit (K-Lined) |
06:39:05 | * | yglukhov[i] joined #nim |
06:47:41 | * | Exagone31320 joined #nim |
06:49:22 | * | Exagone31320 quit (Remote host closed the connection) |
06:55:43 | leorize | Araq: is the poll backend of ioselectors tested? |
06:57:34 | leorize | I tried to use it on Linux and tasyncRecvLine crashed |
07:24:21 | FromGitter | <craigglennie> @kayabaNerve sorry, I went offline. Thanks for posting that, the thing that I am missing is how to turn a user-supplied password of some variable length into an appropriately-sized key. From looking at the libsodium docs I imagine that I would use one of the password hashing functions (argon2 or scrypt, in the docs, but maybe also pbkdf2 from nimcrypto would work?). Unfortunately the nim lobsodium bindings seem to |
07:24:21 | FromGitter | ... be missing the password hashing functions... |
07:25:11 | * | PMunch joined #nim |
07:25:40 | FromGitter | <kayabaNerve> @craigglennie KDFs take Password + Salt. |
07:26:39 | FromGitter | <gogolxdong> Is there any Ethernet frame CRC library? |
07:26:47 | FromGitter | <craigglennie> @kayabaNerve Okay, but that's fine, right? I take a user password, sprinkle some salt, get my key, and then use it with crypto_secretbox_easy? |
07:26:55 | FromGitter | <kayabaNerve> It is missing a scrypt binding; I'm guessing it's due to the version; it should be easy as hell to implement nimcrypto |
07:27:10 | FromGitter | <kayabaNerve> Yeah but the other user then most know the password + salt |
07:28:39 | FromGitter | <craigglennie> @kayabaNerve: ahh, in this case the user is encrypting it for themselves. A string is encrypted on the users machine (in the nim program) and decrypted in a browser by the same user. I thought the salt could be stored alongside the encrypted message |
07:29:27 | FromGitter | <kayabaNerve> The salt in KDF is used locally |
07:29:32 | FromGitter | <kayabaNerve> To store the passwords locally |
07:29:43 | FromGitter | <kayabaNerve> The password is used in the box |
07:30:08 | FromGitter | <kayabaNerve> If you solely want to get a valid length, do a hash squared or cubed. |
07:30:31 | FromGitter | <kayabaNerve> AKA SHA512(SHA512(password)). Don't use SHA512. Just giving an example. |
07:32:45 | FromGitter | <craigglennie> Ahh ok. Does nimcrypto implement AES-CBC? I see that the new WebCrypto API supports it in the browser. I think maybe it's in the bcmode module, but I'm not sure |
07:33:06 | FromGitter | <kayabaNerve> The is AES |
07:33:10 | FromGitter | <kayabaNerve> No idea about the CBC variant |
07:33:43 | FromGitter | <craigglennie> With the example you gave, my issue still seems to be the hash function - where do I get a good one for encryption? Not from nim-lobsodium AFAIK |
07:34:32 | FromGitter | <kayabaNerve> It's the Rjindael part of nimcrypto |
07:34:35 | FromGitter | <kayabaNerve> nimcrypto :P |
07:34:45 | FromGitter | <kayabaNerve> Pick which one you want; make sure you get a 32 byte output. |
07:34:54 | FromGitter | <kayabaNerve> *32 long string of A-F characters. |
07:36:37 | FromGitter | <gogolxdong> How to echo this ⏎ ⏎ ``` var buf = EnetBuffer(data: addr sendbuf, dataLength: payload.len) ⏎ echo buf.data``` [https://gitter.im/nim-lang/Nim?at=5b7135045ec2bc174fefdb2a] |
07:37:31 | FromGitter | <kayabaNerve> @gogolxdong What part do you want to print? The address or whatever sendbuf is? |
07:37:44 | FromGitter | <kayabaNerve> If the second, you need to say what type sendbuf is |
07:37:48 | FromGitter | <gogolxdong> content of sendbuf. |
07:37:58 | FromGitter | <gogolxdong> ` var sendbuf : array[46, byte] ⏎ ` |
07:38:48 | FromGitter | <craigglennie> @kayabaNerve I have no idea which one I want, that's the thing. I don't know anything about cryptography and I'm trying to follow the mantra of "don't roll your own". I thought the libsodium stuff was supposed to make the whole thing somewhat dummy-proof, but now I am off learning about hashing functions when all I want to do is take a string and a password and encrypt the string somewhat securely... *sigh*... :) |
07:39:14 | FromGitter | <kayabaNerve> `echo buf.data[]` will call `$` on the array[46, byte]. You may want to do a for loop over buf.data[] though |
07:39:28 | FromGitter | <kayabaNerve> @craigglennie I can recommend one if you give me a second |
07:39:46 | FromGitter | <craigglennie> That would great :) |
07:42:25 | FromGitter | <kayabaNerve> You can use just nimcrypto with Rjindael (AES) OR BCMode (AES-CBC and others) |
07:43:48 | * | Vladar joined #nim |
07:45:21 | FromGitter | <kayabaNerve> You could also use RIPEMD128^2 + LibSodium but 128 bits is really bad security |
07:46:03 | FromGitter | <kayabaNerve> I would use: ⏎ BCMode > Rjindael > RIPEMD128^2 (RIPEMD128 of RIPEMD128 of data) + LibSodium |
07:46:13 | FromGitter | <kayabaNerve> Seriously. 128 bits is bad. |
07:47:24 | FromGitter | <gogolxdong> actually Error: type mismatch: got <pointer> of echo buf.data[] |
07:48:13 | FromGitter | <kayabaNerve> The third lets you use LibSodium/lets you distribute a password of "pass"/requires a computer to try 16^32 passwords before it's guaranteed to get in. ⏎ ⏎ Hell, the squared isn't needed and doesn't help here. I've been working on spam filters for too long... |
07:49:00 | FromGitter | <gogolxdong> Did dereference of pointer syntax change? |
07:49:15 | FromGitter | <craigglennie> @kayabaNerve Ok, thanks. I need to stick with something that there's a JS library for, so that I can decrypt. If nimcrypto supports AES-CBC with bcmode then I *think* I can decrypt in-browser. I'll see if I can get that to work. As an aside, nimcrypto seems to have an particular enthusiasm for really short variable names... Is "inp" = input and "oup" = output? What's wrong with "input" and "output"... but anywho... |
07:49:15 | FromGitter | ... Thanks for the help |
07:49:34 | FromGitter | <kayabaNerve> @gogolxdong Iterate over the array. ⏎ ⏎ ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=5b71380e988005174ed0afec] |
07:49:42 | FromGitter | <kayabaNerve> No idea why you have that error. Just trying to fix it. |
07:49:53 | FromGitter | <kayabaNerve> @craigglennie Good luck |
07:59:20 | FromGitter | <gogolxdong> I know dereference pointer syntax, but it fails. |
08:03:45 | * | gmpreussner_ joined #nim |
08:04:44 | * | gmpreussner quit (Ping timeout: 256 seconds) |
08:06:50 | Araq | use a pointer to an array? |
08:13:06 | FromGitter | <gogolxdong> any issue? |
08:18:49 | FromGitter | <gogolxdong> @Araq do you have library to calculate Ethernet FCS ? |
08:20:27 | * | xet7 quit (Quit: Leaving) |
08:21:19 | Araq | sorry, no |
08:21:58 | FromGitter | <andreaferretti> @timotheecour @mratsim In fact, I just added back support for static dimensions in neo under the package `neo/statics` |
08:22:28 | FromGitter | <andreaferretti> as it turns out, using static types as a wrappers for dynamic ones is easier than the other way round |
08:22:46 | FromGitter | <andreaferretti> if only because sometimes dimensions are not known at compile time |
08:23:19 | FromGitter | <andreaferretti> so some form of dynamic vectors/matrices/tensors are needed anyway |
08:23:25 | * | yglukhov[i] quit () |
08:23:37 | FromGitter | <andreaferretti> and the simplest way to make them interoperable with the static ones |
08:23:54 | FromGitter | <andreaferretti> is just to have the static types be distinct types over the dynamic ones |
08:24:18 | FromGitter | <andreaferretti> this way you get static typing when you want it (and you know dimensions at compile time) |
08:24:38 | FromGitter | <andreaferretti> but you can always switch back to dynamic types |
08:25:08 | FromGitter | <andreaferretti> there is a small overhead in that metadata is needed even if dimensions are known at compile time |
08:25:08 | * | yglukhov[i] joined #nim |
08:25:12 | FromGitter | <andreaferretti> but it seems acceptable |
08:29:48 | * | ftsf quit (Ping timeout: 244 seconds) |
08:30:32 | * | miran quit (Ping timeout: 272 seconds) |
08:32:43 | * | xet7 joined #nim |
08:35:43 | * | ftsf joined #nim |
08:36:24 | FromGitter | <gogolxdong> Is the magic number of CRC32 random for its implementation , why there is `c = (c >> 1)^(0xEDB88320);` and calculate a different CRC table with others provided directly? |
08:39:20 | FromGitter | <gogolxdong> It seems that there are many different purpose CRC32 algorithm. |
08:41:15 | FromGitter | <kayabaNerve> @andreaferretti @gogolxdong and I were just using your libsodium wrapper |
08:41:39 | FromGitter | <kayabaNerve> @gogolxdong Backdoor for the NSA. |
08:41:48 | FromGitter | <kayabaNerve> (joking; no idea) |
08:42:43 | FromGitter | <gogolxdong> Is it the same thing? |
08:43:46 | * | Colti19 joined #nim |
08:44:13 | * | Colti19 quit (Remote host closed the connection) |
08:45:11 | FromGitter | <kayabaNerve> @andreaferretti Sorry; confused you. I'm pretty tired. |
08:45:32 | FromGitter | <kayabaNerve> @gogolxdong The person? No. I'm just tired. I'll go to bed now... 4am. Bit late. |
08:46:41 | FromGitter | <gogolxdong> no , I mean is the crc in libsodium and Ethernet FCS the same , BTW there is no CRC in libsodium which I checked. |
08:51:03 | * | miran joined #nim |
08:59:40 | FromGitter | <gogolxdong> cannot send Ethernet frame due to FCS. |
09:05:22 | * | leorize quit (Ping timeout: 272 seconds) |
09:11:03 | * | TheLemonMan joined #nim |
09:11:45 | TheLemonMan | gogolxdong, different constants = different polynomials |
09:12:22 | * | Karasu joined #nim |
09:13:21 | * | NimBot joined #nim |
09:14:15 | * | Karasu quit (Remote host closed the connection) |
09:14:54 | ehmry | I would prefer a libsodium compatible Nim library to a wrapper, nacl/libsodium has side-effects when it tries to reads the RNG file and does some memory security stuff that probably isn't useful |
09:15:24 | ehmry | its a frustrating library to use if you aren't running unix or windows |
09:17:50 | ehmry | the actuall crypto routines should be copy-pasted though |
09:36:06 | FromGitter | <gogolxdong> @TheLemonMan what does it mean? |
09:37:10 | TheLemonMan | wikipedia is your friend here |
09:38:09 | FromGitter | <gogolxdong> I mean how do I know which constants Ethernet FCS use? |
09:41:31 | * | xet7 quit (Quit: Leaving) |
09:44:14 | TheLemonMan | the 802.3 spec |
09:44:17 | FromGitter | <tim-st> @Araq if the following is fixed, it will increase VM time and memory (maybe quite much) I think: https://github.com/nim-lang/Nim/issues/8603#issuecomment-412461315 |
09:45:36 | Araq | tim-st: I doubt 'when' is used that often that it makes a difference |
09:45:54 | * | cspar quit (Ping timeout: 272 seconds) |
09:46:22 | FromGitter | <tim-st> ok, but I often see code like `when false: do this which takes forever and eats ram` |
09:50:15 | TheLemonMan | Araq, do you think that removing optLineDir from preInitProc may have adverse side effects I'm not aware of? |
09:50:56 | Araq | tim-st: the body is not affected, only the condition of the when |
09:53:11 | * | xet7 joined #nim |
09:54:07 | FromGitter | <tim-st> That's the problem: the body should be checked too, if it contains incorrect code |
09:55:12 | Araq | but not for 'when false' |
09:55:25 | FromGitter | <drslump> hi @tim-st , I tried to explain the problem in this comment https://github.com/nim-lang/Nim/issues/8603#issuecomment-412465389 |
09:56:57 | FromGitter | <tim-st> @drslump I read your comment, but I'm pretty sure the nim compiler can find out every [incorrect] example I posted here:https://github.com/nim-lang/Nim/issues/8603#issuecomment-412461315 |
09:57:44 | * | Venusaur13 joined #nim |
09:57:56 | * | Venusaur13 quit (Remote host closed the connection) |
09:58:02 | FromGitter | <tim-st> I think at this time it's already known for the nim compiler that `typedesc` is `typedesc` and `typedesc` != Expression |
09:58:14 | FromGitter | <drslump> a work around if your intention is to make sure your code is correct even if it's "disabled" in a specific compilation (i.e. different platform) is to extract the logic into normal functions and just have function calls in the `when` statement |
09:59:10 | FromGitter | <tim-st> yes, that could work |
10:01:32 | FromGitter | <drslump> it's not really a problem of the compiler being able to figure out the semantics of a when block, it's a language design decision. Those blocks are not resolved unless the condition that guards them is true, this simplifies many use cases. Otherwise the compiler would not know if when it fails to validate a block it's actually an error that should be reported or it's just that in a specific platform some library doesn't |
10:01:32 | FromGitter | ... have a given symbol for instance. |
10:01:35 | FromGitter | <gogolxdong> This is a crc32* in Nim Nim/tests/manyloc/keineschweine/dependencies/enet/enet.nim |
10:01:52 | FromGitter | <gogolxdong> don't know how to use it |
10:05:08 | * | ng0 joined #nim |
10:05:36 | FromGitter | <tim-st> @drslump hm, not sure what can be done about it, at least I expected that `when -1:` isnt true, and that it can be find out that `int != bool` |
10:06:59 | FromGitter | <drslump> yes, that's a the bug I was trying to fix, in `when <expr>:` the `<expr>` must be fully valid (constant and producing a bool) |
10:06:59 | FromGitter | <gogolxdong> it uses ⏎ ⏎ ``` TENetBuffer*{.pure, final.} = object ⏎ data*: pointer ⏎ dataLength*: csize``` ⏎ ⏎ which data is a pointer to hex bytes array, conflicts with the dereference symbol [] as for array indexing. [https://gitter.im/nim-lang/Nim?at=5b715843179f842c972fcfaa] |
10:08:28 | FromGitter | <gogolxdong> since it's a wrapping of C library, not sure how to change this. |
10:08:31 | FromGitter | <tim-st> @drslump And additionally *some* checks are done in `when`-blocks and some are not, that is surprising to me |
10:11:47 | FromGitter | <gogolxdong> got SIGSEGV: Illegal storage access. (Attempt to read from nil?) |
10:13:11 | FromGitter | <drslump> @tim-st yeah, I think the syntax is unfortunate, it should be more explicit about what's going on, otherwise feels like another flow-control construct more but it has completely different semantics |
10:14:06 | FromGitter | <gogolxdong> ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=5b7159ee67eb9f60fed37d82] |
10:15:38 | * | yglukhov[i] quit (Ping timeout: 265 seconds) |
10:16:02 | FromGitter | <tim-st> @drslump ok, but then at least it should be possible to check the syntax of the condition that would already be good |
10:16:53 | * | yglukhov[i] joined #nim |
10:17:07 | zacharycarter[m] | Araq: should I create an issue for - https://gist.github.com/zacharycarter/f61be4127da3ec6efc9f3c2348b6469a - only the first set of ident|type is parsed into varargs? |
10:21:30 | Araq | zacharycarter[m]: that used to compile, right? |
10:22:02 | zacharycarter[m] | Not sure - the old code wasn't using varargs[untyped] |
10:22:07 | zacharycarter[m] | it was using callsite |
10:22:25 | zacharycarter[m] | and the ident|type sets were passed in via a tuple |
10:22:27 | Araq | well but it used to *parse* |
10:22:37 | Araq | and now the parser errors. |
10:22:51 | zacharycarter[m] | https://github.com/fowlmouth/allegro5/blob/master/src/al.nim#L361-L404 |
10:23:23 | zacharycarter[m] | let me try with an older version of Nim and see what varargs get parsed |
10:29:16 | * | TheLemonMan quit (Quit: "It's now safe to turn off your computer.") |
10:37:22 | * | lunaaa joined #nim |
10:39:12 | * | lunaaa quit (Remote host closed the connection) |
10:55:42 | * | dddddd joined #nim |
11:00:48 | ng0 | haven't looked at your irc bot code again, but does it support NickServ authentication of itself? Turns out our drupal irc bot quit its job earlier than we expected, and now I need something without a search, generated from a database (I'm still hoping for plain text log format) and output as html with pagination. |
11:10:03 | * | Vladar quit (Remote host closed the connection) |
11:15:22 | ng0 | furthermore, would you accept a patch for or be willing yourselves to implement support for postgresql in nimbot? |
11:18:37 | FromGitter | <alehander42> @Araq I finally wrote down https://github.com/nim-lang/Nim/pull/8627 |
11:19:36 | FromGitter | <alehander42> honestly it would be really cool to just have a compiler switch where for the js target `string` is represented as js string and <=> with cstring |
11:21:43 | FromGitter | <alehander42> currently the whole cstring vs string thing leads to a big mess in nim->js code |
11:30:23 | * | Vladar joined #nim |
11:35:27 | * | bigpet7 joined #nim |
11:37:12 | * | bigpet7 quit (Remote host closed the connection) |
11:48:17 | * | miran quit (Ping timeout: 248 seconds) |
12:01:56 | FromGitter | <dom96> Ng0: postgresql? What for? |
12:04:10 | ng0 | We have many years of logs (almost a decade now) for a collection of communities. The idea is to go bot -> postgresql -> static html output, because we have too much past logs and it is easier to work with in cases of future migration. |
12:06:50 | ng0 | ah. the logs already are in a DB, that's the other reason ;) |
12:07:28 | ng0 | I wasn't around in '09 otherwise I would have had my opinions about a Drupal integrated ircbot back then.. |
12:17:03 | zacharycarter[m] | Araq: 0.16.0 parsed this as - `[id, PJoystick]` - so it looks passing in something like - `id:PJoystick, stick,axis:cint, pos:cfloat, button:cint` as `varargs[untyped]` has never been supported |
12:26:33 | * | gregf joined #nim |
12:28:27 | * | gregf quit (Remote host closed the connection) |
12:40:44 | * | nsf quit (Quit: WeeChat 2.2) |
12:46:51 | * | ng0 quit (Quit: Alexa, when is the end of world?) |
12:53:50 | * | dgwana joined #nim |
12:56:02 | * | dgwana quit (Client Quit) |
13:05:12 | FromGitter | <Varriount> @alehander42 But JavaScript strings and Nim strings have different behaviors. |
13:07:21 | * | endragor quit (Remote host closed the connection) |
13:17:54 | * | noonien joined #nim |
13:23:56 | * | Guest4399626 joined #nim |
13:25:33 | * | francisl joined #nim |
13:25:42 | * | endragor joined #nim |
13:25:43 | * | Guest4399626 quit (Remote host closed the connection) |
13:30:13 | * | endragor quit (Ping timeout: 260 seconds) |
13:36:35 | Araq | zacharycarter[m], it parsed before and now it doesn't, as far as I can tell, so please create an issue |
13:36:51 | Araq | the fact that it never sem'checked is not what's concerning me |
13:39:28 | FromGitter | <alehander42> @Varriount well, you have to give an example of such a critical difference, for most common edge cases one can just tackle this in a `when` overrided method |
13:39:54 | FromGitter | <alehander42> mutability is the huge difference, but I don't think I use or depend on string mutability anywhere in my jsbackend code |
13:42:28 | * | francisl quit (Ping timeout: 260 seconds) |
13:43:03 | * | francisl joined #nim |
13:45:55 | * | ng0 joined #nim |
13:54:59 | * | wildlander joined #nim |
14:06:08 | * | ninsei joined #nim |
14:08:11 | * | ninsei quit (Remote host closed the connection) |
14:10:39 | * | Compu11 joined #nim |
14:12:30 | * | Compu11 quit (Remote host closed the connection) |
14:14:41 | FromGitter | <alehander42> btw what happend with https://forum.nim-lang.org/t/1793 I guess the move to immutable string plans never materialized? |
14:24:19 | * | nsf joined #nim |
14:25:41 | Araq | I implemented immutable strings and got no performance differences in a number of benchmarks |
14:25:42 | FromGitter | <zah> If we had immutable strings under a flag, the string type in JS could be mapped to the native JS string |
14:26:09 | Araq | and the new move semantics are more elegant anyway, ymmv |
14:26:37 | Araq | we ensure there is only one owner of the string so mutation is safe |
14:26:49 | Araq | why disallow it then? |
14:27:40 | * | data-man quit (Remote host closed the connection) |
14:27:47 | Araq | we can't map it to JS's string, JS uses utf-16, Nim's strings are utf-8 |
14:29:39 | Araq | unless you want to be more hand-wavy about it than we usually are :P |
14:32:04 | FromGitter | <zah> well, it’s an improvement in JS-only codebases (read electron and web apps). |
14:33:39 | FromGitter | <alehander42> is there a lot of code in the js'supported stdlib that reallistically depends on the internals of the encoding? (except unicode.nim and the cstring string conversion functions?) |
14:36:25 | Araq | well there is lots of code that does 'result = ""; for ...: result.add()' and relies on strings being mutable |
14:38:21 | Araq | though I guess 'add' can be mapped to JS's strings |
14:41:23 | Araq | in the longer run when wasm is a thing Nim's strings can be more efficient than JS's |
14:41:39 | Araq | and we don't have to butcher their semantics |
14:45:45 | FromGitter | <alehander42> currently the problem is mostly that cstring are very pervasive in js environments, all api-s, libs etc require one to `cstring()` his nim strings and most importantly all the object keys are `cstring`, and they are literally everywhere |
14:47:03 | FromGitter | <alehander42> so one can't reasonably use `string` without `cstring()` all the time which is also slow (nim can autoconvert strings to cstring, I am not talking about code pollution: on the other hand those autoconvertions are a bit magical and I don't like them in some cases) |
14:47:36 | FromGitter | <alehander42> the other consistent option is to just use cstring everywhere, but then one loses all the stdlib string stuff |
14:47:51 | Araq | that's what I do |
14:48:20 | Araq | the stdlib string stuff is slow(er) for JS anyway and produces bigger code |
14:48:21 | FromGitter | <alehander42> well maybe reimplementing most stdlib string functions would be simpler indeed |
14:48:31 | Araq | that's what Karax did |
14:48:45 | FromGitter | <alehander42> but in this case we should just put it in the stdlib |
14:49:03 | FromGitter | <alehander42> and not have each jsbackend lib redefine them again |
14:50:51 | Araq | I can move jstrutils to the stdlib |
14:54:49 | FromGitter | <alehander42> ok, I can PR with some of my own cstring util equivalents |
14:55:31 | Araq | also JS strings can be null and Nim's strings cannot be 'nil' anymore |
15:00:08 | FromGitter | <alehander42> well, `cstring` can be nil, js strings by definition are never nil :P |
15:02:16 | FromGitter | <alehander42> btw nim's strings are still nil in js backend |
15:02:24 | FromGitter | <alehander42> so this is actually broken a bit ? |
15:02:50 | FromGitter | <alehander42> (or at least null is not threated as an empty string ) |
15:03:22 | Araq | the JS codegen doesn't know about the changed Nim string semantics yet |
15:03:39 | Araq | tried to fix it but got strange regressions and the produced JS code is a pita to debug |
15:05:49 | FromGitter | <alehander42> anyway, this shouldn't matter for the cstring utils (except that they might need some `nil` checks) |
15:06:25 | FromGitter | <alehander42> hm, fixing this would be cool |
15:15:18 | dom96 | well, this spam is seriously not going away and seems to be getting worse https://i.imgur.com/zbBkkM2.png |
15:16:15 | Araq | dom96, gah, any suggestions? |
15:16:35 | dom96 | Go to #freenode and ask them to fight this |
15:17:28 | FromGitter | <alehander42> is this in our channel :O |
15:17:55 | * | alehander42 joined #nim |
15:18:12 | * | Vladar quit (Remote host closed the connection) |
15:21:26 | ng0 | they already do |
15:22:09 | * | alehander42 quit (Ping timeout: 252 seconds) |
15:37:58 | * | yglukhov[i] quit (Remote host closed the connection) |
15:44:10 | * | BitPuffin joined #nim |
15:44:49 | * | cryptocat1094 joined #nim |
15:53:48 | * | yglukhov[i] joined #nim |
15:59:52 | * | cornfeedhobo quit (Quit: ZNC - http://znc.in) |
16:18:53 | * | cornfeedhobo joined #nim |
16:20:09 | * | PMunch quit (Quit: Leaving) |
16:44:59 | * | chachasmooth0 joined #nim |
16:45:48 | * | chachasmooth0 quit (Remote host closed the connection) |
16:58:53 | * | Guest29805 joined #nim |
16:59:12 | * | Guest29805 quit (K-Lined) |
17:00:28 | FromGitter | <arnetheduck> https://julialang.org/blog/2018/08/one-point-zero |
17:06:39 | * | issyl017 joined #nim |
17:07:43 | * | issyl017 quit (Remote host closed the connection) |
17:07:56 | * | timvisher24 joined #nim |
17:10:55 | * | timvisher24 quit (Remote host closed the connection) |
17:21:38 | * | data-man joined #nim |
17:28:59 | * | nsf quit (Quit: WeeChat 2.2) |
17:39:37 | * | icyphox quit (Ping timeout: 248 seconds) |
17:41:08 | * | Entropic joined #nim |
17:56:06 | * | ltr_ joined #nim |
18:02:33 | Araq | arnetheduck: I think most of us already read it |
18:05:15 | stefanos82 | Araq: about the spam you mentioned before...Nim is in great condition I have to admit. In ##C they are posting some huge d*ks for pictures lol |
18:06:16 | * | cods22 joined #nim |
18:08:49 | * | tigermousr4 joined #nim |
18:08:52 | * | tigermousr4 quit (Remote host closed the connection) |
18:10:25 | * | cods22 quit (Remote host closed the connection) |
18:16:36 | * | thomasross quit (Remote host closed the connection) |
18:17:01 | * | thomasross joined #nim |
18:25:10 | * | ketralnis joined #nim |
18:27:45 | * | ketralnis quit (Remote host closed the connection) |
18:28:32 | * | endragor joined #nim |
18:31:37 | * | jgh- joined #nim |
18:32:20 | jgh- | hey, what does `asyncCheck` do? The most explanation it seems to get in the docs is "If you do not care for the result of a Future then you should use the asyncCheck procedure instead of the discard keyword." |
18:32:58 | * | endragor quit (Ping timeout: 260 seconds) |
18:37:17 | * | natrys joined #nim |
18:41:05 | Araq | 'asyncCheck' is like 'await' that then trows away the awaited value. I think |
18:41:57 | jgh- | I see. |
18:42:48 | Araq | asyncCheck can also be used in an non-.async context, it's one bridge between the async and non-async world |
18:43:08 | * | jgh- quit (Remote host closed the connection) |
18:45:08 | * | Loki15 joined #nim |
18:47:47 | * | jgh- joined #nim |
18:48:27 | jgh- | ok. I'll dig more into it, thanks. |
18:50:12 | * | Loki15 quit (Read error: Connection reset by peer) |
18:50:12 | * | jgh- quit (Client Quit) |
19:03:56 | * | Tojil joined #nim |
19:04:12 | * | Tojil quit (K-Lined) |
19:13:46 | * | seni joined #nim |
19:17:29 | * | odc_ joined #nim |
19:17:42 | * | zielmicha__ joined #nim |
19:18:28 | * | Jesin quit (Remote host closed the connection) |
19:20:07 | * | Sargun_ joined #nim |
19:25:17 | * | epictek[m] quit (*.net *.split) |
19:25:17 | * | unclechu[m] quit (*.net *.split) |
19:25:23 | * | codevance[m] quit (*.net *.split) |
19:25:24 | * | dyce[m] quit (*.net *.split) |
19:25:24 | * | odc quit (*.net *.split) |
19:25:24 | * | zielmicha_ quit (*.net *.split) |
19:25:26 | * | Sargun quit (*.net *.split) |
19:25:26 | * | Jesin joined #nim |
19:27:57 | * | themagician quit (Ping timeout: 240 seconds) |
19:29:04 | * | nsf joined #nim |
19:31:44 | * | vivus joined #nim |
19:32:48 | * | epictek[m] joined #nim |
19:33:04 | * | miran joined #nim |
19:34:31 | * | codevance[m] joined #nim |
19:34:39 | * | dyce[m] joined #nim |
19:34:45 | * | unclechu[m] joined #nim |
19:40:39 | FromGitter | <zetashift> https://pastebin.com/pV9GpfWB why does this give me an undeclared identifier error for in method ready and method onTextEntered? |
19:40:52 | FromGitter | <zetashift> line 12 and 17 |
19:42:26 | * | Cthalupa quit (Ping timeout: 256 seconds) |
19:45:01 | * | Cthalupa joined #nim |
19:52:18 | * | Cthalupa quit (Ping timeout: 260 seconds) |
19:57:49 | * | Cthalupa joined #nim |
20:04:10 | * | cspar joined #nim |
20:17:47 | FromGitter | <zetashift> whoops undeclared identifier error for story on line 12 and textbox for line 17* english is hard |
20:19:32 | * | vivus quit (Quit: Leaving) |
20:22:51 | * | yglukhov[i] quit (Ping timeout: 240 seconds) |
20:26:51 | * | OPK2 joined #nim |
20:29:44 | * | jhutchins14 joined #nim |
20:29:48 | * | OPK2 quit (Remote host closed the connection) |
20:32:17 | * | yglukhov[i] joined #nim |
20:32:29 | * | jhutchins14 quit (Remote host closed the connection) |
20:57:14 | * | miran quit (Ping timeout: 272 seconds) |
21:01:05 | * | cryptocat1094 quit (Quit: WeeChat 2.2) |
21:02:38 | * | felco25 joined #nim |
21:03:12 | * | felco25 quit (Remote host closed the connection) |
21:06:54 | * | nsf quit (Quit: WeeChat 2.2) |
21:09:27 | * | NimBot joined #nim |
21:19:47 | * | noonien quit (Quit: Connection closed for inactivity) |
21:24:15 | * | Trustable quit (Remote host closed the connection) |
21:30:32 | FromGitter | <zetashift> I guess the gdobj macro doesn't allow fields to be initialized outside of methods? |
21:30:42 | FromGitter | <zetashift> putting the prompts and story in the init method worked |
21:32:26 | FromGitter | <Clyybber> Are you using pragmagics godot bindings? |
21:33:12 | FromGitter | <zetashift> yea |
21:43:33 | * | ZetaDot joined #nim |
21:44:08 | ZetaDot | dummy question. How can I install jester? On the github page it says “Jester 0.3.0” So I cannot use it on a stable nim? |
21:44:25 | ZetaDot | *Starting with Jester 0.3.0, a devel version of Nim is required. |
21:45:59 | FromGitter | <kayabaNerve> You'd need to get an old version; I do believe dom backported the security updates to 0.2.0 which will work on jester |
21:46:38 | * | natrys quit (Ping timeout: 260 seconds) |
21:46:58 | FromGitter | <kayabaNerve> Yep. https://github.com/dom96/jester/releases/tag/v0.2.1 |
21:47:19 | FromGitter | <kayabaNerve> I don't believe that has any of the 0.4.0 security updates though... |
21:48:04 | ZetaDot | so when will the 0.4.0 be usable? |
21:48:25 | dom96 | 0.2.1 does have security fixes |
21:48:37 | FromGitter | <Clyybber> @zetashift Is it usable with godot devel? |
21:49:03 | FromGitter | <kayabaNerve> ZetaDot it's on the releases page right now |
21:49:11 | FromGitter | <zetashift> @Clyybber don't think so according to: https://github.com/pragmagic/godot-nim/issues/32 |
21:49:59 | zacharycarter[m] | Araq: I'm sorry - I think there was some misunderstanding / miscommunication regarding the gist I shared earlier - I'm not so much concerned with the parsing and eventual compilation - this example SHOULD fail |
21:50:35 | FromGitter | <zetashift> @Clyybber man it's late I thought you were talking about Nim devel :P |
21:50:44 | FromGitter | <zetashift> it should work on godot devel I could give it a whirl if you'd like |
21:50:50 | zacharycarter[m] | what I was concerned with - is the fact that there are multiple pairs of idents/types specified, yet only the first pair is turned into arguments |
21:51:10 | zacharycarter[m] | why is godot-nim using nake to begin with? |
21:51:29 | FromGitter | <zetashift> to generate the godot api I think? |
21:51:44 | zacharycarter[m] | yeah - but nake isn't necessary anymore |
21:51:47 | zacharycarter[m] | use nimble + nimscript |
21:52:13 | zacharycarter[m] | no new project should be using Nake IMO |
21:52:34 | FromGitter | <Clyybber> @zetashift If you would like to test it that would be amazing |
21:53:12 | zacharycarter[m] | fowl isn't even acdtive anymore |
21:53:16 | zacharycarter[m] | active* |
21:55:08 | FromGitter | <zetashift> I dunno godotnim started late 2017 |
21:55:22 | FromGitter | <zetashift> Also don't have any problems with the nake setup |
21:59:56 | zacharycarter[m] | fowl was last active several years ago |
22:00:29 | zacharycarter[m] | I've just heard several complaints in the last few days regarding nake and godot |
22:00:57 | zacharycarter[m] | I think yuiry wrote the bindings for godot, and I think he's a nake user - so that's probably why |
22:01:07 | zacharycarter[m] | IMO - the less dependencies the better |
22:01:43 | FromGitter | <zetashift> true! |
22:04:00 | * | natrys joined #nim |
22:04:23 | FromGitter | <zetashift> @Clyybber it runs |
22:04:30 | zacharycarter[m] | the less godot the better IMO too - but I'll shush about that |
22:04:48 | FromGitter | <zetashift> haha :P |
22:05:04 | FromGitter | <zetashift> that's just preferences, the learning resources are solid though and that's what I currently need |
22:05:27 | FromGitter | <Clyybber> zacharycarter Is yuiry an alias for pragmagic? |
22:05:37 | AlexMax | Is there any way to tell what I'm doing wrong when my nim configuration file is invalid and I get "SIGSEGV: Illegal storage access. (Attempt to read from nil?)"? |
22:05:44 | FromGitter | <Clyybber> @zetashift Thank you |
22:05:47 | AlexMax | That's....not very descriptive |
22:06:02 | zacharycarter[m] | Oh pragmagic made the godot nim bindings? Nevermind then - that is not Yuriy |
22:06:11 | FromGitter | <Clyybber> Ah ok |
22:06:22 | * | francisl quit (Quit: francisl) |
22:06:25 | zacharycarter[m] | Also - it's more than just preferences - I don't like Godot / the community / the authors |
22:06:33 | FromGitter | <Clyybber> zacharycarter Why? |
22:06:41 | zacharycarter[m] | pragmagic is euantor but I thnk there are multiple devs associated w/ that account |
22:06:52 | FromGitter | <Clyybber> Interesting |
22:06:55 | zacharycarter[m] | They make nonsensical decisions / bold proclamations and don't back them up with any sound reasoning |
22:07:18 | FromGitter | <Clyybber> zacharycarter Could you provide an example? |
22:07:23 | zacharycarter[m] | sure |
22:07:49 | zacharycarter[m] | this is a great one - https://godotengine.org/article/why-does-godot-use-servers-and-rids |
22:08:47 | * | zacharycarter[m] sent a long message: < https://matrix.org/_matrix/media/v1/download/matrix.org/RSliMjWqrLmbOJmVOhRwczQV > |
22:09:33 | FromGitter | <Clyybber> Hmm, ok thats a valid critique |
22:09:43 | zacharycarter[m] | the entire article is basically defending their ridicuous Server / RID abstraction with the essence that - it would be too hard to do otherwise while maintaining usiblity |
22:09:45 | zacharycarter[m] | which plenty of other game engines have done |
22:09:48 | * | stefanos82 quit (Quit: Quitting for now...) |
22:09:53 | zacharycarter[m] | it's just holes like that all over the place |
22:10:19 | zacharycarter[m] | not to mention - most of the community seems to be 12 year olds with zero programming experience |
22:10:25 | zacharycarter[m] | not that it's different with other game engines- but they don't become contributors |
22:10:34 | FromGitter | <Clyybber> Haha |
22:10:40 | zacharycarter[m] | just go look at the C++ source code forgodot |
22:10:42 | zacharycarter[m] | it's a hell hole |
22:12:12 | FromGitter | <Clyybber> What I dont like is the variant system |
22:12:39 | FromGitter | <Clyybber> But thankfully you dont have to deal with that |
22:12:50 | FromGitter | <Clyybber> unless you are using GDNative |
22:13:04 | FromGitter | <Clyybber> and it affects you in terms of performance |
22:13:07 | Araq | AlexMax, can you gist your config? |
22:13:57 | zacharycarter[m] | GDScript might as well die - it serves no purpose |
22:14:09 | zacharycarter[m] | but you can't convince the core devs of godot that |
22:14:39 | zacharycarter[m] | it's like telling your userbase - well you won't be able to code a game with this runtime because it sucks |
22:15:38 | zacharycarter[m] | so learn this syntax and write everything you think is asinine in this language, and then write all your code that needs to actually perform in another language |
22:15:49 | FromGitter | <Clyybber> Yeah I think moving away from GDScript would be a good decision |
22:15:53 | zacharycarter[m] | which begs the question - why do I even write anything in GDScript in the first place? |
22:15:54 | AlexMax | Araq: Wait a minute, I think i was reading the wrong guide - I was on the niminst page |
22:16:14 | zacharycarter[m] | well, they don't think so :P |
22:16:33 | * | natrys quit (Ping timeout: 248 seconds) |
22:16:34 | AlexMax | What options does the myproject.nim.cfg file accept? |
22:16:35 | zacharycarter[m] | the thing is - when your user base is 12 year olds trying to make vidya games |
22:16:39 | AlexMax | Same as the compiler itself? |
22:16:45 | Araq | zacharycarter[m], because you want quick development iterations and C++'s compile times are considered too bad |
22:17:00 | Araq | AlexMax, all of the command line options, pretty much |
22:17:00 | FromGitter | <Clyybber> zacharycarter Then you gotta choose nim |
22:17:38 | AlexMax | Araq: Do I get the ability to script my config? Like if I want a different config between windows and *NIX and mac? |
22:17:50 | Araq | of course. |
22:17:53 | FromGitter | <Clyybber> zacharycarter It just bothers me that the GDNative bindings(and the whole engine) are a bit hold back by supporting GDScript |
22:17:58 | Araq | @if windows: ... @end |
22:18:00 | FromGitter | <Clyybber> But maybe that will get better |
22:18:16 | Araq | but it's probably better to use a myproject.nims nimScript file |
22:18:25 | Araq | the old config system is kinda deprecated |
22:18:42 | zacharycarter[m] | Araq: So do what UE4 did and add visual scripting instead of just some asinine scripting language that you need to now learn an entirely new syntax / api for, so you can write less performant code |
22:19:10 | Araq | zacharycarter[m], Nim's VM is available as an API now anyway |
22:19:12 | zacharycarter[m] | I'd rather use lua than learn another language |
22:19:30 | Araq | sorry but Lua is pretty terrible to program in. |
22:19:35 | * | Cthalupa quit (Ping timeout: 272 seconds) |
22:19:39 | FromGitter | <Clyybber> There are some ultra experimental lua bindings for godot |
22:19:40 | Araq | every typo leads to a nil bug |
22:20:03 | Araq | and they merged lists with hash tables (WTF?) |
22:20:14 | AlexMax | I don't think they "merged" them |
22:20:14 | FromGitter | <Clyybber> Araq Yeah, but with a good IDE like zerobrane its pretty easy |
22:20:20 | zacharycarter[m] | like - don't make me learn your bs proprietary scripting language to use your product |
22:20:24 | AlexMax | more "emulated lists with tables" |
22:20:31 | zacharycarter[m] | it sucks in every sense of the word |
22:20:54 | AlexMax | also, lua has a few weird parts to it, but it's one of my favorite embeddable scripting languages |
22:20:57 | * | data-man quit (Quit: Konversation terminated!) |
22:20:57 | Araq | don't lecture me, AlexMax, I studied its C code before I started to write Nim |
22:21:09 | AlexMax | Araq: Sorry, I didn't mean to offend D: |
22:21:29 | Araq | ok, no worries |
22:21:42 | zacharycarter[m] | Araq: if lua is terrible to program in, how bad do you think GDScript is? |
22:21:43 | zacharycarter[m] | one is half-baked |
22:21:43 | FromGitter | <Clyybber> Araq I think lua is very elegant, in that it has only one real container type |
22:21:43 | zacharycarter[m] | and only usable in a single application |
22:21:44 | * | Cthalupa joined #nim |
22:21:55 | zacharycarter[m] | GDScript is like a bastardized python |
22:22:39 | Araq | Clyybber: I think that's not elegant at all, it's a hack. "Everything must be as simple as possible, but not simpler" Lua is too simple. |
22:23:06 | zacharycarter[m] | I hate Lua too - but I mean, at least it's a convention |
22:23:29 | zacharycarter[m] | like there's plenty of C++ game engines already using Lua as a scripting language, and succeeding with it |
22:23:43 | Araq | and its stack based API is terrible too, but at least it doesn't expose its GC implementation to the clients (hello Python, Ruby...) |
22:23:46 | zacharycarter[m] | and I don't dislike Unity's approach of baking in a managed runtime |
22:24:16 | zacharycarter[m] | but come on - force me to learn a new scripting language for your game engine? This is why UE3 was such a disaster and UE devs just went C++ or visual scripting |
22:24:17 | FromGitter | <Clyybber> Araq The only downside of that hack is performance really |
22:24:27 | FromGitter | <Clyybber> and the usual downsides of dynamic typing |
22:24:37 | Araq | no, it's also error prone |
22:24:47 | FromGitter | <Clyybber> Yeah |
22:24:49 | Araq | you can't use the hash and list parts at the same time |
22:24:57 | FromGitter | <Clyybber> You can |
22:25:06 | FromGitter | <zetashift> I think GDScript is alright. And Godot is working on a VisualScript implementation. I think Godot received it's fair amount of backlash for GDScript and that's why they added GDNative and C# |
22:25:10 | FromGitter | <Clyybber> Araq |
22:25:12 | Araq | unless you can ensure that e.g. '_n' is not used as a key because that would screw up the list part |
22:25:32 | Araq | well that was for Lua 5.x |
22:25:33 | AlexMax | no kidding, every time I've ever had to do something with Lua in C, I've had to keep comments about what's on the stack in comments, like I was writing assembly. |
22:25:34 | FromGitter | <Clyybber> Araq What list part do you mean? Do you mean the array part? |
22:25:39 | Araq | maybe they fixed that one... |
22:25:54 | Araq | yeah array part, list part, no difference for me |
22:26:41 | AlexMax | If Lua is bad to embed, and Python is worse, what's good? |
22:26:59 | FromGitter | <Clyybber> AlexMax Nothing |
22:26:59 | zacharycarter[m] | > <@freenode_FromGitter:matrix.org> <zetashift> I think GDScript is alright. And Godot is working on a VisualScript implementation. I think Godot received it's fair amount of backlash for GDScript and that's why they added GDNative and C# |
22:26:59 | Araq | it's not bad to embed. |
22:27:00 | zacharycarter[m] | So get rid of GD script then :P |
22:27:02 | FromGitter | <zetashift> Personally if I ever get to git gut in Nim I'd like to write bindings to Kha: http://kha.tech/ using their C api: https://github.com/Kode/Kore / https://github.com/Kode/Kha/tree/master/Backends/KoreHL/KoreC |
22:27:32 | zacharycarter[m] | I don't think that will work |
22:27:37 | FromGitter | <zetashift> probably not |
22:27:38 | Araq | it's not bad to embed, they got that part right. unfortunatley the *language* is bad |
22:27:41 | FromGitter | <zetashift> A man can dream |
22:27:45 | zacharycarter[m] | isn't kha based on that actionscript equivalent? |
22:27:49 | AlexMax | Oh? I misunderstood you then. I thought you said that you didn't like the stack-based C API? |
22:27:58 | zacharycarter[m] | haxe or whatever? |
22:28:07 | FromGitter | <zetashift> well the base is C and they (indeed) use haxe on top of it |
22:28:28 | Araq | AlexMax, the C API is bad, but better than most others |
22:28:30 | zacharycarter[m] | meh - just ditch haxe |
22:28:43 | FromGitter | <zetashift> exactly Nim would be a way better fit :D |
22:28:47 | AlexMax | *nod* |
22:29:03 | FromGitter | <Clyybber> Araq I think lua doesn't use _n anymore to store the length |
22:29:45 | Araq | yeah, they now use a hidden field and have the # operator to retrieve the length |
22:29:47 | zacharycarter[m] | > <@freenode_FromGitter:matrix.org> <zetashift> exactly Nim would be a way better fit :D |
22:29:48 | zacharycarter[m] | I see what you're saying - go from whatever language to Nim instead of C - yeah that'd be interesting but would probably require a complete rewrite of haxe I imagine |
22:30:26 | zacharycarter[m] | I'd just write your game / engine in Nim tbh |
22:30:48 | zacharycarter[m] | unless you're doing 3d - you shouldn't need something like godot anyway |
22:31:02 | FromGitter | <zetashift> I sortof am aren't I. I finished the SDL2 tutorial in Nim 2 weeks ago |
22:31:19 | FromGitter | <zetashift> and now tinkering with Godot agian seeing which I like more |
22:31:19 | FromGitter | <Clyybber> Now try vulkan |
22:31:21 | FromGitter | <Clyybber> jk dont |
22:31:38 | FromGitter | <zetashift> I'd like to finish a game ty |
22:31:55 | FromGitter | <Clyybber> Haha me too. Now I cant |
22:32:11 | zacharycarter[m] | I'm working on a new re-write of frag - I hope to produce something comparable to Lumix engine or Ethereal engine |
22:32:35 | zacharycarter[m] | what do you want to do? game programming or engine programming? - you don't need to learn an engine to learn how to write a game |
22:32:56 | zacharycarter[m] | IMO some of the more complex games are rougelikes - written without any type of engine at all for the most part |
22:33:41 | zacharycarter[m] | using a game engine often means you need someone to make graphics / sounds / etc and you will get lost in just learning the engine and staring at a lack of resources |
22:33:56 | FromGitter | <zetashift> I got to putting the @ on screen, moving it around and generating the map with nim + pdcurses |
22:33:57 | zacharycarter[m] | but you can certainly make a worthwhile game with just a terminal and programming knowledge and creativity |
22:34:13 | zacharycarter[m] | and forego having to learn a gam eengine |
22:34:21 | FromGitter | <Clyybber> ncurses is ironically a blessing |
22:34:46 | zacharycarter[m] | https://github.com/zacharycarter/nimrl |
22:34:48 | FromGitter | <zetashift> than I gave up cause I think way too OO and I have trouble with composition in Nim |
22:34:59 | zacharycarter[m] | render that with OpenGL |
22:34:59 | FromGitter | <zetashift> that map generator is smmmooootthh |
22:35:24 | zacharycarter[m] | https://github.com/zacharycarter/mapgen |
22:35:34 | zacharycarter[m] | you can do a lot without a real game engine |
22:35:49 | FromGitter | <Clyybber> zacharycarter I hate when roguelikes that use tiles, do it in an engine or a custom terminal |
22:36:00 | FromGitter | <Clyybber> Because then you cant play over ssh |
22:36:22 | AlexMax | dcss does both |
22:36:35 | zacharycarter[m] | well that's the king of RLs |
22:36:36 | FromGitter | <Clyybber> It has tiles and they are fantastic |
22:36:43 | AlexMax | wow holy cow |
22:36:44 | FromGitter | <Clyybber> CDDA does it like that too |
22:36:47 | zacharycarter[m] | but it didn't start that way |
22:36:49 | AlexMax | How did nim find my clang installation? |
22:36:54 | AlexMax | without me having to do anything |
22:36:56 | AlexMax | that's pretty slick |
22:36:57 | FromGitter | <Clyybber> Magic |
22:37:01 | zacharycarter[m] | are you on OSX? |
22:37:04 | AlexMax | No, Windows |
22:37:10 | zacharycarter[m] | no idea then |
22:37:24 | FromGitter | <zetashift> nim is packed with a trojan horse |
22:37:33 | FromGitter | <Clyybber> Also terminal roguelikes can be run through lolcat... |
22:38:17 | zacharycarter[m] | I really want to make a MUD in Nim |
22:38:18 | * | Taylor_ joined #nim |
22:38:27 | AlexMax | man does anybody play muds anymore heh |
22:38:28 | zacharycarter[m] | but no time for that |
22:38:41 | FromGitter | <Clyybber> AlexMax I would |
22:38:47 | FromGitter | <Clyybber> If others would |
22:38:48 | * | Taylor_ quit (Client Quit) |
22:38:51 | zacharycarter[m] | definitely |
22:39:07 | * | PrimHelios quit (Quit: Leaving) |
22:39:38 | * | PrimHelios joined #nim |
22:39:49 | zacharycarter[m] | https://github.com/shawncplus/ranviermud |
22:40:41 | * | xet7 quit (Quit: Leaving) |
22:40:51 | AlexMax | oh, clang must've put itself in my PATH |
22:40:55 | AlexMax | dream world shattered |
22:54:14 | AlexMax | hrm, is there shorthand to `doc` a library installed by nimble? |
22:57:17 | AlexMax | I did go into the .nimble directory and did it myself |
23:03:12 | FromGitter | <Clyybber> How would I get the function pointer of a nim function for using it as a callback for a c API? |
23:04:08 | * | seni quit (Quit: Leaving) |
23:10:14 | * | salios joined #nim |
23:10:19 | * | salios quit (Remote host closed the connection) |
23:23:17 | zacharycarter[m] | > <@freenode_FromGitter:matrix.org> <Clyybber> How would I get the function pointer of a nim function for using it as a callback for a c API? |
23:23:18 | zacharycarter[m] | I think you would pass it as a pointer to the C function |
23:23:28 | * | r3m19 joined #nim |
23:23:56 | zacharycarter[m] | and I think you have to annotate the proc with the `{.cdecl.}` pragma |
23:24:05 | zacharycarter[m] | see - https://forum.nim-lang.org/t/1801 |
23:24:24 | AlexMax | yay, I got my little sdl2 + opengl program working in windows |
23:24:38 | AlexMax | unfortunately, there is a problem |
23:24:51 | AlexMax | hidpi scales the resolution up |
23:25:03 | AlexMax | so the resolution number I pass SDL2 is a lie, a sweet little lie |
23:26:15 | zacharycarter[m] | AlexMax: sounds like a SDL2 issue |
23:26:30 | * | r3m19 quit (Remote host closed the connection) |
23:27:28 | AlexMax | zacharycarter[m]: It is a shortcoming in SDL2, but I've solved it before. |
23:27:35 | AlexMax | https://bugzilla.libsdl.org/show_bug.cgi?id=3281 |
23:28:19 | AlexMax | well, not solved...more like "worked around" |
23:28:32 | zacharycarter[m] | well whatever you did previously should be doable in Nim I would imagine |
23:29:03 | AlexMax | At least when doing C/C++, you have to pass an .rc file that points to a mainfest.xml file that tells Windows not to scale the window, that the application will handle scaling |
23:29:18 | AlexMax | https://github.com/chocolate-doom/chocolate-doom/blob/master/src/manifest.xml |
23:29:24 | zacharycarter[m] | why can't you do that with Nim? |
23:29:39 | AlexMax | Maybe I can. Not sure how, though. |
23:31:10 | zacharycarter[m] | looks like a huge / gigantic hack to make SDL2 behave properly on windows |
23:31:18 | zacharycarter[m] | is there any strong reason you're using SDL2? Are you developing for mobile? |
23:31:39 | zacharycarter[m] | if you're just using SDl2 for desktop windowing - you may want to checkout GLFW3 |
23:31:59 | AlexMax | I'm used to it, and I've used it before. |
23:32:04 | zacharycarter[m] | https://github.com/chocolate-doom/chocolate-doom/blob/master/src/setup-res.rc.in - looks sketchy |
23:32:51 | zacharycarter[m] | Maybe use GLFW3 then? If you're not taking advantage of the SDl2 drawing / other APIs - I don't see much sense in using SDl2 |
23:33:00 | zacharycarter[m] | I generally only opt for SDL2 when I need to target mobile |
23:33:05 | zacharycarter[m] | and then there's CSFML and Allegro |
23:33:13 | zacharycarter[m] | which are much lighter weight than SDL2 |
23:33:31 | zacharycarter[m] | and both support mobile |
23:33:34 | FromGitter | <zetashift> really even CSFML? |
23:33:34 | zacharycarter[m] | and OpenGL drawing contexts |
23:33:59 | zacharycarter[m] | if all you need is an opengl context sure - I generally don't even use OpenGL - I use BGFX |
23:34:42 | zacharycarter[m] | most of the content of these libraries is just cross platform system / threading / windowing / etc code |
23:34:45 | FromGitter | <zetashift> bgfx is probably better now that Apple is gonna stop supporting OPENgl |
23:35:10 | zacharycarter[m] | yeah - another point I raised with the Godot devs and was told off on |
23:35:24 | zacharycarter[m] | have fun writing your own Metal / Vulkan backends 😇 |
23:36:19 | AlexMax | Building bgfx on Windows is untested. |
23:36:22 | AlexMax | welp |
23:36:29 | zacharycarter[m] | wut? |
23:36:37 | zacharycarter[m] | no it's not |
23:36:37 | AlexMax | from nim-bfgx's readme |
23:36:49 | zacharycarter[m] | don't use those bindings |
23:36:50 | AlexMax | I meant to put a > in front of that |
23:37:18 | zacharycarter[m] | I'll have more up to date ones along with CI - https://github.com/zacharycarter/bgfx.nim - shortly |
23:37:35 | zacharycarter[m] | those bgfx bindings don't work - the author tried to assimilate the C++ api and failed |
23:37:48 | zacharycarter[m] | I just target the C99 api - but my bindings need updating as well |
23:39:12 | zacharycarter[m] | I'll work on that now |
23:39:13 | FromGitter | <zetashift> @zacharycarter iirc they're gonna target Vulkan and Metal through MoltenVK |
23:39:53 | zacharycarter[m] | I'm sure they will |
23:40:15 | zacharycarter[m] | and I'm sure they'll do something to completely screw it up |
23:41:50 | zacharycarter[m] | when you have a dev team working on a game engine claiming they won't do things because they're too complicated |
23:42:04 | zacharycarter[m] | but they're things that every other modern game engine exhibits |
23:42:11 | zacharycarter[m] | I start to lack trust in the team developing said game engine |
23:42:16 | zacharycarter[m] | even if I don't know how to do it |
23:44:37 | FromGitter | <zetashift> you really don't like the way they handle the engine huh |
23:44:42 | zacharycarter[m] | nope |
23:45:09 | zacharycarter[m] | a game engine should not be run by its community |
23:45:33 | zacharycarter[m] | most game engine users are not game engine programmers - not that I am either |
23:45:40 | * | francisl joined #nim |
23:45:56 | zacharycarter[m] | but it seems like there is a lot of considerations for people that have no game programming experience / very little - weaved into godots design decisions |
23:46:09 | zacharycarter[m] | in fact the core devs apologize for it a lot of the time |
23:46:37 | zacharycarter[m] | so who are we trying to appeal to here - people that want to make games? or 12 year olds that think gamemaker is too hard? |
23:46:45 | zacharycarter[m] | godot seems like it wants to appease the latter |
23:47:56 | FromGitter | <zetashift> I have no idea about the inner workings of the community I mainly use godot cause I can use Nim with it |
23:48:16 | FromGitter | <zetashift> and the docs were pretty noice |
23:48:46 | zacharycarter[m] | yeah - I mean godot has been around for a while and was commercial before it went OS so it's had a lot of hours poured into it |
23:48:58 | FromGitter | <zetashift> nice*, however I do hope to get some 3D stuff up, I don't know if I'll use Godot |
23:49:03 | FromGitter | <zetashift> https://armory3d.org/ is looking interesting |
23:49:23 | FromGitter | <zetashift> but if frag has an alpha by than I'll try it the spartan way why not |
23:49:29 | zacharycarter[m] | :) |
23:50:01 | zacharycarter[m] | armory is interesting - you have to wonder why they chose blender as an IDE though |
23:50:12 | zacharycarter[m] | I'm not sure if anything capable yet has been built w/ armory |
23:51:09 | FromGitter | <zetashift> no definitely not anything capable. That's why it's interesting for now. The dude is posting some neat stuff with it on twitter; https://twitter.com/luboslenco |
23:52:47 | zacharycarter[m] | yeah - hopefully it gets beyond that stage, I think it's definitely a better option vs Godot |
23:53:03 | AlexMax | oof, getting a lot of errors trying to `nim doc glm` |
23:53:40 | AlexMax | https://paste.ee/p/jLCwS |
23:53:47 | FromGitter | <zetashift> using haxe though ;( |
23:54:48 | zacharycarter[m] | yeah - but I have a feeling that was the only way to attack blender as an editor |
23:55:02 | zacharycarter[m] | I don't want my modeling program mixed with my game editor though |
23:56:14 | zacharycarter[m] | I mean - https://github.com/Kode/Kha |
23:56:17 | zacharycarter[m] | look at the code distribution there |
23:56:23 | zacharycarter[m] | it's just a haxe wrapper on top of C |
23:56:58 | zacharycarter[m] | so just sub kha with bgfx |
23:57:01 | zacharycarter[m] | and bgfx is probably more battle tested / capable than kha |
23:57:07 | zacharycarter[m] | considering a AAA graphics dev develops BGFX |
23:57:11 | zacharycarter[m] | and he knows what he's doing |
23:57:37 | zacharycarter[m] | also commercial games are built on BGFX |
23:57:38 | FromGitter | <zetashift> oh yea they fill the same niche |
23:57:54 | FromGitter | <zetashift> both got alot of attention when Apple announced their stuff about opengl |
23:58:16 | FromGitter | <zetashift> only thing was when I looked at the bgfx samples I understood absolutely nothing |
23:58:39 | zacharycarter[m] | bgfx predates armory by quite a bit |
23:59:00 | zacharycarter[m] | bfgx does more than just abstract away the APIs |
23:59:10 | zacharycarter[m] | it also does draw call bucket sorting |
23:59:24 | zacharycarter[m] | and other optimizations behind the hood when draw calls are made |
23:59:53 | zacharycarter[m] | it also has a C API which makes it very consumable |