00:07:20 | * | bjz quit (Quit: My MacBook Pro has gone to sleep. ZZZzzz…) |
00:17:40 | demi- | if a package defines its own `passL` pragma, is there anyway i can over-ride that? it is breaking my linker |
00:19:55 | demi- | i know i can turn off all linking and do it myself but i really rather not do that if i can avoid it |
00:20:58 | ftsf | demi-, i don't think so, other than modifying the package |
00:21:05 | demi- | :( |
00:21:33 | demi- | that is very unfortunate, this is making me want to just re-wrap the package which is kinda terrible as well as that would be the third wrapper |
00:22:23 | ftsf | well if there's a problem with the package, you should fix the package and submit a PR i guess? |
00:22:35 | ftsf | what is it trying to link that's the problem? |
00:24:26 | demi- | I was looking at terminal interface libraries, there is ncurses which i could use but is pretty crap -- i saw there were two termbox wrappers for nim; however one (https://github.com/fowlmouth/nim-termbox) is only implmeneted for linux and the other (https://notabug.org/vktec/nimbox/src/master) is passing flags that my linker doesn't recognize |
00:25:06 | demi- | the first one would be easy to fix to work for os x but has been inactive for so long that i don't know if it is worth trying to PR and hope it gets patched. |
00:25:32 | demi- | the second would also be an easy fix but that would mean creating an account with that service to do the PR which isn't worth it |
00:25:41 | Araq | demi- fork it :-) |
00:26:39 | demi- | Araq: sure, but it would still yield yet another wrapper for this library, which i don't know how i feel about vs just running c2nim over the C headers and using that myself |
00:27:14 | demi- | it isn't something i want to maintain |
00:27:18 | Araq | a fork is not "yet another wrapper" :-) |
00:27:35 | demi- | it still requires maintenance |
00:30:16 | ftsf | that's why you should create a PR and get the current maintainer to include your change |
00:32:05 | demi- | but in the mean time there is no proper way for me to install it without it becoming a recognized fork |
00:32:13 | demi- | and thus require me to maintain it |
00:41:09 | * | Kingsquee joined #nim |
00:56:12 | * | couven92 quit (Quit: Client disconnecting) |
01:03:59 | * | zachcarter joined #nim |
01:08:10 | * | pregressive joined #nim |
01:09:08 | * | pregressive quit (Read error: Connection reset by peer) |
01:09:38 | * | pregressive joined #nim |
01:10:09 | FromGitter | <Varriount> demi-: What's the problem with making an account? It's not like it usually takes that long. |
01:10:21 | * | pregressive quit (Read error: No route to host) |
01:10:21 | demi- | i don't want to |
01:10:30 | demi- | i'm not going to use an account there |
01:10:51 | * | pregressive joined #nim |
01:12:49 | * | devted joined #nim |
01:14:49 | * | pregressive quit (Ping timeout: 240 seconds) |
01:22:01 | * | krux02 quit (Quit: Leaving) |
01:29:23 | * | Snircle joined #nim |
01:35:17 | * | vlad1777d quit (Quit: Leaving) |
01:52:55 | * | roygbiv joined #nim |
01:59:03 | * | ftsf quit (Ping timeout: 256 seconds) |
01:59:28 | * | ftsf joined #nim |
02:03:36 | FromGitter | <Varriount> demi-: Fine, I will. |
02:03:56 | FromGitter | <Varriount> The problem is the use of --passL in the nimble file? |
02:24:03 | * | sz0 joined #nim |
02:33:04 | cheatfate | demi-, i think you can easily translate whole `termbox` to nim without any problems, and you don't need to maintain old broken packages ) |
02:37:51 | cheatfate | because what is termbox, its 5 syscalls and a bunch of constants |
02:48:32 | * | Jesin quit (Ping timeout: 255 seconds) |
03:05:53 | * | Snircle quit (Quit: Textual IRC Client: www.textualapp.com) |
03:07:30 | * | UxerUospr joined #nim |
03:13:10 | * | Jesin joined #nim |
03:30:02 | * | Kingsquee quit (Read error: Connection reset by peer) |
03:30:19 | * | Kingsquee joined #nim |
03:42:31 | * | mcc joined #nim |
04:00:57 | * | brson quit (Quit: leaving) |
04:29:36 | * | smt joined #nim |
04:32:29 | * | devted quit (Quit: Sleeping.) |
04:32:52 | * | abbiya quit (Ping timeout: 245 seconds) |
04:37:57 | * | abbiya joined #nim |
04:54:16 | * | sz0 quit (Quit: Connection closed for inactivity) |
05:21:36 | * | yglukhov joined #nim |
05:26:01 | * | yglukhov quit (Ping timeout: 260 seconds) |
05:36:52 | * | def-pri-pub quit (Quit: leaving) |
05:37:40 | * | UxerUospr quit (Quit: Lost terminal) |
06:04:03 | * | nsf joined #nim |
06:19:39 | * | arnetheduck quit (Remote host closed the connection) |
06:40:54 | * | roygbiv quit (Quit: ™) |
07:04:20 | * | hcorion joined #nim |
07:04:45 | hcorion | Hey, does anybody have some good use-cases for StreamStreams in Nim? |
07:06:23 | ftsf | streamstreams? |
07:06:30 | * | yglukhov joined #nim |
07:06:31 | hcorion | I found some examples online but they relate more to C++ and use them as a way to make it look better, however nim doesn't have this problem. |
07:06:35 | ftsf | StringStreams? |
07:06:53 | hcorion | https://nim-lang.org/docs/streams.html |
07:07:09 | ftsf | I guess when you want to use the same interface for dealing with Strings and Files? |
07:07:16 | * | yglukhov quit (Remote host closed the connection) |
07:07:21 | ftsf | or you mean streams as oppposed to normal file IO commands? |
07:08:41 | hcorion | Yeah, but what would the benifit of using a StringStream be? Is there any benefit to using StringStreams instead of normal string operations? |
07:09:33 | ftsf | like i said, having the same interface for both strings and files, so you don't need two different code paths |
07:11:45 | hcorion | Ok, I was kind of hoping for a strong argument, but that works too |
07:11:46 | * | ibk joined #nim |
07:13:13 | ibk | Hi, is there something like `FlowVar` for `thread spawn` that can be used for Future? |
07:13:35 | ftsf | hcorion, if you have a file format loader that should work with a file or memory loaded some other way, eg out of a zipfile you could use that |
07:24:33 | * | filcuc joined #nim |
07:26:24 | * | ftsf quit (Quit: :q!) |
07:32:46 | * | mcc quit (Quit: Connection closed for inactivity) |
07:38:03 | * | hcorion quit (Quit: Konversation terminated!) |
07:40:52 | * | libman quit (Quit: Connection closed for inactivity) |
07:48:44 | * | gokr joined #nim |
07:51:39 | FromGitter | <jacobdufault> Are there any tools to debug "out of memory" errors? There's no stack so I have no idea which allocation is causing the issue |
07:51:57 | FromGitter | <jacobdufault> (I get that determining a stack probably allocates memory) |
07:52:20 | FromGitter | <jacobdufault> (though, that memory could probably be preallocated and reserved in debug builds...) |
07:59:29 | * | Vladar joined #nim |
07:59:33 | FromGitter | <jacobdufault> sometimes I'm lucky though, and I do get a stack trace, but the trace doesn't make a ton of sense (which I suppose makes sense assuming stack corruption or similar) ⏎ ⏎ ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=58a55be400c00c3d4f46a21e] |
08:00:40 | FromGitter | <jacobdufault> stack trace comes with a `SIGSEGV: Illegal storage access. (Attempt to read from nil?)` |
08:01:18 | FromGitter | <jacobdufault> Not sure how that is happening though. The code verifies all of the pointers for c before using it / https://github.com/nim-lang/Nim/blob/devel/lib/system/alloc.nim#L550 |
08:06:47 | FromGitter | <jacobdufault> ^ seems like there is a bug in line number reporting. got another stack trace that doesn't make any sense w.r.t. lines |
08:14:11 | * | yglukhov joined #nim |
08:29:50 | * | Arrrr joined #nim |
08:31:28 | * | yglukhov quit (Remote host closed the connection) |
08:32:10 | FromGitter | <jacobdufault> Filed #5400 |
08:32:16 | FromGitter | <jacobdufault> (for stack trace issue) |
08:36:20 | * | Andris_zbx joined #nim |
08:41:58 | FromGitter | <Varriount> ibk: Most of the developers are asleep at the moment |
08:42:58 | FromGitter | <Varriount> ibk: What are you attempting to do? |
08:47:51 | * | yglukhov joined #nim |
08:49:24 | FromGitter | <Araq> @jacobdufault use threads? |
08:49:55 | FromGitter | <jacobdufault> @Araq wrong person :P |
08:50:29 | ibk | Varriount : with FlowVar, i can wait execution of several threads. How to wait for several futures? |
08:51:04 | bbl | https://nim-lang.org/docs/asyncdispatch.html#all,varargs%5BFuture%5BT%5D%5D |
08:54:41 | * | arnetheduck joined #nim |
08:55:59 | * | bjz joined #nim |
08:56:16 | * | rokups joined #nim |
08:57:42 | * | vlad1777d joined #nim |
08:59:26 | ibk | bbl : thanks. |
09:11:11 | * | yglukhov quit (Remote host closed the connection) |
09:12:48 | * | PMunch joined #nim |
09:17:31 | * | abbiya quit (Remote host closed the connection) |
10:07:27 | * | yglukhov joined #nim |
10:08:56 | * | gangstacat quit (Quit: Ĝis) |
10:09:10 | * | yglukhov quit (Remote host closed the connection) |
10:09:47 | * | yglukhov joined #nim |
10:12:35 | * | gangstacat joined #nim |
10:14:02 | * | yglukhov quit (Ping timeout: 255 seconds) |
10:27:48 | * | yglukhov joined #nim |
10:31:06 | * | yglukhov quit (Remote host closed the connection) |
10:35:50 | * | bjz quit (Quit: My MacBook Pro has gone to sleep. ZZZzzz…) |
10:37:19 | * | devted joined #nim |
10:43:01 | * | bjz joined #nim |
10:49:06 | * | bjz_ joined #nim |
10:49:23 | * | bjz quit (Ping timeout: 240 seconds) |
10:50:18 | * | yglukhov joined #nim |
11:00:04 | * | yglukhov quit (Remote host closed the connection) |
11:00:40 | * | yglukhov joined #nim |
11:04:37 | * | couven92 joined #nim |
11:05:13 | * | yglukhov quit (Ping timeout: 260 seconds) |
11:24:00 | PMunch | Hmm, what's this syntax here: "proc add*[SomeWidget: Widget](b: Box; child: SomeWidget; stretchy=false)" |
11:24:16 | PMunch | Specifically the [] notation after the procedure name |
11:25:38 | cheatfate | PMunch, `SomeWidget` - is a generic parameter which accepts only `Widget` type as generic parameter |
11:26:10 | PMunch | Aaah |
11:27:26 | PMunch | So you could do something like proc sum[Number: int,float](nums: seq[Number]) |
11:27:44 | PMunch | To have a function that would be able to sum a sequence of numbers or a sequence of floats |
11:27:49 | cheatfate | proc sum[Number: int|float](nums: seq[Number]) |
11:28:05 | PMunch | Ah, sure |
11:29:02 | PMunch | Is there any point in doing it with only one type though? |
11:29:27 | cheatfate | maybe this was done for future? |
11:29:47 | PMunch | Hmm, possible. Or an artifact from the past :P |
11:29:54 | cheatfate | yep |
11:32:16 | Araq | nope, it's required |
11:32:32 | Araq | not only 'Widget' is allowed but also a subtype of Widget |
11:32:56 | Araq | and the subtypes have their own fields so I need a generic |
11:33:11 | PMunch | Aaah |
11:33:12 | Araq | so that the typesafe specialized field is used |
11:33:19 | cheatfate | looks like `undocumented` feature :) |
11:34:52 | PMunch | I was thinking of rewriting my wxWidgets UI macro to use libui instead |
11:35:01 | Araq | well you can either document features in isolation or the combinatoric explosion of features. |
11:35:14 | Araq | the latter is usually not done. |
11:35:35 | PMunch | If someone ever writes a guide on OO in Nim then it would probably be mentioned there |
11:35:46 | PMunch | As the way to take a parent type or any child |
11:38:13 | Araq | PMunch got it to work with my updated installation instructions? |
11:38:23 | PMunch | Ah yes, it worked fine |
11:39:38 | PMunch | But I still don't quite understand what was wrong. I tried to change the linux part of the ui.nim file to make it work with the system-installed version but I had some trouble |
11:39:44 | PMunch | Might look more into it later today |
11:41:21 | PMunch | So that you can actually do "nimble install ui" and have it work :) |
11:46:11 | * | yglukhov joined #nim |
11:48:33 | Araq | yeah create a PR please, should't be hard with NimScript |
12:01:59 | * | Snircle joined #nim |
12:11:12 | Jipok[m] | Do you think this format is relevant to the nim community? |
12:11:13 | Jipok[m] | https://github.com/nin-jin/tree.d |
12:16:11 | Araq | "idents must use tabs", no thanks :-) |
12:16:51 | Jipok[m] | MB does anyone know another simple, user-readable format? |
12:17:50 | Jipok[m] | https://habrastorage.org/getpro/habr/post_images/29f/851/63f/29f85163fd5c1673b90be117105850a2.png |
12:18:09 | Jipok[m] | like this |
12:19:33 | * | themagician joined #nim |
12:19:45 | Jipok[m] | Araq: Why you don't like tabs? |
12:20:52 | Araq | they have strange "spaces modulo N" semantics when mixed with spaces and this is not visible |
12:21:19 | Araq | they most certainly do not mean "1 level of indentation" |
12:21:36 | enthus1ast | have a look at http://loup-vaillant.fr/projects/monocypher/ looks very kuhl |
12:21:46 | enthus1ast | and c2nim wrapped it for us https://github.com/enthus1ast/nimMonocypher |
12:21:47 | Araq | and nobody knows how many spaces they should take up. |
12:22:21 | Araq | and some editors "compress" X spaces to 1 tab, ugh |
12:23:13 | Araq | just say no to tabs. |
12:24:00 | Araq | Jipok: use an .ini file instead |
12:24:16 | Jipok[m] | ini bad |
12:24:57 | Jipok[m] | it does not support more than one nesting level |
12:25:13 | Araq | that's good, nesting is bad :P |
12:25:30 | Jipok[m] | why? |
12:26:08 | Jipok[m] | How do I transfer the trees using ini? |
12:27:02 | Araq | well if you really have trees and not some misguided crappy hierarchy ini files are indeed the wrong tool |
12:27:05 | Jipok[m] | json is not readable. And all of these brackets are annoying. |
12:27:14 | Araq | use yaml then |
12:27:35 | Jipok[m] | xml fat |
12:27:43 | Araq | yaml |
12:28:49 | Araq | or Lisp :-) |
12:32:16 | enthus1ast | mime : ) |
12:32:33 | euantor | TOML isn't bad, but don't know if there's a parser for Nim |
12:32:33 | * | Kingsquee quit (Quit: https://i.imgur.com/qicT3GK.gif) |
12:36:02 | * | bjz_ quit (Quit: My MacBook Pro has gone to sleep. ZZZzzz…) |
12:42:48 | bbl | Araq: https://github.com/nim-lang/Nim/issues/5403 why isn't that B(x) a compile time error? |
12:44:21 | * | devted quit (Quit: Sleeping.) |
12:48:37 | Araq | bbl: because types do not have locations |
12:49:10 | Araq | the compiler is not smart enough to determine this will always fail at runtime because you convert a var |
12:49:23 | Araq | for parameters the type conversion could work in principle |
12:50:16 | bbl | I thought that worked that way because it wasn't a compile time error :P |
12:51:36 | bbl | thanks for clearing that up |
12:53:48 | Jipok[m] | euantor: thx |
12:58:54 | * | bjz joined #nim |
13:00:58 | * | devted joined #nim |
13:05:34 | * | devted quit (Ping timeout: 258 seconds) |
13:18:09 | * | yay joined #nim |
13:21:17 | flyx | Jipok[m]: alone the table at the beginning of this tree.d readme makes me cringe |
13:22:01 | flyx | so some guy invented some categories without specifying their meaning, then invented some values without specifying their reasoning, then implies without saying it that his approach is the best |
13:22:49 | flyx | some of the numbers can trivially be proven wrong. |
13:32:11 | * | bjz quit (Quit: My MacBook Pro has gone to sleep. ZZZzzz…) |
13:41:36 | FromGitter | <andreaferretti> how are the flags `defined(macos)` or `defined(linux)` determined? |
13:41:53 | FromGitter | <andreaferretti> it seems that running inside docker on mac |
13:42:02 | FromGitter | <andreaferretti> `defined(macos)` is true |
13:42:11 | FromGitter | <andreaferretti> arguably, though, one is running on linux |
13:45:36 | * | UxerUospr joined #nim |
13:53:09 | * | zachcarter quit (Quit: zachcarter) |
13:59:51 | FromGitter | <Varriount> @andreaferretti I presumed it was determined by the system Nim is compiled on. |
14:00:22 | FromGitter | <Varriount> And is then changeable by the `--os:` flag |
14:02:52 | FromGitter | <andreaferretti> ok, I will try it |
14:12:47 | * | Vladar quit (Remote host closed the connection) |
14:13:06 | FromGitter | <andreaferretti> oh, it was just a silly error when running docker :-) |
14:13:42 | FromGitter | <andreaferretti> not quoting the command + using `&&` made the second command run on the host machine :-D |
14:15:06 | * | libman joined #nim |
14:20:01 | demi- | i'm getting this error when trying to use parseopt2: /Users/Samantha/Projects/necromancy/src/nimcache/necromancy_necromancy.c:889:86: error: no member named 'key' in 'struct OptParser_w3uFmxpwEmgEXFUJjUl10w' |
14:30:55 | * | Vladar joined #nim |
14:31:59 | FromGitter | <Varriount> demi-: Can you show us your code? |
14:32:20 | * | zachcarter joined #nim |
14:32:21 | * | mjanssen left #nim (#nim) |
14:32:35 | * | Andris_zbx quit (Remote host closed the connection) |
14:32:48 | * | nsf quit (Quit: WeeChat 1.7) |
14:33:11 | FromGitter | <Varriount> demi-: Also, are you using Nim to raise the dead? I don't know if that's part of the intended use of the language. |
14:33:39 | demi- | https://github.com/samdmarshall/necromancy/blob/master/src/necromancy.nim#L45 like, this is the exact same code i've used a bunch of times elsewhere without issue? |
14:43:34 | flyx | obviously, the undead are feasting on your code while you are trying to compile it |
14:44:22 | flyx | but for a serious remark, this could be a compiler bug, because C code is generated and then fails to compile |
14:44:32 | FromGitter | <Varriount> demi-: My first thought would be a compiler bug in code generation. |
14:45:06 | FromGitter | <Varriount> demi-: Could you track down the struct OptParser_w3uFmxpwEmgEXFUJjUl10w in the cached C files, and see what members it has? |
14:45:27 | FromGitter | <Varriount> And if there might be other OptParser_* structure definitions? |
14:47:18 | demi- | yeah it looks like this: https://gist.github.com/samdmarshall/fb4b4a92feedd263ee8b3cfb1ee4b0bc |
14:47:25 | demi- | and there aren't other definitions as far as i can see |
14:48:00 | * | flyx guesses this is a bug introduced by the new name mangling |
14:48:49 | demi- | i was able to compile similar code yesterday and i don't believe i updated nim |
14:49:03 | flyx | similar != same |
14:49:17 | FromGitter | <andreaferretti> is this something you started now? |
14:49:27 | FromGitter | <andreaferretti> is it possible that nimcache is stale? |
14:49:37 | FromGitter | <andreaferretti> in that case you could try removing i |
14:49:38 | FromGitter | <andreaferretti> it |
14:49:40 | demi- | i tried nuking that already |
14:49:48 | FromGitter | <andreaferretti> ok |
14:50:03 | demi- | my nim was built from source on feb 3rd |
14:50:24 | demi- | because Araq said mac users should upgrade to 0.16.1 (master) |
14:54:11 | flyx | you could try downgrading to 0.15.2 and check if it compiles there. if yes, that's a regression |
14:55:46 | demi- | ok good news, i can compile with 0.16.0 |
14:56:00 | demi- | so somewhere between that release and 4ac6a26, this was introduced |
14:57:03 | flyx | great! file a regression issue |
15:07:40 | demi- | here it is, if someone with github access wants to categorize it: https://github.com/nim-lang/Nim/issues/5404 |
15:08:30 | * | Ven joined #nim |
15:12:03 | demi- | is there a similiar concept to C's __FILE__ to get the current file name? I would like my application's debug logging to capture that to help make it easier to trace what is going on |
15:14:21 | * | Andris_zbx joined #nim |
15:15:25 | cheatfate | demi-, https://nim-lang.org/docs/system.html#instantiationInfo |
15:15:31 | cheatfate | is what are you looking for? |
15:15:45 | Araq | demi-: thanks for the bug report, but what I am supposed to do? |
15:15:50 | zevlg | taking `addr' of exported proc isn't possible in nim? nim yields with "expression has no address" for `addr myProcWithExportCpragma` |
15:16:21 | demi- | Araq: do you need more info? |
15:16:47 | Araq | of course |
15:18:06 | demi- | oh sorry i didn't see your comment on the issue, going to paste a link to the code in question. |
15:19:57 | demi- | cheatfate: yes i think that would do it, if i create a template like that, would it be initialized to where the template code is or where the template gets used? |
15:20:23 | cheatfate | demi-, i can't help, never used it |
15:20:34 | demi- | heh, ok i will give it a try |
15:22:52 | * | smt_ joined #nim |
15:24:53 | * | smt quit (Ping timeout: 240 seconds) |
15:25:04 | * | smt_ is now known as smt |
15:27:42 | * | PMunch quit (Quit: leaving) |
15:31:28 | * | arnetheduck quit (Ping timeout: 240 seconds) |
15:32:10 | Araq | demi-: Do you use somehere .importc: "key" ? |
15:33:24 | demi- | oh, yes i do |
15:34:08 | demi- | cheatfate: yes that does work exactly the way i want, thank you |
15:36:09 | * | ibk quit (Quit: Connection closed for inactivity) |
15:46:15 | rokups | Araq: what am i supposed to do with `GC_step()` to make it happy about coroutines? Should it operate on current active stack or somehow iterate all stacks? |
15:59:09 | Araq | demi-: why? |
15:59:26 | demi- | it is a type defined by the library i'm using? |
16:05:03 | Araq | well the new codegen assumes that 'importc' identifiers are potential #defines and so doesn't generate these names |
16:06:21 | Araq | that means the name mangling rules differ from generated C file to generated C file, but that's usually not a problem. seems to be a problem for your code though, makes me wanna vomit |
16:08:08 | Araq | rokups: I told you partial stack scanning is unsound. |
16:08:22 | * | Ven quit (Quit: My MacBook has gone to sleep. ZZZzzz…) |
16:08:52 | demi- | Araq: :( sorry |
16:09:16 | Araq | ah well now I can answer your question though |
16:09:33 | Araq | generating C code is a clusterfuck because C's preprocessor adheres to no scoping rules whatsoever. |
16:12:40 | demi- | yup this is why preprocessors are bad news |
16:16:49 | demi- | Araq: I assume this wouldn't be as much of a problem if the `main` code was inside of it's own proc, which would cause the `key` from the `getopt()` to be properly scoped? |
16:17:27 | Araq | no, the codegen avoids generating a potential #define, independent of scoping |
16:17:38 | Araq | because the C preprocessor has no scoping. |
16:17:50 | Araq | #define foo 8 |
16:18:06 | Araq | obj.foo // transformed to obj.8 |
16:21:01 | demi- | right, but isn't the the case of this code, the name "key" irrelevant? as that is a local variable that happens to be called after the member name? |
16:21:58 | Araq | how do we know it's not #define key in the stuff you importc'ed? |
16:22:57 | demi- | sorry, yes i see where you are saying the problem is |
16:52:41 | * | yay quit (Quit: yay) |
16:54:43 | * | pregressive joined #nim |
17:00:15 | * | yglukhov quit (Remote host closed the connection) |
17:06:01 | * | filcuc quit (Ping timeout: 260 seconds) |
17:07:46 | * | shashlick quit (Ping timeout: 260 seconds) |
17:08:47 | * | shashlick joined #nim |
17:09:56 | * | Arrrr quit (Quit: Leaving.) |
17:11:30 | * | yglukhov joined #nim |
17:15:47 | * | Andris_zbx quit (Remote host closed the connection) |
17:15:55 | * | yglukhov quit (Ping timeout: 260 seconds) |
17:18:10 | * | Jesin quit (Quit: Leaving) |
17:20:52 | * | Jesin joined #nim |
17:22:33 | * | Trustable joined #nim |
17:23:34 | * | krux02 joined #nim |
17:24:09 | krux02 | try creating a closure with argument name ClEnv |
17:25:50 | Araq | krux02: he, that should work :-) |
17:26:58 | krux02 | well, not really, the c compiler complains |
17:27:42 | krux02 | N_CLOSURE(Bool32_lrv4aZgVTmBUYdrYUkLMlg, myWatch_aonEKX3tmTv9cOEzCphXsrw)(Event_Uzh9aP43ffUpM9aa6vZvNEug* ClEnv, void* ClEnv); |
17:28:53 | zachcarter | got 3d going again w/ bgfx - http://imgur.com/a/uEI1B |
17:29:19 | krux02 | not that I would need ClEnv as an argument name, just by reading the source I saw that it would not be possible |
17:29:43 | krux02 | zachcarter: how if bgfx? |
17:29:53 | zachcarter | awesome krux02 |
17:29:59 | krux02 | I saw it, I think it is interesting but I do not fully understand it |
17:30:00 | krux02 | yet |
17:30:19 | zachcarter | I’ve used it previously in a C++ project |
17:30:26 | zachcarter | or I used a C++ that used it previously |
17:30:32 | zachcarter | a C++ project* |
17:30:54 | krux02 | I mean it has a lot of backends, but how do you deal with them? |
17:30:58 | zachcarter | you don't |
17:31:05 | zachcarter | the API does for you |
17:31:19 | krux02 | is there an abstraction layer? |
17:31:24 | zachcarter | basically all I have to do is hand it a GLFW context with no API set |
17:31:26 | krux02 | how do I do it then with shaders? |
17:31:40 | zachcarter | you write the shaders in language comparable to GLSL |
17:31:52 | krux02 | but it's nots |
17:31:53 | krux02 | ? |
17:31:55 | zachcarter | and they get compiled to binary files (which are really just plain text files with a .bin extension) |
17:32:01 | zachcarter | it’s not quite GLSL but it’s very close |
17:32:30 | zachcarter | you can actually encode shaders as nim files |
17:32:33 | zachcarter | check this out - |
17:32:53 | zachcarter | http://pastebin.com/JB5kA9Sz |
17:32:56 | krux02 | I know that I can compile nim to glsl, but I don't really want to. |
17:33:04 | zachcarter | oh no not that |
17:33:21 | zachcarter | I just mean I can write a shader and bgfx has a tool which will encode the shader as a header file |
17:33:23 | zachcarter | I can then run c2nim on that |
17:33:32 | zachcarter | so I don’t have to do any file i/o to load shaders |
17:33:54 | * | gokr quit (Ping timeout: 258 seconds) |
17:33:56 | zachcarter | I need to automate the process though right now it’s manual |
17:34:18 | * | nsf joined #nim |
17:34:29 | zachcarter | but yeah anyway, you write your shaders in this language, here’s an example - https://github.com/bkaradzic/bgfx/tree/master/examples/01-cubes |
17:34:35 | krux02 | I put a """ string literal in my sourcecode, and generate all the binding that is necessary to glue the nim context to the shader context |
17:34:48 | zachcarter | and then you run the shader source files through a compiler |
17:34:54 | zachcarter | which spits out shaders for different backends |
17:35:08 | zachcarter | yeah I’ve seen your opengl dsl it’s very nice |
17:35:21 | krux02 | In other words I can embed shader literals, and access local variables in the nim context from the shader |
17:35:30 | zachcarter | right |
17:35:37 | zachcarter | that’s pretty awesome |
17:37:04 | krux02 | Well I do not support anything else but OpenGl, but OpenGl is supposed to be the platform independent layer, I don't think it's the right idea to put another one on top of that |
17:38:11 | krux02 | I mean it might be necessary for some platforms, but then I just don't support that platform |
17:40:52 | krux02 | zachcarter: https://github.com/bkaradzic/bgfx/blob/master/examples/01-cubes/varying.def.sc#L4 what is the second name after the colon for? |
17:40:58 | krux02 | COLOR0 etc |
17:41:47 | zachcarter | I believe those are the attribute names he has picked for standards across all shaders |
17:41:51 | zachcarter | so you’ll set those attributes in code |
17:42:36 | zachcarter | something like - bgfx.Add(result.vDecl, bgfx.Attrib.Attrib_TexCoord0, 2, bgfx.AttribType.AttribType_Float) |
17:43:21 | demi- | Araq: when importing a struct from C, do i have to `{.importc: "foo". header: "bar.h".}` for all of the struct's members or just on the type declaration? |
17:43:22 | krux02 | https://github.com/bkaradzic/bgfx/blob/master/examples/01-cubes/vs_cubes.sc#L13 this is stll very strange to me. A vector has to be multiplied from left. But yea I know that style exists |
17:44:55 | krux02 | zachcarter: that is exactly what I wanted to avoid, predefined fixed names for attributes like TexCoord0 TexCoord1 etc. I wanted arbitrary names, anything any any amount possible |
17:45:24 | zachcarter | yeah i think he’s probably forced into doing it to standardize things across all the api’s he’s targetting |
17:46:21 | krux02 | yes and c++ does not allow such a tight language as I have done it. It is only possible because of the macros. |
17:46:37 | krux02 | my library is not portable to c++ |
17:48:00 | krux02 | Maybe some day I want to port it to other programming languages. Not be dependent on Nim. But currently Nim is the only choice I see. |
17:52:23 | dom96 | demi-: Just the type declaration should be fine as long as the field types match |
17:54:59 | * | brson joined #nim |
17:56:39 | demi- | ok, that is what i thought but was erring on the side of caution with some c2nim generated code |
17:57:03 | * | yglukhov joined #nim |
17:58:26 | * | zachcarter quit (Ping timeout: 255 seconds) |
18:00:58 | * | yglukhov quit (Ping timeout: 240 seconds) |
18:02:15 | cheatfate | demi-, its better to '{}' all struct's members. |
18:02:34 | cheatfate | demi-, because of alignment issues of different fields |
18:03:40 | demi- | because c is bad |
18:04:17 | cheatfate | demi-, i dont think its not C, its developers using C. |
18:04:27 | cheatfate | i think its not C, but developers using C |
18:20:53 | * | yglukhov joined #nim |
18:22:26 | demi- | i've been writing C for a long time and it is pretty bad for modern development |
18:22:55 | demi- | and it doesn't help that many people are bad at writing C code |
18:23:11 | FromGitter | <barcharcraz> tbh proper modules would go a long way for C |
18:23:37 | FromGitter | <barcharcraz> like C with modules and perhaps libgc would be not too bad |
18:25:52 | krux02 | well most people suck at all programming languages, the problem with C is, that it has a lot of spikes that you have to run into before you actually have the chance to become good. |
18:25:53 | * | rauss joined #nim |
18:25:56 | demi- | personally i would prefer ARC to GC but yeah that would do a lot |
18:26:06 | krux02 | arc? |
18:26:17 | GaveUp | auto ref counter |
18:26:40 | demi- | automatic reference counting, where the compiler inserts the reference counting code to free memory when it is done being used |
18:26:57 | krux02 | well when you want C with a garbage collector, then I recommend the programming language Go |
18:27:00 | krux02 | it's pretty much that |
18:27:08 | demi- | in more OO languages, that would be retain/release calls, in C that would probably be just free |
18:27:30 | krux02 | OO smells |
18:27:37 | GaveUp | what rust does iirc |
18:27:59 | demi- | yeah, as does Objective-C (on apple platforms) and Swift (on all platforms) |
18:28:18 | FromGitter | <barcharcraz> I don't really understand how ARC is diffrent from GC except that it can't do cycles |
18:28:19 | krux02 | rust has no single retain or release call, and relying on the programmer to put them anywhere is pretty bad if you ask me |
18:28:34 | krux02 | rust has move semantics, as C++ has it, too. |
18:28:34 | FromGitter | <barcharcraz> and tbh in a cycle free graph gc should have almost the same perf as ref counting |
18:29:03 | krux02 | the only problem is, that it does not cover the things that already exist in C or C++ |
18:29:29 | FromGitter | <barcharcraz> gc is not really for the same things as ref counting |
18:29:30 | FromGitter | <barcharcraz> imo |
18:29:35 | FromGitter | <barcharcraz> like both can be used for memory |
18:29:47 | demi- | barcharcraz: http://stackoverflow.com/questions/6385212/how-does-the-new-automatic-reference-counting-mechanism-work/6418410#6418410 and https://lists.apple.com/archives/objc-language/2011/Jun/msg00013.html |
18:29:49 | FromGitter | <barcharcraz> but often for memory (and sometimes other stuff) I don't really care if it's freed immediately |
18:30:43 | krux02 | well the problem is mostly in the head of the people that they think that garbage collection solves anything at all. |
18:30:44 | FromGitter | <barcharcraz> fwiw ref counting can still (sorta) stop the world, since the count itself needs to be atomic |
18:31:26 | FromGitter | <barcharcraz> like if you used as much heap memory in C as people do in C# or java your perf would probably only be a little better in C, and maybe worse |
18:32:11 | FromGitter | <barcharcraz> not to mention with ref counting it's harder to spread the work of deallocating a large structure over time |
18:32:37 | krux02 | The problem with java is that it is horribly memory inefficient |
18:32:50 | FromGitter | <barcharcraz> well yeah, it uses lots of heap mem |
18:32:57 | GaveUp | understatement of the century |
18:33:06 | FromGitter | <barcharcraz> tbh there's a reason people do that though, it makes everything the same size |
18:33:09 | * | brson quit (Ping timeout: 252 seconds) |
18:33:29 | FromGitter | <barcharcraz> which is important if you want to use indirect calls a lot |
18:33:41 | FromGitter | <barcharcraz> (by indirect calls I pretty much mean virtual functions) |
18:34:27 | FromGitter | <barcharcraz> I always saw ARC as a way to get the benifits of GC (mostaly) without scaring people that don't like GC |
18:35:28 | krux02 | I don't know how you are programming, but in my experience in the Java World everything is an Object with an object header + reference to it |
18:35:42 | krux02 | makes an overhead of 16 bytes |
18:36:00 | krux02 | and everything is encapsulates as objects |
18:36:15 | FromGitter | <barcharcraz> yeah |
18:36:16 | FromGitter | <barcharcraz> boxing |
18:36:26 | FromGitter | <barcharcraz> not great for perf and memory usage |
18:36:35 | krux02 | even ints are used in generic collections as Integer (32 bit data 128 bit overhead) |
18:36:36 | FromGitter | <barcharcraz> but on the other hand slicing is a real bad time |
18:37:03 | * | brson joined #nim |
18:37:10 | FromGitter | <barcharcraz> for example in Qt almost everything will also have 16bytes of overhead |
18:37:29 | krux02 | that's the one of the reasons why I avoid Qt |
18:37:31 | FromGitter | <barcharcraz> 8 for the vtbl and 8 for a private data pointer |
18:37:39 | FromGitter | <barcharcraz> it makes sence for GUI programming |
18:37:48 | krux02 | the other reason is the moc compiler |
18:37:59 | FromGitter | <barcharcraz> I don't mind moc |
18:38:07 | FromGitter | <barcharcraz> like there are things that are impossible to do in c++ |
18:38:24 | FromGitter | <barcharcraz> such as generate good runtime metadata |
18:38:27 | FromGitter | <barcharcraz> it's coming |
18:38:46 | FromGitter | <barcharcraz> but until c++ has compile time reflection I think moc is the best option |
18:38:48 | krux02 | first of all, it forces you to use these inefficient mechanisms, and then it disallows to use the more interesting features of c++, templates (they don't go well with moc). |
18:39:11 | FromGitter | <barcharcraz> you can use templates in the majority of your code |
18:39:34 | FromGitter | <barcharcraz> you don't have to use private data and whatnot |
18:39:47 | krux02 | well yea I know where I can use templates and where I can't |
18:39:57 | FromGitter | <barcharcraz> people tend to because it helps compile times and makes it harder to screw up your ABI |
18:41:00 | krux02 | horrible c++ memories, compile time optimizations |
18:41:11 | FromGitter | <barcharcraz> yeah |
18:41:20 | FromGitter | <barcharcraz> that's one of the reasons I gave up on rust as well |
18:41:24 | krux02 | I never want to work in a project again where I have to wait 30 minutes for a rebuild |
18:41:34 | FromGitter | <barcharcraz> although tbh with pimpl in qt it's definately also an ABI stability thing |
18:41:41 | krux02 | never, and I don't want to worry about compile times anymore |
18:41:49 | FromGitter | <barcharcraz> yeah |
18:41:54 | krux02 | it feels such a waste of time to think about compile time optimizations |
18:42:08 | FromGitter | <barcharcraz> imo with modules the compiler should be able to do all the bullshit that you need to do in c++ |
18:42:19 | FromGitter | <barcharcraz> and it /is/ bullshit |
18:42:43 | krux02 | yes I totally agree |
18:42:50 | krux02 | I never want to write a header again |
18:44:51 | krux02 | things that are broken/useless in c++: public, private, protected, methods |
18:45:18 | * | gokr joined #nim |
18:45:19 | krux02 | make everything a struct, and don't declare methods at all, and you have a much better live |
18:46:53 | krux02 | I Nim I realized that non virtual methods have actually no advantage to just function calls. They only have disadvantages |
18:48:27 | FromGitter | <barcharcraz> yeah |
18:48:56 | FromGitter | <barcharcraz> Bjarne Strostrup wants to get nim style universal function call syntax into the language, but it met some resistance. |
18:49:21 | krux02 | yes, but Bjarne also has weird ideas |
18:49:39 | FromGitter | <barcharcraz> idk his proposals are pretty good lately |
18:49:51 | FromGitter | <barcharcraz> they just never get that far |
18:51:52 | krux02 | well modules in c++ are more important |
18:52:01 | FromGitter | <barcharcraz> true |
18:52:54 | krux02 | universal function call syntax is not that universal |
18:53:31 | krux02 | it is good, an improvement, but it is mostly estetical |
18:53:42 | krux02 | so no real reason to push it |
18:54:00 | FromGitter | <barcharcraz> yeah |
18:54:04 | krux02 | modules and compile time reflection is the key important thing for c++ |
18:54:11 | FromGitter | <barcharcraz> I totally agree |
18:54:18 | krux02 | get a completely header free experience in c++ |
18:54:57 | FromGitter | <barcharcraz> god people will cling to headers because "it's good that it seperates implementation and definition...." |
18:55:32 | krux02 | it doesn't do that |
18:55:37 | FromGitter | <barcharcraz> I know |
18:55:42 | FromGitter | <barcharcraz> but people love to think it does |
18:56:17 | * | yglukhov quit (Remote host closed the connection) |
18:56:53 | krux02 | well people really like to stick to what they once learned |
18:57:02 | FromGitter | <barcharcraz> yeah |
18:57:19 | FromGitter | <barcharcraz> esp when what they learned was a super painful thing that no other language has had to deal with since like 1975 |
18:57:39 | * | yglukhov joined #nim |
18:58:11 | krux02 | even when it is just removing some common, there will be someone who made a living out of knowing the pitfalls, who doesn't like the improvement. |
18:58:45 | krux02 | totally agree |
18:59:05 | krux02 | the more painful it is to learn something the more the people want to stick to it |
18:59:21 | krux02 | I think that's the reason that vim and emacs is still a thing |
18:59:45 | krux02 | it just is very painful to learn and then in the end it is just an editor like every other editor |
19:00:17 | FromGitter | <barcharcraz> well until the rise of these new javascript based editors there was not that much better |
19:00:57 | krux02 | well javascript emacsLisp, I don't care that much |
19:01:13 | krux02 | vims |
19:01:46 | krux02 | ok it's better to stick to just one sucky scripting language, we don't need 100's of them |
19:02:11 | * | yglukhov quit (Ping timeout: 264 seconds) |
19:02:32 | FromGitter | <barcharcraz> well from observation it seems atom/code/brackets are much easier to write extensions and support plugins for |
19:02:51 | FromGitter | <barcharcraz> definately easier than Visual Studio |
19:02:56 | FromGitter | <barcharcraz> *shudders* |
19:03:09 | gokr | vscode too |
19:03:30 | krux02 | well maybe one day those editors rule the world. |
19:03:51 | krux02 | But I would like to be able to write plugins in that language, that I am also editing at the same time |
19:04:05 | gokr | As much as I hate to say praise for an MS product - vscode is really nice. Of course, sucks RAM like a donkey, like all electron things (including our own tool :)). |
19:04:50 | gokr | Ha! ;) Yeah. As a Smalltalker I totally agree - a reflective IDE is what you want. However, I haven't heard about many such beasts in manifest statically typed langs. |
19:05:20 | krux02 | well for c++ there is now 4coder |
19:05:37 | gokr | ok? A reflective env in C++? |
19:06:53 | krux02 | more like "read the api docs" than iterating through reflection I guess, I haven't tried it yet |
19:07:11 | krux02 | it's just what is used in the stream Handmade Hero |
19:07:45 | stisa | VSCode plugins are JS right? Would it be possible to write the plugin in nim and compiling to js? |
19:07:47 | gokr | I want the whole monty - live reflective - like Smalltalk. And... it's hard to pull off unless your lang/runtime was designed for it. |
19:08:05 | FromGitter | <barcharcraz> gokr: you used Juno? |
19:08:06 | gokr | stisa: Yeah, probably works. But... not sure what you gain. |
19:08:07 | krux02 | pretty cool youtube series that covers making a game in c++, everything included on stream including software rendering and os abstractions (no SDL used) |
19:08:23 | gokr | Juno... 3D stuff in Smalltalk, right? |
19:10:09 | * | kunev quit (Quit: е те!) |
19:10:38 | krux02 | I have little knowledge about smalltalk, but for me any language that does not have at least a simple type system and C like subset with composable structs and arrays is like a knife that doesn't cut. |
19:10:52 | FromGitter | <barcharcraz> Juno is the Julia plugin for Atom |
19:11:37 | krux02 | what I like about Julia is this: 1 ∈ [1,2,3] ---> true |
19:11:45 | gokr | krux02: When you say "type system" I suspect you mean manifest statical typing? |
19:11:46 | FromGitter | <barcharcraz> yeah |
19:11:57 | FromGitter | <barcharcraz> I'd love julia if not for the INSANE module system |
19:12:02 | krux02 | [1,2,3] ∩ [2,3,4] ---> [2,3] |
19:12:17 | gokr | krux02: Further, not sure what you refer to with "composable structs and arrays". |
19:13:28 | krux02 | I mean struct of structs, array of structs, struct of arrays, and all of that without hidden headers (overhead fields) |
19:14:23 | * | kunev joined #nim |
19:15:23 | krux02 | so when I put an array in a struct, I want the array to be embedded in the struct, not a hidden pointer to an array object with array header |
19:15:42 | krux02 | that's what julia does |
19:15:55 | krux02 | julia can also embed a struct, but only when it is immutable |
19:16:01 | FromGitter | <barcharcraz> I think that's an open problem tho |
19:16:04 | FromGitter | <barcharcraz> like just how to do that |
19:16:09 | krux02 | that might be ok for some people, but not for me |
19:16:14 | gokr | Right, I understand. Well, Smalltalk is higher level - so no - only objects basically. |
19:16:53 | gokr | A bit of a simplification, but ... yeah. |
19:17:43 | krux02 | well Nim offers this low level acces to memory layout |
19:17:49 | krux02 | that's what I like about that language |
19:17:53 | gokr | yup |
19:18:24 | krux02 | go does it, too. But go sucks at other things. |
19:31:17 | * | gokr quit (Ping timeout: 240 seconds) |
19:33:19 | krux02 | ok I think that was enough ranting for the day |
19:37:05 | * | djellemah_ joined #nim |
19:43:42 | * | Arrrr joined #nim |
19:43:42 | * | Arrrr quit (Changing host) |
19:43:42 | * | Arrrr joined #nim |
19:48:59 | * | djellemah_ quit (Quit: Leaving) |
19:49:18 | * | smt_ joined #nim |
19:49:47 | * | djellemah_ joined #nim |
19:52:50 | * | smt quit (Ping timeout: 260 seconds) |
19:53:44 | subsetpark | Can someone help me out with object inheritance? I've got my first in-earnest usage and I'm not sure what I'm doing |
19:55:02 | * | pregressive quit (Read error: Connection reset by peer) |
19:55:06 | subsetpark | basically I've got a hierarchy that looks like this: type O[T, T2] = ref object of RootObj; type O2 = ref object of O[ConcreteType, ConcreteType2]; type O3 = ref object of O2 |
19:55:45 | subsetpark | And I'm trying to instantiate O3 and then call it with a proc that takes an O |
19:56:09 | subsetpark | This seems correct to me, but I'm getting a type mismatch error - i'm sure I don't understand it yet |
20:00:30 | * | couven92 quit (Read error: Connection reset by peer) |
20:03:34 | * | bjz joined #nim |
20:04:08 | * | smt_ is now known as smt |
20:04:37 | subsetpark | BTW, making the proc a method doesn't solve things |
20:06:28 | * | pregressive joined #nim |
20:08:00 | Araq | subsetpark: report it properly please |
20:08:35 | subsetpark | Araq: what do you mean? I don't think it's a bug, I think I just don't understand how to use child objects |
20:09:34 | Araq | well your description sounds it should work, do you use 'var O' ? |
20:09:55 | * | yglukhov joined #nim |
20:11:41 | subsetpark | yeah i do... i'll try to make a minimal case |
20:12:38 | Araq | well if you use 'var O' for the parameters the compiler is correct :P |
20:13:30 | subsetpark | hm, I'm not sure what you mean, but using `var` or not in the proc parameters doesn't change anything |
20:15:12 | subsetpark | ok, I'm pretty confident i'm just not declaring things correctly. My minimal case doesn't fail. |
20:22:42 | * | Arrrr quit (Quit: Leaving.) |
20:23:19 | * | pregressive quit (Read error: Connection reset by peer) |
20:23:40 | subsetpark | ok I think I figured it out - if I declare that proc as `method f[T, T2](o: O[T, T2])...` I can get further |
20:28:34 | * | pregressive joined #nim |
20:29:06 | * | couven92 joined #nim |
20:33:57 | * | pregress_ joined #nim |
20:34:04 | * | pregressive quit (Read error: Connection reset by peer) |
20:44:51 | * | UxerUospr quit (Read error: Connection reset by peer) |
20:58:05 | * | gokr joined #nim |
21:00:39 | * | gokr quit (Client Quit) |
21:00:53 | * | gokr joined #nim |
21:02:55 | * | brson quit (Quit: leaving) |
21:03:02 | * | brson joined #nim |
21:05:12 | * | yglukhov quit (Remote host closed the connection) |
21:13:29 | * | yglukhov joined #nim |
21:17:33 | * | bjz quit (Quit: My MacBook Pro has gone to sleep. ZZZzzz…) |
21:31:11 | * | pregress_ quit (Read error: Connection reset by peer) |
21:31:44 | * | pregressive joined #nim |
21:44:27 | * | bjz joined #nim |
21:48:25 | FromGitter | <raydf> How can i initialize a seq with 0 items inside? |
21:49:12 | FromGitter | <raydf> nevermind |
21:49:12 | Araq | newSeq(0) |
21:49:18 | Araq | @[] |
21:49:20 | FromGitter | <raydf> thanks Araq |
21:49:47 | FromGitter | <raydf> ohhh i didn't knew about the @[], nice |
21:49:59 | * | Matthias247 joined #nim |
21:53:13 | * | bjz quit (Quit: My MacBook Pro has gone to sleep. ZZZzzz…) |
22:05:10 | * | nsf quit (Quit: WeeChat 1.7) |
22:10:15 | FromGitter | <raydf> I'm receiving Error: undeclared identifier: '=>' |
22:10:29 | FromGitter | <raydf> which module has this operator? |
22:11:27 | FromGitter | <Varriount> Where are you using it? |
22:11:34 | FromGitter | <raydf> in a map |
22:11:39 | gokr | https://nim-lang.org/docs/theindex.html#%60%3D%26gt%3B%60 |
22:11:40 | FromGitter | <raydf> i imported sequtils |
22:12:00 | gokr | So seems to be future |
22:12:09 | * | rokups quit (Quit: Connection closed for inactivity) |
22:12:43 | * | yglukhov quit (Remote host closed the connection) |
22:16:21 | FromGitter | <raydf> thanks it's future, i'm bookmarking the index |
22:32:56 | * | rauss quit (Quit: WeeChat 1.7) |
22:33:09 | * | yglukhov joined #nim |
22:35:22 | * | djellemah_ quit (Ping timeout: 245 seconds) |
22:39:20 | dyce[m] | i am curious if nim could benefit from RAD tools like what delphi had |
22:39:44 | dyce[m] | or is RAD dead and web is the replacement |
22:51:24 | * | Trustable quit (Remote host closed the connection) |
22:52:38 | Araq | yep, pretty much :-) |
22:53:24 | Araq | even internal business apps are often done as web apps now |
22:53:54 | FromGitter | <philip-wernersbach> @all @Araq @dom96 I hate to be that guy, but do we have a timeline for 0.16.2? It would be nice to have a preinstalled nimble that works |
22:54:31 | Araq | hmm, is the nimble with 0.16.0 broken? |
22:55:01 | FromGitter | <philip-wernersbach> yeah, i'll put it in a gist |
22:55:34 | FromGitter | <philip-wernersbach> https://gist.github.com/philip-wernersbach/f0fd0292906145b467cdc0842909ae2c |
22:56:15 | demi- | hmm, that works for me on 0.16.0 |
22:56:19 | Araq | that's just an old Nim? |
22:56:53 | * | pregressive quit (Remote host closed the connection) |
22:57:12 | FromGitter | <philip-wernersbach> No, it's 0.16.0: Nim Compiler Version 0.16.0 (2017-01-13) [MacOSX: amd64] |
22:57:29 | * | pregressive joined #nim |
22:57:49 | Araq | yeah but you have outdated nimble-version in your ./nimble/pkgs and that is picked up instead |
22:57:50 | demi- | is it from homebrew? |
22:58:09 | FromGitter | <philip-wernersbach> Oooooh |
22:58:33 | Araq | but yeah, new nimble avoids that, iirc |
22:58:49 | FromGitter | <philip-wernersbach> No, it's manually compiled. On OS X, koch nimble on 0.16.0 errors out, so I just copied dist/nimble/src/nimble into place |
22:59:09 | Araq | check your ./nimble/pkgs please |
23:00:10 | Araq | er, I mean ~/.nimble |
23:01:00 | FromGitter | <philip-wernersbach> No matches for wildcard '~/.nimble/pkgs/*nimble*'. |
23:01:50 | * | pregressive quit (Ping timeout: 260 seconds) |
23:02:16 | Araq | hmmm and what does 'nimble -v' say? |
23:06:56 | FromGitter | <philip-wernersbach> nimble v0.8.2 compiled at 2017-02-16 17:50:27 |
23:07:14 | FromGitter | <philip-wernersbach> I had to copy it from list/nimble/src/nimble into ~/.nimble/bin |
23:07:19 | FromGitter | <philip-wernersbach> So that's probably the issue |
23:07:41 | Araq | it should be next to the nim compiler binary |
23:09:56 | * | PMunch joined #nim |
23:10:16 | dom96 | that's not necessary |
23:10:20 | dom96 | try clearing /tmp |
23:10:23 | demi- | yeah, that sounds like it is installed wrong |
23:10:29 | dom96 | or see if /tmp/nimble* exists |
23:11:31 | dom96 | Other thing I can think of is that you have an older Nim version installed somewhere? |
23:11:32 | Araq | ok, good dom96 is taking over. I'm out of ideas :-) |
23:12:14 | demi- | if you are on os x then you should be installing from homebrew, ideally |
23:13:15 | dom96 | why? |
23:13:39 | dom96 | I wouldn't be surprised if homebrew does it wrong. |
23:13:51 | Araq | nah, build from source like the rest of us. packagers sometimes eat mushrooms |
23:14:00 | demi- | homebrew does it correct as far as i can tell |
23:14:42 | dom96 | @philip-wernersbach what error does 'koch nimble' give? |
23:17:22 | FromGitter | <philip-wernersbach> @dom96 https://gist.github.com/philip-wernersbach/7aae8213b23b0cf422474c6507dafaaf |
23:17:44 | FromGitter | <philip-wernersbach> Okay, so I got it to work with @Araq and @dom96 's help |
23:18:18 | Araq | what was the cause? |
23:19:20 | FromGitter | <philip-wernersbach> I had to rm -Rf ~/.nimble/bin/nimble ~/.nimble/pkgs/nimble-* /tmp/nimble* and then mkdir bin && cp dist/nimble/src/nimble dist/nimble/src/nimblepkg bin |
23:20:16 | FromGitter | <philip-wernersbach> So it was a combination of things in my .nimble directory and /tmp/nimble, and then not having nimblepkg next to nimble due to the above error |
23:20:34 | FromGitter | <philip-wernersbach> Thanks for your help @Araq @dom96 but wow that was painful |
23:21:17 | FromGitter | <philip-wernersbach> Wouldn't have been able to fix it without the help |
23:21:39 | * | UxerUospr joined #nim |
23:21:53 | Araq | well yes. would be nice if we could improve it for 0.16.2, but I still don't know what the problem was |
23:22:42 | Araq | dom96: does nimble 'cache' the /tmp/nimble file? |
23:22:52 | Araq | I mean "only write if not exists" |
23:23:38 | dom96 | Araq: That was fixed, but possibly only in 0.8.4 |
23:23:55 | FromGitter | <philip-wernersbach> Sorry, I meant there were a bunch of directories in /tmp that started with "nimble" so I just deleted them all |
23:24:11 | * | sz0 joined #nim |
23:24:14 | dom96 | The biggest failure is 'koch' |
23:24:17 | dom96 | That should be fixed |
23:24:21 | Araq | hey. |
23:24:41 | Araq | what's wrong with it? |
23:25:37 | FromGitter | <philip-wernersbach> I like koch, but it did give me an error that made me manually copy all this in the first place |
23:26:59 | dom96 | Araq: https://gist.github.com/philip-wernersbach/7aae8213b23b0cf422474c6507dafaaf |
23:27:40 | Araq | "copy all this"? it's a single binary file |
23:27:42 | * | Vladar quit (Remote host closed the connection) |
23:27:51 | Araq | and if it's not where koch thinks it is, you have some other problem |
23:36:36 | * | arnetheduck joined #nim |
23:46:35 | * | couven92 quit (Quit: Client disconnecting) |
23:54:07 | * | Matthias247 quit (Read error: Connection reset by peer) |
23:56:40 | FromGitter | <philip-wernersbach> It's a single binary file plus the nimblepkg directory |
23:57:27 | FromGitter | <philip-wernersbach> And then if you have nimble directories in /tmp or ~/.nimble/pkgs, you're gonna have a bad time |
23:58:44 | FromGitter | <philip-wernersbach> It's not terrible, but there's definitely room for improvement. All I did was extract nim-0.16.0.tar.xz and run "nim c koch && ./koch nimble", so not sure what the error could be |