00:02:59 | * | Matthias247 quit (Read error: Connection reset by peer) |
00:05:56 | * | devted joined #nim |
00:08:30 | * | ftsf joined #nim |
00:09:50 | * | chemist69 quit (Ping timeout: 258 seconds) |
00:23:18 | * | vlad1777d quit (Quit: Leaving) |
00:28:42 | * | vlad1777d joined #nim |
00:36:50 | * | chemist69 joined #nim |
00:49:53 | * | dddddd quit (Remote host closed the connection) |
01:00:51 | * | irrequietus quit () |
01:08:15 | * | gokr quit (Ping timeout: 246 seconds) |
01:13:55 | * | cheatfate quit (Ping timeout: 265 seconds) |
01:32:18 | * | yglukhov joined #nim |
01:36:41 | * | yglukhov quit (Ping timeout: 260 seconds) |
01:56:43 | * | subsetpark quit (Quit: Connection closed for inactivity) |
02:14:02 | * | chemist69 quit (Ping timeout: 258 seconds) |
02:18:43 | * | chemist69 joined #nim |
02:45:17 | * | chemist69 quit (Ping timeout: 260 seconds) |
02:48:31 | * | vlad1777d quit (Quit: Leaving) |
02:58:45 | * | chemist69 joined #nim |
03:34:18 | * | yglukhov joined #nim |
03:34:46 | * | def-- quit (*.net *.split) |
03:35:10 | * | 07EAAAAGG joined #nim |
03:39:02 | * | yglukhov quit (Ping timeout: 264 seconds) |
04:15:34 | * | devted quit (Quit: My MacBook has gone to sleep. ZZZzzz…) |
05:36:30 | * | yglukhov joined #nim |
05:40:39 | * | yglukhov quit (Ping timeout: 248 seconds) |
05:45:18 | * | nsf joined #nim |
06:29:39 | * | Vladar joined #nim |
07:05:00 | * | vlad1777d joined #nim |
07:29:03 | * | bjz joined #nim |
07:34:25 | * | bjz quit (Quit: My MacBook Pro has gone to sleep. ZZZzzz…) |
07:39:16 | * | bjz joined #nim |
07:47:53 | * | rokups joined #nim |
07:51:09 | * | space-wizard quit (Quit: My MacBook has gone to sleep. ZZZzzz…) |
07:56:00 | * | chemist69 quit (Ping timeout: 246 seconds) |
07:58:26 | * | chemist69 joined #nim |
08:11:31 | * | irrequietus joined #nim |
08:30:18 | * | byte512 joined #nim |
08:34:15 | * | yglukhov joined #nim |
08:34:17 | * | Andris_zbx joined #nim |
09:12:25 | * | gokr joined #nim |
09:14:59 | * | jinshil quit (Read error: Connection reset by peer) |
09:26:00 | * | subsetpark joined #nim |
09:35:44 | * | Trustable joined #nim |
09:37:32 | * | bjz quit (Quit: My MacBook Pro has gone to sleep. ZZZzzz…) |
09:40:07 | * | bjz joined #nim |
10:19:03 | * | Arrrr joined #nim |
10:38:22 | * | bjz quit (Quit: My MacBook Pro has gone to sleep. ZZZzzz…) |
10:41:23 | * | bjz joined #nim |
10:43:56 | * | ftsf_ joined #nim |
10:47:10 | * | bjz_ joined #nim |
10:48:27 | * | bjz quit (Ping timeout: 246 seconds) |
11:06:40 | * | vasher_ joined #nim |
11:58:37 | * | Arrrr quit (Quit: WeeChat 1.5) |
12:07:07 | gokr | Anyone here who a) trusts me b) is on a 64 bit Linux and c) can give me 1 minute of your time? |
12:07:37 | * | Araq slowly raises his hand |
12:07:47 | gokr | Are you on 64 bit Linux? ;) |
12:08:16 | gokr | Anyway, so download http://krampe.se/editor - and run it. |
12:08:32 | Araq | I have a VM |
12:08:39 | gokr | Ah, with a desktop? |
12:08:49 | Araq | sure. |
12:08:52 | gokr | Cool. |
12:09:10 | gokr | So its just 1.3 Mb. It's a trivial file editor using libui. |
12:09:31 | gokr | Written in Spry, but packaged up as a Nim application for delivery (embedded Spry source as string literal). |
12:09:59 | gokr | Just wondering if it runs on another machine than my own ;) |
12:10:31 | Araq | it does. |
12:10:59 | gokr | Ok, nice. |
12:11:17 | Araq | but note that my VM is Ubuntu, so same distro |
12:11:24 | gokr | yeah |
12:12:40 | gokr | I really like the libui stuff btw. |
12:12:42 | Vladar | runs on Arch also |
12:12:46 | gokr | Ah, cool. |
12:13:02 | gokr | The source is here: https://github.com/gokr/spry/tree/master/samples/editor |
12:13:12 | dom96 | interesting, got any screenshots? |
12:13:23 | gokr | It's written in Spry (editor.sy) and it's built using the silly make.sh |
12:13:42 | dom96 | I'm almost convinced now that webkit is the way to go for desktop UIs these days |
12:13:42 | gokr | It's just a trivial app, but it does work on native OSX too I am fairly sure. |
12:13:58 | dom96 | would be nice to see what you accomplished with libui |
12:14:07 | gokr | dom96: At Evothings we use electron, but... you know, web stuff, sigh. |
12:14:23 | dom96 | got an OS X binary? |
12:14:39 | gokr | Hmmm, not for that one, but... for the ide thingy I did earlier, one sec. |
12:14:58 | gokr | Try this one: http://krampe.se/ideosx |
12:15:15 | hohlerde | works on fedora 24 64bit as well |
12:15:29 | gokr | I made a silly movie of that one too, which is kinda neat - showing how it can alter itself: http://krampe.se/spry-ide.mp4 |
12:15:38 | gokr | hohlerde: Thanks |
12:15:57 | Araq | hohlerde: can you see if distros.nim works for you? |
12:16:06 | Araq | Vladar: same question. |
12:16:20 | dom96 | oh i've seen that video |
12:16:26 | dom96 | Do you have syntax highlighting? |
12:16:40 | gokr | Hehe, you mean in libui I suppose? |
12:16:56 | dom96 | yes |
12:16:59 | gokr | AFAIK he (the libui guy) has just started on a code component - not sure what he picked. |
12:17:55 | FromGitter | <andreaferretti> @gokr works for me (still on Ubuntu) |
12:18:39 | gokr | And... another interesting thing I noticed the other day (world is a funky place) - the Atomic game engine/editor (spinoff from Urho3D) which is written using a custom UI called TurboBadger actually embeds Microsofts VisualStudio Code as the code editor. Muhahahah. |
12:19:00 | gokr | Insane, but hey, visual studio code is darn nice. |
12:19:24 | * | avsej quit (*.net *.split) |
12:19:24 | * | jivank[m] quit (*.net *.split) |
12:19:25 | gokr | andreaferretti: nice |
12:19:41 | * | avsej joined #nim |
12:19:41 | * | avsej quit (Changing host) |
12:19:41 | * | avsej joined #nim |
12:19:49 | gokr | Araq: Trying to muster up some strength to pull off that stackless design. |
12:21:24 | * | jivank[m] joined #nim |
12:22:12 | Araq | import distros |
12:22:20 | Araq | echo detectOs(ArchLinux) |
12:22:43 | gokr | dom96: This is andlabs branch for the text rewrite he started for among other things, code editing: https://github.com/andlabs/libui/commits/utflib-and-attrstr |
12:22:53 | Araq | echo detectOs(Fedora) |
12:22:53 | gokr | But I have no idea. |
12:24:58 | Vladar | Araq, it works apparently |
12:25:58 | Araq | ok good |
12:26:43 | gokr | Either way, I like libui - both its simplicity (C library, seems to be consistent and easy to map to) and the fact it is actually fully native on all three. |
12:26:43 | gokr | And the demo samples are quite extensive. |
12:31:20 | dom96 | Araq: did you test OS X with distros? |
12:32:11 | Araq | can't remember :-) |
12:36:03 | * | Snircle quit (Quit: Textual IRC Client: www.textualapp.com) |
12:40:29 | * | Snircle joined #nim |
12:53:42 | hohlerde | Araq: distros.nim doesn't work on fedora 24. detectOs(Fedora) returns false. "uname -a" on my system gives: Linux w7-depdb5256 4.8.14-200.fc24.x86_64 #1 SMP Mon Dec 12 16:31:37 UTC 2016 x86_64 x86_64 x86_64 GNU/Linux |
12:54:22 | Araq | ok, please create a PR then. |
12:54:43 | Araq | I have no idea what substring to use to detect this. |
12:55:50 | gokr | Hmmm, sometimes you can also look at /etc/issue IIRC. |
12:56:39 | gokr | Or /etc/lsb-release |
12:56:57 | hohlerde | Araq: detectOs(Fedora) returns false on my system (see above) |
12:57:36 | Araq | hohlerde: yes, I understood |
12:58:27 | Araq | gokr: nice. /etc/lsb-release sounds much more reliable than uname -a |
12:59:23 | hohlerde | Araq: 4.8.14-200.fc24.x86_64 <-- the fc24 stands for fedora 24 |
12:59:41 | hohlerde | can create a PR tomorrow |
12:59:48 | gokr | You can google that stuff - there is also a command I think, "lsb-release" |
13:00:18 | Araq | gokr: yeah but it's not installed on my Ubu |
13:00:26 | Araq | the file does exist though |
13:00:31 | federico3 | http://superuser.com/questions/80251/how-to-know-which-linux-distribution-im-using and https://www.novell.com/coolsolutions/feature/11251.html |
13:01:34 | hohlerde | cat /etc/fedora-release |
13:01:34 | hohlerde | Fedora release 24 (Twenty Four) |
13:01:35 | hohlerde | I guess thats fedora specific. /etc/lsb-release is not present on my system, nor /etc/issue |
13:03:20 | gokr | See http://unix.stackexchange.com/questions/92199/how-can-i-reliably-get-the-operating-systems-name |
13:04:52 | hohlerde | on my fedora system lsb_release outputs this: |
13:04:53 | hohlerde | LSB Version: :core-4.1-amd64:core-4.1-noarch:cxx-4.1-amd64:cxx-4.1-noarch:desktop-4.1-amd64:desktop-4.1-noarch:languages-4.1-amd64:languages-4.1-noarch:printing-4.1-amd64:printing-4.1-noarch |
13:05:00 | hohlerde | very generic |
13:06:08 | hohlerde | oh, "lsb_release -a" does the trick |
13:17:09 | gokr | Right, with an underscore |
13:20:01 | * | bjz joined #nim |
13:21:25 | * | bjz_ quit (Ping timeout: 258 seconds) |
13:29:09 | dom96 | ahh yes, each distro has a different way of specifying its version/name |
13:33:28 | hohlerde | unfortunately |
13:34:33 | Araq | doesn't concern me much. this implementaton is just a best effort anyway. |
13:37:37 | dom96 | Araq: I'm sorry to say but I think distros should be implemented differently. |
13:37:47 | dom96 | A distro can have different package managers |
13:38:15 | Araq | yes and the API supports that via foreignCmd |
13:38:20 | federico3 | what's the point of detecting the distro in general? |
13:39:11 | federico3 | if it's only to pick a pkg manager to perform a pkg install maybe it should detect the packaging system rather than the distro? |
13:39:23 | Araq | oh not again. |
13:39:27 | Araq | we discussed this. |
13:39:39 | Araq | and the package name depends on the distro, not on the used package manager |
13:40:32 | Araq | steamOS and Ubuntu use apt-get but that doesn't mean they have the same package names |
13:41:41 | hohlerde | linux distro hell :-) |
13:46:45 | federico3 | if it's for the nimble dependencies use-case it will have to be best-effort |
13:46:47 | * | Trustable quit (Remote host closed the connection) |
13:47:05 | * | Trustable joined #nim |
13:47:24 | * | jh32 quit (*.net *.split) |
13:47:24 | * | heinrich5991 quit (*.net *.split) |
13:47:24 | * | allan0 quit (*.net *.split) |
13:47:24 | * | qwertfisch quit (*.net *.split) |
13:47:24 | * | literal quit (*.net *.split) |
13:47:32 | * | literal joined #nim |
13:47:36 | * | heinrich5991 joined #nim |
13:47:40 | * | allan0 joined #nim |
13:48:22 | Araq | federico3: yes, it's only for the nimble deps but I will also eventually use it for koch.nim |
13:48:31 | Araq | that's why I put it into the stdlib |
13:48:57 | Araq | the use case for koch.nim is the same, so best effort is good enough. |
13:48:58 | * | niv quit (Quit: Ping timeout (120 seconds)) |
13:49:06 | * | qwertfisch joined #nim |
13:50:29 | federico3 | maybe it could be useful to support the hierarchy of derivative distros, e.g. the .nimble file specifies "RedHat*": "nmap" and the nmap package will be installed in CentOS (and others) as well unless there's a more specific entry |
13:51:05 | dom96 | okay, I think the current implementation is good enough and has enough room for improvement. |
13:51:05 | federico3 | (with some luck maybe 80% of distros would be covered using 3-4 lines) |
13:51:25 | dom96 | federico3: please take a look as well: https://github.com/nim-lang/Nim/blob/devel/lib/pure/distros.nim |
13:51:47 | federico3 | I'll add some tests when time allows :) |
13:53:36 | Araq | how can you test this thing? :-) |
13:53:45 | Araq | apart from the manual testing. |
13:58:26 | federico3 | collect ouput strings from various distros and mock the code to parse them |
13:59:40 | Araq | ok, that works |
14:02:25 | * | bjz quit (Quit: My MacBook Pro has gone to sleep. ZZZzzz…) |
14:05:00 | dom96 | hrm, there needs to be a way to specify a generic list of packages |
14:05:28 | * | dddddd joined #nim |
14:06:03 | dom96 | because right now I can specify Ubuntu only and on other OS' users won't have a clue that external deps are necessary |
14:07:09 | federico3 | dom96: that kind-of was my point with the hierarchy |
14:07:44 | federico3 | there could be a generic fall-back "*" that matches every distribution |
14:08:09 | federico3 | (...and OSX?) |
14:08:16 | dom96 | every OS |
14:08:39 | dom96 | IMO distros should collect all foreigndeps and what distro they are meant for |
14:09:36 | dom96 | so that instead of writing `if detectOs(Ubuntu): foreignDep("blah")` I can just write `foreignDep("blah", Ubuntu)` in my .nimble file |
14:09:53 | Araq | that too has been discussed |
14:10:14 | Araq | and the current approach is much superior. |
14:10:18 | dom96 | why? |
14:11:01 | Araq | because you then reinvent a way to write conditions like |
14:11:13 | Araq | foreignDep("blah", Ubuntu | Debian) |
14:11:38 | Araq | and you reinvent Nim's "if" statement, albeit a shitty version of it |
14:12:06 | Araq | btw. it's easy to write this: |
14:12:40 | Araq | if detectOs(Ubnutu): foreignDep("libfoo-dev") else: foreignDep("libfoo") # best effort |
14:15:00 | federico3 | following the Ubuntu | Debian example, maybe the distro.nim file could provide some handy presets like DebianDerivatives, RedHatDerivatives ... |
14:16:06 | dom96 | Araq: foreignDep("blah", {Ubuntu, Debian})? |
14:18:21 | dom96 | I would like to give a custom message for this "best effort" so I need a way to distinguish between these two situations. |
14:20:32 | dom96 | Is there something wrong with using a set? |
14:30:36 | * | niv joined #nim |
14:37:11 | * | Snircle quit (Quit: Textual IRC Client: www.textualapp.com) |
14:42:19 | * | Snircle joined #nim |
14:48:25 | * | nsf quit (Quit: WeeChat 1.6) |
14:52:39 | * | yeeve joined #nim |
15:00:57 | * | Snircle quit (Quit: Textual IRC Client: www.textualapp.com) |
15:09:48 | * | devted joined #nim |
15:09:52 | Araq | dom96: this doens't work well: |
15:10:07 | Araq | foreignDep("foo", Ubuntu) |
15:10:26 | Araq | foreignDep("bar", GoboLinux) |
15:11:25 | Araq | does this then produce 2 messages for RedHat? |
15:11:52 | Araq | but foo and bar might be derivations from the same abstract dependency. |
15:13:02 | dom96 | The most specific one is picked |
15:13:13 | dom96 | That logic can always be adjusted |
15:13:22 | dom96 | distros has all the information it needs to make a decision |
15:13:32 | dom96 | and it does simplify the DSL, even if just by a bit |
15:13:55 | Araq | no, you introduce a broken DSL. |
15:14:53 | Araq | with unclear semantics. |
15:15:14 | Araq | if detectOs(...): dep(...) elif ... else: dep(...) has clear semantics |
15:15:24 | Araq | and it's clear what the fallback is. |
15:15:30 | Araq | (hint: the 'else' part) |
15:15:40 | dom96 | It's just as clear as my DSL |
15:15:51 | dom96 | detectOs(Ubuntu) -> foreignDep("", Ubuntu) |
15:16:10 | Araq | no because you have no control flow. |
15:16:11 | dom96 | You could make the same argument about detectOs() |
15:16:19 | Araq | no, beceause it's different. |
15:16:22 | dom96 | Does it return `true` even if the distro is Linux Mint? |
15:16:30 | dom96 | Linux Mint is based on Ubuntu after all |
15:16:46 | Araq | that's an entirely different argument. |
15:17:09 | Araq | consider this: |
15:17:23 | dom96 | your worry is that two messages will be produced |
15:17:41 | dom96 | we can surely just allow one to be shown |
15:18:08 | Araq | package foo is the dependency and I know it's foo-dev on Ubuntu and libfoo-dev on Debian. |
15:18:17 | Araq | with my API that's |
15:18:35 | Araq | if detectOs(Ubunut): foreignDep"foo-dev" |
15:18:49 | Araq | elif detectOs(Debian): foreignDep"libfoo-dev" |
15:19:00 | Araq | else: foreignDep"foo" |
15:19:04 | * | chamar joined #nim |
15:19:25 | Araq | with your api there is no connection between the foreignDep calls and no way of telling the relation |
15:19:39 | Araq | foreignDep"foo-dev", Ubuntu |
15:19:49 | Araq | foreignDep "libfoo-dev", Debian |
15:20:01 | Araq | foreignDep "foo" # is this call even here? |
15:20:13 | Araq | if not, how do you tell the user you want something like 'foo'? |
15:20:31 | * | cheatfate joined #nim |
15:22:09 | dom96 | foreignDep "foo", General |
15:22:52 | Araq | yeah, that makes foreignDep an advanced macro |
15:23:08 | Araq | with a varargs of distro set, name pairs |
15:23:30 | dom96 | With your API there is no way for Nimble to know that "foo" is a general dep |
15:24:08 | Araq | that's the old "with a declarative approach I can extract more information" argument. |
15:24:33 | Araq | the declarative approach always grows into turing completeness. |
15:24:45 | Araq | we replaced ini files with NimScript for this reason. |
15:25:06 | dom96 | Fine. |
15:25:11 | Araq | Nimble doesn't have "to know foo is a general dep" |
15:25:20 | dom96 | It doesn't, but I want it to |
15:25:33 | Araq | so run the nimscript file like you already do. |
15:26:10 | dom96 | huh? |
15:26:23 | Araq | nimble runs nimscript files. |
15:26:26 | dom96 | I just don't want it to output: "Finish installation by running: foo" |
15:26:55 | Araq | you have this in the foreignDeps variable. you can do lots of other things with this list of foreign dependencies. |
15:28:10 | dom96 | yes, but how do I detect that it's a generic dep? |
15:28:53 | Araq | you can't. but with your proposal you cannot either. |
15:29:29 | dom96 | Yes, I can. |
15:29:47 | dom96 | foreignDeps.hasKey(General) |
15:30:20 | dom96 | and no, foreignDep doesn't need to be a macro |
15:30:45 | FromGitter | <andreaferretti> @dom96 Is it me or nimble does not accept the `--run` flag anymore? I opened an issue, but it seems strange |
15:30:54 | FromGitter | <andreaferretti> I thought it was quite a crucial feature |
15:32:11 | dom96 | https://github.com/andreaferretti/patty/blob/master/patty.nimble#L19 |
15:32:23 | dom96 | Here? or do you mean when you run ``nimble c --run foo.nim``? |
15:32:51 | * | Snircle joined #nim |
15:33:36 | Araq | there is no connection beyond substring macthing between |
15:33:53 | Araq | foreignDep("libfoo-dev", Ubuntu) |
15:34:03 | Araq | foreignDep("foo", General) |
15:34:16 | * | Snircle quit (Client Quit) |
15:34:20 | Araq | so you better put it in a single foreignDep macro call |
15:34:23 | FromGitter | <andreaferretti> nimble c --run foo.nim |
15:34:53 | FromGitter | <andreaferretti> It doesn't work either way |
15:34:55 | dom96 | andreaferretti: does nimble c -r foo.nim work? |
15:34:56 | FromGitter | <andreaferretti> As well as in the task itself, yes |
15:35:31 | dom96 | Araq: Not sure what you mean. |
15:35:54 | FromGitter | <andreaferretti> @dom96 nope. It seems that the flag is just not passed to the compiler |
15:36:13 | Araq | I replied to "and no, foreignDep doesn't need to be a macro" |
15:36:21 | dom96 | andreaferretti: hrm, okay. Definitely a regression. |
15:37:13 | dom96 | Araq: If I understand correctly your argument is that those two lines should be further simplified via a macro? |
15:37:29 | Araq | they need to be or else your approach doesn't work. |
15:37:39 | dom96 | simplified to what? |
15:37:42 | Araq | they don't need to be "simplified" |
15:37:48 | Araq | they need to be merged. |
15:37:59 | Araq | so that it's clear they refer to the same abstract dependency. |
15:38:41 | dom96 | foreignDeps[Ubuntu].add("libfoo-dev") |
15:38:49 | dom96 | foreignDeps[General].add("foo") |
15:38:53 | dom96 | that's all that is required |
15:39:07 | dom96 | "General" might need a better name |
15:39:14 | dom96 | But my intention is not for it to be merged |
15:39:50 | dom96 | It's only meant to be matched when foreignDeps.hasKey(currentOs) == false |
15:40:16 | dom96 | I dunno, "Fallback"? |
15:40:32 | Araq | that doesn't work well. |
15:40:49 | Araq | you don't have a "currentOs" key. |
15:41:18 | dom96 | I can get one |
15:41:29 | dom96 | by creating a getCurrentOs proc |
15:42:58 | Araq | ok, so in nimble you reinvent distros.nim and create all sorts of work. |
15:43:29 | Araq | for instance, getCurrentOs might return "Kubunut" but that should be mapped to Ubuntu because the package repos are identical |
15:43:35 | Araq | *Kubuntu |
15:45:54 | dom96 | *sigh* fine |
15:45:57 | * | confundus joined #nim |
15:46:00 | dom96 | So I'll do it differently |
15:46:23 | Araq | I don't understand your problem. |
15:46:52 | Araq | afact you simply cannot admit that my approach works, is simpler and already implemented. |
15:47:52 | dom96 | I just want something simple, and your approach doesn't offer it |
15:48:51 | dom96 | So I'm trying to come up with a way to achieve it |
15:49:10 | dom96 | or at least ensure that it can be achieved in the future |
15:49:32 | * | Snircle joined #nim |
15:51:40 | dom96 | but it's fine, I think I have a simpler idea. |
15:54:46 | dom96 | hrm, another problem is that attempting to install a package that uses `distros` using an older Nimble fails with a cryptic error. |
15:56:28 | Araq | when defined(nimdistros): import distros; deps here |
15:57:50 | FromGitter | <andreaferretti> but what is exactly the aim of allowing foreign deps? Just being able to dump a command to install dependencies? |
15:58:01 | Araq | yes for now. |
15:58:16 | FromGitter | <andreaferretti> ok |
15:58:24 | dom96 | Araq: for now? |
15:58:30 | dom96 | what are the future plans? |
15:58:38 | dom96 | installing these automatically? |
15:58:41 | FromGitter | <andreaferretti> Every move that makes nimble work in more "global" mode worry me a little |
15:58:43 | FromGitter | <andreaferretti> :-) |
15:59:01 | Araq | yeah, run these automatically via some switch |
15:59:01 | FromGitter | <andreaferretti> I prefer package managers that isolate dependencies |
15:59:16 | Araq | or perhaps when I start it with "sudo nimble" |
15:59:20 | FromGitter | <andreaferretti> seems like a really bad idea.. |
15:59:29 | Araq | you don't have to use this switch. |
15:59:49 | FromGitter | <andreaferretti> yeah, I know, but still |
16:00:11 | dom96 | why do you think it's a bad idea? |
16:00:52 | FromGitter | <andreaferretti> well, I think the package manager for a language should handle dependencies per project |
16:01:01 | FromGitter | <andreaferretti> not try to mess with the global installation |
16:01:11 | FromGitter | <andreaferretti> otherwise one runs into the issues of pip |
16:01:18 | FromGitter | <andreaferretti> and the whole virtualenv mess |
16:01:33 | FromGitter | <andreaferretti> that was necessary because pip works by default in global mode |
16:01:37 | Araq | your own package requires libblas-dev to work... |
16:01:51 | FromGitter | <andreaferretti> yes, I know |
16:02:16 | federico3 | andreaferretti: I think the use-case is only about running the appropriate OS-provided package manager |
16:02:17 | FromGitter | <andreaferretti> but I think it would be much safer to try to integrate something that can download c dependencies without installing the globally |
16:02:44 | federico3 | albeit nimble could run "sudo $pkg_manager" instead of running the whole nimble process as root |
16:03:32 | FromGitter | <andreaferretti> unfortunately, there are not many options to donwload c dependencies without messing with the whole system |
16:03:41 | FromGitter | <andreaferretti> possibly 0install |
16:04:29 | Araq | so instead of apt-get install libblas-dev I do apt-get install 0install; 0install install libblas-dev |
16:04:31 | FromGitter | <andreaferretti> in fact much of docker popularity arises from the lack of a scoped package manager for c |
16:04:43 | federico3 | andreaferretti: there could be dynamic libraries or other stuff, like data, that a Nim application needs |
16:04:50 | FromGitter | <andreaferretti> ins't 0install able to scope dependencies |
16:04:59 | FromGitter | <andreaferretti> anyway, I am not completely against the idea |
16:05:12 | Araq | apt-get vs 0nistall vs docker is not Nimble's decision to make. |
16:05:18 | FromGitter | <andreaferretti> just a little wary :-) |
16:05:34 | FromGitter | <andreaferretti> @Araq I agree |
16:05:53 | FromGitter | <andreaferretti> was just mentioning that currently managing c deps correctly is a little mess |
16:06:23 | federico3 | on top of that, nimble should ask for permission before doing "sudo $foo" (also not to startle the user with an unexpected request for password) |
16:07:47 | Araq | federico3: what if I run "sudo nimble"? |
16:08:18 | federico3 | why running the whole process as root? |
16:08:35 | dom96 | installing global packages on a user's PC without their permission is a bad idea, even if nimble was ran as root |
16:09:33 | Araq | I see no difference between 'sudo nimble' and 'nimble --trusted' except that 'nimble --trusted' can never work as conveniently |
16:09:45 | Araq | but *shrug* |
16:10:22 | dom96 | Araq: what if I am using root and execute 'nimble install'? |
16:10:32 | dom96 | Then it's entirely implicit. |
16:10:41 | federico3 | sudo nimble might create new files (e.g. a logfile) as root instead of user; if something goes wrong it might overwrite files in the wrong place; |
16:11:02 | Araq | dom96: alright, fair enough. |
16:11:26 | federico3 | dom96: when running from sudo nimble could check for the sudo env var but it's really too hacky/clever |
16:11:34 | * | mjanssen quit (Remote host closed the connection) |
16:11:52 | dom96 | Araq: how would you feel about making the foreign dep output explicit? |
16:12:21 | Araq | dom96: you mean via some 'nimble --switch'? |
16:12:25 | dom96 | For Nimble I have to use a combination of 'foreignDep' and 'after install: echo("Please install openssl")' |
16:13:02 | Araq | shouldn't this be foreignDep("openssl") ? |
16:15:11 | dom96 | I guess |
16:16:07 | dom96 | I bet you people will begin opening issues saying "running `chocolatey install openssl` doesn't work!" |
16:16:45 | Araq | well it's not like am advocating for unguarded foreignDep calls. |
16:17:00 | dom96 | yes, but when nimble says: |
16:17:04 | dom96 | To complete installation run: |
16:17:09 | dom96 | chocolatey install openssl |
16:17:26 | dom96 | then people will think it must be 100% correct |
16:17:33 | dom96 | and if it's not, then it's a bug |
16:17:41 | dom96 | I need to word this message somehow to make this known |
16:19:53 | Araq | ah I finally get your problem. :-) |
16:20:26 | Araq | you don't want Ubunut vs Debian vs General, you want to know "is this a guess or known to work?" |
16:20:46 | Araq | and my API doesn't tell you that. |
16:21:07 | dom96 | yes! |
16:21:57 | Araq | yeah, foreignDep should get a single default parameter for this then. :P |
16:22:06 | Araq | foreignDep("blah", guess=true) |
16:23:49 | dom96 | lol |
16:23:55 | dom96 | fine |
16:24:05 | dom96 | We'll see how it works in practice |
16:24:09 | dom96 | I shall add a big warning in the docs |
16:24:16 | dom96 | which nobody reads anyway... |
16:24:29 | Araq | you have no choice really. |
16:24:53 | Araq | the wording should *always* say something like "you might be able to run these commands" |
16:25:02 | dom96 | yes |
16:26:18 | Araq | I dunno if we want to burden our nimscript writers wtih this problem. |
16:26:46 | Araq | I could tell nimble "known to work" and be wrong about it |
16:28:25 | dom96 | okay |
16:28:44 | dom96 | can't believe you didn't understand what I meant though |
16:28:50 | dom96 | Am I that bad at communicating? :P |
16:31:11 | * | nsf joined #nim |
16:39:31 | Araq | you even mention your concrete nimble implementation problem |
16:39:41 | Araq | I thought it's all about "what ifs" |
16:42:08 | * | pregressive joined #nim |
16:43:35 | Araq | *you didn't even |
16:45:39 | * | kulelu88 joined #nim |
16:50:46 | dom96 | true |
16:52:30 | * | yglukhov_ joined #nim |
16:54:51 | * | yglukhov_ quit (Read error: Connection reset by peer) |
16:55:24 | * | yglukhov_ joined #nim |
16:56:18 | * | yglukhov quit (Ping timeout: 272 seconds) |
16:59:46 | * | yglukhov_ quit (Ping timeout: 245 seconds) |
17:02:59 | * | yglukhov joined #nim |
17:03:35 | dom96 | Araq: when defined(nimdistros) doesn't work for detecting whether Nimble supports distros |
17:04:35 | dom96 | i'll just define a new symbol in nimscriptsupport for this |
17:07:16 | * | yglukhov quit (Ping timeout: 245 seconds) |
17:07:43 | * | space-wizard joined #nim |
17:22:00 | * | rokups quit (Quit: Connection closed for inactivity) |
17:35:31 | * | yglukhov joined #nim |
17:35:38 | dom96 | Araq: https://gist.github.com/dom96/a7cbc400e4454b31cd7aa773f94ca757 :) |
17:36:28 | dom96 | solution would probably be to add `skipFiles = @["doc/docgen_sample.nim"]` to compiler.nimble |
17:36:48 | dom96 | I can do that, just wanted to show you Nimble's awesome namespace validation :) |
17:38:25 | federico3 | dom96: nice |
17:39:24 | dom96 | thanks :D |
17:45:53 | * | def-pri-pub joined #nim |
17:54:08 | * | brson joined #nim |
18:11:36 | * | confundus quit (Quit: leaving) |
18:13:26 | * | Matthias247 joined #nim |
18:17:13 | * | Matthias247 quit (Read error: Connection reset by peer) |
18:18:31 | * | Matthias247 joined #nim |
18:18:34 | * | Andris_zbx quit (Remote host closed the connection) |
18:23:59 | * | yglukhov quit (Remote host closed the connection) |
18:24:40 | dom96 | Araq: ugh, looks like I also need to check whether the 'distros' module is available |
18:24:43 | dom96 | How can I do that? |
18:42:52 | dom96 | nvm |
18:43:01 | dom96 | I created something, albeit slightly hacky |
18:44:26 | Araq | dom96: when defined(nimDistros) should work for Nimble too |
18:50:16 | dom96 | Araq: it doesn't. |
18:50:43 | dom96 | The nimble version and the Nim version both have to be new enough |
18:51:06 | dom96 | This is how I solved it: https://github.com/nim-lang/nimble/commit/fcbb3de78373792698b3647c579b809f1cbc043e |
18:51:53 | dom96 | now I realise that I forgot to export that. |
18:52:29 | * | yglukhov joined #nim |
18:52:40 | dom96 | and it doesn't work D: |
18:55:20 | Araq | nimble compiles against the devel version of the compiler |
18:55:24 | dom96 | Araq: Any ideas why? |
18:55:34 | Araq | the devel version does defineSymbol"nimDistros" |
18:55:56 | dom96 | Nimble is also tested against Nim 0.15.2 |
18:55:59 | Araq | do you call initDefines() ? |
18:56:17 | dom96 | in that case 'nimdistros' isn't defined |
18:56:23 | Araq | ok, but this test doesn't work against Nim 0.15.2 |
18:56:43 | dom96 | huh? |
18:56:58 | dom96 | It does, but it doesn't work when you have an older Nimble version |
18:57:08 | dom96 | with a new Nim |
18:58:01 | Araq | why bother? we bundle nimble with nim for these reasons |
18:58:02 | dom96 | and yes, I do call it |
18:58:13 | Araq | yeah I checked. line 228 |
18:58:14 | dom96 | meh fine |
18:59:51 | dom96 | I bet you somebody will run into this |
19:00:17 | dom96 | strange that I cannot define something in nimscriptapi and then detect it inside my .nimble file though |
19:02:02 | * | yglukhov quit (Remote host closed the connection) |
19:18:50 | * | space-wi_ joined #nim |
19:20:15 | * | space-wizard quit (Ping timeout: 256 seconds) |
19:21:39 | * | yglukhov joined #nim |
19:24:33 | Araq | both nimble and nim need to support nimDistros |
19:24:43 | Araq | I don't understand your problem. |
19:25:07 | Araq | you cannot use an older nimble with distros.nim because distros.nim assumes nimscriptapi has the new foreignDeps var |
19:27:01 | dom96 | my problem is that using an older nimble to install a package which uses foreignDeps will fail (even if the foreignDeps are wrapped in when defined(nimdistros)) |
19:30:45 | * | chemist69 quit (Ping timeout: 246 seconds) |
19:32:08 | Araq | what? |
19:35:14 | * | chemist69 joined #nim |
19:35:19 | dom96 | it doesn't matter |
19:35:28 | dom96 | It's probably a rare problem |
19:35:45 | * | jivank[m] quit (*.net *.split) |
19:35:45 | * | avsej quit (*.net *.split) |
19:35:45 | * | ftsf quit (*.net *.split) |
19:35:45 | * | SunDwarf quit (*.net *.split) |
19:35:46 | * | flyx quit (*.net *.split) |
19:35:46 | * | erwana[m] quit (*.net *.split) |
19:35:46 | * | TheManiac quit (*.net *.split) |
19:35:46 | * | MrAxilus[m] quit (*.net *.split) |
19:35:56 | * | SunDwarf joined #nim |
19:36:00 | * | libman joined #nim |
19:36:00 | * | avsej joined #nim |
19:36:03 | * | flyx joined #nim |
19:36:10 | * | ftsf joined #nim |
19:36:16 | * | avsej quit (Changing host) |
19:36:16 | * | avsej joined #nim |
19:38:28 | * | nsf quit (Quit: WeeChat 1.6) |
19:38:35 | * | erwana[m] joined #nim |
19:38:35 | * | TheManiac joined #nim |
19:38:36 | * | jivank_ joined #nim |
19:39:23 | * | jivank[m] joined #nim |
19:39:33 | * | yglukhov quit (Remote host closed the connection) |
19:39:55 | * | MrAxilus[m] joined #nim |
19:42:20 | dom96 | okay, so looks like I fixed the Nimble regressions. |
19:42:31 | dom96 | Definitely could use more testing |
19:42:40 | dom96 | andrea found many bugs :) |
19:50:54 | * | bjz joined #nim |
20:04:13 | Araq | yummy |
20:06:11 | def-pri-pub | Another shameless plug: I "made," a ray tracer in Nim: https://16bpp.net/blog/post/ray-tracing-book-series-review-nim-first-impressions |
20:14:03 | * | gokr quit (Ping timeout: 246 seconds) |
20:14:03 | dom96 | def-pri-pub: never be afraid to post Nim-related blog posts here |
20:14:26 | dom96 | I shall tweet a link to it on Nim's twitter |
20:15:43 | dom96 | https://twitter.com/nim_lang/status/816377459947880448 |
20:22:17 | * | gokr joined #nim |
20:24:02 | * | yglukhov joined #nim |
20:24:12 | cheatfate | def-pri-pub, too big difference in benchmark 5x slower then c++ |
20:30:32 | def-pri-pub | cheatfate: it's because of an issue with how the BVH node implementation. Also, the raytracer is not at optimized as it could be. |
20:42:57 | * | bjz quit (Quit: My MacBook Pro has gone to sleep. ZZZzzz…) |
21:02:56 | Araq | yay, git --git-dir option corrupted my git repo |
21:03:12 | Araq | again. |
21:05:38 | * | byte512 quit (Ping timeout: 256 seconds) |
21:38:08 | * | chemist69 quit (Ping timeout: 240 seconds) |
21:43:07 | * | chemist69 joined #nim |
21:45:52 | * | bjz joined #nim |
21:45:53 | * | Trustable quit (Remote host closed the connection) |
21:47:37 | * | jinshil joined #nim |
21:52:59 | joshbaptiste | I want to convert a fork an existing Rust project and convert it to Nim .. DO I fork and simply change sources? or start a brand new project |
21:53:40 | joshbaptiste | not a nim specific Q per se .. but if anyone hasbest practices idea |
21:59:39 | Araq | joshbaptiste: depends on whether you want the git history to contain the Rust->Nim conversion |
21:59:59 | Araq | I think I'd start a new project. |
22:01:58 | federico3 | a * to Nim translator? |
22:03:37 | joshbaptiste | Araq: ah gotcha thx |
22:10:26 | * | gokr quit (Ping timeout: 272 seconds) |
22:17:46 | * | bjz quit (Quit: My MacBook Pro has gone to sleep. ZZZzzz…) |
22:31:22 | * | Jesin quit (Quit: Leaving) |
22:40:54 | * | bjz joined #nim |
22:47:34 | * | bjz quit (Quit: My MacBook Pro has gone to sleep. ZZZzzz…) |
22:49:30 | * | Vladar quit (Quit: Leaving) |
22:50:02 | * | bjz joined #nim |
22:54:55 | * | vlad1777d quit (Quit: Leaving) |
23:00:12 | * | bjz quit (Quit: My MacBook Pro has gone to sleep. ZZZzzz…) |
23:00:31 | ftsf | o/ |
23:07:04 | * | devted quit (Quit: My MacBook has gone to sleep. ZZZzzz…) |
23:16:51 | * | jinshil quit (Quit: client terminated!) |
23:25:22 | * | nim-buildbot quit (Quit: buildmaster reconfigured: bot disconnecting) |
23:31:23 | * | yglukhov quit (Remote host closed the connection) |
23:43:52 | * | jinshil joined #nim |
23:51:00 | * | devted joined #nim |
23:59:23 | * | dddddd quit (Remote host closed the connection) |