00:00:19 | dom96 | nake is pretty freaking awesome, I can finally forget about make completely :) |
00:00:39 | dom96 | fowl-: oh, cool. You got nimkernel to work? |
00:02:33 | EXetoC | it happens when adding the -o switch. "... extccomp.nim(626) CallCCompiler strutils.nim(1143) addf" |
00:02:42 | EXetoC | will open an issue tomorrow |
00:04:37 | * | q66 quit (Quit: Leaving) |
00:06:04 | OrionPK | does nake check file modified times? |
00:07:05 | EXetoC | does it need to if the compiler does? assuming that 'nimcache' is what I think it is |
00:08:02 | OrionPK | hmm, good point. |
00:11:25 | EXetoC | "Warning: The compilation cache is still highly experimental!" |
00:12:21 | dom96 | good night! |
00:22:00 | * | XAMPP-8 quit (Ping timeout: 246 seconds) |
01:08:59 | * | EXetoC quit (Quit: WeeChat 0.4.1) |
01:15:14 | * | XAMPP-8 joined #nimrod |
01:21:44 | reactormonk | dom96, 6 downvotes already ^^ |
01:23:19 | OrionPK | reddit adds fake downvotes |
01:23:43 | OrionPK | apparently to help prevent gaming the vote system |
01:38:19 | * | XAMPP-8 quit (Ping timeout: 276 seconds) |
01:39:36 | * | XAMPP-8 joined #nimrod |
02:27:17 | * | XAMPP_8 joined #nimrod |
02:27:40 | * | XAMPP-8 quit (Ping timeout: 268 seconds) |
02:33:29 | reactormonk | O.o? |
03:08:19 | * | XAMPP_8 quit (Ping timeout: 264 seconds) |
03:11:03 | * | XAMPP_8 joined #nimrod |
04:11:56 | * | XAMPP_8 quit (Ping timeout: 240 seconds) |
04:13:05 | * | XAMPP_8 joined #nimrod |
04:14:42 | * | OrionPK quit (Read error: Connection reset by peer) |
05:23:04 | * | XAMPP_8 quit (Ping timeout: 256 seconds) |
05:23:32 | * | XAMPP_8 joined #nimrod |
06:30:25 | * | XAMPP_8 quit (Ping timeout: 248 seconds) |
07:07:29 | * | Araq_ joined #nimrod |
08:55:48 | * | Boscop quit (Read error: Connection reset by peer) |
08:56:53 | * | Boscop joined #nimrod |
09:26:23 | * | XAMPP_8 joined #nimrod |
09:30:48 | * | XAMPP_8 quit (Ping timeout: 246 seconds) |
10:01:08 | * | EXetoC joined #nimrod |
10:15:17 | * | Araq_ quit (Read error: Connection timed out) |
10:16:45 | * | Araq_ joined #nimrod |
10:35:23 | * | Kektain joined #nimrod |
10:38:19 | Araq_ | hi Kektain, welcome |
10:38:27 | Kektain | Hey :D |
10:38:47 | Kektain | Any chance you have time to help a noob working through the tutorial? |
10:39:05 | Araq_ | not now, sorry, bbl |
10:39:26 | Kektain | ah, no worries |
11:02:03 | * | Kektain quit (Quit: ChatZilla 0.9.90 [Firefox 21.0/20130511120803]) |
11:22:21 | EXetoC | woot |
11:39:43 | * | BitPuffin joined #nimrod |
11:47:54 | EXetoC | BitPuffin: sup |
11:48:24 | * | q66 joined #nimrod |
11:49:48 | BitPuffin | EXetoC: stuff |
11:49:52 | BitPuffin | EXetoC: you? |
11:54:50 | EXetoC | BitPuffin: I'm also doing stuff! |
11:55:25 | BitPuffin | EXetoC: cool! what kind of stuff? |
12:11:48 | EXetoC | BitPuffin: nothing useful, that's for sure, but now it's time to append some bits |
12:12:10 | BitPuffin | EXetoC: well that's vague :) |
12:12:32 | EXetoC | gonna have a go at a basic opengl framework. you kinda get sick of it though, after about the 7th time :> |
12:13:55 | BitPuffin | Hmm! |
12:13:58 | BitPuffin | could be useful |
12:14:11 | BitPuffin | I guess OpenGL is pretty much good as it is, at least when using it from C |
12:16:16 | Araq_ | nimrod is actually better at opengl than C as it uses dead code elimination for the opengl wrapper |
12:16:38 | Araq_ | this means only the extensions you really use are required at runtime |
12:18:18 | BitPuffin | aha, now that's good |
12:18:29 | BitPuffin | you mean like you can when stuff out |
12:18:38 | BitPuffin | and case |
12:18:57 | Araq_ | no I mean the opengl wrapper uses special compiler magic ;-) |
12:19:11 | Araq_ | no need for you to 'when' anything |
12:21:52 | Araq_ | well ... ugh, it's hard to explain |
12:22:19 | Araq_ | ordinary wrappers gain dead code elimination but opengl is a tricky beast with the extensions loaded at runtime |
12:22:37 | Araq_ | but we managed to get it for the opengl wrapper too |
12:24:51 | BitPuffin | well not when I realized (unless you are for example using a windows specific extension if such a thing exists, can't remember), but case! If a certain extension is available at runtime |
12:25:00 | BitPuffin | or maybe you don't need to case either |
12:27:03 | Araq_ | exactly, you don't need to do that either |
12:28:47 | BitPuffin | interesting |
12:29:19 | BitPuffin | will that always work though? Like maybe that breaks some rendering operations |
12:29:56 | EXetoC | BitPuffin: I might as well just abstract away a couple of things |
12:30:34 | EXetoC | like shader loading |
12:30:59 | Araq_ | BitPuffin: can't imagine how it breaks anything, I think you still don't understand me |
12:31:25 | BitPuffin | I do understand |
12:31:30 | BitPuffin | Okay for example |
12:31:50 | BitPuffin | say I'm doing something, I know that I can do it a standard way, but that there is also a better way through the use of an extension |
12:32:08 | BitPuffin | so I'll do if (extension blabla) else blabla |
12:32:17 | BitPuffin | will that still work? |
12:33:31 | Araq_ | sure |
12:34:11 | Araq_ | it's just that the wrapper doesn't load the hundreds of other opengl functions that you *don't* use |
12:34:21 | BitPuffin | at runtime? |
12:34:31 | Araq_ | at compiletime |
12:34:53 | BitPuffin | but how can it know that I'll use the extension then if it depends on what's available at runtime |
12:36:06 | BitPuffin | still wins over C though, so I see your point |
12:36:55 | Araq_ | it's like the wrapper checking your source what functions you call |
12:37:08 | Araq_ | and only these will be bound at program runtime |
12:37:14 | Araq_ | *program startup |
12:45:05 | BitPuffin | Araq_: so then it is a good idea to when platform specific things out |
12:45:49 | BitPuffin | case won't make a difference to what stuff is bound I guess but you still need to do it |
12:46:46 | Araq_ | well yes you still need to check "extension available" at runtime, no way to prevent that |
12:46:53 | BitPuffin | yep |
12:48:09 | BitPuffin | Araq_: any plans to make nimrod js compiler use asm.js? |
12:48:24 | BitPuffin | nimrod to js |
12:49:31 | Araq_ | I looked and asm.js and can't take it seriously |
12:49:34 | Araq_ | *at |
12:50:10 | Araq_ | it's pretty easy to make the codegen emit asm.js once it's ready and stable |
12:54:30 | BitPuffin | Araq_: why can't you take it seriously? |
12:55:39 | Araq_ | |0 # marks as integer. As if that would help a decent JIT. |
12:56:00 | Araq_ | the hard part are the compound types and asm.js doesn't even have a notation for them |
12:56:31 | Araq_ | I heard I'm supposed to use typed arrays for them but then that's not asm.js |
13:07:50 | Araq_ | oh I see they updated the asm.js spec ... :-) |
13:08:00 | Araq_ | so now it mentions typed arrays |
13:30:32 | * | EXetoC is now known as EXetoC_ |
13:55:16 | * | Araq_ quit (Quit: ChatZilla 0.9.90 [Firefox 21.0/20130511120803]) |
14:41:30 | nihathrael | dom96: https://github.com/nimrod-code/Aporia/pull/36 I opened a new PR containig some enhancements for the suggest feature, let me know if there is something you'd like to see differently or improved |
16:05:25 | * | Associat0r quit (Ping timeout: 276 seconds) |
16:14:17 | * | Endy joined #nimrod |
16:41:56 | EXetoC_ | ä |
16:49:15 | * | DAddYE joined #nimrod |
17:05:34 | * | Sergio96_ joined #nimrod |
17:05:53 | * | Sergio96_ is now known as Sergio965 |
17:12:19 | EXetoC_ | fowl-: https://gist.github.com/EXetoC/5902674 that happens if -o is there |
17:12:36 | EXetoC_ | I guess it's a Nimrod bug though. Will try to reduce it later |
17:16:58 | fowl- | EXetoC_, i got the same problem trying to use -o |
17:17:01 | fowl- | you should bug report |
17:17:08 | fowl- | i didnt, because i was sure i was crazy |
17:21:01 | EXetoC_ | yes.. |
17:21:18 | EXetoC_ | will see if I can reduce it though |
17:24:24 | EXetoC_ | shouldn't be too hard because nake isn't very big |
17:28:00 | fowl- | i dont think its in nake, it only comes up if you add -o:something to a shell("nimrod ...") call |
17:43:06 | fowl- | its weird for sure |
17:43:08 | * | fowl- is now known as fowl |
17:45:38 | * | EXetoC_ is now known as EXetoC |
17:45:55 | EXetoC | yes but nake is triggering it |
17:46:31 | Araq | I can trigger it too |
17:46:54 | Araq | I added some 'assert's. now it's gone. Looks like a corruption. :-/ |
17:47:26 | Araq | these are always the most fun |
17:48:15 | Araq | but even then -o ain't working properly |
17:51:53 | Araq | oh no .. I'm wrong |
17:53:58 | * | Sergio965 quit (Ping timeout: 276 seconds) |
17:54:34 | Araq | lol |
17:54:44 | Araq | it's easy to fix :P |
17:55:00 | fowl | what is it |
17:55:26 | Araq | if options.outFile.len > 0: |
17:55:27 | Araq | exefile = options.outFile |
17:55:29 | Araq | elif optGenDynLib in gGlobalOptions: |
17:55:31 | Araq | exefile = platform.os[targetOS].dllFrmt % splitFile(projectFile).name |
17:55:32 | Araq | buildDll = cc[c].buildDll |
17:55:34 | Araq | else: |
17:55:35 | Araq | exefile = splitFile(projectFile).name & platform.os[targetOS].exeExt |
17:55:37 | Araq | buildDll = "" |
17:55:38 | Araq | so if outFile is given buildDll is never set |
17:55:51 | Araq | and the link command building crashes |
17:56:11 | fowl | but when i got the error, i tried running the same command from bash and it worked fine but failed from nake |
17:56:54 | Araq | well nimrod doesn't always run this |
17:57:02 | Araq | you have to use -f to enforce rebuilding |
17:57:12 | Araq | that's what puzzled me too |
17:57:29 | Araq | nimrod crashes but thinks the .exe has been built properly |
17:57:37 | Araq | so it doesn't rerun the linking command |
17:58:14 | * | shafire joined #nimrod |
17:59:33 | EXetoC | oic |
17:59:51 | shafire | hi! |
18:05:09 | Araq | hi shafire |
18:05:41 | fowl | Araq, i still dont see why it worked from bash and not from nimrod |
18:06:08 | Araq | fowl: it didn't work, I'm sure |
18:06:16 | Araq | you got no error message, however |
18:06:30 | Araq | I'm sure it didn't produce an executable |
18:11:09 | nihathrael | is there something similar to items(TStrTable) that does not return an iterator but instead an [open]array? |
18:11:45 | Araq | sequtils.toSeq transforms an interator to a seq |
18:12:21 | Araq | and a seq can be passed to an openarray |
18:14:48 | Araq | so ... we managed to stay on the frontpage of reddit the whole day ... |
18:15:20 | nihathrael | Araq: thanks! |
18:19:54 | * | DAddYE quit (Remote host closed the connection) |
18:22:16 | * | DAddYE joined #nimrod |
18:26:03 | NimBot | Araq/Nimrod master 4aee21e Araq [+0 ±1 -0]: bugfix: -o option doesn't crash the compiler anymore |
18:26:03 | NimBot | Araq/Nimrod master dd0a0d4 Araq [+0 ±2 -0]: fixes #501 |
18:26:30 | nihathrael | Araq: can you take a look at this small change I made to the suggest output, i'm quite unsure if this is the most elegant solution https://github.com/nihathrael/Nimrod/commit/df5091399a23700689efd50158003f2f84709e6f |
18:28:08 | Araq | nihathrael: looks excellent to me; however don't put every "import" on a separate line |
18:28:46 | Araq | also the alphabetical order doesn't make much sense, does it? |
18:28:58 | Araq | instead it should order by "genericness" |
18:29:16 | nihathrael | actually it should sort by usefulness, but that is pretty darn hard to tell on compiler level |
18:29:53 | nihathrael | as someone who is not familiar with an api, it find it a lot easier to read through the suggestions in alphabetical order, especially because that will put similar functions next to each other |
18:30:01 | nihathrael | I find* |
18:30:22 | nihathrael | quite frankly that might be because every other autocompleter I use does it that way |
18:30:56 | Araq | well it surely is better than the random order we had before |
18:31:23 | nihathrael | if you want to see autocompletion done right, check out http://marketplace.eclipse.org/content/codetrails-crowd-recommendation-tools-eclipse#.UdHK8BpZ8RD for java |
18:31:44 | nihathrael | pretty cool project |
18:33:09 | dom96 | hello |
18:33:20 | dom96 | nihathrael: Thank you, again :) |
18:34:21 | Araq | nihathrael: nice idea. very nice. should be easy to implement for Aporia |
18:34:52 | nihathrael | Araq: fixed the import and opened a PR |
18:35:35 | dom96 | argh, people should be talking about Nimrod in the nimkernel reddit thread! |
18:35:52 | nihathrael | i'm thinking of implementing subword matching for Aporia, basically means that it wont use startsWith(), but more like contains() to check for valid items |
18:36:05 | nihathrael | soo if you type foo.bar, you will also get a suggestion for foo.getBar() |
18:36:24 | dom96 | if you do that please make it configurable |
18:36:39 | nihathrael | in the crowd recommender they even made it a regex, so that is pretty powerful, not sure if that is needed though |
18:37:02 | nihathrael | dom96: yea |
18:37:26 | dom96 | why did no one link sergio to nimkernel!? |
18:38:25 | Araq | I didn't remember sergio being interested in kernels, dom96 |
18:39:52 | dom96 | Wasn't he the one who said that he was searching for a language to do os dev in? |
18:41:04 | Araq | dunno |
18:41:19 | dom96 | i'm certain it was |
18:41:34 | Araq | then don't ask ;-) |
18:43:44 | dom96 | but asking is polite :P |
18:44:04 | Araq | nihathrael: you did test your patch, right? |
18:45:00 | nihathrael | that depends on what test means, compile yes, try it on some samples yes. Are there test cases I should be running? |
18:45:39 | Araq | well we have tests for idetools but the auto tester doesn't run them yet either, so it's fine |
18:47:17 | NimBot | Araq/Nimrod master f6007ee Thomas Kinnen [+0 ±1 -0]: Order suggestion output by scope and then by item name. |
18:47:17 | NimBot | Araq/Nimrod master ae72134 Araq [+0 ±1 -0]: Merge pull request #502 from nihathrael/master... 2 more lines |
18:48:11 | nihathrael | nice :) |
18:48:16 | nihathrael | how can I run the tests? |
18:49:33 | Araq | dunno ask Gradha when he's around |
18:59:00 | * | Sergio965 joined #nimrod |
18:59:26 | dom96 | hey Sergio965 |
18:59:33 | Sergio965 | Hey! |
18:59:40 | dom96 | Sergio965: Saw nimkernel? |
18:59:49 | dom96 | https://github.com/dom96/nimkernel |
19:00:38 | Sergio965 | Neat. |
19:00:45 | Sergio965 | I got a little kernel running a while ago as well. |
19:00:53 | Sergio965 | Alas, without error handling. |
19:01:14 | dom96 | in Nimrod? |
19:01:18 | Sergio965 | Indeed. |
19:02:08 | dom96 | Put it on github too. Two little OS' is better than one! :P |
19:03:28 | Sergio965 | I have it on Github now, but in a private repo. |
19:03:47 | dom96 | ahh. |
19:04:16 | Sergio965 | Error handling is done by simply overriding panic? |
19:04:22 | dom96 | So what are your impressions then? Will you write a full OS in Nimrod? :) |
19:04:36 | Sergio965 | I will write a full OS in one of D, Rust, or Nimrod. |
19:04:43 | dom96 | it is now. |
19:04:45 | Sergio965 | Still evaluating the strengths of the languages. |
19:04:46 | dom96 | Although there is more to it. |
19:04:53 | Sergio965 | Currently writing a VM subsystem in each. |
19:04:56 | dom96 | Real exceptions require dynamic memory allocation. |
19:05:22 | Sergio965 | Well, right now, I'm upgrading my bootloader so that it's able to pass a valid Multiboot memory map to my kernels. |
19:05:29 | dom96 | Sergio965: Do you have a blog by any chance where you could share your findings? I would love to read that, especially if Nimrod wins ;) |
19:05:43 | Sergio965 | Hmm, well, it's part of my research. |
19:06:00 | Sergio965 | So I'll write a few papers about it soon. |
19:06:14 | Sergio965 | Thus far, I've only written my thesis proposal. At that point, I hadn't considered Nimrod. |
19:06:48 | Sergio965 | My approach to getting Nimrod to work on Baremetal was quite different from yours, actually. |
19:07:20 | Sergio965 | Did you rewrite system.nim? |
19:08:19 | dom96 | Sergio965: Araq recently fixed --os:standalone so that the C stdlib is not used anymore. |
19:08:27 | Sergio965 | Oh. |
19:08:38 | dom96 | Initially I edited the system.nim until it worked. |
19:08:47 | dom96 | But it was pretty ugly. |
19:08:55 | Sergio965 | What I did was write my own system.c. |
19:08:56 | dom96 | Not to mention it would break easily etc. |
19:09:09 | Araq | dom96: exception handling doesn't require 'ref' in principle |
19:09:10 | dom96 | So I told Araq to fix --os:standalone :P |
19:09:30 | Sergio965 | So I would compile it normally but link with my system.c. |
19:09:31 | Araq | Sergio965: writing C code is never required for Nimrod |
19:09:54 | Sergio965 | Araq: Right, but --os:standalone wasn't working. |
19:10:09 | Sergio965 | So either I rewrote system.nim with would just become system.c or just wrote systemc. |
19:10:10 | Sergio965 | system.c* |
19:12:46 | Araq | fair enough I guess |
19:14:04 | Araq | Sergio965: do you include the GC in your kernel? |
19:14:37 | Sergio965 | I do not. |
19:15:22 | Araq | I think I can get it to work in a kernel but then I'm not sure it really helps anything |
19:15:36 | Sergio965 | It shouldn't be too big of a problem. |
19:15:46 | Sergio965 | I just don't have a VM subsystem yet, so GC is pretty much pointless. |
19:15:58 | Sergio965 | Once I get that going and and can actually allocate/deallocate memory, I'll turn on GC. |
19:16:05 | Araq | nice |
19:16:16 | Araq | --os:standalone is the wrong option then ;-) |
19:16:47 | Sergio965 | That turns of GC as well? |
19:16:49 | Sergio965 | off* |
19:17:09 | Araq | yeah and alloc/dealloc |
19:17:45 | Araq | and pretty much everything else; --os:standalone is also for embedded targets with 16K of RAM |
19:18:57 | Sergio965 | I see. |
19:20:07 | Sergio965 | What would it do if I tried to allocate an object? |
19:20:21 | Araq | Error: system module needs newObj |
19:20:28 | Araq | or something similar |
19:21:01 | Sergio965 | Is there a way to allocate an object on the stack? |
19:21:20 | Araq | sure nimrod's objects are value types |
19:21:38 | Araq | in fact only ref/seq/string do allocate on the GC'ed heap |
19:22:04 | Araq | and of these only 'ref' has to the semantics allow C++-like strings/seqs |
19:22:21 | Araq | and of these only 'ref' has to; the semantics allow C++-like strings/seqs |
19:23:40 | Sergio965 | All objects are allocated on the stack? |
19:23:52 | Sergio965 | Or does it depend on the object's properties? |
19:24:13 | Araq | all objects. |
19:25:02 | Araq | a Nimrod object is pretty much a C struct |
19:25:15 | Sergio965 | What if I need it on the heap? |
19:25:26 | Araq | then you use 'ref object' |
19:25:32 | Sergio965 | Oh I see. |
19:29:29 | Araq | btw once you got a memory subsystem the default system.nim should be fine; just make sure alloc.nim uses your mmap implementation |
19:30:20 | Sergio965 | What libc memory functions do you use? |
19:30:33 | Sergio965 | I assume malloc/free/mmap? |
19:30:45 | Araq | only mmap |
19:31:06 | Sergio965 | What about memcmp/memcpy? |
19:31:31 | Araq | these too but they are often cpu specific builtins, not OS specific |
19:31:47 | Araq | in other words, GCC knows how to generate code for them |
19:32:44 | Araq | oh and C's FILE*, signals and exit() |
19:33:03 | Sergio965 | Yeah, that's gonna take a while. :P |
19:33:17 | Sergio965 | The signals part, really. |
19:33:18 | Araq | well you can disable the FILE* stuff and signals |
19:33:24 | * | zahary joined #nimrod |
19:33:34 | Sergio965 | You spawn processes? |
19:33:38 | Araq | the signals shouldn't be used anymore when you use -d:noSignalHandler |
19:34:00 | Araq | signals really are unimportant |
19:34:12 | Araq | and no, system doesn't spawn |
19:34:21 | Sergio965 | What do you exit? |
19:34:33 | Araq | for fatal errors |
19:34:45 | Araq | dom96's error handler doesn't do that ;-) |
19:35:00 | Araq | but that seems ... risky |
19:35:15 | Sergio965 | So an exit would be a kernel panic? |
19:35:31 | Sergio965 | IE, they're completely unrecoverable? |
19:38:42 | Araq | that's fine yes |
19:39:13 | Araq | it's only used to tell you "array index out of bounds" etc. |
19:41:13 | fowl | i should work on something today |
19:41:19 | fowl | ncurses.nim maybe |
19:44:05 | Sergio965 | fowl: You should write a tutorial on how to use the type system effectively. |
19:44:37 | Sergio965 | I could use that |
19:44:41 | Araq | and the effect system ... |
19:44:48 | Sergio965 | And the effect system which I know nothing of. |
19:45:14 | Sergio965 | Araq: Is there a way to declare data invariants? |
19:45:29 | Sergio965 | (And have them be automatically checked/verified) |
19:45:50 | Araq | Sergio965: no for now there is only 'assert' |
19:46:15 | Araq | and perhaps 'requiresInit' for types counts as well |
19:46:36 | fowl | Sergio965, anything specifically trouble you about it? (the type system) |
19:46:42 | Araq | and the 'not nil' annotation |
19:47:32 | * | zahary quit (Quit: Leaving.) |
19:49:16 | Sergio965 | fowl: I'd simply like a concise, example-driven tutorial on how to enforce safety using Nimrod's type system. |
19:50:11 | Sergio965 | Araq: Why not use the @ syntax to make a non-ref object a ref-object on the fly instead of having to define a new type for it? |
19:50:31 | fowl | Sergio965, whats that mean, enforce safety |
19:50:34 | Araq | Sergio965: don't use 'cast' and 'ptr'. Then you have safety. That's pretty much it ;-) |
19:51:09 | Araq | Sergio965: you can do type x = ref object already |
19:51:29 | fowl | type x = ref object |
19:51:31 | fowl | y: int |
19:51:32 | Sergio965 | Araq: But I don't have any data guarantees. What if I messed up my logic in an extremely subtle way? IE, if I have a database represented as two sequences that should always be the same length, it'd be nice if Nimrod could catch that. |
19:51:39 | fowl | var my_x = x(y: 42) # new ref |
19:51:53 | Sergio965 | fowl: Right, right, I've seen that. |
19:52:25 | Araq | Sergio965: it'd be nice but Nimrod is no theorem prover |
19:53:00 | Sergio965 | Araq: But I mean when declaring/creating the object. IE, if I have type TNode = object value: int, it'd be nice if I could do var node = @TNode(value: 2). |
19:53:13 | fowl | Sergio965, tbh id rather keep that logic in my own domain, the compiler does enough as it is |
19:53:20 | Araq | you can use macros to attach 'asserts' to proc bodies ... that count's as pre/postconditions in my book ;-) |
19:53:35 | Araq | Sergio965: that never happens for me |
19:53:52 | Sergio965 | Araq: It doesn't have to be complicated. All you need is a bit of quantification syntax. |
19:54:06 | fowl | Sergio965, proc `&`* [T] (some: T): ref T = |
19:54:10 | fowl | new result |
19:54:13 | fowl | result[] = some |
19:54:53 | fowl | i wouldnt use @ so you can have a ref seq if you want (@ @[1,2,3] would look weird) |
19:55:20 | Araq | Sergio965: it can easily be done as fowl showed but it happens rarely here so it's not builtin |
19:56:19 | Araq | note there is also 'var' to gain write access for a type |
20:04:29 | Sergio965 | Are there dictionaries/maps/associate arrays in Nimrod? |
20:04:43 | Sergio965 | (dynamic ones) |
20:04:55 | fowl | Sergio965, see the tables module |
20:05:48 | fowl | Araq, chtype acs_map[]; would be var acs_map: ptr array[some num, chtype] right |
20:06:11 | Araq | fowl: right |
20:06:50 | fowl | whats the point of c having [] and pointers if pointers can be accessed with [index] |
20:07:24 | Araq | [] is mostly sugar, fowl |
20:08:13 | Sergio965 | Arrays and Pointers are different types in C. |
20:08:46 | Sergio965 | For example, you cannot do: char s[12]; s += 2. |
20:09:01 | Sergio965 | But you can do: char *s; s += 2. |
20:09:24 | Araq | you can also do: char s[]; s += 2; |
20:09:33 | fowl | but unsized array is always a pointer to the first item |
20:09:36 | Araq | (I think ...) |
20:10:11 | Sergio965 | I don't think you can do that. |
20:10:23 | Sergio965 | You need to give a string after. |
20:10:34 | Sergio965 | Yeah. |
20:10:50 | Sergio965 | char s[] = "Hello"; Will automatically give you a char[6] type. |
20:10:57 | Sergio965 | And you can do + on array types. |
20:11:07 | Sergio965 | fowl: Yeah, but not really. |
20:11:35 | Sergio965 | And you can't* |
20:11:46 | Sergio965 | fowl: Any array is always a pointer to the first element. |
20:12:18 | Araq | *shrug* C's creator admitted its array/pointer stuff is poorly designed |
20:12:40 | Sergio965 | fowl: But it's type has a size (which most of the time doesn't matter). So if you have char s[100] = "Hi"; printf("%z", sizeof s);, You'll get 100. |
20:13:05 | Araq | curiously it's also one of the few truly unique things about C |
20:13:27 | Sergio965 | %zu* |
20:14:09 | fowl | if i do `echo "BLAH ", cuchar.high` it doesnt print out |
20:14:28 | fowl | or cchar |
20:14:36 | fowl | cshort, clong, cint do though |
20:15:14 | Sergio965 | Isn't that the null terminator? |
20:15:49 | Araq | cuchar is just an alias for 'char' then I guess and high(char) is y umlaut or something |
20:16:40 | fowl | i dont even see the BLAH though |
20:27:36 | fowl | i get error: constant expression expected for this : template NCURSES_ACS(c:char): expr = acs_map[c.int] |
20:29:10 | Araq | do you use that template in a 'const' section? |
20:29:42 | fowl | yea |
20:30:02 | Araq | what's surprising then? |
20:30:24 | Araq | acs_map is essentially unkown to the compiler |
20:30:46 | fowl | it doesnt mention the const line, usually would say instantiation from here |
20:30:52 | Araq | true |
20:31:06 | fowl | i see, those consts should be templates |
20:31:22 | Araq | bug report about the missing "instantiation from here" please |
20:31:37 | Araq | fowl: yep |
20:40:30 | fowl | http://lambda-the-ultimate.org/node/4768 |
20:40:36 | fowl | missing nimrod |
20:42:09 | nihathrael | dom96: around? I have a fix for #34. Is there anything wrong with the current PR? otherwise it'd be great if you could merge that, then I can open a new one for #34 |
20:42:55 | dom96 | nihathrael: Sorry, was busy. I'll review at your PR now. |
20:43:00 | dom96 | s/at// |
20:43:56 | nihathrael | sure no worries, I should have created a new branch for every fix anyway, then I can easily open multiple PRs |
20:44:03 | fowl | dom96, if you want to make the nimkernel easier to try, the nake license permits distributing it with the kernel |
20:44:14 | fowl | (do as thou wilst) |
20:44:54 | Araq | fowl: nope look again |
20:44:55 | * | Endy quit (Ping timeout: 264 seconds) |
20:45:11 | dom96 | I'd rather if the users get the latest nake, don't want to have to keep updating it in the repo. |
20:45:18 | fowl | i might change it to the "Do What Ya Do, But Watch My Shoes" license which will be similar, but require special attention be paid to my shoes. |
20:45:30 | fowl | dom96, its not likely to be updated for a long time |
20:48:33 | dom96 | fowl: meh, I'd rather just leave it the way it is |
20:51:29 | fowl | http://www.youtube.com/watch?v=b32f5qMeOTk |
20:57:36 | NimBot | nimrod-code/Aporia master b3b88c2 Thomas Kinnen [+0 ±2 -0]: Enhance suggest output and fix a small typo.... 4 more lines |
20:57:36 | NimBot | nimrod-code/Aporia master a04e5ce Thomas Kinnen [+0 ±1 -0]: Correctly filter suggestions on ctrl+space activation.... 4 more lines |
20:57:36 | NimBot | nimrod-code/Aporia master 283b34f Thomas Kinnen [+0 ±1 -0]: Use case..of syntax instead of lengthy if else |
20:57:36 | NimBot | nimrod-code/Aporia master 0e281fb Thomas Kinnen [+0 ±1 -0]: Fixes #34 - Add close current tab and close all tabs file menu entries |
20:57:36 | NimBot | 2 more commits. |
20:58:19 | dom96 | nihathrael: I moved where the Close/CloseAll buttons are. |
20:58:25 | dom96 | Other than that, nice job. |
20:58:27 | nihathrael | interesting, how did that commit end up in there automatically |
20:58:34 | nihathrael | is that because they were on the same branch? |
20:58:57 | fowl | when you push to the same branch as a PR it updates the PR |
20:59:01 | nihathrael | ah ok |
20:59:46 | nihathrael | dom96: yea that position is a good idea |
21:00:15 | fowl | is suggest usable now? |
21:00:37 | dom96 | It's still too slow i think :P |
21:00:44 | dom96 | need to implement caas |
21:00:44 | nihathrael | that depends on your notion of usable, but the output is a lot more useful now |
21:00:54 | nihathrael | yea it is a little slow |
21:01:03 | nihathrael | also I'd love to have suggest working on variable names |
21:01:09 | nihathrael | not only function calls |
21:01:21 | fowl | dom96, aporia should be on babel |
21:01:37 | dom96 | yeah I will add it later |
21:03:05 | nihathrael | not sure whether suggest not working on variable names is a limitation of aporia or nimrod suggest currently |
21:03:32 | dom96 | what do you mean? |
21:03:59 | nihathrael | if I have var fooBar = 1 and then type " foo<CTRL+Space>, I want it to autocomplete it to fooBar |
21:05:13 | dom96 | if it gives you no suggestions then it's a bug with nimrod's suggest |
21:05:40 | dom96 | Perhaps aporia should just scan the doc for 'var\s.*' etc |
21:06:07 | dom96 | Show that information first, and call the compiler for more detailed info. |
21:06:10 | nihathrael | it would be a lot better if scoping was used properly |
21:06:15 | dom96 | It would also be nice to get some icons into suggest |
21:06:24 | nihathrael | true |
21:06:28 | dom96 | So that it's easier to see what is a proc, what is a type etc. |
21:06:55 | nihathrael | yea I tried to emphasize that a little using bold italic etc, but icons would help a lot |
21:07:19 | nihathrael | is aporia using the gtksourceview's autocomplete window or is that a custom widget? |
21:10:02 | dom96 | it's custom |
21:10:29 | nihathrael | any specific reason for that? |
21:10:45 | * | shafire quit (Quit: Page closed) |
21:11:03 | nihathrael | I remember the gtksourcecompletion being able to do the filtering very fast for example |
21:11:23 | nihathrael | also has built in functionality for icons |
21:12:09 | dom96 | I think when I wrote it I just wasn't aware of the ability of gtksourceview to do that. |
21:12:27 | dom96 | I don't see how gtksourcecompletion can do filtering faster though |
21:12:41 | dom96 | A custom suggest widget also gives us greater control. |
21:12:59 | nihathrael | I don't know if it is faster, I just remember it being a lot faster than a custom widget I saw on a latex editor |
21:13:51 | nihathrael | true, using the given widget might save us a ton of code though |
21:14:38 | dom96 | You are welcome to try it, but I worked hard on getting my custom one to work and i'm not sure I will like the gtksourceview one so I may not merge your changes. |
21:15:12 | nihathrael | Yea i'm not sure about doing the move yet. Can't see any big benefits out of the box right now |
21:15:32 | nihathrael | i'd much rather try creating an outline view of the current file |
21:15:44 | nihathrael | not sure how easy that is |
21:15:56 | dom96 | yeah there are always more important things to do |
21:18:49 | dom96 | I will be working for the next month so I won't have much time. |
21:19:42 | nihathrael | Yea I should be working on my master's thesis as well, but I might have some time here and there |
21:19:49 | dom96 | EXetoC: dude, if you rename your package you need to rename your .babel file and the package name in the .babel file. |
21:20:58 | nihathrael | dom96: another thing I was wondering, why is it necessary to copy all files into a tmp directory before running the suggest feature? |
21:21:50 | dom96 | Because you feed the compiler filenames, and saving unsaved files without the users permission is a bad idea IMO. |
21:23:09 | nihathrael | right, good point |
21:23:10 | Araq | actually that's not necessary for the caas mode |
21:23:34 | nihathrael | is that CAAS already implemented in the compiler? |
21:24:50 | Araq | yes but it's as buggy (if not moreso) as the rest of idetools |
21:25:08 | Araq | however without aporia support I can't test and improve it :P |
21:25:24 | * | Sergio965 quit (Ping timeout: 256 seconds) |
21:26:21 | EXetoC | dom96: :/ |
21:26:24 | nihathrael | is there any documentation on how to use it? |
21:27:59 | Araq | nihathrael: http://build.nimrod-code.org/docs/idetools.html |
21:28:12 | EXetoC | dom96: even the file name? ok |
21:28:18 | dom96 | EXetoC: yes |
21:28:43 | dom96 | Although I think it's optional. |
21:28:48 | dom96 | But it's good to be consistent :P |
21:29:00 | EXetoC | yep |
21:32:34 | * | Associat0r joined #nimrod |
21:32:34 | * | Associat0r quit (Changing host) |
21:32:34 | * | Associat0r joined #nimrod |
21:36:08 | nihathrael | Araq: thanks, i'll have a look at it |
21:45:06 | Araq | ugh, sourceforge downloads are annoying |
21:45:49 | fowl | sourceforge is outdated lol |
21:45:56 | Araq | indeed |
21:46:04 | fowl | i remember trying to get a project on there many years ago |
21:46:21 | Araq | seriously ... how can I download Bochs' source code? |
21:46:25 | fowl | they required so much information, i gave up and put it on google code |
21:46:33 | nihathrael | the only reason for sourceforge to exist is because they still allow download hosting |
21:46:34 | fowl | SVN? |
21:48:13 | Araq | fowl: then tell me the svn command |
21:48:20 | Araq | these links all don't work |
21:48:55 | fowl | Araq, svn co https://url |
21:49:16 | Araq | well I don't know the url |
21:49:19 | fowl | http://sourceforge.net/p/bochs/code/11733/tarball |
21:49:28 | fowl | svn checkout svn://svn.code.sf.net/p/bochs/code/trunk bochs-code |
21:49:56 | fowl | Araq, im under the "Code" tab |
21:50:46 | Araq | fowl: thanks, worked |
21:52:43 | fowl | Araq, in return please make a babel package for nimgrep |
21:52:53 | fowl | (: |
21:53:01 | fowl | i have these symlinks in ~/bin i want to get rid of |
21:55:46 | Araq | fowl: meh ... I dislike babel files :P |
21:55:59 | Araq | because they are not compatible yet to niminst files |
21:56:03 | fowl | i think ill write a macro to turn this const section into a bunch of templates |
21:56:20 | fowl | because inserting template and :expr is annoying |
21:56:39 | fowl | Araq, just copy the one in the readme, thats what i do |
21:57:20 | Araq | fowl: there are also regex based search&replace in aporia for these things |
21:58:03 | fowl | i didnt know it used regex |
22:05:03 | * | OrionPK joined #nimrod |
22:07:04 | fowl | jesus ncurses.nim is annoying |
22:12:54 | BitPuffin | suppose I should read the manual |
22:13:16 | BitPuffin | why not add a termbox wrapper for nimrod? |
22:14:09 | BitPuffin | that way you wouldn't have to deal with ncurses fowl |
22:14:32 | fowl | you know i had one that i never published for some reason |
22:14:42 | fowl | well, you wouldnt know that, because i never published it |
22:14:48 | fowl | thats a good idea though, im going to do that instead |
22:16:42 | BitPuffin | glad you enjoyed the advice |
22:20:57 | BitPuffin | what the heck is terminal symbols :3 |
22:52:27 | dom96 | 'night |
22:57:05 | fowl | night dom |
22:57:20 | fowl | BitPuffin, wrapper finished in 20 minutes |
22:57:38 | fowl | too bad i cant make $ off this =( |
22:57:38 | BitPuffin | night dom96! |
22:57:49 | BitPuffin | fowl: cool! be sure to put it in babel |
23:11:20 | fowl | grumble |
23:11:28 | fowl | i was going to throw it in fowltek |
23:31:56 | * | EXetoC quit (Quit: WeeChat 0.4.1) |
23:42:25 | fowl | https://code.google.com/p/termbox/wiki/Rationale |
23:55:58 | * | q66 quit (Quit: Leaving) |