00:00:01 | krux02 | sorry I can't talk today anymore, I hope to get to you tomorrow |
00:00:05 | * | krux02 quit (Quit: Verlassend) |
00:04:56 | * | yglukhov quit (Remote host closed the connection) |
00:07:32 | * | pregressive quit (Remote host closed the connection) |
00:16:55 | * | jaco60 quit (Ping timeout: 240 seconds) |
00:36:01 | * | Matthias247 quit (Read error: Connection reset by peer) |
00:53:37 | * | jsudlow quit (Quit: HydraIRC -> http://www.hydrairc.com <- Like it? Visit #hydrairc on EFNet) |
01:21:23 | * | gokr quit (Quit: Leaving.) |
01:44:00 | * | brson quit (Quit: leaving) |
01:46:26 | * | Trustable quit (Remote host closed the connection) |
01:51:53 | * | Varriount-Laptop joined #nim |
02:19:04 | * | Demon_Fox quit (Read error: Connection timed out) |
02:20:15 | * | Demon_Fox joined #nim |
02:30:34 | Varriount-Laptop | flyx: That json module is really neat. |
02:52:55 | * | ekarlso quit (Ping timeout: 246 seconds) |
02:52:55 | * | bbl_ quit (Ping timeout: 246 seconds) |
02:53:15 | * | huonw quit (Ping timeout: 246 seconds) |
02:53:27 | * | bbl_ joined #nim |
02:53:31 | * | huonw joined #nim |
02:55:30 | * | Varriount-Laptop quit (Ping timeout: 256 seconds) |
02:58:03 | * | Demon_Fox quit (Quit: Leaving) |
02:58:25 | * | Demon_Fox joined #nim |
03:07:29 | * | ekarlso joined #nim |
03:08:01 | * | brokencode joined #nim |
03:29:45 | * | sam_d_ joined #nim |
03:41:11 | * | pregressive joined #nim |
03:51:10 | * | brokencode quit (Quit: My Mac has gone to sleep. ZZZzzz…) |
04:11:24 | * | ldlework quit (Ping timeout: 250 seconds) |
04:15:36 | * | Pppppp joined #nim |
04:16:24 | Pppppp | Hi. Just had a quick question. Am I doing something wrong, or is the documentation here out of date? |
04:16:54 | Pppppp | http://nim-lang.org/docs/nimc.html#nim-interactive-mode mentions that nim can be used in an interactive mode by "nim i", however when I run it, I get "Error: invalid command: 'i'" |
04:18:36 | * | brokencode joined #nim |
04:20:10 | * | ldlework joined #nim |
04:25:06 | reactormonk | Pppppp, yeah, it's deprecated. |
04:26:35 | Pppppp | Oh, unsupported/removed? |
04:27:18 | Guest34835 | yeah |
04:35:32 | Pppppp | Just curious, what's the reason? Was it buggy/unreliable? It seemed like it would've been a useful feature. |
04:43:45 | * | pregressive quit (Remote host closed the connection) |
04:49:00 | * | sam_d_ quit (Ping timeout: 252 seconds) |
04:49:30 | reactormonk | Pppppp, buggy, no FFI |
04:50:22 | * | Varriount-Laptop joined #nim |
04:51:03 | Pppppp | Oh, alright. I see. Thanks! Just wanted to make sure that I wasn't doing something wrong, since the docs still make mention of it. |
04:54:03 | * | pregressive joined #nim |
05:03:45 | reactormonk | Pppppp, time to fix the docs. |
05:04:08 | * | Varriount-Laptop quit (Ping timeout: 256 seconds) |
05:08:14 | * | polde quit (Remote host closed the connection) |
05:12:00 | * | pregressive quit (Remote host closed the connection) |
05:28:53 | * | darkf_ joined #nim |
05:30:58 | * | darkf_ is now known as darkf |
05:35:00 | * | brokencode quit (Quit: My Mac has gone to sleep. ZZZzzz…) |
05:35:26 | * | pregressive joined #nim |
05:43:44 | * | vendethiel joined #nim |
05:51:11 | * | ludocode quit (Quit: No Ping reply in 180 seconds.) |
05:58:06 | * | ludocode joined #nim |
06:03:59 | * | pregressive quit (Remote host closed the connection) |
06:05:22 | * | vendethiel quit (Ping timeout: 265 seconds) |
06:12:41 | * | Pppppp quit (Quit: Page closed) |
06:20:20 | * | zepolen quit (Remote host closed the connection) |
06:41:37 | * | gokr joined #nim |
06:57:12 | * | gokr quit (Quit: Leaving.) |
07:04:08 | * | zepolen joined #nim |
07:21:39 | * | lyro quit (Quit: WeeChat 1.1.1) |
07:21:57 | * | lyro joined #nim |
07:33:58 | * | Demon_Fox quit (Ping timeout: 260 seconds) |
07:34:25 | * | Demon_Fox joined #nim |
07:40:02 | * | lyro quit (Quit: WeeChat 1.1.1) |
07:40:10 | * | lyro joined #nim |
07:42:29 | * | lyro is now known as lyro` |
07:43:11 | * | lyro` is now known as lyro_ |
07:43:21 | * | lyro_ is now known as lyro |
07:44:46 | * | lyro quit (Client Quit) |
07:44:53 | * | zepolen quit (Remote host closed the connection) |
07:44:54 | * | lyro joined #nim |
07:48:29 | * | lyro quit (Client Quit) |
07:48:38 | * | lyro joined #nim |
07:49:01 | * | lyro quit (Client Quit) |
07:49:09 | * | lyro` joined #nim |
07:49:17 | * | lyro` quit (Client Quit) |
07:49:34 | * | lyro joined #nim |
07:51:36 | * | zepolen joined #nim |
07:51:39 | * | lyro quit (Client Quit) |
07:51:54 | * | lyro joined #nim |
07:52:13 | * | lyro quit (Client Quit) |
07:52:23 | * | lyro` joined #nim |
07:54:35 | * | lyro` is now known as lyro |
08:12:43 | * | jaco60 joined #nim |
08:21:59 | * | gokr joined #nim |
08:24:06 | * | xet7 quit (Ping timeout: 240 seconds) |
08:26:34 | * | Trustable joined #nim |
08:35:26 | * | yglukhov joined #nim |
08:41:40 | * | jaco60 quit (Ping timeout: 260 seconds) |
08:44:29 | * | zepolen quit (Remote host closed the connection) |
08:53:43 | * | xet7 joined #nim |
08:58:18 | * | Arrrr joined #nim |
09:16:54 | * | gunn_ quit (Read error: Connection reset by peer) |
09:18:37 | * | gunn joined #nim |
09:24:05 | * | kas_ joined #nim |
09:27:58 | * | desophos quit (Read error: Connection reset by peer) |
09:45:04 | * | zepolen joined #nim |
09:49:19 | * | zepolen quit (Ping timeout: 245 seconds) |
09:58:32 | * | zepolen joined #nim |
10:02:25 | * | Arrrrr joined #nim |
10:02:46 | * | Arrrr quit (Ping timeout: 240 seconds) |
10:08:58 | * | xet7 quit (Ping timeout: 272 seconds) |
10:10:35 | * | xet7 joined #nim |
10:15:40 | * | Demon_Fox quit (Quit: Leaving) |
10:44:17 | * | minmax joined #nim |
11:00:44 | * | zepolen quit (Remote host closed the connection) |
11:23:39 | * | gokr quit (Quit: Leaving.) |
11:35:55 | * | themagician quit () |
11:37:33 | * | themagician joined #nim |
11:43:20 | Araq_ | yglukhov: try new-ll please, want to merge it into devel |
11:43:55 | yglukhov | Araq: ok, 5 mins. |
11:50:51 | * | minmax quit (Ping timeout: 252 seconds) |
11:51:06 | yglukhov | Araq: seems to work smoothly. |
12:16:21 | * | zepolen joined #nim |
12:21:13 | * | zepolen quit (Ping timeout: 276 seconds) |
12:21:52 | * | gokr joined #nim |
12:38:17 | * | lyro quit (Changing host) |
12:38:17 | * | lyro joined #nim |
12:49:23 | * | lyro quit (Quit: WeeChat 1.1.1) |
12:50:01 | * | lyro joined #nim |
13:23:05 | * | BitPuffin joined #nim |
13:30:16 | * | zepolen joined #nim |
13:46:25 | * | gokr quit (Quit: Leaving.) |
13:46:47 | * | Arrrrr quit (Ping timeout: 255 seconds) |
13:58:17 | * | vqrs quit (Max SendQ exceeded) |
13:58:34 | * | vqrs joined #nim |
14:34:08 | * | krux02 joined #nim |
14:39:03 | * | cratuki joined #nim |
14:39:34 | cratuki | Newbie. Fluent with C and python and Java. |
14:39:52 | cratuki | I'd like to do some programming that involves interaction with the filesystem and use of select. |
14:40:11 | krux02 | select? |
14:40:14 | krux02 | select what? |
14:40:15 | cratuki | Is this the kind of thing nim is aimed at, suitable for? |
14:40:40 | cratuki | Using unix system call select against a list of files to see whether they'r eready to read. |
14:40:55 | * | minmax joined #nim |
14:41:06 | cratuki | I'm guessing it'll take me a day to prototype from knowing nothing, and I thought I'd ask around problem in IRC first. |
14:42:16 | cratuki | I've been trying in python just now, and I'm struggling because there's a bunch of magic between system calls exposed in python, and systemcalls as they're documented in Stevens. |
14:43:45 | nsf | what's the state of autocompletion tools for editors in nim, is it worth using? |
14:44:01 | krux02 | I can't tell you anything about python, but as far as I know any language should be able to do file system interaction |
14:44:35 | nsf | cratuki: yeah, it's hard to say what do you want.. do you want to play with syscalls or do something that works with the file system? |
14:44:45 | krux02 | nsf: I use aporia, and I can tell you it isn't great, but better than nothing |
14:44:59 | nsf | krux02: hm |
14:45:23 | krux02 | but at least it is easy to get started with |
14:45:46 | nsf | I tried nim autocompletion in atom briefly.. added .cfg file added a line which disables a warning and then autocompletion stopped working :\ |
14:46:06 | nsf | that's my experience |
14:46:30 | krux02 | for some reason my autocomple only works, when I start aporia from the shell, propably because of some environment variables |
14:46:50 | nsf | will take a look at aporia |
14:47:28 | krux02 | don't expect too much, it's basically an editor with autocompletion and a button mapped for compilation |
14:47:42 | krux02 | F5 to compile and run is pretty nice |
14:47:44 | nsf | that's fine |
14:49:19 | flyx | cratuki: unix select is a bitch, but as calling C functions from nim is easy, nim shouldn't cause you additional trouble. |
14:49:25 | cratuki | nsf: I'm looking for a general-purpose platform for doing "systems programming" that isn't C. |
14:49:34 | krux02 | cratuki: I haven't tried out what you want to do in nim, but in my experience what you want to do is no problem in any language that I've worked with. So yes it will work. |
14:49:52 | cratuki | flyx: Excellent. Thanks. Yeah that's what I hoped. Because it compiles to C, I'm hoping it'll be zero-magic. |
14:49:57 | nsf | cratuki: what do you mean by "systems programming", Go devs used that term, have you tried Go? |
14:50:40 | cratuki | nsf: Good question. Go is probably useful. The reason I thought I'd try nim first is that nim is good for wrapping C, and that means I can build low-latency stuff in it. |
14:50:58 | cratuki | That would be harder in Go because you're less connected to garbage collection. |
14:51:08 | nsf | that's true, but again, what low-latency limits are you talking about? is it 5ms or 100ms? |
14:51:08 | cratuki | (And from what I can see, wrapping C is easier in nim than go) |
14:51:12 | krux02 | cratuki: go is also nice in wrapping C, I've done it several times and it is easy |
14:51:14 | nsf | both are low latency in different contexts |
14:51:22 | krux02 | but so is D |
14:51:28 | flyx | cratuki: see http://nim-lang.org/docs/posix.html#select,,ptr.TFdSet,ptr.TFdSet,ptr.TFdSet,ptr.Timeval |
14:51:30 | krux02 | and almost any other language somehow |
14:51:49 | nsf | I suggested Go because I had really pleasant experience with it when it comes to event-driven stuff |
14:51:53 | nsf | that's what you usually use select for |
14:52:04 | krux02 | If you work with the unix file system a lot, maybe even perl6 might be interesting for you |
14:52:12 | nsf | :D |
14:52:16 | nsf | please, don't use perl6 |
14:52:50 | nsf | wrapping C is easier in nim than in Go that's true |
14:53:11 | nsf | but Go has down to metal access as well, you can syscalls directly, etc. |
14:53:19 | cratuki | nsf: The other thing is that I build my own async messaging systems. In go, they provide you these nice libraries. That's cool, but I'd prefer to do it my way. |
14:53:26 | nsf | technically what Go does is possible in nim, but it's not there yet |
14:53:46 | nsf | oh, try nim then, but it's not 1.0 |
14:53:50 | cratuki | Ah - OK. |
14:54:06 | cratuki | I also thought nim could be useful as a means of writing fast unit tests around C code. |
14:54:19 | nsf | sure, nim has powerful macros |
14:54:26 | Araq_ | hey krux02 |
14:54:30 | cratuki | (as in - fast to write) Writing unit tests in C is annoying, because you have to worry about memory, which you don't care about in that context. |
14:54:31 | krux02 | key |
14:54:33 | krux02 | hey |
14:54:56 | krux02 | Araq: nice to be be able to talk to you |
14:58:03 | krux02 | cratuki: you can also just not care about memory in C. It doesn't matter that much to have memory leaks in unit test it the test isn't about testing weather you have memory leaks |
14:58:47 | krux02 | cratuki: just do allocation only and let the system clean up everything when your program exits. |
15:00:52 | krux02 | Araq: I wanted to ask you, what is the best way to store data in types, so that this data is then later accessible in macros. |
15:01:19 | krux02 | Araq: I have the feeling that at the current state of the art it is not yet possible, and therefor I wanted to ask you |
15:03:24 | Araq_ | yeah, pretty much. empty pragmas are removed |
15:03:56 | Araq_ | so foo {.serialize.}: int cannot be accessed via getType, definitely something we need to provide |
15:04:12 | * | flyx seconds that |
15:04:35 | krux02 | I mean something like static variables in c++ classes |
15:05:24 | krux02 | and with getType, I need a way to access them |
15:06:25 | Araq_ | why? static variables are just global variables pretending to belong to a type, but they don't. |
15:07:12 | * | minmax quit (Ping timeout: 252 seconds) |
15:09:02 | krux02 | Araq_: let's say in c++ I have a some types, that all have a static variable of the same type with the same name, then I can access this static variable in a template, and I get the value depending on the type |
15:10:05 | krux02 | Araq_: also in in c++ templates, static variables are there per template instance, therefore A<int>::static_int and A<float>::static_int are not the same variable |
15:10:51 | * | minmax joined #nim |
15:10:58 | Araq_ | yeah yeah yeah, you sometimes have to write/design things differently in Nim. |
15:11:58 | krux02 | you know about the nim to glsl converter |
15:12:49 | Araq_ | the least thing we need is yet another brittle thing that depends on whether the compiler caches A[int] instantiations properly between module boundaries. |
15:12:53 | krux02 | and I would like to store the name of the glsl type in the type itself |
15:12:59 | flyx | krux02: do not try to showel the crazy C++ partial template specialization onto Nim |
15:13:52 | krux02 | flyx: no I do not want to do that |
15:14:07 | flyx | krux02: but you can have "proc static_int(typespec[int]): int = 2" in Nim, and then overload it with "proc static_int(typespec[int64]): int = 4" |
15:14:53 | Araq_ | yup, that's how it works. not sure I like it, but it's in the language. |
15:15:31 | krux02 | flyx: yes can do that, it works perfectly fine, the problem is, I can't call that function with a type that I got from a typed argument in a macro |
15:16:19 | krux02 | there is no way for me to convert the the result of macros.getType to some typespec |
15:17:04 | krux02 | all I need is to be able to call that static_int proc at compile time from macros |
15:17:24 | Araq_ | why? what's the actual use case? |
15:18:12 | flyx | krux02: it should be possible to have a parameter "mytype: typespec{.lit.}" in the macro, I guess |
15:19:15 | flyx | then you can call static_int(mytype) in the macro |
15:19:32 | flyx | (I never used that, so I may be wrong) |
15:20:31 | krux02 | I would like, that my texture type knows how it is represented in the shader |
15:20:34 | flyx | do you actually need the result of the static_int call in your macro code, or would it suffice to add a call to static_int to the AST the macro produces? |
15:20:54 | krux02 | my Texture2D needs a static string with "sampler2D" |
15:21:15 | krux02 | Texture3D -> "sampler3D" |
15:21:17 | krux02 | etc |
15:22:01 | krux02 | float32 -> "float" |
15:23:32 | krux02 | Vec4 -> "vec4", array[4, float] -> "float x[4]" |
15:24:02 | krux02 | but type Vec4 = distinct array[4, float] |
15:24:15 | nsf | hm |
15:24:17 | krux02 | flyx: yes I need the result |
15:24:41 | nsf | I wonder why `var t: Thread[var int]` compiles |
15:25:05 | Araq_ | wrong approach. I don't want to use 'distinct' arrays which then later has every single feature of array |
15:25:26 | krux02 | I already tried to do getAst: https://github.com/nim-lang/Nim/issues/3682 |
15:25:46 | Araq_ | you should just map array[4, float] to the shaders Vec4. |
15:26:16 | Araq_ | I told you getAst has nothing to do whatsoever with what you're trying to accomplish. |
15:26:44 | krux02 | an array[4, float] has a different representation in glsl as a vec4 |
15:27:01 | krux02 | glsl has arrays, and an array shoul stay an array |
15:27:42 | Araq_ | so map Vec4 to an object |
15:28:06 | krux02 | what do you mean by mapping it to an object? |
15:28:33 | Araq_ | but I don't like distinct arrays at all. 'distinct' exists to introduce additional restrictions, not to turn 'array' into a nominal type |
15:30:14 | * | gokr joined #nim |
15:30:20 | nsf | Araq_: why `var t: Thread[var int]` compiles, is it correct? I tried making generic objects which look similar to Thread, but they don't compile the same way |
15:31:32 | nsf | I'm asking because not only it compiles, but leads to segfaults in a slightly larger program, could be a bug or something |
15:32:00 | nsf | var workers: seq[Thread[var Worker]] |
15:32:04 | nsf | workers = newSeq[Thread[Worker]](countProcessors()) |
15:32:07 | nsf | this compiles |
15:32:16 | Araq_ | nsf: well it shouldn't. |
15:32:22 | nsf | ok, a bug then |
15:36:49 | krux02 | Araq_: I haven't worked with object much yet, but how is an object better than a distinct array[4,float]? |
15:37:34 | Araq_ | Thread should never have gained a T to begin with and also needs more compiler support to prevent people from doing wrong things |
15:46:00 | * | gokr quit (Quit: Leaving.) |
16:05:50 | * | askatasuna joined #nim |
16:08:11 | * | pregressive joined #nim |
16:45:36 | * | zepolen quit (Remote host closed the connection) |
16:46:26 | * | yglukhov quit (Ping timeout: 240 seconds) |
17:34:18 | * | Varriount-Laptop joined #nim |
17:46:11 | * | zepolen joined #nim |
17:50:33 | * | desophos joined #nim |
17:50:38 | * | zepolen quit (Ping timeout: 246 seconds) |
18:16:02 | * | yglukhov joined #nim |
18:17:20 | * | brson joined #nim |
18:21:04 | * | yglukhov quit (Ping timeout: 272 seconds) |
18:22:00 | * | Varriount-Laptop quit (Ping timeout: 256 seconds) |
18:23:13 | * | NUMIDIUM quit (Excess Flood) |
18:23:42 | * | Sornaensis joined #nim |
18:41:12 | * | jaco60 joined #nim |
18:50:02 | * | JX7P joined #nim |
18:50:23 | JX7P | what has happened to Nimrod? the #nimrod channel redirects to here |
18:50:43 | * | vendethiel joined #nim |
18:51:23 | * | brokencode joined #nim |
18:54:27 | * | Matthias247 joined #nim |
18:54:34 | * | minmax quit (Quit: Page closed) |
19:01:23 | pigmej | JX7P: Nimrod was renamed to Nim some time ago |
19:09:24 | * | zepolen joined #nim |
19:37:43 | * | krux02 quit (Remote host closed the connection) |
19:40:46 | * | grumbly joined #nim |
19:41:54 | grumbly | Does anyone know which version of nim I need to use to build nimsuggest? (I tried the heads of devel and master branches) |
19:43:27 | Araq_ | grumbly: nim devel should work |
19:44:54 | Araq_ | in fact, 'nimble install nimsuggest' works for me |
19:45:46 | * | darkf quit (Quit: Leaving) |
19:46:12 | grumbly | Araq_: Maybe it's because I didn't install nim? I only made sure nim and nimble are in PATH. nimble install nimsuggest yields: nimsuggest.nim(113, 8) Error: undeclared identifier: 'isTracked' |
19:47:18 | Araq_ | you can also try 'nim e compile_without_nimble.nims' from nimsuggest's directory |
19:47:46 | Araq_ | that's what I usually do ... *cough* |
20:00:16 | grumbly | Araq_: Okay, what might I be missing? I get 'nim e compile_without_nimble.nims' to work only if I first add the compile/ and doc/ dirs to lib/ in the nim repo clone using ln -s, then it gets all the way to a linker error with clinenoise.o |
20:05:18 | * | yglukhov joined #nim |
20:06:05 | dom96 | grumbly: that's strange, what OS are you on? |
20:06:11 | dom96 | I can `nimble install nimsuggest` fine too |
20:07:43 | grumbly | I'm on OSX unfortunately. |
20:07:46 | * | askatasuna quit (Ping timeout: 250 seconds) |
20:08:07 | dom96 | same |
20:08:56 | grumbly | I've noticed 'nimble install nimsuggest' pulls a clone of nim from the master branch, not devel. |
20:09:39 | dom96 | which version of Nimble do you have? |
20:10:43 | grumbly | dom96: nimble v0.6.0 |
20:11:22 | dom96 | grumbly: try upgrading to 0.7.0, just run `nimble install nimble` |
20:12:46 | * | zepolen quit (Remote host closed the connection) |
20:14:50 | * | yglukhov quit (Remote host closed the connection) |
20:16:07 | grumbly | dom96: good catch! That did the trick. Thank you for your time. |
20:17:05 | * | zepolen joined #nim |
20:21:44 | dom96 | grumbly: No problem. So you were able to install nimsuggest successfully? :) |
20:21:53 | * | zepolen quit (Ping timeout: 255 seconds) |
20:27:22 | * | exebook quit (Quit: Leaving) |
20:28:20 | * | brokencode quit (Quit: My Mac has gone to sleep. ZZZzzz…) |
20:35:26 | * | brokencode joined #nim |
20:40:16 | * | nsf quit (Quit: WeeChat 1.3) |
20:41:24 | * | brson quit (Ping timeout: 256 seconds) |
20:42:50 | * | gunn quit (Ping timeout: 246 seconds) |
20:43:35 | * | nsf joined #nim |
20:43:42 | * | gunn joined #nim |
20:43:43 | * | jakesyl joined #nim |
20:43:54 | * | brson joined #nim |
20:51:31 | grumbly | dom96: Yup, nimsuggest installed successfully. Problem was definitely the older nimble repo. |
20:54:04 | * | brokencode quit (Quit: My Mac has gone to sleep. ZZZzzz…) |
20:57:07 | * | grumbly quit (Quit: Page closed) |
21:08:42 | * | Ven joined #nim |
21:14:06 | * | zepolen joined #nim |
21:26:32 | * | Jesin quit (Quit: Leaving) |
21:27:23 | * | gunn quit (Read error: Connection reset by peer) |
21:31:38 | * | Pisuke quit (Ping timeout: 255 seconds) |
21:31:41 | * | Sembei joined #nim |
21:31:50 | * | zepolen quit (Remote host closed the connection) |
21:34:37 | * | gunn joined #nim |
21:37:22 | * | gokr joined #nim |
21:55:40 | ldlework | LLVM is just an intermediate representatation right? Like, there's no corresponding VM to go with it, right? |
21:56:14 | Araq_ | ldlework: wrong since LLVM's IR can be JIT'ed by LLVM too |
21:56:33 | ldlework | But JIT'ed for the CPU right? |
21:56:59 | Araq_ | what? as opposed to GPU? |
21:57:08 | ldlework | no, bytecode for a VM |
21:57:34 | ldlework | I guess, what I'm getting at, is if there is an LLVM VM, why not use LLVM as the bytecode target for Nim, and then do c-gen from the llvm ir. |
21:57:39 | Araq_ | the IR can be serialized as well and technically qualifies as a bytecode |
21:58:44 | ldlework | Or does the compiler only generate bytecode for the purposes of compile-time actions and the compiler does the C-gen from the Nim AST? |
21:58:44 | Araq_ | LLVM is quite low level translating LLVM back to C is way more tedious than generating C code directly. |
21:59:00 | ldlework | I thought it would be something like that. |
21:59:04 | Araq_ | in fact LLVM used to have a "C target" |
21:59:13 | ldlework | neat |
21:59:21 | Araq_ | but it is not maintained anymore since C is too quirky |
21:59:26 | ldlework | sure |
21:59:31 | Araq_ | and nobody cared about keeping it up to date. |
21:59:33 | ldlework | thanks for the explanation |
21:59:43 | ldlework | Araq_: btw, does Nim generate the c from the bytecode or the AST |
22:00:08 | ldlework | I guess I'll be shocked if you say the Nim compiler's VM executes the AST |
22:00:17 | Araq_ | from the AST, the bytecode is only used for compile-time evaluation stuff. well and for nimscript. |
22:00:29 | ldlework | right |
22:00:34 | ldlework | oh |
22:00:38 | ldlework | so c-gen happens from the ast |
22:00:41 | Araq_ | but it was designed for compiletime macro evaluation. nimscript came later. |
22:00:46 | ldlework | right |
22:01:31 | ldlework | Araq_: do any other languages do this? |
22:01:45 | Araq_ | I think Ocaml comes close |
22:01:47 | ldlework | the compiler vm |
22:02:05 | Araq_ | oh dunno. the D guys certainly are trying |
22:02:19 | ldlework | Araq_: on the scale of virtual machines, the compiler's virtual machine is probably pretty simple right? |
22:02:24 | ldlework | s/scale/spectrum |
22:02:56 | * | jsudlow joined #nim |
22:02:57 | Araq_ | no, it's actually quite advanced. it uses a register based VM |
22:02:58 | ldlework | that's not an insult, I'm just wagering that's the case |
22:03:25 | ldlework | Ah I was going to say "Well is it unthinkable that other languages could add this feature if they wanted to?" |
22:03:46 | Araq_ | the VM was heavily inspired by Lua's VM. |
22:04:03 | Araq_ | to the point were I copied their naming conventions. |
22:04:09 | ldlework | hehe |
22:04:16 | ldlework | whatever lowers the cognitive load |
22:04:41 | ldlework | Is it feasible to include the compiler's vm functionality in your own programs? |
22:04:55 | Araq_ | yes and support for that is getting better and better |
22:04:56 | ldlework | With the ability to extend the 'built-ins' available? |
22:05:00 | ldlework | interesting |
22:05:12 | Araq_ | nimedit uses nimscript, nimble uses nimscript ... |
22:05:44 | ldlework | Araq_: is there any world in which a nimvm is pausable, serializable, and reconstitutable? |
22:07:19 | ldlework | I want to send one over the network |
22:07:27 | Araq_ | nimedit uses "hot code reloading" |
22:07:35 | Araq_ | as a proof of concept mostly |
22:07:56 | ldlework | I don't really want to change the state or model of the vm |
22:08:03 | jsudlow | Hi Araq, ldlework.. In nim-SDL 2 when I have a KeyDown event how can I echo out the key that is being pressed? Or maybe a better quesiton is there any way to see all the methods attached to a certain object? |
22:08:11 | ldlework | I literally want to stop it and move it to a new server and start it again |
22:08:25 | Araq_ | sorry, bbs |
22:08:47 | ldlework | jsudlow: lemme look at the sdl2 module |
22:09:12 | jsudlow | my best guess was event.keysym.key but that returns a conversion error |
22:10:24 | * | jakesyl quit (Ping timeout: 250 seconds) |
22:11:26 | ldlework | jsudlow: https://github.com/nim-lang/sdl2/blob/master/src/sdl2.nim#L216 |
22:11:43 | ldlework | I don't think you're going to be able to easily get a string version of what key is pressed |
22:12:58 | jsudlow | ldlework: hmmm I was looking at that same thing. You cant convert a cint to a string just to check the scan code? |
22:12:59 | ldlework | I mean you can create a Table[cint, string] for the keysyms you care about |
22:13:09 | ldlework | oh of course you can |
22:13:21 | ldlework | echo(keysym.sym) didn't work? |
22:13:29 | ldlework | you can also do something like |
22:13:49 | ldlework | echo("The keysym is: $1" % keysym.sym) |
22:14:20 | ldlework | jsudlow: http://nim-lang.org/docs/system.html#$,int |
22:14:57 | ldlework | if it wont take a cint, just write a cint to int converter |
22:15:20 | ldlework | jsudlow: http://nim-lang.org/docs/manual.html#converters |
22:15:27 | ldlework | jsudlow: make sense? |
22:20:51 | ldlework | Strange I can't fifnd nimedit on github |
22:22:06 | ldlework | Araq_: where is nimedit? |
22:23:50 | ldlework | interesting NimEdit does not support hidpi? |
22:24:03 | ldlework | I just added content-scaling support to my own SDL2 app |
22:27:11 | * | Sembei quit (Ping timeout: 264 seconds) |
22:27:16 | * | Trustable quit (Remote host closed the connection) |
22:30:59 | * | Sembei joined #nim |
22:32:26 | * | zepolen joined #nim |
22:36:49 | * | zepolen quit (Ping timeout: 245 seconds) |
22:39:55 | * | kas_ quit (Ping timeout: 240 seconds) |
22:41:57 | * | Ven quit (Quit: My MacBook has gone to sleep. ZZZzzz…) |
22:47:11 | * | Jesin joined #nim |
22:49:10 | * | pregressive quit () |
22:51:07 | * | bjz joined #nim |
22:54:34 | * | pregressive joined #nim |
23:00:35 | Araq_ | ldlework: http://nim-lang.org/nimedit/ |
23:00:54 | ldlework | yeah but where's the code |
23:00:57 | Araq_ | and yeah, hidpi would be nice :-( |
23:00:59 | * | zepolen joined #nim |
23:01:12 | Araq_ | bitbucket but it's closed source |
23:01:16 | ldlework | Araq_: its one line of code practically |
23:01:22 | ldlework | to get SDL to scale up |
23:01:29 | Araq_ | oh? |
23:01:44 | ldlework | set the logical size to half the size of the current desktop resolution |
23:01:49 | * | bjz quit (Ping timeout: 265 seconds) |
23:01:52 | ldlework | boom, everything is rendered twice as big |
23:02:05 | * | zepolen quit (Remote host closed the connection) |
23:02:09 | * | BitPuffin quit (Read error: Connection reset by peer) |
23:02:51 | ldlework | Since you want to maintain a constant scale with varrying window size though (since its an editor) you may need to do a tiny bit of division or something |
23:03:16 | Araq_ | dunno I'm not happy with SDL's font rendering at all |
23:03:23 | ldlework | oh right its just half of the current window size |
23:03:29 | ldlework | is the logical size |
23:03:36 | * | Demon_Fox joined #nim |
23:03:49 | jsudlow | sec ldlework: yea when I try echo KeySym.sym I got a type mismatch error and when I try to stringify it I get another error :) |
23:04:11 | ldlework | Araq_: things don't look so bad, despite the smallness |
23:04:26 | ldlework | Has someone implemented a general partitioner? |
23:04:35 | ldlework | for windows/panes |
23:10:53 | Araq_ | latest supports multi windows |
23:20:12 | ldlework | eh |
23:20:15 | ldlework | that's cool |
23:21:02 | ldlework | Araq_: what were you using before Nimedit |
23:21:07 | ldlework | this looks.. ahem. a bit emacs inspired |
23:24:10 | * | pregressive quit (Remote host closed the connection) |
23:28:31 | Araq_ | I used Aporia before |
23:28:45 | ldlework | before that? |
23:28:57 | Araq_ | sure, I'm always eating dogfood |
23:29:07 | ldlework | no I mean which editor before Apoiria |
23:29:31 | Araq_ | gedit and SciTe |
23:34:20 | Araq_ | and afaik it's Vim inspired |
23:38:51 | ldlework | Well I hate modal editors. Is that the direction nimedit is going? |
23:41:27 | Araq_ | well I dunno. the command line is not going away |
23:41:36 | Araq_ | maybe later more buttons etc will be added |
23:42:09 | ldlework | do you mean the commandline on the right, or the one at the bottom? |
23:42:27 | Araq_ | at the bottom |
23:42:46 | ldlework | Yeah emacs has that too |
23:42:57 | ldlework | Though I don't think it is persistently drawn in either. |
23:44:48 | Araq_ | since I use it all the time I don't see why it should be optional |
23:46:13 | ldlework | Probably for smaller terminal sizes to get the extra line. |
23:51:23 | * | Matthias247 quit (Read error: Connection reset by peer) |