00:00:05 | Raiz | krux02, cool |
00:00:12 | * | McSpiros quit (Quit: Page closed) |
00:00:17 | krux02 | Raiz, it's interesting it's productive, it has tooling, it has bugs |
00:00:31 | Raiz | C is kinda broken and old, so I've been looking for an alternative |
00:00:35 | Raiz | so, I found nim |
00:01:36 | ephja | good choice! |
00:01:41 | Raiz | is it true that I can write outstanding binaries without requiring a run-time? |
00:03:04 | krux02 | a "run-time" is most of the time nothing more than a garbage collector, and you can write nim code without using the garbage collector (I am doing it) |
00:03:22 | Raiz | how about stdlib? |
00:03:27 | * | perturbation quit (Quit: Leaving) |
00:04:12 | krux02 | stdlib is not a runtime, as the name already says |
00:04:59 | Raiz | but isn't writing useful programs require calling functions from others libs? |
00:05:18 | krux02 | yes it is |
00:05:23 | krux02 | and nim can call a c |
00:05:33 | krux02 | there are a lot of c library wrappers |
00:05:54 | krux02 | if you want to get started, I recommend you to play around on your own |
00:06:03 | krux02 | start with for example sdl |
00:06:08 | Raiz | I would definitely do |
00:06:14 | krux02 | look at the tutorials for sdl and apply them to nim |
00:06:26 | krux02 | (I use sdl2) |
00:06:42 | * | Demon_Fox joined #nim |
00:07:14 | Raiz | alright, thanks for help |
00:07:14 | krux02 | it's not a perfect wrapper, for example for event management you have to use the cast operator, but that's acceptable |
00:07:57 | krux02 | but don't expect too much from the beginning, the error messages from the compiler could be from time to time a bit sparse |
00:08:09 | krux02 | in other words non-informative |
00:12:34 | Raiz | there is no copying.txt file here: https://github.com/nim-lang/osinfo/tree/master/src |
00:13:14 | Raiz | whoever is responsible for this repo, he must fix it |
00:13:22 | krux02 | ephja: thanks for the link, but apparently I can't use it to pass arguments to the passL pragma |
00:14:54 | * | yglukhov joined #nim |
00:15:53 | * | Demon_Fox quit (Quit: Leaving) |
00:18:14 | ephja | Raiz: "See the file "copying.txt", included in this distribution, for details about the copyright." |
00:18:21 | ephja | not sure if that's good enough |
00:18:23 | ephja | krux02: ok |
00:21:03 | * | yglukhov quit (Ping timeout: 276 seconds) |
00:21:26 | * | Demon_Fox joined #nim |
01:19:36 | * | Demon_Fox quit (Quit: Leaving) |
01:20:28 | * | Demon_Fox joined #nim |
01:26:04 | * | ephja quit (Ping timeout: 244 seconds) |
01:33:40 | * | Demon_Fox quit (Quit: Leaving) |
01:34:45 | * | Demon_Fox joined #nim |
01:42:36 | * | AckZ quit (Ping timeout: 244 seconds) |
01:48:08 | * | Demon_Fox quit (Quit: Leaving) |
01:49:09 | * | Demon_Fox joined #nim |
02:03:24 | * | Demon_Fox quit (Quit: Leaving) |
02:04:18 | * | Demon_Fox joined #nim |
02:12:18 | * | AckZ joined #nim |
02:17:16 | * | yglukhov joined #nim |
02:21:51 | * | yglukhov quit (Ping timeout: 244 seconds) |
02:30:51 | * | space-wizard joined #nim |
02:32:25 | * | enthus1ast quit (Read error: Connection reset by peer) |
02:35:17 | * | space-wizard quit (Client Quit) |
02:49:17 | onionhammer | " |
03:05:47 | * | kingofoz quit (Ping timeout: 244 seconds) |
03:06:18 | * | kingofoz joined #nim |
04:03:26 | * | krux02 quit (Remote host closed the connection) |
04:18:36 | * | yglukhov joined #nim |
04:22:46 | * | yglukhov quit (Ping timeout: 244 seconds) |
06:20:07 | * | yglukhov joined #nim |
06:24:41 | * | yglukhov quit (Ping timeout: 244 seconds) |
06:50:52 | * | kingofoz quit (Ping timeout: 264 seconds) |
06:50:53 | * | Raiz quit (Ping timeout: 264 seconds) |
06:51:01 | * | kingofoz joined #nim |
06:55:32 | * | Raiz joined #nim |
07:09:17 | * | alexsystemf_ quit (Quit: Connection closed for inactivity) |
07:26:46 | * | lxdong joined #nim |
07:27:43 | * | McSpiros joined #nim |
07:29:09 | * | desophos quit (Read error: Connection reset by peer) |
07:33:16 | * | yglukhov joined #nim |
07:38:30 | * | yglukhov quit (Ping timeout: 276 seconds) |
07:40:20 | * | gokr joined #nim |
07:47:36 | * | gokr quit (Ping timeout: 276 seconds) |
07:48:46 | * | darkf_ joined #nim |
07:56:44 | * | Raiz quit (*.net *.split) |
07:56:46 | * | darkf quit (*.net *.split) |
07:56:49 | * | izi quit (*.net *.split) |
07:56:49 | * | zaquest quit (*.net *.split) |
07:56:51 | * | M-Quora quit (*.net *.split) |
07:56:52 | * | asdf quit (*.net *.split) |
07:56:54 | * | arnetheduck quit (*.net *.split) |
07:56:56 | * | ldlework quit (*.net *.split) |
07:57:31 | * | ldlework joined #nim |
07:57:53 | * | M-Quora joined #nim |
07:59:26 | * | darkf_ is now known as darkf |
07:59:45 | * | Raiz joined #nim |
08:14:03 | * | NimBot joined #nim |
08:14:06 | * | asdf is now known as Guest74698 |
08:15:09 | * | darkfox joined #nim |
08:15:27 | * | darkf quit (Ping timeout: 264 seconds) |
08:15:34 | * | darkfox is now known as Guest98820 |
08:16:51 | * | M-max joined #nim |
08:17:29 | * | sarlalian joined #nim |
08:17:40 | * | gmpreussner joined #nim |
08:17:46 | * | mal`` joined #nim |
08:17:57 | * | pigmej joined #nim |
08:18:35 | * | dthrvr joined #nim |
08:18:38 | * | M-Quora joined #nim |
08:19:09 | * | arnetheduck joined #nim |
08:19:09 | * | Raiz joined #nim |
08:19:09 | * | wh1t3r0s3 joined #nim |
08:19:13 | * | Jessin joined #nim |
08:19:15 | * | federico3 joined #nim |
08:19:18 | * | reactormonk joined #nim |
08:20:04 | * | boopisaway joined #nim |
08:20:05 | * | darkf_ is now known as darkf |
08:22:33 | * | Learath2 joined #nim |
08:22:53 | * | veganskaway joined #nim |
08:23:52 | * | Guest98820 quit (Changing host) |
08:23:52 | * | Guest98820 joined #nim |
08:23:57 | * | Guest98820 is now known as IcyFoxy |
08:28:26 | * | pleiosaur joined #nim |
08:40:04 | * | jackv joined #nim |
08:41:50 | * | Sergio965 joined #nim |
08:45:03 | * | DecoPerson_ quit (Read error: Connection reset by peer) |
08:46:03 | * | huonw_ quit (Ping timeout: 264 seconds) |
08:46:03 | * | OnO quit (Ping timeout: 264 seconds) |
08:46:50 | * | DecoPerson_ joined #nim |
08:51:05 | * | huonw joined #nim |
08:52:04 | * | Sembei joined #nim |
08:54:07 | * | OnO joined #nim |
08:56:43 | * | Demon_Fox quit (Quit: Leaving) |
09:05:31 | * | ldlework joined #nim |
09:05:31 | * | chrisheller joined #nim |
09:06:36 | * | ephja joined #nim |
09:17:34 | * | beatmox joined #nim |
09:17:34 | * | mlitwiniuk joined #nim |
09:25:05 | * | emery is now known as ehmry |
09:27:11 | * | ehmry quit (Quit: ZNC - http://znc.in) |
09:29:12 | * | Raiz quit (Changing host) |
09:29:12 | * | Raiz joined #nim |
09:31:22 | * | Guest74698 is now known as asdf |
09:34:43 | * | yglukhov joined #nim |
09:39:01 | * | yglukhov quit (Ping timeout: 250 seconds) |
09:42:41 | * | cheatfate_ is now known as cheatfate |
09:42:54 | * | emery joined #nim |
09:43:01 | * | boopisaway is now known as boop |
09:54:44 | * | elrood joined #nim |
10:10:37 | * | kingofoz quit (Ping timeout: 260 seconds) |
10:11:24 | * | kingofoz joined #nim |
10:13:33 | * | fredrik92 joined #nim |
10:18:49 | * | fredrik92 quit (Quit: switching IRC client) |
10:19:12 | * | fredrik92 joined #nim |
10:42:56 | * | castlelore quit (Quit: WeeChat 1.4) |
10:50:17 | * | SirCmpwn quit (Ping timeout: 260 seconds) |
10:50:22 | * | lxdong quit (Ping timeout: 250 seconds) |
10:54:12 | * | SirCmpwn joined #nim |
10:56:26 | * | Ven joined #nim |
10:56:32 | * | Ven quit (Client Quit) |
10:59:35 | * | castlelore joined #nim |
11:09:40 | * | fredrik92 quit (Quit: Shutting down...) |
11:09:55 | * | fredrik92 joined #nim |
11:11:58 | * | wh1t3r0s3 quit (Ping timeout: 244 seconds) |
11:13:01 | * | delian66_ quit (Ping timeout: 244 seconds) |
11:13:32 | * | nsf quit (Ping timeout: 244 seconds) |
11:15:20 | * | jeffc quit (Read error: Connection reset by peer) |
11:15:57 | * | jeffc joined #nim |
11:18:22 | * | Varriount joined #nim |
11:18:42 | * | Varriount_ quit (Ping timeout: 244 seconds) |
11:18:54 | * | wh1t3r0s3 joined #nim |
11:30:03 | * | nsf joined #nim |
11:35:36 | * | delian66 joined #nim |
11:36:18 | * | yglukhov joined #nim |
11:40:27 | * | yglukhov quit (Ping timeout: 246 seconds) |
11:54:17 | * | BrotherLy_ joined #nim |
11:57:26 | * | BrotherLy quit (Ping timeout: 244 seconds) |
12:02:36 | * | dyce_ quit (Ping timeout: 244 seconds) |
12:07:13 | * | ^GaveUp^ is now known as GaveUp |
12:30:57 | * | dyce_ joined #nim |
13:32:15 | * | dthrvr quit (Ping timeout: 264 seconds) |
13:37:47 | * | yglukhov joined #nim |
13:39:47 | * | gokr joined #nim |
13:42:26 | * | yglukhov quit (Ping timeout: 268 seconds) |
13:55:12 | * | gokr quit (Ping timeout: 260 seconds) |
13:58:58 | * | dthrvr joined #nim |
14:40:19 | * | darkf quit (Quit: Leaving) |
14:42:23 | * | couven92 joined #nim |
14:43:52 | * | yglukhov joined #nim |
14:46:46 | * | freddy92 joined #nim |
14:48:28 | * | yglukhov quit (Ping timeout: 250 seconds) |
14:50:12 | * | fredrik92 quit (Ping timeout: 250 seconds) |
14:51:26 | * | fredrik92 joined #nim |
14:51:47 | * | nvt_ joined #nim |
14:54:15 | * | couven92 quit (Read error: Connection reset by peer) |
15:03:52 | * | Trustable joined #nim |
15:10:26 | nvt_ | Anyone here know how to extract the runtime type information from a ptr? I've found setObjectRuntimeType for initializing the rtti, but I have not found a corresponding way to retrieve it |
15:11:57 | nvt_ | for context, I'm trying to figure out how to copy an object allocated in shared memory whose type is not known exactly at compile time |
15:12:04 | * | Arrrr joined #nim |
15:12:04 | * | Arrrr quit (Changing host) |
15:12:04 | * | Arrrr joined #nim |
15:19:39 | reactormonk | nvt_, construct an enum field for a kind object / ADT? |
15:20:42 | BrotherLy_ | why would i use nim over java |
15:23:15 | reactormonk | BrotherLy_, maybe you like a type good type system, macros and speed? |
15:24:01 | * | dyce_ quit (Ping timeout: 250 seconds) |
15:24:27 | * | dthrvr quit (Ping timeout: 250 seconds) |
15:24:27 | * | wh1t3r0s3 quit (Ping timeout: 250 seconds) |
15:24:53 | * | delian66 quit (Ping timeout: 250 seconds) |
15:25:22 | Arrrr | speed + much less boilerplate |
15:26:02 | nvt_ | To do an enum field for the object kind I would have to know all of the possible types ahead of time and declare them in one place. That would work, but I'd much prefer to avoid that |
15:26:25 | * | delian66 joined #nim |
15:26:55 | Varriount | Arrrr: You forgot not having to deal with the mind-numbing type heirarchies. |
15:27:38 | ephja | what's it like debugging such code? not too fun I imagine |
15:28:35 | reactormonk | nvt_, your choices for are a) dynamic dispatch via method, b) data types a la carte |
15:28:55 | reactormonk | nvt_, there is no reflection in nim that I know of. |
15:29:04 | Varriount | reactormonk: Uh, yes there is? |
15:29:06 | nvt_ | hmm, but if nim can do the dynamic dispatch by method, it must be able to introspect on the type |
15:29:12 | reactormonk | Varriount, oh, tell me. |
15:29:22 | Varriount | reactormonk: http://nim-lang.org/docs/typeinfo.html |
15:29:43 | ephja | nvt_: does it? |
15:30:36 | reactormonk | nvt_, you'll have to tell the compiler to attach the type information via e.g. typeinfo. |
15:30:37 | nvt_ | ephja: it would seem that way, in order to decide which version of the method to call at runtime it has to know what the type is, yeah? |
15:30:46 | * | Trustable quit (*.net *.split) |
15:30:46 | * | fredrik92 quit (*.net *.split) |
15:30:47 | * | elrood quit (*.net *.split) |
15:30:47 | * | emery quit (*.net *.split) |
15:30:57 | ephja | nim's GC architecture is more flexible too, right? |
15:31:07 | Varriount | ephja: In what way? |
15:31:17 | reactormonk | Varriount, from what I understand, this adds type information to the objects that isn't there by default? |
15:31:19 | nvt_ | reactormonk: yeah, I'm attaching the type information with setObjectRuntimeType, what I don't know is how to get that back out |
15:31:33 | reactormonk | nvt_, which problem are you trying to solve? |
15:31:35 | nvt_ | though that's only necessary when you alloc with createShared or some such |
15:31:58 | Varriount | reactormonk: Reflection information is only added when it's actually needed. |
15:32:16 | ephja | Varriount: can java's GC be enabled and disabled, and does it have a realtime GC? |
15:32:37 | * | vqrs quit (Ping timeout: 260 seconds) |
15:32:53 | nvt_ | Hah, fair question. Writing a game, all of the logic is broken up into different components that are responsible for some subset of the game/control/graphics logic |
15:33:25 | nvt_ | They communicate by means of events, so, lighting updates in response to world change event, graphics updates in response to light change event |
15:34:00 | reactormonk | So you basically want actors? |
15:34:08 | * | vqrs joined #nim |
15:34:18 | reactormonk | Or channels. |
15:34:33 | Varriount | ephja: It appears you can query information about a collection... but no, there doesn't appear to be a standard interface within the Java library. |
15:34:36 | nvt_ | something along those lines, and yes, I am aware of channels |
15:34:54 | nvt_ | but I don't think they fit with the threading model I'm going for |
15:35:14 | reactormonk | nvt_, I'm just wary of switching over to dynamic typing, that's why I advise against it. |
15:35:18 | Varriount | ephja: Oh, and there's System.gc(), which may or may not run a collection. |
15:35:43 | * | wh1t3r0s3 joined #nim |
15:35:47 | ephja | ok |
15:35:57 | nvt_ | reactormonk: yeah, I understand that it's not nim's preferred approach, I certainly wouldn't advocate it to other folk |
15:36:04 | Arrrr | java's GC can be tweaked, but it is all dark sorcery |
15:36:05 | nvt_ | but I am still interested to determine if I can do it |
15:36:24 | ephja | System.out.println *shudder* |
15:36:32 | Arrrr | hahah |
15:36:37 | Varriount | Arrrr: The only way I know of tweaking it is through command line arguments to the JVM. |
15:36:49 | Varriount | As far as I know, there's no programmatic API. |
15:37:14 | * | Trustable joined #nim |
15:37:23 | Arrrr | But still it is an api |
15:37:48 | nvt_ | And I think the specific situation of: you have a "ptr Base" that may contain "ptr Inherited1" or "ptr Inherited2", and you want to make a copy of it, also on the shared heap, is potentially relevant regardless |
15:38:28 | * | dyce_ joined #nim |
15:39:21 | * | elrood joined #nim |
15:39:38 | reactormonk | nvt_, hmm, go ahead and tinker. I've never done polymorphic OO programming, so I can't follow :-/ |
15:39:43 | Varriount | nvt_: What's your problem again? |
15:39:43 | * | emery joined #nim |
15:40:36 | nvt_ | Varriount: Well, in specific, I have a "ptr Event", and I do not know the exact kind of event that is being pointed to. I'd like to make a copy of that event on the shared heap |
15:40:48 | * | dthrvr joined #nim |
15:40:52 | nvt_ | to do that I need to allocate space for the new copy, so I need to know the size of the object that is pointed to |
15:41:13 | Varriount | nvt_: Interesting, I had this problem come up today in a thought experiment about RPC calls |
15:41:37 | nvt_ | Varriount: hah, excellent, very timely then |
15:41:49 | Varriount | nvt_: Look at the code for the deepcopy procedure. |
15:41:50 | reactormonk | nvt_, you can call getSize or something like that via typeinfo |
15:42:01 | reactormonk | ah, it's just called "size" |
15:42:30 | nvt_ | Let me experiment real quick, when I tried that out it was looking at the compile time type, I though |
15:42:36 | nvt_ | thought^ |
15:43:16 | Varriount | reactormonk: That will get the size of the object, but if there are any references/pointers in the object, it won't count them as well. |
15:44:49 | nvt_ | so, just did some quick code, size gives me the same result for different types in the pointed to value |
15:45:23 | nvt_ | but I may be doing something wrong |
15:45:36 | reactormonk | nvt_, are they different size? |
15:46:44 | nvt_ | yeah, I made a test object type "Base" with a single int, then a type "Foo" that inherits from Base and has two additional fields |
15:47:16 | nvt_ | I then created a Base object and a Foo object on the heap, then took ptrs to each and stored them in "ptr Base" variables, then asked for the size of each |
15:47:25 | reactormonk | nvt_, you should be able to use genericDeepCopy(src, dest, any.rawType) from what I see |
15:47:44 | nvt_ | genericDeepCopy? Interesting, I missed that, that sounds very promising |
15:48:21 | nvt_ | reactormonk: what module is that in? |
15:48:28 | reactormonk | nvt_, no module, it's in system |
15:49:00 | nvt_ | oh, I was looking at the system docs and I didn't see it, so I figured it must be elsewhere |
15:50:31 | Varriount | nvt_: I'd say that size is broken then, the code looks like it should give the size of the type: https://github.com/nim-lang/Nim/blob/master/lib/core/typeinfo.nim#L146 |
15:51:37 | nvt_ | Varriount: I think what's happening is that if you just ask for the size of the variable itself, it tells you the size of a pointer (fair enough), if you derefer it and take the size of that it's derefering it into an object of the Base type regardless of what its actual type is, then taking the size of that, which is always the size of Base |
15:52:14 | nvt_ | so I guess the size code is correct, it just doesn't help in this case unless I figure out a different way to use it |
15:52:32 | reactormonk | nvt_, you wanted copy, try the genericDeepCopy. |
15:52:36 | * | kier quit (Ping timeout: 250 seconds) |
15:52:50 | nvt_ | reactormonk: it seems like the third argument to that deep copy function needs to be the runtime type of the object, am I wrong in that? |
15:54:25 | reactormonk | nvt_, no, I think you're quite right. |
15:54:29 | * | kier joined #nim |
15:55:15 | nvt_ | I think I'll go dig on this for a bit, try using the stuff from hti.nim that the typeinfo module uses under the hood, see if I can figure something out |
15:55:36 | nvt_ | thanks for all the help everyone |
16:04:32 | * | nvt_ quit (Ping timeout: 250 seconds) |
16:08:20 | Varriount | Interesting... The reason that size() is wrong is because the generated C code passes in only the parent section of the type |
16:21:14 | * | freddy92 quit (Read error: Connection reset by peer) |
16:21:32 | ephja | shouldn't it be possible to apply macros (user-defined pragmas) to types and fields? |
16:22:35 | reactormonk | ephja, types yes, fields not sure. |
16:22:54 | * | Varriount quit (Disconnected by services) |
16:22:54 | * | Varriount_ joined #nim |
16:37:51 | ephja | reactormonk: this is wrong? "macro m*(x: typed): typed = result = x ... type T {.m.} = object" |
16:38:31 | reactormonk | ephja, I'm not sure if x: typed is correct here |
16:38:38 | reactormonk | but I don't know enough about macros :-/ |
16:41:23 | ephja | are you still sure that it's possible? :p |
16:42:16 | ephja | I wanted to try something related to my serialization ideas, which was to annotate fields with pragmas in order to control the output |
16:43:56 | reactormonk | ephja, I'd just go with the typeclass approach here, way easier. |
16:44:16 | reactormonk | Yes, macros are easy, but still annoying to debug. |
16:46:06 | reactormonk | ephja, aka proc encode[T](x: T): SerializedStuff = ... |
16:48:41 | ephja | well it's not working on types (invalid pragma) |
16:49:00 | ephja | the idea was to reduce the need for procs, but I might be able to simplify it anyway with metaprogramming |
16:50:50 | reactormonk | So you want to generate the procs via macro? |
16:55:31 | * | kier_ joined #nim |
16:59:37 | * | g00 joined #nim |
17:00:47 | * | kier quit (*.net *.split) |
17:00:47 | * | Trustable quit (*.net *.split) |
17:00:47 | * | wh1t3r0s3 quit (*.net *.split) |
17:00:47 | * | delian66 quit (*.net *.split) |
17:00:47 | * | nsf quit (*.net *.split) |
17:00:48 | * | kingofoz quit (*.net *.split) |
17:00:48 | * | beatmox quit (*.net *.split) |
17:00:48 | * | mlitwiniuk quit (*.net *.split) |
17:01:18 | * | kingofoz joined #nim |
17:07:48 | * | Trustable joined #nim |
17:07:50 | * | space-wizard joined #nim |
17:08:02 | * | delian66 joined #nim |
17:08:04 | * | nsf joined #nim |
17:13:22 | * | yglukhov joined #nim |
17:18:18 | * | yglukhov quit (Ping timeout: 276 seconds) |
17:19:34 | * | space-wizard quit (Quit: My Mac has gone to sleep. ZZZzzz…) |
17:21:33 | * | yglukhov joined #nim |
17:30:57 | * | yglukhov quit (Remote host closed the connection) |
17:34:59 | ephja | reactormonk: the idea was to specify serialization behavior declaratively by attaching metadata to types and fields, but I don't know if it would be useful |
17:39:12 | * | Varriount_ quit (Ping timeout: 250 seconds) |
17:40:41 | * | Varriount joined #nim |
17:41:11 | ephja | field: {.serialize: false.} for example, in order to skip it, but that might not be useful |
17:47:51 | * | Jessin quit (Ping timeout: 264 seconds) |
17:52:42 | * | nchambers is now known as sillytime |
17:56:25 | ephja | anyway, the marshal module sometimes generates more data than necessary, but it is convenient |
17:58:07 | * | Matthias247 joined #nim |
18:20:34 | * | nvt_ joined #nim |
18:33:01 | * | Jesin joined #nim |
18:41:20 | * | Raiz quit (Quit: Leaving) |
18:42:16 | * | nvt_ quit (Ping timeout: 250 seconds) |
18:48:37 | * | kingofoz quit (Ping timeout: 260 seconds) |
18:48:47 | * | kingofoz joined #nim |
19:03:28 | * | Ven joined #nim |
19:22:28 | * | yglukhov joined #nim |
19:26:00 | * | desophos joined #nim |
19:26:45 | * | gokr joined #nim |
19:27:32 | * | Jesin quit (Ping timeout: 250 seconds) |
19:28:15 | * | alexsystemf_ joined #nim |
19:29:32 | * | krux02 joined #nim |
19:30:13 | * | kerze joined #nim |
19:30:24 | * | Ven_ joined #nim |
19:30:37 | * | Varriount quit (Ping timeout: 260 seconds) |
19:31:44 | * | nvt_ joined #nim |
19:33:19 | * | Ven quit (*.net *.split) |
19:33:20 | * | Trustable quit (*.net *.split) |
19:34:33 | * | Arrrr quit (Quit: WeeChat 1.4) |
19:39:17 | * | Varriount joined #nim |
19:57:48 | nvt_ | Hello again! Regarding the RTTI of objects on the shared heap, it looks like if they have been properly initialized (using setObjectRuntimeType or some other means) then the first section of the object's memory should be a pointer to a PNimType, which is itself a pointer to the TNimType which has all of the relevant type info |
19:58:18 | nvt_ | so something as simple as the following should pull it out: proc getRtti(env: pointer): PNimType = cast[ptr PNimType](env)[] |
19:58:53 | * | yglukhov quit (Remote host closed the connection) |
20:00:03 | nvt_ | I recognize that this is something of a hack, and my apologies in advance to anyone who understands the language better than I and is horrified by this approach |
20:02:55 | reactormonk | nvt_, take a look at marshall |
20:04:16 | ephja | *marshall[0..^2] |
20:04:48 | nvt_ | reactormonk, yeah, that was one of the places I looked through, I think it's the only place in the nim source that uses setObjectRuntimeType so it seemed relevant |
20:08:36 | ephja | I'm trying something with typeinfo, but I guess it adds unnecessary overhead in some cases |
20:10:24 | * | Matthias247 quit (Quit: Matthias247) |
20:13:59 | * | irrequietus joined #nim |
20:14:09 | * | Matthias247_ joined #nim |
20:18:27 | * | gmpreussner quit (Ping timeout: 260 seconds) |
20:18:53 | * | Demon_Fox joined #nim |
20:23:12 | * | gmpreussner joined #nim |
20:26:19 | * | Ven_ quit (Quit: My MacBook has gone to sleep. ZZZzzz…) |
20:34:31 | * | McSpiros quit (Quit: Page closed) |
21:00:37 | * | kerze quit (Remote host closed the connection) |
21:01:19 | krux02 | why does the {.compile: "file.cpp".} pragma not compile file.cpp, but instead just throws the error: "file.o" file not found |
21:03:32 | * | nvt_ quit (Ping timeout: 250 seconds) |
21:08:24 | * | Xe quit (Ping timeout: 260 seconds) |
21:10:24 | * | boop is now known as boopisaway |
21:11:56 | * | Jesin joined #nim |
21:14:38 | * | Xe joined #nim |
21:15:24 | * | vendethiel quit (Ping timeout: 260 seconds) |
21:26:14 | * | jeffc_ joined #nim |
21:29:12 | * | desophos_ joined #nim |
21:33:15 | * | alexsystemf__ joined #nim |
21:33:42 | * | Matthias247 joined #nim |
21:37:35 | * | Demon_Fox_ joined #nim |
21:37:37 | * | nsf1 joined #nim |
21:37:55 | * | Demon_Fox quit (Disconnected by services) |
21:37:57 | * | Demon_Fox_ is now known as Demon_Fox |
21:38:00 | * | vqrs_ joined #nim |
21:38:03 | * | Jessin joined #nim |
21:39:17 | * | alexsystemf__ quit (Quit: Connection closed for inactivity) |
21:41:07 | * | Jesin quit (*.net *.split) |
21:41:08 | * | Matthias247_ quit (*.net *.split) |
21:41:09 | * | alexsystemf_ quit (*.net *.split) |
21:41:09 | * | desophos quit (*.net *.split) |
21:41:10 | * | nsf quit (*.net *.split) |
21:41:10 | * | dthrvr quit (*.net *.split) |
21:41:10 | * | vqrs quit (*.net *.split) |
21:41:11 | * | jeffc quit (*.net *.split) |
21:41:12 | * | castlelore quit (*.net *.split) |
21:41:13 | * | nsf1 is now known as nsf |
21:44:22 | * | fredrik92 joined #nim |
21:44:27 | * | dthrvr joined #nim |
21:44:34 | * | castlelore joined #nim |
21:46:40 | * | couven92 joined #nim |
21:47:52 | elrood | krux02, perhaps your nimcache directory contains a corresponding sha1 file, making the compiler believe the object file is present |
21:50:05 | * | irrequietus quit () |
21:51:26 | * | kier_ quit (Quit: Reconnecting) |
21:51:44 | krux02 | elrood: yes there are sha1 files, how did they get there? |
21:52:01 | * | kier joined #nim |
21:55:23 | elrood | don't ask me, maybe the object files got deleted somehow. sounds like it's worthy of a bug report anyhow, the compiler shouldn't rely on a hashfile's presence alone |
22:04:04 | elrood | uh, it's even worse. the hashfile is generated even if the source file's compilation fails |
22:06:27 | elrood | so even if the source is fixed there won't be an attempt to compile it again, since the hashfile is present and nim's compiler just assumes the object file has already successfully been generated |
22:09:57 | krux02 | elrood: I think it should work like simple make: if object file is older than cpp => rebuild. No hash file generation. This is not perfect, since the object file does not depend on once source file alone, but it is at least a widely known behavior for c/c++ programmers. |
22:13:11 | elrood | actually, forget what i just said last, either the compiler is acting inconsistently or my not being entirely sober is the problem here. i'd be willing to admit it might be the latter |
22:19:09 | * | desophos_ is now known as desophos |
22:26:38 | krux02 | elrood: for the moment -> rm -f nimcache/*.sha1 && nim c myfile.nim does the trick |
22:28:25 | elrood | yep. i'd still file a bug report for that, the compiler just relying on the existence of a hashfile is quite obviously insufficient |
22:38:23 | * | izi quit (Quit: Leaving) |
22:40:18 | * | rusua joined #nim |
22:50:41 | * | cheatfate_ joined #nim |
22:50:41 | * | cheatfate quit (Read error: Connection reset by peer) |
22:52:16 | * | couven92 quit (Quit: Shutting down . . .) |
22:56:51 | * | Matthias247 quit (Read error: Connection reset by peer) |
22:58:46 | * | rusua quit (Ping timeout: 244 seconds) |
23:07:14 | * | fredrik92 quit (Quit: Shutting down...) |
23:10:04 | * | Jessin quit (Quit: Leaving) |
23:10:51 | * | Amrykid2 is now known as Amrykid |
23:10:59 | * | Amrykid quit (Changing host) |
23:10:59 | * | Amrykid joined #nim |
23:13:00 | * | cheatfate_ is now known as cheatfate |
23:15:54 | * | gokr quit (Ping timeout: 250 seconds) |
23:34:58 | Varriount | Anyone have a good prefix/suffix for string/sequence procedures that mutate their argument in-place? |
23:38:31 | krux02 | Varriount, if you have verbs, you can use present and past form of them |
23:40:32 | krux02 | alternatively I can recomment the wor inplace as prefix, it's easy to understand |
23:42:23 | * | Varriount quit (Disconnected by services) |
23:42:23 | * | Varriount_ joined #nim |
23:52:27 | * | darkf joined #nim |
23:53:37 | * | elrood quit (Quit: Leaving) |