00:20:50 | * | ga2arch quit (Ping timeout: 276 seconds) |
00:21:44 | * | vendethiel quit (Ping timeout: 252 seconds) |
00:29:53 | * | lankanmon joined #nim |
00:31:38 | * | lankanmon quit (Remote host closed the connection) |
00:42:21 | * | Matthias247 quit (Read error: Connection reset by peer) |
00:50:23 | * | Varriount joined #nim |
00:51:11 | * | Varriount_ quit (Ping timeout: 264 seconds) |
01:10:19 | ldlework | Can I override () for a type to simulate a call interface? |
01:10:37 | ldlework | like __call__ in python |
01:11:56 | def- | ldlework: http://nim-lang.org/docs/manual.html#special-operators |
01:12:26 | ldlework | I don't want to adjust the method or field interface. |
01:12:32 | ldlework | I want to pretend to call a value directly. |
01:12:39 | ldlework | If I have `a` of type T |
01:12:43 | ldlework | I want `a()` |
01:12:47 | * | lg_ quit (Ping timeout: 264 seconds) |
01:13:12 | ldlework | def-: the method operator doesn't do that right? |
01:14:13 | def- | ldlework: just tried, seems to work for me: https://gist.github.com/def-/800e897635354775b867 |
01:14:30 | ldlework | def-: gah you're too helpful |
01:16:45 | ldlework | hehe that's neat |
01:16:51 | ldlework | seems like cheatiing |
01:17:18 | def- | how so? |
01:17:39 | ldlework | Not that operator itself, but how it ties up my abstraction very nicely. |
01:18:11 | ldlework | I went from passing a closure |
01:18:23 | ldlework | to passing an object variant that can store closures of various method signatures |
01:18:38 | ldlework | and now I've just abstracted the fact that it is a variant struct |
01:18:48 | ldlework | by implementing `()` over the top and taking care of the variant casing behind the scenes |
01:19:02 | ldlework | so the clients to this code still believe they are getting a plain ol closure |
01:41:09 | * | Amrykid2 is now known as Amrykid |
01:41:16 | * | Amrykid quit (Changing host) |
01:41:16 | * | Amrykid joined #nim |
01:47:20 | * | gokr quit (Quit: Leaving.) |
01:58:15 | * | jaco60 quit (Ping timeout: 240 seconds) |
02:11:28 | * | vendethiel joined #nim |
02:29:09 | * | SShrike joined #nim |
02:29:32 | * | Demon_Fox quit (Quit: Leaving) |
02:32:08 | * | vendethiel quit (Ping timeout: 276 seconds) |
02:51:03 | * | vendethiel joined #nim |
03:11:35 | * | vendethiel quit (Ping timeout: 240 seconds) |
03:34:33 | * | ked_ joined #nim |
03:47:30 | * | ked_ quit (Ping timeout: 252 seconds) |
03:53:56 | * | Demon_Fox joined #nim |
03:58:14 | * | SShrike quit (Quit: SShrike) |
04:00:31 | * | endragor joined #nim |
04:18:10 | * | jackv quit (Ping timeout: 272 seconds) |
04:18:48 | * | Roin quit (Ping timeout: 272 seconds) |
04:19:37 | * | Roin joined #nim |
04:19:39 | * | jackv joined #nim |
04:41:37 | * | endragor quit (Remote host closed the connection) |
04:43:34 | * | endragor joined #nim |
04:53:53 | * | Xe quit (Quit: *.yolo *.swag) |
04:54:31 | * | Xe joined #nim |
05:39:46 | * | s4 joined #nim |
05:50:08 | * | _icarus_ joined #nim |
05:52:41 | * | ephja joined #nim |
06:00:05 | * | _icarus_ quit (Quit: Leaving) |
06:06:47 | * | vangroan joined #nim |
06:16:06 | * | lompik quit (Ping timeout: 240 seconds) |
06:26:45 | * | Varriount quit (Disconnected by services) |
06:26:45 | * | Varriount_ joined #nim |
06:26:54 | * | endragor quit (Remote host closed the connection) |
06:29:27 | * | endragor joined #nim |
06:34:12 | * | gokr joined #nim |
06:34:12 | * | gokr quit (Read error: Connection reset by peer) |
06:34:27 | * | gokr joined #nim |
06:46:34 | * | vangroan_ joined #nim |
06:49:30 | * | vangroan quit (Ping timeout: 260 seconds) |
07:03:30 | * | Demon_Fox quit (Ping timeout: 260 seconds) |
07:03:43 | * | ludocode quit (*.net *.split) |
07:03:43 | * | avsej quit (*.net *.split) |
07:03:43 | * | Wildefyr quit (*.net *.split) |
07:03:43 | * | Gonzih quit (*.net *.split) |
07:03:44 | * | delian66 quit (*.net *.split) |
07:03:50 | * | delian66 joined #nim |
07:03:54 | * | sarlalian quit (*.net *.split) |
07:03:54 | * | SirCmpwn quit (*.net *.split) |
07:03:54 | * | Learath2 quit (*.net *.split) |
07:03:55 | * | federico3 quit (*.net *.split) |
07:03:55 | * | nim-buildbot quit (*.net *.split) |
07:03:55 | * | devn quit (*.net *.split) |
07:03:55 | * | r-ku quit (*.net *.split) |
07:03:55 | * | so quit (*.net *.split) |
07:03:59 | * | ludocode joined #nim |
07:04:01 | * | SirCmpwn joined #nim |
07:04:02 | * | devn_ joined #nim |
07:04:03 | * | Learath2 joined #nim |
07:04:07 | * | Wildefyr joined #nim |
07:04:11 | * | Gonzih joined #nim |
07:04:14 | * | r-ku joined #nim |
07:04:35 | * | federico3 joined #nim |
07:04:55 | * | sarlalian joined #nim |
07:05:50 | * | avsej joined #nim |
07:05:50 | * | avsej quit (Changing host) |
07:05:50 | * | avsej joined #nim |
07:06:39 | * | gokr quit (Quit: Leaving.) |
07:10:23 | * | Demon_Fox joined #nim |
07:30:00 | * | toaoMgeorge quit (Read error: Connection reset by peer) |
07:31:40 | * | vangroan joined #nim |
07:34:58 | * | vangroan_ quit (Ping timeout: 240 seconds) |
07:41:54 | * | gokr joined #nim |
07:47:34 | ldlework | I feel like the perlin module doesn't produce values that actually go up to 1.0 but I'm not sure |
07:52:04 | * | desophos quit (Ping timeout: 256 seconds) |
07:54:05 | * | Matthias247 joined #nim |
07:57:43 | * | pregressive joined #nim |
07:59:05 | * | gokr quit (Quit: Leaving.) |
07:59:25 | * | pregressive quit (Remote host closed the connection) |
08:01:09 | * | desophos joined #nim |
08:01:24 | * | so joined #nim |
08:09:02 | * | Matthias247 quit (Read error: Connection reset by peer) |
08:20:04 | * | endragor quit (Remote host closed the connection) |
08:24:13 | * | Trustable joined #nim |
08:32:49 | * | endragor joined #nim |
08:35:32 | * | SShrike joined #nim |
08:35:35 | * | Trustable quit (Remote host closed the connection) |
08:41:02 | * | gokr joined #nim |
08:50:55 | * | yglukhov joined #nim |
08:59:13 | * | vangroan quit (Quit: Leaving) |
08:59:53 | yglukhov | dom96: any thoughts about my pr? |
09:04:53 | * | s4 quit (Quit: Konversation terminated!) |
09:06:18 | * | dom96_ joined #nim |
09:06:52 | dom96_ | yglukhov: replied |
09:09:43 | * | jaco60 joined #nim |
09:16:31 | * | dom96_ quit (Quit: Page closed) |
09:28:16 | * | Kingsqueee joined #nim |
09:28:54 | * | Kingsquee quit (Read error: Connection reset by peer) |
09:43:03 | * | Varriount joined #nim |
09:45:41 | * | Varriount_ quit (Ping timeout: 276 seconds) |
09:52:10 | * | darkf quit (Quit: Leaving) |
10:03:22 | * | Arrrr joined #nim |
10:03:35 | * | BlaXpirit quit (Quit: Bye) |
10:03:46 | * | BlaXpirit joined #nim |
10:04:56 | * | Kingsqueee quit (Read error: Connection reset by peer) |
10:05:07 | * | Kingsqueee joined #nim |
10:12:03 | * | vendethiel joined #nim |
10:35:54 | * | vendethiel quit (Ping timeout: 250 seconds) |
10:36:41 | * | arnetheduck joined #nim |
10:42:44 | * | Arrrr quit (Ping timeout: 248 seconds) |
10:45:35 | * | endragor quit (Remote host closed the connection) |
10:57:35 | * | desophos quit (Read error: Connection reset by peer) |
11:26:35 | * | endragor joined #nim |
11:36:13 | wuehlmaus | what is the separator in ``nim --path'' ? |
11:40:04 | * | Kingsqueee quit (Quit: https://i.imgur.com/qicT3GK.gif) |
11:41:53 | * | vendethiel joined #nim |
11:49:27 | * | Demon_Fox quit (Quit: Leaving) |
11:54:21 | Araq | wuehlmaus: there is none, use --path multiple times instead |
11:54:22 | dom96 | wuehlmaus: don't think there is one, you have to specify multiple '--path' |
11:56:23 | wuehlmaus | i think this one should be added to nimc.html, it was not clear to me, thanks for explaining |
12:10:44 | * | desophos joined #nim |
12:24:56 | * | vendethiel quit (Ping timeout: 276 seconds) |
12:26:24 | * | jaco60 quit (Ping timeout: 250 seconds) |
12:27:02 | * | SShrike quit (Quit: SShrike) |
12:32:55 | arnetheduck | hi.. looking at the compiler, anyone remembers when an object gets the tfEmbedded flag? what kind of object would have a type field which is not the first member? |
12:33:49 | arnetheduck | Varriount, now? ;) |
12:35:04 | arnetheduck | Varriount, I'm using nimlime (great plugin, thanks!), latest release, but when I save files I get lots of errors - I suspect it's not picking up on nim.cfg in my folder - any ideas? |
12:35:32 | arnetheduck | happens when I edit nlvm for example (which has a bunch of paths in its nim.cfg) |
12:42:57 | Araq | arnetheduck: I can't remember, I can only (nim)grep for it, much like you would |
12:43:16 | Araq | it's crucial to copy the logic of the C code generator for this though |
12:43:38 | Araq | lots of subtle things going on like object that is .inheritable but doesn't inherit from RootObj |
12:45:32 | arnetheduck | yeah, I had a cursory look at the function that analyzes the object, but it's nontrivial so I thought maybe someone remembered what it's needed for.. |
12:46:07 | arnetheduck | hm, I |
12:46:23 | arnetheduck | 'll see if I can find some c code that causes it to be used :) |
12:46:32 | arnetheduck | *nim |
12:54:20 | * | EastByte quit (Quit: WeeChat 1.3) |
12:55:52 | * | BitPuffin joined #nim |
13:14:54 | * | EastByte joined #nim |
13:30:28 | * | vendethiel joined #nim |
13:37:07 | * | lompik joined #nim |
13:50:50 | * | M-max joined #nim |
13:51:42 | * | gokr quit (Read error: Connection reset by peer) |
13:51:47 | * | gokr1 joined #nim |
13:51:47 | * | vendethiel quit (Ping timeout: 264 seconds) |
14:15:51 | * | M-max quit (Remote host closed the connection) |
14:20:23 | * | M-max joined #nim |
14:20:36 | * | vendethiel joined #nim |
14:24:36 | * | federico3 quit (*.net *.split) |
14:24:36 | * | Learath2 quit (*.net *.split) |
14:24:59 | * | federico3 joined #nim |
14:27:47 | * | endragor quit (Remote host closed the connection) |
14:29:28 | * | Learath2 joined #nim |
14:29:53 | * | endragor joined #nim |
14:30:22 | * | trn_ joined #nim |
14:40:33 | trn_ | how I can make array, size of each element array must equal 5 byte only? |
14:44:10 | * | vendethiel quit (Ping timeout: 240 seconds) |
14:44:33 | def- | trn_: something like this? https://gist.github.com/def-/17925b59924751b527b5 |
14:48:38 | trn_ | def: yes, like this (need check how much overhead for strukture like this) |
14:48:44 | def- | no overhead |
14:50:16 | * | arnetheduck quit (Ping timeout: 250 seconds) |
14:50:56 | trn_ | I have 100_000_000 strings in memory like "1234567890" (ten symbols each, only numbers) and want decrease memory allocated |
14:51:23 | def- | what's the use case? |
14:53:41 | trn_ | have two files (new and old) with ~100_000_000 strings each, need show strings added in new file |
14:55:21 | def- | you actually have to store the file in memory? what about just iterating over it or using memory maps? |
14:55:45 | trn_ | files not sorted |
14:56:30 | trn_ | i'm read old file in array of strings, sort, and search line by line (binarySearch) from new file |
14:57:01 | trn_ | work good, but need moooore memory |
14:58:06 | def- | 5 bytes won't be aligned. i guess i'd try to use an array of int64s |
14:58:29 | def- | also simpler |
15:01:25 | * | M-Quora joined #nim |
15:03:02 | * | M-max quit (Quit: node-irc says goodbye) |
15:03:13 | trn_ | def: now work with this: http://pastebin.com/qpJetwfE |
15:04:59 | trn_ | array of strings (for example 8 byte each) have more overhead then array of int64? |
15:05:49 | def- | yeah, strings are on the heap, so you have an 8 byte pointer to each string |
15:06:08 | def- | and if you use int64 you have nothing on heap and no indirection |
15:06:31 | def- | should need half the memory |
15:07:25 | trn_ | good, i'm try with array of int64 |
15:13:07 | trn_ | def: and other question, in file strings like "1234,567890", need cut comma from it and get pure number for store in int64. What better - use strip (from strutils) string or just make result = a[0..3] & a[5..10]? |
15:13:47 | def- | strip doesn't do what you want, i believe |
15:14:03 | def- | it strips characters from the start and end of a string |
15:14:25 | trn_ | make split + join? |
15:18:02 | def- | I guess I would write my own proc to filter it out, but yeah, that would also work |
15:19:03 | * | gokr1 quit (Quit: Leaving.) |
15:20:03 | trn_ | ok, thanks for help (sorry for annoyng, i'm not programmer - just DBA) |
15:24:34 | * | nchambers^ joined #nim |
15:24:45 | reactormonk | trn_, cool to know that non-programmers have a go at nim ;-) |
15:25:16 | * | nchambers quit (Ping timeout: 248 seconds) |
15:25:23 | * | Sornaensis quit (Max SendQ exceeded) |
15:26:32 | * | Sornaensis joined #nim |
15:26:38 | * | nchambers^ is now known as nchambers |
15:29:30 | def- | trn_: btw, you actually have 100 million lines or is this some upper limit? |
15:30:01 | def- | if you have a dynamic number, you should use a seq instead of an array |
15:32:38 | trn_ | dynamic number in file (grow slowly), now 96 millions strings - i'm try seq, but error compile |
15:33:22 | def- | var psp = newSeq[int64]() |
15:33:34 | def- | and later: psp.add(value) |
15:34:30 | trn_ | oh, this helpful with dynamic sequence |
15:34:42 | * | toaoMgeorge joined #nim |
15:42:07 | * | jaco60 joined #nim |
15:43:00 | * | Trustable joined #nim |
15:54:30 | * | matkuki joined #nim |
15:56:53 | * | polde joined #nim |
16:06:34 | * | askatasuna joined #nim |
16:15:30 | * | Druage joined #nim |
16:15:37 | Druage | hey guys! |
16:15:51 | Druage | i have a question about calling nim from c |
16:17:15 | Druage | so i made a dylib out of nim, and i have these two functionshttp://pastebin.com/Taje2xv7 |
16:17:19 | Druage | ugh |
16:17:23 | Druage | http://pastebin.com/Taje2xv7 |
16:17:35 | Druage | i have two functions, both of them run fine how they're currently set up |
16:17:59 | Druage | if i try to do the "echo( $n )" though, it instantly segfaults from c |
16:18:26 | Druage | any idea as to why changing an int to string would do that" |
16:18:28 | Druage | ?* |
16:19:03 | Druage | here is my c code http://pastebin.com/ |
16:19:27 | Druage | its just a dirty little example |
16:20:32 | dom96 | What is your C code? |
16:20:52 | Druage | its in the second pastebin |
16:21:02 | def- | no, the second pastebin is empty |
16:21:07 | dom96 | You posted a link to the pastebin front page |
16:21:25 | Druage | whoops! |
16:21:25 | Druage | http://pastebin.com/GnczgWiz |
16:22:52 | Druage | ya the for loop itself works fine |
16:23:13 | dom96 | try removing the stdcall pragma |
16:23:21 | Druage | kk |
16:23:33 | dom96 | It's a calling convention used on Windows IIRC |
16:23:41 | Druage | o |
16:24:13 | Druage | still segfaults |
16:24:31 | def- | use cdecl instead: "The cdecl convention means that a procedure shall use the same convention as the C compiler." |
16:24:59 | def- | also, you probably should init the Nim stuff |
16:25:14 | Druage | init the nim stuff? |
16:25:17 | Druage | what do you mean |
16:25:48 | * | polde quit (Quit: q) |
16:25:59 | Druage | cdecl doesnt affect the segfault |
16:26:11 | def- | yeah, but you should still use cdecl ;) |
16:26:18 | Druage | nice! |
16:26:21 | Druage | kk |
16:26:41 | trn_ | def-: last question :) why echo parseInt("3") - got error "expect parseInt(s: string, number: var int, start: int)", but in examples this work |
16:27:22 | * | polde joined #nim |
16:27:48 | Druage | ya its literally will always crash if i try to print a int to stdout, even if its cast to a string |
16:27:59 | def- | Call NimMain() |
16:28:33 | Druage | are you referring to me def- ? |
16:28:37 | def- | Druage: yes |
16:28:51 | Druage | NimMain from my c code or nim code? |
16:29:02 | def- | otherwise the GC is not initialized and you're trying to create a data structure on the heap that has to be GCed |
16:29:05 | def- | from C |
16:29:38 | Druage | that makes sense as to why it'd segfault |
16:29:55 | Druage | where is NimMain declared? |
16:30:34 | * | filwit joined #nim |
16:30:37 | def- | Hm, maybe only NimMainInner is exported, I'm not sure |
16:33:15 | def- | what system are you on btw? I get no segfault |
16:33:19 | def- | on Linux x86_64 here |
16:33:23 | Druage | same |
16:33:26 | Druage | ubuntu 15.10 |
16:33:34 | def- | gcc? |
16:33:37 | Druage | ya |
16:33:56 | Druage | did u add in an echo( $n ) line? |
16:33:59 | Druage | in the iterate proc? |
16:34:00 | def- | yes |
16:34:15 | Druage | idk |
16:34:57 | def- | building with: nim --app:lib c test && gcc -ldl -o x x.c |
16:35:11 | Druage | hmm those a little different than mine |
16:35:12 | Druage | ill try it |
16:35:26 | Druage | but i have to get going currently, so ill keep trying and report back later |
16:35:37 | Druage | ty! |
16:38:26 | def- | documented here btw: http://nim-lang.org/docs/backends.html#backend-code-calling-nim-nim-invocation-example-from-c |
16:40:15 | * | Druage quit (Ping timeout: 252 seconds) |
16:42:28 | * | polde quit (Quit: q) |
16:42:38 | * | Druage joined #nim |
16:42:46 | * | polde joined #nim |
16:43:02 | Druage | def-: i was compiling with --noMain XD |
16:43:07 | Druage | no wonder |
16:43:43 | Druage | thought it was referring to a main function, not NimMain() |
16:43:50 | Druage | it works now though |
16:47:58 | Araq | --noMain produces NimMain anyway and you need to call it |
16:54:27 | Druage | well when i compiled with --noMain any heap allocations from nim |
16:54:34 | * | BitPuffin quit (Ping timeout: 240 seconds) |
16:54:38 | Druage | caused a segfault when i called the nim proc from c |
16:56:23 | * | BitPuffin joined #nim |
16:57:46 | * | polde quit (Quit: q) |
16:58:07 | * | polde joined #nim |
17:06:07 | * | matkuki quit (Quit: ChatZilla 0.9.92 [Firefox 44.0.2/20160210153822]) |
17:12:30 | * | desophos quit (Ping timeout: 256 seconds) |
17:12:53 | * | BitPuffin quit (Ping timeout: 276 seconds) |
17:14:26 | * | endragor quit (Ping timeout: 250 seconds) |
17:18:48 | * | BitPuffin joined #nim |
17:33:29 | * | Druage quit (Quit: Page closed) |
17:35:04 | * | gokr joined #nim |
17:36:01 | * | endragor joined #nim |
17:43:46 | * | trn_ quit (Quit: Page closed) |
17:45:26 | * | vendethiel joined #nim |
17:46:19 | * | tyu joined #nim |
18:06:32 | * | lompik quit (Ping timeout: 252 seconds) |
18:11:16 | * | yglukhov quit (Ping timeout: 248 seconds) |
18:17:41 | * | desophos joined #nim |
18:18:52 | * | darkf joined #nim |
18:19:12 | * | lompik joined #nim |
18:22:33 | federico3 | dom96: are these imports part of the libraries included in Nim or is it extra stuff? https://github.com/nim-lang/nimble/blob/master/src/nimblepkg/nimscriptsupport.nim#L7 |
18:29:35 | * | vendethiel quit (Ping timeout: 276 seconds) |
18:33:07 | * | vendethiel joined #nim |
18:44:02 | * | endragor quit (Remote host closed the connection) |
19:06:14 | ldlework | def-: dom96 desophos http://i.imgur.com/IDDXR4v.png :) |
19:06:17 | ldlework | oop |
19:07:02 | filwit | nice, ldlework |
19:08:21 | ldlework | thx |
19:10:12 | ldlework | my program is getting slow though |
19:11:23 | filwit | well, time to profile to find the biggest bottleneck |
19:13:07 | ldlework | dunno how to profile |
19:13:52 | def- | compile with --debugger:native and use callgrind and kcachegrind |
19:14:28 | ldlework | that's what tools to use, not how to do it |
19:14:30 | ldlework | :) |
19:15:08 | filwit | it's easy.. write a general purpose template which accepts a block of code and wraps it in a ``let start = cpuTime() ... let elapsed = cpuTime() - start`` associated with some name.. then dump each name/time to a file or console.. then just wrap parts of your existing code with various tags.. |
19:15:43 | filwit | profile "rendering": ...rendering code... |
19:15:51 | filwit | profile "ECS": ...etc... |
19:16:25 | filwit | find which one takes the longest, then add granularity to the code within that section until you find the biggest performance culprit |
19:16:49 | filwit | or yeah, do what def- said.. |
19:17:10 | federico3 | def-: better than using the default profiler? |
19:18:56 | * | yglukhov joined #nim |
19:19:43 | def- | federico3: haven't used the default profiler, but with kcachegrind you can see all functions, how they call each other, inspect the nim source code and asm where most of the time is spent. but callgrind slows down execution a lot so it's not perfectly accurate |
19:21:39 | def- | I have a super simple example here: http://hookrace.net/blog/writing-an-async-logger-in-nim/#optimization |
19:22:24 | federico3 | def-: how about 2-3 lines on profiling on https://github.com/nim-lang/Nim/wiki/Unofficial-FAQ ? |
19:22:53 | federico3 | https://github.com/nim-lang/Nim/wiki/Profiling maybe? |
19:23:39 | def- | federico3: I don't think most people ever find the wiki |
19:23:58 | federico3 | true, but we can start to direct them there and build from this |
19:24:13 | flyx | I autogenerate some procs with a template: https://github.com/flyx/NimYAML/blob/master/private/serialization.nim#L50 |
19:24:22 | flyx | when I generate documentation for that, it looks like this: file:///Users/flyx/Projects/NimYAML/docout/yaml.html#yamlTag, |
19:24:27 | flyx | oops, wrong URI |
19:24:51 | flyx | http://flyx.github.io/NimYAML/yaml.html#yamlTag, |
19:25:05 | flyx | is there a way to, um, prevent that from happening? |
19:25:17 | def- | flyx: with nim doc2? |
19:25:46 | flyx | yes, with doc2 |
19:26:03 | Varriount | Araq: The GC doesn't use reference counting with the stack, but it still scans it, right? |
19:27:14 | def- | flyx: sounds like the docgen should be fixed then |
19:27:40 | flyx | hmm okay, I'll file an issue |
19:27:49 | filwit | Varriount: yes |
19:28:04 | filwit | (sorry, am not Araq but I know that much) |
19:29:33 | ldlework | I have no idea what I'm looking at in kcachegrind lol |
19:29:39 | Varriount | filwit: That's what I thought. |
19:29:51 | Varriount | ldlework: Pic? |
19:30:37 | ldlework | http://i.imgur.com/jjiyfiT.png |
19:30:59 | ldlework | looks like I'm making a lot of objects and sequences? |
19:31:46 | def- | ldlework: yeah, 51% of time spent in newSeq |
19:32:00 | ldlework | :3 |
19:32:29 | filwit | yeah but 51% of the setup time? or runtime per frame? |
19:32:37 | ephja | how did it go with your OO code? |
19:33:08 | ldlework | ephja: I dunno what you're asking for specifically |
19:33:23 | Varriount | ldlework: Have you marked your strings and sequences as shallow yet? |
19:33:37 | ldlework | Varriount: no I still don't really understand that conceptually |
19:34:10 | Varriount | ldlework: When assigned to another variable, a string or sequence is copied, just like any non-reference type. |
19:34:27 | ldlework | just the reference to the sequence right |
19:34:32 | Varriount | (although, strings and sequences are references, technically) |
19:34:43 | Varriount | No, all the data is copied. |
19:34:46 | ldlework | wtf? |
19:35:16 | Varriount | ldlework: `a = @[1,2,3,4]; b=a` will copy data to b |
19:35:49 | Varriount | This is because sequences/strings are mutable/growable. |
19:36:06 | ephja | ldlework: it's not too bad. passing a sequence to a non-var parameter does not result in a copy IIRC |
19:36:31 | Varriount | When a sequence/string is added to, it may need to be reallocated, which means that any reference to it needs to be updated. |
19:36:34 | ldlework | I probably have very wasteful style in Nim |
19:37:11 | ldlework | this is giving me a bit of anxiety I hope its not too systemic |
19:37:21 | ephja | same goes for non-var, um, variables |
19:37:29 | ldlework | I strive for code-beauty |
19:37:53 | ephja | which does help a lot |
19:38:04 | ldlework | I use let as much as possible |
19:38:11 | Varriount | ldlework: Well, you can use the shallow() procedure to prevent copying, however you shouldn't use 'add' on the shallow'ed sequence, nor mutate it in any way. |
19:38:45 | Varriount | `shallow` sets a flag in the sequence structure telling the assignment code not to copy. |
19:39:24 | ldlework | how can I find out where most of the sequence creation is happening |
19:39:34 | ldlework | oh Isee |
19:39:46 | ldlework | looks like initTable is the culprit |
19:39:51 | Varriount | ldlework: You can also use a `ref seq` and `ref string` type, if you do need to mutate them, however you then get the penalty of double-dereferencing. |
19:41:03 | Varriount | This is one of the big things I disagree with in Nim... I'd rather the default string type be immutable, and have a mutable buffer type. |
19:41:40 | filwit | ^ |
19:42:45 | ephja | nevermind |
19:42:59 | ephja | when exactly are copies not performed when not using shallow? |
19:43:17 | * | flyx agrees with Varriount |
19:43:19 | * | kulelu88 joined #nim |
19:43:19 | * | kulelu88 quit (Changing host) |
19:43:19 | * | kulelu88 joined #nim |
19:43:38 | Varriount | ephja: Copies are only performed when deepcopy is used, such as when copying data between threads. |
19:44:03 | ephja | I'm talking about sequences |
19:44:27 | Varriount | ephja: Strings and sequences have the same behavior. |
19:44:29 | filwit | ephja: if you have a seq of ref objects for instance, then you make a local variable "equal" that seq it will be deepCopied |
19:44:55 | Varriount | filwit: Not deepcopied, normal copy. |
19:45:09 | filwit | er.. you're right, I'm thinking wrong |
19:45:17 | Varriount | The sequence would be duplicated, but not the references |
19:45:24 | filwit | right right |
19:45:52 | Varriount | I mean, the actual pointer references would be copied, but not the data they point to (I'm hoping that's clearer). |
19:46:07 | * | Subspice joined #nim |
19:46:57 | Varriount | Hello subspice! |
19:47:03 | Subspice | hello :) |
19:47:31 | ephja | "proc p(a: var seq[int]) = let b = a" I guess that's what I was referring to -.- |
19:47:46 | Varriount | ephja: That would copy. |
19:48:12 | ldlework | Varriount: that's horrifying |
19:48:14 | ldlework | WHY |
19:48:15 | Varriount | ephja: The way to think on it is "would this operation cause the refcount of a sequence to go above '1'?" |
19:48:31 | Varriount | ldlework: As I told you, it's for memory safety. |
19:48:49 | ldlework | lol just make sure data is duplicated everywhere so no one is pointing at the samething |
19:48:50 | Varriount | ldlework: Internally, sequences are dynamically allocated arrays. |
19:48:55 | ldlework | sounds like a horrible strategy for memory safety |
19:49:20 | ephja | https://gist.github.com/ephja/8fd0816ae4b9dfebee48 |
19:49:31 | Varriount | ldlework: Go complain to Araq if you are so inclined (and like getting your head bitten off) |
19:49:35 | ldlework | I never use var in my param types. |
19:49:38 | ldlework | Should I be? |
19:49:54 | Varriount | ldlework: Only if you intend to mutate the parameter. |
19:50:03 | ldlework | I seem to be able to mutate things just fine. |
19:50:17 | Varriount | ldlework: I mean directly mutate the parameter. |
19:50:19 | ldlework | like fields of structs passed in |
19:50:37 | Varriount | ldlework: Those structs are references? |
19:50:45 | ldlework | probably |
19:50:51 | ephja | I assume you're referring to an object pointed to by a reference, but not the reference itself if it's not a var |
19:51:04 | ldlework | seems like a weak guarantee |
19:51:11 | Varriount | ldlework: 'var' passes a pointer to the location of the reference on the stack (or the address of the object data on the stack) |
19:51:15 | * | yglukhov quit (Remote host closed the connection) |
19:52:11 | ldlework | right which would allow you to change what the reference itself points to? |
19:53:35 | Varriount | ldlework: Yep. |
19:53:37 | ephja | let me test byRef with sequences |
19:53:49 | ephja | but sequences are often wrapped in references, fortunately |
19:54:20 | Varriount | ldlework, ephja: Again, the rule of thumb is that a sequence or string must always have a reference count of 1 |
19:55:09 | * | nsf quit (Quit: WeeChat 1.4) |
19:55:25 | * | Matthias247 joined #nim |
19:56:05 | Varriount | filwit: If the string type were changed to be immutable/copy on mutation... would that change semantics at all? I mean, aside from memory allocation and unsafe mechanisms such as addr, would a program's behavior change at all? |
19:58:53 | ephja | but at the same time there are many procs that take sequences directly, rather than some user-defined ref object that has a seq field |
20:00:38 | Varriount | ephja: Sequences aren't copied when passed as parameters. |
20:01:43 | Subspice | Is this the right place to ask a question regarding installing Aporia on OS X? |
20:01:59 | Varriount | ephja: http://forum.nim-lang.org/t/1793#11173 |
20:02:33 | Varriount | Subspice: Yes, although I don't know if dom96 (the creator) is present right now. |
20:02:47 | Varriount | We can help though. |
20:03:24 | ephja | I shouldn't even be writing code |
20:03:26 | * | ephja quit (Quit: WeeChat 1.3) |
20:03:35 | Varriount | :| |
20:04:44 | Varriount | Subspice: What's the installation problem? |
20:04:50 | Araq | it's not done for memory safety. it's done for consistency with the whole rest of the fucking language. |
20:05:22 | Araq | I don't know why it is so hard to understand that. |
20:05:23 | filwit | Varriount: IDK, and I don't have time to focus on it right now |
20:05:43 | Subspice | not sure if it's a problem per se but I think I'm missing a dependency: when I try to open aporia it says "could not load: libglib-2.0.dylib" |
20:06:08 | Varriount | Subspice: What method did you use to install Aporia? |
20:06:34 | Subspice | Varriount: I used "nimble install aporia@#head" |
20:06:39 | Araq | and yeah, it kinda sucks and I'm willing to change it so that '=' does the "fastest thing that's reasonable" because nobody cares about the consistency. In fact, most people don't understand it anyway. |
20:08:17 | filwit | Araq: it's somewhat inconsistent though.. I mean, if I make a `let a = someString` then mutate that string.. isn't it different than if I'd made a `var a = ...` ? |
20:09:03 | filwit | which is inconsistent with the way other value type objects (which is what strings are pretending to be) |
20:09:14 | Varriount | filwit: No, in that instance the string is still copied on the `let` assignment. |
20:09:33 | Varriount | Subspice: Odd, I wonder why it's trying to load libglib... |
20:09:53 | filwit | Varriount: hmm.. okay, I need to test these things out more it seems. |
20:10:03 | Subspice | Varriount: using this method, where should aporia be installed? |
20:10:40 | Varriount | Subspice: I'm afraid I don't know. I use Windows. >_< |
20:10:48 | Subspice | aaah ^^ |
20:11:07 | Varriount | Subspice: However you're having a problem with dynlib loading, so I don't *think* it's a problem with the installation location. |
20:12:06 | Araq | Subspice: last time I installed aporia on mac it just worked ... |
20:12:25 | Subspice | Varriount: Ah okay :) I asked because I can't simply type "aporia" in the terminal, I have to locate it manually and I found two places to open it from, so.... |
20:12:36 | Varriount | Subspice: Do you have libglib in the right path variable (LD_LIBRARY_PATH)? |
20:15:02 | Subspice | Varriount: I think so yes |
20:15:22 | Subspice | wait |
20:15:27 | Subspice | I didn't understand the question |
20:15:29 | ldlework | LD_LIBRARY_PATH is like PATH |
20:15:37 | ldlework | it contains a list of directory paths |
20:15:50 | ldlework | is the libglib.dynlib (or whatever) inside one of those paths? |
20:16:19 | Araq | libliblibglib.dylibliblib |
20:16:59 | Varriount | Araq: When it comes to dynlib loading, I think I like Windows behavior better (or at least, it's more convenient). |
20:17:03 | Subspice | it's in /opt/local/bin |
20:19:00 | Araq | Varriount: tell me about it, Path sep is ; not :, drive letters are much easier than /media/$random_device_UID, files have useful extensions (you can delete all produced *.exe easily) |
20:20:01 | Varriount | Araq: On the other hand, you're limited to 26 drives (although NTFS does allow path mounts a la Unix) |
20:20:18 | Araq | no, that is a common misconception |
20:20:34 | Araq | AA:\ would follow after Z:\ |
20:20:49 | Araq | ;-) |
20:21:15 | Varriount | Araq: http://stackoverflow.com/questions/4652545/windows-what-happens-if-i-finish-drive-letters-they-are-26 ? |
20:21:24 | Araq | I don't think they implemented it this way though |
20:24:48 | Varriount | Subspice: Anyway, any progress? |
20:25:28 | Subspice | Varriount: possibly. Now it says "could not import: iconv_open" |
20:26:42 | Varriount | Subspice: Hm. https://github.com/nim-lang/Aporia/issues/69 |
20:27:07 | * | yglukhov joined #nim |
20:27:55 | Varriount | Subspice: Could you do a search for iconv on your system? |
20:28:53 | Varriount | 'find / -name "*iconv*" ' should do it, I think. |
20:28:59 | Subspice | I'll try |
20:29:02 | Subspice | ok |
20:29:22 | Varriount | Either that or 'find / -name *iconv* ' |
20:29:45 | Varriount | I can't remember if find will ignore the double-quotes or not. |
20:30:30 | asdf | you do need to quote the *foo* because otherwise your shell will expand that before even running the find |
20:30:57 | Subspice | waiting... |
20:31:35 | Varriount | Subspice: You might get some permission errors, which is expected (unless you're running as root) |
20:31:54 | Subspice | I did... I uhh... I sudo'd |
20:32:04 | Varriount | Yeah, that works too. |
20:32:11 | Subspice | ok two results so far |
20:32:56 | Subspice | found iconv-lite which is probably not what I'm looking for... and... libiconv.2.dylib... ok more results in... many more haha |
20:33:27 | Subspice | I'm looking for iconv_open right? |
20:33:52 | Varriount | Subspice: Nope. That's a function name that's part of the dll. |
20:33:56 | Subspice | okay |
20:35:01 | Varriount | Subspice: The error means that libglib isn't finding the function, either because it can't load libiconv, or because the version of libiconv that's being loaded doesn't have the function. |
20:35:14 | Subspice | Ahaa okay |
20:35:24 | Varriount | asdf: Any insights into the situation? |
20:35:47 | asdf | uh, not really, sorry, just chimed in there on the thing |
20:36:11 | Varriount | I feel like a blind person leading another blind person. :/ |
20:37:43 | Varriount | Subspice: When it's done, could you find which results are in directories in the LD_LIBRARY_PATH environment variable? |
20:38:34 | Subspice | Sure. How can I check what directories are in there? |
20:39:25 | ldlework | Subspice: its an environment variable, just echo it |
20:39:28 | Subspice | $LD_LIBRARY_PATH? |
20:39:28 | Varriount | Uh, manually I think. 'echo $LD_LIBRARY_PATH' will echo the paths needed |
20:39:29 | ldlework | echo $LD_LIBRARY_PATH |
20:39:31 | Subspice | oh ok |
20:40:32 | gokr | Araq: There is a funny library in Unix called "libiberty". |
20:40:45 | gokr | Perhaps you know about it. |
20:43:45 | Araq | sounds familiar |
20:44:01 | gokr | So ... when you link with it... you strip off "lib" and add "-l" in front. Muaha. |
20:45:45 | gokr | Subspice: You can use "otool -L which `aporia`" I guess (don't have the mac up) |
20:46:04 | Subspice | gokr: what does that do? |
20:46:06 | gokr | otool -L is the equivalent of "ldd" in Linux land. |
20:46:18 | gokr | So it will list the dylibs and their paths that Aporia wants to load. |
20:46:36 | Varriount | gokr: Including the backticks? |
20:46:50 | * | Araq wonders if there is also a libosers library. |
20:47:04 | Subspice | Varriount: Alright, the search is done... do I have to find which results are in the relevant directories manually? |
20:47:10 | gokr | Eh, the backticks was for the which command... but whatever, use: "otool -L full-path-to-aporia" |
20:47:14 | Subspice | :P |
20:47:47 | * | tyu quit (Quit: Connection closed for inactivity) |
20:48:10 | gokr | Subspice: Worked? |
20:48:26 | gokr | Are you using brew btw? |
20:48:39 | * | gokr realizes this will lead me to start up my mac soon... |
20:48:46 | Subspice | error: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/otool: can't open file: which (No such file or directory) |
20:48:46 | Subspice | error: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/otool: can't open file: aporia (No such file or directory) |
20:48:55 | gokr | Ah, sorry about that. |
20:48:59 | gokr | Ok, so run "which aporia" |
20:49:10 | Subspice | nothing happens |
20:49:15 | gokr | And then when you see its full path, run: otool -L whatever-the-full-path-is |
20:50:32 | Subspice | nothing happens when I type in 'which aphoria' |
20:50:39 | gokr | aporia. |
20:50:45 | Subspice | sorry aporia |
20:50:50 | Subspice | yeah nothing happens |
20:51:05 | gokr | Eh. Or is it alled Aporia? Hell, I will start a mac here... |
20:51:10 | gokr | Are you using brew? |
20:51:16 | Varriount | Subspice: Could you just type in the path you know aporia is in? |
20:51:29 | Subspice | gokr: no, just the regular terminal |
20:51:52 | gokr | How did you install aporia? with nimble? |
20:51:58 | Subspice | Varriount: I mentioned before that I seem to find aporia in two places |
20:52:16 | Subspice | gokr: yes |
20:52:23 | Varriount | Subspice: I'm going to guess one is a link. Could you post the two paths? |
20:52:51 | Subspice | sure |
20:53:14 | gokr | Yeah, nimble puts in a link in nimble's bin dir |
20:54:09 | Varriount | gokr: Does it matter which path then? The whole purpose of a symlink is to act as if the real file is there. |
20:54:29 | Subspice | here they are: /Users/Subspice/.nimble/pkgs/aporia-0.2.0/ and /Users/Subspice/.nimble/bin |
20:55:01 | gokr | Varriount: On Linux it doesn't matter, right. |
20:55:08 | gokr | Pobably doesn't matter on OSX either. |
20:55:23 | gokr | So run "otool -L /Users/Subspice/.nimble/pkgs/aporia-0.2.0/aporia" |
20:55:26 | Subspice | probably not, opening either does exactly the same thing |
20:55:28 | Subspice | alright |
20:55:45 | gokr | And it should hopefully show you some dylib paths. |
20:56:00 | Subspice | Users/Subspice/.nimble/pkgs/aporia-0.2.0/aporia: |
20:56:00 | Subspice | /usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 1226.10.1) |
20:59:08 | gokr | And nothing more? |
20:59:31 | Subspice | nothing else |
20:59:34 | Subspice | just that |
21:00:08 | gokr | I am building nim on my OSX - did you build it from github? |
21:00:31 | Subspice | yes |
21:00:55 | gokr | Ok, so... I will catch up with you :) |
21:00:59 | Varriount | gokr: Don't Nim programs use manual dynlib loading? That wouldn't show up with otool. |
21:01:10 | * | Varriount wants a copy of OSX |
21:01:11 | gokr | Varriount: Could be, dunno. |
21:01:30 | gokr | Varriount: There is actually a working OSX for vbox - not that... legal of course. |
21:02:39 | Varriount | :( |
21:05:49 | gokr | Just google for niresh osx. |
21:08:20 | * | BitPuffin quit (Ping timeout: 248 seconds) |
21:12:36 | ldlework | What is the thing that generates Nim documentation? |
21:12:56 | Araq | 'nim doc2' |
21:13:28 | ldlework | It wants a filename... but I have no entrypoint. |
21:14:12 | Varriount | ldlework: What target do you give 'nim c'? |
21:14:32 | ldlework | Varriount: I don't. Its a library. |
21:14:34 | gokr | Subspice: Just FYI, I failed building aporia |
21:14:40 | ldlework | Some other code imports my code and you compile that. |
21:14:44 | gokr | Subspice: So I probably need some libs. |
21:14:50 | Subspice | gokr: what libs were you missing? |
21:15:01 | Subspice | that's weird, building aporia worked for me... |
21:15:01 | gokr | 1 sec |
21:15:03 | Subspice | ok |
21:16:05 | Varriount | ldlework: But you still have to compile it somehow. |
21:16:24 | gokr | Subspice: Can't open dialogs for some reason |
21:16:31 | ldlework | Varriount: why? |
21:16:47 | ldlework | Its code |
21:22:40 | gokr | Subspice: Ok, so I opted for the "latest" of aporia, and that built. And now I have the libglib error. |
21:23:00 | Subspice | hmmm :/ |
21:23:22 | gokr | But... I will install homebrew on this box and see if I can get it that way |
21:24:30 | Varriount | ldlework: Yes.. but it still has to be compiled into a library, right? |
21:24:52 | Varriount | I mean, you can't use doc2 on a compiled file and expect the documentation to still be generated. |
21:25:19 | ldlework | Varriount: I was thinking the equivalent of `ls dadren/*.nim | xargs nim doc` |
21:25:25 | ldlework | which works fine without having a global entrypoint |
21:25:36 | ldlework | which makes no sense for library code |
21:25:59 | Varriount | ldlework: Even a Nim library still has a central file which pulls in the rest. |
21:26:09 | ldlework | Varriount: says who? |
21:26:28 | Varriount | ldlework: Oh! I was thinking a dynamic library, not a source code library. |
21:26:28 | ldlework | Its library /code/ |
21:26:31 | ldlework | heh |
21:26:56 | Varriount | Well then, you run it against the public facing modules, or create a stub module. |
21:27:03 | ldlework | xargs worked well |
21:31:15 | ldlework | actually it didn't |
21:31:16 | ldlework | wtf |
21:34:11 | ldlework | no idea why `ls -1 dadren/*.nim | xargs nim doc` wont work |
21:34:26 | ldlework | Error: arguments can only be given if the '--run' option is selected |
21:35:46 | ldlework | there we go |
21:36:09 | Varriount | gokr: Subspice's problem seems to be with libiconv |
21:36:29 | Varriount | gokr: The dll doesn't appear to contain inconv_open, just _iconv_open |
21:36:47 | Varriount | It's related to encodings.nim |
21:36:51 | gokr | Yeah, well, I now installed homebrew and had to install pango, glib ... |
21:37:05 | gokr | So I am not at iconv yet :) |
21:37:18 | ldlework | What tool will allow me to write prose base docs like the manual? |
21:37:30 | ldlework | I just found, http://nim-lang.org/docs/docgen.html sorry |
21:38:43 | * | mat4 joined #nim |
21:39:14 | * | Matthias247 quit (Quit: Matthias247) |
21:40:15 | * | Matthias247 joined #nim |
21:42:41 | ldlework | Hmm I don't understand how to pass multiple files to doc2 |
21:45:22 | * | toaoMgeorge quit (Read error: Connection reset by peer) |
21:48:22 | Araq | ldlework: nim doc2 --project myproject.nim might work but I don't think anybody uses it ... |
21:48:38 | ldlework | what is myproject.nim ? |
21:48:57 | Araq | the main nim file you pass to Nim, usually to 'nim c' |
21:49:09 | * | Demon_Fox joined #nim |
21:49:33 | ldlework | -.- |
21:49:38 | gokr | Subspice: The issue has been discussed in the forum, for example at: http://forum.nim-lang.org/t/706/4 |
21:49:42 | ldlework | find . -name '*.nim' -exec nim -p=. doc2 '{}' \; seems to do the trick |
21:50:17 | Araq | ldlework: yeah, our koch tool uses something similiar |
21:50:23 | gokr | So my advice: install homebrew, then do "brew install glib pango gtksourceview gdk-pixbuf" and what not- |
21:50:39 | ldlework | needs an output directory flag |
21:51:40 | gokr | Perhaps... "brew install gtksourceview libiconv" is enough if you are on a non-borken system like I am. |
21:51:56 | * | awsteele joined #nim |
21:52:35 | * | lompik quit (Ping timeout: 240 seconds) |
21:53:44 | * | lompik joined #nim |
22:00:25 | ldlework | yay documentation! |
22:00:27 | ldlework | so cool |
22:09:51 | * | nsf joined #nim |
22:12:24 | ldlework | How do I inject prose based rest files into my documentation? |
22:12:31 | ldlework | or do I just compile them like nim files |
22:12:51 | gokr | Subspice: I gotta give up, it seems to be fairly complex to get this going, see https://gist.github.com/oderwat/8cc8c4679729e9e8c1c6 |
22:13:15 | Subspice | gokr: I've been letting Varriount work on it, when they give up I give up haha |
22:13:31 | Subspice | they've occupied my computer |
22:13:39 | Subspice | Nim Invaders |
22:13:44 | Varriount | muahahaha! |
22:13:49 | Subspice | ;D |
22:14:16 | ldlework | lol |
22:14:28 | Subspice | so even if you can't figure out how to solve it, have you learned anything from this? |
22:14:37 | Subspice | like does this help anyone? |
22:14:46 | Varriount | I've learned what the 'nm' utility does. |
22:15:02 | Varriount | Although not what 'nm' stands for. |
22:16:29 | Subspice | XD |
22:16:46 | Varriount | Subspice: Tip for the future - Don't ever try to install IntelliJ, Pycharm, or any of the Jetbrains IDE's. They'll probably make your computer melt. |
22:17:33 | Subspice | Varriount: have I done that? |
22:18:14 | Subspice | I've done all sorts of things to my computer |
22:18:14 | Subspice | hahaha |
22:18:24 | Varriount | I don't think so. |
22:18:50 | Subspice | I'm purely a hobby programmer |
22:18:51 | Varriount | As nice as Jetbrain's IDE's are, they are all written in Java. |
22:19:09 | Subspice | I try not to do stuff that goes beyond what works for my hobby |
22:19:12 | Varriount | Which, when it comes to memory, is rather... needy. |
22:19:22 | Subspice | I've heard... and read... a bit about that |
22:20:28 | ldlework | kinda silly that the rst2html docs generate a "$Name module" header |
22:21:54 | * | vendethiel quit (Ping timeout: 256 seconds) |
22:24:53 | mat4 | Java is a nice language except for ressource effective applications, system programming, computer games, scientific programming, hardware control and positive thinking (in my opinion) |
22:25:27 | gokr | Subspice: Aporia works great on Linux :) |
22:26:07 | gokr | And Nim works fine on OSX too - but Aporia is another story. |
22:28:13 | * | filwit_ joined #nim |
22:28:56 | def- | gokr: gtk is problematic on OSX and Windows or is this about something else? |
22:29:10 | gokr | True, gtk. |
22:29:32 | gokr | And... googling indicates its perhaps not even gtk itself either, but the packaging of it in homebrew etc. |
22:29:41 | def- | Not a Nim-specific problem though, had the same troubles with Haskell: http://felsin9.de/nnis/ghc-vis/#installation |
22:29:50 | gokr | exact |
22:30:04 | def- | (compare the Linux instructions to Win and OSX) |
22:30:05 | gokr | But it still means... aporia is not easy to get running on OSX. |
22:30:29 | def- | right, but I don't know much about UIs so no idea what to use to get a good GUI on each platform |
22:30:35 | * | filwit quit (Ping timeout: 240 seconds) |
22:30:40 | ldlework | the links that the docgen generates make no sense |
22:30:43 | ldlework | they are relative |
22:31:00 | ldlework | if they are in a submodule that is |
22:31:13 | Subspice | this community... http://orig10.deviantart.net/1499/f/2011/265/a/3/profile_picture_by_sirslicerplz-d4an7x1.png |
22:31:14 | ldlework | if the import is like dadren/application.nim |
22:31:16 | def- | ldlework: --docSeeSrcUrl might help? |
22:31:31 | def- | ldlework: eh wait, that's the wrong one |
22:31:36 | ldlework | then links on to that module will be dadren/application.html |
22:31:42 | ldlework | but you're already at dadren/foo.thml |
22:31:51 | ldlework | so it will be dadren/dadren/application.html |
22:31:56 | def- | ldlework: you can fix it! |
22:32:41 | ldlework | does nim have relative imports |
22:32:55 | ldlework | should I be importing modules from the same package as packagename/modulename or as ./modulename |
22:32:56 | def- | ldlework: import ../foo works |
22:33:02 | ldlework | .. ? |
22:33:32 | def- | sure, parent directory |
22:34:09 | * | gokr about to try out a new blink.nim on the ARM LinkIt ONE with GC enabled... |
22:34:22 | gokr | Araq: I have myself a binary ;) |
22:34:37 | ldlework | lol |
22:34:43 | ldlework | that indeed fixes the docgen |
22:35:49 | Araq | gokr: you mean one that doesn't crash? |
22:36:06 | gokr | I mean it compiled. |
22:36:45 | gokr | Wohoo! It blinks. |
22:37:37 | * | Guest41777 quit (Remote host closed the connection) |
22:38:10 | * | Heartmender joined #nim |
22:38:32 | * | Heartmender is now known as Guest54166 |
22:40:06 | Araq | :D |
22:40:11 | mat4 | gokr: nice |
22:41:42 | mat4 | what was the problem with the GC (if at all) ? |
22:43:12 | Subspice | wow I feel like I can relax |
22:44:07 | Araq | mat4: it was never tested without an OS |
22:44:13 | Subspice | so what kind of things do you guys use Nim for? |
22:45:35 | mat4 | Araq: now it is :) |
22:47:05 | ldlework | Subspice: wait you got it working? |
22:47:14 | ldlework | Aporia that is? |
22:47:18 | Subspice | ldlework: nope! |
22:47:20 | ldlework | heh |
22:47:21 | Subspice | we gave up |
22:47:31 | Subspice | I got sublime text instead |
22:47:38 | ldlework | Subspice: Araq is working on a Nim editor called Nimedit |
22:47:43 | ldlework | its written using just SDL2 |
22:47:48 | Subspice | I installed that one to |
22:48:06 | ldlework | but yeah subline is nice |
22:48:07 | Subspice | too* |
22:48:17 | Subspice | I'll try both and see which way I swing |
22:48:36 | Subspice | but that's kind of minor compared to the fact that tomorrow when I wake up |
22:48:45 | Subspice | I'll finally get to write some code! |
22:51:37 | Varriount | Subspice: You can always use nano |
22:51:50 | Subspice | nano? |
22:52:00 | Varriount | Simple command-line text editor. |
22:52:08 | Subspice | oh ok |
22:52:24 | Varriount | nano <somefile> to open or create a new file. |
22:52:38 | ldlework | Varriount: .. do you use nano |
22:53:03 | gokr | nano is great. And I am not afraid to say so. |
22:53:04 | Subspice | oh neat |
22:53:08 | Varriount | ldlework: For non-gui needs, yes. |
22:53:09 | Subspice | that's what you were doing towards the end! |
22:53:14 | Subspice | well the very end actually |
22:53:19 | ldlework | huh |
22:53:37 | Subspice | ldlework: Varriount invaded my computer for an hour or two |
22:53:41 | ldlework | I hear :) |
22:53:44 | Varriount | ldlework: I like that it actually tells me how to exit it, unlike vi |
22:53:50 | gokr | Araq: I threw in some trivial seq and string things, and it blinks on. |
22:53:55 | Subspice | I let him use my terminal, I even let him sudo something once |
22:53:59 | ldlework | Varriount: if you like nano, those bindings are basically the default emacs bindings |
22:54:14 | ldlework | emacs is basically the same, it has buffers with text. you open and close them and sometimes save them. |
22:54:18 | ldlework | non-modal like nano. |
22:54:24 | Subspice | https://s-media-cache-ak0.pinimg.com/236x/85/17/d7/8517d7876dfcb84dfc2a48f60b647992.jpg |
22:54:29 | ldlework | but sometimes emacs will highlight the code you're editing and other stuff :) |
22:55:14 | gokr | Araq: Should we perhaps do something about dealloc? :) |
22:56:38 | gokr | I will save that one for my fridge door: "ldlework on the subject of nano: Emacs is basically the same" |
22:56:51 | ldlework | gokr: in terms of core bindings? |
22:56:54 | ldlework | it is. |
22:57:02 | ldlework | And it is the same in that both editors are just buffers of text. |
22:57:11 | ldlework | you can always just move a cursor and edit text |
22:57:46 | awsteele | It's not clear to me how to reconstruct a closure from system.rawProc and system.rawEnv, any pointers? (no pun intended.. maybe) |
22:58:01 | ldlework | heh |
22:58:34 | ldlework | I should probably learn this nimscript business |
22:59:26 | Araq | awsteele: you need to cast the rawProc to the proper .cdecl proc type |
22:59:41 | Araq | the env should be 'env: pointer' as the last parameter of the proc type |
23:00:29 | awsteele | something like "let cb = cast[proc(json: JsonNode, e: pointer): JsonNode {.cdecl}](rawP)" ? |
23:00:52 | awsteele | Missing a period at the end of that pragma, oops |
23:01:07 | ldlework | Is there a way for nimscript tasks to take parameters? |
23:01:21 | gokr | https://xkcd.com/378/ |
23:01:23 | mat4 | ldlework: Emacs is one of the largest editor I know [inclusive Lisp interpreter ... and OS ;)] |
23:01:33 | ldlework | mat4: yes? |
23:01:46 | ldlework | Does that counter-point anything I said lol ? |
23:02:15 | gokr | mat4: No point, he just ... sortof proves the point ;) |
23:03:45 | * | yglukhov quit (Remote host closed the connection) |
23:04:03 | mat4 | sorry, what point (probably I tranlate the message wrong) ? |
23:06:31 | gokr | Well, the emacs user refusing to see the humor in even beginning to compare nano with emacs. |
23:07:56 | Varriount | mat4: Part of the joke is the ever-growing absurdity of what a 'real' programmer is. |
23:09:10 | Araq | awsteele: seems right, yeah |
23:09:23 | awsteele | Just tried, works perfectly :) thank you very much! |
23:10:28 | Araq | ldlework: you can access the command line in a task or use a helper proc that the tasks delegate to, depending on what you need |
23:11:37 | mat4 | Varriount: You mean such programmers which write programs in machine code by using front panels ? |
23:13:00 | Varriount | mat4: It's more about the hyperbole shown in the comic. |
23:13:11 | Varriount | But yes, something like that. |
23:14:09 | * | yglukhov joined #nim |
23:15:21 | * | mat4 study comics about real (weird) programmers |
23:39:39 | * | Trustable quit (Quit: Leaving) |