00:04:18 | * | krux02 quit (Quit: Leaving) |
00:27:36 | * | kier quit (Quit: No Ping reply in 180 seconds.) |
00:33:01 | * | kier joined #nim |
00:38:54 | vlad1777d | Another question about stack and heap =) Will image from gtk3.newImage() be located in heap? (because type object is in heap) Or to locate it in heap I need write: "new(gtk3.Image)" ? Code: https://pp.vk.me/c638428/v638428447/15b2d/D97kPrWnqNQ.jpg Thanks |
00:52:15 | * | dddddd quit (Remote host closed the connection) |
00:59:07 | * | [ui] joined #nim |
01:00:35 | * | pregressive quit (Remote host closed the connection) |
01:01:09 | * | pregressive joined #nim |
01:05:38 | * | pregressive quit (Ping timeout: 250 seconds) |
01:45:52 | * | yglukhov joined #nim |
01:48:17 | * | PMunch quit (Quit: leaving) |
01:50:03 | * | yglukhov quit (Ping timeout: 245 seconds) |
02:48:04 | * | yglukhov joined #nim |
02:54:38 | * | yglukhov quit (Ping timeout: 264 seconds) |
02:59:27 | * | chemist69 quit (Disconnected by services) |
02:59:32 | * | chemist69_ joined #nim |
03:05:36 | * | vlad1777d quit (Quit: Leaving) |
03:08:23 | * | brson quit (Quit: leaving) |
03:16:22 | * | [ui] quit (Quit: Connection closed for inactivity) |
03:35:28 | * | Jesin quit (Quit: Leaving) |
04:38:02 | * | [ui] joined #nim |
04:41:02 | * | space-wizard joined #nim |
04:52:13 | * | yglukhov joined #nim |
04:56:48 | * | yglukhov quit (Ping timeout: 256 seconds) |
06:08:44 | * | bjz joined #nim |
06:21:15 | * | bjz quit (Quit: My MacBook Pro has gone to sleep. ZZZzzz…) |
06:21:53 | * | bjz joined #nim |
06:24:46 | * | bjz quit (Read error: Connection reset by peer) |
06:34:12 | * | nsf joined #nim |
06:46:23 | * | [ui] quit (Quit: Connection closed for inactivity) |
06:46:31 | * | bjz joined #nim |
06:53:44 | * | yglukhov joined #nim |
06:57:14 | * | gokr joined #nim |
06:57:50 | * | ftsf_ quit (Remote host closed the connection) |
06:58:13 | * | yglukhov quit (Ping timeout: 248 seconds) |
07:42:14 | * | rokups joined #nim |
07:46:54 | * | chemist69_ quit (Ping timeout: 250 seconds) |
07:51:33 | * | chemist69 joined #nim |
07:55:28 | * | Snircle quit (Quit: Textual IRC Client: www.textualapp.com) |
07:58:02 | * | irrequietus joined #nim |
08:02:30 | * | Arrrr joined #nim |
08:07:33 | * | shodan45 quit (Ping timeout: 252 seconds) |
08:11:15 | * | zama_ joined #nim |
08:13:02 | * | Andris_zbx joined #nim |
08:16:05 | * | zama quit (*.net *.split) |
08:16:05 | * | Gonzih quit (*.net *.split) |
08:16:05 | * | ofelas quit (*.net *.split) |
08:19:15 | * | Gonzih joined #nim |
08:20:52 | * | zama_ quit (Changing host) |
08:20:52 | * | zama_ joined #nim |
08:21:00 | * | zama_ is now known as zama |
08:21:30 | Arrrr | It cannot be located in the stack anyway if image belongs to a ref object, which seems to be the case. |
08:23:08 | * | ofelas joined #nim |
08:28:11 | * | irrequietus quit (Ping timeout: 268 seconds) |
08:29:03 | Arrrr | +1 to import/{a, b, c}. It is similar to sets, which suggest you each module must be unique. |
08:31:11 | * | yglukhov joined #nim |
08:38:56 | * | bjz quit (Ping timeout: 256 seconds) |
08:44:31 | * | irrequietus joined #nim |
08:46:08 | * | bjz joined #nim |
08:48:59 | Araq | -1, import order is important for top level statements (for better or worse) |
08:49:14 | Araq | there is no concept of a "set of modules" in Nim |
08:49:34 | Araq | and I doubt the compiler even checks for multiple imports |
08:50:07 | FromGitter | <andreaferretti> @dom96 yes, andreaTP is a colleague of mine :-) |
08:50:14 | FromGitter | <andreaferretti> how do you know him? |
08:54:12 | FromGitter | <nigredo-tori> @Araq, could you take a look at #5135 , please? It seems serious. |
08:56:39 | * | byte512 joined #nim |
08:59:04 | Araq | sure |
09:03:20 | Arrrr | Well, is only to cheat the programmer's mind, it doesn't have to work exactly like a set. But [] looks good too. |
09:04:36 | * | space-wizard quit (Quit: My MacBook has gone to sleep. ZZZzzz…) |
09:05:06 | * | space-wizard joined #nim |
09:05:22 | * | space-wizard quit (Client Quit) |
09:05:52 | * | space-wizard joined #nim |
09:05:57 | Arrrr | On the package thing, couldn't the compiler deduce it from cmd unless you specify it in nimble? "root=./NimChess" |
09:06:10 | * | space-wizard quit (Client Quit) |
09:06:53 | * | space-wizard joined #nim |
09:06:58 | * | space-wizard quit (Client Quit) |
09:07:48 | * | space-wizard joined #nim |
09:07:48 | * | space-wizard quit (Client Quit) |
09:08:18 | * | space-wizard joined #nim |
09:08:34 | * | space-wizard quit (Client Quit) |
09:09:03 | * | space-wizard joined #nim |
09:09:22 | * | space-wizard quit (Client Quit) |
09:09:53 | * | space-wizard joined #nim |
09:10:10 | * | space-wizard quit (Client Quit) |
09:10:52 | * | space-wizard joined #nim |
09:10:58 | * | space-wizard quit (Client Quit) |
09:11:26 | * | space-wizard joined #nim |
09:11:46 | * | space-wizard quit (Client Quit) |
09:12:16 | * | space-wizard joined #nim |
09:12:34 | * | space-wizard quit (Client Quit) |
09:14:39 | * | irrequietus quit () |
09:22:02 | * | Varriount|Mobile joined #nim |
09:22:35 | Varriount|Mobile | Araq: What's wrong with "from x import y, z"? |
09:29:03 | Araq | Arrrr: I don't understand what you mean |
09:29:29 | yglukhov | Araq: hi. i think i know what the problem is |
09:29:39 | Araq | Varriount|Mobile: it would be 2 different semantics using the same syntax |
09:29:50 | Araq | yglukhov: shoot |
09:30:55 | yglukhov | importc functions are not defined in generetated c sources. |
09:31:07 | yglukhov | that is the difference. and it explains everything |
09:31:31 | yglukhov | * not declared |
09:31:48 | Araq | yeah, lacking prototypes produces weird C behaviour |
09:31:57 | yglukhov | yup |
09:32:08 | Araq | I often compile to c++ to see this straight away |
09:32:41 | Araq | why this is only a warning in C in 2016 escapes me. |
09:32:57 | yglukhov | i think there should be some clang flag which makes this an error. |
09:33:36 | Araq | ok, have a small test reproducing the issue? |
09:34:00 | yglukhov | no but i think i could make one. give me 5min |
09:35:32 | * | zaquest quit (Ping timeout: 258 seconds) |
09:47:34 | * | zaquest joined #nim |
09:47:55 | yglukhov | Araq: https://github.com/nim-lang/Nim/issues/5136 - good enough? |
09:48:28 | Araq | ah I see what could have caused this :-) |
09:52:25 | euantor | Are concepts at the kind of stage where we could have a core database concept? We have three modules for dealing with MySQL, SQLite and Postgres with similar methods, would be great if we could have a common package that would allow any concrete implementation to be passed to consumers |
09:52:40 | euantor | The APIs for the xisting modules would possibly have to change to make that work though |
09:53:24 | euantor | Something like https://github.com/crystal-lang/crystal-db |
09:53:50 | euantor | Or https://golang.org/pkg/database/sql/ |
09:55:24 | FromGitter | <andreaferretti> like this? |
09:55:24 | FromGitter | <andreaferretti> https://github.com/jlp765/db |
09:55:38 | FromGitter | <andreaferretti> (I have not tried it) |
09:56:03 | Araq | you can do this today, without concepts |
09:56:10 | euantor | Yes, like that |
09:56:31 | Araq | I don't understand why anybody wants to switch database implementations at runtime, it's like switching between OSes at runtime |
09:56:51 | FromGitter | <andreaferretti> not at runtime |
09:56:57 | FromGitter | <andreaferretti> but at compile time yes |
09:57:04 | euantor | Yeah, at compile time |
09:57:12 | Araq | so change the import statement? |
09:57:17 | euantor | I'd like to have a package that uses a DB that's agnostic across DBs |
09:57:22 | euantor | For example, my migrate package |
09:57:27 | FromGitter | <andreaferretti> sort of |
09:57:40 | FromGitter | <andreaferretti> but consider the case when you are writing a db-agnostic library |
09:57:43 | Araq | that's easily doable with an include file and the patchFile mechanism |
09:57:55 | Araq | or via --defines or smth |
09:58:00 | euantor | At the minute it only works with MySQL, but would ideally work with any DB based upon the connection string passed to it on the command line |
09:58:54 | cheatfate | it looks like you trying to make sail for autocar |
09:59:07 | euantor | So I'd like to be able to use `./migrate.exe up mysql://root@localhost/test --path=./migrations` to use a MySQL db or `./migrate.exe up sqlite://root@./thedb.db --path=./migrations` for SQLite |
10:00:09 | Araq | that's definitely a runtime switch |
10:00:20 | Araq | use https://github.com/jlp765/db for this |
10:02:49 | Araq | but yes, concepts do not give you interfaces |
10:02:58 | Araq | so no, concepts don't help you. |
10:04:46 | yglukhov | isnt it a classic polymorphism use-case? |
10:10:43 | Araq | it's a good example of how to design an "interface" construct in a language |
10:11:10 | FromGitter | <andreaferretti> @yglukhov It is, but concepts do not provide run-time polymorphism |
10:11:26 | FromGitter | <andreaferretti> this may work instead |
10:11:27 | FromGitter | <andreaferretti> http://forum.nim-lang.org/t/2422/4 |
10:12:05 | FromGitter | <andreaferretti> or the approach of the `db` package (the set of backends is finite and known anyway, so one can just switch on three or four cases) |
10:15:07 | Araq | actually it's a complex problem |
10:15:34 | Araq | 1. the switch doesn't have to be built manually, you could have a macro for that |
10:16:38 | Araq | 2. more problematic: The approach of the 'db' package loads all backend DLLs |
10:16:50 | Araq | which might not be installed |
10:17:08 | Araq | so you need a lazy DLL loading concept on top of that to make it work |
10:18:35 | FromGitter | <andreaferretti> well, isn't it the whole point of DLLs? |
10:18:49 | FromGitter | <andreaferretti> otherwise there's not much Dynamic in DLL |
10:19:22 | Araq | ever run a C# application that fails after hours in production due to a missing DLL? |
10:19:34 | Araq | I have. |
10:19:36 | FromGitter | <andreaferretti> actually not :-) |
10:19:55 | Araq | it's not fun, I want my DLL to load upfront |
10:20:27 | FromGitter | <andreaferretti> still, one can put a `try` around loadLib and skip the missing ones |
10:20:29 | euantor | Yes, I have |
10:20:53 | euantor | Or one that calls a DLL after running for an hour, but that DLL sues a different version of the .net framework that isn't installed - it just silently fails |
10:21:12 | euantor | I encountered this exact issue yesterday whilst supporting a user in Madrid remotely |
10:21:37 | Araq | a 'lazy' dynlib mechanism is worthwhile but shouldn't be the default. right now Nim only supports with the dynlib module |
10:22:18 | euantor | If I ever get around to finishing my mysql module, there won't be any need for a DLL for mysql, and there's already a similar package for postgres |
10:22:36 | Araq | euantor: how come? |
10:22:51 | euantor | I want to be able to use async sockets to query |
10:23:05 | Araq | ah nice |
10:23:08 | euantor | and having one written all in Nim is a nice exercise for me leanring Nim |
10:23:29 | euantor | It's just quite a large protocol to implement and I don't get much free time |
10:31:44 | * | byte512 quit (Ping timeout: 250 seconds) |
10:35:34 | * | irrequietus joined #nim |
10:38:48 | Araq | yglukhov: fixed |
10:42:20 | yglukhov | Araq: here's the next one: Undefined symbols for architecture x86_64: "_nimLoadProcs0", referenced from: _newgraphicscontext_5pg4UkCi59b8MjhG9bGsrmvQ in nimx_context.o |
10:44:23 | yglukhov | i can observe nice c declarations now, but now this link error :( |
10:44:39 | Araq | better than a crash :P |
10:45:53 | Araq | that could be an opengl wrapper bug? |
10:46:12 | Araq | it must use importc without nodecl for the nimLoadProcs0 |
10:46:43 | * | irrequietus quit () |
10:46:50 | Araq | if only I would remember how this opengl extension loading works :P |
10:47:44 | flyx | it's a pain because it's platform-dependent. |
10:48:05 | Araq | proc nimLoadProcs0() {.importc.} |
10:48:17 | Araq | that's what the official Opengl wrapper does |
10:48:25 | Araq | does yours do the same? |
10:48:57 | yglukhov | yes |
10:49:32 | yglukhov | nodecl doesnt help. i think original nimLoadProcs0 is gone or has changed its name with your changes |
10:50:47 | Araq | yeah, it's a fresh regression :P |
10:51:55 | * | dddddd joined #nim |
10:53:24 | * | marchelzo quit (Ping timeout: 250 seconds) |
11:02:49 | * | vlad1777d joined #nim |
11:02:53 | Araq | Undefined symbols for architecture x86_64: |
11:02:53 | Araq | "std::terminate()", referenced from: |
11:02:53 | Araq | ___clang_call_terminate in stdlib_system.o |
11:02:55 | Araq | "vtable for __cxxabiv1::__class_type_info", referenced from: |
11:02:57 | Araq | typeinfo for NimException in stdlib_system.o |
11:02:59 | Araq | NOTE: a missing vtable usually means the first non-inline virtual member function has no definition. |
11:03:01 | Araq | wtf? |
11:10:39 | yglukhov | cpp backend? |
11:11:42 | yglukhov | have you recently upgraded xcode cli tools? |
11:14:59 | Araq | no and it only fails during the tester |
11:15:25 | Araq | when I compile this test manually (cpp/tlinkproblem) |
11:15:27 | Araq | it works |
11:15:30 | Araq | very strange |
11:16:08 | Araq | anyway, try again. could work now... |
11:16:43 | Araq | I think the new clang error has to do with the fact that nimcache is shared for these tests |
11:16:51 | * | bjz_ joined #nim |
11:16:52 | Araq | need to investigate further |
11:16:53 | * | bjz quit (Ping timeout: 260 seconds) |
11:22:44 | * | bjz_ quit (Max SendQ exceeded) |
11:23:27 | * | zevlg joined #nim |
11:23:33 | * | bjz joined #nim |
11:39:14 | * | byte512 joined #nim |
11:55:40 | * | gokr quit (Quit: Leaving.) |
11:55:53 | * | gokr joined #nim |
11:56:20 | Araq | yglukhov: as far as I know your project should work again |
12:02:31 | * | Snircle joined #nim |
12:12:08 | yglukhov | Araq: it works! a week of regressions is over. thanks a bunch! =) |
12:12:42 | * | yglukhov quit (Remote host closed the connection) |
12:13:35 | Araq | thank me by telling me the compile times got much better in practice during development |
12:15:16 | * | BitPuffin|osx joined #nim |
12:20:25 | Araq | that was the purpose of this whole "signature hashing" |
12:24:56 | Arrrr | lol |
12:25:45 | Arrrr | I'll tell you that once i update Nim. |
12:26:07 | FromGitter | <andreaferretti> they are in fact faster for my libraries :-) |
12:26:22 | * | gokr left #nim (#nim) |
12:32:59 | * | yglukhov joined #nim |
12:34:12 | * | byte512 quit (Ping timeout: 250 seconds) |
12:39:17 | * | chemist69 quit (Ping timeout: 240 seconds) |
12:40:40 | Araq | andreaferretti: can we get some numbers? |
12:41:05 | FromGitter | <andreaferretti> it is just my perception |
12:41:19 | FromGitter | <andreaferretti> let me rollback and try to time it |
12:43:15 | Araq | for me it's slightly worse, but when I change something only affected modules produce different C++ code |
12:43:56 | * | chemist69 joined #nim |
12:44:36 | Araq | 0.1s for bootstrapping iirc |
12:45:30 | FromGitter | <andreaferretti> turns out, my perception was wrong |
12:45:55 | FromGitter | <andreaferretti> it is slightly worse |
12:47:13 | FromGitter | <andreaferretti> for emmy ⏎ ⏎ ---nim devel:--- ⏎ ⏎ real 0m2.029s ... [https://gitter.im/nim-lang/Nim?at=585a79d17a3f79ef5d83b27a] |
12:49:12 | FromGitter | <andreaferretti> for linalg ⏎ ⏎ ---nim devel:--- ⏎ ⏎ real 0m5.301s ... [https://gitter.im/nim-lang/Nim?at=585a7a47e7bdfe4e297ff147] |
12:49:27 | FromGitter | <andreaferretti> (times are taken on the second compilation with a given compiler) |
12:50:03 | FromGitter | <andreaferretti> I didn't benchmark other libs, as they compile fster |
12:50:05 | Araq | bah, don't make add these numbers |
12:50:15 | Araq | *don't make me add |
12:50:46 | FromGitter | <andreaferretti> it is just what `time` prints out |
12:50:56 | FromGitter | <andreaferretti> `user` should be the actual clock time |
12:51:07 | FromGitter | <andreaferretti> (I think) |
12:53:20 | Araq | ah my bad. ok, that's pretty bad but still acceptable and I haven't profiled it |
12:54:50 | Araq | pity, I actually removed a hot spot in the compiler (backend type canonicalization) |
13:04:59 | * | irrequietus joined #nim |
13:48:10 | Varriount|Mobile | Araq: I know several web server applications that let you choose between databases at runtime. |
13:49:09 | Varriount|Mobile | Trac (A web-based project/issue management system) allows using either MySQL or SQLite |
13:55:54 | * | bamorim joined #nim |
13:56:40 | * | bamorim quit (Max SendQ exceeded) |
13:59:17 | * | bamorim joined #nim |
13:59:46 | * | bamorim quit (Max SendQ exceeded) |
14:03:18 | * | Jesin joined #nim |
14:12:20 | * | Snircle quit (Quit: Textual IRC Client: www.textualapp.com) |
14:16:53 | * | bamorim joined #nim |
14:25:33 | * | krux02 joined #nim |
14:37:45 | * | Varriount|Phone joined #nim |
14:41:26 | * | Varriount|Mobile quit (Ping timeout: 264 seconds) |
14:47:08 | * | chemist69 quit (Ping timeout: 245 seconds) |
15:14:08 | * | chemist69 joined #nim |
15:24:04 | Araq | Varriount|Phone: good for you. A Trac written in Nim could easily provide a compiletime option for this though. |
15:25:03 | Araq | Trac is written in Python and Python has no notion of "compiletime" to speak of. |
15:28:08 | euantor | DOesn't quite work out when you install Trac from your package manager as a binary - you would expect it to read your db config from a configuration file |
15:29:24 | Araq | pff real software is built from source :P |
15:29:42 | Araq | just think about all the usual nice ./configure options |
15:30:26 | euantor | Windows users might not agree - you'd have to pry their installers from their hands |
15:30:58 | euantor | Though I haven't seen many complaints about Nim's installer disappearing which is nice :) |
15:34:36 | * | Varriount|Phone quit (Read error: Connection reset by peer) |
15:34:41 | Araq | btw the package manager could provide 3 different packages ;-) |
15:35:00 | Araq | which is cool because then I don't have to configure this stupid thing |
15:35:07 | euantor | It could, but I've never seen that done before |
15:35:15 | euantor | Or if I have, I don't remember that |
15:35:48 | * | Araq is secretly convinced of sqlite's superiority |
15:36:42 | euantor | I would be if I wasn't used to dealing with databases that are 1GB+ and replicated across sites that have been running for years |
15:37:13 | euantor | We only left MySQL 4 2 years ago at work, and that was an up hill battle that we had to fight to get it signed off |
15:37:56 | Araq | 1.) it was a battle because dependent software required a recompile. |
15:38:09 | Araq | 2.) it was a battle because the database was used to store data. |
15:38:09 | euantor | Nope |
15:38:28 | euantor | It's using ODBC, which is a different mess in itself |
15:38:48 | euantor | It was a battle because people don't like change |
15:39:05 | Araq | that's option 3. |
15:39:08 | euantor | Even though the change was just installing a different (64 bit rather than 32) exe |
15:39:21 | Araq | lol |
15:39:29 | euantor | Of course, the performance benefit eventually won |
15:39:52 | euantor | Unfortunately, trying to get postgres signed off was a no go |
15:47:47 | * | yglukhov quit (Remote host closed the connection) |
15:53:26 | * | Arrrr quit (Quit: WeeChat 1.5) |
16:02:11 | dom96 | We can use different SQL databases at runtime in Nim with the current setup |
16:02:26 | dom96 | from db_sqlite import nil |
16:02:29 | dom96 | from db_mysql import nil |
16:02:47 | dom96 | if db == sqlite: db_sqlite.query() |
16:02:59 | dom96 | elif db == mysql: db_mysql.query() |
16:03:14 | dom96 | or similar, you get the idea |
16:03:43 | Araq | dom96: that's what the db nimble package does for you |
16:04:08 | dom96 | cool |
16:06:36 | euantor | Yes, it just requires you to have all the DLLs, but that isn't a major problem |
16:07:36 | dom96 | Regarding the discussion about loading DLLs on-demand: it's all about achieving a good balance |
16:08:21 | dom96 | In my opinion loading every DLL on-demand would be bad, but then again loading them all at startup leaves us with applications that don't work at all if some DLL which isn't required 100% of the time is missing. |
16:08:54 | dom96 | What would be ideal is to let the developer decide: --dynload:openssl or something |
16:09:05 | * | Matthias247 joined #nim |
16:15:22 | FromGitter | <andreaferretti> it is a choice of the programmer |
16:15:37 | FromGitter | <andreaferretti> for databases, it really makes sense to load DLLs on demand |
16:16:02 | FromGitter | <andreaferretti> or at least, try loading them upfront, but not fail if one is missing |
16:16:09 | FromGitter | <andreaferretti> until it is actually used |
16:17:07 | federico3 | I had to do the same stuff as the "db" package for httpauth |
16:19:59 | dom96 | federico3: I still think you should reconsider including database functionality in your httpauth package. |
16:20:35 | dom96 | For example, I won't be able to use it for NimForum because I have an existing table and ideally I wouldn't want to recreate it. |
16:21:02 | federico3 | dom96: you don't have to - you can plug in your own adaptor |
16:21:13 | dom96 | okay, that's good. |
16:22:55 | federico3 | speaking of which, I'm using subclassing to abstract away the backend interface from the implementations and this requires the use of methods - async will not work on them |
16:24:05 | dom96 | I wonder if async methods are doable |
16:24:23 | dom96 | If not then you might need to use an object variant |
16:27:41 | * | synshroud quit (Quit: ZNC 1.6.3 - http://znc.in) |
16:29:29 | * | synshroud joined #nim |
16:37:34 | * | Jesin quit (Quit: Leaving) |
16:43:28 | * | pregressive joined #nim |
16:48:16 | * | yglukhov joined #nim |
16:52:53 | * | yglukhov quit (Ping timeout: 260 seconds) |
16:57:49 | * | brson joined #nim |
16:58:33 | * | yglukhov joined #nim |
17:02:04 | * | Trustable joined #nim |
17:03:28 | * | Andris_zbx quit (Remote host closed the connection) |
17:04:30 | * | brson quit (Read error: Connection reset by peer) |
17:04:44 | * | brson joined #nim |
17:04:56 | * | space-wizard joined #nim |
17:15:29 | * | shodan45 joined #nim |
17:19:34 | * | renesac_ quit () |
17:23:40 | * | shodan45 quit (Quit: Konversation terminated!) |
17:28:29 | FromGitter | <rivasiv> hi guys . If I want to wrap static c lib with nim Do I need to use any directive like dynlib for shared lib ? or it's enough to link the code with the proper library ? |
17:36:11 | FromGitter | <andreaferretti> is there a way to select a particular instance of an overload? |
17:36:25 | FromGitter | <andreaferretti> say I `import math` |
17:36:46 | FromGitter | <andreaferretti> and I want to pass the function `sqrt` to a proc, macro or template |
17:36:57 | FromGitter | <andreaferretti> I actually want to pass the one for `float64` |
17:37:33 | * | space-wizard quit (Quit: My MacBook has gone to sleep. ZZZzzz…) |
17:37:49 | FromGitter | <andreaferretti> the actual type will be used downstream to do type inference |
17:37:58 | FromGitter | <andreaferretti> so I cannot pass an overload |
17:39:42 | * | brson quit (Ping timeout: 258 seconds) |
17:40:15 | * | bjz quit (Quit: My MacBook Pro has gone to sleep. ZZZzzz…) |
17:46:48 | FromGitter | <Varriount> @andreaferretti Can you assign the procedure to a variable with the target type you want? |
17:47:54 | FromGitter | <Varriount> @rivasiv I believe you need to pass certain arguments to the nim compiler, and/or the C compiler |
17:48:03 | * | brson joined #nim |
17:49:13 | FromGitter | <andreaferretti> @Varriount I can, but doing that, I change the proc name |
17:49:40 | FromGitter | <andreaferretti> this makes me lose the proc name, which is needed, since it is inside an impure macro |
17:50:46 | FromGitter | <Varriount> @andreaferretti Can you post the source of the macro? |
17:53:05 | * | brson_ joined #nim |
17:53:16 | * | brson quit (Ping timeout: 240 seconds) |
17:54:19 | FromGitter | <andreaferretti> it would be quite a long story |
17:54:34 | FromGitter | <andreaferretti> but in the end I managed it using a template |
17:54:36 | FromGitter | <andreaferretti> :-) |
17:54:41 | FromGitter | <andreaferretti> thank you anyway |
17:54:53 | FromGitter | <andreaferretti> as soon as I get something complete, I will post it in any case |
18:04:13 | dom96 | rivasiv: this might be what you are looking for: http://nim-lang.org/docs/nimc.html#dynliboverride |
18:08:30 | FromGitter | <rivasiv> @dom96 You are right, I read some other doc I thought that It's enough just to put --passL , but it looks I also need dynliboverride inside my c2nim config |
18:09:07 | dom96 | dynliboverride is useful when you want to support both static and dynamic linking AFAIK |
18:12:49 | Araq | dom96: slightly offtopic but: how would I tell Nimble to install Linux dependencies? |
18:13:17 | Araq | exec "apt-get install foo"? anything else? |
18:13:28 | dom96 | yes, but we should abstract this somehow. |
18:13:56 | Araq | nativePkgMan "install foo" |
18:13:57 | dom96 | The question is should it be supported in Nimble natively |
18:14:13 | dom96 | or should we instead add support for "installation dependencies" |
18:14:17 | dom96 | The latter has been my plan |
18:14:26 | Araq | yes. Nimble should detect the distro and provide a nativePkgMan proc |
18:14:39 | Araq | (or something with a better name :P) |
18:15:15 | dom96 | argh, the lack of sections with the new .nimble format ruins my nice plan |
18:15:17 | dom96 | But basically: |
18:15:42 | dom96 | require_for_install "nativePkg" |
18:15:53 | dom96 | before install: |
18:16:10 | Araq | doesn't work. |
18:16:19 | dom96 | import nativePkg; nativePkg.install("libssl") |
18:16:23 | FromGitter | <rivasiv> @Araq , @dom96 I implemented dependencies like the following https://github.com/rivasiv/forestdb/blob/master/build.nims hope it's correct |
18:16:27 | Araq | install needs "sudo" but nimble usually is not sudos |
18:17:05 | dom96 | rivasiv: there should be no Nimble metadata in the .nims file. |
18:17:36 | Araq | rivasiv: you use 'requires' incorrectly |
18:17:37 | dom96 | Araq: so it will ask for sudo |
18:17:46 | FromGitter | <rivasiv> @dom96 Then how it is possible to prepare a package ? |
18:18:13 | Araq | dom96: how about it just prints "run these commands to finish the installation: ...."? |
18:18:17 | dom96 | rivasiv: you can merge these two files |
18:18:31 | dom96 | Araq: sure |
18:18:56 | * | kulelu88 joined #nim |
18:19:16 | dom96 | rivasiv: to be honest, executing commands like that without a prompt at least will make a lot of people angry |
18:19:19 | federico3 | packages will have different names and versions depending on OS and distribution |
18:19:49 | dom96 | Araq: In fact, that is probably the best way to do it. |
18:20:31 | dom96 | and you should be able to do it easily |
18:20:53 | dom96 | what would be nice is a package that abstracts the OS differences |
18:20:54 | FromGitter | <rivasiv> @dom96 yeah about nimble metadata - I used old nims doc published on site when I added it, I'll remove it in the next version. |
18:22:08 | dom96 | rivasiv: great. But yeah, 'requires' only supports Nimble packages |
18:23:02 | FromGitter | <rivasiv> @dom96 yes, I experimented and forgot that code there |
18:23:41 | Araq | dom96: well "give me package manager name for Linux distro" is easy enough, but the packages themselves are not standardized |
18:23:56 | dom96 | Araq: indeed. |
18:24:23 | Araq | so you end up with 'if ubuntu: ... elif slackface: ...' anyway :-( |
18:24:40 | dom96 | yeah, you may as well let the developers find the correct package names |
18:24:45 | federico3 | (that's what I just wrote) |
18:25:03 | dom96 | federico3: :) |
18:25:04 | federico3 | yet a default for 2-3 OSes and d |
18:25:25 | federico3 | -distributions can go a long way, and print out message otherwise |
18:25:49 | dom96 | I might add a special function that displays external dependencies |
18:25:56 | Araq | federico3: any idea how probable it is to guess the name? |
18:26:24 | Araq | if it is libgtk-2.0 is the name really all that different on different distros? |
18:26:37 | federico3 | guess when writing the config or dynamically at install time? |
18:27:17 | dom96 | even if we just specify debian, most linux users will be able to figure out the package names for their distro themselves |
18:27:21 | federico3 | well, 90% of the names are the same, maybe 5% can be guessed by prefixing lib |
18:28:44 | dom96 | What would likely be most important is supporting homebrew on OS X and Chocolatey on Windows |
18:28:53 | dom96 | Maybe even giving a URL to an installer on Windows. |
18:29:04 | dom96 | Which again, the package developer can figure out themselves. |
18:29:11 | federico3 | a friend started developing distromatch to match names across distributions |
18:29:16 | dom96 | The best way Nimble can help is ask for this information during `nimble init` |
18:29:59 | dom96 | I'm working on making Nimble's output prettier right now, so I can add something for displaying the external requirements in a nice way. |
18:33:45 | * | chemist69 quit (Ping timeout: 258 seconds) |
18:34:09 | * | chemist69 joined #nim |
18:35:15 | * | brson_ quit (Read error: Connection reset by peer) |
18:38:41 | Araq | federico3: just as a default try |
18:40:25 | * | brson joined #nim |
18:42:54 | * | space-wizard joined #nim |
18:45:39 | * | themagician joined #nim |
18:47:00 | * | brson quit (Quit: leaving) |
18:48:05 | federico3 | actually, a simple dependency check command in nimble could verify if pkgs do exists across OSes and distros with a handful of HTTP GETs |
18:50:11 | * | Trustable quit (Remote host closed the connection) |
18:56:26 | Araq | federico3: how so? |
18:57:08 | dom96 | ugh, why does git output its silly detached HEAD message even with the `-q` flag? |
18:58:14 | dom96 | '-c advice.detachedHead=false' seems to be working at least |
18:58:37 | dom96 | but hrm, I should capture this output |
19:00:15 | federico3 | Araq: various pkg repositories have pages where you can query if a pkg exists. The author of a Nim pkg could write the required dependency names and run a command that to check if they are correct |
19:02:38 | dom96 | federico3: that would be a nice feature |
19:05:46 | * | bjz joined #nim |
19:07:55 | dom96 | but it would require getting the package authors to specify exactly what distro each external dependency is meant for |
19:08:27 | dom96 | i.e. instead of a simple `echo "execute sudo apt-get libssl"` it would be `debian "libssl"` or similar. |
19:12:44 | * | bjz quit (Quit: Textual IRC Client: www.textualapp.com) |
19:28:39 | * | bjz joined #nim |
19:30:57 | * | bjz quit (Client Quit) |
19:33:57 | * | BitPuffin|osx quit (Ping timeout: 252 seconds) |
19:34:51 | Araq | dom96: maybe we should start with an "osname()" primitive. |
19:35:05 | * | brson joined #nim |
19:35:22 | Araq | that could also detect "winxp" vs "Windows 8" |
19:39:27 | * | space-wizard quit (Quit: My MacBook has gone to sleep. ZZZzzz…) |
19:39:58 | * | brson_ joined #nim |
19:40:28 | * | brson quit (Ping timeout: 245 seconds) |
19:52:33 | * | brson_ quit (Quit: leaving) |
19:52:41 | * | brson joined #nim |
20:11:27 | cheatfate | Araq, its easy to detect |
20:11:56 | Araq | cheatfate: we have an osinfo nimble package for this |
20:14:23 | cheatfate | Araq, it looks very old |
20:15:06 | cheatfate | so it doesn't know about Windows 10 |
20:17:12 | cheatfate | and it has wrong detection of os architecture, because 32bit apps will always get 32bit windows... |
20:21:02 | dom96 | it's one of the first modules I've written in Nim ;) |
20:29:13 | dom96 | in fact, it may be the first one hah |
20:39:56 | * | nsf quit (Quit: WeeChat 1.6) |
20:41:55 | * | yglukhov quit (Remote host closed the connection) |
20:42:32 | cheatfate | wow64 was introduced with windows xp 64bit |
20:42:51 | * | yglukhov joined #nim |
20:44:33 | dom96 | https://pbs.twimg.com/media/C0Ok3puXUAEM0g2.png:large |
20:44:36 | dom96 | Feedback welcome |
20:47:17 | * | yglukhov quit (Ping timeout: 246 seconds) |
20:59:31 | * | yglukhov joined #nim |
21:14:47 | Araq | dom96: seems nice enough though I would prefer HTML based output ;-) |
21:15:42 | Araq | that requires terminals that don't exist though |
21:16:27 | dom96 | why? |
21:16:39 | dom96 | HTML is basically a GUI |
21:16:54 | dom96 | Something completely different |
21:17:36 | dom96 | Feel free to create an app on top of Nimble using Electron that uses 50GB of RAM and runs slower than my Raspberry Pi :P |
21:24:07 | Araq | no, i have different plans. anyway |
21:24:20 | Araq | import foo / [bar, baz] |
21:24:28 | Araq | is now supported |
21:26:08 | dom96 | cool |
21:26:17 | * | Trustable joined #nim |
21:26:18 | dom96 | are the spaces significant? |
21:26:33 | Araq | no |
21:26:36 | dom96 | good |
21:27:20 | Araq | keep in mind that you cannot use this feature until the next release is out |
21:27:37 | Araq | for Nimble. |
21:27:43 | dom96 | sure |
21:29:02 | * | devted joined #nim |
21:30:33 | * | brson quit (Ping timeout: 260 seconds) |
21:30:41 | * | bamorim quit (Quit: Leaving) |
21:33:05 | * | yglukhov quit (Remote host closed the connection) |
21:34:05 | * | devted quit (Quit: Textual IRC Client: www.textualapp.com) |
21:34:25 | * | devted joined #nim |
21:36:11 | * | devted quit (Client Quit) |
21:36:35 | * | devted joined #nim |
21:39:03 | * | devted quit (Client Quit) |
21:39:23 | * | devted joined #nim |
22:14:42 | * | nsf joined #nim |
22:21:16 | * | Trustable quit (Remote host closed the connection) |
22:22:33 | vlad1777d | Araq, that's great, but "using foo import bar, baz" could be better =) |
22:23:13 | Araq | 'using' is already used for something else. |
22:25:16 | vlad1777d | Araq, in Nim ? |
22:30:18 | * | space-wizard joined #nim |
22:32:58 | euantor | Regarding OS packages, you also have to determine distribution version - see the renaming of "yum" to "dnf" in Fedora and eventual RHEL |
22:33:39 | * | yglukhov joined #nim |
22:34:33 | dom96 | euantor: what, when did this happen? and why? |
22:35:37 | euantor | Fedora 24 introduced it IIRc, and yum is currently an alias to dnf |
22:35:46 | euantor | But it'll eventually be removed propbably |
22:36:20 | euantor | As for the reason why, apparently the dependency algorithm in yum was broken. Why that needed a new name, I guess it's because they like to cause as much pain as possible |
22:36:47 | euantor | See also: apt vs apt-get vs aptitude |
22:37:57 | * | yglukhov quit (Ping timeout: 248 seconds) |
22:44:32 | Araq | vlad1777d: yes, read the manual |
22:44:45 | Araq | btw, https://www.codeproject.com/Articles/1116188/Basic-Practices-in-Assembly-Language-Programming |
22:45:01 | Araq | you can implement fib in x86 with a one instruction loop |
22:45:16 | * | brson joined #nim |
22:45:18 | Araq | interesting, isn't it. |
22:46:47 | vlad1777d | Araq, oh, no. I read it several times, I missed this. |
22:49:19 | Araq | euantor: I think for now we can assume it's "yum" and call it a day |
22:50:36 | euantor | Yes, for now definitely. It's just something to be aware of in the future. The fedora guys seem to take joy in breaking other people's scripts ;) |
22:51:07 | Araq | yum is a much cooler name than dnf |
22:52:30 | euantor | Dnf is a stupid name, and seems even more stupid when you learn it's short for "Dandified Yum is the next generation version of Yum. It roughly maintains CLI compati" |
22:52:50 | euantor | Or rather just dandified yum. Copying and pasting on a phone is hard |
22:53:08 | Araq | or we check at runtime whether 'yum' exist and if not, try 'dnf' |
22:53:19 | Araq | no version check required then. |
22:53:58 | euantor | That would work |
22:54:43 | euantor | The Fedora guys are the same people who put the "next" button in their installer in the top left of the screen rather than the common bottom right... |
23:00:38 | vlad1777d | Araq, I don't know than =) That word could be "go ./folder2 import some1, some2", or "origin", or "taking", or "basing" ... Something |
23:01:26 | Araq | vlad1777d: my solution was very easy to implement, look at the patch |
23:01:45 | Araq | this suggests that it's objectively elegant |
23:01:52 | Araq | if there is such a thing. |
23:01:57 | * | rokups quit (Quit: Connection closed for inactivity) |
23:02:18 | Araq | no new keyword required, no grammar change |
23:03:23 | Araq | and it supports things like import foo /../ [bar, baz] |
23:07:01 | vlad1777d | Araq, I partially agree with you, yes, it does not need many changes. But it makes looking of sources more unclear. |
23:08:41 | vlad1777d | Also making something like "go foo/../ import bar, baz" could be available too =) |
23:09:01 | Araq | does it? it's the syntax that was proposed by dom96 too (right?) |
23:09:32 | vlad1777d | But I don't bet or ask you =) I just tell my opinion =) |
23:09:45 | Araq | withDir "foo/..": import bar, baz # can be done as a macro |
23:10:20 | vlad1777d | Yeah, he told that such changes are more easy to implement and there is a lack of keywords for this =) |
23:10:59 | Araq | problem with a macro is that you then have to import the macro just to get the easier import syntax. which is verbose. |
23:11:39 | vlad1777d | Araq, yes, sure |
23:12:09 | vlad1777d | That will make no sense to import macro to import something other |
23:12:31 | vlad1777d | it would be easier to make import foo/../[bar, baz] |
23:15:08 | * | ftsf_ joined #nim |
23:17:59 | * | nsf quit (Quit: WeeChat 1.6) |
23:22:05 | * | derlafff quit (Ping timeout: 260 seconds) |
23:23:05 | * | derlafff joined #nim |
23:30:32 | * | space-wizard quit (Quit: My MacBook has gone to sleep. ZZZzzz…) |
23:34:38 | * | irrequietus quit () |
23:36:50 | * | devted quit (Quit: My MacBook has gone to sleep. ZZZzzz…) |
23:51:15 | * | chemist69 quit (Disconnected by services) |
23:51:20 | * | chemist69_ joined #nim |