00:11:16 | * | gokr quit (Ping timeout: 256 seconds) |
00:13:48 | * | yglukhov quit (Remote host closed the connection) |
00:20:40 | * | mat4 quit (Quit: Leaving) |
00:24:03 | * | Matthias247 quit (Quit: Matthias247) |
00:30:41 | * | Subspice quit (Remote host closed the connection) |
00:48:27 | * | NimBot joined #nim |
01:16:47 | * | pregressive joined #nim |
01:17:24 | * | darkf_ joined #nim |
01:19:02 | * | darkf quit (Ping timeout: 250 seconds) |
01:20:20 | * | filwit_ quit (Quit: Leaving) |
01:20:32 | * | darkf_ is now known as darkf |
01:24:15 | * | jaco60 quit (Ping timeout: 240 seconds) |
01:32:12 | awsteele | i'm trying to put a StringTableRef into the field of a JsonNode, but i think i might be missing something obvious |
01:33:01 | awsteele | Error: type mismatch: got (StringTableRef) but expected one of: json.%(keyVals: openarray[tuple[key: string, val: JsonNode]]) |
01:33:49 | awsteele | I assume that StringTableRef isn't implicitly convertible to the openarray of tuples that json.% expects, but is there an idiomatic way to do it? otherwise i loop over the string table and insert the nodes one by one |
01:43:15 | def- | awsteele: I guess that's the idiomatic way |
01:43:41 | awsteele | Hm, I was hoping there might be something involving sequtils.map or sequtils.toSeq |
01:46:17 | * | pregressive quit () |
01:47:37 | * | pregressive joined #nim |
01:53:30 | * | pilne joined #nim |
02:02:55 | * | dorei joined #nim |
02:04:29 | * | vendethiel joined #nim |
02:05:47 | * | alexsystemf joined #nim |
02:23:59 | dorei | am i free to use whatever number of spaces i wish for indentation? |
02:24:14 | def- | dorei: 2 is recommended, 4 is pretty common as well |
02:26:29 | dorei | thanx :) |
02:26:54 | * | vendethiel quit (Ping timeout: 272 seconds) |
02:33:36 | * | darkf_ joined #nim |
02:34:15 | * | darkf quit (Ping timeout: 260 seconds) |
02:34:19 | * | darkf_ is now known as darkf |
02:54:32 | * | apotheon quit (Ping timeout: 252 seconds) |
02:57:06 | Varriount | ldlework: Any progress in reducing the number of string copies? |
02:59:59 | * | apotheon joined #nim |
03:12:28 | Varriount | Araq: What does the 'merge' pragma do? |
03:14:16 | ldlework | Varriount: why can't I view source-code in kcachegrind? |
03:14:30 | ldlework | "This is because no debug information is present." |
03:14:37 | ldlework | I'm not compiling with -d:release |
03:14:39 | ldlework | so what gives |
03:14:51 | Varriount | ldlework: No idea. Did you try '--debug:native'? |
03:15:01 | * | Druage joined #nim |
03:15:20 | Druage | how would one copy a "string" into a "cstring"? |
03:15:30 | Druage | i tried using copyMem() |
03:15:34 | ldlework | Varriount: to what? nim? |
03:15:49 | Druage | but it expects a pointer to the source and destination string |
03:15:54 | Druage | and string in nim are gc'd |
03:16:00 | Druage | so i can't get the address |
03:16:05 | Varriount | druage: Is the cstring from an outside source? |
03:16:12 | Varriount | Druage: Could you post your code? |
03:16:18 | Varriount | ldlework: Yes. |
03:16:26 | ldlework | Varriount: that's not a valid commandline option |
03:16:34 | Druage | i should explain myself more, but ill show ya a code example |
03:16:51 | Varriount | ldlework: Woops, try '--debugger:native' |
03:17:34 | ldlework | no luck |
03:17:49 | Druage | http://pastebin.com/zXf4BwjJ |
03:17:51 | Varriount | ldlework: Hm. Let me see if I can get kcachegrind working on windows. |
03:18:05 | Druage | "Game" a custom type that i made |
03:18:20 | Druage | what im trying to do is the nim program is made into a dynlib |
03:18:27 | Druage | so it's loaded and run in c |
03:18:44 | Druage | im trying to display a cstring from nim into c |
03:18:51 | Varriount | Druage: Ah. |
03:18:58 | Druage | but sometimes the gc kills my strings |
03:19:07 | Varriount | Druage: First off, are you allocating the cstring? |
03:19:18 | Druage | i am not yet |
03:19:56 | Druage | using "alloc()" right? |
03:20:40 | Druage | if i do "var cstr: cstring = "Hello World" would this cause trouble? |
03:20:59 | Druage | im thinking it might |
03:22:23 | Varriount | Druage: Is the Game object a reference? |
03:22:38 | Varriount | Er, Game type a reference or an object type. |
03:23:04 | Druage | object |
03:23:33 | Druage | heres the whole file http://pastebin.com/vV7gRnTc |
03:24:25 | Druage | line 48 is the copyMem |
03:24:42 | Druage | line 61 is where i assign values to the cstrings |
03:24:47 | Druage | not sure if its valid though |
03:24:57 | Druage | im thinking i may be getting pointers to gc'd strings |
03:25:02 | Varriount | Druage: I'll go through it. |
03:25:13 | Druage | ty |
03:30:56 | Varriount | Druage: Would the C code be allocating the game object? |
03:31:01 | Druage | no |
03:31:22 | Varriount | Druage: Would it be deallocating the game object? |
03:31:26 | Druage | n |
03:31:28 | Druage | no |
03:31:43 | Druage | http://pastebin.com/pBAEzuh7 |
03:31:49 | Druage | that's the main export file |
03:31:53 | Druage | that wraps the game object |
03:36:51 | * | dorei quit () |
03:40:17 | ldlework | Varriount: it looks like I create a sequence for each tile on the map |
03:40:27 | ldlework | which is just something I kinda have to do algorithmically |
03:40:32 | ldlework | wonder how it could be optimized... |
03:40:43 | Varriount | ldlework: Well, can you re-use the sequences at all? |
03:41:00 | ldlework | Varriount: https://github.com/dustinlacewell/dadren/blob/master/dadren/generators.nim#L90 |
03:41:35 | Varriount | Druage: I can show you a trick, if you don't mind slightly increased structure size. |
03:41:50 | Druage | doesnt matter to me, im all for learning |
03:42:01 | Druage | hit me! |
03:43:32 | * | pilne loads up the bfg9k |
03:45:05 | Druage | :| |
03:45:12 | Druage | im scurred |
03:52:29 | Varriount | Druage: Sorry, just adding some explanation |
03:52:35 | Druage | its fine brother |
03:52:35 | Varriount | Druage: Plus doing other things |
03:52:40 | Druage | true that |
03:53:50 | Druage | i just moved to doing manual alloc calls |
03:54:09 | ldlework | Varriount: wowwwww it goes so much faster now |
03:54:21 | ldlework | but now I get periodic 1-2 second pauses |
03:54:27 | ldlework | gc cleanup? |
03:55:11 | ldlework | I doubt kcachegrind is going to tell me where my gc deallocations are coming from |
03:59:11 | * | pregress_ joined #nim |
03:59:11 | * | pregressive quit (Read error: Connection reset by peer) |
04:01:36 | Varriount | Druage: https://gist.github.com/Varriount/3838821683215f516e98 |
04:01:47 | Varriount | Druage: Sorry for the wait, I had to test to make sure I did things right. |
04:01:59 | Varriount | It wouldn't be nice for me to give you a broken example. |
04:02:18 | Varriount | ldlework: The GC is run on allocation. |
04:02:27 | Varriount | Or when the gc collection procedure is called. |
04:02:34 | ldlework | Varriount: why would it get super busy ever few seconds |
04:02:39 | ldlework | for like more than a second |
04:02:49 | Varriount | ldlework: You can specify realtime mode, that might help. |
04:03:08 | Varriount | http://nim-lang.org/docs/gc.html |
04:04:02 | Varriount | ldlework: Again, profiling will help. I'm still trying to get kcachegrind up and running. |
04:04:14 | Druage | Varriount: the cstrings look like they aren't being copied though, seems like they're referencing a gc'd string |
04:04:21 | Varriount | Druage: Yep! |
04:05:09 | Varriount | Druage: The problem with using Nim strings directly in C is that a pointer to a Nim string is the length, then the capacity, then the string data. |
04:05:38 | Varriount | A nim cstring is essentially a ptr char |
04:05:46 | Druage | right its char * |
04:06:09 | Varriount | cstring(someNimString) is the same as `addr(someNimString[0])` |
04:06:23 | Druage | wouldnt this be the safest way? http://pastebin.com/E6zs5HJ9 |
04:06:29 | Druage | where it copies over the chars |
04:06:50 | * | kulelu88 quit (Quit: Leaving) |
04:07:08 | Varriount | Druage: Yes, it is. |
04:07:16 | Druage | gothca |
04:08:23 | Druage | ahh now it works! |
04:08:23 | Varriount | Druage: It's a tradeoff - if your strings are pretty much unchanging, and the Game object is going to deallocate the string objects anyway, why not let the GC do it for you? |
04:08:46 | Druage | well |
04:08:47 | Varriount | With that design, as soon as the Game object is collected, the strings will be collected too. |
04:08:55 | Druage | thats true |
04:09:10 | Druage | but that also means i have to duplicate every cstring entry with a string |
04:09:25 | Varriount | Druage: You can also automate it with the `.` procedure |
04:09:39 | Druage | hmm |
04:09:44 | Varriount | http://nim-lang.org/docs/manual.html#special-operators-dot-operators |
04:10:08 | Druage | hmm |
04:10:34 | Varriount | ldlework: It's odd that you're getting pauses when the number of allocations has decreased. |
04:12:09 | Varriount | Druage: What exactly do you want the C code to be able to do with the Game object? |
04:12:31 | Druage | im making targetting a game api |
04:12:34 | Druage | ugh |
04:12:43 | Druage | im targeting a game api |
04:12:49 | Druage | so the c file will call |
04:13:03 | Druage | retro_run() |
04:13:12 | Druage | and it will spit out video game frames |
04:13:14 | Druage | and audio frames |
04:13:29 | Druage | 1xframe per retro_run call |
04:14:08 | Druage | ill pass c a raw array of video data |
04:14:15 | Druage | along with an audio buffer |
04:14:28 | Druage | the c program then displays it onscreen |
04:15:15 | Varriount | Druage: So is retro_load_game being passed a cstring? |
04:15:26 | Druage | it is now ya |
04:15:48 | Varriount | Druage: Is there a full API specification somewhere? |
04:15:53 | Druage | ya |
04:15:55 | ldlework | Varriount: Yeah the map generates pretty quickly now but I get large pauses periodically |
04:16:00 | Druage | https://github.com/libretro/RetroArch/blob/master/libretro.h |
04:16:36 | Druage | you just output the raw data and the frontend handles displaying it and outputting it to speakers |
04:16:39 | Varriount | ldlework: Odd. If you look at that link I posted, you can set the max pause time, which should help. |
04:16:51 | ldlework | Varriount: I did that does not stop the pauses |
04:17:21 | Varriount | ldlework: Then you must be allocating or deallocating a large chunk of data, or the cycle collector is kicking in. |
04:17:37 | ldlework | Varriount: no luck setting up kcachegrind? |
04:17:38 | Varriount | ldlework: What happens when disable the cycle collector? |
04:17:42 | ldlework | how? |
04:17:57 | ldlework | ah |
04:18:53 | Varriount | ldlework: I'd rather compile from source. The only kcachegrind binary I can find is on sourceforge, and it's 3 years old. |
04:20:44 | ldlework | disabling mark and sweep doesn't prevent the hiccups |
04:22:38 | Varriount | ldlework: Goodnes gracious, what is your program doing? |
04:23:46 | ldlework | so disabling mark and sweep is bad since it just uses up all your memory lol |
04:23:53 | Varriount | ldlework: You could try disabling the GC altogether, and see if the hiccups go away. That would at least indicate whether it's allocation or deallocation. |
04:23:54 | Druage | is there a resource to view what types nim comes with, such as all the int types |
04:23:56 | ldlework | but I guess my program does tons of allocations and deallocations |
04:24:01 | Druage | like uintptr_t |
04:24:05 | ldlework | because it uses up all of my memory very fast |
04:24:10 | ldlework | if I scroll the map for about 2 minutes |
04:24:13 | Varriount | http://nim-lang.org/docs/system.html |
04:24:14 | ldlework | I'm out of memory |
04:24:22 | Druage | ty |
04:24:34 | Varriount | ldlework: Wait, did you disable just the cycle detector, or the entire GC? |
04:24:48 | ldlework | GC_setMaxPause(500) |
04:24:49 | ldlework | GC_disableMarkAndSweep() |
04:25:48 | ldlework | when the pause happens |
04:25:53 | ldlework | my whole computer is kinda frozen |
04:25:57 | ldlework | can't switch virtual windows, etc |
04:27:12 | ldlework | I'm starting to think it is the way my mainloop is setup... |
04:27:30 | Varriount | ldlework: What about when you disable the GC entirely? |
04:28:12 | ldlework | Varriount: same behavior so I think something is happening to cause me to process many many many frames very fast in a single frame |
04:28:17 | Varriount | ldlework: Ok, I think I got kcachegrind running. |
04:28:19 | ldlework | nice |
04:28:25 | ldlework | let me commit |
04:28:39 | Varriount | ldlework: Surprisingly, KDE has a windows installer. |
04:28:52 | Varriount | And it doesn't download yet another version of GCC/MinGW |
04:29:31 | ldlework | Varriount: https://github.com/dustinlacewell/dadren |
04:29:41 | ldlework | there is a build.sh script in examples/hatchet |
04:29:45 | ldlework | but you'll need to adapt it to windows |
04:29:50 | ldlework | I haven't learned nimscript yet |
04:31:32 | ldlework | Varriount: I just pushed another commit |
04:31:35 | Varriount | ldlework: Oh, wait. I just found out that valgrind isn't avialable for Windows... |
04:31:38 | ldlework | to use a fixed timestamp |
04:31:41 | ldlework | doh |
04:31:58 | Varriount | I'll see if I can find a substitute |
04:35:22 | ldlework | no joke but my computer makes a whining sound when I have the nim app up |
04:36:01 | * | endragor joined #nim |
04:36:40 | ldlework | and when the pause in the program happens |
04:36:45 | ldlework | the whining sound in my laptop also pauses |
04:37:26 | ldlework | and when it pauses |
04:37:37 | ldlework | my memory usage goes visibly up |
04:37:52 | ldlework | what the hell could I be doing so wrongly |
04:38:30 | Varriount | ldlework: You're allocating a 1GB array? |
04:38:35 | ldlework | what |
04:38:36 | ldlework | ? |
04:38:41 | Varriount | I dunno, I'm guessing. |
04:38:48 | ldlework | lol |
04:38:50 | ldlework | jesus |
04:38:52 | Varriount | I found a profiler, from AMD of all things |
04:40:26 | ldlework | I'm wondering how a profiler is gonna help |
04:42:55 | * | pilne quit (Quit: Quitting!) |
04:43:15 | ldlework | Varriount: are you able to run the example? |
04:43:24 | Varriount | Working on compiling it. |
04:45:46 | Varriount | ldlework: Does this require anything besides the standard library? |
04:46:13 | Varriount | Druage: Everything alright? |
04:46:40 | ldlework | Varriount: if clock |
04:46:42 | ldlework | oops |
04:46:52 | ldlework | nimble install random csfml perlin sdl2 |
04:46:55 | ldlework | not csfml |
04:47:14 | Druage | ya Varriount its all good in da hood |
04:47:26 | Druage | just working on doing some more callbacks |
04:52:57 | Varriount | ldlework: It's working! |
04:53:46 | Varriount | And I have the pause issues |
04:55:15 | ldlework | nice |
04:56:35 | ldlework | one interesting thing I see is |
04:56:40 | ldlework | when I ran the program for 20 frames |
04:56:51 | ldlework | it shows yeah, the top level routine was called 20 times |
04:56:59 | ldlework | but the inner functions are called like 75k times |
04:57:07 | ldlework | I know there are a lot of tiles on the screen |
04:57:18 | ldlework | but I wonder if its really that many or if we're rendering to many times sometimes |
04:57:43 | ldlework | I just don't see any glaring logical errors where I would be, sometimes, rendering a few extra hundred times or whatever |
04:58:30 | Varriount | ldlework: Are you sure the error isn't in a library you're calling? |
04:58:48 | ldlework | Varriount: there is no error |
04:58:55 | ldlework | and I have no idea what's causing the pauses at all |
04:58:55 | Varriount | Well, a problem then. |
04:59:00 | ldlework | and if you have a resource viewer |
04:59:04 | ldlework | you will see each time it pauses |
04:59:08 | ldlework | your memory usage goes up visibly |
04:59:36 | * | darkf quit (Ping timeout: 250 seconds) |
04:59:59 | * | darkf joined #nim |
05:03:05 | ldlework | okay I think my suspcions that I was rendering multiple frames is wrong |
05:03:08 | ldlework | the math checks out |
05:03:20 | ldlework | I really am just rendering 79 * 44 tiles |
05:03:37 | Varriount | ldlework: Are you deallocating parts of the map at all? |
05:03:43 | ldlework | no |
05:03:53 | ldlework | that doesn't explain why memory usage goes up during pauses |
05:04:05 | ldlework | memory should go up linearly as you scroll right |
05:04:08 | Varriount | The memory is doubling each time there's a pause, which points to some sort of resizing. |
05:04:10 | ldlework | not magically all at once |
05:04:14 | ldlework | interesting |
05:04:17 | Varriount | Are you using a table? |
05:04:18 | ldlework | Varriount: the table! |
05:04:21 | ldlework | yes |
05:04:28 | ldlework | the map is broken into chunks |
05:04:38 | ldlework | the map is a table of (int int) to chunk |
05:04:43 | ldlework | and a chunk is essentially its own table |
05:04:44 | * | darkf_ joined #nim |
05:04:45 | * | darkf quit (Ping timeout: 260 seconds) |
05:04:48 | ldlework | for (int, int) |
05:04:52 | ldlework | -> tile |
05:05:30 | Varriount | ldlework: Well, you could try relegating allocation to a background thread. |
05:05:59 | ldlework | Or do something more better than just unchecked table use? |
05:06:17 | Varriount | ldlework: A linked list might work, at least for allocations. |
05:06:25 | Varriount | Or you could deallocate chunks. |
05:06:28 | ldlework | like once there are N tables start deallocating the chunks that are furthest away |
05:06:32 | ldlework | N chunks |
05:06:34 | ldlework | * |
05:06:47 | Varriount | ldlework: Like every other infinite terrain based game. |
05:06:49 | ldlework | Varriount: have you ever done any game programming? |
05:07:09 | ldlework | Varriount: also can I make a bigger table ahead of time? |
05:07:24 | Varriount | ldlework: The most I've done is programming for a completely custom server for minecraft. |
05:07:59 | Varriount | ldlework: Again, you can try allocating the needed data in another thread, but there is still going to be contention. |
05:08:26 | ldlework | Varriount: this game is turnbased and you'll never be zooming around generating content at this speed |
05:08:31 | ldlework | haha we're way over optimizing I think |
05:08:45 | ldlework | but I do need to deallocate based on range for sure |
05:09:01 | ldlework | Or maybe keep another queue |
05:09:13 | ldlework | wait no distance is the right way to go |
05:09:29 | ldlework | Varriount: the generation is so fast now though :D |
05:09:41 | Varriount | ldlework: Well, there's no public resize() method, however I'm sure that there's a private one. |
05:10:00 | * | darkf_ quit (Ping timeout: 260 seconds) |
05:10:14 | Varriount | ldlework: See what happens when you realize strings are copy-on-assignment? |
05:10:28 | ldlework | Varriount: I really appreciate you pushing me to look at it |
05:10:55 | Druage | Varriount: if you still have some time, how does one dereference a c ptr? |
05:10:59 | Varriount | Druage: You might want to take note of this fact: Strings and sequences are copy-on-assignment. The general rule is that the refcount to a string or sequence must always be 1 |
05:11:42 | Druage | gotcha |
05:11:50 | Varriount | Druage: The semantics can be changed by marking the sequence or string with the shallow() procedure, however using it means that the string or sequence must not be modified. |
05:12:10 | Druage | cool |
05:12:13 | Druage | ty |
05:12:16 | Varriount | Er, Strings or sequences marked with shallow() must not be modified. |
05:12:58 | Varriount | If you need them modifiable, use a string or sequence reference. |
05:13:20 | Varriount | ldlework: I still think that needs to be spelled in big, big letters somewhere. |
05:13:36 | Druage | i currently have a "pointer" so i casted that to the type i needed, but idk how to deref a "ptr" type and how to add data to it |
05:14:16 | Druage | like in c "int *a = 12" |
05:14:19 | Varriount | Druage: the 'pointer' type is equivalent to a void pointer. You must cast it using `cast[TargetType](pointerValue)` |
05:14:25 | Druage | i know |
05:14:31 | Druage | i mean "ptr" |
05:14:34 | Druage | i already casted it |
05:14:37 | Varriount | To dereference, use `[]` |
05:14:44 | Druage | like |
05:14:46 | Varriount | eg, MyPointer[] |
05:14:56 | Druage | MyPointer[] = 32? |
05:15:13 | Varriount | Or `theInteger = pointerToInteger[]` |
05:15:18 | * | darkf joined #nim |
05:15:51 | Varriount | Druage: ^ |
05:16:01 | Druage | what? |
05:16:24 | Varriount | So, `myInteger = cast[ptr int](voidPointer)[]` |
05:18:01 | Druage | http://pastebin.com/b582Dfe1 |
05:18:09 | Druage | your saying like that? |
05:19:18 | Druage | assume i meant "ptr int" lol |
05:19:22 | Druage | i changed it |
05:19:24 | Varriount | Druage: Uh, that won't assign '5' to the pointer. |
05:19:36 | Druage | right |
05:19:40 | Druage | im not sure how to assign it |
05:19:55 | Druage | o |
05:20:12 | Druage | hm |
05:20:18 | Varriount | Same way, I think. |
05:20:26 | Druage | var fmt = ( cast[ptr int]( data ) )[] |
05:20:29 | Druage | thats how you do it |
05:20:36 | Druage | then you can just do "fmt = 2" |
05:20:56 | Varriount | Uh... |
05:21:17 | Druage | oh wait that copies it |
05:22:01 | Druage | why is to so confusing lol |
05:22:29 | Druage | var fmt: ptr PixelFormat = cast[ptr PixelFormat]( data ) |
05:22:33 | Druage | fmt[] = XRGB8888 |
05:22:34 | Druage | there |
05:22:36 | Druage | that looks right |
05:22:38 | Varriount | Yes. |
05:22:46 | Varriount | Be right back. |
05:22:49 | Druage | kk |
05:23:06 | Druage | i wish there was just a deref proc |
05:23:07 | Druage | like |
05:23:14 | Druage | deref(fmt) = 2 |
05:23:33 | Druage | or just stick with . operator |
05:25:00 | * | s4 joined #nim |
05:32:28 | awsteele | is there a way to silence the nim compiler output when doing "nim c -r mynimfile.nim"? i am already doing 2>/dev/null, but it's still prepending "CC: stdlib_json" etc to the stdout |
05:35:07 | awsteele | it seems the answer might be "--verbosity:0" |
05:41:15 | Varriount | back. |
05:42:32 | Varriount | Druage: The `()` and `.` operators will usually dereference automatically, though they might only do that for references. |
05:42:45 | Druage | i think its just for refs |
05:43:20 | Varriount | template deref(x: untyped): untyped = x[] |
05:43:30 | Varriount | Druage: That might work. |
05:43:54 | Druage | ill see |
05:45:06 | Varriount | Druage: Tell me if it works. |
05:45:09 | Druage | kk |
05:47:29 | ldlework | how is it possible that tables.items is not found? https://gist.github.com/dustinlacewell/d218425f1504faaddd93 |
05:47:33 | ldlework | its imported right at the top? |
05:49:33 | ldlework | totally stumped |
05:49:52 | Druage | Varriount: it works |
05:49:59 | Druage | pretty cool |
05:50:02 | Varriount | ldlework: Uh... Wow, that might be a bug. |
05:50:05 | Druage | looks much better than [] operator |
05:50:30 | ldlework | :((((( |
05:50:58 | Varriount | Druage: If you want multi-dereferecing, you'll need to use a macro instead of a template (or just use `deref(deref())` ) |
05:51:09 | Varriount | ldlework: That might be a bug. |
05:51:11 | Druage | gotcha |
05:51:17 | ldlework | you said that :D |
05:51:24 | Varriount | Oh. |
05:52:13 | Varriount | ldlework: Hm. Have you tried a direct 'tables.items()'? |
05:52:30 | ldlework | undeclared identifier: 'items' |
05:52:36 | Druage | Varriount: you can make it even hackier if you exchange "deref" |
05:52:39 | Druage | for "*" |
05:52:45 | Druage | brings me right back to c |
05:52:46 | Druage | lol |
05:53:00 | Varriount | Druage: http://nim-lang.org/docs/manual.html#iterators-and-the-for-statement-implict-items-pairs-invocations |
05:53:03 | Varriount | Woops |
05:53:06 | Varriount | ldlework: http://nim-lang.org/docs/manual.html#iterators-and-the-for-statement-implict-items-pairs-invocations |
05:53:18 | ldlework | Varriount: I did tables.items directly |
05:53:24 | Druage | lol |
05:53:26 | Druage | was ganna say.. |
05:53:26 | Varriount | Druage: That's asking for trouble with the compiler. |
05:53:28 | Druage | idk what that sfor |
05:53:32 | Druage | Varriount: i know lo |
05:53:51 | ldlework | I did, from tables import items, Table |
05:53:58 | ldlework | and got, Error: undeclared identifier: 'items' |
05:54:00 | ldlework | on that line |
05:54:02 | ldlework | wtfff |
05:54:17 | Varriount | ldlework: I mean, doesn't the 'for' loop call items already? |
05:54:40 | ldlework | Varriount: look at what I just said |
05:55:01 | ldlework | importing items from tables doesn't work |
05:55:15 | ldlework | lo |
05:55:33 | ldlework | what could be happening I wonder |
05:55:54 | ldlework | Varriount: oh right |
05:56:01 | ldlework | for tables its spelled `keys` |
05:56:07 | Varriount | -_- |
05:56:09 | ldlework | this isn't python :( |
05:56:59 | ldlework | also I do |
05:57:00 | ldlework | dy = pow((coord.y - pos.y), 2) |
05:57:02 | ldlework | and get |
05:57:07 | ldlework | type mismatch: got (int, int literal(2)) |
05:57:09 | ldlework | lol what |
05:58:11 | Varriount | ldlework: Is the target variable an int? |
05:58:19 | ldlework | yes. |
05:58:21 | Varriount | pow() takes 2 floats, and returns a float. |
05:58:24 | ldlework | so? |
05:58:26 | * | pregress_ quit (Remote host closed the connection) |
05:58:28 | ldlework | that's a horrible error message |
05:58:34 | ldlework | is if the reason is that the target is an int |
05:58:48 | ldlework | why would it suddently interpret the call as passing 3 ints |
05:58:54 | ldlework | when that is just not even what it parses as |
05:59:00 | Varriount | ldlework: Code and error message? |
05:59:05 | ldlework | I just pasted |
05:59:14 | ldlework | dy = pow((coord.y - pos.y), 2) |
05:59:20 | ldlework | type mismatch: got (int, int literal(2)) |
05:59:27 | ldlework | oh it is |
05:59:28 | ldlework | I see |
05:59:31 | ldlework | sorry |
05:59:34 | ldlework | misread |
05:59:42 | ldlework | I injected another comma with my eye |
06:01:20 | * | lompik quit (Ping timeout: 260 seconds) |
06:03:34 | Varriount | ldlework: I wonder if tables are the most efficient way... Well, since this is a turn based game, that shouldn't matter too much. |
06:12:34 | * | awsteele quit (Quit: My Mac has gone to sleep. ZZZzzz…) |
06:14:52 | ldlework | Varriount: I'm del'ing from a table and somehow the items are not going away |
06:15:02 | ldlework | making me think I'm copying my entire god damn tilemap somewhere |
06:15:12 | ldlework | its a ref object though :( |
06:16:59 | * | Druage quit (Quit: Page closed) |
06:17:20 | ldlework | Varriount: if my tilemap is a ref object and its field is a TableRef, then passing it doesn't copy it right? |
06:18:27 | Varriount | ldlework: It shouldn't, not unless you're using deepcopy or something. |
06:19:12 | ldlework | if I do |
06:19:15 | ldlework | camera.map.chunks = newTable[Point, Chunk]() |
06:19:17 | ldlework | everytime the camera moves |
06:19:27 | ldlework | you can see it regenerate a whole new world each time you move |
06:19:34 | ldlework | but the memory also goes through the roof |
06:23:12 | Varriount | Well, yes, because you're creating a new table. |
06:23:35 | ldlework | yes but it should delete the old one |
06:24:12 | Varriount | Try calling the gc collection procedure and see if that does it. |
06:54:51 | * | yglukhov joined #nim |
07:10:21 | * | yglukhov quit (Remote host closed the connection) |
07:38:22 | * | Varriount quit (Disconnected by services) |
07:38:23 | * | Varriount_ joined #nim |
07:42:06 | * | federico3 quit (Ping timeout: 250 seconds) |
07:44:31 | * | ekarlso quit (Ping timeout: 276 seconds) |
07:44:36 | * | bbl_ quit (Ping timeout: 256 seconds) |
07:45:05 | * | federico3 joined #nim |
07:45:10 | * | Wildefyr quit (Ping timeout: 276 seconds) |
07:46:12 | * | bbl_ joined #nim |
07:47:54 | * | Wildefyr joined #nim |
07:52:27 | * | yglukhov joined #nim |
07:59:07 | * | ekarlso joined #nim |
07:59:24 | * | pregressive joined #nim |
08:04:25 | * | pregressive quit (Ping timeout: 260 seconds) |
08:04:49 | * | gokr joined #nim |
08:07:32 | * | wuehlmaus quit (Quit: Lost terminal) |
08:12:58 | * | Trustable joined #nim |
08:15:58 | * | gokr quit (Quit: Leaving.) |
08:23:38 | * | endragor quit (Remote host closed the connection) |
08:39:40 | * | endragor joined #nim |
08:47:05 | * | toaoMgeorge joined #nim |
08:52:04 | * | vendethiel joined #nim |
08:54:34 | * | gokr joined #nim |
09:03:52 | * | \u quit (Remote host closed the connection) |
09:04:56 | * | ray joined #nim |
09:05:12 | * | ray is now known as Guest8185 |
09:08:29 | * | awsteele joined #nim |
09:08:50 | * | Guest8185 is now known as \u |
09:08:57 | * | filcuc joined #nim |
09:09:02 | * | \u quit (Changing host) |
09:09:02 | * | \u joined #nim |
09:13:51 | * | coffeepot joined #nim |
09:16:53 | * | coffeepot quit (Client Quit) |
09:17:11 | * | coffeepot joined #nim |
09:18:12 | * | coffeepot quit (Client Quit) |
09:18:18 | * | vendethiel quit (Ping timeout: 250 seconds) |
09:18:34 | * | coffeepot joined #nim |
09:22:55 | * | coffeepot quit (Client Quit) |
09:23:14 | * | coffeepot joined #nim |
09:26:35 | * | yglukhov quit (Remote host closed the connection) |
09:37:54 | * | yglukhov joined #nim |
09:38:55 | * | jaco60 joined #nim |
09:40:29 | * | endragor quit (Remote host closed the connection) |
09:43:05 | * | endragor joined #nim |
09:46:21 | yglukhov | Araq: --out and --nimcache cmdline options seem to be relative to input nim file. is this intended or a bug? |
09:57:04 | * | wuehlmaus joined #nim |
09:58:10 | * | darkf quit (Quit: Leaving) |
09:58:58 | * | awsteele quit (Quit: My Mac has gone to sleep. ZZZzzz…) |
10:00:13 | * | pregressive joined #nim |
10:03:45 | wuehlmaus | what's the proc to test if a var is set: i thought that would be defined but the output is not what i thought it would be |
10:04:33 | * | pregressive quit (Ping timeout: 240 seconds) |
10:09:28 | * | Demon_Fox quit (Quit: Leaving) |
10:10:00 | Araq | yglukhov: intended |
10:12:37 | flyx | wuehlmaus: if you want to check if a var name is defined, you'd probably need to use "when compiles(varname):" |
10:13:56 | flyx | wuehlmaus: ah no, there is declared which does what you want |
10:14:11 | wuehlmaus | flyx: oh, nice, thanks for the prompt answer |
10:14:25 | wuehlmaus | the more i know of nim the happier i get :) |
10:14:33 | * | x86128 joined #nim |
10:14:53 | flyx | I wonder why both defined and declared have magic: "Defined" |
10:18:33 | Araq | flyx: historical baggage. adding a new magic often causes bootstrapping problems |
10:19:49 | flyx | ah okay |
10:20:32 | yglukhov | Araq: please see https://github.com/nim-lang/Nim/issues/3871. theres definitely a bug there. |
10:21:07 | yglukhov | also "intended" doesnt sound like conventional and intuitive behavior ;) |
10:24:02 | Araq | so should it be relative to the current dir instead? |
10:24:07 | yglukhov | yup |
10:24:11 | yglukhov | or absolute |
10:24:35 | yglukhov | and as far i'm seeing from code outFile is going along with prependCurDir, which looks correct... |
10:24:36 | Araq | absolute starts with / |
10:24:41 | yglukhov | yup |
10:25:06 | Araq | ok, fix it then but check the status of the other "path handling" tagged bugs please |
10:25:43 | Araq | and document the change in news.txt |
10:26:02 | Araq | it's annoying people don't think about news.txt |
10:26:43 | yglukhov | alright |
10:30:18 | * | vendethiel joined #nim |
10:31:26 | * | jaco60 quit (Quit: Leaving) |
10:37:19 | dom96 | Araq: Simply tell people to update news.txt when reviewing PRs |
10:37:32 | Araq | often i do that, dom96 |
10:37:36 | Araq | sometimes I forget it |
10:38:26 | dom96 | yglukhov: I replied to that issue with a related bug. Would be awesome if you fixed it, especially since my book mentions the `-o` flag and explains that it works in the way you described. |
10:39:02 | yglukhov | yeah, i just also found that. ill try to fix it now. |
10:48:16 | * | arnetheduck joined #nim |
10:52:56 | * | vendethiel quit (Ping timeout: 272 seconds) |
11:29:46 | * | x86128 quit (Quit: Page closed) |
11:31:28 | * | gokr quit (Quit: Leaving.) |
11:31:31 | * | gokr1 joined #nim |
11:36:21 | Varriount_ | ldlework: The table's deletion code seems to work fine. |
11:38:07 | Varriount_ | ldlework: I wrote a quick simulation of what your program does (move a position around randomly, add chunks to the table in a range around the position, cull the rest) |
11:38:21 | Varriount_ | ldlework: And I'm not seeing any abnormal memory usage. |
11:48:26 | Varriount_ | Araq: What do you think of adding link time optimization to the default release build? |
11:50:04 | Araq | why isn't that already the default with -O3 ? |
11:50:13 | Araq | I thought it would be. |
11:51:31 | Araq | we should also make profile guided optimization easier to use |
11:53:41 | * | vendethiel joined #nim |
11:59:58 | def- | Araq: Possible reasons: It's pretty new, so might be buggy, and takes a long time to compile, so should be considered closely |
12:00:12 | def- | from what I can tell compile time increases by a factor of 2 to 5 |
12:00:40 | Araq | def-: well it's a release build... seems acceptable |
12:01:07 | * | pregressive joined #nim |
12:01:18 | def- | I'd be interested how much it speeds up programs, I guess I should play around with it |
12:05:50 | * | pregressive quit (Ping timeout: 256 seconds) |
12:08:02 | * | desophos_ joined #nim |
12:11:30 | * | desophos quit (Ping timeout: 256 seconds) |
12:22:00 | yglukhov | Araq, dom96: fixed the issue with --out and --nimcache. Unfortunately other path handling issues have nothing in common with my issue. |
12:23:46 | * | spt joined #nim |
12:24:49 | * | desophos_ quit (Read error: Connection reset by peer) |
12:27:16 | * | filcuc quit (Ping timeout: 248 seconds) |
12:28:28 | * | tyu joined #nim |
12:35:42 | * | toaoMgeorge quit (Ping timeout: 252 seconds) |
12:37:59 | * | vendethiel quit (Ping timeout: 264 seconds) |
12:39:08 | * | vendethiel joined #nim |
12:42:58 | * | filcuc joined #nim |
12:51:39 | * | toaoMgeorge joined #nim |
12:57:53 | * | endragor quit (Remote host closed the connection) |
12:58:22 | * | endragor joined #nim |
12:59:32 | * | endragor quit (Read error: Connection reset by peer) |
12:59:38 | * | endragor_ joined #nim |
13:02:23 | * | vendethiel quit (Ping timeout: 276 seconds) |
13:13:50 | * | toaoMgeorge quit (Ping timeout: 252 seconds) |
13:14:11 | * | toaoMgeorge joined #nim |
13:23:42 | * | yglukhov_ joined #nim |
13:23:42 | * | yglukhov quit (Read error: Connection reset by peer) |
13:30:01 | arnetheduck | in the nim compiler, there are two for loop types used, for i in 1..x and for i in countup(1, x) - any reason to use the latter? |
13:30:33 | arnetheduck | or the former for that matter ;) |
13:32:25 | Araq | arnetheduck: no. the only reason the compiler uses countup() is that pas2nim generated it rather than '..' |
13:32:33 | Araq | and perhaps '..' came later |
13:33:15 | arnetheduck | ah, ok.. been using .. but then I saw lots of countup, so thought there might be some advantage |
13:34:09 | def- | arnetheduck: countup can take a third parameter, the step |
13:42:04 | * | s4 quit (Quit: Konversation terminated!) |
13:44:47 | Araq | def-: `..`(a, b, step) could work too |
13:44:54 | Araq | dunno if .. supports it. |
13:45:07 | def- | nope, it doesn't |
13:48:05 | def- | and how would you invoke it with 3 arguments except `..`(1, 100, step=2)? |
14:02:01 | * | pregressive joined #nim |
14:06:43 | wuehlmaus | i think i saw 0..10..2 in another programming language |
14:06:47 | * | pregressive quit (Ping timeout: 264 seconds) |
14:09:56 | * | toaoMgeorge quit (Ping timeout: 256 seconds) |
14:10:18 | * | saml joined #nim |
14:12:19 | * | toaoMgeorge joined #nim |
14:15:18 | def- | wuehlmaus: 0,2..10 in Haskell, but I think countup is fine |
14:16:15 | wuehlmaus | i am not well in haskell but i think it was not haskell where i found it |
14:16:23 | Araq | def-: I would invoke it as you wrote. 0..10..3 would also be possible with the right set of overloaded stuff |
14:19:16 | * | vendethiel joined #nim |
14:25:45 | wuehlmaus | harhar, i should have known it as i am a shell guy. zsh has it |
14:26:22 | * | endragor_ quit (Remote host closed the connection) |
14:26:45 | wuehlmaus | e.g. for i in {1..10..2}; { echo $i } |
14:28:02 | * | BitPuffin joined #nim |
14:29:21 | gmpreussner_ | https://twitter.com/gmpreussner/status/699599283717349376 |
14:31:10 | coffeepot | wow, nice work gmpreussner_ |
14:31:36 | coffeepot | talk about quick on the case! :D |
14:32:41 | * | BitPuffin quit (Disconnected by services) |
14:32:43 | * | itPuffinB joined #nim |
14:34:01 | * | itPuffinB is now known as BitPuffin |
14:36:20 | * | nkr joined #nim |
14:37:47 | * | tyu quit (Quit: Connection closed for inactivity) |
14:40:42 | * | endragor joined #nim |
14:40:47 | flyx | now I just need a driver that supports Vulkan |
14:42:14 | * | vendethiel quit (Ping timeout: 256 seconds) |
14:44:59 | gmpreussner_ | coffeepot: yep, Nim should be the first language to have bindings (other than the C bindings shipping with the SDK) :) |
14:45:16 | gmpreussner_ | flyx: driver links are on the Khronos website |
14:45:41 | gmpreussner_ | all the major manufacturers will offer drivers. i'm using nVidia's right now. |
14:45:53 | gmpreussner_ | Android should have built-in support, but i haven't tested it yet |
14:46:17 | gmpreussner_ | haven't had time to test Linux either |
14:46:32 | flyx | is the API much different from OpenGL/OpenCL? |
14:46:46 | gmpreussner_ | yes |
14:46:57 | flyx | nice |
14:47:00 | * | M-Quora quit (Remote host closed the connection) |
14:47:03 | gmpreussner_ | much more low-level. it will take quite some effort to get started |
14:47:06 | flyx | anything that's different from OpenGL must be good |
14:47:09 | gmpreussner_ | but you have to do it only once |
14:47:30 | * | askatasuna quit (Ping timeout: 250 seconds) |
14:47:39 | flyx | what about languages? are there still shading language / OpenCL C |
14:47:42 | gmpreussner_ | the SDK sample to render a triangle is over 2000 lines of code ^^ |
14:47:51 | gmpreussner_ | they have SPIR-V now |
14:47:56 | gmpreussner_ | which is an intermediate binary shader language |
14:48:08 | gmpreussner_ | there will be compilers from other shading languages |
14:48:25 | flyx | so we can theoretically compile Nim to SPIR-V ^^ |
14:48:33 | gmpreussner_ | yes! |
14:48:38 | gmpreussner_ | i already talked to araq about that |
14:48:42 | flyx | that would be awesome |
14:48:54 | gmpreussner_ | indeed |
14:49:12 | flyx | has been a while since I've done graphics programming |
14:49:29 | flyx | khronos website doesn't seem to be available |
14:49:35 | gmpreussner_ | yeah, now is a good time to get started again |
14:49:49 | gmpreussner_ | their site probably got overwhelmed |
14:50:01 | flyx | last thing I did was writing an OpenGL/OpenCL wrapper for Ada |
14:50:49 | * | M-max joined #nim |
14:54:31 | * | lompik joined #nim |
14:56:58 | flyx | apparently, there hasn't been any confirmation that Apple will support Vulkan :/ |
14:59:16 | coffeepot | gmpreussner_ I didn't realise you were on the Epic team. It's fantastic to hear that Nim has industry game programmer supporters :) |
14:59:56 | gmpreussner_ | flyx: i doubt they will anytime soon. they're pushing Metal. |
14:59:57 | coffeepot | I only play gamedev atm but it's something I've always followed, and to me it definitely makes sense as a game writing language |
15:00:10 | gmpreussner_ | coffeepot: yeah, Nim is awesome. keeps me sane. |
15:00:43 | flyx | gmpreussner_: thought so. well then Vulkan doesn't seen an alternative for me |
15:03:05 | gmpreussner_ | i think they will have no choice but to support it eventually |
15:03:14 | gmpreussner_ | Vulkan runs pretty much everywhere else already |
15:03:50 | gmpreussner_ | Windows + Android + Linux + Tizen.... that in itself is pretty cool |
15:04:09 | gmpreussner_ | it covers a huge market. in a year from now, nobody is gonna use Metal, i think :) |
15:04:41 | flyx | since Apple is a Khronos Promoter, I also think that they will adopt it eventually |
15:08:30 | gmpreussner_ | i think both Metal (only Apple) and DirectX12 (only Windows 10) are doomed |
15:08:54 | gmpreussner_ | especially since all three are very similar, and Vulkan tries to improve on both |
15:09:52 | flyx | I don't have any insight in the gaming industry, but don't most developers rely on a few rendering engines, which support multiple backends (OpenGL/DirectX/...) anyway? |
15:30:31 | * | M-Quora joined #nim |
15:32:27 | * | M-max quit (Quit: node-irc says goodbye) |
15:34:28 | nsf | lol, guys you are quick |
15:34:31 | nsf | https://github.com/nimious/vulkan |
15:44:31 | * | pregressive joined #nim |
15:44:36 | * | pregressive quit (Remote host closed the connection) |
15:44:43 | wuehlmaus | Araq: how would i define a 1..10..2 range operator? |
15:45:10 | wuehlmaus | 1..10..2 as an example , of course |
15:45:18 | * | pregressive joined #nim |
15:48:17 | * | jaco60 joined #nim |
15:48:56 | reactormonk | wuehlmaus, with functions? make ..2 return a function etc. |
15:49:14 | reactormonk | basically take a look how nim compiles it via dumpTree |
15:49:24 | reactormonk | Or a template/macro. |
15:49:33 | reactormonk | ... and rewrite it to something you can handle. |
15:52:09 | wuehlmaus | reactormonk: yes, that's an area i did not study 'til now. i know about templates, but macros not so much. i knew about dumptree |
15:55:18 | * | M-Quora quit (Remote host closed the connection) |
16:01:01 | * | M-max joined #nim |
16:03:23 | * | gokr1 quit (Quit: Leaving.) |
16:05:41 | def- | wuehlmaus: even easier, 1..10 can be a slice |
16:07:40 | def- | wuehlmaus: so something like this (untested, look at system.nim's countup for how to do it properly): https://gist.github.com/def-/4ec0e315f6d74e64688b |
16:13:31 | * | spt quit (Quit: Page closed) |
16:14:38 | * | M-max quit (Remote host closed the connection) |
16:18:27 | * | M-max joined #nim |
16:18:40 | wuehlmaus | def-: very nice |
16:18:47 | * | shodan45 joined #nim |
16:18:52 | wuehlmaus | nim is so cool, i am amazed every time :) |
16:21:55 | shodan45 | yeah, but where is v1.0? ;) |
16:22:04 | shodan45 | kotlin just went 1.0 |
16:22:22 | shodan45 | sadly it primarily targets the JVM |
16:23:24 | shodan45 | maybe nim needs a corporate backer? :) |
16:30:33 | * | Demos joined #nim |
16:34:16 | * | vendethiel joined #nim |
16:42:01 | Araq | shodan45: throwing money at me wouldn't hurt |
16:42:33 | * | arnetheduck quit (Ping timeout: 240 seconds) |
16:43:20 | * | yglukhov_ quit (Remote host closed the connection) |
16:45:02 | * | yglukhov joined #nim |
16:48:04 | jsudlow | Hi @ll, does anyone know where to put .dll files that are used in nim programs on 64bit windows? I guess I'm trying to figure out the default search path nim uses when its looking for .dll's on windows 7 64 bit |
16:48:32 | def- | jsudlow: same directory as the exe should work |
16:48:43 | def- | I think that's what's commonly done on Windows. |
16:49:27 | def- | Generally it should be the same as for C programs, don't think Nim changes anything there (but not sure) |
16:50:28 | Araq | Nim doesn't change anything here. it's OS dependent |
16:50:38 | jsudlow | thanks def, I was just trying to get SDL2_ttf.dll to load |
16:52:21 | * | M-max quit (Remote host closed the connection) |
16:52:34 | jsudlow | when I place the .dll inthe directors it still wont load it, the last time I had this kind of issue it was beacuse i was using 32 bit .dll's with a 64 bit system |
16:53:26 | jsudlow | but I got the 64 bit in there, so if it still wont load maybe somethings wrong with the actual .dll still |
16:53:59 | def- | Or you're compiling 32 bit Nim programs instead |
16:55:31 | jsudlow | oh I'm a doofus.... I was using the run time binaries instead of the development ones |
16:55:54 | * | vendethiel quit (Ping timeout: 250 seconds) |
16:56:10 | jsudlow | when you put it next to the exe it works! thanks def |
17:04:09 | * | vendethiel joined #nim |
17:06:31 | jsudlow | you guys may not know this but if I have a surfacePtr in sdl2 does anyone know how to get the actual surface that the surfacePtr points too? |
17:08:01 | * | Arrrr joined #nim |
17:08:10 | Araq | surfacePtr.nativeHandle or something similiar |
17:08:42 | * | Demos quit (Read error: Connection reset by peer) |
17:19:43 | * | coffeepot quit (Quit: http://www.kiwiirc.com/ - A hand crafted IRC client) |
17:27:58 | * | vendethiel quit (Ping timeout: 250 seconds) |
17:29:59 | * | vendethiel joined #nim |
17:38:58 | * | shodan45 quit (Quit: Konversation terminated!) |
17:42:17 | yglukhov | Araq: any thoughts about my prs? #3873, #3870, #3863 |
17:45:46 | * | Demon_Fox joined #nim |
17:52:14 | * | vendethiel quit (Ping timeout: 250 seconds) |
17:54:32 | * | brson joined #nim |
17:57:45 | * | toddpratt joined #nim |
18:00:21 | * | filcuc quit (Read error: Connection reset by peer) |
18:06:48 | * | pilne joined #nim |
18:09:24 | Arrrr | That was fast https://github.com/nimious/vulkan |
18:25:31 | * | yglukhov quit (Remote host closed the connection) |
18:31:54 | * | Demon_Fox quit (Quit: Leaving) |
18:40:17 | * | vendethiel joined #nim |
19:01:08 | * | BitPuffin quit (Ping timeout: 250 seconds) |
19:05:07 | wuehlmaus | Araq: do you think that 1..10..2 functionality could be in system.nim? i think it's just cool. |
19:06:08 | ldlework | what does it do? |
19:06:13 | ldlework | 1 to 10 by two? |
19:06:27 | ldlework | or 1 to 10 back down to 2? |
19:07:01 | wuehlmaus | 1 3 5 7 9 |
19:07:54 | wuehlmaus | ldlework: it's that way in the zsh shell. |
19:08:12 | * | darkf joined #nim |
19:12:20 | Araq | wuehlmaus: I think it's not required and system.nim should not be bloated any further |
19:14:23 | ldlework | gmpreussner_: Why don't the bindings work on linux? |
19:16:36 | * | Jesin quit (Quit: Leaving) |
19:26:03 | * | yglukhov joined #nim |
19:27:54 | * | Jesin joined #nim |
19:30:09 | * | yglukhov quit (Ping timeout: 240 seconds) |
19:31:21 | * | yglukhov joined #nim |
19:35:19 | flyx | so I actually managed to release v0.1.0 of my YAML implementation: http://flyx.github.io/NimYAML/index.html |
19:38:19 | Arrrr | Just when i was looking for one, good work flyx |
19:43:16 | flyx | Arrrr: it's not the first one, theduke released one back in december when I was just writing my parser |
19:44:04 | Arrrr | I had no idea, is it on nimble? |
19:44:16 | flyx | mine currently lacks a document object model (which is planned for future releases), but it's good at serializing native Nim types |
19:45:50 | endragor | Can I make Nim not to generate NimMain-related variables and procedures (NimMain, NimMainInner, cmdLine, etc.)? --noMain option makes it not generate C main procedure, but it still generates other stuff. |
19:46:36 | flyx | Arrrr: yeah, here: https://github.com/nim-appkit/yaml |
19:48:06 | flyx | Arrrr: he had a different focus and parses YAML into a values true (another one of his projects) |
19:48:20 | flyx | *tree |
20:12:06 | * | awsteele joined #nim |
20:17:07 | * | endragor_ joined #nim |
20:19:26 | * | endragor_ quit (Read error: Connection reset by peer) |
20:19:33 | * | endrago__ joined #nim |
20:20:32 | * | endragor quit (Ping timeout: 256 seconds) |
20:21:23 | * | Arrrr quit (Read error: Connection reset by peer) |
20:28:52 | * | endrago__ quit (Ping timeout: 248 seconds) |
20:30:57 | * | def- quit (Ping timeout: 240 seconds) |
20:33:47 | * | def- joined #nim |
20:56:01 | * | gokr joined #nim |
20:57:51 | * | shodan45 joined #nim |
20:59:55 | * | Varriount joined #nim |
21:01:59 | * | yglukhov quit (Read error: Connection reset by peer) |
21:02:58 | * | Varriount_ quit (Ping timeout: 240 seconds) |
21:03:00 | * | yglukhov joined #nim |
21:04:52 | * | Varriount quit (Disconnected by services) |
21:04:52 | * | Varriount_ joined #nim |
21:08:24 | * | Varriount joined #nim |
21:10:24 | * | Varriount_ quit (Ping timeout: 256 seconds) |
21:11:01 | * | Varriount quit (Disconnected by services) |
21:11:01 | * | Varriount_ joined #nim |
21:17:25 | * | BitPuffin joined #nim |
21:19:08 | ldlework | If anyone is interested I'm looking to pay someone for a handful of hours to audit my nim code base for memory in efficiencies and long held references. |
21:19:46 | * | BitPuffin quit (Remote host closed the connection) |
21:22:23 | ldlework | PM me for details if you are interested |
21:32:48 | * | yglukhov quit (Remote host closed the connection) |
21:47:28 | * | Trustable quit (Remote host closed the connection) |
21:54:00 | ldlework | No offers hm. |
21:56:11 | def- | ldlework: I wrote a PM |
21:57:19 | ldlework | def-: my bouncer swallowed it :( |
21:57:38 | ldlework | oh its on my phone |
21:58:59 | * | mat4 joined #nim |
21:59:02 | mat4 | hello |
22:06:23 | * | shodan45 quit (Read error: Connection reset by peer) |
22:06:39 | * | shodan45 joined #nim |
22:09:42 | ldlework | hi mat4 |
22:09:51 | mat4 | hi ldlework |
22:09:51 | ldlework | or servus as is tradition |
22:10:47 | ldlework | servus is ironic in english |
22:10:57 | ldlework | since it says "serve us" but means a projection of servitude. |
22:11:31 | mat4 | hmm ok, it's a common greeting in southern Germany and Austria |
22:12:16 | mat4 | (from Latin 'salve') |
22:21:15 | mat4 | which means in English 'greeting' |
22:23:21 | * | vendethiel quit (Ping timeout: 240 seconds) |
22:33:19 | * | yglukhov joined #nim |
22:37:21 | * | yglukhov quit (Ping timeout: 240 seconds) |
22:39:41 | * | Matthias247 joined #nim |
22:40:13 | ldlework | is there an efficient way to remove all items from a Table without reallocating it |
22:40:30 | * | vendethiel joined #nim |
22:46:06 | * | Varriount_ is now known as Varriount |
22:46:56 | mat4 | use a hash stack |
22:54:49 | Varriount | ldlework: Still having table allocation problems? |
22:55:18 | Varriount | Too bad we can't generate an object graph. Or can we? |
22:55:53 | ldlework | Varriount: def- | nono, don't start playing around with the GC, we can remove all allocations |
22:55:59 | ldlework | to which I replied |
22:56:02 | ldlework | O_O |
22:56:22 | * | Subspice joined #nim |
22:56:24 | Varriount | :| |
22:56:32 | Varriount | Hi Subspice |
22:56:37 | Subspice | Hello :) |
22:56:39 | ldlework | Varriount: why the sadface |
22:57:10 | Varriount | ldlework: Not sad, just surprised. Well, maybe a bit sad that I'm not smart enough to think of a way to remove all allocations. |
22:57:48 | Varriount | Did def- mean all allocations in the entire program, or just the ones with map chunks? |
22:58:00 | ldlework | I think just in this specific billow generator |
22:58:12 | ldlework | and I think he pulled it off because I'm scrolling with no pauses and my ram isn't going up |
22:58:33 | Varriount | I don't suppose I could have a look at the code? |
22:58:34 | def- | Varriount: writing nim without heap memory allocs is fun too, but no, just in one closure |
22:58:37 | * | mat4 left #nim ("Leaving") |
22:59:10 | * | pregressive quit (Remote host closed the connection) |
22:59:56 | ldlework | def-: so basically you just coupled the generator to the noise value and then since you already sorted it, you don't even need to search you just accessed it in the tuple |
23:00:42 | def- | i guess. i just changed the code to do the same thing as before without allocations without thinking much about it |
23:01:05 | ldlework | lol |
23:01:08 | ldlework | jerk |
23:01:56 | * | vendethiel quit (Ping timeout: 248 seconds) |
23:03:28 | shodan45 | I think I'm going to write my first nim program for actual use: an old fashioned "form mail" CGI program :) |
23:03:58 | ldlework | lol |
23:04:12 | ldlework | reimplement the opengl api ontop of vulcan |
23:05:06 | * | pregressive joined #nim |
23:05:37 | shodan45 | I have a huge CMS (plone) running a virtually unused site... going to try converting it to static html, but it does have a contact-us form |
23:05:56 | asdf | gmpreussner_, hmm, i think the vulkan bindings do work on linux; i only tried the lunarG sdk's "instance" sample and it seems to work; i'll be happy to try running some code that actually does something, if you have any |
23:06:18 | asdf | gmpreussner_, (FWIW here's the 'instance' sample in nim i used https://bpaste.net/show/6cdbedd7e9f1 ) |
23:11:29 | * | filwit joined #nim |
23:15:17 | * | pregressive quit (Remote host closed the connection) |
23:20:15 | * | vendethiel joined #nim |