<< 23-01-2015 >>

00:01:04JinShilflaviu: Good to know. Thanks.
00:01:23Varriount|LaptopHm. How does one re-generate the icon files?
00:06:22flaviuhttp://a.pomf.se/pcbxmo.svg
00:07:41Varriount|Laptopflaviu: I mean, create the res and obj files
00:08:01Varriount|LaptopI think I have the res file generated, but I don't know about the obj file
00:12:57*Trixar_za joined #nim
00:18:31*Varriount|Laptop quit (Ping timeout: 246 seconds)
00:18:34*sillesta quit (Ping timeout: 245 seconds)
00:25:10*BlaXpirit_ quit (Quit: Quit Konversation)
00:27:26*Trustable quit (Quit: Leaving)
00:43:17*gokr_ quit (Quit: IRC for Sailfish 0.8)
00:47:30keylehm ... bin\nim.exe c koch.nim
00:47:43keylelib\system.nim(2512, 9) Error: implementation of 'system.setControlCHook(hook: proc (){.noconv.})' expected
00:48:02keylejust pulled & compiled on windows x86_64
00:48:06keyleanyone?
00:48:52def-keyle: they just changed something with that I think
00:49:16def-I'm getting the same error on linux
00:49:54keyle proc setControlCHook*(hook: proc () {.noconv.})
00:50:09fowlshould be gcsafe
00:50:41fowlerm nevermind me
00:50:44def-keyle: change it to this:
00:50:46def- proc setControlCHook*(hook: proc () {.noconv.} not nil)
00:52:17def-Varriount|Mobile or someone: pull please: https://github.com/Araq/Nim/pull/2001
00:58:10*BitPuffin quit (Ping timeout: 255 seconds)
01:02:55keylethanks def-
01:04:08*threewood quit (Ping timeout: 264 seconds)
01:08:51keylebtw, what's a synonym for tainted string?
01:14:24keyleunsafe string
01:18:07*sampwing quit (Ping timeout: 252 seconds)
01:36:28*gsingh93 joined #nim
01:43:08*drewsrem quit (Quit: Leaving)
01:43:26*darkf joined #nim
01:50:27*vendethiel quit (Ping timeout: 264 seconds)
02:00:21*sampwing joined #nim
02:00:21*Boscop quit (Ping timeout: 256 seconds)
02:03:18*VinceAddons quit (Read error: Connection reset by peer)
02:14:51*vendethiel joined #nim
02:18:03*threewood joined #nim
02:32:21Varriount|MobileHello threewood
02:37:54threewoodHello
02:38:00threewoodNot sure why it booted me
02:39:55EXetoCping timeout
02:40:06EXetoCnot enough internets
02:42:56*ARCADIVS joined #nim
02:47:51*davidhq quit (Quit: My MacBook Pro has gone to sleep. ZZZzzz…)
02:53:14*kobayagi joined #nim
02:54:49*kapil__ joined #nim
02:58:51*vendethiel quit (Ping timeout: 276 seconds)
03:00:11flaviuWow, the amount of optimization the c compiler has done is incredible!
03:00:28flaviuThe assembly hardly resembles the code.
03:01:53*sampwing quit (Ping timeout: 252 seconds)
03:12:35*saml_ joined #nim
03:14:18*kobayagi quit (Quit: Page closed)
03:20:29*sampwing joined #nim
03:22:38*Demos joined #nim
03:40:28*brson quit (Quit: leaving)
03:44:21*EXetoC quit (Ping timeout: 276 seconds)
03:47:42*vendethiel joined #nim
03:55:25*sampwing quit (Ping timeout: 252 seconds)
04:00:55*Varriount|Mobile quit (Quit: AndroIRC - Android IRC Client ( http://www.androirc.com ))
04:06:17*jrtjioio joined #nim
04:08:56*vendethiel quit (Ping timeout: 264 seconds)
04:13:13*gunn_ joined #nim
04:14:56*gunn quit (Ping timeout: 264 seconds)
04:28:30*girvo joined #nim
04:28:43girvohey everyone :)
04:29:30keylehi
04:30:27girvothe compiler option: --app:lib|staticlib -- does that work for generating `.so` files for Linux/OSX?
04:30:31girvoI assume it does
04:49:49fowlyou also need usenimrtl or something similar girvo
04:54:31girvookay cheers fowl. Say you were to build a library of some sort, that you want to distribute the binary for, and allow other nim projects to link to it, whats the idiomatic way of doing so without releasing the source for the library itself?
05:01:17keyleuse stdin and stdout ?
05:07:21*vendethiel joined #nim
05:12:23*threewood quit (Ping timeout: 240 seconds)
05:20:30fowlgirvo, you have to distribute nimtrl.so also, http://nim-lang.org/nimc.html#dll-generation
05:20:53girvoOkay cool, cheers fowl
05:21:45girvoFor things that link against C libraries, such as SDL, we use a nim module that basically acts like a header file. I wonder if its possible to generate that from Nim if the original DLL is also written in Nim?
05:22:23*kniteli quit (Read error: Connection reset by peer)
05:22:27girvoOr at this point does every nim module need to be distributed with the full source for others to be able to "link" against it
05:29:52fowlgirvo, templates and generic functions wouldnt be in the DLL
05:30:44fowldll generation is for c/ffi interop
05:32:36fowlif you dont care about that though it is possible, using dynlib/importc like a c interface
05:42:51*saml_ quit (Quit: Leaving)
05:48:58*Demos quit (Read error: Connection reset by peer)
05:50:25*vendethiel quit (Ping timeout: 256 seconds)
06:01:28*Etheco- joined #nim
06:04:51*Etheco quit (Ping timeout: 264 seconds)
06:06:43girvofowl: yeah that's what I figured. That limitation should be fine for the sorts of things I'm thinking about
06:09:42girvofowl: being able to link against a compiled nim library (even just statically) may be a useful feature. I don't think any of the "new" compiled languages (go, nim, rust) have a good story for that, and its one of the cool parts of C/C++ IMO
06:09:50girvoActually, I think Rust may be able to
06:37:01*SplinterOfChaos quit (Ping timeout: 255 seconds)
06:37:04girvoQ: Where is the best documentation for how Nim links to C libraries? I'd like to provide my own `.dylib` for, say, SDL2 and have Nim compile and link against that instead of the OS-wide one
06:41:30*gunn_ quit (Quit: My MacBook Pro has gone to sleep. ZZZzzz…)
06:41:46*jrtjioio quit (Ping timeout: 246 seconds)
06:42:51*bjz joined #nim
06:47:04*bjz quit (Client Quit)
06:50:24*jkguiog87y joined #nim
06:52:37girvoBasically, I see there is dynlibOverride -- can I pass it a relative path, instead of just a name?
06:55:11girvoSpecifically, an example like this:
06:55:13girvonim c --dynlibOverride:lua --passL:liblua.lib program.nim
06:55:40girvofor the --passL:liblua.lib part, can I say --passL:../Lib/liblua.lib ?
06:58:11girvoTo effectively "dynamically" link, but to a relative path (this is how OS X's applications are typically done, but also how many games are distributed)
07:01:04*gunn joined #nim
07:02:27girvoMwaha!
07:02:33girvoI answered my own question
07:02:35girvo--clibdir:DIR modify the linker library search path
07:02:42girvoPerfect :)
07:04:24girvoIs the default GC still `refc`?
07:05:58girvoWow! Hey, fowl: does this flag do what I think it does? It'll generate the .h file automatically for a nim project compiled to a shared library?
07:05:59girvo--header:FILE the compiler should produce a .h file
07:13:58girvoNow comes the interesting part: getting Nim to work with an OS X `.framework` "file"
07:14:18girvoIt is basically just a directory, I believe, so I should be able to use add it to the --clibdir flag?
07:22:18*gunn quit (Quit: My MacBook Pro has gone to sleep. ZZZzzz…)
07:23:55*gokr quit (Ping timeout: 256 seconds)
07:26:47girvoAlthough, using `otool -L` on my compiled SDL test app, that is linked against libsdl2.dynlib in a folder next to the output binary with the clibdir path set to look there, it seems as though it's been statically linked lol
07:38:54*vendethiel joined #nim
07:41:20*girvo quit (Ping timeout: 264 seconds)
07:45:54*bjz joined #nim
07:47:05*bjz quit (Client Quit)
07:48:12*Varriount_ joined #nim
07:49:27*nickles joined #nim
07:50:28nickles*: Where would I file CRs? (aka is https://github.com/Araq/Nim/pulls really the right place?)
07:50:49*Varriount quit (Ping timeout: 255 seconds)
07:51:55*iivvoo joined #nim
07:55:31*bjz joined #nim
07:57:14*JinShil quit (Quit: Konversation terminated!)
07:58:26*gokr_ joined #nim
08:00:19*gunn joined #nim
08:02:20*nickles quit (Quit: Page closed)
08:22:49*vendethiel quit (Ping timeout: 265 seconds)
08:27:03*gokr_ quit (Ping timeout: 245 seconds)
08:28:10*Sphax joined #nim
08:43:36*BlaXpirit joined #nim
08:46:16*vendethiel joined #nim
08:58:35*Sphax quit (Quit: ZZZZZzzzzz)
09:00:17*Sphax joined #nim
09:03:30*jkguiog87y quit (Quit: Page closed)
09:08:55*vendethiel quit (Ping timeout: 272 seconds)
09:20:52*vendethiel joined #nim
09:22:59*Trustable joined #nim
09:42:34*vendethiel quit (Ping timeout: 265 seconds)
09:44:23*gsingh93 quit (Quit: Connection closed for inactivity)
09:48:56*vendethiel joined #nim
09:54:15*akiradeveloper joined #nim
09:57:31akiradeveloperhi, Nim's effect system can restrict caller's context in compile time? e.g. Function F is only allowed to be called under G or H
10:11:37*vendethiel quit (Ping timeout: 272 seconds)
10:12:43reactormonkakiradeveloper, not that I know of. What would be the application of this?
10:22:11*akiradeveloper quit (Remote host closed the connection)
10:26:32*akiradeveloper joined #nim
10:28:36akiradeveloperIn fuse, implementation of operation (e.g. open function) should call reply function after it's done and the set of reply functions each operation can call is restricted
10:29:11akiradeveloperI don't like the implementation of operation call wrong reply function
10:31:07*VinceAddons joined #nim
10:33:17reactormonkakiradeveloper, hm, maybe Araq could tell you if you could do something with effects
10:40:09*jefus__ joined #nim
10:41:32*EXetoC joined #nim
10:42:55*akiradeveloper quit (Remote host closed the connection)
10:43:44*gokr joined #nim
10:43:59*jefus_ quit (Ping timeout: 245 seconds)
10:46:38*vendethiel joined #nim
10:55:22*ARCADIVS quit (Quit: ARCADIVS)
11:06:30*Sembei quit (Read error: Connection reset by peer)
11:07:10*MyMind joined #nim
11:11:51*davidhq joined #nim
11:13:46*JinShil joined #nim
11:38:17*JinShil quit (Read error: No route to host)
11:38:47*JinShil joined #nim
11:40:25*akiradeveloper joined #nim
11:52:26*woadwarrior joined #nim
12:04:39*jefus_ joined #nim
12:04:39*zahary quit (Read error: Connection reset by peer)
12:04:48*zahary joined #nim
12:05:19*yonson joined #nim
12:07:18*davidhq quit (Quit: My MacBook Pro has gone to sleep. ZZZzzz…)
12:07:51*jefus__ quit (Ping timeout: 264 seconds)
12:15:28*jefus_ is now known as jefus
12:19:01*keyle quit (Quit: <Morbo> Chitchat achieved!)
12:28:08*EXetoC quit (Ping timeout: 264 seconds)
12:49:52*akiradeveloper quit (Remote host closed the connection)
12:51:03*woadwarrior quit ()
12:54:10*BlaXpirit_ joined #nim
12:54:25def-http://hookrace.net/blog/what-makes-nim-practical/
12:56:49*BlaXpirit quit (Ping timeout: 255 seconds)
12:56:54*Varriount__ joined #nim
12:58:28def-Links to reddit and HN at the bottom if you guys want to participate in discussions
12:59:58*Varriount_ quit (Ping timeout: 245 seconds)
13:03:03*sillesta joined #nim
13:09:56*Sphax quit (Quit: ZZZZZzzzzz)
13:15:59*Sphax joined #nim
13:30:21*saml_ joined #nim
13:54:00dom96def-: Once again. Brilliant job :)
13:54:06def-dom96: thanks!
13:56:08*BitPuffin joined #nim
13:58:15*davidhq joined #nim
13:58:40*saml_ quit (Quit: Leaving)
14:29:41*davidhq quit (Quit: My MacBook Pro has gone to sleep. ZZZzzz…)
14:35:50*davidhq joined #nim
14:36:23*davidhq quit (Client Quit)
14:45:29*threewood joined #nim
14:53:30*darkf quit (Quit: Leaving)
15:01:31*kapil__ quit (Quit: Connection closed for inactivity)
15:07:29*EXetoC joined #nim
16:00:58*SplinterOfChaos joined #nim
16:03:56onionhammerdef- you should do a more dedicated article on the TCC stuff IMO :)
16:05:25def-onionhammer: what tcc stuff? Just use --cc:tcc and it works :P
16:05:31onionhammerlol
16:05:43def-speed is about 30-50% of optimized gcc/clang
16:05:47onionhammeryou should get the repl working with tcc ;P
16:05:55def-yes, i should
16:06:31onionhammerI havent had a chance to give the article a proper read yet, but from what I skimmed it looked good :0
16:08:34*booly-yam-9623 joined #nim
16:12:05Araqdef-: you can do: c2nim myconfig.c2nim header.h
16:12:25Araqwith the latest c2nim and put all these special #lines into myconfig.c2nim
16:12:30def-nice
16:13:16Araqgotta go, see you later
16:19:54*Matthias247 joined #nim
16:23:17*t4nk342 joined #nim
16:25:59t4nk342Hi, I am trying to follow and implement: "Kaleidoscope: Implementing a Language with LLVM" in Rust, but sick of Rust borrow checker, is it possible for nimrod to call LLVM code generator? Google could find no bindings
16:27:46dom96There is this: https://github.com/fowlmouth/llvm.nim
16:28:38*davidhq joined #nim
16:30:01t4nk342Thank you. Time to switch to exploring Nim :)
16:30:19dom96:)
16:34:48*brson joined #nim
16:41:30*UberLambda joined #nim
16:42:34*UberLambda quit (Client Quit)
16:59:31*t4nk342 quit (Ping timeout: 246 seconds)
17:04:46*davidhq quit (Quit: My MacBook Pro has gone to sleep. ZZZzzz…)
17:05:09*Varriount|Busy joined #nim
17:07:38*JinShil quit (Quit: Konversation terminated!)
17:11:36*vendethiel quit (Ping timeout: 246 seconds)
17:13:40*vendethiel joined #nim
17:24:12*davidhq joined #nim
17:27:42*davidhq quit (Client Quit)
17:34:27*vendethiel quit (Ping timeout: 245 seconds)
17:37:06*mwm joined #nim
17:38:02*vendethiel joined #nim
17:38:57*sampwing joined #nim
17:39:30mwmDoes nimble demanding 10.3 suggest that I should build from github?
17:42:39Varriount|Busymwm: Yep
17:44:18mwmOk, that is vaguely unfortunate, I think. I don't know enough about `brew` to make that work. Beyond "tell brew" it is out of the loop.
17:44:44Varriount|Busymwm: You don't know how to build Nim?
17:45:18mwmI do. Someone gave me a silly MBP, so I am using homebrew.
17:45:35Varriount|BusyMBP?
17:45:47mwmMy other machine has NixOS, so I am used to workarounds.
17:45:56mwmMac Book Pro. OSX.
17:46:38*booly-yam-9623 quit (Ping timeout: 245 seconds)
17:46:40Varriount|BusyAh.
17:47:06Varriount|Busymwm: How does OSX prevent you from building Nim?
17:47:47mwmSo far as I know, it doesn't. But people told me to use "homebrew" instead of building my own stuff.
17:47:47*booly-yam-9623_ joined #nim
17:48:14Varriount|Busy:/
17:48:26mwmAnd it's pinned to 10.2 (which is likely better than the average posix package manager)
17:49:21Varriount|Busymwm: Well, technically 10.3 is just the latest version of Nim from the repository, so it's understandable that Homebrew wouldn't have it as a package.
17:49:24mwmIt's more important to me that nim work as advertised than that I have a "consisstent system image".. so I think it will be ok. :D
17:50:10mwmI doubt I will be able to deploy to production before Nim 1.0, so should be ok.
17:50:20mwmThat's still Aprilish?
17:51:36BlaXpirit_i hope not
17:51:58mwmToo soon or too late?
17:52:20BlaXpirit_i think it's not ready, but i'm just a nobody, so don't take it too seriously
17:53:35mwm@blaxpirit No worries! I am also an irresponsibly hopeful "nobody"
17:54:56mwmThe crazy quants with which I work want "python-like" syntax.. so I am trying to make nim (which I very much like) to work.
17:54:58BlaXpirit_mwm, are you saying that homebrew has 0.10.2?
17:55:10BlaXpirit_in that case, it's great
17:55:54mwmYes, I thought 10.2 was quite impressive, actually. Until I tried to use nimble to install `c2nim`m
17:55:58BlaXpirit_oh i missed your first message
17:56:28BlaXpirit_i mean, i can see it, but didn't read it at first
17:56:49*Matthias247 quit (Read error: Connection reset by peer)
17:56:49BlaXpirit_well it may be an option to get an older version of nimble
17:56:51BlaXpirit_cuz why not
17:57:29mwmNo worries. I can deal with it for now. In 6 months, it will be a huge issue when I have wasted unsane time on somethin still not stable. :D
17:59:25mwmAt that point everyone will ask "Why not Julia, you idiot?"
18:00:59mwm`build.sh` should be +x
18:05:25mwmInstalled and working; thanks.
18:05:44Varriount|Busymvm: Well, it takes a long time for a compiler to be really "stable", especially when you're running on limited resources
18:05:57Varriount|BusyWe don't have paid workers. :/
18:06:22mwmI get that. I have pretty low standards.. even though i spent this even trying to hire one of those workers. :D
18:06:38mwms/even/evening
18:08:38Varriount|BusyGah. I am tormented by choice over what data structures to use for path representation
18:11:45BlaXpirit_Varriount|Busy, seq
18:11:48BlaXpirit_what's the deal?
18:11:56*perturbation joined #nim
18:12:01mwmSorry, I am clearly too noobish to help there. On the otherhand I now have a "working" c2nim, so you all have helped me immensely.
18:12:41Varriount|BusyBlaXpirit_: A sequence of strings incurs indirection penalties and memory fragmentation
18:13:04BlaXpirit_then don't use a sequence of strings :p
18:15:43BlaXpirit_you haven't named the purpose of this all, or anything
18:16:28Varriount|BusyBlaXpirit_: Essentially, to represent a filesystem path in a compact, platform agnostic way.
18:16:39BlaXpirit_Varriount|Busy, making a lib? :o
18:16:47Varriount|BusyBlaXpirit_: In my spare time at work.
18:16:52BlaXpirit_cool
18:17:00BlaXpirit_well Python just recently gained such a library
18:17:10Varriount|BusyYes, I know.
18:17:11BlaXpirit_and they obviously went the simple way of list of strings
18:17:13def-Varriount|Busy: what operations do you want to work on the data structure?
18:17:13*Sphax quit (Quit: CYA!!)
18:17:35BlaXpirit_Varriount|Busy, i dunno, you can just store it as one string, but also store indices of separators
18:17:53BlaXpirit_so you don't need to scan the whole thing when u only want one part of it
18:18:24Varriount|BusyBlaXpirit_: Yes, that's one solution. But then you still get an extra indirection if you store the indices in a separate sequence.
18:18:44BlaXpirit_that's such tiny indirection, i don't see any concern
18:18:45mwmPaths in platform-agnostic ways. Sounds simple!
18:18:49*mwm snickers
18:18:56BlaXpirit_hehehe............
18:19:00*perturbation quit (Quit: Leaving)
18:19:01Varriount|BusyBlaXpirit_: I had the idea of reserving space for X number of indices at the beginning of the string, and storing it there.
18:19:13BlaXpirit_Varriount|Busy ummm...
18:19:29BlaXpirit_that's not gonna pay for itself
18:19:32def-Varriount|Busy: sounds strange, better in a separate seq/array
18:19:55Varriount|BusyBlaXpirit_: Why not?
18:20:22*yonson quit (Ping timeout: 255 seconds)
18:20:35BlaXpirit_why yes?
18:21:11Varriount|BusyBlaXpirit_: No extra indirection, indices are near string data, providing better odds for hitting the cache
18:21:16BlaXpirit_if this was C, sure, I'd understand
18:22:08BlaXpirit_oh hey, you could allocate a seq and cast a part of it to cstring
18:22:13BlaXpirit_D: D: D:
18:22:14mwmAgain, ignorant, but for which cache are you optimising?
18:22:25Varriount|Busymwm: CPU cache
18:22:38BlaXpirit_(this is not something exclusive to Nim)
18:23:01EXetoC"int step = static_cast<int>(floor(static_cast<double>(detectorIdsSize * odNumber / sizeMPI))) + 1;" beautiful
18:23:04*vendethiel quit (Ping timeout: 255 seconds)
18:23:32BlaXpirit_yup
18:24:39BlaXpirit_let's not scare mwm away, though
18:24:56BlaXpirit_that last line of code was C++, if someone is wondering
18:25:23mwmAgain, because I don't know... can you actually introspect on CPU cache from Nim? That'd be crazy-awesome to the point where I believe it t be impossible.
18:25:58Varriount|Busymwm: Not really. It's theoretical
18:27:06Varriount|Busymwm: Storing data that you're accessing together at one spot in memory should avoid cache misses, as the number of lines the processor has to load into the cache is minimized
18:27:12mwmFair enough. I make my living on the sub-ms level (not to the sub-ns level of some of the people with whom I compete), but it's good to know.
18:29:25BlaXpirit_Varriount|Busy, how about u abstract it away and worry later
18:29:33mwmblaxpirit_, I'm not likely to be scared away so much as find myself drowning. :D
18:29:39BlaXpirit_this is such a silly optimization... people don't deal with millions of paths
18:30:11*mwm deals with millions of paths if they are cheap!
18:30:43BlaXpirit_and if they do, well, they probably won't use your lib
18:30:43mwmSo.. I don;t deal with millions of paths. :D
18:30:44Varriount|BusyBlaXpirit_: Says the one not designing an antivirus program, a file copying program, etc.
18:32:10*mwm likes to use the file system for map-reduce like some kind of idiot.
18:33:26mwmThe world has created a better fool!
18:34:22*yonson joined #nim
18:36:20mwmHowever, please do not design around the worst possible use of yur lib. Otherwise, I will do it.
18:39:11EXetoCVarriount|Busy: he just said to worry later, if you can
18:40:15Varriount|BusyEXetoC: Easier said than done. I'm a born worrier
18:40:35*mwm quit (Quit: just rolling around Denver all day)
18:41:36Varriount|BusyAnyway, I'm gonna head home. I'm gonna work on fixing bugs then. Less worrying there.
18:41:40*Varriount|Busy quit (Quit: Page closed)
18:43:49*semperos joined #nim
18:44:00semperoson Mac OSX 10.9, trying to get aporia to run; it nimble-installed correctly, but when I run it can't find libgdk-x11-2.0.dylib but that is located in /usr/local/lib
18:44:10semperostried defining LD_LIBRARY_PATH=/usr/local/lib as well to no avail
18:44:35semperosany pointers for next steps to debug?
18:45:19*yonson_ joined #nim
18:46:15*yonson quit (Ping timeout: 264 seconds)
18:48:09def-semperos: you tried "export LD_LIBRARY_PATH=/usr/local/lib"?
18:48:10BlaXpirit_semperos, "can't find" or "can't load"?
18:48:25semperosload
18:48:33semperosLD_LIBRARY_PATH=/usr/local/lib aporia 1 ↵
18:48:33semperoscould not load: libgdk-x11-2.0.dylib
18:48:33BlaXpirit_well that's kinda different
18:49:30semperosyep, new to Nim and its tooling, so wasn't sure where I needed to configure paths, if I should have installed aporia differently, etc.
18:49:50BlaXpirit_i don't think this is a problem on Nim's side
18:50:08BlaXpirit_unless this export fixes things
18:50:30sillestai had a similar issue when i tried to install aporia: "could not load: libgtksourceview-2.0(|-0).dylib"
18:51:31sillestaneed to be installed separately?
18:51:48semperoson my end I tried the export bit and it still cameback with "could not load..."
18:51:52*vendethiel joined #nim
18:52:00BlaXpirit_to be expected
18:55:47semperosBlaXpirit_: do you have any suggestions of what docs I might read or things I might try to get aporia running given that error?
18:56:07BlaXpirit_semperos, try ldd
18:56:19BlaXpirit_ldd /usr/local/lib/libgdk-x11-2.0.dylib
18:56:32BlaXpirit_if it says "not found" somewhere, there's your problem
18:56:52semperosBlaXpirit_: thanks, I'll give that a roll
19:00:00semperoseverything seems to be in order: https://gist.github.com/semperos/d954814c9bfd421c1806
19:01:31BlaXpirit_right.....
19:02:58BlaXpirit_i don't know anything else
19:03:15*gsingh93 joined #nim
19:05:14dom96semperos: Perhaps the DLLs are 64bit but you are using a 32bit compiler (and thus producing a 32bit binary of Aporia) or vice versa?
19:05:34semperosBlaXpirit_: thanks for your input
19:05:39semperosdom96: I'll investigate in that vein, thanks
19:06:00dom96You could also try copying that .dylib into the same directory that Aporia's binary is
19:14:23*vendethiel quit (Ping timeout: 272 seconds)
19:20:37*vendethiel joined #nim
19:20:40*perturbation joined #nim
19:25:38*d3m1gd joined #nim
19:36:33*booly-yam-9623_ quit (K-Lined)
19:37:42*yonson_ quit (Quit: Leaving)
19:39:11*bjz quit (Quit: My MacBook Pro has gone to sleep. ZZZzzz…)
19:43:25*vendethiel quit (Ping timeout: 256 seconds)
19:44:30*vendethiel joined #nim
19:48:37*kniteli joined #nim
19:49:41*mwm joined #nim
19:52:23*perturbation quit (Quit: Leaving)
19:54:37*sampwing quit (Ping timeout: 252 seconds)
20:19:53*sampwing joined #nim
20:22:10*semperos quit (Read error: Connection reset by peer)
20:23:25*semperos joined #nim
20:27:33*vendethiel quit (Ping timeout: 264 seconds)
20:28:23*mwm quit (Ping timeout: 240 seconds)
20:29:02*bjz joined #nim
20:29:29*fwef joined #nim
20:30:13Araqhi fwef welcome
20:30:27fwefHi Araq
20:30:33*vendethiel joined #nim
20:31:28fwefCan someone explain why nim is not as popular as let's say golang or rust? From what I've seen in the docs it rocks unimaginably.
20:32:36Araqthere is no big company behind it and it surely has its bugs and dark corners
20:33:26Araqon the other hand, bugs are getting fixed and the feature set is stable, so we'll get the lang stable within the next months
20:34:09*gokr quit (Ping timeout: 264 seconds)
20:34:58fwefAraq: so you are the guy behind Nim? (Assuming from the Nim repo being owned by your account)
20:36:28Araqyes
20:37:29fwefNice work then. ;)
20:38:01ekarlsosoo
20:38:07ekarlsocoding nimble now to handle packages format
20:48:46*gokr joined #nim
20:49:46*gokr_ joined #nim
20:51:49EXetoCekarlso: system package managers?
20:53:39*d3m1gd quit (Ping timeout: 252 seconds)
21:01:32*fizzbooze joined #nim
21:02:09fizzboozeis there a way to let the compiler warn you if your proc may throw an exception?
21:02:40BlaXpirit_Araq, possible recent regression here. This used to work, on 0.10.2 and probably master https://bpaste.net/show/1badb1738e5e
21:05:22BlaXpirit_works if template is taken out
21:05:27def-fizzbooze: proc foo {.raises: [].} = raise newException(ValueError, "foo")
21:05:46def-fizzbooze: fails to compile since you specified that there should be no exceptions raised but one can be raised
21:06:09fizzboozedef-: thanks!
21:06:25def-fizzbooze: more about this here: http://nim-lang.org/manual.html#exception-tracking
21:06:33fizzboozeis there a HTTP and JSON library build into the stdlib?
21:06:38def-yes
21:06:52def-Here's a list of libraries: http://nim-lang.org/lib.html
21:07:18fizzboozethat's awesome
21:08:03fizzboozethese are the libraries i can import directly without nimble right?
21:08:15def-the standard libraries at the top, yes
21:08:18fizzbooze:)
21:08:23def-nimble libraries are down there as well
21:08:40fizzboozewhat's the current ETA for 1.0?
21:08:50def-in a few months
21:08:58def-(is the last I heard)
21:09:14fizzboozebtw i really enjoyed your last two nim blogs on proggit
21:10:07def-thanks
21:13:21AraqBlaXpirit_: please report it properly
21:13:38Araqand yes, there have been changes to the templating lookups
21:13:43Araquse .dirty as a workaround
21:13:44*vendethiel quit (Ping timeout: 265 seconds)
21:13:45BlaXpirit_Araq, just checking if i am maybe mistaken
21:14:56BlaXpirit_hm dirty seems to work indeed
21:18:42*Mat4 joined #nim
21:18:44*jhc76 quit (Remote host closed the connection)
21:18:51Mat4hello
21:18:59Araqhi Mat4
21:19:09Mat4hi Araq, what's new ?
21:19:17fizzboozechecked out the source from github just now. built it according to /download.html on the official site, failed in the last step './koch boot -d:release'
21:20:04fizzboozehttp://pastebin.com/b1h8V1Gk
21:22:05*semperos quit (Remote host closed the connection)
21:22:47Araqfizzbooze: gcc installed?
21:25:55fizzboozeyup
21:25:58fizzbooze4.9
21:26:33Araqwell it looks like nim cannot find it?
21:26:55Araqbuild without -d:release and with --parallelBuild:1 please
21:27:44ekarlsoexonoo
21:27:52ekarlsoEXetoC: support the packages api
21:27:56ekarlsovs static packages.json
21:28:07fizzboozeAraq: same problem, same error message
21:28:36def-fizzbooze: ./koch boot -d:release --parallelBuild:1
21:29:05fizzboozedef-: same error again ;(
21:29:27fizzboozeit built fine on my laptop. the failed build is on my Digitalocean VM
21:29:29def-strange
21:30:39fizzboozeAraq: gcc must have been working correctly because bin/nim was build from csources/
21:31:04Araqfizzbooze: the VM has not enough ram?
21:31:21fizzboozeAraq: oh that is possible
21:31:23AraqI had this too, I setup some swap partition and swoosh, it worked
21:31:26fizzboozeit only has 0.5G
21:31:29Araqyup
21:31:37Araqthat's it then
21:31:41fizzboozek gonna try setting up swap
21:31:47def-more than 500 MB are needed to build nim? =/
21:32:12Araqnot according to our stats but not all is available to Nim and perhaps there is fragmentation
21:32:35*Sergio965 joined #nim
21:33:58*vendethiel joined #nim
21:34:01Araqbut yeah, somebody should look into this at some point
21:34:53Araqiirc the compiler itself works but then it invokes gcc which uses lots of ram too
21:34:58Araqand combined they fail
21:35:07def-Hint: operation successful (81220 lines compiled; 4.272 sec total; 262.268MB) [SuccessX]
21:35:14def-that means the compiler itself needed 262 MB?
21:35:20Araqyes
21:35:40Araqit's quite memory hungry
21:35:54Araqyou can generate a compile script so that the compiler finishes and gcc is invoked later
21:37:44fizzboozeadding a 0.5G swap worked!
21:39:07*sampwing quit (Ping timeout: 252 seconds)
21:39:58flaviuOn my ARM build bot, it looks like nim is using only 90MB of real ram.
21:40:27flaviuQuite a bit more virtual ram though.
21:41:46Mat4I had the same problem before compiling Nim for my Raspberri Pi
21:42:01AraqI think it's all caused by these "nice" ropes with their immutability :P
21:42:21def-Araq: i'm trying to profile what takes all the memory
21:42:51Araqdef-: just add some counters for newRope, newType, newSym and newNode
21:42:53*gokr_ quit (Ping timeout: 245 seconds)
21:42:53flaviudef-: Are you profiling virtual or real memory usage?
21:43:21def-i was using valgrind --tool=massif so far
21:43:44flaviuYeah, nim doesn't use the C stdlib for allocation.
21:43:53def-oops
21:43:54Araqvalgrind knows nothing about our allocator
21:44:04def-that explains the weird results, ok
21:44:22flaviuAraq: How about rawalloc?
21:44:31flaviuWhere does nim do it's allocations?
21:44:36Araqflaviu: what would that accomplish?
21:44:44flaviu--tool=massif --alloc-fn=rawalloc_34546
21:45:02Araqwell it depends on what you want to accomplish
21:45:22flaviuI want to tell valgrind how to detect memory allocations.
21:45:30Araqyou can also use the builtin memory profiler but it slows everything down
21:45:42Araqand sometimes it crashes the compiler for some reason
21:45:52fizzboozeare there examples for this library? http://nim-lang.org/expat.html the page only shows function signatures
21:46:21Araqfizzbooze: it's just a wrapper. use their C examples as a starting point
21:47:00fizzboozethx
21:47:18def-Araq: thanks, totally forgot about that one
21:48:55Araqdef-: if you can get it to work it immediately tells you the reason for the heavy allocations
21:49:02def-seems like it broke
21:49:07def-lib/system/sysstr.nim(110, 5) Error: declared lock level is 0, but real lock level is <unknown>
21:49:28Araqhu? fix it
21:50:10def-don't understand the problem
21:52:05flaviudef-: I worked around it by just deleting the error branch.
21:52:20flaviuhttps://github.com/Araq/Nim/issues/1983'
21:52:29Araqdef-: gc.nim line 36
21:53:01Araqmake that proc header {.benign.}
21:54:06EXetoCwhat's that?
21:54:11def-first I hear of benign
21:54:45Araqit's just a shortcut for gcsafe, locks: 0
21:55:12Araqand yeah at some point we need to make this the default ...
21:55:17def-doesn't seem to help
21:55:31def-lib/system/profiler.nim(65, 7) Warning: cannot prove 'nimProfile' is GC-safe. Does not compile with --threads:on.
21:55:34def-lib/system/profiler.nim(65, 7) Error: declared lock level is 0, but real lock level is <unknown>
21:55:48def-i guess the same there, I'll just try a bit
21:55:53*vendethiel quit (Ping timeout: 240 seconds)
21:56:00Araqlet's see
21:58:02Araqwell you need to annotate more stuff with this
22:00:01def-Araq: how to figure out what stuff?
22:01:46Araqit's intuitively obvious ;-)
22:01:58ldleworkhehe
22:02:11Araqlib/system/profiler.nim
22:02:17AraqTProfilerHook
22:02:37Araqor rather TMemProfilerHook
22:02:49BlaXpirit_can I specify -d:... inside code?
22:02:50def-works now
22:03:07def-Araq: want to add it yourself or a PR?
22:03:18Araqmake a pr, I'm lazy
22:03:31AraqBlaXpirit_: nope and this is by design
22:03:53BlaXpirit_Araq, I want some kind of compile-time settings for my library
22:04:10def-BlaXpirit_: {.checks: on.} and so on?
22:04:12BlaXpirit_and the setting makes the way you use it different
22:04:34BlaXpirit_when defined(csfmlNoDestructors):
22:05:45BlaXpirit_(because destructors don't seem to be tested very much, and I ran into a wall with them, just can't compile anything)
22:06:05Araqthey are in .experimental now
22:06:18BlaXpirit_they sure are...
22:06:24BlaXpirit_but it's 100% must have for me
22:06:30Araqofc that doesn't mean that you should stop complaining ...
22:06:50*milosn quit (Ping timeout: 244 seconds)
22:08:38BlaXpirit_a type that has-a destructible type is just a nightmare
22:09:13*milosn joined #nim
22:10:51fizzboozeis there a XML library that can deserialize an XML into a Nim object? all the existing XML stuff in /lib.html look like just parsers
22:12:38ldleworkfizzbooze: marshal module?
22:12:48Araqfizzbooze: I don't think so. marshal only support json
22:12:57*Jesin quit (Quit: Leaving)
22:13:03ldleworkoh
22:13:03fizzboozei see
22:13:06ldleworkwierd
22:13:07Araqxml is not sexy anymore, nobody asks for xml
22:13:26fizzboozelol
22:13:41ldleworkDoes marshal have an api for which you can plop other serialization ontop?
22:14:00def-Not sure I can understand the profile_result.txt: https://gist.github.com/def-/9d06d2e70a5f146dbf78
22:14:42*vendethiel joined #nim
22:14:47Araqldlework: no but it uses typeinfo and you can build your own stuff on top of that
22:16:33*Matthias247 joined #nim
22:16:45flaviudestructors are experimental now?
22:17:10BlaXpirit_yes
22:17:43flaviuThat's literally the last feature I would expect to fall under experimental.
22:17:59Araqwell firstly they are buggy
22:18:11Araqand secondly the whole approach to destructors sucks
22:18:23BlaXpirit_o rly
22:18:24AraqI want to tie them to an escape analysis
22:18:37*fizzbooze quit (Quit: WeeChat 1.1)
22:18:45Araqbut this is not version 1.0 stuff, hence it's "experimental"
22:18:56flaviuBlaXpirit_: please don't make provocative statements, it's rude.
22:19:11BlaXpirit_you mean destructors aren't gonna be fixed before 1.0?
22:19:19flaviuAraq: My use case is C FFI, I don't want to have to do manual free.
22:19:30BlaXpirit_everyone has that use case
22:20:12*Jesin joined #nim
22:20:26Araqdef-: well the numbers are ... confusing to interpret but the gist is that lots of memory is allocated in that exponential blowup which I'm already working on
22:21:22*MattAitc_ joined #nim
22:21:24*JinShil joined #nim
22:21:33*MattAitc_ quit (Client Quit)
22:21:47Araqflaviu: well for that the current approach might suffice
22:22:48Araqthe workaround that works is to have a proxy ref with a finalizer
22:23:00Araqthat's what re does for instance
22:24:57flaviuOh, I see. I thought that finalizers and destructors are the same thing.
22:25:29flaviuThat's perfectly acceptable to me, an extra allocation is a small price to pay for stability.
22:25:48AraqBlaXpirit_: can you give a typical example that's prevented by the compiler but you like to work?
22:25:59BlaXpirit_[:07:57] <BlaXpirit_> a type that has-a destructible type
22:26:12Araqthat's not an example
22:26:23Araqthat's not even a full sentence
22:27:47BlaXpirit_it's difficult to explain
22:27:59Araqgist some pseudo-code
22:28:33BlaXpirit_Basically, as I understand, a member destructible object must be initialized immediately and cannot be reassigned later
22:28:52Araqyup
22:29:22BlaXpirit_well there you go, this is unacceptable to me
22:29:52Araqmaybe you can at least swap it
22:30:28BlaXpirit_?
22:30:56Araqswap instead of '='
22:31:00Araqbut anyway
22:31:12BlaXpirit_:|
22:31:22Araqmaybe you can have 2 types?
22:31:36Araqone that has a destructor and is exported the other for internal usage?
22:31:46BlaXpirit_in my particular case it may not even be logical to reassign
22:31:53BlaXpirit_but i'm sure there are a ton of real use cases
22:32:12BlaXpirit_Araq, that's a ton of overhead and tedium
22:32:32BlaXpirit_and it's not about internal usage anymore
22:32:44BlaXpirit_i actually can't use my library properly because of destructors
22:33:09*sampwing joined #nim
22:33:20Araqcan I find your library anywhere?
22:33:30BlaXpirit_https://github.com/blaxpirit/nim-csfml
22:33:56Mat4I found use of my CPU cores. Instead of delegating tasks to them I will let run each core a virtual machine processing different programs. That's probably more efficient
22:35:24AraqBlaXpirit_: which file(s)?
22:35:30AraqMat4: nice.
22:35:38BlaXpirit_Araq, destructors are absolutely everywhere
22:35:47BlaXpirit_every ptr object has a destroy proc
22:36:08BlaXpirit_And using such object is a pain
22:36:42Araqhttps://github.com/BlaXpirit/nim-csfml/blob/master/src/csfml_graphics.nim has none
22:36:43BlaXpirit_ah, sorry, Araq. an example is src/private/csfml_graphics_gen.nim
22:36:55Araqhttps://github.com/BlaXpirit/nim-csfml/blob/master/src/csfml_window.nim has none
22:37:42BlaXpirit_also, I changed the "override" pragma to "destroy" pragma
22:37:51BlaXpirit_custom one, so i can toggle destructors
22:38:15*fwef quit (Quit: My Mac has gone to sleep. ZZZzzz…)
22:40:11*jefus_ joined #nim
22:41:20Araqok, well I am still not sure why it's a pita to work with
22:41:47Araqtake Texture for instance
22:42:06AraqcreateTempTexture().foo() # shouldn't be common
22:43:08Araqand when you do: var tex = createTexture() the destructor is called at the end of this scope
22:43:29BlaXpirit_that's all nice
22:43:39*jefus quit (Ping timeout: 252 seconds)
22:43:42BlaXpirit_but think about an object that owns a sprite
22:43:59BlaXpirit_(because I couldn't subclass Sprite, because it's "final")
22:43:59*fwef joined #nim
22:44:15BlaXpirit_these things tend to circulate like crazy
22:44:23Araq(you can use .inheritable to get around this, usually)
22:44:38*saml quit (Quit: Leaving)
22:44:38BlaXpirit_that's nice to know
22:45:22BlaXpirit_sounds like a lot of "object roots"
22:45:27Araqwell if the sprite has a texture, the sprite itself is destructible and you cannot do wild things with it
22:45:49BlaXpirit_nah, sprite doesn't have a texture
22:45:55BlaXpirit_player has a sprite
22:45:58BlaXpirit_players come and go
22:46:32Araqwell and as they come and go, you cannot attach their lifetime to the stackframe and so destructors cannot work
22:47:37BlaXpirit_that kinda makes sense, but the point of reassignment shouldn't be too difficult to track as well
22:48:04BlaXpirit_"c++ doesn't have these limitations"
22:48:48Araqwell C++ can overload assignment
22:48:54Araqwe cannot yet.
22:49:09BlaXpirit_umm overloading assignment only makes things more difficult
22:49:40Araqbut do you really want a pair of construct/destruct in the assignment?
22:49:53Araqcause that's what can happen in C++
22:50:09Araqand btw
22:50:13BlaXpirit_of course, it is obvious that this is what should happen
22:50:29Araqwe have a much more powerful tracking in the compiler
22:50:42Araqbut destructors doesn't use that, maybe it should
22:50:51Araqbut again, I need concrete examples
22:50:58BlaXpirit_i'm not saying Nim isn't awesome, just saying it limits me more than C++ in some cases
22:51:24Araqthat's not news to me
22:51:58BlaXpirit_limits not simply in features, but in concrete usecases
22:52:25Araqwell you can either complain or help to improve the situation.
22:52:35BlaXpirit_I don't think I can help to improve the situation
22:52:50BlaXpirit_with things other than complaining or writing issues
22:53:13AraqI asked you for more and concrete examples
22:53:25BlaXpirit_can't come up
22:53:37BlaXpirit_my current example is not convincing
22:53:40AraqI'm not saying "you are stupid, the rules are perfect as they are"
22:54:04AraqI'm really willing to push this into a usable state even for version 1.0
22:54:28BlaXpirit_[:52:58] one could say that's what happened when i complained about recursive types :p
22:54:50Araqyeah, one could say that, but it is completely unfair
22:55:04Araqbut I don't see the point in discussing that again
22:55:44Araqif you feel personally insulted when I criticize your design and designs like these in general, then so be it.
22:58:18BlaXpirit_Araq, what about arrays then?
22:58:31BlaXpirit_it's actually very typical to have an array of sprites
22:58:40BlaXpirit_or any object that has a destructor.,...
23:02:15Araqwell that depends on what the compiler actually requires for this case, I don't know what it does
23:02:56BlaXpirit_I can't create a seq with a destructible object
23:03:08BlaXpirit_that's definitely limiting
23:03:16Araqlet foo = @[a, b, c] doesn't compile?
23:04:04BlaXpirit_.give Araq {.experimental.};type T = object; m: int;proc destroy*(t: T) {.override.} = discard;var t = @[T(m: 5)]
23:04:07MimbusAraq: eval.nim(7, 11) Error: usage of a type with a destructor in a non destructible context
23:04:19BlaXpirit_oh, you mean like that
23:05:57Araqok, that's definitely a bug
23:06:00BlaXpirit_:P
23:06:43BlaXpirit_All I can dream about is that the "destructible context" is gone
23:06:43flaviuBlaXpirit_: You can have a space after the semicolon now!
23:07:26AraqBlaXpirit_: I think it's just too limiting but the idea itself is good
23:07:44Araqwe just need to find more contexts that should be allowed
23:08:07BlaXpirit_Araq, umm another thing
23:08:15BlaXpirit_you can indeed create an array with existing object
23:08:29BlaXpirit_but it gets destroyed anyway
23:09:07BlaXpirit_Araq, https://bpaste.net/show/7b4743e13a05 - the presence of the destructor causes SIGSEGV
23:09:10BlaXpirit_without it it works
23:09:36BlaXpirit_at this point this is probably asking too much
23:10:50Araqhmm well somebody should try this feature when it at least works as I imagined it to work ...
23:11:06BlaXpirit_what do you mean?
23:11:28Araqthat it's not obvious for anybody whether the design is unusable
23:11:32Araqor just the implementation
23:11:37BlaXpirit_there are plenty of simple enough examples with that library of mine
23:11:46BlaXpirit_it works until complex structures come into play
23:12:03*johnsoft quit (Ping timeout: 245 seconds)
23:12:15*johnsoft joined #nim
23:13:22Araqwell since it's experimental anyway
23:13:35Araqwhat I can do tonight is to make that error a warning
23:13:51Araqthen you can use it and shoot yourself in the foot as much as you want
23:14:06Araq;-)
23:14:07BlaXpirit_you mean remove destructible context?
23:14:18Araqnot removing it
23:14:26Araqbut the error will just be a warning
23:14:32BlaXpirit_very interesting
23:14:49BlaXpirit_thank you
23:18:09Araqoh I can also fix the @[obj] bug :P
23:18:19Araqit's obvious now that I look at the code
23:22:38*milosn quit (Ping timeout: 272 seconds)
23:23:26*milosn joined #nim
23:23:51*Matthias247 quit (Read error: Connection reset by peer)
23:24:40AraqBlaXpirit_: there you go, but I tested nothing
23:28:40BlaXpirit_i remembered my first encounter with destructible context - now I changed it to "wrong", indeed get a warning, and everything still works
23:29:09BlaXpirit_ah no
23:29:12BlaXpirit_memory is leaking
23:29:39BlaXpirit_Araq, reassigning causes memory leak :>
23:29:47BlaXpirit_i mean, causes destructor not to be called
23:30:57Araqgood, that's exactly what you want, RIGHT?!
23:31:25BlaXpirit_no, I want everything to just work
23:31:52BlaXpirit_but I suppose this is better, because I can probably call the destructor manually
23:32:20BlaXpirit_yup :)
23:32:44Araqyou have your own way of showing gratitude
23:33:08*flaviu quit (Read error: Connection reset by peer)
23:33:08*Mimbus quit (Read error: Connection reset by peer)
23:33:15BlaXpirit_i did say "thank you" 15 min ago
23:35:22Araqthat's not enough, you have to give your Araq statue a peanut
23:35:43Araq(you have an Araq statue that you worship, right?!)
23:35:46*BlaXpirit_ shrugs
23:36:47*flaviu joined #nim
23:38:03*EXetoC quit (Quit: WeeChat 1.0.1)
23:38:39def-Araq: Can you say something about the top question here?: https://news.ycombinator.com/item?id=8934582
23:40:48Araqwell pcwalton's answer is very good
23:41:13AraqI simply disagree that via Curry-Howard, qualifies as "automated proof technology"
23:41:32Araqbut the terms are not well defined
23:41:34*EXetoC joined #nim
23:42:42*Mimbus joined #nim
23:44:13Araqeither you do flow dependent typing or you don't
23:44:46Araqif you don't do it, it's not "automated proof technology" ;-)
23:46:11Araqwell ... hard to explain
23:46:47Araqbut look at the example
23:47:06Araqhow would a *type* system look like that allows inc i, 2 but not inc i
23:47:14Araqin that particular context
23:48:38def-define a type for even numbers?
23:49:18Araqthat's not the point. the example doesn't care about even vs odd
23:53:36Araqdef-: I'm answering
23:54:59*akiradeveloper joined #nim
23:56:07Araqakiradeveloper: you can use the effect system for that
23:59:14akiradeveloperI understand effect system is propagation of tag in compile time. Am I right?