<< 11-07-2015 >>

00:02:51fowlAraq how about making openarray targetable
00:03:33fowlSo you can define a converter for anything with sequential storage and a length
00:05:18EXetoCwill openarray be needed when we have working concepts?
00:10:58Araqyes
00:11:14AraqopenArray doesn't lead to code duplication
00:11:19Araqa concept does
00:16:11fowlhow about a meta type that does what varargs does when you give it a function to filter its arguments
00:17:18*pregressive quit ()
00:17:40*Trustable quit (Remote host closed the connection)
00:18:17fowlproc s (some: filter[string,`$`]) = # $ is applied at the callsite so this isnt really a generic function
00:18:35*pregressive joined #nim
00:19:19*vendethiel quit (Ping timeout: 265 seconds)
00:28:45*BitPuffin|osx joined #nim
00:29:25*gyeates quit (Ping timeout: 246 seconds)
00:44:37Araqfowl: please help the guy on the forum
00:47:27*ozra quit (Ping timeout: 246 seconds)
00:50:48onionhammerAraq did you run memtest.nim ?
00:52:38Araqcan't remember
00:54:25onionhammerjust re-ran it, it's crawling up to 720mb of memory usage on win
00:55:09onionhammerlet me make sure im up to date on nim..
00:55:23*vendethiel joined #nim
01:02:53VarriountAraq: tscheduler is still locking up occasionally on Windows. :D
01:08:55*jaco60 quit (Ping timeout: 246 seconds)
01:10:38*zach__ joined #nim
01:17:02*vendethiel quit (Ping timeout: 248 seconds)
01:18:09*zach__ quit (Quit: Leaving)
01:19:06*sparrk joined #nim
01:23:48*FedeOmoto quit (Ping timeout: 255 seconds)
01:53:45*pregressive quit (Remote host closed the connection)
01:53:58dgellowHow can I handle a SIGINT ? I cannot catch the exception
01:54:42fowldgellow setcontrolChook()
01:56:14dgellowfowl: nice, thank you
02:06:52EXetoCfowl: made an awesome game yet?
02:11:47*sparrk quit (Remote host closed the connection)
02:27:39fowlEXetoC, hard to get out of prototype phase >.>
02:40:49EXetoCok
02:48:50*vasher_ quit (Quit: Connection closed for inactivity)
03:30:25*darkf joined #nim
03:37:42*gunn quit (Read error: No route to host)
03:37:57*gunn joined #nim
04:05:02*EXetoC quit (Ping timeout: 250 seconds)
04:35:01*vendethiel joined #nim
04:46:47*ChrisMAN quit (Ping timeout: 240 seconds)
04:59:17*vendethiel quit (Ping timeout: 240 seconds)
05:12:23*bjz joined #nim
05:19:24*[CBR]Unspoken quit (Ping timeout: 276 seconds)
06:03:45*wb joined #nim
06:31:25*Miko___ joined #nim
07:13:56*Demon_Fox quit (Quit: Leaving)
07:26:19*mytrile joined #nim
07:32:36*meldron_ is now known as meldron
07:46:36*BitPuffin|osx quit (Ping timeout: 264 seconds)
07:56:59*pipeep quit (Quit: Bye!)
07:57:49*pipeep joined #nim
08:07:18*mytrile quit ()
08:07:36*mytrile joined #nim
08:09:18*Miko___ quit (Ping timeout: 248 seconds)
08:14:16*yglukhov___ joined #nim
08:16:34*vendethiel joined #nim
08:17:30*Miko___ joined #nim
08:31:00*yglukhov___ quit (Quit: Be back later ...)
08:37:54*jaco60 joined #nim
09:02:17*Miko___ quit (Ping timeout: 240 seconds)
09:04:17*Miko___ joined #nim
09:13:21*unclechu joined #nim
09:16:06*mytrile quit (Remote host closed the connection)
09:43:29*X67r joined #nim
09:49:48*mytrile joined #nim
09:53:03*gokr joined #nim
10:03:06*gokr quit (Quit: Leaving.)
10:05:35*vasher_ joined #nim
10:10:49*bjz quit (Quit: My MacBook Pro has gone to sleep. ZZZzzz…)
10:11:12*Miko_____ joined #nim
10:12:08*strcmp1 joined #nim
10:13:06*mytrile quit (Remote host closed the connection)
10:14:37*Miko___ quit (Ping timeout: 246 seconds)
10:17:03*bjz joined #nim
10:22:53*bjz quit (Quit: My MacBook Pro has gone to sleep. ZZZzzz…)
10:23:52*bjz joined #nim
10:37:29*EXetoC joined #nim
10:40:16*yglukhov___ joined #nim
11:07:49*mytrile joined #nim
11:13:18*Trustable joined #nim
11:44:22*wb quit (Read error: Connection reset by peer)
11:45:07*wb joined #nim
11:49:15*mytrile quit (Remote host closed the connection)
11:54:53*X67r quit (Quit: leaving)
11:57:55*mytrile joined #nim
12:01:18*dalarmmst quit (Ping timeout: 248 seconds)
12:02:34*mytrile quit (Ping timeout: 250 seconds)
12:09:54*Ven joined #nim
12:25:54*aziz joined #nim
12:45:41*yglukhov___ quit (Quit: Be back later ...)
12:50:19*mytrile joined #nim
13:00:06*mytrile quit (Remote host closed the connection)
13:07:45*bjz quit (Quit: My MacBook Pro has gone to sleep. ZZZzzz…)
13:10:40*bjz joined #nim
13:25:20*Miko_____ quit (Ping timeout: 250 seconds)
13:26:12*unclechu quit (Ping timeout: 250 seconds)
13:27:06*mytrile joined #nim
13:28:40*unclechu joined #nim
13:35:56*mytrile quit ()
13:36:19*dalarmmst joined #nim
13:36:34*unclechu quit (Remote host closed the connection)
13:39:47*zahary quit (Ping timeout: 240 seconds)
13:52:35*drewsrem joined #nim
13:54:05drewsremIs there a c2nim flag that mangles underscore_prefixed C identifiers "_foo" automatically into "backtick-escaped" nim identifiers?
14:14:49drewsremHmmm... well I thought one could translate a c-identifier like "_foo" into nim `_foo` but apparently I was wrong
14:20:00*gyeates joined #nim
14:26:00*unclechu joined #nim
14:30:25*shevy joined #nim
14:35:44*shevy quit (Quit: "")
14:39:43*BitPuffin|osx joined #nim
14:44:10*gyeates quit (Ping timeout: 252 seconds)
14:45:57*rgv151 joined #nim
14:48:50*vasher_ quit (Quit: Connection closed for inactivity)
14:49:19*unclechu quit (Ping timeout: 246 seconds)
14:50:52*unclechu joined #nim
14:59:03*gyeates joined #nim
15:01:09*vasher_ joined #nim
15:03:27*rgv151 quit (Remote host closed the connection)
15:04:25*arnetheduck joined #nim
15:06:39arnetheduckhi, if I have an imported c function expecting a pointer to an array of elements and a seq with those elements, how can I pass the address of the first seq element to the said function? (it also takes a length)
15:07:08def-arnetheduck: addr mySeq[0]
15:09:08arnetheduckaah.. now I see why that didn't work at first.. was using "let mySeq = @...", then it complains
15:09:26arnetheduckwith var mySeq it works, thanks :)
15:11:15EXetoCthere'll be something like unsafeAddr for immutable variables I think, which of course implies that nothing will be modified
15:11:41EXetoCthat will get rid of many instances of vars or "var x = x"
15:15:45drewsremIs there something in c2nim with which I can change the import path of a header I'm trying to convert to angle-bracket search-path rather then in working-dir? - i.e. I'm using "cnim --header types.h" I copied over from "sys/types.h", but in the produced nim-file I want "header: "<sys/types.h>"" instead of "header: types.h"
15:16:36arnetheduckEXetoC, any idea where to look? can't find it.. though, in my case, doesn't matter really, I'm converting from an openarray anyway
15:16:45drewsremOh wait, there's actually a c2nim user manual ...
15:19:42EXetoCarnetheduck: I said that in future tense. I dunno when we will get that
15:20:34EXetoChttp://forum.nim-lang.org/t/708
15:21:03EXetoCthere's a discussion about it
15:22:57arnetheduckright, missed the future - got it, thanks
15:23:20EXetoCd(:P)|<
15:23:47arnetheduckhm, looks like it could be useful with openarray directly as well, to avoid having to create a seq
15:26:11EXetoCwell, you're either passing in a seq or an array
15:28:45EXetoCthe purpose is just to abstract over multiple types, as well as reducing the code size (amounts of procs), by not generating separate procs for sequences and arrays
15:31:36EXetoCvarargs however might make it seem as though nothing is being allocated on the heap, but it's just an openarray in disguise
15:37:51*jszymanski joined #nim
15:39:31*aziz quit (Remote host closed the connection)
15:42:04*yglukhov___ joined #nim
15:44:02EXetoCdon't forget to exercise! later
15:55:15EXetoCisn't there a repo for the whole website?
15:55:58*Miko_____ joined #nim
15:56:04EXetoCthe gittip link is broken, and the normal cursor is used for the paypal link
15:56:59federico3Recommended game libraries:ludens VS nimgame?
16:06:25*apense quit (Read error: Connection reset by peer)
16:08:34*unclechu1 joined #nim
16:11:12*unclechu quit (Ping timeout: 264 seconds)
16:16:07*Arrrr joined #nim
16:26:16*darkf quit (Quit: Leaving)
17:00:42*apense joined #nim
17:06:06*wb quit (Ping timeout: 255 seconds)
17:08:48*arnetheduck quit (Ping timeout: 256 seconds)
17:13:50Araqdrewsrem: c2nim can do this
17:16:15drewsremAraq, I saw the user manual and figured it out
17:16:44Araqthe user manual is not up to date with the state of the art :P
17:17:24drewsremoh... - I did the header thing by adding the ifdef c2nim macro thinges into the .h files
17:18:44Araqyeah, these days I prefer to use: c2nim config.c2nim header.h
17:19:04Araqand config.c2nim has all the #def's and #header and #cdecl and the other stuff you need
17:19:21Araqthis way translating more than 1 header is much easier
17:19:56drewsremAraq, I do this, copied it from the Urhonimo GH repo, but how'd I write that in the c2nim file?
17:20:12drewsremoh ...
17:20:17Araqsame as in the .h file
17:20:32drewsrem... right, great!
17:20:51Araqlook at my wxWidgets wrapper
17:21:06Araqthat uses every feature under the sun now :P
17:21:57ArrrrWhy can't i do this: http://pastebin.com/wtBVDLQr
17:23:01*shodan45 joined #nim
17:23:41drewsremIs static in a usable state?
17:23:49Araqnot really
17:40:31*dalarmmst quit (Ping timeout: 252 seconds)
17:40:41*Demon_Fox joined #nim
17:45:44*Miko_____ quit (Ping timeout: 265 seconds)
17:48:50Arrrr /exit
17:48:54Arrrrups
17:48:56*Arrrr quit (Quit: WeeChat 1.2)
18:01:57*saml_ joined #nim
18:15:07*shodan45 quit (Read error: Connection reset by peer)
18:16:01*shodan45 joined #nim
18:18:50*vasher_ quit (Quit: Connection closed for inactivity)
18:21:03*ozra joined #nim
18:58:46*drewsrem quit (Quit: Leaving)
19:02:49*lokulin quit (Ping timeout: 256 seconds)
19:13:01*lokulin joined #nim
19:13:11*shodan45 quit (Quit: Konversation terminated!)
19:20:13*pregressive joined #nim
19:20:27*ozra quit (Ping timeout: 246 seconds)
19:40:00*BitPuffin|osx quit (Ping timeout: 255 seconds)
19:40:03*wirbi joined #nim
19:40:19wirbiHello!
19:41:59wirbiI want to use WebSockets from the js nim compiled module (nim js <file_name.nim>)
19:42:59wirbiIn js a code would be like: var ws = new WebSocket("ws://localhost:8080")
19:43:15wirbiSo in nim I need to type WebSocket
19:44:18wirbiHow to do it, if WebSocket get parameter on the instantiation?
19:44:35*Jesin quit (Quit: Leaving)
19:48:18Araqhi wirbi
19:49:32Araqone wy to do it is proc newWebSocket(s: ctring): ref JsSocket {.nodecl, importc: "new WebSocket".}
19:49:38*Jesin joined #nim
19:50:36Araqor you check if somebody already wrapped JS's websocket object
19:58:38wirbiIt's work great! Thank you!
20:19:11*jszymanski quit (Quit: computer sleeps...)
20:25:48*vasher_ joined #nim
20:37:48*Ven quit (Quit: My MacBook has gone to sleep. ZZZzzz…)
20:38:57*ozra joined #nim
20:40:27*saml_ quit (Quit: Leaving)
21:03:17*flaviu quit (Ping timeout: 252 seconds)
21:05:00*Trustable quit (Remote host closed the connection)
21:08:09*flaviu joined #nim
21:34:41*dtscode is now known as antium
21:37:39*wirbi quit (Ping timeout: 246 seconds)
21:48:22*BitPuffin|osx joined #nim
21:56:38*yglukhov___ quit (Quit: Be back later ...)
22:07:36*Sembei joined #nim
22:19:22*Miko_____ joined #nim
22:32:24*X67r joined #nim
22:40:39*zvz joined #nim
22:40:46*zvz left #nim ("WeeChat 1.1.1")
22:50:32reactormonkAraq, it's not that easy to compile the first nim version... ^^
22:51:16Araqas long as the last version compiles
22:51:32reactormonkAraq, debian-style archeology.
22:51:44reactormonkwould you know the first version of the self-hosting compiler?
22:52:11Araqno. according to our news it was 0.6.0
22:54:21reactormonkI'll be flying for a few hours, got me something to tinker on? I figured an iterative compiling script might be nice for getting the debian guys on board.
22:55:14*Miko___ joined #nim
22:55:40EXetoCsitting in a chair, in the sky. that seems a little dangerous
22:55:43Araqplease patch "nim doc2" to producea "per type" view
22:55:57Araqthat's something to tinker with
22:56:20reactormonkAraq, so basically index by type?
22:57:14reactormonkshould I weave https://github.com/olivernn/lunr.js in there?
22:58:41*newtonim joined #nim
22:59:00Araqreactormonk: fine with me as long as the license is fine
22:59:10Araqhi newtonim welcome
22:59:12*Miko_____ quit (Ping timeout: 264 seconds)
22:59:14newtonimhi
22:59:30reactormonkAraq, basically WTFPL
22:59:47Araqwhat is WTFPL?
22:59:53reactormonkdo what the fuck you want.
23:00:02reactormonkgotta keep his notice in though.
23:02:37*Miko___ quit (Ping timeout: 244 seconds)
23:05:16newtonimhi to all. I found Nim while looking for a language C for development on embedded devices. right now I'm also interested in Lua and the TekUi GUI toolkit which seems just the right thing (minus Nim speed and smaller size). so my question is if anyone considered porting the Tekui code and concept (small, doesn't require a wm, few dependencies ewtc) to Nim.
23:06:04newtonim"for a higher level language than C"
23:06:38EXetoCWTF poland?
23:08:23EXetoCa WM isn't required?
23:08:36newtonimmore information on what I'm talking about here: http://tekui.neoscientists.org/
23:09:43reactormonknewtonim, c2nim on header files is your friend - it's probably not gonna be idiomatic but eh, it works.
23:09:47EXetoCyou mean, it's not dependent on a specific WM?
23:10:07newtonimues thanks
23:11:02EXetoCok so framebuffers are supported
23:11:32newtonimyes
23:11:48EXetoCit seems to have something similar to QML
23:12:07newtonimit would allow very small footprint interfaces to be written for use with nim
23:12:18reactormonknewtonim, if it has a C api, you're good ot go. If it doesn't you're gonna have a bad time.
23:12:23Araqnewtonim: looks very interesting, what's it written in?
23:12:38newtonimlua and some c i believe
23:12:39Araqreactormonk: bullshit, c2nim handles thousands of lines of C++ code nowadays
23:12:56reactormonkAraq, I'm not talking c vs. c++, I'm talking c vs. lua
23:12:59newtonimyes, lua and c
23:12:59EXetoC:>
23:13:04newtonimjust checked
23:13:10reactormonkthen you're golden
23:15:03reactormonknewtonim, hm, according to the overview, you'll have the lua VM running. And I'd say nim GC and lua GC at the same time might get... hairy?
23:15:54newtonimyes that's why a port it would be interesting
23:16:00*ozra quit (Ping timeout: 246 seconds)
23:18:39EXetoCreactormonk: the libraries usually do the allocation, so it's just a matter of wrapping the types, unless you're referring to something else
23:18:54reactormonknewtonim, ah, you want to port it.
23:19:04reactormonksorry, I though you want to use it.
23:19:07newtonimhaving a lua user interface talking with the underlying nim program could work but also defeat the purpose of having minimal footprint in case of small devices
23:19:18newtonimyes, ...well.. I'd like to be able to
23:19:33Araqwell I downloaded it and am skimming the code
23:19:49Araqso far I see clean C headers and no Lua code in the implemenation either
23:20:45EXetoCbut the wrapper would have to be allocated on the GC which imposes some overhead, since you can't achieve reference semantics otherwise (no overloading of = yet)
23:21:39AraqEXetoC: overloading of '=' works, it's just that it doesn't work with destructors yet. it's however a single bug preventing that from working
23:21:45newtonimbasically it would be a killer feature (IMO) if a nim program could create similar
23:21:47EXetoCok
23:22:19EXetoCwhat I said might not be relevant anyway, if indeed the C code does not depend on lua
23:22:26newtoniminterface without a ton of dependencies
23:23:25Araqnewtonim: have you looked at "iup" too?
23:23:26EXetoCIUP doesn't have that many dependencies, but it might be too basic
23:23:36newtonimnot yet
23:24:11newtonimI'm really new to nim, just read some articles and code
23:24:47EXetoCwe soon have a high level GTK and Qt (just QML?) wrapper, and Araq has a usable (but unfinished?) wxwidgets interface, so things are shaping up nicely
23:25:13newtonimthat's good
23:28:37*antium is now known as dtscode
23:29:01newtonimI'm probably a bit old fashioned also (grey beard, hehe) but I'd love a dead tree book on the language; I like online references but also love reading far away from the computer. Should they write one, I'm getting it as soon as they print it.
23:30:01EXetoCis it a unix beard though? if so then you are welcome here any time
23:30:56Araqnewtonim: books about Nim are in the works, but won't be ready this year
23:31:01newtonimyes, linux since 1997 and some aix and tru64 at work. but i'm by no means an expert.
23:31:30Araqhowever the manual is available as a PDF
23:31:36EXetoCyou could ask the authors of various tutorial websites if they could adapt them for printing, if they don't look good on that format already
23:33:36*unclechu1 quit (Quit: Leaving.)
23:33:39newtonimhave to check how the pdf render on a tablet. last time I checked a technical book on a cheap eink reader it had the latency of a dead bradypus:)
23:33:40EXetoCI can only recall this one actually https://nim-by-example.github.io/ but it's fairly brief atm
23:34:38EXetoCdead tree books are nice; especially for fiction :-p
23:39:15newtonimgoing to bed, it's 1:40 here
23:39:26newtonimbye to all and keep up the great work on nim
23:39:54*newtonim quit (Quit: Page closed)
23:58:50*vasher_ quit (Quit: Connection closed for inactivity)