00:02:51 | fowl | Araq how about making openarray targetable |
00:03:33 | fowl | So you can define a converter for anything with sequential storage and a length |
00:05:18 | EXetoC | will openarray be needed when we have working concepts? |
00:10:58 | Araq | yes |
00:11:14 | Araq | openArray doesn't lead to code duplication |
00:11:19 | Araq | a concept does |
00:16:11 | fowl | how 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:17 | fowl | proc 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:37 | Araq | fowl: please help the guy on the forum |
00:47:27 | * | ozra quit (Ping timeout: 246 seconds) |
00:50:48 | onionhammer | Araq did you run memtest.nim ? |
00:52:38 | Araq | can't remember |
00:54:25 | onionhammer | just re-ran it, it's crawling up to 720mb of memory usage on win |
00:55:09 | onionhammer | let me make sure im up to date on nim.. |
00:55:23 | * | vendethiel joined #nim |
01:02:53 | Varriount | Araq: 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:58 | dgellow | How can I handle a SIGINT ? I cannot catch the exception |
01:54:42 | fowl | dgellow setcontrolChook() |
01:56:14 | dgellow | fowl: nice, thank you |
02:06:52 | EXetoC | fowl: made an awesome game yet? |
02:11:47 | * | sparrk quit (Remote host closed the connection) |
02:27:39 | fowl | EXetoC, hard to get out of prototype phase >.> |
02:40:49 | EXetoC | ok |
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:05 | drewsrem | Is there a c2nim flag that mangles underscore_prefixed C identifiers "_foo" automatically into "backtick-escaped" nim identifiers? |
14:14:49 | drewsrem | Hmmm... 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:39 | arnetheduck | hi, 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:08 | def- | arnetheduck: addr mySeq[0] |
15:09:08 | arnetheduck | aah.. now I see why that didn't work at first.. was using "let mySeq = @...", then it complains |
15:09:26 | arnetheduck | with var mySeq it works, thanks :) |
15:11:15 | EXetoC | there'll be something like unsafeAddr for immutable variables I think, which of course implies that nothing will be modified |
15:11:41 | EXetoC | that will get rid of many instances of vars or "var x = x" |
15:15:45 | drewsrem | Is 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:36 | arnetheduck | EXetoC, 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:45 | drewsrem | Oh wait, there's actually a c2nim user manual ... |
15:19:42 | EXetoC | arnetheduck: I said that in future tense. I dunno when we will get that |
15:20:34 | EXetoC | http://forum.nim-lang.org/t/708 |
15:21:03 | EXetoC | there's a discussion about it |
15:22:57 | arnetheduck | right, missed the future - got it, thanks |
15:23:20 | EXetoC | d(:P)|< |
15:23:47 | arnetheduck | hm, looks like it could be useful with openarray directly as well, to avoid having to create a seq |
15:26:11 | EXetoC | well, you're either passing in a seq or an array |
15:28:45 | EXetoC | the 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:36 | EXetoC | varargs 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:02 | EXetoC | don't forget to exercise! later |
15:55:15 | EXetoC | isn't there a repo for the whole website? |
15:55:58 | * | Miko_____ joined #nim |
15:56:04 | EXetoC | the gittip link is broken, and the normal cursor is used for the paypal link |
15:56:59 | federico3 | Recommended 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:50 | Araq | drewsrem: c2nim can do this |
17:16:15 | drewsrem | Araq, I saw the user manual and figured it out |
17:16:44 | Araq | the user manual is not up to date with the state of the art :P |
17:17:24 | drewsrem | oh... - I did the header thing by adding the ifdef c2nim macro thinges into the .h files |
17:18:44 | Araq | yeah, these days I prefer to use: c2nim config.c2nim header.h |
17:19:04 | Araq | and config.c2nim has all the #def's and #header and #cdecl and the other stuff you need |
17:19:21 | Araq | this way translating more than 1 header is much easier |
17:19:56 | drewsrem | Araq, I do this, copied it from the Urhonimo GH repo, but how'd I write that in the c2nim file? |
17:20:12 | drewsrem | oh ... |
17:20:17 | Araq | same as in the .h file |
17:20:32 | drewsrem | ... right, great! |
17:20:51 | Araq | look at my wxWidgets wrapper |
17:21:06 | Araq | that uses every feature under the sun now :P |
17:21:57 | Arrrr | Why can't i do this: http://pastebin.com/wtBVDLQr |
17:23:01 | * | shodan45 joined #nim |
17:23:41 | drewsrem | Is static in a usable state? |
17:23:49 | Araq | not 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:50 | Arrrr | /exit |
17:48:54 | Arrrr | ups |
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:19 | wirbi | Hello! |
19:41:59 | wirbi | I want to use WebSockets from the js nim compiled module (nim js <file_name.nim>) |
19:42:59 | wirbi | In js a code would be like: var ws = new WebSocket("ws://localhost:8080") |
19:43:15 | wirbi | So in nim I need to type WebSocket |
19:44:18 | wirbi | How to do it, if WebSocket get parameter on the instantiation? |
19:44:35 | * | Jesin quit (Quit: Leaving) |
19:48:18 | Araq | hi wirbi |
19:49:32 | Araq | one wy to do it is proc newWebSocket(s: ctring): ref JsSocket {.nodecl, importc: "new WebSocket".} |
19:49:38 | * | Jesin joined #nim |
19:50:36 | Araq | or you check if somebody already wrapped JS's websocket object |
19:58:38 | wirbi | It'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:32 | reactormonk | Araq, it's not that easy to compile the first nim version... ^^ |
22:51:16 | Araq | as long as the last version compiles |
22:51:32 | reactormonk | Araq, debian-style archeology. |
22:51:44 | reactormonk | would you know the first version of the self-hosting compiler? |
22:52:11 | Araq | no. according to our news it was 0.6.0 |
22:54:21 | reactormonk | I'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:40 | EXetoC | sitting in a chair, in the sky. that seems a little dangerous |
22:55:43 | Araq | please patch "nim doc2" to producea "per type" view |
22:55:57 | Araq | that's something to tinker with |
22:56:20 | reactormonk | Araq, so basically index by type? |
22:57:14 | reactormonk | should I weave https://github.com/olivernn/lunr.js in there? |
22:58:41 | * | newtonim joined #nim |
22:59:00 | Araq | reactormonk: fine with me as long as the license is fine |
22:59:10 | Araq | hi newtonim welcome |
22:59:12 | * | Miko_____ quit (Ping timeout: 264 seconds) |
22:59:14 | newtonim | hi |
22:59:30 | reactormonk | Araq, basically WTFPL |
22:59:47 | Araq | what is WTFPL? |
22:59:53 | reactormonk | do what the fuck you want. |
23:00:02 | reactormonk | gotta keep his notice in though. |
23:02:37 | * | Miko___ quit (Ping timeout: 244 seconds) |
23:05:16 | newtonim | hi 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:04 | newtonim | "for a higher level language than C" |
23:06:38 | EXetoC | WTF poland? |
23:08:23 | EXetoC | a WM isn't required? |
23:08:36 | newtonim | more information on what I'm talking about here: http://tekui.neoscientists.org/ |
23:09:43 | reactormonk | newtonim, c2nim on header files is your friend - it's probably not gonna be idiomatic but eh, it works. |
23:09:47 | EXetoC | you mean, it's not dependent on a specific WM? |
23:10:07 | newtonim | ues thanks |
23:11:02 | EXetoC | ok so framebuffers are supported |
23:11:32 | newtonim | yes |
23:11:48 | EXetoC | it seems to have something similar to QML |
23:12:07 | newtonim | it would allow very small footprint interfaces to be written for use with nim |
23:12:18 | reactormonk | newtonim, if it has a C api, you're good ot go. If it doesn't you're gonna have a bad time. |
23:12:23 | Araq | newtonim: looks very interesting, what's it written in? |
23:12:38 | newtonim | lua and some c i believe |
23:12:39 | Araq | reactormonk: bullshit, c2nim handles thousands of lines of C++ code nowadays |
23:12:56 | reactormonk | Araq, I'm not talking c vs. c++, I'm talking c vs. lua |
23:12:59 | newtonim | yes, lua and c |
23:12:59 | EXetoC | :> |
23:13:04 | newtonim | just checked |
23:13:10 | reactormonk | then you're golden |
23:15:03 | reactormonk | newtonim, 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:54 | newtonim | yes that's why a port it would be interesting |
23:16:00 | * | ozra quit (Ping timeout: 246 seconds) |
23:18:39 | EXetoC | reactormonk: 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:54 | reactormonk | newtonim, ah, you want to port it. |
23:19:04 | reactormonk | sorry, I though you want to use it. |
23:19:07 | newtonim | having 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:18 | newtonim | yes, ...well.. I'd like to be able to |
23:19:33 | Araq | well I downloaded it and am skimming the code |
23:19:49 | Araq | so far I see clean C headers and no Lua code in the implemenation either |
23:20:45 | EXetoC | but 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:39 | Araq | EXetoC: 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:45 | newtonim | basically it would be a killer feature (IMO) if a nim program could create similar |
23:21:47 | EXetoC | ok |
23:22:19 | EXetoC | what I said might not be relevant anyway, if indeed the C code does not depend on lua |
23:22:26 | newtonim | interface without a ton of dependencies |
23:23:25 | Araq | newtonim: have you looked at "iup" too? |
23:23:26 | EXetoC | IUP doesn't have that many dependencies, but it might be too basic |
23:23:36 | newtonim | not yet |
23:24:11 | newtonim | I'm really new to nim, just read some articles and code |
23:24:47 | EXetoC | we 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:13 | newtonim | that's good |
23:28:37 | * | antium is now known as dtscode |
23:29:01 | newtonim | I'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:01 | EXetoC | is it a unix beard though? if so then you are welcome here any time |
23:30:56 | Araq | newtonim: books about Nim are in the works, but won't be ready this year |
23:31:01 | newtonim | yes, linux since 1997 and some aix and tru64 at work. but i'm by no means an expert. |
23:31:30 | Araq | however the manual is available as a PDF |
23:31:36 | EXetoC | you 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:39 | newtonim | have 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:40 | EXetoC | I can only recall this one actually https://nim-by-example.github.io/ but it's fairly brief atm |
23:34:38 | EXetoC | dead tree books are nice; especially for fiction :-p |
23:39:15 | newtonim | going to bed, it's 1:40 here |
23:39:26 | newtonim | bye 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) |