00:14:17 | * | vendethiel quit (Ping timeout: 240 seconds) |
00:36:58 | * | vendethiel joined #nim |
00:38:08 | * | nande joined #nim |
00:42:36 | * | Hitman10666 joined #nim |
00:42:45 | * | Hitman10666 left #nim (#nim) |
00:44:18 | * | anthgur quit (Quit: My Mac has gone to sleep. ZZZzzz…) |
00:44:24 | * | jaco60 quit (Ping timeout: 246 seconds) |
00:44:24 | * | elbow quit (Read error: Connection reset by peer) |
00:44:39 | * | elbow joined #nim |
00:47:13 | * | quasinoxen joined #nim |
00:49:35 | * | quasinoxen left #nim (#nim) |
00:58:54 | * | vendethiel quit (Ping timeout: 250 seconds) |
01:07:36 | * | mtj_ quit (Ping timeout: 256 seconds) |
01:11:28 | * | anthgur joined #nim |
01:22:27 | * | mtj_ joined #nim |
01:27:52 | * | lokulin quit (Ping timeout: 265 seconds) |
01:35:04 | * | sparrk joined #nim |
01:55:19 | * | lokulin joined #nim |
02:12:17 | * | sparrk quit (Quit: Leaving) |
02:18:53 | * | arnetheduck joined #nim |
02:55:19 | * | ChrisMAN quit (Remote host closed the connection) |
03:23:20 | * | anthgur quit (Quit: My Mac has gone to sleep. ZZZzzz…) |
03:39:08 | * | gmpreussner|work quit (Read error: Connection reset by peer) |
03:39:32 | * | gmpreussner|work joined #nim |
03:54:49 | * | darkf joined #nim |
04:22:06 | * | darkf quit (Ping timeout: 248 seconds) |
04:26:40 | * | darkf joined #nim |
04:32:24 | * | nande quit (Ping timeout: 244 seconds) |
04:32:45 | * | nande joined #nim |
04:37:01 | * | vendethiel joined #nim |
04:40:06 | * | nande quit (Read error: Connection reset by peer) |
04:41:23 | * | nande joined #nim |
04:55:31 | * | EXetoC quit (Ping timeout: 256 seconds) |
04:57:17 | * | nande quit (Read error: Connection reset by peer) |
04:58:32 | * | nande joined #nim |
05:01:47 | * | nande quit (Remote host closed the connection) |
05:44:12 | * | strcmp1 quit (Ping timeout: 264 seconds) |
05:47:55 | * | onionhammer quit (Ping timeout: 246 seconds) |
05:53:50 | * | vendethiel quit (Ping timeout: 248 seconds) |
05:54:24 | * | dtscode quit (Ping timeout: 264 seconds) |
05:56:59 | * | vendethiel joined #nim |
06:18:01 | * | vendethiel quit (Ping timeout: 246 seconds) |
06:18:49 | * | dtscode joined #nim |
06:28:30 | * | dtscode quit (Ping timeout: 265 seconds) |
06:32:51 | * | dtscode joined #nim |
06:36:20 | * | vendethiel joined #nim |
06:48:01 | * | jszymanski joined #nim |
06:59:40 | * | vendethiel quit (Ping timeout: 246 seconds) |
07:00:43 | * | jszymanski quit (Ping timeout: 246 seconds) |
07:13:47 | * | EXetoC joined #nim |
07:41:39 | * | vendethiel joined #nim |
07:49:45 | * | filcuc joined #nim |
08:10:55 | * | jszymanski joined #nim |
08:50:39 | * | Matthias247 joined #nim |
08:54:51 | * | bjz quit (Quit: My MacBook Pro has gone to sleep. ZZZzzz…) |
09:13:19 | * | jaco60 joined #nim |
09:14:28 | * | johnsoft quit (Ping timeout: 264 seconds) |
09:14:43 | * | Trustable joined #nim |
09:20:18 | * | bjz joined #nim |
09:31:58 | * | EXetoC quit (Ping timeout: 250 seconds) |
09:39:16 | * | BitPuffin|osx quit (Ping timeout: 246 seconds) |
09:51:59 | * | vendethiel quit (Ping timeout: 265 seconds) |
09:53:33 | * | vendethiel joined #nim |
10:05:45 | * | unclechu joined #nim |
10:08:09 | reactormonk | Araq, from what I see, the docgen doesn't even know if an identifier is a type or not - how do I figure that out? |
10:24:43 | * | Sembei quit (Quit: WeeChat 1.2-dev) |
10:40:33 | * | Sembei joined #nim |
10:50:42 | * | boopisaway quit (Ping timeout: 260 seconds) |
11:02:46 | Araq | reactormonk: nim doc2 has the typechecked AST. if n.kind == nkSym and n.sym.kind == skType would be the check |
11:29:44 | * | xificurC quit (Read error: Connection reset by peer) |
11:32:14 | * | xificurC joined #nim |
11:36:43 | * | xificurC quit (Ping timeout: 256 seconds) |
11:50:19 | reactormonk | Araq, the code that generates the stuff is in docgen, so not doc2 - is it find the break nim doc? |
11:53:41 | * | bjz quit (Max SendQ exceeded) |
11:54:12 | Araq | compiler/docgen.nim is used by both doc and doc2 |
11:54:28 | * | bjz joined #nim |
11:54:31 | reactormonk | Does doc have a typechecked AST? |
11:54:51 | * | [CBR]Unspoken quit (Ping timeout: 256 seconds) |
11:57:33 | Araq | whether you have a typechecked AST or not is the 'n.kind == nkSym' check |
11:58:15 | Araq | for doc2 it has a typechecked ast, for 'doc' it has not |
11:58:32 | Araq | so you need to check it at runtime because the same code is used for both |
12:00:14 | reactormonk | Hm, sounds ugly, but eh. What do we still need doc2 for? |
12:00:17 | reactormonk | ehh doc |
12:01:15 | reactormonk | Araq, btw, what do you think of using var/non-var overloading for in-place modification/copy? |
12:09:58 | * | [CBR]Unspoken joined #nim |
12:11:16 | * | jszymanski quit (Ping timeout: 244 seconds) |
12:12:26 | * | jszymanski joined #nim |
12:19:19 | Araq | reactormonk: it cannot really work |
12:19:26 | Araq | var x = "foo" |
12:19:34 | Araq | chomp(x) # ok |
12:19:53 | Araq | echo chomp(x) # dammit, don't call the 'var' version that returns void |
12:22:31 | * | boopisaway joined #nim |
12:31:21 | * | xet7 quit (Ping timeout: 244 seconds) |
12:42:20 | * | boopisaway is now known as boop |
12:43:19 | * | johnsoft joined #nim |
12:43:55 | boop | hmmmm, does nim automatically create a proc called [filename]Init()? |
12:45:17 | boop | :( |
12:45:22 | boop | is there any way to rename that proc? |
12:51:21 | * | MatrixBridge quit (Read error: Connection reset by peer) |
12:51:29 | * | MatrixBridge joined #nim |
12:51:35 | Araq | boop: create a bug report please |
12:51:41 | Araq | very easy to fix |
12:51:50 | bogen | Araq: For the JS backend the reason callbacks to closure forming local functions is working is because the function definitions were generated in place (nested). Since JS fully supports closures, it all "just works" without support from the Nim JS codegen. |
12:54:53 | * | xet7 joined #nim |
12:56:57 | boop | Araq: done https://github.com/nim-lang/Nim/issues/3134 |
13:56:18 | * | xificurC joined #nim |
14:20:43 | * | Matthias247 quit (Read error: Connection reset by peer) |
14:58:30 | * | unclechu quit (Remote host closed the connection) |
15:09:47 | * | lokulin quit (Ping timeout: 256 seconds) |
15:15:50 | * | BitPuffin|osx joined #nim |
15:26:04 | * | lokulin joined #nim |
15:37:59 | * | favalex joined #nim |
15:45:49 | * | _stowa quit (Remote host closed the connection) |
15:48:42 | * | _stowa joined #nim |
15:56:25 | boop | Araq: thanks! :) |
16:15:00 | Learath2 | how does https://github.com/nim-lang/nimbot/blob/master/src/nimbot.nim#L92 work ? |
16:15:23 | Learath2 | the callback is normaly expected to have 2 parameters but that seems to make it carry a third around |
16:15:49 | * | EXetoC joined #nim |
16:17:58 | * | filcuc quit (Quit: Konversation terminated!) |
16:36:46 | Learath2 | apparently its called an anonymous procedure and i had to dig alot to find what it was :P |
16:40:42 | federico3 | can the SDL2 load an opengl "model" from file? |
16:40:48 | fowl | Learath2 a closure |
16:41:46 | fowl | federico3 theres no such thing as an opengl model, assimp is a library that can open just about anything |
16:43:00 | fowl | federico3 it only loads the model data, theres an example of how to send it to opengl |
16:48:39 | boop | hmmm - how should i handle GC in procs that are called by C? |
16:49:08 | boop | actually back up- http://hastebin.com/ecadoyecuf.rb |
16:49:21 | boop | what's this? i'm thinking i've run out of memory or something but i'm not sure |
17:15:11 | boop | that's after 30 calls from outside nim, if i use markAndSweep GC it gets as far as 1360 before spitting out the same error |
17:21:26 | boop | and v2 gets to 27 |
17:21:27 | boop | hm hm |
17:22:34 | reactormonk | Araq, the var version could return as well |
17:22:51 | * | Trustable quit (Remote host closed the connection) |
17:23:52 | federico3 | fowl: thanks |
17:24:50 | reactormonk | so we could do chaining as well, and have some macro that simply calls a copy constructor and creates a non-var version of the proc |
17:27:42 | Araq | reactormonk: no no no no. |
17:28:58 | Araq | boop: depends on what you're doing |
17:29:03 | reactormonk | Hum, not sure how to do the types part... the non-functional design makes it hard to hook code in - just create lots of data along the side and merge them at the end? |
17:29:23 | boop | Araq: digging around... |
17:29:44 | reactormonk | aka n.sym == nkSym etc. and if true, add it to a list, then return that list at the end of genItem to create a global index? |
17:29:58 | boop | i have this type which is an ref to an object which is just contains a seq[string] and a StringTableRef |
17:30:07 | boop | and a proc that creates that from a string |
17:30:19 | boop | and i'm calling a proc from outside nim that calls this proc |
17:30:31 | boop | and.. that seems to be enough to mess it up, given enough iterations |
17:30:58 | reactormonk | ah, the indexfile works via rst - hmm. |
17:31:32 | Araq | boop: did you read this http://nim-lang.org/docs/backends.html#backend-code-calling-nim-nim-invocation-example-from-c ? |
17:31:45 | reactormonk | Araq, why the aversion on var overload? |
17:32:15 | Araq | reactormonk: var x = chomp(y) # modifies 'y'. |
17:32:27 | reactormonk | Araq, ... yup. |
17:32:35 | Araq | var x = chomp("hello\n") # doesn't modify "hello\n" |
17:32:58 | reactormonk | that's static eval anyway? |
17:33:04 | reactormonk | aka at compiletime |
17:33:44 | Araq | so the behaviour depends on the var-ness of the passed argument. that's just silly. |
17:33:48 | boop | Araq: huh nope, never seen that... i'm doing -app:lib and not using --noMain or --noLinking, would that make much of a difference? |
17:33:51 | boop | and not exporting a header file |
17:34:25 | Araq | boop: well if you don't setup Nim's GC properly from GC then don't expect things to work |
17:34:32 | Araq | *from C |
17:34:38 | * | boop nods |
17:34:43 | reactormonk | Yup, and that sounds good to me. Maybe add a proc c[T](c: var T): T that creates a non-var version of a variable for chaning |
17:34:47 | boop | does that just entail calling NimMain()? |
17:35:14 | Araq | according to the docs yes. I'm not so sure |
17:35:26 | Araq | reactormonk: that's awful. |
17:35:27 | boop | i was reading the stuff here http://nim-lang.org/docs/manual.html#foreign-function-interface |
17:35:30 | boop | i'll give it a shot! |
17:36:27 | reactormonk | Araq, an ide can highlight you var vars and let vars correctly, so it should be easy to see |
17:37:55 | Araq | reactormonk: contrary to what you might believe, I don't start with a bullshit design and then use IDE technology to patch over it |
17:38:06 | boop | Araq: seems to work a treat! thanks :) |
17:38:18 | boop | might be worth adding a note to that manual section, though. |
17:40:45 | Araq | var x = "foo" |
17:40:53 | Araq | echo($x) |
17:40:58 | Araq | var y = 90 |
17:41:14 | Araq | echo($y) # overloading used to get the *same* behaviour. |
17:41:20 | Araq | var x = "foo" |
17:41:24 | Araq | echo chomp(x) |
17:41:32 | Araq | let y = "foo" |
17:41:49 | Araq | echo chomp(y) # overloading used to get ... something else |
17:43:12 | reactormonk | var z = $x # same string? |
17:43:17 | Araq | boop: I recently re-discovered that piece of documentation |
17:43:25 | Araq | ;-) |
17:43:27 | boop | hehe |
17:44:39 | reactormonk | The overloading on var/non-var is orthogonal to type overloading - the type overloading should adhere to the same behaviour (which we can set in stone via concepts if I ever get to them - I'll take a look at that instead of doc I think.) |
17:45:06 | reactormonk | ... and with var/non-var overloading, it's a differen behavior, because it's a different kind of overload. |
17:45:55 | Araq | what is the problem anyway? you cannot accept chomp vs strip? aka different names for different things? |
17:46:41 | reactormonk | It's more of a streamlining idea |
17:46:59 | reactormonk | Or we can just go for "chomp" and "chomped" |
17:47:56 | reactormonk | but chomp/strip is just ugly, have fun finding the other in the docu |
17:48:43 | Araq | we could add cross references in the docs |
17:49:11 | Araq | or we could simply accept the fact that a strutils with a chomp is not suddenly worse than a strutils without a chomp. |
17:50:12 | Araq | or maybe it is worse and we should reject the PR. |
17:51:38 | reactormonk | just checking - none of the two procs have var arguments - so our argument can't really apply to that PR |
17:51:50 | reactormonk | s/our argument/our discussion/ |
17:52:12 | Araq | IMO chomp should take a var argument and there should be no non-var version. |
18:03:22 | wuehlmaus | btw: in perl there was chop which cuts away the last letter or a white space and chomp which only does the latter |
18:05:21 | wuehlmaus | actually there still is both chop and chomp |
18:06:32 | wuehlmaus | whitecase is not correct, chomp deletes a newline |
18:14:46 | * | onionhammer joined #nim |
18:16:33 | renesac | strip and striped would be the best I guess, but backwards incompatible |
18:26:52 | wuehlmaus | for me chop is better than chomp |
18:27:50 | * | darkf quit (Quit: Leaving) |
18:37:07 | federico3 | renesac: adding a keyword to strip? chars="abc" removes any of those chars, str="foo" removes the exact string |
18:55:39 | reactormonk | for compiler booting, any way to get a full stacktrace? |
19:03:16 | * | Jehan_ joined #nim |
19:04:32 | reactormonk | ehh, why the fuck do I get lib/pure/collections/tables.nim(99, 45) Error: undeclared identifier: 'Option' after import options ? |
19:05:44 | reactormonk | code: https://gist.github.com/0b438eed892944e62cd3 |
19:07:15 | Araq | recursive module dependency |
19:08:23 | renesac | federico3: the distinction between strip and striped would be if it returns a new string or do it in-place |
19:09:07 | renesac | but yeah, I just commented on the PR that maybe we can have a strip that accepts an string too |
19:26:07 | reactormonk | Araq, huh? options only goes for typetraits |
19:32:11 | * | Demos joined #nim |
19:36:46 | * | Demos quit (Ping timeout: 248 seconds) |
20:06:16 | * | Strikecarl joined #nim |
20:06:40 | Strikecarl | type mismatch: got (string) |
20:06:40 | Strikecarl | but expected one of: |
20:06:40 | Strikecarl | streams.newFileStream(f: File)streams.newFileStream(filename: string, mode: FileMode) |
20:06:46 | Strikecarl | Woops, welp, that's an error i get |
20:06:46 | Strikecarl | i do |
20:06:50 | Strikecarl | System = getEnv("windir") |
20:06:50 | Strikecarl | HostsFile = System & "\\System32\\drivers\\etc\\hosts" |
20:06:50 | Strikecarl | HostsStream = newFileStream(HostsFile) |
20:07:31 | Strikecarl | Am i using newFileStream() wrong? |
20:08:11 | reactormonk | yup, gotta inject an open in between |
20:08:41 | Strikecarl | o pls |
20:09:04 | Strikecarl | Inject an open, wtf is that supposed to mean, what lib is Open() in? |
20:10:36 | Strikecarl | o |
20:10:40 | Strikecarl | i have another way to do this anyways kek |
20:11:58 | reactormonk | open is string -> File, it's in os |
20:12:50 | Strikecarl | ty |
20:13:14 | Araq | reactormonk: compiler/options vs stdlib's options |
20:14:02 | reactormonk | Araq, ah fuck me. a way to deal with that? |
20:23:36 | * | favalex quit (Quit: Leaving) |
20:26:40 | * | onionhammer quit (Read error: Connection reset by peer) |
20:27:27 | * | flaviu quit (Read error: Connection reset by peer) |
20:28:02 | Araq | reactormonk: yeah but why bother? tables won't use Option[T] :P |
20:28:16 | Strikecarl | Anyone mind helping me? |
20:28:18 | Strikecarl | Source: |
20:28:18 | Strikecarl | http://pastebin.com/raw.php?i=t5zN77bJ |
20:28:39 | Strikecarl | No error on compile, error on run-time: http://i.imgur.com/TAGqUHG.png |
20:30:22 | * | onionhammer joined #nim |
20:30:46 | reactormonk | Araq, you can always rewrite it your way |
20:31:49 | fowl | Strikecarl, http://nim-lang.org/docs/system.html#writeFile,string,string |
20:32:34 | Strikecarl | o |
20:32:38 | fowl | Strikecarl, your parameters are mixed up and the variable names are confusing |
20:32:41 | * | onionhammer quit (Read error: Connection reset by peer) |
20:33:08 | Strikecarl | Welp |
20:33:08 | * | onionhammer joined #nim |
20:33:18 | Strikecarl | Idk why it says "cannot open: stuff here" |
20:33:34 | fowl | Strikecarl, because you're trying to open a line from a host file |
20:33:45 | Strikecarl | wat |
20:33:49 | fowl | HostsFile doesnt name a file, it is the getContents(...) |
20:33:50 | Strikecarl | Im trying to replace it |
20:34:03 | Strikecarl | o |
20:34:51 | * | flaviu joined #nim |
20:35:09 | fowl | HostsLocation is the file name, HostsFile is the contents of http://... |
20:35:20 | Strikecarl | Ye |
20:36:03 | * | jaco60 quit (Ping timeout: 244 seconds) |
20:36:32 | Strikecarl | What's the problem tho. |
20:36:59 | * | jszymanski quit (Quit: computer sleeps...) |
20:37:08 | Strikecarl | Is it the extension? |
20:37:10 | Strikecarl | thing |
20:37:18 | * | jaco60 joined #nim |
20:37:46 | fowl | Strikecarl, you aren't using writefile correct |
20:37:50 | fowl | proc writeFile(filename, content: string) |
20:37:56 | fowl | you are passing it content, filename |
20:39:28 | Strikecarl | ooooooooo |
20:39:36 | Strikecarl | >.< |
20:39:38 | Strikecarl | Works now! |
20:39:39 | Strikecarl | D: |
20:56:53 | * | Strikecarl quit (Quit: http://www.kiwiirc.com/ - A hand crafted IRC client) |
21:17:55 | * | filcuc joined #nim |
21:23:45 | * | Demos joined #nim |
21:31:11 | * | Jehan_ quit (Quit: Leaving) |
21:33:12 | * | Varriount quit (Read error: Connection reset by peer) |
22:00:37 | reactormonk | Araq, so double file in load path means you can't import the second one? |
22:11:25 | * | mrx1 joined #nim |
22:14:40 | * | renesac quit (Ping timeout: 252 seconds) |
22:23:06 | * | Demos quit (Remote host closed the connection) |
22:23:41 | * | Demos joined #nim |
22:27:38 | * | renesac joined #nim |
22:27:44 | * | Matthias247 joined #nim |
22:27:58 | * | Demos quit (Ping timeout: 248 seconds) |
22:53:12 | * | pregressive joined #nim |
22:55:27 | * | Demos joined #nim |
23:08:26 | * | Demos quit (Remote host closed the connection) |
23:08:33 | * | filcuc quit (Quit: Konversation terminated!) |
23:13:59 | * | pregressive quit (Remote host closed the connection) |
23:16:23 | * | boop is now known as boopisaway |
23:21:31 | * | brson joined #nim |
23:28:43 | * | pregressive joined #nim |