<< 24-12-2015 >>

00:17:05Araq_Trustable: cool. name suggestion: uiuiui
00:17:50Araq_an UI for 3 platforms plus it's a German sound that you make when you're excited
00:18:22Trustablehm, this doesn't sound like a serious name for me
00:21:55*sorakun quit (Remote host closed the connection)
00:24:51Araq_ok so name it pinkyUI
00:25:53*bigfondue quit (Ping timeout: 246 seconds)
00:26:31*Trustable quit (Remote host closed the connection)
00:28:37*bigfondue joined #nim
00:35:56*ioplx quit (Quit: Page closed)
00:38:12dom96Aww, Trustable left.
00:47:19onionhammerwhats this? "nimble install nimble" yields could not import: SSLv2_method
01:00:08dom96Can't wait to get rid of this damn SSL dependency
01:00:32dom96What's your Nim version?
01:02:40*krux02 quit (Quit: Verlassend)
01:31:29*tyu joined #nim
01:37:48dom96NimScript support is now in Nimble's master branch
01:38:20dom96Please test it if you can!
01:38:24dom96I added some docs too :)
01:50:37Araq_wow! wohooo!
02:02:59*Varriount-Laptop joined #nim
02:38:20*Varriount-Laptop quit (Ping timeout: 256 seconds)
02:39:45*Varriount-Laptop joined #nim
03:03:16*Varriount-Laptop quit (Ping timeout: 256 seconds)
03:47:37*tyu quit (Quit: Connection closed for inactivity)
04:47:05onionhammerdom96 devel head
05:52:09*Demon_Fox joined #nim
05:57:20*vendethiel joined #nim
06:06:35*darkf joined #nim
06:20:06*vendethiel quit (Ping timeout: 240 seconds)
06:55:25*sepisoad joined #nim
07:45:55*sepisoad quit (Ping timeout: 240 seconds)
07:46:09*sepisoad joined #nim
07:48:06*Demon_Fox quit (Quit: Leaving)
07:48:19*sepisoad quit (Remote host closed the connection)
08:37:59*vqrs quit (Ping timeout: 264 seconds)
08:40:56*vqrs joined #nim
08:45:17*sepisoad joined #nim
08:48:55*vendethiel joined #nim
09:00:10*sepisoad quit (Ping timeout: 244 seconds)
09:10:28*sorakun joined #nim
09:13:09*vendethiel quit (Ping timeout: 265 seconds)
09:23:54*matkuki joined #nim
09:24:56*matkuki quit (Client Quit)
09:38:39*Dohxis joined #nim
09:44:03DohxisHello guys. I was playing with Nim for several days niw and it seems really nice. My goal is to create minimal game engine witch would use OpenGL. My question is it a good idea to use templates to reduce as much code as possible? Will it hurt the performance?
09:44:05*sorakun quit (Remote host closed the connection)
09:52:40*gunn quit (Read error: No route to host)
09:54:30*gunn joined #nim
10:09:44*Dohxis quit (Ping timeout: 245 seconds)
10:12:58*Dohxis1 joined #nim
10:13:42reactormonkDohxis1, templates, as well as macros, are expanded at compiletime.
10:18:56Araq_Dohxis1: it's in general a bad idea to use templates where procs suffice.
10:19:49Araq_though frequently templates perform better than .inline procs
10:22:41Dohxis1Now I have a full game loop using in template. I draw some primitive shapes and performance was quite good I would say. Way better than my python engine.
10:22:44*darkf quit (Quit: Leaving)
10:23:24*darkf joined #nim
10:25:20reactormonkDohxis1, now that's not too unexpected :-)
10:27:22Dohxis1I really like the idea of templates :) How active is Nim's community?
10:28:06reactormonkDohxis1, https://github.com/nim-lang/Nim/pulse compiler only
10:28:18federico3Dohxis1: it's still small
10:28:21reactormonkor you can run nimble list and see the amount of packages
10:28:49reactormonk... 265
10:32:37*matkuki joined #nim
10:40:08*Dohxis1 quit (Ping timeout: 246 seconds)
10:40:11Araq_dom96: can I have optional dependencies with nimble's nimscript support?
10:40:31dom96Araq_: Haven't tested it but should work
10:40:35Araq_I'd like to make the db* modules a nimble package, but a single one.
10:40:52Araq_and then this package has 3 optional dependencies but hrm
10:41:20dom96Just make it one package
10:41:56Araq_no, it's two packages: dbwrappers and db_nim
10:43:14*zepolen_ joined #nim
10:45:36dom96just call it `db`
10:45:53*zepolen quit (Ping timeout: 255 seconds)
10:51:46*Trustable joined #nim
11:00:48*yglukhov joined #nim
11:03:19*boopisaway is now known as boop
11:03:21dom96Araq_: Make sure to use nimble init, and to put the db modules inside a `db` dir.
11:03:22dom96bbl
11:03:22*boop is now known as boopisaway
11:20:08flyxso I just had an idea: it should be possible to implement static code analysis with macros. to prove things like loop invariants, proc pre- and postconditions and the like
11:22:28flyxbut I wonder if it would be a lot easier to do that directly in the compiler, which already does some static analysis
11:23:53*Dohxis joined #nim
11:24:25DohxisError: type mismatch: got (BoolInt) but expected 'bool'. Can I convert somehow from one to another?
11:25:26yglukhovdom96: custom nimble tasks don't seem to work
11:25:34yglukhovExecuting task example in /Users/yglukhov/Projects/nimx/nimx.nimble
11:25:34yglukhovFAILURE: Could not find task example in /Users/yglukhov/Projects/nimx/nimx.nimble
11:26:27yglukhovalso "build" task in nimble file is ignored in favor of nimble build command.
11:31:29*sepisoad joined #nim
11:53:39Araq_Dohxis: use a converter
11:55:23Araq_yglukhov: yeah that's a good point, it's not possible to override builtin commands
12:05:00*sepisoad quit (Ping timeout: 256 seconds)
12:34:45*Dohxis quit (Ping timeout: 252 seconds)
12:39:57*Trustable quit (Remote host closed the connection)
12:47:17*BitPuffin|osx quit (Ping timeout: 276 seconds)
12:58:56*dom96_mobile joined #nim
12:59:34*dom96_mobile quit (Remote host closed the connection)
13:00:00*dom96_mobile joined #nim
13:00:51dom96_mobileYglukhov: what does your nimble file look like?
13:03:51yglukhovdom96_mobile: https://gist.github.com/yglukhov/3b7c80f0bc9cec6d4634
13:06:50*dom96_mobile quit (Remote host closed the connection)
13:11:53*dom96_mobile joined #nim
13:13:30dom96_mobileThat should work. I'll test it when I get home.
13:16:50*dom96_mobile quit (Remote host closed the connection)
13:22:36*sora joined #nim
13:38:14*sora quit (Ping timeout: 255 seconds)
13:51:17dom96yglukhov: It's working for me. Do the tests pass for you? (Run `cd tests/ && nim c -r tester`)
13:51:39dom96Verify that you compiled the latest master too
13:52:01dom96I assume you're on Mac OS X (I am too), so that shouldn't be a factor.
14:10:48*matkuki quit (Quit: ChatZilla 0.9.92 [Firefox 43.0.2/20151221130713])
14:19:55dom96But this reminds me that `setCommand "c foo.nim"` won't work. I think it should.
14:28:40Araq_no, it's setCommand "c", "foo.nim"
14:29:58dom96ahh, does that work?
14:30:36dom96looks like it does.
14:30:38dom96What about flags?
14:31:45Araq_all part of the 2nd argument iirc
14:32:06Araq_I have to go now, merry christmas!
14:32:18dom96bye! Merry christmas to you too
14:34:31*tyu joined #nim
14:37:08*yglukhov quit (Remote host closed the connection)
14:38:12*sepisoad joined #nim
14:52:41*yglukhov joined #nim
14:56:36*Demon_Fox joined #nim
14:56:59*yglukhov quit (Ping timeout: 255 seconds)
14:59:03*sora joined #nim
15:05:29strcmp1merry christmas to one and all
15:09:38*sepisoad quit (Ping timeout: 276 seconds)
15:15:39*NimBot joined #nim
15:17:45*yglukhov joined #nim
15:22:02*yglukhov quit (Ping timeout: 260 seconds)
15:53:57*sepisoad joined #nim
16:00:15*Nimn joined #nim
16:01:50federico3anybody using PPA with Nim or any similar way to distribute binary packages?
16:02:39*boopisaway is now known as boop
16:04:12*vendethiel joined #nim
16:04:16*yglukhov joined #nim
16:08:24*yglukhov quit (Ping timeout: 250 seconds)
16:32:05*Nimn quit (Quit: Page closed)
16:36:35*yglukhov joined #nim
16:39:09*sora quit (Remote host closed the connection)
16:55:41*BitPuffin|osx joined #nim
17:01:29yglukhovdom96: nimble tests fail miserably. https://gist.github.com/yglukhov/3b7b129eb7edcea7a877
17:03:50dom96Oh. That's my bad. Forgot to git add the `nimscript` test directory.
17:04:40dom96yglukhov: try it now
17:06:22yglukhovstill fails. gist updated.
17:09:15dom96Oh damn. Looks like you'll need my changes to nimscript.nim in nim's stdlib
17:10:55yglukhovmay that be the reason of my problem?
17:11:07NimBotnim-lang/Nim devel a01eb09 Dominik Picheta [+0 ±1 -0]: Task proc in nimscript module will now export the proc it creates.
17:11:16yglukhovoh ok
17:11:18dom96yep. Try with Nim devel please
17:12:58yglukhovinteresting. nimble install fails with "FAILURE: Invalid package name: cannot contain '-' "
17:13:06yglukhovthats in nimble dir
17:13:08yglukhov=)
17:15:00*vendethiel quit (Ping timeout: 260 seconds)
17:15:05dom96huh
17:15:22dom96You mean installing nimble itself fails with that message?
17:15:28yglukhovyup
17:16:01dom96hrm
17:16:20dom96Maybe you have a package installed which contains a '-' in its name?
17:16:41yglukhov`nimble install nimble` also fails. please see updated gist.
17:16:47dom96Didn't think about that scenario
17:16:53dom96ls ~./nimble/pkgs please
17:16:59yglukhovmaybe you're right...
17:17:55yglukhovhttps://gist.github.com/yglukhov/78e34dfa8ca09492fb6e
17:18:52dom96I will make it a warning
17:19:38*sepisoad quit (Ping timeout: 255 seconds)
17:20:05yglukhovit also would be nice to print the problematic package name ;)
17:20:21dom96indeed
17:29:30*vendethiel joined #nim
17:47:30dom96yglukhov: Should be fixed now
17:55:02yglukhovdom96, well the logs are more informative, but installation still fails.
17:55:32dom96damn. Update your gist please.
17:55:35dom96I'll take a look at it later
17:55:42dom96Time to wrap presents :)
17:55:46yglukhovhttps://gist.github.com/yglukhov/b39a5ae2c09b846a91f0
18:07:23yglukhovdom96, btw, why package names are restricted this way? They are not used as identifiers anywhere, are they?
18:07:37*tyu quit (Quit: Connection closed for inactivity)
18:07:58yglukhovmodules are, but packages arent
18:21:01*yglukhov quit (Remote host closed the connection)
18:30:14*yglukhov joined #nim
18:35:23*perturbation joined #nim
18:35:39perturbationhi everyone :)
18:36:02dom96yglukhov: they are. `import pkgname/module`
18:36:06dom96hi perturbation
18:36:56yglukhovdom96, but currently nimble packages have packages with "wrong" names, and they work just fine
18:37:15yglukhovjust importing "module" without "pkgname"
18:39:01dom96Yes, but they go against Nimble's package naming conventions
18:39:01yglukhovif thats a "refactoring" plan, maybe disable validation for now, and correct the existing names eventually, and then reenable validation?
18:39:20dom96Those package will need to be fixed
18:40:53dom96I have made certain validation errors warnings
18:41:11dom96Simply forgot to make the "The .nimble file name must match name specified inside it." error a warning
18:41:26dom96Although "warning" here means "warning only for packages which are already installed"
18:41:36dom96If you attempt to install an invalid package it will just fail.
18:41:47dom96I'm afraid that's a breaking change I have decided to make
18:46:21yglukhovhrm, i personally have no problems with that, but thats a change that involves efforts from both lib authors and users.
18:46:45yglukhovmay lead to a lot of confusion
18:47:47yglukhovwe can help authors by renaming their packages, but still it may surprise the users =)
18:48:14yglukhovi can't see any benefits tbh
18:53:19*vendethiel quit (Quit: q+)
19:44:59*sora joined #nim
19:58:59*perturbation quit (Ping timeout: 264 seconds)
20:05:07dom96yglukhov: Allowing dashes in package names will lead to problems in the future. Nimble will also start enforcing the convention defined in the readme, i.e. you must place all modules belonging to your package in a directory, and that directory's name must be the same as your package's
20:05:37dom96(with the exception that you can also have a module outside of that directory, as long as its name is the same as your package)
20:05:49dom96For example: jester exposes a jester module
20:06:14dom96all other modules inside the jester module need to be exposed through a 'jester' namespace
20:06:22dom96*inside the jester package
20:07:02dom96and so need to be inside a 'jester' directory
20:07:25*vikaton joined #nim
20:07:36dom96So you can then import using `import jester/somemodule'
20:07:57dom96When you have a package called 'foo-bar', you will not be able to `import foo-bar/somemodule'
20:08:36yglukhov"you must place all modules belonging to your package in a directory" - doesn't this requirement make the package name irrelevant?
20:09:46dom96What about the "and that directory's name must be the same as your package's"?
20:11:53yglukhovwell... it kinda makes sense. like being consistent with package name and module name. but these two requirements "1. make a subdir with the same name. 2. pkg name should be valid id" seem redundand.
20:12:39yglukhovi mean one of them is enough for me. either name you pkg appropriately, place a file myfile.nim right inside, and import it like mypkg.myfile.
20:13:28yglukhovor name your pkg however you like, and place anything you want inside. to be a good citizen, make a dir with a good name, and import it like mydir.mylib
20:15:11dom96I don't think they are redundant. The point of the first requirement is to ensure that none of the packages expose any modules outside their namespaces.
20:15:20dom96The second is a natural extension of the first.
20:15:38dom96It's nice to alert users of it ahead of time.
20:16:35yglukhovbut technically nothing depends on the second requirement. correct me if im wrong. it's just a "good practice".
20:16:54*darkf quit (Quit: Leaving)
20:18:34dom96It does. You will not be able to import a package whose name contains a dash.
20:19:03dom96Nim won't allow it
20:22:02*Demon_Fox quit (Remote host closed the connection)
20:22:22dom96Your issue should now be fixed.
20:27:13yglukhovyay! one step further. thanks!
20:27:18yglukhovbut still not there =)
20:27:29yglukhovCompiling nil (nimx) using c backend...
20:27:29yglukhovSIGSEGV: Illegal storage access. (Attempt to read from nil?)
20:28:07*brson joined #nim
20:34:52*vendethiel joined #nim
20:50:56*brson quit (Quit: leaving)
20:51:55*brson joined #nim
21:09:12*perturbation joined #nim
21:15:02*matkuki joined #nim
21:20:58matkukiI have a MinGW compiled dll of (glut32.dll) that I want to use, but using it gives: 'could not load: glut32.dll'
21:20:59matkukiI compiled it using this guide: http://www.mingw.org/wiki/HOWTO_Compile_the_OpenGL_Utility_Toolkit_GLUT_for_Win32_with_MinGW
21:21:01matkukiAny ideas?
21:23:04*Atomic_Dz4vo joined #nim
21:23:51*Atomic_Dz4vo quit (Quit: AtomicIRC: The nuclear option.)
21:38:32*perturbation quit (Quit: Leaving)
21:40:47*dom96_mobile joined #nim
21:44:06*dom96_mobile_ joined #nim
21:44:07*dom96_mobile quit (Read error: Connection reset by peer)
22:03:20*zepolen_ quit (Remote host closed the connection)
22:04:59*brson quit (Ping timeout: 264 seconds)
22:07:09*matkuki quit (Quit: ChatZilla 0.9.92 [Firefox 43.0.2/20151221130713])
22:12:03dom96_mobile_Yglukhov: is that your 'task' which does setCommand "c"?
22:12:12yglukhovyes
22:12:46dom96_mobile_Yeah. That will be broken.
22:13:09dom96_mobile_You will need to give it a file to compile
22:14:08yglukhov setCommand "c", "variant.nim"
22:14:11yglukhovsame error
22:15:14dom96_mobile_Matkuki: maybe the dll is 64 bit and your exe is 32 bit, or vice versa?
22:15:34dom96_mobile_Yglukhov: yeah. That will also be broken.
22:15:53yglukhoverr... how do i use it then? %)
22:19:17*dom96_mobile_ quit (Remote host closed the connection)
22:20:18dom96yglukhov: It's yet another bug I need to fix :)
22:20:29yglukhovoh ok
22:21:25yglukhovbtw is nim now compiled into nimble?
22:21:50yglukhovor does nimble call separate nim process?
22:22:32dom96Nim is now compiled into Nimble.
22:22:38dom96Nimble still calls a separate Nim process though
22:22:56dom96Nim code is only used to evaluate nimscript nimble files
22:28:46yglukhovokok
22:32:08dom96yglukhov: btw how are you planning to use the new nimscript integration?
22:33:57yglukhovwell, i hope to replace nake with nimble. also i want to setup android ndk build so that ndk compiler is called from within nim.
22:36:42*boop is now known as boopisaway
22:38:15dom96yglukhov: where are you using nake right now? Could I see the nake file?
22:39:31yglukhovsure, https://github.com/yglukhov/nimx/blob/master/nimx/naketools.nim
22:46:27dom96Alright. I'll see if I can create some tests based on that.
22:52:10yglukhovcool thanks =)
23:00:26*irrequietus joined #nim
23:08:35*yglukhov quit (Remote host closed the connection)
23:17:34*Trustable joined #nim
23:24:07*yglukhov joined #nim
23:24:20NimBotnim-lang/Nim devel 31cc181 def [+0 ±1 -0]: Fix nativesockets compilation on OpenBSD and NetBSD
23:24:20NimBotnim-lang/Nim devel b822d2f Dominik Picheta [+0 ±1 -0]: Merge pull request #3662 from def-/openbsd-fix... 2 more lines
23:29:06*yglukhov quit (Ping timeout: 272 seconds)
23:30:31Araq_dom96: well the compiler could also start to allow '-' in module names and treat it like '_'
23:30:49*sora quit (Remote host closed the connection)
23:32:42dom96Araq_: It could, but why should it?
23:32:57dom96The language isn't dash insensitive
23:34:14Araq_well module names are not style insensitive really anyway, the spec says the filename needs to match exactly or else it's toLower()ed and then needs to match
23:34:37Araq_because Unix is case sensitive
23:35:10dom96Right.
23:35:16Araq_so we already have different rules for module names for better or worse and many people love dashes
23:35:18dom96setCommand doesn't seem to support flags
23:35:31Araq_yeah, because you should use --foo:bar instead
23:35:44Araq_or the 'switch' proc
23:42:25dom96ok
23:52:11*Trustable quit (Remote host closed the connection)