00:15:02 | FromGitter | <raydf> Hello anyone with experience on reusing nim code for an ios objective c app? |
00:23:46 | PMunch | raydf, I've used Nim with SDL to write a cross platform thing between Android, iOS, and PC |
00:23:56 | PMunch | Works pretty well :) |
00:24:08 | * | chemist69 quit (Ping timeout: 258 seconds) |
00:25:03 | FromGitter | <raydf> i'm looking for info to generate a static lib and generate the header files for using it with swift |
00:26:04 | * | Matthias247 joined #nim |
00:26:40 | * | chemist69 joined #nim |
00:28:56 | FromGitter | <raydf> i'm worried about gc usage |
00:29:29 | FromGitter | <raydf> @PMunch, do you have any repo or code sample? |
00:30:05 | PMunch | https://github.com/PMunch/nim-sdl-template |
00:30:32 | PMunch | Credits to yglukhov |
00:31:03 | FromGitter | <raydf> thanks |
00:31:35 | * | hjsagg quit (Ping timeout: 264 seconds) |
00:42:45 | * | Matthias247 quit (Read error: Connection reset by peer) |
00:44:18 | * | bjz joined #nim |
00:58:48 | * | bjz quit (Quit: My MacBook Pro has gone to sleep. ZZZzzz…) |
01:02:36 | * | zachcarter joined #nim |
01:12:53 | * | PMunch quit (Quit: leaving) |
01:20:44 | * | Nobabs27 quit (Quit: Leaving) |
01:32:02 | * | yglukhov joined #nim |
01:36:06 | * | yglukhov quit (Ping timeout: 240 seconds) |
01:51:29 | demi- | search is failing me, what is the module that is used to make DSLs in nim? |
01:52:17 | stisa | demi- https://nim-lang.org/docs/macros.html I guess? |
01:54:54 | * | Nobabs27 joined #nim |
01:58:24 | demi- | but that is for nim's ast, what if i want to have my own? |
02:01:36 | stisa | I don't think there's a module for that, yet. |
02:04:52 | stisa | I guess you could use variant type to model the ast though, so https://github.com/andreaferretti/patty might be helpful |
02:09:55 | * | rauss joined #nim |
02:26:53 | * | chemist69 quit (Ping timeout: 246 seconds) |
02:32:47 | * | Kingsquee quit (Ping timeout: 264 seconds) |
02:34:18 | * | shashlick quit (Ping timeout: 268 seconds) |
02:35:35 | * | shashlick joined #nim |
02:38:19 | * | arnetheduck joined #nim |
02:39:19 | * | chemist69 joined #nim |
02:42:38 | * | Nobabs27 quit (Quit: Leaving) |
02:46:16 | FromGitter | <barcharcraz> where did vccexe.nim get to in the source tree? |
02:53:42 | * | yglukhov joined #nim |
02:58:06 | * | yglukhov quit (Ping timeout: 240 seconds) |
03:06:28 | * | kafke quit () |
03:07:59 | * | Kingsquee joined #nim |
03:14:09 | * | arnetheduck quit (Ping timeout: 260 seconds) |
03:39:03 | zachcarter | can anyone explain what I’m supposed to do with - https://nim-lang.org/docs/events.html#EventArgs and this module? |
03:39:30 | zachcarter | do I have to make a custom object extending from that object or something? |
03:46:08 | zachcarter | nm I got it working |
03:55:29 | * | brson quit (Quit: leaving) |
04:06:23 | * | Pisuke quit (Ping timeout: 264 seconds) |
04:13:00 | * | bjz joined #nim |
04:31:36 | * | avsej quit (Ping timeout: 240 seconds) |
04:33:52 | * | avsej joined #nim |
04:33:52 | * | avsej quit (Changing host) |
04:33:52 | * | avsej joined #nim |
04:44:54 | * | bjz quit (Quit: My MacBook Pro has gone to sleep. ZZZzzz…) |
04:55:46 | * | yglukhov joined #nim |
05:00:33 | * | yglukhov quit (Ping timeout: 260 seconds) |
05:09:25 | * | BitPuffin|osx quit (Ping timeout: 260 seconds) |
05:21:54 | * | krux02 quit (Quit: Leaving) |
05:25:34 | * | def-pri-pub quit (Quit: leaving) |
05:41:43 | FromGitter | <Varriount> zachcarter: How are things going? |
06:00:07 | * | bjz joined #nim |
06:04:32 | * | bjz quit (Ping timeout: 258 seconds) |
06:05:52 | * | bjz_ joined #nim |
06:11:37 | libman | "Rust's language ergonomics initiative" => "Python and Nim are good examples to learn from ;)" - https://news.ycombinator.com/item?id=13785277 |
06:20:11 | FromGitter | <Varriount> libman: Upvoted |
06:21:52 | * | zachcarter quit (Quit: zachcarter) |
06:57:31 | * | yglukhov joined #nim |
07:00:32 | * | rauss quit (Quit: WeeChat 1.7) |
07:02:11 | * | yglukhov quit (Ping timeout: 264 seconds) |
07:15:33 | cheatfate | barcarcraz: tools/vccenv/vccexe.nim |
07:15:44 | cheatfate | sorry barcharcraz |
07:38:19 | * | yglukhov joined #nim |
07:43:02 | * | yglukhov quit (Remote host closed the connection) |
07:44:38 | * | yglukhov joined #nim |
07:49:35 | * | yglukhov quit (Ping timeout: 264 seconds) |
08:11:37 | * | yglukhov joined #nim |
08:20:28 | * | Salewski joined #nim |
08:21:01 | Salewski | proc main = |
08:21:07 | Salewski | var s = @[1,2,3,4] |
08:21:17 | Salewski | var a = "1234" |
08:21:25 | Araq | the tension is building up... |
08:21:26 | Salewski | let h = s; let k = a |
08:21:37 | Salewski | s.setLen(0); a.setLen(0) |
08:21:44 | Salewski | echo h.len; echo k.len |
08:21:55 | Salewski | main() # output is 0, 0 # is that result really clear from manual? |
08:21:58 | Salewski | done |
08:22:23 | Araq | no, it's quite a gotcha with an unclear solution |
08:22:40 | Araq | suggestions are welcome |
08:23:01 | Araq | 'let' means immutable binding and as you've shown it should produce a copy |
08:23:08 | Araq | for performance reasons it doesn't |
08:23:52 | Salewski | It was not too surprising for me, but not really expected. So that behaviour should be mentioned somewhere. |
08:24:30 | Araq | well I don't want to document bugs. |
08:25:01 | Araq | I think we need to bite the bullet and produce a copy here and have an optimizer that tries to optimize it away |
08:25:21 | Araq | it's rather hard to detect though |
08:26:14 | Salewski | I think manual or tutorial says that = assignmnt operator has copy semantics for seq and string, so one may have wrong expectations. |
08:30:56 | * | libman quit (Quit: Connection closed for inactivity) |
08:32:43 | Araq | well the spec is clear about this, it's a codegen bug. |
08:32:53 | Araq | or rather a totally unsound optimization |
08:33:00 | Araq | that I've come to rely on... :-) |
08:37:13 | * | Salewski left #nim (#nim) |
08:44:12 | * | Vladar joined #nim |
08:44:29 | * | bjz joined #nim |
08:45:29 | * | bjz_ quit (Ping timeout: 260 seconds) |
08:58:31 | * | Trustable joined #nim |
08:59:58 | FromGitter | <Varriount> Well, either 'let' needs to make a copy, or the immutability checks needs to be stricter. |
09:01:24 | FromGitter | <Varriount> Then you risk about going down the whole "const" rabbit hole that C++ fell into. |
09:04:03 | * | nsf joined #nim |
09:13:46 | * | yglukhov quit (Remote host closed the connection) |
09:13:59 | Araq | varriount: we actually have an escape analysis that we could use for this, but it's experimental stuff |
09:23:12 | * | nsf quit (Quit: WeeChat 1.7) |
09:41:10 | * | bjz quit (Quit: My MacBook Pro has gone to sleep. ZZZzzz…) |
09:49:37 | * | bjz joined #nim |
09:49:50 | * | zachcarter joined #nim |
09:50:20 | * | rauce quit (Ping timeout: 246 seconds) |
09:57:43 | * | rauce joined #nim |
10:13:24 | * | xet7 joined #nim |
10:15:46 | * | Matthias247 joined #nim |
10:25:49 | * | Arrrr joined #nim |
10:25:50 | * | Arrrr quit (Changing host) |
10:25:50 | * | Arrrr joined #nim |
10:31:03 | * | zachcarter quit (Quit: zachcarter) |
10:45:26 | * | nsf joined #nim |
11:15:53 | * | Matthias247 quit (Read error: Connection reset by peer) |
11:17:17 | * | bjz quit (Quit: My MacBook Pro has gone to sleep. ZZZzzz…) |
11:44:48 | * | arnetheduck joined #nim |
11:54:10 | enthus1ast | is there a nice way to also let assert/doAssert echo the values of the test cases? |
11:55:10 | enthus1ast | like "expected: foo" "got: baa" |
11:59:49 | stisa | use unittest maybe? https://glot.io/snippets/enoam8wj81 |
12:00:14 | Vladar | the most obvious way: |
12:00:15 | Vladar | const cond = 1 |
12:00:15 | Vladar | var a = 2 |
12:00:15 | Vladar | assert a == cond, ", expected " & $cond & ", got " & $a |
12:02:33 | * | Snircle joined #nim |
12:08:10 | Vladar | and slightly perverted way: |
12:08:12 | Vladar | template assertx(a, cond, b: untyped) {.inject.} = |
12:08:12 | Vladar | assert cond(a, b), ", expected " & $b & ", got " & $a |
12:08:12 | Vladar | const cond = 1 |
12:08:13 | Vladar | var a = 2 |
12:08:15 | Vladar | assertx(a, `==`, cond) |
12:08:26 | enthus1ast | ! |
12:08:32 | Vladar | actually inject is unnecessary |
12:09:00 | Vladar | so just template assertx(a, cond, b: untyped) = |
12:09:18 | enthus1ast | jeah thanks! |
12:10:15 | enthus1ast | ahh cond, very nice |
12:19:34 | * | Kingsquee quit (Quit: https://i.imgur.com/qicT3GK.gif) |
12:22:39 | enthus1ast | it works but i have to reorganize the asserts for this. Think maybe this is solvable by an macro? |
12:23:13 | enthus1ast | i'll try it with a macro |
12:24:02 | enthus1ast | (finally i have reason to write a macro :) ) |
12:38:50 | * | vendethiel joined #nim |
13:06:56 | * | vlad1777d joined #nim |
13:19:20 | * | zachcarter joined #nim |
13:22:38 | zachcarter | Varriount: you caught me shortly after I went to sleep |
13:23:08 | FromGitter | <Varriount> :D |
13:23:38 | zachcarter | things are going good though thank you for asking |
13:24:05 | zachcarter | I just completely re-wrote the framework I’m building from the ground up, since I know a lot more about Nim now than when I started, and things are coming together very nicely. |
13:24:09 | zachcarter | how are things going for you? |
13:25:45 | zachcarter | https://github.com/zacharycarter/dEngine |
13:25:53 | * | BitPuffin|osx joined #nim |
13:27:29 | * | Arrrr quit (Read error: Connection reset by peer) |
13:28:33 | FromGitter | <Varriount> zachcarter: Well, I just finished another round of midterms and have a small break from classes |
13:28:42 | zachcarter | awesome! |
13:28:55 | * | couven92 joined #nim |
13:29:00 | zachcarter | probably full of homework I imagine :P |
13:29:16 | FromGitter | <Varriount> Which means I get to actually work at the office for a bit, rather than remotely |
13:29:17 | zachcarter | I miss college, but then not so much too |
13:29:26 | zachcarter | ah cool |
13:29:43 | zachcarter | what degree are you going for? |
13:30:17 | FromGitter | <Varriount> Computer Science |
13:30:40 | zachcarter | nice! I’m a history major ;/ |
13:30:50 | zachcarter | religious studies minor |
13:32:12 | FromGitter | <Varriount> Neat! |
13:33:22 | zachcarter | I wish I had gone CS but I was lazy |
13:33:32 | zachcarter | I’m paying for it now, but that’s okay |
13:34:43 | zachcarter | Varriount: a member that hangs out in here - rauss - he was also starting to work on a 2d game framework for NIm and I think I convinced him to help me with mine once I’m a bit further along |
13:35:09 | zachcarter | since I had certain features / things hooked up that he hadn’t yet - like bgfx, and the audio engine, etc... |
14:00:07 | * | arnetheduck quit (Ping timeout: 260 seconds) |
14:03:49 | * | libman joined #nim |
14:12:36 | * | yglukhov joined #nim |
14:20:05 | * | jackv quit (Ping timeout: 260 seconds) |
14:21:28 | * | jackv joined #nim |
14:26:02 | * | yglukhov quit (Remote host closed the connection) |
14:30:57 | * | yglukhov joined #nim |
14:32:11 | * | yglukhov quit (Remote host closed the connection) |
15:14:15 | * | nsf quit (Quit: WeeChat 1.7) |
15:22:19 | FromGitter | <zetashift> don't forget nimgame2! |
15:39:46 | * | Trustable quit (Remote host closed the connection) |
15:41:13 | * | Trustable joined #nim |
15:43:00 | * | Trustable quit (Remote host closed the connection) |
15:43:55 | * | Trustable joined #nim |
16:04:34 | * | tankfeeder joined #nim |
16:10:56 | * | libman quit (Quit: Connection closed for inactivity) |
16:11:27 | * | tankfeeder quit (Quit: Leaving) |
16:13:24 | * | shodan45 quit (Remote host closed the connection) |
16:14:01 | * | shodan45 joined #nim |
16:22:43 | * | acidx quit (Quit: leaving) |
16:23:10 | zachcarter | nimgame2 is good if you want to use the sdl2 renderer |
16:23:33 | * | vlad1777d quit (Quit: Leaving) |
16:24:04 | * | acidx joined #nim |
16:28:20 | demi- | what is the proper way to get nim code started in a debugger? when using lldb it stops on SIGTTIN and SIGTTOU when built with the `--debugger:native` flag and i cannot get my code to build at all using the embedded nim debugger |
16:29:26 | cheatfate | demi-, embedded nim debugger, was experimental and now i think it deprecated but still exists. |
16:29:39 | demi- | right, that was my fallback |
16:30:03 | demi- | and since i cannot get past these signals thrown at the beginning of exec with lldb, i'm wondering what I should be doing |
16:30:26 | cheatfate | i dont have lldb to help, but i know it works |
16:30:37 | cheatfate | looks like something wrong with TTY |
16:30:54 | cheatfate | maybe lldb needs some tty specific settings? |
16:31:52 | demi- | i don't think this is an lldb problem, as i can debug any other C code |
16:32:28 | cheatfate | can u debug generated c code? |
16:35:26 | zachcarter | I can use lldb file |
16:35:34 | zachcarter | but I don’t use the —debugger:native flag |
16:36:06 | zachcarter | sorry `—debugger:native` |
16:36:13 | zachcarter | fine* |
16:36:37 | demi- | ah, my bad, was able to attach and use it ok, must be something with lldb interacting with one of the libraries i'm using |
16:36:54 | demi- | are there specific symbols to breakpoint on to catch exceptions thrown by nim? |
16:37:03 | zachcarter | you can do |
16:37:04 | zachcarter | nim c --lineDir:on --debuginfo tools/texture_packer/src/texture_packer |
16:37:26 | zachcarter | brb |
17:00:48 | * | yglukhov joined #nim |
17:02:35 | * | libman joined #nim |
17:04:39 | * | yglukhov quit (Remote host closed the connection) |
17:04:56 | * | yglukhov joined #nim |
17:06:08 | * | Arrrr joined #nim |
17:06:08 | * | Arrrr quit (Changing host) |
17:06:08 | * | Arrrr joined #nim |
17:15:40 | * | vlad1777d joined #nim |
17:21:41 | * | shashlick quit (Ping timeout: 256 seconds) |
17:23:42 | * | shashlick joined #nim |
17:27:21 | * | nsf joined #nim |
17:27:47 | * | yglukhov quit (Remote host closed the connection) |
17:33:49 | * | def- quit (Quit: -) |
17:35:59 | * | def-pri-pub joined #nim |
17:40:16 | * | vlad1777d quit (Quit: Leaving) |
17:46:33 | * | def- joined #nim |
18:01:43 | * | yglukhov joined #nim |
18:06:17 | * | yglukhov quit (Ping timeout: 260 seconds) |
18:08:40 | * | Matthias247 joined #nim |
18:12:15 | * | yglukhov joined #nim |
18:16:45 | * | yglukhov quit (Remote host closed the connection) |
18:29:34 | * | yglukhov joined #nim |
18:34:26 | * | yglukhov quit (Remote host closed the connection) |
18:40:31 | * | nsf quit (Quit: WeeChat 1.7) |
19:01:28 | * | hjsagg joined #nim |
19:23:24 | * | zachcarter quit (Quit: zachcarter) |
19:42:02 | * | smt quit (Quit: Leaving) |
19:42:20 | * | smt joined #nim |
19:59:45 | * | zachcarter joined #nim |
20:07:16 | * | sz0 joined #nim |
20:08:19 | * | BitPuffin|osx quit (Remote host closed the connection) |
20:13:19 | * | vlad1777d joined #nim |
20:14:47 | * | yglukhov joined #nim |
20:19:35 | * | yglukhov quit (Ping timeout: 264 seconds) |
20:22:45 | * | BitPuffin|osx joined #nim |
20:28:05 | * | vlad1777d quit (Quit: Leaving) |
20:31:25 | * | bjz joined #nim |
20:37:39 | * | Vladar quit (Remote host closed the connection) |
20:40:36 | * | Arrrr quit (Quit: Leaving.) |
20:41:58 | * | BitPuffin|osx quit (Ping timeout: 240 seconds) |
20:44:22 | demi- | how do i get the reference to an object? the manual seems to be a bit unclear on that |
20:45:05 | demi- | i've got a function that i want to return the ref of an object type i have (not a copy of it) and i'm not sure how i do this |
21:11:41 | * | BitPuffin|osx joined #nim |
21:12:41 | * | zachcarter quit (Quit: zachcarter) |
21:13:20 | * | def- quit (*.net *.split) |
21:13:22 | * | euantor quit (*.net *.split) |
21:14:24 | * | smt quit (*.net *.split) |
21:14:26 | * | onionhammer quit (*.net *.split) |
21:14:56 | * | nsf joined #nim |
21:18:01 | * | euantor joined #nim |
21:18:39 | * | smt joined #nim |
21:30:53 | * | handicraftsman joined #nim |
21:31:14 | handicraftsman | Hi. How do i get current version of app? |
21:33:50 | Calinou | handicraftsman: nim version? "nim -v" |
21:34:21 | * | onionhammer joined #nim |
21:34:42 | handicraftsman | Calinou, nope, of current nimble-powered app |
22:02:43 | * | def- joined #nim |
22:04:47 | * | bjz quit (Quit: My MacBook Pro has gone to sleep. ZZZzzz…) |
22:12:59 | * | byte512 quit (Ping timeout: 264 seconds) |
22:14:46 | * | PMunch joined #nim |
22:20:07 | * | Jesin quit (Quit: Leaving) |
22:23:36 | FromGitter | <JorySchossau> How can I construct proc argument identifiers in a template? Trying: ⏎ ⏎ ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=58bb3e677ceae5376a70437a] |
22:24:20 | * | sz0 quit (Quit: Connection closed for inactivity) |
22:33:47 | * | Jesin joined #nim |
22:38:45 | FromGitter | <JorySchossau> Figured it out. |
22:54:20 | * | bjz joined #nim |
23:07:50 | * | bjz quit (Quit: My MacBook Pro has gone to sleep. ZZZzzz…) |
23:10:30 | * | handicraftsman quit (Quit: Курите маны и читайте доки) |
23:13:50 | * | eizua joined #nim |
23:25:50 | * | bjz joined #nim |
23:27:38 | * | Matthias247 quit (Read error: Connection reset by peer) |
23:28:07 | * | Trustable quit (Remote host closed the connection) |
23:32:36 | * | couven92 quit (Ping timeout: 240 seconds) |
23:36:07 | * | Trioxin joined #nim |
23:36:10 | * | yglukhov joined #nim |
23:36:37 | * | PMunch quit (Ping timeout: 268 seconds) |
23:36:46 | * | xet7 quit (Quit: Leaving) |
23:40:34 | * | yglukhov quit (Ping timeout: 240 seconds) |
23:58:26 | * | nsf quit (Quit: WeeChat 1.7) |