00:01:18 | * | Matthias247 quit (Read error: Connection reset by peer) |
00:02:20 | * | ftsf_ joined #nim |
00:09:47 | * | onionhammer quit (Read error: Connection reset by peer) |
00:10:47 | * | onionhammer joined #nim |
00:11:04 | * | Vladar quit (Remote host closed the connection) |
00:22:45 | ftsf_ | morning! |
00:33:18 | * | gokr quit (Quit: Leaving.) |
00:36:59 | * | chemist69 quit (Ping timeout: 264 seconds) |
00:41:53 | * | chemist69 joined #nim |
00:46:40 | * | sz0 joined #nim |
00:56:50 | zachcarter | hey ftsf_ |
00:57:12 | ftsf_ | ahoy zachcarter |
01:07:48 | * | def-pri-pub joined #nim |
01:12:06 | FromGitter | <Varriount> Meep |
01:16:34 | zachcarter | hey Varriount |
01:24:36 | * | pie__ quit (Ping timeout: 240 seconds) |
01:25:06 | * | jh32 quit (Ping timeout: 245 seconds) |
01:32:47 | rauss | Hi |
01:59:59 | * | Nobabs27 joined #nim |
02:05:51 | * | yglukhov joined #nim |
02:10:17 | * | yglukhov quit (Ping timeout: 260 seconds) |
02:15:20 | * | brson quit (Quit: leaving) |
02:16:31 | * | krux02 quit (Remote host closed the connection) |
02:37:02 | * | user0___ joined #nim |
02:37:28 | * | user0___ quit (Client Quit) |
02:41:05 | * | chemist69 quit (Ping timeout: 260 seconds) |
02:54:34 | * | chemist69 joined #nim |
03:03:12 | * | rauss quit (Quit: WeeChat 1.7) |
03:04:46 | * | dexterk__ quit (Quit: Konversation terminated!) |
03:05:54 | * | user0___ joined #nim |
03:24:04 | * | kulelu88 joined #nim |
03:25:10 | * | user0___ quit (Quit: user0___) |
03:44:09 | * | Yaiyan is now known as Ieuan |
03:53:32 | * | Nobabs27 quit (Quit: Leaving) |
04:09:24 | * | def-pri-pub quit (Quit: Lost terminal) |
04:28:43 | kulelu88 | Does interaction with a file require the full file-path ? |
04:29:32 | ftsf_ | nope |
04:29:40 | ftsf_ | relative paths work too |
04:29:50 | ftsf_ | no different to any other language |
04:29:53 | kulelu88 | I am attempting to run my code against a file but I get an SQL error |
04:30:00 | kulelu88 | the executable and file are in the same folder |
04:30:18 | ftsf_ | maybe i missed some context. is this from nim? |
04:30:26 | kulelu88 | yes, let me show you my code |
04:32:31 | kulelu88 | ftsf_: https://www.zerobin.net/?82708fa2b603453f#ru5ig1afIkjm9wJIda86T2hUrTwmNeXDfsOsazH/sic= |
04:33:39 | kulelu88 | the error: Error: unhandled exception: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'SOURCE wp_posts.sql' at line 1 [DbError] |
04:34:14 | ftsf_ | right, so it's an SQL problem. check the (My)SQL manual? |
04:34:24 | ftsf_ | not to do with nim |
04:35:15 | kulelu88 | when I run this within MySQL it works though |
04:35:48 | ftsf_ | could be that command is only in the MySQL cli |
04:35:53 | ftsf_ | not part of the MySQL server |
04:37:00 | kulelu88 | you may actually be right ftsf |
04:38:14 | ftsf_ | it's been known to happen in the past |
04:38:34 | kulelu88 | ftsf: when I say: let db = open("localhost", "root", "pass", "db1"), how do I access each value in that statement? like, db.user = "root" ? |
04:38:46 | * | harrisi joined #nim |
04:39:00 | ftsf_ | i'm not sure |
04:39:30 | ftsf_ | i suspect you can't (unless you change the wrapper) |
04:40:03 | ftsf_ | might need to use the lower level mysql wrapper https://nim-lang.org/docs/mysql.html |
04:40:16 | dyce[m] | is this still an issue? https://forum.nim-lang.org/t/2596 |
04:40:20 | ftsf_ | db.user may work? |
04:40:41 | dyce[m] | in 0.16 |
04:43:11 | kulelu88 | ftsf: how do I add a newline to a statement ? |
04:43:26 | ftsf_ | statement & "\n" ? |
05:16:52 | * | yglukhov joined #nim |
05:19:57 | * | bungoman quit (Read error: Connection reset by peer) |
05:24:24 | * | sz0 quit (Quit: Connection closed for inactivity) |
05:33:43 | * | yglukhov_ joined #nim |
05:33:43 | * | yglukhov quit (Read error: Connection reset by peer) |
06:00:19 | * | vlad1777d joined #nim |
06:08:57 | * | chemist69 quit (Ping timeout: 256 seconds) |
06:14:07 | * | chemist69 joined #nim |
06:18:12 | kulelu88 | how do I execute bash commands from my program? |
06:19:42 | ftsf_ | https://nim-lang.org/docs/osproc.html |
06:21:24 | ftsf_ | with poEvalCommand |
06:21:43 | ftsf_ | be careful with it =) |
06:22:22 | kulelu88 | ftsf_: this is what I want to run: https://dev.mysql.com/doc/refman/5.7/en/mysql-batch-commands.html . "mysql db_name < file.sql |
06:22:51 | ftsf_ | yeah |
06:22:58 | kulelu88 | no rm -rf ;) |
06:23:22 | ftsf_ | as long as you don't let someone else enter the value |
06:23:58 | kulelu88 | ftsf_: why does the documentation not have clear examples for usage? I see the code there, but not how to use it |
06:24:22 | ftsf_ | because no one has added it y et |
06:25:17 | ftsf_ | execProcess("mysql db_name < file.sql") |
06:25:33 | kulelu88 | how does poEval come in there? |
06:25:54 | ftsf_ | read the documentation on that page =) it's by default with that command. |
06:36:13 | * | tankfeeder joined #nim |
06:51:03 | * | nsf joined #nim |
07:02:08 | * | zachcarter quit (Quit: zachcarter) |
07:05:29 | * | ftsf_ quit (Quit: :q!) |
07:42:24 | * | Vladar joined #nim |
07:57:17 | FromGitter | <vegansk> Wow, Travis build of Nim fails with the message: "The job exceeded the maximum time limit for jobs, and has been terminated." |
08:09:29 | * | couven92 joined #nim |
08:10:38 | * | rokups joined #nim |
08:17:47 | * | chemist69 quit (Ping timeout: 264 seconds) |
08:22:01 | * | chemist69 joined #nim |
08:27:45 | * | gokr joined #nim |
08:48:13 | * | Andris_zbx joined #nim |
09:00:22 | euantor | dyce[m]: Not sure, but from that forum I assume that the attachment proc is reading the file then writing it to the socket. I wonder why it doesn't just use `sendfile()`... |
09:05:29 | * | gokr quit (Ping timeout: 240 seconds) |
09:09:53 | * | couven92 quit (Quit: Client disconnecting) |
09:25:38 | FromGitter | <vegansk> @dom96, why do we need asyncfutures.injectStacktrace if we have exported ``errorStackTrace`` field from FutureBase? It breaks this message handling for example (https://github.com/vegansk/nimfp/blob/d5579acffa67735407f90cccf5ab877450b87133/tests/fp/test_futurem.nim#L46). I'm trying to get the message "Oops", but I get "Oops\n.... (and here is the stacktrace" |
09:29:49 | * | gokr joined #nim |
09:40:46 | * | bjz joined #nim |
09:44:49 | * | xet7 quit (Ping timeout: 260 seconds) |
09:44:55 | * | vlad1777d quit (Remote host closed the connection) |
09:45:15 | FromGitter | <vegansk> Nethermind, found workaround |
09:50:25 | * | antranig1 is now known as antranigv |
09:50:38 | * | Matthias247 joined #nim |
10:02:06 | * | gokr quit (Read error: No route to host) |
10:04:33 | * | couven92 joined #nim |
10:06:14 | * | kulelu88 quit (Quit: Leaving) |
10:06:33 | * | gangstacat quit (Quit: Ĝis) |
10:13:28 | FromGitter | <brechtm> is it possible to define const class variables? |
10:14:29 | FromGitter | <vegansk> @brechtm , const or variables? Maybe you mean immutable fields? |
10:14:43 | * | gangstacat joined #nim |
10:15:09 | FromGitter | <brechtm> @vegansk I'd like to associate the const with my class |
10:15:50 | FromGitter | <brechtm> Suppose I have a class "Camera", I could of course define const CAMERA_DELAY, but I would like to make it part of the class definition if possible |
10:17:30 | FromGitter | <vegansk> You need something line this: ⏎ ⏎ ```proc CAMERA_DELAY(t: typedesc[Camera]): int {.inline.} = 10 ⏎ echo Camera.CAMERA_DELAY``` [https://gitter.im/nim-lang/Nim?at=58d24f39b809ca5f4a6dcc97] |
10:18:40 | FromGitter | <brechtm> @vegansk Thanks... I'm off to learn about typedesc and .inline. now ;-) |
10:19:53 | FromGitter | <vegansk> @brechtm , and don't forget that Nim has no classes :-) |
10:20:09 | FromGitter | <brechtm> right |
10:20:54 | FromGitter | <brechtm> so perhaps the idiomatic way would be to simply define const CAMERA_DELAY? |
10:21:33 | FromGitter | <vegansk> Yes. |
10:21:36 | FromGitter | <Varriount> @brechtm I advise that you discard the idea that Nim object/reference types are classes... There are some similarities, however classes have l have things like static members/methods, vtables, and the like. |
10:22:32 | FromGitter | <brechtm> I'm coming from the Python world, so I'm still in that mindset |
10:24:13 | FromGitter | <brechtm> So it is perhaps not recommended to make use of the class macro? |
10:24:49 | FromGitter | <brechtm> Ah, it may not even be part of the stdlib: https://nim-by-example.github.io/oop_macro/ |
10:26:01 | FromGitter | <vegansk> @brechtm , you don't need it. Describe what you want to do? Do you want to implement some type and methods for it? |
10:26:13 | * | chemist69 quit (Ping timeout: 256 seconds) |
10:26:17 | FromGitter | <brechtm> @vegansk Yes, just basic stuff |
10:26:55 | * | gangstacat quit (Quit: Ĝis) |
10:28:35 | FromGitter | <vegansk> Camera class: ⏎ ⏎ ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=58d251d27b3f37e754227530] |
10:28:48 | * | kulelu88 joined #nim |
10:28:58 | FromGitter | <brechtm> @vegansk Yup, that's what I'm doing |
10:29:12 | * | chemist69 joined #nim |
10:29:23 | FromGitter | <vegansk> Then you don't need ``class`` macro |
10:30:18 | FromGitter | <brechtm> From what I understand, the class macro only offers Python-like class definition syntax? |
10:30:42 | kulelu88 | I have this piece of code: execProcess("mysql --user=" & user & " --password=" & pass & " --database=" & dbname & " < " & filename & ""), but when compiling, I get this error: test.nim(5, 3) Error: value of type 'TaintedString' has to be discarded . what does this mean? |
10:31:23 | FromGitter | <andreaferretti> @brechtm no, it generates methods, which use dynamic dispatch. You don't need those if types can be determined statically (i.e. quite often) |
10:31:45 | FromGitter | <brechtm> @andreaferretti I see... thanks |
10:32:04 | FromGitter | <andreaferretti> just stick to types and procs unless you find something that is not easily implemented in terms of those |
10:32:30 | FromGitter | <vegansk> @andreaferretti, it's true :-) I have no methods in my libraries :-) |
10:39:41 | kulelu88 | How do I discard an execProcess ? |
10:40:22 | FromGitter | <vegansk> ```code paste, see link``` |
10:40:41 | FromGitter | <vegansk> https://nim-lang.org/docs/manual.html#statements-and-expressions-discard-statement |
10:40:57 | kulelu88 | @vegansk : see my message above |
10:41:54 | FromGitter | <vegansk> @kulelu88, read the manual about ``discard`` |
10:43:00 | kulelu88 | @vegansk I have read that already, but when I do: discard execProcess , it still doesn't compile |
10:43:53 | cheatfate | kulelu88, but i think it doesn't compile with different error |
10:43:59 | FromGitter | <vegansk> I see no ``discard`` statement in your code |
10:44:28 | * | vlad1777d joined #nim |
10:44:36 | kulelu88 | cheatfate: same error |
10:45:17 | FromGitter | <brechtm> kulelu88: paste your complete program code to a pastebin? I assume it's not long? |
10:45:19 | * | bjz_ joined #nim |
10:46:12 | cheatfate | kulelu88, really, or you just trolling us? |
10:46:16 | cheatfate | import osproc |
10:46:16 | cheatfate | discard execProcess("asd") |
10:46:26 | cheatfate | compiles without any problem |
10:47:07 | * | bjz quit (Ping timeout: 260 seconds) |
10:47:17 | * | gangstacat joined #nim |
10:47:35 | kulelu88 | @brechtm : https://www.zerobin.net/?d9844b3176051c51#y7awoGb7KjFjwQXrElnR25kasgrFOUsyryOdGHXnFWk= |
10:47:39 | kulelu88 | cheatfate: ^^ |
10:47:53 | cheatfate | omg |
10:48:01 | cheatfate | really? |
10:48:02 | FromGitter | <vegansk> :smile: |
10:48:26 | kulelu88 | its internal, I know its a horrific thing to do code-wise |
10:48:42 | FromGitter | <vegansk> @kulelu, reread my example. |
10:49:24 | kulelu88 | @vegansk what example? |
10:49:29 | FromGitter | <brechtm> @kulelu88 you added a second execProcess() and discarded that? |
10:49:57 | FromGitter | <brechtm> @kulelu88 You need to discard your existing execProcess() |
10:50:13 | kulelu88 | @brechtm no, I am trying to discard the first one, because it throws this error: test.nim(6, 14) Error: value of type 'TaintedString' has to be discarded |
10:50:34 | cheatfate | kulelu88, also you attempt to execute sql statements will not be succeeded in such way `<` redirection works only in `shell` |
10:50:55 | cheatfate | kulelu88, look at your code and search for `discard` |
10:51:34 | kulelu88 | cheatfate: I am going through hell to try to import a .sql file into a database. I had to take an extreme measure of using a mysql command via osproc |
10:52:58 | cheatfate | kulelu88, use `poEvalCommand` in your options for execProcess |
10:53:22 | FromGitter | <brechtm> @kulelu88 compiles fine over here, if the second execProcess call (what's that for anyway?) is removed and the first execProcess's result is discarded |
10:53:38 | cheatfate | ahh ok execProcess will do it for, i have mistaken |
10:53:43 | kulelu88 | @brechtm how do I discard the first one? |
10:53:59 | FromGitter | <brechtm> @kulelu88 add "discard" in front |
10:54:26 | kulelu88 | by saying: discard execProcess (...) it first runs it, then discards it? |
10:54:27 | FromGitter | <brechtm> @kulelu88 but this should be obvious if you read the documentation on discard, I think... |
10:54:57 | FromGitter | <brechtm> @kulelu88 yes |
10:55:13 | FromGitter | <brechtm> well, it discards the result |
10:56:05 | kulelu88 | I like nim, its a very powerful language, but to be honest, the documentation is not too great. the lack of examples makes it difficult to understand what the libraries are intended to do |
10:56:08 | FromGitter | <brechtm> it is still being executed of course |
10:56:32 | cheatfate | kulelu88, execProcess return value must not be discarded, because you need to check this value if your import was successful |
10:56:43 | FromGitter | <brechtm> @kulelu88 which language(s) do you have experience with? |
10:57:05 | kulelu88 | @brechtm Python (mostly) |
10:57:37 | FromGitter | <vegansk> @kulelu88, I sent you a link to the documentation,. it says: ``The discard statement evaluates its expression for side-effects and throws the expression's resulting value away.``. What's wrong with it? Did you read it? |
10:58:26 | FromGitter | <brechtm> Yes, the docs on discard seem to be very clear. |
10:59:06 | FromGitter | <vegansk> And btw, you can make some PRs to improve the documentation if it seems not good. |
10:59:18 | kulelu88 | "evaluates its expression" would make more sense by saying "the discard statement will execute all code following the `discard` keyword and then it will throw any resulting value from the executed expression away" |
11:01:13 | FromGitter | <andreaferretti> don't know - for me it is clearer as stated now in the docs |
11:01:23 | FromGitter | <vegansk> https://nim-lang.org/docs/manual.html#statements-and-expressions: ``Nim uses the common statement/expression paradigm: Statements do not produce a value in contrast to expressions``. It means that expressions produces values. To produce the value, expression must be evaluated. Is it unclear? |
11:02:09 | stisa | It's not the discard statement that executes it though, it's executed regardless, you could have var myresult = procthatreturnssomthing(...), discard is "I don't care about the returned value |
11:02:50 | kulelu88 | the question is, `why` does it need to be discarded ? |
11:03:19 | FromGitter | <brechtm> @kulelu88 Just wondering, how experienced are you with programming in general? I can understand the docs may be more difficult to understand for a beginner. |
11:03:28 | FromGitter | <vegansk> Because you *must* handle the result, or tell ther compiler that you really don't need it |
11:03:57 | FromGitter | <andreaferretti> it is just a safety net |
11:04:04 | kulelu88 | @brechtm I know my way around Python quite well. I could have likely achieved a full PoC in Python by now, but I am trying to do this in Nim |
11:04:10 | FromGitter | <vegansk> And I think that it's a killer feature of Nim :smile: |
11:04:13 | FromGitter | <brechtm> ... because many procs return an error code. Discarding an error code is a bad idea, so it is made explicit in Nim. |
11:04:19 | FromGitter | <andreaferretti> if this wasn't required you may be ignoring the return value because of distraction |
11:04:35 | FromGitter | <andreaferretti> in fact, you *are* ignoring the return value right now :-) |
11:04:43 | kulelu88 | I've never known of needing to dispose of a return value in Python |
11:04:45 | FromGitter | <andreaferretti> even though it may signal failure |
11:04:59 | FromGitter | <andreaferretti> yup, in fact python is much less safe |
11:05:06 | FromGitter | <andreaferretti> it does not even have types |
11:05:17 | FromGitter | <andreaferretti> nim prefers to check things statically where possible |
11:05:39 | FromGitter | <andreaferretti> it is a help from the compiler |
11:05:54 | FromGitter | <andreaferretti> which reminds you that you are not handling the failure case correctly |
11:05:58 | kulelu88 | I don't get why I'm being assumed to be a beginner though. the language does have its quirks which aren't obvious to someone who isn't a "seasoned nim developer" |
11:06:21 | FromGitter | <brechtm> @kulelu88 I think this may be because in Python errors are handled more using exceptions, where in Nim error return codes are used more (at least when interacting with C code) |
11:06:40 | FromGitter | <andreaferretti> I guess that was because the phrase `evaluate its expression` was not clear to you, but I can only speculate |
11:06:47 | FromGitter | <andreaferretti> I did not assume anythin |
11:07:04 | FromGitter | <brechtm> yes, that's the reason |
11:07:18 | FromGitter | <brechtm> ... I assumed you *may* have been a beginner |
11:08:17 | kulelu88 | like cheatfate said that I need the return value from execProcess, but the documentation doesn't tell you how to store this return value (except in a variable, but then it isn't clear how to execute execProcess, unless calling the variable is enough, or that I am just mentally tired now) |
11:09:23 | FromGitter | <andreaferretti> the right way would be to assign the result to a variable and then do something with this variable - i.e. check whether the result was successful and if not handle the failure |
11:09:46 | kulelu88 | unless saying this: let outp = execProcess("nim c -r mytestfile.nim") ... is enough to both store the return value AND execute execProcess |
11:10:33 | FromGitter | <andreaferretti> ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=58d25ba86d7eb18404f394d2] |
11:11:22 | kulelu88 | oh, now I get it. |
11:11:51 | kulelu88 | okay that makes a lot more sense |
11:12:00 | kulelu88 | I wish that example was in the documentation instead |
11:13:39 | FromGitter | <vegansk> @kulelu88, do you use continuation passing style in python when calling functions? I guess no, and you use something like ``x = f(y)``. What's the difference? |
11:14:53 | kulelu88 | @vegansk when code starts to get complex to the point where it makes no sense to someone who hasn't written it, I refactor that code |
11:16:13 | FromGitter | <vegansk> </thread> |
11:19:16 | kulelu88 | gitter/slack people, yeah ... |
11:21:13 | * | vlad1777d quit (Remote host closed the connection) |
11:28:14 | kulelu88 | cheatfate: I hope you don't mind me asking, but knowing how my execProcess string looks like, what is the return value? it specifies that it is a string. is it the exact string I input or something else? |
11:28:31 | * | zachcarter joined #nim |
11:30:58 | * | krux02 joined #nim |
11:35:32 | * | bjz_ quit (Ping timeout: 260 seconds) |
11:35:48 | * | bjz joined #nim |
11:37:51 | FromGitter | <brechtm> @kulelu88 read the docs on execProcess and print the string returned in your program? |
11:39:31 | stisa | kulele88 I think it's what the command you executed would print to the console |
11:40:45 | kulelu88 | which is blank though. I ran the command raw and it shows no output. Does that mean I should do if/else checks with: if outcome == "": ... ? |
11:46:04 | * | PMunch joined #nim |
11:46:14 | stisa | depends on the command, I don't know what mysql prints when something goes wrong |
11:46:29 | * | shashlick quit (Ping timeout: 246 seconds) |
11:47:30 | FromGitter | <brechtm> You should check the return code of mysql to check if anything went wrong. I'm not sure how the return code is handled by execProcess. Perhaps translated to an exception? |
11:47:32 | * | shashlick joined #nim |
11:55:11 | * | nhywyll joined #nim |
11:59:46 | Araq | kulelu88 afaics this whole redirection thing with '<' is causing trouble |
12:00:01 | Araq | let p = runProcess(...) |
12:00:25 | kulelu88 | Araq: actually, I just tested the code using dicard execProcess and it worked. now I am just doing a sanity check on my horrific code |
12:01:02 | Araq | let inp = p.inputStream |
12:01:11 | Araq | inp.write(data) |
12:01:15 | Araq | inp.flush() |
12:01:24 | Araq | p.close() |
12:01:38 | Araq | don't use the shell for this. |
12:01:56 | kulelu88 | thank you Araq . I will refactor the code to use what you wrote instead |
12:03:06 | Araq | if it works, please create a PR for osproc's docs. |
12:03:10 | Araq | they need examples. |
12:04:04 | * | zaquest quit (Remote host closed the connection) |
12:04:56 | * | zaquest joined #nim |
12:21:14 | * | gokr joined #nim |
12:25:29 | * | gokr quit (Ping timeout: 240 seconds) |
12:27:56 | * | zachcarter quit (Quit: zachcarter) |
12:42:36 | * | gokr joined #nim |
12:44:09 | PMunch | Hmm Araq, I'm trying to convert some of the DC (painting on surfaces) headers from wxWidgets |
12:44:56 | PMunch | How would you convert something like #if defined(__WXMSW__) which checks for Windows compatibility portably |
12:45:22 | Araq | when defined(windows) |
12:45:57 | PMunch | Yeah, but these are still running through your wx.c2nim file |
12:46:21 | PMunch | If we should try to not modify them after they are auto-generated |
12:50:01 | Araq | well what did I do with these things the last time? |
12:50:12 | Araq | don't remember. do what I did. I had my reasons. |
12:51:54 | krux02 | Araq: what was it that I need to do, so that my editor doesn't show me anymore the error messages in included files |
12:55:19 | krux02 | emacs uses nimsuggest |
12:55:45 | krux02 | And that one emits a lot of error messages. |
13:03:47 | PMunch | Hmm, the error message "Error: redefinition of 'WxDC'" would be more helpful if it told you were it was defined first.. |
13:10:16 | * | zaquest quit (Quit: Leaving) |
13:12:21 | * | krux02 quit (Quit: Leaving) |
13:18:17 | * | nhywyll quit (Quit: nhywyll) |
13:20:50 | * | zachcarter joined #nim |
13:23:48 | * | couven92 quit (Quit: Leaving) |
13:24:06 | * | couven92 joined #nim |
13:24:51 | PMunch | Araq, did you ever encounter these: http://ix.io/paE |
13:27:18 | * | bjz quit (Quit: My MacBook Pro has gone to sleep. ZZZzzz…) |
13:27:59 | zachcarter | I’ve installed nim according to the website on arch linux (downloading the nim tar file and extracting and running build.sh) and installed nimble with koch |
13:28:08 | zachcarter | I’m getting the following error when trying to install nake : http://imgur.com/a/QLWqU |
13:28:19 | zachcarter | can anyone help me? I’m not an arch-linux user normally, generally I use osx |
13:29:00 | PMunch | It does say that nake is already installed |
13:29:08 | PMunch | So maybe you don't need to install it? |
13:29:16 | PMunch | That being said Nim is available in the AUR for Arch |
13:29:25 | zachcarter | ah okay thank you I’ll install it that way |
13:29:52 | PMunch | Nake too by the looks of it |
13:30:05 | zachcarter | maybe - but typing nake doesn’t do anything for me - not sure if it’s installed and not on my path or what |
13:30:34 | PMunch | Well nake is also in the repositories so you should be good installing from there :) |
13:30:53 | zachcarter | ah okay thanks PMunch |
13:31:11 | PMunch | No problem |
13:31:25 | PMunch | And remember, on Linux always check your package manager first :) |
13:31:31 | zachcarter | gotcha |
13:33:58 | * | zaquest joined #nim |
13:40:41 | * | dexterk joined #nim |
14:01:27 | * | Snircle quit (Quit: Textual IRC Client: www.textualapp.com) |
14:06:02 | * | gokr quit (Ping timeout: 260 seconds) |
14:10:48 | * | vlad1777d joined #nim |
14:22:55 | FromGitter | <brechtm> @zachcarter I think I might have run into the same error when trying to install nake using nimble. The solution was to upgrade Nim to the devel version (I was using 0.16.0) |
14:23:20 | FromGitter | <brechtm> That was on macOS though |
14:26:55 | * | krux02 joined #nim |
14:32:18 | krux02 | I am on arch linux, with devel branch version of Nim, and nimble install nake does work just fine |
14:34:07 | krux02 | zachcarter, use the development version of Nim. I do it too, and then nake will also compile just fine |
14:36:27 | zachcarter | okay thanks |
14:38:09 | zachcarter | krux02: that’s what I tried doing previously and it didn’t work but I’ll try again |
14:38:16 | demi- | i want to say i have that problem too and it ended up making me not use nake for stuff and using nimble tasks instead |
14:38:37 | demi- | but iirc, araq has said that mac users should be using devel, not 0.16.0 anyway due to a more serious bug |
14:39:54 | zachcarter | ah yeah devel on my mac works fine |
14:40:04 | zachcarter | I just have problems with ubuntu / arch |
14:40:17 | zachcarter | getting nim / nimble / nake to play nicely when checking everything out from git |
14:40:42 | FromGitter | <brechtm> @zachcarter but from the devel branch? |
14:41:05 | zachcarter | I think that’s the default branch right? |
14:41:15 | zachcarter | pretty sure ti is |
14:41:16 | zachcarter | it is* |
14:41:26 | FromGitter | <brechtm> @zachcarter master is the default for git... not sure if that can be changed |
14:41:33 | zachcarter | it can be on github |
14:42:58 | FromGitter | <brechtm> @zachcarter I guess git will checkout master if not specified... |
14:44:00 | demi- | brechtm, git has a primary branch, which by default gets named "master", but you can name it anything you want when you initialize the repo. github supports changing primary branches through the web UI, when you do a `git checkout`, it will checkout the primary branch (whatever it is called) |
14:44:43 | FromGitter | <brechtm> ah, it does indeed checkout devel when cloning the Nim repo! |
14:46:12 | demi- | sorry, i meant clone, not checkout |
14:46:28 | demi- | checkout without an argument might also do that, i haven't checked |
14:46:30 | krux02 | demi-, svn background? |
14:48:22 | demi- | krux02: me? not especially |
14:49:04 | krux02 | just because svn checkout is equivalent to git clone |
14:50:03 | krux02 | but doesn't really matter |
14:54:05 | FromGitter | <brechtm> is it possible to automatically initialize an object's attributes? |
14:54:38 | FromGitter | <brechtm> iwith default values, without having to |
14:54:59 | FromGitter | <brechtm> i.e. with default values, without passing them on object instantiation |
14:57:24 | chemist69 | zachcarter: I am using Nim on Arch. The best way imho is to clone the repo (https://github.com/nim-lang/Nim) and follow the instructions of the Readme (at the end of `Compiling`) |
14:57:48 | chemist69 | same on Ubuntu. |
14:58:21 | * | tankfeeder quit (Quit: Leaving) |
14:58:26 | * | sz0 joined #nim |
14:59:09 | FromGitter | <brechtm> Is there something like repl.it for Nim? |
14:59:40 | chemist69 | zachcarter: add <nimdir>/bin and ~/.nimble/bin to your PATH and you're good to go. |
15:00:10 | chemist69 | you not even need to use sudo once. |
15:01:19 | chemist69 | brechtm: there are a few packages in nimble, but I haven't tried them. |
15:01:57 | chemist69 | nrpl, tnim |
15:02:14 | stisa | brechtm is that similar to https://glot.io/new/nim ? |
15:02:35 | * | ftsf quit (Quit: Leaving) |
15:07:30 | FromGitter | <brechtm> @stisa yes, thanks! |
15:13:12 | FromGitter | <brechtm> @chemist sorry, I was talking about an online Nim editor/compiler, not an interactive REPL |
15:13:31 | chemist69 | ok, np |
15:30:19 | * | yglukhov_ quit (Remote host closed the connection) |
15:36:38 | * | yglukhov joined #nim |
15:41:17 | * | yglukhov quit (Ping timeout: 256 seconds) |
15:56:16 | * | brson joined #nim |
15:56:39 | FromGitter | <Varriount> <3 glot.io |
16:03:15 | * | xet7 joined #nim |
16:04:29 | demi- | Araq: i am attempting to port a header using c2nim and the header has a number of compiler and platform specific defines that rely on C style defines that don't translate into nim due to starting with underscores, is there a way to handle this case? |
16:15:57 | Araq | #mangle rule |
16:27:30 | * | yglukhov joined #nim |
16:29:36 | krux02 | Araq: you mentioned once you would help me to get "include" have a better support in text editors |
16:29:58 | * | yglukhov quit (Remote host closed the connection) |
16:30:07 | federico3 | Araq: c2nim does not support per-user .cfg files, right? Do you create mangle rules for common manglings (e.g. uint8_t -> uint8) in each header file? |
16:30:59 | krux02 | I would really like to write the stuff needed, so that I get the correct symbols in files that are included from other files |
16:34:01 | * | couven92 quit (Quit: Client disconnecting) |
16:35:36 | * | arnetheduck quit (Ping timeout: 240 seconds) |
16:36:56 | * | yglukhov joined #nim |
16:43:40 | * | yglukhov quit (Remote host closed the connection) |
16:48:35 | krux02 | aparently I got it working |
16:48:55 | krux02 | you could have said, that all I need is an empty project.nim.cfg |
16:50:53 | krux02 | or I don't know now I have no errors anymore |
16:51:08 | krux02 | this is too much friction to write nim code |
16:53:03 | * | Andris_zbx quit (Remote host closed the connection) |
16:55:44 | FromGitter | <vegansk> @brechtm, standard object constructor fills the fields with zero values. You can try this (https://github.com/vegansk/nimboost/blob/master/tests/boost/test_typeutils.nim#L117-L120). One of the feature of the ``data`` macro is generating the object constructor with default values. |
16:55:56 | demi- | federico3: that specific rule example you gave should be built-in as it is part of the c standard library now |
16:58:41 | krux02 | Araq: can you give me a nimsuggest tutorial? |
17:00:29 | krux02 | when I execute nim-find-project-path in emacs, it tells me myproject.nim.cfg |
17:00:43 | krux02 | should that be passed to nimsuggest as a parameter? |
17:00:45 | krux02 | I don't know |
17:00:55 | krux02 | but that is what nim-mode does |
17:01:07 | krux02 | and the result is no errors at all. |
17:02:41 | * | couven92 joined #nim |
17:04:25 | * | sz0 quit (Quit: Connection closed for inactivity) |
17:11:40 | * | yglukhov joined #nim |
17:16:59 | Araq | federico3: it does support that, look at wxWidgets wrapper foo.c2nim files |
17:17:18 | Araq | krux02: just pass it a directory if you don't know the main nim file (only works with devel) |
17:17:21 | Araq | gotta go, bye |
17:19:39 | krux02 | I am on devel |
17:19:57 | krux02 | I know the main nim file |
17:23:58 | dom96 | hi guys |
17:33:22 | federico3 | hi dom96 |
17:43:45 | * | Trustable joined #nim |
17:50:02 | * | brson quit (Read error: Connection reset by peer) |
17:51:45 | krux02 | what should I put in myproject.nim.cfg? |
17:55:28 | * | brson joined #nim |
17:59:35 | yglukhov | string index which is equal to its len is not out of bounds. is this intended? or a bug? |
18:02:47 | def- | yglukhov: well, that's the \0 |
18:03:11 | * | bjz joined #nim |
18:05:20 | yglukhov | def-: so? is it semantically correct to refer to trailing \0? |
18:06:06 | yglukhov | string.len says there is no \0 in the end. i'd say \0 is an implementation detail to ease C interop. |
18:06:12 | def- | not sure, C style functions will want to access that to figure the end |
18:07:03 | yglukhov | C funcs dont use nim bounds checks so they don't care =) |
18:07:58 | dom96 | yglukhov: it is correct to refer to it |
18:07:59 | * | brson quit (Read error: Connection reset by peer) |
18:08:20 | dom96 | It's useful when parsing and used a lot in that context |
18:09:00 | yglukhov | dom96: does this code look correct? https://github.com/nim-lang/Nim/issues/5592 |
18:09:12 | yglukhov | dom96: btw, seen my pr to jester? |
18:10:39 | * | brson joined #nim |
18:13:42 | krux02 | don't override the \0, bad things might happen |
18:15:10 | krux02 | C has two ways to handle string lengths. |
18:15:16 | * | sz0 joined #nim |
18:15:17 | yglukhov | don't let me do it! =) |
18:15:46 | krux02 | The standard library has all string operations also on sized strings without '\0' at the end |
18:15:59 | krux02 | but don't rely on that |
18:16:12 | krux02 | most c libraries just use 0 terminated strings |
18:16:24 | yglukhov | krux02: thats kinda not what i'm asking about. |
18:17:20 | krux02 | ok, then it's not really clear to me what the question is |
18:17:42 | yglukhov | should the exception happen? https://github.com/nim-lang/Nim/issues/5592 |
18:18:10 | krux02 | To the question intended/bug it is obviously intended. |
18:18:41 | krux02 | well I would say, yes |
18:19:08 | krux02 | overriding the terminating 0 -> bad things might happen |
18:20:02 | krux02 | but reading it should be fine |
18:20:19 | yglukhov | not only overriding, but even reading it, i'd say. from idiomatic nim perspective |
18:20:47 | * | brson quit (Ping timeout: 264 seconds) |
18:21:01 | * | jjido joined #nim |
18:21:46 | krux02 | maybe you are right, from the nim side the terminating 0 should be inaccessable |
18:21:55 | krux02 | but it should be documented that it is there |
18:22:17 | krux02 | so that people can safley use nimString in a C context without also be required to pass the length |
18:22:24 | yglukhov | i suppose its already documented somewhere... |
18:22:45 | * | bjz quit (Quit: My MacBook Pro has gone to sleep. ZZZzzz…) |
18:22:56 | yglukhov | well, thumbs up to the issue then! =) |
18:25:29 | krux02 | I did it, then you could also give a thumbs up for my issue: https://github.com/nim-lang/Nim/issues/5493 |
18:26:56 | * | jivank_ joined #nim |
18:28:22 | * | brson joined #nim |
18:29:29 | jivank_ | cheatfate: as soon as i can get back to my windows box i'll let you know if the exe that nim produced is also 32bit. but i assume there shouldnt be issues using 32bit nim with 64bit windows? |
18:29:50 | cheatfate | we have issues before with 32bit |
18:31:33 | yglukhov | krux02: done. your hack would not work if someone using your lib messes with arch flags. |
18:32:09 | * | brson quit (Read error: Connection reset by peer) |
18:32:35 | yglukhov | krux02: however, you can still generate the needed part of the shader code in runtime, i guess |
18:32:37 | * | jjido quit (Ping timeout: 260 seconds) |
18:33:16 | jivank_ | cheatfate: alright i can try to reproduce with 64bit nim |
18:33:27 | krux02 | yglukhov, generating the parts at runtime is something I would like to avoid, because at some point i plan to include support for shader checking at compile time |
18:34:00 | krux02 | so that my inline shader code is passed to a checker, and I can generate error messages for the shader part |
18:34:44 | krux02 | at the moment that doesn't work yet, because I cannot properly emit error messages into string literals, but there is not much that needs to be added, so that it works. |
18:35:02 | yglukhov | krux02: have you considered using my nimsl btw? i have ideas how to make it support uniforms/varyings/ifdefs in arbitrary places |
18:35:08 | krux02 | I can't check a shader that does not exist at compile time |
18:35:55 | krux02 | if i remember correctly that was the project that compiled nim to glsl?! |
18:36:04 | * | rauss joined #nim |
18:36:11 | yglukhov | yup |
18:36:28 | yglukhov | i think hlsl backend is also possible |
18:37:40 | krux02 | honestly I have thought of it, but there are several things that would be required to be mapped to nim |
18:37:54 | krux02 | not everything is trivial |
18:38:04 | krux02 | for example the layout stuff |
18:38:35 | krux02 | or the offset parameters |
18:38:51 | yglukhov | {.pragma syntax.} ? =) |
18:39:09 | krux02 | the problem is, that glsl is documented, a nim version of it would not be documented |
18:39:26 | krux02 | and then there are in/out qualifiers for function parameters |
18:39:34 | krux02 | inout is var |
18:39:45 | krux02 | but how to encode just out? |
18:39:46 | yglukhov | out is var as well |
18:39:53 | yglukhov | in is just nothing |
18:40:39 | krux02 | that is the problem, both inout and out are var |
18:40:52 | krux02 | so how to translate var? as out or as inout? |
18:41:36 | krux02 | ok, can I talk to you in 20 minutes, I have to change the office? |
18:41:36 | yglukhov | why bother? just pick the one that matches nim's var semantics. |
18:42:23 | krux02 | that would be inout then |
18:42:25 | yglukhov | dunno, but im here almost all the time |
18:42:34 | yglukhov | except when sleeping =) |
18:42:37 | krux02 | not sure if the excludes possible optimizations |
18:42:44 | krux02 | ok |
18:42:47 | krux02 | have to go now |
18:43:14 | * | krux02 quit (Quit: Leaving) |
18:47:50 | cheatfate | jivank_, its better to post source you used to reproduce to issue |
18:55:43 | * | yglukhov quit (Remote host closed the connection) |
19:03:42 | * | deavmi__ joined #nim |
19:07:16 | * | deavmi__ left #nim (#nim) |
19:13:15 | * | kulelu88 quit (Quit: Leaving) |
19:15:01 | FromGitter | <rsirres> tryin to do some async stuff with nim and wondering whether there is a similar pair of functions: resolve and reject ? |
19:18:16 | * | bjz joined #nim |
19:20:41 | dom96 | yglukhov: Sorry, I only skimmed it so far. |
19:22:31 | dom96 | rsirres: what would those operations do? |
19:22:35 | * | rauss quit (Ping timeout: 264 seconds) |
19:23:36 | * | yglukhov joined #nim |
19:23:58 | FromGitter | <rsirres> `````` |
19:24:03 | FromGitter | <rsirres> var p = new Promise(function(resolve, reject) { ⏎ ⏎ // Do an async task async task and then... ⏎ ⏎ if(/* good condition */) { ... [https://gitter.im/nim-lang/Nim?at=58d2cf517b3f37e7542514c5] |
19:24:24 | * | rauss joined #nim |
19:26:26 | dom96 | Still not sure what resolve/reject does here |
19:26:50 | dom96 | what are you trying to accomplish? |
19:27:17 | cheatfate | resolve/reject complete()/fail() |
19:27:57 | cheatfate | rsirres: check code of asyncdispatch.nim for examples |
19:28:09 | FromGitter | <rsirres> I try to add middleware |
19:28:16 | * | krux02 joined #nim |
19:28:18 | FromGitter | <rsirres> to my web framework |
19:29:32 | FromGitter | <rsirres> and I need a way to let the caller know when a Future (or Promise) failed or succeeded |
19:30:11 | FromGitter | <rsirres> @cheatfate thx |
19:31:50 | krux02 | yglukhov, I am back |
19:31:59 | yglukhov | still here =) |
19:43:42 | krux02 | yglukhov, ready to talk about your nim to glsl compiler? |
19:45:05 | yglukhov | sure |
19:46:08 | dom96 | yglukhov: merged your PR thanks (see my comment in the PR though) |
19:46:20 | * | bjz quit (Quit: My MacBook Pro has gone to sleep. ZZZzzz…) |
19:47:56 | * | brson joined #nim |
19:48:16 | yglukhov | dom96: thanks! |
19:55:08 | demi- | hmmm, i'm using the `times` module and initializing a variable as `let local_time = getLocalTime(getTime())` and it is saying it cannot prove that this ever gets initialized? is there a way i can work around this since it says it will be a compiler error in the future? |
19:57:33 | dom96 | demi-: I guess that's an issue with the `times` module, not your code. |
19:58:11 | demi- | right, can i do anything to mitigate that? |
19:59:58 | dom96 | You can fix the issue in the `times` module, if you're up for that. |
20:01:17 | demi- | ¯\_(ツ)_/¯ |
20:05:54 | dom96 | :\ |
20:13:10 | * | Snircle joined #nim |
20:17:51 | demi- | don't have time to dig into it right now, will at least open a new github issue about it |
20:22:36 | krux02 | yglukhov, I looked at your code again, I am not sure how you handle or plan to handle uniforms |
20:24:33 | yglukhov | krux02: currently they are defined as args of the "root" function. i want to add another way. proof of concept: https://github.com/yglukhov/nimsl/blob/master/nimsl/private/var_decls.nim#L74 |
20:25:36 | dom96 | demi-: it's cool |
20:25:39 | krux02 | so is it the "u" prefix? |
20:25:59 | dom96 | Anyone else find errors like: Error: type mismatch: got (int, float64) for `*` annoying? |
20:26:36 | krux02 | dom96, that is not annoying, that means you use types inconsistently |
20:27:06 | krux02 | int and float64 can not be converted in any direction without loss |
20:27:27 | Araq | yay.... somebody agrees with me :-) |
20:27:44 | yglukhov | krux02: no, all args not "var" and not starting with "v" prefix are uniforms. |
20:27:49 | PMunch | http://serv.peterme.net/devlog/cross-platform-guis-and-nim-macros.html |
20:27:50 | krux02 | int32 to float64 would be possible without loss |
20:27:59 | demi- | pretty sure you can create floats that equivalent to integer values |
20:28:09 | PMunch | Wrote a little something on creating GUIs with wxnim |
20:28:24 | krux02 | is there any support for texturing? |
20:28:47 | PMunch | dom96, I've found them annoying but there are good reasons for them.. |
20:28:56 | yglukhov | krux02: but thats unwieldy for complex shaders. thats why i want to allow varying/uniform definitions in arbitrary places. |
20:29:19 | krux02 | texture mapping is the most magical thing in glsl, and I guess the number one reason why you would not want to write your own sofware renderer |
20:29:47 | PMunch | And I can't think of a good way that both satisfies those reasons and makes it easier to use.. |
20:29:50 | yglukhov | krux02: samplers are not yet implemented. its easy to support them in codegen, but a bit harder to do in software renderer |
20:29:58 | PMunch | Short of defining a whole new set of operations.. |
20:30:24 | dom96 | Well, I end up with type conversion in way more places than i'd like |
20:30:33 | dom96 | *conversions |
20:30:47 | yglukhov | krux02: though i it doesn't look THAT hard to support samplers in software renderer |
20:31:05 | krux02 | well texture is implemented in a way, that it does mipmapping and anisotropic filtering |
20:31:29 | krux02 | that is something that can't be solved locally by evaluationg the result of a single fragment |
20:31:59 | krux02 | and why do you want a software renderer? |
20:32:15 | * | rokups quit (Quit: Connection closed for inactivity) |
20:33:04 | krux02 | I agree that there is a lot that would be very nice if it would be available at both glsl side, and at cpu side |
20:33:18 | yglukhov | krux02: that is not necessary for software. sw is not meant to reproduce hw quality. the main purpose is to allow more debugging options. |
20:33:57 | krux02 | ok that's true, but I would skip the software renderer for now |
20:34:13 | krux02 | the should be an empty texture proc that does nothing |
20:34:22 | krux02 | only there for the code generation |
20:34:23 | yglukhov | when implementing some custom effects, you can echo, or debug with gdb, etc |
20:35:10 | krux02 | yea debugging nim with gdb is really an improvement ... but yes generally I do agree |
20:35:10 | yglukhov | krux02: totally. sw samplers could just return black every time. no problem. |
20:35:48 | krux02 | One thing that I invested quite some time into is framebuffer support |
20:36:03 | krux02 | framebuffers allow an arbirary amount of outputs in the fragment shader |
20:36:20 | krux02 | each of the renders into a different texture |
20:36:23 | * | zachcarter quit (Ping timeout: 264 seconds) |
20:36:37 | Araq | krux02: what else do you need to know about nimsuggest? |
20:37:01 | yglukhov | krux02: i suppose thats some recent opengl. not webgl, and not ES2.0? |
20:37:37 | krux02 | Araq, I am trying to make my project show the correct error messages in emacs in included files. Currently that is not the case. |
20:37:56 | krux02 | I looked a bit how nim-mode works internally |
20:38:33 | krux02 | when i have a project.nim.cfg, this file is passed as the root of the project to the instance of nimsuggest |
20:38:38 | krux02 | I think that is wrong |
20:39:04 | krux02 | it should be the root of the project, so a nim file, not a cfg file |
20:39:14 | krux02 | but I don't know, I couldn't find good documentation |
20:40:52 | krux02 | yglukhov, not that recent, they are indeed in ES2.0 http://docs.gl/gl3/glGenFramebuffers |
20:42:43 | krux02 | Araq, the big question is, what file/folder exactly does nimsuggest need to have as an argument, so that I see the correct error messages? And how to I properly resolve that? |
20:42:46 | yglukhov | krux02: framebuffers themselves yes, but not multiple framebuffer targets, afair. i mean, in some recent opengl you can output arbitrary number of channels to multiple framebuffers in single fragment shader. |
20:44:27 | krux02 | yglukhov, you are right, in openglES I can only have one color attachment. |
20:44:35 | krux02 | in ES2 |
20:44:43 | krux02 | in ES3 I can have more |
20:46:55 | * | rauss quit (Quit: WeeChat 1.7) |
20:47:58 | PMunch | Hmm Araq, for some reason you need 0.16.1 to run the genui macro. Can you think of a reason |
20:48:18 | PMunch | It seems to compile fine but generates invalid code.. |
20:52:51 | krux02 | Araq, when I pass just the folder, the includes are not resolved properly |
20:54:01 | krux02 | yglukhov, I can help you integrate your nim2glsl compiler in my macro library, if you want that |
20:54:16 | krux02 | I think it should be easy to do that |
20:55:58 | krux02 | If you can see it, I have different sections in the code, and one of them is for example fragmentMain, where a tripple string literal resides |
20:56:40 | * | vlad1777d quit (Remote host closed the connection) |
20:57:13 | krux02 | those sections are quite flexible, I could add one section that allows to use your nim2glsl compiler for both the fragment shader and the other shaders |
20:59:07 | krux02 | the only problem I see right now, is that varyings are not visible in the nim type system |
20:59:53 | krux02 | I decided to do varyings as string literals in case there would come something I would not be prepared for. |
21:00:35 | krux02 | It turned out to be wise, because "flat" is an important attribute for varyings |
21:01:06 | yglukhov | krux02: well in nimsl varyings can be part of nim type system. |
21:01:56 | krux02 | I know, because they are part of the function parameters |
21:03:06 | yglukhov | krux02: anyways, i would welcome nimsl users. and would appreciate feedback on it. |
21:03:15 | yglukhov | and prs :D |
21:03:46 | krux02 | so do I :D |
21:04:10 | krux02 | have you once tried to compile my examples? |
21:06:14 | yglukhov | yep. quite some time ago. |
21:06:59 | krux02 | cool |
21:07:10 | * | nsf quit (Quit: WeeChat 1.7) |
21:07:26 | krux02 | not all of them even work, I think I should add comments to those that did not get maintenance for quite some time |
21:07:37 | krux02 | how do you like it? |
21:11:38 | yglukhov | the effects are interesting. i could not see though how to do shader source sompositing in runtime though. and tbh i did not spend a lot of time tinkering with it. |
21:12:29 | yglukhov | in fact nimsl is not yet good at it as well, but it is designed to be as non-intrusive as possible. |
21:31:54 | krux02 | yglukhov, what do you mean with source compositing? |
21:33:15 | yglukhov | krux02: shader source generated in runtime. by mixing several "post-effects". |
21:33:50 | krux02 | well I don't support source generation at runtime at all. |
21:34:01 | krux02 | but I see that more as a feature as something that is desired |
21:34:16 | krux02 | It took a a while that all my shaders are 100% generated at compile time |
21:34:45 | krux02 | it's great, because I can print the complete shader code at compile time as debug information |
21:35:41 | krux02 | one idea I had was to write all generated shaders to files |
21:35:45 | Araq | krux02: can you elaborate? nimsuggest on dir detects main.nim file |
21:35:58 | krux02 | and then put code at runtime that reloads them at runtime, when they are changed |
21:36:01 | Araq | because of the existance of main.nim.cfg or similar |
21:36:12 | krux02 | so that shaders can be modified in a running game/program |
21:36:14 | yglukhov | rod game engine used to use compile-time generated shaders as well, but then we figured we need a post-effect system, like color correction, tinting, etc to be applied to different nodes like sprites, text, etc. and now we have it. |
21:36:33 | krux02 | Araq: is it required to be called main.nim? |
21:36:54 | krux02 | because for me it is not call main.nim it is called program.nim |
21:37:01 | krux02 | project.nim |
21:37:35 | Araq | no, that's just an example |
21:37:59 | Araq | what's important is that you have x.nim and also x.nimble or x.nim.cfg |
21:38:00 | krux02 | so what is the naming convention to detect the "main"? |
21:38:13 | Araq | so that the entry point can be detected. |
21:38:15 | krux02 | I have x.nim and x.nimble |
21:38:21 | Araq | in the same dir? |
21:38:24 | krux02 | yes |
21:38:28 | Araq | hmmm |
21:38:39 | Araq | then it should work |
21:38:51 | yglukhov | whats wrong with forum mail list? i no longer get any notifications :( |
21:39:20 | krux02 | Error: invalid module name: '' |
21:39:25 | * | Trustable quit (Remote host closed the connection) |
21:39:46 | krux02 | Hint: [Processing] |
21:39:46 | krux02 | Error: cannot open '' |
21:40:29 | * | j75__ quit (Ping timeout: 258 seconds) |
21:40:48 | Araq | krux02: ok, then something else is wrong |
21:40:57 | * | gokr joined #nim |
21:41:20 | krux02 | yglukhov, what kind of post processing do you mean? I support framebuffers, that allows all kinds of post processing steps. |
21:42:24 | yglukhov | krux02: tint. color fill. gradient fill. channel levels. HLS color balance. have a look at rod components ;) |
21:42:30 | * | pie__ joined #nim |
21:43:30 | yglukhov | krux02: e.g. https://github.com/yglukhov/rod/blob/master/rod/component/color_fill.nim |
21:43:44 | krux02 | it has a nakefile nimble and nims |
21:43:53 | krux02 | too many options |
21:44:38 | yglukhov | nake |
21:44:44 | yglukhov | to run the editor |
21:47:07 | krux02 | This looks very familiar to me |
21:47:37 | krux02 | I was working with OpenFlipper (geometry processing framework) and that program had something very similar |
21:47:43 | krux02 | I think |
21:47:49 | krux02 | I hated it |
21:48:14 | krux02 | I explicitly want to make sure everything is resolved at compile time as far as possible |
21:48:32 | krux02 | post processing is important |
21:48:53 | krux02 | I don't know if your version is better than the one I got to know |
21:49:34 | krux02 | I have to execute it to give a better answer |
21:49:44 | krux02 | sorry this one was with prejudice |
21:50:27 | yglukhov | "resolved at compile time" - yeah, i want that too. but we're not there yet. and that's not #1 priority. |
21:51:23 | * | pie__ quit (Quit: Leaving) |
21:52:31 | krux02 | I just started the editor |
21:53:19 | * | j75__ joined #nim |
21:53:31 | krux02 | I instantly see that the editor has a very different goal than what I want for my system |
21:56:08 | yglukhov | krux02: thats a game scene editor. |
21:57:03 | krux02 | but I want my library for mostly procedural generation |
22:03:16 | krux02 | to elaborate, my goal is to write effectively game rules in a rule editor |
22:03:30 | krux02 | then write some rules for level generation |
22:03:34 | krux02 | and then run the game |
22:03:59 | krux02 | That is the main reason why I chose Nim as my language |
22:04:07 | yglukhov | oh that interesting. |
22:04:48 | krux02 | I don't know exactly how I will do it, but I don't want the classical system |
22:05:15 | krux02 | the classical system is "Hey we did all game mechanics for you, all you need to do is create the content and you have the game" |
22:05:20 | krux02 | I hate it |
22:05:31 | krux02 | I don't want the 100'th animation system |
22:06:08 | krux02 | or 10000th first person shooter |
22:06:42 | * | zachcarter joined #nim |
22:06:52 | krux02 | I already have a language in mind and also started to implement a language for more interesting data structures |
22:07:05 | krux02 | game data structures are mainly graphs |
22:07:44 | krux02 | so I want a language that let's me describe the type system of the graphs, and then all the code for the graph is generated |
22:08:12 | krux02 | and then I hope I can interate a bit faster on more interesting game ideas |
22:08:30 | krux02 | graphics should be abstract, but still 3D |
22:09:02 | yglukhov | cool. i'd love to see that working =) |
22:10:17 | Araq | you could always develop the 2nd RTS. I would buy it. |
22:10:31 | Araq | no idea why the genre is effectively dead. |
22:11:22 | yglukhov | Araq: the 1st is starcraft? :D |
22:12:13 | cheatfate | Araq, the genre is dead because moba is alive... |
22:12:28 | Araq | I need to become more famous. then the company named after a storm will pay me for shameless advertisements |
22:13:31 | Araq | well there is DoW 3 in development. but they kinda screwed it already |
22:14:11 | Araq | cheatfate: yeah but moba is boring |
22:14:48 | cheatfate | Araq, i know but is the main reason why rts is dead... and dow3 will be same shit like coh2 |
22:15:02 | krux02 | what is DoW3? |
22:15:09 | cheatfate | Dawn of War 3 |
22:15:20 | krux02 | ah yea I remember |
22:15:36 | cheatfate | Dawn of War 2 is a legend |
22:15:41 | krux02 | I think more of a turn based game for the beginning |
22:15:54 | krux02 | it easier to implement the network code for |
22:15:54 | cheatfate | and people playing dow2 even now |
22:16:13 | krux02 | RTS most people play the old games |
22:16:26 | krux02 | Age of Empires 2 is not dead |
22:16:39 | cheatfate | krux02, turn based games nowadays uses hybrid moves which allows people to play at the same time... |
22:16:56 | cheatfate | Age of Empires Online was pretty good |
22:17:09 | krux02 | yea I know, I played Age of Wonders 2 (shadow magic) |
22:17:18 | krux02 | cheatfate, haha |
22:18:46 | Araq | dow2? meh, never grew on me. I loved dow 1. |
22:18:51 | krux02 | I think more about adaping a simple board game for the beginning, but with good controls |
22:19:07 | krux02 | little content, simple rules, abstract graphics, but good controls |
22:19:12 | cheatfate | This stupid punks even screwed Mass Effect |
22:19:46 | krux02 | My favorite is still Total Annihilation. |
22:20:08 | krux02 | I also have Planetary Annihilation, but without the 256 colors, it's not the same |
22:20:20 | krux02 | no the problem are different ones |
22:20:46 | krux02 | I supported Planetary Annihilation on kickstarter |
22:21:28 | krux02 | Technically it is ok, but it does not have the magic that Total Annihilation has, and the Planet system looks cool, but effectively it is not that good |
22:22:24 | krux02 | Dos anyone here agree, that Warcraft 3 is not really an RTS? |
22:22:39 | cheatfate | never played w3 |
22:22:49 | cheatfate | my games was dune, dune2, c&c, red alert |
22:23:03 | krux02 | I played them, too |
22:23:05 | cheatfate | w1, w2 |
22:23:10 | krux02 | yes them too |
22:23:13 | cheatfate | dow1, dow2 |
22:23:17 | krux02 | but w1 was the last one I played |
22:23:29 | krux02 | and dune one I played on a tablet with a stylus |
22:23:45 | cheatfate | nope i have played it on 386DX40 :) |
22:24:06 | krux02 | when I first played dune 2 I already knew age of empires |
22:24:08 | krux02 | I hated it |
22:24:16 | krux02 | it was much later that I gave it a chance |
22:24:25 | krux02 | but I couldn't beat the last stage |
22:25:06 | zachcarter | sweet |
22:25:32 | zachcarter | got the compilation of dependencies for the game framework building automatically and all our examples automated, android just builds for now |
22:25:42 | zachcarter | for linux and osx anyway |
22:25:46 | Araq | krux02: Warcraft 3 *is* definitely an RTS and a masterpiece. |
22:26:11 | * | brson quit (Ping timeout: 264 seconds) |
22:26:29 | krux02 | Araq: nah, too much hero fiddling |
22:26:36 | Araq | though they fucked up the lore. |
22:26:54 | cheatfate | Araq, lore? blizzard stole whole lore from warhammer |
22:27:05 | cheatfate | just renamed races |
22:27:08 | krux02 | but I don't want to argue on the quality of the game, there are just too many people who like the game, I am just not one of them. |
22:27:14 | Araq | cheatfate: yes and no. |
22:27:21 | PMunch | My favourite will always be Stronghold Crusader |
22:27:23 | Araq | but either way it went downhill :P |
22:27:28 | krux02 | But I think a game that is so hero centered is not an RTS at it's core anymore |
22:27:34 | krux02 | RTS should not be about heros |
22:27:51 | Araq | ok, time to move it to #nim-offtopic |
22:28:09 | krux02 | yes Stronghold, also a great series of real RTS games |
22:28:28 | krux02 | yea I agree here, too |
22:28:44 | Araq | PMunch: nice blog article |
22:28:46 | krux02 | I have to say goodnight for today anyway |
22:28:53 | krux02 | bye |
22:29:00 | PMunch | Thanks Araq ): |
22:29:02 | PMunch | :)* |
22:32:49 | * | chemist69 quit (Ping timeout: 240 seconds) |
22:32:51 | * | zachcarter quit (Read error: Connection reset by peer) |
22:34:43 | * | PMunch quit (Quit: leaving) |
22:37:19 | * | zachcarter joined #nim |
22:37:22 | * | chemist69 joined #nim |
22:42:35 | * | brson joined #nim |
22:48:17 | * | krux02 quit (Quit: Leaving) |
22:51:15 | * | yglukhov quit (Remote host closed the connection) |
22:55:03 | * | Vladar quit (Quit: Leaving) |
22:57:14 | * | bjz joined #nim |
22:58:45 | * | Tiberium joined #nim |
23:13:20 | * | Jesin quit (Quit: Leaving) |
23:14:43 | * | couven92 quit (Read error: Connection reset by peer) |
23:16:49 | * | Jesin joined #nim |
23:17:17 | Tiberium | hmm, what's the most full-fledged IDE for nim? |
23:17:21 | Tiberium | hi everyone :) |
23:22:42 | FromGitter | <Varriount> Tiberium: Hard to say. I see VSCode referenced most often. |
23:22:59 | Tiberium | FromGitter, ah, there's gitter, I'll join now |
23:23:00 | FromGitter | Tiberium, I'm a bot, *bleep, bloop*. I relay messages between here and https://gitter.im/nim-lang/Nim |
23:23:16 | FromGitter | <TiberiumPY> I'm here |
23:27:08 | FromGitter | <TiberiumPY> I'm a beginner in nim, coming from python world :) |
23:27:44 | FromGitter | <TiberiumPY> nim seems to be *slightly* harder than python, but really faster |
23:27:54 | FromGitter | <TiberiumPY> and those 50kb executables... oh |
23:40:07 | FromGitter | <Varriount> Well, the executable size depends on a number of things. |
23:40:35 | FromGitter | <Varriount> I think there was a blog post floating around on how small you can actually make a Nim executable. |
23:42:30 | FromGitter | <TiberiumPY> btw, vscode is good for nim |
23:48:12 | * | ftsf joined #nim |
23:55:07 | * | Tiberium quit (Remote host closed the connection) |
23:55:26 | * | zachcarter quit (Quit: zachcarter) |
23:56:51 | * | Matthias247 quit (Read error: Connection reset by peer) |