<< 21-12-2016 >>

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:54vlad1777dAnother 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:30ArrrrIt 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:03Arrrr+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:59Araq-1, import order is important for top level statements (for better or worse)
08:49:14Araqthere is no concept of a "set of modules" in Nim
08:49:34Araqand I doubt the compiler even checks for multiple imports
08:50:07FromGitter<andreaferretti> @dom96 yes, andreaTP is a colleague of mine :-)
08:50:14FromGitter<andreaferretti> how do you know him?
08:54:12FromGitter<nigredo-tori> @Araq, could you take a look at #5135 , please? It seems serious.
08:56:39*byte512 joined #nim
08:59:04Araqsure
09:03:20ArrrrWell, 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:57ArrrrOn 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:35Varriount|MobileAraq: What's wrong with "from x import y, z"?
09:29:03AraqArrrr: I don't understand what you mean
09:29:29yglukhovAraq: hi. i think i know what the problem is
09:29:39AraqVarriount|Mobile: it would be 2 different semantics using the same syntax
09:29:50Araqyglukhov: shoot
09:30:55yglukhovimportc functions are not defined in generetated c sources.
09:31:07yglukhovthat is the difference. and it explains everything
09:31:31yglukhov* not declared
09:31:48Araqyeah, lacking prototypes produces weird C behaviour
09:31:57yglukhovyup
09:32:08AraqI often compile to c++ to see this straight away
09:32:41Araqwhy this is only a warning in C in 2016 escapes me.
09:32:57yglukhovi think there should be some clang flag which makes this an error.
09:33:36Araqok, have a small test reproducing the issue?
09:34:00yglukhovno 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:55yglukhovAraq: https://github.com/nim-lang/Nim/issues/5136 - good enough?
09:48:28Araqah I see what could have caused this :-)
09:52:25euantorAre 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:40euantorThe APIs for the xisting modules would possibly have to change to make that work though
09:53:24euantorSomething like https://github.com/crystal-lang/crystal-db
09:53:50euantorOr https://golang.org/pkg/database/sql/
09:55:24FromGitter<andreaferretti> like this?
09:55:24FromGitter<andreaferretti> https://github.com/jlp765/db
09:55:38FromGitter<andreaferretti> (I have not tried it)
09:56:03Araqyou can do this today, without concepts
09:56:10euantorYes, like that
09:56:31AraqI don't understand why anybody wants to switch database implementations at runtime, it's like switching between OSes at runtime
09:56:51FromGitter<andreaferretti> not at runtime
09:56:57FromGitter<andreaferretti> but at compile time yes
09:57:04euantorYeah, at compile time
09:57:12Araqso change the import statement?
09:57:17euantorI'd like to have a package that uses a DB that's agnostic across DBs
09:57:22euantorFor example, my migrate package
09:57:27FromGitter<andreaferretti> sort of
09:57:40FromGitter<andreaferretti> but consider the case when you are writing a db-agnostic library
09:57:43Araqthat's easily doable with an include file and the patchFile mechanism
09:57:55Araqor via --defines or smth
09:58:00euantorAt 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:54cheatfateit looks like you trying to make sail for autocar
09:59:07euantorSo 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:09Araqthat's definitely a runtime switch
10:00:20Araquse https://github.com/jlp765/db for this
10:02:49Araqbut yes, concepts do not give you interfaces
10:02:58Araqso no, concepts don't help you.
10:04:46yglukhovisnt it a classic polymorphism use-case?
10:10:43Araqit's a good example of how to design an "interface" construct in a language
10:11:10FromGitter<andreaferretti> @yglukhov It is, but concepts do not provide run-time polymorphism
10:11:26FromGitter<andreaferretti> this may work instead
10:11:27FromGitter<andreaferretti> http://forum.nim-lang.org/t/2422/4
10:12:05FromGitter<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:07Araqactually it's a complex problem
10:15:34Araq1. the switch doesn't have to be built manually, you could have a macro for that
10:16:38Araq2. more problematic: The approach of the 'db' package loads all backend DLLs
10:16:50Araqwhich might not be installed
10:17:08Araqso you need a lazy DLL loading concept on top of that to make it work
10:18:35FromGitter<andreaferretti> well, isn't it the whole point of DLLs?
10:18:49FromGitter<andreaferretti> otherwise there's not much Dynamic in DLL
10:19:22Araqever run a C# application that fails after hours in production due to a missing DLL?
10:19:34AraqI have.
10:19:36FromGitter<andreaferretti> actually not :-)
10:19:55Araqit's not fun, I want my DLL to load upfront
10:20:27FromGitter<andreaferretti> still, one can put a `try` around loadLib and skip the missing ones
10:20:29euantorYes, I have
10:20:53euantorOr 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:12euantorI encountered this exact issue yesterday whilst supporting a user in Madrid remotely
10:21:37Araqa 'lazy' dynlib mechanism is worthwhile but shouldn't be the default. right now Nim only supports with the dynlib module
10:22:18euantorIf 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:36Araqeuantor: how come?
10:22:51euantorI want to be able to use async sockets to query
10:23:05Araqah nice
10:23:08euantorand having one written all in Nim is a nice exercise for me leanring Nim
10:23:29euantorIt'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:48Araqyglukhov: fixed
10:42:20yglukhovAraq: here's the next one: Undefined symbols for architecture x86_64: "_nimLoadProcs0", referenced from: _newgraphicscontext_5pg4UkCi59b8MjhG9bGsrmvQ in nimx_context.o
10:44:23yglukhovi can observe nice c declarations now, but now this link error :(
10:44:39Araqbetter than a crash :P
10:45:53Araqthat could be an opengl wrapper bug?
10:46:12Araqit must use importc without nodecl for the nimLoadProcs0
10:46:43*irrequietus quit ()
10:46:50Araqif only I would remember how this opengl extension loading works :P
10:47:44flyxit's a pain because it's platform-dependent.
10:48:05Araq proc nimLoadProcs0() {.importc.}
10:48:17Araqthat's what the official Opengl wrapper does
10:48:25Araqdoes yours do the same?
10:48:57yglukhovyes
10:49:32yglukhovnodecl doesnt help. i think original nimLoadProcs0 is gone or has changed its name with your changes
10:50:47Araqyeah, 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:53AraqUndefined symbols for architecture x86_64:
11:02:53Araq "std::terminate()", referenced from:
11:02:53Araq ___clang_call_terminate in stdlib_system.o
11:02:55Araq "vtable for __cxxabiv1::__class_type_info", referenced from:
11:02:57Araq typeinfo for NimException in stdlib_system.o
11:02:59Araq NOTE: a missing vtable usually means the first non-inline virtual member function has no definition.
11:03:01Araqwtf?
11:10:39yglukhovcpp backend?
11:11:42yglukhovhave you recently upgraded xcode cli tools?
11:14:59Araqno and it only fails during the tester
11:15:25Araqwhen I compile this test manually (cpp/tlinkproblem)
11:15:27Araqit works
11:15:30Araqvery strange
11:16:08Araqanyway, try again. could work now...
11:16:43AraqI 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:52Araqneed 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:20Araqyglukhov: as far as I know your project should work again
12:02:31*Snircle joined #nim
12:12:08yglukhovAraq: it works! a week of regressions is over. thanks a bunch! =)
12:12:42*yglukhov quit (Remote host closed the connection)
12:13:35Araqthank me by telling me the compile times got much better in practice during development
12:15:16*BitPuffin|osx joined #nim
12:20:25Araqthat was the purpose of this whole "signature hashing"
12:24:56Arrrrlol
12:25:45ArrrrI'll tell you that once i update Nim.
12:26:07FromGitter<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:40Araqandreaferretti: can we get some numbers?
12:41:05FromGitter<andreaferretti> it is just my perception
12:41:19FromGitter<andreaferretti> let me rollback and try to time it
12:43:15Araqfor 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:36Araq0.1s for bootstrapping iirc
12:45:30FromGitter<andreaferretti> turns out, my perception was wrong
12:45:55FromGitter<andreaferretti> it is slightly worse
12:47:13FromGitter<andreaferretti> for emmy ⏎ ⏎ ---nim devel:--- ⏎ ⏎ real 0m2.029s ... [https://gitter.im/nim-lang/Nim?at=585a79d17a3f79ef5d83b27a]
12:49:12FromGitter<andreaferretti> for linalg ⏎ ⏎ ---nim devel:--- ⏎ ⏎ real 0m5.301s ... [https://gitter.im/nim-lang/Nim?at=585a7a47e7bdfe4e297ff147]
12:49:27FromGitter<andreaferretti> (times are taken on the second compilation with a given compiler)
12:50:03FromGitter<andreaferretti> I didn't benchmark other libs, as they compile fster
12:50:05Araqbah, don't make add these numbers
12:50:15Araq*don't make me add
12:50:46FromGitter<andreaferretti> it is just what `time` prints out
12:50:56FromGitter<andreaferretti> `user` should be the actual clock time
12:51:07FromGitter<andreaferretti> (I think)
12:53:20Araqah my bad. ok, that's pretty bad but still acceptable and I haven't profiled it
12:54:50Araqpity, I actually removed a hot spot in the compiler (backend type canonicalization)
13:04:59*irrequietus joined #nim
13:48:10Varriount|MobileAraq: I know several web server applications that let you choose between databases at runtime.
13:49:09Varriount|MobileTrac (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:04AraqVarriount|Phone: good for you. A Trac written in Nim could easily provide a compiletime option for this though.
15:25:03AraqTrac is written in Python and Python has no notion of "compiletime" to speak of.
15:28:08euantorDOesn'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:24Araqpff real software is built from source :P
15:29:42Araqjust think about all the usual nice ./configure options
15:30:26euantorWindows users might not agree - you'd have to pry their installers from their hands
15:30:58euantorThough 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:41Araqbtw the package manager could provide 3 different packages ;-)
15:35:00Araqwhich is cool because then I don't have to configure this stupid thing
15:35:07euantorIt could, but I've never seen that done before
15:35:15euantorOr if I have, I don't remember that
15:35:48*Araq is secretly convinced of sqlite's superiority
15:36:42euantorI 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:13euantorWe 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:56Araq1.) it was a battle because dependent software required a recompile.
15:38:09Araq2.) it was a battle because the database was used to store data.
15:38:09euantorNope
15:38:28euantorIt's using ODBC, which is a different mess in itself
15:38:48euantorIt was a battle because people don't like change
15:39:05Araqthat's option 3.
15:39:08euantorEven though the change was just installing a different (64 bit rather than 32) exe
15:39:21Araqlol
15:39:29euantorOf course, the performance benefit eventually won
15:39:52euantorUnfortunately, 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:11dom96We can use different SQL databases at runtime in Nim with the current setup
16:02:26dom96from db_sqlite import nil
16:02:29dom96from db_mysql import nil
16:02:47dom96if db == sqlite: db_sqlite.query()
16:02:59dom96elif db == mysql: db_mysql.query()
16:03:14dom96or similar, you get the idea
16:03:43Araqdom96: that's what the db nimble package does for you
16:04:08dom96cool
16:06:36euantorYes, it just requires you to have all the DLLs, but that isn't a major problem
16:07:36dom96Regarding the discussion about loading DLLs on-demand: it's all about achieving a good balance
16:08:21dom96In 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:54dom96What would be ideal is to let the developer decide: --dynload:openssl or something
16:09:05*Matthias247 joined #nim
16:15:22FromGitter<andreaferretti> it is a choice of the programmer
16:15:37FromGitter<andreaferretti> for databases, it really makes sense to load DLLs on demand
16:16:02FromGitter<andreaferretti> or at least, try loading them upfront, but not fail if one is missing
16:16:09FromGitter<andreaferretti> until it is actually used
16:17:07federico3I had to do the same stuff as the "db" package for httpauth
16:19:59dom96federico3: I still think you should reconsider including database functionality in your httpauth package.
16:20:35dom96For 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:02federico3dom96: you don't have to - you can plug in your own adaptor
16:21:13dom96okay, that's good.
16:22:55federico3speaking 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:05dom96I wonder if async methods are doable
16:24:23dom96If 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:29FromGitter<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:11FromGitter<andreaferretti> is there a way to select a particular instance of an overload?
17:36:25FromGitter<andreaferretti> say I `import math`
17:36:46FromGitter<andreaferretti> and I want to pass the function `sqrt` to a proc, macro or template
17:36:57FromGitter<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:49FromGitter<andreaferretti> the actual type will be used downstream to do type inference
17:37:58FromGitter<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:48FromGitter<Varriount> @andreaferretti Can you assign the procedure to a variable with the target type you want?
17:47:54FromGitter<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:13FromGitter<andreaferretti> @Varriount I can, but doing that, I change the proc name
17:49:40FromGitter<andreaferretti> this makes me lose the proc name, which is needed, since it is inside an impure macro
17:50:46FromGitter<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:19FromGitter<andreaferretti> it would be quite a long story
17:54:34FromGitter<andreaferretti> but in the end I managed it using a template
17:54:36FromGitter<andreaferretti> :-)
17:54:41FromGitter<andreaferretti> thank you anyway
17:54:53FromGitter<andreaferretti> as soon as I get something complete, I will post it in any case
18:04:13dom96rivasiv: this might be what you are looking for: http://nim-lang.org/docs/nimc.html#dynliboverride
18:08:30FromGitter<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:07dom96dynliboverride is useful when you want to support both static and dynamic linking AFAIK
18:12:49Araqdom96: slightly offtopic but: how would I tell Nimble to install Linux dependencies?
18:13:17Araqexec "apt-get install foo"? anything else?
18:13:28dom96yes, but we should abstract this somehow.
18:13:56AraqnativePkgMan "install foo"
18:13:57dom96The question is should it be supported in Nimble natively
18:14:13dom96or should we instead add support for "installation dependencies"
18:14:17dom96The latter has been my plan
18:14:26Araqyes. Nimble should detect the distro and provide a nativePkgMan proc
18:14:39Araq(or something with a better name :P)
18:15:15dom96argh, the lack of sections with the new .nimble format ruins my nice plan
18:15:17dom96But basically:
18:15:42dom96require_for_install "nativePkg"
18:15:53dom96before install:
18:16:10Araqdoesn't work.
18:16:19dom96 import nativePkg; nativePkg.install("libssl")
18:16:23FromGitter<rivasiv> @Araq , @dom96 I implemented dependencies like the following https://github.com/rivasiv/forestdb/blob/master/build.nims hope it's correct
18:16:27Araqinstall needs "sudo" but nimble usually is not sudos
18:17:05dom96rivasiv: there should be no Nimble metadata in the .nims file.
18:17:36Araqrivasiv: you use 'requires' incorrectly
18:17:37dom96Araq: so it will ask for sudo
18:17:46FromGitter<rivasiv> @dom96 Then how it is possible to prepare a package ?
18:18:13Araqdom96: how about it just prints "run these commands to finish the installation: ...."?
18:18:17dom96rivasiv: you can merge these two files
18:18:31dom96Araq: sure
18:18:56*kulelu88 joined #nim
18:19:16dom96rivasiv: to be honest, executing commands like that without a prompt at least will make a lot of people angry
18:19:19federico3packages will have different names and versions depending on OS and distribution
18:19:49dom96Araq: In fact, that is probably the best way to do it.
18:20:31dom96and you should be able to do it easily
18:20:53dom96what would be nice is a package that abstracts the OS differences
18:20:54FromGitter<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:08dom96rivasiv: great. But yeah, 'requires' only supports Nimble packages
18:23:02FromGitter<rivasiv> @dom96 yes, I experimented and forgot that code there
18:23:41Araqdom96: well "give me package manager name for Linux distro" is easy enough, but the packages themselves are not standardized
18:23:56dom96Araq: indeed.
18:24:23Araqso you end up with 'if ubuntu: ... elif slackface: ...' anyway :-(
18:24:40dom96yeah, you may as well let the developers find the correct package names
18:24:45federico3(that's what I just wrote)
18:25:03dom96federico3: :)
18:25:04federico3yet a default for 2-3 OSes and d
18:25:25federico3-distributions can go a long way, and print out message otherwise
18:25:49dom96I might add a special function that displays external dependencies
18:25:56Araqfederico3: any idea how probable it is to guess the name?
18:26:24Araqif it is libgtk-2.0 is the name really all that different on different distros?
18:26:37federico3guess when writing the config or dynamically at install time?
18:27:17dom96even if we just specify debian, most linux users will be able to figure out the package names for their distro themselves
18:27:21federico3well, 90% of the names are the same, maybe 5% can be guessed by prefixing lib
18:28:44dom96What would likely be most important is supporting homebrew on OS X and Chocolatey on Windows
18:28:53dom96Maybe even giving a URL to an installer on Windows.
18:29:04dom96Which again, the package developer can figure out themselves.
18:29:11federico3a friend started developing distromatch to match names across distributions
18:29:16dom96The best way Nimble can help is ask for this information during `nimble init`
18:29:59dom96I'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:41Araqfederico3: 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:05federico3actually, 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:26Araqfederico3: how so?
18:57:08dom96ugh, why does git output its silly detached HEAD message even with the `-q` flag?
18:58:14dom96'-c advice.detachedHead=false' seems to be working at least
18:58:37dom96but hrm, I should capture this output
19:00:15federico3Araq: 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:38dom96federico3: that would be a nice feature
19:05:46*bjz joined #nim
19:07:55dom96but it would require getting the package authors to specify exactly what distro each external dependency is meant for
19:08:27dom96i.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:51Araqdom96: maybe we should start with an "osname()" primitive.
19:35:05*brson joined #nim
19:35:22Araqthat 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:27cheatfateAraq, its easy to detect
20:11:56Araqcheatfate: we have an osinfo nimble package for this
20:14:23cheatfateAraq, it looks very old
20:15:06cheatfateso it doesn't know about Windows 10
20:17:12cheatfateand it has wrong detection of os architecture, because 32bit apps will always get 32bit windows...
20:21:02dom96it's one of the first modules I've written in Nim ;)
20:29:13dom96in 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:32cheatfatewow64 was introduced with windows xp 64bit
20:42:51*yglukhov joined #nim
20:44:33dom96https://pbs.twimg.com/media/C0Ok3puXUAEM0g2.png:large
20:44:36dom96Feedback welcome
20:47:17*yglukhov quit (Ping timeout: 246 seconds)
20:59:31*yglukhov joined #nim
21:14:47Araqdom96: seems nice enough though I would prefer HTML based output ;-)
21:15:42Araqthat requires terminals that don't exist though
21:16:27dom96why?
21:16:39dom96HTML is basically a GUI
21:16:54dom96Something completely different
21:17:36dom96Feel 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:07Araqno, i have different plans. anyway
21:24:20Araqimport foo / [bar, baz]
21:24:28Araqis now supported
21:26:08dom96cool
21:26:17*Trustable joined #nim
21:26:18dom96are the spaces significant?
21:26:33Araqno
21:26:36dom96good
21:27:20Araqkeep in mind that you cannot use this feature until the next release is out
21:27:37Araqfor Nimble.
21:27:43dom96sure
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:33vlad1777dAraq, that's great, but "using foo import bar, baz" could be better =)
22:23:13Araq'using' is already used for something else.
22:25:16vlad1777dAraq, in Nim ?
22:30:18*space-wizard joined #nim
22:32:58euantorRegarding 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:33dom96euantor: what, when did this happen? and why?
22:35:37euantorFedora 24 introduced it IIRc, and yum is currently an alias to dnf
22:35:46euantorBut it'll eventually be removed propbably
22:36:20euantorAs 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:47euantorSee also: apt vs apt-get vs aptitude
22:37:57*yglukhov quit (Ping timeout: 248 seconds)
22:44:32Araqvlad1777d: yes, read the manual
22:44:45Araqbtw, https://www.codeproject.com/Articles/1116188/Basic-Practices-in-Assembly-Language-Programming
22:45:01Araqyou can implement fib in x86 with a one instruction loop
22:45:16*brson joined #nim
22:45:18Araqinteresting, isn't it.
22:46:47vlad1777dAraq, oh, no. I read it several times, I missed this.
22:49:19Araqeuantor: I think for now we can assume it's "yum" and call it a day
22:50:36euantorYes, 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:07Araqyum is a much cooler name than dnf
22:52:30euantorDnf 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:50euantorOr rather just dandified yum. Copying and pasting on a phone is hard
22:53:08Araqor we check at runtime whether 'yum' exist and if not, try 'dnf'
22:53:19Araqno version check required then.
22:53:58euantorThat would work
22:54:43euantorThe 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:38vlad1777dAraq, I don't know than =) That word could be "go ./folder2 import some1, some2", or "origin", or "taking", or "basing" ... Something
23:01:26Araqvlad1777d: my solution was very easy to implement, look at the patch
23:01:45Araqthis suggests that it's objectively elegant
23:01:52Araqif there is such a thing.
23:01:57*rokups quit (Quit: Connection closed for inactivity)
23:02:18Araqno new keyword required, no grammar change
23:03:23Araqand it supports things like import foo /../ [bar, baz]
23:07:01vlad1777dAraq, I partially agree with you, yes, it does not need many changes. But it makes looking of sources more unclear.
23:08:41vlad1777dAlso making something like "go foo/../ import bar, baz" could be available too =)
23:09:01Araqdoes it? it's the syntax that was proposed by dom96 too (right?)
23:09:32vlad1777dBut I don't bet or ask you =) I just tell my opinion =)
23:09:45AraqwithDir "foo/..": import bar, baz # can be done as a macro
23:10:20vlad1777dYeah, he told that such changes are more easy to implement and there is a lack of keywords for this =)
23:10:59Araqproblem with a macro is that you then have to import the macro just to get the easier import syntax. which is verbose.
23:11:39vlad1777dAraq, yes, sure
23:12:09vlad1777dThat will make no sense to import macro to import something other
23:12:31vlad1777dit 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